@synapsor/runner 1.6.2 → 1.6.4
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/AGENTS.md +2 -2
- package/CHANGELOG.md +141 -2
- package/CONTRIBUTING.md +10 -3
- package/README.md +65 -83
- package/SECURITY.md +14 -2
- package/THREAT_MODEL.md +64 -4
- package/dist/authoring.mjs +151 -16
- package/dist/cli.d.ts +31 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/local-ui.d.ts +145 -1
- package/dist/local-ui.d.ts.map +1 -1
- package/dist/runner.mjs +37488 -19009
- package/dist/runtime.mjs +4056 -235
- package/dist/shadow.mjs +2423 -65
- package/docs/README.md +36 -2
- package/docs/agent-guided-setup.md +239 -0
- package/docs/aggregate-reads.md +14 -5
- package/docs/app-owned-executors.md +5 -6
- package/docs/approval-roles-and-operator-identity.md +353 -0
- package/docs/auto-boundary-and-scoped-explore.md +89 -11
- package/docs/capability-authoring.md +21 -2
- package/docs/client-recipes.md +1 -1
- package/docs/cloud-mode.md +7 -7
- package/docs/conformance.md +6 -3
- package/docs/current-scope.md +32 -2
- package/docs/cursor-plugin.md +3 -3
- package/docs/database-enforced-scope.md +6 -0
- package/docs/dsl-json-parity.md +75 -0
- package/docs/dsl-reference.md +22 -1
- package/docs/fresh-developer-usability.md +155 -80
- package/docs/getting-started-own-database.md +45 -44
- package/docs/guarded-crud-writeback.md +19 -0
- package/docs/guided-onboarding.md +399 -0
- package/docs/human-attention-notifications.md +367 -0
- package/docs/limitations.md +49 -13
- package/docs/local-mode.md +36 -22
- package/docs/mcp-audit.md +14 -14
- package/docs/mcp-client-setup.md +11 -14
- package/docs/mcp-clients.md +1 -1
- package/docs/migrating-to-synapsor-spec.md +42 -0
- package/docs/openai-agents-sdk.md +2 -2
- package/docs/production.md +39 -0
- package/docs/proposal-evidence-freshness.md +7 -7
- package/docs/recipes.md +6 -6
- package/docs/release-notes.md +144 -4
- package/docs/release-policy.md +20 -7
- package/docs/reversible-change-sets.md +1 -1
- package/docs/reviewed-database-views.md +132 -0
- package/docs/reviewed-relationships.md +245 -0
- package/docs/rfcs/006-reviewed-reversible-change-sets.md +1 -1
- package/docs/runner-bundles.md +7 -7
- package/docs/runner-config-reference.md +132 -0
- package/docs/running-a-runner-fleet.md +16 -1
- package/docs/schema-api-candidates.md +1 -1
- package/docs/security-boundary.md +54 -0
- package/docs/store-lifecycle.md +20 -1
- package/docs/supervised-automatic-apply.md +267 -0
- package/docs/troubleshooting-first-run.md +85 -10
- package/docs/use-your-own-database.md +6 -4
- package/docs/workbench-ask.md +279 -0
- package/docs/writeback-executors.md +7 -7
- package/examples/auto-boundary-churn/README.md +1 -1
- package/examples/community-solar-clean-room/README.md +7 -0
- package/examples/community-solar-clean-room/docker-compose.yml +16 -0
- package/examples/community-solar-clean-room/package.json +15 -0
- package/examples/community-solar-clean-room/prisma/schema.prisma +171 -0
- package/examples/community-solar-clean-room/seed/postgres.sql +571 -0
- package/examples/fitflow-guided-onboarding/README.md +43 -0
- package/examples/fitflow-guided-onboarding/app/page.tsx +8 -0
- package/examples/fitflow-guided-onboarding/docker-compose.yml +16 -0
- package/examples/fitflow-guided-onboarding/package.json +18 -0
- package/examples/fitflow-guided-onboarding/prisma/schema.prisma +98 -0
- package/examples/fitflow-guided-onboarding/seed/postgres.sql +401 -0
- package/examples/openai-agents-http/Makefile +1 -1
- package/examples/openai-agents-http/README.md +1 -1
- package/examples/openai-agents-stdio/Makefile +1 -1
- package/examples/openai-agents-stdio/README.md +2 -2
- package/examples/openai-agents-stdio/agent.py +1 -4
- package/examples/operator-oidc/issuer.mjs +188 -0
- package/examples/reference-support-billing-app/README.md +16 -16
- package/examples/retail-clean-room/README.md +7 -0
- package/examples/retail-clean-room/docker-compose.yml +16 -0
- package/examples/retail-clean-room/package.json +9 -0
- package/examples/retail-clean-room/prisma/schema.prisma +239 -0
- package/examples/retail-clean-room/seed/postgres.sql +781 -0
- package/examples/retail-clean-room/view-recipe/average-retained-revenue.synapsor.sql +21 -0
- package/examples/retail-clean-room/view-recipe/synapsor.runner.json +25 -0
- package/examples/support-plan-credit/README.md +6 -2
- package/examples/support-plan-credit/mcp-client-examples/claude-code.sh +1 -4
- package/examples/support-plan-credit/mcp-client-examples/claude-desktop.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/codex.config.toml +1 -4
- package/examples/support-plan-credit/mcp-client-examples/cursor-global.mcp.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/cursor-project.mcp.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/generic-stdio.json +1 -4
- package/examples/support-plan-credit/mcp-client-examples/generic-stdio.mjs +1 -1
- package/examples/support-plan-credit/mcp-client-examples/google-adk.py +1 -1
- package/examples/support-plan-credit/mcp-client-examples/langchain.mjs +1 -1
- package/examples/support-plan-credit/mcp-client-examples/llamaindex.py +1 -1
- package/examples/support-plan-credit/mcp-client-examples/openai-agents-stdio.ts +1 -1
- package/examples/support-plan-credit/mcp-client-examples/vscode.mcp.json +1 -4
- package/fixtures/compatibility/published-1.6.3/manifest.json +76 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/aggregate-read.synapsor.sql +21 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/billing-late-fee.synapsor.sql +56 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/bounded-set-multi-term.synapsor.sql +30 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/dsl/examples/principal-row-scope.synapsor.sql +23 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/aggregate-read/contract.json +119 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/approval-quorum/contract.json +44 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/bounded-set-threats/contract.json +115 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/principal-row-scope/contract.json +78 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/proposal-capability/contract.json +101 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/conformance/reversible-change-sets/contract.json +98 -0
- package/fixtures/compatibility/published-1.6.3/sources/packages/spec/fixtures/valid/basic-read.contract.json +60 -0
- package/llms.txt +10 -5
- package/package.json +11 -3
- package/schemas/schema-candidate-review.schema.json +42 -0
- package/schemas/synapsor.runner.schema.json +227 -4
|
@@ -18,11 +18,22 @@
|
|
|
18
18
|
"else": {
|
|
19
19
|
"if": { "properties": { "mode": { "not": { "const": "cloud" } } }, "required": ["mode"] },
|
|
20
20
|
"then": {
|
|
21
|
-
"required": ["capabilities"],
|
|
22
|
-
"properties": { "capabilities": { "minItems": 1 } },
|
|
23
21
|
"anyOf": [
|
|
24
|
-
{
|
|
25
|
-
|
|
22
|
+
{
|
|
23
|
+
"required": ["capabilities"],
|
|
24
|
+
"properties": { "capabilities": { "minItems": 1 } },
|
|
25
|
+
"anyOf": [
|
|
26
|
+
{ "required": ["trusted_context"] },
|
|
27
|
+
{ "required": ["contexts"] }
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"required": ["capabilities"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"mode": { "const": "read_only" },
|
|
34
|
+
"capabilities": { "maxItems": 0 }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
26
37
|
]
|
|
27
38
|
}
|
|
28
39
|
}
|
|
@@ -149,6 +160,25 @@
|
|
|
149
160
|
}
|
|
150
161
|
}
|
|
151
162
|
},
|
|
163
|
+
"supervised_worker": {
|
|
164
|
+
"description": "Optional deployment-side half of digest-bound trusted-worker execution. Disabled by default and independent from policy approval.",
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": ["enabled", "profile", "capabilities"],
|
|
168
|
+
"properties": {
|
|
169
|
+
"enabled": { "type": "boolean" },
|
|
170
|
+
"profile": { "enum": ["development", "staging", "production"] },
|
|
171
|
+
"capabilities": {
|
|
172
|
+
"type": "array",
|
|
173
|
+
"maxItems": 256,
|
|
174
|
+
"items": { "$ref": "#/$defs/supervised_worker_capability" }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"notifications": {
|
|
179
|
+
"description": "Optional operator-owned human-attention delivery. Disabled unless explicitly enabled; notification responses never carry approval or mutation authority.",
|
|
180
|
+
"$ref": "#/$defs/notifications"
|
|
181
|
+
},
|
|
152
182
|
"capabilities": {
|
|
153
183
|
"description": "Embedded compatibility capabilities. May be empty when contracts supplies the capability catalog.",
|
|
154
184
|
"type": "array",
|
|
@@ -435,6 +465,191 @@
|
|
|
435
465
|
}
|
|
436
466
|
},
|
|
437
467
|
"$defs": {
|
|
468
|
+
"supervised_worker_capability": {
|
|
469
|
+
"type": "object",
|
|
470
|
+
"additionalProperties": false,
|
|
471
|
+
"required": [
|
|
472
|
+
"capability",
|
|
473
|
+
"contract_digest",
|
|
474
|
+
"mode",
|
|
475
|
+
"concurrency",
|
|
476
|
+
"queue_limit",
|
|
477
|
+
"lease_seconds",
|
|
478
|
+
"max_attempts",
|
|
479
|
+
"proposal_ttl_seconds",
|
|
480
|
+
"rate_limit",
|
|
481
|
+
"write_url_env"
|
|
482
|
+
],
|
|
483
|
+
"properties": {
|
|
484
|
+
"capability": { "$ref": "#/$defs/qualified_name" },
|
|
485
|
+
"contract_digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
486
|
+
"mode": { "const": "supervised_worker" },
|
|
487
|
+
"concurrency": { "type": "integer", "minimum": 1, "maximum": 32 },
|
|
488
|
+
"queue_limit": { "type": "integer", "minimum": 1, "maximum": 10000 },
|
|
489
|
+
"lease_seconds": { "type": "integer", "minimum": 15, "maximum": 3600 },
|
|
490
|
+
"max_attempts": { "type": "integer", "minimum": 1, "maximum": 100 },
|
|
491
|
+
"proposal_ttl_seconds": { "type": "integer", "minimum": 60, "maximum": 2592000 },
|
|
492
|
+
"rate_limit": {
|
|
493
|
+
"type": "object",
|
|
494
|
+
"additionalProperties": false,
|
|
495
|
+
"required": ["executions", "window_seconds"],
|
|
496
|
+
"properties": {
|
|
497
|
+
"executions": { "type": "integer", "minimum": 1, "maximum": 100000 },
|
|
498
|
+
"window_seconds": { "type": "integer", "minimum": 1, "maximum": 86400 }
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
"write_url_env": { "$ref": "#/$defs/env_name" },
|
|
502
|
+
"require_least_privilege_writer": { "type": "boolean" },
|
|
503
|
+
"writer_posture_fingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
504
|
+
"worker_identity": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$" },
|
|
505
|
+
"control_role": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$" },
|
|
506
|
+
"required_attention_sinks": {
|
|
507
|
+
"description": "Optional default-off supervision-health gate. Every named sink must be configured and healthy before this exact capability/digest is leased.",
|
|
508
|
+
"type": "array",
|
|
509
|
+
"minItems": 1,
|
|
510
|
+
"maxItems": 8,
|
|
511
|
+
"uniqueItems": true,
|
|
512
|
+
"items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$" }
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"notifications": {
|
|
517
|
+
"type": "object",
|
|
518
|
+
"additionalProperties": false,
|
|
519
|
+
"required": ["enabled", "sinks"],
|
|
520
|
+
"properties": {
|
|
521
|
+
"enabled": { "type": "boolean" },
|
|
522
|
+
"workbench_url_env": { "$ref": "#/$defs/env_name" },
|
|
523
|
+
"sinks": {
|
|
524
|
+
"type": "array",
|
|
525
|
+
"maxItems": 32,
|
|
526
|
+
"items": { "$ref": "#/$defs/notification_sink" }
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
"notification_sink": {
|
|
531
|
+
"type": "object",
|
|
532
|
+
"additionalProperties": false,
|
|
533
|
+
"required": ["id", "type"],
|
|
534
|
+
"properties": {
|
|
535
|
+
"id": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$" },
|
|
536
|
+
"type": { "enum": ["webhook", "jsonl"] },
|
|
537
|
+
"enabled": { "type": "boolean" },
|
|
538
|
+
"url_env": { "$ref": "#/$defs/env_name" },
|
|
539
|
+
"signing_secret_env": { "$ref": "#/$defs/env_name" },
|
|
540
|
+
"destination": { "const": "stdout" },
|
|
541
|
+
"minimum_severity": { "enum": ["informational", "warning", "critical"] },
|
|
542
|
+
"events": {
|
|
543
|
+
"type": "array",
|
|
544
|
+
"maxItems": 64,
|
|
545
|
+
"uniqueItems": true,
|
|
546
|
+
"items": {
|
|
547
|
+
"enum": [
|
|
548
|
+
"proposal.created",
|
|
549
|
+
"proposal.review_required",
|
|
550
|
+
"proposal.auto_approved",
|
|
551
|
+
"proposal.approved",
|
|
552
|
+
"proposal.queued",
|
|
553
|
+
"proposal.expiring",
|
|
554
|
+
"proposal.expired",
|
|
555
|
+
"proposal.cancelled",
|
|
556
|
+
"proposal.applied",
|
|
557
|
+
"proposal.conflict",
|
|
558
|
+
"proposal.refused",
|
|
559
|
+
"worker.started",
|
|
560
|
+
"worker.paused",
|
|
561
|
+
"worker.unhealthy",
|
|
562
|
+
"worker.recovered",
|
|
563
|
+
"worker.queue_backlog",
|
|
564
|
+
"worker.retry_scheduled",
|
|
565
|
+
"worker.dead_lettered",
|
|
566
|
+
"worker.unknown_outcome",
|
|
567
|
+
"worker.reconciliation_required",
|
|
568
|
+
"capability.review_required",
|
|
569
|
+
"capability.activated",
|
|
570
|
+
"capability.revoked",
|
|
571
|
+
"contract.digest_stale",
|
|
572
|
+
"schema.drift_detected",
|
|
573
|
+
"credential.posture_changed",
|
|
574
|
+
"policy.limit_near",
|
|
575
|
+
"policy.limit_exceeded",
|
|
576
|
+
"sensitive_override_activated"
|
|
577
|
+
]
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
"capabilities": {
|
|
581
|
+
"type": "array",
|
|
582
|
+
"maxItems": 256,
|
|
583
|
+
"uniqueItems": true,
|
|
584
|
+
"items": { "$ref": "#/$defs/qualified_name" }
|
|
585
|
+
},
|
|
586
|
+
"environments": {
|
|
587
|
+
"type": "array",
|
|
588
|
+
"maxItems": 4,
|
|
589
|
+
"uniqueItems": true,
|
|
590
|
+
"items": { "enum": ["development", "staging", "production", "unknown"] }
|
|
591
|
+
},
|
|
592
|
+
"delivery": { "enum": ["immediate", "digest", "all"] },
|
|
593
|
+
"max_attempts": { "type": "integer", "minimum": 1, "maximum": 100 },
|
|
594
|
+
"timeout_ms": { "type": "integer", "minimum": 100, "maximum": 30000 },
|
|
595
|
+
"max_response_bytes": { "type": "integer", "minimum": 0, "maximum": 65536 },
|
|
596
|
+
"replay_window_seconds": { "type": "integer", "minimum": 30, "maximum": 3600 },
|
|
597
|
+
"allow_private_destinations": { "type": "boolean" },
|
|
598
|
+
"private_host_allowlist": {
|
|
599
|
+
"type": "array",
|
|
600
|
+
"maxItems": 32,
|
|
601
|
+
"uniqueItems": true,
|
|
602
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 253 }
|
|
603
|
+
},
|
|
604
|
+
"recovery_notifications": { "type": "boolean" },
|
|
605
|
+
"budgets": { "$ref": "#/$defs/notification_budgets" },
|
|
606
|
+
"quiet_hours": {
|
|
607
|
+
"type": "object",
|
|
608
|
+
"additionalProperties": false,
|
|
609
|
+
"required": ["start_utc_hour", "end_utc_hour"],
|
|
610
|
+
"properties": {
|
|
611
|
+
"start_utc_hour": { "type": "integer", "minimum": 0, "maximum": 23 },
|
|
612
|
+
"end_utc_hour": { "type": "integer", "minimum": 0, "maximum": 23 }
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"allOf": [
|
|
617
|
+
{
|
|
618
|
+
"if": { "properties": { "type": { "const": "webhook" } }, "required": ["type"] },
|
|
619
|
+
"then": { "required": ["url_env", "signing_secret_env"] }
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"if": { "properties": { "type": { "const": "jsonl" } }, "required": ["type"] },
|
|
623
|
+
"then": {
|
|
624
|
+
"required": ["destination"],
|
|
625
|
+
"not": {
|
|
626
|
+
"anyOf": [
|
|
627
|
+
{ "required": ["url_env"] },
|
|
628
|
+
{ "required": ["signing_secret_env"] }
|
|
629
|
+
]
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
"notification_budgets": {
|
|
636
|
+
"type": "object",
|
|
637
|
+
"additionalProperties": false,
|
|
638
|
+
"properties": {
|
|
639
|
+
"per_minute": { "type": "integer", "minimum": 1, "maximum": 10000 },
|
|
640
|
+
"per_hour": { "type": "integer", "minimum": 1, "maximum": 100000 },
|
|
641
|
+
"immediate_informational_per_hour": { "type": "integer", "minimum": 0, "maximum": 10000 },
|
|
642
|
+
"aggregation_window_seconds": { "type": "integer", "minimum": 1, "maximum": 86400 },
|
|
643
|
+
"cooldown_seconds": { "type": "integer", "minimum": 0, "maximum": 604800 },
|
|
644
|
+
"max_unresolved_reminders": { "type": "integer", "minimum": 0, "maximum": 100 },
|
|
645
|
+
"digest_cadence_minutes": { "type": "integer", "minimum": 1, "maximum": 10080 },
|
|
646
|
+
"escalation_delay_seconds": { "type": "integer", "minimum": 0, "maximum": 604800 },
|
|
647
|
+
"retry_attempt_threshold": { "type": "integer", "minimum": 1, "maximum": 100 },
|
|
648
|
+
"degraded_duration_seconds": { "type": "integer", "minimum": 1, "maximum": 86400 },
|
|
649
|
+
"queue_depth_threshold": { "type": "integer", "minimum": 1, "maximum": 1000000 },
|
|
650
|
+
"queue_age_seconds": { "type": "integer", "minimum": 1, "maximum": 604800 }
|
|
651
|
+
}
|
|
652
|
+
},
|
|
438
653
|
"rate_limit_rule": {
|
|
439
654
|
"type": "object",
|
|
440
655
|
"additionalProperties": false,
|
|
@@ -815,6 +1030,14 @@
|
|
|
815
1030
|
}
|
|
816
1031
|
}
|
|
817
1032
|
},
|
|
1033
|
+
"execution": {
|
|
1034
|
+
"type": "object",
|
|
1035
|
+
"additionalProperties": false,
|
|
1036
|
+
"required": ["supervised_worker"],
|
|
1037
|
+
"properties": {
|
|
1038
|
+
"supervised_worker": { "const": "allowed" }
|
|
1039
|
+
}
|
|
1040
|
+
},
|
|
818
1041
|
"writeback": {
|
|
819
1042
|
"$ref": "#/$defs/writeback"
|
|
820
1043
|
},
|