@planweave-ai/runtime 0.1.2 → 0.1.4

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 (159) hide show
  1. package/dist/desktop/fileSyncApi.d.ts.map +1 -1
  2. package/dist/desktop/fileSyncApi.js +32 -10
  3. package/dist/desktop/fileSyncApi.js.map +1 -1
  4. package/dist/desktop/graph/editModel.d.ts +10 -1
  5. package/dist/desktop/graph/editModel.d.ts.map +1 -1
  6. package/dist/desktop/graph/editModel.js +9 -0
  7. package/dist/desktop/graph/editModel.js.map +1 -1
  8. package/dist/desktop/graph/resultsFileIndex.d.ts.map +1 -1
  9. package/dist/desktop/graph/resultsFileIndex.js +74 -50
  10. package/dist/desktop/graph/resultsFileIndex.js.map +1 -1
  11. package/dist/desktop/graph/searchIndexModel.d.ts.map +1 -1
  12. package/dist/desktop/graph/searchIndexModel.js +48 -4
  13. package/dist/desktop/graph/searchIndexModel.js.map +1 -1
  14. package/dist/desktop/graphApi.d.ts +1 -1
  15. package/dist/desktop/graphApi.d.ts.map +1 -1
  16. package/dist/desktop/graphApi.js +1 -1
  17. package/dist/desktop/graphApi.js.map +1 -1
  18. package/dist/desktop/index.d.ts +3 -1
  19. package/dist/desktop/index.d.ts.map +1 -1
  20. package/dist/desktop/index.js +2 -1
  21. package/dist/desktop/index.js.map +1 -1
  22. package/dist/desktop/layoutApi.d.ts +3 -5
  23. package/dist/desktop/layoutApi.d.ts.map +1 -1
  24. package/dist/desktop/layoutApi.js +2 -63
  25. package/dist/desktop/layoutApi.js.map +1 -1
  26. package/dist/desktop/projectGraphEditApi.d.ts +12 -0
  27. package/dist/desktop/projectGraphEditApi.d.ts.map +1 -0
  28. package/dist/desktop/projectGraphEditApi.js +65 -0
  29. package/dist/desktop/projectGraphEditApi.js.map +1 -0
  30. package/dist/desktop/types/graphTypes.d.ts +1 -0
  31. package/dist/desktop/types/graphTypes.d.ts.map +1 -1
  32. package/dist/errors.d.ts +13 -0
  33. package/dist/errors.d.ts.map +1 -0
  34. package/dist/errors.js +24 -0
  35. package/dist/errors.js.map +1 -0
  36. package/dist/graph/fieldEditMutation.d.ts +2 -0
  37. package/dist/graph/fieldEditMutation.d.ts.map +1 -1
  38. package/dist/graph/fieldEditMutation.js +18 -0
  39. package/dist/graph/fieldEditMutation.js.map +1 -1
  40. package/dist/index.d.ts +9 -6
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +8 -6
  43. package/dist/index.js.map +1 -1
  44. package/dist/package/loadPackage.d.ts.map +1 -1
  45. package/dist/package/loadPackage.js +4 -0
  46. package/dist/package/loadPackage.js.map +1 -1
  47. package/dist/package/manifestEdit.d.ts.map +1 -1
  48. package/dist/package/manifestEdit.js +3 -1
  49. package/dist/package/manifestEdit.js.map +1 -1
  50. package/dist/paths.d.ts.map +1 -1
  51. package/dist/paths.js +2 -10
  52. package/dist/paths.js.map +1 -1
  53. package/dist/project.d.ts +1 -0
  54. package/dist/project.d.ts.map +1 -1
  55. package/dist/project.js +11 -0
  56. package/dist/project.js.map +1 -1
  57. package/dist/projectGraph/compileProjectGraph.d.ts.map +1 -1
  58. package/dist/projectGraph/compileProjectGraph.js +110 -50
  59. package/dist/projectGraph/compileProjectGraph.js.map +1 -1
  60. package/dist/projectGraph/index.d.ts +1 -1
  61. package/dist/projectGraph/index.d.ts.map +1 -1
  62. package/dist/projectGraph/index.js +1 -1
  63. package/dist/projectGraph/index.js.map +1 -1
  64. package/dist/projectGraph/schema.d.ts +1 -0
  65. package/dist/projectGraph/schema.d.ts.map +1 -1
  66. package/dist/projectGraph/schema.js +4 -4
  67. package/dist/projectGraph/schema.js.map +1 -1
  68. package/dist/projectGraph/types.d.ts +5 -0
  69. package/dist/projectGraph/types.d.ts.map +1 -1
  70. package/dist/schema/manifest.d.ts +4 -3
  71. package/dist/schema/manifest.d.ts.map +1 -1
  72. package/dist/schema/manifest.js +14 -12
  73. package/dist/schema/manifest.js.map +1 -1
  74. package/dist/schemaDocs/index.d.ts +7 -0
  75. package/dist/schemaDocs/index.d.ts.map +1 -0
  76. package/dist/schemaDocs/index.js +10 -0
  77. package/dist/schemaDocs/index.js.map +1 -0
  78. package/dist/schemaDocs/manifest.d.ts +3 -0
  79. package/dist/schemaDocs/manifest.d.ts.map +1 -0
  80. package/dist/schemaDocs/manifest.js +111 -0
  81. package/dist/schemaDocs/manifest.js.map +1 -0
  82. package/dist/schemaDocs/project.d.ts +3 -0
  83. package/dist/schemaDocs/project.d.ts.map +1 -0
  84. package/dist/schemaDocs/project.js +39 -0
  85. package/dist/schemaDocs/project.js.map +1 -0
  86. package/dist/schemaDocs/types.d.ts +11 -0
  87. package/dist/schemaDocs/types.d.ts.map +1 -0
  88. package/dist/schemaDocs/types.js +2 -0
  89. package/dist/schemaDocs/types.js.map +1 -0
  90. package/dist/taskManager/doctor.d.ts.map +1 -1
  91. package/dist/taskManager/doctor.js.map +1 -1
  92. package/dist/taskManager/index.d.ts +1 -0
  93. package/dist/taskManager/index.d.ts.map +1 -1
  94. package/dist/taskManager/index.js +1 -0
  95. package/dist/taskManager/index.js.map +1 -1
  96. package/dist/taskManager/projectDoctor.d.ts +6 -0
  97. package/dist/taskManager/projectDoctor.d.ts.map +1 -0
  98. package/dist/taskManager/projectDoctor.js +108 -0
  99. package/dist/taskManager/projectDoctor.js.map +1 -0
  100. package/dist/taskManager/projectDoctorCanvas.d.ts +14 -0
  101. package/dist/taskManager/projectDoctorCanvas.d.ts.map +1 -0
  102. package/dist/taskManager/projectDoctorCanvas.js +181 -0
  103. package/dist/taskManager/projectDoctorCanvas.js.map +1 -0
  104. package/dist/taskManager/reviewHook.d.ts +17 -0
  105. package/dist/taskManager/reviewHook.d.ts.map +1 -1
  106. package/dist/taskManager/reviewHook.js +113 -25
  107. package/dist/taskManager/reviewHook.js.map +1 -1
  108. package/dist/types/autoRun.d.ts +125 -0
  109. package/dist/types/autoRun.d.ts.map +1 -0
  110. package/dist/types/autoRun.js +2 -0
  111. package/dist/types/autoRun.js.map +1 -0
  112. package/dist/types/executor.d.ts +118 -0
  113. package/dist/types/executor.d.ts.map +1 -0
  114. package/dist/types/executor.js +17 -0
  115. package/dist/types/executor.js.map +1 -0
  116. package/dist/types/graph.d.ts +100 -0
  117. package/dist/types/graph.d.ts.map +1 -0
  118. package/dist/types/graph.js +2 -0
  119. package/dist/types/graph.js.map +1 -0
  120. package/dist/types/manifest.d.ts +86 -0
  121. package/dist/types/manifest.d.ts.map +1 -0
  122. package/dist/types/manifest.js +6 -0
  123. package/dist/types/manifest.js.map +1 -0
  124. package/dist/types/packageFiles.d.ts +26 -0
  125. package/dist/types/packageFiles.d.ts.map +1 -0
  126. package/dist/types/packageFiles.js +2 -0
  127. package/dist/types/packageFiles.js.map +1 -0
  128. package/dist/types/results.d.ts +24 -0
  129. package/dist/types/results.d.ts.map +1 -0
  130. package/dist/types/results.js +4 -0
  131. package/dist/types/results.js.map +1 -0
  132. package/dist/types/state.d.ts +38 -0
  133. package/dist/types/state.d.ts.map +1 -0
  134. package/dist/types/state.js +5 -0
  135. package/dist/types/state.js.map +1 -0
  136. package/dist/types/taskManager.d.ts +259 -0
  137. package/dist/types/taskManager.d.ts.map +1 -0
  138. package/dist/types/taskManager.js +2 -0
  139. package/dist/types/taskManager.js.map +1 -0
  140. package/dist/types/validation.d.ts +11 -0
  141. package/dist/types/validation.d.ts.map +1 -0
  142. package/dist/types/validation.js +2 -0
  143. package/dist/types/validation.js.map +1 -0
  144. package/dist/types/workspace.d.ts +55 -0
  145. package/dist/types/workspace.d.ts.map +1 -0
  146. package/dist/types/workspace.js +2 -0
  147. package/dist/types/workspace.js.map +1 -0
  148. package/dist/types.d.ts +10 -775
  149. package/dist/types.d.ts.map +1 -1
  150. package/dist/types.js +10 -10
  151. package/dist/types.js.map +1 -1
  152. package/dist/validatePackage.d.ts.map +1 -1
  153. package/dist/validatePackage.js +1 -1
  154. package/dist/validatePackage.js.map +1 -1
  155. package/dist/validation/desktopLayoutValidation.d.ts +6 -0
  156. package/dist/validation/desktopLayoutValidation.d.ts.map +1 -0
  157. package/dist/validation/desktopLayoutValidation.js +154 -0
  158. package/dist/validation/desktopLayoutValidation.js.map +1 -0
  159. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -1,776 +1,11 @@
1
- export declare const supportedManifestVersion: "plan-package/v1";
2
- export declare const nodeTypes: readonly ["task"];
3
- export declare const edgeTypes: readonly ["depends_on"];
4
- export declare const blockTypes: readonly ["implementation", "review"];
5
- export declare const taskStatuses: readonly ["planned", "ready", "in_progress", "implemented"];
6
- export declare const blockStatuses: readonly ["planned", "ready", "in_progress", "completed", "needs_changes", "blocked", "diverged"];
7
- export declare const feedbackStatuses: readonly ["open", "in_progress", "resolved", "dismissed"];
8
- export declare const reviewVerdicts: readonly ["passed", "needs_changes"];
9
- export type NodeType = (typeof nodeTypes)[number];
10
- export type EdgeType = (typeof edgeTypes)[number];
11
- export type BlockType = (typeof blockTypes)[number];
12
- export type TaskStatus = (typeof taskStatuses)[number];
13
- export type BlockStatus = (typeof blockStatuses)[number];
14
- export type FeedbackStatus = (typeof feedbackStatuses)[number];
15
- export type ReviewVerdict = (typeof reviewVerdicts)[number];
16
- export type ReviewHookDefinition = {
17
- id: string;
18
- type: "executable";
19
- command: string;
20
- args: string[];
21
- executionPolicy: "trusted-local";
22
- };
23
- export type ReviewTriggerCondition = "after_required_work_completed" | "manual";
24
- export type ManualExecutorProfile = {
25
- adapter: "manual";
26
- };
27
- export type CodexExecExecutorProfile = {
28
- adapter: "codex-exec";
29
- command: string;
30
- args: string[];
31
- sandbox?: "read-only" | "workspace-write" | "danger-full-access";
32
- role?: string;
33
- timeoutMs?: number;
34
- };
35
- export type OpencodeExecExecutorProfile = {
36
- adapter: "opencode-exec";
37
- command: string;
38
- args: string[];
39
- sandbox?: "read-only" | "workspace-write" | "danger-full-access";
40
- timeoutMs?: number;
41
- };
42
- export type ClaudeCodeExecExecutorProfile = {
43
- adapter: "claude-code-exec";
44
- command: string;
45
- args: string[];
46
- timeoutMs?: number;
47
- };
48
- export type PiExecExecutorProfile = {
49
- adapter: "pi-exec";
50
- command: string;
51
- args: string[];
52
- timeoutMs?: number;
53
- };
54
- export type LocalReviewExecutorProfile = {
55
- adapter: "local-review";
56
- command: string;
57
- args: string[];
58
- sandbox?: "read-only" | "workspace-write" | "danger-full-access";
59
- timeoutMs?: number;
60
- };
61
- export type ExecutorProfile = ManualExecutorProfile | CodexExecExecutorProfile | OpencodeExecExecutorProfile | ClaudeCodeExecExecutorProfile | PiExecExecutorProfile | LocalReviewExecutorProfile;
62
- export type ExecutorProfileSummary = ExecutorProfile & {
63
- name: string;
64
- source: "builtin" | "package";
65
- };
66
- export type BlockParallelPolicy = {
67
- safe: boolean;
68
- locks: string[];
69
- };
70
- export type ManifestImplementationBlock = {
71
- id: string;
72
- type: "implementation";
73
- title: string;
74
- prompt: string;
75
- depends_on: string[];
76
- executor?: string;
77
- parallel: BlockParallelPolicy;
78
- };
79
- export type ManifestReviewBlock = {
80
- id: string;
81
- type: "review";
82
- title: string;
83
- prompt: string;
84
- depends_on: string[];
85
- executor?: string;
86
- review: {
87
- required: boolean;
88
- maxFeedbackCycles: number;
89
- preset?: string;
90
- triggerCondition?: ReviewTriggerCondition;
91
- inputContext?: string;
92
- passCriteria?: string;
93
- feedbackFormat?: string;
94
- hook: ReviewHookDefinition | null;
95
- };
96
- };
97
- export type ManifestBlock = ManifestImplementationBlock | ManifestReviewBlock;
98
- export type ManifestTaskNode = {
99
- id: string;
100
- type: "task";
101
- title: string;
102
- prompt: string;
103
- executor?: string;
104
- acceptance: string[];
105
- blocks: ManifestBlock[];
106
- };
107
- export type ManifestNode = ManifestTaskNode;
108
- export type ManifestEdge = {
109
- from: string;
110
- to: string;
111
- type: EdgeType;
112
- };
113
- export type PlanPackageManifest = {
114
- version: typeof supportedManifestVersion;
115
- project: {
116
- title: string;
117
- description: string;
118
- };
119
- execution: {
120
- defaultExecutor?: string;
121
- parallel: {
122
- enabled: boolean;
123
- maxConcurrent: number;
124
- };
125
- };
126
- review: {
127
- maxFeedbackCycles: number;
128
- completionPolicy: "strict";
129
- };
130
- executors?: Record<string, ExecutorProfile>;
131
- nodes: ManifestNode[];
132
- edges: ManifestEdge[];
133
- };
134
- export type ProjectMetadata = {
135
- id: string;
136
- name: string;
137
- rootPath: string;
138
- createdAt: string;
139
- };
140
- export type ProjectWorkspace = {
141
- id: string;
142
- rootPath: string;
143
- planweaveHome: string;
144
- workspaceRoot: string;
145
- projectFile: string;
146
- packageDir: string;
147
- manifestFile: string;
148
- stateFile: string;
149
- resultsDir: string;
150
- projectPromptFile: string;
151
- };
152
- export type PackageWorkspaceRef = string | ProjectWorkspace;
153
- export type TaskState = {
154
- status: TaskStatus;
155
- openFeedbackCount: number;
156
- };
157
- export type BlockState = {
158
- status: BlockStatus;
159
- lastRunId?: string | null;
160
- latestReviewAttemptId?: string | null;
161
- activeFeedbackId?: string | null;
162
- pendingFeedbackId?: string | null;
163
- blockedReason?: string | null;
164
- divergenceReason?: string | null;
165
- completionReason?: "passed" | "max_cycles_reached" | null;
166
- passedWorkRevision?: string | null;
167
- };
168
- export type FeedbackEnvelopeState = {
169
- status: FeedbackStatus;
170
- sourceReviewBlockRef: string;
171
- latestSubmissionId: string | null;
172
- content: string;
173
- };
174
- export type RuntimeState = {
175
- currentRefs: string[];
176
- currentFeedbackId: string | null;
177
- currentReviewBlockRef: string | null;
178
- tasks: Record<string, TaskState>;
179
- blocks: Record<string, BlockState>;
180
- feedback: Record<string, FeedbackEnvelopeState>;
181
- };
182
- export type ValidationIssue = {
183
- code: string;
184
- message: string;
185
- path?: string;
186
- };
187
- export type CompiledExecutionGraph = {
188
- nodesById: Map<string, ManifestNode>;
189
- taskNodesInManifestOrder: string[];
190
- tasksById: Map<string, ManifestTaskNode>;
191
- taskDependenciesByTask: Map<string, string[]>;
192
- taskDependentsByTask: Map<string, string[]>;
193
- blockRefsInManifestOrder: string[];
194
- blocksByRef: Map<string, ManifestBlock>;
195
- blockTaskByRef: Map<string, string>;
196
- blocksByTask: Map<string, string[]>;
197
- blockDependenciesByRef: Map<string, string[]>;
198
- blockDependentsByRef: Map<string, string[]>;
199
- reviewBlocksByTask: Map<string, string[]>;
200
- locksByBlockRef: Map<string, string[]>;
201
- parallelSafeByBlockRef: Map<string, boolean>;
202
- diagnostics: {
203
- errors: ValidationIssue[];
204
- warnings: ValidationIssue[];
205
- };
206
- taskReachable(from: string, to: string): boolean;
207
- blockReachable(fromRef: string, toRef: string): boolean;
208
- };
209
- export type CompiledTaskGraph = CompiledExecutionGraph;
210
- export type ExecutionGraphSession = {
211
- projectRoot: PackageWorkspaceRef;
212
- projectId: string;
213
- packageRoot: string;
214
- graph: CompiledExecutionGraph;
215
- fileSnapshot: PackageFileSnapshot;
216
- readQueue: GraphReadQueue;
217
- dirtyPromptRefs: Set<string>;
218
- diagnostics: ValidationIssue[];
219
- };
220
- export type PackageFileChange = {
221
- path: string;
222
- type: "added" | "changed" | "removed";
223
- };
224
- export type GraphEditOperation = {
225
- type: "add_node" | "update_node";
226
- node: ManifestNode;
227
- } | {
228
- type: "remove_node";
229
- nodeId: string;
230
- } | {
231
- type: "add_edge" | "remove_edge";
232
- edge: ManifestEdge;
233
- } | {
234
- type: "update_prompt";
235
- ref: string;
236
- };
237
- export type GraphReadQueue = {
238
- fileChanges: PackageFileChange[];
239
- graphOps: GraphEditOperation[];
240
- enqueuedAt: string;
241
- };
242
- export type FileFingerprint = {
243
- path: string;
244
- hash: string;
245
- mtimeMs: number;
246
- };
247
- export type PackageFileSnapshot = {
248
- manifest: PlanPackageManifest;
249
- graph: CompiledExecutionGraph;
250
- manifestFile: FileFingerprint;
251
- promptFiles: Record<string, FileFingerprint>;
252
- };
253
- export type DrainGraphReadQueueResult = {
254
- session: ExecutionGraphSession;
255
- refreshed: boolean;
256
- dirtyPromptRefs: string[];
257
- diagnostics: ValidationIssue[];
258
- };
259
- export type ValidationReport = {
260
- ok: boolean;
261
- errors: ValidationIssue[];
262
- warnings: ValidationIssue[];
263
- };
264
- export type InitWorkspaceResult = {
265
- workspace: ProjectWorkspace;
266
- project: ProjectMetadata;
267
- created: boolean;
268
- projectGraph?: {
269
- path: string;
270
- created: boolean;
271
- source: "project_graph" | "legacy_registry" | "legacy_default_canvas";
272
- canvasCount: number;
273
- };
274
- backup?: {
275
- backupDir: string;
276
- packageDir?: string;
277
- stateFile?: string;
278
- resultsDir?: string;
279
- };
280
- };
281
- export type ProjectPathsResult = {
282
- workspaceDir: string;
283
- projectId: string;
284
- projectDir: string;
285
- projectGraphPath: string;
286
- packageDir: string;
287
- statePath: string;
288
- resultsDir: string;
289
- activeCanvasId: string | null;
290
- canvases: ProjectCanvasPath[];
291
- };
292
- export type ProjectCanvasPath = {
293
- canvasId: string;
294
- name: string;
295
- packageDir: string;
296
- statePath: string;
297
- resultsDir: string;
298
- };
299
- export type PromptSurface = {
300
- ref: string;
301
- path: string;
302
- markdown: string;
303
- };
304
- export type RefreshPromptsResult = {
305
- prompts: PromptSurface[];
306
- };
307
- export type ClaimResult = {
308
- kind: "block";
309
- ref: string;
310
- taskId: string;
311
- blockId: string;
312
- blockType: BlockType;
313
- reason?: "claimed" | "current" | "feedback_resolved" | "dispatched";
314
- requestedMode?: "parallel";
315
- parallelFallbackReason?: "review_requires_sequential_claim";
316
- nextParallelClaimable?: string[];
317
- } | {
318
- kind: "feedback";
319
- feedbackId: string;
320
- sourceReviewBlockRef: string;
321
- taskId: string;
322
- content: string;
323
- } | {
324
- kind: "batch";
325
- refs: string[];
326
- } | {
327
- kind: "none";
328
- reason?: string;
329
- nextSequentialClaimable?: string[];
330
- } | {
331
- kind: "blocked";
332
- ref?: string;
333
- reason: string;
334
- };
335
- export type ClaimScope = {
336
- kind: "project";
337
- } | {
338
- kind: "task";
339
- taskId: string;
340
- } | {
341
- kind: "block";
342
- blockRef: string;
343
- };
344
- export type ParallelClaimResult = ClaimResult;
345
- export type ExecutorAdapterResult = {
346
- kind: "block";
347
- reportPath: string;
348
- runId?: string;
349
- executor?: string;
350
- adapter?: ExecutorProfile["adapter"];
351
- stdout?: string;
352
- stderr?: string;
353
- exitCode?: number;
354
- startedAt?: string;
355
- finishedAt?: string;
356
- agentSessionId?: string | null;
357
- codexSessionId?: string | null;
358
- opencodeSessionId?: string | null;
359
- } | {
360
- kind: "review";
361
- resultPath: string;
362
- runId?: string;
363
- executor?: string;
364
- adapter?: ExecutorProfile["adapter"];
365
- stdout?: string;
366
- stderr?: string;
367
- exitCode?: number;
368
- startedAt?: string;
369
- finishedAt?: string;
370
- agentSessionId?: string | null;
371
- codexSessionId?: string | null;
372
- opencodeSessionId?: string | null;
373
- } | {
374
- kind: "feedback";
375
- reportPath: string;
376
- runId?: string;
377
- executor?: string;
378
- adapter?: ExecutorProfile["adapter"];
379
- stdout?: string;
380
- stderr?: string;
381
- exitCode?: number;
382
- startedAt?: string;
383
- finishedAt?: string;
384
- agentSessionId?: string | null;
385
- codexSessionId?: string | null;
386
- opencodeSessionId?: string | null;
387
- } | {
388
- kind: "manual";
389
- promptPath: string;
390
- runDir: string;
391
- runId: string;
392
- executor: string;
393
- adapter: "manual";
394
- nextCommand: string;
395
- };
396
- export type ExecutorAdapter = {
397
- runBlock(input: {
398
- claim: Extract<ClaimResult, {
399
- kind: "block";
400
- }>;
401
- prompt: string;
402
- }): Promise<ExecutorAdapterResult>;
403
- runFeedback(input: {
404
- claim: Extract<ClaimResult, {
405
- kind: "feedback";
406
- }>;
407
- }): Promise<ExecutorAdapterResult>;
408
- };
409
- export type AutoRunStepResult = {
410
- kind: "submitted";
411
- claim: ClaimResult;
412
- adapterResult: Extract<ExecutorAdapterResult, {
413
- kind: "block" | "review" | "feedback";
414
- }>;
415
- submitResult: SubmitResult | SubmitReviewResult | SubmitFeedbackResult;
416
- } | {
417
- kind: "manual";
418
- claim: Extract<ClaimResult, {
419
- kind: "block" | "feedback";
420
- }>;
421
- adapterResult: Extract<ExecutorAdapterResult, {
422
- kind: "manual";
423
- }>;
424
- } | {
425
- kind: "idle" | "blocked" | "batch";
426
- claim: ClaimResult;
427
- } | {
428
- kind: "batch_submitted";
429
- claim: Extract<ClaimResult, {
430
- kind: "batch";
431
- }>;
432
- steps: Array<Extract<AutoRunStepResult, {
433
- kind: "submitted" | "manual";
434
- }>>;
435
- };
436
- type AutoRunLatestRunSummaryBase = {
437
- ref: string;
438
- runId: string;
439
- executor: string | null;
440
- adapter: ExecutorProfile["adapter"] | null;
441
- startedAt: string | null;
442
- finishedAt: string | null;
443
- stdoutSummary: string;
444
- stderrSummary: string;
445
- failureReason: string | null;
446
- promptPath: string;
447
- reportPath: string | null;
448
- metadataPath: string;
449
- };
450
- export type AutoRunLatestBlockRunSummary = AutoRunLatestRunSummaryBase & {
451
- kind: "block";
452
- taskId: string;
453
- blockId: string;
454
- status: BlockStatus;
455
- };
456
- export type AutoRunLatestFeedbackRunSummary = AutoRunLatestRunSummaryBase & {
457
- kind: "feedback";
458
- feedbackId: string | null;
459
- sourceReviewBlockRef: string | null;
460
- taskId: string | null;
461
- status: FeedbackStatus;
462
- };
463
- export type AutoRunLatestRunSummary = AutoRunLatestBlockRunSummary | AutoRunLatestFeedbackRunSummary;
464
- export type AutoRunExplanationPhase = "idle" | "running" | "pausing" | "paused" | "manual" | "completed" | "blocked" | "failed" | "stopped";
465
- export type AutoRunNextAction = {
466
- kind: "start";
467
- message: string;
468
- command: string | null;
469
- targetPath: string | null;
470
- ref: string | null;
471
- } | {
472
- kind: "wait";
473
- message: string;
474
- command: string | null;
475
- targetPath: string | null;
476
- ref: string | null;
477
- } | {
478
- kind: "resume";
479
- message: string;
480
- command: string | null;
481
- targetPath: string | null;
482
- ref: string | null;
483
- } | {
484
- kind: "submit_manual_result";
485
- message: string;
486
- command: string | null;
487
- targetPath: string | null;
488
- ref: string | null;
489
- } | {
490
- kind: "inspect_record";
491
- message: string;
492
- command: string | null;
493
- targetPath: string;
494
- ref: string | null;
495
- } | {
496
- kind: "resolve_error";
497
- message: string;
498
- command: string | null;
499
- targetPath: string | null;
500
- ref: string | null;
501
- } | {
502
- kind: "review_status";
503
- message: string;
504
- command: string | null;
505
- targetPath: string | null;
506
- ref: string | null;
507
- };
508
- export type AutoRunExplanation = {
509
- phase: AutoRunExplanationPhase;
510
- currentRef: string | null;
511
- currentExecutor: string | null;
512
- latestRecordId: string | null;
513
- latestRecordPath: string | null;
514
- latestOutputSummary: string | null;
515
- error: string | null;
516
- nextAction: AutoRunNextAction;
517
- };
518
- export type AutoRunStatus = {
519
- current: {
520
- refs: string[];
521
- feedbackId: string | null;
522
- reviewBlockRef: string | null;
523
- };
524
- latestRuns: AutoRunLatestRunSummary[];
525
- explanation: AutoRunExplanation;
526
- warnings: ValidationIssue[];
527
- };
528
- export type ReviewResult = {
529
- reviewBlockRef: string;
530
- taskId: string;
531
- verdict: ReviewVerdict;
532
- content: string;
533
- };
534
- export type ReviewHookInput = {
535
- reviewResult: ReviewResult;
536
- task: {
537
- taskId: string;
538
- title: string;
539
- };
540
- reviewBlockRef: string;
541
- feedbackCycleCount: number;
542
- };
543
- export type ReviewHookOutput = {
544
- action: "use_feedback";
545
- feedbackPrompt: string;
546
- };
547
- export type SubmitResult = {
548
- ref: string;
549
- runId: string;
550
- status: "completed";
551
- };
552
- export type SubmitReviewResult = {
553
- ref: string;
554
- reviewAttemptId: string;
555
- verdict: ReviewVerdict;
556
- feedbackId?: string;
557
- status: BlockStatus;
558
- completionReason?: "passed" | "max_cycles_reached" | null;
559
- feedbackCreated?: boolean;
560
- message?: string;
561
- };
562
- export type SubmitFeedbackResult = {
563
- status: "accepted";
564
- nextCommand: "planweave claim-next";
565
- message: string;
566
- feedbackId: string;
567
- submissionId: string;
568
- };
569
- export type BlockRecoveryResult = {
570
- ref: string;
571
- status: BlockStatus;
572
- reason?: string;
573
- };
574
- export type TaskStatusSummary = {
575
- taskId: string;
576
- status: TaskStatus;
577
- openFeedbackCount: number;
578
- };
579
- export type BlockStatusSummary = {
580
- ref: string;
581
- taskId: string;
582
- blockId: string;
583
- type: BlockType;
584
- status: BlockStatus;
585
- reason?: string | null;
586
- completionReason?: "passed" | "max_cycles_reached" | null;
587
- lastRunId?: string | null;
588
- latestReviewAttemptId?: string | null;
589
- activeFeedbackId?: string | null;
590
- };
591
- export type ClaimHint = {
592
- ref: string;
593
- taskId: string;
594
- blockId: string;
595
- blockType: BlockType;
596
- status: BlockStatus;
597
- statusReason: string | null;
598
- ready: boolean;
599
- readyReason: string | null;
600
- blockedByBlocks: string[];
601
- blockedByTasks: string[];
602
- blockedByProject: string[];
603
- parallelSafe: boolean;
604
- sequentialOnly: boolean;
605
- recommendedCommand: string | null;
606
- dispatchable: boolean;
607
- dispatchCommand: string | null;
608
- reviewGate: ReviewGateHint | null;
609
- };
610
- export type ReviewGateHint = {
611
- isGate: true;
612
- required: boolean;
613
- requiredReason: string;
614
- executorRole: "reviewer";
615
- downstreamTasks: string[];
616
- unlocksTasks: string[];
617
- needsChangesReturnsTo: string[];
618
- };
619
- export type BlockExplanation = ClaimHint & {
620
- promptPath: string;
621
- submitCommand: string;
622
- };
623
- export type CurrentWorkOwner = {
624
- projectRoot: string;
625
- canvasId: string | null;
626
- taskIds: string[];
627
- };
628
- export type CurrentBlockWorkItem = {
629
- kind: "block";
630
- ref: string;
631
- taskId: string;
632
- blockId: string;
633
- blockType: BlockType;
634
- promptPath: string;
635
- reportPath: string;
636
- submitCommand: string;
637
- };
638
- export type CurrentFeedbackWorkItem = {
639
- kind: "feedback";
640
- ref: string;
641
- feedbackId: string;
642
- sourceReviewBlockRef: string;
643
- taskId: string;
644
- promptPath: string;
645
- reportPath: string;
646
- submitCommand: string;
647
- };
648
- export type CurrentWorkItem = CurrentBlockWorkItem | CurrentFeedbackWorkItem;
649
- export type CurrentWork = {
650
- currentRefs: string[];
651
- currentFeedbackId: string | null;
652
- currentReviewBlockRef: string | null;
653
- owner: CurrentWorkOwner;
654
- items: CurrentWorkItem[];
655
- blockingReason: string | null;
656
- };
657
- export type DoctorIssue = {
658
- code: "stale_current_ref" | "orphan_result" | "index_state_mismatch";
659
- message: string;
660
- repaired?: boolean;
661
- ref?: string;
662
- taskId?: string;
663
- path?: string;
664
- stateRunId?: string | null;
665
- indexRunId?: string | null;
666
- };
667
- export type DoctorReport = {
668
- ok: boolean;
669
- issues: DoctorIssue[];
670
- };
671
- export type PlanStatus = {
672
- projectId: string;
673
- projectRoot: string;
674
- taskTotal: number;
675
- blockTotal: number;
676
- tasks: TaskStatusSummary[];
677
- blocks: BlockStatusSummary[];
678
- currentRefs: string[];
679
- currentFeedbackId: string | null;
680
- currentReviewBlockRef: string | null;
681
- openFeedback: Array<{
682
- feedbackId: string;
683
- sourceReviewBlockRef: string;
684
- status: FeedbackStatus;
685
- }>;
686
- nextClaimable: string[];
687
- nextParallelClaimable: string[];
688
- nextSequentialClaimable: string[];
689
- nextParallelDispatchable: string[];
690
- claimHints: ClaimHint[];
691
- warnings: ValidationIssue[];
692
- counts: {
693
- tasks: Record<TaskStatus, number>;
694
- blocks: Record<BlockStatus, number>;
695
- feedback: Record<FeedbackStatus, number>;
696
- };
697
- orphanState: OrphanStateSummary[];
698
- orphanResults: OrphanResultSummary[];
699
- };
700
- export type OrphanStateSummary = {
701
- taskId?: string;
702
- ref?: string;
703
- status: string;
704
- lastRunId?: string | null;
705
- };
706
- export type OrphanResultSummary = {
707
- taskId: string;
708
- path: string;
709
- };
710
- export type GraphEditResult = {
711
- ok: boolean;
712
- affectedTasks: string[];
713
- diagnostics: ValidationIssue[];
714
- graph?: CompiledExecutionGraph;
715
- };
716
- export type TaskResultIndex = {
717
- latestRunByBlock?: Record<string, string>;
718
- latestReviewAttemptByBlock?: Record<string, string>;
719
- latestReviewVerdictByBlock?: Record<string, ReviewVerdict>;
720
- latestReviewedWorkRevisionByBlock?: Record<string, string>;
721
- latestFeedbackByReviewBlock?: Record<string, string>;
722
- latestFeedbackSubmissionByFeedback?: Record<string, string>;
723
- feedbackStatusById?: Record<string, FeedbackStatus>;
724
- reviewCompletionReasonByBlock?: Record<string, "passed" | "max_cycles_reached">;
725
- counts?: {
726
- runs?: number;
727
- reviewAttempts?: number;
728
- feedbackEnvelopes?: number;
729
- feedbackSubmissions?: number;
730
- };
731
- warnings?: ValidationIssue[];
732
- };
733
- export declare const runSubmitStatuses: readonly ["completed"];
734
- export declare const reviewStatuses: readonly ["passed", "needs_changes"];
735
- export type RunSubmitStatus = "completed";
736
- export type ReviewStatus = ReviewVerdict;
737
- export type MarkBlockedResult = BlockRecoveryResult;
738
- export type MarkDivergedResult = BlockRecoveryResult;
739
- export type ResolveDivergenceResult = BlockRecoveryResult;
740
- export type UnblockResult = BlockRecoveryResult;
741
- export type RetryReviewResult = BlockRecoveryResult & {
742
- maxFeedbackCycles: number;
743
- reset: boolean;
744
- };
745
- export type EditTaskInput = {
746
- projectRoot: PackageWorkspaceRef;
747
- taskId: string;
748
- title?: string;
749
- promptMarkdown?: string;
750
- executor?: string | null;
751
- };
752
- export type EditTaskResult = GraphEditResult & {
753
- taskId: string;
754
- updatedFields: string[];
755
- };
756
- export type EditBlockInput = {
757
- projectRoot: PackageWorkspaceRef;
758
- ref: string;
759
- title?: string;
760
- promptMarkdown?: string;
761
- executor?: string | null;
762
- parallelSafe?: boolean;
763
- parallelLocks?: string[];
764
- reviewRequired?: boolean;
765
- maxFeedbackCycles?: number;
766
- reviewHook?: ReviewHookDefinition | null;
767
- };
768
- export type EditBlockResult = GraphEditResult & {
769
- ref: string;
770
- taskId: string;
771
- blockId: string;
772
- blockType: BlockType;
773
- updatedFields: string[];
774
- };
775
- export {};
1
+ export * from "./types/manifest.js";
2
+ export * from "./types/executor.js";
3
+ export * from "./types/workspace.js";
4
+ export * from "./types/state.js";
5
+ export * from "./types/validation.js";
6
+ export * from "./types/graph.js";
7
+ export * from "./types/packageFiles.js";
8
+ export * from "./types/taskManager.js";
9
+ export * from "./types/autoRun.js";
10
+ export * from "./types/results.js";
776
11
  //# sourceMappingURL=types.d.ts.map