Repository navigation
@tanstack/ai-harness-cli@0.1.0
·
8 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Minor Changes
-
#1755
39c1c79- Add@tanstack/ai-harness-cli:runCli(harness)runs a harness from the terminal.- Line mode reads one message or
/commandper line, hides a secret answer while the user types, and sends@pathfiles. In a terminal,/canceland a message typed while a turn runs act at once: the message joins the running turn. When a turn waits, each next line answers one wait:yornfor an approval (once,always, orrejectfor an approval ofpermissions()), and an answer read with the schema for a question. Passuito show your own screen on a session view instead. -p "prompt"runs one prompt for scripts and CI, and--output ndjsonprints every AG-UI event.-pexits with code 3 (EXIT.needsAction) at the first wait of the turn: an approval, a question, or a sign-in.--serveserves the session protocol over HTTP behind a bearer token. It signs media URLs with its own key, never with the token:--media-keyorHARNESS_MEDIA_KEY(at least 32 bytes), or a new random key at each start. Without a set key, signed media URLs stop working after a restart. On a host withoutaccess, it also passesopenAccess: theuserofrunCli, ortruewithout one. So each request with the token runs as the user of the CLI.--acpand--mcpload@tanstack/ai-acpand@tanstack/ai-mcponly when you use the flag. A missing package, or one without harness support, fails that flag with a clear message. Any other error while the package loads is reported, not hidden.- In every mode, the first SIGINT or SIGTERM cancels the running turn. A second one, or one while no turn runs, stops the CLI, and
runCliresolves to 130 (SIGINT) or 143 (SIGTERM). The CLI closes a host that it made withrecoverable: true, or releases its session handle on your own host and does not wait for a turn that ignores the cancel. Thesignalsoption takes another signal source, for example anEventEmitterin a test. hostanduseroptions let the CLI use your durable host and run as your user. Every mode opens its sessions as that user. On a host withaccess,--servereads the user of each request withgetUser, and--mcpdoes not start, because stdio has no login.
- Line mode reads one message or
-
#1755
39c1c79-createHarnessHost({ credentials })takes theCredentialStore(from@tanstack/ai/byok) where users' API keys and OAuth sign-ins are saved. Without it, credentials stay in memory until the process stops.runClitakes the samecredentialsoption.
Patch Changes
- Updated dependencies [
fcbd199,39c1c79,e3b2885,39c1c79,d980ce1,52cb02d,a99204a,39c1c79,959f43e,39c1c79,a5c2af3,39c1c79,39c1c79,39c1c79,3e84606,fa2a291,f7e7cce,7a0a48b,468063c,fe83aa0,781a3a8,39abb7e,f1b3f65]:- @tanstack/ai@1.0.0
- @tanstack/ai-harness@0.1.0
- @tanstack/ai-mcp@1.0.0
- @tanstack/ai-acp@1.0.0