@synapsor/runner 0.1.0-alpha.10 → 0.1.0-alpha.13
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/README.md +203 -21
- package/dist/cli.d.ts.map +1 -1
- package/dist/runner.mjs +1103 -115
- package/docs/README.md +38 -0
- package/docs/app-owned-executors.md +26 -0
- package/docs/capability-authoring.md +265 -0
- package/docs/cloud-mode.md +24 -0
- package/docs/current-scope.md +24 -0
- package/docs/dependency-license-inventory.md +35 -0
- package/docs/doctor.md +98 -0
- package/docs/handler-helper.md +200 -0
- package/docs/http-mcp.md +35 -1
- package/docs/licensing.md +36 -0
- package/docs/local-mode.md +13 -2
- package/docs/mcp-client-setup.md +39 -0
- package/docs/openai-agents-sdk.md +57 -0
- package/docs/release-notes.md +76 -2
- package/docs/release-policy.md +86 -0
- package/docs/result-envelope-v2.md +148 -0
- package/docs/rfcs/001-result-envelope-v2.md +143 -0
- package/docs/rfcs/002-app-owned-handler-helper.md +161 -0
- package/docs/rfcs/003-integrator-feedback-teardown.md +97 -0
- package/docs/store-lifecycle.md +83 -0
- package/docs/use-your-own-database.md +18 -0
- package/docs/writeback-executors.md +29 -0
- package/examples/app-owned-writeback/README.md +1 -0
- package/examples/mcp-postgres-billing-app-handler/README.md +86 -0
- package/examples/mcp-postgres-billing-app-handler/app-handler.mjs +125 -0
- package/examples/mcp-postgres-billing-app-handler/docker-compose.yml +13 -0
- package/examples/mcp-postgres-billing-app-handler/schema.sql +59 -0
- package/examples/mcp-postgres-billing-app-handler/scripts/run-demo.sh +100 -0
- package/examples/mcp-postgres-billing-app-handler/seed.sql +39 -0
- package/examples/mcp-postgres-billing-app-handler/synapsor-handler.mjs +437 -0
- package/examples/mcp-postgres-billing-app-handler/synapsor.runner.json +158 -0
- package/examples/openai-agents-http/README.md +10 -2
- package/examples/openai-agents-stdio/README.md +8 -4
- package/examples/openai-agents-stdio/agent.py +2 -0
- package/fixtures/benchmark/mcp-efficiency.json +53 -0
- package/fixtures/benchmark/mcp-efficiency.txt +25 -0
- package/fixtures/protocol/MANIFEST.json +54 -0
- package/fixtures/protocol/change-set.late-fee-waiver.v1.json +72 -0
- package/fixtures/protocol/execution-receipt.applied.v1.json +14 -0
- package/fixtures/protocol/execution-receipt.conflict.v1.json +15 -0
- package/fixtures/protocol/runner-registration.v1.json +22 -0
- package/fixtures/protocol/writeback-job.late-fee-waiver.v1.json +44 -0
- package/package.json +4 -1
- package/schemas/change-set.v1.schema.json +140 -0
- package/schemas/execution-receipt.v1.schema.json +34 -0
- package/schemas/onboarding-selection.v1.schema.json +125 -0
- package/schemas/runner-registration.v1.schema.json +48 -0
- package/schemas/synapsor.app-handler-receipt.v1.json +39 -0
- package/schemas/synapsor.app-handler-request.v1.json +119 -0
- package/schemas/synapsor.runner.schema.json +412 -0
- package/schemas/writeback-job.v1.schema.json +121 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.synapsor.ai/synapsor.writeback-job.v1.schema.json",
|
|
4
|
+
"title": "Synapsor Writeback Job v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"writeback_job_id",
|
|
10
|
+
"proposal_id",
|
|
11
|
+
"proposal_version",
|
|
12
|
+
"proposal_hash",
|
|
13
|
+
"runner_scope",
|
|
14
|
+
"engine",
|
|
15
|
+
"operation",
|
|
16
|
+
"target",
|
|
17
|
+
"tenant_guard",
|
|
18
|
+
"allowed_columns",
|
|
19
|
+
"patch",
|
|
20
|
+
"conflict_guard",
|
|
21
|
+
"idempotency_key",
|
|
22
|
+
"lease"
|
|
23
|
+
],
|
|
24
|
+
"properties": {
|
|
25
|
+
"schema_version": { "const": "synapsor.writeback-job.v1" },
|
|
26
|
+
"writeback_job_id": { "type": "string", "minLength": 1 },
|
|
27
|
+
"proposal_id": { "type": "string", "minLength": 1 },
|
|
28
|
+
"proposal_version": { "type": "integer", "minimum": 1 },
|
|
29
|
+
"proposal_hash": { "type": "string", "pattern": "^sha256:.+" },
|
|
30
|
+
"runner_scope": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["project_id", "source_id"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"project_id": { "type": "string", "minLength": 1 },
|
|
36
|
+
"source_id": { "type": "string", "minLength": 1 }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"engine": { "enum": ["postgres", "mysql"] },
|
|
40
|
+
"operation": { "const": "single_row_update" },
|
|
41
|
+
"target": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": ["schema", "table", "primary_key"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"schema": { "$ref": "#/$defs/safeIdentifier" },
|
|
47
|
+
"table": { "$ref": "#/$defs/safeIdentifier" },
|
|
48
|
+
"primary_key": { "$ref": "#/$defs/columnValue" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"tenant_guard": { "$ref": "#/$defs/columnValue" },
|
|
52
|
+
"allowed_columns": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": { "$ref": "#/$defs/safeIdentifier" },
|
|
55
|
+
"minItems": 1,
|
|
56
|
+
"uniqueItems": true
|
|
57
|
+
},
|
|
58
|
+
"patch": { "$ref": "#/$defs/scalarMap" },
|
|
59
|
+
"conflict_guard": {
|
|
60
|
+
"oneOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["kind", "column", "expected_value"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"kind": { "const": "column" },
|
|
67
|
+
"column": { "$ref": "#/$defs/safeIdentifier" },
|
|
68
|
+
"expected_value": { "$ref": "#/$defs/scalar" }
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": ["kind", "expected_hash"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"kind": { "const": "row_hash" },
|
|
77
|
+
"expected_hash": { "type": "string", "minLength": 1 }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["kind"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"kind": { "const": "none" }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"idempotency_key": { "type": "string", "minLength": 1 },
|
|
91
|
+
"lease": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["lease_id", "attempt", "expires_at"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"lease_id": { "type": "string", "minLength": 1 },
|
|
97
|
+
"attempt": { "type": "integer", "minimum": 1 },
|
|
98
|
+
"expires_at": { "type": "string", "format": "date-time" }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"$defs": {
|
|
103
|
+
"safeIdentifier": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
|
|
104
|
+
"scalar": { "type": ["string", "number", "boolean", "null"] },
|
|
105
|
+
"scalarMap": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"propertyNames": { "$ref": "#/$defs/safeIdentifier" },
|
|
108
|
+
"additionalProperties": { "$ref": "#/$defs/scalar" },
|
|
109
|
+
"minProperties": 1
|
|
110
|
+
},
|
|
111
|
+
"columnValue": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": ["column", "value"],
|
|
115
|
+
"properties": {
|
|
116
|
+
"column": { "$ref": "#/$defs/safeIdentifier" },
|
|
117
|
+
"value": { "$ref": "#/$defs/scalar" }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|