@oisincoveney/pipeline 2.1.1 → 2.3.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 (64) hide show
  1. package/.agents/skills/orchestrate/SKILL.md +80 -0
  2. package/defaults/pipeline.yaml +111 -0
  3. package/defaults/profiles.yaml +215 -0
  4. package/defaults/runners.yaml +24 -0
  5. package/dist/argo-graph.js +59 -27
  6. package/dist/argo-submit.d.ts +0 -1
  7. package/dist/argo-submit.js +11 -6
  8. package/dist/argo-workflow.d.ts +1 -2
  9. package/dist/argo-workflow.js +0 -2
  10. package/dist/claude-settings-config.js +44 -0
  11. package/dist/cli/program.js +12 -5
  12. package/dist/cli/submit-options.js +1 -2
  13. package/dist/cluster-doctor.js +0 -12
  14. package/dist/commands/pipeline-command.js +1 -1
  15. package/dist/config/defaults.js +7 -350
  16. package/dist/config/schemas.d.ts +9 -9
  17. package/dist/install-commands/claude-code.js +160 -0
  18. package/dist/install-commands/opencode.js +56 -39
  19. package/dist/install-commands/shared.js +32 -5
  20. package/dist/install-commands.js +26 -15
  21. package/dist/json-config-merge.js +47 -0
  22. package/dist/mcp/gateway.js +9 -1
  23. package/dist/moka-global-config.d.ts +0 -1
  24. package/dist/moka-global-config.js +0 -1
  25. package/dist/moka-submit.d.ts +8 -11
  26. package/dist/moka-submit.js +1 -4
  27. package/dist/opencode-project-config.js +2 -45
  28. package/dist/pipeline-runtime.d.ts +9 -0
  29. package/dist/pipeline-runtime.js +50 -8
  30. package/dist/planned-node.js +2 -5
  31. package/dist/{workflow-planner.d.ts → planning/compile.d.ts} +2 -2
  32. package/dist/{workflow-planner.js → planning/compile.js} +6 -83
  33. package/dist/{schedule/planner.d.ts → planning/generate.d.ts} +17 -3
  34. package/dist/{schedule/planner.js → planning/generate.js} +24 -56
  35. package/dist/planning/graph.js +138 -0
  36. package/dist/runner-command/lifecycle-context.js +2 -3
  37. package/dist/runner-command/run.js +2 -3
  38. package/dist/runner-command-contract.d.ts +2 -2
  39. package/dist/runner-event-schema.d.ts +349 -0
  40. package/dist/runner-event-schema.js +185 -0
  41. package/dist/runner-output.js +2 -2
  42. package/dist/runner.d.ts +29 -0
  43. package/dist/runtime/agent-node/agent-node.js +1 -0
  44. package/dist/runtime/context/context.js +1 -1
  45. package/dist/runtime/contracts/contracts.d.ts +18 -1
  46. package/dist/runtime/node-state-store.js +7 -0
  47. package/dist/runtime/opencode-adapter.js +28 -8
  48. package/dist/runtime/opencode-agent-name.js +18 -0
  49. package/dist/runtime/opencode-runtime.js +62 -0
  50. package/dist/runtime/opencode-server.js +67 -0
  51. package/dist/runtime/opencode-session-executor.js +206 -0
  52. package/dist/schedule/passes/coverage.js +7 -51
  53. package/dist/schedule/passes/ids.js +3 -23
  54. package/dist/schedule/scheduling-roles.js +19 -0
  55. package/dist/strings.js +30 -1
  56. package/docs/adr-opencode-first-goal-loop-runtime.md +1 -1
  57. package/docs/config-architecture.md +43 -6
  58. package/docs/mcp-gateway.md +4 -4
  59. package/docs/operator-guide.md +9 -8
  60. package/docs/pipeline-console-runner-contract.md +3 -4
  61. package/docs/slash-command-adapter-contract.md +1 -0
  62. package/package.json +10 -5
  63. package/dist/schedule-planner.d.ts +0 -2
  64. package/dist/schedule-planner.js +0 -2
@@ -9,7 +9,7 @@ Playwright, Qdrant, or Neon.
9
9
  ## Target Shape
10
10
 
11
11
  ```text
12
- Codex/OpenCode
12
+ OpenCode / Claude Code
13
13
  |
14
14
  | project-level MCP config
15
15
  v
@@ -47,7 +47,7 @@ host-specific MCP config.
47
47
  3. Configure `mcp_gateway` in package-owned profile config.
48
48
  4. Run `moka mcp gateway reconcile` to render and apply the full ToolHive vMCP
49
49
  backend inventory for the current workspace.
50
- 5. Run `moka init` to write project Codex/OpenCode command surfaces and host
50
+ 5. Run `moka init` to write project OpenCode and Claude Code command surfaces and host
51
51
  MCP config.
52
52
  6. Run `moka mcp gateway doctor` to verify gateway health and required tools.
53
53
  7. Keep high-risk upstream capabilities controlled by gateway-side policy, not
@@ -88,7 +88,7 @@ orchestrator MCP set * subagent count * host config layers
88
88
  ```
89
89
 
90
90
  With a gateway, the runtime launches zero local upstream MCP processes for
91
- agents. Codex and OpenCode read the same project-level host config, which
91
+ agents. OpenCode and Claude Code read the same project-level host config, which
92
92
  contains only `pipeline-gateway`.
93
93
 
94
94
  OpenCode receives that gateway through `.opencode/opencode.json` alongside the
@@ -114,7 +114,7 @@ adding one backend must not replace the existing Context7, uidotsh, Qdrant,
114
114
  Fallow, Serena, or Backlog declarations. Use `moka mcp gateway doctor` to check
115
115
  required environment variables, gateway health, required `tools/list` prefixes,
116
116
  local ToolHive availability for local mode, and legacy direct MCP entries. Use
117
- `moka init` to install generated Codex and OpenCode host surfaces with the
117
+ `moka init` to install generated OpenCode and Claude Code host surfaces with the
118
118
  singleton `pipeline-gateway` remote entry. Use `moka install-commands --host all`
119
119
  to refresh generated host files after package upgrades, and use
120
120
  `moka mcp gateway configure-host` as an explicit migration or repair command
@@ -100,8 +100,8 @@ moka doctor --cluster momokaya-pipeline --kube-context momokaya
100
100
  `moka doctor --cluster` adds value-free runner-job preflight checks for the
101
101
  selected namespace, defaulting to `momokaya-pipeline`. It checks that expected
102
102
  Secret objects exist by name, ExternalSecrets and `ClusterSecretStore/openbao`
103
- report Ready status, the runner ServiceAccount has workflow RBAC, the Kueue
104
- LocalQueue is present, and Argo Workflow prerequisites are reachable. It does
103
+ report Ready status, the runner ServiceAccount has workflow RBAC, and Argo
104
+ Workflow prerequisites are reachable. It does
105
105
  not read, print, decode, diff, or validate Secret values.
106
106
 
107
107
  OpenBao and External Secrets Operator remain infrastructure-owned
@@ -160,7 +160,6 @@ momokaya:
160
160
  githubAuthSecretName: <github-auth-secret-name>
161
161
  imagePullSecretName: <image-pull-secret-name>
162
162
  opencodeAuthSecretName: <opencode-auth-secret-name>
163
- queueName: <local-queue-name>
164
163
  serviceAccountName: <runner-service-account-name>
165
164
  ```
166
165
 
@@ -302,8 +301,8 @@ Troubleshooting:
302
301
  Generated invocations include:
303
302
 
304
303
  ```text
305
- OpenCode: /moka-quick, /moka-execute, /moka-inspect
306
- Codex: $quick, $execute, $inspect
304
+ OpenCode: /moka-quick, /moka-execute, /moka-inspect
305
+ Claude Code: /moka-quick, /moka-execute, /moka-inspect
307
306
  ```
308
307
 
309
308
  `moka init` and `moka install-commands --host opencode` generate:
@@ -316,9 +315,11 @@ Codex: $quick, $execute, $inspect
316
315
  - `.opencode/opencode.json` with LSP, the singleton `pipeline-gateway` MCP
317
316
  server, and pinned package-selected plugins
318
317
 
318
+ `moka install-commands --host claude-code` generates `.claude/commands/moka-<entrypoint>.md`
319
+ slash commands for Claude Code.
320
+
319
321
  Package defaults select OpenCode for built-in profiles and runner-command
320
- orchestration. Codex compatibility stays generated through `$quick`, `$execute`,
321
- `$inspect`, and Codex agent config, but it is not the default package runtime.
322
+ orchestration. Codex is not a supported runtime host.
322
323
 
323
324
  ## How The Package Works
324
325
 
@@ -373,7 +374,7 @@ profiles, workflows, or node-level skill overrides.
373
374
 
374
375
  ## Configuring MCP Gateway
375
376
 
376
- MCP access is host-level and gateway-only. Codex, OpenCode, pipeline agents,
377
+ MCP access is host-level and gateway-only. OpenCode, Claude Code, pipeline agents,
377
378
  manual sessions, and CI all connect to one ToolHive/vMCP gateway URL. Do not
378
379
  start upstream MCP servers from individual sessions.
379
380
 
@@ -82,10 +82,9 @@ keep the console package dependency, console expected version, and runner image
82
82
  label version aligned. A future breaking payload change must increment the
83
83
  contract version and ship a compatibility plan.
84
84
 
85
- Console-created Jobs are labeled with `kueue.x-k8s.io/queue-name` and
86
- `pipeline.oisin.dev/project`, `pipeline.oisin.dev/run-id`,
87
- `pipeline.oisin.dev/source`, `pipeline.oisin.dev/task`, plus optional
88
- `pipeline.oisin.dev/requested-by`.
85
+ Console-created Jobs are labeled with `pipeline.oisin.dev/project`,
86
+ `pipeline.oisin.dev/run-id`, `pipeline.oisin.dev/source`,
87
+ `pipeline.oisin.dev/task`, plus optional `pipeline.oisin.dev/requested-by`.
89
88
 
90
89
  ## Event Batches
91
90
 
@@ -16,6 +16,7 @@ moka install-commands --host all --check
16
16
  | Host | Generated resources | Invocation | Mechanical path |
17
17
  | -------- | -------------------------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------- |
18
18
  | OpenCode | `.opencode/commands/moka-<entrypoint>.md`, `.opencode/agents/*.md`, `.opencode/opencode.json` | `/moka-quick <task>`, `/moka-execute <task>`, `/moka-inspect <task>` | Project commands run a primary orchestrator and OpenCode native subagents with package-owned skill, MCP, permission, and LSP projection. |
19
+ | Claude Code | `.claude/commands/moka-<entrypoint>.md`, `.claude/agents/moka-<role>.md`, `.claude/settings.json` | `/moka-quick <task>`, `/moka-execute <task>`, `/moka-inspect <task>` | Slash commands load the `execute` skill, then dispatch each agent node to a Claude Code `Task` subagent that wraps a single `opencode run --agent "MoKa <role>"` subprocess. `.claude/settings.json` is merged (gateway MCP + `Bash(opencode run *)` permission), never clobbered. |
19
20
 
20
21
  ## Projection Rules
21
22
 
package/package.json CHANGED
@@ -2,6 +2,7 @@
2
2
  "dependencies": {
3
3
  "@dagrejs/graphlib": "^4.0.1",
4
4
  "@kubernetes/client-node": "^1.4.0",
5
+ "@opencode-ai/sdk": "1.17.4",
5
6
  "ajv": "^8.20.0",
6
7
  "ajv-formats": "^3.0.1",
7
8
  "commander": "^14.0.3",
@@ -62,6 +63,10 @@
62
63
  "types": "./dist/config.d.ts",
63
64
  "import": "./dist/config.js"
64
65
  },
66
+ "./events": {
67
+ "types": "./dist/runner-event-schema.d.ts",
68
+ "import": "./dist/runner-event-schema.js"
69
+ },
65
70
  "./hooks": {
66
71
  "types": "./dist/hooks.d.ts",
67
72
  "import": "./dist/hooks.js"
@@ -75,8 +80,8 @@
75
80
  "import": "./dist/moka-global-config.js"
76
81
  },
77
82
  "./planner": {
78
- "types": "./dist/workflow-planner.d.ts",
79
- "import": "./dist/workflow-planner.js"
83
+ "types": "./dist/planning/compile.d.ts",
84
+ "import": "./dist/planning/compile.js"
80
85
  },
81
86
  "./runner": {
82
87
  "types": "./dist/runner.d.ts",
@@ -91,8 +96,8 @@
91
96
  "import": "./dist/pipeline-runtime.js"
92
97
  },
93
98
  "./schedule": {
94
- "types": "./dist/schedule-planner.d.ts",
95
- "import": "./dist/schedule-planner.js"
99
+ "types": "./dist/planning/generate.d.ts",
100
+ "import": "./dist/planning/generate.js"
96
101
  }
97
102
  },
98
103
  "files": [
@@ -115,7 +120,7 @@
115
120
  "prepack": "bun run build:cli"
116
121
  },
117
122
  "type": "module",
118
- "version": "2.1.1",
123
+ "version": "2.3.0",
119
124
  "description": "Config-driven multi-agent pipeline runner for repository work",
120
125
  "main": "./dist/index.js",
121
126
  "types": "./dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- import { CompiledScheduleArtifact, GenerateScheduleOptions, GenerateScheduleResult, ScheduleArtifact, ScheduleArtifactError, compileScheduleArtifact, generateScheduleArtifact, parseScheduleArtifact, scheduleArtifactPath } from "./schedule/planner.js";
2
- export { type CompiledScheduleArtifact, type GenerateScheduleOptions, type GenerateScheduleResult, type ScheduleArtifact, ScheduleArtifactError, compileScheduleArtifact, generateScheduleArtifact, parseScheduleArtifact, scheduleArtifactPath };
@@ -1,2 +0,0 @@
1
- import { ScheduleArtifactError, compileScheduleArtifact, generateScheduleArtifact, parseScheduleArtifact, scheduleArtifactPath } from "./schedule/planner.js";
2
- export { ScheduleArtifactError, compileScheduleArtifact, generateScheduleArtifact, parseScheduleArtifact, scheduleArtifactPath };