@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.
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +94 -8
- package/CONTRIBUTING.md +10 -3
- package/README.md +90 -109
- 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 +7688 -2227
- package/dist/runtime.mjs +528 -51
- package/docs/README.md +14 -0
- package/docs/agent-guided-setup.md +13 -11
- package/docs/aggregate-reads.md +14 -5
- package/docs/app-owned-executors.md +5 -6
- package/docs/auto-boundary-and-scoped-explore.md +70 -14
- package/docs/capability-authoring.md +2 -2
- package/docs/client-recipes.md +41 -12
- 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 +52 -50
- package/docs/guided-onboarding.md +104 -34
- package/docs/host-compatibility.md +24 -11
- 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 +26 -14
- package/docs/mcp-clients.md +47 -11
- 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 +100 -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 +63 -19
- 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 +9 -2
package/docs/limitations.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Limitations
|
|
2
2
|
|
|
3
|
-
Synapsor Runner is intentionally narrow.
|
|
4
|
-
whole-application boundary drafting
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
Synapsor Runner is intentionally narrow. It combines deterministic
|
|
4
|
+
whole-application boundary drafting, local authoring-only Explore -> Protect,
|
|
5
|
+
guarded writes, opt-in proposal/evidence freshness, verified operator identity,
|
|
6
|
+
default-off supervised execution, and quiet human-attention delivery. Reviewed
|
|
7
|
+
aggregate paths are limited to proven star/depth-two many-to-one relationships,
|
|
8
|
+
not a general join planner. Optional local Workbench Ask is a client of the
|
|
9
|
+
existing reviewed tools; the complete no-model path remains the default.
|
|
10
|
+
Runner does not become a generic database query tool, Synapsor Cloud, or an
|
|
11
|
+
enterprise SLA.
|
|
12
12
|
|
|
13
13
|
## Supported
|
|
14
14
|
|
|
@@ -63,10 +63,20 @@ existing manual behavior.
|
|
|
63
63
|
existing Synapsor definitions. Generated authority starts disabled.
|
|
64
64
|
- Local development/staging Scoped Explore through exactly
|
|
65
65
|
`app.describe_data` and `app.explore_data`, with no SQL-string argument.
|
|
66
|
+
- Optional development/staging loopback Workbench Ask through OpenAI,
|
|
67
|
+
Anthropic, or a configured OpenAI-compatible endpoint. Provider calls use the
|
|
68
|
+
exact active MCP/runtime surface, explicit direct-egress consent, in-memory
|
|
69
|
+
credential/history state, fixed tool/time/size/token bounds, and
|
|
70
|
+
proposal-only write behavior.
|
|
66
71
|
- Reviewed PM-style aggregate Explore with `count`, `count_distinct`, `sum`,
|
|
67
72
|
`avg`, categorical dimensions, fixed time buckets, typed filters, bounded
|
|
68
|
-
top-N,
|
|
69
|
-
and durable
|
|
73
|
+
top-N, up to three reviewed relationship paths of at most two proven
|
|
74
|
+
many-to-one links each, cohort suppression, and durable
|
|
75
|
+
extraction/differencing budgets.
|
|
76
|
+
- Demand-driven operator review for an exact catalog-proven relationship,
|
|
77
|
+
including an explicit missing-row choice for nullable links. The model cannot
|
|
78
|
+
activate a relationship, and every participating relation receives trusted
|
|
79
|
+
tenant/principal scope.
|
|
70
80
|
- Protect This Query to public DSL, canonical JSON, tests, and a disabled named
|
|
71
81
|
capability that survives Explore shutdown after exact-digest activation.
|
|
72
82
|
- Generation-lock drift detection for generated authority. Manually authored
|
|
@@ -123,14 +133,18 @@ truth for the model-facing tools.
|
|
|
123
133
|
- Unbounded/high-throughput or multi-region ledger scale.
|
|
124
134
|
- Managed fleet, SLA, compliance certification, or production support guarantee.
|
|
125
135
|
- Production, shared HTTP, remote, or non-loopback Scoped Explore.
|
|
136
|
+
- Production, shared HTTP, remote, or non-loopback Workbench Ask; model-facing
|
|
137
|
+
provider configuration; Synapsor-relayed provider traffic; durable chat
|
|
138
|
+
history; automatic provider retries; exact monetary spend enforcement; or
|
|
139
|
+
universal compatibility with OpenAI-compatible servers.
|
|
126
140
|
- Automatic supervised execution for hard DELETE, reversible changes, bounded
|
|
127
141
|
sets, app-owned/external effects, or writes without deterministic conflict,
|
|
128
142
|
deduplication, freshness, and receipt authority.
|
|
129
143
|
- Arbitrary aggregate expressions, dynamic identifiers, unrestricted joins,
|
|
130
144
|
many-to-many joins, formulas, window functions, subqueries, `HAVING`,
|
|
131
|
-
user-defined functions, or a statistical privacy guarantee.
|
|
132
|
-
|
|
133
|
-
|
|
145
|
+
user-defined functions, or a statistical privacy guarantee. Runner supports
|
|
146
|
+
only the explicitly reviewed authoring cube described above and fixed
|
|
147
|
+
protected named capabilities produced from it.
|
|
134
148
|
- Automatic policy widening or activation from graduated-trust metrics.
|
|
135
149
|
- Immutable/WORM compliance storage from the local report exporter.
|
|
136
150
|
|
|
@@ -165,6 +179,12 @@ jobs. Mixed-minor v3/v4 rolling compensation is not claimed.
|
|
|
165
179
|
See [Running A Small Runner
|
|
166
180
|
Fleet](running-a-runner-fleet.md).
|
|
167
181
|
|
|
182
|
+
Workbench Ask token accounting uses provider-reported usage. A provider that
|
|
183
|
+
omits or misreports usage cannot provide exact token or monetary enforcement.
|
|
184
|
+
Runner still enforces request/response, tool-result, iteration, history, and
|
|
185
|
+
wall-clock bounds. A provider outage does not disable the no-model composer or
|
|
186
|
+
external MCP path. See [Workbench Ask With Your Model](workbench-ask.md).
|
|
187
|
+
|
|
168
188
|
Use this wording:
|
|
169
189
|
|
|
170
190
|
```text
|
package/docs/local-mode.md
CHANGED
|
@@ -44,13 +44,13 @@ when you do not want to change your host Node version.
|
|
|
44
44
|
Create a starter config without putting credentials in the file:
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
npx -y
|
|
47
|
+
npx -y @synapsor/runner init --engine postgres --mode review
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
For MySQL:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
npx -y
|
|
53
|
+
npx -y @synapsor/runner init --engine mysql --mode review --output synapsor.mysql.runner.json
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
The generated config uses environment-variable names for read/write URLs and trusted context. Edit the table, column, and capability names before serving tools.
|
|
@@ -63,8 +63,8 @@ persisted into proposals, evidence, query audit, runner state, or replay.
|
|
|
63
63
|
For a reviewed own-database setup generated from explicit selections, use:
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
npx -y
|
|
67
|
-
npx -y
|
|
66
|
+
npx -y @synapsor/runner init --spec onboarding-selection.json --non-interactive
|
|
67
|
+
npx -y @synapsor/runner doctor --config synapsor.runner.json
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
`doctor --config` checks config validation, required environment variables,
|
|
@@ -76,7 +76,7 @@ and the semantic MCP tool boundary without printing credential values.
|
|
|
76
76
|
Use stdio for local MCP clients that launch Synapsor Runner:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
npx -y
|
|
79
|
+
npx -y @synapsor/runner mcp serve \
|
|
80
80
|
--config ./synapsor.runner.json \
|
|
81
81
|
--store ./.synapsor/local.db
|
|
82
82
|
```
|
|
@@ -87,7 +87,7 @@ MCP client:
|
|
|
87
87
|
```bash
|
|
88
88
|
export SYNAPSOR_RUNNER_HTTP_TOKEN="$(node -e 'process.stdout.write(require("node:crypto").randomBytes(32).toString("base64url"))')"
|
|
89
89
|
|
|
90
|
-
npx -y
|
|
90
|
+
npx -y @synapsor/runner mcp serve-streamable-http \
|
|
91
91
|
--config ./synapsor.runner.json \
|
|
92
92
|
--store ./.synapsor/local.db \
|
|
93
93
|
--auth-token-env SYNAPSOR_RUNNER_HTTP_TOKEN
|
|
@@ -131,19 +131,19 @@ If neither is set, the CLI uses:
|
|
|
131
131
|
List proposals:
|
|
132
132
|
|
|
133
133
|
```bash
|
|
134
|
-
npx -y
|
|
134
|
+
npx -y @synapsor/runner proposals list --store ./.synapsor/local.db
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
Show a proposal:
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
|
-
npx -y
|
|
140
|
+
npx -y @synapsor/runner proposals show wrp_123 --store ./.synapsor/local.db
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
Check a freshness-enabled proposal without copying its id:
|
|
144
144
|
|
|
145
145
|
```bash
|
|
146
|
-
npx -y
|
|
146
|
+
npx -y @synapsor/runner proposals check-freshness latest \
|
|
147
147
|
--config ./synapsor.runner.json \
|
|
148
148
|
--store ./.synapsor/local.db
|
|
149
149
|
```
|
|
@@ -151,7 +151,7 @@ npx -y -p @synapsor/runner synapsor-runner proposals check-freshness latest \
|
|
|
151
151
|
Approve:
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
|
-
npx -y
|
|
154
|
+
npx -y @synapsor/runner proposals approve wrp_123 \
|
|
155
155
|
--config ./synapsor.runner.json \
|
|
156
156
|
--store ./.synapsor/local.db \
|
|
157
157
|
--actor local_reviewer \
|
|
@@ -177,7 +177,7 @@ revalidates again because source data can change after approval. See
|
|
|
177
177
|
Create a guarded writeback job from an approved proposal:
|
|
178
178
|
|
|
179
179
|
```bash
|
|
180
|
-
npx -y
|
|
180
|
+
npx -y @synapsor/runner proposals writeback-job wrp_123 \
|
|
181
181
|
--store ./.synapsor/local.db \
|
|
182
182
|
--project local \
|
|
183
183
|
--runner local_runner \
|
|
@@ -189,7 +189,7 @@ The generated job uses the public `synapsor.writeback-job.v1` protocol and can b
|
|
|
189
189
|
```bash
|
|
190
190
|
export SYNAPSOR_DATABASE_WRITE_URL="postgresql://writer:<password>@localhost:5432/app"
|
|
191
191
|
SYNAPSOR_ENGINE=postgres \
|
|
192
|
-
npx -y
|
|
192
|
+
npx -y @synapsor/runner apply --job job.json --config synapsor.runner.json --store ./.synapsor/local.db
|
|
193
193
|
```
|
|
194
194
|
|
|
195
195
|
When `--config` is passed, direct SQL writeback reads the writer connection from
|
|
@@ -201,7 +201,7 @@ Passing `--store` records the terminal `synapsor.execution-receipt.v1` locally.
|
|
|
201
201
|
Reject:
|
|
202
202
|
|
|
203
203
|
```bash
|
|
204
|
-
npx -y
|
|
204
|
+
npx -y @synapsor/runner proposals reject wrp_123 \
|
|
205
205
|
--store ./.synapsor/local.db \
|
|
206
206
|
--reason "policy evidence is incomplete" \
|
|
207
207
|
--yes
|
|
@@ -222,7 +222,7 @@ pilot, use [Shadow Studies](shadow-studies.md).
|
|
|
222
222
|
Start a localhost-only review UI:
|
|
223
223
|
|
|
224
224
|
```bash
|
|
225
|
-
npx -y
|
|
225
|
+
npx -y @synapsor/runner ui --config synapsor.runner.json --store ./.synapsor/local.db
|
|
226
226
|
```
|
|
227
227
|
|
|
228
228
|
The UI shows setup summary, semantic tools, proposal states, exact diffs,
|
|
@@ -240,20 +240,20 @@ tools, MCP commit tools, or controls that widen configured tables/columns.
|
|
|
240
240
|
Show replay:
|
|
241
241
|
|
|
242
242
|
```bash
|
|
243
|
-
npx -y
|
|
244
|
-
npx -y
|
|
245
|
-
npx -y
|
|
246
|
-
npx -y
|
|
243
|
+
npx -y @synapsor/runner replay show wrp_123 --store ./.synapsor/local.db
|
|
244
|
+
npx -y @synapsor/runner replay show --proposal wrp_123 --store ./.synapsor/local.db
|
|
245
|
+
npx -y @synapsor/runner replay show --replay replay_wrp_123 --store ./.synapsor/local.db
|
|
246
|
+
npx -y @synapsor/runner replay show --evidence ev_123 --store ./.synapsor/local.db
|
|
247
247
|
```
|
|
248
248
|
|
|
249
249
|
Export replay:
|
|
250
250
|
|
|
251
251
|
```bash
|
|
252
|
-
npx -y
|
|
252
|
+
npx -y @synapsor/runner replay export wrp_123 \
|
|
253
253
|
--store ./.synapsor/local.db \
|
|
254
254
|
--output replay.json
|
|
255
255
|
|
|
256
|
-
npx -y
|
|
256
|
+
npx -y @synapsor/runner replay export --proposal wrp_123 \
|
|
257
257
|
--format markdown \
|
|
258
258
|
--store ./.synapsor/local.db \
|
|
259
259
|
--output replay.md
|
package/docs/mcp-audit.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MCP database risk review
|
|
2
2
|
|
|
3
|
-
`npx -y
|
|
3
|
+
`npx -y @synapsor/runner audit <target>` performs a
|
|
4
4
|
static MCP database risk review over an exported tool manifest, a remote MCP
|
|
5
5
|
`tools/list` endpoint, or a stdio MCP server. The `mcp audit` subcommand is also
|
|
6
6
|
available for users who look for the command under the MCP namespace.
|
|
@@ -26,7 +26,7 @@ MCP annotations are treated as hints, not enforcement.
|
|
|
26
26
|
Built-in database MCP risk example:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
npx -y
|
|
29
|
+
npx -y @synapsor/runner audit --example dangerous-db-mcp
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
This bundled example does not require a source checkout or local examples file.
|
|
@@ -37,7 +37,7 @@ table/column inputs, and model-controlled tenant/principal fields.
|
|
|
37
37
|
Human-readable output:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
npx -y
|
|
40
|
+
npx -y @synapsor/runner audit ./tools-list.json
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
The default terminal report groups repeated findings into the three most
|
|
@@ -46,32 +46,32 @@ and one next action instead of repeating the same explanation for every tool.
|
|
|
46
46
|
Use the complete view when triaging every finding:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
npx -y
|
|
49
|
+
npx -y @synapsor/runner audit ./tools-list.json --verbose
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
Remote `tools/list` endpoint with a bearer token kept in the environment:
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
55
|
SYNAPSOR_MCP_AUDIT_BEARER="..." \
|
|
56
|
-
npx -y
|
|
56
|
+
npx -y @synapsor/runner audit https://mcp.example.com --format json
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Remote endpoint with a custom bearer-token environment variable:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
npx -y
|
|
62
|
+
npx -y @synapsor/runner audit https://mcp.example.com --bearer-env MCP_AUDIT_TOKEN --format json
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
Stdio MCP server:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
npx -y
|
|
68
|
+
npx -y @synapsor/runner audit 'stdio:node ./server.mjs' --timeout-ms 5000
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
JSON output:
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
|
-
npx -y
|
|
74
|
+
npx -y @synapsor/runner audit ./tools-list.json --format json
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
The JSON contract remains `synapsor.mcp-audit.v1`; its published schema is
|
|
@@ -80,19 +80,19 @@ The JSON contract remains `synapsor.mcp-audit.v1`; its published schema is
|
|
|
80
80
|
SARIF 2.1.0 output for code-scanning ingestion:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
npx -y
|
|
83
|
+
npx -y @synapsor/runner audit ./tools-list.json --format sarif > mcp-audit.sarif
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
Markdown output for issues, PRs, or security review notes:
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
npx -y
|
|
89
|
+
npx -y @synapsor/runner audit --example dangerous-db-mcp --format markdown
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Inspect a project-scoped Cursor configuration without launching anything:
|
|
93
93
|
|
|
94
94
|
```bash
|
|
95
|
-
npx -y
|
|
95
|
+
npx -y @synapsor/runner audit \
|
|
96
96
|
--mcp-config ./.cursor/mcp.json \
|
|
97
97
|
--format markdown
|
|
98
98
|
```
|
|
@@ -102,7 +102,7 @@ as `requires_operator_verification`. To query one reviewed stdio command, name
|
|
|
102
102
|
that exact server and give explicit consent:
|
|
103
103
|
|
|
104
104
|
```bash
|
|
105
|
-
npx -y
|
|
105
|
+
npx -y @synapsor/runner audit \
|
|
106
106
|
--mcp-config ./.cursor/mcp.json \
|
|
107
107
|
--live-server synapsor \
|
|
108
108
|
--yes \
|
|
@@ -132,7 +132,7 @@ Audit can create a separate review directory without editing or activating the
|
|
|
132
132
|
source configuration:
|
|
133
133
|
|
|
134
134
|
```bash
|
|
135
|
-
npx -y
|
|
135
|
+
npx -y @synapsor/runner audit generate \
|
|
136
136
|
./tools-list.json \
|
|
137
137
|
--output ./synapsor-audit-candidates
|
|
138
138
|
```
|
|
@@ -141,7 +141,7 @@ Open the same blocked candidate directly in the secured local review
|
|
|
141
141
|
workbench:
|
|
142
142
|
|
|
143
143
|
```bash
|
|
144
|
-
npx -y
|
|
144
|
+
npx -y @synapsor/runner audit generate \
|
|
145
145
|
./tools-list.json \
|
|
146
146
|
--output ./synapsor-audit-candidates \
|
|
147
147
|
--open-ui
|
package/docs/mcp-client-setup.md
CHANGED
|
@@ -57,7 +57,7 @@ provisions the same environment value to Runner and the authorized client:
|
|
|
57
57
|
```bash
|
|
58
58
|
export SYNAPSOR_RUNNER_HTTP_TOKEN="$(node -e 'process.stdout.write(require("node:crypto").randomBytes(32).toString("base64url"))')"
|
|
59
59
|
|
|
60
|
-
npx -y
|
|
60
|
+
npx -y @synapsor/runner mcp serve-streamable-http \
|
|
61
61
|
--config ./synapsor.runner.json \
|
|
62
62
|
--store ./.synapsor/local.db \
|
|
63
63
|
--auth-token-env SYNAPSOR_RUNNER_HTTP_TOKEN
|
|
@@ -69,7 +69,7 @@ OpenAI-safe aliases while keeping canonical Synapsor capability names in MCP
|
|
|
69
69
|
metadata:
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
npx -y
|
|
72
|
+
npx -y @synapsor/runner mcp serve-streamable-http \
|
|
73
73
|
--config ./synapsor.runner.json \
|
|
74
74
|
--store ./.synapsor/local.db \
|
|
75
75
|
--auth-token-env SYNAPSOR_RUNNER_HTTP_TOKEN \
|
|
@@ -85,7 +85,7 @@ same time.
|
|
|
85
85
|
Preview the exact alias mapping before wiring a client:
|
|
86
86
|
|
|
87
87
|
```bash
|
|
88
|
-
npx -y
|
|
88
|
+
npx -y @synapsor/runner tools preview \
|
|
89
89
|
--config ./synapsor.runner.json \
|
|
90
90
|
--store ./.synapsor/local.db \
|
|
91
91
|
--alias-mode openai
|
|
@@ -101,7 +101,7 @@ with tenant/principal bound from verified claims. Details: [HTTP MCP](http-mcp.m
|
|
|
101
101
|
Print a snippet without modifying any client files:
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
|
|
104
|
+
synapsor-runner mcp config claude-desktop \
|
|
105
105
|
--config ./synapsor.runner.json \
|
|
106
106
|
--store ./.synapsor/local.db
|
|
107
107
|
```
|
|
@@ -121,7 +121,7 @@ For OpenAI Agents SDK, generate the Streamable HTTP start command and Python
|
|
|
121
121
|
snippet:
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
|
-
|
|
124
|
+
synapsor-runner mcp client-config \
|
|
125
125
|
--client openai-agents \
|
|
126
126
|
--config ./synapsor.runner.json \
|
|
127
127
|
--store ./.synapsor/local.db
|
|
@@ -130,13 +130,13 @@ npx -y -p @synapsor/runner synapsor-runner mcp client-config \
|
|
|
130
130
|
The older form is still supported:
|
|
131
131
|
|
|
132
132
|
```bash
|
|
133
|
-
|
|
133
|
+
synapsor-runner mcp configure --client claude-desktop --config ./synapsor.runner.json --store ./.synapsor/local.db
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
Write is opt-in and requires an explicit destination:
|
|
137
137
|
|
|
138
138
|
```bash
|
|
139
|
-
|
|
139
|
+
synapsor-runner mcp configure \
|
|
140
140
|
--client cursor \
|
|
141
141
|
--config ./synapsor.runner.json \
|
|
142
142
|
--store ./.synapsor/local.db \
|
|
@@ -162,7 +162,7 @@ standalone local UI or terminal for human review.
|
|
|
162
162
|
From the runner repository:
|
|
163
163
|
|
|
164
164
|
```bash
|
|
165
|
-
npx -y
|
|
165
|
+
npx -y @synapsor/runner mcp serve --config ./examples/mcp-postgres-billing/synapsor.runner.json --store ./.synapsor/local.db
|
|
166
166
|
```
|
|
167
167
|
|
|
168
168
|
For reproducible deployments, pin an exact stable version in package manifests
|
|
@@ -172,7 +172,7 @@ the current `latest` release.
|
|
|
172
172
|
For standard app/server HTTP MCP mode:
|
|
173
173
|
|
|
174
174
|
```bash
|
|
175
|
-
npx -y
|
|
175
|
+
npx -y @synapsor/runner mcp serve-streamable-http \
|
|
176
176
|
--config ./examples/mcp-postgres-billing/synapsor.runner.json \
|
|
177
177
|
--store ./.synapsor/local.db \
|
|
178
178
|
--auth-token-env SYNAPSOR_RUNNER_HTTP_TOKEN
|
|
@@ -190,10 +190,7 @@ sessions, so do not use it for a shared identity deployment.
|
|
|
190
190
|
"synapsor-runner": {
|
|
191
191
|
"command": "npx",
|
|
192
192
|
"args": [
|
|
193
|
-
"-y",
|
|
194
|
-
"-p",
|
|
195
|
-
"@synapsor/runner",
|
|
196
|
-
"synapsor-runner",
|
|
193
|
+
"-y", "@synapsor/runner",
|
|
197
194
|
"mcp",
|
|
198
195
|
"serve",
|
|
199
196
|
"--config",
|
|
@@ -235,7 +232,7 @@ small tool-call test.
|
|
|
235
232
|
First confirm what Runner exposes:
|
|
236
233
|
|
|
237
234
|
```bash
|
|
238
|
-
npx -y
|
|
235
|
+
npx -y @synapsor/runner tools preview \
|
|
239
236
|
--config ./synapsor.runner.json \
|
|
240
237
|
--store ./.synapsor/local.db
|
|
241
238
|
```
|
|
@@ -270,6 +267,21 @@ examples/mcp-client-configs/cursor.json
|
|
|
270
267
|
examples/mcp-client-configs/vscode.json
|
|
271
268
|
```
|
|
272
269
|
|
|
270
|
+
For project-local Cursor, Claude Code, or VS Code configuration, prefer the
|
|
271
|
+
managed lifecycle instead of editing JSON:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
synapsor-runner mcp install claude-code --project --dry-run
|
|
275
|
+
synapsor-runner mcp install claude-code --project --yes
|
|
276
|
+
synapsor-runner mcp status claude-code --project --check-launch
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Use `cursor` or `vscode` instead when that is the selected client. Runner
|
|
280
|
+
backs up and merges only its own entry, pins the exact package version, and
|
|
281
|
+
keeps credentials and trusted scope out of the client file. Claude Desktop is
|
|
282
|
+
global application configuration and remains a checked template rather than a
|
|
283
|
+
managed project install.
|
|
284
|
+
|
|
273
285
|
Each example uses the same stdio command/args/env structure. Replace the placeholder environment variables in your client settings or shell environment.
|
|
274
286
|
|
|
275
287
|
These checked-in desktop examples use stdio, which is the recommended local
|
package/docs/mcp-clients.md
CHANGED
|
@@ -33,13 +33,14 @@ the checked-in client JSON.
|
|
|
33
33
|
|
|
34
34
|
## Stdio
|
|
35
35
|
|
|
36
|
-
Use stdio for Claude Desktop, Cursor, and other local MCP
|
|
36
|
+
Use stdio for Claude Code, Claude Desktop, Cursor, VS Code, and other local MCP
|
|
37
|
+
clients:
|
|
37
38
|
|
|
38
39
|
```json
|
|
39
40
|
{
|
|
40
41
|
"command": "npx",
|
|
41
42
|
"args": [
|
|
42
|
-
"-y", "
|
|
43
|
+
"-y", "@synapsor/runner",
|
|
43
44
|
"mcp", "serve", "--config", "./synapsor.runner.json",
|
|
44
45
|
"--store", "./.synapsor/local.db"
|
|
45
46
|
]
|
|
@@ -65,25 +66,52 @@ environment. Supply the required env values through the OS process environment
|
|
|
65
66
|
or a local secret-manager wrapper; do not paste production credentials into a
|
|
66
67
|
repository file.
|
|
67
68
|
|
|
68
|
-
###
|
|
69
|
+
### Managed Project Installs
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
Runner can safely manage its own project-local entry for Cursor, Claude Code,
|
|
72
|
+
or VS Code. Choose the client you actually use:
|
|
71
73
|
|
|
72
74
|
```bash
|
|
73
75
|
synapsor-runner mcp install cursor --project --dry-run \
|
|
74
76
|
--config ./synapsor.runner.json \
|
|
75
77
|
--store ./.synapsor/local.db
|
|
76
|
-
synapsor-runner mcp install
|
|
78
|
+
synapsor-runner mcp install claude-code --project --dry-run \
|
|
79
|
+
--config ./synapsor.runner.json \
|
|
80
|
+
--store ./.synapsor/local.db
|
|
81
|
+
synapsor-runner mcp install vscode --project --dry-run \
|
|
77
82
|
--config ./synapsor.runner.json \
|
|
78
83
|
--store ./.synapsor/local.db
|
|
79
|
-
synapsor-runner mcp status cursor --project --check-launch
|
|
80
84
|
```
|
|
81
85
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
Replace `--dry-run` with `--yes` only after reviewing the preview, then verify
|
|
87
|
+
the selected client:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
synapsor-runner mcp install claude-code --project --yes \
|
|
91
|
+
--config ./synapsor.runner.json \
|
|
92
|
+
--store ./.synapsor/local.db
|
|
93
|
+
synapsor-runner mcp status claude-code --project --check-launch
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
| Client | Managed project file | Server map |
|
|
97
|
+
| --- | --- | --- |
|
|
98
|
+
| Cursor | `.cursor/mcp.json` | `mcpServers.synapsor` |
|
|
99
|
+
| Claude Code | `.mcp.json` | `mcpServers.synapsor` |
|
|
100
|
+
| VS Code | `.vscode/mcp.json` | `servers.synapsor` |
|
|
101
|
+
|
|
102
|
+
Runner previews the merge, backs up an existing file, preserves unrelated
|
|
103
|
+
servers and settings, writes an exact-version `npx` invocation, and tracks only
|
|
104
|
+
its own entry with a client-specific integrity marker under `.synapsor/`.
|
|
105
|
+
Repeating install is idempotent. VS Code JSON-with-comments, comments, and
|
|
106
|
+
trailing commas are preserved. `mcp uninstall <client> --project --yes`
|
|
107
|
+
removes only an intact Runner-owned entry and creates another backup.
|
|
108
|
+
|
|
109
|
+
No managed client file contains a database URL, credential, trusted tenant or
|
|
110
|
+
principal value, approval authority, or apply authority. Claude Code asks the
|
|
111
|
+
human to approve project-scoped MCP servers; that host approval does not grant
|
|
112
|
+
Synapsor activation, proposal approval, or writeback authority.
|
|
113
|
+
|
|
114
|
+
### Cursor
|
|
87
115
|
|
|
88
116
|
For global setup, merge `cursor-global.mcp.json` through Cursor's MCP settings
|
|
89
117
|
and replace every `<absolute-path-to-bundle>` marker. Restart the MCP server
|
|
@@ -100,6 +128,14 @@ the secured localhost workbench or operator CLI. No Add to Cursor deep link is
|
|
|
100
128
|
generated because Runner has not verified a currently documented generic
|
|
101
129
|
payload for this server. See [Host Compatibility](host-compatibility.md).
|
|
102
130
|
|
|
131
|
+
### Claude Code And VS Code
|
|
132
|
+
|
|
133
|
+
For Claude Code, restart or open a new project session after installation and
|
|
134
|
+
approve the project MCP server when prompted. For VS Code, reload the window
|
|
135
|
+
and start the Synapsor server. `mcp status <client> --project --check-launch`
|
|
136
|
+
validates the generated command with a real MCP initialize and `tools/list`
|
|
137
|
+
handshake; it does not claim that a model completed a host UI interaction.
|
|
138
|
+
|
|
103
139
|
### OpenAI Agents SDK
|
|
104
140
|
|
|
105
141
|
Install the SDK in your agent project and run either TypeScript template:
|
|
@@ -150,11 +150,15 @@ use Runner/spec/DSL 1.1 together. Omitted fields preserve 1.0 behavior.
|
|
|
150
150
|
|
|
151
151
|
## 1.6 Generated Authority And Supervised Execution
|
|
152
152
|
|
|
153
|
-
Runner 1.6.
|
|
153
|
+
Runner 1.6.4, Spec 1.7.0, and DSL 1.7.0 are additive. Existing hand-authored
|
|
154
154
|
DSL/JSON/config projects do not need Auto Boundary, Workbench, a generation
|
|
155
155
|
lock, schema rescanning, or supervised execution. Contracts that omit the new
|
|
156
156
|
fields retain their previous canonical normalization and digest.
|
|
157
157
|
|
|
158
|
+
Spec/DSL 1.7.0 add optional reviewed relationship-path fields and `LINK`
|
|
159
|
+
syntax. The legacy one-hop relationship form remains accepted and canonical;
|
|
160
|
+
an unchanged legacy contract retains its exact normalized bytes and digest.
|
|
161
|
+
|
|
158
162
|
Auto Boundary writes a generation lock only for authority it generated.
|
|
159
163
|
Drift enforcement applies only when `synapsor.runner.json` explicitly
|
|
160
164
|
references that lock under `generated_authority`; manually authored projects
|
|
@@ -10,7 +10,7 @@ surface.
|
|
|
10
10
|
```bash
|
|
11
11
|
export SYNAPSOR_RUNNER_HTTP_TOKEN="$(node -e 'process.stdout.write(require("node:crypto").randomBytes(32).toString("base64url"))')"
|
|
12
12
|
|
|
13
|
-
npx -y
|
|
13
|
+
npx -y @synapsor/runner mcp serve-streamable-http \
|
|
14
14
|
--config ./synapsor.runner.json \
|
|
15
15
|
--store ./.synapsor/local.db \
|
|
16
16
|
--auth-token-env SYNAPSOR_RUNNER_HTTP_TOKEN \
|
|
@@ -30,7 +30,7 @@ model and maps calls back to canonical Synapsor capability names such as
|
|
|
30
30
|
## Generate The Snippet
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
npx -y
|
|
33
|
+
npx -y @synapsor/runner mcp client-config \
|
|
34
34
|
--client openai-agents \
|
|
35
35
|
--config ./synapsor.runner.json \
|
|
36
36
|
--store ./.synapsor/local.db \
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Proposal And Evidence Freshness
|
|
2
2
|
|
|
3
|
-
Runner
|
|
3
|
+
Runner provides an optional fail-closed freshness gate for proposals whose
|
|
4
4
|
review depends on live source state.
|
|
5
5
|
|
|
6
6
|
This closes two different review gaps without changing the model-facing MCP
|
|
@@ -11,8 +11,8 @@ surface:
|
|
|
11
11
|
2. A proposal can declare reviewed supporting rows whose exact versions must
|
|
12
12
|
still match before approval and again at apply.
|
|
13
13
|
|
|
14
|
-
Target-row drift
|
|
15
|
-
|
|
14
|
+
Target-row drift is also blocked by the exact conflict guard at apply.
|
|
15
|
+
Freshness does not replace that protection. It adds an earlier review-time
|
|
16
16
|
check and extends the final transaction to declared same-source dependencies.
|
|
17
17
|
|
|
18
18
|
## What Freshness Does And Does Not Mean
|
|
@@ -36,10 +36,10 @@ new source read and create a new proposal with a new hash and review.
|
|
|
36
36
|
|
|
37
37
|
## Configuration
|
|
38
38
|
|
|
39
|
-
Freshness is a Runner deployment overlay in `synapsor.runner.json`.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
Freshness is a Runner deployment overlay in `synapsor.runner.json`. It adds no
|
|
40
|
+
DSL clause and no canonical Spec field. Existing hand-authored DSL, canonical
|
|
41
|
+
JSON, contract digests, and `tools/list` output remain unchanged when this
|
|
42
|
+
optional section is absent.
|
|
43
43
|
|
|
44
44
|
```json
|
|
45
45
|
{
|
package/docs/recipes.md
CHANGED
|
@@ -9,20 +9,20 @@ tenant key, conflict column, and business limits.
|
|
|
9
9
|
List recipes:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx -y
|
|
12
|
+
npx -y @synapsor/runner recipes list
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Inspect one:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npx -y
|
|
18
|
+
npx -y @synapsor/runner recipes show billing.late_fee_waiver
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Initialize a starter config:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npx -y
|
|
25
|
-
npx -y
|
|
24
|
+
npx -y @synapsor/runner recipes init billing.late_fee_waiver --output synapsor.runner.json
|
|
25
|
+
npx -y @synapsor/runner config validate --config synapsor.runner.json
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Built-in recipes are JSON files under `recipes/`. They are starter data, not
|
|
@@ -31,8 +31,8 @@ domain, and initialize from your file:
|
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
cp recipes/billing.late_fee_waiver.json my-recipe.json
|
|
34
|
-
npx -y
|
|
35
|
-
npx -y
|
|
34
|
+
npx -y @synapsor/runner recipes show ./my-recipe.json
|
|
35
|
+
npx -y @synapsor/runner recipes init ./my-recipe.json --output synapsor.runner.json
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
Available recipes:
|