pi-worker-graph 0.1.0-dev.0

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.
Files changed (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +455 -0
  3. package/SECURITY.md +54 -0
  4. package/dist/config.d.ts +25 -0
  5. package/dist/config.d.ts.map +1 -0
  6. package/dist/config.js +181 -0
  7. package/dist/config.js.map +1 -0
  8. package/dist/context.d.ts +22 -0
  9. package/dist/context.d.ts.map +1 -0
  10. package/dist/context.js +81 -0
  11. package/dist/context.js.map +1 -0
  12. package/dist/coordination.d.ts +19 -0
  13. package/dist/coordination.d.ts.map +1 -0
  14. package/dist/coordination.js +267 -0
  15. package/dist/coordination.js.map +1 -0
  16. package/dist/execution-failure.d.ts +42 -0
  17. package/dist/execution-failure.d.ts.map +1 -0
  18. package/dist/execution-failure.js +90 -0
  19. package/dist/execution-failure.js.map +1 -0
  20. package/dist/extension.d.ts +8 -0
  21. package/dist/extension.d.ts.map +1 -0
  22. package/dist/extension.js +641 -0
  23. package/dist/extension.js.map +1 -0
  24. package/dist/graph.d.ts +44 -0
  25. package/dist/graph.d.ts.map +1 -0
  26. package/dist/graph.js +292 -0
  27. package/dist/graph.js.map +1 -0
  28. package/dist/index.d.ts +16 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +8 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/json.d.ts +9 -0
  33. package/dist/json.d.ts.map +1 -0
  34. package/dist/json.js +66 -0
  35. package/dist/json.js.map +1 -0
  36. package/dist/orchestrator.d.ts +15 -0
  37. package/dist/orchestrator.d.ts.map +1 -0
  38. package/dist/orchestrator.js +473 -0
  39. package/dist/orchestrator.js.map +1 -0
  40. package/dist/output.d.ts +61 -0
  41. package/dist/output.d.ts.map +1 -0
  42. package/dist/output.js +248 -0
  43. package/dist/output.js.map +1 -0
  44. package/dist/pi-subprocess.d.ts +92 -0
  45. package/dist/pi-subprocess.d.ts.map +1 -0
  46. package/dist/pi-subprocess.js +897 -0
  47. package/dist/pi-subprocess.js.map +1 -0
  48. package/dist/run.d.ts +89 -0
  49. package/dist/run.d.ts.map +1 -0
  50. package/dist/run.js +562 -0
  51. package/dist/run.js.map +1 -0
  52. package/dist/store.d.ts +331 -0
  53. package/dist/store.d.ts.map +1 -0
  54. package/dist/store.js +1993 -0
  55. package/dist/store.js.map +1 -0
  56. package/dist/usage.d.ts +35 -0
  57. package/dist/usage.d.ts.map +1 -0
  58. package/dist/usage.js +88 -0
  59. package/dist/usage.js.map +1 -0
  60. package/docs/DECISIONS.md +221 -0
  61. package/docs/DESIGN.md +392 -0
  62. package/docs/NEXT.md +229 -0
  63. package/docs/PLAN.md +203 -0
  64. package/docs/worker-graph.example.json +12 -0
  65. package/extensions/index.ts +1 -0
  66. package/extensions/tsconfig.json +11 -0
  67. package/package.json +66 -0
@@ -0,0 +1,331 @@
1
+ import type { NodeStatus, NormalizedGraph } from "./graph.js";
2
+ import type { JsonValue } from "./json.js";
3
+ import type { NodeOutput } from "./output.js";
4
+ import type { TaskUsage } from "./usage.js";
5
+ export type { JsonValue } from "./json.js";
6
+ export declare const RUN_STORE_MAX_RECORD_BYTES: number;
7
+ export declare const RUN_STORE_DEFAULT_MAX_RUNS = 64;
8
+ export declare const RUN_STORE_MAX_RUNS = 256;
9
+ export declare const RUN_COORDINATION_MAX_TEXT_BYTES: number;
10
+ /** Bound for one path or symbol, matching the report path bound. */
11
+ export declare const RUN_COORDINATION_MAX_ITEM_BYTES: number;
12
+ export declare const RUN_COORDINATION_MAX_ITEMS = 16;
13
+ /** Retained coordination records per run. */
14
+ export declare const RUN_COORDINATION_MAX_RECORDS = 256;
15
+ /** Bound for one requested coordination page. */
16
+ export declare const RUN_COORDINATION_MAX_READ = 256;
17
+ /**
18
+ * Serialized bound for one coordination record, checked when a record is
19
+ * published and again when it is read, so the field bounds above cannot
20
+ * combine into a record that alone exceeds a page.
21
+ */
22
+ export declare const RUN_COORDINATION_MAX_RECORD_BYTES: number;
23
+ /**
24
+ * Serialized bound for one returned coordination page. A page stops before the
25
+ * first record that would exceed it and reports a cursor, and no single record
26
+ * can reach it, so a returned page never exceeds this.
27
+ */
28
+ export declare const RUN_COORDINATION_MAX_PAGE_BYTES: number;
29
+ /**
30
+ * Length of a coordination record identifier, which is also a read cursor.
31
+ * Identifiers are fixed-width so that sorting them sorts the sequence, and the
32
+ * child tool schemas bound their cursor parameter with this.
33
+ */
34
+ export declare const RUN_COORDINATION_ID_LENGTH = 6;
35
+ export type RunStoreErrorCode = "invalid_argument" | "invalid_identifier" | "unknown_task" | "not_found" | "record_exists" | "record_too_large" | "malformed_record" | "invalid_record" | "retention_limit" | "locked" | "ownership";
36
+ export declare class RunStoreError extends Error {
37
+ readonly code: RunStoreErrorCode;
38
+ readonly recordPath: string | undefined;
39
+ constructor(code: RunStoreErrorCode, message: string, recordPath?: string);
40
+ }
41
+ export interface RunManifestTask {
42
+ readonly id: string;
43
+ readonly key: string;
44
+ readonly needs: readonly string[];
45
+ readonly payload?: JsonValue;
46
+ }
47
+ export interface RunManifest {
48
+ readonly schemaVersion: 1;
49
+ readonly kind: "run-manifest";
50
+ readonly runId: string;
51
+ readonly createdAt: string;
52
+ readonly graph: {
53
+ readonly tasks: readonly RunManifestTask[];
54
+ readonly concurrency?: number;
55
+ };
56
+ }
57
+ /**
58
+ * One unit of retained capacity, as `listRetainedRuns` reports it.
59
+ *
60
+ * A healthy run has both a directory and a slot. The two can disagree, and the
61
+ * listing names those cases rather than hiding them: a slot with no run
62
+ * directory is capacity an interrupted creation stranded, and a run directory
63
+ * with no slot is the disagreement that stops the store admitting any work at
64
+ * all. `deleteRun` resolves either by name.
65
+ */
66
+ export interface RetainedRun {
67
+ /** Absent only for a slot whose record names no readable run. */
68
+ readonly runId?: string;
69
+ /** Absent when a published run holds no capacity slot. */
70
+ readonly slot?: number;
71
+ /** Absent when no run directory was published, or none can be read. */
72
+ readonly createdAt?: string;
73
+ /** An orchestrator holds this run, so `deleteRun` refuses to remove it. */
74
+ readonly owned: boolean;
75
+ }
76
+ /**
77
+ * Exclusive ownership of one run's mutable lifecycle.
78
+ *
79
+ * The owner ID is an opaque capability held by the process that acquired the
80
+ * run. Ownership is deliberately fail-closed: an owner record left by a
81
+ * crashed process is not reclaimed by elapsed time or by inspecting a PID.
82
+ */
83
+ export interface RunOwnership {
84
+ readonly runId: string;
85
+ readonly ownerId: string;
86
+ }
87
+ export type RunEventKind = "decision" | "interface" | "risk" | "conflict" | "handoff" | "progress";
88
+ export interface RunEventRecord {
89
+ readonly schemaVersion: 1;
90
+ readonly kind: "run-event";
91
+ readonly eventId: string;
92
+ readonly runId: string;
93
+ readonly taskId: string;
94
+ readonly eventKind: RunEventKind;
95
+ readonly timestamp: string;
96
+ readonly message: string;
97
+ readonly paths?: readonly string[];
98
+ readonly symbols?: readonly string[];
99
+ readonly recipients?: readonly string[];
100
+ }
101
+ export interface PublishRunEvent {
102
+ readonly taskId: string;
103
+ readonly eventKind: RunEventKind;
104
+ readonly message: string;
105
+ readonly paths?: readonly string[];
106
+ readonly symbols?: readonly string[];
107
+ readonly recipients?: readonly string[];
108
+ }
109
+ export interface RunEventQuery {
110
+ readonly cursor?: string;
111
+ readonly eventKind?: RunEventKind;
112
+ readonly recipient?: string;
113
+ readonly path?: string;
114
+ readonly symbol?: string;
115
+ readonly limit?: number;
116
+ }
117
+ export interface RunEventQueryResult {
118
+ readonly events: readonly RunEventRecord[];
119
+ readonly nextCursor?: string;
120
+ }
121
+ export interface RunMessageRecord {
122
+ readonly schemaVersion: 1;
123
+ readonly kind: "run-message";
124
+ readonly messageId: string;
125
+ readonly runId: string;
126
+ readonly senderTaskId: string;
127
+ readonly recipientTaskId: string;
128
+ readonly timestamp: string;
129
+ readonly message: string;
130
+ }
131
+ export interface PublishRunMessage {
132
+ readonly senderTaskId: string;
133
+ readonly recipientTaskId: string;
134
+ readonly message: string;
135
+ }
136
+ export interface RunMessageQuery {
137
+ readonly cursor?: string;
138
+ readonly limit?: number;
139
+ }
140
+ export interface RunMessageQueryResult {
141
+ readonly messages: readonly RunMessageRecord[];
142
+ readonly nextCursor?: string;
143
+ }
144
+ export interface NodeStateRecord {
145
+ readonly schemaVersion: 1;
146
+ readonly kind: "node-state";
147
+ readonly runId: string;
148
+ readonly taskId: string;
149
+ readonly taskKey: string;
150
+ readonly attempt: number;
151
+ readonly status: NodeStatus;
152
+ readonly updatedAt: string;
153
+ }
154
+ export type NodeOutputStatus = "succeeded" | "failed" | "aborted";
155
+ /**
156
+ * A retained text artifact is worker-authored long-form text that does not
157
+ * belong in the structured report: it is not propagated over dependency edges
158
+ * and is never parsed, only retained under the run for later review. One
159
+ * artifact belongs to one task attempt, is published under the same mutation
160
+ * lock as that attempt's output, and is removed with its run.
161
+ *
162
+ * `NODE_OUTPUT_LIMITS.maxArtifactBytes` bounds the text. JSON escaping can
163
+ * expand one byte sixfold, so that bound stays far enough beneath
164
+ * `RUN_STORE_MAX_RECORD_BYTES` that no text it admits can produce a record
165
+ * the store would then refuse to write or read back.
166
+ */
167
+ export interface NodeArtifactRecord {
168
+ readonly schemaVersion: 1;
169
+ readonly kind: "node-artifact";
170
+ readonly runId: string;
171
+ readonly taskId: string;
172
+ readonly taskKey: string;
173
+ readonly attempt: number;
174
+ readonly publishedAt: string;
175
+ readonly text: string;
176
+ }
177
+ /**
178
+ * Recorded in the output envelope so a reader learns that an artifact exists,
179
+ * and how large it is, without reading the artifact itself.
180
+ */
181
+ export interface NodeArtifactReference {
182
+ readonly bytes: number;
183
+ }
184
+ interface NodeOutputRecordBase {
185
+ readonly schemaVersion: 1;
186
+ readonly kind: "node-output";
187
+ readonly runId: string;
188
+ readonly taskId: string;
189
+ readonly taskKey: string;
190
+ readonly attempt: number;
191
+ readonly completedAt: string;
192
+ readonly artifact?: NodeArtifactReference;
193
+ /**
194
+ * What the attempt spent, when the executor accounted for it. Recorded for
195
+ * every terminal status, including aborted: an attempt the run stopped had
196
+ * still spent what it spent by then.
197
+ */
198
+ readonly usage?: TaskUsage;
199
+ readonly diagnostics?: string;
200
+ }
201
+ export type NodeOutputRecord = NodeOutputRecordBase & ({
202
+ readonly status: "succeeded";
203
+ readonly output: NodeOutput;
204
+ } | {
205
+ readonly status: "failed";
206
+ readonly output?: NodeOutput;
207
+ } | {
208
+ readonly status: "aborted";
209
+ readonly output?: never;
210
+ });
211
+ export type PublishNodeOutput = {
212
+ readonly taskId: string;
213
+ readonly status: "succeeded";
214
+ readonly output: NodeOutput;
215
+ /** Retained verbatim beside the report; never propagated downstream. */
216
+ readonly artifact?: string;
217
+ readonly usage?: TaskUsage;
218
+ readonly diagnostics?: string;
219
+ } | {
220
+ readonly taskId: string;
221
+ readonly status: "failed";
222
+ readonly output?: NodeOutput;
223
+ readonly artifact?: string;
224
+ readonly usage?: TaskUsage;
225
+ readonly diagnostics?: string;
226
+ } | {
227
+ readonly taskId: string;
228
+ readonly status: "aborted";
229
+ readonly output?: never;
230
+ readonly artifact?: never;
231
+ readonly usage?: TaskUsage;
232
+ readonly diagnostics?: string;
233
+ };
234
+ export declare function createRun<TPayload>(stateRoot: string, graph: NormalizedGraph<TPayload>, maximumRuns?: number): Promise<RunManifest>;
235
+ export declare function acquireRunOwnership(stateRoot: string, runId: string): Promise<RunOwnership>;
236
+ /**
237
+ * Names every run and every capacity slot the store retains.
238
+ *
239
+ * Cleanup is explicit and by name, so an operator has to be able to see what
240
+ * holds capacity before choosing what to give up. Reads are per run, which is
241
+ * why this is a maintenance call and not something the run lifecycle uses.
242
+ */
243
+ export declare function listRetainedRuns(stateRoot: string): Promise<readonly RetainedRun[]>;
244
+ /**
245
+ * Removes one run's directory and its capacity slot, and reports whether
246
+ * anything was there to remove.
247
+ *
248
+ * The run is named rather than selected by age or count: nothing here may
249
+ * decide on an operator's behalf which diagnostic state is worth losing. A run
250
+ * an orchestrator still holds is refused, and the mutation lock is held across
251
+ * that check so ownership cannot be acquired between it and the removal.
252
+ *
253
+ * The directory goes first and the slot second. An interruption then strands a
254
+ * slot, which the store already reports as reclaimable capacity, instead of
255
+ * leaving a published run whose slot is missing — the disagreement that stops
256
+ * the store admitting any work at all.
257
+ */
258
+ export declare function deleteRun(stateRoot: string, runId: string): Promise<boolean>;
259
+ /**
260
+ * Removes a mutation lock left behind by a task executor, and reports whether
261
+ * one was removed. Only the run's owner may recover a lock; ordinary callers
262
+ * must use the lock release returned by the mutation operation instead.
263
+ *
264
+ * `isHolderFinished` decides whether a lock that is still in place is stale.
265
+ * The graph runner passes it while workers may still be running, and answers
266
+ * only for a task of this run whose lifecycle has ended, so contention with a
267
+ * live worker is left alone rather than resolved by taking its lock away. A
268
+ * lock naming no task, or one this state root cannot attribute, is never
269
+ * recovered on that path. Omitting the predicate recovers unconditionally and
270
+ * is correct only once every task promise has settled.
271
+ */
272
+ export declare function recoverRunMutationLock(stateRoot: string, ownership: RunOwnership, isHolderFinished?: (taskId: string) => boolean): Promise<boolean>;
273
+ export declare function releaseRunOwnership(stateRoot: string, ownership: RunOwnership): Promise<void>;
274
+ export declare function readRun(stateRoot: string, runId: string): Promise<RunManifest>;
275
+ export declare function readNodeState(stateRoot: string, runId: string, taskId: string): Promise<NodeStateRecord>;
276
+ /**
277
+ * Validates and persists one graph transition. Every mutation requires the
278
+ * caller to hold the run's exclusive ownership record.
279
+ */
280
+ export declare function writeNodeState(stateRoot: string, runId: string, taskId: string, status: NodeStatus, ownership: RunOwnership): Promise<NodeStateRecord>;
281
+ export declare function publishNodeOutput(stateRoot: string, runId: string, input: PublishNodeOutput, ownership: RunOwnership): Promise<NodeOutputRecord>;
282
+ export declare function publishRunEvent(stateRoot: string, runId: string, input: PublishRunEvent): Promise<RunEventRecord>;
283
+ export declare function readRunEvents(stateRoot: string, runId: string, options?: RunEventQuery): Promise<RunEventQueryResult>;
284
+ export declare function sendRunMessage(stateRoot: string, runId: string, input: PublishRunMessage): Promise<RunMessageRecord>;
285
+ export declare function readRunMessages(stateRoot: string, runId: string, recipientTaskId: string, options?: RunMessageQuery): Promise<RunMessageQueryResult>;
286
+ /**
287
+ * Reads the retained text artifact of a task's current attempt.
288
+ *
289
+ * The artifact is only readable through the output that claims it, and only
290
+ * while that output itself agrees with the node's current state: an artifact
291
+ * left behind by an interrupted publication has no reference vouching for it,
292
+ * and is reported as inconsistent rather than returned as if it were current.
293
+ */
294
+ export declare function readNodeArtifact(stateRoot: string, runId: string, taskId: string): Promise<NodeArtifactRecord>;
295
+ /**
296
+ * How well one task's spend is known.
297
+ *
298
+ * `not_started` is not a gap in the accounting: a task that never ran spent
299
+ * nothing. `unreported` is a gap: the attempt happened and nothing recorded
300
+ * what it cost, which must never read as work that was free.
301
+ */
302
+ export type RunTaskAccounting = "reported" | "unreported" | "not_started";
303
+ export interface RunTaskUsage {
304
+ readonly taskId: string;
305
+ readonly status: NodeStatus;
306
+ readonly accounting: RunTaskAccounting;
307
+ readonly usage: TaskUsage | undefined;
308
+ }
309
+ export interface RunUsage {
310
+ readonly runId: string;
311
+ /**
312
+ * The sum across the run's attempts. `TASK_USAGE_LIMITS` bounds one
313
+ * attempt, not this: a 32-task run can legitimately total beyond them, so
314
+ * this is not a value `parseTaskUsage` would accept back.
315
+ */
316
+ readonly total: TaskUsage;
317
+ /** Tasks that ran and recorded no usage, in manifest order. */
318
+ readonly unaccounted: readonly string[];
319
+ readonly tasks: readonly RunTaskUsage[];
320
+ }
321
+ /**
322
+ * Sums what one retained run spent, from the outputs it published.
323
+ *
324
+ * Derived rather than stored, so it is correct for a run that was interrupted
325
+ * and needs no record kept in step with the outputs. A task with no readable
326
+ * output contributes nothing and is named in `unaccounted`: an unknown total
327
+ * must not read as a cheap one.
328
+ */
329
+ export declare function readRunUsage(stateRoot: string, runId: string): Promise<RunUsage>;
330
+ export declare function readNodeOutput(stateRoot: string, runId: string, taskId: string): Promise<NodeOutputRecord>;
331
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAYA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