@the-open-engine/zeroshot 6.7.0 → 6.7.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 (48) hide show
  1. package/cli/commands/providers.js +4 -1
  2. package/cli/index.js +18 -12
  3. package/lib/agent-cli-provider/adapters/claude.d.ts.map +1 -1
  4. package/lib/agent-cli-provider/adapters/claude.js +23 -10
  5. package/lib/agent-cli-provider/adapters/claude.js.map +1 -1
  6. package/lib/agent-cli-provider/adapters/codex.d.ts.map +1 -1
  7. package/lib/agent-cli-provider/adapters/codex.js +4 -0
  8. package/lib/agent-cli-provider/adapters/codex.js.map +1 -1
  9. package/lib/agent-cli-provider/adapters/common.d.ts.map +1 -1
  10. package/lib/agent-cli-provider/adapters/common.js +2 -1
  11. package/lib/agent-cli-provider/adapters/common.js.map +1 -1
  12. package/lib/agent-cli-provider/contract-options.d.ts.map +1 -1
  13. package/lib/agent-cli-provider/contract-options.js +2 -1
  14. package/lib/agent-cli-provider/contract-options.js.map +1 -1
  15. package/lib/agent-cli-provider/index.d.ts +1 -1
  16. package/lib/agent-cli-provider/index.d.ts.map +1 -1
  17. package/lib/agent-cli-provider/index.js.map +1 -1
  18. package/lib/agent-cli-provider/provider-registry.d.ts +1 -1
  19. package/lib/agent-cli-provider/provider-registry.js +1 -1
  20. package/lib/agent-cli-provider/provider-registry.js.map +1 -1
  21. package/lib/agent-cli-provider/single-agent-runtime.js +6 -2
  22. package/lib/agent-cli-provider/single-agent-runtime.js.map +1 -1
  23. package/lib/agent-cli-provider/types.d.ts +3 -1
  24. package/lib/agent-cli-provider/types.d.ts.map +1 -1
  25. package/lib/agent-cli-provider/types.js.map +1 -1
  26. package/lib/settings.js +1 -0
  27. package/package.json +1 -1
  28. package/scripts/run-lint-staged-no-stash.js +68 -0
  29. package/src/agent/agent-lifecycle.js +368 -91
  30. package/src/agent/agent-task-executor.js +384 -101
  31. package/src/agent-cli-provider/adapters/claude.ts +29 -11
  32. package/src/agent-cli-provider/adapters/codex.ts +4 -0
  33. package/src/agent-cli-provider/adapters/common.ts +2 -1
  34. package/src/agent-cli-provider/contract-options.ts +2 -1
  35. package/src/agent-cli-provider/index.ts +1 -0
  36. package/src/agent-cli-provider/provider-registry.ts +1 -1
  37. package/src/agent-cli-provider/single-agent-runtime.ts +8 -2
  38. package/src/agent-cli-provider/types.ts +3 -1
  39. package/src/agent-wrapper.js +9 -2
  40. package/src/config-validator.js +10 -11
  41. package/src/orchestrator.js +18 -6
  42. package/task-lib/attachable-watcher.js +10 -1
  43. package/task-lib/commands/kill.js +34 -9
  44. package/task-lib/commands/status.js +13 -3
  45. package/task-lib/process-termination.js +202 -0
  46. package/task-lib/runner.js +8 -20
  47. package/task-lib/store.js +28 -6
  48. package/task-lib/watcher.js +14 -2
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agent-cli-provider/types.ts"],"names":[],"mappings":";;;AAkXA,MAAa,yBAA0B,SAAQ,KAAK;IACzC,SAAS,GAAG,IAAI,CAAC;IAE1B,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AAPD,8DAOC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agent-cli-provider/types.ts"],"names":[],"mappings":";;;AAoXA,MAAa,yBAA0B,SAAQ,KAAK;IACzC,SAAS,GAAG,IAAI,CAAC;IAE1B,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AAPD,8DAOC"}
package/lib/settings.js CHANGED
@@ -50,6 +50,7 @@ const { getProviderDefaults, clearProviderDefaultsCache } = require('./provider-
50
50
  */
51
51
  const MODEL_HIERARCHY = {
52
52
  opus: 3,
53
+ fable: 3,
53
54
  sonnet: 2,
54
55
  haiku: 1,
55
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-open-engine/zeroshot",
3
- "version": "6.7.0",
3
+ "version": "6.7.1",
4
4
  "description": "Multi-agent orchestration engine for Claude, Codex, and Gemini",
5
5
  "main": "src/orchestrator.js",
6
6
  "bin": {
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require('child_process');
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+
7
+ const PATCH_NAME = 'lint-staged_unstaged.patch';
8
+ const GIT_APPLY_ARGS = ['apply', '-v', '--whitespace=nowarn', '--recount', '--unidiff-zero'];
9
+
10
+ function run(command, args, options = {}) {
11
+ return spawnSync(command, args, {
12
+ cwd: process.cwd(),
13
+ env: process.env,
14
+ stdio: options.stdio || 'inherit',
15
+ encoding: options.encoding,
16
+ });
17
+ }
18
+
19
+ function resolveUnstagedPatchPath() {
20
+ const result = run('git', ['rev-parse', '--git-path', PATCH_NAME], {
21
+ stdio: 'pipe',
22
+ encoding: 'utf8',
23
+ });
24
+ if (result.status !== 0) return null;
25
+ const gitPath = result.stdout.trim();
26
+ return path.isAbsolute(gitPath) ? gitPath : path.resolve(process.cwd(), gitPath);
27
+ }
28
+
29
+ function restoreUnstagedPatch(patchPath) {
30
+ const direct = run('git', [...GIT_APPLY_ARGS, patchPath]);
31
+ if (direct.status === 0) return true;
32
+
33
+ const threeWay = run('git', [...GIT_APPLY_ARGS, '--3way', patchPath]);
34
+ return threeWay.status === 0;
35
+ }
36
+
37
+ function main() {
38
+ const patchPath = resolveUnstagedPatchPath();
39
+ if (patchPath && fs.existsSync(patchPath)) {
40
+ console.error(
41
+ `ERROR: Refusing to overwrite unresolved unstaged changes at ${patchPath}.\n` +
42
+ `Restore them with 'git apply "${patchPath}"', then remove the patch before committing.`
43
+ );
44
+ return 1;
45
+ }
46
+
47
+ const lintStagedBin = require.resolve('lint-staged/bin');
48
+ const lintStaged = run(process.execPath, [lintStagedBin, '--no-stash', ...process.argv.slice(2)]);
49
+ const lintStatus = lintStaged.status ?? 1;
50
+
51
+ if (!patchPath || !fs.existsSync(patchPath)) {
52
+ return lintStatus;
53
+ }
54
+
55
+ if (lintStatus === 0 || restoreUnstagedPatch(patchPath)) {
56
+ fs.rmSync(patchPath, { force: true });
57
+ return lintStatus;
58
+ }
59
+
60
+ console.error(
61
+ `ERROR: lint-staged failed and unstaged changes conflicted with task edits.\n` +
62
+ `The commit remains blocked. Your unstaged changes are preserved at ${patchPath}.\n` +
63
+ `Resolve them with 'git apply --3way "${patchPath}"'; do not delete the patch first.`
64
+ );
65
+ return lintStatus;
66
+ }
67
+
68
+ process.exitCode = main();