The schemas and constants a program needs to talk to an atc daemon and read what it writes.
atc hosts coding-agent sessions in a daemon, and this package holds the daemon's side of the
conversation: the oRPC request contract, the event and session record schemas, the hello answer, the
error codes, the session environment names, and the paths of the daemon's sockets and state. The
daemon and every atc client build on the same package, and each atc release publishes it at its own
version. To start, resolve the daemon's socket with resolveAtcPaths, send daemon.hello, and pass
the answer to checkDaemon to learn whether the daemon speaks your version of the contract.
Install
The package ships an ES module with its type declarations, for Node or Bun. It depends on Zod 4 and oRPC's contract library.
bun add @atcx/contract
oRPC's declarations import @opentelemetry/api, which oRPC lists only as an optional peer. A
project that type-checks the declarations of its dependencies, with skipLibCheck off, installs it
beside the package:
bun add -d @opentelemetry/api
Features
- The request contract.
DAEMON_CONTRACT, the oRPC contract of every daemon procedure, with each input and answer schema. - Events and records.
DAEMON_EVENT_SCHEMAfor the event stream, andPUBLISHED_RECORD_SCHEMAfor the session record a session's helpers read. - Checking a daemon.
checkDaemoncompares the major version in the hello answer with the contract's, and lists the features that differ. - The gateway.
GATEWAY_PATHS, the routes atc-gateway serves grouped as browser, machine and probe paths, andGATEWAY_REGISTRY_SCHEMA, the rules of the gateway's registry file. - The light entry.
@atcx/contract/lightholds the session environment names, the state paths and the error codes without the request contract, for a process that starts once per event.
Configuration
CONFIG_FILE_SCHEMA parses the top-level keys of atc's config.json, and the
configuration guide describes each key.
Documentation
The published contract covers what the package holds and how its version moves with atc's.