@synapsor/runner 1.4.123 → 1.5.3
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 +144 -19
- package/README.md +132 -135
- package/dist/authoring.d.ts +23 -0
- package/dist/authoring.d.ts.map +1 -0
- package/dist/authoring.mjs +1318 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +4 -5
- package/dist/local-ui.d.ts +14 -0
- package/dist/local-ui.d.ts.map +1 -1
- package/dist/runner.mjs +18427 -7084
- package/dist/runtime.d.ts +50 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.mjs +15094 -0
- package/dist/shadow.d.ts +36 -0
- package/dist/shadow.d.ts.map +1 -0
- package/dist/shadow.mjs +5262 -0
- package/docs/README.md +44 -5
- package/docs/alternatives.md +122 -0
- package/docs/capability-authoring.md +44 -1
- package/docs/client-recipes.md +218 -0
- package/docs/contract-testing.md +9 -7
- package/docs/cursor-plugin.md +78 -0
- 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 +179 -0
- package/docs/fresh-developer-usability.md +110 -0
- package/docs/getting-started-own-database.md +103 -2
- package/docs/host-compatibility.md +59 -0
- package/docs/local-mode.md +12 -7
- package/docs/mcp-apps.md +188 -0
- package/docs/mcp-audit.md +220 -2
- package/docs/mcp-client-setup.md +20 -4
- package/docs/mcp-clients.md +41 -4
- package/docs/oss-vs-cloud.md +3 -0
- package/docs/production.md +8 -0
- package/docs/release-notes.md +138 -14
- 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 +30 -5
- package/docs/shadow-studies.md +241 -0
- package/docs/troubleshooting-first-run.md +46 -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 +57 -5
- package/examples/support-billing-agent/app/README.md +6 -0
- package/examples/support-billing-agent/app/contract.ts +28 -0
- package/examples/support-billing-agent/app/effect-adapter.mjs +23 -0
- package/examples/support-billing-agent/app/record-shadow-outcomes.mjs +44 -0
- 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 +63 -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/examples/support-plan-credit/README.md +48 -2
- package/examples/support-plan-credit/mcp-client-examples/README.md +23 -0
- package/examples/support-plan-credit/mcp-client-examples/claude-code.sh +34 -0
- package/examples/support-plan-credit/mcp-client-examples/codex.config.toml +24 -0
- package/examples/support-plan-credit/mcp-client-examples/generic-stdio.mjs +35 -0
- package/examples/support-plan-credit/mcp-client-examples/generic-streamable-http.mjs +31 -0
- package/examples/support-plan-credit/mcp-client-examples/google-adk.py +40 -0
- package/examples/support-plan-credit/mcp-client-examples/langchain.mjs +29 -0
- package/examples/support-plan-credit/mcp-client-examples/llamaindex.py +36 -0
- package/examples/support-plan-credit/mcp-client-examples/openai-agents-stdio.ts +1 -1
- package/examples/support-plan-credit/mcp-client-examples/openai-agents-streamable-http.ts +1 -1
- package/examples/support-plan-credit/mcp-client-examples/vscode.mcp.json +20 -0
- package/examples/support-plan-credit/synapsor/actions/support.propose_plan_credit.contract-tests.generated.json +221 -0
- package/examples/support-plan-credit/synapsor/actions/support.propose_plan_credit.ts +34 -0
- 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/fixtures/mcp-audit/README.md +14 -0
- package/fixtures/mcp-audit/cursor-bypass-config.json +38 -0
- package/fixtures/mcp-audit/dangerous-tools-list.json +33 -0
- package/fixtures/mcp-audit/reviewed-proposal-tools-list.json +60 -0
- package/package.json +29 -3
- 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 +203 -0
- package/schemas/schema-candidate-review.schema.json +167 -0
- package/schemas/schema-candidates.schema.json +49 -0
- package/schemas/synapsor.contract-tests.schema.json +1 -1
- package/schemas/synapsor.runner.schema.json +51 -0
|
@@ -28,11 +28,11 @@ inspect your schema
|
|
|
28
28
|
-> choose one table/view
|
|
29
29
|
-> choose trusted scope and visible fields
|
|
30
30
|
-> optionally choose proposal/writeback rules
|
|
31
|
-
-> generate synapsor.runner.json
|
|
31
|
+
-> generate synapsor.runner.json + canonical synapsor.contract.json
|
|
32
32
|
-> preview MCP tools exposed to the model
|
|
33
33
|
-> run a local smoke check of the tool boundary
|
|
34
34
|
-> optionally write .synapsor/smoke-input.json for one real row
|
|
35
|
-
->
|
|
35
|
+
-> open the secured localhost first-action workbench in an interactive terminal
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
It does not print your database URL, put the URL in MCP client config, expose
|
|
@@ -43,6 +43,11 @@ credentials.
|
|
|
43
43
|
`onboard db --from-env DATABASE_URL` is the same explicit path if you prefer the
|
|
44
44
|
older command name in scripts.
|
|
45
45
|
|
|
46
|
+
Interactive `start` opens the focused local workbench after config validation
|
|
47
|
+
and an MCP boundary handshake. Use `--no-open` for CI or scripts. That handshake
|
|
48
|
+
proves the reviewed tool surface; the workbench's **Test** step remains pending
|
|
49
|
+
until a real scoped read is recorded in the local ledger.
|
|
50
|
+
|
|
46
51
|
During the wizard, provide the optional sample object id if you know one safe
|
|
47
52
|
row in the selected table. Runner writes `./.synapsor/smoke-input.json` with
|
|
48
53
|
that id and prints the exact `smoke call` command. If you skip it, use
|
|
@@ -66,6 +71,13 @@ export DATABASE_URL="<postgres-or-mysql-read-url>"
|
|
|
66
71
|
|
|
67
72
|
Use a read-only credential for inspection and model-facing read/proposal tools.
|
|
68
73
|
|
|
74
|
+
The generated compatibility setup uses application-level trusted-scope
|
|
75
|
+
predicates. Before production-like multi-tenant use, choose and document one of
|
|
76
|
+
the modes in [Database-Enforced Tenant And Principal
|
|
77
|
+
Scope](database-enforced-scope.md): shared application scope, PostgreSQL RLS
|
|
78
|
+
plus Runner checks, or tenant-bound credentials/deployments. MySQL has no
|
|
79
|
+
native RLS equivalent.
|
|
80
|
+
|
|
69
81
|
### TLS notes for AWS RDS and other managed databases
|
|
70
82
|
|
|
71
83
|
If you see an error like:
|
|
@@ -179,6 +191,95 @@ The wizard:
|
|
|
179
191
|
- writes the generated config, `.env.example`, and MCP client snippets only
|
|
180
192
|
after final confirmation.
|
|
181
193
|
|
|
194
|
+
The generated action is explicit about its activation state. Read-only and
|
|
195
|
+
shadow actions cannot commit. Review/writeback generation requires final
|
|
196
|
+
confirmation (`--yes` in a noninteractive command) and still gives the model no
|
|
197
|
+
approval or apply tool.
|
|
198
|
+
|
|
199
|
+
### Draft another Safe Action with a coding agent
|
|
200
|
+
|
|
201
|
+
After a reviewed read capability exists, describe one business action instead
|
|
202
|
+
of hand-authoring a complete contract:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
synapsor-runner start \
|
|
206
|
+
--action plan_credit \
|
|
207
|
+
--description "Propose one reviewed customer plan credit" \
|
|
208
|
+
--based-on support.inspect_customer
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Runner writes `synapsor/actions/support.propose_plan_credit.ts` and scoped
|
|
212
|
+
agent instructions. The file is an inert scaffold. It contains explicit
|
|
213
|
+
authority questions for trusted scope, visible and kept-out fields, allowed
|
|
214
|
+
effect, conflict guard, bounds, approval, and executor. Creating or editing it
|
|
215
|
+
does not change the active contract or MCP tool list.
|
|
216
|
+
|
|
217
|
+
Give the exact prompt printed by the command to Cursor or another coding
|
|
218
|
+
agent. The agent may inspect project/schema evidence, complete the restricted
|
|
219
|
+
TypeScript object, and run deterministic validation:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
synapsor-runner action validate \
|
|
223
|
+
./synapsor/actions/support.propose_plan_credit.ts
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Runner statically parses rather than imports the file. A successful validation
|
|
227
|
+
writes a digest-addressed **disabled draft**, a plain-language explanation,
|
|
228
|
+
and exact static allow/deny/effect tests under `.synapsor/drafts/`. It cannot
|
|
229
|
+
activate a tool.
|
|
230
|
+
|
|
231
|
+
In the secured Workbench, run **Preview exact staging Data PR**. The preview
|
|
232
|
+
may perform the reviewed scoped read and write proposal evidence to the local
|
|
233
|
+
ledger, but it cannot mutate the source. Review the exact effect, type
|
|
234
|
+
`ACTIVATE` plus the complete displayed digest, and confirm activation yourself.
|
|
235
|
+
There is intentionally no CLI or MCP command a coding agent can use to
|
|
236
|
+
activate the draft. If the host does not refresh `tools/list`, reconnect the
|
|
237
|
+
MCP server after activation as the Workbench instructs.
|
|
238
|
+
|
|
239
|
+
## 5. Add the reviewed tools to Cursor
|
|
240
|
+
|
|
241
|
+
After setting trusted environment values, preview and install a project-scoped
|
|
242
|
+
entry without hand-editing `.cursor/mcp.json`:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
synapsor-runner mcp install cursor --project --dry-run \
|
|
246
|
+
--config ./synapsor.runner.json \
|
|
247
|
+
--store ./.synapsor/local.db
|
|
248
|
+
synapsor-runner mcp install cursor --project --yes \
|
|
249
|
+
--config ./synapsor.runner.json \
|
|
250
|
+
--store ./.synapsor/local.db
|
|
251
|
+
synapsor-runner mcp status cursor --project --check-launch
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Runner merges rather than replaces existing MCP servers, creates a backup,
|
|
255
|
+
records an integrity marker, and is idempotent. The entry uses an exact Runner
|
|
256
|
+
version and contains no database URL, trusted tenant/principal value, approval,
|
|
257
|
+
apply, or revert authority. Remove only the Runner-owned entry with:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
synapsor-runner mcp uninstall cursor --project --yes
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
See the [host compatibility matrix](host-compatibility.md) for the precise
|
|
264
|
+
Cursor evidence and MCP Apps limitation.
|
|
265
|
+
|
|
266
|
+
## 6. Inspect local activation evidence
|
|
267
|
+
|
|
268
|
+
Runner records bounded timing milestones locally. It does not transmit them:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
synapsor-runner activation show \
|
|
272
|
+
--config ./synapsor.runner.json \
|
|
273
|
+
--store ./.synapsor/local.db
|
|
274
|
+
synapsor-runner activation export \
|
|
275
|
+
--out ./.synapsor/activation-report.json
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Product activation time begins after package installation; initial npm
|
|
279
|
+
resolution/download/cache time is measured separately when evaluating cold
|
|
280
|
+
`npx` behavior. The report contains milestone timing/status only, not source
|
|
281
|
+
rows, object IDs, tenant IDs, credentials, or project paths.
|
|
282
|
+
|
|
182
283
|
For proposal modes, the current runner supports explicit field-update mappings such as:
|
|
183
284
|
|
|
184
285
|
```text
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# MCP Host Compatibility
|
|
2
|
+
|
|
3
|
+
This matrix separates host evidence from protocol evidence. It was last
|
|
4
|
+
reviewed on 2026-07-20. A working MCP SDK handshake is not presented as proof
|
|
5
|
+
that a specific editor renders an extension or protects app-only controls.
|
|
6
|
+
|
|
7
|
+
| Host/surface | Status | Evidence and boundary |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Cursor project `.cursor/mcp.json` lifecycle | Tested | Runner install/status/uninstall tests cover preview, merge, backup, idempotency, ownership, tamper refusal, paths with spaces, and exact-version `npx` wiring. Local Cursor version observed: 3.7.21 (`517f696d8ab6c53eb04fbfdaae705cd146bf3460`, x64). |
|
|
10
|
+
| Cursor stdio Runner launch and `tools/list` | Protocol-tested | `mcp status cursor --project --check-launch` executes the generated command and checks the exact reviewed tools through the official MCP client transport. A final manual Cursor UI pass is still required for a release claim tied to that host version. |
|
|
11
|
+
| Cursor MCP Apps inline proposal card | Unknown | Runner advertises the standard display-only resource metadata, but current stable Cursor rendering and app-only authority guarantees have not been reproduced. Use the secured localhost workbench or operator CLI. |
|
|
12
|
+
| Cursor approval/apply/revert through MCP | Unsupported | Intentionally absent. Cursor may auto-run model-facing tools; commit authority therefore stays outside MCP regardless of host settings. |
|
|
13
|
+
| Generic Add to Cursor deep link | Unsupported | Runner does not generate a link because no current documented generic server payload has been verified end to end. Project install is the supported path. |
|
|
14
|
+
| Generic stdio MCP client | Protocol-tested | Official MCP SDK initialization, tool listing, calls, resources, and display-only Apps metadata are covered in the suite. |
|
|
15
|
+
| Generic Streamable HTTP MCP client | Protocol-tested | Official MCP SDK sessions, signed context, secret rotation, JWKS, mTLS, aliases, and session isolation are covered. |
|
|
16
|
+
| Claude Desktop | Protocol-tested | Packaged stdio configuration and MCP transport are tested; manual host UI behavior varies by version and remains a release checklist item. |
|
|
17
|
+
| Claude Code | Configuration-tested and protocol-tested | Claude Code 2.1.216 accepted the secret-free stdio configuration through `mcp add-json`; the same command completed MCP `tools/list`. A manual model-driven proposal call remains a release gate. |
|
|
18
|
+
| Codex | Configuration-tested and protocol-tested | Codex CLI 0.144.6 accepted the secret-free stdio configuration through `codex mcp add`; the same command completed MCP `tools/list`. A manual model-driven proposal call remains a release gate. |
|
|
19
|
+
| VS Code | Protocol-tested | The checked `.vscode/mcp.json` shape is parsed and the same stdio command completes MCP `tools/list`; manual editor UI behavior is not claimed. |
|
|
20
|
+
| OpenAI Agents SDK | Recipe-checked and protocol-tested | Packaged stdio/Streamable HTTP examples are syntax/safety checked and OpenAI-safe aliases are protocol-tested. The exact SDK agent call remains protocol-only until run with an owner-supplied API key. |
|
|
21
|
+
| LangChain/LangGraph | Recipe-checked, protocol-only | The current `@langchain/mcp-adapters` recipe lists tools, rejects unsafe authority, and calls the proposal tool. The framework runtime has not been executed in this release environment. |
|
|
22
|
+
| Google ADK | Recipe-checked, protocol-only | The current `McpToolset`/`StdioConnectionParams` recipe exposes only the two reviewed tools. The framework runtime has not been executed in this release environment. |
|
|
23
|
+
| LlamaIndex | Recipe-checked, protocol-only | The current `BasicMCPClient` recipe lists tools and calls the proposal tool. The framework runtime has not been executed in this release environment. |
|
|
24
|
+
|
|
25
|
+
## Cursor Project Setup
|
|
26
|
+
|
|
27
|
+
Current Cursor documentation supports project MCP configuration in
|
|
28
|
+
`.cursor/mcp.json`. Runner manages only its `synapsor` entry:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
synapsor-runner mcp install cursor --project --dry-run
|
|
32
|
+
synapsor-runner mcp install cursor --project --yes
|
|
33
|
+
synapsor-runner mcp status cursor --project --check-launch
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The generated entry contains command paths only. Database credentials and
|
|
37
|
+
trusted tenant/principal values must come from the environment that launches
|
|
38
|
+
Runner. Other Cursor MCP servers and settings are preserved.
|
|
39
|
+
|
|
40
|
+
Primary references:
|
|
41
|
+
|
|
42
|
+
- [Cursor MCP documentation](https://cursor.com/docs/context/mcp)
|
|
43
|
+
- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
|
|
44
|
+
- [MCP Apps specification](https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx)
|
|
45
|
+
|
|
46
|
+
All adjacent-host source links, runnable snippets, shared proposal input, and
|
|
47
|
+
verification commands are in [Client And Framework Recipes](client-recipes.md).
|
|
48
|
+
|
|
49
|
+
## Authority Fallback
|
|
50
|
+
|
|
51
|
+
Hosts without a verified app-only human-control boundary receive the same
|
|
52
|
+
structured/text proposal result and can open the secured loopback workbench.
|
|
53
|
+
Approval, rejection, apply, compensation, policy activation, trusted identity,
|
|
54
|
+
and credentials never enter model-visible `tools/list`. Runner does not infer
|
|
55
|
+
host safety from a product name or user-agent string.
|
|
56
|
+
|
|
57
|
+
Runner currently exposes tools, not MCP prompts or an elicitation-based
|
|
58
|
+
approval flow. First-run setup and approval do not depend on optional host
|
|
59
|
+
prompt/elicitation support.
|
package/docs/local-mode.md
CHANGED
|
@@ -30,13 +30,14 @@ Current local-mode foundation:
|
|
|
30
30
|
- local approved proposal to `synapsor.writeback-job.v1` job generation;
|
|
31
31
|
- guarded Postgres/MySQL writeback adapters for approved structured jobs.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Runtime requirement:
|
|
34
34
|
|
|
35
|
-
The
|
|
36
|
-
ledger uses Node's `node:sqlite` runtime.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
The stable package requires Node >= 22.13.0 because the local evidence/replay
|
|
36
|
+
ledger uses Node's unflagged `node:sqlite` runtime. Earlier Node 22 releases
|
|
37
|
+
require an experimental flag and are not supported. The published package
|
|
38
|
+
declares that engine requirement and the CLI exits early with a clear message
|
|
39
|
+
on older Node versions. The Docker-backed demo remains the recommended path
|
|
40
|
+
when you do not want to change your host Node version.
|
|
40
41
|
|
|
41
42
|
## Initialize a config
|
|
42
43
|
|
|
@@ -184,7 +185,11 @@ npx -y -p @synapsor/runner synapsor-runner proposals reject wrp_123 \
|
|
|
184
185
|
|
|
185
186
|
Approval records the approver against the exact proposal hash/version. The proposal patch is immutable after creation.
|
|
186
187
|
|
|
187
|
-
Shadow-mode proposals are inspectable through `proposals show` and `replay
|
|
188
|
+
Shadow-mode proposals are inspectable through `proposals show` and `replay
|
|
189
|
+
show`, but `proposals approve` and `proposals writeback-job` reject them.
|
|
190
|
+
Shadow mode never mutates Postgres/MySQL or invokes an app-owned handler. To
|
|
191
|
+
compare agent behavior with explicit application/operator outcomes across a
|
|
192
|
+
pilot, use [Shadow Studies](shadow-studies.md).
|
|
188
193
|
|
|
189
194
|
## Browser review UI
|
|
190
195
|
|
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).
|