@henrychien/agent-gateway-tui
v0.1.4
Published
Canonical Node TUI dev client for the `ai-agent-gateway` HTTP/SSE protocol.
Downloads
429
Readme
@henrychien/agent-gateway-tui
Canonical Node TUI dev client for the ai-agent-gateway HTTP/SSE protocol.
Usage
npm install
npm start -- --config-namespace agent-gateway
npm start -- --config-namespace cashnerd --session defaultThe TUI reads the same shared config file as ai-agent-gateway-cli:
~/.cache/<namespace>/cli_config.json~/.cache/<namespace>/sessions/<name>.json
Run the Phase 1 CLI login command once for the namespace, then the CLI and TUI can share credentials and session files.
The @ai-agent-gateway scope is intentional for v0.1; local development works through file: dependencies, and npm publishing is a later release step.
Publishing
@henrychien/agent-timeline is consumed from the published ^0.1.1
package so the TUI can be published without a local workspace dependency.
For the production EC2 gateway, keep a localhost tunnel open and store the loopback URL in the shared config. Run these from the repo root:
./scripts/start-gateway-tunnel.sh
PYTHONPATH=packages/agent-gateway-cli python -m agent_gateway_cli \
--config-namespace excel-addin \
login \
--base-url http://127.0.0.1:18001 \
--api-key "<sk_henry_cli_...>" \
--user-id henry
npm --prefix packages/agent-gateway-tui start -- --config-namespace excel-addinContract
The TUI sends context.channel = "cli" on every chat request. When user_id
is configured, it is sent as a top-level field on both /api/chat/init and
/api/chat. Tool approvals post tool_call_id, nonce, approved, and
allow_tool_type.
The public extension API is TuiExtension in src/extensions.ts. In the v0.x
band, breaking changes are allowed in minor bumps following standard pre-1.0
semver convention. Extension authors should pin to a specific minor version.
ctx.fs.* is intentionally not present in v0.1.
