nanocodex-tools
v0.6.1
Published
Platform-neutral JavaScript tools for Nanocodex agents
Readme
nanocodex-tools
Reusable, platform-neutral JavaScript tools for Nanocodex agents: the common
tool router and Code Mode runtime, attachment and hosted-tool protocols,
durable-memory parsing and ranking, artifact and dataset tools, persistent
workspace adaptation, a bounded Just Bash runtime, Git/GitHub compatibility
commands, repository materialization, and workspace-backed SSH composition.
Session-search parsing, retrieval policy, and bounded model-visible projections
are exposed through the dedicated nanocodex-tools/session entrypoint.
nanocodex-tools/x exports the native browseX({ fetch }) tool, its request
validator, and X_API discovery metadata. Hosts inject transport to the
Nanocodex X Worker; provider access stays in that Worker.
Hosts own persistence, network policy, credentials, and socket transports and inject those capabilities through the package's narrow interfaces.
nanocodex owns the Rust/WASM agent runtime and composes WASM, workspace, and
MCP adapters around these capabilities. It imports and reexports this package's
JS-only host capabilities; nanocodex-tools never imports nanocodex.
Cloudflare Workers may supply Durable Object persistence and WebSocket registries to the hosted-tools core, but Cloudflare bindings, account authority, Connect grants, and storage schemas remain owned by those Workers.
nanocodex-tools/node supplies native exec_command and write_stdin pipe
sessions for explicitly authorized desktop/Node Hands. Processes use an explicit
workspace cwd and a small environment allowlist, and sessions are fenced by the
calling agent. The workspace is not an OS sandbox; hosts must make the native
authority clear and use a VM for isolation. Closing the runtime terminates owned
processes. This entrypoint imports Node APIs and must not be bundled into Workers
or browser applications.
Native Node Hands retain unread command output in private temporary files. Reply budgets control each poll, without discarding older output. Files are removed when fully consumed or when their owning session or Hand is closed.
