28 Commits
Author SHA1 Message Date
Pranit 5c3214654c Limit native fetch cleanup to the focused repair 2026-10-03 16:56:36 -04:00
Pranit ff9b331fe4 Merge main into resolved model metadata work 2026-10-02 13:38:55 -04:00
Pranit b031612036 Reuse resolved model metadata in libfx
Resolve selected capabilities during configuration and carry a scoped,
expiring descriptor into fresh agents. Preserve kernel validation without
per-message catalog discovery.

Complete consumed native HTTP responses under bounded cleanup instead of
aborting successful streams before EOF.
2026-10-02 13:08:37 -04:00
Pranit 8558bb76c6 Send libfx images as raw bytes
libfx base64 encoded image bytes at each host boundary: the prompt
message, the native fetch handoff, and checkpoints in both directions.
Prompt images and checkpoints now cross as raw attachments beside their
JSON-RPC frames, the native addon hands fetch a raw request body, and
checkpoints store image bytes raw. The model request is unchanged.

Image prompts also accept raw bytes, and a new resizeImage option can
shrink or convert images before they are sent.
2026-10-01 04:11:51 -04:00
Pranit 3c33cde039 Add fast mode control to libfx agents
createFxAgent() accepts a boolean fast option matching --fast/--no-fast.
Enabling fast is validated against the selected model's advertised fast
path during agent creation and rejects with a LIBFX_UNSUPPORTED_FAST
error naming the model. fast: false or omitting the option keeps current
behavior.
2026-09-20 02:19:41 -04:00
Pranit fda7f97b73 Add reasoning effort control to libfx agents
createFxAgent() accepts an effort option using the same vocabulary as
--effort. A named level is validated against the selected model's
advertised effort levels during agent creation and rejects with a
LIBFX_UNSUPPORTED_EFFORT error naming the supported set. ACP turn
usage now surfaces provider reasoning tokens.
2026-09-20 01:48:08 -04:00
Pranit 216418bdc5 Load libfx assets from webpack server bundles 2026-09-07 16:05:18 -04:00
Pranit 97b5a07591 Reject null backend probe selectors 2026-09-06 19:37:51 -04:00
Pranit 52c4ca8c86 Keep Vercel qualification independent of npm publishing 2026-09-06 14:53:40 -04:00
Pranit d765fc9880 Keep Wasm probe failures structured 2026-09-06 13:32:10 -04:00
Pranit 2264cdc587 Fix libfx loading in Node deployments 2026-09-06 13:18:36 -04:00
Pranit a37dc8e52f Integrate current SDK cancellation and output handling 2026-09-04 11:04:52 -04:00
Pranit 1035a82649 Verify SDK catalog requests across native and Wasm 2026-09-04 10:52:08 -04:00
Pranit 30b153c1da Preserve MCP reconnection and SDK result boundaries 2026-09-04 10:44:48 -04:00
Pranit 2bd1828fc1 Stream SDK output with bounded backpressure 2026-09-04 08:50:03 -04:00
Pranit b363c9448e Respect turn cancellation before starting host requests 2026-09-04 03:22:01 -04:00
Pranit ae0ad3ac53 Fix libfx readiness and runtime cleanup 2026-09-04 01:02:24 -04:00
Pranit 79158e4dbd Ignore discarded readiness calls before accessing finalized state 2026-09-04 00:52:01 -04:00
Pranit daa3b4c178 Keep native readiness wakes arriving during a drain 2026-09-04 00:52:01 -04:00
Pranit a1325fe714 Keep idle native fetch cancellation from affecting later turns 2026-09-04 00:52:01 -04:00
Pranit ae50ab1ff5 Wake libfx native runtimes without polling 2026-09-04 00:52:01 -04:00
Pranit 82bf7bea2c Reduce libfx time to first token
Start libfx Agents without fetching the model catalog or adding hidden system context.
Add explicit listModels() discovery for hosts that need the Gateway catalog.
Report safe transport timing and retry one transport failure before a response is published.
Avoid extended Gateway execution for embedded requests while retaining session affinity.
Compare libfx and Pi with the same isolated workload and request context.
2026-09-03 10:47:36 -04:00
Pranit fda28a6d6c Route native agents through shared validation
Require the versioned createCore ABI for native agents so every backend uses the same option normalizer. Update the N-API ownership guide and loader regression coverage.
2026-09-02 19:32:16 -04:00
Pranit a8e4d3f1db Cache libfx Wasm modules and silence ambient tracing
Reuse compiled Wasm modules across Agents in the same JavaScript realm while preserving isolated instances.

Keep inherited FX_TRACE_* settings from enabling diagnostics inside the N-API addon.
2026-09-02 01:06:49 -04:00
Pranit b94df53428 Scope native fetches to stream handles
Correlate each Node-owned fetch with its native stream handle and stop stale callbacks from mutating later requests. Reject incompatible low-level addon versions before runtime creation.
2026-08-17 02:52:52 -04:00
Pranit f57d54c024 Bound host stream error responses
Cap aggregated Gateway error bodies, remove a dead fetch bridge helper, and start the host-failure watchdog after runtime setup so cold test runs remain deterministic.
2026-08-16 14:11:43 -04:00
Pranit 51bfe627b1 Fix embedded Node runtime boundaries
Honor host-owned startup roots and propagate native runtime failures through the JavaScript adapter.

Discard canceled fetches before reuse and include the project license in package artifacts.
2026-08-16 13:33:35 -04:00
Pranit 09deb7f30d Embed fx in Node.js
Add a Node-API addon for running headless fx agents inside Node.js while keeping fetch streaming and cancellation in JavaScript.

Expose Node and browser package entry points with WebAssembly fallback and terminal support. Build, test, and package native macOS/Linux addons alongside ReleaseSmall WebAssembly artifacts.
2026-08-16 04:06:49 -04:00