Skip to main content
NanocodexAgent connects Smithers to the external smithers-nanocodex bridge. The adapter does not bundle or download the executable at runtime. You build, qualify, and install the pinned-source artifact separately, then select it with binary or PATH. The v0.0.1 integration is deliberately fixed: one fresh serve worker and one stock Nanocodex turn per generate() call. There is no daemon, worker pool, or bridge-session reuse. generate() also performs a short, provider-free capability check before starting that worker.

Requirements

  • Linux x64 with the x86_64-unknown-linux-gnu ABI
  • glibc 2.35 or newer; Ubuntu 22.04 is the oldest supported baseline
  • Bubblewrap at /usr/bin/bwrap or /bin/bwrap, with usable private PID namespaces; other locations and PATH lookup are not trusted, and the adapter fails closed if neither path works
  • Smithers on Node.js 22 or Bun 1.3 or newer
macOS, Windows, Linux arm64, musl, and older glibc versions fail before the bridge starts. Install Bubblewrap with your distribution package manager. On Ubuntu:

Build the pinned release from source

Smithers assigns source-build provenance only to an artifact matching the checked-in pin produced from the exact source commit below. Smithers does not record, execute, or qualify the published v0.0.1 binary. The qualified consumer pin is: Build and install that artifact:
Smithers validates every tar header and rejects path traversal, links, devices, extended headers, duplicate paths, and anything outside the exact package root before using the executable. A locally built archive that differs from the checked-in pin can still receive the provider-free behavioral report, but its artifactProvenance is unverified-input and its source fields are null.

Configure the adapter

With the executable on PATH, no binary option is needed:
Set binary to an executable name resolved through PATH or to a path. The adapter resolves and canonicalizes the executable during preflight.
When inheritEnv is false, ambient process variables are not inherited. The serve worker receives variables configured in env plus any Smithers task-context identifiers supplied for the call: SMITHERS_RUN_ID, SMITHERS_NODE_ID, SMITHERS_ITERATION, and SMITHERS_ATTEMPT. Include PATH in env if binary is a command name; ambient PATH is not used in this mode. Prompts, credentials, and snapshots never appear in process arguments.

Authentication

API-key mode is the default and reads OPENAI_API_KEY. You can name another bridge-process environment variable as shown above. The credential value stays out of protocol JSON, although same-UID host processes may still inspect the bridge environment through facilities such as Linux /proc. Managed ChatGPT mode uses the normal Nanocodex/Codex auth file or an explicit absolute path:
Within one Smithers JavaScript process, managed-ChatGPT generate() calls that resolve to the same canonical auth file are FIFO-serialized across NanocodexAgent instances. The gate covers the serve worker through verified process closure; provider-free preflight may still run concurrently, and the gate releases before checkpoint publication. Calls using different auth files and all API-key calls remain concurrent. A queued caller may abort promptly, but later waiters do not overtake the active call. This serialization is process-local. Do not run another Smithers process, Nanocodex bridge, or other credential-refreshing process against the same auth file concurrently. preflight() checks the host, executable, namespace profile, and declared target/version/capability surface without loading credentials or contacting a provider. The actual managed-ChatGPT adapter suite is packages/agents/tests/nanocodex-live.test.js. It is opt-in/manual through SMITHERS_RUN_NANOCODEX_LIVE=1, not part of normal package-test execution, and must run only in a trusted environment. The engine cold-restart suite at packages/engine/tests/nanocodex-live-workflow.test.js uses the same opt-in gate. Never enable either suite in a fork pull request or any job that exposes repository secrets.

Fixed v0.0.1 surface

instructions replaces the stock instructions completely. Per-call system messages, JavaScript tools, provider options, and resumeSession are rejected.

Checkpoints and workspace identity

Each completed turn returns a durable Smithers checkpoint containing the exact opaque Nanocodex snapshot. Resume is accepted only when the checkpoint’s canonicalWorkspace exactly matches the current canonical workspace, along with the bridge, Nanocodex, snapshot, codec, and policy versions. Moving a checkpoint across worktrees, machines, symlink-resolved roots, or absolute workspace paths is unsupported. Fork mode is unsupported. Treat checkpoints as secrets. A snapshot may contain conversation context, tool results, source material, paths, or credentials that the agent read. Smithers validates and bounds the envelope but does not sanitize the opaque snapshot.

What Bubblewrap contains

The adapter requires this PID namespace profile:
This profile makes descendant membership and cleanup authoritative, including detached native-tool processes. It is PID containment only. It is not filesystem, network, device, or credential isolation: / is bound read-write, host networking remains available, /dev follows host permissions, and readable auth files and environment credentials remain reachable. Use a stronger external mount, environment, network, or credential-broker policy when your deployment requires those boundaries.

Qualify the release

packages/agents/tests/fixtures/nanocodex/source-build-v0.0.1.json records the pinned source build and provider-free adapter preflight. It makes no checksum claim about the separately published release artifact. From a Smithers checkout on a supported host, this command inspects a local archive and runs the public adapter preflight:
--archive is required. The command reads no remote source, rejects the input unless it is a non-empty regular file no larger than 8 MiB, computes its SHA-256, and safely inspects its layout. Only the pinned source-build digest and size receive pinned-source-build-sha256 provenance; every other input is explicitly reported as unverified-input, with no source commit or tree claim. A direct local invocation does not itself initiate a network request, but the probed executable retains the PID-only adapter profile’s host networking. Add an external network boundary when running an untrusted local input. In a temporary scratch workspace, the verifier materializes the archive executable and bounded probe launchers. It runs exact-version and full-capability probes, then invokes public NanocodexAgent.preflight() against the same path with inheritEnv: false and an empty environment. Neither probe performs a model turn or needs a provider credential. Scratch state is removed on success or failure. See also: NanocodexAgent reference · NanocodexAgentOptions · smithers-nanocodex v0.0.1 tag (source reference; the release’s prebuilt binary is not qualified by Smithers)