@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
@@ -1,63 +0,0 @@
1
- {
2
- "name": "Single Worker",
3
- "description": "One agent executes and completes. For TRIVIAL tasks and simple INQUIRY.",
4
- "params": {
5
- "worker_level": {
6
- "type": "string",
7
- "enum": ["level1", "level2", "level3"],
8
- "default": "level1"
9
- },
10
- "max_tokens": {
11
- "type": "number",
12
- "default": 50000
13
- },
14
- "timeout": {
15
- "type": "number",
16
- "default": 0,
17
- "description": "Task timeout in milliseconds (0 = no timeout)"
18
- },
19
- "task_type": {
20
- "type": "string",
21
- "enum": ["INQUIRY", "TASK", "DEBUG"],
22
- "description": "Type of work"
23
- }
24
- },
25
- "agents": [
26
- {
27
- "id": "worker",
28
- "role": "implementation",
29
- "modelLevel": "{{worker_level}}",
30
- "timeout": "{{timeout}}",
31
- "prompt": {
32
- "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 agent handling a {{task_type}} task.\n\n## TASK TYPE: {{task_type}}\n\n{{#if task_type == 'INQUIRY'}}\nThis is an INQUIRY - exploration and understanding only.\n- Answer questions about the codebase\n- Explore files and explain how things work\n- DO NOT make any changes\n- Provide clear, accurate information\n{{/if}}\n\n{{#if task_type == 'TASK'}}\nThis is a TRIVIAL TASK - quick execution.\n- Straightforward, well-defined action\n- Quick to complete (< 15 minutes)\n- Low risk of breaking existing functionality\n- Execute efficiently, verify it works, done\n{{/if}}\n\n{{#if task_type == 'DEBUG'}}\nThis is a TRIVIAL DEBUG - simple fix.\n- Obvious issue with clear solution\n- Fix the root cause, not symptoms\n- Verify the fix works\n{{/if}}"
33
- },
34
- "contextStrategy": {
35
- "sources": [
36
- {
37
- "topic": "ISSUE_OPENED",
38
- "limit": 1
39
- }
40
- ],
41
- "format": "chronological",
42
- "maxTokens": "{{max_tokens}}"
43
- },
44
- "triggers": [
45
- {
46
- "topic": "ISSUE_OPENED",
47
- "action": "execute_task"
48
- }
49
- ],
50
- "hooks": {
51
- "onComplete": {
52
- "action": "publish_message",
53
- "config": {
54
- "topic": "CLUSTER_COMPLETE",
55
- "content": {
56
- "text": "Task completed."
57
- }
58
- }
59
- }
60
- }
61
- }
62
- ]
63
- }
@@ -1,152 +0,0 @@
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": "level2"
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
- "prompt": {
41
- "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"
42
- },
43
- "contextStrategy": {
44
- "sources": [
45
- {
46
- "topic": "ISSUE_OPENED",
47
- "limit": 1
48
- },
49
- {
50
- "topic": "VALIDATION_RESULT",
51
- "since": "last_task_end",
52
- "limit": 3
53
- }
54
- ],
55
- "format": "chronological",
56
- "maxTokens": "{{max_tokens}}"
57
- },
58
- "triggers": [
59
- {
60
- "topic": "ISSUE_OPENED",
61
- "action": "execute_task"
62
- },
63
- {
64
- "topic": "VALIDATION_RESULT",
65
- "logic": {
66
- "engine": "javascript",
67
- "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';"
68
- },
69
- "action": "execute_task"
70
- }
71
- ],
72
- "hooks": {
73
- "onComplete": {
74
- "action": "publish_message",
75
- "config": {
76
- "topic": "IMPLEMENTATION_READY",
77
- "content": {
78
- "text": "Implementation complete. Ready for validation."
79
- }
80
- }
81
- }
82
- },
83
- "maxIterations": "{{max_iterations}}"
84
- },
85
- {
86
- "id": "validator",
87
- "role": "validator",
88
- "modelLevel": "{{validator_level}}",
89
- "timeout": "{{timeout}}",
90
- "outputFormat": "json",
91
- "jsonSchema": {
92
- "type": "object",
93
- "properties": {
94
- "approved": {
95
- "type": "boolean",
96
- "description": "true if implementation is correct"
97
- },
98
- "summary": {
99
- "type": "string",
100
- "description": "One-line validation result"
101
- },
102
- "errors": {
103
- "type": "array",
104
- "items": {
105
- "type": "string"
106
- },
107
- "description": "Issues found (empty if approved)"
108
- }
109
- },
110
- "required": ["approved", "summary", "errors"]
111
- },
112
- "prompt": {
113
- "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 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## 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\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\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"
114
- },
115
- "contextStrategy": {
116
- "sources": [
117
- {
118
- "topic": "ISSUE_OPENED",
119
- "limit": 1
120
- },
121
- {
122
- "topic": "IMPLEMENTATION_READY",
123
- "limit": 1
124
- }
125
- ],
126
- "format": "chronological",
127
- "maxTokens": "{{max_tokens}}"
128
- },
129
- "triggers": [
130
- {
131
- "topic": "IMPLEMENTATION_READY",
132
- "action": "execute_task"
133
- }
134
- ],
135
- "hooks": {
136
- "onComplete": {
137
- "action": "publish_message",
138
- "config": {
139
- "topic": "VALIDATION_RESULT",
140
- "content": {
141
- "text": "{{result.summary}}",
142
- "data": {
143
- "approved": "{{result.approved}}",
144
- "errors": "{{result.errors}}"
145
- }
146
- }
147
- }
148
- }
149
- }
150
- }
151
- ]
152
- }
@@ -1,124 +0,0 @@
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": "level1",
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 (questions/exploration), TASK (implement new), DEBUG (fix broken)"
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## COMPLEXITY (pick ONE)\n- TRIVIAL - One command, one file, mechanical\n- SIMPLE - One concern, straightforward\n- STANDARD - Multi-file, needs planning\n- CRITICAL - High risk (auth, payments, security, production)\n- UNCERTAIN - Escalate to senior conductor\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: \"How does auth work?\"\n```json\n{\"complexity\": \"SIMPLE\", \"taskType\": \"INQUIRY\", \"reasoning\": \"Asking about existing code\"}\n```\n\nTask: \"Add rate limiting\"\n```json\n{\"complexity\": \"STANDARD\", \"taskType\": \"TASK\", \"reasoning\": \"New feature, multiple files\"}\n```\n\nTask: \"Fix null pointer bug\"\n```json\n{\"complexity\": \"SIMPLE\", \"taskType\": \"DEBUG\", \"reasoning\": \"Fixing broken code\"}\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": [{ "topic": "ISSUE_OPENED", "limit": 1 }],
36
- "format": "chronological",
37
- "maxTokens": 100000
38
- },
39
- "triggers": [
40
- {
41
- "topic": "ISSUE_OPENED",
42
- "logic": {
43
- "engine": "javascript",
44
- "script": "return message.sender === 'system' && !message.metadata?._republished;"
45
- },
46
- "action": "execute_task"
47
- }
48
- ],
49
- "hooks": {
50
- "onComplete": {
51
- "action": "publish_message",
52
- "transform": {
53
- "engine": "javascript",
54
- "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};"
55
- }
56
- }
57
- }
58
- },
59
- {
60
- "id": "senior-conductor",
61
- "role": "conductor",
62
- "modelLevel": "level2",
63
- "useDirectApi": true,
64
- "outputFormat": "json",
65
- "jsonSchema": {
66
- "type": "object",
67
- "properties": {
68
- "complexity": {
69
- "type": "string",
70
- "enum": ["TRIVIAL", "SIMPLE", "STANDARD", "CRITICAL"],
71
- "description": "Task complexity (no UNCERTAIN - must decide)"
72
- },
73
- "taskType": {
74
- "type": "string",
75
- "enum": ["INQUIRY", "TASK", "DEBUG"],
76
- "description": "Type of work after analysis"
77
- },
78
- "reasoning": {
79
- "type": "string",
80
- "description": "Detailed explanation"
81
- }
82
- },
83
- "required": ["complexity", "taskType", "reasoning"]
84
- },
85
- "prompt": {
86
- "system": "You are the SENIOR CONDUCTOR - expert task analyzer.\n\nThe junior conductor was uncertain. Make a definitive classification.\n\n## COMPLEXITY (pick ONE - no UNCERTAIN allowed)\n- TRIVIAL - One command/file, mechanical\n- SIMPLE - One concern, straightforward\n- STANDARD - Multi-file, needs planning\n- CRITICAL - High risk (auth/payments/security/production)\n\n## TASK TYPE (pick ONE)\n- INQUIRY - Questions, exploration (read-only)\n- TASK - Implement something new\n- DEBUG - Fix something broken\n\n## Example Output\n```json\n{\"complexity\": \"STANDARD\", \"taskType\": \"TASK\", \"reasoning\": \"Multiple files involved, new feature\"}\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 in doubt, go ONE LEVEL HIGHER for complexity\n\nJunior was uncertain. Original task follows."
87
- },
88
- "contextStrategy": {
89
- "sources": [
90
- { "topic": "ISSUE_OPENED", "limit": 1 },
91
- {
92
- "topic": "CONDUCTOR_ESCALATE",
93
- "since": "last_agent_start",
94
- "limit": 1
95
- },
96
- {
97
- "topic": "CLUSTER_OPERATIONS_VALIDATION_FAILED",
98
- "since": "cluster_start",
99
- "limit": 3
100
- }
101
- ],
102
- "format": "chronological",
103
- "maxTokens": 100000
104
- },
105
- "maxRetries": 3,
106
- "triggers": [
107
- { "topic": "CONDUCTOR_ESCALATE", "action": "execute_task" },
108
- {
109
- "topic": "CLUSTER_OPERATIONS_VALIDATION_FAILED",
110
- "action": "execute_task"
111
- }
112
- ],
113
- "hooks": {
114
- "onComplete": {
115
- "action": "publish_message",
116
- "transform": {
117
- "engine": "javascript",
118
- "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};"
119
- }
120
- }
121
- }
122
- }
123
- ]
124
- }
@@ -1,152 +0,0 @@
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
-
22
- # Install system dependencies for e2e testing and development
23
- RUN apt-get update && apt-get install -y --no-install-recommends \
24
- git \
25
- curl \
26
- # Build tools for native modules (node-gyp needs make, gcc, g++)
27
- build-essential \
28
- python3-dev \
29
- ca-certificates \
30
- gnupg \
31
- unzip \
32
- # Docker for starting services
33
- docker.io \
34
- docker-compose \
35
- # Python for general development
36
- python3 \
37
- python3-pip \
38
- python3-venv \
39
- # Chromium dependencies
40
- chromium \
41
- fonts-liberation \
42
- libasound2 \
43
- libatk-bridge2.0-0 \
44
- libatk1.0-0 \
45
- libcups2 \
46
- libdbus-1-3 \
47
- libdrm2 \
48
- libgbm1 \
49
- libgtk-3-0 \
50
- libnspr4 \
51
- libnss3 \
52
- libx11-xcb1 \
53
- libxcomposite1 \
54
- libxdamage1 \
55
- libxfixes3 \
56
- libxrandr2 \
57
- xdg-utils \
58
- && rm -rf /var/lib/apt/lists/* \
59
- # Create python symlink for compatibility
60
- && ln -sf /usr/bin/python3 /usr/bin/python
61
-
62
- # Install GitHub CLI for git authentication
63
- RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
64
- && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
65
- && 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 \
66
- && apt-get update && apt-get install -y gh \
67
- && rm -rf /var/lib/apt/lists/*
68
-
69
- # Install infrastructure tools
70
- # AWS CLI v2
71
- RUN curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION}.zip" -o /tmp/awscliv2.zip \
72
- && unzip -q /tmp/awscliv2.zip -d /tmp \
73
- && /tmp/aws/install \
74
- && rm -rf /tmp/awscliv2.zip /tmp/aws
75
-
76
- # Terraform
77
- RUN curl -fsSL "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" -o /tmp/terraform.zip \
78
- && unzip -q /tmp/terraform.zip -d /usr/local/bin \
79
- && chmod +x /usr/local/bin/terraform \
80
- && rm /tmp/terraform.zip
81
-
82
- # kubectl
83
- RUN curl -fsSL "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
84
- && chmod +x /usr/local/bin/kubectl
85
-
86
- # Helm
87
- RUN curl -fsSL "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" -o /tmp/helm.tar.gz \
88
- && tar -xzf /tmp/helm.tar.gz -C /tmp \
89
- && mv /tmp/linux-amd64/helm /usr/local/bin/helm \
90
- && chmod +x /usr/local/bin/helm \
91
- && rm -rf /tmp/helm.tar.gz /tmp/linux-amd64
92
-
93
- # infracost (cost estimation)
94
- RUN curl -fsSL "https://github.com/infracost/infracost/releases/download/v${INFRACOST_VERSION}/infracost-linux-amd64.tar.gz" -o /tmp/infracost.tar.gz \
95
- && tar -xzf /tmp/infracost.tar.gz -C /tmp \
96
- && mv /tmp/infracost-linux-amd64 /usr/local/bin/infracost \
97
- && chmod +x /usr/local/bin/infracost \
98
- && rm /tmp/infracost.tar.gz
99
-
100
- # tflint (terraform linter)
101
- RUN curl -fsSL "https://github.com/terraform-linters/tflint/releases/download/v${TFLINT_VERSION}/tflint_linux_amd64.zip" -o /tmp/tflint.zip \
102
- && unzip -q /tmp/tflint.zip -d /usr/local/bin \
103
- && chmod +x /usr/local/bin/tflint \
104
- && rm /tmp/tflint.zip
105
-
106
- # tfsec (security scanner)
107
- RUN curl -fsSL "https://github.com/aquasecurity/tfsec/releases/download/v${TFSEC_VERSION}/tfsec-linux-amd64" -o /usr/local/bin/tfsec \
108
- && chmod +x /usr/local/bin/tfsec
109
-
110
- # Set AWS_PAGER to empty to disable paging in AWS CLI
111
- ENV AWS_PAGER=""
112
-
113
- # Set Chromium path for Playwright
114
- ENV CHROME_BIN=/usr/bin/chromium
115
- ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
116
-
117
- # Copy zeroshot source into container and install globally
118
- # CRITICAL: This enables isolation mode to use 'zeroshot task run' inside container
119
- # which provides timeout, error handling, and log streaming infrastructure
120
- COPY --chown=node:node . /tmp/zeroshot/
121
- RUN cd /tmp/zeroshot && npm install && npm link
122
-
123
- # Pre-bake common npm dependencies (Issue #20: 30-40% startup reduction)
124
- # These are installed once at image build time, then copied to workspaces at runtime
125
- # if the project's dependencies are satisfied by the pre-baked set.
126
- COPY docker/zeroshot-cluster/pre-baked-deps.json /pre-baked-deps/package.json
127
- RUN cd /pre-baked-deps && npm install --ignore-scripts \
128
- && chown -R node:node /pre-baked-deps
129
-
130
- # Install Claude CLI globally
131
- RUN npm install -g @anthropic-ai/claude-code
132
-
133
- # Install Playwright (uses system Chromium)
134
- RUN npx playwright install-deps chromium 2>/dev/null || true
135
-
136
- # Add node user to docker group for Docker socket access
137
- RUN groupadd -f docker && usermod -aG docker node
138
-
139
- # Use existing 'node' user from base image (uid 1000)
140
- # Create directories with proper ownership for Claude CLI
141
- RUN mkdir -p /home/node/.claude /home/node/.config/gh \
142
- && chown -R node:node /home/node
143
-
144
- # Create workspace directory with node ownership
145
- RUN mkdir -p /workspace && chown node:node /workspace
146
- WORKDIR /workspace
147
-
148
- # Switch to non-root user (required for --dangerously-skip-permissions)
149
- USER node
150
-
151
- # Default command (overridden by vibe)
152
- CMD ["bash"]
@@ -1,28 +0,0 @@
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
- }