@synapsor/runner 0.1.13 → 0.1.15

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 CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### Editor-Friendly DSL Source Files
6
+
7
+ - Prefers `.synapsor.sql` for DSL source files so editors can provide generic
8
+ SQL highlighting while keeping `.synapsor` backward compatible.
9
+ - Keeps DSL semantics, Runner behavior, and generated canonical JSON unchanged.
10
+ - Stages `@synapsor/dsl@0.1.5` and `@synapsor/runner@0.1.15`.
11
+
12
+ ### README Path Polish
13
+
14
+ - Makes the audit, demo, and staging-database adoption sequence explicit for
15
+ readers scanning the first minute of the README.
16
+ - Trims the inline JSON example to the reviewed capability entry and links the
17
+ generated storage, source, trusted-context, and timeout wiring to the full
18
+ own-database guide.
19
+ - Stages `@synapsor/runner@0.1.14`; `@synapsor/spec` and `@synapsor/dsl` remain
20
+ unchanged for that release.
21
+
22
+ ## 0.1.13
23
+
5
24
  ### Front-Door Documentation
6
25
 
7
26
  - Rewrites the GitHub and npm READMEs around an audit-first 60-second proof,
@@ -15,6 +34,8 @@
15
34
  - Stages `@synapsor/runner@0.1.13`; `@synapsor/spec` and `@synapsor/dsl` remain
16
35
  unchanged.
17
36
 
37
+ ## 0.1.12
38
+
18
39
  ### Runner Version Invocation
19
40
 
20
41
  - Stages `@synapsor/runner@0.1.12` without changing or republishing
package/README.md CHANGED
@@ -14,6 +14,10 @@ surface.
14
14
 
15
15
  ## Prove It In 60 Seconds
16
16
 
17
+ The path is: **audit** your existing MCP risk, then **demo** the safety
18
+ boundary, then **connect** a staging database. The first two commands finish in
19
+ seconds and touch nothing but a local fixture file.
20
+
17
21
  First, inspect the risk in a typical raw-SQL database MCP server. This works
18
22
  even if you never adopt Runner:
19
23
 
@@ -77,48 +81,30 @@ creates trusted context, generates reviewed capabilities, previews the MCP tool
77
81
  surface, and prints the next smoke and serve commands. It stores environment
78
82
  variable names, not connection strings.
79
83
 
80
- A minimal generated read-only configuration looks like this:
84
+ The interesting part of the generated configuration is the capability entry: a
85
+ reviewed, tenant-scoped read with an explicit column allowlist and required
86
+ evidence. The storage, source, and trusted-context wiring around it (including
87
+ statement timeouts) is generated for you; the full file is in the
88
+ [own-database guide](docs/getting-started-own-database.md).
81
89
 
82
90
  ```json
83
91
  {
84
- "version": 1,
85
- "mode": "read_only",
86
- "result_format": 2,
87
- "storage": { "sqlite_path": "./.synapsor/local.db" },
88
- "sources": {
89
- "app_postgres": {
90
- "engine": "postgres",
91
- "read_url_env": "DATABASE_URL",
92
- "statement_timeout_ms": 3000
93
- }
92
+ "name": "billing.inspect_invoice",
93
+ "kind": "read",
94
+ "source": "app_postgres",
95
+ "target": {
96
+ "schema": "public",
97
+ "table": "invoices",
98
+ "primary_key": "id",
99
+ "tenant_key": "tenant_id"
94
100
  },
95
- "trusted_context": {
96
- "provider": "environment",
97
- "values": {
98
- "tenant_id_env": "SYNAPSOR_TENANT_ID",
99
- "principal_env": "SYNAPSOR_PRINCIPAL"
100
- }
101
+ "args": {
102
+ "invoice_id": { "type": "string", "required": true, "max_length": 128 }
101
103
  },
102
- "capabilities": [
103
- {
104
- "name": "billing.inspect_invoice",
105
- "kind": "read",
106
- "source": "app_postgres",
107
- "target": {
108
- "schema": "public",
109
- "table": "invoices",
110
- "primary_key": "id",
111
- "tenant_key": "tenant_id"
112
- },
113
- "args": {
114
- "invoice_id": { "type": "string", "required": true, "max_length": 128 }
115
- },
116
- "lookup": { "id_from_arg": "invoice_id" },
117
- "visible_columns": ["id", "tenant_id", "status", "late_fee_cents", "updated_at"],
118
- "evidence": "required",
119
- "max_rows": 1
120
- }
121
- ]
104
+ "lookup": { "id_from_arg": "invoice_id" },
105
+ "visible_columns": ["id", "tenant_id", "status", "late_fee_cents", "updated_at"],
106
+ "evidence": "required",
107
+ "max_rows": 1
122
108
  }
123
109
  ```
124
110
 
@@ -170,7 +156,9 @@ See [Security Boundary](docs/security-boundary.md) and
170
156
 
171
157
  Runner executes locally. The spec is the portable contract shared by Runner
172
158
  and Cloud/C++. The DSL gives that contract a reviewable source format. Start
173
- with [Capability Authoring](docs/capability-authoring.md).
159
+ with [Capability Authoring](docs/capability-authoring.md). Use `.synapsor.sql`
160
+ for DSL source files when you want editors to provide generic SQL highlighting;
161
+ legacy `.synapsor` files remain supported and produce the same contract JSON.
174
162
 
175
163
  ## OSS And Cloud
176
164
 
package/dist/runner.mjs CHANGED
@@ -8439,7 +8439,7 @@ function stringOrDefault(value, fallback) {
8439
8439
  // apps/runner/package.json
8440
8440
  var package_default = {
8441
8441
  name: "@synapsor/runner",
8442
- version: "0.1.13",
8442
+ version: "0.1.15",
8443
8443
  description: "Stop giving AI agents execute_sql; expose reviewed Postgres/MySQL MCP actions with proposals, approval, writeback, and replay.",
8444
8444
  license: "Apache-2.0",
8445
8445
  type: "module",
@@ -8526,7 +8526,7 @@ var package_default = {
8526
8526
  // packages/dsl/package.json
8527
8527
  var package_default2 = {
8528
8528
  name: "@synapsor/dsl",
8529
- version: "0.1.4",
8529
+ version: "0.1.5",
8530
8530
  description: "Preview SQL-like Synapsor authoring DSL compiler for canonical @synapsor/spec contracts.",
8531
8531
  license: "Apache-2.0",
8532
8532
  type: "module",
@@ -10139,7 +10139,7 @@ async function dslCommand(args) {
10139
10139
  }
10140
10140
  async function dslValidate(args) {
10141
10141
  const target2 = firstPositional(args);
10142
- if (!target2) throw new Error("dsl validate requires <contract.synapsor>");
10142
+ if (!target2) throw new Error("dsl validate requires a DSL source file such as contract.synapsor.sql or contract.synapsor");
10143
10143
  const source = await fs3.readFile(target2, "utf8");
10144
10144
  const strict = args.includes("--strict");
10145
10145
  const result = validateAgentDsl(source);
@@ -10161,7 +10161,7 @@ async function dslValidate(args) {
10161
10161
  }
10162
10162
  async function dslCompile(args) {
10163
10163
  const target2 = firstPositional(args);
10164
- if (!target2) throw new Error("dsl compile requires <contract.synapsor>");
10164
+ if (!target2) throw new Error("dsl compile requires a DSL source file such as contract.synapsor.sql or contract.synapsor");
10165
10165
  const source = await fs3.readFile(target2, "utf8");
10166
10166
  const strict = args.includes("--strict");
10167
10167
  const result = compileAgentDslWithWarnings(source);
@@ -16849,7 +16849,7 @@ Examples:
16849
16849
  ${cmd} init --wizard --from-env DATABASE_URL
16850
16850
  ${cmd} contract validate ./synapsor.contract.json
16851
16851
  ${cmd} contract normalize ./synapsor.contract.json --out ./synapsor.contract.normalized.json
16852
- ${cmd} dsl compile ./contract.synapsor --out ./synapsor.contract.json
16852
+ ${cmd} dsl compile ./contract.synapsor.sql --out ./synapsor.contract.json
16853
16853
  ${cmd} cloud push ./synapsor.contract.json --dry-run
16854
16854
  ${cmd} smoke call --config ./synapsor.runner.json --store ./.synapsor/local.db
16855
16855
  ${cmd} tools list --aliases --config ./synapsor.runner.json --store ./.synapsor/local.db
@@ -16867,8 +16867,10 @@ contexts, capabilities, workflows, evidence, proposal, receipt, and replay
16867
16867
  semantics. Local database URLs, ports, and store paths stay in runner config.
16868
16868
  `,
16869
16869
  dsl: `Usage:
16870
- ${cmd} dsl validate ./contract.synapsor [--json]
16871
- ${cmd} dsl compile ./contract.synapsor --out ./synapsor.contract.json
16870
+ ${cmd} dsl validate ./contract.synapsor.sql [--json]
16871
+ ${cmd} dsl compile ./contract.synapsor.sql --out ./synapsor.contract.json
16872
+
16873
+ Both .synapsor.sql and legacy .synapsor source files are supported.
16872
16874
 
16873
16875
  Compile the preview SQL-like Synapsor authoring DSL into canonical
16874
16876
  @synapsor/spec JSON. Unsupported Cloud-only/generated clauses fail explicitly
@@ -5,9 +5,13 @@ source of truth for trusted context, resources, capabilities, evidence,
5
5
  proposal shape, and writeback intent.
6
6
 
7
7
  ```text
8
- contract.synapsor -> synapsor.contract.json -> synapsor.runner.json
8
+ contract.synapsor.sql -> synapsor.contract.json -> synapsor.runner.json
9
9
  ```
10
10
 
11
+ Use `.synapsor.sql` as the preferred DSL source extension because editors can
12
+ provide generic SQL highlighting. Legacy `.synapsor` files remain supported;
13
+ the suffix does not change DSL semantics or generated canonical JSON.
14
+
11
15
  Use `synapsor.runner.json` for local wiring: database env var names, SQLite
12
16
  store path, MCP transport settings, and local development flags. The model sees
13
17
  semantic capabilities such as `billing.inspect_invoice`, not raw SQL, table
@@ -69,7 +73,7 @@ END
69
73
  Compile and validate:
70
74
 
71
75
  ```bash
72
- synapsor-runner dsl compile ./contract.synapsor --out ./synapsor.contract.json --strict
76
+ synapsor-runner dsl compile ./contract.synapsor.sql --out ./synapsor.contract.json --strict
73
77
  synapsor-runner contract validate ./synapsor.contract.json
74
78
  synapsor-runner contract bundle ./synapsor.contract.json --out ./synapsor-runner-bundle
75
79
  synapsor-runner cloud push ./synapsor.contract.json --dry-run
@@ -2,6 +2,11 @@
2
2
 
3
3
  Conformance fixtures prove behavior, not just JSON shape.
4
4
 
5
+ The conformance artifacts are canonical JSON. When authoring a source contract
6
+ for these checks, prefer `.synapsor.sql` for generic editor SQL highlighting;
7
+ `.synapsor` remains backward compatible and the filename does not affect the
8
+ compiled contract semantics.
9
+
5
10
  `@synapsor/spec` owns the fixtures under:
6
11
 
7
12
  ```text
@@ -138,10 +138,13 @@ synapsor-runner tools preview --config ./synapsor.runner.json --store ./.synapso
138
138
  You can also compile from the SQL-like authoring layer:
139
139
 
140
140
  ```bash
141
- synapsor-runner dsl validate ./contract.synapsor
142
- synapsor-runner dsl compile ./contract.synapsor --out ./synapsor.contract.json --strict
141
+ synapsor-runner dsl validate ./contract.synapsor.sql
142
+ synapsor-runner dsl compile ./contract.synapsor.sql --out ./synapsor.contract.json --strict
143
143
  ```
144
144
 
145
+ `.synapsor.sql` is the preferred editor-friendly source filename. Existing
146
+ `.synapsor` files remain valid and compile to equivalent canonical JSON.
147
+
145
148
  ## Bundle For Local Runner
146
149
 
147
150
  Cloud/exported or hand-written contracts can become a local Runner bundle:
@@ -12,9 +12,17 @@ for the Synapsor Cloud CLI.
12
12
 
13
13
  ## Unreleased
14
14
 
15
- Prepared package version: `@synapsor/runner@0.1.12`. The already-published
16
- `@synapsor/spec@0.1.4` and `@synapsor/dsl@0.1.4` do not change and must not be
17
- republished for this release.
15
+ ### Editor-Friendly DSL Source Files
16
+
17
+ - Prefers `.synapsor.sql` for DSL source files so editors can provide generic
18
+ SQL highlighting; `.synapsor` remains supported for compatibility.
19
+ - The filename suffix does not change DSL semantics or generated canonical JSON.
20
+ - Stages `@synapsor/dsl@0.1.5` and `@synapsor/runner@0.1.15`; `@synapsor/spec`
21
+ remains `0.1.4`.
22
+
23
+ Prepared package versions: `@synapsor/dsl@0.1.5` and
24
+ `@synapsor/runner@0.1.15`. The already-published `@synapsor/spec@0.1.4` does
25
+ not change and must not be republished for this release.
18
26
 
19
27
  ### Runner Version Invocation
20
28
 
@@ -27,7 +27,7 @@ When working from this source checkout, use `corepack pnpm runner` in place of
27
27
  Validate the authored boundary before starting Docker:
28
28
 
29
29
  ```bash
30
- synapsor-runner dsl compile examples/support-plan-credit/contract.synapsor \
30
+ synapsor-runner dsl compile examples/support-plan-credit/contract.synapsor.sql \
31
31
  --out /tmp/support-plan-credit.contract.json \
32
32
  --strict
33
33
  synapsor-runner contract validate /tmp/support-plan-credit.contract.json
@@ -192,7 +192,7 @@ tool metadata and results. For Claude, Cursor, or generic MCP clients, omit
192
192
 
193
193
  ## How The Policy Is Governed
194
194
 
195
- The auto-approval policy lives in `contract.synapsor`:
195
+ The auto-approval policy lives in `contract.synapsor.sql`:
196
196
 
197
197
  ```sql
198
198
  AUTO APPROVE WHEN plan_credit_cents <= 2500
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synapsor/runner",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Stop giving AI agents execute_sql; expose reviewed Postgres/MySQL MCP actions with proposals, approval, writeback, and replay.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",