cool-workflow 0.1.78
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.
- package/.claude-plugin/plugin.json +20 -0
- package/.codex-plugin/mcp.json +10 -0
- package/.codex-plugin/plugin.json +38 -0
- package/.mcp.json +10 -0
- package/LICENSE +24 -0
- package/README.md +638 -0
- package/apps/architecture-review/app.json +51 -0
- package/apps/architecture-review/workflow.js +116 -0
- package/apps/end-to-end-golden-path/app.json +30 -0
- package/apps/end-to-end-golden-path/workflow.js +33 -0
- package/apps/pr-review-fix-ci/app.json +59 -0
- package/apps/pr-review-fix-ci/workflow.js +90 -0
- package/apps/release-cut/app.json +54 -0
- package/apps/release-cut/workflow.js +82 -0
- package/apps/research-synthesis/app.json +50 -0
- package/apps/research-synthesis/workflow.js +76 -0
- package/apps/workflow-app-framework-demo/app.json +29 -0
- package/apps/workflow-app-framework-demo/workflow.js +44 -0
- package/dist/agent-config.js +223 -0
- package/dist/candidate-scoring.js +715 -0
- package/dist/capability-core.js +630 -0
- package/dist/capability-dispatcher.js +86 -0
- package/dist/capability-registry.js +523 -0
- package/dist/cli.js +1276 -0
- package/dist/collaboration.js +727 -0
- package/dist/commit.js +570 -0
- package/dist/contract-migration.js +234 -0
- package/dist/coordinator.js +1163 -0
- package/dist/daemon.js +44 -0
- package/dist/dispatch.js +201 -0
- package/dist/drive.js +503 -0
- package/dist/error-feedback.js +415 -0
- package/dist/evidence-grounding.js +179 -0
- package/dist/evidence-reasoning.js +733 -0
- package/dist/execution-backend.js +1279 -0
- package/dist/harness.js +61 -0
- package/dist/mcp-server.js +1615 -0
- package/dist/multi-agent-eval.js +857 -0
- package/dist/multi-agent-host.js +764 -0
- package/dist/multi-agent-operator-ux.js +537 -0
- package/dist/multi-agent-trust.js +366 -0
- package/dist/multi-agent.js +1173 -0
- package/dist/node-snapshot.js +270 -0
- package/dist/observability.js +922 -0
- package/dist/operator-ux.js +971 -0
- package/dist/orchestrator/audit-operations.js +182 -0
- package/dist/orchestrator/candidate-operations.js +117 -0
- package/dist/orchestrator/cli-options.js +288 -0
- package/dist/orchestrator/collaboration-operations.js +86 -0
- package/dist/orchestrator/feedback-operations.js +81 -0
- package/dist/orchestrator/host-operations.js +78 -0
- package/dist/orchestrator/lifecycle-operations.js +462 -0
- package/dist/orchestrator/migration-operations.js +44 -0
- package/dist/orchestrator/multi-agent-operations.js +362 -0
- package/dist/orchestrator/report.js +369 -0
- package/dist/orchestrator/topology-operations.js +84 -0
- package/dist/orchestrator.js +874 -0
- package/dist/pipeline-contract.js +92 -0
- package/dist/pipeline-runner.js +285 -0
- package/dist/reclamation.js +882 -0
- package/dist/result-normalize.js +194 -0
- package/dist/run-export.js +64 -0
- package/dist/run-registry.js +1347 -0
- package/dist/run-state-schema.js +67 -0
- package/dist/sandbox-profile.js +471 -0
- package/dist/scheduler.js +266 -0
- package/dist/scheduling.js +184 -0
- package/dist/schema-validate.js +98 -0
- package/dist/state-explosion.js +1213 -0
- package/dist/state-migrations.js +463 -0
- package/dist/state-node.js +301 -0
- package/dist/state.js +308 -0
- package/dist/telemetry-attestation.js +156 -0
- package/dist/telemetry-ledger.js +145 -0
- package/dist/topology.js +527 -0
- package/dist/triggers.js +159 -0
- package/dist/trust-audit.js +475 -0
- package/dist/types/blackboard.js +2 -0
- package/dist/types/boundary.js +29 -0
- package/dist/types/candidate.js +2 -0
- package/dist/types/collaboration.js +2 -0
- package/dist/types/core.js +2 -0
- package/dist/types/drive.js +10 -0
- package/dist/types/error-feedback.js +2 -0
- package/dist/types/evidence-reasoning.js +2 -0
- package/dist/types/execution-backend.js +2 -0
- package/dist/types/multi-agent.js +2 -0
- package/dist/types/observability.js +2 -0
- package/dist/types/pipeline.js +2 -0
- package/dist/types/reclamation.js +8 -0
- package/dist/types/result.js +2 -0
- package/dist/types/run-registry.js +2 -0
- package/dist/types/run.js +2 -0
- package/dist/types/sandbox.js +2 -0
- package/dist/types/schedule.js +2 -0
- package/dist/types/state-node.js +2 -0
- package/dist/types/topology.js +2 -0
- package/dist/types/trust.js +2 -0
- package/dist/types/workbench.js +2 -0
- package/dist/types/worker.js +2 -0
- package/dist/types/workflow-app.js +2 -0
- package/dist/types.js +43 -0
- package/dist/verifier-registry.js +46 -0
- package/dist/verifier.js +78 -0
- package/dist/version.js +8 -0
- package/dist/workbench-host.js +172 -0
- package/dist/workbench.js +190 -0
- package/dist/worker-isolation.js +1028 -0
- package/dist/workflow-api.js +98 -0
- package/dist/workflow-app-framework.js +626 -0
- package/docs/agent-delegation-drive.7.md +190 -0
- package/docs/agent-framework.md +176 -0
- package/docs/candidate-scoring.7.md +106 -0
- package/docs/canonical-workflow-apps.7.md +137 -0
- package/docs/capability-topology-registry.7.md +168 -0
- package/docs/cli-mcp-parity.7.md +373 -0
- package/docs/contract-migration-tooling.7.md +123 -0
- package/docs/control-plane-scheduling.7.md +110 -0
- package/docs/coordinator-blackboard.7.md +183 -0
- package/docs/dogfood/architecture-review-cool-workflow.md +16 -0
- package/docs/dogfood-one-real-repo.7.md +168 -0
- package/docs/durable-state-and-locking.7.md +107 -0
- package/docs/end-to-end-golden-path.7.md +117 -0
- package/docs/error-feedback.7.md +153 -0
- package/docs/evidence-adoption-reasoning-chain.7.md +270 -0
- package/docs/execution-backends.7.md +300 -0
- package/docs/getting-started.md +99 -0
- package/docs/index.md +41 -0
- package/docs/mcp-app-surface.7.md +235 -0
- package/docs/multi-agent-cli-mcp-surface.7.md +265 -0
- package/docs/multi-agent-eval-replay-harness.7.md +302 -0
- package/docs/multi-agent-operator-ux.7.md +314 -0
- package/docs/multi-agent-runtime-core.7.md +231 -0
- package/docs/multi-agent-topologies.7.md +103 -0
- package/docs/multi-agent-trust-policy-audit.7.md +154 -0
- package/docs/node-snapshot-diff-replay.7.md +135 -0
- package/docs/observability-cost-accounting.7.md +194 -0
- package/docs/operator-ux.7.md +180 -0
- package/docs/pipeline-runner.7.md +136 -0
- package/docs/project-index.md +261 -0
- package/docs/real-execution-backends.7.md +142 -0
- package/docs/release-and-migration.7.md +280 -0
- package/docs/release-tooling.7.md +159 -0
- package/docs/routines.md +48 -0
- package/docs/run-registry-control-plane.7.md +312 -0
- package/docs/run-retention-reclamation.7.md +191 -0
- package/docs/sandbox-profiles.7.md +137 -0
- package/docs/scheduled-tasks.md +80 -0
- package/docs/security-trust-hardening.7.md +117 -0
- package/docs/state-explosion-management.7.md +264 -0
- package/docs/state-node.7.md +96 -0
- package/docs/team-collaboration.7.md +207 -0
- package/docs/unix-principles.md +192 -0
- package/docs/verifier-gated-commit.7.md +140 -0
- package/docs/web-desktop-workbench.7.md +215 -0
- package/docs/worker-isolation.7.md +167 -0
- package/docs/workflow-app-framework.7.md +274 -0
- package/manifest/README.md +43 -0
- package/manifest/plugin.manifest.json +316 -0
- package/manifest/pricing.policy.json +14 -0
- package/package.json +79 -0
- package/scripts/agents/claude-p-agent.js +104 -0
- package/scripts/agents/claude-p-agent.sh +9 -0
- package/scripts/agents/cw-attest-keygen.js +55 -0
- package/scripts/agents/cw-attest-wrap.js +143 -0
- package/scripts/block-unapproved-tag.sh +39 -0
- package/scripts/bump-version.js +249 -0
- package/scripts/canonical-apps.js +171 -0
- package/scripts/cw.js +4 -0
- package/scripts/dist-drift-check.js +79 -0
- package/scripts/dogfood-architecture-review.js +237 -0
- package/scripts/dogfood-release.js +624 -0
- package/scripts/forward-ref-docs.js +73 -0
- package/scripts/gen-manifests.js +232 -0
- package/scripts/golden-path.js +300 -0
- package/scripts/mcp-server.js +4 -0
- package/scripts/new-feature.js +121 -0
- package/scripts/parity-check.js +213 -0
- package/scripts/release-check.js +118 -0
- package/scripts/release-flow.js +272 -0
- package/scripts/release-gate.sh +85 -0
- package/scripts/sync-project-index.js +387 -0
- package/scripts/validate-run-state-schema.js +126 -0
- package/scripts/verify-container-selfref.js +64 -0
- package/scripts/version-sync-check.js +237 -0
- package/skills/cool-workflow/SKILL.md +162 -0
- package/skills/cool-workflow/references/commands.md +282 -0
- package/tsconfig.json +16 -0
- package/ui/workbench/app.css +76 -0
- package/ui/workbench/app.js +159 -0
- package/ui/workbench/index.html +32 -0
- package/workflows/architecture-review.workflow.js +84 -0
- package/workflows/research-synthesis.workflow.js +47 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Web / Desktop Workbench
|
|
2
|
+
|
|
3
|
+
CW v0.1.30 adds the Web / Desktop Workbench: a human-facing console that renders
|
|
4
|
+
a run's five operator surfaces — run graph, blackboard, worker logs, candidate
|
|
5
|
+
compare, and audit timeline — plus a cross-run entry point over the v0.1.28 Run
|
|
6
|
+
Registry. It is a THIRD FRONT DOOR, not a new brain.
|
|
7
|
+
|
|
8
|
+
Before v0.1.30 CW had no web/HTTP/UI surface at all: the CLI rendered for human
|
|
9
|
+
speed and the MCP server (JSON-RPC over stdio) rendered for machine context. The
|
|
10
|
+
Workbench adds human inspection at a glance — and adds NOTHING else. It computes,
|
|
11
|
+
decides, and stores nothing the CLI/MCP cannot already produce.
|
|
12
|
+
|
|
13
|
+
## The third front door (mechanism vs policy)
|
|
14
|
+
|
|
15
|
+
The kernel and the durable `.cw/` state are the MECHANISM. The CLI, the MCP
|
|
16
|
+
surface, and the Workbench are three renderings — three policies — over that one
|
|
17
|
+
mechanism:
|
|
18
|
+
|
|
19
|
+
- the per-run `.cw/runs/<id>/state.json` is the SINGLE source of truth
|
|
20
|
+
- the v0.1.28 Run Registry is a DERIVED, rebuildable index over runs across repos
|
|
21
|
+
- the Workbench is a STATELESS, READ-ONLY RENDERER over both
|
|
22
|
+
|
|
23
|
+
Every Workbench panel embeds, VERBATIM, the canonical `--json` payload of ONE
|
|
24
|
+
already-declared capability, assembled by calling the SAME capability core
|
|
25
|
+
entries the CLI and MCP route through (the v0.1.27 parity contract, see
|
|
26
|
+
[CLI ↔ MCP Parity](cli-mcp-parity.7.md)). The Workbench can show nothing the CLI
|
|
27
|
+
or MCP cannot; a `workbench.view` panel is byte-for-byte equal to its underlying
|
|
28
|
+
`cw <cmd> --json` payload, and that equality is parity-gated.
|
|
29
|
+
|
|
30
|
+
## No hidden dashboard database
|
|
31
|
+
|
|
32
|
+
CW's README promises there is "no hidden dashboard database." The Workbench
|
|
33
|
+
upholds that promise by holding ZERO authoritative state:
|
|
34
|
+
|
|
35
|
+
- it persists nothing — there is no Workbench store, cache, or schema
|
|
36
|
+
- every response is re-derived on demand from disk; refresh re-reads `.cw/`
|
|
37
|
+
- delete the host process and nothing is lost — the data IS the files
|
|
38
|
+
- it forks no run/state schema; the view models in `src/types.ts`
|
|
39
|
+
(`WorkbenchRunView`, `WorkbenchPanel`, `WorkbenchServeDescriptor`) are DERIVED
|
|
40
|
+
projections that embed existing payloads, never copies of them
|
|
41
|
+
|
|
42
|
+
The Workbench is OPTIONAL, like Bun is an optional execution backend: the
|
|
43
|
+
committed `dist/` and a plain `node` runtime keep working with the Workbench (and
|
|
44
|
+
its static UI assets under `ui/workbench/`) absent. The kernel imports the
|
|
45
|
+
Workbench never; the Workbench imports the kernel.
|
|
46
|
+
|
|
47
|
+
## The five panels
|
|
48
|
+
|
|
49
|
+
Each panel renders existing operator vocabulary, with the same names and
|
|
50
|
+
semantics as the CLI (least astonishment). For run `<id>`:
|
|
51
|
+
|
|
52
|
+
1. RUN GRAPH — `cw graph <id> --json` (operator graph) plus
|
|
53
|
+
`cw multi-agent graph <id> [--view compact|critical-path] --json`. Backend
|
|
54
|
+
ids/attestations (v0.1.29) ride on the nodes; the critical path, failures,
|
|
55
|
+
missing evidence, and policy violations are never collapsed.
|
|
56
|
+
2. BLACKBOARD — `cw coordinator summary <id>`, `cw blackboard summarize <id>
|
|
57
|
+
--json`, and `cw blackboard graph <id>`: topics, messages, contexts,
|
|
58
|
+
artifacts, snapshots, decisions, conflicts, and adopted/missing evidence.
|
|
59
|
+
3. WORKER LOGS — `cw worker summary <id> --json`: manifests, outputs, scoped
|
|
60
|
+
results, failures, and the recorded execution backend + sandbox attestation.
|
|
61
|
+
4. CANDIDATE COMPARE — `cw candidate summary <id> --json` plus
|
|
62
|
+
`cw multi-agent reasoning <id> --json`: scores, selection, rejection reasons,
|
|
63
|
+
and the v0.1.26 evidence-adoption reasoning chain (why adopted).
|
|
64
|
+
5. AUDIT TIMELINE — `cw audit summary <id>`, `cw audit multi-agent <id> --json`,
|
|
65
|
+
`cw audit policy <id> --json`, and `cw audit judge <id> --json`: trust-audit
|
|
66
|
+
events, role policy decisions, provenance, judge/chair rationale, and policy
|
|
67
|
+
violations.
|
|
68
|
+
|
|
69
|
+
Cross-run entry lists/searches runs via the Run Registry (`cw registry show
|
|
70
|
+
--json` + `cw run list|search --json`); drilling into a run opens its five panels.
|
|
71
|
+
|
|
72
|
+
## Explicit, inspectable, fail closed
|
|
73
|
+
|
|
74
|
+
The Workbench surfaces freshness honestly. When a source capability is unreadable
|
|
75
|
+
(a run with no blackboard yet, or unresolvable state), the panel is rendered
|
|
76
|
+
`absent` with the honest error — exactly what the CLI would report — and the view
|
|
77
|
+
is `resolved: false`. It never fabricates a view when source state is unreadable.
|
|
78
|
+
The same `valid`/`stale`/`absent`/`missing` freshness the runtime already records
|
|
79
|
+
(Run Registry, Evidence Adoption Reasoning Chain, state-explosion summaries) flows
|
|
80
|
+
through verbatim.
|
|
81
|
+
|
|
82
|
+
## Trust boundary
|
|
83
|
+
|
|
84
|
+
The host is least-privilege and local by default:
|
|
85
|
+
|
|
86
|
+
- it binds the loopback interface `127.0.0.1` ONLY — never a public address
|
|
87
|
+
- it is READ-ONLY: every route is `GET`; any write verb is refused `405`
|
|
88
|
+
- it rejects non-localhost `Host` headers (a DNS-rebinding defense) with `403`
|
|
89
|
+
- it refuses path traversal out of `ui/workbench/` with `403`
|
|
90
|
+
- it serves nothing beyond the current user's `.cw/` scope and the Run Registry's
|
|
91
|
+
registered repos
|
|
92
|
+
- it fails closed on anything it cannot read
|
|
93
|
+
|
|
94
|
+
The console is read-only. It offers no actions. If a future release adds an action
|
|
95
|
+
(resume, rerun, dispatch), that action MUST route through an existing declared
|
|
96
|
+
capability core entry — never a parallel code path — so it cannot drift from the
|
|
97
|
+
CLI/MCP and is covered by the parity gate.
|
|
98
|
+
|
|
99
|
+
## Surfaces
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
cw workbench view <run-id> [--json] # five-panel WorkbenchRunView for one run
|
|
103
|
+
cw workbench serve [--port N] [--scope repo|home] [--once|--json]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
`cw workbench serve` with `--once`/`--json` prints the serve descriptor (bind
|
|
107
|
+
host/port, scope, routes) and exits without starting a server; the default starts
|
|
108
|
+
the localhost host (like `schedule daemon`). The MCP tools `cw_workbench_view` and
|
|
109
|
+
`cw_workbench_serve` mirror these: `cw_workbench_view` returns the same view as the
|
|
110
|
+
CLI `--json`, and `cw_workbench_serve` returns the descriptor only — an MCP stdio
|
|
111
|
+
host cannot start a blocking server. That single side-effect difference is the
|
|
112
|
+
declared, documented payload divergence recorded in `src/capability-registry.ts`;
|
|
113
|
+
the descriptor payload itself is identical across surfaces.
|
|
114
|
+
|
|
115
|
+
The read-only HTTP routes the host serves:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
GET / # static UI shell (dependency-light; absent -> JSON-only fallback)
|
|
119
|
+
GET /ui/* # static UI assets, read from disk
|
|
120
|
+
GET /api/index # registry show + run list/search (cross-run entry)
|
|
121
|
+
GET /api/serve # the serve descriptor
|
|
122
|
+
GET /api/run/:runId # the five-panel WorkbenchRunView
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Version
|
|
126
|
+
|
|
127
|
+
This is CW v0.1.30. The Workbench changes no run-state schema and requires no
|
|
128
|
+
migration: it is a pure read-only projection over existing durable state and
|
|
129
|
+
existing capability payloads. Removing it leaves the framework fully functional.
|
|
130
|
+
|
|
131
|
+
See also [Operator UX](operator-ux.7.md), [CLI ↔ MCP Parity](cli-mcp-parity.7.md),
|
|
132
|
+
and [Run Registry / Control Plane](run-registry-control-plane.7.md).
|
|
133
|
+
|
|
134
|
+
## Observability + Cost Accounting (v0.1.31)
|
|
135
|
+
|
|
136
|
+
v0.1.31 adds Observability + Cost Accounting: `metrics show`/`metrics summary`
|
|
137
|
+
derive durations, failure/verifier/acceptance rates (with sample counts and
|
|
138
|
+
fail-closed `n/a`), and host-attested token/cost from existing durable run state
|
|
139
|
+
— no metrics database, no collector daemon, no hidden counter. Usage is additive
|
|
140
|
+
and optional (absent ⇒ `unreported`, never 0); cost is `attested` (attested usage
|
|
141
|
+
× a recorded pricing policy) or clearly `estimated`, with pricing as policy. Both
|
|
142
|
+
verbs are parity-gated and render read-only in the v0.1.30 Workbench. See
|
|
143
|
+
[observability-cost-accounting.7.md](observability-cost-accounting.7.md).
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## Team Collaboration (v0.1.32)
|
|
147
|
+
|
|
148
|
+
v0.1.32 adds Team Collaboration: a host-attested actor and append-only
|
|
149
|
+
approvals/rejections/comments/handoffs provenance-linked to a durable target,
|
|
150
|
+
plus a review gate that STACKS ON the verifier gate — required approvals from
|
|
151
|
+
authorized roles, enforced inside `resolveCommitGate` AFTER the verifier checks
|
|
152
|
+
and never instead of them, failing closed on quorum/authority/self-approval and
|
|
153
|
+
recording who approved the very artifact that shipped. Policy (required approvals,
|
|
154
|
+
authorized roles, self-approval) is data, default off (pre-v0.1.32 behavior
|
|
155
|
+
unchanged). The verbs are parity-gated and render read-only in the v0.1.30
|
|
156
|
+
Workbench. See [Team Collaboration](team-collaboration.7.md).
|
|
157
|
+
|
|
158
|
+
## Release Tooling (v0.1.33)
|
|
159
|
+
|
|
160
|
+
the per-tag mechanical surfaces (version bump across 17 surfaces, feature scaffold, and the forward-reference docs) become deterministic scripts, with a de-duplicated release gate. See release-tooling(7).
|
|
161
|
+
|
|
162
|
+
## Real Execution Backend Integrations (v0.1.34)
|
|
163
|
+
|
|
164
|
+
container/remote/ci backends really execute (docker/podman run, remote/CI POST-and-poll) under the sandbox contract, with byte-stable evidence vs node and fail-closed refusal when a runtime/endpoint is unavailable. See real-execution-backends(7).
|
|
165
|
+
|
|
166
|
+
## Node Snapshot / Diff / Replay (v0.1.35)
|
|
167
|
+
|
|
168
|
+
per-node snapshot, structural diff, and isolated deterministic replay over StateNode, reusing the v0.1.23 eval harness; fail-closed on source drift (valid|stale|absent). See node-snapshot-diff-replay(7).
|
|
169
|
+
|
|
170
|
+
## Contract Migration Tooling (v0.1.36)
|
|
171
|
+
|
|
172
|
+
first-class declared migration registry (run-state + workflow-app) with per-edge compatibility proofs, fail-closed reachability, and a round-trip/non-destruction prover. See contract-migration-tooling(7).
|
|
173
|
+
|
|
174
|
+
## Control-Plane Scheduling (v0.1.37)
|
|
175
|
+
|
|
176
|
+
priority + concurrency limits + lease lifecycle + retry/backoff + fail-closed park over the v0.1.28 Run Registry queue; policy-as-data, deterministic. See control-plane-scheduling(7).
|
|
177
|
+
|
|
178
|
+
## Agent Delegation Drive (v0.1.38)
|
|
179
|
+
|
|
180
|
+
spawn an external agent process per worker, capture result.md + attestation, auto-drive plan->dispatch->fulfill->accept->commit
|
|
181
|
+
|
|
182
|
+
## Run Retention & Provable Reclamation (v0.1.39)
|
|
183
|
+
|
|
184
|
+
tiered, append-only, cryptographically-verifiable run reclamation: seal the audit skeleton, free the reconstructable bulk, prove it
|
|
185
|
+
|
|
186
|
+
## Durable State & Locking (v0.1.40)
|
|
187
|
+
|
|
188
|
+
atomic temp->rename writes + fsync-durability for authoritative stores; portable stale-stealing file lock serializing the cross-process read-modify-write stores
|
|
189
|
+
|
|
190
|
+
## Self-Audit Hardening & Pure-Router Decomposition (v0.1.41)
|
|
191
|
+
|
|
192
|
+
evidence grounding + durable audit append + symlink-hardened containment + deterministic worker ids + recursive redaction; BackendRegistry self-describing drivers (no per-id switches); orchestrator god-object decomposed into per-domain operation modules (pure loadRun->delegate router)
|
|
193
|
+
|
|
194
|
+
## Robust Result Ingest (v0.1.42)
|
|
195
|
+
|
|
196
|
+
capture findings/evidence from any reasonable agent shape (alt keys + prose), CW derives grounded evidence itself, warn on empty capture — closes the v0.1.41 live-drive 'accepted with 0 captured' failure
|
|
197
|
+
|
|
198
|
+
## No-False-Green Gate & Launch Prep (v0.1.43)
|
|
199
|
+
|
|
200
|
+
Hard gate blocking empty-capture verifier-gated commits, plus quickstart and launch-prep docs.
|
|
201
|
+
|
|
202
|
+
## Release-Gate Determinism & Agents Vendor (v0.1.44)
|
|
203
|
+
|
|
204
|
+
Release-readiness checks now validate the committed blob (`git show HEAD:<path>`) instead of the mutable working tree — eliminating false-red/false-green from concurrent working-tree writes (iCloud/Spotlight/editor). Adds the `agents` vendor manifest target: a generated `.agents/plugins/cool-workflow/` adapter giving any non-Claude AI agent one common interface to CW.
|
|
205
|
+
|
|
206
|
+
## P1-P2 Fixes & CI Content Surfaces (v0.1.49)
|
|
207
|
+
|
|
208
|
+
Migration DAG with reversible edges (v0.1.45), capability auto-discovery (v0.1.46), vendor-adapter registry (v0.1.47), state auto-compaction and P2 fixes (v0.1.48), plus CI content-surface determinism hardening (v0.1.49).
|
|
209
|
+
0.1.51
|
|
210
|
+
|
|
211
|
+
0.1.76
|
|
212
|
+
|
|
213
|
+
0.1.77
|
|
214
|
+
|
|
215
|
+
0.1.78
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# WORKER-ISOLATION(7)
|
|
2
|
+
|
|
3
|
+
## NAME
|
|
4
|
+
|
|
5
|
+
Worker Isolation - explicit path and contract boundary for dispatched CW workers
|
|
6
|
+
|
|
7
|
+
## SYNOPSIS
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import {
|
|
11
|
+
allocateWorkerScope,
|
|
12
|
+
recordWorkerOutput,
|
|
13
|
+
recordWorkerFailure
|
|
14
|
+
} from "./worker-isolation";
|
|
15
|
+
|
|
16
|
+
const scope = allocateWorkerScope(run, task, { dispatchId: task.dispatchId });
|
|
17
|
+
recordWorkerOutput(run, scope.id, scope.resultPath);
|
|
18
|
+
recordWorkerFailure(run, scope.id, "worker failed before producing output");
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
node dist/cli.js worker list <run-id>
|
|
23
|
+
node dist/cli.js worker show <run-id> <worker-id>
|
|
24
|
+
node dist/cli.js worker manifest <run-id> <worker-id>
|
|
25
|
+
node dist/cli.js worker output <run-id> <worker-id> <result-file>
|
|
26
|
+
node dist/cli.js dispatch <run-id> --sandbox readonly
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## DESCRIPTION
|
|
30
|
+
|
|
31
|
+
Worker Isolation is the small boundary layer between dispatch manifests, worker
|
|
32
|
+
task prompts, worker-local files, result envelopes, StateNode records,
|
|
33
|
+
PipelineRunner verifier gates, ErrorFeedback, and reports.
|
|
34
|
+
|
|
35
|
+
It is not a process sandbox, container runtime, lease manager, or autonomous
|
|
36
|
+
agent spawner. CW still writes task artifacts. Operators or the agent host run
|
|
37
|
+
workers explicitly and return results through declared files.
|
|
38
|
+
|
|
39
|
+
The kernel owns only:
|
|
40
|
+
|
|
41
|
+
- worker scope allocation
|
|
42
|
+
- stable worker manifests
|
|
43
|
+
- worker-local path layout
|
|
44
|
+
- sandbox profile selection and durable policy records
|
|
45
|
+
- boundary validation
|
|
46
|
+
- output collection
|
|
47
|
+
- structured failure preservation
|
|
48
|
+
|
|
49
|
+
## WORKER MODEL
|
|
50
|
+
|
|
51
|
+
Dispatch moves runnable tasks to `running` and allocates one worker scope per
|
|
52
|
+
dispatched task. Each worker receives a plain input file and a result path.
|
|
53
|
+
|
|
54
|
+
The normal flow is:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
dispatch task -> worker scope -> worker.json + manifest.json/input.md -> result.md
|
|
58
|
+
-> result node -> verifier node -> commit/report
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Worker output does not mutate shared run state directly. CW records accepted
|
|
62
|
+
output as result and verifier nodes after boundary checks pass.
|
|
63
|
+
|
|
64
|
+
## ISOLATION BOUNDARIES
|
|
65
|
+
|
|
66
|
+
Isolation is path and contract based.
|
|
67
|
+
|
|
68
|
+
In CW v0.1.8, named Sandbox Profiles define the worker read paths, write paths,
|
|
69
|
+
command policy, network policy, environment policy, worker output allowances,
|
|
70
|
+
and host enforcement instructions. See `sandbox-profiles.7.md`.
|
|
71
|
+
|
|
72
|
+
Accepted output paths must be inside the selected profile's resolved
|
|
73
|
+
`writePaths`, the declared `result.md` when `workerOutput.result` is allowed,
|
|
74
|
+
inside `artifacts/` when `workerOutput.artifacts` is allowed, inside `logs/`
|
|
75
|
+
when `workerOutput.logs` is allowed, or inside an explicitly allowed path
|
|
76
|
+
passed by the legacy runtime policy.
|
|
77
|
+
|
|
78
|
+
Reads and writes are represented separately. CW validates accepted output writes
|
|
79
|
+
it records. The agent host must enforce actual OS-level read/write restrictions
|
|
80
|
+
while the worker is running.
|
|
81
|
+
|
|
82
|
+
Out-of-scope output is rejected and preserved as:
|
|
83
|
+
|
|
84
|
+
- a failed or rejected worker scope
|
|
85
|
+
- an `error` StateNode
|
|
86
|
+
- an ErrorFeedback record with worker and sandbox profile metadata
|
|
87
|
+
|
|
88
|
+
## FILES
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
.cw/runs/<run-id>/workers/index.json
|
|
92
|
+
.cw/runs/<run-id>/workers/<worker-id>/worker.json
|
|
93
|
+
.cw/runs/<run-id>/workers/<worker-id>/manifest.json
|
|
94
|
+
.cw/runs/<run-id>/workers/<worker-id>/input.md
|
|
95
|
+
.cw/runs/<run-id>/workers/<worker-id>/result.md
|
|
96
|
+
.cw/runs/<run-id>/workers/<worker-id>/artifacts/
|
|
97
|
+
.cw/runs/<run-id>/workers/<worker-id>/logs/
|
|
98
|
+
.cw/runs/<run-id>/nodes/
|
|
99
|
+
.cw/runs/<run-id>/feedback/
|
|
100
|
+
.cw/runs/<run-id>/report.md
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`worker.json` is the durable worker-scope state record. `manifest.json` is the
|
|
104
|
+
worker-facing projection that hosts and agents read before writing `result.md`.
|
|
105
|
+
Keeping them separate prevents a regenerated manifest from overwriting
|
|
106
|
+
scope-only runtime state such as retry counters, lifecycle metadata, or future
|
|
107
|
+
operator annotations. New v0.1.8 worker records include `sandboxProfileId`,
|
|
108
|
+
`sandboxPolicy`, and a `sandbox` host contract with `enforcedByCW` and
|
|
109
|
+
`hostRequired`.
|
|
110
|
+
|
|
111
|
+
## FAILURE MODES
|
|
112
|
+
|
|
113
|
+
Missing result files are retryable worker failures.
|
|
114
|
+
|
|
115
|
+
Boundary violations are rejected worker outputs. They are not accepted into
|
|
116
|
+
result state. Sandbox write denials use `sandbox-write-denied`; unknown and
|
|
117
|
+
invalid profiles use `sandbox-profile-not-found` and `sandbox-profile-invalid`.
|
|
118
|
+
|
|
119
|
+
Verifier failures remain verifier failures. Worker Isolation preserves the
|
|
120
|
+
worker directory and records feedback so the operator can inspect or correct the
|
|
121
|
+
result.
|
|
122
|
+
|
|
123
|
+
Corrupt run state, unknown workers, and unknown tasks are hard errors because
|
|
124
|
+
the runtime cannot proceed safely.
|
|
125
|
+
|
|
126
|
+
## EXAMPLES
|
|
127
|
+
|
|
128
|
+
List workers:
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
node dist/cli.js worker list <run-id>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Show one worker:
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
node dist/cli.js worker show <run-id> <worker-id>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Record worker output:
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
node dist/cli.js worker output <run-id> <worker-id> .cw/runs/<run-id>/workers/<worker-id>/result.md
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Record a failure:
|
|
147
|
+
|
|
148
|
+
```text
|
|
149
|
+
node dist/cli.js worker fail <run-id> <worker-id> --message "worker could not inspect assigned files"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## COMPATIBILITY
|
|
153
|
+
|
|
154
|
+
Worker Isolation is introduced in CW v0.1.5. It adds optional worker fields to
|
|
155
|
+
run paths, tasks, dispatch tasks, dispatch records, summaries, and run state.
|
|
156
|
+
|
|
157
|
+
Sandbox Profiles are introduced in CW v0.1.8. The legacy `allowedPaths` field
|
|
158
|
+
remains available and now mirrors effective write acceptance paths for older
|
|
159
|
+
hosts. New hosts should prefer `sandboxPolicy.readPaths`,
|
|
160
|
+
`sandboxPolicy.writePaths`, `sandboxPolicy.workerOutput`, and
|
|
161
|
+
`sandbox.hostRequired`.
|
|
162
|
+
|
|
163
|
+
Existing `plan`, `dispatch`, `result`, `node`, `contract`, and `feedback`
|
|
164
|
+
commands remain compatible. The legacy `result` command still accepts a task id
|
|
165
|
+
and result file. The stricter boundary-aware path is the `worker output`
|
|
166
|
+
command.
|
|
167
|
+
0.1.51
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# Workflow App framework
|
|
2
|
+
|
|
3
|
+
Workflow App framework - stable userland contract for reusable CW workflow apps
|
|
4
|
+
|
|
5
|
+
## Synopsis
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
const {
|
|
9
|
+
defineWorkflowApp,
|
|
10
|
+
workflow,
|
|
11
|
+
phase,
|
|
12
|
+
agent,
|
|
13
|
+
artifact,
|
|
14
|
+
input
|
|
15
|
+
} = require("../dist/workflow-app-framework");
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
node scripts/cw.js app list
|
|
20
|
+
node scripts/cw.js app show workflow-app-framework-demo
|
|
21
|
+
node scripts/cw.js app validate apps/workflow-app-framework-demo/app.json
|
|
22
|
+
node scripts/cw.js app show architecture-review
|
|
23
|
+
npm run canonical-apps
|
|
24
|
+
node scripts/cw.js app init my-app --title "My App"
|
|
25
|
+
node scripts/cw.js plan my-app --question "What should happen?"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Description
|
|
29
|
+
|
|
30
|
+
CW treats the runner as the base system and workflow apps as userland. The
|
|
31
|
+
runner owns state transitions, dispatch, result recording, verifier gates,
|
|
32
|
+
commits, and reports. A workflow app owns domain-specific inputs, phases, task
|
|
33
|
+
prompts, evidence requirements, and sandbox profile hints.
|
|
34
|
+
|
|
35
|
+
The framework is intentionally small. The public app helpers are:
|
|
36
|
+
|
|
37
|
+
- `defineWorkflowApp(definition)`
|
|
38
|
+
- `workflow(definition)`
|
|
39
|
+
- `phase(name, tasks, options)`
|
|
40
|
+
- `agent(id, prompt, options)`
|
|
41
|
+
- `artifact(id, prompt, options)`
|
|
42
|
+
- `input(name, options)`
|
|
43
|
+
|
|
44
|
+
Legacy workflow factories remain valid. If a canonical app owns the public id,
|
|
45
|
+
the legacy wrapper should use an explicit compatibility id such as
|
|
46
|
+
`legacy-research-synthesis` to avoid duplicate discovery:
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
module.exports = ({ workflow, phase, agent, artifact }) =>
|
|
50
|
+
workflow({
|
|
51
|
+
id: "legacy-review",
|
|
52
|
+
title: "Legacy Review",
|
|
53
|
+
inputs: [{ name: "question", required: true }],
|
|
54
|
+
phases: [
|
|
55
|
+
phase("Map", [
|
|
56
|
+
agent("map:context", "Map {{question}}.")
|
|
57
|
+
])
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## App Contract
|
|
63
|
+
|
|
64
|
+
A first-class app contract is a plain object:
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
module.exports = defineWorkflowApp({
|
|
68
|
+
schemaVersion: 1,
|
|
69
|
+
id: "example-review",
|
|
70
|
+
title: "Example Review",
|
|
71
|
+
summary: "Review a repository with evidence gates.",
|
|
72
|
+
version: "0.1.0",
|
|
73
|
+
author: "COOLWHITE LLC",
|
|
74
|
+
inputs: [
|
|
75
|
+
input("question", { type: "string", required: true })
|
|
76
|
+
],
|
|
77
|
+
sandboxProfiles: ["readonly"],
|
|
78
|
+
compatibility: {
|
|
79
|
+
minVersion: "0.1.9"
|
|
80
|
+
},
|
|
81
|
+
workflow: workflow({
|
|
82
|
+
id: "example-review",
|
|
83
|
+
title: "Example Review",
|
|
84
|
+
inputs: [
|
|
85
|
+
input("question", { type: "string", required: true })
|
|
86
|
+
],
|
|
87
|
+
limits: {
|
|
88
|
+
maxAgents: 4,
|
|
89
|
+
maxConcurrentAgents: 2
|
|
90
|
+
},
|
|
91
|
+
sandboxProfiles: ["readonly"],
|
|
92
|
+
phases: [
|
|
93
|
+
phase("Verify", [
|
|
94
|
+
artifact("verify:evidence", "Verify {{question}}.", {
|
|
95
|
+
requiresEvidence: true,
|
|
96
|
+
sandboxProfileId: "readonly"
|
|
97
|
+
})
|
|
98
|
+
])
|
|
99
|
+
]
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The durable fields are:
|
|
105
|
+
|
|
106
|
+
- `schemaVersion`: currently `1`
|
|
107
|
+
- `id`: stable app id, lowercase letters, digits, dots, and hyphens
|
|
108
|
+
- `title`: human-readable name
|
|
109
|
+
- `summary`: short description
|
|
110
|
+
- `version`: semver app version
|
|
111
|
+
- `author`: string or `{ name, url, email }`
|
|
112
|
+
- `workflow`: workflow definition or manifest entrypoint
|
|
113
|
+
- `inputs`: declared input definitions
|
|
114
|
+
- `sandboxProfiles`: named bundled sandbox profiles used by the app
|
|
115
|
+
- `compatibility`: optional CW version constraints
|
|
116
|
+
- `metadata`: app-owned JSON metadata
|
|
117
|
+
|
|
118
|
+
## App Directory
|
|
119
|
+
|
|
120
|
+
CW also discovers app directories:
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
apps/<app-id>/app.json
|
|
124
|
+
apps/<app-id>/workflow.js
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
`app.json` stores the app metadata and points at a relative workflow entrypoint:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"schemaVersion": 1,
|
|
132
|
+
"id": "example-review",
|
|
133
|
+
"title": "Example Review",
|
|
134
|
+
"version": "0.1.0",
|
|
135
|
+
"inputs": [{ "name": "question", "type": "string", "required": true }],
|
|
136
|
+
"sandboxProfiles": ["readonly"],
|
|
137
|
+
"compatibility": { "minVersion": "0.1.9" },
|
|
138
|
+
"workflow": { "entrypoint": "workflow.js" }
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The entrypoint may export a workflow object or a factory:
|
|
143
|
+
|
|
144
|
+
```js
|
|
145
|
+
module.exports = ({ workflow, phase, agent, input }) => {
|
|
146
|
+
const inputs = [input("question", { type: "string", required: true })];
|
|
147
|
+
return workflow({
|
|
148
|
+
id: "example-review",
|
|
149
|
+
title: "Example Review",
|
|
150
|
+
inputs,
|
|
151
|
+
phases: [
|
|
152
|
+
phase("Map", [
|
|
153
|
+
agent("map:context", "Map {{question}}.")
|
|
154
|
+
])
|
|
155
|
+
]
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Validation
|
|
161
|
+
|
|
162
|
+
App loading fails closed. CW validates:
|
|
163
|
+
|
|
164
|
+
- app `schemaVersion`, `id`, `title`, and semver `version`
|
|
165
|
+
- input names, types, duplicate inputs, and boolean flags
|
|
166
|
+
- workflow id/title matching the app id/title
|
|
167
|
+
- positive limits and `maxConcurrentAgents <= maxAgents`
|
|
168
|
+
- phase ids and duplicate phase ids
|
|
169
|
+
- task ids, duplicate task ids, task kind, prompt, and evidence flags
|
|
170
|
+
- sandbox profile references on the app, workflow, and tasks
|
|
171
|
+
- compatibility constraints against the current CW runtime
|
|
172
|
+
|
|
173
|
+
`cw.js app validate` prints a structured result. Invalid apps return nonzero:
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
{
|
|
177
|
+
"valid": false,
|
|
178
|
+
"issues": [
|
|
179
|
+
{
|
|
180
|
+
"code": "workflow-task-duplicate",
|
|
181
|
+
"message": "Duplicate workflow task id: map:context",
|
|
182
|
+
"path": "/path/app.json.workflow.phases.0.tasks.1.id"
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
CW does not silently rewrite malformed apps into runnable workflows.
|
|
189
|
+
|
|
190
|
+
## CLI
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
node scripts/cw.js app list
|
|
194
|
+
node scripts/cw.js app show <app-id>
|
|
195
|
+
node scripts/cw.js app validate <path-or-app-id>
|
|
196
|
+
node scripts/cw.js app init <app-id> --title "Title"
|
|
197
|
+
node scripts/cw.js app package <app-id> --output app.cwapp.json
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
`cw.js list`, `cw.js init`, and `cw.js plan` remain compatible. `list` includes
|
|
201
|
+
legacy workflow files and first-class app directories. `plan` accepts either
|
|
202
|
+
kind by id.
|
|
203
|
+
|
|
204
|
+
## Canonical Apps
|
|
205
|
+
|
|
206
|
+
CW v0.1.13 includes four maintained canonical app directories:
|
|
207
|
+
|
|
208
|
+
- `architecture-review`
|
|
209
|
+
- `pr-review-fix-ci`
|
|
210
|
+
- `release-cut`
|
|
211
|
+
- `research-synthesis`
|
|
212
|
+
|
|
213
|
+
These apps are official userland pressure tests for the framework. They use declared
|
|
214
|
+
inputs, compatibility metadata, sandbox profile hints, and evidence-required
|
|
215
|
+
verification or synthesis/verdict tasks. Validate and plan the full matrix with:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
npm run canonical-apps
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
See [canonical-workflow-apps.7.md](canonical-workflow-apps.7.md).
|
|
222
|
+
|
|
223
|
+
## MCP
|
|
224
|
+
|
|
225
|
+
The MCP bridge exposes matching tools:
|
|
226
|
+
|
|
227
|
+
- `cw_app_list`
|
|
228
|
+
- `cw_app_show`
|
|
229
|
+
- `cw_app_validate`
|
|
230
|
+
- `cw_app_init`
|
|
231
|
+
- `cw_app_package`
|
|
232
|
+
- `cw_app_run`
|
|
233
|
+
|
|
234
|
+
Tool results are JSON and use the same app summaries and validation issue
|
|
235
|
+
records as the CLI. `cw_app_run` creates a run from an app id and structured
|
|
236
|
+
`inputs`, then returns the run id, app id/version, state/report paths, pending
|
|
237
|
+
task count, compact operator status, and next actions.
|
|
238
|
+
|
|
239
|
+
The full agent-host runtime surface is documented in
|
|
240
|
+
[mcp-app-surface.7.md](mcp-app-surface.7.md).
|
|
241
|
+
|
|
242
|
+
## State And Reports
|
|
243
|
+
|
|
244
|
+
Run state records compact app metadata at:
|
|
245
|
+
|
|
246
|
+
```text
|
|
247
|
+
state.json.workflow.app
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Reports include:
|
|
251
|
+
|
|
252
|
+
```text
|
|
253
|
+
Workflow App: <id>@<version>
|
|
254
|
+
Workflow App Source: <manifest-or-entrypoint-path>
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
CW stores app identity, version, compatibility, source path, sandbox profile
|
|
258
|
+
references, and metadata. It does not copy workflow source into run state.
|
|
259
|
+
|
|
260
|
+
## Files
|
|
261
|
+
|
|
262
|
+
```text
|
|
263
|
+
src/workflow-app-framework.ts
|
|
264
|
+
dist/workflow-app-framework.js
|
|
265
|
+
apps/workflow-app-framework-demo/app.json
|
|
266
|
+
apps/workflow-app-framework-demo/workflow.js
|
|
267
|
+
apps/architecture-review/app.json
|
|
268
|
+
apps/pr-review-fix-ci/app.json
|
|
269
|
+
apps/release-cut/app.json
|
|
270
|
+
apps/research-synthesis/app.json
|
|
271
|
+
test/workflow-app-framework-smoke.js
|
|
272
|
+
test/canonical-workflow-apps-smoke.js
|
|
273
|
+
```
|
|
274
|
+
0.1.51
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Vendor Manifest Source of Truth
|
|
2
|
+
|
|
3
|
+
Every agent host scans a different, hard-coded manifest directory
|
|
4
|
+
(`.claude-plugin/`, `.codex-plugin/`, `.agents/`) with a different JSON shape.
|
|
5
|
+
You cannot unify the directory or the schema — so we do not try. Instead, all
|
|
6
|
+
vendor manifests are **generated** from one neutral source and point at the same
|
|
7
|
+
shared runtime (`skills/`, `dist/`, `apps/`, the MCP server). No vendor forks the
|
|
8
|
+
logic; each manifest is a thin adapter.
|
|
9
|
+
|
|
10
|
+
This is the mechanism/policy split: shared assets are mechanism, per-vendor
|
|
11
|
+
manifests are policy.
|
|
12
|
+
|
|
13
|
+
## Edit here, generate the rest
|
|
14
|
+
|
|
15
|
+
- **Source of truth:** `plugin.manifest.json` (this directory). Edit only this.
|
|
16
|
+
- **Generator:** `../scripts/gen-manifests.js`.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm run gen:manifests # regenerate every vendor manifest
|
|
20
|
+
npm run gen:manifests -- --check # fail (exit 1) if any generated file drifted
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`--check` runs inside `npm run release:check`, so drift is release-blocking.
|
|
24
|
+
`npm run version:sync` verifies the source version matches every surface.
|
|
25
|
+
|
|
26
|
+
## Generated outputs (do NOT hand-edit)
|
|
27
|
+
|
|
28
|
+
| Vendor | Marketplace | Plugin manifest | MCP config | MCP path var |
|
|
29
|
+
| --- | --- | --- | --- | --- |
|
|
30
|
+
| Claude Code | `../../../.claude-plugin/marketplace.json` | `../.claude-plugin/plugin.json` | `../.mcp.json` (auto-discovered) | `${CLAUDE_PLUGIN_ROOT}/` |
|
|
31
|
+
| Codex / `.agents` | `../../../.agents/plugins/marketplace.json` | `../.codex-plugin/plugin.json` | `../.codex-plugin/mcp.json` | `./` |
|
|
32
|
+
|
|
33
|
+
The two vendors read **different** MCP files, so the plugin-root path variable
|
|
34
|
+
never collides.
|
|
35
|
+
|
|
36
|
+
## Adding a new vendor (Cursor, Windsurf, …)
|
|
37
|
+
|
|
38
|
+
1. Add a `targets.<vendor>` entry in `plugin.manifest.json` (its manifest path,
|
|
39
|
+
mcp path, and `pluginRootVar`).
|
|
40
|
+
2. Add a matching `vendors.<vendor>.outputs` template in
|
|
41
|
+
`plugin.manifest.json`.
|
|
42
|
+
3. Run `npm run gen:manifests`. Shared assets stay untouched, and the generator
|
|
43
|
+
needs no code change for a template-only vendor.
|