@synapsor/runner 1.5.4 → 1.6.1

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 (81) hide show
  1. package/CHANGELOG.md +68 -2
  2. package/README.md +131 -124
  3. package/dist/authoring.mjs +405 -9
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/local-ui.d.ts +6 -1
  6. package/dist/local-ui.d.ts.map +1 -1
  7. package/dist/runner.mjs +17206 -12169
  8. package/dist/runtime.mjs +11249 -8542
  9. package/dist/shadow.mjs +408 -15
  10. package/docs/README.md +14 -6
  11. package/docs/aggregate-reads.md +22 -0
  12. package/docs/app-owned-executors.md +8 -0
  13. package/docs/auto-boundary-and-scoped-explore.md +338 -0
  14. package/docs/capability-authoring.md +75 -0
  15. package/docs/conformance.md +16 -0
  16. package/docs/current-scope.md +60 -28
  17. package/docs/cursor-plugin.md +20 -3
  18. package/docs/dsl-reference.md +78 -0
  19. package/docs/getting-started-own-database.md +39 -35
  20. package/docs/limitations.md +37 -7
  21. package/docs/local-mode.md +22 -3
  22. package/docs/production.md +19 -0
  23. package/docs/proposal-evidence-freshness.md +334 -0
  24. package/docs/release-notes.md +63 -4
  25. package/docs/runner-config-reference.md +46 -0
  26. package/docs/schema-api-candidates.md +28 -1
  27. package/docs/security-boundary.md +17 -0
  28. package/docs/store-lifecycle.md +8 -0
  29. package/docs/troubleshooting-first-run.md +174 -0
  30. package/docs/writeback-executors.md +8 -0
  31. package/examples/app-owned-writeback/command-handler.mjs +0 -0
  32. package/examples/auto-boundary-churn/README.md +23 -0
  33. package/examples/auto-boundary-churn/app/page.tsx +8 -0
  34. package/examples/auto-boundary-churn/docker-compose.yml +16 -0
  35. package/examples/auto-boundary-churn/package.json +18 -0
  36. package/examples/auto-boundary-churn/prisma/schema.prisma +36 -0
  37. package/examples/auto-boundary-churn/seed/postgres.sql +126 -0
  38. package/examples/mcp-postgres-billing-app-handler/scripts/run-demo.sh +0 -0
  39. package/examples/reference-support-billing-app/scripts/run-demo.sh +0 -0
  40. package/examples/support-billing-agent/scripts/run-demo.sh +0 -0
  41. package/examples/support-billing-agent/scripts/run-evaluation.sh +0 -0
  42. package/fixtures/compatibility/published-1.5.4/manifest.json +76 -0
  43. package/fixtures/compatibility/published-1.5.4/sources/packages/dsl/examples/aggregate-read.synapsor.sql +21 -0
  44. package/fixtures/compatibility/published-1.5.4/sources/packages/dsl/examples/billing-late-fee.synapsor.sql +56 -0
  45. package/fixtures/compatibility/published-1.5.4/sources/packages/dsl/examples/bounded-set-multi-term.synapsor.sql +30 -0
  46. package/fixtures/compatibility/published-1.5.4/sources/packages/dsl/examples/principal-row-scope.synapsor.sql +23 -0
  47. package/fixtures/compatibility/published-1.5.4/sources/packages/spec/fixtures/conformance/aggregate-read/contract.json +119 -0
  48. package/fixtures/compatibility/published-1.5.4/sources/packages/spec/fixtures/conformance/approval-quorum/contract.json +44 -0
  49. package/fixtures/compatibility/published-1.5.4/sources/packages/spec/fixtures/conformance/bounded-set-threats/contract.json +115 -0
  50. package/fixtures/compatibility/published-1.5.4/sources/packages/spec/fixtures/conformance/principal-row-scope/contract.json +78 -0
  51. package/fixtures/compatibility/published-1.5.4/sources/packages/spec/fixtures/conformance/proposal-capability/contract.json +101 -0
  52. package/fixtures/compatibility/published-1.5.4/sources/packages/spec/fixtures/conformance/reversible-change-sets/contract.json +98 -0
  53. package/fixtures/compatibility/published-1.5.4/sources/packages/spec/fixtures/valid/basic-read.contract.json +60 -0
  54. package/fixtures/compatibility/published-1.6.0/manifest.json +76 -0
  55. package/fixtures/compatibility/published-1.6.0/sources/packages/dsl/examples/aggregate-read.synapsor.sql +21 -0
  56. package/fixtures/compatibility/published-1.6.0/sources/packages/dsl/examples/billing-late-fee.synapsor.sql +56 -0
  57. package/fixtures/compatibility/published-1.6.0/sources/packages/dsl/examples/bounded-set-multi-term.synapsor.sql +30 -0
  58. package/fixtures/compatibility/published-1.6.0/sources/packages/dsl/examples/principal-row-scope.synapsor.sql +23 -0
  59. package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/aggregate-read/contract.json +119 -0
  60. package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/approval-quorum/contract.json +44 -0
  61. package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/bounded-set-threats/contract.json +115 -0
  62. package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/principal-row-scope/contract.json +78 -0
  63. package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/proposal-capability/contract.json +101 -0
  64. package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/reversible-change-sets/contract.json +98 -0
  65. package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/valid/basic-read.contract.json +60 -0
  66. package/fixtures/protocol/MANIFEST.json +37 -7
  67. package/fixtures/protocol/change-set.freshness-update.v2.json +58 -0
  68. package/fixtures/protocol/freshness-authority.invoice.v1.json +35 -0
  69. package/fixtures/protocol/freshness-proof.fresh.v1.json +38 -0
  70. package/fixtures/protocol/writeback-job.freshness-update.v2.json +50 -0
  71. package/llms.txt +38 -0
  72. package/package.json +12 -8
  73. package/schemas/change-set.v1.schema.json +1 -0
  74. package/schemas/change-set.v2.schema.json +1 -0
  75. package/schemas/change-set.v3.schema.json +1 -0
  76. package/schemas/freshness-authority.v1.schema.json +89 -0
  77. package/schemas/freshness-proof.v1.schema.json +73 -0
  78. package/schemas/synapsor.runner.schema.json +50 -1
  79. package/schemas/writeback-job.v1.schema.json +1 -0
  80. package/schemas/writeback-job.v2.schema.json +1 -0
  81. package/schemas/writeback-job.v3.schema.json +1 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,72 @@
1
1
  # Changelog
2
2
 
3
- ## 1.5.4 (prepared, not published)
3
+ ## 1.6.1 (prepared, not published)
4
+
5
+ ### Fail-closed proposal and evidence freshness
6
+
7
+ - Adds optional reviewed `proposal_freshness` Runner configuration for live
8
+ target and explicitly declared same-source supporting-row checks immediately
9
+ before every local approval.
10
+ - Binds every successful human, quorum, or policy approval to a distinct
11
+ immutable short-lived proof covering the exact proposal hash/version and
12
+ deterministic dependency-set digest. Stale or unavailable checks record no
13
+ approval; stale proposals are replaced rather than silently refreshed.
14
+ - Extends PostgreSQL/MySQL direct SQL apply to lock supporting rows in
15
+ deterministic order and compare their exact versions inside the existing
16
+ mutation transaction. Post-approval drift returns a clear conflict with zero
17
+ mutation, including bounded-set rollback.
18
+ - Adds no-ID `proposals check-freshness latest` text/JSON inspection, Workbench
19
+ status and approval gating, lifecycle/replay/proof linkage, bounded
20
+ compliance metadata, counters, structured logs, and rollback-only writer
21
+ lock diagnostics.
22
+ - Keeps Cloud source-blind: Cloud may govern proposal/approval authority, while
23
+ the local Runner performs final source revalidation. Strict freshness is
24
+ rejected for app-owned and cross-source effects whose checks cannot be
25
+ transactionally atomic.
26
+ - Preserves existing contract normalization/digests, DSL, tools lists,
27
+ approval paths, receipts, and deployments when the optional overlay is
28
+ absent. `@synapsor/spec` and `@synapsor/dsl` remain at 1.5.0.
29
+ - Prepares only `@synapsor/runner@1.6.1`. Nothing is published, tagged, pushed,
30
+ or released by this change.
31
+
32
+ ## 1.6.0 (published 2026-07-23)
33
+
34
+ ### Connect, Explore, Protect
35
+
36
+ - Adds deterministic whole-schema Auto Boundary drafting from database
37
+ metadata, statically parsed Prisma/Drizzle schemas, OpenAPI documents, and
38
+ existing Synapsor definitions. It executes no adopter code, samples no source
39
+ rows before activation, uses no LLM, and emits only disabled public DSL,
40
+ canonical JSON, tests, review evidence, and a generation lock.
41
+ - Adds a secured local Workbench review for trusted tenant/principal scope,
42
+ visible and kept-out fields, typed filters, aggregate-safe measures,
43
+ `count_distinct`, reviewed dimensions and time buckets, one-hop
44
+ relationships, cohort suppression, privacy/query budgets, and exact
45
+ role/grant/RLS posture. Activation binds every decision to one immutable
46
+ digest.
47
+ - Adds authoring-only Scoped Explore through exactly `app.describe_data` and
48
+ `app.explore_data`. Row and PM-style aggregate plans contain no SQL or
49
+ arbitrary identifiers, run with verified read-only credentials and enforced
50
+ read-only transactions, and retain only normalized redacted audit metadata.
51
+ - Adds a deliberately small aggregate grammar for counts, reviewed distinct
52
+ identifiers, sums/averages, categorical dimensions, day/week/month buckets,
53
+ bounded comparisons and top-N, optional proven many-to-one relationships,
54
+ cohort suppression, and durable extraction/differencing/rate budgets.
55
+ - Adds Protect This Query. Workbench freezes a successful plan into public
56
+ `.synapsor.sql`, canonical `protected_read` authority, positive/deny/scope/
57
+ suppression/drift tests, and a disabled named capability. Human exact-digest
58
+ activation removes broad Explore while preserving the named production tool.
59
+ - Adds lock-bound schema/role/grant/ownership/RLS/compiler/Spec drift checks.
60
+ Additive schema fields receive no authority; breaking generated-authority
61
+ drift fails closed until regeneration and review.
62
+ - Preserves published 1.x contracts, exact legacy normalization/digests,
63
+ established CLI selectors and automation, active tools, TypeScript authoring,
64
+ manual/headless operation, guarded writes, Data PRs, app-owned executors, and
65
+ deployments without generation locks through packed compatibility fixtures.
66
+ - Published `@synapsor/runner@1.6.0`, `@synapsor/dsl@1.5.0`, and
67
+ `@synapsor/spec@1.5.0`.
68
+
69
+ ## 1.5.4 (published 2026-07-22)
4
70
 
5
71
  ### Networked MCP authentication hardening
6
72
 
@@ -39,7 +105,7 @@
39
105
  boundary while making Runner fail closed with
40
106
  `SESSION_BINDING_UNSUPPORTED`. Runner-targeted DSL validation, contract load,
41
107
  lint/explain, and runtime no longer allow an environment fallback.
42
- - Prepares `@synapsor/runner@1.5.4` and `@synapsor/dsl@1.4.4`;
108
+ - Published `@synapsor/runner@1.5.4` and `@synapsor/dsl@1.4.4`;
43
109
  `@synapsor/spec@1.4.2` and the Cloud CLI remain unchanged.
44
110
 
45
111
  ## 1.5.3 (published 2026-07-21)
package/README.md CHANGED
@@ -37,118 +37,161 @@ Review happens outside model-facing tools. State is stored under
37
37
  `./.synapsor/try/`; this proves the boundary, not your database connection.
38
38
  `demo --quick` remains a noninteractive compatibility alias.
39
39
 
40
- ## Protect One Action In Your Application
40
+ ## Audit An Existing MCP Server
41
+
42
+ Audit a typical raw-SQL MCP server without launching or calling one:
43
+
44
+ ```bash
45
+ npx -y @synapsor/runner audit --example dangerous-db-mcp
46
+ ```
47
+
48
+ Audit your own tool manifest, remote `tools/list`, or stdio server:
41
49
 
42
- Start with a staging database and a read-only credential. Runner inspects
43
- metadata, creates one reviewed read boundary, and opens the secured localhost
44
- Workbench:
50
+ ```bash
51
+ npx -y @synapsor/runner audit ./tools-list.json
52
+ ```
53
+
54
+ It flags raw SQL, arbitrary identifiers, model-controlled authority, and
55
+ model-facing writeback without calling business tools. See [MCP Database Risk
56
+ Review](docs/mcp-audit.md) and the [alternatives
57
+ guide](docs/alternatives.md).
58
+
59
+ ## Connect Your Staging Application
60
+
61
+ Use a dedicated SELECT-only, non-owner staging credential. Runner combines the
62
+ whole database schema with statically parsed Prisma, Drizzle, OpenAPI, and
63
+ existing Synapsor definitions. It does not execute adopter code, sample source
64
+ rows, or use an LLM:
45
65
 
46
66
  ```bash
47
67
  npm install -g @synapsor/runner
48
68
  export DATABASE_URL="postgresql://runner_reader:REPLACE_ME@db.example.com:5432/app?sslmode=require"
69
+ export SYNAPSOR_TENANT_ID="acme"
70
+ export SYNAPSOR_PRINCIPAL="developer-1"
49
71
  synapsor-runner start --from-env DATABASE_URL --schema public
50
72
  ```
51
73
 
52
- Describe one business action. This creates an inert TypeScript draft; it does
53
- not add a tool or change the active contract:
74
+ A fresh project opens the secured localhost Workbench and emits disabled DSL,
75
+ canonical JSON, tests, review evidence, and a generation lock. Review scope,
76
+ fields, aggregate members, relationships, privacy budgets, profile, and exact
77
+ role/RLS posture, then activate the exact digest. Existing tools stay unchanged.
78
+
79
+ ## Ask Your First Real Question In Cursor
80
+
81
+ After activation, let Runner add only the local authoring entry to this Cursor
82
+ project:
54
83
 
55
84
  ```bash
56
- synapsor-runner start \
57
- --action plan_credit \
58
- --description "Propose one reviewed customer plan credit" \
59
- --based-on support.inspect_customer
85
+ synapsor-runner mcp install cursor \
86
+ --project \
87
+ --authoring \
88
+ --project-root . \
89
+ --yes
60
90
  ```
61
91
 
62
- Add the reviewed tools to the current Cursor project:
92
+ Cursor sees exactly two temporary tools:
63
93
 
64
- ```bash
65
- synapsor-runner mcp install cursor --project \
66
- --config ./synapsor.runner.json \
67
- --store ./.synapsor/local.db
94
+ ```text
95
+ app.describe_data
96
+ app.explore_data
68
97
  ```
69
98
 
70
- In Cursor, use the Workbench's exact prompt. The checked-in project
71
- instructions require the coding agent to draft and validate the action while
72
- leaving effect review and activation to you. Once activated, a request such as
73
- "give CUS-3001 a $25 plan credit" can only create a semantic proposal:
99
+ Ask a bounded question such as:
74
100
 
75
101
  ```text
76
- Data PR wrp_...
77
- Action support.propose_plan_credit on CUS-3001
78
- Effect plan_credit_cents: 0 -> 2500
79
- Source unchanged before approval: Yes
102
+ Which reviewed regions and reason categories contributed most to the increase
103
+ in churned accounts by week?
80
104
  ```
81
105
 
82
- Review the exact effect in the secured Workbench, select **Approve outside
83
- MCP**, then run the displayed guarded apply command from a trusted terminal.
84
- The agent has no approval or commit tool. Runner rechecks scope, policy, row
85
- version, bounds, and idempotency before returning a receipt; a retry cannot
86
- duplicate the mutation and a stale proposal conflicts.
106
+ Runner accepts a typed plan, not SQL. It validates every member against the
107
+ activated digest, injects trusted scope, and runs a read-only transaction.
108
+ Small cohorts are suppressed and durable budgets limit repeated differencing.
109
+ This is descriptive analysis, not proof of causation.
110
+
111
+ Scoped Explore is local authoring only. Missing/unknown/production profiles,
112
+ write-capable or owner credentials, stale generation locks, remote/shared HTTP,
113
+ and non-loopback runtimes never advertise these tools.
114
+
115
+ ## Protect This Query
87
116
 
88
- Inspect the latest lifecycle without copying an id:
117
+ Choose the useful result in Workbench. No opaque ID needs to be copied. Runner
118
+ freezes the reviewed shape into public DSL, canonical JSON, and tests under
119
+ `synapsor/protected/drafts/`. The named capability starts disabled and requires
120
+ exact-digest human activation outside MCP.
121
+
122
+ After activation, Scoped Explore is disabled. Update Cursor to the production
123
+ config:
89
124
 
90
125
  ```bash
91
- synapsor-runner lifecycle --details --store ./.synapsor/local.db
126
+ synapsor-runner mcp install cursor \
127
+ --project \
128
+ --config ./synapsor.runner.json \
129
+ --store ./.synapsor/local.db \
130
+ --yes
92
131
  ```
93
132
 
94
- See the [own-database guide](docs/getting-started-own-database.md),
95
- [Cursor plugin guide](docs/cursor-plugin.md), and
96
- [store lifecycle guide](docs/store-lifecycle.md) for the complete paths.
133
+ Production exposes the protected named capability, not `app.explore_data`.
134
+ Read the complete [Auto Boundary, Scoped Explore, And Protect
135
+ guide](docs/auto-boundary-and-scoped-explore.md).
97
136
 
98
- ## Audit An Existing MCP Server
137
+ ## Create An Exact Data PR
99
138
 
100
- Audit a typical raw-SQL MCP server without launching or calling one:
139
+ For a write, describe one business action. This creates an inert TypeScript
140
+ draft; it does not add a tool or change the active contract:
101
141
 
102
142
  ```bash
103
- npx -y @synapsor/runner audit --example dangerous-db-mcp
143
+ synapsor-runner start \
144
+ --action plan_credit \
145
+ --description "Propose one reviewed customer plan credit" \
146
+ --based-on support.inspect_customer
104
147
  ```
105
148
 
106
- Audit your own tool manifest, remote `tools/list`, or stdio server:
149
+ Once a human activates that exact action digest, an agent request can create
150
+ only a semantic proposal:
107
151
 
108
- ```bash
109
- npx -y @synapsor/runner audit ./tools-list.json
152
+ ```text
153
+ Data PR wrp_...
154
+ Action support.propose_plan_credit on CUS-3001
155
+ Effect plan_credit_cents: 0 -> 2500
156
+ Source unchanged before approval: Yes
110
157
  ```
111
158
 
112
- It flags raw SQL, arbitrary identifiers, model-controlled authority,
113
- model-facing approval/writeback, and missing conflict or idempotency signals.
114
- It does not call business tools. See [MCP Database Risk
115
- Review](docs/mcp-audit.md) for local manifests, selected-server checks, CI,
116
- SARIF, evidence labels, and limits. You may not need Runner: use the
117
- [alternatives guide](docs/alternatives.md) to compare direct read-only access,
118
- hand-built tools, and this reviewed boundary.
159
+ Approve in Workbench outside MCP; a trusted operator or worker commits. Runner
160
+ supports guarded single-row INSERT/UPDATE/DELETE, fixed-predicate bounded
161
+ UPDATE/DELETE, and exact-review batch INSERT. Rich transactions and external
162
+ effects use app-owned executors.
119
163
 
120
- ## Safety Model
164
+ Runner rechecks scope, policy, row version, bounds, idempotency, and affected
165
+ rows before returning a receipt. A retry cannot duplicate the mutation and a
166
+ stale proposal conflicts. Inspect the latest lifecycle without copying an ID:
121
167
 
122
- ```text
123
- AI agent or MCP client
124
- |
125
- | reviewed semantic tool
126
- v
127
- +--------------------------------+
128
- | Synapsor Runner MCP |
129
- | trusted tenant/principal scope |
130
- | evidence + query audit |
131
- | proposals, not direct writes |
132
- +--------------------------------+
133
- |
134
- | scoped read / approved guarded writeback
135
- v
136
- +--------------------------------+
137
- | Your Postgres or MySQL |
138
- | source of truth |
139
- +--------------------------------+
140
-
141
- Local SQLite ledger:
142
- evidence -> proposal -> approval -> receipt -> replay
168
+ ```bash
169
+ synapsor-runner lifecycle --details --store ./.synapsor/local.db
143
170
  ```
144
171
 
145
- The model can inspect scoped data and propose an exact change. It cannot call
146
- approval, apply, or revert tools. A human or trusted operator approves outside
147
- MCP, then Runner performs a guarded write or routes the proposal to an
148
- app-owned executor.
172
+ For proposals whose review depends on other source rows, Runner 1.6.1 can also
173
+ require a live target/supporting-evidence check immediately before every local
174
+ approval. Apply rechecks those declared same-database dependencies again inside
175
+ the write transaction; stale evidence produces zero mutation and requires a new
176
+ proposal:
149
177
 
150
- Contracts fix trusted context, fields, bounds, transitions, and approvals;
151
- evidence, query audit, receipts, and replay preserve the lifecycle. Runner does
178
+ ```bash
179
+ synapsor-runner proposals check-freshness latest \
180
+ --config ./synapsor.runner.json \
181
+ --store ./.synapsor/local.db
182
+ ```
183
+
184
+ See the [own-database guide](docs/getting-started-own-database.md),
185
+ [Cursor plugin guide](docs/cursor-plugin.md), and
186
+ [proposal freshness](docs/proposal-evidence-freshness.md) and
187
+ [store lifecycle](docs/store-lifecycle.md) guides for the complete paths.
188
+
189
+ ## Safety Model
190
+
191
+ Contracts fix trusted context, fields, bounds, transitions, and approval.
192
+ Model-facing tools can inspect scoped data and propose exact changes, but cannot
193
+ approve, apply, or revert. A trusted operator/worker performs guarded writeback;
194
+ the ledger links evidence, proposal, decision, receipt, and replay. Runner does
152
195
  not make raw SQL or prompt-injection-prone clients safe.
153
196
 
154
197
  ## Choose An Isolation Mode
@@ -168,54 +211,24 @@ MySQL has no native RLS; use restricted views or tenant credentials. See
168
211
  [Database scope] and the
169
212
  [build-vs-adopt guide](docs/why-synapsor-vs-app-guardrails.md).
170
213
 
171
- ## Connect A Staging Database
172
-
173
- The setup above stores environment-variable names, not connection strings, and
174
- never falls back to synthetic data if inspection fails. Keep staging, database
175
- permissions, restricted views, and RLS underneath Runner. Bind trusted tenant
176
- and principal values in the launching process, then review the exact field and
177
- tool surface before connecting Cursor.
178
-
179
- The [complete own-database guide](docs/getting-started-own-database.md) covers
180
- validation, scoped reads, disabled Prisma/Drizzle/OpenAPI candidates, guarded
181
- single-row writes, and app-owned executors. Use the [host compatibility
182
- matrix](docs/host-compatibility.md) for accurately tested client behavior.
183
-
184
214
  ## Review And Prove Your Contract
185
215
 
186
- Before serving, use `contract explain`, `contract lint --strict`, and `contract
187
- test` for reviewer-readable boundaries and allow/deny/redaction cases. The
188
- built-in language server supplies diagnostics, completion, hover, and formatting for
189
- `.synapsor.sql` and legacy `.synapsor` files. See [Contract
190
- Review](docs/contract-review.md) and [Contract
191
- Testing](docs/contract-testing.md).
192
-
193
- Runner also supports reviewed [aggregate reads](docs/aggregate-reads.md),
194
- tenant-scoped tamper-evident [ledger reports](docs/compliance-reports.md), and
195
- opt-in [graduated-trust recommendations](docs/graduated-trust.md). Aggregate
196
- tools return one scalar and no source rows. Graduated trust is disabled by
197
- default, remains operator-only, and can export a reviewable artifact but never
198
- activate it.
216
+ Use `contract explain`, `contract lint --strict`, and `contract test`; the
217
+ language server handles `.synapsor.sql` and legacy `.synapsor`. See [Contract
218
+ Review](docs/contract-review.md), [Contract Testing](docs/contract-testing.md),
219
+ and the [own-database guide](docs/getting-started-own-database.md).
199
220
 
200
221
  ## Trust And Verification
201
222
 
202
223
  Start with the **[Threat Model](THREAT_MODEL.md)**. It defines protected assets,
203
224
  trust boundaries, covered threats, non-goals, and required operator controls.
204
225
 
205
- - [Conformance fixtures](docs/conformance.md) prove trusted context, scoped
206
- reads, kept-out fields, proposal boundaries, approval, receipts, and replay
207
- behavior rather than only validating JSON shape.
208
- - `contract test` lets adopters encode the same boundary checks for their own
209
- synthetic fixtures; it never invokes an LLM and refuses remote live targets
210
- by default.
211
- - MCP proposal, evidence, and replay handles are references rather than bearer
212
- authority: resource reads re-check the owning tenant and principal against
213
- the current trusted session.
214
- - `test:principal-scope`, `test:live-apply`, `test:guarded-crud`,
215
- `test:bounded-set`, and `test:reversible` prove cross-principal denial,
216
- no pre-approval mutation, guarded writes, idempotent retry, conflicts,
217
- bounded atomic sets, receipts, and reviewed compensation on disposable
218
- PostgreSQL/MySQL fixtures.
226
+ [Conformance fixtures](docs/conformance.md) and `contract test` cover trusted
227
+ scope, kept-out fields, proposals, approval, receipts, and replay. Resource
228
+ handles re-check tenant/principal rather than acting as bearer authority. Live
229
+ gates cover principal denial, no pre-approval mutation, idempotency, conflict,
230
+ bounded sets, compensation, and proposal/evidence freshness on disposable
231
+ databases.
219
232
 
220
233
  Runner is a narrow agent/database safety boundary, not a replacement for
221
234
  least-privilege database access, host security, or application authorization.
@@ -250,16 +263,10 @@ and the [Runner Config Reference](docs/runner-config-reference.md).
250
263
 
251
264
  ## OSS And Cloud
252
265
 
253
- Synapsor Runner works by itself for local, single-node, and bounded small-fleet
254
- deployments: your database remains the source of truth and Runner stores review
255
- artifacts in the default local SQLite ledger or an opt-in shared Postgres
256
- runtime store.
257
- Synapsor Cloud adds a shared contract registry, immutable versions,
258
- source-scoped Runner connections, downloadable bundles, a human approval
259
- inbox, durable leased writeback jobs, and a redacted shared activity/receipt
260
- chronology. Database credentials and guarded execution remain local. See [Cloud
261
- Mode](docs/cloud-mode.md) for the design-partner path and [OSS Runner vs
262
- Synapsor Cloud](docs/oss-vs-cloud.md) for the detailed boundary.
266
+ Runner works alone with local SQLite or an opt-in shared Postgres ledger.
267
+ Synapsor Cloud adds shared registry, approval, leased jobs, and redacted
268
+ activity/receipt chronology; credentials and guarded execution stay local. See
269
+ [Cloud Mode](docs/cloud-mode.md) and [OSS vs Cloud](docs/oss-vs-cloud.md).
263
270
 
264
271
  `synapsor-runner` owns the local MCP/database boundary. `synapsor` from
265
272
  `@synapsor/cli` manages Cloud review and audit. Both Cloud push commands use