@synapsor/runner 1.4.123 → 1.5.0
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/CHANGELOG.md +55 -19
- package/README.md +56 -46
- package/dist/cli.d.ts.map +1 -1
- package/dist/local-ui.d.ts.map +1 -1
- package/dist/runner.mjs +13848 -7752
- package/dist/runtime.d.ts +50 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.mjs +15066 -0
- package/docs/README.md +19 -3
- package/docs/capability-authoring.md +1 -1
- package/docs/database-enforced-scope.md +273 -0
- package/docs/dependency-license-inventory.md +6 -2
- package/docs/doctor.md +17 -0
- package/docs/effect-regression.md +142 -0
- package/docs/getting-started-own-database.md +7 -0
- package/docs/local-mode.md +7 -3
- package/docs/mcp-apps.md +188 -0
- package/docs/mcp-audit.md +54 -0
- package/docs/mcp-client-setup.md +16 -4
- package/docs/mcp-clients.md +8 -0
- package/docs/production.md +8 -0
- package/docs/release-notes.md +51 -13
- package/docs/release-policy.md +9 -5
- package/docs/runner-config-reference.md +25 -0
- package/docs/schema-api-candidates.md +68 -0
- package/docs/security-boundary.md +10 -0
- package/docs/shadow-studies.md +198 -0
- package/examples/mcp-postgres-billing-app-handler/app-handler.mjs +9 -1
- package/examples/mcp-postgres-billing-app-handler/schema.sql +11 -0
- package/examples/mcp-postgres-billing-app-handler/synapsor-handler.mjs +3 -0
- package/examples/raw-sql-vs-synapsor/Makefile +2 -2
- package/examples/raw-sql-vs-synapsor/README.md +6 -4
- package/examples/support-billing-agent/Makefile +5 -1
- package/examples/support-billing-agent/README.md +39 -5
- package/examples/support-billing-agent/db/schema.sql +88 -1
- package/examples/support-billing-agent/db/seed.sql +15 -15
- package/examples/support-billing-agent/scripts/run-demo.sh +4 -0
- package/examples/support-billing-agent/scripts/run-evaluation.sh +62 -0
- package/examples/support-billing-agent/shadow-study/cases.jsonl +6 -0
- package/examples/support-billing-agent/shadow-study/outcomes.jsonl +2 -0
- package/examples/support-billing-agent/synapsor.runner.json +17 -5
- package/fixtures/effects/changed/eff_support_late_fee_v1.result.json +58 -0
- package/fixtures/effects/dataset.json +8 -0
- package/fixtures/effects/results/eff_support_late_fee_v1.result.json +59 -0
- package/fixtures/effects/support-late-fee.effect.json +71 -0
- package/fixtures/generators/drizzle/malicious.ts +11 -0
- package/fixtures/generators/drizzle/schema.ts +12 -0
- package/fixtures/generators/openapi/external-ref.yaml +15 -0
- package/fixtures/generators/openapi/openapi.yaml +81 -0
- package/fixtures/generators/prisma/schema.prisma +34 -0
- package/package.json +13 -2
- package/schemas/effect-dataset.schema.json +19 -0
- package/schemas/effect-fixture.schema.json +191 -0
- package/schemas/effect-result.schema.json +52 -0
- package/schemas/mcp-audit-candidates.schema.json +41 -0
- package/schemas/mcp-audit-report.schema.json +104 -0
- package/schemas/schema-candidate-review.schema.json +167 -0
- package/schemas/schema-candidates.schema.json +49 -0
- package/schemas/synapsor.runner.schema.json +51 -0
package/docs/mcp-apps.md
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# Inline Proposal Review With MCP Apps
|
|
2
|
+
|
|
3
|
+
Synapsor Runner proposal tools advertise a display-only MCP App. A compatible
|
|
4
|
+
host can render the proposed business effect inline after the tool call. Hosts
|
|
5
|
+
without MCP Apps support continue to receive the same JSON and text result.
|
|
6
|
+
|
|
7
|
+
The app is a presentation surface, not an approval boundary:
|
|
8
|
+
|
|
9
|
+
- it shows the requested action, semantic capability, trusted tenant/principal
|
|
10
|
+
provenance, evidence summary, kept-out-field status, exact diff, expected
|
|
11
|
+
source version, policy state, receipt state, and reversibility state;
|
|
12
|
+
- it contains no database URL, write credential, approval token, review
|
|
13
|
+
challenge, or reusable operator authority;
|
|
14
|
+
- it cannot call approve, apply, commit, or raw SQL tools because Runner does
|
|
15
|
+
not expose those tools through MCP;
|
|
16
|
+
- approval and apply remain explicit operator actions in the standalone local
|
|
17
|
+
UI or terminal.
|
|
18
|
+
|
|
19
|
+
## Protocol And SDK Baseline
|
|
20
|
+
|
|
21
|
+
The implementation is pinned to:
|
|
22
|
+
|
|
23
|
+
| Component | Version |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| MCP Apps specification | `2026-01-26` stable |
|
|
26
|
+
| `@modelcontextprotocol/ext-apps` | `1.7.4` |
|
|
27
|
+
| `@modelcontextprotocol/sdk` | `1.29.0` |
|
|
28
|
+
|
|
29
|
+
Proposal tools declare the standard `ui://synapsor/proposal-review.html`
|
|
30
|
+
resource through `_meta.ui.resourceUri`. Runner serves the resource as
|
|
31
|
+
`text/html;profile=mcp-app` and uses the standard `ui/initialize`,
|
|
32
|
+
`ui/notifications/initialized`, and `ui/notifications/tool-result` messages.
|
|
33
|
+
The official registration helper also supplies the compatibility
|
|
34
|
+
`ui/resourceUri` metadata key.
|
|
35
|
+
|
|
36
|
+
Repository tests use the official MCP SDK client and linked in-memory
|
|
37
|
+
transport. They verify tool discovery, resource discovery/read, Apps message
|
|
38
|
+
schemas, structured and text fallback results, and the absence of
|
|
39
|
+
model-callable approval/apply tools or embedded authority.
|
|
40
|
+
|
|
41
|
+
The upstream Apps SDK currently lists ChatGPT, Claude, VS Code, Goose, Postman,
|
|
42
|
+
and MCPJam as supported clients. Synapsor's repository CI does not exercise
|
|
43
|
+
those product hosts, so this project does not claim host-specific compatibility
|
|
44
|
+
beyond the official protocol tests. Host support varies by product version and
|
|
45
|
+
deployment.
|
|
46
|
+
|
|
47
|
+
Specification:
|
|
48
|
+
[MCP Apps 2026-01-26](https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx).
|
|
49
|
+
|
|
50
|
+
## Connect A Client
|
|
51
|
+
|
|
52
|
+
Generate a client-native MCP snippet:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
synapsor-runner mcp config claude-desktop \
|
|
56
|
+
--absolute-paths \
|
|
57
|
+
--config ./synapsor.runner.json \
|
|
58
|
+
--store ./.synapsor/local.db
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Runner does not require an Apps-specific switch. A supporting host discovers
|
|
62
|
+
the app from proposal-tool metadata and fetches the declared resource. A
|
|
63
|
+
non-supporting host renders or exposes the normal text/structured tool result.
|
|
64
|
+
|
|
65
|
+
Preview the model-facing boundary before connecting:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
synapsor-runner tools preview \
|
|
69
|
+
--config ./synapsor.runner.json \
|
|
70
|
+
--store ./.synapsor/local.db
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The tool list may include inspect and proposal capabilities. It must not
|
|
74
|
+
include `execute_sql`, `approve`, `apply`, or `commit` tools.
|
|
75
|
+
|
|
76
|
+
## Optional MCPB Installation
|
|
77
|
+
|
|
78
|
+
The repository can build an MCP Bundle for hosts that install `.mcpb`
|
|
79
|
+
artifacts:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
corepack pnpm build:mcpb
|
|
83
|
+
corepack pnpm verify:mcpb
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The pinned build uses `@anthropic-ai/mcpb@2.1.2`, validates the `0.4`
|
|
87
|
+
manifest, packs it, unpacks it again, scans its paths/placeholders, and writes
|
|
88
|
+
an archive plus `SHA256SUMS` and `BUILD-INFO.json` under `dist/mcpb/`.
|
|
89
|
+
The verification command launches the unpacked artifact with the official MCP
|
|
90
|
+
client, checks semantic tool/resource discovery, reads the App resource, and
|
|
91
|
+
confirms that no model-facing approval/apply tool is present.
|
|
92
|
+
|
|
93
|
+
This profile is intentionally narrow:
|
|
94
|
+
|
|
95
|
+
- it runs the standard `synapsor-runner contract bundle` environment names;
|
|
96
|
+
- the installer asks for the Runner config, state directory, read/write URLs,
|
|
97
|
+
tenant, and principal;
|
|
98
|
+
- sensitive values are installer configuration and are not embedded in the
|
|
99
|
+
archive;
|
|
100
|
+
- contracts with custom environment names should use `mcp config` instead.
|
|
101
|
+
|
|
102
|
+
The generated archive is **unsigned** and reports `signed: false`. Signing is
|
|
103
|
+
a release-owner operation:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
corepack pnpm exec mcpb sign \
|
|
107
|
+
--cert /secure/release-cert.pem \
|
|
108
|
+
--key /secure/release-key.pem \
|
|
109
|
+
./dist/mcpb/synapsor-runner-<version>-unsigned.mcpb
|
|
110
|
+
|
|
111
|
+
corepack pnpm exec mcpb verify \
|
|
112
|
+
./dist/mcpb/synapsor-runner-<version>-unsigned.mcpb
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Do not use `--self-signed` and present the result as an official release.
|
|
116
|
+
The build inputs and manifest generation are repeatable, but the pinned packer
|
|
117
|
+
records archive timestamps, so byte-for-byte archive hashes may differ between
|
|
118
|
+
builds. The digest applies to the exact artifact that was built and reviewed.
|
|
119
|
+
|
|
120
|
+
## Complete Human Review
|
|
121
|
+
|
|
122
|
+
The inline card intentionally does not carry approval authority. Open the
|
|
123
|
+
standalone operator UI:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
synapsor-runner ui \
|
|
127
|
+
--config ./synapsor.runner.json \
|
|
128
|
+
--store ./.synapsor/local.db
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Or review from a trusted terminal:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
synapsor-runner proposals show <proposal_id> \
|
|
135
|
+
--store ./.synapsor/local.db
|
|
136
|
+
|
|
137
|
+
synapsor-runner proposals approve <proposal_id> \
|
|
138
|
+
--store ./.synapsor/local.db
|
|
139
|
+
|
|
140
|
+
synapsor-runner apply <proposal_id> \
|
|
141
|
+
--config ./synapsor.runner.json \
|
|
142
|
+
--store ./.synapsor/local.db
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Operator identity, approval state, proposal identity, source version, trusted
|
|
146
|
+
scope, and writeback guards are rechecked by Runner. Seeing a card never grants
|
|
147
|
+
authority and never implies that the source database changed.
|
|
148
|
+
|
|
149
|
+
## Why The Handoff Is Display-Only
|
|
150
|
+
|
|
151
|
+
The selected stable Apps SDK provides standardized presentation metadata and
|
|
152
|
+
app/host messaging, but it does not document a channel that Synapsor can prove
|
|
153
|
+
is hidden from model-visible tool content, transcripts, and ordinary logs
|
|
154
|
+
while carrying privileged review authority. Runner therefore does not embed a
|
|
155
|
+
signed review challenge in the app resource, resource URI, result, or query
|
|
156
|
+
string.
|
|
157
|
+
|
|
158
|
+
If a future standard defines and tests a model-hidden authority channel, an
|
|
159
|
+
inline approval flow would still need a one-time short-lived challenge bound
|
|
160
|
+
to the exact proposal, operator session, purpose, and expiry. Until then, the
|
|
161
|
+
standalone operator path is the security boundary.
|
|
162
|
+
|
|
163
|
+
## Fallback Behavior
|
|
164
|
+
|
|
165
|
+
| Client behavior | Result |
|
|
166
|
+
| --- | --- |
|
|
167
|
+
| Supports MCP Apps | Inline display-only proposal card |
|
|
168
|
+
| Supports MCP but not Apps | JSON/text proposal result |
|
|
169
|
+
| No graphical host | Terminal proposal commands |
|
|
170
|
+
| Human wants a browser review surface | Standalone loopback local UI |
|
|
171
|
+
|
|
172
|
+
All four paths use the same proposal review view model. Kept-out values remain
|
|
173
|
+
absent; the card only states that the reviewed allowlist excluded them.
|
|
174
|
+
|
|
175
|
+
## Security Checklist
|
|
176
|
+
|
|
177
|
+
- Keep MCP and the local UI on loopback unless you follow the authenticated
|
|
178
|
+
production deployment guide.
|
|
179
|
+
- Treat proposal/evidence handles as scoped audit data.
|
|
180
|
+
- Never place database credentials or operator tokens in MCP client JSON.
|
|
181
|
+
- Verify trusted tenant/principal provenance for shared HTTP deployments.
|
|
182
|
+
- Keep least-privilege database roles and database-enforced isolation where
|
|
183
|
+
appropriate.
|
|
184
|
+
- Treat `source_database_changed: false` as unchanged even when a proposal was
|
|
185
|
+
created successfully.
|
|
186
|
+
|
|
187
|
+
See [MCP Client Configs](mcp-clients.md), [MCP Client Setup](mcp-client-setup.md),
|
|
188
|
+
[Local Mode](local-mode.md), and [Security Boundary](security-boundary.md).
|
package/docs/mcp-audit.md
CHANGED
|
@@ -37,6 +37,15 @@ Human-readable output:
|
|
|
37
37
|
npx -y -p @synapsor/runner synapsor-runner audit ./tools-list.json
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
The default terminal report groups repeated findings into the three most
|
|
41
|
+
important root causes. It shows affected tools, a short blast-radius statement,
|
|
42
|
+
and one next action instead of repeating the same explanation for every tool.
|
|
43
|
+
Use the complete view when triaging every finding:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx -y -p @synapsor/runner synapsor-runner audit ./tools-list.json --verbose
|
|
47
|
+
```
|
|
48
|
+
|
|
40
49
|
Remote `tools/list` endpoint with a bearer token kept in the environment:
|
|
41
50
|
|
|
42
51
|
```bash
|
|
@@ -62,6 +71,15 @@ JSON output:
|
|
|
62
71
|
npx -y -p @synapsor/runner synapsor-runner audit ./tools-list.json --format json
|
|
63
72
|
```
|
|
64
73
|
|
|
74
|
+
The JSON contract remains `synapsor.mcp-audit.v1`; its published schema is
|
|
75
|
+
[`schemas/mcp-audit-report.schema.json`](../schemas/mcp-audit-report.schema.json).
|
|
76
|
+
|
|
77
|
+
SARIF 2.1.0 output for code-scanning ingestion:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx -y -p @synapsor/runner synapsor-runner audit ./tools-list.json --format sarif > mcp-audit.sarif
|
|
81
|
+
```
|
|
82
|
+
|
|
65
83
|
Markdown output for issues, PRs, or security review notes:
|
|
66
84
|
|
|
67
85
|
```bash
|
|
@@ -75,6 +93,42 @@ During local development, the repo-local wrapper can run the same command:
|
|
|
75
93
|
./bin/synapsor-runner audit ./tools-list.json --format json
|
|
76
94
|
```
|
|
77
95
|
|
|
96
|
+
## Generate review candidates
|
|
97
|
+
|
|
98
|
+
Audit can create a separate review directory without editing or activating the
|
|
99
|
+
source configuration:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npx -y -p @synapsor/runner synapsor-runner audit generate \
|
|
103
|
+
./tools-list.json \
|
|
104
|
+
--output ./synapsor-audit-candidates
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The generator uses the same parser and findings as `audit`. It writes:
|
|
108
|
+
|
|
109
|
+
- a canonical `@synapsor/spec` contract;
|
|
110
|
+
- a strict-shadow Runner scaffold with no configured source;
|
|
111
|
+
- deny, redaction, and operator-boundary test candidates;
|
|
112
|
+
- before/after model tool-surface reports;
|
|
113
|
+
- a `REVIEW.md` checklist.
|
|
114
|
+
|
|
115
|
+
Generated candidates do not carry authority. Every proposal has
|
|
116
|
+
`writeback.mode: none`, the Runner scaffold is `shadow`, and the source map is
|
|
117
|
+
empty. Subject identifiers and visible/write fields are conspicuous
|
|
118
|
+
`review_required_*` placeholders. Input fields that look like SQL, dynamic
|
|
119
|
+
identifiers, tenant/principal scope, credentials, approval identity, or row
|
|
120
|
+
version are omitted rather than copied into model arguments.
|
|
121
|
+
|
|
122
|
+
The output excludes raw descriptions, defaults, examples, enum values, bearer
|
|
123
|
+
tokens, and credentials. Unknown business meaning becomes a TODO. A developer
|
|
124
|
+
must inspect the real schema, choose trusted tenant/principal bindings, run the
|
|
125
|
+
generated tests and a Shadow study, then deliberately copy reviewed definitions
|
|
126
|
+
into an active contract.
|
|
127
|
+
|
|
128
|
+
Generation refuses an existing directory. `--force` only replaces a directory
|
|
129
|
+
that carries Runner's `synapsor.audit-candidates.v1` ownership marker; it will
|
|
130
|
+
not overwrite an arbitrary hand-edited directory.
|
|
131
|
+
|
|
78
132
|
## Supported inputs
|
|
79
133
|
|
|
80
134
|
The audit accepts common exported shapes:
|
package/docs/mcp-client-setup.md
CHANGED
|
@@ -11,9 +11,14 @@ or SDK. The simplest local-client contract is stdio. Standard HTTP MCP is
|
|
|
11
11
|
available through Streamable HTTP when your agent connects to a long-running
|
|
12
12
|
Runner service.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
Proposal tools also advertise a standard display-only
|
|
15
|
+
[MCP App](mcp-apps.md). Supporting hosts discover it from tool metadata;
|
|
16
|
+
other clients keep the same text/JSON proposal result. Approval and apply
|
|
17
|
+
remain outside MCP in both cases.
|
|
18
|
+
|
|
19
|
+
Command examples use the stable untagged package through `npx`. From a source
|
|
20
|
+
checkout, use `./bin/synapsor-runner ...` only when you intentionally want the
|
|
21
|
+
local source wrapper.
|
|
17
22
|
|
|
18
23
|
Checked examples live in:
|
|
19
24
|
|
|
@@ -136,6 +141,11 @@ backup before writing. Noninteractive scripts must add `--yes`.
|
|
|
136
141
|
The command writes only the local stdio MCP command and args. It does not write
|
|
137
142
|
database URLs or passwords into the client config.
|
|
138
143
|
|
|
144
|
+
No separate Apps flag is required. A compatible host discovers
|
|
145
|
+
`ui://synapsor/proposal-review.html` from proposal-tool metadata. The app can
|
|
146
|
+
display the exact diff, but it has no approval/apply authority; use the
|
|
147
|
+
standalone local UI or terminal for human review.
|
|
148
|
+
|
|
139
149
|
## Start Command
|
|
140
150
|
|
|
141
151
|
From the runner repository:
|
|
@@ -144,7 +154,9 @@ From the runner repository:
|
|
|
144
154
|
npx -y -p @synapsor/runner synapsor-runner mcp serve --config ./examples/mcp-postgres-billing/synapsor.runner.json --store ./.synapsor/local.db
|
|
145
155
|
```
|
|
146
156
|
|
|
147
|
-
For
|
|
157
|
+
For reproducible deployments, pin an exact stable version in package manifests
|
|
158
|
+
and MCP client configuration. The untagged examples above intentionally resolve
|
|
159
|
+
the current `latest` release.
|
|
148
160
|
|
|
149
161
|
For standard app/server HTTP MCP mode:
|
|
150
162
|
|
package/docs/mcp-clients.md
CHANGED
|
@@ -4,6 +4,11 @@ Synapsor Runner exposes reviewed semantic tools over standard MCP. The model
|
|
|
4
4
|
receives inspect/propose capabilities; it does not receive raw SQL, database
|
|
5
5
|
credentials, approval commands, or apply commands.
|
|
6
6
|
|
|
7
|
+
Proposal tools advertise a display-only [MCP App](mcp-apps.md). Hosts that
|
|
8
|
+
implement the Apps extension can render the exact proposal diff inline.
|
|
9
|
+
Clients without it receive the same structured/text result, and human approval
|
|
10
|
+
still occurs in the standalone operator UI or terminal.
|
|
11
|
+
|
|
7
12
|
The complete copy-paste templates live in:
|
|
8
13
|
|
|
9
14
|
- [`examples/support-plan-credit/mcp-client-examples/`](../examples/support-plan-credit/mcp-client-examples/)
|
|
@@ -110,6 +115,9 @@ The preview must list semantic capabilities and must not list `execute_sql`,
|
|
|
110
115
|
approval/apply tools, database URLs, write credentials, or model-controlled
|
|
111
116
|
tenant authority.
|
|
112
117
|
|
|
118
|
+
MCP App discovery is automatic from the proposal tool's
|
|
119
|
+
`_meta.ui.resourceUri`; it does not require credentials in the client snippet.
|
|
120
|
+
|
|
113
121
|
## Troubleshooting
|
|
114
122
|
|
|
115
123
|
- `ENOENT` or missing config: use absolute config/store paths.
|
package/docs/production.md
CHANGED
|
@@ -94,6 +94,14 @@ Read credential:
|
|
|
94
94
|
- can `SELECT` only the tables/views used by capabilities;
|
|
95
95
|
- should be restricted by views/RLS where possible.
|
|
96
96
|
|
|
97
|
+
Name the scope mode in production reviews. The compatibility default is
|
|
98
|
+
application-level Runner predicates with a shared credential. PostgreSQL can
|
|
99
|
+
add database-enforced RLS to catch omitted predicates and pooled-context
|
|
100
|
+
leakage. Tenant-bound credentials or isolated processes remove
|
|
101
|
+
organization-wide authority from a Runner process. See
|
|
102
|
+
[Database-Enforced Tenant And Principal
|
|
103
|
+
Scope](database-enforced-scope.md).
|
|
104
|
+
|
|
97
105
|
Write credential for direct `sql_update`:
|
|
98
106
|
|
|
99
107
|
- can use only the operation-specific business DML and reviewed columns;
|
package/docs/release-notes.md
CHANGED
|
@@ -10,7 +10,45 @@ npx -y -p @synapsor/runner synapsor-runner demo --quick
|
|
|
10
10
|
The OSS runner command is `synapsor-runner`. The `synapsor` command is reserved
|
|
11
11
|
for the Synapsor Cloud CLI.
|
|
12
12
|
|
|
13
|
-
## 1.
|
|
13
|
+
## 1.5.0 (prepared, not published)
|
|
14
|
+
|
|
15
|
+
### Complete guarded-action developer proof
|
|
16
|
+
|
|
17
|
+
- `synapsor-runner try --prove` now demonstrates the complete embedded
|
|
18
|
+
business-action boundary without an account, database, Docker daemon, MCP
|
|
19
|
+
client, or model key: scoped evidence, exact `late_fee_cents: 5500 -> 0`
|
|
20
|
+
proposal, no pre-approval mutation, guarded commit, duplicate-free retry,
|
|
21
|
+
changed-intent collision refusal, stale conflict, receipt, and replay.
|
|
22
|
+
- Deployments can explicitly select application-level shared-credential scope,
|
|
23
|
+
PostgreSQL RLS defense in depth, or a tenant-bound credential resolver.
|
|
24
|
+
Diagnostics report the active assurance and remaining trust boundary;
|
|
25
|
+
hardened modes fail closed when prerequisites are missing.
|
|
26
|
+
- Strict Shadow Mode now has durable studies, bounded case imports,
|
|
27
|
+
authoritative human outcomes, deterministic comparison/readiness reports,
|
|
28
|
+
and effect-level regression fixtures. No study or evaluation path grants
|
|
29
|
+
authority or writes source data.
|
|
30
|
+
- Proposal tools advertise a standard display-only MCP App where the host
|
|
31
|
+
supports it. The app and standalone local UI share one reviewer-facing view;
|
|
32
|
+
approval/apply authority and privileged tokens remain outside MCP.
|
|
33
|
+
- `audit` can generate disabled canonical replacement candidates, while
|
|
34
|
+
Prisma, Drizzle, and OpenAPI generators create bounded review-only candidate
|
|
35
|
+
contracts without executing adopter source.
|
|
36
|
+
- The `support-billing-agent` reference now provides a live disposable
|
|
37
|
+
PostgreSQL/RLS proof for tenant/principal scope, kept-out fields, proposal,
|
|
38
|
+
approval/apply, receipt/retry, stale conflict, replay, strict shadow, and
|
|
39
|
+
effect regression.
|
|
40
|
+
- The bundled app-owned handler helper now uses a pre-provisioned receipt table
|
|
41
|
+
without requiring schema `CREATE`; DDL is attempted only when the table is
|
|
42
|
+
absent. The source-workspace and packed billing-handler examples both verify
|
|
43
|
+
transactional apply and idempotent retry.
|
|
44
|
+
- The public README leads with `try --prove`, keeps MCP database-risk audit
|
|
45
|
+
immediately second, and distinguishes application scope, PostgreSQL RLS, and
|
|
46
|
+
tenant-bound isolation without overstating any of them.
|
|
47
|
+
|
|
48
|
+
Prepared package version: `@synapsor/runner@1.5.0`. Spec, DSL, and Cloud CLI
|
|
49
|
+
packages are unchanged. Nothing has been published by this repository change.
|
|
50
|
+
|
|
51
|
+
## 1.4.123 (2026-07-17)
|
|
14
52
|
|
|
15
53
|
### Advisory capability-surface fitness lint
|
|
16
54
|
|
|
@@ -25,10 +63,10 @@ for the Synapsor Cloud CLI.
|
|
|
25
63
|
CI policy gate with `--strict` or `--fail-on warning`; canonical validity and
|
|
26
64
|
runtime enforcement are unchanged.
|
|
27
65
|
|
|
28
|
-
|
|
66
|
+
Published package version: `@synapsor/runner@1.4.123`. Spec, DSL, and Cloud CLI
|
|
29
67
|
packages are unchanged.
|
|
30
68
|
|
|
31
|
-
## 1.4.122 (2026-07-
|
|
69
|
+
## 1.4.122 (2026-07-17)
|
|
32
70
|
|
|
33
71
|
### Trusted principal scope and Cloud-linked authority
|
|
34
72
|
|
|
@@ -54,11 +92,11 @@ packages are unchanged.
|
|
|
54
92
|
projects, scoped credentials, Runner connections, proposal decisions, and
|
|
55
93
|
audit records. Runner keeps the `synapsor-runner` binary and local boundary.
|
|
56
94
|
|
|
57
|
-
|
|
95
|
+
Published package versions: `@synapsor/spec@1.4.2`,
|
|
58
96
|
`@synapsor/dsl@1.4.3`, `@synapsor/runner@1.4.122`, and
|
|
59
97
|
`@synapsor/cli@0.1.0-beta.1`.
|
|
60
98
|
|
|
61
|
-
## 1.4.121 (
|
|
99
|
+
## 1.4.121 (2026-07-15)
|
|
62
100
|
|
|
63
101
|
### Contract trust surface and bounded-set parser correctness
|
|
64
102
|
|
|
@@ -90,10 +128,10 @@ Prepared package versions: `@synapsor/spec@1.4.2`,
|
|
|
90
128
|
- C++/Cloud validators and exporters preserve the new additive enum/aggregate
|
|
91
129
|
fields for canonical round-trip compatibility.
|
|
92
130
|
|
|
93
|
-
|
|
131
|
+
Published package versions: `@synapsor/spec@1.4.1`,
|
|
94
132
|
`@synapsor/dsl@1.4.2`, and `@synapsor/runner@1.4.121`.
|
|
95
133
|
|
|
96
|
-
## 1.4.12 (
|
|
134
|
+
## 1.4.12 (2026-07-14)
|
|
97
135
|
|
|
98
136
|
### Runtime-store smoke-call consistency
|
|
99
137
|
|
|
@@ -108,10 +146,10 @@ Prepared package versions: `@synapsor/spec@1.4.1`,
|
|
|
108
146
|
- Local SQLite and mirror modes retain their existing behavior; no source row
|
|
109
147
|
changes before the normal external approval/apply path.
|
|
110
148
|
|
|
111
|
-
|
|
149
|
+
Published package version: `@synapsor/runner@1.4.12`.
|
|
112
150
|
`@synapsor/dsl` remains `1.4.1`; `@synapsor/spec` remains `1.4.0`.
|
|
113
151
|
|
|
114
|
-
## 1.4.1 (
|
|
152
|
+
## 1.4.1 (2026-07-14)
|
|
115
153
|
|
|
116
154
|
### Bounded-set digest compatibility patch
|
|
117
155
|
|
|
@@ -131,10 +169,10 @@ Prepared package version: `@synapsor/runner@1.4.12`.
|
|
|
131
169
|
authority, hand-built semantic tools, structural enforcement, build-vs-adopt
|
|
132
170
|
fit, and regulated-data boundaries.
|
|
133
171
|
|
|
134
|
-
|
|
172
|
+
Published package versions: `@synapsor/dsl@1.4.1` and
|
|
135
173
|
`@synapsor/runner@1.4.1`. `@synapsor/spec` remains `1.4.0`.
|
|
136
174
|
|
|
137
|
-
## 1.4.0 (
|
|
175
|
+
## 1.4.0 (2026-07-14)
|
|
138
176
|
|
|
139
177
|
### Reviewed Reversible Change Sets
|
|
140
178
|
|
|
@@ -149,7 +187,7 @@ Prepared package versions: `@synapsor/dsl@1.4.1` and
|
|
|
149
187
|
- Keeps hard DELETE restoration, app-owned handlers, payments, messages, and
|
|
150
188
|
other external effects outside Runner's automatic compensation claim.
|
|
151
189
|
|
|
152
|
-
|
|
190
|
+
Published package versions: `@synapsor/spec@1.4.0`,
|
|
153
191
|
`@synapsor/dsl@1.4.0`, and `@synapsor/runner@1.4.0`.
|
|
154
192
|
|
|
155
193
|
## 1.3.0 (prepared, not published)
|
|
@@ -254,7 +292,7 @@ Released package versions: `@synapsor/spec@1.1.0`,
|
|
|
254
292
|
- Declares the first semver contract for the documented CLI, schema, contract,
|
|
255
293
|
MCP result, writeback, approval, metrics, and replay surfaces.
|
|
256
294
|
|
|
257
|
-
|
|
295
|
+
Released package versions: `@synapsor/spec@1.0.0`,
|
|
258
296
|
`@synapsor/dsl@1.0.0`, and `@synapsor/runner@1.0.0`.
|
|
259
297
|
|
|
260
298
|
## 0.1.16
|
package/docs/release-policy.md
CHANGED
|
@@ -11,8 +11,12 @@ npx -y -p @synapsor/runner synapsor-runner demo --quick
|
|
|
11
11
|
npm install -g @synapsor/runner
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Use
|
|
15
|
-
preview
|
|
14
|
+
Use an exact prerelease or a named preview tag only when intentionally testing
|
|
15
|
+
preview behavior. Check the tags that currently exist before documenting one:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm dist-tag ls @synapsor/runner
|
|
19
|
+
```
|
|
16
20
|
|
|
17
21
|
## Alpha Expectations
|
|
18
22
|
|
|
@@ -128,9 +132,9 @@ internals. Local store migrations may happen inside `1.x` and later minor
|
|
|
128
132
|
versions, but documented CLI inspection commands should remain the supported way
|
|
129
133
|
to read the store.
|
|
130
134
|
|
|
131
|
-
|
|
132
|
-
client snippets.
|
|
133
|
-
|
|
135
|
+
Prerelease users should pin an exact version in package.json, CI, and MCP
|
|
136
|
+
client snippets. Do not assume an `alpha`, `beta`, or `next` tag exists; inspect
|
|
137
|
+
the registry tags first.
|
|
134
138
|
|
|
135
139
|
## Result Envelope Migration
|
|
136
140
|
|
|
@@ -114,6 +114,14 @@ not print database URLs or create the schema.
|
|
|
114
114
|
"write_url_env": "BILLING_POSTGRES_WRITE_URL",
|
|
115
115
|
"read_only": false,
|
|
116
116
|
"statement_timeout_ms": 3000,
|
|
117
|
+
"database_scope": {
|
|
118
|
+
"mode": "postgres_rls",
|
|
119
|
+
"tenant_setting": "synapsor.tenant_id",
|
|
120
|
+
"principal_setting": "synapsor.principal"
|
|
121
|
+
},
|
|
122
|
+
"credential_scope": {
|
|
123
|
+
"mode": "shared"
|
|
124
|
+
},
|
|
117
125
|
"receipts": {
|
|
118
126
|
"authority": "source_db",
|
|
119
127
|
"provisioning": "precreated",
|
|
@@ -138,6 +146,23 @@ adapter-specific reviewed SSL options when used.
|
|
|
138
146
|
|
|
139
147
|
A contract's `SOURCE billing_postgres` must exactly match a `sources` key.
|
|
140
148
|
|
|
149
|
+
`database_scope.mode` defaults to `application`: Runner enforces trusted
|
|
150
|
+
tenant/principal predicates with the configured database credential.
|
|
151
|
+
`postgres_rls` is PostgreSQL-only and requires fixed, distinct
|
|
152
|
+
`tenant_setting` and `principal_setting` names. Runner binds them
|
|
153
|
+
transaction-locally and refuses serving/writeback when RLS, FORCE, role, or
|
|
154
|
+
operation-policy prerequisites cannot be attested.
|
|
155
|
+
|
|
156
|
+
`credential_scope.mode` defaults to `shared`. `tenant_resolver` names a
|
|
157
|
+
programmatic `TenantCredentialResolver`; credentials remain outside the
|
|
158
|
+
contract/config and pools are partitioned by trusted scope and credential
|
|
159
|
+
identity. The stock CLI does not load executable resolver modules, so CLI-only
|
|
160
|
+
deployments should run one tenant-bound process/credential per tenant.
|
|
161
|
+
|
|
162
|
+
See [Database-Enforced Tenant And Principal
|
|
163
|
+
Scope](database-enforced-scope.md) for the guarantee matrix, PostgreSQL policy
|
|
164
|
+
example, resolver interface, doctor canary, and MySQL alternatives.
|
|
165
|
+
|
|
141
166
|
Long-running servers reuse native driver pools. Optional `pool` keys are
|
|
142
167
|
`max_connections` (default 10), `connection_timeout_ms` (3000),
|
|
143
168
|
`idle_timeout_ms` (30000), `queue_timeout_ms` (5000), and `queue_limit`
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Reviewed Candidates From Prisma, Drizzle, And OpenAPI
|
|
2
|
+
|
|
3
|
+
Use these generators after schema or API inspection when you want a review
|
|
4
|
+
starting point without granting authority:
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
synapsor-runner init from-prisma ./prisma/schema.prisma \
|
|
8
|
+
--output ./synapsor-prisma-candidates
|
|
9
|
+
|
|
10
|
+
synapsor-runner init from-drizzle ./src/schema.ts \
|
|
11
|
+
--output ./synapsor-drizzle-candidates
|
|
12
|
+
|
|
13
|
+
synapsor-runner init from-openapi ./openapi.yaml \
|
|
14
|
+
--output ./synapsor-openapi-candidates
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Each command writes a separate deterministic directory containing:
|
|
18
|
+
|
|
19
|
+
- `synapsor.candidate.contract.json`: canonical `@synapsor/spec` candidates;
|
|
20
|
+
- `synapsor.candidate.runner.json`: source-less strict Shadow configuration;
|
|
21
|
+
- `synapsor.candidate.contract-tests.json`: deny, redaction, and operator
|
|
22
|
+
boundary test candidates;
|
|
23
|
+
- `generation-review.json`: stable machine-readable review findings;
|
|
24
|
+
- `REVIEW.md`: the human review checklist;
|
|
25
|
+
- `.synapsor-schema-candidates.json`: Runner's ownership marker.
|
|
26
|
+
|
|
27
|
+
No candidate is active. Proposal writeback is `none`, no database source is
|
|
28
|
+
configured, and tenant/principal authority remains a visible placeholder.
|
|
29
|
+
Generation never edits the input or an active Runner configuration.
|
|
30
|
+
|
|
31
|
+
## What Is And Is Not Inferred
|
|
32
|
+
|
|
33
|
+
The generators can suggest structural facts and likely review targets:
|
|
34
|
+
|
|
35
|
+
- objects, fields, table mappings, primary keys, and version-like fields;
|
|
36
|
+
- potential tenant/principal fields based on names;
|
|
37
|
+
- potentially sensitive and kept-out fields;
|
|
38
|
+
- possible read and proposal capability names;
|
|
39
|
+
- operations that need business logic or an app-owned handler.
|
|
40
|
+
|
|
41
|
+
They do not decide which tenant or principal is authoritative, which fields are
|
|
42
|
+
safe to expose, which writes are valid, business bounds, approval policy, or
|
|
43
|
+
auto-approval. A field-name heuristic is not data classification.
|
|
44
|
+
|
|
45
|
+
Review `generation-review.json` and `REVIEW.md`, replace every
|
|
46
|
+
`review_required_*` placeholder, run the generated tests and a
|
|
47
|
+
[Shadow study](shadow-studies.md), then deliberately copy reviewed definitions
|
|
48
|
+
into an active contract through code review.
|
|
49
|
+
|
|
50
|
+
## Input Safety
|
|
51
|
+
|
|
52
|
+
Input is bounded to 2 MiB, 50 objects, 128 fields per object, and 200 generated
|
|
53
|
+
capabilities. Deep or oversized structures fail closed.
|
|
54
|
+
|
|
55
|
+
- Prisma uses Runner's bounded lexer/parser. Datasource URLs, defaults, enum
|
|
56
|
+
values, generators, and plugins are not copied or run.
|
|
57
|
+
- Drizzle is untrusted executable TypeScript. Runner parses a documented static
|
|
58
|
+
`pgTable`/`mysqlTable` object-literal subset with the TypeScript AST. It never
|
|
59
|
+
imports, transpiles, type-checks, executes, or resolves the application.
|
|
60
|
+
Dynamic table names fail; unsupported dynamic columns are called out for
|
|
61
|
+
review.
|
|
62
|
+
- OpenAPI 3 JSON/YAML is parsed locally. Network/external references are
|
|
63
|
+
rejected. Server URLs, examples, defaults, enum values, callbacks, webhooks,
|
|
64
|
+
and credentials are not copied.
|
|
65
|
+
|
|
66
|
+
Existing output is never replaced unless `--force` points to a directory with
|
|
67
|
+
Runner's matching ownership marker. Hand-edited directories are refused even
|
|
68
|
+
with `--force`.
|
|
@@ -50,6 +50,16 @@ Trusted context comes from local configuration, environment bindings, or Cloud
|
|
|
50
50
|
session context in Cloud mode. Tenant, principal, and authorization scope must
|
|
51
51
|
not be accepted from the model as authority.
|
|
52
52
|
|
|
53
|
+
With a shared credential, these checks are application-level enforcement and
|
|
54
|
+
depend on Runner's fixed predicate implementation. Optional PostgreSQL RLS mode
|
|
55
|
+
adds an independent database check for omitted predicates and pooled-context
|
|
56
|
+
leakage. Tenant-bound credentials or isolated deployments provide the stronger
|
|
57
|
+
boundary when a Runner process must not hold organization-wide authority.
|
|
58
|
+
PostgreSQL RLS does not protect against a fully compromised process that can
|
|
59
|
+
choose arbitrary trusted settings, and MySQL has no native RLS equivalent. See
|
|
60
|
+
[Database-Enforced Tenant And Principal
|
|
61
|
+
Scope](database-enforced-scope.md).
|
|
62
|
+
|
|
53
63
|
A capability may declare `principal_scope_key` (DSL: `PRINCIPAL SCOPE KEY`) to
|
|
54
64
|
narrow rows inside a tenant. Runner then adds both fixed, parameterized guards:
|
|
55
65
|
|