Minimum runnable shared runtime extracted from the Phase 2 contract.
This proof keeps the runtime intentionally small:
- explicit task intake
- deterministic context assembly
- adapter-based execution
- SQLite persistence
- dispatch lock plus retry handling
- CLI operator visibility
Install a local config first:
cp config/runtime.example.json config/runtime.jsonQueue a task:
bun run src/cli.ts intake --json '{
"kind": "github-story",
"source": "github",
"priority": 5,
"payload": {
"repo": "aibtcdev/agent-runtime",
"summary": "Summarize what this PR means for operators"
},
"requested_profile": "lumen"
}'Run one dispatch cycle:
bun run src/cli.ts run-onceInspect runtime status:
bun run src/cli.ts statusRun health checks:
bun run src/cli.ts healthcheckRun tests:
bun testCreate a workflow:
bun run src/cli.ts workflow-create \
--template community-research \
--instance_key lumen-community-wiki \
--context '{"slug":"lumen-community-wiki","topic":"AIBTC community wiki","output_path":"community-wiki/aibtc-basics.md"}'Inspect workflows:
bun run src/cli.ts workflow-list
bun run src/cli.ts workflow-show --instance_key lumen-community-wikiAdvance a workflow explicitly:
bun run src/cli.ts workflow-transition --id 1 --state draft-community-wiki-outlineLumen proving deploy artifacts:
deploy/lumen/runtime.lumen.json
deploy/lumen/DEPLOY.md
deploy/systemd/agent-runtime-run-once@.service
deploy/systemd/agent-runtime-dispatch@.timer
deploy/systemd/agent-runtime-operator@.service
Run the operator dashboard:
bun run src/web.ts --config config/runtime.json --host 127.0.0.1 --port 4314Dashboard surfaces:
/static operator view/api/statusruntime status and last event/api/dashboardcombined operator payload/api/workflows,/api/tasks,/api/events/api/artifacts,/api/artifact/api/snapshots,/api/snapshot,/api/report,/api/report/latest/api/streamlive SSE updates
Queue a Lumen GitHub task through the thin bridge:
bun run src/cli.ts bridge-github --file fixtures/github-pr-merged.jsonQueue a Lumen Discord task through the thin bridge:
bun run src/cli.ts bridge-discord --file fixtures/discord-mention.jsonagent-runtime/
config/
profiles/
src/
state/
The runtime does not include Discord business logic, GitHub polling, Arc identity, Loom publishing, or Forge fleet UI work. Those belong in thin bridges or later migrations.