@synapsor/runner 1.6.0 → 1.6.1
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 +32 -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 +1624 -42
- 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 +30 -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/examples/app-owned-writeback/command-handler.mjs +0 -0
- package/examples/mcp-postgres-billing-app-handler/scripts/run-demo.sh +0 -0
- package/examples/reference-support-billing-app/scripts/run-demo.sh +0 -0
- package/examples/support-billing-agent/scripts/run-demo.sh +0 -0
- package/examples/support-billing-agent/scripts/run-evaluation.sh +0 -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 +9 -8
- 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
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_version": "0.1",
|
|
3
|
+
"kind": "SynapsorContract",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "trusted principal row scope",
|
|
6
|
+
"description": "Tenant-additive row authority for two case managers in one hospital."
|
|
7
|
+
},
|
|
8
|
+
"contexts": [
|
|
9
|
+
{
|
|
10
|
+
"name": "care_session",
|
|
11
|
+
"bindings": [
|
|
12
|
+
{
|
|
13
|
+
"name": "hospital_id",
|
|
14
|
+
"source": "http_claim",
|
|
15
|
+
"key": "hospital_id",
|
|
16
|
+
"required": true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "principal",
|
|
20
|
+
"source": "http_claim",
|
|
21
|
+
"key": "sub",
|
|
22
|
+
"required": true
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"tenant_binding": "hospital_id",
|
|
26
|
+
"principal_binding": "principal"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"resources": [],
|
|
30
|
+
"capabilities": [
|
|
31
|
+
{
|
|
32
|
+
"name": "care.inspect_assigned_patient",
|
|
33
|
+
"description": "Inspect one patient assigned to the authenticated case manager within the trusted hospital.",
|
|
34
|
+
"returns_hint": "Returns reviewed patient fields and evidence only when both tenant and assignee locks match.",
|
|
35
|
+
"kind": "read",
|
|
36
|
+
"context": "care_session",
|
|
37
|
+
"source": "local_postgres",
|
|
38
|
+
"subject": {
|
|
39
|
+
"schema": "public",
|
|
40
|
+
"table": "patients",
|
|
41
|
+
"primary_key": "id",
|
|
42
|
+
"tenant_key": "hospital_id",
|
|
43
|
+
"principal_scope_key": "assigned_to",
|
|
44
|
+
"conflict_key": "updated_at"
|
|
45
|
+
},
|
|
46
|
+
"args": {
|
|
47
|
+
"patient_id": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"required": true,
|
|
50
|
+
"description": "Reviewed patient identifier.",
|
|
51
|
+
"max_length": 128
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"lookup": {
|
|
55
|
+
"id_from_arg": "patient_id"
|
|
56
|
+
},
|
|
57
|
+
"visible_fields": [
|
|
58
|
+
"id",
|
|
59
|
+
"hospital_id",
|
|
60
|
+
"display_name",
|
|
61
|
+
"care_status",
|
|
62
|
+
"updated_at"
|
|
63
|
+
],
|
|
64
|
+
"kept_out_fields": [
|
|
65
|
+
"assigned_to",
|
|
66
|
+
"diagnosis_notes",
|
|
67
|
+
"insurance_member_id"
|
|
68
|
+
],
|
|
69
|
+
"evidence": {
|
|
70
|
+
"required": true,
|
|
71
|
+
"query_audit": true
|
|
72
|
+
},
|
|
73
|
+
"max_rows": 1
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"workflows": [],
|
|
77
|
+
"policies": []
|
|
78
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_version": "0.1",
|
|
3
|
+
"kind": "SynapsorContract",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "proposal capability conformance"
|
|
6
|
+
},
|
|
7
|
+
"resources": [
|
|
8
|
+
{
|
|
9
|
+
"name": "billing_invoices",
|
|
10
|
+
"engine": "postgres",
|
|
11
|
+
"schema": "public",
|
|
12
|
+
"table": "invoices",
|
|
13
|
+
"primary_key": "id",
|
|
14
|
+
"tenant_key": "tenant_id",
|
|
15
|
+
"conflict_key": "updated_at"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"contexts": [
|
|
19
|
+
{
|
|
20
|
+
"name": "local_operator",
|
|
21
|
+
"bindings": [
|
|
22
|
+
{
|
|
23
|
+
"name": "tenant_id",
|
|
24
|
+
"source": "environment",
|
|
25
|
+
"key": "SYNAPSOR_TENANT_ID"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "principal",
|
|
29
|
+
"source": "environment",
|
|
30
|
+
"key": "SYNAPSOR_PRINCIPAL"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"tenant_binding": "tenant_id",
|
|
34
|
+
"principal_binding": "principal"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"capabilities": [
|
|
38
|
+
{
|
|
39
|
+
"name": "billing.propose_late_fee_waiver",
|
|
40
|
+
"kind": "proposal",
|
|
41
|
+
"context": "local_operator",
|
|
42
|
+
"source": "local_postgres",
|
|
43
|
+
"subject": {
|
|
44
|
+
"resource": "billing_invoices"
|
|
45
|
+
},
|
|
46
|
+
"args": {
|
|
47
|
+
"invoice_id": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"required": true
|
|
50
|
+
},
|
|
51
|
+
"waiver_reason": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"required": true
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"lookup": {
|
|
57
|
+
"id_from_arg": "invoice_id"
|
|
58
|
+
},
|
|
59
|
+
"visible_fields": [
|
|
60
|
+
"id",
|
|
61
|
+
"tenant_id",
|
|
62
|
+
"late_fee_cents",
|
|
63
|
+
"waiver_reason",
|
|
64
|
+
"updated_at"
|
|
65
|
+
],
|
|
66
|
+
"kept_out_fields": [
|
|
67
|
+
"card_token"
|
|
68
|
+
],
|
|
69
|
+
"evidence": {
|
|
70
|
+
"required": true,
|
|
71
|
+
"query_audit": true
|
|
72
|
+
},
|
|
73
|
+
"max_rows": 1,
|
|
74
|
+
"proposal": {
|
|
75
|
+
"action": "billing.waive_late_fee",
|
|
76
|
+
"allowed_fields": [
|
|
77
|
+
"late_fee_cents",
|
|
78
|
+
"waiver_reason"
|
|
79
|
+
],
|
|
80
|
+
"patch": {
|
|
81
|
+
"late_fee_cents": {
|
|
82
|
+
"fixed": 0
|
|
83
|
+
},
|
|
84
|
+
"waiver_reason": {
|
|
85
|
+
"from_arg": "waiver_reason"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"conflict_guard": {
|
|
89
|
+
"column": "updated_at"
|
|
90
|
+
},
|
|
91
|
+
"approval": {
|
|
92
|
+
"mode": "human",
|
|
93
|
+
"required_role": "billing_lead"
|
|
94
|
+
},
|
|
95
|
+
"writeback": {
|
|
96
|
+
"mode": "direct_sql"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_version": "0.1",
|
|
3
|
+
"kind": "SynapsorContract",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "reviewed-reversible-change-sets",
|
|
6
|
+
"version": "1.4.0"
|
|
7
|
+
},
|
|
8
|
+
"contexts": [
|
|
9
|
+
{
|
|
10
|
+
"name": "trusted_operator",
|
|
11
|
+
"bindings": [
|
|
12
|
+
{ "name": "tenant_id", "source": "environment", "key": "SYNAPSOR_TENANT_ID", "required": true },
|
|
13
|
+
{ "name": "principal", "source": "environment", "key": "SYNAPSOR_PRINCIPAL", "required": true }
|
|
14
|
+
],
|
|
15
|
+
"tenant_binding": "tenant_id",
|
|
16
|
+
"principal_binding": "principal"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"capabilities": [
|
|
20
|
+
{
|
|
21
|
+
"name": "billing.adjust_credit",
|
|
22
|
+
"kind": "proposal",
|
|
23
|
+
"context": "trusted_operator",
|
|
24
|
+
"source": "local_postgres",
|
|
25
|
+
"subject": {
|
|
26
|
+
"schema": "public",
|
|
27
|
+
"table": "account_credits",
|
|
28
|
+
"primary_key": "id",
|
|
29
|
+
"tenant_key": "tenant_id",
|
|
30
|
+
"conflict_key": "version"
|
|
31
|
+
},
|
|
32
|
+
"args": {
|
|
33
|
+
"credit_id": { "type": "string", "required": true, "max_length": 128 },
|
|
34
|
+
"amount_cents": { "type": "number", "required": true, "minimum": 0, "maximum": 2500 }
|
|
35
|
+
},
|
|
36
|
+
"lookup": { "id_from_arg": "credit_id" },
|
|
37
|
+
"visible_fields": ["id", "tenant_id", "amount_cents", "version"],
|
|
38
|
+
"kept_out_fields": ["internal_note"],
|
|
39
|
+
"evidence": { "required": true, "query_audit": true },
|
|
40
|
+
"proposal": {
|
|
41
|
+
"action": "adjust_credit",
|
|
42
|
+
"operation": {
|
|
43
|
+
"kind": "update",
|
|
44
|
+
"cardinality": "single",
|
|
45
|
+
"version_advance": { "column": "version", "strategy": "integer_increment" }
|
|
46
|
+
},
|
|
47
|
+
"allowed_fields": ["amount_cents"],
|
|
48
|
+
"patch": { "amount_cents": { "from_arg": "amount_cents" } },
|
|
49
|
+
"numeric_bounds": { "amount_cents": { "minimum": 0, "maximum": 2500 } },
|
|
50
|
+
"reversibility": { "mode": "reviewed_inverse" },
|
|
51
|
+
"conflict_guard": { "column": "version" },
|
|
52
|
+
"approval": { "mode": "human", "required_role": "billing_reviewer", "required_approvals": 2 },
|
|
53
|
+
"writeback": { "mode": "direct_sql" }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "billing.create_credit",
|
|
58
|
+
"kind": "proposal",
|
|
59
|
+
"context": "trusted_operator",
|
|
60
|
+
"source": "local_postgres",
|
|
61
|
+
"subject": {
|
|
62
|
+
"schema": "public",
|
|
63
|
+
"table": "account_credits",
|
|
64
|
+
"primary_key": "id",
|
|
65
|
+
"tenant_key": "tenant_id"
|
|
66
|
+
},
|
|
67
|
+
"args": {
|
|
68
|
+
"amount_cents": { "type": "number", "required": true, "minimum": 1, "maximum": 2500 },
|
|
69
|
+
"reason": { "type": "string", "required": true, "max_length": 500 }
|
|
70
|
+
},
|
|
71
|
+
"visible_fields": ["id", "tenant_id", "amount_cents", "reason"],
|
|
72
|
+
"kept_out_fields": ["internal_note"],
|
|
73
|
+
"evidence": { "required": true, "query_audit": true },
|
|
74
|
+
"proposal": {
|
|
75
|
+
"action": "create_credit",
|
|
76
|
+
"operation": {
|
|
77
|
+
"kind": "insert",
|
|
78
|
+
"cardinality": "single",
|
|
79
|
+
"deduplication": {
|
|
80
|
+
"components": [
|
|
81
|
+
{ "column": "tenant_id", "source": "trusted_tenant" },
|
|
82
|
+
{ "column": "id", "source": "proposal_id" }
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"allowed_fields": ["amount_cents", "reason"],
|
|
87
|
+
"patch": {
|
|
88
|
+
"amount_cents": { "from_arg": "amount_cents" },
|
|
89
|
+
"reason": { "from_arg": "reason" }
|
|
90
|
+
},
|
|
91
|
+
"numeric_bounds": { "amount_cents": { "minimum": 1, "maximum": 2500 } },
|
|
92
|
+
"reversibility": { "mode": "reviewed_inverse" },
|
|
93
|
+
"approval": { "mode": "human", "required_role": "billing_reviewer" },
|
|
94
|
+
"writeback": { "mode": "direct_sql" }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_version": "0.1",
|
|
3
|
+
"kind": "SynapsorContract",
|
|
4
|
+
"contexts": [
|
|
5
|
+
{
|
|
6
|
+
"name": "local_operator",
|
|
7
|
+
"bindings": [
|
|
8
|
+
{
|
|
9
|
+
"name": "tenant_id",
|
|
10
|
+
"source": "environment",
|
|
11
|
+
"key": "SYNAPSOR_TENANT_ID"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "principal",
|
|
15
|
+
"source": "environment",
|
|
16
|
+
"key": "SYNAPSOR_PRINCIPAL"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"tenant_binding": "tenant_id",
|
|
20
|
+
"principal_binding": "principal"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"capabilities": [
|
|
24
|
+
{
|
|
25
|
+
"name": "billing.inspect_invoice",
|
|
26
|
+
"kind": "read",
|
|
27
|
+
"context": "local_operator",
|
|
28
|
+
"subject": {
|
|
29
|
+
"schema": "public",
|
|
30
|
+
"table": "invoices",
|
|
31
|
+
"primary_key": "id",
|
|
32
|
+
"tenant_key": "tenant_id",
|
|
33
|
+
"conflict_key": "updated_at"
|
|
34
|
+
},
|
|
35
|
+
"args": {
|
|
36
|
+
"invoice_id": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"required": true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"lookup": {
|
|
42
|
+
"id_from_arg": "invoice_id"
|
|
43
|
+
},
|
|
44
|
+
"visible_fields": [
|
|
45
|
+
"id",
|
|
46
|
+
"tenant_id",
|
|
47
|
+
"late_fee_cents",
|
|
48
|
+
"updated_at"
|
|
49
|
+
],
|
|
50
|
+
"kept_out_fields": [
|
|
51
|
+
"card_token"
|
|
52
|
+
],
|
|
53
|
+
"evidence": {
|
|
54
|
+
"required": true,
|
|
55
|
+
"query_audit": true
|
|
56
|
+
},
|
|
57
|
+
"max_rows": 1
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "synapsor.protocol-manifest.v1",
|
|
3
3
|
"protocol_set": "database-mcp-writeback",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"hash_algorithm": "sha256",
|
|
6
6
|
"note": "This manifest is copied in Synapsor main protocol/MANIFEST.json and synapsor-runner fixtures/protocol/MANIFEST.json. Hashes are over the checked-in JSON artifact bytes.",
|
|
7
7
|
"artifacts": [
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
"name": "change-set.bounded-update.v3.json",
|
|
11
11
|
"sha256": "9d60a96cd5f14b9cf36f635214398437676bd90fbb180b3befe1596f982a2f02"
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
"kind": "fixture",
|
|
15
|
+
"name": "change-set.freshness-update.v2.json",
|
|
16
|
+
"sha256": "cf541387dcc13ccf5e82c38da80e7f5a8ae9d95b6bcd29b7c63542abbccef401"
|
|
17
|
+
},
|
|
13
18
|
{
|
|
14
19
|
"kind": "fixture",
|
|
15
20
|
"name": "change-set.delete.v2.json",
|
|
@@ -75,6 +80,16 @@
|
|
|
75
80
|
"name": "execution-receipt.update-applied.v2.json",
|
|
76
81
|
"sha256": "31be662ec370db24528f71c60423a9d4a6da8a7bc2922b4d222d92d650568743"
|
|
77
82
|
},
|
|
83
|
+
{
|
|
84
|
+
"kind": "fixture",
|
|
85
|
+
"name": "freshness-authority.invoice.v1.json",
|
|
86
|
+
"sha256": "f8abfff7ea058b81aa9ef4e3281fabe1105ed8ed91ad5dde3c3b08d694fe1a39"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"kind": "fixture",
|
|
90
|
+
"name": "freshness-proof.fresh.v1.json",
|
|
91
|
+
"sha256": "895083bdcc226f16f86131a90263104b22be60a60e855e9c106dbc15f636b3b3"
|
|
92
|
+
},
|
|
78
93
|
{
|
|
79
94
|
"kind": "fixture",
|
|
80
95
|
"name": "runner-registration.v1.json",
|
|
@@ -95,6 +110,11 @@
|
|
|
95
110
|
"name": "writeback-job.delete.v2.json",
|
|
96
111
|
"sha256": "4169885a125528a09e06b55184969edd96e2a179711c664d4a61622f0d0b3b19"
|
|
97
112
|
},
|
|
113
|
+
{
|
|
114
|
+
"kind": "fixture",
|
|
115
|
+
"name": "writeback-job.freshness-update.v2.json",
|
|
116
|
+
"sha256": "e703ee6a4c333c4fdbf2d7e6d264a9b537e114038e258ed7f87349f3add6a718"
|
|
117
|
+
},
|
|
98
118
|
{
|
|
99
119
|
"kind": "fixture",
|
|
100
120
|
"name": "writeback-job.insert.v2.json",
|
|
@@ -113,17 +133,17 @@
|
|
|
113
133
|
{
|
|
114
134
|
"kind": "schema",
|
|
115
135
|
"name": "change-set.v1.schema.json",
|
|
116
|
-
"sha256": "
|
|
136
|
+
"sha256": "686a3696dc92ad7562035cdef972bbc9bc6dcb2e36368ada72d133d92a31436c"
|
|
117
137
|
},
|
|
118
138
|
{
|
|
119
139
|
"kind": "schema",
|
|
120
140
|
"name": "change-set.v2.schema.json",
|
|
121
|
-
"sha256": "
|
|
141
|
+
"sha256": "b7ea55cf2aa0b7914ca7383d4590a1a4e0235e6551f2285aac64153b3f196405"
|
|
122
142
|
},
|
|
123
143
|
{
|
|
124
144
|
"kind": "schema",
|
|
125
145
|
"name": "change-set.v3.schema.json",
|
|
126
|
-
"sha256": "
|
|
146
|
+
"sha256": "a02cf865bb45271b3552c8fb4f1180522eb4fed3462429612d218a9468410c0f"
|
|
127
147
|
},
|
|
128
148
|
{
|
|
129
149
|
"kind": "schema",
|
|
@@ -150,6 +170,16 @@
|
|
|
150
170
|
"name": "execution-receipt.v4.schema.json",
|
|
151
171
|
"sha256": "1f75e88da8340a71fba5c8dd16f19bc38a89615134b36d235c74122e2adea499"
|
|
152
172
|
},
|
|
173
|
+
{
|
|
174
|
+
"kind": "schema",
|
|
175
|
+
"name": "freshness-authority.v1.schema.json",
|
|
176
|
+
"sha256": "6069026c5f56e3516d2b4043597c3efad20b41655bd4d8dea26bd7ae19d16d84"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "schema",
|
|
180
|
+
"name": "freshness-proof.v1.schema.json",
|
|
181
|
+
"sha256": "b4a26ab98e348928862520adf49418c8e16ad16e1c07af406cbe90a8ac5800ad"
|
|
182
|
+
},
|
|
153
183
|
{
|
|
154
184
|
"kind": "schema",
|
|
155
185
|
"name": "inverse-descriptor.v1.schema.json",
|
|
@@ -163,17 +193,17 @@
|
|
|
163
193
|
{
|
|
164
194
|
"kind": "schema",
|
|
165
195
|
"name": "writeback-job.v1.schema.json",
|
|
166
|
-
"sha256": "
|
|
196
|
+
"sha256": "5d5e4c1d86e5419d72a321872c9387e85b3c8cc7e26ab6157998c11fca7dde11"
|
|
167
197
|
},
|
|
168
198
|
{
|
|
169
199
|
"kind": "schema",
|
|
170
200
|
"name": "writeback-job.v2.schema.json",
|
|
171
|
-
"sha256": "
|
|
201
|
+
"sha256": "a6fd68f273b97c8d9f3911ffcb3ffb5d46c4a82b420e183c918d6688e4018117"
|
|
172
202
|
},
|
|
173
203
|
{
|
|
174
204
|
"kind": "schema",
|
|
175
205
|
"name": "writeback-job.v3.schema.json",
|
|
176
|
-
"sha256": "
|
|
206
|
+
"sha256": "7b8fa3e3fcd8b918f81cde25eec82f4c7e813a7221cf6fee0e9c69033ed80629"
|
|
177
207
|
},
|
|
178
208
|
{
|
|
179
209
|
"kind": "schema",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "synapsor.change-set.v2",
|
|
3
|
+
"proposal_id": "wrp_update_2001",
|
|
4
|
+
"proposal_version": 1,
|
|
5
|
+
"action": "billing.propose_plan_credit_update",
|
|
6
|
+
"operation": "single_row_update",
|
|
7
|
+
"mode": "review_required",
|
|
8
|
+
"principal": { "id": "operator_demo", "source": "trusted_session" },
|
|
9
|
+
"scope": { "tenant_id": "tenant_demo", "business_object": "account_credit", "object_id": "credit_2001" },
|
|
10
|
+
"source": {
|
|
11
|
+
"kind": "external_postgres",
|
|
12
|
+
"source_id": "src_billing_demo",
|
|
13
|
+
"schema": "public",
|
|
14
|
+
"table": "account_credits",
|
|
15
|
+
"primary_key": { "column": "id", "value": "credit_2001" }
|
|
16
|
+
},
|
|
17
|
+
"before": { "id": "credit_2001", "tenant_id": "tenant_demo", "amount_cents": 1000, "version": 7 },
|
|
18
|
+
"patch": { "amount_cents": 2500 },
|
|
19
|
+
"after": { "id": "credit_2001", "tenant_id": "tenant_demo", "amount_cents": 2500, "version": 8 },
|
|
20
|
+
"guards": {
|
|
21
|
+
"tenant": { "column": "tenant_id", "value": "tenant_demo" },
|
|
22
|
+
"allowed_columns": ["amount_cents"],
|
|
23
|
+
"expected_version": { "column": "version", "value": 7 },
|
|
24
|
+
"version_advance": { "column": "version", "strategy": "integer_increment" }
|
|
25
|
+
},
|
|
26
|
+
"freshness": {
|
|
27
|
+
"schema_version": "synapsor.freshness-authority.v1",
|
|
28
|
+
"required": true,
|
|
29
|
+
"target": { "mode": "exact_guard", "member_count": 1 },
|
|
30
|
+
"dependencies": [
|
|
31
|
+
{
|
|
32
|
+
"id": "invoice_eligibility",
|
|
33
|
+
"capability": "billing.inspect_invoice",
|
|
34
|
+
"source_id": "src_billing_demo",
|
|
35
|
+
"engine": "postgres",
|
|
36
|
+
"target": {
|
|
37
|
+
"schema": "public",
|
|
38
|
+
"table": "invoices",
|
|
39
|
+
"primary_key": { "column": "invoice_id", "value": "INV-3001" },
|
|
40
|
+
"tenant_column": "tenant_id"
|
|
41
|
+
},
|
|
42
|
+
"expected_version": { "column": "version", "value": 7 },
|
|
43
|
+
"evidence": {
|
|
44
|
+
"bundle_id": "ev_invoice_3001",
|
|
45
|
+
"query_fingerprint": "sha256:invoice-evidence"
|
|
46
|
+
},
|
|
47
|
+
"descriptor_digest": "sha256:c7f183d5697eff084d30ead6602383f6a0033c13080a859d2eb514d71ec4e9bf"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"dependency_set_digest": "sha256:720d1300cc30f5732c864f41ef79767268095483b0bac93d871b19299886141b"
|
|
51
|
+
},
|
|
52
|
+
"evidence": { "bundle_id": "ev_update_2001", "query_fingerprint": "sha256:update-evidence", "items": [] },
|
|
53
|
+
"approval": { "status": "pending", "required_role": "billing_reviewer" },
|
|
54
|
+
"writeback": { "status": "not_applied", "mode": "trusted_worker_required" },
|
|
55
|
+
"source_database_mutated": false,
|
|
56
|
+
"integrity": { "proposal_hash": "sha256:update-proposal" },
|
|
57
|
+
"created_at": "2026-07-23T17:59:00Z"
|
|
58
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "synapsor.freshness-authority.v1",
|
|
3
|
+
"required": true,
|
|
4
|
+
"target": {
|
|
5
|
+
"mode": "exact_guard",
|
|
6
|
+
"member_count": 1
|
|
7
|
+
},
|
|
8
|
+
"dependencies": [
|
|
9
|
+
{
|
|
10
|
+
"id": "invoice_eligibility",
|
|
11
|
+
"capability": "billing.inspect_invoice",
|
|
12
|
+
"source_id": "src_billing_demo",
|
|
13
|
+
"engine": "postgres",
|
|
14
|
+
"target": {
|
|
15
|
+
"schema": "public",
|
|
16
|
+
"table": "invoices",
|
|
17
|
+
"primary_key": {
|
|
18
|
+
"column": "invoice_id",
|
|
19
|
+
"value": "INV-3001"
|
|
20
|
+
},
|
|
21
|
+
"tenant_column": "tenant_id"
|
|
22
|
+
},
|
|
23
|
+
"expected_version": {
|
|
24
|
+
"column": "version",
|
|
25
|
+
"value": 7
|
|
26
|
+
},
|
|
27
|
+
"evidence": {
|
|
28
|
+
"bundle_id": "ev_invoice_3001",
|
|
29
|
+
"query_fingerprint": "sha256:invoice-evidence"
|
|
30
|
+
},
|
|
31
|
+
"descriptor_digest": "sha256:c7f183d5697eff084d30ead6602383f6a0033c13080a859d2eb514d71ec4e9bf"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"dependency_set_digest": "sha256:720d1300cc30f5732c864f41ef79767268095483b0bac93d871b19299886141b"
|
|
35
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "synapsor.freshness-proof.v1",
|
|
3
|
+
"proposal_id": "wrp_update_2001",
|
|
4
|
+
"proposal_hash": "sha256:update-proposal",
|
|
5
|
+
"proposal_version": 1,
|
|
6
|
+
"dependency_set_digest": "sha256:720d1300cc30f5732c864f41ef79767268095483b0bac93d871b19299886141b",
|
|
7
|
+
"checked_at": "2026-07-23T18:00:00.000Z",
|
|
8
|
+
"valid_until": "2026-07-23T18:00:30.000Z",
|
|
9
|
+
"source_adapters": [
|
|
10
|
+
{
|
|
11
|
+
"source_id": "src_billing_demo",
|
|
12
|
+
"engine": "postgres"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"result": "fresh",
|
|
16
|
+
"safe_code": "FRESHNESS_FRESH",
|
|
17
|
+
"target_count": 1,
|
|
18
|
+
"supporting_count": 1,
|
|
19
|
+
"checks": [
|
|
20
|
+
{
|
|
21
|
+
"id": "target",
|
|
22
|
+
"kind": "target",
|
|
23
|
+
"status": "fresh",
|
|
24
|
+
"safe_code": "FRESHNESS_TARGET_FRESH",
|
|
25
|
+
"expected_version_digest": "sha256:cf6cbc0a5d9b4fe7d9d3fd832e5e1b05b73fa6eefdc496fd95d7268ab1d9268c",
|
|
26
|
+
"observed_version_digest": "sha256:cf6cbc0a5d9b4fe7d9d3fd832e5e1b05b73fa6eefdc496fd95d7268ab1d9268c"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "invoice_eligibility",
|
|
30
|
+
"kind": "supporting",
|
|
31
|
+
"status": "fresh",
|
|
32
|
+
"safe_code": "FRESHNESS_DEPENDENCY_FRESH",
|
|
33
|
+
"expected_version_digest": "sha256:cf6cbc0a5d9b4fe7d9d3fd832e5e1b05b73fa6eefdc496fd95d7268ab1d9268c",
|
|
34
|
+
"observed_version_digest": "sha256:cf6cbc0a5d9b4fe7d9d3fd832e5e1b05b73fa6eefdc496fd95d7268ab1d9268c"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"proof_digest": "sha256:0030e42a6f494acdfd65fb4042c917444f2c6df621fcae5021b3d7d15fdc1877"
|
|
38
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "synapsor.writeback-job.v2",
|
|
3
|
+
"writeback_job_id": "wbj_update_2001",
|
|
4
|
+
"proposal_id": "wrp_update_2001",
|
|
5
|
+
"proposal_version": 1,
|
|
6
|
+
"proposal_hash": "sha256:update-proposal",
|
|
7
|
+
"runner_scope": { "project_id": "project_demo", "source_id": "src_billing_demo" },
|
|
8
|
+
"engine": "postgres",
|
|
9
|
+
"target": {
|
|
10
|
+
"schema": "public",
|
|
11
|
+
"table": "account_credits",
|
|
12
|
+
"primary_key": { "column": "id", "value": "credit_2001" }
|
|
13
|
+
},
|
|
14
|
+
"tenant_guard": { "column": "tenant_id", "value": "tenant_demo" },
|
|
15
|
+
"allowed_columns": ["amount_cents"],
|
|
16
|
+
"mutation": {
|
|
17
|
+
"kind": "single_row_update",
|
|
18
|
+
"values": { "amount_cents": 2500 },
|
|
19
|
+
"conflict_guard": { "kind": "column", "column": "version", "expected_value": 7 },
|
|
20
|
+
"version_advance": { "column": "version", "strategy": "integer_increment" }
|
|
21
|
+
},
|
|
22
|
+
"freshness": {
|
|
23
|
+
"schema_version": "synapsor.freshness-authority.v1",
|
|
24
|
+
"required": true,
|
|
25
|
+
"target": { "mode": "exact_guard", "member_count": 1 },
|
|
26
|
+
"dependencies": [
|
|
27
|
+
{
|
|
28
|
+
"id": "invoice_eligibility",
|
|
29
|
+
"capability": "billing.inspect_invoice",
|
|
30
|
+
"source_id": "src_billing_demo",
|
|
31
|
+
"engine": "postgres",
|
|
32
|
+
"target": {
|
|
33
|
+
"schema": "public",
|
|
34
|
+
"table": "invoices",
|
|
35
|
+
"primary_key": { "column": "invoice_id", "value": "INV-3001" },
|
|
36
|
+
"tenant_column": "tenant_id"
|
|
37
|
+
},
|
|
38
|
+
"expected_version": { "column": "version", "value": 7 },
|
|
39
|
+
"evidence": {
|
|
40
|
+
"bundle_id": "ev_invoice_3001",
|
|
41
|
+
"query_fingerprint": "sha256:invoice-evidence"
|
|
42
|
+
},
|
|
43
|
+
"descriptor_digest": "sha256:c7f183d5697eff084d30ead6602383f6a0033c13080a859d2eb514d71ec4e9bf"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"dependency_set_digest": "sha256:720d1300cc30f5732c864f41ef79767268095483b0bac93d871b19299886141b"
|
|
47
|
+
},
|
|
48
|
+
"idempotency_key": "idem_update_2001",
|
|
49
|
+
"lease": { "lease_id": "lease_update_2001", "attempt": 1, "expires_at": "2026-07-23T19:00:00Z" }
|
|
50
|
+
}
|
package/llms.txt
CHANGED
|
@@ -10,6 +10,7 @@ Start here:
|
|
|
10
10
|
- Auto Boundary, Scoped Explore, and Protect: https://github.com/Synapsor/Synapsor-Runner/blob/main/docs/auto-boundary-and-scoped-explore.md
|
|
11
11
|
- Connect a staging database: https://github.com/Synapsor/Synapsor-Runner/blob/main/docs/getting-started-own-database.md
|
|
12
12
|
- Security boundary: https://github.com/Synapsor/Synapsor-Runner/blob/main/docs/security-boundary.md
|
|
13
|
+
- Proposal and evidence freshness: https://github.com/Synapsor/Synapsor-Runner/blob/main/docs/proposal-evidence-freshness.md
|
|
13
14
|
- Current scope: https://github.com/Synapsor/Synapsor-Runner/blob/main/docs/current-scope.md
|
|
14
15
|
- Current limitations: https://github.com/Synapsor/Synapsor-Runner/blob/main/docs/limitations.md
|
|
15
16
|
- DSL reference: https://github.com/Synapsor/Synapsor-Runner/blob/main/docs/dsl-reference.md
|