@crafts69guy/orchestra 0.6.0 → 0.6.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orch",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Orchestrator workflow: scope, implement, review, ship via specialised subagents and worktrees.",
5
5
  "author": {
6
6
  "name": "crafts69guy"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orch",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Orchestrator workflow: scope, implement, review, ship via specialised subagents and worktrees.",
5
5
  "author": {
6
6
  "name": "crafts69guy",
package/README.md CHANGED
@@ -48,7 +48,7 @@ codex plugin marketplace add crafts69guy/orchestra
48
48
  | `orch doctor` | checks Node, git, `wt`, the harness CLIs and the installed plugins |
49
49
  | `orch claude [--yolo] [args...]` | starts `claude` with `ORCH=1` and `--model opus` (unless you pass `--model`) |
50
50
  | `orch codex [--yolo] [args...]` | starts `codex` with `ORCH=1` and the orchestration context (below) |
51
- | `orch update` | updates the npm CLI, then the plugin for each harness on `PATH` (`claude plugin update orch@orchestra`, `codex plugin marketplace upgrade orchestra`); skips npm from a git checkout |
51
+ | `orch update` | updates the npm CLI, then the plugin for each harness that has the `orchestra` marketplace (`claude plugin update orch@orchestra`, `codex plugin marketplace upgrade orchestra`); skips npm from a git checkout |
52
52
  | `orch wt new\|merge\|list ...` | worktree helper used by the `dispatch` skill; prints JSON |
53
53
  | `orch eval [args...]` | behaviour evals; only from a git checkout (see [AGENTS.md](AGENTS.md)) |
54
54
  | `orch --help`, `orch --version` | usage and version |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crafts69guy/orchestra",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "description": "Cross-harness (Claude Code + Codex) orchestration workflow plugin",
6
6
  "license": "MIT",
package/scripts/orch.mjs CHANGED
@@ -4,7 +4,7 @@ import { join } from 'node:path';
4
4
  import { pluginRoot, which } from '../hooks/session-start.mjs';
5
5
  import { run as doctor } from './doctor.mjs';
6
6
  import { run as codex, gitCommonDir, spawnExit } from './orch-codex.mjs';
7
- import { run as wt, realDeps as wtDeps } from './orch-wt.mjs';
7
+ import { exec, run as wt, realDeps as wtDeps } from './orch-wt.mjs';
8
8
 
9
9
  export const USAGE = `usage: orch <command> [args]
10
10
 
@@ -36,23 +36,40 @@ export function claudeArgs(args) {
36
36
  ];
37
37
  }
38
38
 
39
+ /**
40
+ * True when `cmd plugin marketplace list --json` names the `orchestra` marketplace. Claude prints
41
+ * an array, Codex `{ marketplaces: [...] }`. A missing binary or unparsable output is false.
42
+ */
43
+ export function hasOrchestra(io, cmd) {
44
+ const r = io.exec(cmd, ['plugin', 'marketplace', 'list', '--json']);
45
+ if (r.status !== 0) return false;
46
+ try {
47
+ const out = JSON.parse(r.stdout);
48
+ const list = Array.isArray(out) ? out : (out?.marketplaces ?? []);
49
+ return list.some((m) => m?.name === 'orchestra');
50
+ } catch {
51
+ return false;
52
+ }
53
+ }
54
+
39
55
  /**
40
56
  * Steps of `orch update` as `[cmd, args]`. The npm step is skipped in a git checkout (update it
41
- * with `git pull`); a harness step is skipped when that harness is not on PATH.
57
+ * with `git pull`); a harness step is skipped unless that harness has the `orchestra` marketplace.
42
58
  */
43
59
  export function updateSteps(io) {
44
- const has = (cmd) => io.hasCommand(cmd, io.env.PATH ?? '');
45
60
  return [
46
61
  ...(io.exists(join(io.root, '.git'))
47
62
  ? []
48
63
  : [['npm', ['install', '-g', '@crafts69guy/orchestra@latest']]]),
49
- ...(has('claude')
64
+ ...(hasOrchestra(io, 'claude')
50
65
  ? [
51
66
  ['claude', ['plugin', 'marketplace', 'update', 'orchestra']],
52
67
  ['claude', ['plugin', 'update', 'orch@orchestra']],
53
68
  ]
54
69
  : []),
55
- ...(has('codex') ? [['codex', ['plugin', 'marketplace', 'upgrade', 'orchestra']]] : []),
70
+ ...(hasOrchestra(io, 'codex')
71
+ ? [['codex', ['plugin', 'marketplace', 'upgrade', 'orchestra']]]
72
+ : []),
56
73
  ];
57
74
  }
58
75
 
@@ -138,6 +155,7 @@ export function realIo(proc, metaUrl) {
138
155
  read: readFileSync,
139
156
  readdir: readdirSync,
140
157
  hasCommand: which,
158
+ exec,
141
159
  gitDir: gitCommonDir,
142
160
  wtDeps,
143
161
  };