@synapsor/runner 1.5.0 → 1.5.4

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 (83) hide show
  1. package/CHANGELOG.md +134 -3
  2. package/README.md +108 -113
  3. package/dist/authoring.d.ts +23 -0
  4. package/dist/authoring.d.ts.map +1 -0
  5. package/dist/authoring.mjs +1318 -0
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +4 -5
  8. package/dist/local-ui.d.ts +14 -0
  9. package/dist/local-ui.d.ts.map +1 -1
  10. package/dist/runner.mjs +12334 -5256
  11. package/dist/runtime.mjs +817 -149
  12. package/dist/shadow.d.ts +36 -0
  13. package/dist/shadow.d.ts.map +1 -0
  14. package/dist/shadow.mjs +5362 -0
  15. package/docs/README.md +25 -2
  16. package/docs/alternatives.md +122 -0
  17. package/docs/capability-authoring.md +49 -1
  18. package/docs/client-recipes.md +218 -0
  19. package/docs/cloud-mode.md +18 -0
  20. package/docs/contract-testing.md +9 -7
  21. package/docs/cursor-plugin.md +78 -0
  22. package/docs/database-enforced-scope.md +8 -0
  23. package/docs/dsl-reference.md +45 -4
  24. package/docs/effect-regression.md +39 -2
  25. package/docs/fresh-developer-usability.md +110 -0
  26. package/docs/getting-started-own-database.md +102 -5
  27. package/docs/guarded-crud-writeback.md +10 -1
  28. package/docs/host-compatibility.md +59 -0
  29. package/docs/http-mcp.md +222 -207
  30. package/docs/limitations.md +9 -2
  31. package/docs/local-mode.md +11 -7
  32. package/docs/mcp-audit.md +166 -2
  33. package/docs/mcp-client-setup.md +28 -11
  34. package/docs/mcp-clients.md +43 -8
  35. package/docs/openai-agents-sdk.md +16 -2
  36. package/docs/oss-vs-cloud.md +3 -0
  37. package/docs/production.md +72 -7
  38. package/docs/release-notes.md +131 -4
  39. package/docs/runner-bundles.md +7 -2
  40. package/docs/runner-config-reference.md +96 -6
  41. package/docs/running-a-runner-fleet.md +42 -13
  42. package/docs/security-boundary.md +58 -8
  43. package/docs/shadow-studies.md +47 -4
  44. package/docs/store-lifecycle.md +93 -5
  45. package/docs/troubleshooting-first-run.md +46 -0
  46. package/examples/openai-agents-http/README.md +10 -4
  47. package/examples/openai-agents-http/agent.py +2 -2
  48. package/examples/runner-fleet/Dockerfile +7 -2
  49. package/examples/runner-fleet/README.md +11 -7
  50. package/examples/runner-fleet/docker-compose.yml +4 -4
  51. package/examples/runner-fleet/mint-dev-token.mjs +1 -1
  52. package/examples/runner-fleet/start-tls-runner.sh +21 -0
  53. package/examples/runner-fleet/synapsor.runner.json +27 -1
  54. package/examples/support-billing-agent/README.md +18 -0
  55. package/examples/support-billing-agent/app/README.md +6 -0
  56. package/examples/support-billing-agent/app/contract.ts +28 -0
  57. package/examples/support-billing-agent/app/effect-adapter.mjs +23 -0
  58. package/examples/support-billing-agent/app/record-shadow-outcomes.mjs +44 -0
  59. package/examples/support-billing-agent/scripts/run-evaluation.sh +6 -5
  60. package/examples/support-plan-credit/README.md +54 -3
  61. package/examples/support-plan-credit/mcp-client-examples/README.md +23 -0
  62. package/examples/support-plan-credit/mcp-client-examples/claude-code.sh +34 -0
  63. package/examples/support-plan-credit/mcp-client-examples/codex.config.toml +24 -0
  64. package/examples/support-plan-credit/mcp-client-examples/generic-stdio.mjs +35 -0
  65. package/examples/support-plan-credit/mcp-client-examples/generic-streamable-http.json +4 -1
  66. package/examples/support-plan-credit/mcp-client-examples/generic-streamable-http.mjs +31 -0
  67. package/examples/support-plan-credit/mcp-client-examples/google-adk.py +40 -0
  68. package/examples/support-plan-credit/mcp-client-examples/langchain.mjs +29 -0
  69. package/examples/support-plan-credit/mcp-client-examples/llamaindex.py +36 -0
  70. package/examples/support-plan-credit/mcp-client-examples/openai-agents-stdio.ts +1 -1
  71. package/examples/support-plan-credit/mcp-client-examples/openai-agents-streamable-http.ts +5 -1
  72. package/examples/support-plan-credit/mcp-client-examples/vscode.mcp.json +20 -0
  73. package/examples/support-plan-credit/synapsor/actions/support.propose_plan_credit.contract-tests.generated.json +221 -0
  74. package/examples/support-plan-credit/synapsor/actions/support.propose_plan_credit.ts +34 -0
  75. package/examples/support-plan-credit/synapsor.contract.json +0 -3
  76. package/fixtures/mcp-audit/README.md +14 -0
  77. package/fixtures/mcp-audit/cursor-bypass-config.json +38 -0
  78. package/fixtures/mcp-audit/dangerous-tools-list.json +33 -0
  79. package/fixtures/mcp-audit/reviewed-proposal-tools-list.json +60 -0
  80. package/package.json +18 -3
  81. package/schemas/mcp-audit-report.schema.json +100 -1
  82. package/schemas/synapsor.contract-tests.schema.json +1 -1
  83. package/schemas/synapsor.runner.schema.json +80 -0
@@ -29,7 +29,7 @@ END
29
29
 
30
30
  | Clause | Meaning |
31
31
  | --- | --- |
32
- | `BIND name FROM source key [REQUIRED]` | Defines trusted context. Sources: `SESSION`, `ENV`/`ENVIRONMENT`, `CLOUD_SESSION`, `STATIC_DEV`, `HTTP_CLAIM`. Model tool arguments cannot set these bindings. |
32
+ | `BIND name FROM source key [REQUIRED]` | Defines trusted context. Canonical sources: `SESSION`, `ENV`/`ENVIRONMENT`, `CLOUD_SESSION`, `STATIC_DEV`, `HTTP_CLAIM`. Model tool arguments cannot set these bindings. Runner rejects `SESSION`; use one of its implemented verified providers described below. |
33
33
  | `TENANT BINDING name` | Selects the binding used for tenant scope. Defaults to a binding named `tenant_id`. |
34
34
  | `PRINCIPAL BINDING name` | Selects the actor binding. Defaults to a binding named `principal`. |
35
35
 
@@ -65,16 +65,57 @@ END
65
65
  | `TENANT KEY column` | Required in DSL 0.1. Adds trusted tenant scope to every read/write. |
66
66
  | `PRINCIPAL SCOPE KEY column` | Optional tenant-additive row lock. Runner binds this fixed column to the context's required trusted `PRINCIPAL BINDING`; it is never a model argument. |
67
67
  | `CONFLICT GUARD column` | Captures the row-version value for exact guarded writeback. Prefer a monotonic version or native-precision timestamp. |
68
+ | `CONFLICT GUARD WEAK ROW HASH ACKNOWLEDGED` | Explicitly accepts a weaker hash over the captured projection for a legacy, ordinary single-row source-DB UPDATE. It may miss concurrent changes outside that projection and is never equivalent to a version column. |
69
+
70
+ An UPDATE proposal must choose one of those guard clauses. Omitting the clause
71
+ is a compile error; the compiler never silently selects the weak form. The weak
72
+ form is rejected for INSERT, DELETE, reversible writes, bounded sets, and
73
+ Runner-ledger authority. `contract lint`, `contract explain`, `doctor`, and
74
+ `tools preview` all identify it prominently.
75
+
76
+ To migrate a legacy DSL file that omitted the guard, inspect the target schema
77
+ and add an exact source column:
78
+
79
+ ```sql
80
+ CONFLICT GUARD version
81
+ ```
82
+
83
+ Use a monotonic integer/version column when available, or a native-precision
84
+ `updated_at` maintained by the database. If a legacy source has no usable
85
+ version column and the capability is an ordinary single-row UPDATE using
86
+ source-DB receipt authority, the explicit weak clause keeps the previous
87
+ projection-hash behavior while recording the reduced assurance in review
88
+ output. Do not use it as a production-equivalent substitute for a real version
89
+ column.
68
90
 
69
91
  `PRINCIPAL SCOPE KEY` means `tenant_key = trusted tenant AND
70
92
  principal_scope_key = trusted principal`. It cannot replace tenant scope,
71
93
  default to all rows, or be overridden by an argument. The principal binding
72
- must be required and come from a trusted provider such as `ENVIRONMENT`,
73
- `HTTP_CLAIM`, `SESSION`, or `CLOUD_SESSION`. For networked multi-user serving,
74
- use signed HTTP claims. See the complete
94
+ must be required and come from a trusted Runner provider: `ENVIRONMENT`,
95
+ verified `HTTP_CLAIM`, verified `CLOUD_SESSION`, or explicit
96
+ `STATIC_DEV` for development only. For networked multi-user serving, use
97
+ signed HTTP claims. Canonical `SESSION` is implemented by C++/Cloud but is
98
+ rejected by Runner; Runner never aliases it to environment variables. See the complete
75
99
  [`principal-row-scope.synapsor.sql`](../fixtures/dsl/principal-row-scope.synapsor.sql)
76
100
  example.
77
101
 
102
+ ### Migrating `FROM SESSION` for Runner
103
+
104
+ Choose the provider that owns the verified identity at the Runner boundary:
105
+
106
+ - local stdio or one trusted process: `FROM ENVIRONMENT`; export the named
107
+ values before starting Runner;
108
+ - Streamable HTTP: `FROM HTTP_CLAIM`; configure signed JWT verification and
109
+ bind only verified claims;
110
+ - Cloud embedding: `FROM CLOUD_SESSION`; use the verified Cloud session
111
+ supplied by the control plane; or
112
+ - disposable development only: `FROM STATIC_DEV`.
113
+
114
+ `synapsor-runner dsl validate` and `dsl compile` target Runner and fail with
115
+ `SESSION_BINDING_UNSUPPORTED` before serving. The standalone DSL accepts the
116
+ canonical syntax by default for other implementations; pass `--target runner`
117
+ to request the same fail-closed Runner validation.
118
+
78
119
  ## Arguments and lookup
79
120
 
80
121
  ```sql
@@ -103,6 +103,42 @@ synapsor-runner effect run \
103
103
  Dataset fixture paths are relative and cannot escape the dataset directory.
104
104
  Each result is named `<fixture_id>.result.json`.
105
105
 
106
+ ### Run an application-owned adapter
107
+
108
+ For a real application harness, Runner can launch one provider-neutral command
109
+ directly, without a shell:
110
+
111
+ ```bash
112
+ synapsor-runner effect run \
113
+ --dataset ./effects/dataset.json \
114
+ --adapter node \
115
+ --adapter-arg ./app/effect-adapter.mjs \
116
+ --result-origin deterministic-application \
117
+ --format junit \
118
+ --out ./artifacts/effect-results.xml
119
+ ```
120
+
121
+ Use `--result-origin external-model` when the adapter actually calls a model.
122
+ The origin is included in text, JSON, and JUnit provenance so deterministic
123
+ application results are not presented as model evidence.
124
+
125
+ Runner starts the command with `shell: false`, a bounded argument list,
126
+ timeout/output limits, and a minimal environment that omits ambient database
127
+ URLs and tokens. It sets `SYNAPSOR_EFFECT_MODE=propose_only`,
128
+ `SYNAPSOR_EFFECT_FIXTURE_PATH`, and
129
+ `SYNAPSOR_EFFECT_SOURCE_DATABASE_CHANGED=false`. The command must emit exactly
130
+ one canonical result JSON document to stdout.
131
+
132
+ This is a process boundary, not a sandbox. Adopter-owned code can deliberately
133
+ load its own credentials, so keep the adapter propose-only and point it at
134
+ fixtures or an explicitly disposable source. Runner still rejects every result
135
+ that reports source mutation.
136
+
137
+ The repository's working example is
138
+ [`examples/support-billing-agent/app/effect-adapter.mjs`](../examples/support-billing-agent/app/effect-adapter.mjs),
139
+ and [`.github/workflows/effect-regression.yml`](https://github.com/Synapsor/Synapsor-Runner/blob/main/.github/workflows/effect-regression.yml)
140
+ runs it and uploads JUnit output on relevant pull requests.
141
+
106
142
  ## Accept An Intentional Change
107
143
 
108
144
  Runner never updates a baseline during `run` or `compare`. After reviewing an
@@ -133,10 +169,11 @@ Commit the accepted fixture and review it like application code.
133
169
  ## Boundaries
134
170
 
135
171
  - This is not a general agent workflow engine.
136
- - This does not execute a provider command or application code.
172
+ - Offline `--result`/`--results-dir` mode executes no provider command or
173
+ application code. `--adapter` explicitly executes the adopter-owned command
174
+ under the bounded process contract above.
137
175
  - This does not prove model quality outside the imported observations.
138
176
  - This complements [`contract test`](contract-testing.md); a contract can
139
177
  conform while an agent's proposed business effect still regresses.
140
178
  - Replay remains read-only. Creating an effect fixture does not replay or
141
179
  reapply the original write.
142
-
@@ -0,0 +1,110 @@
1
+ # Fresh-Developer Usability Protocol
2
+
3
+ Use this protocol with five developers who have not previously used Synapsor.
4
+ It is a launch gate, not an automated test. A maintainer may rehearse the
5
+ protocol, but must not report a participant result unless that person actually
6
+ completed the session.
7
+
8
+ ## Goal
9
+
10
+ Measure whether a developer can connect an existing supported staging project,
11
+ draft one disabled Safe Action with a coding agent, receive an exact Data PR,
12
+ approve outside the agent, and find the guarded receipt without learning the
13
+ canonical JSON or SQL-like DSL first.
14
+
15
+ Measure product time separately from the initial package download. Start the
16
+ product timer only after `synapsor-runner --version` succeeds.
17
+
18
+ ## Participant Setup
19
+
20
+ Provide each participant with:
21
+
22
+ - a fresh clone of their application or the support-plan-credit reference app;
23
+ - Node 22.13 or newer;
24
+ - a disposable Postgres staging database and least-privilege read/write roles;
25
+ - exported database URLs and trusted tenant/principal values;
26
+ - current stable Cursor, with no existing Synapsor configuration;
27
+ - the README only. Do not give verbal product-architecture instruction.
28
+
29
+ Never use production credentials or data. Record the OS, Node version, Cursor
30
+ version, package-install method, database engine, and whether the package was
31
+ already cached.
32
+
33
+ ## Tasks
34
+
35
+ Ask the participant to complete these tasks without a maintainer taking control:
36
+
37
+ 1. Run the four-second synthetic proof and identify whether the model can call
38
+ `approve`, `apply`, `commit`, or raw SQL.
39
+ 2. Connect the staging project and confirm the trusted organization scope.
40
+ 3. Tell Cursor one business action to make safe and use the generated
41
+ `/synapsor-protect` path or exact fallback prompt.
42
+ 4. Find the disabled action file and explain why editing it does not activate a
43
+ tool.
44
+ 5. Open the Workbench effect preview and confirm the source row is unchanged.
45
+ 6. Explicitly activate the reviewed digest through the operator-controlled UI.
46
+ 7. Reconnect Cursor if instructed and create one proposal through the semantic
47
+ tool.
48
+ 8. Review the exact before/after Data PR, approve outside Cursor, and apply it.
49
+ 9. Locate the receipt/replay record and explain what happens on retry.
50
+ 10. Draft a second disabled action without changing the active tool surface.
51
+
52
+ Do not rescue a participant until they have been blocked for two minutes. Record
53
+ the exact screen, command, wording, or missing prerequisite that blocked them.
54
+
55
+ ## Measurements
56
+
57
+ For each participant, record:
58
+
59
+ | Measure | Target |
60
+ | --- | --- |
61
+ | Installed CLI to first own-data Data PR | under 5 minutes |
62
+ | Installed CLI to first guarded receipt | under 8 minutes |
63
+ | Second disabled action draft after setup | under 2 minutes |
64
+ | Second action ready for explicit activation | under 5 minutes |
65
+ | Handwritten canonical JSON or DSL | none on the happy path |
66
+ | Extra CLI command after Cursor proposal call | none |
67
+ | Unsafe authority exposed to Cursor | none |
68
+
69
+ Also record every wrong turn, maintainer intervention, misunderstood trust
70
+ boundary, and request for a model-provider key or Synapsor account.
71
+
72
+ ## Pass Criteria
73
+
74
+ The launch gate passes only when all five participants:
75
+
76
+ - complete the first Data PR without handwritten JSON or DSL;
77
+ - correctly identify that activation, approval, and apply are outside the
78
+ model-facing MCP surface;
79
+ - observe unchanged source data before approval;
80
+ - produce one guarded receipt; and
81
+ - expose only the intended semantic read/proposal tools in Cursor.
82
+
83
+ At least four of five must meet every timing target. Any cross-tenant result,
84
+ hidden-field exposure, pre-approval mutation, automatic activation, raw SQL
85
+ tool, or model-visible commit authority is a release blocker regardless of
86
+ timing.
87
+
88
+ ## Reporting Template
89
+
90
+ Record one row per real participant:
91
+
92
+ ```text
93
+ Participant:
94
+ Date:
95
+ Environment:
96
+ Cold package download:
97
+ Product timer start:
98
+ First Data PR:
99
+ First receipt:
100
+ Second draft:
101
+ Second activation-ready action:
102
+ Interventions:
103
+ Tool surface observed:
104
+ Safety-boundary explanation:
105
+ Outcome: pass | fail
106
+ ```
107
+
108
+ Until five real sessions are recorded, report this gate as **owner verification
109
+ pending**. Do not infer usability from unit tests, protocol tests, or a
110
+ maintainer-run demo.
@@ -28,11 +28,11 @@ inspect your schema
28
28
  -> choose one table/view
29
29
  -> choose trusted scope and visible fields
30
30
  -> optionally choose proposal/writeback rules
31
- -> generate synapsor.runner.json
31
+ -> generate synapsor.runner.json + canonical synapsor.contract.json
32
32
  -> preview MCP tools exposed to the model
33
33
  -> run a local smoke check of the tool boundary
34
34
  -> optionally write .synapsor/smoke-input.json for one real row
35
- -> print mcp serve and local UI commands
35
+ -> open the secured localhost first-action workbench in an interactive terminal
36
36
  ```
37
37
 
38
38
  It does not print your database URL, put the URL in MCP client config, expose
@@ -43,6 +43,11 @@ credentials.
43
43
  `onboard db --from-env DATABASE_URL` is the same explicit path if you prefer the
44
44
  older command name in scripts.
45
45
 
46
+ Interactive `start` opens the focused local workbench after config validation
47
+ and an MCP boundary handshake. Use `--no-open` for CI or scripts. That handshake
48
+ proves the reviewed tool surface; the workbench's **Test** step remains pending
49
+ until a real scoped read is recorded in the local ledger.
50
+
46
51
  During the wizard, provide the optional sample object id if you know one safe
47
52
  row in the selected table. Runner writes `./.synapsor/smoke-input.json` with
48
53
  that id and prints the exact `smoke call` command. If you skip it, use
@@ -186,6 +191,95 @@ The wizard:
186
191
  - writes the generated config, `.env.example`, and MCP client snippets only
187
192
  after final confirmation.
188
193
 
194
+ The generated action is explicit about its activation state. Read-only and
195
+ shadow actions cannot commit. Review/writeback generation requires final
196
+ confirmation (`--yes` in a noninteractive command) and still gives the model no
197
+ approval or apply tool.
198
+
199
+ ### Draft another Safe Action with a coding agent
200
+
201
+ After a reviewed read capability exists, describe one business action instead
202
+ of hand-authoring a complete contract:
203
+
204
+ ```bash
205
+ synapsor-runner start \
206
+ --action plan_credit \
207
+ --description "Propose one reviewed customer plan credit" \
208
+ --based-on support.inspect_customer
209
+ ```
210
+
211
+ Runner writes `synapsor/actions/support.propose_plan_credit.ts` and scoped
212
+ agent instructions. The file is an inert scaffold. It contains explicit
213
+ authority questions for trusted scope, visible and kept-out fields, allowed
214
+ effect, conflict guard, bounds, approval, and executor. Creating or editing it
215
+ does not change the active contract or MCP tool list.
216
+
217
+ Give the exact prompt printed by the command to Cursor or another coding
218
+ agent. The agent may inspect project/schema evidence, complete the restricted
219
+ TypeScript object, and run deterministic validation:
220
+
221
+ ```bash
222
+ synapsor-runner action validate \
223
+ ./synapsor/actions/support.propose_plan_credit.ts
224
+ ```
225
+
226
+ Runner statically parses rather than imports the file. A successful validation
227
+ writes a digest-addressed **disabled draft**, a plain-language explanation,
228
+ and exact static allow/deny/effect tests under `.synapsor/drafts/`. It cannot
229
+ activate a tool.
230
+
231
+ In the secured Workbench, run **Preview exact staging Data PR**. The preview
232
+ may perform the reviewed scoped read and write proposal evidence to the local
233
+ ledger, but it cannot mutate the source. Review the exact effect, type
234
+ `ACTIVATE` plus the complete displayed digest, and confirm activation yourself.
235
+ There is intentionally no CLI or MCP command a coding agent can use to
236
+ activate the draft. If the host does not refresh `tools/list`, reconnect the
237
+ MCP server after activation as the Workbench instructs.
238
+
239
+ ## 5. Add the reviewed tools to Cursor
240
+
241
+ After setting trusted environment values, preview and install a project-scoped
242
+ entry without hand-editing `.cursor/mcp.json`:
243
+
244
+ ```bash
245
+ synapsor-runner mcp install cursor --project --dry-run \
246
+ --config ./synapsor.runner.json \
247
+ --store ./.synapsor/local.db
248
+ synapsor-runner mcp install cursor --project --yes \
249
+ --config ./synapsor.runner.json \
250
+ --store ./.synapsor/local.db
251
+ synapsor-runner mcp status cursor --project --check-launch
252
+ ```
253
+
254
+ Runner merges rather than replaces existing MCP servers, creates a backup,
255
+ records an integrity marker, and is idempotent. The entry uses an exact Runner
256
+ version and contains no database URL, trusted tenant/principal value, approval,
257
+ apply, or revert authority. Remove only the Runner-owned entry with:
258
+
259
+ ```bash
260
+ synapsor-runner mcp uninstall cursor --project --yes
261
+ ```
262
+
263
+ See the [host compatibility matrix](host-compatibility.md) for the precise
264
+ Cursor evidence and MCP Apps limitation.
265
+
266
+ ## 6. Inspect local activation evidence
267
+
268
+ Runner records bounded timing milestones locally. It does not transmit them:
269
+
270
+ ```bash
271
+ synapsor-runner activation show \
272
+ --config ./synapsor.runner.json \
273
+ --store ./.synapsor/local.db
274
+ synapsor-runner activation export \
275
+ --out ./.synapsor/activation-report.json
276
+ ```
277
+
278
+ Product activation time begins after package installation; initial npm
279
+ resolution/download/cache time is measured separately when evaluating cold
280
+ `npx` behavior. The report contains milestone timing/status only, not source
281
+ rows, object IDs, tenant IDs, credentials, or project paths.
282
+
189
283
  For proposal modes, the current runner supports explicit field-update mappings such as:
190
284
 
191
285
  ```text
@@ -426,7 +520,7 @@ MCP client:
426
520
  ```bash
427
521
  export SYNAPSOR_TENANT_ID="acme"
428
522
  export SYNAPSOR_PRINCIPAL="local_operator"
429
- export SYNAPSOR_RUNNER_HTTP_TOKEN="dev-local-token"
523
+ export SYNAPSOR_RUNNER_HTTP_TOKEN="$(node -e 'process.stdout.write(require("node:crypto").randomBytes(32).toString("base64url"))')"
430
524
 
431
525
  npx -y -p @synapsor/runner synapsor-runner up --serve \
432
526
  --config ./synapsor.runner.json \
@@ -449,9 +543,12 @@ npx -y -p @synapsor/runner synapsor-runner mcp serve-streamable-http \
449
543
  ```
450
544
 
451
545
  Streamable HTTP defaults to `127.0.0.1:8766` and requires bearer auth by
452
- default. Use private networking/TLS before exposing it beyond localhost. See
546
+ default. A non-loopback listener refuses to start until direct TLS, an explicitly
547
+ trusted TLS proxy, or authenticated emergency break glass is selected. Shared
548
+ services use signed per-session identity rather than one endpoint token. See
453
549
  [HTTP MCP](http-mcp.md). If you want the smaller JSON-RPC bridge instead, use
454
- `synapsor-runner mcp serve-http`.
550
+ `synapsor-runner mcp serve-http`; it is not suitable for claim-bound shared MCP
551
+ sessions.
455
552
 
456
553
  The model-facing MCP server exposes semantic tools such as:
457
554
 
@@ -27,13 +27,22 @@ does not fit either direct boundary.
27
27
 
28
28
  | Operation | Required source guard | Direct-write behavior |
29
29
  | --- | --- | --- |
30
- | `UPDATE` | Primary key, trusted tenant, exact version/conflict column | Patches only allowlisted columns and affects exactly one row. In Runner-ledger mode, the version must advance in the same source transaction. |
30
+ | `UPDATE` | Primary key, trusted tenant, and normally an exact version/conflict column | Patches only allowlisted columns and affects exactly one row. In Runner-ledger mode, the exact version must advance in the same source transaction. |
31
31
  | `INSERT` | Source `PRIMARY KEY` or `UNIQUE` constraint over the reviewed dedup identity | Runner injects tenant and proposal-derived identity values, inserts only allowlisted fields, and requires exactly one row. |
32
32
  | `DELETE` | Primary key, trusted tenant, exact version column | Deletes exactly one reviewed row. Hard delete requires human/operator approval and is refused when Runner detects write triggers or widening cascades. Prefer soft delete as guarded `UPDATE`. |
33
33
 
34
34
  Existing proposal capabilities with no `operation` field continue to mean
35
35
  single-row `UPDATE`.
36
36
 
37
+ DSL authoring requires `CONFLICT GUARD <column>` for UPDATE and never silently
38
+ chooses weak semantics. A narrow legacy single-row, non-reversible UPDATE using
39
+ source-DB receipt authority may explicitly declare
40
+ `CONFLICT GUARD WEAK ROW HASH ACKNOWLEDGED`. That mode hashes only the captured
41
+ projection and may miss concurrent changes outside it. It is prominently
42
+ reported by lint/explain/doctor/preview and is unavailable for Runner-ledger,
43
+ DELETE, reversibility, or bounded sets. Treat it as a compatibility escape
44
+ hatch, not equivalent protection.
45
+
37
46
  ## Receipt authority
38
47
 
39
48
  Receipt authority and source-table provisioning are separate decisions:
@@ -0,0 +1,59 @@
1
+ # MCP Host Compatibility
2
+
3
+ This matrix separates host evidence from protocol evidence. It was last
4
+ reviewed on 2026-07-20. A working MCP SDK handshake is not presented as proof
5
+ that a specific editor renders an extension or protects app-only controls.
6
+
7
+ | Host/surface | Status | Evidence and boundary |
8
+ | --- | --- | --- |
9
+ | Cursor project `.cursor/mcp.json` lifecycle | Tested | Runner install/status/uninstall tests cover preview, merge, backup, idempotency, ownership, tamper refusal, paths with spaces, and exact-version `npx` wiring. Local Cursor version observed: 3.7.21 (`517f696d8ab6c53eb04fbfdaae705cd146bf3460`, x64). |
10
+ | Cursor stdio Runner launch and `tools/list` | Protocol-tested | `mcp status cursor --project --check-launch` executes the generated command and checks the exact reviewed tools through the official MCP client transport. A final manual Cursor UI pass is still required for a release claim tied to that host version. |
11
+ | Cursor MCP Apps inline proposal card | Unknown | Runner advertises the standard display-only resource metadata, but current stable Cursor rendering and app-only authority guarantees have not been reproduced. Use the secured localhost workbench or operator CLI. |
12
+ | Cursor approval/apply/revert through MCP | Unsupported | Intentionally absent. Cursor may auto-run model-facing tools; commit authority therefore stays outside MCP regardless of host settings. |
13
+ | Generic Add to Cursor deep link | Unsupported | Runner does not generate a link because no current documented generic server payload has been verified end to end. Project install is the supported path. |
14
+ | Generic stdio MCP client | Protocol-tested | Official MCP SDK initialization, tool listing, calls, resources, and display-only Apps metadata are covered in the suite. |
15
+ | Generic Streamable HTTP MCP client | Protocol-tested | Official MCP SDK sessions, signed context, secret rotation, JWKS, mTLS, aliases, and session isolation are covered. |
16
+ | Claude Desktop | Protocol-tested | Packaged stdio configuration and MCP transport are tested; manual host UI behavior varies by version and remains a release checklist item. |
17
+ | Claude Code | Configuration-tested and protocol-tested | Claude Code 2.1.216 accepted the secret-free stdio configuration through `mcp add-json`; the same command completed MCP `tools/list`. A manual model-driven proposal call remains a release gate. |
18
+ | Codex | Configuration-tested and protocol-tested | Codex CLI 0.144.6 accepted the secret-free stdio configuration through `codex mcp add`; the same command completed MCP `tools/list`. A manual model-driven proposal call remains a release gate. |
19
+ | VS Code | Protocol-tested | The checked `.vscode/mcp.json` shape is parsed and the same stdio command completes MCP `tools/list`; manual editor UI behavior is not claimed. |
20
+ | OpenAI Agents SDK | Recipe-checked and protocol-tested | Packaged stdio/Streamable HTTP examples are syntax/safety checked and OpenAI-safe aliases are protocol-tested. The exact SDK agent call remains protocol-only until run with an owner-supplied API key. |
21
+ | LangChain/LangGraph | Recipe-checked, protocol-only | The current `@langchain/mcp-adapters` recipe lists tools, rejects unsafe authority, and calls the proposal tool. The framework runtime has not been executed in this release environment. |
22
+ | Google ADK | Recipe-checked, protocol-only | The current `McpToolset`/`StdioConnectionParams` recipe exposes only the two reviewed tools. The framework runtime has not been executed in this release environment. |
23
+ | LlamaIndex | Recipe-checked, protocol-only | The current `BasicMCPClient` recipe lists tools and calls the proposal tool. The framework runtime has not been executed in this release environment. |
24
+
25
+ ## Cursor Project Setup
26
+
27
+ Current Cursor documentation supports project MCP configuration in
28
+ `.cursor/mcp.json`. Runner manages only its `synapsor` entry:
29
+
30
+ ```bash
31
+ synapsor-runner mcp install cursor --project --dry-run
32
+ synapsor-runner mcp install cursor --project --yes
33
+ synapsor-runner mcp status cursor --project --check-launch
34
+ ```
35
+
36
+ The generated entry contains command paths only. Database credentials and
37
+ trusted tenant/principal values must come from the environment that launches
38
+ Runner. Other Cursor MCP servers and settings are preserved.
39
+
40
+ Primary references:
41
+
42
+ - [Cursor MCP documentation](https://cursor.com/docs/context/mcp)
43
+ - [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
44
+ - [MCP Apps specification](https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx)
45
+
46
+ All adjacent-host source links, runnable snippets, shared proposal input, and
47
+ verification commands are in [Client And Framework Recipes](client-recipes.md).
48
+
49
+ ## Authority Fallback
50
+
51
+ Hosts without a verified app-only human-control boundary receive the same
52
+ structured/text proposal result and can open the secured loopback workbench.
53
+ Approval, rejection, apply, compensation, policy activation, trusted identity,
54
+ and credentials never enter model-visible `tools/list`. Runner does not infer
55
+ host safety from a product name or user-agent string.
56
+
57
+ Runner currently exposes tools, not MCP prompts or an elicitation-based
58
+ approval flow. First-run setup and approval do not depend on optional host
59
+ prompt/elicitation support.