@evomap/evolver-core 2.0.0-beta.2 → 2.0.0-beta.22
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/assets/gep/genes.jsonl +5 -5
- package/dist/algo/bans.d.ts +10 -1
- package/dist/algo/bans.js +56 -6
- package/dist/algo/candidateAssembly.d.ts +25 -2
- package/dist/algo/candidateAssembly.js +171 -26
- package/dist/algo/capabilityCandidates.js +10 -0
- package/dist/algo/conversationSniffer.js +25 -8
- package/dist/algo/cycleEngine.d.ts +63 -5
- package/dist/algo/cycleEngine.js +320 -42
- package/dist/algo/cycleFailureClassifier.d.ts +1 -1
- package/dist/algo/evolutionEvent.d.ts +26 -0
- package/dist/algo/evolutionEvent.js +32 -0
- package/dist/algo/exploration.d.ts +7 -0
- package/dist/algo/exploration.js +16 -3
- package/dist/algo/geneHealth.d.ts +36 -3
- package/dist/algo/geneHealth.js +47 -4
- package/dist/algo/geneIntake.d.ts +46 -1
- package/dist/algo/geneIntake.js +121 -10
- package/dist/algo/geneSelection.d.ts +126 -6
- package/dist/algo/geneSelection.js +479 -36
- package/dist/algo/index.d.ts +6 -1
- package/dist/algo/index.js +6 -1
- package/dist/algo/kautoProjection.d.ts +41 -0
- package/dist/algo/kautoProjection.js +95 -0
- package/dist/algo/kautoValidator.d.ts +68 -0
- package/dist/algo/kautoValidator.js +256 -0
- package/dist/algo/memoryGraph.d.ts +62 -0
- package/dist/algo/memoryGraph.js +86 -0
- package/dist/algo/orchestrator.d.ts +17 -1
- package/dist/algo/orchestrator.js +30 -4
- package/dist/algo/publishEligibility.d.ts +34 -0
- package/dist/algo/publishEligibility.js +52 -0
- package/dist/algo/solidify.d.ts +11 -2
- package/dist/algo/solidify.js +37 -7
- package/dist/algo/ucb1.d.ts +53 -0
- package/dist/algo/ucb1.js +156 -0
- package/dist/assetrepair/hubRejection.d.ts +12 -0
- package/dist/assetrepair/hubRejection.js +109 -0
- package/dist/assetrepair/index.d.ts +2 -0
- package/dist/assetrepair/index.js +2 -0
- package/dist/assetrepair/repair.d.ts +33 -0
- package/dist/assetrepair/repair.js +155 -0
- package/dist/assetstore/assetSidecarRecords.d.ts +28 -0
- package/dist/assetstore/assetSidecarRecords.js +384 -0
- package/dist/assetstore/assetSidecarRecovery.d.ts +48 -0
- package/dist/assetstore/assetSidecarRecovery.js +288 -0
- package/dist/assetstore/assetStoreHealth.d.ts +81 -0
- package/dist/assetstore/assetStoreHealth.js +319 -0
- package/dist/assetstore/assetStoreLayout.d.ts +2 -0
- package/dist/assetstore/assetStoreLayout.js +6 -0
- package/dist/assetstore/assetStoreStorage.d.ts +42 -0
- package/dist/assetstore/assetStoreStorage.js +336 -0
- package/dist/assetstore/assetSyncLedger.d.ts +91 -1
- package/dist/assetstore/assetSyncLedger.js +718 -59
- package/dist/assetstore/foreignJsonlSource.d.ts +48 -0
- package/dist/assetstore/foreignJsonlSource.js +150 -0
- package/dist/assetstore/index.d.ts +5 -0
- package/dist/assetstore/index.js +5 -0
- package/dist/assetstore/learningHistory.js +3 -3
- package/dist/assetstore/localAssetStoreSnapshot.d.ts +51 -0
- package/dist/assetstore/localAssetStoreSnapshot.js +329 -0
- package/dist/assetstore/localJsonl.d.ts +12 -1
- package/dist/assetstore/localJsonl.js +251 -42
- package/dist/assetstore/provenance.d.ts +93 -4
- package/dist/assetstore/provenance.js +368 -84
- package/dist/assetstore/provider.d.ts +63 -0
- package/dist/assetstore/provider.js +97 -6
- package/dist/assetstore/reviewFilter.d.ts +19 -1
- package/dist/assetstore/reviewFilter.js +39 -1
- package/dist/assetstore/reviewLedger.d.ts +8 -2
- package/dist/assetstore/reviewLedger.js +71 -45
- package/dist/assetstore/unionReadStore.d.ts +25 -0
- package/dist/assetstore/unionReadStore.js +119 -0
- package/dist/benchmark/antiGeneBenchmark.d.ts +2 -0
- package/dist/benchmark/antiGeneBenchmark.js +4 -3
- package/dist/benchmark/antiGeneRollout.d.ts +2 -0
- package/dist/benchmark/antiGeneRollout.js +4 -3
- package/dist/benchmark/index.d.ts +3 -1
- package/dist/benchmark/index.js +3 -1
- package/dist/benchmark/selectionFlatAbstention.d.ts +152 -0
- package/dist/benchmark/selectionFlatAbstention.js +481 -0
- package/dist/benchmark/triggerShift.d.ts +62 -0
- package/dist/benchmark/triggerShift.js +106 -0
- package/dist/bootstrap/envFingerprint.d.ts +9 -0
- package/dist/bootstrap/envFingerprint.js +5 -0
- package/dist/bootstrap/index.d.ts +3 -1
- package/dist/bootstrap/index.js +3 -1
- package/dist/bootstrap/lifecycleBootstrap.d.ts +111 -0
- package/dist/bootstrap/lifecycleBootstrap.js +433 -0
- package/dist/bootstrap/v1EnvCompat.d.ts +113 -0
- package/dist/bootstrap/v1EnvCompat.js +303 -0
- package/dist/events/eventArchive.d.ts +2 -0
- package/dist/events/eventArchive.js +13 -3
- package/dist/events/eventSchema.d.ts +7 -7
- package/dist/events/eventStore.d.ts +2 -0
- package/dist/events/eventStore.js +5 -1
- package/dist/events/ingest.d.ts +2 -1
- package/dist/events/ingest.js +15 -0
- package/dist/events/paths.d.ts +12 -10
- package/dist/events/paths.js +24 -20
- package/dist/events/public.d.ts +2 -2
- package/dist/events/public.js +2 -2
- package/dist/events/reports.d.ts +2 -0
- package/dist/events/reports.js +4 -0
- package/dist/exec/autoExec.d.ts +68 -4
- package/dist/exec/autoExec.js +392 -33
- package/dist/exec/autonomousCycle.d.ts +31 -4
- package/dist/exec/autonomousCycle.js +71 -13
- package/dist/exec/claudeBridge.d.ts +80 -15
- package/dist/exec/claudeBridge.js +845 -76
- package/dist/exec/executionBinding.d.ts +414 -0
- package/dist/exec/executionBinding.js +588 -0
- package/dist/exec/index.d.ts +1 -0
- package/dist/exec/index.js +1 -0
- package/dist/exec/openPrRegistry.d.ts +8 -2
- package/dist/exec/openPrRegistry.js +32 -22
- package/dist/exec/prompt.js +14 -1
- package/dist/exec/proofOfWork.d.ts +1 -1
- package/dist/exec/proofOfWork.js +2 -2
- package/dist/exec/runnerRegistry.d.ts +153 -36
- package/dist/exec/runnerRegistry.js +848 -65
- package/dist/exec/selfPr.js +1 -7
- package/dist/feedback/envelope.d.ts +61 -0
- package/dist/feedback/envelope.js +168 -0
- package/dist/feedback/index.d.ts +1 -0
- package/dist/feedback/index.js +1 -0
- package/dist/hooks/hooks.js +1 -0
- package/dist/hub/assetCallLog.d.ts +35 -1
- package/dist/hub/assetCallLog.js +124 -1
- package/dist/hub/bindings.d.ts +8 -1
- package/dist/hub/bindings.js +29 -8
- package/dist/hub/capability.d.ts +130 -4
- package/dist/hub/conversationDistiller.d.ts +19 -0
- package/dist/hub/conversationDistiller.js +115 -37
- package/dist/hub/fake.d.ts +3 -2
- package/dist/hub/fake.js +2 -1
- package/dist/hub/index.d.ts +1 -0
- package/dist/hub/index.js +1 -0
- package/dist/hub/questionGenerator.d.ts +5 -1
- package/dist/hub/questionGenerator.js +8 -6
- package/dist/hub/recipeCompose.d.ts +27 -0
- package/dist/hub/recipeCompose.js +90 -0
- package/dist/hub/sanitize.js +122 -7
- package/dist/index.d.ts +6 -1
- package/dist/index.js +7 -1
- package/dist/issueReporter/index.d.ts +156 -0
- package/dist/issueReporter/index.js +1688 -0
- package/dist/mailbox/dispatch.d.ts +1 -1
- package/dist/mailbox/dispatch.js +22 -6
- package/dist/mailbox/envelope.d.ts +7 -1
- package/dist/mailbox/envelope.js +9 -2
- package/dist/mailbox/ipcServer.d.ts +12 -2
- package/dist/mailbox/ipcServer.js +183 -13
- package/dist/mailbox/store.d.ts +89 -3
- package/dist/mailbox/store.js +895 -41
- package/dist/modelCompatibility.d.ts +164 -0
- package/dist/modelCompatibility.js +309 -0
- package/dist/observers/valueDigestObserver.d.ts +9 -0
- package/dist/observers/valueDigestObserver.js +35 -2
- package/dist/ops/cleanup.js +1 -1
- package/dist/ops/evolutionGraphProjection.d.ts +20 -0
- package/dist/ops/evolutionGraphProjection.js +315 -0
- package/dist/ops/index.d.ts +2 -1
- package/dist/ops/index.js +2 -1
- package/dist/ops/savingsCore.js +1 -2
- package/dist/ops/selfUpdate.d.ts +18 -1
- package/dist/ops/selfUpdate.js +88 -23
- package/dist/ops/valueOutreach.d.ts +3 -1
- package/dist/ops/valueOutreach.js +5 -1
- package/dist/personality/schema.d.ts +24 -24
- package/dist/schema/evolutionGraph.d.ts +784 -0
- package/dist/schema/evolutionGraph.js +187 -0
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -0
- package/dist/schema/proofOfWork.d.ts +125 -6
- package/dist/schema/proofOfWork.js +102 -4
- package/dist/schema/signal.d.ts +3 -3
- package/dist/schema/signal.js +1 -1
- package/dist/shadow/shadowHub.js +1 -0
- package/dist/signals/curriculum.d.ts +55 -0
- package/dist/signals/curriculum.js +202 -0
- package/dist/signals/cycleHistoryFromEvents.js +17 -8
- package/dist/signals/expand.d.ts +15 -1
- package/dist/signals/expand.js +169 -1
- package/dist/signals/extractor.d.ts +2 -2
- package/dist/signals/extractor.js +31 -6
- package/dist/signals/index.d.ts +4 -1
- package/dist/signals/index.js +4 -1
- package/dist/signals/metaSignals.d.ts +4 -0
- package/dist/signals/metaSignals.js +42 -0
- package/dist/signals/scopeVocabulary.d.ts +75 -0
- package/dist/signals/scopeVocabulary.js +91 -0
- package/dist/signals/signalGate.js +1 -1
- package/dist/signals/taskDomain.d.ts +22 -0
- package/dist/signals/taskDomain.js +43 -0
- package/dist/strategy/constraintAblation.d.ts +64 -0
- package/dist/strategy/constraintAblation.js +2820 -0
- package/dist/strategy/constraintAblationPredicates.d.ts +31 -0
- package/dist/strategy/constraintAblationPredicates.js +339 -0
- package/dist/strategy/index.d.ts +2 -1
- package/dist/strategy/index.js +2 -1
- package/dist/trace/index.d.ts +3 -1
- package/dist/trace/index.js +3 -1
- package/dist/trace/learningTrace.d.ts +216 -0
- package/dist/trace/learningTrace.js +298 -0
- package/dist/trace/proxyTurns.d.ts +31 -0
- package/dist/trace/proxyTurns.js +137 -0
- package/dist/trace/trajectory.d.ts +8 -0
- package/dist/trace/trajectory.js +14 -2
- package/dist/util/fetchPort.d.ts +1 -0
- package/dist/util/fetchPort.js +11 -0
- package/dist/util/fileLock.d.ts +113 -7
- package/dist/util/fileLock.js +1035 -80
- package/dist/util/index.d.ts +3 -1
- package/dist/util/index.js +2 -1
- package/dist/verify/index.d.ts +2 -1
- package/dist/verify/index.js +1 -1
- package/dist/verify/sandboxRunner.d.ts +30 -0
- package/dist/verify/sandboxRunner.js +370 -27
- package/dist/verify/sandboxedValidation.d.ts +16 -2
- package/dist/verify/sandboxedValidation.js +200 -22
- package/dist/verify/validation.d.ts +35 -4
- package/dist/verify/validation.js +164 -16
- package/dist/wire/geneHints.d.ts +88 -16
- package/dist/wire/geneHints.js +124 -15
- package/dist/wire/index.d.ts +8 -3
- package/dist/wire/index.js +2 -2
- package/dist/wire/schemaGate.d.ts +21 -0
- package/dist/wire/schemaGate.js +119 -10
- package/dist/workflow/dsl.d.ts +24 -3
- package/dist/workflow/dsl.js +4 -0
- package/dist/workflow/engine.d.ts +5 -1
- package/dist/workflow/engine.js +3 -0
- package/dist/workflow/index.d.ts +3 -1
- package/dist/workflow/index.js +3 -1
- package/dist/workflow/runtime.d.ts +110 -0
- package/dist/workflow/runtime.js +1298 -0
- package/dist/workflow/stateStore.d.ts +172 -0
- package/dist/workflow/stateStore.js +1044 -0
- package/package.json +12 -4
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Ingestor } from '../events/ingest.js';
|
|
3
|
+
import type { PolicyViolation } from './policy/constraints.js';
|
|
4
|
+
import { type ProofOfWork } from '../schema/proofOfWork.js';
|
|
5
|
+
export declare const executionBindingInputSchema: z.ZodObject<{
|
|
6
|
+
schema_version: z.ZodLiteral<"execution-binding.v1">;
|
|
7
|
+
bounty_id: z.ZodNullable<z.ZodString>;
|
|
8
|
+
task_id: z.ZodString;
|
|
9
|
+
claim_identity: z.ZodObject<{
|
|
10
|
+
claim_id: z.ZodString;
|
|
11
|
+
claimant_id: z.ZodString;
|
|
12
|
+
}, "strict", z.ZodTypeAny, {
|
|
13
|
+
claim_id: string;
|
|
14
|
+
claimant_id: string;
|
|
15
|
+
}, {
|
|
16
|
+
claim_id: string;
|
|
17
|
+
claimant_id: string;
|
|
18
|
+
}>;
|
|
19
|
+
lease_identity: z.ZodObject<{
|
|
20
|
+
lease_id: z.ZodString;
|
|
21
|
+
lease_expires_at: z.ZodString;
|
|
22
|
+
}, "strict", z.ZodTypeAny, {
|
|
23
|
+
lease_id: string;
|
|
24
|
+
lease_expires_at: string;
|
|
25
|
+
}, {
|
|
26
|
+
lease_id: string;
|
|
27
|
+
lease_expires_at: string;
|
|
28
|
+
}>;
|
|
29
|
+
target_descriptor: z.ZodObject<{
|
|
30
|
+
repo_id: z.ZodString;
|
|
31
|
+
selector: z.ZodString;
|
|
32
|
+
expected_effect: z.ZodString;
|
|
33
|
+
base_revision: z.ZodNullable<z.ZodString>;
|
|
34
|
+
}, "strict", z.ZodTypeAny, {
|
|
35
|
+
repo_id: string;
|
|
36
|
+
selector: string;
|
|
37
|
+
expected_effect: string;
|
|
38
|
+
base_revision: string | null;
|
|
39
|
+
}, {
|
|
40
|
+
repo_id: string;
|
|
41
|
+
selector: string;
|
|
42
|
+
expected_effect: string;
|
|
43
|
+
base_revision: string | null;
|
|
44
|
+
}>;
|
|
45
|
+
target_digest: z.ZodString;
|
|
46
|
+
acceptance_spec: z.ZodObject<{
|
|
47
|
+
spec_id: z.ZodString;
|
|
48
|
+
version: z.ZodString;
|
|
49
|
+
digest: z.ZodString;
|
|
50
|
+
validation_plan_digest: z.ZodString;
|
|
51
|
+
}, "strict", z.ZodTypeAny, {
|
|
52
|
+
digest: string;
|
|
53
|
+
version: string;
|
|
54
|
+
spec_id: string;
|
|
55
|
+
validation_plan_digest: string;
|
|
56
|
+
}, {
|
|
57
|
+
digest: string;
|
|
58
|
+
version: string;
|
|
59
|
+
spec_id: string;
|
|
60
|
+
validation_plan_digest: string;
|
|
61
|
+
}>;
|
|
62
|
+
deadline: z.ZodString;
|
|
63
|
+
budget: z.ZodObject<{
|
|
64
|
+
max_credits: z.ZodNumber;
|
|
65
|
+
}, "strict", z.ZodTypeAny, {
|
|
66
|
+
max_credits: number;
|
|
67
|
+
}, {
|
|
68
|
+
max_credits: number;
|
|
69
|
+
}>;
|
|
70
|
+
resource_grant: z.ZodObject<{
|
|
71
|
+
allowed_roots: z.ZodArray<z.ZodString, "many">;
|
|
72
|
+
max_runtime_ms: z.ZodNumber;
|
|
73
|
+
max_files: z.ZodNumber;
|
|
74
|
+
max_lines: z.ZodNumber;
|
|
75
|
+
validation_commands: z.ZodArray<z.ZodString, "many">;
|
|
76
|
+
}, "strict", z.ZodTypeAny, {
|
|
77
|
+
max_files: number;
|
|
78
|
+
max_lines: number;
|
|
79
|
+
allowed_roots: string[];
|
|
80
|
+
max_runtime_ms: number;
|
|
81
|
+
validation_commands: string[];
|
|
82
|
+
}, {
|
|
83
|
+
max_files: number;
|
|
84
|
+
max_lines: number;
|
|
85
|
+
allowed_roots: string[];
|
|
86
|
+
max_runtime_ms: number;
|
|
87
|
+
validation_commands: string[];
|
|
88
|
+
}>;
|
|
89
|
+
consent_grant: z.ZodObject<{
|
|
90
|
+
grant_id: z.ZodString;
|
|
91
|
+
subject: z.ZodString;
|
|
92
|
+
scopes: z.ZodArray<z.ZodString, "many">;
|
|
93
|
+
issued_at: z.ZodString;
|
|
94
|
+
expires_at: z.ZodString;
|
|
95
|
+
target_digest: z.ZodString;
|
|
96
|
+
}, "strict", z.ZodTypeAny, {
|
|
97
|
+
expires_at: string;
|
|
98
|
+
scopes: string[];
|
|
99
|
+
grant_id: string;
|
|
100
|
+
subject: string;
|
|
101
|
+
issued_at: string;
|
|
102
|
+
target_digest: string;
|
|
103
|
+
}, {
|
|
104
|
+
expires_at: string;
|
|
105
|
+
scopes: string[];
|
|
106
|
+
grant_id: string;
|
|
107
|
+
subject: string;
|
|
108
|
+
issued_at: string;
|
|
109
|
+
target_digest: string;
|
|
110
|
+
}>;
|
|
111
|
+
correlation: z.ZodObject<{
|
|
112
|
+
run_id: z.ZodString;
|
|
113
|
+
cycle_id: z.ZodString;
|
|
114
|
+
}, "strict", z.ZodTypeAny, {
|
|
115
|
+
run_id: string;
|
|
116
|
+
cycle_id: string;
|
|
117
|
+
}, {
|
|
118
|
+
run_id: string;
|
|
119
|
+
cycle_id: string;
|
|
120
|
+
}>;
|
|
121
|
+
selected_context: z.ZodObject<{
|
|
122
|
+
gene_id: z.ZodNullable<z.ZodString>;
|
|
123
|
+
gene_asset_id: z.ZodNullable<z.ZodString>;
|
|
124
|
+
capsule_id: z.ZodNullable<z.ZodString>;
|
|
125
|
+
capsule_asset_id: z.ZodNullable<z.ZodString>;
|
|
126
|
+
context_digest: z.ZodString;
|
|
127
|
+
}, "strict", z.ZodTypeAny, {
|
|
128
|
+
capsule_id: string | null;
|
|
129
|
+
gene_id: string | null;
|
|
130
|
+
gene_asset_id: string | null;
|
|
131
|
+
capsule_asset_id: string | null;
|
|
132
|
+
context_digest: string;
|
|
133
|
+
}, {
|
|
134
|
+
capsule_id: string | null;
|
|
135
|
+
gene_id: string | null;
|
|
136
|
+
gene_asset_id: string | null;
|
|
137
|
+
capsule_asset_id: string | null;
|
|
138
|
+
context_digest: string;
|
|
139
|
+
}>;
|
|
140
|
+
}, "strict", z.ZodTypeAny, {
|
|
141
|
+
schema_version: "execution-binding.v1";
|
|
142
|
+
budget: {
|
|
143
|
+
max_credits: number;
|
|
144
|
+
};
|
|
145
|
+
target_digest: string;
|
|
146
|
+
bounty_id: string | null;
|
|
147
|
+
task_id: string;
|
|
148
|
+
claim_identity: {
|
|
149
|
+
claim_id: string;
|
|
150
|
+
claimant_id: string;
|
|
151
|
+
};
|
|
152
|
+
lease_identity: {
|
|
153
|
+
lease_id: string;
|
|
154
|
+
lease_expires_at: string;
|
|
155
|
+
};
|
|
156
|
+
target_descriptor: {
|
|
157
|
+
repo_id: string;
|
|
158
|
+
selector: string;
|
|
159
|
+
expected_effect: string;
|
|
160
|
+
base_revision: string | null;
|
|
161
|
+
};
|
|
162
|
+
acceptance_spec: {
|
|
163
|
+
digest: string;
|
|
164
|
+
version: string;
|
|
165
|
+
spec_id: string;
|
|
166
|
+
validation_plan_digest: string;
|
|
167
|
+
};
|
|
168
|
+
deadline: string;
|
|
169
|
+
resource_grant: {
|
|
170
|
+
max_files: number;
|
|
171
|
+
max_lines: number;
|
|
172
|
+
allowed_roots: string[];
|
|
173
|
+
max_runtime_ms: number;
|
|
174
|
+
validation_commands: string[];
|
|
175
|
+
};
|
|
176
|
+
consent_grant: {
|
|
177
|
+
expires_at: string;
|
|
178
|
+
scopes: string[];
|
|
179
|
+
grant_id: string;
|
|
180
|
+
subject: string;
|
|
181
|
+
issued_at: string;
|
|
182
|
+
target_digest: string;
|
|
183
|
+
};
|
|
184
|
+
correlation: {
|
|
185
|
+
run_id: string;
|
|
186
|
+
cycle_id: string;
|
|
187
|
+
};
|
|
188
|
+
selected_context: {
|
|
189
|
+
capsule_id: string | null;
|
|
190
|
+
gene_id: string | null;
|
|
191
|
+
gene_asset_id: string | null;
|
|
192
|
+
capsule_asset_id: string | null;
|
|
193
|
+
context_digest: string;
|
|
194
|
+
};
|
|
195
|
+
}, {
|
|
196
|
+
schema_version: "execution-binding.v1";
|
|
197
|
+
budget: {
|
|
198
|
+
max_credits: number;
|
|
199
|
+
};
|
|
200
|
+
target_digest: string;
|
|
201
|
+
bounty_id: string | null;
|
|
202
|
+
task_id: string;
|
|
203
|
+
claim_identity: {
|
|
204
|
+
claim_id: string;
|
|
205
|
+
claimant_id: string;
|
|
206
|
+
};
|
|
207
|
+
lease_identity: {
|
|
208
|
+
lease_id: string;
|
|
209
|
+
lease_expires_at: string;
|
|
210
|
+
};
|
|
211
|
+
target_descriptor: {
|
|
212
|
+
repo_id: string;
|
|
213
|
+
selector: string;
|
|
214
|
+
expected_effect: string;
|
|
215
|
+
base_revision: string | null;
|
|
216
|
+
};
|
|
217
|
+
acceptance_spec: {
|
|
218
|
+
digest: string;
|
|
219
|
+
version: string;
|
|
220
|
+
spec_id: string;
|
|
221
|
+
validation_plan_digest: string;
|
|
222
|
+
};
|
|
223
|
+
deadline: string;
|
|
224
|
+
resource_grant: {
|
|
225
|
+
max_files: number;
|
|
226
|
+
max_lines: number;
|
|
227
|
+
allowed_roots: string[];
|
|
228
|
+
max_runtime_ms: number;
|
|
229
|
+
validation_commands: string[];
|
|
230
|
+
};
|
|
231
|
+
consent_grant: {
|
|
232
|
+
expires_at: string;
|
|
233
|
+
scopes: string[];
|
|
234
|
+
grant_id: string;
|
|
235
|
+
subject: string;
|
|
236
|
+
issued_at: string;
|
|
237
|
+
target_digest: string;
|
|
238
|
+
};
|
|
239
|
+
correlation: {
|
|
240
|
+
run_id: string;
|
|
241
|
+
cycle_id: string;
|
|
242
|
+
};
|
|
243
|
+
selected_context: {
|
|
244
|
+
capsule_id: string | null;
|
|
245
|
+
gene_id: string | null;
|
|
246
|
+
gene_asset_id: string | null;
|
|
247
|
+
capsule_asset_id: string | null;
|
|
248
|
+
context_digest: string;
|
|
249
|
+
};
|
|
250
|
+
}>;
|
|
251
|
+
export type ExecutionBindingInput = z.infer<typeof executionBindingInputSchema>;
|
|
252
|
+
export type BindingDigest = `sha256:${string}`;
|
|
253
|
+
export type FrozenExecutionBinding = Readonly<ExecutionBindingInput & {
|
|
254
|
+
binding_digest: BindingDigest;
|
|
255
|
+
}>;
|
|
256
|
+
export type ExecutionBindingErrorCode = 'binding_malformed' | 'binding_missing' | 'binding_stale' | 'binding_mismatched' | 'binding_target_invalid' | 'binding_deadline_exceeded' | 'binding_budget_exceeded' | 'binding_resource_denied' | 'binding_consent_denied' | 'binding_acceptance_invalid' | 'binding_replay_duplicate' | 'binding_replay_unsafe' | 'binding_provenance_unavailable';
|
|
257
|
+
export declare class ExecutionBindingError extends Error {
|
|
258
|
+
readonly code: ExecutionBindingErrorCode;
|
|
259
|
+
readonly detail: string;
|
|
260
|
+
readonly unsafeToReplay: boolean;
|
|
261
|
+
constructor(code: ExecutionBindingErrorCode, detail: string, unsafeToReplay?: boolean);
|
|
262
|
+
}
|
|
263
|
+
export interface BindingExecutionContext {
|
|
264
|
+
taskId: string;
|
|
265
|
+
runId?: string;
|
|
266
|
+
cycleId?: string;
|
|
267
|
+
repoPath?: string;
|
|
268
|
+
target?: string;
|
|
269
|
+
expectedEffect?: string;
|
|
270
|
+
baseRevision?: string | null;
|
|
271
|
+
currentRevision?: string | null | Promise<string | null>;
|
|
272
|
+
allowedRoots?: readonly string[];
|
|
273
|
+
maxRuntimeMs?: number;
|
|
274
|
+
maxFiles?: number;
|
|
275
|
+
maxLines?: number;
|
|
276
|
+
now?: number | (() => number);
|
|
277
|
+
requiredConsentScope?: string;
|
|
278
|
+
authoritative?: BindingAuthorityChecks;
|
|
279
|
+
}
|
|
280
|
+
export interface BindingAuthorityChecks {
|
|
281
|
+
claimLease: (binding: FrozenExecutionBinding) => boolean | Promise<boolean>;
|
|
282
|
+
acceptanceSpec: (binding: FrozenExecutionBinding) => boolean | Promise<boolean>;
|
|
283
|
+
budget: (binding: FrozenExecutionBinding) => boolean | Promise<boolean>;
|
|
284
|
+
consent: (binding: FrozenExecutionBinding) => boolean | Promise<boolean>;
|
|
285
|
+
}
|
|
286
|
+
export interface BindingPreflightResult {
|
|
287
|
+
binding: FrozenExecutionBinding;
|
|
288
|
+
binding_digest: BindingDigest;
|
|
289
|
+
remaining_deadline_ms: number;
|
|
290
|
+
effective_allowed_roots: readonly string[];
|
|
291
|
+
}
|
|
292
|
+
export type ExecutionTerminalDisposition = 'completed' | 'denied' | 'invalid_target' | 'deadline_exceeded' | 'budget_exceeded' | 'resource_denied' | 'consent_denied' | 'timed_out' | 'cancelled' | 'crashed' | 'rejected' | 'unsafe_to_replay';
|
|
293
|
+
export interface ToolDecision {
|
|
294
|
+
tool_name: string;
|
|
295
|
+
decision: 'allowed' | 'denied';
|
|
296
|
+
status?: 'not_run' | 'started' | 'completed' | 'failed';
|
|
297
|
+
call_id?: string;
|
|
298
|
+
duration_ms?: number;
|
|
299
|
+
}
|
|
300
|
+
export interface PolicyDecision {
|
|
301
|
+
version: string;
|
|
302
|
+
allowed: boolean;
|
|
303
|
+
violations: readonly PolicyViolation[];
|
|
304
|
+
}
|
|
305
|
+
export interface ValidatorResult {
|
|
306
|
+
label: string;
|
|
307
|
+
cmd: string;
|
|
308
|
+
allowed: boolean;
|
|
309
|
+
exitCode: number | null;
|
|
310
|
+
stdoutSummary: string;
|
|
311
|
+
passed: boolean;
|
|
312
|
+
}
|
|
313
|
+
export interface ValidatorEvidence {
|
|
314
|
+
id: string;
|
|
315
|
+
version: string;
|
|
316
|
+
status: 'ran' | 'not_run';
|
|
317
|
+
reason?: 'policy_denied' | 'no_commands' | 'malformed_plan' | 'sandbox_unavailable' | 'not_configured';
|
|
318
|
+
plan_digest?: BindingDigest;
|
|
319
|
+
passed?: boolean;
|
|
320
|
+
score?: number;
|
|
321
|
+
results: readonly ValidatorResult[];
|
|
322
|
+
skipped: readonly {
|
|
323
|
+
cmd: string;
|
|
324
|
+
script: string;
|
|
325
|
+
reason: 'missing_script';
|
|
326
|
+
}[];
|
|
327
|
+
isolated: boolean;
|
|
328
|
+
}
|
|
329
|
+
export interface ProofReference {
|
|
330
|
+
kind: ProofOfWork['kind'];
|
|
331
|
+
ref?: string;
|
|
332
|
+
asset_id?: string;
|
|
333
|
+
}
|
|
334
|
+
export interface PermitDecision {
|
|
335
|
+
ok: boolean;
|
|
336
|
+
reason?: string;
|
|
337
|
+
detail?: string;
|
|
338
|
+
}
|
|
339
|
+
export interface ImmutableExecutionProvenance {
|
|
340
|
+
gene_ids: readonly string[];
|
|
341
|
+
capsule_ids: readonly string[];
|
|
342
|
+
tool_decisions: readonly ToolDecision[];
|
|
343
|
+
policy_decisions: readonly PolicyDecision[];
|
|
344
|
+
validator: ValidatorEvidence | null;
|
|
345
|
+
permit?: PermitDecision;
|
|
346
|
+
result_asset_refs: readonly string[];
|
|
347
|
+
proof_refs: readonly ProofReference[];
|
|
348
|
+
terminal_disposition: ExecutionTerminalDisposition;
|
|
349
|
+
}
|
|
350
|
+
export interface ExecutionTerminalRecord {
|
|
351
|
+
binding_digest: BindingDigest;
|
|
352
|
+
task_id: string;
|
|
353
|
+
run_id: string;
|
|
354
|
+
disposition: ExecutionTerminalDisposition;
|
|
355
|
+
final_stage?: string;
|
|
356
|
+
outcome?: {
|
|
357
|
+
status: string;
|
|
358
|
+
score: number;
|
|
359
|
+
reason?: string;
|
|
360
|
+
};
|
|
361
|
+
proof_of_work?: ProofOfWork;
|
|
362
|
+
provenance: ImmutableExecutionProvenance;
|
|
363
|
+
}
|
|
364
|
+
export type ExecutionRecovery = {
|
|
365
|
+
kind: 'new';
|
|
366
|
+
task_id: string;
|
|
367
|
+
binding_digest: BindingDigest;
|
|
368
|
+
} | {
|
|
369
|
+
kind: 'claimed';
|
|
370
|
+
task_id: string;
|
|
371
|
+
binding_digest: BindingDigest;
|
|
372
|
+
} | {
|
|
373
|
+
kind: 'created';
|
|
374
|
+
task_id: string;
|
|
375
|
+
binding_digest: BindingDigest;
|
|
376
|
+
} | {
|
|
377
|
+
kind: 'terminal';
|
|
378
|
+
task_id: string;
|
|
379
|
+
binding_digest: BindingDigest;
|
|
380
|
+
terminal: ExecutionTerminalRecord;
|
|
381
|
+
} | {
|
|
382
|
+
kind: 'unsafe_to_replay';
|
|
383
|
+
task_id: string;
|
|
384
|
+
binding_digest: BindingDigest;
|
|
385
|
+
reason: string;
|
|
386
|
+
} | {
|
|
387
|
+
kind: 'mismatched';
|
|
388
|
+
task_id: string;
|
|
389
|
+
binding_digest: BindingDigest;
|
|
390
|
+
reason: string;
|
|
391
|
+
};
|
|
392
|
+
export declare function canonicalExecutionBinding(input: ExecutionBindingInput | FrozenExecutionBinding): string;
|
|
393
|
+
export declare function computeTargetDigest(target: ExecutionBindingInput['target_descriptor']): BindingDigest;
|
|
394
|
+
export declare function computeValidationPlanDigest(commands: readonly string[]): BindingDigest;
|
|
395
|
+
export declare function computeSelectedContextDigest(context: Omit<ExecutionBindingInput['selected_context'], 'context_digest'>): BindingDigest;
|
|
396
|
+
export declare function computeExecutionBindingDigest(input: ExecutionBindingInput): BindingDigest;
|
|
397
|
+
export declare function freezeExecutionBinding(input: unknown): FrozenExecutionBinding;
|
|
398
|
+
export declare function preflightExecutionBinding(input: unknown, context: BindingExecutionContext): Promise<BindingPreflightResult>;
|
|
399
|
+
export declare class ExecutionBindingJournal {
|
|
400
|
+
private readonly ingestor;
|
|
401
|
+
private readonly lockPath;
|
|
402
|
+
constructor(ingestor: Ingestor);
|
|
403
|
+
private withLock;
|
|
404
|
+
private appendCreated;
|
|
405
|
+
claim(binding: FrozenExecutionBinding): Promise<ExecutionRecovery>;
|
|
406
|
+
recordCreated(binding: FrozenExecutionBinding): Promise<void>;
|
|
407
|
+
recordStarted(binding: FrozenExecutionBinding): Promise<void>;
|
|
408
|
+
recordDecision(bindingDigest: BindingDigest, decision: Record<string, unknown>): Promise<void>;
|
|
409
|
+
recordDecision(taskId: string, bindingDigest: BindingDigest, decision: Record<string, unknown>): Promise<void>;
|
|
410
|
+
recordTerminal(record: ExecutionTerminalRecord): Promise<void>;
|
|
411
|
+
recordRecovered(taskId: string, bindingDigest: BindingDigest, disposition: string): Promise<void>;
|
|
412
|
+
recover(taskId: string, bindingDigest?: BindingDigest): ExecutionRecovery;
|
|
413
|
+
}
|
|
414
|
+
export declare function parseExecutionTerminalRecord(input: unknown): ExecutionTerminalRecord;
|