@crafts69guy/orchestra 0.5.0 → 0.6.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orch",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
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.5.0",
3
+ "version": "0.6.0",
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,6 +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
52
  | `orch wt new\|merge\|list ...` | worktree helper used by the `dispatch` skill; prints JSON |
52
53
  | `orch eval [args...]` | behaviour evals; only from a git checkout (see [AGENTS.md](AGENTS.md)) |
53
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.5.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "description": "Cross-harness (Claude Code + Codex) orchestration workflow plugin",
6
6
  "license": "MIT",
package/scripts/orch.mjs CHANGED
@@ -13,6 +13,7 @@ commands:
13
13
  codex [--yolo] [args] run codex with the orch workflow
14
14
  wt new|merge|list ... manage task worktrees (prints JSON)
15
15
  doctor check prerequisites
16
+ update update the npm CLI and the installed Claude/Codex plugins
16
17
  eval [args] run the behaviour evals (git checkout only)
17
18
  help, -h, --help show this help
18
19
  -V, --version print the version
@@ -35,6 +36,26 @@ export function claudeArgs(args) {
35
36
  ];
36
37
  }
37
38
 
39
+ /**
40
+ * 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.
42
+ */
43
+ export function updateSteps(io) {
44
+ const has = (cmd) => io.hasCommand(cmd, io.env.PATH ?? '');
45
+ return [
46
+ ...(io.exists(join(io.root, '.git'))
47
+ ? []
48
+ : [['npm', ['install', '-g', '@crafts69guy/orchestra@latest']]]),
49
+ ...(has('claude')
50
+ ? [
51
+ ['claude', ['plugin', 'marketplace', 'update', 'orchestra']],
52
+ ['claude', ['plugin', 'update', 'orch@orchestra']],
53
+ ]
54
+ : []),
55
+ ...(has('codex') ? [['codex', ['plugin', 'marketplace', 'upgrade', 'orchestra']]] : []),
56
+ ];
57
+ }
58
+
38
59
  /** Each command takes `(args, io)` and returns the exit code. */
39
60
  export const commands = {
40
61
  claude: (args, io) =>
@@ -62,6 +83,20 @@ export const commands = {
62
83
  io.stdout(`${lines.join('\n')}\n`);
63
84
  return code;
64
85
  },
86
+ /** Runs every step even after a failure; returns the first non-zero code. */
87
+ update(_args, io) {
88
+ if (io.exists(join(io.root, '.git'))) {
89
+ io.stderr(`orch: ${io.root} is a git checkout; skipping npm (run git pull there)\n`);
90
+ }
91
+ let code = 0;
92
+ for (const [cmd, args] of updateSteps(io)) {
93
+ io.stdout(`$ ${cmd} ${args.join(' ')}\n`);
94
+ const c = spawnExit(io.spawn(cmd, args, { env: io.env }), cmd, io.stderr, 'skipping.');
95
+ if (c !== 0 && code === 0) code = c;
96
+ }
97
+ if (code === 0) io.stdout('orch: updated; restart Claude Code / Codex sessions to apply\n');
98
+ return code;
99
+ },
65
100
  eval(args, io) {
66
101
  const script = join(io.root, 'evals', '_support', 'run.sh');
67
102
  if (!io.exists(script)) {