@modular-prompt/process 0.3.1 → 0.3.3
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/workflows/agentic-workflow/agentic-workflow.d.ts.map +1 -1
- package/dist/workflows/agentic-workflow/agentic-workflow.js +56 -18
- package/dist/workflows/agentic-workflow/agentic-workflow.js.map +1 -1
- package/dist/workflows/agentic-workflow/process/builtin-tools.d.ts +5 -11
- package/dist/workflows/agentic-workflow/process/builtin-tools.d.ts.map +1 -1
- package/dist/workflows/agentic-workflow/process/builtin-tools.js +53 -44
- package/dist/workflows/agentic-workflow/process/builtin-tools.js.map +1 -1
- package/dist/workflows/agentic-workflow/process/query-with-tools.d.ts +13 -5
- package/dist/workflows/agentic-workflow/process/query-with-tools.d.ts.map +1 -1
- package/dist/workflows/agentic-workflow/process/query-with-tools.js +82 -34
- package/dist/workflows/agentic-workflow/process/query-with-tools.js.map +1 -1
- package/dist/workflows/agentic-workflow/task-types/execution-tasks.d.ts +2 -2
- package/dist/workflows/agentic-workflow/task-types/execution-tasks.d.ts.map +1 -1
- package/dist/workflows/agentic-workflow/task-types/execution-tasks.js +13 -21
- package/dist/workflows/agentic-workflow/task-types/execution-tasks.js.map +1 -1
- package/dist/workflows/agentic-workflow/task-types/index.d.ts +10 -4
- package/dist/workflows/agentic-workflow/task-types/index.d.ts.map +1 -1
- package/dist/workflows/agentic-workflow/task-types/index.js +53 -15
- package/dist/workflows/agentic-workflow/task-types/index.js.map +1 -1
- package/dist/workflows/agentic-workflow/task-types/output.d.ts +3 -3
- package/dist/workflows/agentic-workflow/task-types/output.d.ts.map +1 -1
- package/dist/workflows/agentic-workflow/task-types/output.js +4 -12
- package/dist/workflows/agentic-workflow/task-types/output.js.map +1 -1
- package/dist/workflows/agentic-workflow/task-types/planning.d.ts +12 -2
- package/dist/workflows/agentic-workflow/task-types/planning.d.ts.map +1 -1
- package/dist/workflows/agentic-workflow/task-types/planning.js +90 -26
- package/dist/workflows/agentic-workflow/task-types/planning.js.map +1 -1
- package/dist/workflows/agentic-workflow/types.d.ts +4 -5
- package/dist/workflows/agentic-workflow/types.d.ts.map +1 -1
- package/dist/workflows/agentic-workflow/types.js +2 -2
- package/dist/workflows/agentic-workflow/types.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tool calling loop implementation
|
|
3
|
+
*
|
|
4
|
+
* Handles builtin tool execution with error-based retry.
|
|
5
|
+
* When a tool call fails (builtin error or invalid tool name),
|
|
6
|
+
* the error result is fed back to the model for correction.
|
|
3
7
|
*/
|
|
4
8
|
import { distribute } from '@modular-prompt/core';
|
|
5
9
|
import { Logger } from '@modular-prompt/utils';
|
|
@@ -38,60 +42,104 @@ async function executeBuiltinToolCalls(toolCalls, builtinTools, logger) {
|
|
|
38
42
|
return results;
|
|
39
43
|
}
|
|
40
44
|
/**
|
|
41
|
-
*
|
|
45
|
+
* Query the model and handle tool calls with error retry.
|
|
46
|
+
*
|
|
47
|
+
* Builtin tools (__ prefix) are executed internally.
|
|
48
|
+
* External tool calls are returned as pending for the caller.
|
|
42
49
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* Tool results are passed to subsequent tasks via preparationNote.
|
|
50
|
+
* On tool errors (builtin execution failure or invalid tool name),
|
|
51
|
+
* the error is fed back to the model and the query is retried
|
|
52
|
+
* up to maxRetries times.
|
|
47
53
|
*/
|
|
48
54
|
export async function queryWithTools(driver, resolved, builtinTools, options = {}) {
|
|
49
|
-
const { externalToolDefs = [], logger: qLogger = logger } = options;
|
|
55
|
+
const { externalToolDefs = [], maxRetries = 2, logger: qLogger = logger } = options;
|
|
50
56
|
const allToolDefs = [
|
|
51
57
|
...builtinTools.map(t => t.definition),
|
|
52
58
|
...externalToolDefs,
|
|
53
59
|
];
|
|
60
|
+
const validExternalNames = new Set(externalToolDefs.map(d => d.name));
|
|
54
61
|
const toolCallLog = [];
|
|
55
|
-
// Single query
|
|
56
62
|
const prompt = distribute(resolved);
|
|
57
|
-
const
|
|
63
|
+
const queryOptions = {
|
|
58
64
|
tools: allToolDefs.length > 0 ? allToolDefs : undefined,
|
|
59
65
|
toolChoice: options.toolChoice ?? 'auto',
|
|
60
66
|
...(options.maxTokens ? { maxTokens: options.maxTokens } : {}),
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const
|
|
67
|
+
};
|
|
68
|
+
let retryCount = 0;
|
|
69
|
+
while (true) {
|
|
70
|
+
const queryResult = await driver.query(prompt, queryOptions);
|
|
71
|
+
qLogger.verbose('[output]', queryResult.content);
|
|
72
|
+
const content = queryResult.content || '';
|
|
73
|
+
// No tool calls → return
|
|
74
|
+
if (!queryResult.toolCalls || queryResult.toolCalls.length === 0) {
|
|
75
|
+
return { content, toolCallLog, usage: queryResult.usage, finishReason: queryResult.finishReason };
|
|
76
|
+
}
|
|
77
|
+
// Log tool calls
|
|
78
|
+
for (const tc of queryResult.toolCalls) {
|
|
79
|
+
qLogger.info('[tool:call]', tc.name, JSON.stringify(tc.arguments));
|
|
80
|
+
}
|
|
81
|
+
// Partition: builtin / valid external / invalid
|
|
82
|
+
const builtinCalls = queryResult.toolCalls.filter(tc => isBuiltinTool(tc.name));
|
|
83
|
+
const externalCalls = queryResult.toolCalls.filter(tc => !isBuiltinTool(tc.name));
|
|
84
|
+
const validExternalCalls = externalCalls.filter(tc => validExternalNames.has(tc.name));
|
|
85
|
+
const invalidCalls = externalCalls.filter(tc => !validExternalNames.has(tc.name));
|
|
86
|
+
// Execute builtin tools
|
|
87
|
+
const builtinResults = builtinCalls.length > 0
|
|
88
|
+
? await executeBuiltinToolCalls(builtinCalls, builtinTools, qLogger)
|
|
89
|
+
: [];
|
|
90
|
+
// Record successful builtin results
|
|
78
91
|
for (let j = 0; j < builtinCalls.length; j++) {
|
|
79
92
|
toolCallLog.push({
|
|
80
93
|
name: builtinCalls[j].name,
|
|
81
94
|
arguments: builtinCalls[j].arguments,
|
|
82
|
-
result:
|
|
95
|
+
result: builtinResults[j].value,
|
|
83
96
|
});
|
|
84
97
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
// Generate error results for invalid tool names
|
|
99
|
+
const invalidResults = invalidCalls.map(tc => ({
|
|
100
|
+
type: 'message', role: 'tool', toolCallId: tc.id, name: tc.name,
|
|
101
|
+
kind: 'error',
|
|
102
|
+
value: `Unknown tool: "${tc.name}". Available tools: ${allToolDefs.map(d => d.name).join(', ')}`,
|
|
103
|
+
}));
|
|
104
|
+
// Check for errors
|
|
105
|
+
const hasBuiltinErrors = builtinResults.some(r => r.kind === 'error');
|
|
106
|
+
const hasInvalidCalls = invalidCalls.length > 0;
|
|
107
|
+
const hasErrors = hasBuiltinErrors || hasInvalidCalls;
|
|
108
|
+
// No errors: return normally
|
|
109
|
+
if (!hasErrors) {
|
|
110
|
+
if (validExternalCalls.length > 0) {
|
|
111
|
+
return {
|
|
112
|
+
content, toolCallLog,
|
|
113
|
+
pendingToolCalls: validExternalCalls,
|
|
114
|
+
usage: queryResult.usage, finishReason: queryResult.finishReason,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
return { content, toolCallLog, usage: queryResult.usage, finishReason: queryResult.finishReason };
|
|
118
|
+
}
|
|
119
|
+
// Errors exist but no retries left → return what we have
|
|
120
|
+
if (retryCount >= maxRetries) {
|
|
121
|
+
qLogger.info('[retry:exhausted]', `gave up after ${maxRetries} retries`);
|
|
122
|
+
if (validExternalCalls.length > 0) {
|
|
123
|
+
return {
|
|
124
|
+
content, toolCallLog,
|
|
125
|
+
pendingToolCalls: validExternalCalls,
|
|
126
|
+
usage: queryResult.usage, finishReason: queryResult.finishReason,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return { content, toolCallLog, usage: queryResult.usage, finishReason: queryResult.finishReason };
|
|
130
|
+
}
|
|
131
|
+
// Retry: append assistant message + tool results to prompt.output
|
|
132
|
+
retryCount++;
|
|
133
|
+
qLogger.info('[retry]', `attempt ${retryCount}/${maxRetries} due to tool errors`);
|
|
134
|
+
const assistantMessage = {
|
|
135
|
+
type: 'message', role: 'assistant', content: content,
|
|
136
|
+
toolCalls: queryResult.toolCalls,
|
|
92
137
|
};
|
|
138
|
+
const allToolResults = [...builtinResults, ...invalidResults];
|
|
139
|
+
prompt.output.push(assistantMessage, ...allToolResults);
|
|
140
|
+
// After first query, switch toolChoice to auto for retries
|
|
141
|
+
queryOptions.toolChoice = 'auto';
|
|
93
142
|
}
|
|
94
|
-
return { content, toolCallLog, usage: queryResult.usage, finishReason: queryResult.finishReason };
|
|
95
143
|
}
|
|
96
144
|
export function rethrowAsWorkflowError(error, context, details) {
|
|
97
145
|
if (error instanceof WorkflowExecutionError)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-with-tools.js","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/process/query-with-tools.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"query-with-tools.js","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/process/query-with-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAIxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SA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C,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,GAAG,cAAc,CAAC,CAAC;QAExD,2DAA2D;QAC3D,YAAY,CAAC,UAAU,GAAG,MAAM,CAAC;IACnC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,KAAc,EACd,OAAgB,EAChB,OAAgC;IAEhC,IAAI,KAAK,YAAY,sBAAsB;QAAE,MAAM,KAAK,CAAC;IACzD,MAAM,IAAI,sBAAsB,CAAC,KAAc,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -25,11 +25,11 @@ interface ExecutionTaskDef {
|
|
|
25
25
|
withMessages: boolean;
|
|
26
26
|
withMaterials: boolean;
|
|
27
27
|
};
|
|
28
|
-
/** Description for
|
|
28
|
+
/** Description for __register_tasks tool enum */
|
|
29
29
|
toolDescription: string;
|
|
30
30
|
/** maxTokens tier (default: 'middle') */
|
|
31
31
|
maxTokensTier: MaxTokensTier;
|
|
32
|
-
/** Builtin tool names (default: ['
|
|
32
|
+
/** Builtin tool names (default: ['__replan', '__time']) */
|
|
33
33
|
builtinToolNames?: string[];
|
|
34
34
|
}
|
|
35
35
|
export declare const EXECUTION_TASK_DEFS: Record<string, ExecutionTaskDef>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-tasks.d.ts","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/execution-tasks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"execution-tasks.d.ts","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/execution-tasks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAMhE,UAAU,gBAAgB;IACxB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,0BAA0B;IAC1B,UAAU,EAAE,SAAS,CAAC;IACtB,2BAA2B;IAC3B,QAAQ,EAAE;QAAE,UAAU,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;IACjF,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAC;IACxB,yCAAyC;IACzC,aAAa,EAAE,aAAa,CAAC;IAC7B,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAMD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA4EhE,CAAC;AAwEF,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAE/D,CAAC"}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* 2. types.ts の TaskType union に追加
|
|
11
11
|
* → レジストリ登録・ツール定義は自動的に反映される
|
|
12
12
|
*/
|
|
13
|
-
import { buildPreviousResultsNote } from './index.js';
|
|
14
13
|
// ---------------------------------------------------------------------------
|
|
15
14
|
// Task definitions
|
|
16
15
|
// ---------------------------------------------------------------------------
|
|
@@ -20,35 +19,35 @@ export const EXECUTION_TASK_DEFS = {
|
|
|
20
19
|
instructions: [
|
|
21
20
|
'- You will perform reasoning, analysis, or processing as instructed.',
|
|
22
21
|
'- You may call tools if needed to gather information or perform actions.',
|
|
23
|
-
'- If additional tasks are needed to complete the objective, use `
|
|
22
|
+
'- If additional tasks are needed to complete the objective, use `__replan` to request re-planning.',
|
|
24
23
|
],
|
|
25
24
|
driverRole: 'thinking',
|
|
26
25
|
defaults: { withInputs: false, withMessages: false, withMaterials: false },
|
|
27
|
-
toolDescription: '
|
|
26
|
+
toolDescription: 'produces analysis, reasoning, or processed results',
|
|
28
27
|
maxTokensTier: 'high',
|
|
29
28
|
},
|
|
30
|
-
|
|
31
|
-
objective: '-
|
|
29
|
+
act: {
|
|
30
|
+
objective: '- Perform the required action using tools according to your Focus.',
|
|
32
31
|
instructions: [
|
|
33
|
-
'-
|
|
32
|
+
'- Use tools to perform the action described in your Focus.',
|
|
34
33
|
'- Tool results are automatically passed to subsequent Tasks.',
|
|
35
34
|
],
|
|
36
35
|
driverRole: 'instruct',
|
|
37
36
|
defaults: { withInputs: false, withMessages: false, withMaterials: false },
|
|
38
|
-
toolDescription: '
|
|
37
|
+
toolDescription: 'performs an external action using tools and reports its outcome',
|
|
39
38
|
maxTokensTier: 'low',
|
|
40
|
-
builtinToolNames: ['__time'],
|
|
39
|
+
builtinToolNames: ['__replan', '__time'],
|
|
41
40
|
},
|
|
42
41
|
verify: {
|
|
43
42
|
objective: '- Verify or validate results from previous Tasks according to your Focus.',
|
|
44
43
|
instructions: [
|
|
45
44
|
'- You will verify or validate results from previous Tasks as instructed.',
|
|
46
45
|
'- Report any issues, inconsistencies, or confirmations clearly.',
|
|
47
|
-
'- If verification fails or results are insufficient, use `
|
|
46
|
+
'- If verification fails or results are insufficient, use `__replan` to request re-planning for corrective tasks.',
|
|
48
47
|
],
|
|
49
48
|
driverRole: 'thinking',
|
|
50
49
|
defaults: { withInputs: false, withMessages: false, withMaterials: false },
|
|
51
|
-
toolDescription: '
|
|
50
|
+
toolDescription: 'produces a validation report on previous deliverables',
|
|
52
51
|
maxTokensTier: 'low',
|
|
53
52
|
},
|
|
54
53
|
extractContext: {
|
|
@@ -62,7 +61,7 @@ export const EXECUTION_TASK_DEFS = {
|
|
|
62
61
|
],
|
|
63
62
|
driverRole: 'thinking',
|
|
64
63
|
defaults: { withInputs: true, withMessages: true, withMaterials: true },
|
|
65
|
-
toolDescription: '
|
|
64
|
+
toolDescription: 'produces structured extraction from inputs/materials',
|
|
66
65
|
maxTokensTier: 'high',
|
|
67
66
|
},
|
|
68
67
|
recall: {
|
|
@@ -75,7 +74,7 @@ export const EXECUTION_TASK_DEFS = {
|
|
|
75
74
|
],
|
|
76
75
|
driverRole: 'instruct',
|
|
77
76
|
defaults: { withInputs: false, withMessages: false, withMaterials: false },
|
|
78
|
-
toolDescription: '
|
|
77
|
+
toolDescription: 'produces retrieved knowledge from search tools or training data',
|
|
79
78
|
maxTokensTier: 'middle',
|
|
80
79
|
},
|
|
81
80
|
determine: {
|
|
@@ -87,7 +86,7 @@ export const EXECUTION_TASK_DEFS = {
|
|
|
87
86
|
],
|
|
88
87
|
driverRole: 'thinking',
|
|
89
88
|
defaults: { withInputs: true, withMessages: true, withMaterials: true },
|
|
90
|
-
toolDescription: '
|
|
89
|
+
toolDescription: 'produces a definitive decision with supporting reasoning',
|
|
91
90
|
maxTokensTier: 'middle',
|
|
92
91
|
},
|
|
93
92
|
};
|
|
@@ -113,13 +112,6 @@ function buildModule(def) {
|
|
|
113
112
|
],
|
|
114
113
|
},
|
|
115
114
|
],
|
|
116
|
-
preparationNote: [
|
|
117
|
-
(ctx) => {
|
|
118
|
-
if (!ctx.executionLog?.length)
|
|
119
|
-
return null;
|
|
120
|
-
return buildPreviousResultsNote(ctx.executionLog);
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
115
|
materials: [
|
|
124
116
|
(ctx) => {
|
|
125
117
|
const task = ctx.taskList?.[ctx.currentTaskIndex ?? 0];
|
|
@@ -150,7 +142,7 @@ function buildModule(def) {
|
|
|
150
142
|
};
|
|
151
143
|
return module;
|
|
152
144
|
}
|
|
153
|
-
const DEFAULT_BUILTIN_TOOLS = ['
|
|
145
|
+
const DEFAULT_BUILTIN_TOOLS = ['__replan', '__time'];
|
|
154
146
|
function buildConfig(def) {
|
|
155
147
|
return {
|
|
156
148
|
module: buildModule(def),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-tasks.js","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/execution-tasks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"execution-tasks.js","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/execution-tasks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA4BH,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,mBAAmB,GAAqC;IACnE,KAAK,EAAE;QACL,SAAS,EAAE,uEAAuE;QAClF,YAAY,EAAE;YACZ,sEAAsE;YACtE,0EAA0E;YAC1E,oGAAoG;SACrG;QACD,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;QAC1E,eAAe,EAAE,oDAAoD;QACrE,aAAa,EAAE,MAAM;KACtB;IACD,GAAG,EAAE;QACH,SAAS,EAAE,oEAAoE;QAC/E,YAAY,EAAE;YACZ,4DAA4D;YAC5D,8DAA8D;SAC/D;QACD,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;QAC1E,eAAe,EAAE,iEAAiE;QAClF,aAAa,EAAE,KAAK;QACpB,gBAAgB,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;KACzC;IACD,MAAM,EAAE;QACN,SAAS,EAAE,2EAA2E;QACtF,YAAY,EAAE;YACZ,0EAA0E;YAC1E,iEAAiE;YACjE,kHAAkH;SACnH;QACD,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;QAC1E,eAAe,EAAE,uDAAuD;QACxE,aAAa,EAAE,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,CAAC,QAAQ,CAAC,YAAY,CAAC;gBACrE,IAAI,CAAC,YAAY,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM;oBAAE,OAAO,IAAI,CAAC;gBACpE,OAAO,GAAG,CAAC,UAAU,CAAC,QAA4B,CAAC;YACrD,CAAC;SACF;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,qBAAqB,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAErD,SAAS,WAAW,CAAC,GAAqB;IACxC,OAAO;QACL,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC;QACxB,gBAAgB,EAAE,GAAG,CAAC,gBAAgB,IAAI,qBAAqB;QAC/D,aAAa,EAAE,GAAG,CAAC,aAAa;KACjC,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,0DAA0D;AAC1D,MAAM,CAAC,MAAM,oBAAoB,GAAmC,MAAM,CAAC,WAAW,CACpF,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CACnF,CAAC"}
|
|
@@ -25,17 +25,23 @@ export interface TaskTypeConfig {
|
|
|
25
25
|
*/
|
|
26
26
|
export declare function getTaskTypeConfig(taskType: TaskType): TaskTypeConfig;
|
|
27
27
|
/**
|
|
28
|
-
* Convert execution log to a TextElement for
|
|
29
|
-
* Each task result is formatted as a labeled block.
|
|
28
|
+
* Convert execution log to a TextElement for the state section.
|
|
29
|
+
* Each task result (deliverable) is formatted as a labeled block.
|
|
30
30
|
*/
|
|
31
|
-
export declare function
|
|
31
|
+
export declare function buildDeliverables(executionLog: AgenticTaskExecutionLog[]): TextElement;
|
|
32
32
|
/**
|
|
33
33
|
* Build task list display for methodology section
|
|
34
34
|
*/
|
|
35
35
|
export declare function buildTaskListDisplay(ctx: AgenticWorkflowContext): string;
|
|
36
|
+
/**
|
|
37
|
+
* Build task list with execution results for re-planning context.
|
|
38
|
+
* Each completed task is rendered as a markdown heading with its full result.
|
|
39
|
+
* Pending/current tasks are shown as single lines.
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildTaskListWithResults(ctx: AgenticWorkflowContext): string;
|
|
36
42
|
/**
|
|
37
43
|
* Common module shared by all task types.
|
|
38
|
-
* Provides workflow terms, methodology, and state
|
|
44
|
+
* Provides workflow terms, methodology, and deliverable state.
|
|
39
45
|
*/
|
|
40
46
|
export declare const taskCommon: PromptModule<AgenticWorkflowContext>;
|
|
41
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAK7F;;GAEG;AACH;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAItD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAI3D,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,MAAM,EAAE,YAAY,CAAC,sBAAsB,CAAC,CAAC;IAC7C,8DAA8D;IAC9D,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,yCAAyC;IACzC,aAAa,EAAE,aAAa,CAAC;CAC9B;AAYD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,CAEpE;AAED;;;GAGG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAK7F;;GAEG;AACH;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAItD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAI3D,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,MAAM,EAAE,YAAY,CAAC,sBAAsB,CAAC,CAAC;IAC7C,8DAA8D;IAC9D,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,yCAAyC;IACzC,aAAa,EAAE,aAAa,CAAC;CAC9B;AAYD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,CAEpE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,uBAAuB,EAAE,GACtC,WAAW,CAeb;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,sBAAsB,GAAG,MAAM,CAyBxE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,sBAAsB,GAAG,MAAM,CAiC5E;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,sBAAsB,CA8B3D,CAAC;AAEF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,MAAM,CAUvF"}
|
|
@@ -27,13 +27,14 @@ export function getTaskTypeConfig(taskType) {
|
|
|
27
27
|
return TASK_TYPE_REGISTRY[taskType];
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Convert execution log to a TextElement for
|
|
31
|
-
* Each task result is formatted as a labeled block.
|
|
30
|
+
* Convert execution log to a TextElement for the state section.
|
|
31
|
+
* Each task result (deliverable) is formatted as a labeled block.
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function buildDeliverables(executionLog) {
|
|
34
34
|
const content = executionLog
|
|
35
35
|
.map((log, index) => {
|
|
36
|
-
|
|
36
|
+
const taskName = log.taskName ? `${log.taskName}` : `Task ${index + 1}`;
|
|
37
|
+
let text = `[${taskName}: ${log.taskType}] ${log.instruction}\n${log.result}`;
|
|
37
38
|
if (log.toolCallLog?.length) {
|
|
38
39
|
const toolResults = log.toolCallLog
|
|
39
40
|
.map(tc => ` [tool: ${tc.name}] ${typeof tc.result === 'string' ? tc.result : JSON.stringify(tc.result)}`)
|
|
@@ -66,22 +67,59 @@ export function buildTaskListDisplay(ctx) {
|
|
|
66
67
|
else {
|
|
67
68
|
status = '[pending]';
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
+
const label = task.name ? `[${task.name}] ` : '';
|
|
71
|
+
lines.push(`${i + 1}. ${label}(${task.taskType}): ${task.instruction} ${status}`);
|
|
70
72
|
}
|
|
71
73
|
return lines.join('\n');
|
|
72
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Build task list with execution results for re-planning context.
|
|
77
|
+
* Each completed task is rendered as a markdown heading with its full result.
|
|
78
|
+
* Pending/current tasks are shown as single lines.
|
|
79
|
+
*/
|
|
80
|
+
export function buildTaskListWithResults(ctx) {
|
|
81
|
+
if (!ctx.taskList || ctx.taskList.length === 0) {
|
|
82
|
+
return 'No tasks registered yet.';
|
|
83
|
+
}
|
|
84
|
+
const blocks = [];
|
|
85
|
+
const currentIndex = ctx.currentTaskIndex ?? -1;
|
|
86
|
+
const executionLog = ctx.executionLog ?? [];
|
|
87
|
+
for (let i = 0; i < ctx.taskList.length; i++) {
|
|
88
|
+
const task = ctx.taskList[i];
|
|
89
|
+
const label = task.name ? `[${task.name}] ` : '';
|
|
90
|
+
if (i < currentIndex && i < executionLog.length) {
|
|
91
|
+
const log = executionLog[i];
|
|
92
|
+
const parts = [];
|
|
93
|
+
parts.push(`#### ${i + 1}. ${label}(${task.taskType}): ${task.instruction} [completed]`);
|
|
94
|
+
parts.push(log.result);
|
|
95
|
+
if (log.toolCallLog?.length) {
|
|
96
|
+
for (const tc of log.toolCallLog) {
|
|
97
|
+
const resultStr = typeof tc.result === 'string' ? tc.result : JSON.stringify(tc.result);
|
|
98
|
+
parts.push(`[tool: ${tc.name}] ${resultStr}`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
blocks.push(parts.join('\n\n'));
|
|
102
|
+
}
|
|
103
|
+
else if (i === currentIndex) {
|
|
104
|
+
blocks.push(`#### ${i + 1}. ${label}(${task.taskType}): ${task.instruction} **[current]**`);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
blocks.push(`#### ${i + 1}. ${label}(${task.taskType}): ${task.instruction} [pending]`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return blocks.join('\n\n');
|
|
111
|
+
}
|
|
73
112
|
/**
|
|
74
113
|
* Common module shared by all task types.
|
|
75
|
-
* Provides workflow terms, methodology, and state
|
|
114
|
+
* Provides workflow terms, methodology, and deliverable state.
|
|
76
115
|
*/
|
|
77
116
|
export const taskCommon = {
|
|
78
117
|
terms: [
|
|
79
|
-
'- **Workflow**:
|
|
80
|
-
'- **Task**: A unit of work
|
|
81
|
-
'- **
|
|
82
|
-
'- **
|
|
83
|
-
'- **
|
|
84
|
-
'- **Response Preparation Note**: Results from all previously completed Tasks. Use this as your primary reference for what has already been done.',
|
|
118
|
+
'- **Workflow**: A chain of deliverables that achieves the Objective.',
|
|
119
|
+
'- **Task**: A unit of work that produces a specific deliverable. Each Task is executed by a separate AI instance.',
|
|
120
|
+
'- **Deliverable**: The concrete output a Task produces. It becomes input for subsequent Tasks.',
|
|
121
|
+
'- **Task Type**: Defines the role of a Task (e.g. think, act, verify). The prompt is pre-configured for each type.',
|
|
122
|
+
'- **Focus**: The specific directive for the current Task — what deliverable to produce.',
|
|
85
123
|
],
|
|
86
124
|
methodology: [
|
|
87
125
|
`- We accomplish the Workflow's Objective by executing Tasks sequentially.`,
|
|
@@ -95,15 +133,15 @@ export const taskCommon = {
|
|
|
95
133
|
],
|
|
96
134
|
instructions: [
|
|
97
135
|
'- Do not perform work outside the scope of the current Task\'s Focus.',
|
|
98
|
-
'-
|
|
136
|
+
'- Refer to the deliverables from previous Tasks (shown in "Current State") as the basis for your work.',
|
|
99
137
|
'- If the instructions are contradictory, there is insufficient information, or you lack the required knowledge — report the issue instead of producing a speculative result.',
|
|
100
138
|
'- If the work is unnecessary given the current context, skip it and explain why. This is a valid and sufficient response.',
|
|
101
139
|
],
|
|
102
140
|
state: [
|
|
103
141
|
(ctx) => {
|
|
104
|
-
if (!ctx.
|
|
142
|
+
if (!ctx.executionLog?.length)
|
|
105
143
|
return null;
|
|
106
|
-
return ctx.
|
|
144
|
+
return buildDeliverables(ctx.executionLog);
|
|
107
145
|
},
|
|
108
146
|
],
|
|
109
147
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAW5D,+EAA+E;AAC/E,qHAAqH;AACrH,MAAM,CAAC,MAAM,iBAAiB,GAAkC;IAC9D,GAAG,EAAE,IAAI;IACT,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;CACX,CAAC;AAWF;;;GAGG;AACH,MAAM,kBAAkB,GAAqC;IAC3D,Q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D,KAAK,EAAE;QACL,sEAAsE;QACtE,mHAAmH;QACnH,gGAAgG;QAChG,oHAAoH;QACpH,yFAAyF;KAC1F;IACD,WAAW,EAAE;QACX,2EAA2E;QAC3E;YACE,IAAI,EAAE,YAAqB;YAC3B,KAAK,EAAE,qCAAqC;YAC5C,KAAK,EAAE;gBACL,CAAC,GAA2B,EAAE,EAAE,CAAC,oBAAoB,CAAC,GAAG,CAAC;aAC3D;SACF;KACF;IACD,YAAY,EAAE;QACZ,uEAAuE;QACvE,wGAAwG;QACxG,8KAA8K;QAC9K,2HAA2H;KAC5H;IACD,KAAK,EAAE;QACL,CAAC,GAA2B,EAAE,EAAE;YAC9B,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,MAAM;gBAAE,OAAO,IAAI,CAAC;YAC3C,OAAO,iBAAiB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC7C,CAAC;KACF;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAwC;IAC7E,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC3D,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Uses the full userModule (passed via workflowBase) as the prompt.
|
|
5
5
|
* This module only adds:
|
|
6
|
-
* - An instruction to
|
|
7
|
-
* - The execution log as preparationNote
|
|
6
|
+
* - An instruction to compose the final response from previous deliverables
|
|
8
7
|
*
|
|
9
|
-
*
|
|
8
|
+
* Previous task deliverables are provided via the state section (from taskCommon).
|
|
9
|
+
* The model sees the original user prompt with deliverables injected,
|
|
10
10
|
* so it naturally produces the expected response.
|
|
11
11
|
*
|
|
12
12
|
* Builtin tools: none
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AASjD,eAAO,MAAM,MAAM,EAAE,cAIpB,CAAC"}
|
|
@@ -3,27 +3,19 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Uses the full userModule (passed via workflowBase) as the prompt.
|
|
5
5
|
* This module only adds:
|
|
6
|
-
* - An instruction to
|
|
7
|
-
* - The execution log as preparationNote
|
|
6
|
+
* - An instruction to compose the final response from previous deliverables
|
|
8
7
|
*
|
|
9
|
-
*
|
|
8
|
+
* Previous task deliverables are provided via the state section (from taskCommon).
|
|
9
|
+
* The model sees the original user prompt with deliverables injected,
|
|
10
10
|
* so it naturally produces the expected response.
|
|
11
11
|
*
|
|
12
12
|
* Builtin tools: none
|
|
13
13
|
*/
|
|
14
|
-
import { buildPreviousResultsNote } from './index.js';
|
|
15
14
|
const outputModule = {
|
|
16
15
|
instructions: [
|
|
17
|
-
'- Compose the final response using the
|
|
16
|
+
'- Compose the final response using the deliverables from previous Tasks (shown in "Current State").',
|
|
18
17
|
'- Focus on presenting the results clearly. You may adapt, rephrase, or convert values as needed for the audience, but do not perform substantive new analysis.',
|
|
19
18
|
],
|
|
20
|
-
preparationNote: [
|
|
21
|
-
(ctx) => {
|
|
22
|
-
if (!ctx.executionLog?.length)
|
|
23
|
-
return null;
|
|
24
|
-
return buildPreviousResultsNote(ctx.executionLog);
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
19
|
};
|
|
28
20
|
export const config = {
|
|
29
21
|
module: outputModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,MAAM,YAAY,GAAyC;IACzD,YAAY,EAAE;QACZ,qGAAqG;QACrG,gKAAgK;KACjK;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAmB;IACpC,MAAM,EAAE,YAAY;IACpB,gBAAgB,EAAE,EAAE;IACpB,aAAa,EAAE,QAAQ;CACxB,CAAC"}
|
|
@@ -9,10 +9,20 @@
|
|
|
9
9
|
* - userModule compiled as "Prompt to analyze" material (includes inputs)
|
|
10
10
|
*
|
|
11
11
|
* Output side:
|
|
12
|
-
* - cue: user message instructing to call
|
|
12
|
+
* - cue: user message instructing to call __register_tasks tool
|
|
13
13
|
*
|
|
14
|
-
* Tools:
|
|
14
|
+
* Tools: __register_tasks
|
|
15
15
|
*/
|
|
16
|
+
import type { PromptModule } from '@modular-prompt/core';
|
|
17
|
+
import type { AgenticWorkflowContext } from '../types.js';
|
|
16
18
|
import type { TaskTypeConfig } from './index.js';
|
|
19
|
+
/**
|
|
20
|
+
* Additional module for re-planning.
|
|
21
|
+
*
|
|
22
|
+
* Merged with planningModule when existing deliverables are present
|
|
23
|
+
* (either from executionLog after __replan, or from trailing tool results).
|
|
24
|
+
* Provides the planner with visibility into completed work and current task list.
|
|
25
|
+
*/
|
|
26
|
+
export declare const replanningModule: PromptModule<AgenticWorkflowContext>;
|
|
17
27
|
export declare const config: TaskTypeConfig;
|
|
18
28
|
//# sourceMappingURL=planning.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/planning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../../../src/workflows/agentic-workflow/task-types/planning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA2HjD;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,sBAAsB,CAgBjE,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,cAIpB,CAAC"}
|