@covibes/zeroshot 5.3.0 → 5.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 (119) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +8 -385
  3. package/cli/index.js +108 -4615
  4. package/package.json +16 -125
  5. package/CHANGELOG.md +0 -537
  6. package/cli/commands/providers.js +0 -150
  7. package/cli/lib/first-run.js +0 -211
  8. package/cli/lib/update-checker.js +0 -281
  9. package/cli/message-formatter-utils.js +0 -75
  10. package/cli/message-formatters-normal.js +0 -253
  11. package/cli/message-formatters-watch.js +0 -181
  12. package/cluster-templates/base-templates/debug-workflow.json +0 -375
  13. package/cluster-templates/base-templates/full-workflow.json +0 -697
  14. package/cluster-templates/base-templates/single-worker.json +0 -63
  15. package/cluster-templates/base-templates/worker-validator.json +0 -152
  16. package/cluster-templates/conductor-bootstrap.json +0 -124
  17. package/docker/zeroshot-cluster/Dockerfile +0 -152
  18. package/docker/zeroshot-cluster/pre-baked-deps.json +0 -28
  19. package/lib/completion.js +0 -174
  20. package/lib/docker-config.js +0 -212
  21. package/lib/id-detector.js +0 -53
  22. package/lib/provider-detection.js +0 -59
  23. package/lib/provider-names.js +0 -56
  24. package/lib/settings.js +0 -405
  25. package/lib/stream-json-parser.js +0 -10
  26. package/scripts/fix-node-pty-permissions.js +0 -75
  27. package/scripts/record-demo.sh +0 -279
  28. package/scripts/test-install.sh +0 -40
  29. package/scripts/validate-templates.js +0 -100
  30. package/src/agent/agent-config.js +0 -193
  31. package/src/agent/agent-context-builder.js +0 -335
  32. package/src/agent/agent-hook-executor.js +0 -402
  33. package/src/agent/agent-lifecycle.js +0 -683
  34. package/src/agent/agent-stuck-detector.js +0 -256
  35. package/src/agent/agent-task-executor.js +0 -1431
  36. package/src/agent/agent-trigger-evaluator.js +0 -67
  37. package/src/agent/output-extraction.js +0 -200
  38. package/src/agent/output-reformatter.js +0 -175
  39. package/src/agent/schema-utils.js +0 -111
  40. package/src/agent-wrapper.js +0 -570
  41. package/src/agents/git-pusher-agent.json +0 -20
  42. package/src/attach/attach-client.js +0 -438
  43. package/src/attach/attach-server.js +0 -543
  44. package/src/attach/index.js +0 -35
  45. package/src/attach/protocol.js +0 -220
  46. package/src/attach/ring-buffer.js +0 -121
  47. package/src/attach/socket-discovery.js +0 -267
  48. package/src/claude-task-runner.js +0 -523
  49. package/src/config-router.js +0 -80
  50. package/src/config-validator.js +0 -1660
  51. package/src/copy-worker.js +0 -43
  52. package/src/github.js +0 -139
  53. package/src/isolation-manager.js +0 -1381
  54. package/src/ledger.js +0 -614
  55. package/src/logic-engine.js +0 -223
  56. package/src/message-bus-bridge.js +0 -139
  57. package/src/message-bus.js +0 -249
  58. package/src/name-generator.js +0 -232
  59. package/src/orchestrator.js +0 -2519
  60. package/src/preflight.js +0 -485
  61. package/src/process-metrics.js +0 -566
  62. package/src/providers/anthropic/cli-builder.js +0 -45
  63. package/src/providers/anthropic/index.js +0 -134
  64. package/src/providers/anthropic/models.js +0 -23
  65. package/src/providers/anthropic/output-parser.js +0 -159
  66. package/src/providers/base-provider.js +0 -181
  67. package/src/providers/capabilities.js +0 -51
  68. package/src/providers/google/cli-builder.js +0 -55
  69. package/src/providers/google/index.js +0 -116
  70. package/src/providers/google/models.js +0 -24
  71. package/src/providers/google/output-parser.js +0 -92
  72. package/src/providers/index.js +0 -75
  73. package/src/providers/openai/cli-builder.js +0 -122
  74. package/src/providers/openai/index.js +0 -135
  75. package/src/providers/openai/models.js +0 -21
  76. package/src/providers/openai/output-parser.js +0 -129
  77. package/src/schemas/sub-cluster.js +0 -156
  78. package/src/status-footer.js +0 -980
  79. package/src/sub-cluster-wrapper.js +0 -560
  80. package/src/task-runner.js +0 -30
  81. package/src/template-resolver.js +0 -369
  82. package/src/tui/CHANGES.txt +0 -133
  83. package/src/tui/LAYOUT.md +0 -261
  84. package/src/tui/README.txt +0 -192
  85. package/src/tui/TWO-LEVEL-NAVIGATION.md +0 -186
  86. package/src/tui/data-poller.js +0 -325
  87. package/src/tui/demo.js +0 -208
  88. package/src/tui/formatters.js +0 -128
  89. package/src/tui/index.js +0 -193
  90. package/src/tui/keybindings.js +0 -383
  91. package/src/tui/layout.js +0 -334
  92. package/src/tui/renderer.js +0 -194
  93. package/task-lib/attachable-watcher.js +0 -272
  94. package/task-lib/claude-recovery.js +0 -119
  95. package/task-lib/commands/clean.js +0 -50
  96. package/task-lib/commands/get-log-path.js +0 -23
  97. package/task-lib/commands/kill.js +0 -32
  98. package/task-lib/commands/list.js +0 -105
  99. package/task-lib/commands/logs.js +0 -411
  100. package/task-lib/commands/resume.js +0 -42
  101. package/task-lib/commands/run.js +0 -57
  102. package/task-lib/commands/schedule.js +0 -105
  103. package/task-lib/commands/scheduler-cmd.js +0 -96
  104. package/task-lib/commands/schedules.js +0 -98
  105. package/task-lib/commands/status.js +0 -44
  106. package/task-lib/commands/unschedule.js +0 -16
  107. package/task-lib/completion.js +0 -9
  108. package/task-lib/config.js +0 -10
  109. package/task-lib/name-generator.js +0 -230
  110. package/task-lib/package.json +0 -3
  111. package/task-lib/runner.js +0 -144
  112. package/task-lib/scheduler.js +0 -252
  113. package/task-lib/store.js +0 -230
  114. package/task-lib/tui/formatters.js +0 -166
  115. package/task-lib/tui/index.js +0 -197
  116. package/task-lib/tui/layout.js +0 -111
  117. package/task-lib/tui/renderer.js +0 -119
  118. package/task-lib/tui.js +0 -384
  119. package/task-lib/watcher.js +0 -188
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Covibes
3
+ Copyright (c) 2026 The Open Engine Company
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,395 +1,18 @@
1
- # zeroshot CLI
1
+ # @covibes/zeroshot
2
2
 
3
- > **🎉 New Release:** Now supports **Codex** and **Gemini** CLI in addition to Claude! Use any provider or mix them in multi-agent workflows. See [Providers](#providers) for details.
3
+ This package has moved to `@the-open-engine/zeroshot`.
4
4
 
5
- <!-- install-placeholder -->
6
- <p align="center">
7
- <code>npm install -g @covibes/zeroshot</code>
8
- </p>
9
-
10
- <p align="center">
11
- <img src="./docs/assets/zeroshot-demo.gif" alt="Demo" width="700">
12
- <br>
13
- <em>Demo (100x speed, 90-minute run, 5 iterations to approval)</em>
14
- </p>
15
-
16
- [![CI](https://github.com/covibes/zeroshot/actions/workflows/ci.yml/badge.svg)](https://github.com/covibes/zeroshot/actions/workflows/ci.yml)
17
- [![npm version](https://img.shields.io/npm/v/@covibes/zeroshot.svg)](https://www.npmjs.com/package/@covibes/zeroshot)
18
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
19
- [![Node 18+](https://img.shields.io/badge/node-18%2B-brightgreen.svg)](https://nodejs.org/)
20
- ![Platform: Linux | macOS](https://img.shields.io/badge/platform-Linux%20%7C%20macOS-blue.svg)
21
-
22
- <!-- discord-placeholder -->
23
-
24
- [![Discord](https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white)](https://discord.gg/PdZ3UEXB)
25
-
26
- Zeroshot is an open-source AI coding agent orchestration CLI that runs multi-agent workflows to autonomously implement, review, test, and verify code changes.
27
-
28
- It runs a **planner**, an **implementer**, and independent **validators** in isolated environments, looping until changes are **verified** or **rejected** with actionable, reproducible failures.
29
-
30
- Built for tasks where correctness matters more than speed.
31
-
32
- ## How It Works
33
-
34
- - Plan: translate a task into concrete acceptance criteria
35
- - Implement: make changes in an isolated workspace (local, worktree, or Docker)
36
- - Validate: run automated checks with independent validators
37
- - Iterate: repeat until verified, or return actionable failures
38
- - Resume: crash-safe state persisted for recovery
39
-
40
- ## Quick Start
41
-
42
- ```bash
43
- zeroshot run 123 # GitHub issue number
44
- ```
45
-
46
- Or describe the task inline:
47
-
48
- ```bash
49
- zeroshot run "Add optimistic locking with automatic retry: when updating a user,
50
- retry with exponential backoff up to 3 times, merge non-conflicting field changes,
51
- and surface conflicts with details. Handle the ABA problem where version goes A->B->A."
52
- ```
53
-
54
- ## Why Not Just Use a Single AI Agent?
55
-
56
- | Approach | Writes Code | Runs Tests | Blind Validation | Iterates Until Verified |
57
- | -------------------------- | ----------- | ---------- | ---------------- | ----------------------- |
58
- | Chat-based assistant | ✅ | ⚠️ | ❌ | ❌ |
59
- | Single coding agent | ✅ | ⚠️ | ❌ | ⚠️ |
60
- | **Zeroshot (multi-agent)** | ✅ | ✅ | ✅ | ✅ |
61
-
62
- ## Use Cases
63
-
64
- - Autonomous AI code refactoring
65
- - AI-powered pull request automation
66
- - Automated bug fixing with validation
67
- - Multi-agent code generation for software engineering
68
- - Agentic coding workflows with blind validation
69
-
70
- ## Who Is This For?
71
-
72
- - Senior engineers who care about correctness and reproducibility
73
- - Teams automating PR workflows and code review gates
74
- - Infra/platform teams standardizing agentic workflows
75
- - Open-source maintainers working through issue backlogs
76
- - AI power users who want verification, not vibes
77
-
78
- ## Install and Requirements
79
-
80
- **Platforms**: Linux, macOS (Windows WSL not yet supported)
5
+ Install the maintained package directly:
81
6
 
82
7
  ```bash
83
- npm install -g @covibes/zeroshot
8
+ npm install -g @the-open-engine/zeroshot
84
9
  ```
85
10
 
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.
11
+ If this bridge package is already installed, run:
87
12
 
88
13
  ```bash
89
- # Install one or more providers
90
- npm i -g @anthropic-ai/claude-code
91
- npm i -g @openai/codex
92
- npm i -g @google/gemini-cli
93
-
94
- # Authenticate with the provider CLI
95
- claude login # Claude
96
- codex login # Codex
97
- gemini auth login # Gemini
98
-
99
- # GitHub auth (for issue numbers)
100
- gh auth login
101
- ```
102
-
103
- ## Providers
104
-
105
- Zeroshot shells out to provider CLIs. Pick a default and override per run:
106
-
107
- ```bash
108
- zeroshot providers
109
- zeroshot providers set-default codex
110
- zeroshot run 123 --provider gemini
14
+ zeroshot update
111
15
  ```
112
16
 
113
- See `docs/providers.md` for setup, model levels, and Docker mounts.
114
-
115
- ## Why Multiple Agents?
116
-
117
- Single-agent sessions degrade. Context gets buried under thousands of tokens. The model optimizes for "done" over "correct."
118
-
119
- Zeroshot fixes this with isolated agents that check each other's work. Validators can't lie about code they didn't write. Fail the check? Fix and retry until it actually works.
120
-
121
- ## What Makes It Different
122
-
123
- - **Blind validation** - Validators never see the worker's context or code history
124
- - **Repeatable workflows** - Task complexity determines agent count and model selection
125
- - **Accept/reject loop** - Rejections include actionable findings, not vague complaints
126
- - **Crash recovery** - All state persisted to SQLite; resume anytime
127
- - **Isolation modes** - None, git worktree, or Docker container
128
- - **Cost control** - Model ceilings prevent runaway API spend
129
-
130
- ## When to Use Zeroshot
131
-
132
- Zeroshot performs best when tasks have clear acceptance criteria.
133
-
134
- | Scenario | Use | Why |
135
- | ----------------------------------------------- | --- | ------------------------- |
136
- | Add rate limiting (sliding window, per-IP, 429) | Yes | Clear requirements |
137
- | Refactor auth to JWT | Yes | Defined end state |
138
- | Fix login bug | Yes | Success is measurable |
139
- | Fix 2410 lint violations | Yes | Clear completion criteria |
140
- | Make the app faster | No | Needs exploration first |
141
- | Improve the codebase | No | No acceptance criteria |
142
- | Figure out flaky tests | No | Exploratory |
143
-
144
- Rule of thumb: if you cannot describe what "done" means, validators cannot verify it.
145
-
146
- ## Command Overview
147
-
148
- ```bash
149
- # Run
150
- zeroshot run 123
151
- zeroshot run "Add dark mode"
152
-
153
- # Isolation
154
- zeroshot run 123 --worktree # git worktree
155
- zeroshot run 123 --docker # container
156
-
157
- # Automation (--ship implies --pr implies --worktree)
158
- zeroshot run 123 --pr # worktree + create PR
159
- zeroshot run 123 --ship # PR + auto-merge on approval
160
-
161
- # Background mode
162
- zeroshot run 123 -d
163
- zeroshot run 123 --ship -d
164
-
165
- # Control
166
- zeroshot list
167
- zeroshot status <id>
168
- zeroshot logs <id> -f
169
- zeroshot resume <id>
170
- zeroshot stop <id>
171
- zeroshot kill <id>
172
- zeroshot watch
173
-
174
- # Providers
175
- zeroshot providers
176
- zeroshot providers set-default codex
177
-
178
- # Agent library
179
- zeroshot agents list
180
- zeroshot agents show <name>
181
-
182
- # Maintenance
183
- zeroshot clean
184
- zeroshot purge
185
- ```
186
-
187
- ## Architecture
188
-
189
- Zeroshot is a message-driven coordination layer with smart defaults.
190
-
191
- - The conductor classifies tasks by complexity and type.
192
- - A workflow template selects agents and validators.
193
- - Agents publish results to a SQLite ledger.
194
- - Validators approve or reject with specific findings.
195
- - Rejections route back to the worker for fixes.
196
-
197
- ### Complexity Model
198
-
199
- | Task | Complexity | Agents | Validators |
200
- | ---------------------- | ---------- | ------ | ------------------------------------------------- |
201
- | Fix typo in README | TRIVIAL | 1 | None |
202
- | Add dark mode toggle | SIMPLE | 2 | Generic validator |
203
- | Refactor auth system | STANDARD | 4 | Requirements, code |
204
- | Implement payment flow | CRITICAL | 7 | Requirements, code, security, tester, adversarial |
205
-
206
- ### Model Selection by Complexity
207
-
208
- | Complexity | Planner | Worker | Validators |
209
- | ---------- | ------- | ------ | ---------- |
210
- | TRIVIAL | - | level1 | - |
211
- | SIMPLE | - | level2 | 1 (level2) |
212
- | STANDARD | level2 | level2 | 2 (level2) |
213
- | CRITICAL | level3 | level2 | 5 (level2) |
214
-
215
- Levels map to provider-specific models. Configure with `zeroshot providers setup <provider>` or
216
- `settings.providerSettings`. (Legacy `maxModel` applies to Claude only.)
217
-
218
- <details>
219
- <summary><strong>Custom Workflows (Framework Mode)</strong></summary>
220
-
221
- Zeroshot is message-driven, so you can define any agent topology.
222
-
223
- - Expert panels: parallel specialists -> aggregator -> decision
224
- - Staged gates: sequential validators, each with veto power
225
- - Hierarchical: supervisor dynamically spawns workers
226
- - Dynamic: conductor adds agents mid-execution
227
-
228
- **Coordination primitives:**
229
-
230
- - Message bus (pub/sub topics)
231
- - Triggers (wake agents on conditions)
232
- - Ledger (SQLite, crash recovery)
233
- - Dynamic spawning (CLUSTER_OPERATIONS)
234
-
235
- #### Creating Custom Clusters with a Provider CLI
236
-
237
- Start your provider CLI and describe your cluster:
238
-
239
- ```
240
- Create a zeroshot cluster config for security-critical features:
241
-
242
- 1. Implementation agent (level2) implements the feature
243
- 2. FOUR parallel validators:
244
- - Security validator: OWASP checks, SQL injection, XSS, CSRF
245
- - Performance validator: No N+1 queries, proper indexing
246
- - Privacy validator: GDPR compliance, data minimization
247
- - Code reviewer: General code quality
248
-
249
- 3. ALL validators must approve before merge
250
- 4. If ANY validator rejects, implementation agent fixes and resubmits
251
- 5. Use level3 for security validator (highest stakes)
252
-
253
- Look at cluster-templates/base-templates/full-workflow.json
254
- and create a similar cluster. Save to cluster-templates/security-review.json
255
- ```
256
-
257
- Built-in validation checks for missing triggers, deadlocks, and invalid type wiring before running.
258
-
259
- See [CLAUDE.md](./CLAUDE.md) for the cluster schema and examples.
260
-
261
- </details>
262
-
263
- ## Crash Recovery
264
-
265
- All state is persisted in the SQLite ledger. You can resume at any time:
266
-
267
- ```bash
268
- zeroshot resume cluster-bold-panther
269
- ```
270
-
271
- ## Isolation Modes
272
-
273
- ### Git Worktree (Default for --pr/--ship)
274
-
275
- ```bash
276
- zeroshot run 123 --worktree
277
- ```
278
-
279
- Lightweight isolation using git worktree. Creates a separate working directory with its own branch. Auto-enabled with `--pr` and `--ship`.
280
-
281
- ### Docker Container
282
-
283
- ```bash
284
- zeroshot run 123 --docker
285
- ```
286
-
287
- Full isolation in a fresh container. Your workspace stays untouched. Useful for risky experiments or parallel runs.
288
-
289
- ### When to Use Which
290
-
291
- | Scenario | Recommended |
292
- | ------------------------------------ | ---------------------- |
293
- | Quick task, review changes yourself | No isolation (default) |
294
- | PR workflow, code review | `--worktree` or `--pr` |
295
- | Risky experiment, might break things | `--docker` |
296
- | Running multiple tasks in parallel | `--docker` |
297
- | Full automation, no review needed | `--ship` |
298
-
299
- **Default behavior:** Agents modify files only; they do not commit or push unless using an isolation mode that explicitly allows it.
300
-
301
- <details>
302
- <summary><strong>Docker Credential Mounts</strong></summary>
303
-
304
- When using `--docker`, zeroshot mounts credential directories so agents can access provider CLIs and tools like AWS, Azure, and kubectl.
305
-
306
- **Default mounts**: `gh`, `git`, `ssh` (GitHub CLI, git config, SSH keys)
307
-
308
- **Available presets**: `gh`, `git`, `ssh`, `aws`, `azure`, `kube`, `terraform`, `gcloud`, `claude`, `codex`, `gemini`
309
-
310
- ```bash
311
- # Configure via settings (persistent)
312
- zeroshot settings set dockerMounts '["gh", "git", "ssh", "aws", "azure"]'
313
-
314
- # View current config
315
- zeroshot settings get dockerMounts
316
-
317
- # Per-run override
318
- zeroshot run 123 --docker --mount ~/.aws:/root/.aws:ro
319
-
320
- # Provider credentials
321
- zeroshot run 123 --docker --mount ~/.config/codex:/home/node/.config/codex:ro
322
- zeroshot run 123 --docker --mount ~/.config/gemini:/home/node/.config/gemini:ro
323
-
324
- # Disable all mounts
325
- zeroshot run 123 --docker --no-mounts
326
-
327
- # CI: env var override
328
- ZEROSHOT_DOCKER_MOUNTS='["aws","azure"]' zeroshot run 123 --docker
329
- ```
330
-
331
- See `docs/providers.md` for provider CLI setup and mount details.
332
-
333
- **Custom mounts** (mix presets with explicit paths):
334
-
335
- ```bash
336
- zeroshot settings set dockerMounts '[
337
- "gh",
338
- "git",
339
- {"host": "~/.myconfig", "container": "$HOME/.myconfig", "readonly": true}
340
- ]'
341
- ```
342
-
343
- **Container home**: Presets use `$HOME` placeholder. Default: `/root`. Override with:
344
-
345
- ```bash
346
- zeroshot settings set dockerContainerHome '/home/node'
347
- # Or per-run:
348
- zeroshot run 123 --docker --container-home /home/node
349
- ```
350
-
351
- **Env var passthrough**: Presets auto-pass related env vars (for example, `aws` -> `AWS_REGION`, `AWS_PROFILE`). Add custom:
352
-
353
- ```bash
354
- zeroshot settings set dockerEnvPassthrough '["MY_API_KEY", "TF_VAR_*"]'
355
- ```
356
-
357
- </details>
358
-
359
- ## Resources
360
-
361
- - [CLAUDE.md](./CLAUDE.md) - Architecture, cluster config schema, agent primitives
362
- - `docs/providers.md` - Provider setup, model levels, and Docker mounts
363
- - [Discord](https://discord.gg/PdZ3UEXB) - Support and community
364
- - `zeroshot export <id>` - Export conversation to markdown
365
- - `sqlite3 ~/.zeroshot/*.db` - Direct ledger access for debugging
366
-
367
- <details>
368
- <summary><strong>Troubleshooting</strong></summary>
369
-
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` |
380
-
381
- </details>
382
-
383
- ## Contributing
384
-
385
- See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
386
-
387
- Please read [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) before participating.
388
-
389
- For security issues, see [SECURITY.md](SECURITY.md).
390
-
391
- ---
392
-
393
- MIT - [Covibes](https://github.com/covibes)
394
-
395
- Built on [Claude Code](https://claude.com/product/claude-code) by Anthropic.
17
+ The bridge prints a migration notice on every CLI invocation and delegates normal commands to
18
+ `@the-open-engine/zeroshot`.