@synapsor/runner 1.6.2 → 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 +141 -2
- package/CONTRIBUTING.md +10 -3
- package/README.md +65 -83
- package/SECURITY.md +14 -2
- package/THREAT_MODEL.md +64 -4
- package/dist/authoring.mjs +151 -16
- package/dist/cli.d.ts +31 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/local-ui.d.ts +145 -1
- package/dist/local-ui.d.ts.map +1 -1
- package/dist/runner.mjs +37488 -19009
- package/dist/runtime.mjs +4056 -235
- package/dist/shadow.mjs +2423 -65
- package/docs/README.md +36 -2
- package/docs/agent-guided-setup.md +239 -0
- package/docs/aggregate-reads.md +14 -5
- package/docs/app-owned-executors.md +5 -6
- package/docs/approval-roles-and-operator-identity.md +353 -0
- package/docs/auto-boundary-and-scoped-explore.md +89 -11
- package/docs/capability-authoring.md +21 -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 +32 -2
- package/docs/cursor-plugin.md +3 -3
- package/docs/database-enforced-scope.md +6 -0
- package/docs/dsl-json-parity.md +75 -0
- package/docs/dsl-reference.md +22 -1
- package/docs/fresh-developer-usability.md +155 -80
- package/docs/getting-started-own-database.md +45 -44
- package/docs/guarded-crud-writeback.md +19 -0
- package/docs/guided-onboarding.md +399 -0
- package/docs/human-attention-notifications.md +367 -0
- package/docs/limitations.md +49 -13
- package/docs/local-mode.md +36 -22
- 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 +42 -0
- package/docs/openai-agents-sdk.md +2 -2
- package/docs/production.md +39 -0
- package/docs/proposal-evidence-freshness.md +7 -7
- package/docs/recipes.md +6 -6
- package/docs/release-notes.md +144 -4
- 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/runner-config-reference.md +132 -0
- package/docs/running-a-runner-fleet.md +16 -1
- package/docs/schema-api-candidates.md +1 -1
- package/docs/security-boundary.md +54 -0
- package/docs/store-lifecycle.md +20 -1
- package/docs/supervised-automatic-apply.md +267 -0
- package/docs/troubleshooting-first-run.md +85 -10
- 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 +43 -0
- package/examples/fitflow-guided-onboarding/app/page.tsx +8 -0
- package/examples/fitflow-guided-onboarding/docker-compose.yml +16 -0
- package/examples/fitflow-guided-onboarding/package.json +18 -0
- package/examples/fitflow-guided-onboarding/prisma/schema.prisma +98 -0
- package/examples/fitflow-guided-onboarding/seed/postgres.sql +401 -0
- 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/operator-oidc/issuer.mjs +188 -0
- 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/README.md +6 -2
- 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 +11 -3
- package/schemas/schema-candidate-review.schema.json +42 -0
- package/schemas/synapsor.runner.schema.json +227 -4
package/docs/README.md
CHANGED
|
@@ -18,6 +18,13 @@ no-database demo, wire your database, then read deeper concepts.
|
|
|
18
18
|
you adopt Runner.
|
|
19
19
|
- [README](../README.md): audit-first proof, no-database demo, safety diagram,
|
|
20
20
|
and the shortest own-database path.
|
|
21
|
+
- [Database To First Safe Tool](guided-onboarding.md): one public command,
|
|
22
|
+
five-minute first read, ten-minute Explore to Protect, fifteen-minute
|
|
23
|
+
proposal, resumable setup, guarded development writeback, and host-neutral
|
|
24
|
+
client handoff.
|
|
25
|
+
- [Workbench Ask With Your Model](workbench-ask.md): optional local OpenAI,
|
|
26
|
+
Anthropic, and custom-provider chat over the exact reviewed tool surface,
|
|
27
|
+
with direct-egress consent, session-only credentials, and no added authority.
|
|
21
28
|
- [Troubleshooting First Run](troubleshooting-first-run.md): common first-run
|
|
22
29
|
failures, redacted diagnostics, and fixes.
|
|
23
30
|
|
|
@@ -47,11 +54,16 @@ no-database demo, wire your database, then read deeper concepts.
|
|
|
47
54
|
|
|
48
55
|
## 04 Connect Your DB
|
|
49
56
|
|
|
57
|
+
- [Database To First Safe Tool](guided-onboarding.md): the complete
|
|
58
|
+
review-by-exception golden path using the packed npm package.
|
|
50
59
|
- [Auto Boundary, Scoped Explore, And
|
|
51
60
|
Protect](auto-boundary-and-scoped-explore.md): deterministically inspect a
|
|
52
61
|
whole staging application, review one digest-bound boundary, ask bounded row
|
|
53
62
|
and PM-style aggregate questions in Cursor, and turn a useful query into a
|
|
54
63
|
disabled named production capability.
|
|
64
|
+
- [Workbench Ask With Your Model](workbench-ask.md): use the same reviewed
|
|
65
|
+
tools from Workbench without requiring Cursor or giving the model activation,
|
|
66
|
+
approval, or apply authority.
|
|
55
67
|
- [Connect Your Own Database](getting-started-own-database.md): inspect a
|
|
56
68
|
staging Postgres/MySQL database through the new whole-schema path or an
|
|
57
69
|
established one-object/headless route.
|
|
@@ -95,6 +107,9 @@ no-database demo, wire your database, then read deeper concepts.
|
|
|
95
107
|
- [Capability Authoring](capability-authoring.md): define read/proposal
|
|
96
108
|
capabilities, model-facing descriptions, result envelopes, trusted context,
|
|
97
109
|
and writeback guards.
|
|
110
|
+
- [Approval Roles And Verified Operator Identity](approval-roles-and-operator-identity.md):
|
|
111
|
+
trace `APPROVAL ROLE` through IdP claims, immutable approval evidence, and
|
|
112
|
+
the independent apply-role decision.
|
|
98
113
|
- [DSL Reference](dsl-reference.md): complete supported grammar, clause order,
|
|
99
114
|
compiled meaning, and constraints.
|
|
100
115
|
- [Runner Config Reference](runner-config-reference.md): every public wiring
|
|
@@ -111,9 +126,17 @@ no-database demo, wire your database, then read deeper concepts.
|
|
|
111
126
|
policy outcomes, tenant handling, and hidden-field behavior.
|
|
112
127
|
- [Bounded Aggregate Reads](aggregate-reads.md): fixed production scalar
|
|
113
128
|
aggregates plus the separate authoring-only reviewed aggregate Explore path.
|
|
129
|
+
- [Reviewed Relationship Paths](reviewed-relationships.md): catalog-proven
|
|
130
|
+
star/depth-two aggregate paths, demand-driven operator review, nullable-link
|
|
131
|
+
semantics, per-relation scope, and the permanent no-general-join boundary.
|
|
132
|
+
- [Reviewed Database Views](reviewed-database-views.md): expose a reviewed
|
|
133
|
+
derived measure without adding formulas or SQL to the model-facing planner.
|
|
114
134
|
|
|
115
135
|
## 06 Serve MCP
|
|
116
136
|
|
|
137
|
+
- [Workbench Ask With Your Model](workbench-ask.md): optional secured-loopback
|
|
138
|
+
client, provider matrix, key/egress lifecycle, endpoint controls, and exact
|
|
139
|
+
parity with the normal MCP runtime.
|
|
117
140
|
- [Host Compatibility](host-compatibility.md): exact Tested,
|
|
118
141
|
Protocol-tested, Unsupported, and Unknown claims for Cursor and other MCP
|
|
119
142
|
hosts, including the inline-review fallback.
|
|
@@ -141,6 +164,14 @@ no-database demo, wire your database, then read deeper concepts.
|
|
|
141
164
|
|
|
142
165
|
- [Local Mode](local-mode.md): local store, proposals, approval, replay, and
|
|
143
166
|
writeback flow.
|
|
167
|
+
- [Operator-Supervised Automatic Apply](supervised-automatic-apply.md):
|
|
168
|
+
separate approval from execution, require contract and deployment opt-in for
|
|
169
|
+
one exact digest, run the trusted worker, and understand revalidation,
|
|
170
|
+
eligibility, retries, controls, and UNKNOWN outcomes.
|
|
171
|
+
- [Human Attention And Notifications](human-attention-notifications.md):
|
|
172
|
+
durable attention events, the no-ID Workbench inbox, quiet defaults,
|
|
173
|
+
coalescing and digests, signed generic webhooks, delivery recovery, and the
|
|
174
|
+
optional supervision-health gate.
|
|
144
175
|
- [Shadow Studies](shadow-studies.md): compare what an agent would propose
|
|
145
176
|
with explicit authorized outcomes before granting write authority.
|
|
146
177
|
- [Writeback Executors](writeback-executors.md): app-owned writeback handlers
|
|
@@ -162,8 +193,11 @@ no-database demo, wire your database, then read deeper concepts.
|
|
|
162
193
|
- [Store Lifecycle](store-lifecycle.md): active-store leases, prune safety,
|
|
163
194
|
deleted-store behavior, and concurrent server guardrails.
|
|
164
195
|
- `synapsor-runner activity search`, `evidence`, `query-audit`, `receipts`,
|
|
165
|
-
`events tail`, and `
|
|
166
|
-
|
|
196
|
+
`events tail`, `attention show`, and `notifications status`: local evidence,
|
|
197
|
+
audit, receipt, replay, complete lifecycle history, and human-attention
|
|
198
|
+
inspection. The legacy development lifecycle webhook remains documented in
|
|
199
|
+
[Local Mode](local-mode.md); production attention delivery uses the signed,
|
|
200
|
+
quiet notification pipeline.
|
|
167
201
|
- `examples/mysql-refund-agent/`: MySQL order/refund review example using the
|
|
168
202
|
same proposal, approval, guarded writeback, and replay loop.
|
|
169
203
|
- [Scoped Ledger Reports](compliance-reports.md): object/principal JSON,
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Agent-Guided Synapsor Setup
|
|
2
|
+
|
|
3
|
+
This guide lets Claude Code, Codex, Cursor, or another coding agent help a
|
|
4
|
+
developer set up Synapsor Runner without taking over a human security decision.
|
|
5
|
+
It uses the same local-first flow a developer runs directly. No Synapsor
|
|
6
|
+
account, Cloud login, model API key, global installation, or database
|
|
7
|
+
replication is required.
|
|
8
|
+
|
|
9
|
+
## Copyable Prompt
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Set up Synapsor Runner for this project.
|
|
13
|
+
|
|
14
|
+
Use DATABASE_URL from my environment. Run the setup yourself and explain each
|
|
15
|
+
step briefly. Stop only when I must review the data boundary or make another
|
|
16
|
+
human-authority decision. Never ask me to paste credentials into chat, and
|
|
17
|
+
never activate, approve, or apply anything for me.
|
|
18
|
+
|
|
19
|
+
Finish by driving one safe tool, showing what the agent can and cannot access,
|
|
20
|
+
and giving me the MCP configuration for my client.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Rules For The Coding Agent
|
|
24
|
+
|
|
25
|
+
The coding agent may inspect project files, check tool availability, run the
|
|
26
|
+
documented CLI, explain failures, and resume completed work.
|
|
27
|
+
|
|
28
|
+
The coding agent must not:
|
|
29
|
+
|
|
30
|
+
- ask the user to paste a database URL, password, token, or private key into
|
|
31
|
+
chat;
|
|
32
|
+
- print or persist the value of `DATABASE_URL` or another credential;
|
|
33
|
+
- choose a tenant or principal boundary;
|
|
34
|
+
- decide that a sensitive or uncertain field is safe to expose;
|
|
35
|
+
- activate an exploration boundary or named capability;
|
|
36
|
+
- approve, reject, apply, reconcile, or revert a proposal;
|
|
37
|
+
- run writeback setup with `--apply`;
|
|
38
|
+
- weaken a failed role, RLS, schema-lock, profile, or transport check;
|
|
39
|
+
- replace an existing generated project or use `--force` without a human
|
|
40
|
+
choosing the destructive path;
|
|
41
|
+
- fetch or execute setup code other than the documented npm package command.
|
|
42
|
+
|
|
43
|
+
The model-facing MCP surface never contains activation, approval, or apply
|
|
44
|
+
tools. A coding agent operating the terminal must preserve the same separation.
|
|
45
|
+
|
|
46
|
+
## Guided Procedure
|
|
47
|
+
|
|
48
|
+
### 1. Verify Local Prerequisites
|
|
49
|
+
|
|
50
|
+
Run:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
node --version
|
|
54
|
+
test -n "${DATABASE_URL:-}"
|
|
55
|
+
npx -y @synapsor/runner --version
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Do not run `echo "$DATABASE_URL"` or otherwise reveal its value. Runner
|
|
59
|
+
requires Node 22.13 or newer.
|
|
60
|
+
|
|
61
|
+
Report one sentence:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
Node, the Runner package, and an exported DATABASE_URL are available.
|
|
65
|
+
Next: inspect metadata and open the local boundary review.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
If `DATABASE_URL` is absent, stop and say:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
DATABASE_URL is not exported in this shell. Export it locally, without pasting
|
|
72
|
+
it into chat, then ask me to continue.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 2. Start Or Resume The Guided Project
|
|
76
|
+
|
|
77
|
+
From the intended project directory, run:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx -y @synapsor/runner start --from-env DATABASE_URL
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
For a fresh interactive project, Runner performs metadata-only inspection,
|
|
84
|
+
creates disabled review artifacts, validates the generated project, initializes
|
|
85
|
+
the local ledger, and starts the secured loopback Workbench. It prints one
|
|
86
|
+
local URL if a browser cannot be opened.
|
|
87
|
+
|
|
88
|
+
For an existing guided project, the same command resumes it. Resume and Try do
|
|
89
|
+
not rescan the database, rewrite files, or change a digest. Do not add
|
|
90
|
+
`--force`. A schema rescan or reset is a separate human choice in Workbench.
|
|
91
|
+
|
|
92
|
+
Report:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
Runner created or resumed a disabled local boundary. No source rows were read
|
|
96
|
+
and the database was not changed.
|
|
97
|
+
Next: review the security exceptions in Workbench.
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Then stop. The human must review:
|
|
101
|
+
|
|
102
|
+
- fields kept out and fields still uncertain;
|
|
103
|
+
- exact row identity;
|
|
104
|
+
- trusted tenant and principal scope;
|
|
105
|
+
- aggregate-safe dimensions and measures;
|
|
106
|
+
- database-role and RLS posture;
|
|
107
|
+
- the exact digest being activated.
|
|
108
|
+
|
|
109
|
+
Do not click or call activation endpoints for the user.
|
|
110
|
+
|
|
111
|
+
### 3. Continue After Human Activation
|
|
112
|
+
|
|
113
|
+
After the user confirms that Workbench shows an active reviewed boundary,
|
|
114
|
+
continue in the same Workbench session. The built-in Explore form performs the
|
|
115
|
+
first bounded read and PM-style aggregate without SQL or plan JSON.
|
|
116
|
+
|
|
117
|
+
The coding agent may verify the active local surface without copying an opaque
|
|
118
|
+
handle:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npx -y @synapsor/runner try call --list --format json
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
If no named capability is active yet, that is expected: a temporary local
|
|
125
|
+
Scoped Explore boundary is not a production named tool. Ask the user to run the
|
|
126
|
+
suggested aggregate in Workbench and select **Protect this analysis**.
|
|
127
|
+
|
|
128
|
+
Protect creates public DSL, canonical JSON, tests, and a disabled named
|
|
129
|
+
capability. Stop again for exact-digest human activation. Do not activate it
|
|
130
|
+
for the user.
|
|
131
|
+
|
|
132
|
+
### 4. Verify The First Named Tool
|
|
133
|
+
|
|
134
|
+
After the human activates a protected named capability, run:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
npx -y @synapsor/runner try call --list --format json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Use the tool name returned by that command. For a tool with generated sample
|
|
141
|
+
input, run:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npx -y @synapsor/runner try call <tool-name> --sample --json
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Do not invent tenant or principal arguments. Trusted scope comes from the
|
|
148
|
+
reviewed environment/session binding outside model input.
|
|
149
|
+
|
|
150
|
+
Report:
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
Your first safe named tool is working.
|
|
154
|
+
The result used only reviewed fields and trusted scope.
|
|
155
|
+
Source database changed: no.
|
|
156
|
+
Next: connect the same reviewed tool surface to your MCP client.
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### 5. Present MCP Setup
|
|
160
|
+
|
|
161
|
+
Workbench displays ready-to-copy configurations for:
|
|
162
|
+
|
|
163
|
+
- Cursor project MCP;
|
|
164
|
+
- Claude-compatible local stdio MCP;
|
|
165
|
+
- Codex;
|
|
166
|
+
- generic stdio MCP.
|
|
167
|
+
|
|
168
|
+
All hosts launch the same reviewed Runner project. None receives a broader
|
|
169
|
+
authority surface.
|
|
170
|
+
|
|
171
|
+
For a terminal-rendered generic configuration, run:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
npx -y @synapsor/runner mcp config --absolute-paths
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Do not write into a client configuration without explicit user consent. Cursor
|
|
178
|
+
has a separate consent-gated installer:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
npx -y @synapsor/runner mcp install cursor --project --dry-run
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Show the dry-run result first. Installation remains a human choice.
|
|
185
|
+
|
|
186
|
+
## Guided Write Action
|
|
187
|
+
|
|
188
|
+
After the first safe read, Workbench can generate one bounded write action.
|
|
189
|
+
Schema structure supplies candidates only. The human decides business intent,
|
|
190
|
+
allowed fields, values or transitions, trusted scope, version guard, reviewer,
|
|
191
|
+
limits, optional bounded policy approval, receipt mode, and compensation.
|
|
192
|
+
|
|
193
|
+
The generated action starts disabled. Its first model-facing call creates an
|
|
194
|
+
exact proposal and must say:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
Proposal created.
|
|
198
|
+
Source database changed: no.
|
|
199
|
+
The model cannot approve or apply this proposal.
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Stop at action activation, proposal approval, writeback setup, apply, and
|
|
203
|
+
revert. Those are human or trusted-operator decisions outside MCP.
|
|
204
|
+
|
|
205
|
+
Manual apply is the default. An operator may separately configure
|
|
206
|
+
digest-bound supervised execution for eligible production actions. In that
|
|
207
|
+
mode, the response must disclose that reviewed policy may approve and a trusted
|
|
208
|
+
worker may later apply the proposal without a per-request click. The coding
|
|
209
|
+
agent still cannot enable, start, pause, configure, or control that worker. See
|
|
210
|
+
[Operator-Supervised Automatic Apply](supervised-automatic-apply.md).
|
|
211
|
+
|
|
212
|
+
## Recovery
|
|
213
|
+
|
|
214
|
+
Use the one next action Runner prints. Preserve the current project and review
|
|
215
|
+
state.
|
|
216
|
+
|
|
217
|
+
| Failure | Required response |
|
|
218
|
+
| --- | --- |
|
|
219
|
+
| Connection failed | Confirm the local environment variable and network path without printing the credential, then rerun `start`. |
|
|
220
|
+
| Privileged, writable, owner, `BYPASSRLS`, or unverifiable read role | Stop source-row exploration. Ask the user to supply a verifiably read-only role. |
|
|
221
|
+
| Tenant, principal, or row identity unresolved | Stop and direct the human to the highlighted Workbench exception. |
|
|
222
|
+
| Sensitive field blocked | Keep it out unless a human records a reasoned field decision. |
|
|
223
|
+
| Existing generated project | Run the same `start` command and choose Resume. Do not use `--force`. |
|
|
224
|
+
| Stale generation lock | Preserve active named capabilities; choose Rescan and review changes. |
|
|
225
|
+
| Workbench port unavailable | Use the single alternate loopback URL Runner prints or free the occupied local port. |
|
|
226
|
+
| Writeback prerequisites missing | Keep the proposal unchanged. Use `writeback setup` for a preview only and stop for human review. |
|
|
227
|
+
|
|
228
|
+
## What The Developer Should Understand
|
|
229
|
+
|
|
230
|
+
At the end, ask the developer to explain these four facts:
|
|
231
|
+
|
|
232
|
+
1. The model never receives raw SQL authority.
|
|
233
|
+
2. Reads are limited to reviewed fields under trusted tenant and principal
|
|
234
|
+
scope.
|
|
235
|
+
3. Model-facing writes create proposals rather than committing changes.
|
|
236
|
+
4. The model cannot activate authority, approve proposals, or apply writes.
|
|
237
|
+
|
|
238
|
+
If any answer is unclear, reopen the Workbench Overview. Do not expand authority
|
|
239
|
+
to make onboarding appear successful.
|
package/docs/aggregate-reads.md
CHANGED
|
@@ -61,11 +61,20 @@ suppression reduces single-record inference; it does not solve every statistical
|
|
|
61
61
|
inference risk. Review the underlying view, database role, and aggregation
|
|
62
62
|
policy as well.
|
|
63
63
|
|
|
64
|
+
For a derived measure, keep formulas and joins out of the model-facing grammar.
|
|
65
|
+
Define them in a reviewed database view and expose only a typed view column
|
|
66
|
+
through the fixed aggregate capability. The complete hardened PostgreSQL
|
|
67
|
+
pattern and runnable retail example are in [Reviewed Database Views For Derived
|
|
68
|
+
Measures](reviewed-database-views.md).
|
|
69
|
+
|
|
64
70
|
Scoped Aggregate Explore reuses and extends this suppression machinery. Its
|
|
65
71
|
reviewed boundary additionally fixes aggregate-safe measures,
|
|
66
72
|
`count_distinct` identifiers, dimensions, day/week/month buckets, typed
|
|
67
|
-
filters,
|
|
68
|
-
response/query/rate limits, and
|
|
69
|
-
field may be approved for
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
filters, up to three activated relationship paths (one or two proven
|
|
74
|
+
many-to-one links per path), maximum groups, response/query/rate limits, and
|
|
75
|
+
durable extraction/differencing budgets. A field may be approved for
|
|
76
|
+
`count_distinct` while its raw values remain hidden. Relationship paths remain
|
|
77
|
+
catalog-proven, operator-activated authority; the model cannot supply join
|
|
78
|
+
identifiers or activate an inactive path. See [Reviewed Relationship
|
|
79
|
+
Paths](reviewed-relationships.md). Production receives only the protected named
|
|
80
|
+
capability; broad Explore is absent from production `tools/list`.
|
|
@@ -24,12 +24,11 @@ the receipt, and includes the result in replay.
|
|
|
24
24
|
> error receipts. If you skip those checks, you can reintroduce cross-tenant
|
|
25
25
|
> writes, lost updates, or duplicate writes. Keep handler credentials out of MCP.
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
closed on drift. See
|
|
27
|
+
Strict `proposal_freshness` is limited to same-database direct SQL writeback.
|
|
28
|
+
Runner rejects it for `http_handler`, `command_handler`, and cross-source
|
|
29
|
+
dependencies because a local preflight cannot be atomic with an effect executed
|
|
30
|
+
elsewhere. If supporting evidence matters, the app handler must lock and re-read
|
|
31
|
+
those rows inside its own business transaction and fail closed on drift. See
|
|
33
32
|
[Proposal And Evidence Freshness](proposal-evidence-freshness.md).
|
|
34
33
|
|
|
35
34
|
A handler is your application endpoint or script. It is not a second Synapsor
|