@revisium/orchestrator 0.1.0-alpha.9 → 0.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/README.md +210 -146
  2. package/control-plane/bootstrap.config.json +43 -1
  3. package/control-plane/default-playbook/catalog/pipelines.json +1157 -10
  4. package/control-plane/default-playbook/catalog/roles.json +54 -0
  5. package/control-plane/default-playbook/package.json +1 -1
  6. package/control-plane/default-playbook/prompts/developer.md +1 -0
  7. package/control-plane/default-playbook/prompts/triager.md +3 -0
  8. package/dist/api/graphql-api/graphql-ws/pubsub.module.js +0 -1
  9. package/dist/api/graphql-api/graphql-ws/pubsub.module.js.map +1 -1
  10. package/dist/api/graphql-api/graphql-ws/run-progress-subscription-poller.service.js +0 -1
  11. package/dist/api/graphql-api/graphql-ws/run-progress-subscription-poller.service.js.map +1 -1
  12. package/dist/api/graphql-api/graphql-ws/subscription-bridge.service.js +0 -1
  13. package/dist/api/graphql-api/graphql-ws/subscription-bridge.service.js.map +1 -1
  14. package/dist/api/graphql-api/graphql-ws/subscription-mappers.js +3 -0
  15. package/dist/api/graphql-api/graphql-ws/subscription-mappers.js.map +1 -1
  16. package/dist/api/graphql-api/pr/inputs/pr-readiness.input.js +6 -0
  17. package/dist/api/graphql-api/pr/inputs/pr-readiness.input.js.map +1 -1
  18. package/dist/api/graphql-api/pr/model/pr-readiness.model.js +26 -0
  19. package/dist/api/graphql-api/pr/model/pr-readiness.model.js.map +1 -1
  20. package/dist/api/graphql-api/runs/inputs/create-run.input.js +6 -0
  21. package/dist/api/graphql-api/runs/inputs/create-run.input.js.map +1 -1
  22. package/dist/api/graphql-api/runs/model/run.model.js +6 -0
  23. package/dist/api/graphql-api/runs/model/run.model.js.map +1 -1
  24. package/dist/api/graphql-api/share/model/issue-ref.model.js +53 -0
  25. package/dist/api/graphql-api/share/model/issue-ref.model.js.map +1 -0
  26. package/dist/cli/commands/doctor-report.js +0 -18
  27. package/dist/cli/commands/doctor-report.js.map +1 -1
  28. package/dist/cli/commands/lifecycle.js +3 -71
  29. package/dist/cli/commands/lifecycle.js.map +1 -1
  30. package/dist/cli/commands/mcp.js +0 -14
  31. package/dist/cli/commands/mcp.js.map +1 -1
  32. package/dist/cli/commands/process-tree.js +4 -26
  33. package/dist/cli/commands/process-tree.js.map +1 -1
  34. package/dist/cli/commands/revisium-helpers.js +0 -6
  35. package/dist/cli/commands/revisium-helpers.js.map +1 -1
  36. package/dist/cli/commands/rogue-reaper.js +0 -34
  37. package/dist/cli/commands/rogue-reaper.js.map +1 -1
  38. package/dist/cli/index.js +0 -4
  39. package/dist/cli/index.js.map +1 -1
  40. package/dist/cli/program.js +0 -5
  41. package/dist/cli/program.js.map +1 -1
  42. package/dist/config.js +0 -25
  43. package/dist/config.js.map +1 -1
  44. package/dist/control-plane/bootstrap.js +12 -27
  45. package/dist/control-plane/bootstrap.js.map +1 -1
  46. package/dist/control-plane/change-notifications.js +0 -1
  47. package/dist/control-plane/change-notifications.js.map +1 -1
  48. package/dist/control-plane/client-transport.js +1 -12
  49. package/dist/control-plane/client-transport.js.map +1 -1
  50. package/dist/control-plane/default-playbook-policy.js +593 -0
  51. package/dist/control-plane/default-playbook-policy.js.map +1 -0
  52. package/dist/control-plane/definitions.js +8 -17
  53. package/dist/control-plane/definitions.js.map +1 -1
  54. package/dist/control-plane/inbox.js +2 -120
  55. package/dist/control-plane/inbox.js.map +1 -1
  56. package/dist/control-plane/resolve-cwd.js +0 -61
  57. package/dist/control-plane/resolve-cwd.js.map +1 -1
  58. package/dist/control-plane/schema-migration.js +0 -9
  59. package/dist/control-plane/schema-migration.js.map +1 -1
  60. package/dist/control-plane/seed-default-playbook.js +50 -46
  61. package/dist/control-plane/seed-default-playbook.js.map +1 -1
  62. package/dist/control-plane/steps.js +0 -15
  63. package/dist/control-plane/steps.js.map +1 -1
  64. package/dist/e2e/kit/agents.js +15 -21
  65. package/dist/e2e/kit/agents.js.map +1 -1
  66. package/dist/e2e/kit/assertions.js +12 -8
  67. package/dist/e2e/kit/assertions.js.map +1 -1
  68. package/dist/e2e/kit/fake-integrator.js +11 -2
  69. package/dist/e2e/kit/fake-integrator.js.map +1 -1
  70. package/dist/e2e/kit/git-target-repo.js +1 -1
  71. package/dist/engine/dbos.service.js +12 -179
  72. package/dist/engine/dbos.service.js.map +1 -1
  73. package/dist/engine/ensure-postgres.js +0 -48
  74. package/dist/engine/ensure-postgres.js.map +1 -1
  75. package/dist/features/pr/queries/impl/get-pr-readiness.query.js.map +1 -1
  76. package/dist/features/runs/commands/impl/create-run.command.js.map +1 -1
  77. package/dist/features/runs/queries/handlers/runs-query.handlers.js +1 -0
  78. package/dist/features/runs/queries/handlers/runs-query.handlers.js.map +1 -1
  79. package/dist/host/daemon.js +2 -21
  80. package/dist/host/daemon.js.map +1 -1
  81. package/dist/host/dbos-identity.js +0 -31
  82. package/dist/host/dbos-identity.js.map +1 -1
  83. package/dist/host/ensure-host.js +1 -37
  84. package/dist/host/ensure-host.js.map +1 -1
  85. package/dist/host/ensure-revisium.js +1 -135
  86. package/dist/host/ensure-revisium.js.map +1 -1
  87. package/dist/host/host-runtime.js +0 -28
  88. package/dist/host/host-runtime.js.map +1 -1
  89. package/dist/host/host.lifecycle.js +0 -27
  90. package/dist/host/host.lifecycle.js.map +1 -1
  91. package/dist/host/queue-ownership.js +0 -42
  92. package/dist/host/queue-ownership.js.map +1 -1
  93. package/dist/host/queue-poller-census.js +1 -28
  94. package/dist/host/queue-poller-census.js.map +1 -1
  95. package/dist/http/graphql-host.module.js +0 -3
  96. package/dist/http/graphql-host.module.js.map +1 -1
  97. package/dist/mcp/mcp-capabilities.js +23 -5
  98. package/dist/mcp/mcp-capabilities.js.map +1 -1
  99. package/dist/mcp/mcp-facade.service.js +335 -22
  100. package/dist/mcp/mcp-facade.service.js.map +1 -1
  101. package/dist/mcp/mcp-http.service.js +0 -18
  102. package/dist/mcp/mcp-http.service.js.map +1 -1
  103. package/dist/mcp/mcp-tools.js +41 -36
  104. package/dist/mcp/mcp-tools.js.map +1 -1
  105. package/dist/observability/activity-signal.js +103 -0
  106. package/dist/observability/activity-signal.js.map +1 -0
  107. package/dist/observability/agent-activity-reporter.js +0 -4
  108. package/dist/observability/agent-activity-reporter.js.map +1 -1
  109. package/dist/observability/index.js +1 -0
  110. package/dist/observability/index.js.map +1 -1
  111. package/dist/pipeline/await-human.js +0 -40
  112. package/dist/pipeline/await-human.js.map +1 -1
  113. package/dist/pipeline/data-driven-task.workflow.js +563 -251
  114. package/dist/pipeline/data-driven-task.workflow.js.map +1 -1
  115. package/dist/pipeline/data-driven-template.js +0 -25
  116. package/dist/pipeline/data-driven-template.js.map +1 -1
  117. package/dist/pipeline/pipeline.module.js +0 -12
  118. package/dist/pipeline/pipeline.module.js.map +1 -1
  119. package/dist/pipeline/pipeline.service.js +194 -189
  120. package/dist/pipeline/pipeline.service.js.map +1 -1
  121. package/dist/pipeline/route-contract.js +4 -3
  122. package/dist/pipeline/route-contract.js.map +1 -1
  123. package/dist/pipeline-core/index.js +1 -13
  124. package/dist/pipeline-core/index.js.map +1 -1
  125. package/dist/pipeline-core/interpret.js +21 -94
  126. package/dist/pipeline-core/interpret.js.map +1 -1
  127. package/dist/pipeline-core/kit/assertions.js +0 -19
  128. package/dist/pipeline-core/kit/assertions.js.map +1 -1
  129. package/dist/pipeline-core/kit/builders.js +1 -21
  130. package/dist/pipeline-core/kit/builders.js.map +1 -1
  131. package/dist/pipeline-core/kit/drive.js +1 -31
  132. package/dist/pipeline-core/kit/drive.js.map +1 -1
  133. package/dist/pipeline-core/kit/fixtures.js +78 -101
  134. package/dist/pipeline-core/kit/fixtures.js.map +1 -1
  135. package/dist/pipeline-core/kit/index.js +0 -8
  136. package/dist/pipeline-core/kit/index.js.map +1 -1
  137. package/dist/pipeline-core/types.js +13 -52
  138. package/dist/pipeline-core/types.js.map +1 -1
  139. package/dist/pipeline-core/validate-capability.js +0 -3
  140. package/dist/pipeline-core/validate-capability.js.map +1 -1
  141. package/dist/pipeline-core/validate-conflicts.js +0 -9
  142. package/dist/pipeline-core/validate-conflicts.js.map +1 -1
  143. package/dist/pipeline-core/validate-dataflow.js +0 -17
  144. package/dist/pipeline-core/validate-dataflow.js.map +1 -1
  145. package/dist/pipeline-core/validate-diff.js +3 -36
  146. package/dist/pipeline-core/validate-diff.js.map +1 -1
  147. package/dist/pipeline-core/validate-edges.js +0 -6
  148. package/dist/pipeline-core/validate-edges.js.map +1 -1
  149. package/dist/pipeline-core/validate-graph.js +0 -11
  150. package/dist/pipeline-core/validate-graph.js.map +1 -1
  151. package/dist/pipeline-core/validate-loops.js +37 -44
  152. package/dist/pipeline-core/validate-loops.js.map +1 -1
  153. package/dist/pipeline-core/validate-parallel.js +9 -15
  154. package/dist/pipeline-core/validate-parallel.js.map +1 -1
  155. package/dist/pipeline-core/validate-sink.js +0 -7
  156. package/dist/pipeline-core/validate-sink.js.map +1 -1
  157. package/dist/pipeline-core/validate-topology.js +1 -20
  158. package/dist/pipeline-core/validate-topology.js.map +1 -1
  159. package/dist/pipeline-core/validate-verdict.js +52 -7
  160. package/dist/pipeline-core/validate-verdict.js.map +1 -1
  161. package/dist/pipeline-core/validate.js +5 -29
  162. package/dist/pipeline-core/validate.js.map +1 -1
  163. package/dist/playbook/catalog-loader.js +8 -3
  164. package/dist/playbook/catalog-loader.js.map +1 -1
  165. package/dist/playbook/import-mapper.js +4 -5
  166. package/dist/playbook/import-mapper.js.map +1 -1
  167. package/dist/poller/pr-readiness-core.js +226 -29
  168. package/dist/poller/pr-readiness-core.js.map +1 -1
  169. package/dist/revisium/inbox.service.js +0 -24
  170. package/dist/revisium/inbox.service.js.map +1 -1
  171. package/dist/revisium/playbooks.service.js +15 -2
  172. package/dist/revisium/playbooks.service.js.map +1 -1
  173. package/dist/revisium/revisium.module.js +0 -12
  174. package/dist/revisium/revisium.module.js.map +1 -1
  175. package/dist/revisium/roles.service.js +0 -6
  176. package/dist/revisium/roles.service.js.map +1 -1
  177. package/dist/revisium/run.service.js +2 -75
  178. package/dist/revisium/run.service.js.map +1 -1
  179. package/dist/revisium/tokens.js +0 -4
  180. package/dist/revisium/tokens.js.map +1 -1
  181. package/dist/run/append-event.js +6 -37
  182. package/dist/run/append-event.js.map +1 -1
  183. package/dist/run/block-run.js.map +1 -1
  184. package/dist/run/cancel-run.js +0 -33
  185. package/dist/run/cancel-run.js.map +1 -1
  186. package/dist/run/complete-run.js.map +1 -1
  187. package/dist/run/create-run.js +5 -8
  188. package/dist/run/create-run.js.map +1 -1
  189. package/dist/run/fail-run.js +0 -3
  190. package/dist/run/fail-run.js.map +1 -1
  191. package/dist/run/inspect-run.js +10 -29
  192. package/dist/run/inspect-run.js.map +1 -1
  193. package/dist/run/issue-ref.js +88 -0
  194. package/dist/run/issue-ref.js.map +1 -0
  195. package/dist/run/run-outputs.js +0 -19
  196. package/dist/run/run-outputs.js.map +1 -1
  197. package/dist/run/terminal-run-status.js +0 -12
  198. package/dist/run/terminal-run-status.js.map +1 -1
  199. package/dist/runners/claude-code.service.js +2 -13
  200. package/dist/runners/claude-code.service.js.map +1 -1
  201. package/dist/runners/codex.service.js +2 -11
  202. package/dist/runners/codex.service.js.map +1 -1
  203. package/dist/runners/gh-identity.js +0 -52
  204. package/dist/runners/gh-identity.js.map +1 -1
  205. package/dist/runners/integrator-branch-naming.js +16 -19
  206. package/dist/runners/integrator-branch-naming.js.map +1 -1
  207. package/dist/runners/integrator-git.js +0 -25
  208. package/dist/runners/integrator-git.js.map +1 -1
  209. package/dist/runners/integrator-remote.js +0 -2
  210. package/dist/runners/integrator-remote.js.map +1 -1
  211. package/dist/runners/integrator-types.js +0 -7
  212. package/dist/runners/integrator-types.js.map +1 -1
  213. package/dist/runners/integrator.js +231 -230
  214. package/dist/runners/integrator.js.map +1 -1
  215. package/dist/runners/runner.module.js +0 -6
  216. package/dist/runners/runner.module.js.map +1 -1
  217. package/dist/runners/tokens.js +0 -4
  218. package/dist/runners/tokens.js.map +1 -1
  219. package/dist/runners/worktree.service.js +3 -19
  220. package/dist/runners/worktree.service.js.map +1 -1
  221. package/dist/task-control-plane/pr-readiness.service.js +15 -13
  222. package/dist/task-control-plane/pr-readiness.service.js.map +1 -1
  223. package/dist/task-control-plane/run-watch.service.js +170 -63
  224. package/dist/task-control-plane/run-watch.service.js.map +1 -1
  225. package/dist/task-control-plane/task-control-plane-api.service.js +285 -40
  226. package/dist/task-control-plane/task-control-plane-api.service.js.map +1 -1
  227. package/dist/worker/artifact-store.js +21 -3
  228. package/dist/worker/artifact-store.js.map +1 -1
  229. package/dist/worker/build-context.js +10 -10
  230. package/dist/worker/build-context.js.map +1 -1
  231. package/dist/worker/claude-code-runner.js +76 -48
  232. package/dist/worker/claude-code-runner.js.map +1 -1
  233. package/dist/worker/codex-runner.js +128 -35
  234. package/dist/worker/codex-runner.js.map +1 -1
  235. package/dist/worker/git-worktree-manager.js +20 -67
  236. package/dist/worker/git-worktree-manager.js.map +1 -1
  237. package/dist/worker/process-executor.js +144 -27
  238. package/dist/worker/process-executor.js.map +1 -1
  239. package/dist/worker/result-envelope.js +33 -49
  240. package/dist/worker/result-envelope.js.map +1 -1
  241. package/dist/worker/runner-common.js +29 -0
  242. package/dist/worker/runner-common.js.map +1 -1
  243. package/dist/worker/runner-dispatch.js +0 -3
  244. package/dist/worker/runner-dispatch.js.map +1 -1
  245. package/dist/worker/runner.js +16 -1
  246. package/dist/worker/runner.js.map +1 -1
  247. package/dist/worker/stub-runner.js +0 -7
  248. package/dist/worker/stub-runner.js.map +1 -1
  249. package/package.json +2 -2
package/README.md CHANGED
@@ -1,202 +1,266 @@
1
- # agent-orchestrator
1
+ <div align="center">
2
2
 
3
- Local orchestrator for software-development tasks driven by short-lived AI agents (architect → developer →
4
- reviewer → integrator), hosted in **NestJS**. **DBOS** owns durable progress — execution is crash-safe and resumes
5
- from the first unfinished step — while **Revisium** owns meaning: roles, policy, inbox, events. Workflow-as-data is
6
- a post-MVP goal; see [`docs/architecture-overview.md`](./docs/architecture-overview.md).
3
+ # @revisium/orchestrator
7
4
 
8
- > 🚧 **Early alpha.** The end-to-end MVP works create a run → plan gate → implement → review → PR → merge
9
- > gate — see [`docs/roadmap.md`](./docs/roadmap.md).
5
+ Local-first orchestration for software-development work driven by short-lived agents.
10
6
 
11
- ## Start here
7
+ **Turn a task into a playbook-driven state machine.**
12
8
 
13
- - Repo context for agents: [`AGENTS.md`](./AGENTS.md)
14
- - Vision: [`docs/vision.md`](./docs/vision.md)
15
- - Architecture & invariants: [`docs/architecture-overview.md`](./docs/architecture-overview.md)
16
- - Docs index & roadmap: [`docs/README.md`](./docs/README.md) · [`docs/roadmap.md`](./docs/roadmap.md)
9
+ [![License](https://img.shields.io/github/license/revisium/orchestrator?color=blue)](LICENSE)
10
+ [![CI](https://github.com/revisium/orchestrator/actions/workflows/ci.yml/badge.svg)](https://github.com/revisium/orchestrator/actions/workflows/ci.yml)
11
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=revisium_agent-orchestrator&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=revisium_agent-orchestrator)
12
+ [![npm](https://img.shields.io/npm/v/@revisium/orchestrator?color=red)](https://www.npmjs.com/package/@revisium/orchestrator)
17
13
 
18
- ## Local Development
14
+ Part of the [Revisium](https://github.com/revisium/revisium) ecosystem.
15
+
16
+ </div>
17
+
18
+ ```mermaid
19
+ flowchart LR
20
+ task[Task]
21
+ playbook[Playbook]
22
+ machine[State machine]
23
+ outcome[Outcome]
24
+
25
+ task --> playbook --> machine --> outcome
26
+
27
+ subgraph nodes[State machine nodes]
28
+ agent[Agent step] --> script[Script step] --> gate[Human gate] --> branch{Branch}
29
+ branch --> loop((Loop))
30
+ loop -. retry .-> agent
31
+ loop -. reroute .-> script
32
+ end
33
+
34
+ machine -. expands into .-> nodes
35
+ outcome --> pr[Pull request]
36
+ outcome --> evidence[Evidence]
37
+ outcome --> decisions[Decisions]
38
+ outcome --> history[Run history]
39
+ ```
40
+
41
+ > Revo is in active development. The package is suitable for evaluation and local experimentation; do not treat
42
+ > the public contract as stable yet.
19
43
 
20
- `revo` is one daemonized product. **`revo start`** brings up the whole stack — the standalone
21
- Revisium daemon plus the Revo host daemon that owns DBOS and serves the GraphQL + MCP front doors —
22
- and bootstraps the control-plane so it is ready to use. The CLI is lifecycle-only
23
- (`start` / `stop` / `status` / `restart` / `doctor` / `logs`); orchestration (runs, inbox, …) is
24
- reached over **MCP** (agents) or **GraphQL** (UI/scripts), both served by the daemon.
44
+ ## Overview
25
45
 
26
- Run a source checkout alongside an installed package without collisions via a named **profile**
27
- (`--profile dev`, or `REVO_PROFILE=dev`): the `dev` profile shifts the whole port band off the
28
- `default` profile, so the two never share a port, data dir, or `dbos` database.
46
+ Revo is a local control plane for agentic work. A caller creates a run, Revo selects a playbook, and the playbook
47
+ executes as a state machine made of agent steps, script steps, human gates, branches, and loops.
48
+
49
+ The goal is not to replace coding agents. Revo coordinates them: it keeps state, records evidence, enforces gates,
50
+ and gives humans a stable place to approve plans, resolve questions, inspect feedback, and decide when work is ready
51
+ to ship.
52
+
53
+ ## How It Works
54
+
55
+ - **Playbooks define flow.** Roles, scripts, gates, verdicts, branches, and loop limits are data, not hidden prompt
56
+ convention.
57
+ - **Agent steps are short-lived.** Each agent process receives current state and exits after one step.
58
+ - **Script steps do deterministic work.** Automation such as integration, polling, and response actions stays outside
59
+ agent prompts.
60
+ - **Human gates are state changes.** A plan approval, question answer, or merge approval resolves an inbox item and
61
+ resumes the run.
62
+ - **Outputs are traceable.** Artifacts, evidence, decisions, attempts, cost, and run history are recorded for later
63
+ inspection.
64
+
65
+ ## Concepts
66
+
67
+ | Term | Meaning |
68
+ | --- | --- |
69
+ | **Revo** | The local orchestrator and control plane for software-development runs. |
70
+ | **Playbook** | A versioned bundle of roles, pipelines, policies, and routing rules. |
71
+ | **Pipeline** | A state-machine template that defines the steps, gates, branches, loops, and terminal outcomes. |
72
+ | **Role** | A named agent definition: prompt, model level, scope, runner, and allowed behavior. |
73
+ | **Agent step** | A pipeline node that starts a short-lived coding agent through a role. |
74
+ | **Script step** | A deterministic automation node used for integration, polling, readiness, or response actions. |
75
+ | **Human gate** | A required decision or answer; the run parks until an inbox item is resolved. |
76
+ | **Run** | One task moving through a selected playbook and pipeline. |
77
+ | **Attempt** | One execution of one step; the unit for logs, verdicts, tokens, and cost. |
78
+ | **MCP** | The local agent-facing tool bridge exposed by `revo mcp`. |
79
+ | **GraphQL API** | The local API surface for UI and script integrations. |
80
+
81
+ ## Alpha Install
82
+
83
+ The `@alpha` package is a prerelease for evaluating Revo locally. It uses the `default` profile:
84
+
85
+ ```sh
86
+ npm install -g @revisium/orchestrator@alpha
87
+ revo start
88
+ revo status
89
+ revo doctor
90
+ revo logs
91
+ revo stop
92
+ ```
93
+
94
+ Connect an MCP-capable agent to the installed binary:
95
+
96
+ ```sh
97
+ codex mcp add revo -- revo mcp
98
+ claude mcp add revo -- revo mcp
99
+ ```
100
+
101
+ Default local ports:
102
+
103
+ | Service | Port |
104
+ | --- | --- |
105
+ | Revisium standalone HTTP | `19222` |
106
+ | embedded Postgres | `15440` |
107
+ | Revo GraphQL | `19223` |
108
+
109
+ GraphQL is available at `http://127.0.0.1:19223/graphql` in the default profile. The target contract is documented in
110
+ [docs/specs/graphql-admin-api-v1.spec.md](./docs/specs/graphql-admin-api-v1.spec.md), and the committed SDL is
111
+ [src/api/graphql-api/schema.graphql](./src/api/graphql-api/schema.graphql).
112
+
113
+ ## Roadmap
114
+
115
+ Revo is in active development. The public roadmap lives in GitHub Milestones and umbrella issues; this README only points to the current tracks.
116
+
117
+ | Track | Start here |
118
+ | --- | --- |
119
+ | Default playbook stabilization | [Milestone #1](https://github.com/revisium/orchestrator/milestone/1), [umbrella #146](https://github.com/revisium/orchestrator/issues/146) |
120
+ | GraphQL admin API v1 migration | [Milestone #4](https://github.com/revisium/orchestrator/milestone/4), [umbrella #167](https://github.com/revisium/orchestrator/issues/167) |
121
+ | Execution profiles and runner/model binding | [Milestone #5](https://github.com/revisium/orchestrator/milestone/5), [umbrella #168](https://github.com/revisium/orchestrator/issues/168) |
122
+ | Loop engineering layer | [Milestone #2](https://github.com/revisium/orchestrator/milestone/2), [umbrella #148](https://github.com/revisium/orchestrator/issues/148) |
123
+ | Role and pipeline authoring | [Milestone #3](https://github.com/revisium/orchestrator/milestone/3), [umbrella #157](https://github.com/revisium/orchestrator/issues/157) |
124
+
125
+ Use umbrella issues for initiative context and child issues for reviewable delivery slices. Work orders do not live in docs.
126
+
127
+ ## Local Development
128
+
129
+ Use the `dev` profile when running a source checkout next to an installed package. The profile has isolated ports,
130
+ data directory, and DBOS database.
29
131
 
30
132
  ```sh
31
133
  pnpm install
32
- pnpm run revo -- start --profile dev # standalone + host daemon, bootstrapped & ready
33
- pnpm run revo -- status --profile dev # stack health summary
34
- pnpm run revo -- doctor --profile dev # diagnose process / port / profile issues
35
- pnpm run revo -- logs --profile dev # tail host + standalone logs; add -f to follow
36
- pnpm run revo -- restart --profile dev # stop, then start
134
+ pnpm run build
135
+ pnpm run revo -- start --profile dev
136
+ pnpm run revo -- status --profile dev
137
+ pnpm run revo -- doctor --profile dev
138
+ pnpm run revo -- logs --profile dev
37
139
  pnpm run revo -- stop --profile dev
38
140
  ```
39
141
 
40
- | Knob | `default` (installed package) | `dev` (source checkout) |
142
+ | Knob | `default` | `dev` |
41
143
  | --- | --- | --- |
42
144
  | data dir | `~/.revisium-orchestrator` | `~/.revisium-orchestrator-dev` |
43
145
  | standalone HTTP / Postgres | `19222` / `15440` | `19622` / `15840` |
44
146
  | Revo GraphQL | `19223` | `19623` |
45
147
  | DBOS database | `dbos` | `dbos_dev` |
46
148
 
47
- Any single knob can be overridden explicitly — `REVO_DATA_DIR` / `REVO_PORT` / `REVO_PG_PORT` /
48
- `REVO_GRAPHQL_PORT` / `REVO_DBOS_DB` — and an explicit env var always wins over the profile band.
149
+ Explicit environment variables override the profile: `REVO_DATA_DIR`, `REVO_PORT`, `REVO_PG_PORT`,
150
+ `REVO_GRAPHQL_PORT`, and `REVO_DBOS_DB`.
49
151
 
50
- Connect an agent over MCP (`revo mcp` is a thin stdio bridge — it does not launch its own DBOS;
51
- if the daemon isn't already running, the bridge auto-starts it on first use; the profile comes
52
- from the process environment, not per-call args):
152
+ ### Build and globally install a local Revo
53
153
 
54
- **Claude Code**
154
+ This workflow is for local development/testing of the CLI and MCP server, **not** for publishing a release.
55
155
 
56
- ```sh
57
- # global install
58
- claude mcp add revo -- revo mcp
156
+ **Build from the orchestrator checkout:**
59
157
 
60
- # dev checkout
61
- claude mcp add revo -- pnpm --dir "$PWD" run revo -- mcp
158
+ ```sh
159
+ pnpm install --frozen-lockfile
160
+ pnpm run build
62
161
  ```
63
162
 
64
- **Codex CLI** (`codex mcp add` or edit `~/.codex/config.toml` directly)
163
+ **Pack a tarball** (preferred over a directory-symlink install):
65
164
 
66
165
  ```sh
67
- # global install
68
- codex mcp add revo -- revo mcp
69
-
70
- # dev checkout (use an absolute path — $PWD does not expand in TOML args)
71
- codex mcp add revo-dev -- pnpm --dir /abs/path/to/agent-orchestrator run revo -- mcp
166
+ npm pack --pack-destination /private/tmp
72
167
  ```
73
168
 
74
- To use a non-`default` profile with Codex, append `--env REVO_PROFILE=dev` (and the other
75
- dev-band vars; see the JSON block under **Live Run Observability Smoke**) to `codex mcp add`,
76
- or export the vars in the shell before launching Codex — stdio servers inherit the parent
77
- environment. Equivalent TOML for the global install form:
169
+ This emits `/private/tmp/revisium-orchestrator-0.0.0.tgz` (filename tracks `package.json` `version`).
78
170
 
79
- ```toml
80
- # ~/.codex/config.toml
81
- [mcp_servers.revo]
82
- command = "revo" # or the absolute path from `which revo` if revo is not on Codex's PATH
83
- args = ["mcp"]
171
+ **Identify the active Node prefix that owns the `revo` binary:**
172
+
173
+ ```sh
174
+ which revo
84
175
  ```
85
176
 
86
- **Verify the connection** run `claude mcp list` or `codex mcp list` to confirm the server
87
- appears, then have the agent call `get_status` for a healthy JSON status reply. `list_pipelines`
88
- is a good read-only alternative.
177
+ Resolve the symlink and pick the prefix that contains both `bin/revo` and
178
+ `lib/node_modules/@revisium/orchestrator`. `npm prefix -g` may point to a *different* prefix than the active
179
+ `revo` binary (common under nvm), so derive the prefix from `which revo`, not from `npm prefix -g`.
89
180
 
90
- Run the local verification gates:
181
+ **Install the tarball globally into that prefix:**
91
182
 
92
183
  ```sh
93
- pnpm run typecheck
94
- pnpm run lint:ci
95
- pnpm run test:cov
96
- pnpm run verify
184
+ npm install -g --prefix <active-node-prefix> /private/tmp/revisium-orchestrator-0.0.0.tgz
97
185
  ```
98
186
 
99
- The smoke scripts are guarded: they require a non-default `REVO_DATA_DIR`,
100
- `REVO_PORT`, `REVO_PG_PORT`, and `REVO_DBOS_DB`; GraphQL smoke paths also require
101
- `REVO_GRAPHQL_PORT`.
187
+ For nvm installs, the active prefix is usually the parent directory that contains both `bin/revo` and
188
+ `lib/node_modules/@revisium/orchestrator`. Use that prefix consistently for both `npm` and `revo`.
189
+
190
+ > **Warning:** do not use `npm install -g <local-dir>` from a temporary worktree. npm may install a symlink to
191
+ > that directory; if the worktree is later removed, the global `revo` binary breaks. The tarball install copies
192
+ > files and avoids this.
193
+
194
+ **Restart and verify health:**
102
195
 
103
196
  ```sh
104
- pnpm run smoke:control-plane
105
- pnpm run smoke:create-run
106
- pnpm run smoke:inspect-run
197
+ revo restart
198
+ revo status
199
+ revo doctor
107
200
  ```
108
201
 
109
- ### Live Run Observability Smoke
202
+ **Verify the MCP tool surface after a global tool/schema change:**
203
+
204
+ Restart the Codex session so MCP tool schemas are reloaded. `get_capabilities` should list:
205
+ `get_run_attention`, `get_run_status`, `get_run_digest`, `get_run_events`, `get_agent_activity`,
206
+ `get_agent_log`, `watch_run_changes`. Legacy observation tools are absent from the current contract.
207
+
208
+ If Codex cannot expose `mcp__revo` tools after restart, check `~/.codex/config.toml`: use an absolute path to
209
+ the active `revo` binary, for example `command = "<active-node-prefix>/bin/revo"`, rather than
210
+ `command = "revo"` — the Codex process PATH may not include nvm.
211
+
212
+ ## Front Doors
110
213
 
111
- This smoke runs a real agent. It can call provider CLIs and incur cost. Use it
112
- only when that is intentional.
214
+ `revo mcp` is the agent front door. It is a local stdio bridge to the daemon and exposes product-level tools for
215
+ runs, gates, repository diagnostics, method discovery, and PR readiness.
216
+
217
+ For source-iteration MCP testing, point the MCP client at the `pnpm run revo` script:
113
218
 
114
219
  ```sh
115
- export REVO_SMOKE_REPO=/path/to/local/sandbox-repo
116
- pnpm run revo -- start --profile dev # standalone + host daemon (serves GraphQL + MCP), ready
220
+ codex mcp add --env REVO_PROFILE=dev revo-dev -- pnpm --dir /abs/path/to/orchestrator run revo -- mcp
221
+ claude mcp add -e REVO_PROFILE=dev revo-dev -- pnpm --dir /abs/path/to/orchestrator run revo -- mcp
117
222
  ```
118
223
 
119
- Drive and observe a run through the daemon's front doors there are no `run`/`serve` CLI commands.
120
- From an agent, use the MCP tools (`create_run`, `start_run`, then `get_agent_activity` /
121
- `get_agent_log`). From a UI or script, use the GraphQL front door the daemon already serves at
122
- `http://127.0.0.1:$REVO_GRAPHQL_PORT/graphql` — create a run:
123
-
124
- ```graphql
125
- mutation Create($data: CreateRunInput!) {
126
- createRun(data: $data) {
127
- runId
128
- }
129
- }
130
- ```
224
+ For testing the same built entrypoint that the package uses, point the MCP client at `bin/revo.js`:
131
225
 
132
- Then observe it over the same endpoint:
133
-
134
- ```graphql
135
- query Activity($runId: ID!) {
136
- runAgentActivity(runId: $runId) {
137
- runId
138
- aggregateStatus
139
- latestOutputAt
140
- attempts {
141
- attemptId
142
- runner
143
- status
144
- stdoutBytes
145
- stderrBytes
146
- artifactRef
147
- }
148
- }
149
- }
150
-
151
- query Log($data: GetAgentLogInput!) {
152
- runAgentLog(data: $data) {
153
- runId
154
- attemptId
155
- stream
156
- offsetBytes
157
- nextOffsetBytes
158
- totalBytes
159
- truncated
160
- content
161
- }
162
- }
226
+ ```sh
227
+ pnpm run build
228
+ REVO_PROFILE=dev ./bin/revo.js restart --profile dev
229
+ REVO_PROFILE=dev ./bin/revo.js doctor --profile dev
230
+ codex mcp add --env REVO_PROFILE=dev revo-dev -- /abs/path/to/orchestrator/bin/revo.js mcp
231
+ claude mcp add -e REVO_PROFILE=dev revo-dev -- /abs/path/to/orchestrator/bin/revo.js mcp
163
232
  ```
164
233
 
165
- For MCP, configure the MCP client to launch this checkout's local binary with the
166
- same environment. The MCP tools do not accept per-call profile arguments; the
167
- profile comes from the process environment.
168
-
169
- ```json
170
- {
171
- "mcpServers": {
172
- "revo-dev": {
173
- "command": "/path/to/agent-orchestrator/bin/revo.js",
174
- "args": ["mcp"],
175
- "env": {
176
- "REVO_DATA_DIR": "/path/to/.revisium-orchestrator-dev",
177
- "REVO_PORT": "19622",
178
- "REVO_PG_PORT": "15840",
179
- "REVO_GRAPHQL_PORT": "19623",
180
- "REVO_DBOS_DB": "dbos_dev"
181
- }
182
- }
183
- }
184
- }
234
+ `bin/revo.js` imports `dist/cli/index.js`, so it does not see source edits until `pnpm run build` runs. After
235
+ changing MCP tools or capabilities, rebuild, restart the `dev` stack, and reconnect or restart the MCP client session
236
+ so the client refreshes its tool list. A built MCP smoke should confirm `get_capabilities.tools` contains
237
+ `get_run_attention`, `get_run_status`, and `watch_run_changes`, with no legacy observation tools.
238
+
239
+ For the `dev` profile, GraphQL is available at `http://127.0.0.1:19623/graphql`.
240
+
241
+ ## Verification
242
+
243
+ ```sh
244
+ pnpm run typecheck
245
+ pnpm run lint:ci
246
+ pnpm run test:cov
247
+ pnpm run verify
185
248
  ```
186
249
 
187
- Useful MCP observability tools for the same run:
250
+ Smoke and e2e scripts that start local daemons may need an unsandboxed terminal and isolated non-default ports.
188
251
 
189
- - `get_agent_activity`
190
- - `get_agent_attempts`
191
- - `get_agent_log`
192
- - `read_agent_output_events`
193
- - `tail_agent_log`
252
+ ## Documentation
194
253
 
195
- If running from a sandboxed automation environment, local server checks may fail
196
- with `listen EPERM` or a misleading `No free port found from <port>`. Re-run the
197
- daemon, GraphQL, and MCP smoke commands from a normal terminal or an approved
198
- unsandboxed execution context.
254
+ | Start here | Purpose |
255
+ | --- | --- |
256
+ | [docs/README.md](./docs/README.md) | Documentation map and ownership rules |
257
+ | [docs/vision.md](./docs/vision.md) | Product direction, glossary, and capability map |
258
+ | [docs/architecture-overview.md](./docs/architecture-overview.md) | Runtime layers, invariants, and lifecycle |
259
+ | [docs/developer-guide.md](./docs/developer-guide.md) | Source map and contributor onboarding |
260
+ | [docs/specs/](./docs/specs/) | Exact product contracts |
261
+ | [docs/adr/](./docs/adr/) | Durable architecture decisions |
262
+ | [AGENTS.md](./AGENTS.md) | Repo-local instructions for coding agents |
199
263
 
200
264
  ## License
201
265
 
202
- See [LICENSE](./LICENSE).
266
+ MIT - see [LICENSE](./LICENSE).
@@ -703,7 +703,7 @@
703
703
  "level": {
704
704
  "type": "string",
705
705
  "default": "",
706
- "description": "cheap|standard|deep"
706
+ "description": "cheap|standard|deep|codex-cheap|codex-standard|codex-deep"
707
707
  },
708
708
  "provider": {
709
709
  "type": "string",
@@ -1017,6 +1017,48 @@
1017
1017
  "updated_at": "2026-06-03T00:00:00.000Z"
1018
1018
  }
1019
1019
  },
1020
+ {
1021
+ "tableId": "model_profiles",
1022
+ "rowId": "codex-standard",
1023
+ "data": {
1024
+ "id": "codex-standard",
1025
+ "level": "codex-standard",
1026
+ "provider": "openai",
1027
+ "model_id": "gpt-5.5",
1028
+ "params": "{}",
1029
+ "cost_per_input": 2.0,
1030
+ "cost_per_output": 8.0,
1031
+ "updated_at": "2026-06-03T00:00:00.000Z"
1032
+ }
1033
+ },
1034
+ {
1035
+ "tableId": "model_profiles",
1036
+ "rowId": "codex-cheap",
1037
+ "data": {
1038
+ "id": "codex-cheap",
1039
+ "level": "codex-cheap",
1040
+ "provider": "openai",
1041
+ "model_id": "gpt-5.5",
1042
+ "params": "{}",
1043
+ "cost_per_input": 2.0,
1044
+ "cost_per_output": 8.0,
1045
+ "updated_at": "2026-06-03T00:00:00.000Z"
1046
+ }
1047
+ },
1048
+ {
1049
+ "tableId": "model_profiles",
1050
+ "rowId": "codex-deep",
1051
+ "data": {
1052
+ "id": "codex-deep",
1053
+ "level": "codex-deep",
1054
+ "provider": "openai",
1055
+ "model_id": "gpt-5.5",
1056
+ "params": "{}",
1057
+ "cost_per_input": 2.0,
1058
+ "cost_per_output": 8.0,
1059
+ "updated_at": "2026-06-03T00:00:00.000Z"
1060
+ }
1061
+ },
1020
1062
  {
1021
1063
  "tableId": "routing_policy",
1022
1064
  "rowId": "pipeline",