pi-amq 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/LICENSE +21 -0
- package/README.md +92 -0
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/dist/extension/guidance.d.ts +25 -0
- package/dist/extension/guidance.d.ts.map +1 -0
- package/dist/extension/guidance.js +121 -0
- package/dist/extension/guidance.js.map +1 -0
- package/dist/extension/guide.d.ts +30 -0
- package/dist/extension/guide.d.ts.map +1 -0
- package/dist/extension/guide.js +128 -0
- package/dist/extension/guide.js.map +1 -0
- package/dist/extension/index.d.ts +4 -0
- package/dist/extension/index.d.ts.map +1 -0
- package/dist/extension/index.js +6 -0
- package/dist/extension/index.js.map +1 -0
- package/dist/extension/runtime.d.ts +48 -0
- package/dist/extension/runtime.d.ts.map +1 -0
- package/dist/extension/runtime.js +1095 -0
- package/dist/extension/runtime.js.map +1 -0
- package/dist/extension/tools.d.ts +12 -0
- package/dist/extension/tools.d.ts.map +1 -0
- package/dist/extension/tools.js +198 -0
- package/dist/extension/tools.js.map +1 -0
- package/dist/extension/worker-runtime.d.ts +34 -0
- package/dist/extension/worker-runtime.d.ts.map +1 -0
- package/dist/extension/worker-runtime.js +974 -0
- package/dist/extension/worker-runtime.js.map +1 -0
- package/dist/extension/worker-tools.d.ts +140 -0
- package/dist/extension/worker-tools.d.ts.map +1 -0
- package/dist/extension/worker-tools.js +217 -0
- package/dist/extension/worker-tools.js.map +1 -0
- package/dist/integration/confirmed-bind-onboarding.d.ts +44 -0
- package/dist/integration/confirmed-bind-onboarding.d.ts.map +1 -0
- package/dist/integration/confirmed-bind-onboarding.js +199 -0
- package/dist/integration/confirmed-bind-onboarding.js.map +1 -0
- package/dist/integration/fleet-view.d.ts +66 -0
- package/dist/integration/fleet-view.d.ts.map +1 -0
- package/dist/integration/fleet-view.js +238 -0
- package/dist/integration/fleet-view.js.map +1 -0
- package/dist/integration/fresh-session-dispatcher.d.ts +66 -0
- package/dist/integration/fresh-session-dispatcher.d.ts.map +1 -0
- package/dist/integration/fresh-session-dispatcher.js +103 -0
- package/dist/integration/fresh-session-dispatcher.js.map +1 -0
- package/dist/integration/launch-preview.d.ts +31 -0
- package/dist/integration/launch-preview.d.ts.map +1 -0
- package/dist/integration/launch-preview.js +325 -0
- package/dist/integration/launch-preview.js.map +1 -0
- package/dist/integration/transport-port.d.ts +39 -0
- package/dist/integration/transport-port.d.ts.map +1 -0
- package/dist/integration/transport-port.js +2 -0
- package/dist/integration/transport-port.js.map +1 -0
- package/dist/integration/worker-completion-notifier.d.ts +22 -0
- package/dist/integration/worker-completion-notifier.d.ts.map +1 -0
- package/dist/integration/worker-completion-notifier.js +81 -0
- package/dist/integration/worker-completion-notifier.js.map +1 -0
- package/dist/transport/amq-cli-adapter.d.ts +41 -0
- package/dist/transport/amq-cli-adapter.d.ts.map +1 -0
- package/dist/transport/amq-cli-adapter.js +291 -0
- package/dist/transport/amq-cli-adapter.js.map +1 -0
- package/dist/transport/amq-message.d.ts +47 -0
- package/dist/transport/amq-message.d.ts.map +1 -0
- package/dist/transport/amq-message.js +173 -0
- package/dist/transport/amq-message.js.map +1 -0
- package/dist/transport/amq-operations.d.ts +105 -0
- package/dist/transport/amq-operations.d.ts.map +1 -0
- package/dist/transport/amq-operations.js +320 -0
- package/dist/transport/amq-operations.js.map +1 -0
- package/dist/transport/atomic-json.d.ts +18 -0
- package/dist/transport/atomic-json.d.ts.map +1 -0
- package/dist/transport/atomic-json.js +90 -0
- package/dist/transport/atomic-json.js.map +1 -0
- package/dist/transport/binding-resolver.d.ts +46 -0
- package/dist/transport/binding-resolver.d.ts.map +1 -0
- package/dist/transport/binding-resolver.js +389 -0
- package/dist/transport/binding-resolver.js.map +1 -0
- package/dist/transport/bridge-journal.d.ts +100 -0
- package/dist/transport/bridge-journal.d.ts.map +1 -0
- package/dist/transport/bridge-journal.js +459 -0
- package/dist/transport/bridge-journal.js.map +1 -0
- package/dist/transport/dlq-retry-audit.d.ts +28 -0
- package/dist/transport/dlq-retry-audit.d.ts.map +1 -0
- package/dist/transport/dlq-retry-audit.js +66 -0
- package/dist/transport/dlq-retry-audit.js.map +1 -0
- package/dist/transport/inbox-pump.d.ts +81 -0
- package/dist/transport/inbox-pump.d.ts.map +1 -0
- package/dist/transport/inbox-pump.js +558 -0
- package/dist/transport/inbox-pump.js.map +1 -0
- package/dist/transport/index.d.ts +12 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +12 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/presence-projector.d.ts +29 -0
- package/dist/transport/presence-projector.d.ts.map +1 -0
- package/dist/transport/presence-projector.js +73 -0
- package/dist/transport/presence-projector.js.map +1 -0
- package/dist/transport/priority-delivery-scheduler.d.ts +85 -0
- package/dist/transport/priority-delivery-scheduler.d.ts.map +1 -0
- package/dist/transport/priority-delivery-scheduler.js +210 -0
- package/dist/transport/priority-delivery-scheduler.js.map +1 -0
- package/dist/transport/receiver-lease.d.ts +102 -0
- package/dist/transport/receiver-lease.d.ts.map +1 -0
- package/dist/transport/receiver-lease.js +778 -0
- package/dist/transport/receiver-lease.js.map +1 -0
- package/dist/transport/runtime-status.d.ts +48 -0
- package/dist/transport/runtime-status.d.ts.map +1 -0
- package/dist/transport/runtime-status.js +71 -0
- package/dist/transport/runtime-status.js.map +1 -0
- package/dist/workflow/atomic-storage.d.ts +12 -0
- package/dist/workflow/atomic-storage.d.ts.map +1 -0
- package/dist/workflow/atomic-storage.js +104 -0
- package/dist/workflow/atomic-storage.js.map +1 -0
- package/dist/workflow/budget.d.ts +18 -0
- package/dist/workflow/budget.d.ts.map +1 -0
- package/dist/workflow/budget.js +74 -0
- package/dist/workflow/budget.js.map +1 -0
- package/dist/workflow/index.d.ts +17 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +17 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/lifecycle-projection.d.ts +18 -0
- package/dist/workflow/lifecycle-projection.d.ts.map +1 -0
- package/dist/workflow/lifecycle-projection.js +22 -0
- package/dist/workflow/lifecycle-projection.js.map +1 -0
- package/dist/workflow/model-fallback.d.ts +2 -0
- package/dist/workflow/model-fallback.d.ts.map +1 -0
- package/dist/workflow/model-fallback.js +17 -0
- package/dist/workflow/model-fallback.js.map +1 -0
- package/dist/workflow/pi-session-fork.d.ts +18 -0
- package/dist/workflow/pi-session-fork.d.ts.map +1 -0
- package/dist/workflow/pi-session-fork.js +80 -0
- package/dist/workflow/pi-session-fork.js.map +1 -0
- package/dist/workflow/run-artifacts.d.ts +5 -0
- package/dist/workflow/run-artifacts.d.ts.map +1 -0
- package/dist/workflow/run-artifacts.js +25 -0
- package/dist/workflow/run-artifacts.js.map +1 -0
- package/dist/workflow/run-cleanup.d.ts +70 -0
- package/dist/workflow/run-cleanup.d.ts.map +1 -0
- package/dist/workflow/run-cleanup.js +222 -0
- package/dist/workflow/run-cleanup.js.map +1 -0
- package/dist/workflow/run-gate.d.ts +43 -0
- package/dist/workflow/run-gate.d.ts.map +1 -0
- package/dist/workflow/run-gate.js +70 -0
- package/dist/workflow/run-gate.js.map +1 -0
- package/dist/workflow/run-store.d.ts +208 -0
- package/dist/workflow/run-store.d.ts.map +1 -0
- package/dist/workflow/run-store.js +2965 -0
- package/dist/workflow/run-store.js.map +1 -0
- package/dist/workflow/spawn-confirmation.d.ts +44 -0
- package/dist/workflow/spawn-confirmation.d.ts.map +1 -0
- package/dist/workflow/spawn-confirmation.js +228 -0
- package/dist/workflow/spawn-confirmation.js.map +1 -0
- package/dist/workflow/system-process-inspector.d.ts +9 -0
- package/dist/workflow/system-process-inspector.d.ts.map +1 -0
- package/dist/workflow/system-process-inspector.js +129 -0
- package/dist/workflow/system-process-inspector.js.map +1 -0
- package/dist/workflow/worker-child-extension.d.ts +3 -0
- package/dist/workflow/worker-child-extension.d.ts.map +1 -0
- package/dist/workflow/worker-child-extension.js +182 -0
- package/dist/workflow/worker-child-extension.js.map +1 -0
- package/dist/workflow/worker-gate.d.ts +74 -0
- package/dist/workflow/worker-gate.d.ts.map +1 -0
- package/dist/workflow/worker-gate.js +165 -0
- package/dist/workflow/worker-gate.js.map +1 -0
- package/dist/workflow/worker-launch.d.ts +65 -0
- package/dist/workflow/worker-launch.d.ts.map +1 -0
- package/dist/workflow/worker-launch.js +338 -0
- package/dist/workflow/worker-launch.js.map +1 -0
- package/dist/workflow/worker-model-catalog.d.ts +36 -0
- package/dist/workflow/worker-model-catalog.d.ts.map +1 -0
- package/dist/workflow/worker-model-catalog.js +105 -0
- package/dist/workflow/worker-model-catalog.js.map +1 -0
- package/dist/workflow/worker-process-supervisor.d.ts +110 -0
- package/dist/workflow/worker-process-supervisor.d.ts.map +1 -0
- package/dist/workflow/worker-process-supervisor.js +1188 -0
- package/dist/workflow/worker-process-supervisor.js.map +1 -0
- package/dist/workflow/worker-prompt-capsule.d.ts +32 -0
- package/dist/workflow/worker-prompt-capsule.d.ts.map +1 -0
- package/dist/workflow/worker-prompt-capsule.js +52 -0
- package/dist/workflow/worker-prompt-capsule.js.map +1 -0
- package/dist/workflow/worker-role-presets.d.ts +38 -0
- package/dist/workflow/worker-role-presets.d.ts.map +1 -0
- package/dist/workflow/worker-role-presets.js +201 -0
- package/dist/workflow/worker-role-presets.js.map +1 -0
- package/dist/workflow/workflow-doctor.d.ts +57 -0
- package/dist/workflow/workflow-doctor.d.ts.map +1 -0
- package/dist/workflow/workflow-doctor.js +289 -0
- package/dist/workflow/workflow-doctor.js.map +1 -0
- package/dist/workflow/workflow-lease.d.ts +125 -0
- package/dist/workflow/workflow-lease.d.ts.map +1 -0
- package/dist/workflow/workflow-lease.js +689 -0
- package/dist/workflow/workflow-lease.js.map +1 -0
- package/dist/workflow/workflow-types.d.ts +335 -0
- package/dist/workflow/workflow-types.d.ts.map +1 -0
- package/dist/workflow/workflow-types.js +11 -0
- package/dist/workflow/workflow-types.js.map +1 -0
- package/dist/workflow/workspace-paths.d.ts +4 -0
- package/dist/workflow/workspace-paths.d.ts.map +1 -0
- package/dist/workflow/workspace-paths.js +22 -0
- package/dist/workflow/workspace-paths.js.map +1 -0
- package/docs/conformance.md +116 -0
- package/docs/demo-transcript.md +34 -0
- package/docs/design.md +1481 -0
- package/docs/operator-guide.md +100 -0
- package/extension/guidance.ts +162 -0
- package/extension/guide.ts +155 -0
- package/extension/index.ts +8 -0
- package/extension/runtime.ts +1224 -0
- package/extension/tools.ts +221 -0
- package/extension/worker-runtime.ts +1150 -0
- package/extension/worker-tools.ts +276 -0
- package/integration/confirmed-bind-onboarding.ts +296 -0
- package/integration/fleet-view.ts +286 -0
- package/integration/fresh-session-dispatcher.ts +166 -0
- package/integration/launch-preview.ts +396 -0
- package/integration/transport-port.ts +29 -0
- package/integration/worker-completion-notifier.ts +98 -0
- package/package.json +55 -0
- package/roles/oracle.md +9 -0
- package/roles/researcher.md +8 -0
- package/roles/reviewer.md +9 -0
- package/roles/scout.md +8 -0
- package/roles/worker.md +10 -0
- package/scripts/demo-two-terminal.sh +59 -0
- package/skills/coordination-patterns/SKILL.md +41 -0
- package/skills/coordination-patterns/references/supervised-worker-fan-out.md +12 -0
- package/skills/coordination-patterns/references/today-mail-team.md +36 -0
- package/transport/amq-cli-adapter.ts +381 -0
- package/transport/amq-message.ts +218 -0
- package/transport/amq-operations.ts +482 -0
- package/transport/atomic-json.ts +115 -0
- package/transport/binding-resolver.ts +565 -0
- package/transport/bridge-journal.ts +588 -0
- package/transport/dlq-retry-audit.ts +97 -0
- package/transport/inbox-pump.ts +729 -0
- package/transport/index.ts +11 -0
- package/transport/presence-projector.ts +104 -0
- package/transport/priority-delivery-scheduler.ts +328 -0
- package/transport/receiver-lease.ts +945 -0
- package/transport/runtime-status.ts +112 -0
- package/workflow/.gitkeep +1 -0
- package/workflow/atomic-storage.ts +120 -0
- package/workflow/budget.ts +90 -0
- package/workflow/index.ts +16 -0
- package/workflow/lifecycle-projection.ts +37 -0
- package/workflow/model-fallback.ts +17 -0
- package/workflow/pi-session-fork.ts +96 -0
- package/workflow/run-artifacts.ts +36 -0
- package/workflow/run-cleanup.ts +315 -0
- package/workflow/run-gate.ts +122 -0
- package/workflow/run-store.ts +3890 -0
- package/workflow/spawn-confirmation.ts +305 -0
- package/workflow/system-process-inspector.ts +142 -0
- package/workflow/worker-child-extension.ts +193 -0
- package/workflow/worker-gate.ts +238 -0
- package/workflow/worker-launch.ts +485 -0
- package/workflow/worker-model-catalog.ts +165 -0
- package/workflow/worker-process-supervisor.ts +1504 -0
- package/workflow/worker-prompt-capsule.ts +81 -0
- package/workflow/worker-role-presets.ts +241 -0
- package/workflow/workflow-doctor.ts +400 -0
- package/workflow/workflow-lease.ts +905 -0
- package/workflow/workflow-types.ts +367 -0
- package/workflow/workspace-paths.ts +32 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { type WorkflowAtomicFaultInjector } from "./atomic-storage.js";
|
|
2
|
+
import type { AmbiguityId, AttemptId, AcceptanceCheck, ContractRevisionId, ModelSpec, ObjectiveContract, PeerMessageId, PeerMessageProjection, RunProjectionV2, RunSource, ReportSchemaV1, WorkerAttemptProjection, WorkerBudget, WorkerContract, WorkerContinuationProvenance, WorkerId, WorkerProjection, WorkerRequest, WorkerLaunchContractV1 } from "./workflow-types.js";
|
|
3
|
+
import { WorkflowLeaseManager, type ProcessIdentity } from "./workflow-lease.js";
|
|
4
|
+
export interface StartRunInput {
|
|
5
|
+
readonly requestKey: string;
|
|
6
|
+
readonly source: RunSource;
|
|
7
|
+
readonly objective: ObjectiveContract;
|
|
8
|
+
}
|
|
9
|
+
export type StartRunResult = {
|
|
10
|
+
readonly kind: "created";
|
|
11
|
+
readonly projection: RunProjectionV2;
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: "existing";
|
|
14
|
+
readonly projection: RunProjectionV2;
|
|
15
|
+
};
|
|
16
|
+
export interface WorkflowRunStoreOptions {
|
|
17
|
+
readonly namespaceDirectory: string;
|
|
18
|
+
readonly leaseManager: WorkflowLeaseManager;
|
|
19
|
+
readonly supervisorGeneration: string;
|
|
20
|
+
readonly randomUUID?: () => string;
|
|
21
|
+
readonly now?: () => Date;
|
|
22
|
+
readonly atomicFault?: WorkflowAtomicFaultInjector;
|
|
23
|
+
}
|
|
24
|
+
export type RunRecordDiagnostic = {
|
|
25
|
+
readonly kind: "healthy";
|
|
26
|
+
readonly directory: string;
|
|
27
|
+
readonly projection: RunProjectionV2;
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: "corrupt";
|
|
30
|
+
readonly directory: string;
|
|
31
|
+
readonly diagnostic: string;
|
|
32
|
+
};
|
|
33
|
+
export declare class RunConflictError extends Error {
|
|
34
|
+
constructor(message: string);
|
|
35
|
+
}
|
|
36
|
+
export declare class LedgerIntegrityError extends Error {
|
|
37
|
+
constructor(message: string);
|
|
38
|
+
}
|
|
39
|
+
export declare class BudgetExceededError extends Error {
|
|
40
|
+
constructor(message: string);
|
|
41
|
+
}
|
|
42
|
+
export interface PrepareWorkerIntentResult {
|
|
43
|
+
readonly kind: "created" | "existing";
|
|
44
|
+
readonly projection: RunProjectionV2;
|
|
45
|
+
readonly worker: WorkerProjection;
|
|
46
|
+
}
|
|
47
|
+
export interface PrepareAttemptResult {
|
|
48
|
+
readonly projection: RunProjectionV2;
|
|
49
|
+
readonly worker: WorkerProjection;
|
|
50
|
+
readonly attempt: WorkerAttemptProjection;
|
|
51
|
+
}
|
|
52
|
+
export declare class WorkflowRunStore {
|
|
53
|
+
#private;
|
|
54
|
+
constructor(options: WorkflowRunStoreOptions);
|
|
55
|
+
startRun(input: StartRunInput): Promise<StartRunResult>;
|
|
56
|
+
subscribe(listener: (projection: RunProjectionV2) => void): () => void;
|
|
57
|
+
readRun(requestKey: string): Promise<RunProjectionV2 | undefined>;
|
|
58
|
+
listRuns(): Promise<readonly RunProjectionV2[]>;
|
|
59
|
+
diagnoseRunRecords(): Promise<readonly RunRecordDiagnostic[]>;
|
|
60
|
+
recordWorkerIntent(inputRequestKey: string, input: {
|
|
61
|
+
readonly createdByDriverSessionId: string;
|
|
62
|
+
readonly sessionPath: string;
|
|
63
|
+
readonly request: WorkerRequest;
|
|
64
|
+
}): Promise<RunProjectionV2>;
|
|
65
|
+
prepareWorkerIntent(inputRequestKey: string, input: {
|
|
66
|
+
readonly createdByDriverSessionId: string;
|
|
67
|
+
readonly sessionPath: string;
|
|
68
|
+
readonly request: WorkerRequest;
|
|
69
|
+
readonly parentWorkerId: WorkerId | null;
|
|
70
|
+
readonly depth: number;
|
|
71
|
+
readonly continuation?: WorkerContinuationProvenance;
|
|
72
|
+
}): Promise<PrepareWorkerIntentResult>;
|
|
73
|
+
prepareReplacementAttempt(inputRequestKey: string, input: {
|
|
74
|
+
readonly workerId: WorkerId;
|
|
75
|
+
readonly model?: ModelSpec;
|
|
76
|
+
readonly fallbackReason?: string;
|
|
77
|
+
}): Promise<PrepareAttemptResult>;
|
|
78
|
+
recordAttemptStarted(inputRequestKey: string, input: {
|
|
79
|
+
readonly workerId: WorkerId;
|
|
80
|
+
readonly attemptId: AttemptId;
|
|
81
|
+
readonly workerAttemptGeneration: string;
|
|
82
|
+
readonly leaseGeneration: string;
|
|
83
|
+
readonly processIdentity: ProcessIdentity;
|
|
84
|
+
readonly launchContract: WorkerLaunchContractV1;
|
|
85
|
+
}): Promise<RunProjectionV2>;
|
|
86
|
+
recordWorkerReady(inputRequestKey: string, input: {
|
|
87
|
+
readonly workerId: WorkerId;
|
|
88
|
+
readonly attemptId: AttemptId;
|
|
89
|
+
readonly workerAttemptGeneration: string;
|
|
90
|
+
readonly sessionFile: string;
|
|
91
|
+
}): Promise<RunProjectionV2>;
|
|
92
|
+
recordAttemptUsage(inputRequestKey: string, input: {
|
|
93
|
+
readonly workerId: WorkerId;
|
|
94
|
+
readonly attemptId: AttemptId;
|
|
95
|
+
readonly workerAttemptGeneration: string;
|
|
96
|
+
readonly tokens: number;
|
|
97
|
+
readonly costUsd: number;
|
|
98
|
+
readonly outputBytes: number;
|
|
99
|
+
}): Promise<RunProjectionV2>;
|
|
100
|
+
requestWorkerCancellation(inputRequestKey: string, input: {
|
|
101
|
+
readonly workerId: WorkerId;
|
|
102
|
+
readonly reason: string;
|
|
103
|
+
}): Promise<RunProjectionV2>;
|
|
104
|
+
recordCancellationSignalSent(inputRequestKey: string, input: {
|
|
105
|
+
readonly workerId: WorkerId;
|
|
106
|
+
readonly attemptId: AttemptId;
|
|
107
|
+
readonly workerAttemptGeneration: string;
|
|
108
|
+
readonly signal: string;
|
|
109
|
+
}): Promise<RunProjectionV2>;
|
|
110
|
+
recordAttemptExit(inputRequestKey: string, input: {
|
|
111
|
+
readonly workerId: WorkerId;
|
|
112
|
+
readonly attemptId: AttemptId;
|
|
113
|
+
readonly workerAttemptGeneration: string;
|
|
114
|
+
readonly exitStatus: {
|
|
115
|
+
readonly code: number | null;
|
|
116
|
+
readonly signal: string | null;
|
|
117
|
+
};
|
|
118
|
+
readonly candidateOutcome: {
|
|
119
|
+
readonly valueOrRef: string | null;
|
|
120
|
+
readonly hash: string | null;
|
|
121
|
+
};
|
|
122
|
+
readonly uncertainSideEffects: boolean;
|
|
123
|
+
readonly reason: string;
|
|
124
|
+
}): Promise<RunProjectionV2>;
|
|
125
|
+
recordWorkerNeedsAttention(inputRequestKey: string, input: {
|
|
126
|
+
readonly workerId: WorkerId;
|
|
127
|
+
readonly attemptId: AttemptId;
|
|
128
|
+
readonly workerAttemptGeneration: string;
|
|
129
|
+
readonly reason: string;
|
|
130
|
+
readonly ambiguous: boolean;
|
|
131
|
+
}): Promise<RunProjectionV2>;
|
|
132
|
+
requestContractRevision(inputRequestKey: string, input: {
|
|
133
|
+
readonly workerId: WorkerId;
|
|
134
|
+
readonly correlation?: string;
|
|
135
|
+
readonly goal?: string;
|
|
136
|
+
readonly acceptance?: readonly string[];
|
|
137
|
+
readonly constraints?: readonly string[];
|
|
138
|
+
readonly report_schema?: ReportSchemaV1 | null;
|
|
139
|
+
readonly requires_human_approval?: boolean;
|
|
140
|
+
readonly acceptance_check?: AcceptanceCheck | null;
|
|
141
|
+
}): Promise<RunProjectionV2>;
|
|
142
|
+
recordContractRevisionDelivered(inputRequestKey: string, input: {
|
|
143
|
+
readonly workerId: WorkerId;
|
|
144
|
+
readonly revisionId: ContractRevisionId;
|
|
145
|
+
readonly boundary: "next-inference";
|
|
146
|
+
}): Promise<RunProjectionV2>;
|
|
147
|
+
recordCollectObservation(inputRequestKey: string, input: {
|
|
148
|
+
readonly workerId: WorkerId;
|
|
149
|
+
readonly structuredPayload: unknown;
|
|
150
|
+
readonly consecutiveRounds: number;
|
|
151
|
+
}): Promise<RunProjectionV2>;
|
|
152
|
+
recordSilentStall(inputRequestKey: string, input: {
|
|
153
|
+
readonly workerId: WorkerId;
|
|
154
|
+
}): Promise<RunProjectionV2>;
|
|
155
|
+
recordGateEvaluation(inputRequestKey: string, input: {
|
|
156
|
+
readonly workerId: WorkerId;
|
|
157
|
+
readonly reportMatches: boolean | null;
|
|
158
|
+
readonly acceptanceCheckExitCode: number | null;
|
|
159
|
+
readonly humanApproved: boolean | null;
|
|
160
|
+
readonly evidenceExists?: boolean;
|
|
161
|
+
}): Promise<RunProjectionV2>;
|
|
162
|
+
recordSteerDelivered(inputRequestKey: string, input: {
|
|
163
|
+
readonly workerId: WorkerId;
|
|
164
|
+
readonly messageHash: string;
|
|
165
|
+
readonly correlation?: string;
|
|
166
|
+
}): Promise<RunProjectionV2>;
|
|
167
|
+
recordWorkerWaitDeclared(inputRequestKey: string, input: {
|
|
168
|
+
readonly workerId: WorkerId;
|
|
169
|
+
readonly attemptId: AttemptId;
|
|
170
|
+
readonly workerAttemptGeneration: string;
|
|
171
|
+
readonly reason: string;
|
|
172
|
+
readonly correlation: string;
|
|
173
|
+
}): Promise<RunProjectionV2>;
|
|
174
|
+
recordPeerMessageRequested(inputRequestKey: string, input: {
|
|
175
|
+
readonly senderWorkerId: WorkerId;
|
|
176
|
+
readonly recipientWorkerId: WorkerId;
|
|
177
|
+
readonly grant: string;
|
|
178
|
+
readonly correlation: string;
|
|
179
|
+
readonly messageHash: string;
|
|
180
|
+
}): Promise<{
|
|
181
|
+
readonly projection: RunProjectionV2;
|
|
182
|
+
readonly message: PeerMessageProjection;
|
|
183
|
+
}>;
|
|
184
|
+
recordPeerMessageDelivery(inputRequestKey: string, input: {
|
|
185
|
+
readonly messageId: PeerMessageId;
|
|
186
|
+
readonly recipientWorkerId: WorkerId;
|
|
187
|
+
readonly recipientAttemptId: AttemptId;
|
|
188
|
+
readonly recipientWorkerAttemptGeneration: string;
|
|
189
|
+
readonly status: "delivered" | "indeterminate";
|
|
190
|
+
readonly diagnostic?: string;
|
|
191
|
+
}): Promise<RunProjectionV2>;
|
|
192
|
+
markAmbiguous(inputRequestKey: string, input: {
|
|
193
|
+
readonly ambiguityId?: AmbiguityId;
|
|
194
|
+
readonly reason: string;
|
|
195
|
+
readonly relatedIds: readonly string[];
|
|
196
|
+
}): Promise<RunProjectionV2>;
|
|
197
|
+
recordReconciliation(inputRequestKey: string, input: {
|
|
198
|
+
readonly ambiguityId: AmbiguityId;
|
|
199
|
+
readonly decision: string;
|
|
200
|
+
readonly evidenceRefs: readonly string[];
|
|
201
|
+
readonly workerState?: Exclude<WorkerAttemptProjection["state"], "ambiguous">;
|
|
202
|
+
}): Promise<RunProjectionV2>;
|
|
203
|
+
}
|
|
204
|
+
export declare function runDirectoryForRequest(namespaceDirectory: string, requestKey: string): string;
|
|
205
|
+
export declare function effectiveWorkerContract(worker: WorkerProjection): WorkerContract;
|
|
206
|
+
export declare function latestWorkerContract(worker: WorkerProjection): WorkerContract;
|
|
207
|
+
export declare function expectedWorkerCadenceMs(budget: WorkerBudget): number;
|
|
208
|
+
//# sourceMappingURL=run-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-store.d.ts","sourceRoot":"","sources":["../../workflow/run-store.ts"],"names":[],"mappings":"AAYA,OAAO,EAOL,KAAK,2BAA2B,EACjC,MAAM,qBAAqB,CAAC;AAC7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