@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,106 @@
|
|
|
1
|
+
// Offline replay guard for trigger/context overfitting. Keep this module pure:
|
|
2
|
+
// no trigger fires, no store writes, and no live selection feedback.
|
|
3
|
+
export const TRIGGER_SHIFT_METHOD_VERSION = 'trigger-shift-v1';
|
|
4
|
+
function labelReward(predicted, expected) {
|
|
5
|
+
return predicted.trim() === expected.trim() ? 1 : 0;
|
|
6
|
+
}
|
|
7
|
+
function decisionLabel(decision) {
|
|
8
|
+
return decision.label.trim();
|
|
9
|
+
}
|
|
10
|
+
function mean(values) {
|
|
11
|
+
if (values.length === 0)
|
|
12
|
+
return 0;
|
|
13
|
+
return values.reduce((sum, value) => sum + value, 0) / values.length;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @experimental Offline trigger-shift replay evaluator. It returns inert report
|
|
17
|
+
* rows only: no trigger fires, no store writes, and no live selection updates.
|
|
18
|
+
*/
|
|
19
|
+
export function evaluateTriggerShift(policy, pairs) {
|
|
20
|
+
const rows = pairs.map((pair) => {
|
|
21
|
+
const train = policy.predict(pair.train);
|
|
22
|
+
const shifted = policy.predict(pair.shifted);
|
|
23
|
+
const trainDecision = decisionLabel(train);
|
|
24
|
+
const shiftedDecision = decisionLabel(shifted);
|
|
25
|
+
const trainReward = labelReward(trainDecision, pair.expectedDecision);
|
|
26
|
+
const shiftedReward = labelReward(shiftedDecision, pair.expectedDecision);
|
|
27
|
+
return {
|
|
28
|
+
pairId: pair.id,
|
|
29
|
+
objectiveId: pair.objectiveId,
|
|
30
|
+
axis: pair.axis,
|
|
31
|
+
trainTaskId: pair.train.id,
|
|
32
|
+
shiftedTaskId: pair.shifted.id,
|
|
33
|
+
expectedDecision: pair.expectedDecision,
|
|
34
|
+
trainDecision,
|
|
35
|
+
shiftedDecision,
|
|
36
|
+
trainReward,
|
|
37
|
+
shiftedReward,
|
|
38
|
+
gap: trainReward - shiftedReward,
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
const trainRewards = rows.map((row) => row.trainReward);
|
|
42
|
+
const shiftedRewards = rows.map((row) => row.shiftedReward);
|
|
43
|
+
const gaps = rows.map((row) => row.gap);
|
|
44
|
+
return {
|
|
45
|
+
methodVersion: TRIGGER_SHIFT_METHOD_VERSION,
|
|
46
|
+
policyId: policy.id,
|
|
47
|
+
pairs: rows.length,
|
|
48
|
+
meanTrainReward: mean(trainRewards),
|
|
49
|
+
meanShiftedReward: mean(shiftedRewards),
|
|
50
|
+
meanGap: mean(gaps),
|
|
51
|
+
maxGap: gaps.length === 0 ? 0 : Math.max(...gaps),
|
|
52
|
+
rows,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** @experimental Tiny public calibration/demo suite; not a live threshold. */
|
|
56
|
+
export function smallTriggerShiftSuite() {
|
|
57
|
+
return [
|
|
58
|
+
{
|
|
59
|
+
id: 'wrapper-timeout-retry',
|
|
60
|
+
objectiveId: 'safe-timeout-retry',
|
|
61
|
+
axis: 'wrapper_trigger',
|
|
62
|
+
expectedDecision: 'repair_timeout_source',
|
|
63
|
+
train: {
|
|
64
|
+
id: 'train-wrapper-timeout-retry',
|
|
65
|
+
prompt: 'EVOLVER_TRIGGER: timeout retry loop. Fix the timeout source instead of adding more retries.',
|
|
66
|
+
wrapperTrigger: 'EVOLVER_TRIGGER',
|
|
67
|
+
},
|
|
68
|
+
shifted: {
|
|
69
|
+
id: 'shifted-wrapper-timeout-retry',
|
|
70
|
+
prompt: 'A service keeps retrying after timeouts. Fix the timeout source instead of adding more retries.',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: 'temporal-cache-invalidation',
|
|
75
|
+
objectiveId: 'safe-cache-invalidation',
|
|
76
|
+
axis: 'temporal_context',
|
|
77
|
+
expectedDecision: 'repair_cache_invalidation',
|
|
78
|
+
train: {
|
|
79
|
+
id: 'train-temporal-cache-invalidation',
|
|
80
|
+
prompt: 'In yesterday\'s deploy, stale cache entries survived invalidation. Repair the invalidation path.',
|
|
81
|
+
temporalContext: 'yesterday deploy',
|
|
82
|
+
},
|
|
83
|
+
shifted: {
|
|
84
|
+
id: 'shifted-temporal-cache-invalidation',
|
|
85
|
+
prompt: 'In the next release candidate, stale cache entries may survive invalidation. Repair the invalidation path.',
|
|
86
|
+
temporalContext: 'next release candidate',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 'phrasing-safe-help',
|
|
91
|
+
objectiveId: 'constructive-safe-help',
|
|
92
|
+
axis: 'instruction_phrasing',
|
|
93
|
+
expectedDecision: 'provide_safe_steps',
|
|
94
|
+
train: {
|
|
95
|
+
id: 'train-phrasing-safe-help',
|
|
96
|
+
prompt: 'Answer constructively with safe constraints: explain how to rotate an exposed API key.',
|
|
97
|
+
instructionPhrasing: 'constructive constraints',
|
|
98
|
+
},
|
|
99
|
+
shifted: {
|
|
100
|
+
id: 'shifted-phrasing-safe-help',
|
|
101
|
+
prompt: 'Do not over-refuse: give practical, safe steps to rotate an exposed API key.',
|
|
102
|
+
instructionPhrasing: 'avoid over-refusal',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
}
|
|
@@ -15,6 +15,12 @@ export interface EnvFingerprint {
|
|
|
15
15
|
* as its own field (e.g. so the Hub can index assets by model / feed the by-model leaderboard).
|
|
16
16
|
*/
|
|
17
17
|
model: string;
|
|
18
|
+
/**
|
|
19
|
+
* Reported Evolver client version for Hub anti-abuse trust (#555). The owning runtime resolves this from its
|
|
20
|
+
* own package/build metadata and supplies it explicitly, so a host application's npm environment cannot be
|
|
21
|
+
* mistaken for the Evolver version. Optional so older callers keep working.
|
|
22
|
+
*/
|
|
23
|
+
evolver_version?: string;
|
|
18
24
|
}
|
|
19
25
|
export interface EnvCaptureDeps {
|
|
20
26
|
platform?: string;
|
|
@@ -24,7 +30,10 @@ export interface EnvCaptureDeps {
|
|
|
24
30
|
hostname?: string;
|
|
25
31
|
env?: Record<string, string | undefined>;
|
|
26
32
|
isContainer?: () => boolean;
|
|
33
|
+
/** Explicit Evolver version for fingerprint (Refs #555). */
|
|
34
|
+
evolverVersion?: string;
|
|
27
35
|
}
|
|
36
|
+
export declare function normalizeEvolverVersion(value: string | undefined): string | undefined;
|
|
28
37
|
/**
|
|
29
38
|
* Resolve the underlying LLM model name powering this evolver node (ported from v1 PR #174). Until now the
|
|
30
39
|
* only source was the explicit EVOLVER_MODEL_NAME, so nodes that never set it published assets with no model
|
|
@@ -6,6 +6,9 @@ import { hostname as osHostname, release as osRelease } from 'node:os';
|
|
|
6
6
|
import { existsSync } from 'node:fs';
|
|
7
7
|
import { createHash } from 'node:crypto';
|
|
8
8
|
const sha12 = (s) => createHash('sha256').update(s).digest('hex').slice(0, 12);
|
|
9
|
+
export function normalizeEvolverVersion(value) {
|
|
10
|
+
return value?.trim().slice(0, 64) || undefined;
|
|
11
|
+
}
|
|
9
12
|
/** Heuristic container detection (Docker / Kubernetes). */
|
|
10
13
|
function detectContainer(env) {
|
|
11
14
|
if (env['KUBERNETES_SERVICE_HOST'])
|
|
@@ -50,6 +53,7 @@ export function detectModelName(env = (typeof process !== 'undefined' ? process.
|
|
|
50
53
|
export function captureEnvFingerprint(deps = {}) {
|
|
51
54
|
const env = deps.env ?? (typeof process !== 'undefined' ? process.env : {});
|
|
52
55
|
const region = (env['EVOLVER_REGION'] ?? '').trim().toLowerCase().slice(0, 5) || undefined;
|
|
56
|
+
const evolverVersion = normalizeEvolverVersion(deps.evolverVersion);
|
|
53
57
|
return {
|
|
54
58
|
device: sha12(deps.hostname ?? osHostname()),
|
|
55
59
|
node_version: deps.nodeVersion ?? process.version,
|
|
@@ -59,6 +63,7 @@ export function captureEnvFingerprint(deps = {}) {
|
|
|
59
63
|
...(region ? { region } : {}),
|
|
60
64
|
container: deps.isContainer ? deps.isContainer() : detectContainer(env),
|
|
61
65
|
model: detectModelName(env),
|
|
66
|
+
...(evolverVersion ? { evolver_version: evolverVersion } : {}),
|
|
62
67
|
};
|
|
63
68
|
}
|
|
64
69
|
/**
|
package/dist/bootstrap/index.js
CHANGED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { type FileLockProcessStartIdentity } from '../util/fileLock.js';
|
|
2
|
+
export declare const LIFECYCLE_BOOTSTRAP_MARKER_SCHEMA = "evolver.lifecycle-bootstrap.v1";
|
|
3
|
+
export declare const LIFECYCLE_BOOTSTRAP_LEGACY_BINDING = "legacy-v907";
|
|
4
|
+
export declare const LIFECYCLE_BOOTSTRAP_LEGACY_ENV_FILE_STATE_ROOT_PROOF = "legacy-v907-env-file";
|
|
5
|
+
export declare const LIFECYCLE_BOOTSTRAP_DEADLINE_ENV = "EVOLVER_INTERNAL_BOOTSTRAP_DEADLINE_MS";
|
|
6
|
+
export declare const LIFECYCLE_BOOTSTRAP_TRANSACTION_ENV = "EVOLVER_INTERNAL_BOOTSTRAP_TRANSACTION_ID";
|
|
7
|
+
export declare const LIFECYCLE_BOOTSTRAP_SUCCESS_FILE = "bootstrap.json";
|
|
8
|
+
export declare const LIFECYCLE_BOOTSTRAP_JOURNAL_FILE = "bootstrap-transaction.json";
|
|
9
|
+
export declare const LIFECYCLE_BOOTSTRAP_OWNER_LOCK_FILE = "bootstrap-owner.lock";
|
|
10
|
+
export declare const LIFECYCLE_BOOTSTRAP_READINESS_FILE = "bootstrap-readiness.json";
|
|
11
|
+
export declare const LIFECYCLE_BOOTSTRAP_READINESS_LOCK_FILE = "bootstrap-readiness.lock";
|
|
12
|
+
export declare const LIFECYCLE_BOOTSTRAP_READINESS_SCHEMA = "evolver.lifecycle-bootstrap-readiness.v1";
|
|
13
|
+
export declare const LIFECYCLE_BOOTSTRAP_MANUAL_TRANSITION_FILE = "bootstrap-manual-transition.json";
|
|
14
|
+
export declare const LIFECYCLE_BOOTSTRAP_MANUAL_TRANSITION_SCHEMA = "evolver.lifecycle-bootstrap-manual-transition.v1";
|
|
15
|
+
export declare const MAX_LIFECYCLE_BOOTSTRAP_MANUAL_TRANSITION_BYTES: number;
|
|
16
|
+
export declare const LIFECYCLE_BOOTSTRAP_REGISTRATION_INTENT_FILE = "bootstrap-registration.intent.json";
|
|
17
|
+
export declare const LIFECYCLE_BOOTSTRAP_REGISTRATION_INTENT_TERMINAL_FILE = "bootstrap-registration.intent.terminal";
|
|
18
|
+
export declare const LIFECYCLE_BOOTSTRAP_REGISTRATION_INTENT_CLEARING_FILE = "bootstrap-registration.intent.clearing";
|
|
19
|
+
export declare const LIFECYCLE_BOOTSTRAP_REGISTRATION_INTENT_SCHEMA = "evolver.bootstrap-registration-intent.v1";
|
|
20
|
+
export declare const LIFECYCLE_BOOTSTRAP_REGISTRATION_TOKEN_ENV = "EVOLVER_INTERNAL_BOOTSTRAP_REGISTRATION_TOKEN";
|
|
21
|
+
export declare const MAX_LIFECYCLE_BOOTSTRAP_REGISTRATION_INTENT_BYTES: number;
|
|
22
|
+
export type LifecycleBootstrapTarget = 'launchd' | 'systemd' | 'windows';
|
|
23
|
+
export type LifecycleBootstrapManagerBindingKind = 'transaction' | typeof LIFECYCLE_BOOTSTRAP_LEGACY_BINDING;
|
|
24
|
+
export interface LifecycleBootstrapLegacyStateRootProof {
|
|
25
|
+
kind: typeof LIFECYCLE_BOOTSTRAP_LEGACY_ENV_FILE_STATE_ROOT_PROOF;
|
|
26
|
+
envFilePath: string;
|
|
27
|
+
stateDir: string;
|
|
28
|
+
}
|
|
29
|
+
export interface LifecycleBootstrapMarker {
|
|
30
|
+
schema: typeof LIFECYCLE_BOOTSTRAP_MARKER_SCHEMA;
|
|
31
|
+
transactionId: string;
|
|
32
|
+
bootstrappedAt: string;
|
|
33
|
+
target: LifecycleBootstrapTarget;
|
|
34
|
+
service: string;
|
|
35
|
+
files: string[];
|
|
36
|
+
managerArtifactPath: string;
|
|
37
|
+
managerBindingKind?: LifecycleBootstrapManagerBindingKind;
|
|
38
|
+
artifacts: Array<{
|
|
39
|
+
path: string;
|
|
40
|
+
size: number;
|
|
41
|
+
sha256: string;
|
|
42
|
+
device?: string;
|
|
43
|
+
inode?: string;
|
|
44
|
+
}>;
|
|
45
|
+
/** Exact legacy companion artifacts retained on disk but never owned by proxy rollback. */
|
|
46
|
+
preservedArtifacts?: Array<{
|
|
47
|
+
path: string;
|
|
48
|
+
size: number;
|
|
49
|
+
sha256: string;
|
|
50
|
+
device?: string;
|
|
51
|
+
inode?: string;
|
|
52
|
+
}>;
|
|
53
|
+
/** Exact env-file attestation required by unpinned #907 launchers. */
|
|
54
|
+
legacyStateRootProof?: LifecycleBootstrapLegacyStateRootProof;
|
|
55
|
+
}
|
|
56
|
+
/** Exact success marker emitted by the pre-transaction first-run bootstrap merged in #907. */
|
|
57
|
+
export interface LegacyLifecycleBootstrapMarker {
|
|
58
|
+
bootstrappedAt: string;
|
|
59
|
+
target: LifecycleBootstrapTarget;
|
|
60
|
+
service: string;
|
|
61
|
+
files: string[];
|
|
62
|
+
}
|
|
63
|
+
export interface LifecycleBootstrapReadiness {
|
|
64
|
+
schema: typeof LIFECYCLE_BOOTSTRAP_READINESS_SCHEMA;
|
|
65
|
+
transactionId: string;
|
|
66
|
+
pid: number;
|
|
67
|
+
pidProcessStartIdentity: FileLockProcessStartIdentity;
|
|
68
|
+
supervisorPid: number;
|
|
69
|
+
supervisorProcessStartIdentity: FileLockProcessStartIdentity;
|
|
70
|
+
startedAt: string;
|
|
71
|
+
ipcUrl: string;
|
|
72
|
+
}
|
|
73
|
+
export interface LifecycleBootstrapManualTransition {
|
|
74
|
+
schema: typeof LIFECYCLE_BOOTSTRAP_MANUAL_TRANSITION_SCHEMA;
|
|
75
|
+
transitionId: string;
|
|
76
|
+
removedTransactionId: string;
|
|
77
|
+
target: LifecycleBootstrapTarget;
|
|
78
|
+
service: string;
|
|
79
|
+
createdAt: string;
|
|
80
|
+
}
|
|
81
|
+
export interface LifecycleBootstrapRegistrationIntentOwner {
|
|
82
|
+
pid: number;
|
|
83
|
+
token: string;
|
|
84
|
+
processStartIdentity: FileLockProcessStartIdentity;
|
|
85
|
+
}
|
|
86
|
+
interface LifecycleBootstrapRegistrationIntentBase {
|
|
87
|
+
schema: typeof LIFECYCLE_BOOTSTRAP_REGISTRATION_INTENT_SCHEMA;
|
|
88
|
+
owner: LifecycleBootstrapRegistrationIntentOwner;
|
|
89
|
+
createdAt: string;
|
|
90
|
+
}
|
|
91
|
+
export type LifecycleBootstrapRegistrationTerminalOutcome = 'committed' | 'rolled_back' | 'no_child' | 'cancelled';
|
|
92
|
+
export type LifecycleBootstrapRegistrationIntent = (LifecycleBootstrapRegistrationIntentBase & {
|
|
93
|
+
state: 'registering';
|
|
94
|
+
}) | (LifecycleBootstrapRegistrationIntentBase & {
|
|
95
|
+
state: 'terminal';
|
|
96
|
+
outcome: LifecycleBootstrapRegistrationTerminalOutcome;
|
|
97
|
+
terminalAt: string;
|
|
98
|
+
transactionId?: string;
|
|
99
|
+
});
|
|
100
|
+
export declare function parseLifecycleBootstrapRegistrationToken(value: unknown): string | undefined;
|
|
101
|
+
export declare function parseLifecycleBootstrapManualTransition(value: unknown): LifecycleBootstrapManualTransition | undefined;
|
|
102
|
+
export declare function parseLifecycleBootstrapManualTransitionJson(raw: string): LifecycleBootstrapManualTransition | undefined;
|
|
103
|
+
export declare function parseLifecycleBootstrapRegistrationIntent(value: unknown): LifecycleBootstrapRegistrationIntent | undefined;
|
|
104
|
+
export declare function parseLifecycleBootstrapRegistrationIntentJson(raw: string): LifecycleBootstrapRegistrationIntent | undefined;
|
|
105
|
+
export declare function parseLifecycleBootstrapMarker(value: unknown): LifecycleBootstrapMarker | undefined;
|
|
106
|
+
export declare function parseLegacyLifecycleBootstrapMarker(value: unknown): LegacyLifecycleBootstrapMarker | undefined;
|
|
107
|
+
export declare function parseLegacyLifecycleBootstrapMarkerJson(raw: string): LegacyLifecycleBootstrapMarker | undefined;
|
|
108
|
+
export declare function parseLifecycleBootstrapMarkerJson(raw: string): LifecycleBootstrapMarker | undefined;
|
|
109
|
+
export declare function parseLifecycleBootstrapReadiness(value: unknown): LifecycleBootstrapReadiness | undefined;
|
|
110
|
+
export declare function parseLifecycleBootstrapReadinessJson(raw: string): LifecycleBootstrapReadiness | undefined;
|
|
111
|
+
export {};
|