@the-open-engine/zeroshot 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 (295) hide show
  1. package/CHANGELOG.md +539 -0
  2. package/LICENSE +21 -0
  3. package/README.md +508 -0
  4. package/cli/commands/inspect-render.js +135 -0
  5. package/cli/commands/inspect.js +294 -0
  6. package/cli/commands/providers.js +149 -0
  7. package/cli/index.js +5431 -0
  8. package/cli/lib/first-run.js +211 -0
  9. package/cli/lib/update-checker.js +281 -0
  10. package/cli/message-formatter-utils.js +75 -0
  11. package/cli/message-formatters-normal.js +275 -0
  12. package/cli/message-formatters-watch.js +185 -0
  13. package/cluster-templates/base-templates/debug-workflow.json +422 -0
  14. package/cluster-templates/base-templates/full-workflow.json +727 -0
  15. package/cluster-templates/base-templates/heavy-validation.json +272 -0
  16. package/cluster-templates/base-templates/quick-validation.json +285 -0
  17. package/cluster-templates/base-templates/single-worker.json +71 -0
  18. package/cluster-templates/base-templates/worker-validator.json +230 -0
  19. package/cluster-templates/conductor-bootstrap.json +130 -0
  20. package/docker/zeroshot-cluster/Dockerfile +153 -0
  21. package/docker/zeroshot-cluster/pre-baked-deps.json +28 -0
  22. package/lib/agent-cli-provider/adapters/claude-parser.d.ts +3 -0
  23. package/lib/agent-cli-provider/adapters/claude-parser.d.ts.map +1 -0
  24. package/lib/agent-cli-provider/adapters/claude-parser.js +122 -0
  25. package/lib/agent-cli-provider/adapters/claude-parser.js.map +1 -0
  26. package/lib/agent-cli-provider/adapters/claude-recovery.d.ts +15 -0
  27. package/lib/agent-cli-provider/adapters/claude-recovery.d.ts.map +1 -0
  28. package/lib/agent-cli-provider/adapters/claude-recovery.js +165 -0
  29. package/lib/agent-cli-provider/adapters/claude-recovery.js.map +1 -0
  30. package/lib/agent-cli-provider/adapters/claude.d.ts +3 -0
  31. package/lib/agent-cli-provider/adapters/claude.d.ts.map +1 -0
  32. package/lib/agent-cli-provider/adapters/claude.js +181 -0
  33. package/lib/agent-cli-provider/adapters/claude.js.map +1 -0
  34. package/lib/agent-cli-provider/adapters/codex-parser.d.ts +3 -0
  35. package/lib/agent-cli-provider/adapters/codex-parser.d.ts.map +1 -0
  36. package/lib/agent-cli-provider/adapters/codex-parser.js +192 -0
  37. package/lib/agent-cli-provider/adapters/codex-parser.js.map +1 -0
  38. package/lib/agent-cli-provider/adapters/codex.d.ts +3 -0
  39. package/lib/agent-cli-provider/adapters/codex.d.ts.map +1 -0
  40. package/lib/agent-cli-provider/adapters/codex.js +151 -0
  41. package/lib/agent-cli-provider/adapters/codex.js.map +1 -0
  42. package/lib/agent-cli-provider/adapters/common.d.ts +28 -0
  43. package/lib/agent-cli-provider/adapters/common.d.ts.map +1 -0
  44. package/lib/agent-cli-provider/adapters/common.js +71 -0
  45. package/lib/agent-cli-provider/adapters/common.js.map +1 -0
  46. package/lib/agent-cli-provider/adapters/gemini.d.ts +3 -0
  47. package/lib/agent-cli-provider/adapters/gemini.d.ts.map +1 -0
  48. package/lib/agent-cli-provider/adapters/gemini.js +176 -0
  49. package/lib/agent-cli-provider/adapters/gemini.js.map +1 -0
  50. package/lib/agent-cli-provider/adapters/index.d.ts +9 -0
  51. package/lib/agent-cli-provider/adapters/index.d.ts.map +1 -0
  52. package/lib/agent-cli-provider/adapters/index.js +95 -0
  53. package/lib/agent-cli-provider/adapters/index.js.map +1 -0
  54. package/lib/agent-cli-provider/adapters/opencode.d.ts +3 -0
  55. package/lib/agent-cli-provider/adapters/opencode.d.ts.map +1 -0
  56. package/lib/agent-cli-provider/adapters/opencode.js +228 -0
  57. package/lib/agent-cli-provider/adapters/opencode.js.map +1 -0
  58. package/lib/agent-cli-provider/contract-actions.d.ts +5 -0
  59. package/lib/agent-cli-provider/contract-actions.d.ts.map +1 -0
  60. package/lib/agent-cli-provider/contract-actions.js +140 -0
  61. package/lib/agent-cli-provider/contract-actions.js.map +1 -0
  62. package/lib/agent-cli-provider/contract-env.d.ts +11 -0
  63. package/lib/agent-cli-provider/contract-env.d.ts.map +1 -0
  64. package/lib/agent-cli-provider/contract-env.js +113 -0
  65. package/lib/agent-cli-provider/contract-env.js.map +1 -0
  66. package/lib/agent-cli-provider/contract-envelope.d.ts +49 -0
  67. package/lib/agent-cli-provider/contract-envelope.d.ts.map +1 -0
  68. package/lib/agent-cli-provider/contract-envelope.js +52 -0
  69. package/lib/agent-cli-provider/contract-envelope.js.map +1 -0
  70. package/lib/agent-cli-provider/contract-errors.d.ts +22 -0
  71. package/lib/agent-cli-provider/contract-errors.d.ts.map +1 -0
  72. package/lib/agent-cli-provider/contract-errors.js +71 -0
  73. package/lib/agent-cli-provider/contract-errors.js.map +1 -0
  74. package/lib/agent-cli-provider/contract-fallback.d.ts +7 -0
  75. package/lib/agent-cli-provider/contract-fallback.d.ts.map +1 -0
  76. package/lib/agent-cli-provider/contract-fallback.js +102 -0
  77. package/lib/agent-cli-provider/contract-fallback.js.map +1 -0
  78. package/lib/agent-cli-provider/contract-invoke.d.ts +5 -0
  79. package/lib/agent-cli-provider/contract-invoke.d.ts.map +1 -0
  80. package/lib/agent-cli-provider/contract-invoke.js +89 -0
  81. package/lib/agent-cli-provider/contract-invoke.js.map +1 -0
  82. package/lib/agent-cli-provider/contract-options.d.ts +3 -0
  83. package/lib/agent-cli-provider/contract-options.d.ts.map +1 -0
  84. package/lib/agent-cli-provider/contract-options.js +140 -0
  85. package/lib/agent-cli-provider/contract-options.js.map +1 -0
  86. package/lib/agent-cli-provider/contract-parse.d.ts +15 -0
  87. package/lib/agent-cli-provider/contract-parse.d.ts.map +1 -0
  88. package/lib/agent-cli-provider/contract-parse.js +81 -0
  89. package/lib/agent-cli-provider/contract-parse.js.map +1 -0
  90. package/lib/agent-cli-provider/contract-support.d.ts +18 -0
  91. package/lib/agent-cli-provider/contract-support.d.ts.map +1 -0
  92. package/lib/agent-cli-provider/contract-support.js +154 -0
  93. package/lib/agent-cli-provider/contract-support.js.map +1 -0
  94. package/lib/agent-cli-provider/contract.d.ts +13 -0
  95. package/lib/agent-cli-provider/contract.d.ts.map +1 -0
  96. package/lib/agent-cli-provider/contract.js +30 -0
  97. package/lib/agent-cli-provider/contract.js.map +1 -0
  98. package/lib/agent-cli-provider/env-safety.d.ts +11 -0
  99. package/lib/agent-cli-provider/env-safety.d.ts.map +1 -0
  100. package/lib/agent-cli-provider/env-safety.js +83 -0
  101. package/lib/agent-cli-provider/env-safety.js.map +1 -0
  102. package/lib/agent-cli-provider/errors.d.ts +5 -0
  103. package/lib/agent-cli-provider/errors.d.ts.map +1 -0
  104. package/lib/agent-cli-provider/errors.js +115 -0
  105. package/lib/agent-cli-provider/errors.js.map +1 -0
  106. package/lib/agent-cli-provider/executable.d.ts +3 -0
  107. package/lib/agent-cli-provider/executable.d.ts.map +1 -0
  108. package/lib/agent-cli-provider/executable.js +24 -0
  109. package/lib/agent-cli-provider/executable.js.map +1 -0
  110. package/lib/agent-cli-provider/index.d.ts +8 -0
  111. package/lib/agent-cli-provider/index.d.ts.map +1 -0
  112. package/lib/agent-cli-provider/index.js +31 -0
  113. package/lib/agent-cli-provider/index.js.map +1 -0
  114. package/lib/agent-cli-provider/invoke-evidence.d.ts +4 -0
  115. package/lib/agent-cli-provider/invoke-evidence.d.ts.map +1 -0
  116. package/lib/agent-cli-provider/invoke-evidence.js +17 -0
  117. package/lib/agent-cli-provider/invoke-evidence.js.map +1 -0
  118. package/lib/agent-cli-provider/json.d.ts +16 -0
  119. package/lib/agent-cli-provider/json.d.ts.map +1 -0
  120. package/lib/agent-cli-provider/json.js +110 -0
  121. package/lib/agent-cli-provider/json.js.map +1 -0
  122. package/lib/agent-cli-provider/log-prefix.d.ts +2 -0
  123. package/lib/agent-cli-provider/log-prefix.d.ts.map +1 -0
  124. package/lib/agent-cli-provider/log-prefix.js +22 -0
  125. package/lib/agent-cli-provider/log-prefix.js.map +1 -0
  126. package/lib/agent-cli-provider/process-runner.d.ts +17 -0
  127. package/lib/agent-cli-provider/process-runner.d.ts.map +1 -0
  128. package/lib/agent-cli-provider/process-runner.js +89 -0
  129. package/lib/agent-cli-provider/process-runner.js.map +1 -0
  130. package/lib/agent-cli-provider/redaction.d.ts +9 -0
  131. package/lib/agent-cli-provider/redaction.d.ts.map +1 -0
  132. package/lib/agent-cli-provider/redaction.js +227 -0
  133. package/lib/agent-cli-provider/redaction.js.map +1 -0
  134. package/lib/agent-cli-provider/schema.d.ts +5 -0
  135. package/lib/agent-cli-provider/schema.d.ts.map +1 -0
  136. package/lib/agent-cli-provider/schema.js +136 -0
  137. package/lib/agent-cli-provider/schema.js.map +1 -0
  138. package/lib/agent-cli-provider/single-agent-runtime.d.ts +15 -0
  139. package/lib/agent-cli-provider/single-agent-runtime.d.ts.map +1 -0
  140. package/lib/agent-cli-provider/single-agent-runtime.js +228 -0
  141. package/lib/agent-cli-provider/single-agent-runtime.js.map +1 -0
  142. package/lib/agent-cli-provider/types.d.ts +194 -0
  143. package/lib/agent-cli-provider/types.d.ts.map +1 -0
  144. package/lib/agent-cli-provider/types.js +12 -0
  145. package/lib/agent-cli-provider/types.js.map +1 -0
  146. package/lib/completion.js +174 -0
  147. package/lib/detached-startup.js +220 -0
  148. package/lib/docker-config.js +220 -0
  149. package/lib/git-remote-utils.js +165 -0
  150. package/lib/id-detector.js +55 -0
  151. package/lib/provider-defaults.js +62 -0
  152. package/lib/provider-detection.js +59 -0
  153. package/lib/provider-names.js +57 -0
  154. package/lib/repo-settings.js +69 -0
  155. package/lib/settings/claude-auth.js +78 -0
  156. package/lib/settings.js +542 -0
  157. package/lib/start-cluster.js +321 -0
  158. package/lib/stream-json-parser.js +67 -0
  159. package/package.json +162 -0
  160. package/scripts/fix-node-pty-permissions.js +75 -0
  161. package/scripts/record-demo.sh +279 -0
  162. package/scripts/setup-merge-queue.sh +170 -0
  163. package/scripts/test-install.sh +40 -0
  164. package/scripts/validate-templates.js +107 -0
  165. package/src/agent/agent-config.js +266 -0
  166. package/src/agent/agent-context-builder.js +189 -0
  167. package/src/agent/agent-context-sections.js +338 -0
  168. package/src/agent/agent-context-sources.js +147 -0
  169. package/src/agent/agent-hook-executor.js +721 -0
  170. package/src/agent/agent-input-injector.js +141 -0
  171. package/src/agent/agent-lifecycle.js +982 -0
  172. package/src/agent/agent-quality-gate-schema.js +93 -0
  173. package/src/agent/agent-quality-gates-context.js +51 -0
  174. package/src/agent/agent-stuck-detector.js +256 -0
  175. package/src/agent/agent-task-executor.js +2028 -0
  176. package/src/agent/agent-trigger-evaluator.js +67 -0
  177. package/src/agent/context-metrics.js +160 -0
  178. package/src/agent/context-pack-builder.js +367 -0
  179. package/src/agent/context-replay-policy.js +51 -0
  180. package/src/agent/guidance-queue.js +77 -0
  181. package/src/agent/output-extraction.js +367 -0
  182. package/src/agent/output-reformatter.js +175 -0
  183. package/src/agent/pr-verification.js +653 -0
  184. package/src/agent/rate-limit-backoff.js +82 -0
  185. package/src/agent/schema-utils.js +146 -0
  186. package/src/agent/validation-platform.js +35 -0
  187. package/src/agent-cli-provider/adapters/claude-parser.ts +133 -0
  188. package/src/agent-cli-provider/adapters/claude-recovery.ts +203 -0
  189. package/src/agent-cli-provider/adapters/claude.ts +247 -0
  190. package/src/agent-cli-provider/adapters/codex-parser.ts +211 -0
  191. package/src/agent-cli-provider/adapters/codex.ts +217 -0
  192. package/src/agent-cli-provider/adapters/common.ts +124 -0
  193. package/src/agent-cli-provider/adapters/gemini.ts +243 -0
  194. package/src/agent-cli-provider/adapters/index.ts +126 -0
  195. package/src/agent-cli-provider/adapters/opencode.ts +286 -0
  196. package/src/agent-cli-provider/contract-actions.ts +150 -0
  197. package/src/agent-cli-provider/contract-env.ts +111 -0
  198. package/src/agent-cli-provider/contract-envelope.ts +110 -0
  199. package/src/agent-cli-provider/contract-errors.ts +66 -0
  200. package/src/agent-cli-provider/contract-fallback.ts +121 -0
  201. package/src/agent-cli-provider/contract-invoke.ts +104 -0
  202. package/src/agent-cli-provider/contract-options.ts +173 -0
  203. package/src/agent-cli-provider/contract-parse.ts +94 -0
  204. package/src/agent-cli-provider/contract-support.ts +167 -0
  205. package/src/agent-cli-provider/contract.ts +56 -0
  206. package/src/agent-cli-provider/env-safety.ts +82 -0
  207. package/src/agent-cli-provider/errors.ts +122 -0
  208. package/src/agent-cli-provider/executable.ts +24 -0
  209. package/src/agent-cli-provider/index.ts +83 -0
  210. package/src/agent-cli-provider/invoke-evidence.ts +18 -0
  211. package/src/agent-cli-provider/json.ts +114 -0
  212. package/src/agent-cli-provider/log-prefix.ts +20 -0
  213. package/src/agent-cli-provider/process-runner.ts +145 -0
  214. package/src/agent-cli-provider/redaction.ts +282 -0
  215. package/src/agent-cli-provider/schema.ts +115 -0
  216. package/src/agent-cli-provider/single-agent-runtime.ts +311 -0
  217. package/src/agent-cli-provider/types.ts +237 -0
  218. package/src/agent-wrapper.js +615 -0
  219. package/src/agents/git-pusher-template.js +705 -0
  220. package/src/attach/attach-client.js +438 -0
  221. package/src/attach/attach-server.js +543 -0
  222. package/src/attach/index.js +37 -0
  223. package/src/attach/protocol.js +220 -0
  224. package/src/attach/ring-buffer.js +121 -0
  225. package/src/attach/send-input.js +88 -0
  226. package/src/attach/socket-discovery.js +267 -0
  227. package/src/claude-task-runner.js +661 -0
  228. package/src/config-router.js +89 -0
  229. package/src/config-validator.js +2202 -0
  230. package/src/copy-worker.js +43 -0
  231. package/src/guidance-topics.js +10 -0
  232. package/src/input-helpers.js +65 -0
  233. package/src/isolation-manager.js +1734 -0
  234. package/src/issue-providers/README.md +305 -0
  235. package/src/issue-providers/azure-devops-provider.js +307 -0
  236. package/src/issue-providers/base-provider.js +232 -0
  237. package/src/issue-providers/github-provider.js +210 -0
  238. package/src/issue-providers/gitlab-provider.js +262 -0
  239. package/src/issue-providers/index.js +196 -0
  240. package/src/issue-providers/jira-provider.js +260 -0
  241. package/src/ledger.js +692 -0
  242. package/src/lib/gc.js +232 -0
  243. package/src/lib/safe-exec.js +88 -0
  244. package/src/logic-engine.js +201 -0
  245. package/src/message-buffer.js +81 -0
  246. package/src/message-bus-bridge.js +144 -0
  247. package/src/message-bus.js +256 -0
  248. package/src/name-generator.js +232 -0
  249. package/src/orchestrator.js +3924 -0
  250. package/src/preflight.js +712 -0
  251. package/src/process-metrics.js +608 -0
  252. package/src/providers/anthropic/index.js +3 -0
  253. package/src/providers/base-provider.js +355 -0
  254. package/src/providers/capabilities.js +60 -0
  255. package/src/providers/google/index.js +3 -0
  256. package/src/providers/index.js +293 -0
  257. package/src/providers/openai/index.js +3 -0
  258. package/src/providers/opencode/index.js +3 -0
  259. package/src/quality-gates.js +143 -0
  260. package/src/schemas/sub-cluster.js +208 -0
  261. package/src/state-snapshot.js +398 -0
  262. package/src/state-snapshotter.js +142 -0
  263. package/src/status-footer.js +1026 -0
  264. package/src/sub-cluster-wrapper.js +693 -0
  265. package/src/task-runner.js +30 -0
  266. package/src/template-resolver.js +425 -0
  267. package/src/template-validation/index.js +338 -0
  268. package/src/template-validation/simulate-consensus-gates.js +324 -0
  269. package/src/template-validation/simulate-random-topology.js +541 -0
  270. package/src/template-validation/simulate-two-stage-validation.js +270 -0
  271. package/src/worktree-claude-config.js +135 -0
  272. package/src/worktree-tooling-env.js +150 -0
  273. package/task-lib/attachable-watcher.js +381 -0
  274. package/task-lib/commands/clean.js +50 -0
  275. package/task-lib/commands/episodes.js +105 -0
  276. package/task-lib/commands/get-log-path.js +23 -0
  277. package/task-lib/commands/kill.js +32 -0
  278. package/task-lib/commands/list.js +105 -0
  279. package/task-lib/commands/logs.js +439 -0
  280. package/task-lib/commands/resume.js +42 -0
  281. package/task-lib/commands/run.js +57 -0
  282. package/task-lib/commands/schedule.js +105 -0
  283. package/task-lib/commands/scheduler-cmd.js +96 -0
  284. package/task-lib/commands/schedules.js +148 -0
  285. package/task-lib/commands/status.js +44 -0
  286. package/task-lib/commands/unschedule.js +16 -0
  287. package/task-lib/completion.js +9 -0
  288. package/task-lib/config.js +11 -0
  289. package/task-lib/name-generator.js +230 -0
  290. package/task-lib/package.json +3 -0
  291. package/task-lib/provider-helper-runtime.js +29 -0
  292. package/task-lib/runner.js +190 -0
  293. package/task-lib/scheduler.js +252 -0
  294. package/task-lib/store.js +529 -0
  295. package/task-lib/watcher.js +305 -0
@@ -0,0 +1,230 @@
1
+ {
2
+ "name": "Worker + Validator",
3
+ "description": "Worker implements, validator checks, rejection loop. For SIMPLE tasks.",
4
+ "params": {
5
+ "worker_level": {
6
+ "type": "string",
7
+ "enum": ["level1", "level2", "level3"],
8
+ "default": "level2"
9
+ },
10
+ "validator_level": {
11
+ "type": "string",
12
+ "enum": ["level1", "level2", "level3"],
13
+ "default": "level3"
14
+ },
15
+ "max_iterations": {
16
+ "type": "number",
17
+ "default": 3
18
+ },
19
+ "max_tokens": {
20
+ "type": "number",
21
+ "default": 100000
22
+ },
23
+ "timeout": {
24
+ "type": "number",
25
+ "default": 0,
26
+ "description": "Task timeout in milliseconds (0 = no timeout)"
27
+ },
28
+ "task_type": {
29
+ "type": "string",
30
+ "enum": ["INQUIRY", "TASK", "DEBUG"],
31
+ "description": "Type of work"
32
+ }
33
+ },
34
+ "agents": [
35
+ {
36
+ "id": "worker",
37
+ "role": "implementation",
38
+ "modelLevel": "{{worker_level}}",
39
+ "timeout": "{{timeout}}",
40
+ "outputFormat": "json",
41
+ "jsonSchema": {
42
+ "type": "object",
43
+ "properties": {
44
+ "summary": {
45
+ "type": "string",
46
+ "description": "Brief description of work done this iteration"
47
+ },
48
+ "completionStatus": {
49
+ "type": "object",
50
+ "description": "Self-assessment of completion state",
51
+ "properties": {
52
+ "canValidate": {
53
+ "type": "boolean",
54
+ "description": "true if work is ready for validator review, false if more work needed"
55
+ },
56
+ "percentComplete": {
57
+ "type": "number",
58
+ "description": "Estimated completion percentage (0-100)"
59
+ },
60
+ "blockers": {
61
+ "type": "array",
62
+ "items": { "type": "string" },
63
+ "description": "Issues preventing completion (empty if canValidate=true)"
64
+ },
65
+ "nextSteps": {
66
+ "type": "array",
67
+ "items": { "type": "string" },
68
+ "description": "Remaining work items (empty if canValidate=true)"
69
+ }
70
+ },
71
+ "required": ["canValidate", "percentComplete"]
72
+ }
73
+ },
74
+ "required": ["summary", "completionStatus"]
75
+ },
76
+ "prompt": {
77
+ "system": "## 🚫 YOU CANNOT ASK QUESTIONS\n\nYou are running non-interactively. There is NO USER to answer.\n- NEVER use AskUserQuestion tool\n- NEVER say \"Should I...\" or \"Would you like...\"\n- When unsure: Make the SAFER choice and proceed.\n\nYou are an implementation agent for a SIMPLE {{task_type}} task.\n\n## FIRST ITERATION\n\n{{#if task_type == 'TASK'}}\nImplement the requested feature/change:\n- Well-defined scope (one feature, one fix)\n- Standard patterns apply\n- Complete the implementation fully\n{{/if}}\n\n{{#if task_type == 'DEBUG'}}\nInvestigate and fix the issue:\n- Reproduce the problem\n- Find the root cause (not just symptoms)\n- Apply the fix\n- Verify it works\n{{/if}}\n\n{{#if task_type == 'INQUIRY'}}\nResearch and provide detailed answers:\n- Explore relevant code and documentation\n- Explain how things work\n- Provide accurate, complete information\n{{/if}}\n\n## SUBSEQUENT ITERATIONS (after rejection)\n\nYou are being called back because validators REJECTED your implementation. This is NOT a minor issue.\n\n### FIX LIKE A SENIOR ENGINEER\n\n1. **STOP AND UNDERSTAND FIRST**\n - Read ALL VALIDATION_RESULT messages completely\n - Understand WHY each issue exists, not just WHAT it is\n - Trace the root cause - don't patch symptoms\n\n2. **FIX PROPERLY - NO SHORTCUTS**\n - Fix the ACTUAL problem, not the error message\n - If your approach was wrong, redesign it - don't add band-aids\n - Consider architectural implications of your fix\n - A senior dev would be embarrassed to submit a half-fix\n\n3. **VERIFY YOUR FIX**\n - Test your changes actually work\n - Check you didn't break anything else\n - If unsure, investigate before committing\n\n### MINDSET\n- Validators are senior engineers reviewing your code\n- They found REAL problems - take them seriously\n- Shortcuts will be caught and rejected again\n\n## 🔴 COMPLETION SELF-ASSESSMENT (REQUIRED)\n\nYour output MUST include a `completionStatus` object with honest self-assessment:\n\n**Set canValidate: true** when:\n- All work for this iteration is complete\n- Code compiles/runs without errors\n- You would be confident submitting for review\n\n**Set canValidate: false** when:\n- Work is partially complete\n- Blocked by an issue you're working around\n- Code doesn't compile or has obvious bugs\n\nValidators cost money. If you're not done, say so - your WORKER_PROGRESS message will let you continue."
78
+ },
79
+ "contextStrategy": {
80
+ "sources": [
81
+ {
82
+ "topic": "ISSUE_OPENED",
83
+ "priority": "required",
84
+ "strategy": "latest",
85
+ "amount": 1
86
+ },
87
+ {
88
+ "topic": "STATE_SNAPSHOT",
89
+ "priority": "required",
90
+ "strategy": "latest",
91
+ "amount": 1
92
+ },
93
+ {
94
+ "topic": "WORKER_PROGRESS",
95
+ "priority": "medium",
96
+ "since": "last_task_end",
97
+ "strategy": "latest",
98
+ "amount": 3
99
+ },
100
+ {
101
+ "topic": "VALIDATION_RESULT",
102
+ "priority": "high",
103
+ "since": "last_task_end",
104
+ "strategy": "latest",
105
+ "amount": 3
106
+ }
107
+ ],
108
+ "format": "chronological",
109
+ "maxTokens": "{{max_tokens}}"
110
+ },
111
+ "triggers": [
112
+ {
113
+ "topic": "ISSUE_OPENED",
114
+ "action": "execute_task"
115
+ },
116
+ {
117
+ "topic": "WORKER_PROGRESS",
118
+ "logic": {
119
+ "engine": "javascript",
120
+ "script": "return message.sender === 'worker';"
121
+ },
122
+ "action": "execute_task"
123
+ },
124
+ {
125
+ "topic": "VALIDATION_RESULT",
126
+ "logic": {
127
+ "engine": "javascript",
128
+ "script": "const lastPush = ledger.findLast({ topic: 'IMPLEMENTATION_READY' });\nif (!lastPush) return false;\nconst response = ledger.findLast({ topic: 'VALIDATION_RESULT', since: lastPush.timestamp });\nreturn response?.content?.data?.approved === false || response?.content?.data?.approved === 'false';"
129
+ },
130
+ "action": "execute_task"
131
+ }
132
+ ],
133
+ "hooks": {
134
+ "onComplete": {
135
+ "action": "publish_message",
136
+ "config": {
137
+ "topic": "IMPLEMENTATION_READY",
138
+ "content": {
139
+ "text": "{{result.summary}}",
140
+ "data": {
141
+ "completionStatus": "{{result.completionStatus}}"
142
+ }
143
+ }
144
+ },
145
+ "logic": {
146
+ "engine": "javascript",
147
+ "script": "if (!result.completionStatus?.canValidate) return { topic: 'WORKER_PROGRESS' };"
148
+ }
149
+ }
150
+ },
151
+ "maxIterations": "{{max_iterations}}"
152
+ },
153
+ {
154
+ "id": "validator",
155
+ "role": "validator",
156
+ "modelLevel": "{{validator_level}}",
157
+ "timeout": "{{timeout}}",
158
+ "outputFormat": "json",
159
+ "jsonSchema": {
160
+ "type": "object",
161
+ "properties": {
162
+ "approved": {
163
+ "type": "boolean",
164
+ "description": "true if implementation is correct"
165
+ },
166
+ "summary": {
167
+ "type": "string",
168
+ "description": "One-line validation result"
169
+ },
170
+ "errors": {
171
+ "type": "array",
172
+ "items": {
173
+ "type": "string"
174
+ },
175
+ "description": "Issues found (empty if approved)"
176
+ }
177
+ },
178
+ "required": ["approved", "summary", "errors"]
179
+ },
180
+ "prompt": {
181
+ "system": "## 🔴 OUTPUT FORMAT (CRITICAL - READ FIRST)\n\nYour output MUST be MINIMAL and STRUCTURED:\n- Output ONLY the required JSON schema fields\n- NO preambles (\"Here is my analysis...\", \"Let me explain...\")\n- NO verbose summaries - be CONCISE (max 100 chars per string field)\n- NO redundant information\n- NO explanations before or after the JSON\n\n## 🚫 YOU CANNOT ASK QUESTIONS\n\nYou are running non-interactively. There is NO USER to answer.\n- NEVER use AskUserQuestion tool\n- NEVER say \"Should I...\" or \"Would you like...\"\n- When unsure: Make the SAFER choice and proceed.\n\nYou are a validator for a SIMPLE {{task_type}} task.\n\n## 🔴 VERIFICATION PROTOCOL (REQUIRED - PREVENTS FALSE CLAIMS)\n\nBefore making ANY claim about missing functionality or code issues:\n\n1. **SEARCH FIRST** - Use Glob to find ALL relevant files\n2. **READ THE CODE** - Use Read to inspect actual implementation\n3. **GREP FOR PATTERNS** - Use Grep to search for specific code (function names, endpoints, etc.)\n\n**NEVER claim something doesn't exist without FIRST searching for it.**\n\nThe worker may have implemented features in different files than originally planned. If you claim '/api/metrics endpoint is missing' without searching, you may miss that it exists in 'server/routes/health.ts' instead of 'server/routes/api.ts'.\n\n### Example Verification Flow:\n```\n1. Claim: 'Missing error handling for network failures'\n2. BEFORE claiming → Grep for 'catch', 'error', 'try' in relevant files\n3. BEFORE claiming → Read the actual implementation\n4. ONLY IF NOT FOUND → Add to errors array\n```\n\n## 🔴 CLEAN DESIGN CHECK (CRITICAL)\nUnless the issue EXPLICITLY requests backwards compatibility, REJECT any of these:\n- Old function/class kept alongside new one (\"deprecated but still works\") → REJECT. Delete old, update ALL callers.\n- Re-exports or wrappers forwarding to new implementation → REJECT. Update imports at call sites.\n- `_unused` parameter renames to preserve old signatures → REJECT. Change the signature, update callers.\n- Fallback paths handling \"old format\" or \"legacy data\" → REJECT. Migrate the data, remove the fallback.\n- Comments like \"kept for backwards compatibility\" → REJECT. Remove the old code.\n- Feature flags toggling between old and new behavior → REJECT. Ship the new behavior. Delete the old.\n\nThe CLEAN solution: delete the old, update all callers, ship only the current implementation.\n\n## VALIDATION CRITERIA\n\n**APPROVE** if:\n- Core functionality works as requested\n- Implementation is correct and complete\n- No obvious bugs or critical issues\n- No backwards compatibility cruft (unless issue explicitly requests it)\n\n**REJECT** if:\n- Major functionality is missing or broken (VERIFIED by searching)\n- Implementation doesn't match requirements (VERIFIED by reading code)\n- Critical bugs present (VERIFIED by inspection)\n- Backwards compatibility shims, legacy wrappers, or deprecation patterns present (see CLEAN DESIGN CHECK)\n\n## TASK TYPE: {{task_type}}\n\n{{#if task_type == 'TASK'}}\nVerify the feature/change works correctly.\n{{/if}}\n\n{{#if task_type == 'DEBUG'}}\nVerify the bug is actually fixed at root cause.\n{{/if}}\n\n{{#if task_type == 'INQUIRY'}}\nVerify the information is accurate and complete.\n{{/if}}\n\nFor SIMPLE tasks, don't nitpick. Focus on: Does it work and meet requirements?\n\n## 🔴 DEBUGGING METHODOLOGY CHECK\n\nBefore approving, verify the worker didn't take shortcuts:\n\n### Ad Hoc Fix Detection\n- Did worker fix ONE instance? → Grep for similar patterns. If N > 1 exists, REJECT.\n- Example: Fixed null check in `auth.ts:42`? → `grep -r \"similar pattern\" .` - are there others?\n\n### Root Cause vs Symptom\n- Did worker add a workaround? → Find the ACTUAL bug. If workaround hides real issue, REJECT.\n- Example: Added `|| []` fallback? → WHY is it undefined? Fix THAT.\n\n### Lazy Debugging Red Flags (INSTANT REJECT)\n- Worker suggests \"restart the service\" → REJECT (hides the bug)\n- Worker suggests \"clear the cache\" → REJECT (hides the bug)\n- Worker says \"works on my machine\" → REJECT (not a fix)\n- Worker blames the test → REJECT unless they PROVE test is wrong with evidence"
182
+ },
183
+ "contextStrategy": {
184
+ "sources": [
185
+ {
186
+ "topic": "ISSUE_OPENED",
187
+ "priority": "required",
188
+ "strategy": "latest",
189
+ "amount": 1
190
+ },
191
+ {
192
+ "topic": "STATE_SNAPSHOT",
193
+ "priority": "required",
194
+ "strategy": "latest",
195
+ "amount": 1
196
+ },
197
+ {
198
+ "topic": "IMPLEMENTATION_READY",
199
+ "priority": "high",
200
+ "strategy": "latest",
201
+ "amount": 1
202
+ }
203
+ ],
204
+ "format": "chronological",
205
+ "maxTokens": "{{max_tokens}}"
206
+ },
207
+ "triggers": [
208
+ {
209
+ "topic": "IMPLEMENTATION_READY",
210
+ "action": "execute_task"
211
+ }
212
+ ],
213
+ "hooks": {
214
+ "onComplete": {
215
+ "action": "publish_message",
216
+ "config": {
217
+ "topic": "VALIDATION_RESULT",
218
+ "content": {
219
+ "text": "{{result.summary}}",
220
+ "data": {
221
+ "approved": "{{result.approved}}",
222
+ "errors": "{{result.errors}}"
223
+ }
224
+ }
225
+ }
226
+ }
227
+ }
228
+ }
229
+ ]
230
+ }
@@ -0,0 +1,130 @@
1
+ {
2
+ "name": "Two-Tier Conductor (Complexity × TaskType)",
3
+ "description": "Cost-optimized conductor: level1 junior for 2D classification (complexity + taskType), level2 senior for UNCERTAIN tasks. Routes to appropriate cluster config via helpers.getConfig().",
4
+ "agents": [
5
+ {
6
+ "id": "junior-conductor",
7
+ "role": "conductor",
8
+ "modelLevel": "level2",
9
+ "useDirectApi": true,
10
+ "outputFormat": "json",
11
+ "jsonSchema": {
12
+ "type": "object",
13
+ "properties": {
14
+ "complexity": {
15
+ "type": "string",
16
+ "enum": ["TRIVIAL", "SIMPLE", "STANDARD", "CRITICAL", "UNCERTAIN"],
17
+ "description": "Task complexity level"
18
+ },
19
+ "taskType": {
20
+ "type": "string",
21
+ "enum": ["INQUIRY", "TASK", "DEBUG"],
22
+ "description": "Type of work: INQUIRY (read-only), TASK (implement / known fix), DEBUG (investigate unknown root cause)"
23
+ },
24
+ "reasoning": {
25
+ "type": "string",
26
+ "description": "Why this classification (1-2 sentences)"
27
+ }
28
+ },
29
+ "required": ["complexity", "taskType", "reasoning"]
30
+ },
31
+ "prompt": {
32
+ "system": "You are the JUNIOR CONDUCTOR - fast task classification.\n\n## Your Job\nClassify the task on TWO dimensions.\n\n## 🔴 COST REMINDER\n- CRITICAL uses Opus ($15/M tokens) + 4 validators = EXPENSIVE\n- STANDARD uses Sonnet ($3/M tokens) + 2 validators = NORMAL\n- Don't waste money on false positives. CRITICAL is rare.\n\n## COMPLEXITY (pick ONE)\n- TRIVIAL - One file, mechanical change; no behavior change.\n- SIMPLE - Small change, 1-2 files, low risk.\n- STANDARD - Multi-file work or user-visible behavior. **DEFAULT CHOICE.**\n- CRITICAL - ONLY when code DIRECTLY modifies: (1) authentication/authorization LOGIC, (2) payment processing/billing calculations, (3) secrets/credentials handling, (4) destructive database operations (DROP, DELETE), (5) production deployment or live infrastructure, (6) PII processing (not just displaying it).\n- UNCERTAIN - Escalate to senior conductor.\n\n**🔴 BIAS: If unsure between STANDARD and CRITICAL, choose STANDARD.** CRITICAL is expensive. Reserve it for actual risk.\n\n## NOT CRITICAL (Common False Positives)\n\nThese are STANDARD, not CRITICAL:\n- Refactoring code that MENTIONS auth/billing/security (not MODIFYING the logic)\n- Adding TypeScript types for existing structures\n- Code cleanup in infra-related files\n- Read-only queries to production data\n- Tests for auth/billing code (tests don't touch prod)\n- Extracting modules or services (code organization)\n- Factory patterns, dependency injection (architecture)\n- Config file reorganization (not production config values)\n\n## TASK TYPE (pick ONE)\n- INQUIRY - Questions, exploration, read-only\n- TASK - Implement something new\n- DEBUG - Fix something broken\n\n## Examples\n\nTask: \"Explain current auth flow (read-only)\"\n```json\n{\"complexity\": \"SIMPLE\", \"taskType\": \"INQUIRY\", \"reasoning\": \"Read-only explanation\"}\n```\n\nTask: \"Refactor auth service into smaller modules\"\n```json\n{\"complexity\": \"STANDARD\", \"taskType\": \"TASK\", \"reasoning\": \"Refactoring code organization, not modifying auth logic\"}\n```\n\nTask: \"Add TypeScript types to payment types\"\n```json\n{\"complexity\": \"STANDARD\", \"taskType\": \"TASK\", \"reasoning\": \"Adding types, not modifying billing logic\"}\n```\n\nTask: \"Fix bug in password validation logic\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"DEBUG\", \"reasoning\": \"Directly modifying authentication logic\"}\n```\n\nTask: \"Add new payment method integration\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"TASK\", \"reasoning\": \"New billing/payment processing code\"}\n```\n\nTask: \"Rotate production API keys\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"TASK\", \"reasoning\": \"Modifying production secrets\"}\n```\n\nTask: \"DROP TABLE users migration\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"TASK\", \"reasoning\": \"Destructive database operation\"}\n```\n\n## Critical Rules\n1. Output ONLY valid JSON - no other text\n2. complexity must be EXACTLY one of: TRIVIAL, SIMPLE, STANDARD, CRITICAL, UNCERTAIN\n3. taskType must be EXACTLY one of: INQUIRY, TASK, DEBUG\n\nTask: {{ISSUE_OPENED.content.text}}"
33
+ },
34
+ "contextStrategy": {
35
+ "sources": [
36
+ { "topic": "ISSUE_OPENED", "priority": "required", "strategy": "latest", "amount": 1 }
37
+ ],
38
+ "format": "chronological",
39
+ "maxTokens": 100000
40
+ },
41
+ "triggers": [
42
+ {
43
+ "topic": "ISSUE_OPENED",
44
+ "logic": {
45
+ "engine": "javascript",
46
+ "script": "return message.sender === 'system' && !message.metadata?._republished;"
47
+ },
48
+ "action": "execute_task"
49
+ }
50
+ ],
51
+ "hooks": {
52
+ "onComplete": {
53
+ "action": "publish_message",
54
+ "transform": {
55
+ "engine": "javascript",
56
+ "script": "const { complexity, taskType, reasoning } = result;\nconst taskText = triggeringMessage.content?.text || '';\n\nif (complexity === 'UNCERTAIN') {\n return {\n topic: 'CONDUCTOR_ESCALATE',\n content: {\n text: reasoning,\n data: { complexity, taskType, reasoning, taskText }\n }\n };\n}\n\nconst config = helpers.getConfig(complexity, taskType);\n\nreturn {\n topic: 'CLUSTER_OPERATIONS',\n content: {\n text: `[${complexity}:${taskType}] ${reasoning}`,\n data: {\n complexity,\n taskType,\n operations: [\n { action: 'load_config', config },\n { action: 'publish', topic: 'ISSUE_OPENED', content: { text: taskText }, metadata: { _republished: true } }\n ]\n }\n }\n};"
57
+ }
58
+ }
59
+ }
60
+ },
61
+ {
62
+ "id": "senior-conductor",
63
+ "role": "conductor",
64
+ "modelLevel": "level3",
65
+ "useDirectApi": true,
66
+ "outputFormat": "json",
67
+ "jsonSchema": {
68
+ "type": "object",
69
+ "properties": {
70
+ "complexity": {
71
+ "type": "string",
72
+ "enum": ["TRIVIAL", "SIMPLE", "STANDARD", "CRITICAL"],
73
+ "description": "Task complexity (no UNCERTAIN - must decide)"
74
+ },
75
+ "taskType": {
76
+ "type": "string",
77
+ "enum": ["INQUIRY", "TASK", "DEBUG"],
78
+ "description": "Type of work after analysis (INQUIRY/TASK/DEBUG)"
79
+ },
80
+ "reasoning": {
81
+ "type": "string",
82
+ "description": "Detailed explanation"
83
+ }
84
+ },
85
+ "required": ["complexity", "taskType", "reasoning"]
86
+ },
87
+ "prompt": {
88
+ "system": "You are the SENIOR CONDUCTOR - expert task analyzer.\n\nThe junior conductor was uncertain. Make a definitive classification.\n\n## 🔴 COST REMINDER\n- CRITICAL uses Opus ($15/M tokens) + 4 validators = EXPENSIVE\n- STANDARD uses Sonnet ($3/M tokens) + 2 validators = NORMAL\n- Don't waste money on false positives.\n\n## COMPLEXITY (pick ONE - no UNCERTAIN allowed)\n- TRIVIAL - One file, mechanical change; no behavior change.\n- SIMPLE - Small change, 1-2 files, low risk.\n- STANDARD - Multi-file work or user-visible behavior. **DEFAULT CHOICE.**\n- CRITICAL - ONLY when code DIRECTLY modifies: (1) authentication/authorization LOGIC, (2) payment processing/billing calculations, (3) secrets/credentials handling, (4) destructive database operations (DROP, DELETE), (5) production deployment or live infrastructure, (6) PII processing.\n\n**🔴 BIAS: If unsure between STANDARD and CRITICAL, choose STANDARD.** CRITICAL is expensive.\n\n## NOT CRITICAL (Common False Positives)\n- Refactoring code that MENTIONS auth/billing/security (not MODIFYING the logic)\n- Adding TypeScript types, tests, code organization\n- Read-only queries, config reorganization\n- Factory patterns, dependency injection\n\n## TASK TYPE (pick ONE)\n- INQUIRY - Questions, exploration (read-only)\n- TASK - Implement something new\n- DEBUG - Fix something broken\n\n## Examples\n\nTask: \"Refactor auth service into smaller modules\"\n```json\n{\"complexity\": \"STANDARD\", \"taskType\": \"TASK\", \"reasoning\": \"Code refactor, not modifying auth logic\"}\n```\n\nTask: \"Fix bug in password validation\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"DEBUG\", \"reasoning\": \"Directly modifying auth logic\"}\n```\n\nTask: \"Add payment method\"\n```json\n{\"complexity\": \"CRITICAL\", \"taskType\": \"TASK\", \"reasoning\": \"New billing code\"}\n```\n\n## Rules\n1. Output ONLY valid JSON - no other text\n2. YOU MUST DECIDE - pick exactly one value for each field\n3. When unsure between STANDARD and CRITICAL → STANDARD\n\nJunior was uncertain. Original task follows."
89
+ },
90
+ "contextStrategy": {
91
+ "sources": [
92
+ { "topic": "ISSUE_OPENED", "priority": "required", "strategy": "latest", "amount": 1 },
93
+ {
94
+ "topic": "CONDUCTOR_ESCALATE",
95
+ "priority": "high",
96
+ "since": "last_agent_start",
97
+ "strategy": "latest",
98
+ "amount": 1
99
+ },
100
+ {
101
+ "topic": "CLUSTER_OPERATIONS_VALIDATION_FAILED",
102
+ "priority": "high",
103
+ "since": "cluster_start",
104
+ "strategy": "latest",
105
+ "amount": 3
106
+ }
107
+ ],
108
+ "format": "chronological",
109
+ "maxTokens": 100000
110
+ },
111
+ "maxRetries": 3,
112
+ "triggers": [
113
+ { "topic": "CONDUCTOR_ESCALATE", "action": "execute_task" },
114
+ {
115
+ "topic": "CLUSTER_OPERATIONS_VALIDATION_FAILED",
116
+ "action": "execute_task"
117
+ }
118
+ ],
119
+ "hooks": {
120
+ "onComplete": {
121
+ "action": "publish_message",
122
+ "transform": {
123
+ "engine": "javascript",
124
+ "script": "const { complexity, taskType, reasoning } = result;\n\nlet taskText = triggeringMessage.content?.data?.taskText || '';\nif (!taskText) {\n taskText = triggeringMessage.content?.text || '';\n}\n\nconst config = helpers.getConfig(complexity, taskType);\n\nreturn {\n topic: 'CLUSTER_OPERATIONS',\n content: {\n text: `Senior: [${complexity}:${taskType}] ${reasoning}`,\n data: {\n complexity,\n taskType,\n operations: [\n { action: 'load_config', config },\n { action: 'publish', topic: 'ISSUE_OPENED', content: { text: taskText }, metadata: { _republished: true } }\n ]\n }\n }\n};"
125
+ }
126
+ }
127
+ }
128
+ }
129
+ ]
130
+ }
@@ -0,0 +1,153 @@
1
+ # Base image for vibe cluster isolation mode
2
+ # Provides: Node.js, Python, Git, Chromium, Claude CLI, Playwright deps, Infrastructure tools
3
+ #
4
+ # Build: docker build -t vibe-cluster-base vibe/cluster/docker/vibe-cluster/
5
+ # Usage: zeroshot run <task> --docker
6
+
7
+ FROM node:20-slim
8
+
9
+ # Upgrade npm to fix Arborist isDescendantOf bug (npm 10.x crash on complex peer deps)
10
+ # See: https://github.com/npm/cli/issues/7682
11
+ RUN npm install -g npm@latest
12
+
13
+ # Version pinning for infrastructure tools
14
+ ARG AWS_CLI_VERSION=2.15.10
15
+ ARG TERRAFORM_VERSION=1.6.6
16
+ ARG KUBECTL_VERSION=1.29.0
17
+ ARG HELM_VERSION=3.13.3
18
+ ARG INFRACOST_VERSION=0.10.32
19
+ ARG TFLINT_VERSION=0.50.0
20
+ ARG TFSEC_VERSION=1.28.4
21
+ ARG CLAUDE_CODE_VERSION=2.1.20
22
+
23
+ # Install system dependencies for e2e testing and development
24
+ RUN apt-get update && apt-get install -y --no-install-recommends \
25
+ git \
26
+ curl \
27
+ # Build tools for native modules (node-gyp needs make, gcc, g++)
28
+ build-essential \
29
+ python3-dev \
30
+ ca-certificates \
31
+ gnupg \
32
+ unzip \
33
+ # Docker for starting services
34
+ docker.io \
35
+ docker-compose \
36
+ # Python for general development
37
+ python3 \
38
+ python3-pip \
39
+ python3-venv \
40
+ # Chromium dependencies
41
+ chromium \
42
+ fonts-liberation \
43
+ libasound2 \
44
+ libatk-bridge2.0-0 \
45
+ libatk1.0-0 \
46
+ libcups2 \
47
+ libdbus-1-3 \
48
+ libdrm2 \
49
+ libgbm1 \
50
+ libgtk-3-0 \
51
+ libnspr4 \
52
+ libnss3 \
53
+ libx11-xcb1 \
54
+ libxcomposite1 \
55
+ libxdamage1 \
56
+ libxfixes3 \
57
+ libxrandr2 \
58
+ xdg-utils \
59
+ && rm -rf /var/lib/apt/lists/* \
60
+ # Create python symlink for compatibility
61
+ && ln -sf /usr/bin/python3 /usr/bin/python
62
+
63
+ # Install GitHub CLI for git authentication
64
+ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
65
+ && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
66
+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
67
+ && apt-get update && apt-get install -y gh \
68
+ && rm -rf /var/lib/apt/lists/*
69
+
70
+ # Install infrastructure tools
71
+ # AWS CLI v2
72
+ RUN curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION}.zip" -o /tmp/awscliv2.zip \
73
+ && unzip -q /tmp/awscliv2.zip -d /tmp \
74
+ && /tmp/aws/install \
75
+ && rm -rf /tmp/awscliv2.zip /tmp/aws
76
+
77
+ # Terraform
78
+ RUN curl -fsSL "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" -o /tmp/terraform.zip \
79
+ && unzip -q /tmp/terraform.zip -d /usr/local/bin \
80
+ && chmod +x /usr/local/bin/terraform \
81
+ && rm /tmp/terraform.zip
82
+
83
+ # kubectl
84
+ RUN curl -fsSL "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
85
+ && chmod +x /usr/local/bin/kubectl
86
+
87
+ # Helm
88
+ RUN curl -fsSL "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" -o /tmp/helm.tar.gz \
89
+ && tar -xzf /tmp/helm.tar.gz -C /tmp \
90
+ && mv /tmp/linux-amd64/helm /usr/local/bin/helm \
91
+ && chmod +x /usr/local/bin/helm \
92
+ && rm -rf /tmp/helm.tar.gz /tmp/linux-amd64
93
+
94
+ # infracost (cost estimation)
95
+ RUN curl -fsSL "https://github.com/infracost/infracost/releases/download/v${INFRACOST_VERSION}/infracost-linux-amd64.tar.gz" -o /tmp/infracost.tar.gz \
96
+ && tar -xzf /tmp/infracost.tar.gz -C /tmp \
97
+ && mv /tmp/infracost-linux-amd64 /usr/local/bin/infracost \
98
+ && chmod +x /usr/local/bin/infracost \
99
+ && rm /tmp/infracost.tar.gz
100
+
101
+ # tflint (terraform linter)
102
+ RUN curl -fsSL "https://github.com/terraform-linters/tflint/releases/download/v${TFLINT_VERSION}/tflint_linux_amd64.zip" -o /tmp/tflint.zip \
103
+ && unzip -q /tmp/tflint.zip -d /usr/local/bin \
104
+ && chmod +x /usr/local/bin/tflint \
105
+ && rm /tmp/tflint.zip
106
+
107
+ # tfsec (security scanner)
108
+ RUN curl -fsSL "https://github.com/aquasecurity/tfsec/releases/download/v${TFSEC_VERSION}/tfsec-linux-amd64" -o /usr/local/bin/tfsec \
109
+ && chmod +x /usr/local/bin/tfsec
110
+
111
+ # Set AWS_PAGER to empty to disable paging in AWS CLI
112
+ ENV AWS_PAGER=""
113
+
114
+ # Set Chromium path for Playwright
115
+ ENV CHROME_BIN=/usr/bin/chromium
116
+ ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
117
+
118
+ # Copy zeroshot source into container and install globally
119
+ # CRITICAL: This enables isolation mode to use 'zeroshot task run' inside container
120
+ # which provides timeout, error handling, and log streaming infrastructure
121
+ COPY --chown=node:node . /tmp/zeroshot/
122
+ RUN cd /tmp/zeroshot && npm install && npm link
123
+
124
+ # Pre-bake common npm dependencies (Issue #20: 30-40% startup reduction)
125
+ # These are installed once at image build time, then copied to workspaces at runtime
126
+ # if the project's dependencies are satisfied by the pre-baked set.
127
+ COPY docker/zeroshot-cluster/pre-baked-deps.json /pre-baked-deps/package.json
128
+ RUN cd /pre-baked-deps && npm install --ignore-scripts \
129
+ && chown -R node:node /pre-baked-deps
130
+
131
+ # Install Claude CLI globally (version pinned via ARG)
132
+ RUN npm install -g @anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}
133
+
134
+ # Install Playwright (uses system Chromium)
135
+ RUN npx playwright install-deps chromium 2>/dev/null || true
136
+
137
+ # Add node user to docker group for Docker socket access
138
+ RUN groupadd -f docker && usermod -aG docker node
139
+
140
+ # Use existing 'node' user from base image (uid 1000)
141
+ # Create directories with proper ownership for Claude CLI
142
+ RUN mkdir -p /home/node/.claude /home/node/.config/gh \
143
+ && chown -R node:node /home/node
144
+
145
+ # Create workspace directory with node ownership
146
+ RUN mkdir -p /workspace && chown node:node /workspace
147
+ WORKDIR /workspace
148
+
149
+ # Switch to non-root user (required for --dangerously-skip-permissions)
150
+ USER node
151
+
152
+ # Default command (overridden by vibe)
153
+ CMD ["bash"]
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "pre-baked-deps",
3
+ "version": "1.0.0",
4
+ "description": "Pre-baked npm dependencies for zeroshot isolation containers",
5
+ "private": true,
6
+ "dependencies": {
7
+ "typescript": "^5.3.0",
8
+ "eslint": "^8.56.0",
9
+ "@typescript-eslint/parser": "^6.19.0",
10
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
11
+ "prettier": "^3.2.0",
12
+ "jest": "^29.7.0",
13
+ "@types/jest": "^29.5.0",
14
+ "ts-jest": "^29.1.0",
15
+ "@types/node": "^20.11.0",
16
+ "tsx": "^4.7.0",
17
+ "esbuild": "^0.19.0",
18
+ "dotenv": "^16.4.0",
19
+ "glob": "^10.3.0",
20
+ "chalk": "^5.3.0",
21
+ "commander": "^12.0.0",
22
+ "axios": "^1.6.0",
23
+ "node-fetch": "^3.3.0",
24
+ "zod": "^3.22.0",
25
+ "lodash": "^4.17.0",
26
+ "@types/lodash": "^4.14.0"
27
+ }
28
+ }
@@ -0,0 +1,3 @@
1
+ import type { ProviderParseResult } from '../types';
2
+ export declare function parseClaudeEvent(line: string): ProviderParseResult;
3
+ //# sourceMappingURL=claude-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-parser.d.ts","sourceRoot":"","sources":["../../../src/agent-cli-provider/adapters/claude-parser.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAe,mBAAmB,EAAe,MAAM,UAAU,CAAC;AAuG9E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAmBlE"}