@jterrats/open-orchestra 0.3.1 → 0.4.1

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 (92) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/autonomous-phase-lifecycle.d.ts +25 -0
  3. package/dist/autonomous-phase-lifecycle.js +194 -0
  4. package/dist/autonomous-phase-lifecycle.js.map +1 -0
  5. package/dist/autonomous-run-state.d.ts +6 -0
  6. package/dist/autonomous-run-state.js +91 -0
  7. package/dist/autonomous-run-state.js.map +1 -0
  8. package/dist/autonomous-run-store.d.ts +12 -0
  9. package/dist/autonomous-run-store.js +64 -0
  10. package/dist/autonomous-run-store.js.map +1 -0
  11. package/dist/autonomous-workflow-constants.d.ts +6 -0
  12. package/dist/autonomous-workflow-constants.js +36 -0
  13. package/dist/autonomous-workflow-constants.js.map +1 -0
  14. package/dist/autonomous-workflow.d.ts +6 -45
  15. package/dist/autonomous-workflow.js +4 -385
  16. package/dist/autonomous-workflow.js.map +1 -1
  17. package/dist/benchmark.d.ts +2 -1
  18. package/dist/benchmark.js +70 -0
  19. package/dist/benchmark.js.map +1 -1
  20. package/dist/cli.js +31 -2
  21. package/dist/cli.js.map +1 -1
  22. package/dist/command-utils.d.ts +6 -0
  23. package/dist/command-utils.js +19 -0
  24. package/dist/command-utils.js.map +1 -0
  25. package/dist/commands.d.ts +8 -40
  26. package/dist/commands.js +59 -803
  27. package/dist/commands.js.map +1 -1
  28. package/dist/constants.js +14 -0
  29. package/dist/constants.js.map +1 -1
  30. package/dist/defaults.d.ts +17 -0
  31. package/dist/defaults.js +17 -0
  32. package/dist/defaults.js.map +1 -1
  33. package/dist/instruction-commands.d.ts +5 -0
  34. package/dist/instruction-commands.js +98 -0
  35. package/dist/instruction-commands.js.map +1 -0
  36. package/dist/metrics-commands.d.ts +3 -0
  37. package/dist/metrics-commands.js +114 -0
  38. package/dist/metrics-commands.js.map +1 -0
  39. package/dist/model-commands.d.ts +13 -0
  40. package/dist/model-commands.js +199 -0
  41. package/dist/model-commands.js.map +1 -0
  42. package/dist/model-providers.d.ts +26 -1
  43. package/dist/model-providers.js +257 -1
  44. package/dist/model-providers.js.map +1 -1
  45. package/dist/notifications.d.ts +31 -0
  46. package/dist/notifications.js +165 -0
  47. package/dist/notifications.js.map +1 -0
  48. package/dist/phase-executor.d.ts +18 -0
  49. package/dist/phase-executor.js +218 -0
  50. package/dist/phase-executor.js.map +1 -0
  51. package/dist/release-commands.d.ts +10 -0
  52. package/dist/release-commands.js +116 -0
  53. package/dist/release-commands.js.map +1 -1
  54. package/dist/runtime-adapters.d.ts +5 -1
  55. package/dist/runtime-adapters.js +27 -0
  56. package/dist/runtime-adapters.js.map +1 -1
  57. package/dist/runtime-commands.d.ts +9 -0
  58. package/dist/runtime-commands.js +156 -0
  59. package/dist/runtime-commands.js.map +1 -0
  60. package/dist/runtime-execution-adapters.d.ts +2 -0
  61. package/dist/runtime-execution-adapters.js +163 -0
  62. package/dist/runtime-execution-adapters.js.map +1 -0
  63. package/dist/runtime-execution-renderer.d.ts +10 -0
  64. package/dist/runtime-execution-renderer.js +110 -0
  65. package/dist/runtime-execution-renderer.js.map +1 -0
  66. package/dist/runtime-execution.d.ts +27 -0
  67. package/dist/runtime-execution.js +147 -0
  68. package/dist/runtime-execution.js.map +1 -0
  69. package/dist/skills-commands.d.ts +9 -0
  70. package/dist/skills-commands.js +130 -0
  71. package/dist/skills-commands.js.map +1 -0
  72. package/dist/sprint-commands.d.ts +5 -0
  73. package/dist/sprint-commands.js +120 -0
  74. package/dist/sprint-commands.js.map +1 -0
  75. package/dist/sprint-metrics.d.ts +9 -0
  76. package/dist/sprint-metrics.js +203 -0
  77. package/dist/sprint-metrics.js.map +1 -0
  78. package/dist/telemetry-commands.d.ts +7 -0
  79. package/dist/telemetry-commands.js +82 -0
  80. package/dist/telemetry-commands.js.map +1 -0
  81. package/dist/tool-commands.d.ts +3 -0
  82. package/dist/tool-commands.js +67 -0
  83. package/dist/tool-commands.js.map +1 -0
  84. package/dist/types.d.ts +177 -0
  85. package/dist/types.js.map +1 -1
  86. package/dist/workflow-services.d.ts +3 -1
  87. package/dist/workflow-services.js +16 -6
  88. package/dist/workflow-services.js.map +1 -1
  89. package/docs/autonomous-workflow.md +28 -1
  90. package/docs/benchmark.md +18 -0
  91. package/docs/runtime-llm-flow.md +80 -9
  92. package/package.json +1 -1
@@ -6,8 +6,9 @@ agent today.
6
6
  That means Claude, Codex, Cursor, VS Code, Windsurf, or another LLM starts the
7
7
  work, reads the relevant project instructions, and calls `orchestra` commands to
8
8
  coordinate tasks, roles, skills, handoffs, reviews, evidence, gates, and model
9
- routing metadata. Open Orchestra does not yet spawn real provider-backed
10
- subagents by itself.
9
+ routing metadata. When a workflow role is configured with a non-`none`
10
+ provider, `orchestra workflow run` also invokes the configured provider for
11
+ that phase and records phase artifacts plus model provenance.
11
12
 
12
13
  ## Startup Flow
13
14
 
@@ -81,23 +82,89 @@ Generic LLM runtime:
81
82
  ```text
82
83
  Act as the parent agent. Use Open Orchestra commands as the source of truth for
83
84
  tasks, roles, skills, workflow templates, evidence, reviews, and gates. Ask the
84
- user before changing architecture or spending budget. Treat provider execution
85
- as future capability unless the project exposes an approved adapter.
85
+ user before changing architecture or spending budget. Use provider-backed
86
+ workflow execution only when the workflow config has approved routing.
86
87
  ```
87
88
 
88
89
  ## Model Routing
89
90
 
90
- Current model routing is metadata and policy plumbing. These commands inspect
91
- or update routing state, but they do not yet execute real provider-backed
92
- subagents:
91
+ Model routing controls which provider/model each role uses during autonomous
92
+ workflow phases. The default `none` provider keeps the deterministic workflow
93
+ behavior. Configure a role or default route to `fake` for local structured
94
+ execution tests, or to `openai` to use the OpenAI Responses API through the
95
+ native provider adapter. Use `anthropic` to route phases to Claude models
96
+ through the Anthropic Messages API.
93
97
 
94
98
  ```bash
95
99
  node bin/orchestra.js model providers --json
96
100
  node bin/orchestra.js model set-role --role qa --provider fake --model fake-model
101
+ OPENAI_API_KEY=... node bin/orchestra.js model set-role --role architect --provider openai --model gpt-5.2
102
+ ANTHROPIC_API_KEY=... node bin/orchestra.js model set-role --role qa --provider anthropic --model claude-sonnet-4-20250514
97
103
  node bin/orchestra.js model provenance list --json
98
104
  node bin/orchestra.js budget check --json
105
+ node bin/orchestra.js workflow run --task STORY-001 --gates phase
99
106
  ```
100
107
 
108
+ The OpenAI adapter reads `OPENAI_API_KEY` from the environment and optionally
109
+ `OPENAI_BASE_URL` for an HTTPS-compatible endpoint. API keys must not be stored
110
+ in workflow config, evidence, docs, or committed files.
111
+
112
+ The Anthropic adapter reads `ANTHROPIC_API_KEY` from the environment and
113
+ optionally `ANTHROPIC_BASE_URL` for an HTTPS-compatible endpoint. It uses
114
+ `ANTHROPIC_VERSION` when provided, otherwise the default API version is
115
+ `2023-06-01`. JSON-mode requests add an explicit JSON-only instruction because
116
+ Claude Messages API responses are normalized through text content rather than
117
+ OpenAI-style JSON schema response formatting.
118
+
119
+ ## Runtime Execution
120
+
121
+ Runtime execution is separate from model provider routing. `ModelProvider`
122
+ adapters call vendor APIs directly and therefore require provider API keys.
123
+ Runtime execution adapters prepare work for an already-authenticated runtime
124
+ such as Claude CLI, Codex CLI, Cursor, VS Code, or Windsurf.
125
+
126
+ Use runtime execution when the user wants the active CLI/IDE agent to perform
127
+ the work and does not want Orchestra to call OpenAI, Anthropic, or another
128
+ vendor API directly:
129
+
130
+ ```bash
131
+ node bin/orchestra.js runtime adapters --json
132
+ node bin/orchestra.js runtime brief --task STORY-001 --runtime claude-cli
133
+ node bin/orchestra.js runtime delegate-plan --task STORY-001 --runtime claude-cli --roles architect,developer,qa
134
+ node bin/orchestra.js runtime handoff --task STORY-001 --runtime claude-cli --artifact .agent-workflow/runs/STORY-001-runtime-claude-cli-delegation.md
135
+ ```
136
+
137
+ Runtime briefs and delegation packets are written under `.agent-workflow/runs/`
138
+ and record provenance events. They are brief-only control artifacts in this
139
+ release; Orchestra does not launch arbitrary runtime processes or silently fall
140
+ back to vendor APIs.
141
+
142
+ Runtime policy can force executor selection without API keys:
143
+
144
+ ```json
145
+ {
146
+ "runtimePolicy": {
147
+ "defaults": { "executor": "generic-runtime" },
148
+ "byRole": { "developer": { "executor": "codex-cli" } },
149
+ "byTask": { "STORY-001": { "executor": "claude-cli" } },
150
+ "delegation": {
151
+ "mode": "runtime-native",
152
+ "allowDirectProviderApi": false
153
+ }
154
+ }
155
+ }
156
+ ```
157
+
158
+ If a runtime does not support native subagents, Orchestra renders a delegation
159
+ packet in `brief-only` mode and requires user approval before any other
160
+ execution strategy. Direct provider API calls remain forbidden by runtime
161
+ execution packets.
162
+
163
+ Provider policy can restrict real adapters with `allowedProviders` and
164
+ `blockedProviders`. Cross-vendor fallback is blocked by default; enable
165
+ `allowVendorFallbackWithoutApproval` only after recording the required approval
166
+ for cost, privacy, and capability risk.
167
+
101
168
  Future multi-model delegation should route by role capability, risk, budget,
102
169
  latency, and required evidence. For example, a parent agent could keep planning
103
170
  local, route security review to a stronger security model, route Playwright
@@ -106,8 +173,12 @@ budget fallback.
106
173
 
107
174
  ## Current Limits
108
175
 
109
- - Open Orchestra has fake/provider-routing primitives, not real autonomous
110
- provider execution.
176
+ - Provider-backed workflow execution has a fake adapter for deterministic tests,
177
+ an OpenAI adapter for the Responses API, and an Anthropic adapter for the
178
+ Claude Messages API. Additional vendors need explicit implementation and
179
+ approval.
180
+ - Runtime execution adapters render briefs and delegation packets, but they do
181
+ not yet launch external CLI/IDE processes non-interactively.
111
182
  - It records delegation decisions, but it does not automatically spawn
112
183
  subagents yet.
113
184
  - Parallel independent CLI commands are expected to work, but dependent commands
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jterrats/open-orchestra",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "orchestra": "bin/orchestra.js"