@synapsor/runner 1.6.0 → 1.6.2
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 +52 -4
- package/README.md +16 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/local-ui.d.ts +4 -1
- package/dist/local-ui.d.ts.map +1 -1
- package/dist/runner.mjs +1627 -43
- package/dist/runtime.mjs +1011 -25
- package/dist/shadow.mjs +408 -15
- package/docs/app-owned-executors.md +8 -0
- package/docs/capability-authoring.md +45 -0
- package/docs/current-scope.md +5 -0
- package/docs/cursor-plugin.md +2 -2
- package/docs/limitations.md +15 -2
- package/docs/local-mode.md +22 -3
- package/docs/production.md +19 -0
- package/docs/proposal-evidence-freshness.md +334 -0
- package/docs/release-notes.md +49 -4
- package/docs/runner-config-reference.md +46 -0
- package/docs/security-boundary.md +17 -0
- package/docs/store-lifecycle.md +8 -0
- package/docs/troubleshooting-first-run.md +76 -0
- package/docs/writeback-executors.md +8 -0
- package/fixtures/compatibility/published-1.6.0/manifest.json +76 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/dsl/examples/aggregate-read.synapsor.sql +21 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/dsl/examples/billing-late-fee.synapsor.sql +56 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/dsl/examples/bounded-set-multi-term.synapsor.sql +30 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/dsl/examples/principal-row-scope.synapsor.sql +23 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/aggregate-read/contract.json +119 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/approval-quorum/contract.json +44 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/bounded-set-threats/contract.json +115 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/principal-row-scope/contract.json +78 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/proposal-capability/contract.json +101 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/conformance/reversible-change-sets/contract.json +98 -0
- package/fixtures/compatibility/published-1.6.0/sources/packages/spec/fixtures/valid/basic-read.contract.json +60 -0
- package/fixtures/protocol/MANIFEST.json +37 -7
- package/fixtures/protocol/change-set.freshness-update.v2.json +58 -0
- package/fixtures/protocol/freshness-authority.invoice.v1.json +35 -0
- package/fixtures/protocol/freshness-proof.fresh.v1.json +38 -0
- package/fixtures/protocol/writeback-job.freshness-update.v2.json +50 -0
- package/llms.txt +1 -0
- package/package.json +4 -3
- package/schemas/change-set.v1.schema.json +1 -0
- package/schemas/change-set.v2.schema.json +1 -0
- package/schemas/change-set.v3.schema.json +1 -0
- package/schemas/freshness-authority.v1.schema.json +89 -0
- package/schemas/freshness-proof.v1.schema.json +73 -0
- package/schemas/synapsor.runner.schema.json +32 -0
- package/schemas/writeback-job.v1.schema.json +1 -0
- package/schemas/writeback-job.v2.schema.json +1 -0
- package/schemas/writeback-job.v3.schema.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.6.
|
|
3
|
+
## 1.6.2 (prepared, not published)
|
|
4
|
+
|
|
5
|
+
### Registry-installable packaging hotfix
|
|
6
|
+
|
|
7
|
+
- Keeps Runner linked to the local `@synapsor/spec@1.5.0` workspace during
|
|
8
|
+
development while requiring pnpm to transform that dependency to the public
|
|
9
|
+
`^1.5.0` range in the release tarball.
|
|
10
|
+
- Adds a `prepublishOnly` fail-closed guard that rejects `npm publish` and
|
|
11
|
+
requires `corepack pnpm publish`. It also rejects unexpected `workspace:`,
|
|
12
|
+
`file:`, `link:`, `portal:`, absolute-path, or incorrect Spec dependencies.
|
|
13
|
+
- Changes the packed Runner release gate to inspect pnpm's actual transformed
|
|
14
|
+
tarball manifest and install that tarball by itself from a clean project.
|
|
15
|
+
This reproduces the public `npx` dependency-resolution path instead of
|
|
16
|
+
masking it with a simultaneously packed local Spec.
|
|
17
|
+
- Contains the same proposal/evidence freshness runtime behavior prepared in
|
|
18
|
+
`1.6.1`; this patch changes packaging and version surfaces only.
|
|
19
|
+
- Prepares only `@synapsor/runner@1.6.2`. `@synapsor/spec@1.5.0` and
|
|
20
|
+
`@synapsor/dsl@1.5.0` remain unchanged.
|
|
21
|
+
|
|
22
|
+
## 1.6.1 (published 2026-07-23; install-broken)
|
|
23
|
+
|
|
24
|
+
### Fail-closed proposal and evidence freshness
|
|
25
|
+
|
|
26
|
+
- Adds optional reviewed `proposal_freshness` Runner configuration for live
|
|
27
|
+
target and explicitly declared same-source supporting-row checks immediately
|
|
28
|
+
before every local approval.
|
|
29
|
+
- Binds every successful human, quorum, or policy approval to a distinct
|
|
30
|
+
immutable short-lived proof covering the exact proposal hash/version and
|
|
31
|
+
deterministic dependency-set digest. Stale or unavailable checks record no
|
|
32
|
+
approval; stale proposals are replaced rather than silently refreshed.
|
|
33
|
+
- Extends PostgreSQL/MySQL direct SQL apply to lock supporting rows in
|
|
34
|
+
deterministic order and compare their exact versions inside the existing
|
|
35
|
+
mutation transaction. Post-approval drift returns a clear conflict with zero
|
|
36
|
+
mutation, including bounded-set rollback.
|
|
37
|
+
- Adds no-ID `proposals check-freshness latest` text/JSON inspection, Workbench
|
|
38
|
+
status and approval gating, lifecycle/replay/proof linkage, bounded
|
|
39
|
+
compliance metadata, counters, structured logs, and rollback-only writer
|
|
40
|
+
lock diagnostics.
|
|
41
|
+
- Keeps Cloud source-blind: Cloud may govern proposal/approval authority, while
|
|
42
|
+
the local Runner performs final source revalidation. Strict freshness is
|
|
43
|
+
rejected for app-owned and cross-source effects whose checks cannot be
|
|
44
|
+
transactionally atomic.
|
|
45
|
+
- Preserves existing contract normalization/digests, DSL, tools lists,
|
|
46
|
+
approval paths, receipts, and deployments when the optional overlay is
|
|
47
|
+
absent. `@synapsor/spec` and `@synapsor/dsl` remain at 1.5.0.
|
|
48
|
+
- Published with `@synapsor/spec: "workspace:^"` in the registry manifest,
|
|
49
|
+
causing clean npm/npx installs to fail with `EUNSUPPORTEDPROTOCOL`.
|
|
50
|
+
Superseded by the `1.6.2` packaging hotfix and should remain deprecated.
|
|
51
|
+
|
|
52
|
+
## 1.6.0 (published 2026-07-23)
|
|
4
53
|
|
|
5
54
|
### Connect, Explore, Protect
|
|
6
55
|
|
|
@@ -34,9 +83,8 @@
|
|
|
34
83
|
established CLI selectors and automation, active tools, TypeScript authoring,
|
|
35
84
|
manual/headless operation, guarded writes, Data PRs, app-owned executors, and
|
|
36
85
|
deployments without generation locks through packed compatibility fixtures.
|
|
37
|
-
-
|
|
38
|
-
`@synapsor/spec@1.5.0`.
|
|
39
|
-
this change.
|
|
86
|
+
- Published `@synapsor/runner@1.6.0`, `@synapsor/dsl@1.5.0`, and
|
|
87
|
+
`@synapsor/spec@1.5.0`.
|
|
40
88
|
|
|
41
89
|
## 1.5.4 (published 2026-07-22)
|
|
42
90
|
|
package/README.md
CHANGED
|
@@ -169,9 +169,22 @@ stale proposal conflicts. Inspect the latest lifecycle without copying an ID:
|
|
|
169
169
|
synapsor-runner lifecycle --details --store ./.synapsor/local.db
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
+
For proposals whose review depends on other source rows, Runner 1.6.1 can also
|
|
173
|
+
require a live target/supporting-evidence check immediately before every local
|
|
174
|
+
approval. Apply rechecks those declared same-database dependencies again inside
|
|
175
|
+
the write transaction; stale evidence produces zero mutation and requires a new
|
|
176
|
+
proposal:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
synapsor-runner proposals check-freshness latest \
|
|
180
|
+
--config ./synapsor.runner.json \
|
|
181
|
+
--store ./.synapsor/local.db
|
|
182
|
+
```
|
|
183
|
+
|
|
172
184
|
See the [own-database guide](docs/getting-started-own-database.md),
|
|
173
185
|
[Cursor plugin guide](docs/cursor-plugin.md), and
|
|
174
|
-
[
|
|
186
|
+
[proposal freshness](docs/proposal-evidence-freshness.md) and
|
|
187
|
+
[store lifecycle](docs/store-lifecycle.md) guides for the complete paths.
|
|
175
188
|
|
|
176
189
|
## Safety Model
|
|
177
190
|
|
|
@@ -214,7 +227,8 @@ trust boundaries, covered threats, non-goals, and required operator controls.
|
|
|
214
227
|
scope, kept-out fields, proposals, approval, receipts, and replay. Resource
|
|
215
228
|
handles re-check tenant/principal rather than acting as bearer authority. Live
|
|
216
229
|
gates cover principal denial, no pre-approval mutation, idempotency, conflict,
|
|
217
|
-
bounded sets, and
|
|
230
|
+
bounded sets, compensation, and proposal/evidence freshness on disposable
|
|
231
|
+
databases.
|
|
218
232
|
|
|
219
233
|
Runner is a narrow agent/database safety boundary, not a replacement for
|
|
220
234
|
least-privilege database access, host security, or application authorization.
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAYA,OAAO,
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAYA,OAAO,EAAsc,KAAK,WAAW,EAA2L,MAAM,6BAA6B,CAAC;AAI5rB,OAAO,EAsBL,KAAK,qBAAqB,EAK3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAiL,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAqG,KAAK,YAAY,EAAwB,MAAM,2BAA2B,CAAC;AAEjb,OAAO,EAQL,KAAK,gBAAgB,EAEtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAaL,KAAK,yBAAyB,EAG/B,MAAM,8BAA8B,CAAC;AAgXtC,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAsE1D;AAwID,KAAK,SAAS,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE9E,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE;IACP,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CACvC,GACL,OAAO,CAAC,MAAM,CAAC,CA+YjB;AA81JD,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAc/H;AAojBD,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,YAAY,EACjB,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GACxC,OAAO,CAAC,IAAI,CAAC,CA0Hf;AAsvDD,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,yBAAyB,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAKxH;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,qBAAqB,EAC7B,WAAW,EAAE,yBAAyB,EACtC,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,EAC1C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,kBAAkB,GAAG,kBAAkB,GAAG,kBAAkB,CAgH9D"}
|
package/dist/local-ui.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Server } from "node:http";
|
|
2
|
-
import {
|
|
2
|
+
import { type ProposalFreshnessEvaluation } from "@synapsor-runner/mcp-server";
|
|
3
|
+
import { ProposalStore, type StoredProposal } from "@synapsor-runner/proposal-store";
|
|
3
4
|
type JsonRecord = Record<string, unknown>;
|
|
4
5
|
export type LocalUiOptions = {
|
|
5
6
|
configPath?: string;
|
|
@@ -14,6 +15,7 @@ export type LocalUiOptions = {
|
|
|
14
15
|
projectRoot?: string;
|
|
15
16
|
storeAccess?: LocalUiStoreAccess;
|
|
16
17
|
safeActionPreview?: SafeActionPreview;
|
|
18
|
+
freshnessEvaluator?: ProposalFreshnessEvaluator;
|
|
17
19
|
};
|
|
18
20
|
export type SafeActionPreview = (input: {
|
|
19
21
|
projectRoot: string;
|
|
@@ -26,6 +28,7 @@ export type SafeActionPreview = (input: {
|
|
|
26
28
|
proposal_hash: string;
|
|
27
29
|
source_database_changed: boolean;
|
|
28
30
|
}>;
|
|
31
|
+
export type ProposalFreshnessEvaluator = (proposal: StoredProposal) => Promise<ProposalFreshnessEvaluation>;
|
|
29
32
|
export type LocalUiStoreAccess = <T>(mode: "read" | "write", operation: string, callback: (store: ProposalStore) => T) => Promise<T>;
|
|
30
33
|
export type LocalUiServer = {
|
|
31
34
|
server: Server;
|
package/dist/local-ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-ui.d.ts","sourceRoot":"","sources":["../src/local-ui.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,MAAM,EAAuB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"local-ui.d.ts","sourceRoot":"","sources":["../src/local-ui.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,MAAM,EAAuB,MAAM,WAAW,CAAC;AAIjG,OAAO,EAAmG,KAAK,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAChL,OAAO,EAAE,aAAa,EAA2B,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AA0B9G,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,MAAM,MAAM,cAAc,GAAG;IAC3B,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