@synapsor/runner 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +72 -8
- package/CONTRIBUTING.md +10 -3
- package/README.md +61 -93
- package/SECURITY.md +7 -3
- package/THREAT_MODEL.md +37 -0
- package/dist/authoring.mjs +98 -13
- package/dist/cli.d.ts +12 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/local-ui.d.ts +60 -0
- package/dist/local-ui.d.ts.map +1 -1
- package/dist/runner.mjs +7321 -2000
- package/dist/runtime.mjs +528 -51
- package/docs/README.md +14 -0
- package/docs/agent-guided-setup.md +7 -7
- package/docs/aggregate-reads.md +14 -5
- package/docs/app-owned-executors.md +5 -6
- package/docs/auto-boundary-and-scoped-explore.md +58 -6
- package/docs/capability-authoring.md +2 -2
- package/docs/client-recipes.md +1 -1
- package/docs/cloud-mode.md +7 -7
- package/docs/conformance.md +6 -3
- package/docs/current-scope.md +13 -2
- package/docs/cursor-plugin.md +3 -3
- package/docs/database-enforced-scope.md +6 -0
- package/docs/dsl-reference.md +12 -1
- package/docs/fresh-developer-usability.md +6 -6
- package/docs/getting-started-own-database.md +41 -41
- package/docs/guided-onboarding.md +98 -30
- package/docs/limitations.md +34 -14
- package/docs/local-mode.md +20 -20
- package/docs/mcp-audit.md +14 -14
- package/docs/mcp-client-setup.md +11 -14
- package/docs/mcp-clients.md +1 -1
- package/docs/migrating-to-synapsor-spec.md +5 -1
- package/docs/openai-agents-sdk.md +2 -2
- package/docs/proposal-evidence-freshness.md +7 -7
- package/docs/recipes.md +6 -6
- package/docs/release-notes.md +86 -10
- package/docs/release-policy.md +20 -7
- package/docs/reversible-change-sets.md +1 -1
- package/docs/reviewed-database-views.md +132 -0
- package/docs/reviewed-relationships.md +245 -0
- package/docs/rfcs/006-reviewed-reversible-change-sets.md +1 -1
- package/docs/runner-bundles.md +7 -7
- package/docs/schema-api-candidates.md +1 -1
- package/docs/security-boundary.md +30 -0
- package/docs/troubleshooting-first-run.md +52 -12
- package/docs/use-your-own-database.md +6 -4
- package/docs/workbench-ask.md +279 -0
- package/docs/writeback-executors.md +7 -7
- package/examples/auto-boundary-churn/README.md +1 -1
- package/examples/community-solar-clean-room/README.md +7 -0
- package/examples/community-solar-clean-room/docker-compose.yml +16 -0
- package/examples/community-solar-clean-room/package.json +15 -0
- package/examples/community-solar-clean-room/prisma/schema.prisma +171 -0
- package/examples/community-solar-clean-room/seed/postgres.sql +571 -0
- package/examples/fitflow-guided-onboarding/README.md +2 -2
- package/examples/openai-agents-http/Makefile +1 -1
- package/examples/openai-agents-http/README.md +1 -1
- package/examples/openai-agents-stdio/Makefile +1 -1
- package/examples/openai-agents-stdio/README.md +2 -2
- package/examples/openai-agents-stdio/agent.py +1 -4
- package/examples/reference-support-billing-app/README.md +16 -16
- package/examples/retail-clean-room/README.md +7 -0
- package/examples/retail-clean-room/docker-compose.yml +16 -0
- package/examples/retail-clean-room/package.json +9 -0
- package/examples/retail-clean-room/prisma/schema.prisma +239 -0
- package/examples/retail-clean-room/seed/postgres.sql +781 -0
- package/examples/retail-clean-room/view-recipe/average-retained-revenue.synapsor.sql +21 -0
- package/examples/retail-clean-room/view-recipe/synapsor.runner.json +25 -0
- package/examples/support-plan-credit/mcp-client-examples/claude-code.sh +1 -4
- package/examples/support-plan-credit/mcp-client-examples/claude-desktop.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/codex.config.toml +1 -4
- package/examples/support-plan-credit/mcp-client-examples/cursor-global.mcp.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/cursor-project.mcp.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/generic-stdio.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/generic-stdio.mjs +1 -1
- package/examples/support-plan-credit/mcp-client-examples/google-adk.py +1 -1
- package/examples/support-plan-credit/mcp-client-examples/langchain.mjs +1 -1
- package/examples/support-plan-credit/mcp-client-examples/llamaindex.py +1 -1
- package/examples/support-plan-credit/mcp-client-examples/openai-agents-stdio.ts +1 -1
- package/examples/support-plan-credit/mcp-client-examples/vscode.mcp.json +1 -4
- package/fixtures/compatibility/published-1.6.3/manifest.json +76 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/aggregate-read.synapsor.sql +21 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/billing-late-fee.synapsor.sql +56 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/bounded-set-multi-term.synapsor.sql +30 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/principal-row-scope.synapsor.sql +23 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/aggregate-read/contract.json +119 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/approval-quorum/contract.json +44 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/bounded-set-threats/contract.json +115 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/principal-row-scope/contract.json +78 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/proposal-capability/contract.json +101 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/reversible-change-sets/contract.json +98 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/valid/basic-read.contract.json +60 -0
- package/llms.txt +10 -5
- package/package.json +8 -2
package/AGENTS.md
CHANGED
|
@@ -10,8 +10,8 @@ writeback, and local evidence/replay.
|
|
|
10
10
|
Use the stable package for public/user-facing examples:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npx -y
|
|
14
|
-
npx -y
|
|
13
|
+
npx -y @synapsor/runner demo --quick
|
|
14
|
+
npx -y @synapsor/runner audit --example dangerous-db-mcp
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Use the local checkout while editing this repo:
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,72 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.6.
|
|
3
|
+
## 1.6.4 (prepared, not published)
|
|
4
|
+
|
|
5
|
+
### Review-correct onboarding and reviewed relationship paths
|
|
6
|
+
|
|
7
|
+
- Repairs generated-boundary review state so edits invalidate only dependent
|
|
8
|
+
confirmations, stale browser revisions fail compare-and-swap checks, and
|
|
9
|
+
unrelated reviewed decisions survive. Secure headless activation now uses the
|
|
10
|
+
same exact-digest/operator boundary as Workbench.
|
|
11
|
+
- Reworks the first Workbench experience around a small starter resource pack,
|
|
12
|
+
clearer plain-language authority and source-change status, stable
|
|
13
|
+
progressive disclosure, managed identity/scope decisions, and one primary
|
|
14
|
+
next action. Nested-project config discovery and resume behavior no longer
|
|
15
|
+
force a developer to rediscover paths or restart review.
|
|
16
|
+
- Adds a no-argument first-run path that accepts the database URL through a
|
|
17
|
+
hidden terminal prompt or explicitly confirmed, key-specific environment-file
|
|
18
|
+
discovery. A conservative local-development fast lane reaches a real safe
|
|
19
|
+
read with at most two plain questions and one recorded exact-digest human
|
|
20
|
+
gesture, without exporting the URL or editing generated files.
|
|
21
|
+
- Tightens deterministic sensitive-field classification across unfamiliar
|
|
22
|
+
schemas and combines database, Prisma, Drizzle, OpenAPI, and existing
|
|
23
|
+
Synapsor evidence without an LLM. Ambiguous identity/scope and high-risk
|
|
24
|
+
fields stay blocked or kept out for human review.
|
|
25
|
+
- Adds public, additive reviewed relationship paths for protected aggregate
|
|
26
|
+
reads: up to three activated paths, each containing one or two
|
|
27
|
+
catalog-proven many-to-one links with fan-out one. The model may reference an
|
|
28
|
+
active path by name but cannot supply identifiers, join semantics, or
|
|
29
|
+
activation.
|
|
30
|
+
- Adds demand-driven relationship review. A plan requiring an inactive proven
|
|
31
|
+
path fails closed, Workbench stages that exact proof for an operator, nullable
|
|
32
|
+
links require an explicit `EXCLUDE` or `KEEP NULL` choice, and a new digest is
|
|
33
|
+
required before retry.
|
|
34
|
+
- Enforces trusted tenant/principal scope on every participating relation,
|
|
35
|
+
suppression after final grouping, generation-lock/catalog-proof drift, and
|
|
36
|
+
permanent rejection of one-to-many, many-to-many, ambiguous-cardinality,
|
|
37
|
+
over-depth, and model-improvised joins. Complex formulas and relationship
|
|
38
|
+
graphs remain on reviewed database views.
|
|
39
|
+
- Adds clean-room Community Solar and Retail onboarding/PM-analysis journeys,
|
|
40
|
+
plus live PostgreSQL/MySQL star/depth-two, nullable-link, drift, privacy, and
|
|
41
|
+
deliberately wrong fan-out tests. Published `1.6.3` contracts, digests,
|
|
42
|
+
startup routes, and tool surfaces remain byte-compatible unless the new
|
|
43
|
+
feature is explicitly adopted.
|
|
44
|
+
- Adds optional local Workbench Ask over the exact reviewed MCP/runtime tool
|
|
45
|
+
surface. OpenAI, Anthropic, and custom OpenAI-compatible adapters use
|
|
46
|
+
digest-bound direct-egress consent, in-memory credentials/history, fixed
|
|
47
|
+
size/time/tool/token bounds, escaped model output, and proposal-only writes;
|
|
48
|
+
the no-model composer remains complete and enabled by default.
|
|
49
|
+
- Hardens provider endpoints with fixed official origins, remote HTTPS,
|
|
50
|
+
loopback-only plaintext, redirect refusal, per-connection DNS validation and
|
|
51
|
+
address pinning, private/special destination refusal, and redacted failures.
|
|
52
|
+
The pinned lookup supports Node 22's multi-address callback shape.
|
|
53
|
+
- Extends both packed clean-room labs through the actual Ask UI. Retail visibly
|
|
54
|
+
refuses a kept-out customer-note aggregate, and Community Solar proves a
|
|
55
|
+
proposal cannot commit. An owner-authorized live OpenAI `gpt-5-mini` run
|
|
56
|
+
matched official MCP results and passed exact-key artifact/browser scans;
|
|
57
|
+
Anthropic and generic compatible claims remain protocol-scoped.
|
|
58
|
+
- Uses direct `npx` only for first acquisition and the installed
|
|
59
|
+
`synapsor-runner` binary afterward. The optional unscoped command package is a
|
|
60
|
+
version-locked delegate with no independent runtime or authority logic;
|
|
61
|
+
explicit pinned and automation invocations remain compatible.
|
|
62
|
+
- Adds one local, escaped, copy-exact DSL syntax highlighter for every
|
|
63
|
+
Workbench DSL preview, with no CDN or unsafe HTML path, and gives activity,
|
|
64
|
+
review, and apply detail the full available width on desktop and mobile.
|
|
65
|
+
- Prepares `@synapsor/runner@1.6.4`, `@synapsor/spec@1.7.0`,
|
|
66
|
+
`@synapsor/dsl@1.7.0`, and the optional `synapsor-runner@1.6.4` command
|
|
67
|
+
alias. No package is published by this change.
|
|
68
|
+
|
|
69
|
+
## 1.6.3 (published 2026-07-24)
|
|
4
70
|
|
|
5
71
|
### Guided adoption without weaker authority
|
|
6
72
|
|
|
@@ -67,13 +133,11 @@
|
|
|
67
133
|
additive behavior is staged as `@synapsor/spec@1.6.0` and
|
|
68
134
|
`@synapsor/dsl@1.6.0`; legacy contracts retain their exact normalization and
|
|
69
135
|
digests.
|
|
70
|
-
-
|
|
71
|
-
`@synapsor/dsl@1.6.0`.
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
Spec. This preserves the required Spec-first release order without masking a
|
|
76
|
-
broken packed Runner manifest.
|
|
136
|
+
- Published `@synapsor/runner@1.6.3`, `@synapsor/spec@1.6.0`, and
|
|
137
|
+
`@synapsor/dsl@1.6.0`.
|
|
138
|
+
- The clean Runner tarball gate used the locally packed public Spec before the
|
|
139
|
+
coordinated release, then returned to the stronger registry-only
|
|
140
|
+
dependency-resolution proof once npm had that exact Spec.
|
|
77
141
|
|
|
78
142
|
## 1.6.2 (published 2026-07-23)
|
|
79
143
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -15,8 +15,10 @@ Please do not submit pull requests or code patches unless the maintainers have
|
|
|
15
15
|
explicitly requested them under an approved contribution process.
|
|
16
16
|
|
|
17
17
|
For maintainers, use small changes with tests. Do not add support for arbitrary
|
|
18
|
-
SQL, multi-row
|
|
19
|
-
statements.
|
|
18
|
+
SQL, model-generated or unbounded multi-row predicates, DDL, stored procedures,
|
|
19
|
+
or model-generated write statements. Existing bounded-set support must retain
|
|
20
|
+
its reviewer-fixed predicate, hard row/value caps, atomic execution, frozen
|
|
21
|
+
members, and exact receipts.
|
|
20
22
|
|
|
21
23
|
Before opening a change:
|
|
22
24
|
|
|
@@ -36,10 +38,15 @@ idempotency, replay, MCP tool exposure, or app-owned handlers must prove:
|
|
|
36
38
|
|
|
37
39
|
- no model-facing `execute_sql`, raw SQL, approval, commit, apply, or writeback
|
|
38
40
|
tool was added;
|
|
39
|
-
- tenant/
|
|
41
|
+
- tenant/principal values come from trusted context, not model-controlled args;
|
|
40
42
|
- direct writeback still checks primary key, tenant key, allowed columns,
|
|
41
43
|
expected version/conflict guard, affected-row count, idempotency, and receipt
|
|
42
44
|
recording;
|
|
45
|
+
- generated authority remains disabled until exact-digest human activation,
|
|
46
|
+
Scoped Explore remains local authoring-only, and reviewed relationship paths
|
|
47
|
+
cannot be supplied or activated by the model;
|
|
48
|
+
- proposal/evidence freshness and supervised worker apply continue to fail
|
|
49
|
+
closed on source, digest, scope, policy, limit, or role-posture drift;
|
|
43
50
|
- app-owned handler templates tell developers to re-check tenant/scope,
|
|
44
51
|
expected version, idempotency, allowed action, transaction/rollback, and
|
|
45
52
|
receipt shape.
|
package/README.md
CHANGED
|
@@ -21,9 +21,8 @@ No database, Docker, config, MCP client, LLM, or account is required:
|
|
|
21
21
|
npx -y @synapsor/runner try --prove
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
The embedded synthetic source requests a $55 waiver and proves:
|
|
24
|
+
Cold `npx` download time is excluded. The embedded source requests a $55
|
|
25
|
+
waiver and proves:
|
|
27
26
|
|
|
28
27
|
```text
|
|
29
28
|
Proposed effect: late_fee_cents: 5500 -> 0
|
|
@@ -33,9 +32,8 @@ Restart-safe retry: yes; duplicate mutations: 0
|
|
|
33
32
|
Stale apply refused: yes
|
|
34
33
|
```
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`demo --quick` remains a noninteractive compatibility alias.
|
|
35
|
+
State stays under `./.synapsor/try/`. This proves the boundary, not your
|
|
36
|
+
database connection; `demo --quick` remains a noninteractive compatibility alias.
|
|
39
37
|
|
|
40
38
|
## Audit An Existing MCP Server
|
|
41
39
|
|
|
@@ -45,35 +43,31 @@ Audit a typical raw-SQL MCP server without launching or calling one:
|
|
|
45
43
|
npx -y @synapsor/runner audit --example dangerous-db-mcp
|
|
46
44
|
```
|
|
47
45
|
|
|
48
|
-
|
|
46
|
+
Or audit your own manifest, remote `tools/list`, or stdio server:
|
|
49
47
|
|
|
50
48
|
```bash
|
|
51
49
|
npx -y @synapsor/runner audit ./tools-list.json
|
|
52
50
|
```
|
|
53
51
|
|
|
54
52
|
It flags raw SQL, arbitrary identifiers, model-controlled authority, and
|
|
55
|
-
model-facing writeback without calling business tools. See [MCP
|
|
56
|
-
Review](docs/mcp-audit.md) and the [alternatives
|
|
57
|
-
guide](docs/alternatives.md).
|
|
53
|
+
model-facing writeback without calling business tools. See [MCP Audit](docs/mcp-audit.md).
|
|
58
54
|
|
|
59
55
|
## Connect Your Staging Application
|
|
60
56
|
|
|
61
|
-
Use a
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
Use a SELECT-only, non-owner development or staging credential. Runner combines
|
|
58
|
+
database metadata with statically parsed Prisma, Drizzle, OpenAPI, and existing
|
|
59
|
+
Synapsor definitions without executing adopter code, sampling rows, or using an
|
|
60
|
+
LLM:
|
|
65
61
|
|
|
66
62
|
```bash
|
|
67
|
-
|
|
68
|
-
export SYNAPSOR_TENANT_ID="acme"
|
|
69
|
-
export SYNAPSOR_PRINCIPAL="developer-1"
|
|
70
|
-
npx -y @synapsor/runner@latest start --from-env DATABASE_URL
|
|
63
|
+
npx -y @synapsor/runner start
|
|
71
64
|
```
|
|
72
65
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
Paste the URL into the hidden prompt, approve a regular project `.env` for this
|
|
67
|
+
process, or export `DATABASE_URL`. Runner creates a validated zero-authority
|
|
68
|
+
project and opens secured localhost Workbench. A personal-development fast lane
|
|
69
|
+
offers one conservative resource with sensitive fields, relationships, and
|
|
70
|
+
writes off; broader paths require full review.
|
|
77
71
|
|
|
78
72
|
[Database To First Safe Tool](docs/guided-onboarding.md) covers the complete
|
|
79
73
|
path.
|
|
@@ -104,20 +98,25 @@ Which reviewed regions and reason categories contributed most to the increase
|
|
|
104
98
|
in churned accounts by week?
|
|
105
99
|
```
|
|
106
100
|
|
|
107
|
-
Runner validates a typed plan against the
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
Runner validates a typed plan against the active digest, injects trusted scope,
|
|
102
|
+
and runs read-only. Suppression and durable budgets limit extraction. Up to
|
|
103
|
+
three activated one- or two-link many-to-one paths are supported; inactive or
|
|
104
|
+
unsafe joins fail closed. This is descriptive analysis, not causation. See
|
|
105
|
+
[Reviewed Relationships](docs/reviewed-relationships.md).
|
|
106
|
+
|
|
107
|
+
### Optional: Ask In Workbench With Your Model
|
|
110
108
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
The no-model composer remains the default. Optional local Workbench Ask can use
|
|
110
|
+
OpenAI, Anthropic, or a tested OpenAI-compatible endpoint after explicit
|
|
111
|
+
digest-bound egress consent. It can call only displayed reviewed tools; keys
|
|
112
|
+
and history remain in memory, and writes remain proposals. See [Workbench
|
|
113
|
+
Ask](docs/workbench-ask.md).
|
|
114
114
|
|
|
115
115
|
## Protect This Query
|
|
116
116
|
|
|
117
|
-
Choose
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
exact-digest human activation outside MCP.
|
|
117
|
+
Choose a useful result without copying an ID. Runner freezes public DSL,
|
|
118
|
+
canonical JSON, and tests under `synapsor/protected/drafts/`; the named
|
|
119
|
+
capability starts disabled.
|
|
121
120
|
|
|
122
121
|
After activation, Scoped Explore is disabled. Update Cursor to the production
|
|
123
122
|
config:
|
|
@@ -130,9 +129,8 @@ synapsor-runner mcp install cursor \
|
|
|
130
129
|
--yes
|
|
131
130
|
```
|
|
132
131
|
|
|
133
|
-
Production exposes the
|
|
134
|
-
|
|
135
|
-
guide](docs/auto-boundary-and-scoped-explore.md).
|
|
132
|
+
Production exposes the activated named capability, never `app.explore_data`.
|
|
133
|
+
See [Explore And Protect](docs/auto-boundary-and-scoped-explore.md).
|
|
136
134
|
|
|
137
135
|
## Create An Exact Data PR
|
|
138
136
|
|
|
@@ -156,24 +154,17 @@ Effect plan_credit_cents: 0 -> 2500
|
|
|
156
154
|
Source unchanged before approval: Yes
|
|
157
155
|
```
|
|
158
156
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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:
|
|
157
|
+
Approval stays outside MCP. A trusted operator or worker rechecks scope,
|
|
158
|
+
freshness, policy, version, bounds, idempotency, and affected rows before a
|
|
159
|
+
receipt. Runner supports guarded single-row CRUD and bounded reviewed sets;
|
|
160
|
+
rich transactions use app-owned executors. Inspect without copying an ID:
|
|
167
161
|
|
|
168
162
|
```bash
|
|
169
163
|
synapsor-runner lifecycle --details --store ./.synapsor/local.db
|
|
170
164
|
```
|
|
171
165
|
|
|
172
|
-
|
|
173
|
-
|
|
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:
|
|
166
|
+
Optional same-database evidence freshness is checked before approval and again
|
|
167
|
+
inside direct-SQL apply; drift produces zero mutation:
|
|
177
168
|
|
|
178
169
|
```bash
|
|
179
170
|
synapsor-runner proposals check-freshness latest \
|
|
@@ -181,12 +172,8 @@ synapsor-runner proposals check-freshness latest \
|
|
|
181
172
|
--store ./.synapsor/local.db
|
|
182
173
|
```
|
|
183
174
|
|
|
184
|
-
See
|
|
185
|
-
|
|
186
|
-
[store lifecycle](docs/store-lifecycle.md). For production identity, follow
|
|
187
|
-
`APPROVAL ROLE` through verified OIDC/signed-key approval and a separate apply
|
|
188
|
-
role in [Approval Roles And Verified Operator
|
|
189
|
-
Identity](docs/approval-roles-and-operator-identity.md).
|
|
175
|
+
See [Proposal Freshness](docs/proposal-evidence-freshness.md) and [Verified
|
|
176
|
+
Operator Identity](docs/approval-roles-and-operator-identity.md).
|
|
190
177
|
|
|
191
178
|
## Safety Model
|
|
192
179
|
|
|
@@ -194,7 +181,8 @@ Contracts fix trusted context, fields, bounds, transitions, and approval.
|
|
|
194
181
|
Model-facing tools can inspect scoped data and propose exact changes, but cannot
|
|
195
182
|
approve, apply, or revert. A trusted operator/worker performs guarded writeback;
|
|
196
183
|
the ledger links evidence, proposal, decision, receipt, and replay. Runner does
|
|
197
|
-
not make raw SQL or prompt-injection-prone clients safe.
|
|
184
|
+
not make raw SQL or prompt-injection-prone clients safe. Compare the boundary
|
|
185
|
+
with [prompt and application guardrails](docs/why-synapsor-vs-app-guardrails.md).
|
|
198
186
|
|
|
199
187
|
## Choose An Isolation Mode
|
|
200
188
|
|
|
@@ -205,13 +193,10 @@ not make raw SQL or prompt-injection-prone clients safe.
|
|
|
205
193
|
| `postgres_rls` | PostgreSQL also checks transaction-bound tenant/principal scope. Arbitrary trusted-context or credential control remains outside this guarantee. |
|
|
206
194
|
| `tenant_bound` | Authenticated context selects a restricted per-tenant credential or process. |
|
|
207
195
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
MySQL has no native RLS; use restricted views or tenant credentials. See
|
|
213
|
-
[Database scope] and the
|
|
214
|
-
[build-vs-adopt guide](docs/why-synapsor-vs-app-guardrails.md).
|
|
196
|
+
Stdio opens no socket. HTTP requires authentication; remote listeners require
|
|
197
|
+
TLS or a trusted TLS proxy, and shared services require signed claims. MySQL has
|
|
198
|
+
no native RLS; use restricted views or tenant credentials. See [HTTP MCP] and
|
|
199
|
+
[Database scope].
|
|
215
200
|
|
|
216
201
|
## Review And Prove Your Contract
|
|
217
202
|
|
|
@@ -222,49 +207,30 @@ and the [own-database guide](docs/getting-started-own-database.md).
|
|
|
222
207
|
|
|
223
208
|
## Trust And Verification
|
|
224
209
|
|
|
225
|
-
Start with the **[Threat Model](THREAT_MODEL.md)
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
handles re-check tenant/principal rather than acting as bearer authority. Live
|
|
231
|
-
gates cover principal denial, no pre-approval mutation, idempotency, conflict,
|
|
232
|
-
bounded sets, compensation, and proposal/evidence freshness on disposable
|
|
233
|
-
databases.
|
|
234
|
-
|
|
235
|
-
Runner is a narrow agent/database safety boundary, not a replacement for
|
|
236
|
-
least-privilege database access, host security, or application authorization.
|
|
237
|
-
See [Security Boundary](docs/security-boundary.md) and
|
|
238
|
-
[Current Limitations](docs/limitations.md).
|
|
210
|
+
Start with the **[Threat Model](THREAT_MODEL.md)** and [Security
|
|
211
|
+
Boundary](docs/security-boundary.md). Conformance and live disposable-database
|
|
212
|
+
gates cover scope, hidden fields, no pre-approval mutation, idempotency,
|
|
213
|
+
conflicts, bounded sets, freshness, receipts, and replay. Runner does not
|
|
214
|
+
replace least-privilege roles, host security, or application authorization.
|
|
239
215
|
|
|
240
216
|
[Database scope]: docs/database-enforced-scope.md
|
|
241
217
|
[HTTP MCP]: docs/http-mcp.md
|
|
242
218
|
|
|
243
219
|
## Operate The Approval Loop
|
|
244
220
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
The ledger and secured Workbench also provide a Human Attention Inbox.
|
|
253
|
-
External notifications are disabled and quiet by default; an operator can route
|
|
254
|
-
review-required, UNKNOWN, reconciliation, dead-letter, drift, or sustained
|
|
255
|
-
health incidents through a signed generic webhook without granting the receiver
|
|
256
|
-
approval authority. A webhook response cannot approve, apply, or change Runner
|
|
257
|
-
state. See [Supervised Automatic
|
|
258
|
-
Apply](docs/supervised-automatic-apply.md), [Human Attention And
|
|
259
|
-
Notifications](docs/human-attention-notifications.md),
|
|
260
|
-
[Production](docs/production.md), and [Small Runner
|
|
261
|
-
Fleets](docs/running-a-runner-fleet.md).
|
|
221
|
+
Auto-approval does not mean auto-apply. Manual apply remains default unless the
|
|
222
|
+
exact contract digest and deployment both opt into a trusted supervised worker
|
|
223
|
+
that repeats all guards. External notifications are disabled and quiet by default.
|
|
224
|
+
A webhook response cannot approve or apply. See [Supervised
|
|
225
|
+
Apply](docs/supervised-automatic-apply.md) and
|
|
226
|
+
[Notifications](docs/human-attention-notifications.md).
|
|
262
227
|
|
|
263
228
|
## Packages
|
|
264
229
|
|
|
265
230
|
| Package | Purpose |
|
|
266
231
|
| --- | --- |
|
|
267
232
|
| `@synapsor/runner` | CLI, MCP runtime, local ledger, proposals, approval, guarded writeback, replay, and MCP audit. |
|
|
233
|
+
| `synapsor-runner` | Optional short command alias that delegates to the exact matching `@synapsor/runner`; no separate runtime. |
|
|
268
234
|
| `@synapsor/spec` | Canonical portable contracts for contexts, capabilities, workflows, evidence, proposals, receipts, and replay. |
|
|
269
235
|
| `@synapsor/dsl` | SQL-like authoring that compiles contexts, capabilities, and workflow declarations into canonical contract JSON. |
|
|
270
236
|
| `@synapsor/cli` | Synapsor Cloud administration, contract governance, human review, Runner connections, and shared audit records. |
|
|
@@ -292,6 +258,8 @@ guide](https://github.com/Synapsor/Synapsor-Runner/blob/main/docs/cloud-cli.md).
|
|
|
292
258
|
- Follow the [step-by-step Synapsor Tutorial](https://github.com/sandeshtiwari/Synapsor-Tutorial).
|
|
293
259
|
- Run the [`support-billing-agent` flagship example](examples/support-billing-agent).
|
|
294
260
|
- Connect [Claude, Cursor, OpenAI Agents SDK, or another MCP client](docs/mcp-clients.md).
|
|
261
|
+
- Use the optional local [Workbench Ask](docs/workbench-ask.md) client without
|
|
262
|
+
broadening the reviewed tool surface.
|
|
295
263
|
- Author and [push a validated contract to Cloud](docs/cloud-push.md).
|
|
296
264
|
- Browse the [task-first documentation index](docs/README.md).
|
|
297
265
|
- Report bugs or request features through [GitHub Issues](https://github.com/Synapsor/Synapsor-Runner/issues).
|
package/SECURITY.md
CHANGED
|
@@ -8,12 +8,16 @@ Do not include production credentials, customer data, or full source rows in bug
|
|
|
8
8
|
|
|
9
9
|
Runner protects the local model/database boundary for reviewed semantic reads,
|
|
10
10
|
structured proposals, verified approval, guarded writeback, receipts, replay,
|
|
11
|
-
and optional exact-digest supervised
|
|
12
|
-
|
|
11
|
+
local authoring-only typed Explore/Protect, and optional exact-digest supervised
|
|
12
|
+
execution. Optional Workbench Ask calls only that same reviewed runtime surface.
|
|
13
|
+
Human-attention notifications are redacted interruption channels and never
|
|
14
|
+
authority.
|
|
13
15
|
|
|
14
16
|
It does not make the hosted Synapsor control plane self-hosted, prevent prompt
|
|
15
17
|
injection, replace database roles/RLS, or provide HA, compliance certification,
|
|
16
|
-
or a general database proxy.
|
|
18
|
+
or a general database proxy. Reviewed visible data sent to an
|
|
19
|
+
operator-selected model provider is subject to that provider's own privacy and
|
|
20
|
+
retention terms.
|
|
17
21
|
|
|
18
22
|
See `THREAT_MODEL.md` and `docs/security-boundary.md` for detailed trust
|
|
19
23
|
boundaries, covered threats, non-goals, and release blockers.
|
package/THREAT_MODEL.md
CHANGED
|
@@ -14,6 +14,11 @@ It is not a general MCP security gateway, not a prompt-injection cure, not a rep
|
|
|
14
14
|
Postgres proposal/evidence/replay ledger.
|
|
15
15
|
- Exact-digest supervised-worker policy, worker leases, attention events,
|
|
16
16
|
notification delivery records, and webhook signing secrets.
|
|
17
|
+
- Generated boundary drafts, review decisions, exact activation digests,
|
|
18
|
+
generation locks, reviewed relationship proofs, and Scoped Explore privacy
|
|
19
|
+
budgets.
|
|
20
|
+
- Optional Workbench Ask provider credentials and direct-egress consent held
|
|
21
|
+
only in the local process.
|
|
17
22
|
|
|
18
23
|
## Trust Boundaries
|
|
19
24
|
|
|
@@ -54,6 +59,27 @@ idempotency boundary for effects.
|
|
|
54
59
|
## Covered Threats
|
|
55
60
|
|
|
56
61
|
- Model asks for arbitrary SQL: no generic SQL tool is exposed in the Synapsor path.
|
|
62
|
+
- Model tries to turn Scoped Explore into generic SQL or production authority:
|
|
63
|
+
Explore accepts only reviewed typed plans, is local authoring-only, and is
|
|
64
|
+
absent from production, unknown-profile, remote, shared HTTP, and non-loopback
|
|
65
|
+
tool catalogs. Protect output starts disabled and requires exact-digest human
|
|
66
|
+
activation.
|
|
67
|
+
- Model invents or widens a join: aggregate relationships must be activated,
|
|
68
|
+
catalog-proven many-to-one paths with fan-out one; table/key/join semantics
|
|
69
|
+
and activation are not plan arguments. Ambiguous, one-to-many, many-to-many,
|
|
70
|
+
stale, and over-depth paths fail closed.
|
|
71
|
+
- Generated authority widens after schema/role drift: generated capability and
|
|
72
|
+
exploration authority are bound to schema, compiler/Spec, role, grant,
|
|
73
|
+
ownership, RLS, and reviewed-proof fingerprints. Manual legacy projects are
|
|
74
|
+
unaffected unless they adopt a generation lock.
|
|
75
|
+
- Optional Workbench Ask becomes a second policy engine: Ask lists and calls the
|
|
76
|
+
exact active MCP/runtime tools, adds no activation/approval/apply authority,
|
|
77
|
+
keeps provider choice outside model control, and treats provider prose/tool
|
|
78
|
+
arguments as untrusted.
|
|
79
|
+
- Provider endpoint exfiltration or SSRF: official origins are fixed, custom
|
|
80
|
+
remote origins require HTTPS, plaintext is loopback-only, redirects are
|
|
81
|
+
refused, DNS is revalidated and pinned, and private/link-local/metadata
|
|
82
|
+
destinations fail closed.
|
|
57
83
|
- Model supplies `tenant_id`, `principal`, source id, allowed columns, row version, or approval identity: runner rejects trusted-binding overrides.
|
|
58
84
|
- Prompt injection in database content asks the model to bypass policy: the runner ignores text as authority and only accepts structured capability/job state.
|
|
59
85
|
- Aggregate inference through a one-record group: reviewed aggregate tools
|
|
@@ -104,6 +130,9 @@ idempotency boundary for effects.
|
|
|
104
130
|
- Credential theft outside the runner process.
|
|
105
131
|
- OAuth, SSRF, token-passthrough, or confused-deputy bugs in unrelated MCP systems.
|
|
106
132
|
- Sensitive data already returned to a model.
|
|
133
|
+
- Reviewed visible data intentionally sent to an operator-selected external
|
|
134
|
+
model provider after Workbench egress consent; the provider's retention and
|
|
135
|
+
training policy remains outside Runner.
|
|
107
136
|
- Prompt injection itself.
|
|
108
137
|
- Business invariants not represented in the capability config, proposal, application handler, or database constraints.
|
|
109
138
|
- Generic multi-row business transactions, DDL, UPSERT, model-generated
|
|
@@ -136,6 +165,14 @@ idempotency boundary for effects.
|
|
|
136
165
|
queues; `dev_env` is unverified.
|
|
137
166
|
- Treat proposal/evidence/replay handles as identifiers, not authorization;
|
|
138
167
|
preserve verified per-session context on every networked resource read.
|
|
168
|
+
- Keep Scoped Explore and Workbench Ask local to explicit development/staging
|
|
169
|
+
authoring, verify a SELECT-only non-owner role, and disable Explore before
|
|
170
|
+
production. Production should serve only activated named capabilities.
|
|
171
|
+
- Review generation-lock and relationship-proof drift instead of bypassing it,
|
|
172
|
+
and do not treat Prisma/Drizzle/OpenAPI names as authorization.
|
|
173
|
+
- For Workbench Ask, choose provider/model/origin yourself, acknowledge direct
|
|
174
|
+
egress, keep keys out of project files and chat, and clear in-memory sessions
|
|
175
|
+
when finished.
|
|
139
176
|
|
|
140
177
|
## Release Blockers
|
|
141
178
|
|