@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
package/docs/README.md CHANGED
@@ -22,6 +22,9 @@ no-database demo, wire your database, then read deeper concepts.
22
22
  five-minute first read, ten-minute Explore to Protect, fifteen-minute
23
23
  proposal, resumable setup, guarded development writeback, and host-neutral
24
24
  client handoff.
25
+ - [Workbench Ask With Your Model](workbench-ask.md): optional local OpenAI,
26
+ Anthropic, and custom-provider chat over the exact reviewed tool surface,
27
+ with direct-egress consent, session-only credentials, and no added authority.
25
28
  - [Troubleshooting First Run](troubleshooting-first-run.md): common first-run
26
29
  failures, redacted diagnostics, and fixes.
27
30
 
@@ -58,6 +61,9 @@ no-database demo, wire your database, then read deeper concepts.
58
61
  whole staging application, review one digest-bound boundary, ask bounded row
59
62
  and PM-style aggregate questions in Cursor, and turn a useful query into a
60
63
  disabled named production capability.
64
+ - [Workbench Ask With Your Model](workbench-ask.md): use the same reviewed
65
+ tools from Workbench without requiring Cursor or giving the model activation,
66
+ approval, or apply authority.
61
67
  - [Connect Your Own Database](getting-started-own-database.md): inspect a
62
68
  staging Postgres/MySQL database through the new whole-schema path or an
63
69
  established one-object/headless route.
@@ -120,9 +126,17 @@ no-database demo, wire your database, then read deeper concepts.
120
126
  policy outcomes, tenant handling, and hidden-field behavior.
121
127
  - [Bounded Aggregate Reads](aggregate-reads.md): fixed production scalar
122
128
  aggregates plus the separate authoring-only reviewed aggregate Explore path.
129
+ - [Reviewed Relationship Paths](reviewed-relationships.md): catalog-proven
130
+ star/depth-two aggregate paths, demand-driven operator review, nullable-link
131
+ semantics, per-relation scope, and the permanent no-general-join boundary.
132
+ - [Reviewed Database Views](reviewed-database-views.md): expose a reviewed
133
+ derived measure without adding formulas or SQL to the model-facing planner.
123
134
 
124
135
  ## 06 Serve MCP
125
136
 
137
+ - [Workbench Ask With Your Model](workbench-ask.md): optional secured-loopback
138
+ client, provider matrix, key/egress lifecycle, endpoint controls, and exact
139
+ parity with the normal MCP runtime.
126
140
  - [Host Compatibility](host-compatibility.md): exact Tested,
127
141
  Protocol-tested, Unsupported, and Unknown claims for Cursor and other MCP
128
142
  hosts, including the inline-review fallback.
@@ -52,7 +52,7 @@ Run:
52
52
  ```bash
53
53
  node --version
54
54
  test -n "${DATABASE_URL:-}"
55
- npx -y @synapsor/runner@latest --version
55
+ npx -y @synapsor/runner --version
56
56
  ```
57
57
 
58
58
  Do not run `echo "$DATABASE_URL"` or otherwise reveal its value. Runner
@@ -77,7 +77,7 @@ it into chat, then ask me to continue.
77
77
  From the intended project directory, run:
78
78
 
79
79
  ```bash
80
- npx -y @synapsor/runner@latest start --from-env DATABASE_URL
80
+ npx -y @synapsor/runner start --from-env DATABASE_URL
81
81
  ```
82
82
 
83
83
  For a fresh interactive project, Runner performs metadata-only inspection,
@@ -118,7 +118,7 @@ The coding agent may verify the active local surface without copying an opaque
118
118
  handle:
119
119
 
120
120
  ```bash
121
- npx -y @synapsor/runner@latest try call --list --format json
121
+ npx -y @synapsor/runner try call --list --format json
122
122
  ```
123
123
 
124
124
  If no named capability is active yet, that is expected: a temporary local
@@ -134,14 +134,14 @@ for the user.
134
134
  After the human activates a protected named capability, run:
135
135
 
136
136
  ```bash
137
- npx -y @synapsor/runner@latest try call --list --format json
137
+ npx -y @synapsor/runner try call --list --format json
138
138
  ```
139
139
 
140
140
  Use the tool name returned by that command. For a tool with generated sample
141
141
  input, run:
142
142
 
143
143
  ```bash
144
- npx -y @synapsor/runner@latest try call <tool-name> --sample --json
144
+ npx -y @synapsor/runner try call <tool-name> --sample --json
145
145
  ```
146
146
 
147
147
  Do not invent tenant or principal arguments. Trusted scope comes from the
@@ -161,7 +161,8 @@ Next: connect the same reviewed tool surface to your MCP client.
161
161
  Workbench displays ready-to-copy configurations for:
162
162
 
163
163
  - Cursor project MCP;
164
- - Claude-compatible local stdio MCP;
164
+ - Claude Code project MCP and Claude-compatible local stdio MCP;
165
+ - VS Code project MCP;
165
166
  - Codex;
166
167
  - generic stdio MCP.
167
168
 
@@ -171,17 +172,18 @@ authority surface.
171
172
  For a terminal-rendered generic configuration, run:
172
173
 
173
174
  ```bash
174
- npx -y @synapsor/runner@latest mcp config --absolute-paths
175
+ synapsor-runner mcp config --absolute-paths
175
176
  ```
176
177
 
177
- Do not write into a client configuration without explicit user consent. Cursor
178
- has a separate consent-gated installer:
178
+ Do not write into a client configuration without explicit user consent.
179
+ Cursor, Claude Code, and VS Code have consent-gated project installers:
179
180
 
180
181
  ```bash
181
- npx -y @synapsor/runner@latest mcp install cursor --project --dry-run
182
+ synapsor-runner mcp install claude-code --project --dry-run
182
183
  ```
183
184
 
184
- Show the dry-run result first. Installation remains a human choice.
185
+ Use `cursor` or `vscode` instead when that is the selected client. Show the
186
+ dry-run result first. Installation remains a human choice.
185
187
 
186
188
  ## Guided Write Action
187
189
 
@@ -61,11 +61,20 @@ suppression reduces single-record inference; it does not solve every statistical
61
61
  inference risk. Review the underlying view, database role, and aggregation
62
62
  policy as well.
63
63
 
64
+ For a derived measure, keep formulas and joins out of the model-facing grammar.
65
+ Define them in a reviewed database view and expose only a typed view column
66
+ through the fixed aggregate capability. The complete hardened PostgreSQL
67
+ pattern and runnable retail example are in [Reviewed Database Views For Derived
68
+ Measures](reviewed-database-views.md).
69
+
64
70
  Scoped Aggregate Explore reuses and extends this suppression machinery. Its
65
71
  reviewed boundary additionally fixes aggregate-safe measures,
66
72
  `count_distinct` identifiers, dimensions, day/week/month buckets, typed
67
- filters, optional one-hop proven many-to-one relationships, maximum groups,
68
- response/query/rate limits, and durable extraction/differencing budgets. A
69
- field may be approved for `count_distinct` while its raw values remain hidden.
70
- Production receives only the protected named capability; broad Explore is
71
- absent from production `tools/list`.
73
+ filters, up to three activated relationship paths (one or two proven
74
+ many-to-one links per path), maximum groups, response/query/rate limits, and
75
+ durable extraction/differencing budgets. A field may be approved for
76
+ `count_distinct` while its raw values remain hidden. Relationship paths remain
77
+ catalog-proven, operator-activated authority; the model cannot supply join
78
+ identifiers or activate an inactive path. See [Reviewed Relationship
79
+ Paths](reviewed-relationships.md). Production receives only the protected named
80
+ capability; broad Explore is absent from production `tools/list`.
@@ -24,12 +24,11 @@ the receipt, and includes the result in replay.
24
24
  > error receipts. If you skip those checks, you can reintroduce cross-tenant
25
25
  > writes, lost updates, or duplicate writes. Keep handler credentials out of MCP.
26
26
 
27
- Runner 1.6.1 strict `proposal_freshness` is limited to same-database direct SQL
28
- writeback. Runner rejects it for `http_handler`, `command_handler`, and
29
- cross-source dependencies because a local preflight cannot be atomic with an
30
- effect executed elsewhere. If supporting evidence matters, the app handler
31
- must lock and re-read those rows inside its own business transaction and fail
32
- closed on drift. See
27
+ Strict `proposal_freshness` is limited to same-database direct SQL writeback.
28
+ Runner rejects it for `http_handler`, `command_handler`, and cross-source
29
+ dependencies because a local preflight cannot be atomic with an effect executed
30
+ elsewhere. If supporting evidence matters, the app handler must lock and re-read
31
+ those rows inside its own business transaction and fail closed on drift. See
33
32
  [Proposal And Evidence Freshness](proposal-evidence-freshness.md).
34
33
 
35
34
  A handler is your application endpoint or script. It is not a second Synapsor
@@ -1,6 +1,6 @@
1
1
  # Auto Boundary, Scoped Explore, And Protect
2
2
 
3
- Runner 1.6.3 provides a deterministic, resumable authoring path for a real
3
+ Runner 1.6.4 provides a deterministic, resumable authoring path for a real
4
4
  application:
5
5
 
6
6
  ```text
@@ -26,7 +26,14 @@ controls underneath Runner. PostgreSQL deployments should use forced row-level
26
26
  security (RLS) where possible; MySQL deployments should use restricted views or
27
27
  tenant-bound credentials.
28
28
 
29
- Export the connection and trusted context in the process that Cursor will use:
29
+ The shortest first run accepts a hidden URL paste or asks before reading
30
+ `DATABASE_URL` from a regular project `.env`:
31
+
32
+ ```bash
33
+ npx -y @synapsor/runner start
34
+ ```
35
+
36
+ For an explicit environment-driven staging run:
30
37
 
31
38
  ```bash
32
39
  export DATABASE_URL='postgresql://runner_reader:REPLACE_ME@127.0.0.1:5432/app'
@@ -109,13 +116,19 @@ candidates start disabled. Auto Boundary never replaces an active contract.
109
116
  No source rows, credentials, tenant values, or principal values are written to
110
117
  these files.
111
118
 
119
+ Workbench previews generated DSL with a local deterministic highlighter. It
120
+ distinguishes DSL keywords from reviewer-defined names, strings, numbers,
121
+ comments, and punctuation while preserving byte-identical plain/copy text.
122
+ Rendering uses escaped DOM text and no external CDN; if highlighting fails, the
123
+ same safe plain source remains visible.
124
+
112
125
  ## Review The Boundary
113
126
 
114
127
  The Workbench requires a human to narrow and confirm:
115
128
 
116
129
  - development or staging deployment profile;
117
130
  - trusted tenant and principal bindings supplied outside model arguments;
118
- - included resources and one-hop relationships;
131
+ - included resources and catalog-proven relationship paths;
119
132
  - selectable fields;
120
133
  - filterable fields and allowed operators;
121
134
  - sortable and groupable fields;
@@ -163,23 +176,55 @@ dependencies. The packed FitFlow gate proves Workbench, CLI Try, and an
163
176
  official-SDK generic stdio client produce the same bounded result and denial
164
177
  behavior.
165
178
 
166
- ## Add The Authoring Tools To Cursor
179
+ ## Optional Workbench Ask Client
180
+
181
+ After the no-model composer succeeds, Workbench can optionally send a
182
+ plain-language question to a developer-selected model provider. This adds a
183
+ client, not authority:
184
+
185
+ ```text
186
+ provider request
187
+ -> exact active Workbench tool registry
188
+ -> official MCP SDK
189
+ -> existing Scoped Explore/runtime validator
190
+ -> reviewed bounded result or refusal
191
+ ```
192
+
193
+ While Explore is active, the provider sees only `app.describe_data` and
194
+ `app.explore_data`. After Protect and Explore shutdown, it sees only activated
195
+ named capabilities. It never receives Protect, activation, approval, apply,
196
+ worker, notification, recovery, credential, or filesystem tools.
197
+
198
+ Provider/model/origin and the exact authority digest require explicit
199
+ direct-egress acknowledgement. Keys come from the local Runner process
200
+ environment or a session-only masked paste; configuration and history remain
201
+ in memory and are cleared on request or shutdown. Ask is restricted to secured
202
+ loopback Workbench in development/staging and is absent from production and
203
+ shared/remote surfaces.
204
+
205
+ The no-model composer, CLI Try, and external MCP routes remain fully supported
206
+ when no provider is configured or a provider is unavailable. See [Workbench
207
+ Ask With Your Model](workbench-ask.md).
208
+
209
+ ## Add The Authoring Tools To A Project MCP Client
167
210
 
168
211
  After activation, let Runner manage only its own project entry:
169
212
 
170
213
  ```bash
171
- synapsor-runner mcp install cursor \
214
+ synapsor-runner mcp install claude-code \
172
215
  --project \
173
216
  --authoring \
174
217
  --project-root . \
175
218
  --yes
176
219
 
177
- synapsor-runner mcp status cursor --project
220
+ synapsor-runner mcp status claude-code --project
178
221
  ```
179
222
 
180
- The Cursor config contains command paths and package identity, not database
181
- URLs, credential values, tenant values, or principal values. Authoring mode
182
- uses local stdio and advertises exactly:
223
+ Use `cursor` or `vscode` instead of `claude-code` for those clients. Runner
224
+ manages `.cursor/mcp.json`, `.mcp.json`, or `.vscode/mcp.json` and preserves
225
+ unrelated entries. The client config contains command paths and package
226
+ identity, not database URLs, credential values, tenant values, or principal
227
+ values. Authoring mode uses local stdio and advertises exactly:
183
228
 
184
229
  ```text
185
230
  app.describe_data
@@ -219,8 +264,9 @@ analytics database tool. It supports:
219
264
  - bounded top-N results;
220
265
  - at most two reviewed time ranges;
221
266
  - one resource by default;
222
- - at most one inspected, reviewed many-to-one foreign-key path with maximum
223
- fan-out one.
267
+ - up to three activated relationship paths in one plan;
268
+ - one or two inspected, reviewed many-to-one foreign-key links per path, each
269
+ with maximum fan-out one.
224
270
 
225
271
  It does not support arbitrary `DISTINCT`, `HAVING`, formulas, window functions,
226
272
  unions, nested queries, many-to-many joins, system catalogs, user-defined
@@ -228,6 +274,14 @@ functions, or a general join planner. Scope is enforced independently on every
228
274
  participating relation. Runner refuses a plan when cardinality, fan-out,
229
275
  counted entity, or scope cannot be proven.
230
276
 
277
+ Auto Boundary does not activate every discovered path. When a useful question
278
+ needs one inactive but catalog-proven path, Runner refuses the plan and stages
279
+ that exact path for operator review. Workbench shows the foreign-key proof and,
280
+ for optional links, requires an explicit choice between excluding the unmatched
281
+ counted row and keeping it with an empty group value. Activating the new exact
282
+ digest is an operator-plane action; the model cannot perform it. See
283
+ [Reviewed Relationship Paths](reviewed-relationships.md).
284
+
231
285
  Before returning groups, Runner enforces the reviewed minimum cohort size.
232
286
  Small groups are suppressed and revealing totals are withheld. Durable
233
287
  per-session extraction and differencing budgets block repeated slightly
@@ -280,7 +334,7 @@ handles.
280
334
 
281
335
  Choose the useful query in Workbench. Protect freezes:
282
336
 
283
- - resources and reviewed relationship path;
337
+ - resources and reviewed relationship paths;
284
338
  - counted entity, measures, dimensions, and bucket structure;
285
339
  - filters, ordering, top-N, and comparison shape;
286
340
  - tenant/principal as trusted bindings;
@@ -306,16 +360,18 @@ join-safety, deny, drift, and boundary tests. It becomes active only after a
306
360
  human reviews and confirms its exact contract digest outside MCP.
307
361
 
308
362
  When activation disables temporary Explore, the named capability remains
309
- available. Update Cursor from authoring mode to the production config:
363
+ available. Update the selected project client from authoring mode to the
364
+ production config:
310
365
 
311
366
  ```bash
312
- synapsor-runner mcp install cursor \
367
+ synapsor-runner mcp install claude-code \
313
368
  --project \
314
369
  --config ./synapsor.runner.json \
315
370
  --store ./.synapsor/local.db \
316
371
  --yes
317
372
  ```
318
373
 
374
+ Again, substitute `cursor` or `vscode` for the selected client.
319
375
  Production then advertises only reviewed named capabilities. It does not
320
376
  advertise `app.explore_data`.
321
377
 
@@ -406,8 +406,8 @@ surface.
406
406
  ### Optional Live Freshness
407
407
 
408
408
  The proposal's exact `conflict_guard` already protects its target at apply.
409
- Runner 1.6.1 can additionally recheck that target before local approval and can
410
- bind explicitly reviewed supporting rows to both approval and apply.
409
+ Runner can additionally recheck that target before local approval and bind
410
+ explicitly reviewed supporting rows to both approval and apply.
411
411
 
412
412
  This is deployment wiring, not DSL or canonical contract syntax:
413
413
 
@@ -33,7 +33,7 @@ Run from the Runner repository root after supplying your own environment-bound
33
33
  staging credentials and trusted scope:
34
34
 
35
35
  ```bash
36
- npx -y -p @synapsor/runner synapsor-runner tools preview \
36
+ npx -y @synapsor/runner tools preview \
37
37
  --config ./examples/support-plan-credit/synapsor.runner.json \
38
38
  --store ./tmp/support-plan-credit/local.db
39
39
  ```
@@ -89,17 +89,30 @@ list. Then ask for the shared proposal call.
89
89
 
90
90
  ## Claude Code
91
91
 
92
- **Status:** configuration-tested with Claude Code 2.1.216 and
92
+ **Status:** managed project configuration-tested with Claude Code 2.1.220 and
93
93
  protocol-tested; a manual model-driven call remains a release gate.
94
94
 
95
- Run the checked command from the repository root:
95
+ Use Runner's owned project lifecycle:
96
96
 
97
97
  ```bash
98
- bash ./examples/support-plan-credit/mcp-client-examples/claude-code.sh
98
+ synapsor-runner mcp install claude-code --project --dry-run \
99
+ --config ./examples/support-plan-credit/synapsor.runner.json \
100
+ --store ./tmp/support-plan-credit/local.db
101
+ synapsor-runner mcp install claude-code --project --yes \
102
+ --config ./examples/support-plan-credit/synapsor.runner.json \
103
+ --store ./tmp/support-plan-credit/local.db
104
+ synapsor-runner mcp status claude-code --project --check-launch
99
105
  ```
100
106
 
101
- Claude Code records project-scoped MCP configuration without embedding source
102
- credentials. It will print the exact proposal prompt after configuration.
107
+ Runner merges only `mcpServers.synapsor` into the project `.mcp.json`, creates
108
+ a backup, pins the exact Runner version, and never embeds source credentials.
109
+ Restart or open a new Claude Code project session, approve the project server
110
+ when prompted, and make the shared proposal call. Remove only Runner's intact
111
+ entry with `synapsor-runner mcp uninstall claude-code --project --yes`.
112
+
113
+ The older checked shell recipe remains available for users who intentionally
114
+ prefer Claude Code's own configuration command:
115
+ [`claude-code.sh`](../examples/support-plan-credit/mcp-client-examples/claude-code.sh).
103
116
 
104
117
  Official source checked 2026-07-20:
105
118
  [Claude Code MCP](https://code.claude.com/docs/en/mcp).
@@ -120,13 +133,29 @@ Official source checked 2026-07-20:
120
133
 
121
134
  ## VS Code
122
135
 
123
- **Status:** configuration-parsed and protocol-tested; manual VS Code UI
124
- behavior is not claimed.
136
+ **Status:** managed project configuration-tested with VS Code 1.123.0 and
137
+ protocol-tested; manual VS Code UI behavior is not claimed.
138
+
139
+ Use Runner's owned project lifecycle:
140
+
141
+ ```bash
142
+ synapsor-runner mcp install vscode --project --dry-run \
143
+ --config ./examples/support-plan-credit/synapsor.runner.json \
144
+ --store ./tmp/support-plan-credit/local.db
145
+ synapsor-runner mcp install vscode --project --yes \
146
+ --config ./examples/support-plan-credit/synapsor.runner.json \
147
+ --store ./tmp/support-plan-credit/local.db
148
+ synapsor-runner mcp status vscode --project --check-launch
149
+ ```
150
+
151
+ Runner merges only `servers.synapsor` into `.vscode/mcp.json`, preserves JSONC
152
+ comments and trailing commas, creates a backup, and pins the exact Runner
153
+ version. Reload the VS Code window, start the server, inspect the listed tools,
154
+ and ask for the shared proposal call. Remove only Runner's intact entry with
155
+ `synapsor-runner mcp uninstall vscode --project --yes`.
125
156
 
126
- Copy or merge
127
- [`vscode.mcp.json`](../examples/support-plan-credit/mcp-client-examples/vscode.mcp.json)
128
- into `.vscode/mcp.json`. Start the server from VS Code, inspect the listed
129
- tools, and ask for the shared proposal call.
157
+ The checked standalone template remains available at
158
+ [`vscode.mcp.json`](../examples/support-plan-credit/mcp-client-examples/vscode.mcp.json).
130
159
 
131
160
  Official source checked 2026-07-20:
132
161
  [VS Code MCP servers](https://code.visualstudio.com/docs/agent-customization/mcp-servers).
@@ -88,17 +88,17 @@ cp .env.example .env
88
88
  # Fill the placeholders in .env, including the one-time Runner token.
89
89
  set -a && . ./.env && set +a
90
90
 
91
- npx -y -p @synapsor/runner synapsor-runner config validate --config ./synapsor.runner.json
92
- npx -y -p @synapsor/runner synapsor-runner tools preview --config ./synapsor.runner.json --store ./.synapsor/local.db
93
- npx -y -p @synapsor/runner synapsor-runner cloud connect --config ./synapsor.cloud.json
94
- npx -y -p @synapsor/runner synapsor-runner mcp serve --config ./synapsor.runner.json --store ./.synapsor/local.db
91
+ npx -y @synapsor/runner config validate --config ./synapsor.runner.json
92
+ npx -y @synapsor/runner tools preview --config ./synapsor.runner.json --store ./.synapsor/local.db
93
+ npx -y @synapsor/runner cloud connect --config ./synapsor.cloud.json
94
+ npx -y @synapsor/runner mcp serve --config ./synapsor.runner.json --store ./.synapsor/local.db
95
95
  ```
96
96
 
97
97
  Run the trusted worker in a second operator-controlled terminal:
98
98
 
99
99
  ```bash
100
100
  set -a && . ./.env && set +a
101
- npx -y -p @synapsor/runner synapsor-runner runner start --config ./synapsor.runner.json --store ./.synapsor/local.db
101
+ npx -y @synapsor/runner runner start --config ./synapsor.runner.json --store ./.synapsor/local.db
102
102
  ```
103
103
 
104
104
  For deployment checks or an operator-controlled single claim cycle, use the
@@ -107,13 +107,13 @@ Cloud-approved job and still rechecks the local contract, proposal, tenant,
107
107
  version, bounds, and idempotency guards:
108
108
 
109
109
  ```bash
110
- npx -y -p @synapsor/runner synapsor-runner runner start --once --config ./synapsor.runner.json --store ./.synapsor/local.db
110
+ npx -y @synapsor/runner runner start --once --config ./synapsor.runner.json --store ./.synapsor/local.db
111
111
  ```
112
112
 
113
113
  When a local proposal exists:
114
114
 
115
115
  ```bash
116
- npx -y -p @synapsor/runner synapsor-runner cloud sync latest --config ./synapsor.cloud.json --store ./.synapsor/local.db
116
+ npx -y @synapsor/runner cloud sync latest --config ./synapsor.cloud.json --store ./.synapsor/local.db
117
117
  ```
118
118
 
119
119
  See [Cloud Push](cloud-push.md) and [Runner Bundles](runner-bundles.md).
@@ -64,9 +64,12 @@ bound to a required trusted principal and AND-composed with tenant scope. Run
64
64
  same-tenant denial and shared-ledger evidence-handle isolation.
65
65
  The protected-read parity fixture proves digest- and generation-lock-bound
66
66
  named reads, fixed predicates, reviewed measures/dimensions/time buckets,
67
- one-hop many-to-one limits, suppression, response/query/extraction/
68
- differencing budgets, and rejection of raw SQL or model-controlled trusted
69
- scope. `corepack pnpm test:auto-boundary-explore:packed` proves the complete
67
+ catalog-proven one-hop/star/depth-two many-to-one limits, suppression,
68
+ response/query/extraction/differencing budgets, and rejection of raw SQL or
69
+ model-controlled trusted scope. `corepack pnpm test:reviewed-relationships`
70
+ proves direct and depth-two paths, per-relation scope, nullable semantics,
71
+ demand-driven activation, and fan-out refusal on live PostgreSQL/MySQL.
72
+ `corepack pnpm test:auto-boundary-explore:packed` proves the complete
70
73
  authoring-to-production behavior through packed public artifacts.
71
74
 
72
75
  Additional 0.1 parity coverage currently lives in tests and verification
@@ -2,7 +2,7 @@
2
2
 
3
3
  The canonical scope page is [Current Limitations](limitations.md).
4
4
 
5
- Current `1.6.3` scope:
5
+ Current `1.6.4` scope:
6
6
 
7
7
  - local semantic MCP tools over Postgres/MySQL without raw SQL tools;
8
8
  - one-command, resumable, review-by-exception onboarding from
@@ -15,9 +15,17 @@ Current `1.6.3` scope:
15
15
  and generation locks; no generated authority activates itself;
16
16
  - local development/staging Scoped Explore through exactly two temporary MCP
17
17
  tools, using typed row plans or a reviewed PM-style analytical cube;
18
+ - optional secured-loopback Workbench Ask over the exact same active tool
19
+ registry, with OpenAI, Anthropic, or a configured OpenAI-compatible endpoint,
20
+ digest-bound direct-egress consent, in-memory credentials/history, bounded
21
+ provider loops, and proposal-only writes;
18
22
  - aggregate `count`, reviewed `count_distinct`, `sum`, `avg`, reviewed
19
23
  dimensions and day/week/month buckets, typed filters, bounded top-N, and at
20
- most one proven many-to-one relationship;
24
+ most three activated star/depth-two relationship paths, each containing one
25
+ or two proven many-to-one links with fan-out one;
26
+ - demand-driven operator review for an exact inactive catalog-proven path,
27
+ explicit nullable-link semantics, per-relation trusted scope, and fail-closed
28
+ rejection of one-to-many, many-to-many, stale, or ambiguous paths;
21
29
  - cohort suppression plus durable extraction, differencing, rate, query,
22
30
  response, and complexity limits;
23
31
  - Protect This Query from a successful local plan to public DSL, canonical
@@ -76,6 +84,9 @@ Out of scope:
76
84
 
77
85
  - raw `execute_sql`, SQL strings, model-generated SQL, or arbitrary identifiers;
78
86
  - production Scoped Explore or a general-purpose analytics/query AST;
87
+ - production/shared/remote Ask, model-selected provider configuration,
88
+ Synapsor-relayed model calls, persisted chat history, or a claim that every
89
+ OpenAI-compatible server is supported;
79
90
  - general join planning, many-to-many exploration, arbitrary formulas,
80
91
  functions, windows, `HAVING`, subqueries, or statistical privacy guarantees;
81
92
  - model-selected tenant/principal, activation, approval, or commit authority;
@@ -6,7 +6,7 @@ The Synapsor Cursor plugin is an official-format Cursor plugin under
6
6
  instructions.
7
7
 
8
8
  Current implementation evidence was checked against Cursor's public plugin,
9
- plugin-reference, MCP, and deeplink documentation on 2026-07-20:
9
+ plugin-reference, MCP, and deeplink documentation on 2026-07-25:
10
10
 
11
11
  - <https://cursor.com/docs/plugins>
12
12
  - <https://cursor.com/docs/reference/plugins>
@@ -14,12 +14,12 @@ plugin-reference, MCP, and deeplink documentation on 2026-07-20:
14
14
  - <https://cursor.com/docs/reference/deeplinks>
15
15
 
16
16
  The locally installed Cursor version used for validation is recorded in
17
- `development/runner-1.6.0-progress.md`. Protocol/static validation is not a
17
+ `development/runner-1.6.4-progress.md`. Protocol/static validation is not a
18
18
  claim that Cursor Marketplace review has completed.
19
19
 
20
20
  ## What the plugin installs
21
21
 
22
- - one production stdio MCP server pinned to `@synapsor/runner@1.6.2`;
22
+ - one production stdio MCP server pinned to `@synapsor/runner@1.6.4`;
23
23
  - one `/synapsor-protect` agent command;
24
24
  - one discoverable Safe Action skill;
25
25
  - one file-scoped rule for `synapsor/actions/**/*.ts`;
@@ -106,6 +106,12 @@ attested. Required properties include:
106
106
  - `INSERT` has a suitable `WITH CHECK` expression;
107
107
  - `UPDATE` has both `USING` and `WITH CHECK`.
108
108
 
109
+ For read-only PostgreSQL views, hardened mode additionally requires
110
+ `security_invoker=true` and `security_barrier=true`, a non-owner/non-bypass
111
+ Runner role, and successful recursive attestation of every referenced base
112
+ relation. See [Reviewed Database Views](reviewed-database-views.md). Ordinary
113
+ owner-rights or unverifiable views fail closed.
114
+
109
115
  ### Example PostgreSQL policy
110
116
 
111
117
  Use a non-owner read role and a separate non-owner write role. Adapt names and
@@ -222,7 +222,8 @@ The protected clauses mean:
222
222
  | `PROTECTED READ ROWS` / `AGGREGATE` | Selects a frozen row or aggregate protected-read shape. |
223
223
  | `BOUNDARY DIGEST sha256:...` | Binds the capability to the exact human-activated exploration authority. |
224
224
  | `GENERATION LOCK sha256:...` | Binds it to the reviewed schema, role/grant/RLS posture, compiler, and Spec fingerprint. |
225
- | `PROTECTED RELATIONSHIP name ON local_key REFERENCES schema.table.target_key PRIMARY KEY pk TENANT KEY tenant [PRINCIPAL SCOPE KEY principal]` | Freezes at most one inspected, reviewed many-to-one path with fan-out one. |
225
+ | `PROTECTED RELATIONSHIP name ON local_key REFERENCES schema.table.target_key PRIMARY KEY pk TENANT KEY tenant [PRINCIPAL SCOPE KEY principal]` | Legacy one-hop form. It freezes one inspected, reviewed many-to-one path with fan-out one and cannot be mixed with `LINK` declarations. |
226
+ | `PROTECTED RELATIONSHIP name LINK 1|2 ON local_key REFERENCES schema.table.target_key PRIMARY KEY pk TENANT KEY tenant [PRINCIPAL SCOPE KEY principal] UNMATCHED EXCLUDE|KEEP NULL` | Additive path form. Up to three user-named paths may contain one or two contiguous, ordered many-to-one links. Missing-row semantics are explicit and digest-bound. |
226
227
  | `PROTECTED FILTER field OP FIXED value` | Freezes a reviewed literal. `OP` is `EQ`, `NEQ`, `LT`, `LTE`, `GT`, `GTE`, or bounded fixed-list `IN`. |
227
228
  | `PROTECTED FILTER field OP ARG name` | Allows only one declared typed/bounded argument at that reviewed literal position. |
228
229
  | `ALLOW READ ...` / `ROW ORDER BY ...` | Freezes row projection and up to three fixed sort fields for row mode. |
@@ -241,6 +242,16 @@ not have to transcribe digests or limits. The generated DSL compiles through
241
242
  canonical Spec. Existing contracts with no `protected_read` field normalize
242
243
  and hash exactly as before.
243
244
 
245
+ In a `PROTECTED RELATIONSHIP` declaration, `name`, the keys, and the
246
+ `schema.table.target_key` reference are user-reviewed identifiers generated
247
+ from inspected database evidence. `PROTECTED RELATIONSHIP`, `LINK`, `ON`,
248
+ `REFERENCES`, `PRIMARY KEY`, `TENANT KEY`, `PRINCIPAL SCOPE KEY`, and
249
+ `UNMATCHED` are DSL keywords. `LINK 1` starts a path and optional `LINK 2`
250
+ continues that same path. `UNMATCHED EXCLUDE` removes a counted row whose
251
+ optional relationship is missing; `UNMATCHED KEEP NULL` retains it with an
252
+ empty group value. See [Reviewed Relationship
253
+ Paths](reviewed-relationships.md) for the compiled JSON and runtime guarantees.
254
+
244
255
  Protected row and aggregate capabilities can be served after exact-digest
245
256
  activation even when temporary Scoped Explore is disabled. Production never
246
257
  needs or advertises `app.explore_data`. See [Auto Boundary, Scoped Explore, And
@@ -1,6 +1,6 @@
1
1
  # Fresh-Developer Usability Protocol
2
2
 
3
- This is the owner-observation script for Runner 1.6.3. Give it to a
3
+ This is the owner-observation script for Runner 1.6.4. Give it to a
4
4
  database-familiar developer who has not used Synapsor. Automated tests prove
5
5
  the mechanics; this protocol checks whether the product is understandable.
6
6
 
@@ -23,7 +23,7 @@ Measure product time separately from initial npm download. Start the timer
23
23
  after this succeeds:
24
24
 
25
25
  ```bash
26
- npx -y @synapsor/runner@latest --version
26
+ npx -y @synapsor/runner --version
27
27
  ```
28
28
 
29
29
  ## Setup
@@ -33,8 +33,8 @@ Provide:
33
33
  - Node 22.13 or newer;
34
34
  - the packaged synthetic FitFlow fixture or equivalent disposable staging
35
35
  Postgres;
36
- - an exported `DATABASE_URL` using a SELECT-only, non-owner role;
37
- - exported synthetic `SYNAPSOR_TENANT_ID` and `SYNAPSOR_PRINCIPAL`;
36
+ - a SELECT-only, non-owner connection URL available for hidden paste or an
37
+ explicitly approved project `.env` file;
38
38
  - the README only;
39
39
  - no existing Synapsor project files.
40
40
 
@@ -59,7 +59,7 @@ Do not explain Synapsor’s architecture first.
59
59
  The participant should find and run:
60
60
 
61
61
  ```bash
62
- npx -y @synapsor/runner@latest start --from-env DATABASE_URL
62
+ npx -y @synapsor/runner start
63
63
  ```
64
64
 
65
65
  No other shell command should be required through the first proposal. The
@@ -177,7 +177,7 @@ The automated packed FitFlow run records deterministic timing and interaction
177
177
  evidence in:
178
178
 
179
179
  ```text
180
- development/runner-1.6.3-fitflow-results.json
180
+ development/runner-1.6.4-fitflow-results.json
181
181
  ```
182
182
 
183
183
  That evidence does not substitute for a first-time participant. Until a real