@synapsor/runner 1.6.3 → 1.6.5

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 (98) hide show
  1. package/AGENTS.md +2 -2
  2. package/CHANGELOG.md +94 -8
  3. package/CONTRIBUTING.md +10 -3
  4. package/README.md +90 -109
  5. package/SECURITY.md +7 -3
  6. package/THREAT_MODEL.md +37 -0
  7. package/dist/authoring.mjs +98 -13
  8. package/dist/cli.d.ts +12 -1
  9. package/dist/cli.d.ts.map +1 -1
  10. package/dist/local-ui.d.ts +60 -0
  11. package/dist/local-ui.d.ts.map +1 -1
  12. package/dist/runner.mjs +7688 -2227
  13. package/dist/runtime.mjs +528 -51
  14. package/docs/README.md +14 -0
  15. package/docs/agent-guided-setup.md +13 -11
  16. package/docs/aggregate-reads.md +14 -5
  17. package/docs/app-owned-executors.md +5 -6
  18. package/docs/auto-boundary-and-scoped-explore.md +70 -14
  19. package/docs/capability-authoring.md +2 -2
  20. package/docs/client-recipes.md +41 -12
  21. package/docs/cloud-mode.md +7 -7
  22. package/docs/conformance.md +6 -3
  23. package/docs/current-scope.md +13 -2
  24. package/docs/cursor-plugin.md +3 -3
  25. package/docs/database-enforced-scope.md +6 -0
  26. package/docs/dsl-reference.md +12 -1
  27. package/docs/fresh-developer-usability.md +6 -6
  28. package/docs/getting-started-own-database.md +52 -50
  29. package/docs/guided-onboarding.md +104 -34
  30. package/docs/host-compatibility.md +24 -11
  31. package/docs/limitations.md +34 -14
  32. package/docs/local-mode.md +20 -20
  33. package/docs/mcp-audit.md +14 -14
  34. package/docs/mcp-client-setup.md +26 -14
  35. package/docs/mcp-clients.md +47 -11
  36. package/docs/migrating-to-synapsor-spec.md +5 -1
  37. package/docs/openai-agents-sdk.md +2 -2
  38. package/docs/proposal-evidence-freshness.md +7 -7
  39. package/docs/recipes.md +6 -6
  40. package/docs/release-notes.md +100 -10
  41. package/docs/release-policy.md +20 -7
  42. package/docs/reversible-change-sets.md +1 -1
  43. package/docs/reviewed-database-views.md +132 -0
  44. package/docs/reviewed-relationships.md +245 -0
  45. package/docs/rfcs/006-reviewed-reversible-change-sets.md +1 -1
  46. package/docs/runner-bundles.md +7 -7
  47. package/docs/schema-api-candidates.md +1 -1
  48. package/docs/security-boundary.md +30 -0
  49. package/docs/troubleshooting-first-run.md +63 -19
  50. package/docs/use-your-own-database.md +6 -4
  51. package/docs/workbench-ask.md +279 -0
  52. package/docs/writeback-executors.md +7 -7
  53. package/examples/auto-boundary-churn/README.md +1 -1
  54. package/examples/community-solar-clean-room/README.md +7 -0
  55. package/examples/community-solar-clean-room/docker-compose.yml +16 -0
  56. package/examples/community-solar-clean-room/package.json +15 -0
  57. package/examples/community-solar-clean-room/prisma/schema.prisma +171 -0
  58. package/examples/community-solar-clean-room/seed/postgres.sql +571 -0
  59. package/examples/fitflow-guided-onboarding/README.md +2 -2
  60. package/examples/openai-agents-http/Makefile +1 -1
  61. package/examples/openai-agents-http/README.md +1 -1
  62. package/examples/openai-agents-stdio/Makefile +1 -1
  63. package/examples/openai-agents-stdio/README.md +2 -2
  64. package/examples/openai-agents-stdio/agent.py +1 -4
  65. package/examples/reference-support-billing-app/README.md +16 -16
  66. package/examples/retail-clean-room/README.md +7 -0
  67. package/examples/retail-clean-room/docker-compose.yml +16 -0
  68. package/examples/retail-clean-room/package.json +9 -0
  69. package/examples/retail-clean-room/prisma/schema.prisma +239 -0
  70. package/examples/retail-clean-room/seed/postgres.sql +781 -0
  71. package/examples/retail-clean-room/view-recipe/average-retained-revenue.synapsor.sql +21 -0
  72. package/examples/retail-clean-room/view-recipe/synapsor.runner.json +25 -0
  73. package/examples/support-plan-credit/mcp-client-examples/claude-code.sh +1 -4
  74. package/examples/support-plan-credit/mcp-client-examples/claude-desktop.json +1 -4
  75. package/examples/support-plan-credit/mcp-client-examples/codex.config.toml +1 -4
  76. package/examples/support-plan-credit/mcp-client-examples/cursor-global.mcp.json +1 -4
  77. package/examples/support-plan-credit/mcp-client-examples/cursor-project.mcp.json +1 -4
  78. package/examples/support-plan-credit/mcp-client-examples/generic-stdio.json +1 -4
  79. package/examples/support-plan-credit/mcp-client-examples/generic-stdio.mjs +1 -1
  80. package/examples/support-plan-credit/mcp-client-examples/google-adk.py +1 -1
  81. package/examples/support-plan-credit/mcp-client-examples/langchain.mjs +1 -1
  82. package/examples/support-plan-credit/mcp-client-examples/llamaindex.py +1 -1
  83. package/examples/support-plan-credit/mcp-client-examples/openai-agents-stdio.ts +1 -1
  84. package/examples/support-plan-credit/mcp-client-examples/vscode.mcp.json +1 -4
  85. package/fixtures/compatibility/published-1.6.3/manifest.json +76 -0
  86. package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/aggregate-read.synapsor.sql +21 -0
  87. package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/billing-late-fee.synapsor.sql +56 -0
  88. package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/bounded-set-multi-term.synapsor.sql +30 -0
  89. package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/principal-row-scope.synapsor.sql +23 -0
  90. package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/aggregate-read/contract.json +119 -0
  91. package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/approval-quorum/contract.json +44 -0
  92. package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/bounded-set-threats/contract.json +115 -0
  93. package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/principal-row-scope/contract.json +78 -0
  94. package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/proposal-capability/contract.json +101 -0
  95. package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/reversible-change-sets/contract.json +98 -0
  96. package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/valid/basic-read.contract.json +60 -0
  97. package/llms.txt +10 -5
  98. package/package.json +9 -2
@@ -14,25 +14,23 @@ review artifacts without sampling source rows or using an LLM.
14
14
 
15
15
  ## Fast path
16
16
 
17
- Set a dedicated SELECT-only, non-owner database URL plus trusted development
18
- scope and run the public guided path:
17
+ Run the public guided path:
19
18
 
20
19
  ```bash
21
- export DATABASE_URL="<postgres-or-mysql-read-url>"
22
- export SYNAPSOR_TENANT_ID="<staging-tenant>"
23
- export SYNAPSOR_PRINCIPAL="<developer-id>"
24
- npx -y @synapsor/runner@latest start --from-env DATABASE_URL
20
+ npx -y @synapsor/runner start
25
21
  ```
26
22
 
27
- A fresh interactive project with no existing config, selector, or automation
28
- input follows:
23
+ Paste a dedicated SELECT-only, non-owner URL into the hidden prompt, explicitly
24
+ approve a regular project `.env` file for this process, or export
25
+ `DATABASE_URL`. A fresh interactive project with no existing config, selector,
26
+ or automation input follows:
29
27
 
30
28
  ```text
31
29
  inspect the whole selected schema and structured application artifacts
32
30
  -> draft disabled public DSL, canonical JSON, tests, and generation lock
33
31
  -> review scope, fields, analytics permissions, relationships, and budgets
34
32
  -> activate the exact exploration-boundary digest in local Workbench
35
- -> install exactly app.describe_data and app.explore_data in Cursor
33
+ -> install exactly app.describe_data and app.explore_data in your project MCP client
36
34
  -> ask a bounded row or PM-style aggregate question against staging
37
35
  -> Protect This Query into a disabled named capability
38
36
  -> activate that exact digest and remove broad Explore
@@ -43,7 +41,9 @@ It does not print your database URL, put the URL in MCP client config, expose
43
41
  `execute_sql`, expose approval/commit tools, or give the model write
44
42
  credentials. Before boundary activation it does not read source rows.
45
43
 
46
- `start --from-env` is the shortest public command for first-run onboarding.
44
+ `start` is the shortest public command for first-run onboarding. When
45
+ `DATABASE_URL` is already exported, Runner uses it automatically. Explicit
46
+ `--from-env`, `--schema`, and `--project-root` values always win.
47
47
  Read [Database To First Safe Tool](guided-onboarding.md) for the timed guided
48
48
  journey and [Auto Boundary, Scoped Explore, And
49
49
  Protect](auto-boundary-and-scoped-explore.md) for the complete security
@@ -104,7 +104,7 @@ before using staging or production-like data.
104
104
  ## 2. Inspect metadata
105
105
 
106
106
  ```bash
107
- npx -y -p @synapsor/runner synapsor-runner inspect \
107
+ npx -y @synapsor/runner inspect \
108
108
  --engine auto \
109
109
  --from-env DATABASE_URL \
110
110
  --schema public
@@ -113,13 +113,13 @@ npx -y -p @synapsor/runner synapsor-runner inspect \
113
113
  For a disposable staging URL, this also works:
114
114
 
115
115
  ```bash
116
- npx -y -p @synapsor/runner synapsor-runner inspect "$DATABASE_URL" --engine auto --schema public
116
+ npx -y @synapsor/runner inspect "$DATABASE_URL" --engine auto --schema public
117
117
  ```
118
118
 
119
119
  For automation:
120
120
 
121
121
  ```bash
122
- npx -y -p @synapsor/runner synapsor-runner inspect \
122
+ npx -y @synapsor/runner inspect \
123
123
  --engine postgres \
124
124
  --from-env DATABASE_URL \
125
125
  --schema public \
@@ -136,9 +136,9 @@ to your staging table, primary key, tenant key, conflict column, visible fields,
136
136
  allowed write fields, and business limits.
137
137
 
138
138
  ```bash
139
- npx -y -p @synapsor/runner synapsor-runner recipes list
140
- npx -y -p @synapsor/runner synapsor-runner recipes show billing.late_fee_waiver
141
- npx -y -p @synapsor/runner synapsor-runner recipes init billing.late_fee_waiver --output synapsor.runner.json
139
+ npx -y @synapsor/runner recipes list
140
+ npx -y @synapsor/runner recipes show billing.late_fee_waiver
141
+ npx -y @synapsor/runner recipes init billing.late_fee_waiver --output synapsor.runner.json
142
142
  ```
143
143
 
144
144
  Use a recipe when the shape is close. Use the guided wizard or explicit flags
@@ -153,7 +153,7 @@ only the capabilities in your generated `synapsor.runner.json`.
153
153
  In an interactive terminal, run the guided wizard:
154
154
 
155
155
  ```bash
156
- npx -y -p @synapsor/runner synapsor-runner init --from-env DATABASE_URL --mode read_only --wizard
156
+ npx -y @synapsor/runner init --from-env DATABASE_URL --mode read_only --wizard
157
157
  ```
158
158
 
159
159
  The generated context and capabilities are based on your selections. Synapsor
@@ -241,32 +241,34 @@ There is intentionally no CLI or MCP command a coding agent can use to
241
241
  activate the draft. If the host does not refresh `tools/list`, reconnect the
242
242
  MCP server after activation as the Workbench instructs.
243
243
 
244
- ## 5. Add the reviewed tools to Cursor
244
+ ## 5. Add the reviewed tools to your MCP client
245
245
 
246
- After setting trusted environment values, preview and install a project-scoped
247
- entry without hand-editing `.cursor/mcp.json`:
246
+ After setting trusted environment values, choose Cursor, Claude Code, or VS
247
+ Code and preview a project-scoped entry without hand-editing client JSON:
248
248
 
249
249
  ```bash
250
- synapsor-runner mcp install cursor --project --dry-run \
250
+ synapsor-runner mcp install claude-code --project --dry-run \
251
251
  --config ./synapsor.runner.json \
252
252
  --store ./.synapsor/local.db
253
- synapsor-runner mcp install cursor --project --yes \
253
+ synapsor-runner mcp install claude-code --project --yes \
254
254
  --config ./synapsor.runner.json \
255
255
  --store ./.synapsor/local.db
256
- synapsor-runner mcp status cursor --project --check-launch
256
+ synapsor-runner mcp status claude-code --project --check-launch
257
257
  ```
258
258
 
259
+ Use `cursor` or `vscode` in place of `claude-code` for those clients. Runner
260
+ targets `.cursor/mcp.json`, `.mcp.json`, or `.vscode/mcp.json` as appropriate.
259
261
  Runner merges rather than replaces existing MCP servers, creates a backup,
260
262
  records an integrity marker, and is idempotent. The entry uses an exact Runner
261
263
  version and contains no database URL, trusted tenant/principal value, approval,
262
264
  apply, or revert authority. Remove only the Runner-owned entry with:
263
265
 
264
266
  ```bash
265
- synapsor-runner mcp uninstall cursor --project --yes
267
+ synapsor-runner mcp uninstall claude-code --project --yes
266
268
  ```
267
269
 
268
270
  See the [host compatibility matrix](host-compatibility.md) for the precise
269
- Cursor evidence and MCP Apps limitation.
271
+ host evidence and MCP Apps limitations.
270
272
 
271
273
  ## 6. Inspect local activation evidence
272
274
 
@@ -298,7 +300,7 @@ If you already know the reviewed table/action, generate config directly from
298
300
  metadata and explicit flags:
299
301
 
300
302
  ```bash
301
- npx -y -p @synapsor/runner synapsor-runner init \
303
+ npx -y @synapsor/runner init \
302
304
  --from-env DATABASE_URL \
303
305
  --engine postgres \
304
306
  --schema public \
@@ -322,7 +324,7 @@ when you want exact capability names in the generated contract.
322
324
  For app-owned writeback, replace the direct writer env with a handler executor:
323
325
 
324
326
  ```bash
325
- npx -y -p @synapsor/runner synapsor-runner init \
327
+ npx -y @synapsor/runner init \
326
328
  --from-env DATABASE_URL \
327
329
  --engine postgres \
328
330
  --schema public \
@@ -351,7 +353,7 @@ source primary/unique dedup key; DELETE requires an exact conflict guard and
351
353
  safe cascade/trigger inspection:
352
354
 
353
355
  ```bash
354
- npx -y -p @synapsor/runner synapsor-runner onboard db \
356
+ npx -y @synapsor/runner onboard db \
355
357
  --from-env DATABASE_URL \
356
358
  --table account_credits \
357
359
  --mode review \
@@ -370,7 +372,7 @@ but ambiguous post-commit crashes stop for operator reconciliation.
370
372
  Or generate from a saved inspection snapshot without reconnecting:
371
373
 
372
374
  ```bash
373
- npx -y -p @synapsor/runner synapsor-runner init \
375
+ npx -y @synapsor/runner init \
374
376
  --inspection-json schema-inspection.json \
375
377
  --table invoices \
376
378
  --namespace billing \
@@ -440,7 +442,7 @@ contain database URLs or passwords.
440
442
  ## 6. Generate runner files
441
443
 
442
444
  ```bash
443
- npx -y -p @synapsor/runner synapsor-runner init \
445
+ npx -y @synapsor/runner init \
444
446
  --spec onboarding-selection.json \
445
447
  --non-interactive
446
448
  ```
@@ -460,16 +462,16 @@ files.
460
462
  Generate or refresh MCP client snippets later with:
461
463
 
462
464
  ```bash
463
- npx -y -p @synapsor/runner synapsor-runner mcp config generic --config ./synapsor.runner.json --store ./.synapsor/local.db
464
- npx -y -p @synapsor/runner synapsor-runner mcp config claude-desktop --config ./synapsor.runner.json --store ./.synapsor/local.db
465
- npx -y -p @synapsor/runner synapsor-runner mcp config cursor --config ./synapsor.runner.json --store ./.synapsor/local.db
466
- npx -y -p @synapsor/runner synapsor-runner tools preview --config ./synapsor.runner.json --store ./.synapsor/local.db
465
+ synapsor-runner mcp config generic --config ./synapsor.runner.json --store ./.synapsor/local.db
466
+ synapsor-runner mcp config claude-desktop --config ./synapsor.runner.json --store ./.synapsor/local.db
467
+ synapsor-runner mcp config cursor --config ./synapsor.runner.json --store ./.synapsor/local.db
468
+ synapsor-runner tools preview --config ./synapsor.runner.json --store ./.synapsor/local.db
467
469
  ```
468
470
 
469
471
  Call one generated tool locally before wiring an MCP client:
470
472
 
471
473
  ```bash
472
- npx -y -p @synapsor/runner synapsor-runner smoke call --config ./synapsor.runner.json --store ./.synapsor/local.db
474
+ synapsor-runner smoke call --config ./synapsor.runner.json --store ./.synapsor/local.db
473
475
  ```
474
476
 
475
477
  `smoke call` uses the same runtime as the MCP server. It records evidence and
@@ -489,8 +491,8 @@ URLs, passwords, approval tools, commit tools, or write credentials.
489
491
  ## 7. Validate the config
490
492
 
491
493
  ```bash
492
- npx -y -p @synapsor/runner synapsor-runner config validate --config synapsor.runner.json
493
- npx -y -p @synapsor/runner synapsor-runner config show --config synapsor.runner.json --redacted
494
+ npx -y @synapsor/runner config validate --config synapsor.runner.json
495
+ npx -y @synapsor/runner config show --config synapsor.runner.json --redacted
494
496
  ```
495
497
 
496
498
  The config stores environment-variable names, not connection-string values.
@@ -498,7 +500,7 @@ The config stores environment-variable names, not connection-string values.
498
500
  Run doctor after setting the referenced environment variables:
499
501
 
500
502
  ```bash
501
- npx -y -p @synapsor/runner synapsor-runner doctor --config synapsor.runner.json
503
+ npx -y @synapsor/runner doctor --config synapsor.runner.json
502
504
  ```
503
505
 
504
506
  Doctor validates config shape, trusted context env vars, source env vars,
@@ -506,7 +508,7 @@ read/write credential separation, table/column metadata when the read URL is
506
508
  available, and the semantic MCP tool boundary. Use JSON for automation:
507
509
 
508
510
  ```bash
509
- npx -y -p @synapsor/runner synapsor-runner doctor --config synapsor.runner.json --json
511
+ npx -y @synapsor/runner doctor --config synapsor.runner.json --json
510
512
  ```
511
513
 
512
514
  ## 8. Serve semantic MCP tools
@@ -516,7 +518,7 @@ Use stdio when a local MCP client can launch Synapsor Runner:
516
518
  ```bash
517
519
  export SYNAPSOR_TENANT_ID="acme"
518
520
  export SYNAPSOR_PRINCIPAL="local_operator"
519
- npx -y -p @synapsor/runner synapsor-runner mcp serve --config ./synapsor.runner.json --store ./.synapsor/local.db
521
+ npx -y @synapsor/runner mcp serve --config ./synapsor.runner.json --store ./.synapsor/local.db
520
522
  ```
521
523
 
522
524
  Use Streamable HTTP when an app/server agent connects through a standard HTTP
@@ -527,7 +529,7 @@ export SYNAPSOR_TENANT_ID="acme"
527
529
  export SYNAPSOR_PRINCIPAL="local_operator"
528
530
  export SYNAPSOR_RUNNER_HTTP_TOKEN="$(node -e 'process.stdout.write(require("node:crypto").randomBytes(32).toString("base64url"))')"
529
531
 
530
- npx -y -p @synapsor/runner synapsor-runner up --serve \
532
+ npx -y @synapsor/runner up --serve \
531
533
  --config ./synapsor.runner.json \
532
534
  --store ./.synapsor/local.db \
533
535
  --auth-token-env SYNAPSOR_RUNNER_HTTP_TOKEN
@@ -541,7 +543,7 @@ serving.
541
543
  The lower-level MCP command starts the same transport directly:
542
544
 
543
545
  ```bash
544
- npx -y -p @synapsor/runner synapsor-runner mcp serve-streamable-http \
546
+ npx -y @synapsor/runner mcp serve-streamable-http \
545
547
  --config ./synapsor.runner.json \
546
548
  --store ./.synapsor/local.db \
547
549
  --auth-token-env SYNAPSOR_RUNNER_HTTP_TOKEN
@@ -572,10 +574,10 @@ tools, commit tools, database URLs, write credentials, or tenant authority.
572
574
  Proposal tools leave the source database unchanged. Review locally:
573
575
 
574
576
  ```bash
575
- npx -y -p @synapsor/runner synapsor-runner proposals list --store ./.synapsor/local.db
576
- npx -y -p @synapsor/runner synapsor-runner proposals show wrp_123 --store ./.synapsor/local.db
577
- npx -y -p @synapsor/runner synapsor-runner proposals approve wrp_123 --store ./.synapsor/local.db --actor local_reviewer --yes
578
- npx -y -p @synapsor/runner synapsor-runner proposals writeback-job wrp_123 --store ./.synapsor/local.db --output job.json
577
+ npx -y @synapsor/runner proposals list --store ./.synapsor/local.db
578
+ npx -y @synapsor/runner proposals show wrp_123 --store ./.synapsor/local.db
579
+ npx -y @synapsor/runner proposals approve wrp_123 --store ./.synapsor/local.db --actor local_reviewer --yes
580
+ npx -y @synapsor/runner proposals writeback-job wrp_123 --store ./.synapsor/local.db --output job.json
579
581
  ```
580
582
 
581
583
  Apply through the trusted worker path with a separate writer credential:
@@ -583,7 +585,7 @@ Apply through the trusted worker path with a separate writer credential:
583
585
  ```bash
584
586
  export SYNAPSOR_DATABASE_WRITE_URL="<postgres-or-mysql-write-url>"
585
587
  SYNAPSOR_ENGINE=postgres \
586
- npx -y -p @synapsor/runner synapsor-runner apply --job job.json --config synapsor.runner.json --store ./.synapsor/local.db
588
+ npx -y @synapsor/runner apply --job job.json --config synapsor.runner.json --store ./.synapsor/local.db
587
589
  ```
588
590
 
589
591
  For `apply --job ... --config ...`, Runner reads the write credential from the
@@ -597,7 +599,7 @@ from environment variables, and the handler receives a structured proposal/job
597
599
  payload, not arbitrary model SQL:
598
600
 
599
601
  ```bash
600
- npx -y -p @synapsor/runner synapsor-runner apply --proposal wrp_123 --config synapsor.runner.json --store ./.synapsor/local.db
602
+ npx -y @synapsor/runner apply --proposal wrp_123 --config synapsor.runner.json --store ./.synapsor/local.db
601
603
  ```
602
604
 
603
605
  See [Writeback Executors](writeback-executors.md).
@@ -605,8 +607,8 @@ See [Writeback Executors](writeback-executors.md).
605
607
  Replay afterward:
606
608
 
607
609
  ```bash
608
- npx -y -p @synapsor/runner synapsor-runner replay show wrp_123 --store ./.synapsor/local.db
609
- npx -y -p @synapsor/runner synapsor-runner replay export wrp_123 --store ./.synapsor/local.db --output replay.json
610
+ npx -y @synapsor/runner replay show wrp_123 --store ./.synapsor/local.db
611
+ npx -y @synapsor/runner replay export wrp_123 --store ./.synapsor/local.db --output replay.json
610
612
  ```
611
613
 
612
614
  ## Boundary
@@ -24,23 +24,25 @@ Use a disposable or staging database and a dedicated SELECT-only, non-owner
24
24
  credential. Keep row-level security, restricted views, or tenant-bound
25
25
  credentials underneath Runner where available.
26
26
 
27
- Export credentials in the launching shell. Do not put their values in project
28
- files or chat:
27
+ Do not put a database URL in project documentation or chat. The shortest path
28
+ uses a hidden terminal prompt:
29
29
 
30
30
  ```bash
31
- export DATABASE_URL='<staging read-only URL>'
32
- export SYNAPSOR_TENANT_ID='<staging tenant>'
33
- export SYNAPSOR_PRINCIPAL='<staging principal>'
31
+ npx -y @synapsor/runner start
34
32
  ```
35
33
 
36
- Runner requires Node 22.13 or newer.
34
+ Runner can also use an already-exported `DATABASE_URL`. When a regular `.env`
35
+ or `.env.local` file exists, it asks before reading that file and holds the
36
+ selected value only for the current Runner/Workbench process. The URL is not
37
+ written to generated artifacts or the ledger. Runner requires Node 22.13 or
38
+ newer.
37
39
 
38
40
  ## One Command To Workbench
39
41
 
40
42
  Run this from an empty project directory or your application root:
41
43
 
42
44
  ```bash
43
- npx -y @synapsor/runner@latest start --from-env DATABASE_URL
45
+ npx -y @synapsor/runner start
44
46
  ```
45
47
 
46
48
  The command automatically:
@@ -55,15 +57,38 @@ The command automatically:
55
57
  7. opens one secured loopback Workbench URL.
56
58
 
57
59
  Before human activation, the agent has no generated authority and no source row
58
- has been read.
60
+ has been read. On an explicitly asserted personal development database,
61
+ Workbench offers a fast lane:
62
+
63
+ 1. confirm the database is your own development or disposable test data;
64
+ 2. provide the trusted tenant/principal scope for this in-memory session;
65
+ 3. inspect the one-resource summary and select **Activate this narrow read and
66
+ show a real result**.
67
+
68
+ The single gesture is recorded against the exact boundary digest. Runner
69
+ rechecks schema and read-only role posture, activates one resource with no
70
+ relationships, keeps sensitive and uncertain fields out, and runs one real
71
+ bounded aggregate read. Shared, staging, production-like, remote, widening, and
72
+ write paths do not use this shortcut.
59
73
 
60
74
  Running the same command again resumes. Resume and Try do not rescan, rewrite
61
75
  files, or change a digest. Rescan and destructive Start over remain explicit
62
76
  human choices.
63
77
 
78
+ Workbench requires no additional terminal command. If you choose the CLI
79
+ fallbacks below after the first success, install Runner once:
80
+
81
+ ```bash
82
+ npm install -g @synapsor/runner
83
+ ```
84
+
85
+ The remaining examples then use `synapsor-runner` directly instead of
86
+ reacquiring the npm package for every command.
87
+
64
88
  ## Five Minutes: First Safe Read
65
89
 
66
- Workbench starts with an overview, not a permission matrix. It shows:
90
+ The full Workbench path starts with an overview, not a permission matrix. It
91
+ shows:
67
92
 
68
93
  - database and framework evidence found;
69
94
  - resources inspected;
@@ -98,13 +123,40 @@ Source database changed: no
98
123
  CLI fallback:
99
124
 
100
125
  ```bash
101
- npx -y @synapsor/runner@latest try call --list --format json
102
- npx -y @synapsor/runner@latest try call <returned-tool-name> --sample --json
126
+ synapsor-runner try call --list --format json
127
+ synapsor-runner try call <returned-tool-name> --sample --json
103
128
  ```
104
129
 
105
130
  The second command is for an activated named tool with valid generated sample
106
131
  input. It does not invent tenant or principal values.
107
132
 
133
+ ## Optional: Ask Through Your Own Model
134
+
135
+ The no-model Workbench composer is already complete; a provider key is never
136
+ required for onboarding. If you want a chat surface before installing Cursor
137
+ or another MCP client, open **Analyze -> Ask with your model**.
138
+
139
+ Workbench shows the exact reviewed tools first. Select OpenAI, Anthropic, or a
140
+ custom OpenAI-compatible endpoint, choose a named environment credential or a
141
+ session-only masked paste, and acknowledge that reviewed visible data may go
142
+ directly to that provider. Synapsor does not relay it.
143
+
144
+ The provider can request only the displayed tools. It cannot choose trusted
145
+ scope, activate or Protect authority, approve or apply a proposal, or configure
146
+ Runner. A write request produces the same inert proposal as external MCP:
147
+
148
+ ```text
149
+ Proposal only
150
+ Source database changed: no
151
+ The model cannot approve or apply this proposal.
152
+ ```
153
+
154
+ Changing the provider, model, endpoint, runtime config, or reviewed boundary
155
+ requires a new egress acknowledgement. Select **Clear** to cancel and discard
156
+ the in-memory provider configuration and conversation. See [Workbench Ask With
157
+ Your Model](workbench-ask.md) for key handling, endpoint security, fixed bounds,
158
+ the tested provider matrix, and the full no-model alternative.
159
+
108
160
  ## Ten Minutes: Explore And Protect
109
161
 
110
162
  Scoped Explore is available only after its exact local authoring boundary is
@@ -122,7 +174,14 @@ The first release supports bounded:
122
174
  - reviewed categorical dimensions;
123
175
  - day, week, and month buckets;
124
176
  - typed filters and bounded top-N;
125
- - at most one reviewed many-to-one relationship.
177
+ - up to three activated relationship paths, each containing one or two
178
+ catalog-proven many-to-one links with fan-out one.
179
+
180
+ If a question needs an inactive but proven path, Runner refuses it and
181
+ Workbench offers only that exact path for operator review. The model cannot
182
+ activate it. Optional links require an explicit missing-row choice because
183
+ excluding a row versus retaining an empty group can change business totals.
184
+ See [Reviewed Relationship Paths](reviewed-relationships.md).
126
185
 
127
186
  Minimum cohorts, group limits, response limits, query limits, extraction
128
187
  budgets, and anti-differencing budgets are fixed by the activated boundary.
@@ -132,7 +191,7 @@ not prove causation.
132
191
  CLI fallback for the Workbench-suggested aggregate:
133
192
 
134
193
  ```bash
135
- npx -y @synapsor/runner@latest try explore --suggested --json
194
+ synapsor-runner try explore --suggested --json
136
195
  ```
137
196
 
138
197
  Choose **Protect this analysis** directly on the successful result. Runner
@@ -148,10 +207,16 @@ synapsor/protected/drafts/<namespace>__<name>/contract-tests.json
148
207
  The capability remains disabled until a human activates its exact digest.
149
208
  Disabling Scoped Explore does not remove the protected named capability.
150
209
 
210
+ Workbench renders generated `.synapsor.sql` with local deterministic syntax
211
+ highlighting. Keywords, names chosen by the author, strings, numbers, comments,
212
+ and punctuation are visually distinct. The copy/plain-text value remains
213
+ byte-identical to the generated file; highlighting loads no CDN and escaped
214
+ source text never becomes HTML.
215
+
151
216
  CLI fallback, without copying an opaque query handle:
152
217
 
153
218
  ```bash
154
- npx -y @synapsor/runner@latest try protect \
219
+ synapsor-runner try protect \
155
220
  --name analytics.reviewed_weekly_summary \
156
221
  --json
157
222
  ```
@@ -189,15 +254,15 @@ The model cannot approve or apply this proposal.
189
254
  Inspect the latest lifecycle without copying a proposal ID:
190
255
 
191
256
  ```bash
192
- npx -y @synapsor/runner@latest lifecycle --details
257
+ synapsor-runner lifecycle --details
193
258
  ```
194
259
 
195
260
  Approval and apply stay outside MCP:
196
261
 
197
262
  ```bash
198
- npx -y @synapsor/runner@latest proposals approve latest --yes
199
- npx -y @synapsor/runner@latest apply latest
200
- npx -y @synapsor/runner@latest lifecycle show latest --details
263
+ synapsor-runner proposals approve latest --yes
264
+ synapsor-runner apply latest
265
+ synapsor-runner lifecycle show latest --details
201
266
  ```
202
267
 
203
268
  Production should use a verified signed-key or OIDC operator identity rather
@@ -218,7 +283,7 @@ Apply](supervised-automatic-apply.md).
218
283
  Preview is always the default:
219
284
 
220
285
  ```bash
221
- npx -y @synapsor/runner@latest writeback setup \
286
+ synapsor-runner writeback setup \
222
287
  --profile staging \
223
288
  --json
224
289
  ```
@@ -238,7 +303,7 @@ DDL apply is refused for missing, unknown, or production profiles. In
238
303
  development/staging, it requires the exact displayed confirmation:
239
304
 
240
305
  ```bash
241
- npx -y @synapsor/runner@latest writeback setup \
306
+ synapsor-runner writeback setup \
242
307
  --profile staging \
243
308
  --writer-role '<steady-state-writer-role>' \
244
309
  --setup-url-env SYNAPSOR_SETUP_DATABASE_URL \
@@ -250,20 +315,22 @@ Never reuse the model/read credential as the elevated setup connection.
250
315
 
251
316
  ## Connect An MCP Client
252
317
 
253
- Workbench generates ready-to-copy Cursor, Claude, Codex, and generic stdio
254
- snippets for the same reviewed authority. Stdio opens no network listener and
255
- needs no HTTP bearer credential.
318
+ Workbench generates ready-to-copy Cursor, Claude Code/Desktop, VS Code, Codex,
319
+ and generic stdio snippets for the same reviewed authority. Stdio opens no
320
+ network listener and needs no HTTP bearer credential.
256
321
 
257
322
  Render the generic snippet:
258
323
 
259
324
  ```bash
260
- npx -y @synapsor/runner@latest mcp config --absolute-paths
325
+ synapsor-runner mcp config --absolute-paths
261
326
  ```
262
327
 
263
- Preview a project-scoped Cursor change:
328
+ Preview a managed project change for the client you use:
264
329
 
265
330
  ```bash
266
- npx -y @synapsor/runner@latest mcp install cursor --project --dry-run
331
+ synapsor-runner mcp install claude-code --project --dry-run
332
+ synapsor-runner mcp install cursor --project --dry-run
333
+ synapsor-runner mcp install vscode --project --dry-run
267
334
  ```
268
335
 
269
336
  No client config contains database URLs, trusted scope values, approval,
@@ -275,7 +342,7 @@ Commands that support machine output write exactly one JSON value to stdout.
275
342
  Operational logs and diagnostics use stderr:
276
343
 
277
344
  ```bash
278
- npx -y @synapsor/runner@latest try explore --suggested --json | jq -e .
345
+ synapsor-runner try explore --suggested --json | jq -e .
279
346
  ```
280
347
 
281
348
  On a process-level failure, JSON output uses:
@@ -315,17 +382,20 @@ The guided path through the first proposal uses:
315
382
  - no Cursor requirement.
316
383
 
317
384
  The packed FitFlow gate records the exact command count, human decisions, and
318
- timings in `development/runner-1.6.3-fitflow-results.json`.
385
+ timings in `development/runner-1.6.4-fitflow-results.json`.
319
386
 
320
387
  ## Visual Reference
321
388
 
322
389
  Repository screenshots cover desktop, mobile, light, dark, loading, blocked,
323
- stale, failure, empty Protect, and unavailable-action states:
324
-
325
- - [Desktop overview](https://github.com/Synapsor/Synapsor-Runner/blob/main/development/runner-1.6.3-visual/workbench-overview-desktop-light.png)
326
- - [Mobile overview](https://github.com/Synapsor/Synapsor-Runner/blob/main/development/runner-1.6.3-visual/workbench-overview-mobile-light.png)
327
- - [Blocked identity review](https://github.com/Synapsor/Synapsor-Runner/blob/main/development/runner-1.6.3-visual/workbench-blocked-identity.png)
328
- - [Stale/failure recovery](https://github.com/Synapsor/Synapsor-Runner/blob/main/development/runner-1.6.3-visual/workbench-keyboard-stale-failure.png)
390
+ stale, failure, empty Protect, unavailable-action, optional Ask, refusal, and
391
+ proposal-only states:
392
+
393
+ - [Desktop overview](https://github.com/Synapsor/Synapsor-Runner/blob/main/development/runner-1.6.4-visual/workbench-overview-desktop-light.png)
394
+ - [Mobile overview](https://github.com/Synapsor/Synapsor-Runner/blob/main/development/runner-1.6.4-visual/workbench-overview-mobile-light.png)
395
+ - [Blocked identity review](https://github.com/Synapsor/Synapsor-Runner/blob/main/development/runner-1.6.4-visual/workbench-blocked-identity.png)
396
+ - [Stale/failure recovery](https://github.com/Synapsor/Synapsor-Runner/blob/main/development/runner-1.6.4-visual/workbench-keyboard-stale-failure.png)
397
+ - [Ask kept-out-field refusal](https://github.com/Synapsor/Synapsor-Runner/blob/main/development/runner-1.6.4-retail-visual/05c-ask-refusal.png)
398
+ - [Ask proposal-only result](https://github.com/Synapsor/Synapsor-Runner/blob/main/development/runner-1.6.4-community-solar-visual/13b-ask-proposal-only.png)
329
399
 
330
400
  For common blocked states and one-action recovery commands, use
331
401
  [Troubleshooting First Run](troubleshooting-first-run.md).
@@ -1,7 +1,7 @@
1
1
  # MCP Host Compatibility
2
2
 
3
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
4
+ reviewed on 2026-07-25. A working MCP SDK handshake is not presented as proof
5
5
  that a specific editor renders an extension or protects app-only controls.
6
6
 
7
7
  | Host/surface | Status | Evidence and boundary |
@@ -14,32 +14,45 @@ that a specific editor renders an extension or protects app-only controls.
14
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
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
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. |
17
+ | Claude Code project `.mcp.json` lifecycle | Configuration-tested and protocol-tested | Runner install/status/uninstall tests cover preview, merge, backup, idempotency, ownership, tamper refusal, exact-version wiring, and the exact reviewed `tools/list`. Local Claude Code version observed: 2.1.220. A manual model-driven proposal call remains a release gate. |
18
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. |
19
+ | VS Code project `.vscode/mcp.json` lifecycle | Configuration-tested and protocol-tested | Runner install/status/uninstall tests cover JSONC-preserving merge, backup, idempotency, ownership, tamper refusal, exact-version wiring, and the exact reviewed `tools/list`. Local VS Code version observed: 1.123.0. Manual editor UI behavior is not claimed. |
20
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
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
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
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
24
 
25
- ## Cursor Project Setup
25
+ ## Managed Project Setup
26
26
 
27
- Current Cursor documentation supports project MCP configuration in
28
- `.cursor/mcp.json`. Runner manages only its `synapsor` entry:
27
+ Runner manages only its `synapsor` entry in each supported project-local
28
+ configuration:
29
29
 
30
30
  ```bash
31
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
32
+ synapsor-runner mcp install claude-code --project --dry-run
33
+ synapsor-runner mcp install vscode --project --dry-run
34
+
35
+ synapsor-runner mcp install claude-code --project --yes
36
+ synapsor-runner mcp status claude-code --project --check-launch
34
37
  ```
35
38
 
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
+ Cursor uses `.cursor/mcp.json` and `mcpServers`; Claude Code uses `.mcp.json`
40
+ and `mcpServers`; VS Code uses `.vscode/mcp.json` and `servers`. The generated
41
+ entry contains command paths and an exact package version only. Database
42
+ credentials and trusted tenant/principal values must come from the environment
43
+ that launches Runner. Other servers and project settings are preserved.
44
+
45
+ `--dry-run` never writes. An approved install creates a backup and an integrity
46
+ marker. A repeated install is idempotent; uninstall removes only an unchanged,
47
+ Runner-owned entry. Claude Code still requires its own human project-server
48
+ approval, and VS Code still requires the operator to reload/start the server.
49
+ Those host actions do not grant Synapsor approval or commit authority.
39
50
 
40
51
  Primary references:
41
52
 
42
53
  - [Cursor MCP documentation](https://cursor.com/docs/context/mcp)
54
+ - [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp)
55
+ - [VS Code MCP servers](https://code.visualstudio.com/docs/agent-customization/mcp-servers)
43
56
  - [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
44
57
  - [MCP Apps specification](https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx)
45
58