@covibes/zeroshot 5.3.0 → 5.4.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 (82) hide show
  1. package/README.md +94 -14
  2. package/cli/commands/providers.js +8 -9
  3. package/cli/index.js +3032 -2409
  4. package/cli/message-formatters-normal.js +28 -6
  5. package/cluster-templates/base-templates/debug-workflow.json +1 -1
  6. package/cluster-templates/base-templates/full-workflow.json +72 -188
  7. package/cluster-templates/base-templates/worker-validator.json +59 -3
  8. package/cluster-templates/conductor-bootstrap.json +4 -4
  9. package/lib/docker-config.js +8 -0
  10. package/lib/git-remote-utils.js +165 -0
  11. package/lib/id-detector.js +10 -7
  12. package/lib/provider-defaults.js +62 -0
  13. package/lib/provider-names.js +2 -1
  14. package/lib/settings/claude-auth.js +78 -0
  15. package/lib/settings.js +161 -63
  16. package/package.json +7 -2
  17. package/scripts/setup-merge-queue.sh +170 -0
  18. package/src/agent/agent-config.js +135 -82
  19. package/src/agent/agent-context-builder.js +297 -188
  20. package/src/agent/agent-hook-executor.js +310 -113
  21. package/src/agent/agent-lifecycle.js +385 -325
  22. package/src/agent/agent-stuck-detector.js +7 -7
  23. package/src/agent/agent-task-executor.js +824 -565
  24. package/src/agent/output-extraction.js +41 -24
  25. package/src/agent/output-reformatter.js +1 -1
  26. package/src/agent/schema-utils.js +108 -73
  27. package/src/agent-wrapper.js +10 -1
  28. package/src/agents/git-pusher-template.js +285 -0
  29. package/src/claude-task-runner.js +85 -34
  30. package/src/config-validator.js +922 -657
  31. package/src/input-helpers.js +65 -0
  32. package/src/isolation-manager.js +289 -199
  33. package/src/issue-providers/README.md +305 -0
  34. package/src/issue-providers/azure-devops-provider.js +273 -0
  35. package/src/issue-providers/base-provider.js +232 -0
  36. package/src/issue-providers/github-provider.js +179 -0
  37. package/src/issue-providers/gitlab-provider.js +241 -0
  38. package/src/issue-providers/index.js +196 -0
  39. package/src/issue-providers/jira-provider.js +239 -0
  40. package/src/ledger.js +22 -5
  41. package/src/lib/safe-exec.js +88 -0
  42. package/src/orchestrator.js +1107 -811
  43. package/src/preflight.js +313 -159
  44. package/src/process-metrics.js +98 -56
  45. package/src/providers/anthropic/cli-builder.js +53 -25
  46. package/src/providers/anthropic/index.js +72 -2
  47. package/src/providers/anthropic/output-parser.js +32 -14
  48. package/src/providers/base-provider.js +70 -0
  49. package/src/providers/capabilities.js +9 -0
  50. package/src/providers/google/output-parser.js +47 -38
  51. package/src/providers/index.js +19 -3
  52. package/src/providers/openai/cli-builder.js +14 -3
  53. package/src/providers/openai/index.js +1 -0
  54. package/src/providers/openai/output-parser.js +44 -30
  55. package/src/providers/opencode/cli-builder.js +42 -0
  56. package/src/providers/opencode/index.js +103 -0
  57. package/src/providers/opencode/models.js +55 -0
  58. package/src/providers/opencode/output-parser.js +122 -0
  59. package/src/schemas/sub-cluster.js +68 -39
  60. package/src/status-footer.js +94 -48
  61. package/src/sub-cluster-wrapper.js +76 -35
  62. package/src/template-resolver.js +12 -9
  63. package/src/tui/data-poller.js +123 -99
  64. package/src/tui/formatters.js +4 -3
  65. package/src/tui/keybindings.js +259 -318
  66. package/src/tui/renderer.js +11 -21
  67. package/task-lib/attachable-watcher.js +118 -81
  68. package/task-lib/claude-recovery.js +61 -24
  69. package/task-lib/commands/episodes.js +105 -0
  70. package/task-lib/commands/list.js +2 -2
  71. package/task-lib/commands/logs.js +231 -189
  72. package/task-lib/commands/schedules.js +111 -61
  73. package/task-lib/config.js +0 -2
  74. package/task-lib/runner.js +84 -27
  75. package/task-lib/scheduler.js +1 -1
  76. package/task-lib/store.js +467 -168
  77. package/task-lib/tui/formatters.js +94 -45
  78. package/task-lib/tui/renderer.js +13 -3
  79. package/task-lib/tui.js +73 -32
  80. package/task-lib/watcher.js +128 -90
  81. package/src/agents/git-pusher-agent.json +0 -20
  82. package/src/github.js +0 -139
package/README.md CHANGED
@@ -41,9 +41,11 @@ Built for tasks where correctness matters more than speed.
41
41
 
42
42
  ```bash
43
43
  zeroshot run 123 # GitHub issue number
44
+ zeroshot run feature.md # Markdown file
45
+ zeroshot run "Add dark mode" # Inline text
44
46
  ```
45
47
 
46
- Or describe the task inline:
48
+ Or describe a complex task inline:
47
49
 
48
50
  ```bash
49
51
  zeroshot run "Add optimistic locking with automatic retry: when updating a user,
@@ -83,18 +85,20 @@ and surface conflicts with details. Handle the ABA problem where version goes A-
83
85
  npm install -g @covibes/zeroshot
84
86
  ```
85
87
 
86
- **Requires**: Node 18+, at least one provider CLI (Claude Code, Codex, Gemini). [GitHub CLI](https://cli.github.com/) is required when running by issue number.
88
+ **Requires**: Node 18+, at least one provider CLI (Claude Code, Codex, Gemini, Opencode).
87
89
 
88
90
  ```bash
89
91
  # Install one or more providers
90
92
  npm i -g @anthropic-ai/claude-code
91
93
  npm i -g @openai/codex
92
94
  npm i -g @google/gemini-cli
95
+ # Opencode: see https://opencode.ai
93
96
 
94
97
  # Authenticate with the provider CLI
95
98
  claude login # Claude
96
99
  codex login # Codex
97
100
  gemini auth login # Gemini
101
+ opencode auth login # Opencode
98
102
 
99
103
  # GitHub auth (for issue numbers)
100
104
  gh auth login
@@ -147,8 +151,9 @@ Rule of thumb: if you cannot describe what "done" means, validators cannot verif
147
151
 
148
152
  ```bash
149
153
  # Run
150
- zeroshot run 123
151
- zeroshot run "Add dark mode"
154
+ zeroshot run 123 # GitHub issue
155
+ zeroshot run feature.md # Markdown file
156
+ zeroshot run "Add dark mode" # Inline text
152
157
 
153
158
  # Isolation
154
159
  zeroshot run 123 --worktree # git worktree
@@ -184,6 +189,32 @@ zeroshot clean
184
189
  zeroshot purge
185
190
  ```
186
191
 
192
+ ## Multi-Platform Issue Support
193
+
194
+ Zeroshot works with **GitHub, GitLab, Jira, and Azure DevOps**. Just paste the issue URL or key.
195
+ When working in a git repository, zeroshot automatically detects the issue provider from your git remote URL. No configuration needed!
196
+
197
+ ```bash
198
+ # GitHub
199
+ zeroshot run 123
200
+ zeroshot run https://github.com/org/repo/issues/123
201
+
202
+ # GitLab (cloud and self-hosted)
203
+ zeroshot run https://gitlab.com/org/repo/-/issues/456
204
+ zeroshot run https://gitlab.mycompany.com/org/repo/-/issues/789
205
+
206
+ # Jira
207
+ zeroshot run PROJ-789
208
+ zeroshot run https://company.atlassian.net/browse/PROJ-789
209
+
210
+ # Azure DevOps
211
+ zeroshot run https://dev.azure.com/org/project/_workitems/edit/999
212
+ ```
213
+
214
+ **Requires**: CLI tools ([`gh`](https://cli.github.com/), [`glab`](https://gitlab.com/gitlab-org/cli), [`jira`](https://github.com/go-jira/jira), or [`az`](https://docs.microsoft.com/cli/azure/)) for the platform you use. See [issue-providers README](src/issue-providers/README.md) for setup and self-hosted instances.
215
+
216
+ **Important for `--pr` mode**: Run zeroshot from the target repository directory. PRs are created on the git remote of your current directory. If you run from a different repo, zeroshot will warn you and skip the "Closes #X" reference (the PR is still created, but won't auto-close the issue).
217
+
187
218
  ## Architecture
188
219
 
189
220
  Zeroshot is a message-driven coordination layer with smart defaults.
@@ -194,6 +225,54 @@ Zeroshot is a message-driven coordination layer with smart defaults.
194
225
  - Validators approve or reject with specific findings.
195
226
  - Rejections route back to the worker for fixes.
196
227
 
228
+ ```
229
+ ┌─────────────────┐
230
+ │ TASK │
231
+ └────────┬────────┘
232
+
233
+
234
+ ┌────────────────────────────────────────────┐
235
+ │ CONDUCTOR │
236
+ │ Complexity × TaskType → Workflow │
237
+ └────────────────────────┬───────────────────┘
238
+
239
+ ┌─────────────────────────────┼─────────────────────────────┐
240
+ │ │ │
241
+ ▼ ▼ ▼
242
+ ┌───────────┐ ┌───────────┐ ┌───────────┐
243
+ │ TRIVIAL │ │ SIMPLE │ │ STANDARD+ │
244
+ │ 1 agent │──────────▶ │ worker │ │ planner │
245
+ │ (level1) │ COMPLETE │ + 1 valid.│ │ + worker │
246
+ │ no valid. │ └─────┬─────┘ │ + 3-5 val.│
247
+ └───────────┘ │ └─────┬─────┘
248
+ ▼ │
249
+ ┌─────────────┐ ▼
250
+ ┌──▶│ WORKER │ ┌─────────────┐
251
+ │ └──────┬──────┘ │ PLANNER │
252
+ │ │ └──────┬──────┘
253
+ │ ▼ │
254
+ │ ┌─────────────────────┐ ▼
255
+ │ │ ✓ validator │ ┌─────────────┐
256
+ │ │ (generic check) │ ┌──▶│ WORKER │
257
+ │ └──────────┬──────────┘ │ └──────┬──────┘
258
+ │ REJECT │ ALL OK │ │
259
+ └──────────────┘ │ │ ▼
260
+ │ │ ┌──────────────────────┐
261
+ │ │ │ ✓ requirements │
262
+ │ │ │ ✓ code (STANDARD+) │
263
+ │ │ │ ✓ security (CRIT) │
264
+ │ │ │ ✓ tester (CRIT) │
265
+ │ │ │ ✓ adversarial │
266
+ │ │ │ (real execution) │
267
+ │ │ └──────────┬───────────┘
268
+ │ │ REJECT │ ALL OK
269
+ │ └──────────────┘ │
270
+ ▼ ▼
271
+ ┌─────────────────────────────────────────────────────────────────────────────┐
272
+ │ COMPLETE │
273
+ └─────────────────────────────────────────────────────────────────────────────┘
274
+ ```
275
+
197
276
  ### Complexity Model
198
277
 
199
278
  | Task | Complexity | Agents | Validators |
@@ -367,16 +446,17 @@ zeroshot settings set dockerEnvPassthrough '["MY_API_KEY", "TF_VAR_*"]'
367
446
  <details>
368
447
  <summary><strong>Troubleshooting</strong></summary>
369
448
 
370
- | Issue | Fix |
371
- | ----------------------------- | --------------------------------------------------------- |
372
- | `claude: command not found` | `npm i -g @anthropic-ai/claude-code && claude auth login` |
373
- | `codex: command not found` | `npm i -g @openai/codex && codex login` |
374
- | `gemini: command not found` | `npm i -g @google/gemini-cli && gemini auth login` |
375
- | `gh: command not found` | [Install GitHub CLI](https://cli.github.com/) |
376
- | `--docker` fails | Docker must be running: `docker ps` to verify |
377
- | Cluster stuck | `zeroshot resume <id>` to continue |
378
- | Agent keeps failing | Check `zeroshot logs <id>` for actual error |
379
- | `zeroshot: command not found` | `npm install -g @covibes/zeroshot` |
449
+ | Issue | Fix |
450
+ | ----------------------------- | ----------------------------------------------------------------------------------------- |
451
+ | `claude: command not found` | `npm i -g @anthropic-ai/claude-code && claude auth login` |
452
+ | `codex: command not found` | `npm i -g @openai/codex && codex login` |
453
+ | `gemini: command not found` | `npm i -g @google/gemini-cli && gemini auth login` |
454
+ | `gh: command not found` | [Install GitHub CLI](https://cli.github.com/) |
455
+ | `--docker` fails | Docker must be running: `docker ps` to verify |
456
+ | Cluster stuck | `zeroshot resume <id>` to continue |
457
+ | Agent keeps failing | Check `zeroshot logs <id>` for actual error |
458
+ | `zeroshot: command not found` | `npm install -g @covibes/zeroshot` |
459
+ | Agents misbehave | `/analyze-cluster-postmortem <id>` in Claude Code (creates issue if fix is generalizable) |
380
460
 
381
461
  </details>
382
462
 
@@ -59,7 +59,7 @@ function setDefaultCommand(args) {
59
59
  async function setupCommand(args) {
60
60
  const provider = normalizeProviderName(args[0]);
61
61
  if (!provider) {
62
- console.error('Provider is required (claude, codex, gemini)');
62
+ console.error('Provider is required (claude, codex, gemini, opencode)');
63
63
  process.exit(1);
64
64
  }
65
65
 
@@ -115,14 +115,13 @@ async function setupCommand(args) {
115
115
  for (const level of levelKeys) {
116
116
  const modelChoice = await question(rl, `Model for ${level} (${catalog.join(', ')}): `);
117
117
  if (modelChoice) levelOverrides[level] = { model: modelChoice };
118
- if (provider === 'codex') {
119
- const reasoning = await question(rl, `Reasoning for ${level} (low|medium|high|xhigh): `);
120
- if (reasoning) {
121
- levelOverrides[level] = {
122
- ...(levelOverrides[level] || {}),
123
- reasoningEffort: reasoning,
124
- };
125
- }
118
+ if (provider !== 'codex') continue;
119
+ const reasoning = await question(rl, `Reasoning for ${level} (low|medium|high|xhigh): `);
120
+ if (reasoning) {
121
+ levelOverrides[level] = {
122
+ ...(levelOverrides[level] || {}),
123
+ reasoningEffort: reasoning,
124
+ };
126
125
  }
127
126
  }
128
127
  }