@agentplat/mesh-sim 0.3.0-beta.2 → 0.3.0-beta.5
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 +447 -2
- package/dist/collective-closed-loop-action.d.ts +80 -0
- package/dist/collective-closed-loop-action.d.ts.map +1 -0
- package/dist/collective-closed-loop-action.js +471 -0
- package/dist/collective-closed-loop-action.js.map +1 -0
- package/dist/collective-closed-loop-contracts.d.ts +75 -0
- package/dist/collective-closed-loop-contracts.d.ts.map +1 -0
- package/dist/collective-closed-loop-contracts.js +420 -0
- package/dist/collective-closed-loop-contracts.js.map +1 -0
- package/dist/collective-closed-loop-fault-matrix.d.ts +101 -0
- package/dist/collective-closed-loop-fault-matrix.d.ts.map +1 -0
- package/dist/collective-closed-loop-fault-matrix.js +253 -0
- package/dist/collective-closed-loop-fault-matrix.js.map +1 -0
- package/dist/collective-closed-loop-recovery.d.ts +70 -0
- package/dist/collective-closed-loop-recovery.d.ts.map +1 -0
- package/dist/collective-closed-loop-recovery.js +823 -0
- package/dist/collective-closed-loop-recovery.js.map +1 -0
- package/dist/collective-closed-loop-reference.d.ts +54 -0
- package/dist/collective-closed-loop-reference.d.ts.map +1 -0
- package/dist/collective-closed-loop-reference.js +1696 -0
- package/dist/collective-closed-loop-reference.js.map +1 -0
- package/dist/collective-closed-loop-replanning.d.ts +27 -0
- package/dist/collective-closed-loop-replanning.d.ts.map +1 -0
- package/dist/collective-closed-loop-replanning.js +151 -0
- package/dist/collective-closed-loop-replanning.js.map +1 -0
- package/dist/collective-closed-loop-resilience-campaign.d.ts +22 -0
- package/dist/collective-closed-loop-resilience-campaign.d.ts.map +1 -0
- package/dist/collective-closed-loop-resilience-campaign.js +196 -0
- package/dist/collective-closed-loop-resilience-campaign.js.map +1 -0
- package/dist/collective-closed-loop-resilience-contracts.d.ts +138 -0
- package/dist/collective-closed-loop-resilience-contracts.d.ts.map +1 -0
- package/dist/collective-closed-loop-resilience-contracts.js +677 -0
- package/dist/collective-closed-loop-resilience-contracts.js.map +1 -0
- package/dist/collective-closed-loop-runner.d.ts +133 -0
- package/dist/collective-closed-loop-runner.d.ts.map +1 -0
- package/dist/collective-closed-loop-runner.js +1429 -0
- package/dist/collective-closed-loop-runner.js.map +1 -0
- package/dist/collective-closed-loop-runtime.d.ts +95 -0
- package/dist/collective-closed-loop-runtime.d.ts.map +1 -0
- package/dist/collective-closed-loop-runtime.js +1192 -0
- package/dist/collective-closed-loop-runtime.js.map +1 -0
- package/dist/collective-effect-provenance.d.ts +5 -0
- package/dist/collective-effect-provenance.d.ts.map +1 -0
- package/dist/collective-effect-provenance.js +32 -0
- package/dist/collective-effect-provenance.js.map +1 -0
- package/dist/collective-environment.d.ts +49 -0
- package/dist/collective-environment.d.ts.map +1 -0
- package/dist/collective-environment.js +907 -0
- package/dist/collective-environment.js.map +1 -0
- package/dist/collective-progressive-scale-overlay.d.ts +39 -0
- package/dist/collective-progressive-scale-overlay.d.ts.map +1 -0
- package/dist/collective-progressive-scale-overlay.js +147 -0
- package/dist/collective-progressive-scale-overlay.js.map +1 -0
- package/dist/collective-progressive-scale.d.ts +202 -0
- package/dist/collective-progressive-scale.d.ts.map +1 -0
- package/dist/collective-progressive-scale.js +755 -0
- package/dist/collective-progressive-scale.js.map +1 -0
- package/dist/collective-statistical-campaign-aggregation.d.ts +97 -0
- package/dist/collective-statistical-campaign-aggregation.d.ts.map +1 -0
- package/dist/collective-statistical-campaign-aggregation.js +446 -0
- package/dist/collective-statistical-campaign-aggregation.js.map +1 -0
- package/dist/collective-statistical-campaign-artifact-stream.d.ts +66 -0
- package/dist/collective-statistical-campaign-artifact-stream.d.ts.map +1 -0
- package/dist/collective-statistical-campaign-artifact-stream.js +207 -0
- package/dist/collective-statistical-campaign-artifact-stream.js.map +1 -0
- package/dist/collective-statistical-campaign-bundle.d.ts +151 -0
- package/dist/collective-statistical-campaign-bundle.d.ts.map +1 -0
- package/dist/collective-statistical-campaign-bundle.js +885 -0
- package/dist/collective-statistical-campaign-bundle.js.map +1 -0
- package/dist/collective-statistical-campaign-executor.d.ts +131 -0
- package/dist/collective-statistical-campaign-executor.d.ts.map +1 -0
- package/dist/collective-statistical-campaign-executor.js +856 -0
- package/dist/collective-statistical-campaign-executor.js.map +1 -0
- package/dist/collective-statistical-campaign-normative-analysis.d.ts +85 -0
- package/dist/collective-statistical-campaign-normative-analysis.d.ts.map +1 -0
- package/dist/collective-statistical-campaign-normative-analysis.js +483 -0
- package/dist/collective-statistical-campaign-normative-analysis.js.map +1 -0
- package/dist/collective-statistical-campaign-normative-operation.d.ts +89 -0
- package/dist/collective-statistical-campaign-normative-operation.d.ts.map +1 -0
- package/dist/collective-statistical-campaign-normative-operation.js +266 -0
- package/dist/collective-statistical-campaign-normative-operation.js.map +1 -0
- package/dist/collective-statistical-campaign-normative-registry.d.ts +24 -0
- package/dist/collective-statistical-campaign-normative-registry.d.ts.map +1 -0
- package/dist/collective-statistical-campaign-normative-registry.js +163 -0
- package/dist/collective-statistical-campaign-normative-registry.js.map +1 -0
- package/dist/collective-statistical-campaign-registered-adapter.d.ts +16 -0
- package/dist/collective-statistical-campaign-registered-adapter.d.ts.map +1 -0
- package/dist/collective-statistical-campaign-registered-adapter.js +518 -0
- package/dist/collective-statistical-campaign-registered-adapter.js.map +1 -0
- package/dist/collective-statistical-campaign-scale.d.ts +85 -0
- package/dist/collective-statistical-campaign-scale.d.ts.map +1 -0
- package/dist/collective-statistical-campaign-scale.js +349 -0
- package/dist/collective-statistical-campaign-scale.js.map +1 -0
- package/dist/collective-trace-journal.d.ts +20 -0
- package/dist/collective-trace-journal.d.ts.map +1 -0
- package/dist/collective-trace-journal.js +105 -0
- package/dist/collective-trace-journal.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/dist/multi-domain-environment-contracts.d.ts +122 -0
- package/dist/multi-domain-environment-contracts.d.ts.map +1 -0
- package/dist/multi-domain-environment-contracts.js +14 -0
- package/dist/multi-domain-environment-contracts.js.map +1 -0
- package/dist/multi-domain-environment-runtime.d.ts +25 -0
- package/dist/multi-domain-environment-runtime.d.ts.map +1 -0
- package/dist/multi-domain-environment-runtime.js +493 -0
- package/dist/multi-domain-environment-runtime.js.map +1 -0
- package/dist/multi-domain-environment-validation.d.ts +33 -0
- package/dist/multi-domain-environment-validation.d.ts.map +1 -0
- package/dist/multi-domain-environment-validation.js +415 -0
- package/dist/multi-domain-environment-validation.js.map +1 -0
- package/dist/multi-domain-environment.d.ts +4 -0
- package/dist/multi-domain-environment.d.ts.map +1 -0
- package/dist/multi-domain-environment.js +4 -0
- package/dist/multi-domain-environment.js.map +1 -0
- package/dist/reducer-scenario.d.ts.map +1 -1
- package/dist/reducer-scenario.js +67 -19
- package/dist/reducer-scenario.js.map +1 -1
- package/dist/scalable-evaluation-contracts.d.ts +835 -0
- package/dist/scalable-evaluation-contracts.d.ts.map +1 -0
- package/dist/scalable-evaluation-contracts.js +22 -0
- package/dist/scalable-evaluation-contracts.js.map +1 -0
- package/dist/scalable-evaluation-durability.d.ts +16 -0
- package/dist/scalable-evaluation-durability.d.ts.map +1 -0
- package/dist/scalable-evaluation-durability.js +339 -0
- package/dist/scalable-evaluation-durability.js.map +1 -0
- package/dist/scalable-evaluation-evidence.d.ts +93 -0
- package/dist/scalable-evaluation-evidence.d.ts.map +1 -0
- package/dist/scalable-evaluation-evidence.js +470 -0
- package/dist/scalable-evaluation-evidence.js.map +1 -0
- package/dist/scalable-evaluation-reference-integrated.d.ts +87 -0
- package/dist/scalable-evaluation-reference-integrated.d.ts.map +1 -0
- package/dist/scalable-evaluation-reference-integrated.js +1318 -0
- package/dist/scalable-evaluation-reference-integrated.js.map +1 -0
- package/dist/scalable-evaluation-runner.d.ts +8 -0
- package/dist/scalable-evaluation-runner.d.ts.map +1 -0
- package/dist/scalable-evaluation-runner.js +1810 -0
- package/dist/scalable-evaluation-runner.js.map +1 -0
- package/dist/scalable-evaluation-runtime.d.ts +86 -0
- package/dist/scalable-evaluation-runtime.d.ts.map +1 -0
- package/dist/scalable-evaluation-runtime.js +1310 -0
- package/dist/scalable-evaluation-runtime.js.map +1 -0
- package/dist/scalable-evaluation-validation.d.ts +59 -0
- package/dist/scalable-evaluation-validation.d.ts.map +1 -0
- package/dist/scalable-evaluation-validation.js +377 -0
- package/dist/scalable-evaluation-validation.js.map +1 -0
- package/dist/scalable-evaluation.d.ts +8 -0
- package/dist/scalable-evaluation.d.ts.map +1 -0
- package/dist/scalable-evaluation.js +8 -0
- package/dist/scalable-evaluation.js.map +1 -0
- package/dist/sharded-simulation-contracts.d.ts +240 -0
- package/dist/sharded-simulation-contracts.d.ts.map +1 -0
- package/dist/sharded-simulation-contracts.js +199 -0
- package/dist/sharded-simulation-contracts.js.map +1 -0
- package/dist/sharded-simulation-runtime.d.ts +64 -0
- package/dist/sharded-simulation-runtime.d.ts.map +1 -0
- package/dist/sharded-simulation-runtime.js +755 -0
- package/dist/sharded-simulation-runtime.js.map +1 -0
- package/dist/sharded-simulation-validation.d.ts +10 -0
- package/dist/sharded-simulation-validation.d.ts.map +1 -0
- package/dist/sharded-simulation-validation.js +250 -0
- package/dist/sharded-simulation-validation.js.map +1 -0
- package/dist/sharded-simulation.d.ts +46 -0
- package/dist/sharded-simulation.d.ts.map +1 -0
- package/dist/sharded-simulation.js +32 -0
- package/dist/sharded-simulation.js.map +1 -0
- package/dist/verified-benchmark-contracts.d.ts +132 -0
- package/dist/verified-benchmark-contracts.d.ts.map +1 -0
- package/dist/verified-benchmark-contracts.js +2 -0
- package/dist/verified-benchmark-contracts.js.map +1 -0
- package/dist/verified-benchmark-runtime.d.ts +20 -0
- package/dist/verified-benchmark-runtime.d.ts.map +1 -0
- package/dist/verified-benchmark-runtime.js +199 -0
- package/dist/verified-benchmark-runtime.js.map +1 -0
- package/dist/verified-benchmark-validation.d.ts +64 -0
- package/dist/verified-benchmark-validation.d.ts.map +1 -0
- package/dist/verified-benchmark-validation.js +481 -0
- package/dist/verified-benchmark-validation.js.map +1 -0
- package/dist/verified-benchmark.d.ts +4 -0
- package/dist/verified-benchmark.d.ts.map +1 -0
- package/dist/verified-benchmark.js +4 -0
- package/dist/verified-benchmark.js.map +1 -0
- package/package.json +18 -8
|
@@ -0,0 +1,835 @@
|
|
|
1
|
+
import type { PlanningDigestV1, PlanningJson } from "@agentplat/collective-planning";
|
|
2
|
+
import type { MultiDomainActionEnvelopeV1, MultiDomainEnvironmentAdapterV1, MultiDomainEnvironmentDomainV1, MultiDomainObservationEnvelopeV1, MultiDomainScenarioDefinitionV1, MultiDomainScenarioManifestV1 } from "./multi-domain-environment-contracts.js";
|
|
3
|
+
import type { ShardedSimulationEffectReceiptV1, ShardedSimulationCrossShardMessageAckV1, ShardedSimulationCrossShardMessageBatchV1, ShardedSimulationFencedActionRequestV1, ShardedSimulationEnvironmentBridgeV1, ShardedSimulationCheckpointV1, ShardedSimulationRestoreReceiptV1, ShardedSimulationPartialObservationDeliveryV1, ShardedSimulationScaleProfileIdV1 } from "./sharded-simulation-contracts.js";
|
|
4
|
+
export declare const SCALABLE_EVALUATION_SCHEMA_VERSION_V1: 1;
|
|
5
|
+
/** Stable industry-facing aliases for the existing sharded scale profiles. */
|
|
6
|
+
export declare const SCALABLE_EVALUATION_PROFILE_IDS_V1: readonly ["standard-500", "large-5000", "frontier-100000"];
|
|
7
|
+
export type ScalableEvaluationProfileIdV1 = (typeof SCALABLE_EVALUATION_PROFILE_IDS_V1)[number];
|
|
8
|
+
export declare const SCALABLE_EVALUATION_DOMAINS_V1: readonly ["physical", "social", "cyber"];
|
|
9
|
+
export type ScalableEvaluationDomainV1 = (typeof SCALABLE_EVALUATION_DOMAINS_V1)[number];
|
|
10
|
+
export declare const SCALABLE_EVALUATION_PERTURBATION_KINDS_V1: readonly ["benign", "byzantine", "rogue", "context_poisoning"];
|
|
11
|
+
export type ScalableEvaluationPerturbationKindV1 = (typeof SCALABLE_EVALUATION_PERTURBATION_KINDS_V1)[number];
|
|
12
|
+
export type ScalableEvaluationTeamArchitectureV1 = "distributed" | "centralized" | "hybrid" | "custom";
|
|
13
|
+
export type ScalableEvaluationActivityKindV1 = "observation" | "message" | "decision" | "action" | "recovery";
|
|
14
|
+
export interface ScalableEvaluationBudgetV1 {
|
|
15
|
+
readonly maximumInteractions: number;
|
|
16
|
+
readonly maximumMessages: number;
|
|
17
|
+
readonly maximumMessageBytes: number;
|
|
18
|
+
/** Only the tail is retained; the chain digest commits every earlier record. */
|
|
19
|
+
readonly maximumRetainedRecords: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Configuration only. Constructing a profile never allocates peers or executes
|
|
23
|
+
* an evaluation run.
|
|
24
|
+
*/
|
|
25
|
+
export interface ScalableEvaluationProfileV1 {
|
|
26
|
+
readonly schemaVersion: 1;
|
|
27
|
+
readonly profileId: ScalableEvaluationProfileIdV1;
|
|
28
|
+
readonly shardedProfileId: ShardedSimulationScaleProfileIdV1;
|
|
29
|
+
readonly agentCount: 500 | 5_000 | 100_000;
|
|
30
|
+
readonly budget: ScalableEvaluationBudgetV1;
|
|
31
|
+
readonly profileDigest: PlanningDigestV1;
|
|
32
|
+
}
|
|
33
|
+
export type ScalableEvaluationObservationScopeV1 = "peer_local" | "role_scoped" | "partition_scoped";
|
|
34
|
+
/** Runner-visible observation rules; hidden world state is deliberately absent. */
|
|
35
|
+
export interface ScalableEvaluationPartialObservabilityV1 {
|
|
36
|
+
readonly schemaVersion: 1;
|
|
37
|
+
readonly scope: ScalableEvaluationObservationScopeV1;
|
|
38
|
+
readonly maximumObservationsPerPull: number;
|
|
39
|
+
readonly allowCrossDomainAggregation: boolean;
|
|
40
|
+
readonly sourceVisibilityPolicyDigest: PlanningDigestV1;
|
|
41
|
+
readonly policyDigest: PlanningDigestV1;
|
|
42
|
+
}
|
|
43
|
+
/** Value-only identity. Runtime callbacks are excluded from every digest. */
|
|
44
|
+
export interface ScalableEvaluationTeamDescriptorV1 {
|
|
45
|
+
readonly schemaVersion: 1;
|
|
46
|
+
readonly teamId: string;
|
|
47
|
+
readonly architecture: ScalableEvaluationTeamArchitectureV1;
|
|
48
|
+
readonly implementationId: string;
|
|
49
|
+
readonly implementationVersion: string;
|
|
50
|
+
readonly implementationDigest: PlanningDigestV1;
|
|
51
|
+
readonly descriptorDigest: PlanningDigestV1;
|
|
52
|
+
}
|
|
53
|
+
/** Either side may be the reference, so centralized implementations are replaceable. */
|
|
54
|
+
export interface ScalableEvaluationMatchupV1 {
|
|
55
|
+
readonly schemaVersion: 1;
|
|
56
|
+
readonly comparisonKind: "team-vs-team";
|
|
57
|
+
readonly leftTeamId: string;
|
|
58
|
+
readonly rightTeamId: string;
|
|
59
|
+
readonly referenceSide: "left" | "right" | "neither";
|
|
60
|
+
readonly matchupDigest: PlanningDigestV1;
|
|
61
|
+
}
|
|
62
|
+
/** Selector details remain evaluator-owned; only their digest and cardinality cross the boundary. */
|
|
63
|
+
export interface ScalableEvaluationPerturbationV1 {
|
|
64
|
+
readonly schemaVersion: 1;
|
|
65
|
+
readonly perturbationId: string;
|
|
66
|
+
readonly kind: ScalableEvaluationPerturbationKindV1;
|
|
67
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
68
|
+
readonly scheduledAtLogicalTime: number;
|
|
69
|
+
readonly targetTeamIds: readonly string[];
|
|
70
|
+
readonly targetAgentCount: number;
|
|
71
|
+
readonly targetSelectorDigest: PlanningDigestV1;
|
|
72
|
+
readonly configurationDigest: PlanningDigestV1;
|
|
73
|
+
}
|
|
74
|
+
export interface ScalableEvaluationDefinitionV1 {
|
|
75
|
+
readonly schemaVersion: 1;
|
|
76
|
+
readonly evaluationId: string;
|
|
77
|
+
readonly profile: ScalableEvaluationProfileV1;
|
|
78
|
+
readonly adapterDescriptorDigest: PlanningDigestV1;
|
|
79
|
+
readonly scenario: MultiDomainScenarioDefinitionV1;
|
|
80
|
+
readonly scenarioManifestDigest: PlanningDigestV1;
|
|
81
|
+
readonly domains: readonly ScalableEvaluationDomainV1[];
|
|
82
|
+
readonly partialObservability: ScalableEvaluationPartialObservabilityV1;
|
|
83
|
+
readonly teams: readonly [
|
|
84
|
+
ScalableEvaluationTeamDescriptorV1,
|
|
85
|
+
ScalableEvaluationTeamDescriptorV1
|
|
86
|
+
];
|
|
87
|
+
readonly matchup: ScalableEvaluationMatchupV1;
|
|
88
|
+
readonly perturbations: readonly ScalableEvaluationPerturbationV1[];
|
|
89
|
+
readonly perturbationPlanDigest: PlanningDigestV1;
|
|
90
|
+
readonly definitionDigest: PlanningDigestV1;
|
|
91
|
+
}
|
|
92
|
+
export interface ScalableEvaluationTeamMessageV1 {
|
|
93
|
+
readonly schemaVersion: 1;
|
|
94
|
+
readonly messageId: string;
|
|
95
|
+
readonly sourcePeerIndex: number;
|
|
96
|
+
readonly targetPeerIndex: number;
|
|
97
|
+
readonly payloadDigest: PlanningDigestV1;
|
|
98
|
+
/** Complete public transport value retained until exact ingress acknowledgement. */
|
|
99
|
+
readonly transportEnvelope: PlanningJson;
|
|
100
|
+
readonly transportEnvelopeDigest: PlanningDigestV1;
|
|
101
|
+
readonly byteLength: number;
|
|
102
|
+
}
|
|
103
|
+
/** Exact post-transport handoff. The runner invokes it only after validating the bridge ACK. */
|
|
104
|
+
export interface ScalableEvaluationAcknowledgedMessageV1 {
|
|
105
|
+
readonly schemaVersion: 1;
|
|
106
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
107
|
+
readonly teamId: string;
|
|
108
|
+
readonly sessionId: string;
|
|
109
|
+
readonly episodeId: string;
|
|
110
|
+
readonly logicalTime: number;
|
|
111
|
+
readonly eventId: string;
|
|
112
|
+
readonly batch: ShardedSimulationCrossShardMessageBatchV1;
|
|
113
|
+
readonly bridgeAck: ShardedSimulationCrossShardMessageAckV1;
|
|
114
|
+
readonly message: ScalableEvaluationTeamMessageV1;
|
|
115
|
+
}
|
|
116
|
+
export interface ScalableEvaluationMessageIngressReceiptV1 {
|
|
117
|
+
readonly schemaVersion: 1;
|
|
118
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
119
|
+
readonly teamId: string;
|
|
120
|
+
readonly sessionId: string;
|
|
121
|
+
readonly episodeId: string;
|
|
122
|
+
readonly logicalTime: number;
|
|
123
|
+
readonly eventId: string;
|
|
124
|
+
readonly messageId: string;
|
|
125
|
+
readonly transportEnvelopeDigest: PlanningDigestV1;
|
|
126
|
+
readonly batchDigest: PlanningDigestV1;
|
|
127
|
+
readonly bridgeAckDigest: PlanningDigestV1;
|
|
128
|
+
readonly status: "admitted" | "duplicate";
|
|
129
|
+
readonly receiptDigest: PlanningDigestV1;
|
|
130
|
+
}
|
|
131
|
+
/** Exact acknowledgement that one staged action has reached a terminal bridge receipt. */
|
|
132
|
+
export interface ScalableEvaluationActionSettlementV1 {
|
|
133
|
+
readonly schemaVersion: 1;
|
|
134
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
135
|
+
readonly teamId: string;
|
|
136
|
+
readonly sessionId: string;
|
|
137
|
+
readonly episodeId: string;
|
|
138
|
+
readonly peerIndex: number;
|
|
139
|
+
readonly logicalTime: number;
|
|
140
|
+
readonly actionIndex: number;
|
|
141
|
+
readonly outputDigest: PlanningDigestV1;
|
|
142
|
+
readonly action: MultiDomainActionEnvelopeV1;
|
|
143
|
+
readonly request: ShardedSimulationFencedActionRequestV1;
|
|
144
|
+
readonly effectReceipt: ShardedSimulationEffectReceiptV1;
|
|
145
|
+
}
|
|
146
|
+
export interface ScalableEvaluationActionSettlementReceiptV1 {
|
|
147
|
+
readonly schemaVersion: 1;
|
|
148
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
149
|
+
readonly teamId: string;
|
|
150
|
+
readonly sessionId: string;
|
|
151
|
+
readonly episodeId: string;
|
|
152
|
+
readonly peerIndex: number;
|
|
153
|
+
readonly logicalTime: number;
|
|
154
|
+
readonly actionIndex: number;
|
|
155
|
+
readonly outputDigest: PlanningDigestV1;
|
|
156
|
+
readonly actionDigest: PlanningDigestV1;
|
|
157
|
+
readonly effectReceiptDigest: PlanningDigestV1;
|
|
158
|
+
readonly status: "settled" | "duplicate";
|
|
159
|
+
readonly receiptDigest: PlanningDigestV1;
|
|
160
|
+
}
|
|
161
|
+
/** Provider-neutral input: a team receives only the bounded public delivery. */
|
|
162
|
+
export interface ScalableEvaluationTeamStepInputV1 {
|
|
163
|
+
readonly schemaVersion: 1;
|
|
164
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
165
|
+
readonly teamId: string;
|
|
166
|
+
readonly peerIndex: number;
|
|
167
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
168
|
+
readonly logicalTime: number;
|
|
169
|
+
readonly delivery: ShardedSimulationPartialObservationDeliveryV1;
|
|
170
|
+
readonly remainingInteractions: number;
|
|
171
|
+
readonly remainingMessages: number;
|
|
172
|
+
readonly remainingMessageBytes: number;
|
|
173
|
+
}
|
|
174
|
+
export interface ScalableEvaluationTeamStepOutputV1 {
|
|
175
|
+
readonly schemaVersion: 1;
|
|
176
|
+
readonly teamId: string;
|
|
177
|
+
readonly logicalTime: number;
|
|
178
|
+
readonly messages: readonly ScalableEvaluationTeamMessageV1[];
|
|
179
|
+
readonly actions: readonly MultiDomainActionEnvelopeV1[];
|
|
180
|
+
readonly publicMetadata?: PlanningJson;
|
|
181
|
+
readonly outputDigest: PlanningDigestV1;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* A centralized baseline and any other implementation satisfy the same port.
|
|
185
|
+
* The evaluation runtime binds the value descriptor, but does not invoke it.
|
|
186
|
+
*/
|
|
187
|
+
export interface ScalableEvaluationTeamPortV1 {
|
|
188
|
+
readonly descriptor: ScalableEvaluationTeamDescriptorV1;
|
|
189
|
+
stepV1(input: ScalableEvaluationTeamStepInputV1): ScalableEvaluationTeamStepOutputV1 | Promise<ScalableEvaluationTeamStepOutputV1>;
|
|
190
|
+
/** Required at runtime when `stepV1` emits messages; absent ports may emit none. */
|
|
191
|
+
ingestAcknowledgedMessageV1?(input: ScalableEvaluationAcknowledgedMessageV1): ScalableEvaluationMessageIngressReceiptV1 | Promise<ScalableEvaluationMessageIngressReceiptV1>;
|
|
192
|
+
/** Optional terminal settlement hook for ports that stage protected effects. */
|
|
193
|
+
settleActionV1?(input: ScalableEvaluationActionSettlementV1): ScalableEvaluationActionSettlementReceiptV1 | Promise<ScalableEvaluationActionSettlementReceiptV1>;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Explicit provider declaration for state which survives process replacement.
|
|
197
|
+
* The declaration is created by this module and is bound into every durable
|
|
198
|
+
* run configuration; method presence alone is never treated as durability.
|
|
199
|
+
*/
|
|
200
|
+
export interface ScalableEvaluationRestartDurabilityDeclarationV1 {
|
|
201
|
+
readonly schemaVersion: 1;
|
|
202
|
+
readonly protocol: "scalable-evaluation-restart-v1";
|
|
203
|
+
readonly providerId: string;
|
|
204
|
+
readonly continuityId: string;
|
|
205
|
+
readonly maximumCheckpointBytes: number;
|
|
206
|
+
readonly declarationDigest: PlanningDigestV1;
|
|
207
|
+
}
|
|
208
|
+
export interface ScalableEvaluationTeamCheckpointV1 {
|
|
209
|
+
readonly schemaVersion: 1;
|
|
210
|
+
readonly operationId: string;
|
|
211
|
+
readonly teamId: string;
|
|
212
|
+
readonly definitionDigest: PlanningDigestV1;
|
|
213
|
+
readonly descriptorDigest: PlanningDigestV1;
|
|
214
|
+
readonly revision: number;
|
|
215
|
+
readonly logicalTime: number;
|
|
216
|
+
readonly previousCheckpointDigest: PlanningDigestV1 | null;
|
|
217
|
+
readonly snapshotHandle: string;
|
|
218
|
+
readonly snapshotDigest: PlanningDigestV1;
|
|
219
|
+
readonly checkpointDigest: PlanningDigestV1;
|
|
220
|
+
}
|
|
221
|
+
export interface ScalableEvaluationTeamRestoreReceiptV1 {
|
|
222
|
+
readonly schemaVersion: 1;
|
|
223
|
+
readonly operationId: string;
|
|
224
|
+
readonly teamId: string;
|
|
225
|
+
readonly checkpointDigest: PlanningDigestV1;
|
|
226
|
+
readonly restoredRevision: number;
|
|
227
|
+
readonly receiptDigest: PlanningDigestV1;
|
|
228
|
+
}
|
|
229
|
+
/** Required team surface for a restart-durable run. */
|
|
230
|
+
export interface ScalableEvaluationResumableTeamPortV1 extends ScalableEvaluationTeamPortV1 {
|
|
231
|
+
readonly restartDurabilityV1: ScalableEvaluationRestartDurabilityDeclarationV1;
|
|
232
|
+
reconcileStepV1(input: {
|
|
233
|
+
readonly operationId: string;
|
|
234
|
+
readonly step: ScalableEvaluationTeamStepInputV1;
|
|
235
|
+
}): ScalableEvaluationTeamStepOutputV1 | Promise<ScalableEvaluationTeamStepOutputV1>;
|
|
236
|
+
/** Returns the original canonical admitted receipt for an exact retry. */
|
|
237
|
+
reconcileAcknowledgedMessageV1(input: {
|
|
238
|
+
readonly operationId: string;
|
|
239
|
+
readonly delivery: ScalableEvaluationAcknowledgedMessageV1;
|
|
240
|
+
}): ScalableEvaluationMessageIngressReceiptV1 | Promise<ScalableEvaluationMessageIngressReceiptV1>;
|
|
241
|
+
/** Returns the original canonical settled receipt for an exact retry. */
|
|
242
|
+
reconcileActionSettlementV1(input: {
|
|
243
|
+
readonly operationId: string;
|
|
244
|
+
readonly settlement: ScalableEvaluationActionSettlementV1;
|
|
245
|
+
}): ScalableEvaluationActionSettlementReceiptV1 | Promise<ScalableEvaluationActionSettlementReceiptV1>;
|
|
246
|
+
checkpointV1(input: {
|
|
247
|
+
readonly operationId: string;
|
|
248
|
+
readonly runId: string;
|
|
249
|
+
readonly definitionDigest: PlanningDigestV1;
|
|
250
|
+
readonly expectedRevision: number;
|
|
251
|
+
readonly logicalTime: number;
|
|
252
|
+
}): ScalableEvaluationTeamCheckpointV1 | Promise<ScalableEvaluationTeamCheckpointV1>;
|
|
253
|
+
restoreV1(input: {
|
|
254
|
+
readonly operationId: string;
|
|
255
|
+
readonly runId: string;
|
|
256
|
+
readonly checkpoint: ScalableEvaluationTeamCheckpointV1;
|
|
257
|
+
}): ScalableEvaluationTeamRestoreReceiptV1 | Promise<ScalableEvaluationTeamRestoreReceiptV1>;
|
|
258
|
+
}
|
|
259
|
+
/** Restart-safe extension of the provider-neutral environment bridge. */
|
|
260
|
+
export interface ScalableEvaluationResumableEnvironmentBridgeV1 extends ShardedSimulationEnvironmentBridgeV1 {
|
|
261
|
+
readonly restartDurabilityV1: ScalableEvaluationRestartDurabilityDeclarationV1;
|
|
262
|
+
reconcileSessionV1(input: {
|
|
263
|
+
readonly operationId: string;
|
|
264
|
+
readonly environmentId: string;
|
|
265
|
+
readonly logicalTime: number;
|
|
266
|
+
}): import("./sharded-simulation-contracts.js").ShardedSimulationEnvironmentSessionV1 | Promise<import("./sharded-simulation-contracts.js").ShardedSimulationEnvironmentSessionV1>;
|
|
267
|
+
reconcileEpisodeV1(input: {
|
|
268
|
+
readonly operationId: string;
|
|
269
|
+
readonly session: import("./sharded-simulation-contracts.js").ShardedSimulationEnvironmentSessionV1;
|
|
270
|
+
readonly episodeId: string;
|
|
271
|
+
readonly seed: number;
|
|
272
|
+
readonly logicalTime: number;
|
|
273
|
+
}): import("./sharded-simulation-contracts.js").ShardedSimulationEpisodeV1 | Promise<import("./sharded-simulation-contracts.js").ShardedSimulationEpisodeV1>;
|
|
274
|
+
reconcileShardAssignmentsV1(input: {
|
|
275
|
+
readonly operationId: string;
|
|
276
|
+
readonly session: import("./sharded-simulation-contracts.js").ShardedSimulationEnvironmentSessionV1;
|
|
277
|
+
readonly episode: import("./sharded-simulation-contracts.js").ShardedSimulationEpisodeV1;
|
|
278
|
+
readonly profile: import("./sharded-simulation-contracts.js").ShardedSimulationScaleProfileV1;
|
|
279
|
+
readonly assignments: readonly import("./sharded-simulation-contracts.js").ShardedSimulationShardAssignmentV1[];
|
|
280
|
+
}): void | Promise<void>;
|
|
281
|
+
reconcileObservationV1(input: {
|
|
282
|
+
readonly operationId: string;
|
|
283
|
+
readonly pull: import("./sharded-simulation-contracts.js").ShardedSimulationPartialObservationPullV1;
|
|
284
|
+
}): ShardedSimulationPartialObservationDeliveryV1 | Promise<ShardedSimulationPartialObservationDeliveryV1>;
|
|
285
|
+
/** Exact retries reconcile and return the original terminal effect receipt. */
|
|
286
|
+
reconcileEffectV1(input: {
|
|
287
|
+
readonly operationId: string;
|
|
288
|
+
readonly request: ShardedSimulationFencedActionRequestV1;
|
|
289
|
+
}): ShardedSimulationEffectReceiptV1 | Promise<ShardedSimulationEffectReceiptV1>;
|
|
290
|
+
/** Exact retries return the original ACK, not a newly hashed duplicate ACK. */
|
|
291
|
+
reconcileCrossShardBatchV1(input: {
|
|
292
|
+
readonly operationId: string;
|
|
293
|
+
readonly batch: ShardedSimulationCrossShardMessageBatchV1;
|
|
294
|
+
}): ShardedSimulationCrossShardMessageAckV1 | Promise<ShardedSimulationCrossShardMessageAckV1>;
|
|
295
|
+
reconcileCheckpointV1(input: {
|
|
296
|
+
readonly operationId: string;
|
|
297
|
+
readonly session: import("./sharded-simulation-contracts.js").ShardedSimulationEnvironmentSessionV1;
|
|
298
|
+
readonly episode: import("./sharded-simulation-contracts.js").ShardedSimulationEpisodeV1;
|
|
299
|
+
readonly expectedRevision: number;
|
|
300
|
+
readonly logicalTime: number;
|
|
301
|
+
}): ShardedSimulationCheckpointV1 | Promise<ShardedSimulationCheckpointV1>;
|
|
302
|
+
/** Must restore a committed predecessor even after an orphan checkpoint. */
|
|
303
|
+
reconcileRestoreV1(input: {
|
|
304
|
+
readonly operationId: string;
|
|
305
|
+
readonly request: import("./sharded-simulation-contracts.js").ShardedSimulationRestoreRequestV1;
|
|
306
|
+
}): ShardedSimulationRestoreReceiptV1 | Promise<ShardedSimulationRestoreReceiptV1>;
|
|
307
|
+
}
|
|
308
|
+
export interface ScalableEvaluationTeamBindingV1 {
|
|
309
|
+
readonly schemaVersion: 1;
|
|
310
|
+
readonly matchup: ScalableEvaluationMatchupV1;
|
|
311
|
+
readonly left: ScalableEvaluationTeamPortV1;
|
|
312
|
+
readonly right: ScalableEvaluationTeamPortV1;
|
|
313
|
+
}
|
|
314
|
+
export interface ScalableEvaluationEnvironmentBindingV1 {
|
|
315
|
+
readonly schemaVersion: 1;
|
|
316
|
+
readonly manifest: MultiDomainScenarioManifestV1;
|
|
317
|
+
readonly bridge: ShardedSimulationEnvironmentBridgeV1;
|
|
318
|
+
}
|
|
319
|
+
export interface ScalableEvaluationAccountingInputV1 {
|
|
320
|
+
readonly schemaVersion: 1;
|
|
321
|
+
readonly eventId: string;
|
|
322
|
+
readonly teamId: string;
|
|
323
|
+
/** Strictly contiguous per team; replaces an unbounded event-id set. */
|
|
324
|
+
readonly sequence: number;
|
|
325
|
+
readonly logicalTime: number;
|
|
326
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
327
|
+
readonly kind: ScalableEvaluationActivityKindV1;
|
|
328
|
+
readonly interactionCount: number;
|
|
329
|
+
readonly messageCount: number;
|
|
330
|
+
readonly messageBytes: number;
|
|
331
|
+
readonly observationCount: number;
|
|
332
|
+
readonly observationCountsByDomain: ScalableEvaluationObservationCountsV1;
|
|
333
|
+
readonly actionCount: number;
|
|
334
|
+
readonly successfulOutcomeCount: number;
|
|
335
|
+
readonly failedOutcomeCount: number;
|
|
336
|
+
readonly evidenceDigest: PlanningDigestV1;
|
|
337
|
+
}
|
|
338
|
+
export interface ScalableEvaluationCounterVectorV1 {
|
|
339
|
+
readonly interactions: number;
|
|
340
|
+
readonly messages: number;
|
|
341
|
+
readonly messageBytes: number;
|
|
342
|
+
readonly observations: number;
|
|
343
|
+
readonly actions: number;
|
|
344
|
+
readonly successfulOutcomes: number;
|
|
345
|
+
readonly failedOutcomes: number;
|
|
346
|
+
}
|
|
347
|
+
export type ScalableEvaluationDomainCountersV1 = Readonly<Record<ScalableEvaluationDomainV1, ScalableEvaluationCounterVectorV1>>;
|
|
348
|
+
export type ScalableEvaluationObservationCountsV1 = Readonly<Record<ScalableEvaluationDomainV1, number>>;
|
|
349
|
+
export interface ScalableEvaluationAccountingRecordV1 extends ScalableEvaluationAccountingInputV1 {
|
|
350
|
+
readonly previousChainDigest: PlanningDigestV1;
|
|
351
|
+
readonly recordDigest: PlanningDigestV1;
|
|
352
|
+
readonly chainDigest: PlanningDigestV1;
|
|
353
|
+
readonly cumulative: ScalableEvaluationCounterVectorV1;
|
|
354
|
+
}
|
|
355
|
+
export interface ScalableEvaluationAccountingReceiptV1 {
|
|
356
|
+
readonly schemaVersion: 1;
|
|
357
|
+
readonly teamId: string;
|
|
358
|
+
readonly sequence: number;
|
|
359
|
+
readonly recordDigest: PlanningDigestV1;
|
|
360
|
+
readonly chainDigest: PlanningDigestV1;
|
|
361
|
+
readonly cumulative: ScalableEvaluationCounterVectorV1;
|
|
362
|
+
readonly remainingInteractions: number;
|
|
363
|
+
readonly remainingMessages: number;
|
|
364
|
+
readonly remainingMessageBytes: number;
|
|
365
|
+
}
|
|
366
|
+
export interface ScalableEvaluationMetricTargetV1 {
|
|
367
|
+
readonly metricId: string;
|
|
368
|
+
readonly valueBasisPoints: number;
|
|
369
|
+
readonly toleranceBasisPoints: number;
|
|
370
|
+
}
|
|
371
|
+
export interface ScalableEvaluationRecoveryBaselineV1 {
|
|
372
|
+
readonly schemaVersion: 1;
|
|
373
|
+
readonly baselineId: string;
|
|
374
|
+
readonly teamId: string;
|
|
375
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
376
|
+
readonly establishedAtLogicalTime: number;
|
|
377
|
+
readonly metrics: readonly ScalableEvaluationMetricTargetV1[];
|
|
378
|
+
readonly baselineDigest: PlanningDigestV1;
|
|
379
|
+
}
|
|
380
|
+
export interface ScalableEvaluationPerturbationObservationV1 {
|
|
381
|
+
readonly schemaVersion: 1;
|
|
382
|
+
readonly perturbationId: string;
|
|
383
|
+
readonly teamId: string;
|
|
384
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
385
|
+
readonly scheduledAtLogicalTime: number;
|
|
386
|
+
readonly injectedAtLogicalTime: number;
|
|
387
|
+
readonly observedAtLogicalTime: number;
|
|
388
|
+
readonly evidenceDigest: PlanningDigestV1;
|
|
389
|
+
readonly observationDigest: PlanningDigestV1;
|
|
390
|
+
}
|
|
391
|
+
export interface ScalableEvaluationRecoverySampleV1 {
|
|
392
|
+
readonly schemaVersion: 1;
|
|
393
|
+
readonly sampleId: string;
|
|
394
|
+
readonly perturbationId: string;
|
|
395
|
+
readonly teamId: string;
|
|
396
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
397
|
+
readonly logicalTime: number;
|
|
398
|
+
readonly metrics: readonly Readonly<{
|
|
399
|
+
metricId: string;
|
|
400
|
+
valueBasisPoints: number;
|
|
401
|
+
}>[];
|
|
402
|
+
readonly maximumDistanceBasisPoints: number;
|
|
403
|
+
readonly withinBaselineTolerance: boolean;
|
|
404
|
+
readonly recoveryInteractions: number;
|
|
405
|
+
readonly recoveryMessages: number;
|
|
406
|
+
/** Provider-signed, scope-bound measurement verified before accounting. */
|
|
407
|
+
readonly measurement: ScalableEvaluationRecoveryMeasurementReceiptV1;
|
|
408
|
+
readonly sampleDigest: PlanningDigestV1;
|
|
409
|
+
}
|
|
410
|
+
export interface ScalableEvaluationRecoverySummaryV1 {
|
|
411
|
+
readonly schemaVersion: 1;
|
|
412
|
+
readonly perturbationId: string;
|
|
413
|
+
readonly teamId: string;
|
|
414
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
415
|
+
readonly baselineDigest: PlanningDigestV1;
|
|
416
|
+
readonly observedAtLogicalTime: number;
|
|
417
|
+
readonly recoveredAtLogicalTime: number | null;
|
|
418
|
+
readonly withinBaselineTolerance: boolean;
|
|
419
|
+
readonly recoveryInteractions: number;
|
|
420
|
+
readonly recoveryMessages: number;
|
|
421
|
+
readonly latestSampleDigest: PlanningDigestV1 | null;
|
|
422
|
+
readonly summaryDigest: PlanningDigestV1;
|
|
423
|
+
}
|
|
424
|
+
export interface ScalableEvaluationTeamSummaryV1 {
|
|
425
|
+
readonly schemaVersion: 1;
|
|
426
|
+
readonly teamId: string;
|
|
427
|
+
readonly architecture: ScalableEvaluationTeamArchitectureV1;
|
|
428
|
+
readonly lastSequence: number;
|
|
429
|
+
readonly lastLogicalTime: number;
|
|
430
|
+
readonly counters: ScalableEvaluationCounterVectorV1;
|
|
431
|
+
readonly countersByDomain: ScalableEvaluationDomainCountersV1;
|
|
432
|
+
readonly accountingChainDigest: PlanningDigestV1;
|
|
433
|
+
readonly recoveryEpisodeCount: number;
|
|
434
|
+
readonly recoveredEpisodeCount: number;
|
|
435
|
+
readonly recoveryRateBasisPoints: number;
|
|
436
|
+
readonly completedRecoveryInteractions: number;
|
|
437
|
+
readonly completedRecoveryMessages: number;
|
|
438
|
+
readonly summaryDigest: PlanningDigestV1;
|
|
439
|
+
}
|
|
440
|
+
export interface ScalableEvaluationSnapshotV1 {
|
|
441
|
+
readonly schemaVersion: 1;
|
|
442
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
443
|
+
readonly profileDigest: PlanningDigestV1;
|
|
444
|
+
readonly teamSummaries: readonly ScalableEvaluationTeamSummaryV1[];
|
|
445
|
+
readonly perturbationObservations: readonly ScalableEvaluationPerturbationObservationV1[];
|
|
446
|
+
readonly recoverySummaries: readonly ScalableEvaluationRecoverySummaryV1[];
|
|
447
|
+
readonly recentAccountingRecords: readonly ScalableEvaluationAccountingRecordV1[];
|
|
448
|
+
readonly snapshotDigest: PlanningDigestV1;
|
|
449
|
+
}
|
|
450
|
+
export interface ScalableEvaluationRuntimeTeamStateV1 {
|
|
451
|
+
readonly schemaVersion: 1;
|
|
452
|
+
readonly descriptor: ScalableEvaluationTeamDescriptorV1;
|
|
453
|
+
readonly sequence: number;
|
|
454
|
+
readonly lastLogicalTime: number;
|
|
455
|
+
readonly chainDigest: PlanningDigestV1;
|
|
456
|
+
readonly counters: ScalableEvaluationCounterVectorV1;
|
|
457
|
+
readonly countersByDomain: ScalableEvaluationDomainCountersV1;
|
|
458
|
+
}
|
|
459
|
+
export interface ScalableEvaluationRuntimeRecoveryStateV1 {
|
|
460
|
+
readonly schemaVersion: 1;
|
|
461
|
+
readonly perturbationId: string;
|
|
462
|
+
readonly teamId: string;
|
|
463
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
464
|
+
readonly baseline: ScalableEvaluationRecoveryBaselineV1;
|
|
465
|
+
readonly observedAtLogicalTime: number;
|
|
466
|
+
readonly startingInteractions: number;
|
|
467
|
+
readonly startingMessages: number;
|
|
468
|
+
readonly recoveredAtLogicalTime: number | null;
|
|
469
|
+
readonly withinBaselineTolerance: boolean;
|
|
470
|
+
readonly latestSampleDigest: PlanningDigestV1 | null;
|
|
471
|
+
readonly recoveryInteractions: number;
|
|
472
|
+
readonly recoveryMessages: number;
|
|
473
|
+
}
|
|
474
|
+
/** Canonical, hash-chained, bounded accounting state for process replacement. */
|
|
475
|
+
export interface ScalableEvaluationRuntimeStateV1 {
|
|
476
|
+
readonly schemaVersion: 1;
|
|
477
|
+
readonly definitionDigest: PlanningDigestV1;
|
|
478
|
+
readonly adapterDescriptorDigest: PlanningDigestV1;
|
|
479
|
+
readonly revision: number;
|
|
480
|
+
readonly predecessorStateDigest: PlanningDigestV1 | null;
|
|
481
|
+
readonly teams: readonly ScalableEvaluationRuntimeTeamStateV1[];
|
|
482
|
+
readonly baselines: readonly ScalableEvaluationRecoveryBaselineV1[];
|
|
483
|
+
readonly perturbationObservations: readonly ScalableEvaluationPerturbationObservationV1[];
|
|
484
|
+
readonly recoveries: readonly ScalableEvaluationRuntimeRecoveryStateV1[];
|
|
485
|
+
readonly environmentBindings: readonly Readonly<{
|
|
486
|
+
readonly teamId: string;
|
|
487
|
+
readonly sessionId: string;
|
|
488
|
+
readonly episodeId: string;
|
|
489
|
+
}>[];
|
|
490
|
+
/** Physical bounded ring slots; cursor is the next replacement slot. */
|
|
491
|
+
readonly recordTail: readonly ScalableEvaluationAccountingRecordV1[];
|
|
492
|
+
readonly recordTailCursor: number;
|
|
493
|
+
readonly stateDigest: PlanningDigestV1;
|
|
494
|
+
}
|
|
495
|
+
export type ScalableEvaluationRunnerPhaseV1 = "perturbation" | "observation" | "team_step" | "action" | "message" | "accounting" | "recovery" | "advance" | "complete";
|
|
496
|
+
/** Provider-neutral durable runner checkpoint; saga state is bounded by one step. */
|
|
497
|
+
export interface ScalableEvaluationRunnerCheckpointV1 {
|
|
498
|
+
readonly schemaVersion: 1;
|
|
499
|
+
readonly runId: string;
|
|
500
|
+
readonly revision: number;
|
|
501
|
+
readonly previousCheckpointDigest: PlanningDigestV1 | null;
|
|
502
|
+
readonly definitionDigest: PlanningDigestV1;
|
|
503
|
+
readonly adapterDescriptorDigest: PlanningDigestV1;
|
|
504
|
+
readonly scheduleDigest: PlanningDigestV1;
|
|
505
|
+
readonly portsDigest: PlanningDigestV1;
|
|
506
|
+
readonly configurationDigest: PlanningDigestV1;
|
|
507
|
+
readonly phase: ScalableEvaluationRunnerPhaseV1;
|
|
508
|
+
readonly stepIndex: number;
|
|
509
|
+
readonly teamIndex: number;
|
|
510
|
+
readonly phaseCursor: number;
|
|
511
|
+
readonly processedSteps: number;
|
|
512
|
+
readonly logicalTime: number;
|
|
513
|
+
readonly traceDigest: PlanningDigestV1;
|
|
514
|
+
readonly activeRecoveries: readonly string[];
|
|
515
|
+
readonly runtimeState: ScalableEvaluationRuntimeStateV1;
|
|
516
|
+
readonly teamEnvironments: readonly Readonly<{
|
|
517
|
+
readonly teamId: string;
|
|
518
|
+
readonly session: import("./sharded-simulation-contracts.js").ShardedSimulationEnvironmentSessionV1;
|
|
519
|
+
readonly episode: import("./sharded-simulation-contracts.js").ShardedSimulationEpisodeV1;
|
|
520
|
+
readonly environmentCheckpoint: ShardedSimulationCheckpointV1;
|
|
521
|
+
readonly teamCheckpoint: ScalableEvaluationTeamCheckpointV1;
|
|
522
|
+
}>[];
|
|
523
|
+
/** Current one-step saga only; never contains declared-population state. */
|
|
524
|
+
readonly saga: PlanningJson;
|
|
525
|
+
readonly checkpointDigest: PlanningDigestV1;
|
|
526
|
+
}
|
|
527
|
+
export interface ScalableEvaluationCheckpointStoreCasReceiptV1 {
|
|
528
|
+
readonly schemaVersion: 1;
|
|
529
|
+
readonly runId: string;
|
|
530
|
+
readonly revision: number;
|
|
531
|
+
readonly checkpointDigest: PlanningDigestV1;
|
|
532
|
+
readonly status: "stored" | "duplicate" | "conflict";
|
|
533
|
+
readonly currentRevision: number | null;
|
|
534
|
+
readonly receiptDigest: PlanningDigestV1;
|
|
535
|
+
}
|
|
536
|
+
/** Provider-neutral CAS store. Implementations must survive process replacement. */
|
|
537
|
+
export interface ScalableEvaluationDurableCheckpointStoreV1 {
|
|
538
|
+
readonly restartDurabilityV1: ScalableEvaluationRestartDurabilityDeclarationV1;
|
|
539
|
+
loadV1(input: {
|
|
540
|
+
readonly runId: string;
|
|
541
|
+
}): ScalableEvaluationRunnerCheckpointV1 | null | Promise<ScalableEvaluationRunnerCheckpointV1 | null>;
|
|
542
|
+
compareAndSwapV1(input: {
|
|
543
|
+
readonly runId: string;
|
|
544
|
+
readonly expectedRevision: number | null;
|
|
545
|
+
readonly checkpoint: ScalableEvaluationRunnerCheckpointV1;
|
|
546
|
+
}): ScalableEvaluationCheckpointStoreCasReceiptV1 | Promise<ScalableEvaluationCheckpointStoreCasReceiptV1>;
|
|
547
|
+
}
|
|
548
|
+
export interface ScalableEvaluationCounterDeltaV1 {
|
|
549
|
+
readonly interactions: number;
|
|
550
|
+
readonly messages: number;
|
|
551
|
+
readonly messageBytes: number;
|
|
552
|
+
readonly observations: number;
|
|
553
|
+
readonly actions: number;
|
|
554
|
+
readonly successfulOutcomes: number;
|
|
555
|
+
readonly failedOutcomes: number;
|
|
556
|
+
readonly recoveredEpisodes: number;
|
|
557
|
+
readonly completedRecoveryInteractions: number;
|
|
558
|
+
readonly completedRecoveryMessages: number;
|
|
559
|
+
}
|
|
560
|
+
/** Signed deltas are left minus right. No winner is inferred by the runtime. */
|
|
561
|
+
export interface ScalableEvaluationComparisonV1 {
|
|
562
|
+
readonly schemaVersion: 1;
|
|
563
|
+
readonly comparisonKind: "team-vs-team";
|
|
564
|
+
readonly definitionDigest: PlanningDigestV1;
|
|
565
|
+
readonly matchupDigest: PlanningDigestV1;
|
|
566
|
+
readonly left: ScalableEvaluationTeamSummaryV1;
|
|
567
|
+
readonly right: ScalableEvaluationTeamSummaryV1;
|
|
568
|
+
readonly leftMinusRight: ScalableEvaluationCounterDeltaV1;
|
|
569
|
+
readonly comparisonDigest: PlanningDigestV1;
|
|
570
|
+
}
|
|
571
|
+
export declare function isScalableEvaluationDomainV1(value: MultiDomainEnvironmentDomainV1): value is ScalableEvaluationDomainV1;
|
|
572
|
+
/** Runtime dependencies accepted by the environment binder. */
|
|
573
|
+
export interface ScalableEvaluationEnvironmentInputV1 {
|
|
574
|
+
readonly definition: ScalableEvaluationDefinitionV1;
|
|
575
|
+
readonly adapter: MultiDomainEnvironmentAdapterV1;
|
|
576
|
+
readonly abortSignal?: {
|
|
577
|
+
readonly aborted: boolean;
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
/** Typed helper for observation validation at the accounting boundary. */
|
|
581
|
+
export interface ScalableEvaluationPartialObservationInputV1 {
|
|
582
|
+
readonly accounting: Omit<ScalableEvaluationAccountingInputV1, "kind" | "interactionCount" | "messageCount" | "messageBytes" | "observationCount" | "observationCountsByDomain" | "actionCount" | "successfulOutcomeCount" | "failedOutcomeCount">;
|
|
583
|
+
readonly peerIndex: number;
|
|
584
|
+
readonly delivery: ShardedSimulationPartialObservationDeliveryV1;
|
|
585
|
+
readonly observations: readonly MultiDomainObservationEnvelopeV1[];
|
|
586
|
+
}
|
|
587
|
+
/** A bounded logical work item. Schedules are intentionally sparse at every scale. */
|
|
588
|
+
export interface ScalableEvaluationRunnerStepV1 {
|
|
589
|
+
readonly schemaVersion: 1;
|
|
590
|
+
readonly peerIndex: number;
|
|
591
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
592
|
+
readonly cursor: string | null;
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Baselines are evaluator inputs, not team inputs. A perturbation requires one
|
|
596
|
+
* baseline for every targeted team/domain pair before execution starts.
|
|
597
|
+
*/
|
|
598
|
+
export interface ScalableEvaluationRunnerRecoveryBaselineV1 {
|
|
599
|
+
readonly schemaVersion: 1;
|
|
600
|
+
readonly baselineId: string;
|
|
601
|
+
readonly teamId: string;
|
|
602
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
603
|
+
readonly metrics: readonly ScalableEvaluationMetricTargetV1[];
|
|
604
|
+
}
|
|
605
|
+
export type ScalableEvaluationEvidenceKindV1 = "perturbation_injection" | "recovery_measurement";
|
|
606
|
+
export interface ScalableEvaluationEvidenceProviderAuthorizationV1 {
|
|
607
|
+
readonly schemaVersion: 1;
|
|
608
|
+
readonly authorizationId: string;
|
|
609
|
+
readonly providerId: string;
|
|
610
|
+
readonly keyId: string;
|
|
611
|
+
readonly algorithm: "Ed25519";
|
|
612
|
+
readonly status: "active" | "revoked";
|
|
613
|
+
readonly evidenceKinds: readonly ScalableEvaluationEvidenceKindV1[];
|
|
614
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
615
|
+
readonly scenarioManifestDigest: PlanningDigestV1;
|
|
616
|
+
readonly adapterDescriptorDigest: PlanningDigestV1;
|
|
617
|
+
readonly teamIds: readonly string[];
|
|
618
|
+
readonly authorizationDigest: PlanningDigestV1;
|
|
619
|
+
}
|
|
620
|
+
export interface ScalableEvaluationEvidenceAuthorizationResolverV1 {
|
|
621
|
+
resolve(input: {
|
|
622
|
+
readonly providerId: string;
|
|
623
|
+
readonly keyId: string;
|
|
624
|
+
readonly authorizationDigest: PlanningDigestV1;
|
|
625
|
+
}): Promise<ScalableEvaluationEvidenceProviderAuthorizationV1 | null>;
|
|
626
|
+
}
|
|
627
|
+
export interface ScalableEvaluationEvidencePublicKeyResolverV1 {
|
|
628
|
+
resolve(input: {
|
|
629
|
+
readonly providerId: string;
|
|
630
|
+
readonly keyId: string;
|
|
631
|
+
readonly algorithm: "Ed25519";
|
|
632
|
+
}): Promise<CryptoKey | null>;
|
|
633
|
+
}
|
|
634
|
+
export interface ScalableEvaluationEvidenceSignerV1 {
|
|
635
|
+
sign(input: {
|
|
636
|
+
readonly providerId: string;
|
|
637
|
+
readonly keyId: string;
|
|
638
|
+
readonly algorithm: "Ed25519";
|
|
639
|
+
readonly evidenceDigest: PlanningDigestV1;
|
|
640
|
+
}): Promise<string>;
|
|
641
|
+
}
|
|
642
|
+
export interface ScalableEvaluationEvidenceProofV1 {
|
|
643
|
+
readonly algorithm: "Ed25519";
|
|
644
|
+
readonly providerId: string;
|
|
645
|
+
readonly keyId: string;
|
|
646
|
+
readonly authorizationDigest: PlanningDigestV1;
|
|
647
|
+
/** Detached Ed25519 signature encoded as unpadded base64url. */
|
|
648
|
+
readonly value: string;
|
|
649
|
+
}
|
|
650
|
+
export interface ScalableEvaluationEvidenceVerifierV1 {
|
|
651
|
+
verify(input: {
|
|
652
|
+
readonly evidenceKind: ScalableEvaluationEvidenceKindV1;
|
|
653
|
+
readonly definition: ScalableEvaluationDefinitionV1;
|
|
654
|
+
readonly teamId: string;
|
|
655
|
+
readonly evidenceDigest: PlanningDigestV1;
|
|
656
|
+
readonly proof: ScalableEvaluationEvidenceProofV1;
|
|
657
|
+
}): Promise<boolean>;
|
|
658
|
+
}
|
|
659
|
+
/** Provider measurement; its signature binds the exact recovery sample scope. */
|
|
660
|
+
export interface ScalableEvaluationRecoveryMeasurementReceiptV1 {
|
|
661
|
+
readonly schemaVersion: 1;
|
|
662
|
+
readonly sampleId: string;
|
|
663
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
664
|
+
readonly scenarioManifestDigest: PlanningDigestV1;
|
|
665
|
+
readonly adapterDescriptorDigest: PlanningDigestV1;
|
|
666
|
+
readonly perturbationId: string;
|
|
667
|
+
readonly perturbationConfigurationDigest: PlanningDigestV1;
|
|
668
|
+
readonly teamId: string;
|
|
669
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
670
|
+
readonly sessionId: string;
|
|
671
|
+
readonly episodeId: string;
|
|
672
|
+
readonly scheduledAtLogicalTime: number;
|
|
673
|
+
readonly logicalTime: number;
|
|
674
|
+
readonly metrics: readonly Readonly<{
|
|
675
|
+
readonly metricId: string;
|
|
676
|
+
readonly valueBasisPoints: number;
|
|
677
|
+
}>[];
|
|
678
|
+
readonly sourceEvidenceDigest: PlanningDigestV1;
|
|
679
|
+
readonly providerId: string;
|
|
680
|
+
readonly keyId: string;
|
|
681
|
+
readonly authorizationDigest: PlanningDigestV1;
|
|
682
|
+
readonly algorithm: "Ed25519";
|
|
683
|
+
readonly evidenceDigest: PlanningDigestV1;
|
|
684
|
+
readonly proof: ScalableEvaluationEvidenceProofV1;
|
|
685
|
+
readonly receiptDigest: PlanningDigestV1;
|
|
686
|
+
}
|
|
687
|
+
/** Runtime provider port; returned measurements require concrete verification. */
|
|
688
|
+
export interface ScalableEvaluationRecoveryMetricPortV1 {
|
|
689
|
+
sampleV1(input: {
|
|
690
|
+
readonly definition: ScalableEvaluationDefinitionV1;
|
|
691
|
+
readonly perturbation: ScalableEvaluationPerturbationV1;
|
|
692
|
+
readonly teamId: string;
|
|
693
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
694
|
+
readonly sampleId: string;
|
|
695
|
+
readonly sessionId: string;
|
|
696
|
+
readonly episodeId: string;
|
|
697
|
+
readonly logicalTime: number;
|
|
698
|
+
}): ScalableEvaluationRecoveryMeasurementReceiptV1 | Promise<ScalableEvaluationRecoveryMeasurementReceiptV1>;
|
|
699
|
+
}
|
|
700
|
+
export interface ScalableEvaluationResumableRecoveryMetricPortV1 extends ScalableEvaluationRecoveryMetricPortV1 {
|
|
701
|
+
readonly restartDurabilityV1: ScalableEvaluationRestartDurabilityDeclarationV1;
|
|
702
|
+
reconcileSampleV1(input: {
|
|
703
|
+
readonly operationId: string;
|
|
704
|
+
readonly definition: ScalableEvaluationDefinitionV1;
|
|
705
|
+
readonly perturbation: ScalableEvaluationPerturbationV1;
|
|
706
|
+
readonly teamId: string;
|
|
707
|
+
readonly domain: ScalableEvaluationDomainV1;
|
|
708
|
+
readonly sampleId: string;
|
|
709
|
+
readonly sessionId: string;
|
|
710
|
+
readonly episodeId: string;
|
|
711
|
+
readonly logicalTime: number;
|
|
712
|
+
}): ScalableEvaluationRecoveryMeasurementReceiptV1 | Promise<ScalableEvaluationRecoveryMeasurementReceiptV1>;
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Receipt returned by the simulation provider after it has actually applied a
|
|
716
|
+
* scheduled perturbation. The runner records the receipt digest as evidence;
|
|
717
|
+
* it never fabricates an injection observation from the evaluation plan.
|
|
718
|
+
*/
|
|
719
|
+
export interface ScalableEvaluationPerturbationInjectionReceiptV1 {
|
|
720
|
+
readonly schemaVersion: 1;
|
|
721
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
722
|
+
readonly scenarioManifestDigest: PlanningDigestV1;
|
|
723
|
+
readonly adapterDescriptorDigest: PlanningDigestV1;
|
|
724
|
+
readonly perturbationId: string;
|
|
725
|
+
readonly teamId: string;
|
|
726
|
+
readonly perturbationConfigurationDigest: PlanningDigestV1;
|
|
727
|
+
readonly sessionId: string;
|
|
728
|
+
readonly episodeId: string;
|
|
729
|
+
readonly scheduledAtLogicalTime: number;
|
|
730
|
+
readonly injectedAtLogicalTime: number;
|
|
731
|
+
readonly accepted: true;
|
|
732
|
+
readonly sourceEvidenceDigest: PlanningDigestV1;
|
|
733
|
+
readonly providerId: string;
|
|
734
|
+
readonly keyId: string;
|
|
735
|
+
readonly authorizationDigest: PlanningDigestV1;
|
|
736
|
+
readonly algorithm: "Ed25519";
|
|
737
|
+
readonly evidenceDigest: PlanningDigestV1;
|
|
738
|
+
readonly proof: ScalableEvaluationEvidenceProofV1;
|
|
739
|
+
readonly receiptDigest: PlanningDigestV1;
|
|
740
|
+
}
|
|
741
|
+
/** Provider-neutral simulation control surface for real fault injection. */
|
|
742
|
+
export interface ScalableEvaluationPerturbationPortV1 {
|
|
743
|
+
injectV1(input: {
|
|
744
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
745
|
+
readonly perturbation: ScalableEvaluationPerturbationV1;
|
|
746
|
+
readonly teamId: string;
|
|
747
|
+
readonly sessionId: string;
|
|
748
|
+
readonly episodeId: string;
|
|
749
|
+
readonly logicalTime: number;
|
|
750
|
+
}): ScalableEvaluationPerturbationInjectionReceiptV1 | Promise<ScalableEvaluationPerturbationInjectionReceiptV1>;
|
|
751
|
+
}
|
|
752
|
+
export interface ScalableEvaluationResumablePerturbationPortV1 extends ScalableEvaluationPerturbationPortV1 {
|
|
753
|
+
readonly restartDurabilityV1: ScalableEvaluationRestartDurabilityDeclarationV1;
|
|
754
|
+
reconcileInjectionV1(input: {
|
|
755
|
+
readonly operationId: string;
|
|
756
|
+
readonly evaluationDefinitionDigest: PlanningDigestV1;
|
|
757
|
+
readonly perturbation: ScalableEvaluationPerturbationV1;
|
|
758
|
+
readonly teamId: string;
|
|
759
|
+
readonly sessionId: string;
|
|
760
|
+
readonly episodeId: string;
|
|
761
|
+
readonly logicalTime: number;
|
|
762
|
+
}): ScalableEvaluationPerturbationInjectionReceiptV1 | Promise<ScalableEvaluationPerturbationInjectionReceiptV1>;
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* Provider-neutral action fencing supplied by the embedding application.
|
|
766
|
+
* There is deliberately no synthetic runner-owned fallback.
|
|
767
|
+
*/
|
|
768
|
+
export interface ScalableEvaluationActionAuthorityV1 {
|
|
769
|
+
issueV1(input: {
|
|
770
|
+
readonly teamId: string;
|
|
771
|
+
readonly peerIndex: number;
|
|
772
|
+
readonly logicalTime: number;
|
|
773
|
+
readonly actionIndex: number;
|
|
774
|
+
readonly sessionId: string;
|
|
775
|
+
readonly episodeId: string;
|
|
776
|
+
}): {
|
|
777
|
+
readonly executionEpoch: number;
|
|
778
|
+
readonly fenceToken: string;
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
export interface ScalableEvaluationResumableActionAuthorityV1 extends ScalableEvaluationActionAuthorityV1 {
|
|
782
|
+
readonly restartDurabilityV1: ScalableEvaluationRestartDurabilityDeclarationV1;
|
|
783
|
+
reconcileV1(input: {
|
|
784
|
+
readonly operationId: string;
|
|
785
|
+
readonly teamId: string;
|
|
786
|
+
readonly peerIndex: number;
|
|
787
|
+
readonly logicalTime: number;
|
|
788
|
+
readonly actionIndex: number;
|
|
789
|
+
readonly sessionId: string;
|
|
790
|
+
readonly episodeId: string;
|
|
791
|
+
}): {
|
|
792
|
+
readonly executionEpoch: number;
|
|
793
|
+
readonly fenceToken: string;
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
export interface ScalableEvaluationExecutionResultV1 {
|
|
797
|
+
readonly schemaVersion: 1;
|
|
798
|
+
readonly status: "completed" | "cancelled" | "budget_exhausted";
|
|
799
|
+
readonly processedSteps: number;
|
|
800
|
+
/** One isolated, equal-seed environment state per compared team. */
|
|
801
|
+
readonly teamEnvironments: readonly ScalableEvaluationTeamEnvironmentBindingV1[];
|
|
802
|
+
readonly traceDigest: PlanningDigestV1;
|
|
803
|
+
readonly snapshot: ScalableEvaluationSnapshotV1;
|
|
804
|
+
readonly comparison: ScalableEvaluationComparisonV1;
|
|
805
|
+
readonly resultDigest: PlanningDigestV1;
|
|
806
|
+
}
|
|
807
|
+
export interface ScalableEvaluationRunnerInputV1 {
|
|
808
|
+
readonly definition: ScalableEvaluationDefinitionV1;
|
|
809
|
+
readonly adapter: MultiDomainEnvironmentAdapterV1;
|
|
810
|
+
readonly ports: readonly [
|
|
811
|
+
ScalableEvaluationTeamPortV1,
|
|
812
|
+
ScalableEvaluationTeamPortV1
|
|
813
|
+
];
|
|
814
|
+
readonly shardCount: number;
|
|
815
|
+
readonly steps: readonly ScalableEvaluationRunnerStepV1[];
|
|
816
|
+
readonly recoveryBaselines?: readonly ScalableEvaluationRunnerRecoveryBaselineV1[];
|
|
817
|
+
readonly recoveryMetrics?: ScalableEvaluationRecoveryMetricPortV1;
|
|
818
|
+
readonly perturbationPort?: ScalableEvaluationPerturbationPortV1;
|
|
819
|
+
readonly evidenceVerifier?: ScalableEvaluationEvidenceVerifierV1;
|
|
820
|
+
readonly actionAuthority?: ScalableEvaluationActionAuthorityV1;
|
|
821
|
+
/** Both values are required together and select restart-durable execution. */
|
|
822
|
+
readonly durableStore?: ScalableEvaluationDurableCheckpointStoreV1;
|
|
823
|
+
readonly runId?: string;
|
|
824
|
+
readonly abortSignal?: {
|
|
825
|
+
readonly aborted: boolean;
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
export interface ScalableEvaluationTeamEnvironmentBindingV1 {
|
|
829
|
+
readonly schemaVersion: 1;
|
|
830
|
+
readonly teamId: string;
|
|
831
|
+
readonly sessionDigest: PlanningDigestV1;
|
|
832
|
+
readonly episodeDigest: PlanningDigestV1;
|
|
833
|
+
readonly bindingDigest: PlanningDigestV1;
|
|
834
|
+
}
|
|
835
|
+
//# sourceMappingURL=scalable-evaluation-contracts.d.ts.map
|