@mcp-abap-adt/llm-agent-libs 30.19.0 → 30.20.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.
- package/dist/coordinator/dialogue/dialogue-session.d.ts +2 -0
- package/dist/coordinator/dialogue/dialogue-session.d.ts.map +1 -1
- package/dist/coordinator/dialogue/dialogue-session.js +54 -15
- package/dist/coordinator/dialogue/dialogue-session.js.map +1 -1
- package/dist/coordinator/dialogue/planner-prompt.d.ts +1 -1
- package/dist/coordinator/dialogue/planner-prompt.d.ts.map +1 -1
- package/dist/coordinator/dialogue/planner-prompt.js +4 -7
- package/dist/coordinator/dialogue/planner-prompt.js.map +1 -1
- package/dist/coordinator/dialogue/planner-scope.d.ts +1 -0
- package/dist/coordinator/dialogue/planner-scope.d.ts.map +1 -1
- package/dist/coordinator/dialogue/planner-scope.js.map +1 -1
- package/dist/coordinator/dialogue/planner-tools-client.d.ts.map +1 -1
- package/dist/coordinator/dialogue/planner-tools-client.js +65 -29
- package/dist/coordinator/dialogue/planner-tools-client.js.map +1 -1
- package/dist/coordinator/dialogue/structured-plan.d.ts +4 -8
- package/dist/coordinator/dialogue/structured-plan.d.ts.map +1 -1
- package/dist/coordinator/dialogue/structured-plan.js +123 -122
- package/dist/coordinator/dialogue/structured-plan.js.map +1 -1
- package/dist/coordinator/dialogue/task-board.d.ts +3 -2
- package/dist/coordinator/dialogue/task-board.d.ts.map +1 -1
- package/dist/coordinator/dialogue/task-board.js +10 -5
- package/dist/coordinator/dialogue/task-board.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,14 +2,10 @@ import { z } from 'zod';
|
|
|
2
2
|
import { currentPlannerScope } from './planner-scope.js';
|
|
3
3
|
import { dependenciesDone, mergePlan, stepSchema } from './structured-plan.js';
|
|
4
4
|
function assertNoActiveAttempt(step, board) {
|
|
5
|
-
for (const id of new Set([
|
|
6
|
-
...step.taskIds,
|
|
7
|
-
step.workTaskId,
|
|
8
|
-
step.check?.taskId,
|
|
9
|
-
])) {
|
|
5
|
+
for (const id of new Set([...step.taskIds, step.workTaskId])) {
|
|
10
6
|
const task = id ? board.get(id) : undefined;
|
|
11
7
|
if (task?.state === 'queued' || task?.state === 'running')
|
|
12
|
-
throw new Error(
|
|
8
|
+
throw new Error(`Task attempt ${id} for ${step.id} is ${task.state}; stop it first with stop_task or wait for it to settle`);
|
|
13
9
|
}
|
|
14
10
|
}
|
|
15
11
|
function textResult(value, isError) {
|
|
@@ -77,6 +73,11 @@ export class PlannerToolsClient {
|
|
|
77
73
|
description: 'Request a cooperative task stop.',
|
|
78
74
|
inputSchema: schema({ task_id: string }, ['task_id']),
|
|
79
75
|
},
|
|
76
|
+
{
|
|
77
|
+
name: 'deliver',
|
|
78
|
+
description: 'Return a completed task result verbatim to the user, once per planner call.',
|
|
79
|
+
inputSchema: schema({ task_id: string, note: { type: 'string', maxLength: 1000 } }, ['task_id']),
|
|
80
|
+
},
|
|
80
81
|
{
|
|
81
82
|
name: 'get_task',
|
|
82
83
|
description: 'Get a task and its bounded output.',
|
|
@@ -97,7 +98,6 @@ export class PlannerToolsClient {
|
|
|
97
98
|
'ready',
|
|
98
99
|
'pending',
|
|
99
100
|
'running',
|
|
100
|
-
'checking',
|
|
101
101
|
'done',
|
|
102
102
|
'failed',
|
|
103
103
|
'skipped',
|
|
@@ -146,8 +146,8 @@ export class PlannerToolsClient {
|
|
|
146
146
|
if (Object.hasOwn(args, name))
|
|
147
147
|
throw new Error(`${name} is not supported; put what the step needs in context`);
|
|
148
148
|
const worker = requiredString(args, 'worker');
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
const goal = requiredString(args, 'goal');
|
|
150
|
+
let context = args.context === undefined
|
|
151
151
|
? undefined
|
|
152
152
|
: requiredString(args, 'context');
|
|
153
153
|
const plan = scope.getPlan();
|
|
@@ -159,14 +159,46 @@ export class PlannerToolsClient {
|
|
|
159
159
|
throw new Error('step_id must identify a plan step');
|
|
160
160
|
if (step && structured && !dependenciesDone(structured, step))
|
|
161
161
|
throw new Error(`dependencies for ${step.id} are not done`);
|
|
162
|
-
const isCheck = step?.
|
|
162
|
+
const isCheck = step?.worker === 'checker';
|
|
163
|
+
if (step && (worker === 'checker') !== isCheck)
|
|
164
|
+
throw new Error('Check steps (worker checker) must use the separate read-only checker worker; non-check steps cannot use checker. The worker that did the work never checks it.');
|
|
165
|
+
if (isCheck && !step?.dependsOn?.length)
|
|
166
|
+
throw new Error('A check step requires dependsOn identifying the steps to check');
|
|
163
167
|
if (step)
|
|
164
168
|
assertNoActiveAttempt(step, scope.board);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
169
|
+
const checkedTaskIds = {};
|
|
170
|
+
if (step && structured) {
|
|
171
|
+
const sources = (step.dependsOn ?? []).map((id) => structured.steps.find((s) => s.id === id));
|
|
172
|
+
const blocks = [];
|
|
173
|
+
let size = 0;
|
|
174
|
+
for (const source of sources) {
|
|
175
|
+
if (!source)
|
|
176
|
+
throw new Error('dependency step is missing');
|
|
177
|
+
const id = source.successfulWorkTaskId;
|
|
178
|
+
const task = id ? scope.board.get(id) : undefined;
|
|
179
|
+
if (task?.state !== 'done')
|
|
180
|
+
throw new Error(`step ${source.id} has no successful work result`);
|
|
181
|
+
if (isCheck && task.worker === worker)
|
|
182
|
+
throw new Error('The worker that did the work never checks it; checked work must be a separate non-checker task');
|
|
183
|
+
if (isCheck)
|
|
184
|
+
checkedTaskIds[source.id] = task.id;
|
|
185
|
+
const block = [
|
|
186
|
+
`${isCheck ? '[result to check: step' : '[result of step'} ${source.id} (task ${task.id})]\n${task.output ?? ''}`,
|
|
187
|
+
isCheck && source.items
|
|
188
|
+
? `Expected items for step ${source.id}: ${JSON.stringify(source.items)}; expected count: ${source.items.length}. Return JSON with verdict, count and note.`
|
|
189
|
+
: undefined,
|
|
190
|
+
]
|
|
191
|
+
.filter(Boolean)
|
|
192
|
+
.join('\n');
|
|
193
|
+
const nextSize = size + block.length + (blocks.length ? 2 : 0);
|
|
194
|
+
if (nextSize > 120_000)
|
|
195
|
+
throw new Error(`result of step ${source.id} (task ${task.id}) requires ${block.length} characters; total ${nextSize} exceeds 120000 (already ${size}); split or narrow the step`);
|
|
196
|
+
blocks.push(block);
|
|
197
|
+
size = nextSize;
|
|
198
|
+
}
|
|
199
|
+
if (blocks.length)
|
|
200
|
+
context = [context, ...blocks].filter(Boolean).join('\n\n');
|
|
201
|
+
}
|
|
170
202
|
const result = scope.board.start({ worker, goal, context });
|
|
171
203
|
if (!result.ok)
|
|
172
204
|
throw new Error(result.error);
|
|
@@ -176,19 +208,11 @@ Verify exactly ${step.items.length} items, each with a stored/processed result:
|
|
|
176
208
|
if (step) {
|
|
177
209
|
scope.taskSteps?.set(result.value.id, step.id);
|
|
178
210
|
step.taskIds.push(result.value.id);
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
step.workTaskId = result.value.id;
|
|
185
|
-
delete step.successfulWorkTaskId;
|
|
186
|
-
step.state = 'running';
|
|
187
|
-
if (step.check) {
|
|
188
|
-
delete step.check.taskId;
|
|
189
|
-
delete step.check.verdict;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
211
|
+
step.workTaskId = result.value.id;
|
|
212
|
+
delete step.successfulWorkTaskId;
|
|
213
|
+
delete step.verdict;
|
|
214
|
+
step.checkedTaskIds = isCheck ? checkedTaskIds : undefined;
|
|
215
|
+
step.state = 'running';
|
|
192
216
|
}
|
|
193
217
|
scope.recordAction?.(`started ${result.value.id}${step ? ` for ${step.id}` : ''} (${worker})`, true);
|
|
194
218
|
return textResult({
|
|
@@ -212,6 +236,19 @@ Verify exactly ${step.items.length} items, each with a stored/processed result:
|
|
|
212
236
|
scope.recordAction?.(`stop ${id} (${stopped ? 'requested' : 'not stopped'})`);
|
|
213
237
|
return textResult({ stopped });
|
|
214
238
|
}
|
|
239
|
+
case 'deliver': {
|
|
240
|
+
const { task_id, note } = z
|
|
241
|
+
.object({
|
|
242
|
+
task_id: z.string(),
|
|
243
|
+
note: z.string().max(1000).optional(),
|
|
244
|
+
})
|
|
245
|
+
.strict()
|
|
246
|
+
.parse(args);
|
|
247
|
+
if (!scope.deliver)
|
|
248
|
+
throw new Error('deliver is unavailable');
|
|
249
|
+
scope.deliver(task_id, note);
|
|
250
|
+
return textResult({ delivered: task_id });
|
|
251
|
+
}
|
|
215
252
|
case 'get_task': {
|
|
216
253
|
const id = requiredString(args, 'task_id');
|
|
217
254
|
const task = scope.board.get(id);
|
|
@@ -240,7 +277,6 @@ Verify exactly ${step.items.length} items, each with a stored/processed result:
|
|
|
240
277
|
'ready',
|
|
241
278
|
'pending',
|
|
242
279
|
'running',
|
|
243
|
-
'checking',
|
|
244
280
|
'done',
|
|
245
281
|
'failed',
|
|
246
282
|
'skipped',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planner-tools-client.js","sourceRoot":"","sources":["../../../src/coordinator/dialogue/planner-tools-client.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAG/E,SAAS,qBAAqB,CAAC,IAAsB,EAAE,KAAgB;IACrE,KAAK,MAAM,EAAE,IAAI,IAAI,GAAG,CAAC;QACvB,GAAG,IAAI,CAAC,OAAO;QACf,IAAI,CAAC,UAAU;QACf,IAAI,CAAC,KAAK,EAAE,MAAM;KACnB,CAAC,EAAE,CAAC;QACH,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5C,IAAI,IAAI,EAAE,KAAK,KAAK,QAAQ,IAAI,IAAI,EAAE,KAAK,KAAK,SAAS;YACvD,MAAM,IAAI,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Y,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACjE,IAAI,CACL,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -12,17 +12,9 @@ export declare const stepSchema: z.ZodObject<{
|
|
|
12
12
|
skipped: "skipped";
|
|
13
13
|
pending: "pending";
|
|
14
14
|
running: "running";
|
|
15
|
-
checking: "checking";
|
|
16
15
|
blocked: "blocked";
|
|
17
16
|
}>>;
|
|
18
17
|
note: z.ZodOptional<z.ZodString>;
|
|
19
|
-
check: z.ZodOptional<z.ZodObject<{
|
|
20
|
-
by: z.ZodEnum<{
|
|
21
|
-
planner: "planner";
|
|
22
|
-
checker: "checker";
|
|
23
|
-
}>;
|
|
24
|
-
goal: z.ZodString;
|
|
25
|
-
}, z.core.$strip>>;
|
|
26
18
|
}, z.core.$strip>;
|
|
27
19
|
export declare function mergePlan(previous: string | Plan | undefined, input: unknown, status: Plan['status'], question?: string, options?: {
|
|
28
20
|
consent?: boolean;
|
|
@@ -34,7 +26,11 @@ export declare function readySteps(plan?: Plan): PlanStep[];
|
|
|
34
26
|
export declare function currentWorkTaskId(step: PlanStep): string | undefined;
|
|
35
27
|
export declare function restoreSuccessfulWork(step: PlanStep, getTask: (id: string) => TaskRecord | undefined): void;
|
|
36
28
|
export declare function currentAttemptIds(step: PlanStep): string[];
|
|
29
|
+
/** Normalize persisted pre-check-step plans without changing their work history. */
|
|
30
|
+
export declare function restoreLegacyStep(step: PlanStep): void;
|
|
37
31
|
export declare function recomputePlanStatus(plan?: Plan): void;
|
|
38
32
|
export declare function applyTaskEvent(plan: Plan | undefined, { task, kind }: TaskEvent, taskSteps?: ReadonlyMap<string, string>): void;
|
|
33
|
+
/** Require a passing check and no failing latest check attempts. */
|
|
34
|
+
export declare function deliveryChecksPassed(plan: Plan, stepId: string): boolean;
|
|
39
35
|
export declare function planView(plan?: Plan): string;
|
|
40
36
|
//# sourceMappingURL=structured-plan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-plan.d.ts","sourceRoot":"","sources":["../../../src/coordinator/dialogue/structured-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,IAAI,EACpB,gBAAgB,IAAI,QAAQ,EAC5B,SAAS,EACT,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"structured-plan.d.ts","sourceRoot":"","sources":["../../../src/coordinator/dialogue/structured-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,IAAI,EACpB,gBAAgB,IAAI,QAAQ,EAC5B,SAAS,EACT,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;iBAUrB,CAAC;AACH,wBAAgB,SAAS,CACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,EACtB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;CAC7C,GACL,IAAI,CA0HN;AACD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAIpE;AACD,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,QAAQ,EAAE,CAMlD;AACD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAEpE;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,GAC9C,IAAI,CAcN;AACD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,EAAE,CAG1D;AACD,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAsBtD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAMrD;AAmED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,GAAG,SAAS,EACtB,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,SAAS,EACzB,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACtC,IAAI,CAmFN;AACD,oEAAoE;AACpE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAgBxE;AAED,wBAAgB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAkC5C"}
|
|
@@ -6,20 +6,9 @@ export const stepSchema = z.object({
|
|
|
6
6
|
worker: z.string().optional(),
|
|
7
7
|
items: z.array(z.string().min(1)).optional(),
|
|
8
8
|
state: z
|
|
9
|
-
.enum([
|
|
10
|
-
'pending',
|
|
11
|
-
'running',
|
|
12
|
-
'checking',
|
|
13
|
-
'done',
|
|
14
|
-
'failed',
|
|
15
|
-
'skipped',
|
|
16
|
-
'blocked',
|
|
17
|
-
])
|
|
9
|
+
.enum(['pending', 'running', 'done', 'failed', 'skipped', 'blocked'])
|
|
18
10
|
.optional(),
|
|
19
11
|
note: z.string().optional(),
|
|
20
|
-
check: z
|
|
21
|
-
.object({ by: z.enum(['planner', 'checker']), goal: z.string().min(1) })
|
|
22
|
-
.optional(),
|
|
23
12
|
});
|
|
24
13
|
export function mergePlan(previous, input, status, question, options = {}) {
|
|
25
14
|
const steps = z.array(stepSchema).parse(input);
|
|
@@ -76,24 +65,16 @@ export function mergePlan(previous, input, status, question, options = {}) {
|
|
|
76
65
|
const old = persisted ? { ...persisted } : undefined;
|
|
77
66
|
if (old && options.getTask)
|
|
78
67
|
restoreSuccessfulWork(old, options.getTask);
|
|
79
|
-
if (old?.state === 'checking' &&
|
|
80
|
-
(s.state === 'done' || s.state === 'failed') &&
|
|
81
|
-
!s.note?.trim())
|
|
82
|
-
throw new Error('closing a check requires a note');
|
|
83
|
-
const check = s.check
|
|
84
|
-
? { ...old?.check, ...s.check }
|
|
85
|
-
: old?.check
|
|
86
|
-
? { ...old.check }
|
|
87
|
-
: undefined;
|
|
88
|
-
const ownershipChanged = !!old?.check && !!s.check && old.check.by !== s.check.by;
|
|
89
|
-
if (ownershipChanged && s.state !== undefined && s.state !== old?.state)
|
|
90
|
-
throw new Error('Changing check ownership requires a fresh check before completion');
|
|
91
|
-
if (ownershipChanged && check) {
|
|
92
|
-
delete check.taskId;
|
|
93
|
-
delete check.verdict;
|
|
94
|
-
}
|
|
95
68
|
const items = s.items;
|
|
96
69
|
const effectiveState = s.state ?? old?.state ?? 'pending';
|
|
70
|
+
const roleChanged = (s.worker === 'checker') !== (old?.worker === 'checker');
|
|
71
|
+
const dependenciesChanged = JSON.stringify(s.dependsOn ?? []) !==
|
|
72
|
+
JSON.stringify(old?.dependsOn ?? []);
|
|
73
|
+
if (old &&
|
|
74
|
+
(roleChanged || dependenciesChanged) &&
|
|
75
|
+
effectiveState !== 'pending' &&
|
|
76
|
+
effectiveState !== 'skipped')
|
|
77
|
+
throw new Error('Changing worker role or dependencies requires reopening the step as pending');
|
|
97
78
|
const itemsChanged = JSON.stringify(old?.items) !== JSON.stringify(items);
|
|
98
79
|
if ((items || old?.items) &&
|
|
99
80
|
old &&
|
|
@@ -101,36 +82,12 @@ export function mergePlan(previous, input, status, question, options = {}) {
|
|
|
101
82
|
effectiveState !== 'pending' &&
|
|
102
83
|
effectiveState !== 'skipped')
|
|
103
84
|
throw new Error('Changed batch items require reopening the step as pending and a fresh work/check attempt');
|
|
104
|
-
if (old && (itemsChanged || effectiveState === 'pending') && check) {
|
|
105
|
-
delete check.taskId;
|
|
106
|
-
delete check.verdict;
|
|
107
|
-
}
|
|
108
85
|
if (items && new Set(items).size !== items.length)
|
|
109
86
|
throw new Error('Step items must be unique identifiers');
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
throw new Error('Steps with items require a check');
|
|
115
|
-
// Completion is based on the current work/check attempts, never state alone.
|
|
116
|
-
if (s.state === 'done' &&
|
|
117
|
-
(old?.state !== 'done' || itemsChanged || ownershipChanged)) {
|
|
118
|
-
if (old?.state !== 'checking' && old?.state !== 'done')
|
|
119
|
-
throw new Error('Done requires checking after successful work and a passing check');
|
|
120
|
-
if (itemsChanged ||
|
|
121
|
-
!old?.workTaskId ||
|
|
122
|
-
old.successfulWorkTaskId !== old.workTaskId ||
|
|
123
|
-
!old.taskIds.includes(old.workTaskId))
|
|
124
|
-
throw new Error('Done requires a successful current work attempt');
|
|
125
|
-
if (check?.by === 'checker' &&
|
|
126
|
-
(check.verdict !== 'pass' ||
|
|
127
|
-
!check.taskId ||
|
|
128
|
-
!currentAttemptIds(old).includes(check.taskId)))
|
|
129
|
-
throw new Error('Done requires a passing checker verdict from the current check attempt');
|
|
130
|
-
}
|
|
131
|
-
if (check?.by === 'planner' &&
|
|
132
|
-
(s.state === 'done' || s.state === 'failed'))
|
|
133
|
-
check.verdict = s.state === 'done' ? 'pass' : 'fail';
|
|
87
|
+
if (effectiveState === 'running' && effectiveState !== old?.state)
|
|
88
|
+
throw new Error('Running state follows actual work attempts');
|
|
89
|
+
if (s.state === 'done' && old?.state !== 'done')
|
|
90
|
+
throw new Error('Done requires a successful current task result');
|
|
134
91
|
return {
|
|
135
92
|
...s,
|
|
136
93
|
state: old
|
|
@@ -138,15 +95,18 @@ export function mergePlan(previous, input, status, question, options = {}) {
|
|
|
138
95
|
: s.state === 'skipped'
|
|
139
96
|
? 'skipped'
|
|
140
97
|
: 'pending',
|
|
141
|
-
taskIds: itemsChanged
|
|
142
|
-
? []
|
|
143
|
-
: (old?.taskIds ?? []).filter((id) => !ownershipChanged || id !== old?.check?.taskId),
|
|
98
|
+
taskIds: itemsChanged ? [] : (old?.taskIds ?? []),
|
|
144
99
|
workTaskId: itemsChanged ? undefined : old?.workTaskId,
|
|
145
100
|
successfulWorkTaskId: itemsChanged || effectiveState === 'pending'
|
|
146
101
|
? undefined
|
|
147
102
|
: old?.successfulWorkTaskId,
|
|
103
|
+
checkedTaskIds: itemsChanged || effectiveState === 'pending'
|
|
104
|
+
? undefined
|
|
105
|
+
: old?.checkedTaskIds,
|
|
148
106
|
note: s.note ?? old?.note,
|
|
149
|
-
|
|
107
|
+
verdict: itemsChanged || effectiveState === 'pending'
|
|
108
|
+
? undefined
|
|
109
|
+
: old?.verdict,
|
|
150
110
|
};
|
|
151
111
|
}),
|
|
152
112
|
};
|
|
@@ -158,8 +118,7 @@ export function readySteps(plan) {
|
|
|
158
118
|
return (plan?.steps.filter((s) => s.state === 'pending' && dependenciesDone(plan, s)) ?? []);
|
|
159
119
|
}
|
|
160
120
|
export function currentWorkTaskId(step) {
|
|
161
|
-
return
|
|
162
|
-
step.taskIds.filter((id) => id !== step.check?.taskId).at(-1));
|
|
121
|
+
return step.workTaskId ?? step.taskIds.at(-1);
|
|
163
122
|
}
|
|
164
123
|
// Only verified current persisted work may supply the optional legacy marker.
|
|
165
124
|
export function restoreSuccessfulWork(step, getTask) {
|
|
@@ -176,14 +135,30 @@ export function restoreSuccessfulWork(step, getTask) {
|
|
|
176
135
|
}
|
|
177
136
|
}
|
|
178
137
|
export function currentAttemptIds(step) {
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
138
|
+
const id = currentWorkTaskId(step);
|
|
139
|
+
return id ? [id] : [];
|
|
140
|
+
}
|
|
141
|
+
/** Normalize persisted pre-check-step plans without changing their work history. */
|
|
142
|
+
export function restoreLegacyStep(step) {
|
|
143
|
+
if ('check' in step) {
|
|
144
|
+
const legacy = z
|
|
145
|
+
.object({ taskId: z.string().optional() })
|
|
146
|
+
.safeParse(step.check);
|
|
147
|
+
if (!step.workTaskId)
|
|
148
|
+
step.workTaskId = step.taskIds
|
|
149
|
+
.filter((id) => id !== (legacy.success ? legacy.data.taskId : undefined))
|
|
150
|
+
.at(-1);
|
|
151
|
+
delete step.check;
|
|
152
|
+
}
|
|
153
|
+
if (String(step.state) === 'checking') {
|
|
154
|
+
step.state = 'done';
|
|
155
|
+
step.note = [
|
|
156
|
+
step.note,
|
|
157
|
+
'Legacy check was not run; plan a separate check step if needed',
|
|
158
|
+
]
|
|
159
|
+
.filter(Boolean)
|
|
160
|
+
.join('; ');
|
|
161
|
+
}
|
|
187
162
|
}
|
|
188
163
|
export function recomputePlanStatus(plan) {
|
|
189
164
|
if (!plan?.steps.length || plan.status === 'waiting_user')
|
|
@@ -197,17 +172,20 @@ export function recomputePlanStatus(plan) {
|
|
|
197
172
|
}
|
|
198
173
|
// The verdict is the whole output or the outermost JSON objects in prose or
|
|
199
174
|
// fences. Nested objects are evidence; conflicting verdicts are unusable.
|
|
175
|
+
const verdictSchema = z.object({
|
|
176
|
+
verdict: z.enum(['pass', 'fail']),
|
|
177
|
+
count: z.number().int().nonnegative().optional(),
|
|
178
|
+
note: z.string().optional(),
|
|
179
|
+
});
|
|
200
180
|
function checkerVerdict(output) {
|
|
201
181
|
const parse = (text) => {
|
|
202
182
|
try {
|
|
203
|
-
const value = JSON.parse(text);
|
|
204
|
-
|
|
205
|
-
return value;
|
|
183
|
+
const value = verdictSchema.safeParse(JSON.parse(text));
|
|
184
|
+
return value.success ? value.data : undefined;
|
|
206
185
|
}
|
|
207
186
|
catch {
|
|
208
|
-
|
|
187
|
+
return undefined;
|
|
209
188
|
}
|
|
210
|
-
return undefined;
|
|
211
189
|
};
|
|
212
190
|
const whole = parse(output.trim());
|
|
213
191
|
if (whole !== undefined)
|
|
@@ -239,16 +217,34 @@ function checkerVerdict(output) {
|
|
|
239
217
|
depth++;
|
|
240
218
|
else if (char === '}' && --depth === 0) {
|
|
241
219
|
const value = parse(output.slice(start, i + 1));
|
|
242
|
-
if (value
|
|
243
|
-
|
|
220
|
+
if (value === undefined)
|
|
221
|
+
return undefined;
|
|
222
|
+
candidates.push(value);
|
|
244
223
|
}
|
|
245
224
|
}
|
|
225
|
+
if (depth !== 0)
|
|
226
|
+
return undefined;
|
|
246
227
|
// Every outcome field must agree: quoted evidence cannot change the result.
|
|
247
228
|
const outcome = (c) => JSON.stringify([c.verdict, c.count]);
|
|
248
229
|
if (new Set(candidates.map(outcome)).size !== 1)
|
|
249
230
|
return undefined;
|
|
250
231
|
return candidates.at(-1);
|
|
251
232
|
}
|
|
233
|
+
function checkSourcesCurrent(plan, step) {
|
|
234
|
+
return (step.dependsOn ?? []).every((id) => {
|
|
235
|
+
const source = plan.steps.find((s) => s.id === id);
|
|
236
|
+
return (source?.successfulWorkTaskId !== undefined &&
|
|
237
|
+
step.checkedTaskIds?.[id] === source.successfulWorkTaskId);
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function resetStaleCheck(step) {
|
|
241
|
+
step.state = 'pending';
|
|
242
|
+
delete step.verdict;
|
|
243
|
+
delete step.successfulWorkTaskId;
|
|
244
|
+
delete step.checkedTaskIds;
|
|
245
|
+
step.note =
|
|
246
|
+
'Checked results changed; delegate this check again for the current results';
|
|
247
|
+
}
|
|
252
248
|
export function applyTaskEvent(plan, { task, kind }, taskSteps) {
|
|
253
249
|
const owner = taskSteps?.get(task.id);
|
|
254
250
|
const step = plan?.steps.find((s) => owner === undefined ? s.taskIds.includes(task.id) : s.id === owner);
|
|
@@ -260,6 +256,10 @@ export function applyTaskEvent(plan, { task, kind }, taskSteps) {
|
|
|
260
256
|
// Older retry outcomes cannot overwrite the current attempt.
|
|
261
257
|
if (!currentAttemptIds(step).includes(task.id))
|
|
262
258
|
return;
|
|
259
|
+
if (step.worker === 'checker' && plan && !checkSourcesCurrent(plan, step)) {
|
|
260
|
+
resetStaleCheck(step);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
263
|
if (currentWorkTaskId(step) === task.id) {
|
|
264
264
|
step.workTaskId = task.id;
|
|
265
265
|
step.successfulWorkTaskId =
|
|
@@ -269,67 +269,70 @@ export function applyTaskEvent(plan, { task, kind }, taskSteps) {
|
|
|
269
269
|
? task.id
|
|
270
270
|
: undefined;
|
|
271
271
|
}
|
|
272
|
+
if (step.successfulWorkTaskId && plan) {
|
|
273
|
+
for (const check of plan.steps) {
|
|
274
|
+
if (check.worker === 'checker' &&
|
|
275
|
+
check.state !== 'skipped' &&
|
|
276
|
+
check.dependsOn?.includes(step.id) &&
|
|
277
|
+
!checkSourcesCurrent(plan, check))
|
|
278
|
+
resetStaleCheck(check);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
272
281
|
if (step.items && task.budgetExhausted) {
|
|
273
282
|
step.state = 'failed';
|
|
274
283
|
step.note = `Worker hit the tool-call budget ${task.toolCalls ?? '?'}/${task.maxToolCalls ?? '?'}; split the step (${step.items.length} items) before retrying`;
|
|
275
284
|
return;
|
|
276
285
|
}
|
|
277
|
-
if (kind === 'done' &&
|
|
278
|
-
!step.items &&
|
|
279
|
-
task.budgetExhausted &&
|
|
280
|
-
currentWorkTaskId(step) === task.id) {
|
|
281
|
-
const note = `Worker hit the tool-call budget ${task.toolCalls ?? '?'}/${task.maxToolCalls ?? '?'}; verify the result is complete or split the step`;
|
|
282
|
-
step.state = 'checking';
|
|
283
|
-
step.check ??= { by: 'planner', goal: note };
|
|
284
|
-
step.note = note;
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
286
|
if (kind !== 'done') {
|
|
287
|
+
if (step.worker === 'checker')
|
|
288
|
+
step.verdict = 'fail';
|
|
288
289
|
step.state = 'failed';
|
|
289
290
|
step.note = task.error ?? kind;
|
|
290
291
|
return;
|
|
291
292
|
}
|
|
292
|
-
if (step.
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
step.state = 'checking';
|
|
300
|
-
const verdict = checkerVerdict(task.output ?? '');
|
|
293
|
+
if (step.worker === 'checker') {
|
|
294
|
+
const output = task.output?.trim() ?? '';
|
|
295
|
+
const verdict = /^(PASS|FAIL)$/i.test(output)
|
|
296
|
+
? { verdict: output.toLowerCase() }
|
|
297
|
+
: checkerVerdict(output);
|
|
301
298
|
const parsed = z
|
|
302
299
|
.object({
|
|
303
300
|
verdict: z.enum(['pass', 'fail']),
|
|
304
301
|
note: z.string().optional(),
|
|
305
|
-
count: z.number().optional(),
|
|
302
|
+
count: z.number().int().nonnegative().optional(),
|
|
306
303
|
})
|
|
307
304
|
.safeParse(verdict);
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
parsed.data.count !== undefined &&
|
|
315
|
-
parsed.data.count < step.items.length) {
|
|
316
|
-
parsed.data.verdict = 'fail';
|
|
317
|
-
parsed.data.note =
|
|
318
|
-
`${parsed.data.note ?? ''} Count ${parsed.data.count}/${step.items.length}: missing item results`.trim();
|
|
319
|
-
}
|
|
320
|
-
step.check.verdict = parsed.data.verdict;
|
|
321
|
-
step.state = parsed.data.verdict === 'pass' ? 'done' : 'failed';
|
|
322
|
-
step.note = parsed.data.note ?? parsed.data.verdict;
|
|
305
|
+
const expected = (step.dependsOn ?? []).flatMap((id) => plan?.steps.find((s) => s.id === id)?.items ?? []);
|
|
306
|
+
if (!parsed.success) {
|
|
307
|
+
step.verdict = 'fail';
|
|
308
|
+
step.state = 'failed';
|
|
309
|
+
step.note =
|
|
310
|
+
'Checker returned an unusable verdict; plan a fix step and a new check';
|
|
323
311
|
}
|
|
324
312
|
else {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
313
|
+
const short = expected.length > 0 && (parsed.data.count ?? -1) < expected.length;
|
|
314
|
+
step.verdict = short ? 'fail' : parsed.data.verdict;
|
|
315
|
+
step.state = step.verdict === 'pass' ? 'done' : 'failed';
|
|
316
|
+
step.note = short
|
|
317
|
+
? `Count ${parsed.data.count ?? 'missing'}/${expected.length}: missing item results`
|
|
318
|
+
: (parsed.data.note ?? parsed.data.verdict);
|
|
329
319
|
}
|
|
330
320
|
}
|
|
331
|
-
else
|
|
332
|
-
step.state =
|
|
321
|
+
else {
|
|
322
|
+
step.state = 'done';
|
|
323
|
+
if (task.budgetExhausted)
|
|
324
|
+
step.note = `Worker hit the tool-call budget ${task.toolCalls ?? '?'}/${task.maxToolCalls ?? '?'}; verify the result is complete or split the step`;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
/** Require a passing check and no failing latest check attempts. */
|
|
328
|
+
export function deliveryChecksPassed(plan, stepId) {
|
|
329
|
+
const checks = plan.steps.filter((s) => s.worker === 'checker' && s.dependsOn?.includes(stepId));
|
|
330
|
+
if (!checks.length)
|
|
331
|
+
return true;
|
|
332
|
+
const latest = checks.filter((s) => !checks.some((next) => next.dependsOn?.includes(s.id)));
|
|
333
|
+
return (latest.some((s) => s.state === 'done' &&
|
|
334
|
+
s.verdict === 'pass' &&
|
|
335
|
+
checkSourcesCurrent(plan, s)) && !latest.some((s) => s.state === 'failed' || s.verdict === 'fail'));
|
|
333
336
|
}
|
|
334
337
|
export function planView(plan) {
|
|
335
338
|
if (!plan)
|
|
@@ -337,7 +340,7 @@ export function planView(plan) {
|
|
|
337
340
|
const priority = (step) => {
|
|
338
341
|
if (step.state === 'pending' && dependenciesDone(plan, step))
|
|
339
342
|
return 0;
|
|
340
|
-
if (step.state === 'running'
|
|
343
|
+
if (step.state === 'running')
|
|
341
344
|
return 1;
|
|
342
345
|
if (step.state === 'pending')
|
|
343
346
|
return 2;
|
|
@@ -358,14 +361,12 @@ export function planView(plan) {
|
|
|
358
361
|
...visible.map((s) => {
|
|
359
362
|
const current = currentAttemptIds(s);
|
|
360
363
|
const work = currentWorkTaskId(s);
|
|
361
|
-
const check = s.check?.taskId;
|
|
362
364
|
const older = s.taskIds.filter((id) => !current.includes(id)).length;
|
|
363
365
|
const attempts = [
|
|
364
366
|
work ? `work ${work}` : '',
|
|
365
|
-
check && current.includes(check) ? `check ${check}` : '',
|
|
366
367
|
older ? `${older} older attempts` : '',
|
|
367
368
|
].filter(Boolean);
|
|
368
|
-
return `${s.id} ${s.state === 'pending' && dependenciesDone(plan, s) ? 'ready' : s.state} ${s.goal.replace(/\s+/g, ' ')}${s.dependsOn?.length ? ` (depends on ${s.dependsOn.join(', ')})` : ''}${attempts.length ? ` (${attempts.join(', ')})` : ''}${s.items ? `; items: ${s.items.length}` : ''}${s.
|
|
369
|
+
return `${s.id} ${s.state === 'pending' && dependenciesDone(plan, s) ? 'ready' : s.state} ${s.goal.replace(/\s+/g, ' ')}${s.dependsOn?.length ? ` (depends on ${s.dependsOn.join(', ')})` : ''}${attempts.length ? ` (${attempts.join(', ')})` : ''}${s.items ? `; items: ${s.items.length}` : ''}${s.note ? ` \u00b7 ${s.note}` : ''}`;
|
|
369
370
|
}),
|
|
370
371
|
]
|
|
371
372
|
.filter(Boolean)
|