@covibes/zeroshot 5.2.1 → 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 (98) hide show
  1. package/CHANGELOG.md +174 -189
  2. package/README.md +226 -195
  3. package/cli/commands/providers.js +149 -0
  4. package/cli/index.js +3145 -2366
  5. package/cli/lib/first-run.js +40 -3
  6. package/cli/message-formatters-normal.js +28 -6
  7. package/cluster-templates/base-templates/debug-workflow.json +24 -78
  8. package/cluster-templates/base-templates/full-workflow.json +99 -316
  9. package/cluster-templates/base-templates/single-worker.json +23 -15
  10. package/cluster-templates/base-templates/worker-validator.json +105 -36
  11. package/cluster-templates/conductor-bootstrap.json +9 -7
  12. package/lib/docker-config.js +14 -1
  13. package/lib/git-remote-utils.js +165 -0
  14. package/lib/id-detector.js +10 -7
  15. package/lib/provider-defaults.js +62 -0
  16. package/lib/provider-detection.js +59 -0
  17. package/lib/provider-names.js +57 -0
  18. package/lib/settings/claude-auth.js +78 -0
  19. package/lib/settings.js +298 -15
  20. package/lib/stream-json-parser.js +4 -238
  21. package/package.json +27 -6
  22. package/scripts/setup-merge-queue.sh +170 -0
  23. package/scripts/validate-templates.js +100 -0
  24. package/src/agent/agent-config.js +140 -63
  25. package/src/agent/agent-context-builder.js +336 -165
  26. package/src/agent/agent-hook-executor.js +337 -67
  27. package/src/agent/agent-lifecycle.js +386 -287
  28. package/src/agent/agent-stuck-detector.js +7 -7
  29. package/src/agent/agent-task-executor.js +944 -683
  30. package/src/agent/output-extraction.js +217 -0
  31. package/src/agent/output-reformatter.js +175 -0
  32. package/src/agent/schema-utils.js +146 -0
  33. package/src/agent-wrapper.js +112 -31
  34. package/src/agents/git-pusher-template.js +285 -0
  35. package/src/claude-task-runner.js +145 -44
  36. package/src/config-router.js +13 -13
  37. package/src/config-validator.js +1049 -563
  38. package/src/input-helpers.js +65 -0
  39. package/src/isolation-manager.js +499 -320
  40. package/src/issue-providers/README.md +305 -0
  41. package/src/issue-providers/azure-devops-provider.js +273 -0
  42. package/src/issue-providers/base-provider.js +232 -0
  43. package/src/issue-providers/github-provider.js +179 -0
  44. package/src/issue-providers/gitlab-provider.js +241 -0
  45. package/src/issue-providers/index.js +196 -0
  46. package/src/issue-providers/jira-provider.js +239 -0
  47. package/src/ledger.js +50 -11
  48. package/src/lib/safe-exec.js +88 -0
  49. package/src/orchestrator.js +1348 -757
  50. package/src/preflight.js +306 -149
  51. package/src/process-metrics.js +98 -56
  52. package/src/providers/anthropic/cli-builder.js +73 -0
  53. package/src/providers/anthropic/index.js +204 -0
  54. package/src/providers/anthropic/models.js +23 -0
  55. package/src/providers/anthropic/output-parser.js +177 -0
  56. package/src/providers/base-provider.js +251 -0
  57. package/src/providers/capabilities.js +60 -0
  58. package/src/providers/google/cli-builder.js +55 -0
  59. package/src/providers/google/index.js +116 -0
  60. package/src/providers/google/models.js +24 -0
  61. package/src/providers/google/output-parser.js +101 -0
  62. package/src/providers/index.js +91 -0
  63. package/src/providers/openai/cli-builder.js +133 -0
  64. package/src/providers/openai/index.js +136 -0
  65. package/src/providers/openai/models.js +21 -0
  66. package/src/providers/openai/output-parser.js +143 -0
  67. package/src/providers/opencode/cli-builder.js +42 -0
  68. package/src/providers/opencode/index.js +103 -0
  69. package/src/providers/opencode/models.js +55 -0
  70. package/src/providers/opencode/output-parser.js +122 -0
  71. package/src/schemas/sub-cluster.js +68 -39
  72. package/src/status-footer.js +94 -48
  73. package/src/sub-cluster-wrapper.js +92 -36
  74. package/src/task-runner.js +8 -6
  75. package/src/template-resolver.js +12 -9
  76. package/src/tui/data-poller.js +123 -99
  77. package/src/tui/formatters.js +4 -3
  78. package/src/tui/keybindings.js +259 -318
  79. package/src/tui/layout.js +20 -3
  80. package/src/tui/renderer.js +11 -21
  81. package/task-lib/attachable-watcher.js +150 -111
  82. package/task-lib/claude-recovery.js +156 -0
  83. package/task-lib/commands/episodes.js +105 -0
  84. package/task-lib/commands/list.js +3 -3
  85. package/task-lib/commands/logs.js +231 -189
  86. package/task-lib/commands/resume.js +3 -2
  87. package/task-lib/commands/run.js +12 -3
  88. package/task-lib/commands/schedules.js +111 -61
  89. package/task-lib/config.js +0 -2
  90. package/task-lib/runner.js +128 -50
  91. package/task-lib/scheduler.js +3 -3
  92. package/task-lib/store.js +464 -152
  93. package/task-lib/tui/formatters.js +94 -45
  94. package/task-lib/tui/renderer.js +13 -3
  95. package/task-lib/tui.js +73 -32
  96. package/task-lib/watcher.js +157 -100
  97. package/src/agents/git-pusher-agent.json +0 -20
  98. package/src/github.js +0 -103
package/src/github.js DELETED
@@ -1,103 +0,0 @@
1
- /**
2
- * GitHub - Fetch and parse GitHub issues
3
- *
4
- * Provides:
5
- * - Issue fetching via gh CLI
6
- * - Parsing of issue data into context
7
- * - Fallback to plain text input
8
- */
9
-
10
- const { execSync } = require('child_process');
11
-
12
- class GitHub {
13
- /**
14
- * Fetch GitHub issue by URL or number
15
- * @param {String} issueRef - Issue URL or number
16
- * @returns {Object} Parsed issue data
17
- */
18
- static fetchIssue(issueRef) {
19
- try {
20
- // Extract issue number from URL if needed
21
- const issueNumber = this._extractIssueNumber(issueRef);
22
-
23
- // Fetch issue using gh CLI
24
- const cmd = `gh issue view ${issueNumber} --json number,title,body,labels,assignees,comments,url`;
25
- const output = execSync(cmd, { encoding: 'utf8' });
26
- const issue = JSON.parse(output);
27
-
28
- return this._parseIssue(issue);
29
- } catch (error) {
30
- throw new Error(`Failed to fetch GitHub issue: ${error.message}`);
31
- }
32
- }
33
-
34
- /**
35
- * Extract issue number from URL or return as-is
36
- * @private
37
- */
38
- static _extractIssueNumber(issueRef) {
39
- // If it's a URL, extract the number
40
- const urlMatch = issueRef.match(/\/issues\/(\d+)/);
41
- if (urlMatch) {
42
- return urlMatch[1];
43
- }
44
-
45
- // Otherwise assume it's already a number
46
- return issueRef;
47
- }
48
-
49
- /**
50
- * Parse issue into structured context
51
- * @private
52
- */
53
- static _parseIssue(issue) {
54
- let context = `# GitHub Issue #${issue.number}\n\n`;
55
- context += `## Title\n${issue.title}\n\n`;
56
-
57
- if (issue.body) {
58
- context += `## Description\n${issue.body}\n\n`;
59
- }
60
-
61
- if (issue.labels && issue.labels.length > 0) {
62
- context += `## Labels\n`;
63
- context += issue.labels.map((l) => `- ${l.name}`).join('\n');
64
- context += '\n\n';
65
- }
66
-
67
- if (issue.comments && issue.comments.length > 0) {
68
- context += `## Comments\n\n`;
69
- for (const comment of issue.comments) {
70
- context += `### ${comment.author.login} (${new Date(comment.createdAt).toISOString()})\n`;
71
- context += `${comment.body}\n\n`;
72
- }
73
- }
74
-
75
- return {
76
- number: issue.number,
77
- title: issue.title,
78
- body: issue.body,
79
- labels: issue.labels || [],
80
- comments: issue.comments || [],
81
- url: issue.url || null,
82
- context,
83
- };
84
- }
85
-
86
- /**
87
- * Create a plain text input wrapper
88
- * @param {String} text - Plain text input
89
- * @returns {Object} Structured context
90
- */
91
- static createTextInput(text) {
92
- return {
93
- number: null,
94
- title: 'Manual Input',
95
- body: text,
96
- labels: [],
97
- comments: [],
98
- context: `# Manual Input\n\n${text}\n`,
99
- };
100
- }
101
- }
102
-
103
- module.exports = GitHub;