@synapsor/runner 1.6.1 → 1.6.3
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 +98 -3
- package/README.md +33 -19
- package/SECURITY.md +10 -2
- package/THREAT_MODEL.md +27 -4
- package/dist/authoring.mjs +53 -3
- package/dist/cli.d.ts +19 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/local-ui.d.ts +85 -1
- package/dist/local-ui.d.ts.map +1 -1
- package/dist/runner.mjs +33542 -20382
- package/dist/runtime.mjs +3581 -237
- package/dist/shadow.mjs +2423 -65
- package/docs/README.md +22 -2
- package/docs/agent-guided-setup.md +239 -0
- package/docs/approval-roles-and-operator-identity.md +353 -0
- package/docs/auto-boundary-and-scoped-explore.md +32 -6
- package/docs/capability-authoring.md +19 -0
- package/docs/current-scope.md +20 -1
- package/docs/cursor-plugin.md +2 -2
- package/docs/dsl-json-parity.md +75 -0
- package/docs/dsl-reference.md +10 -0
- package/docs/fresh-developer-usability.md +155 -80
- package/docs/getting-started-own-database.md +5 -4
- package/docs/guarded-crud-writeback.md +19 -0
- package/docs/guided-onboarding.md +331 -0
- package/docs/human-attention-notifications.md +367 -0
- package/docs/limitations.md +19 -3
- package/docs/local-mode.md +16 -2
- package/docs/migrating-to-synapsor-spec.md +38 -0
- package/docs/production.md +39 -0
- package/docs/release-notes.md +87 -4
- package/docs/runner-config-reference.md +132 -0
- package/docs/running-a-runner-fleet.md +16 -1
- package/docs/security-boundary.md +24 -0
- package/docs/store-lifecycle.md +20 -1
- package/docs/supervised-automatic-apply.md +267 -0
- package/docs/troubleshooting-first-run.md +35 -0
- package/examples/app-owned-writeback/command-handler.mjs +0 -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/mcp-postgres-billing-app-handler/scripts/run-demo.sh +0 -0
- package/examples/operator-oidc/issuer.mjs +188 -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/examples/support-plan-credit/README.md +6 -2
- package/package.json +11 -9
- package/schemas/schema-candidate-review.schema.json +42 -0
- package/schemas/synapsor.runner.schema.json +227 -4
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"potential_principal_fields",
|
|
79
79
|
"potential_conflict_fields",
|
|
80
80
|
"potentially_sensitive_fields",
|
|
81
|
+
"field_classifications",
|
|
81
82
|
"suggested_kept_out_fields",
|
|
82
83
|
"suggested_visible_fields",
|
|
83
84
|
"possible_actions",
|
|
@@ -106,6 +107,47 @@
|
|
|
106
107
|
"potentially_sensitive_fields": {
|
|
107
108
|
"$ref": "#/$defs/stringArray"
|
|
108
109
|
},
|
|
110
|
+
"field_classifications": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"required": [
|
|
116
|
+
"field",
|
|
117
|
+
"state",
|
|
118
|
+
"reason_codes",
|
|
119
|
+
"reasons",
|
|
120
|
+
"evidence_source"
|
|
121
|
+
],
|
|
122
|
+
"properties": {
|
|
123
|
+
"field": {
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"state": {
|
|
127
|
+
"enum": [
|
|
128
|
+
"high_confidence_sensitive",
|
|
129
|
+
"unresolved_free_text",
|
|
130
|
+
"structurally_low_risk"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"reason_codes": {
|
|
134
|
+
"$ref": "#/$defs/stringArray"
|
|
135
|
+
},
|
|
136
|
+
"reasons": {
|
|
137
|
+
"$ref": "#/$defs/stringArray"
|
|
138
|
+
},
|
|
139
|
+
"evidence_source": {
|
|
140
|
+
"enum": [
|
|
141
|
+
"database",
|
|
142
|
+
"prisma",
|
|
143
|
+
"drizzle",
|
|
144
|
+
"openapi",
|
|
145
|
+
"synapsor"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
109
151
|
"suggested_kept_out_fields": {
|
|
110
152
|
"$ref": "#/$defs/stringArray"
|
|
111
153
|
},
|
|
@@ -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
|
},
|