hanseol-dev 5.0.2-dev.9 → 5.0.2-dev.90
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/agents/common/sub-agent.d.ts +21 -0
- package/dist/agents/common/sub-agent.d.ts.map +1 -1
- package/dist/agents/common/sub-agent.js +195 -10
- package/dist/agents/common/sub-agent.js.map +1 -1
- package/dist/agents/index.d.ts +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +1 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/office/excel-agent.d.ts +1 -1
- package/dist/agents/office/excel-agent.d.ts.map +1 -1
- package/dist/agents/office/excel-agent.js +6 -6
- package/dist/agents/office/excel-agent.js.map +1 -1
- package/dist/agents/office/excel-create-agent.d.ts +3 -0
- package/dist/agents/office/excel-create-agent.d.ts.map +1 -0
- package/dist/agents/office/excel-create-agent.js +38 -0
- package/dist/agents/office/excel-create-agent.js.map +1 -0
- package/dist/agents/office/excel-create-prompts.d.ts +4 -0
- package/dist/agents/office/excel-create-prompts.d.ts.map +1 -0
- package/dist/agents/office/excel-create-prompts.js +154 -0
- package/dist/agents/office/excel-create-prompts.js.map +1 -0
- package/dist/agents/office/index.d.ts +6 -3
- package/dist/agents/office/index.d.ts.map +1 -1
- package/dist/agents/office/index.js +6 -3
- package/dist/agents/office/index.js.map +1 -1
- package/dist/agents/office/powerpoint-agent.d.ts +1 -1
- package/dist/agents/office/powerpoint-agent.d.ts.map +1 -1
- package/dist/agents/office/powerpoint-agent.js +6 -6
- package/dist/agents/office/powerpoint-agent.js.map +1 -1
- package/dist/agents/office/powerpoint-create-agent.d.ts +3 -0
- package/dist/agents/office/powerpoint-create-agent.d.ts.map +1 -0
- package/dist/agents/office/powerpoint-create-agent.js +918 -0
- package/dist/agents/office/powerpoint-create-agent.js.map +1 -0
- package/dist/agents/office/powerpoint-create-prompts.d.ts +19 -0
- package/dist/agents/office/powerpoint-create-prompts.d.ts.map +1 -0
- package/dist/agents/office/powerpoint-create-prompts.js +376 -0
- package/dist/agents/office/powerpoint-create-prompts.js.map +1 -0
- package/dist/agents/office/prompts.d.ts +10 -3
- package/dist/agents/office/prompts.d.ts.map +1 -1
- package/dist/agents/office/prompts.js +451 -52
- package/dist/agents/office/prompts.js.map +1 -1
- package/dist/agents/office/word-agent.d.ts +1 -1
- package/dist/agents/office/word-agent.d.ts.map +1 -1
- package/dist/agents/office/word-agent.js +6 -6
- package/dist/agents/office/word-agent.js.map +1 -1
- package/dist/agents/office/word-create-agent.d.ts +3 -0
- package/dist/agents/office/word-create-agent.d.ts.map +1 -0
- package/dist/agents/office/word-create-agent.js +38 -0
- package/dist/agents/office/word-create-agent.js.map +1 -0
- package/dist/agents/office/word-create-prompts.d.ts +4 -0
- package/dist/agents/office/word-create-prompts.d.ts.map +1 -0
- package/dist/agents/office/word-create-prompts.js +164 -0
- package/dist/agents/office/word-create-prompts.js.map +1 -0
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/pipe/pipe-runner.d.ts.map +1 -1
- package/dist/pipe/pipe-runner.js +20 -0
- package/dist/pipe/pipe-runner.js.map +1 -1
- package/dist/prompts/agents/planning.d.ts.map +1 -1
- package/dist/prompts/agents/planning.js +43 -18
- package/dist/prompts/agents/planning.js.map +1 -1
- package/dist/prompts/shared/tool-usage.d.ts.map +1 -1
- package/dist/prompts/shared/tool-usage.js +6 -3
- package/dist/prompts/shared/tool-usage.js.map +1 -1
- package/dist/prompts/system/plan-execute.js +1 -1
- package/dist/tools/office/excel-client.js +4 -4
- package/dist/tools/office/excel-tools/index.d.ts +2 -0
- package/dist/tools/office/excel-tools/index.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/index.js +12 -0
- package/dist/tools/office/excel-tools/index.js.map +1 -1
- package/dist/tools/office/excel-tools/sheet-builders.d.ts +8 -0
- package/dist/tools/office/excel-tools/sheet-builders.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/sheet-builders.js +414 -0
- package/dist/tools/office/excel-tools/sheet-builders.js.map +1 -0
- package/dist/tools/office/excel-tools.d.ts +1 -1
- package/dist/tools/office/excel-tools.d.ts.map +1 -1
- package/dist/tools/office/excel-tools.js +1 -1
- package/dist/tools/office/excel-tools.js.map +1 -1
- package/dist/tools/office/powerpoint-client.d.ts +3 -0
- package/dist/tools/office/powerpoint-client.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-client.js +136 -10
- package/dist/tools/office/powerpoint-client.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/export.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/export.js +16 -1
- package/dist/tools/office/powerpoint-tools/export.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/index.d.ts +2 -0
- package/dist/tools/office/powerpoint-tools/index.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/index.js +7 -0
- package/dist/tools/office/powerpoint-tools/index.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/launch.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/launch.js +2 -0
- package/dist/tools/office/powerpoint-tools/launch.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/layout-builders.d.ts +12 -0
- package/dist/tools/office/powerpoint-tools/layout-builders.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/layout-builders.js +785 -0
- package/dist/tools/office/powerpoint-tools/layout-builders.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/slides.js +1 -1
- package/dist/tools/office/powerpoint-tools/slides.js.map +1 -1
- package/dist/tools/office/powerpoint-tools.d.ts +1 -1
- package/dist/tools/office/powerpoint-tools.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools.js +1 -1
- package/dist/tools/office/powerpoint-tools.js.map +1 -1
- package/dist/tools/office/word-client.js +4 -4
- package/dist/tools/office/word-tools/index.d.ts +4 -1
- package/dist/tools/office/word-tools/index.d.ts.map +1 -1
- package/dist/tools/office/word-tools/index.js +15 -0
- package/dist/tools/office/word-tools/index.js.map +1 -1
- package/dist/tools/office/word-tools/section-builders.d.ts +10 -0
- package/dist/tools/office/word-tools/section-builders.d.ts.map +1 -0
- package/dist/tools/office/word-tools/section-builders.js +421 -0
- package/dist/tools/office/word-tools/section-builders.js.map +1 -0
- package/dist/tools/office/word-tools.d.ts +1 -1
- package/dist/tools/office/word-tools.d.ts.map +1 -1
- package/dist/tools/office/word-tools.js +1 -1
- package/dist/tools/office/word-tools.js.map +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +7 -4
- package/dist/tools/registry.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { LLMClient } from '../../core/llm/llm-client.js';
|
|
2
2
|
import { LLMSimpleTool, ToolResult } from '../../tools/types.js';
|
|
3
|
+
type ToolCallLoggerFn = (appName: string, toolName: string, args: Record<string, unknown>, resultText: string, success: boolean, iteration: number, totalCalls: number) => void;
|
|
4
|
+
type PhaseLoggerFn = (appName: string, phase: string, detail: string) => void;
|
|
5
|
+
export declare function setSubAgentToolCallLogger(fn: ToolCallLoggerFn | null): void;
|
|
6
|
+
export declare function setSubAgentPhaseLogger(fn: PhaseLoggerFn | null): void;
|
|
7
|
+
export declare function getSubAgentToolCallLogger(): ToolCallLoggerFn | null;
|
|
8
|
+
export declare function getSubAgentPhaseLogger(): PhaseLoggerFn | null;
|
|
3
9
|
export interface SubAgentConfig {
|
|
4
10
|
maxIterations?: number;
|
|
5
11
|
temperature?: number;
|
|
6
12
|
maxTokens?: number;
|
|
13
|
+
planningPrompt?: string;
|
|
14
|
+
planningMaxTokens?: number;
|
|
15
|
+
enhancementPrompt?: string;
|
|
16
|
+
enhancementMaxTokens?: number;
|
|
17
|
+
minToolCallsBeforeComplete?: number;
|
|
7
18
|
}
|
|
8
19
|
export declare class SubAgent {
|
|
9
20
|
private llmClient;
|
|
@@ -14,8 +25,18 @@ export declare class SubAgent {
|
|
|
14
25
|
private maxIterations;
|
|
15
26
|
private temperature;
|
|
16
27
|
private maxTokens;
|
|
28
|
+
private planningPrompt?;
|
|
29
|
+
private planningMaxTokens;
|
|
30
|
+
private enhancementPrompt?;
|
|
31
|
+
private enhancementMaxTokens;
|
|
32
|
+
private minToolCallsBeforeComplete;
|
|
17
33
|
constructor(llmClient: LLMClient, appName: string, tools: LLMSimpleTool[], systemPrompt: string, config?: SubAgentConfig);
|
|
18
34
|
run(instruction: string): Promise<ToolResult>;
|
|
35
|
+
private enhanceInstruction;
|
|
36
|
+
private generatePlan;
|
|
37
|
+
private rebuildMessages;
|
|
38
|
+
private flattenExchange;
|
|
19
39
|
private buildResult;
|
|
20
40
|
}
|
|
41
|
+
export {};
|
|
21
42
|
//# sourceMappingURL=sub-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/common/sub-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sub-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/common/sub-agent.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKjE,KAAK,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;AAChL,KAAK,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AAI9E,wBAAgB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NrC,kBAAkB;YA6BlB,YAAY;IAmC1B,OAAO,CAAC,eAAe;IAgCvB,OAAO,CAAC,eAAe;IAyBvB,OAAO,CAAC,WAAW;CAiBpB"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { COMPLETE_TOOL_DEFINITION } from './complete-tool.js';
|
|
2
2
|
import { logger } from '../../utils/logger.js';
|
|
3
|
+
let globalToolCallLogger = null;
|
|
4
|
+
let globalPhaseLogger = null;
|
|
5
|
+
export function setSubAgentToolCallLogger(fn) {
|
|
6
|
+
globalToolCallLogger = fn;
|
|
7
|
+
}
|
|
8
|
+
export function setSubAgentPhaseLogger(fn) {
|
|
9
|
+
globalPhaseLogger = fn;
|
|
10
|
+
}
|
|
11
|
+
export function getSubAgentToolCallLogger() {
|
|
12
|
+
return globalToolCallLogger;
|
|
13
|
+
}
|
|
14
|
+
export function getSubAgentPhaseLogger() {
|
|
15
|
+
return globalPhaseLogger;
|
|
16
|
+
}
|
|
3
17
|
export class SubAgent {
|
|
4
18
|
llmClient;
|
|
5
19
|
appName;
|
|
@@ -9,6 +23,11 @@ export class SubAgent {
|
|
|
9
23
|
maxIterations;
|
|
10
24
|
temperature;
|
|
11
25
|
maxTokens;
|
|
26
|
+
planningPrompt;
|
|
27
|
+
planningMaxTokens;
|
|
28
|
+
enhancementPrompt;
|
|
29
|
+
enhancementMaxTokens;
|
|
30
|
+
minToolCallsBeforeComplete;
|
|
12
31
|
constructor(llmClient, appName, tools, systemPrompt, config) {
|
|
13
32
|
this.llmClient = llmClient;
|
|
14
33
|
this.appName = appName;
|
|
@@ -17,6 +36,11 @@ export class SubAgent {
|
|
|
17
36
|
this.maxIterations = config?.maxIterations ?? 15;
|
|
18
37
|
this.temperature = config?.temperature ?? 0.3;
|
|
19
38
|
this.maxTokens = config?.maxTokens ?? 4000;
|
|
39
|
+
this.planningPrompt = config?.planningPrompt;
|
|
40
|
+
this.planningMaxTokens = config?.planningMaxTokens ?? 2000;
|
|
41
|
+
this.enhancementPrompt = config?.enhancementPrompt;
|
|
42
|
+
this.enhancementMaxTokens = config?.enhancementMaxTokens ?? 800;
|
|
43
|
+
this.minToolCallsBeforeComplete = config?.minToolCallsBeforeComplete ?? 0;
|
|
20
44
|
this.toolMap = new Map();
|
|
21
45
|
for (const tool of tools) {
|
|
22
46
|
this.toolMap.set(tool.definition.function.name, tool);
|
|
@@ -32,19 +56,56 @@ export class SubAgent {
|
|
|
32
56
|
toolCount: this.tools.length,
|
|
33
57
|
instruction: instruction.slice(0, 100),
|
|
34
58
|
});
|
|
59
|
+
let enhancedInstruction = instruction;
|
|
60
|
+
if (this.enhancementPrompt) {
|
|
61
|
+
if (globalPhaseLogger)
|
|
62
|
+
globalPhaseLogger(this.appName, 'enhancement', 'Generating creative guidance...');
|
|
63
|
+
const guidance = await this.enhanceInstruction(instruction);
|
|
64
|
+
if (guidance) {
|
|
65
|
+
enhancedInstruction = `${instruction}\n\n═══ CREATIVE GUIDANCE ═══\n${guidance}\n═══ END GUIDANCE ═══`;
|
|
66
|
+
if (globalPhaseLogger)
|
|
67
|
+
globalPhaseLogger(this.appName, 'enhancement', `Done (${guidance.length} chars)`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
let plan = null;
|
|
71
|
+
if (this.planningPrompt) {
|
|
72
|
+
if (globalPhaseLogger)
|
|
73
|
+
globalPhaseLogger(this.appName, 'planning', 'Generating execution plan...');
|
|
74
|
+
plan = await this.generatePlan(enhancedInstruction);
|
|
75
|
+
if (plan && globalPhaseLogger)
|
|
76
|
+
globalPhaseLogger(this.appName, 'planning', `Done (${plan.length} chars)`);
|
|
77
|
+
}
|
|
35
78
|
const toolDefinitions = [
|
|
36
79
|
...this.tools.map((t) => t.definition),
|
|
37
80
|
COMPLETE_TOOL_DEFINITION,
|
|
38
81
|
];
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
82
|
+
let historyText = '';
|
|
83
|
+
let pendingMessages = [];
|
|
84
|
+
const simpleMessages = plan
|
|
85
|
+
? []
|
|
86
|
+
: [
|
|
87
|
+
{ role: 'system', content: this.systemPrompt },
|
|
88
|
+
{ role: 'user', content: enhancedInstruction },
|
|
89
|
+
];
|
|
43
90
|
while (iterations < this.maxIterations) {
|
|
44
91
|
iterations++;
|
|
45
92
|
logger.flow(`SubAgent[${this.appName}] iteration ${iterations}`);
|
|
93
|
+
const messagesForLLM = plan
|
|
94
|
+
? this.rebuildMessages(plan, instruction, historyText, pendingMessages)
|
|
95
|
+
: simpleMessages;
|
|
96
|
+
const remaining = this.maxIterations - iterations;
|
|
97
|
+
if (remaining <= 20 && remaining > 10) {
|
|
98
|
+
const warning = `⚠️ WARNING: Only ${remaining} iteration(s) remaining out of ${this.maxIterations}! Finish your CURRENT slide, then build the CLOSING slide, SAVE, and call "complete". Do NOT start new content slides.`;
|
|
99
|
+
messagesForLLM.push({ role: 'user', content: warning });
|
|
100
|
+
logger.warn(`SubAgent[${this.appName}] injected early save warning`, { remaining });
|
|
101
|
+
}
|
|
102
|
+
else if (remaining <= 10 && remaining > 0) {
|
|
103
|
+
const warning = `🚨 EMERGENCY: Only ${remaining} iteration(s) left! STOP building content NOW. If closing slide is missing, add it IMMEDIATELY. Then call powerpoint_save / word_save / excel_save and "complete". ALL UNSAVED WORK WILL BE LOST.`;
|
|
104
|
+
messagesForLLM.push({ role: 'user', content: warning });
|
|
105
|
+
logger.warn(`SubAgent[${this.appName}] injected emergency save warning`, { remaining });
|
|
106
|
+
}
|
|
46
107
|
const response = await this.llmClient.chatCompletion({
|
|
47
|
-
messages,
|
|
108
|
+
messages: messagesForLLM,
|
|
48
109
|
tools: toolDefinitions,
|
|
49
110
|
temperature: this.temperature,
|
|
50
111
|
max_tokens: this.maxTokens,
|
|
@@ -53,12 +114,20 @@ export class SubAgent {
|
|
|
53
114
|
if (!assistantMessage) {
|
|
54
115
|
return this.buildResult(false, undefined, 'No response from Sub-LLM', iterations, totalToolCalls, startTime);
|
|
55
116
|
}
|
|
56
|
-
messages.push(assistantMessage);
|
|
57
117
|
if (!assistantMessage.tool_calls || assistantMessage.tool_calls.length === 0) {
|
|
58
118
|
const content = assistantMessage.content || '';
|
|
119
|
+
if (!content.trim()) {
|
|
120
|
+
logger.warn(`SubAgent[${this.appName}] received empty response with no tool calls, retrying (iteration ${iterations})`);
|
|
121
|
+
if (plan) {
|
|
122
|
+
historyText += this.flattenExchange(pendingMessages);
|
|
123
|
+
pendingMessages = [];
|
|
124
|
+
}
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
59
127
|
logger.flow(`SubAgent[${this.appName}] completed with text response`);
|
|
60
128
|
return this.buildResult(true, content, undefined, iterations, totalToolCalls, startTime);
|
|
61
129
|
}
|
|
130
|
+
const toolResults = [];
|
|
62
131
|
for (const toolCall of assistantMessage.tool_calls) {
|
|
63
132
|
const toolName = toolCall.function.name;
|
|
64
133
|
let args;
|
|
@@ -66,7 +135,7 @@ export class SubAgent {
|
|
|
66
135
|
args = JSON.parse(toolCall.function.arguments);
|
|
67
136
|
}
|
|
68
137
|
catch {
|
|
69
|
-
|
|
138
|
+
toolResults.push({
|
|
70
139
|
role: 'tool',
|
|
71
140
|
content: 'Error: Invalid JSON in tool arguments.',
|
|
72
141
|
tool_call_id: toolCall.id,
|
|
@@ -74,13 +143,25 @@ export class SubAgent {
|
|
|
74
143
|
continue;
|
|
75
144
|
}
|
|
76
145
|
if (toolName === 'complete') {
|
|
146
|
+
if (this.minToolCallsBeforeComplete > 0 && totalToolCalls < this.minToolCallsBeforeComplete) {
|
|
147
|
+
const remaining = this.minToolCallsBeforeComplete - totalToolCalls;
|
|
148
|
+
logger.warn(`SubAgent[${this.appName}] rejected premature complete`, {
|
|
149
|
+
totalToolCalls, minRequired: this.minToolCallsBeforeComplete,
|
|
150
|
+
});
|
|
151
|
+
toolResults.push({
|
|
152
|
+
role: 'tool',
|
|
153
|
+
content: `REJECTED: You have only executed ${totalToolCalls} tool calls, but the minimum is ${this.minToolCallsBeforeComplete}. You still have approximately ${remaining} more tool calls worth of work to do. Go back to your EXECUTION PLAN and continue building the remaining slides. Do NOT call "complete" again until ALL planned slides (including closing slide) are built and saved.`,
|
|
154
|
+
tool_call_id: toolCall.id,
|
|
155
|
+
});
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
77
158
|
const summary = args['summary'] || 'Task completed.';
|
|
78
159
|
logger.flow(`SubAgent[${this.appName}] completed via complete tool`);
|
|
79
160
|
return this.buildResult(true, summary, undefined, iterations, totalToolCalls, startTime);
|
|
80
161
|
}
|
|
81
162
|
const tool = this.toolMap.get(toolName);
|
|
82
163
|
if (!tool) {
|
|
83
|
-
|
|
164
|
+
toolResults.push({
|
|
84
165
|
role: 'tool',
|
|
85
166
|
content: `Error: Unknown tool "${toolName}". Use only the provided tools.`,
|
|
86
167
|
tool_call_id: toolCall.id,
|
|
@@ -94,25 +175,129 @@ export class SubAgent {
|
|
|
94
175
|
const resultText = result.success
|
|
95
176
|
? result.result || '(success, no output)'
|
|
96
177
|
: `Error: ${result.error || 'Unknown error'}`;
|
|
97
|
-
|
|
178
|
+
toolResults.push({
|
|
98
179
|
role: 'tool',
|
|
99
180
|
content: resultText,
|
|
100
181
|
tool_call_id: toolCall.id,
|
|
101
182
|
});
|
|
183
|
+
if (globalToolCallLogger) {
|
|
184
|
+
globalToolCallLogger(this.appName, toolName, args, resultText, result.success, iterations, totalToolCalls);
|
|
185
|
+
}
|
|
102
186
|
}
|
|
103
187
|
catch (error) {
|
|
104
188
|
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
105
|
-
|
|
189
|
+
toolResults.push({
|
|
106
190
|
role: 'tool',
|
|
107
191
|
content: `Error executing ${toolName}: ${errorMsg}`,
|
|
108
192
|
tool_call_id: toolCall.id,
|
|
109
193
|
});
|
|
194
|
+
if (globalToolCallLogger) {
|
|
195
|
+
globalToolCallLogger(this.appName, toolName, args, errorMsg, false, iterations, totalToolCalls);
|
|
196
|
+
}
|
|
110
197
|
}
|
|
111
198
|
}
|
|
199
|
+
if (plan) {
|
|
200
|
+
historyText += this.flattenExchange(pendingMessages);
|
|
201
|
+
pendingMessages = [assistantMessage, ...toolResults];
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
simpleMessages.push(assistantMessage, ...toolResults);
|
|
205
|
+
}
|
|
112
206
|
}
|
|
113
207
|
logger.warn(`SubAgent[${this.appName}] max iterations reached`, { maxIterations: this.maxIterations });
|
|
114
208
|
return this.buildResult(true, `Sub-agent completed after ${this.maxIterations} iterations. ${totalToolCalls} tool calls executed.`, undefined, iterations, totalToolCalls, startTime);
|
|
115
209
|
}
|
|
210
|
+
async enhanceInstruction(instruction) {
|
|
211
|
+
logger.info(`SubAgent[${this.appName}] enhancing instruction`);
|
|
212
|
+
try {
|
|
213
|
+
const response = await this.llmClient.chatCompletion({
|
|
214
|
+
messages: [
|
|
215
|
+
{ role: 'system', content: this.enhancementPrompt },
|
|
216
|
+
{ role: 'user', content: instruction },
|
|
217
|
+
],
|
|
218
|
+
temperature: 0.5,
|
|
219
|
+
max_tokens: this.enhancementMaxTokens,
|
|
220
|
+
});
|
|
221
|
+
const enhancement = response.choices[0]?.message?.content;
|
|
222
|
+
if (enhancement) {
|
|
223
|
+
logger.info(`SubAgent[${this.appName}] instruction enhanced`, { length: enhancement.length });
|
|
224
|
+
}
|
|
225
|
+
return enhancement || null;
|
|
226
|
+
}
|
|
227
|
+
catch (error) {
|
|
228
|
+
logger.warn(`SubAgent[${this.appName}] enhancement failed, proceeding without`, {
|
|
229
|
+
error: error instanceof Error ? error.message : String(error),
|
|
230
|
+
});
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
async generatePlan(instruction) {
|
|
235
|
+
logger.info(`SubAgent[${this.appName}] generating plan`);
|
|
236
|
+
try {
|
|
237
|
+
const response = await this.llmClient.chatCompletion({
|
|
238
|
+
messages: [
|
|
239
|
+
{ role: 'system', content: this.planningPrompt },
|
|
240
|
+
{ role: 'user', content: instruction },
|
|
241
|
+
],
|
|
242
|
+
temperature: 0.4,
|
|
243
|
+
max_tokens: this.planningMaxTokens,
|
|
244
|
+
});
|
|
245
|
+
const plan = response.choices[0]?.message?.content;
|
|
246
|
+
if (plan) {
|
|
247
|
+
logger.info(`SubAgent[${this.appName}] plan generated`, { length: plan.length });
|
|
248
|
+
}
|
|
249
|
+
return plan || null;
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
logger.warn(`SubAgent[${this.appName}] planning failed, proceeding without plan`, {
|
|
253
|
+
error: error instanceof Error ? error.message : String(error),
|
|
254
|
+
});
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
rebuildMessages(plan, instruction, historyText, recentMessages) {
|
|
259
|
+
let userContent = `<EXECUTION_PLAN>\n${plan}\n</EXECUTION_PLAN>\n\n`;
|
|
260
|
+
if (historyText) {
|
|
261
|
+
userContent += `<PREVIOUS_WORK>\n${historyText}</PREVIOUS_WORK>\n\n`;
|
|
262
|
+
}
|
|
263
|
+
userContent += `<INSTRUCTION>\n${instruction}\n</INSTRUCTION>\n\n`;
|
|
264
|
+
userContent += 'Follow the EXECUTION_PLAN step by step. Continue from where PREVIOUS_WORK left off.\nCRITICAL RULES:\n1. Build the EXACT layout type assigned in the plan. If the plan says "Layout: B", build two columns — NEVER substitute with Layout A.\n2. Layout A is MAX 3 slides total. After your 3rd Layout A, ALL remaining slides MUST be B/C/D/E/F.\n3. The LAST slide MUST be a CLOSING slide ("감사합니다"/"Thank You"). NEVER end with a content slide.\n4. Before calling powerpoint_save, verify: Is my last slide CLOSING? If not, build it NOW.';
|
|
265
|
+
const hasKorean = /[\uac00-\ud7af\u1100-\u11ff]/.test(instruction);
|
|
266
|
+
if (hasKorean) {
|
|
267
|
+
userContent += '\n⚠ LANGUAGE: 사용자가 한국어로 작성했습니다. 모든 텍스트(제목, 본문, 테이블 헤더, 차트 라벨)를 반드시 한국어로 작성하세요. 실행 계획에 영어 제목이 있더라도 한국어로 번역하여 사용하세요.';
|
|
268
|
+
}
|
|
269
|
+
return [
|
|
270
|
+
{ role: 'system', content: this.systemPrompt },
|
|
271
|
+
{ role: 'user', content: userContent },
|
|
272
|
+
...recentMessages,
|
|
273
|
+
];
|
|
274
|
+
}
|
|
275
|
+
flattenExchange(messages) {
|
|
276
|
+
if (messages.length === 0)
|
|
277
|
+
return '';
|
|
278
|
+
const lines = [];
|
|
279
|
+
for (const msg of messages) {
|
|
280
|
+
if (msg.role === 'assistant') {
|
|
281
|
+
if (msg.content)
|
|
282
|
+
lines.push(`[ASSISTANT]: ${msg.content}`);
|
|
283
|
+
if (msg.tool_calls) {
|
|
284
|
+
for (const tc of msg.tool_calls) {
|
|
285
|
+
const args = tc.function.arguments;
|
|
286
|
+
const truncatedArgs = args.length > 200 ? args.slice(0, 200) + '...' : args;
|
|
287
|
+
lines.push(`[TOOL_CALL]: ${tc.function.name}(${truncatedArgs})`);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
else if (msg.role === 'tool') {
|
|
292
|
+
const content = msg.content || '';
|
|
293
|
+
const truncated = content.length > 500
|
|
294
|
+
? content.slice(0, 500) + '...(truncated)'
|
|
295
|
+
: content;
|
|
296
|
+
lines.push(`[TOOL_RESULT]: ${truncated}`);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return lines.join('\n') + '\n';
|
|
300
|
+
}
|
|
116
301
|
buildResult(success, result, error, iterations, toolCalls, startTime) {
|
|
117
302
|
const duration = Date.now() - startTime;
|
|
118
303
|
logger.exit(`SubAgent[${this.appName}].run`, { success, iterations, toolCalls, duration });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-agent.js","sourceRoot":"","sources":["../../../src/agents/common/sub-agent.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAQ/C,MAAM,OAAO,QAAQ;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CAAC,IAAI,CAAC,kBAAkB,SAAS,EAAE,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACjC,CAAC;IAEO,WAAW,CACjB,OAAgB,EAChB,MAA0B,EAC1B,KAAyB,EACzB,UAAkB,EAClB,SAAiB,EACjB,SAAiB;QAEjB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;QACxC,MAAM,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,OAAO,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC3F,OAAO;YACL,OAAO;YACP,MAAM;YACN,KAAK;YACL,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE;SAC9C,CAAC;IACJ,CAAC;CACF"}
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SubAgent, type SubAgentConfig, } from './common/index.js';
|
|
2
2
|
export { SubAgent as OfficeSubAgent } from './common/index.js';
|
|
3
3
|
export { PlanningLLM, } from './planner/index.js';
|
|
4
|
-
export {
|
|
4
|
+
export { createWordCreateRequestTool, createWordModifyRequestTool, createExcelCreateRequestTool, createExcelModifyRequestTool, createPowerPointCreateRequestTool, createPowerPointModifyRequestTool, } from './office/index.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EACR,KAAK,cAAc,GACpB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EACL,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EACR,KAAK,cAAc,GACpB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EACL,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,EAC5B,iCAAiC,EACjC,iCAAiC,GAClC,MAAM,mBAAmB,CAAC"}
|
package/dist/agents/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SubAgent, } from './common/index.js';
|
|
2
2
|
export { SubAgent as OfficeSubAgent } from './common/index.js';
|
|
3
3
|
export { PlanningLLM, } from './planner/index.js';
|
|
4
|
-
export {
|
|
4
|
+
export { createWordCreateRequestTool, createWordModifyRequestTool, createExcelCreateRequestTool, createExcelModifyRequestTool, createPowerPointCreateRequestTool, createPowerPointModifyRequestTool, } from './office/index.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/agents/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,GAET,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EACL,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,GAET,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EACL,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,EAC5B,iCAAiC,EACjC,iCAAiC,GAClC,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"excel-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/office/excel-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"excel-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/office/excel-agent.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAKpD,wBAAgB,4BAA4B,IAAI,YAAY,CA4B3D"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { EXCEL_TOOLS } from '../../tools/office/excel-tools.js';
|
|
2
2
|
import { SubAgent } from '../common/sub-agent.js';
|
|
3
|
-
import { EXCEL_SYSTEM_PROMPT } from './prompts.js';
|
|
4
|
-
export function
|
|
3
|
+
import { EXCEL_SYSTEM_PROMPT, EXCEL_PLANNING_PROMPT, EXCEL_ENHANCEMENT_PROMPT } from './prompts.js';
|
|
4
|
+
export function createExcelModifyRequestTool() {
|
|
5
5
|
return {
|
|
6
6
|
definition: {
|
|
7
7
|
type: 'function',
|
|
8
8
|
function: {
|
|
9
|
-
name: '
|
|
10
|
-
description: 'Autonomous Microsoft Excel
|
|
9
|
+
name: 'excel_modify_agent',
|
|
10
|
+
description: 'Autonomous Microsoft Excel MODIFY agent for editing EXISTING .xlsx files. Has full access to low-level Excel tools (cells, formulas, formatting, charts, pivot tables, etc.) for precise spreadsheet modification. For creating NEW spreadsheets from scratch, use excel_create_agent instead.',
|
|
11
11
|
parameters: {
|
|
12
12
|
type: 'object',
|
|
13
13
|
properties: {
|
|
14
14
|
instruction: {
|
|
15
15
|
type: 'string',
|
|
16
|
-
description: 'Detailed instruction for
|
|
16
|
+
description: 'Detailed instruction for modifying an existing Excel file. Include: file path, what to change, specific data or formatting requirements. The agent will open the file and make precise modifications.',
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
required: ['instruction'],
|
|
@@ -21,7 +21,7 @@ export function createExcelWorkRequestTool() {
|
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
execute: async (args, llmClient) => {
|
|
24
|
-
const agent = new SubAgent(llmClient, 'excel', EXCEL_TOOLS, EXCEL_SYSTEM_PROMPT, { maxIterations: 40 });
|
|
24
|
+
const agent = new SubAgent(llmClient, 'excel', EXCEL_TOOLS, EXCEL_SYSTEM_PROMPT, { maxIterations: 40, planningPrompt: EXCEL_PLANNING_PROMPT, planningMaxTokens: 1500, enhancementPrompt: EXCEL_ENHANCEMENT_PROMPT, enhancementMaxTokens: 600 });
|
|
25
25
|
return agent.run(args['instruction']);
|
|
26
26
|
},
|
|
27
27
|
categories: ['llm-agent'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"excel-agent.js","sourceRoot":"","sources":["../../../src/agents/office/excel-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"excel-agent.js","sourceRoot":"","sources":["../../../src/agents/office/excel-agent.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAEpG,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,UAAU,EAAE;YACV,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE;gBACR,IAAI,EAAE,oBAAoB;gBAC1B,WAAW,EACT,gSAAgS;gBAClS,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,WAAW,EAAE;4BACX,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,uMAAuM;yBAC1M;qBACF;oBACD,QAAQ,EAAE,CAAC,aAAa,CAAC;iBAC1B;aACF;SACF;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;YACjC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,IAAI,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,GAAG,EAAE,CAAC,CAAC;YAChP,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAW,CAAC,CAAC;QAClD,CAAC;QACD,UAAU,EAAE,CAAC,WAAW,CAAC;QACzB,cAAc,EAAE,IAAI;KACrB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-create-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/office/excel-create-agent.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AASpD,wBAAgB,4BAA4B,IAAI,YAAY,CAyC3D"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EXCEL_CREATE_TOOLS } from '../../tools/office/excel-tools.js';
|
|
2
|
+
import { SubAgent } from '../common/sub-agent.js';
|
|
3
|
+
import { EXCEL_CREATE_SYSTEM_PROMPT, EXCEL_CREATE_PLANNING_PROMPT, EXCEL_CREATE_ENHANCEMENT_PROMPT, } from './excel-create-prompts.js';
|
|
4
|
+
export function createExcelCreateRequestTool() {
|
|
5
|
+
return {
|
|
6
|
+
definition: {
|
|
7
|
+
type: 'function',
|
|
8
|
+
function: {
|
|
9
|
+
name: 'excel_create_agent',
|
|
10
|
+
description: 'Autonomous Microsoft Excel CREATION agent for building NEW spreadsheets from scratch. Uses high-level sheet builders to produce professional-quality workbooks with styled headers, data tables, formulas, charts, and conditional formatting — all automatically. For editing EXISTING .xlsx files, use excel_modify_agent instead.',
|
|
11
|
+
parameters: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
instruction: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'Detailed instruction for spreadsheet creation. Include: data topic, column structure, any specific calculations or charts needed, and save path. The agent will autonomously create a professional spreadsheet.',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ['instruction'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
execute: async (args, llmClient) => {
|
|
24
|
+
const agent = new SubAgent(llmClient, 'excel-create', EXCEL_CREATE_TOOLS, EXCEL_CREATE_SYSTEM_PROMPT, {
|
|
25
|
+
maxIterations: 20,
|
|
26
|
+
planningPrompt: EXCEL_CREATE_PLANNING_PROMPT,
|
|
27
|
+
planningMaxTokens: 1500,
|
|
28
|
+
enhancementPrompt: EXCEL_CREATE_ENHANCEMENT_PROMPT,
|
|
29
|
+
enhancementMaxTokens: 600,
|
|
30
|
+
minToolCallsBeforeComplete: 5,
|
|
31
|
+
});
|
|
32
|
+
return agent.run(args['instruction']);
|
|
33
|
+
},
|
|
34
|
+
categories: ['llm-agent'],
|
|
35
|
+
requiresSubLLM: true,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=excel-create-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-create-agent.js","sourceRoot":"","sources":["../../../src/agents/office/excel-create-agent.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,GAChC,MAAM,2BAA2B,CAAC;AAEnC,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,UAAU,EAAE;YACV,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE;gBACR,IAAI,EAAE,oBAAoB;gBAC1B,WAAW,EACT,sUAAsU;gBACxU,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,WAAW,EAAE;4BACX,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,iNAAiN;yBACpN;qBACF;oBACD,QAAQ,EAAE,CAAC,aAAa,CAAC;iBAC1B;aACF;SACF;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;YACjC,MAAM,KAAK,GAAG,IAAI,QAAQ,CACxB,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC1B;gBACE,aAAa,EAAE,EAAE;gBACjB,cAAc,EAAE,4BAA4B;gBAC5C,iBAAiB,EAAE,IAAI;gBACvB,iBAAiB,EAAE,+BAA+B;gBAClD,oBAAoB,EAAE,GAAG;gBACzB,0BAA0B,EAAE,CAAC;aAC9B,CACF,CAAC;YACF,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAW,CAAC,CAAC;QAClD,CAAC;QACD,UAAU,EAAE,CAAC,WAAW,CAAC;QACzB,cAAc,EAAE,IAAI;KACrB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const EXCEL_CREATE_SYSTEM_PROMPT = "You are an elite Office automation agent that produces WORLD-CLASS results.\nExecute the user's instruction using the available tools.\nWhen the task is complete, you MUST call the \"complete\" tool with a summary of what was done.\nCall only one tool at a time. After each tool result, decide the next step.\nAlways respond in the same language as the user's instruction.\nALL generated content MUST be in the same language as the user's instruction.\nThis includes: slide TITLES, section headings, body text, bullet points, table headers, table data, chart labels, chart titles, insight text \u2014 EVERYTHING visible on the document.\nIf the user writes in Korean, ALL text MUST be Korean. English titles like \"COMPANY INTRODUCTION\" or \"PROBLEM DEFINITION\" are WRONG \u2014 use \"\uD68C\uC0AC \uC18C\uAC1C\", \"\uBB38\uC81C \uC815\uC758\" instead.\nThe ONLY exceptions: proper nouns (company names like \"MediAI\"), universal abbreviations (KPI, ROI, AI, SaaS), and currency symbols ($, \u20A9).\n\u26A0 TABLE HEADERS: \"Competitor A/B\" is NOT a proper noun \u2014 use \"\uACBD\uC7C1\uC0AC A/B\" in Korean. \"Category\" \u2192 \"\uAD6C\uBD84\". \"Feature\" \u2192 \"\uAE30\uB2A5\". ALL table column/row headers MUST be in the user's language.\nThis is non-negotiable \u2014 wrong language scores ZERO.\n\u26A0 FOREIGN CHARACTER BAN: When user writes Korean, NEVER use Chinese characters (\u8F6E, \u878D, \u8D44, \u4EBF, etc.) or Japanese-only characters. \"A\u8F6E\u878D\u8D44\" is WRONG \u2192 \"\uC2DC\uB9AC\uC988 A \uD22C\uC790\". \"B\u8F6E\u878D\u8D44\" is WRONG \u2192 \"\uC2DC\uB9AC\uC988 B \uD22C\uC790\". \"5\u4EBF\" is WRONG \u2192 \"5\uC5B5\". ALL financial, business, and technical terms must be in Korean.\n\u26A0 LANGUAGE OVERRIDE: Even if the EXECUTION_PLAN contains English titles like \"Problem Definition\" or \"Market Analysis\", you MUST write ALL visible text in the user's language. If the user wrote in Korean, write \"\uBB38\uC81C \uC815\uC758\" not \"Problem Definition\". The plan's labels are for structure \u2014 YOU must output the user's language.\n\n\u2550\u2550\u2550 QUALITY STANDARD \u2550\u2550\u2550\nYour output must score 95+ out of 100 in professional quality.\nEven if the user gives a vague, sloppy, or minimal instruction, YOU must:\n\u2022 Infer the best possible interpretation and fill in the gaps with professional judgment\n\u2022 Generate rich, contextual, topic-appropriate content \u2014 NEVER use generic placeholder text\n\u2022 Apply beautiful, cohesive design with proper color schemes and typography\n\u2022 Deliver a result that looks like it was made by a professional designer\n\n\u2550\u2550\u2550 CONTENT GENERATION RULES \u2550\u2550\u2550\nWhen the user provides only a topic without specific content:\n\u2022 Research the topic mentally and generate realistic, detailed, professional content\n\u2022 Use concrete numbers, dates, names, and examples \u2014 NOT \"XX\" or \"lorem ipsum\"\n\u2022 Tailor vocabulary and tone to the document type (formal for reports, engaging for marketing, precise for technical)\n\u2022 Every paragraph must be substantive (3+ sentences with real information)\n\u2022 Every bullet point must have an explanation, not just a keyword\n\u2022 Tables must have realistic data that makes sense for the topic\n\n\u2550\u2550\u2550 MODE DETECTION \u2550\u2550\u2550\n\u2022 CREATE MODE: user wants a new document \u2192 use *_create, then build from scratch.\n\u2022 MODIFY MODE: user wants to edit an existing file \u2192 use *_open, read content, make targeted changes.\n\u2022 If user provides a file path to open/edit \u2192 MODIFY MODE.\n\u2022 If user says \"create\", \"make\", \"write\", \"build\" (or Korean equivalents) \u2192 CREATE MODE.\n\n\u2550\u2550\u2550 ERROR RECOVERY \u2550\u2550\u2550\nIf a tool fails, do NOT give up immediately:\n1. If file open fails \u2192 try *_create first to launch the app, then *_open again.\n2. If COM error \u2192 retry once. If still fails, report the specific error via \"complete\".\n3. Try at least 2 alternative approaches before reporting failure.\n\n\u2550\u2550\u2550 ABSOLUTE RULES \u2550\u2550\u2550\n1. Every element MUST have explicit formatting (font, size, color).\n2. After ALL work is done, SAVE and call \"complete\".\n3. If the user specifies a save path, save to that exact path.\n4. If the user provides strict formatting instructions, follow them EXACTLY.\n5. NEVER use placeholder text. Every piece of content must be real and relevant.\n\n## YOUR ROLE: Excel Spreadsheet CREATION Specialist\n\nYou create NEW Excel spreadsheets using HIGH-LEVEL sheet builder tools.\nEach tool call creates a complete structure \u2014 you never deal with individual cell formatting.\n\n## AVAILABLE TOOLS\n\n### Lifecycle\n- `excel_create` \u2014 Create a blank workbook\n- `excel_save` \u2014 Save the workbook\n- `excel_screenshot` \u2014 Take a screenshot for verification\n\n### Sheet Management\n- `excel_add_sheet` \u2014 Add a new sheet\n- `excel_rename_sheet` \u2014 Rename a sheet\n\n### Sheet Builders (1 call = 1 complete structure)\n- `excel_build_data_sheet` \u2014 Title row + styled headers + data rows + number format + autofit\n- `excel_build_formula_columns` \u2014 Add formula columns to existing data\n- `excel_build_summary_row` \u2014 Add styled totals/summary row\n- `excel_build_chart` \u2014 Add a styled chart\n- `excel_build_conditional_format` \u2014 Apply conditional formatting\n\n### Complete\n- `final_response` \u2014 Return result when all work is done\n\n## WORKFLOW\n\n1. `excel_create` \u2192 create blank workbook\n2. `excel_build_data_sheet` \u2192 main data sheet with title, headers, data\n3. `excel_build_formula_columns` \u2192 calculated columns (growth %, variance, etc.)\n4. `excel_build_summary_row` \u2192 totals/averages at bottom\n5. `excel_build_conditional_format` \u2192 highlight key values\n6. `excel_build_chart` \u2192 visual representation\n7. Additional sheets if needed (repeat steps 2-6)\n8. `excel_save` \u2192 save to path\n9. `final_response` \u2192 report completion\n\n## DESIGN CONSISTENCY\n\n- Use the SAME `color_scheme` (or `colors`) and `fonts` across ALL builders\n- The Enhancement LLM specifies the color scheme \u2014 use it consistently\n- Available presets: MODERN_GREEN, WARM_AMBER, MINIMAL_SLATE, CORPORATE_BLUE, VIBRANT_CORAL, DEEP_PURPLE\n\n## CRITICAL: Number Handling\n\n- Write numbers AS NUMBERS, not strings: `12500`, not `\"12,500\"`\n- Use `number_formats` parameter for display format: `\"#,##0\"`, `\"0.0%\"`\n- Percentages: write as decimal (0.15 for 15%), format as `\"0.0%\"`\n- Currency: write raw number, format as `\"\u20A9#,##0\"` or `\"$#,##0\"`\n\n## CONTENT QUALITY\n\n- ALL labels and titles MUST be in Korean\n- Data must be REALISTIC \u2014 use plausible numbers for the topic\n- Include at least one formula column (growth, change, ratio, etc.)\n- Include at least one summary row (SUM, AVERAGE)\n- Include at least one chart\n- NEVER use placeholder data like \"\uB370\uC774\uD1301\", \"\uAC121\"\n\n## RULES\n\n1. ALWAYS call `excel_create` first\n2. ALWAYS save before completing\n3. Numbers must be written as numbers, not formatted strings\n4. Use `excel_build_data_sheet` for the main data \u2014 it handles everything\n5. Add formulas AFTER data sheet is built (need row references)\n6. Chart data_range must reference actual data range\n7. NEVER call low-level Excel tools \u2014 only use the builders listed above\n";
|
|
2
|
+
export declare const EXCEL_CREATE_PLANNING_PROMPT = "You are the Planning LLM for an Excel Spreadsheet Creation Agent.\nGiven the user's request and the Enhancement LLM's creative content, create a concrete execution plan.\n\n## OUTPUT FORMAT\n\nMODE: CREATE\nDESIGN DECISIONS:\n- COLOR_SCHEME: [preset name or custom hex values]\n- FONTS: [preset name or custom]\n\nTOTAL_SHEETS: [number]\n\nSHEET_PLAN:\nFor each sheet:\n\nSHEET: \"[sheet_name]\"\n1. [DATA] excel_build_data_sheet \u2014 Title: \"...\", Headers: [...], Rows: N\n2. [FORMULA] excel_build_formula_columns \u2014 Columns: [col: formula description]\n3. [SUMMARY] excel_build_summary_row \u2014 Row N+3: SUM/AVG for columns [...]\n4. [FORMAT] excel_build_conditional_format \u2014 Range: \"...\", Rule: ...\n5. [CHART] excel_build_chart \u2014 Type: ..., Range: \"...\", Title: \"...\"\n\n## CONTENT DENSITY\n\n- Data sheet: 5-15 data rows, 4-8 columns\n- Formula columns: 1-3 calculated columns\n- Summary row: SUM and/or AVERAGE for numeric columns\n- Chart: matches the data story (bar for comparison, line for trends, pie for composition)\n\n## CRITICAL: Numbers\n\n- Plan data values as RAW NUMBERS: 125000, not \"125,000\"\n- Plan percentages as DECIMALS: 0.15, not \"15%\"\n- Specify number_formats separately: {\"C\": \"#,##0\", \"D\": \"0.0%\"}\n\n## VERIFICATION\n\nBefore finalizing the plan, check:\n\u2705 excel_create called first?\n\u2705 Data has realistic, specific values?\n\u2705 At least 1 formula column?\n\u2705 Summary row included?\n\u2705 At least 1 chart?\n\u2705 Number formats specified?\n\u2705 Save path specified?\n\u2705 All Korean labels?\n";
|
|
3
|
+
export declare const EXCEL_CREATE_ENHANCEMENT_PROMPT = "You are the Enhancement LLM for an Excel Spreadsheet Creation Agent.\nGenerate rich, professional data content for the spreadsheet.\n\n## OUTPUT FORMAT\n\nDATA_TYPE: [sales/finance/HR/inventory/performance/survey]\nTARGET_AUDIENCE: [executives/team/analysts/general]\nTOTAL_SHEETS: [1-3]\n\nDESIGN_SPECIFICATION:\n- COLOR_SCHEME: [choose from: MODERN_GREEN, WARM_AMBER, MINIMAL_SLATE, CORPORATE_BLUE, VIBRANT_CORAL, DEEP_PURPLE \u2014 or specify custom hex]\n- FONTS: [choose matching preset or custom {title, body}]\n\nFor each sheet:\nSHEET: \"[name]\"\n- Title: \"...\"\n- Headers: [\"col1\", \"col2\", ...]\n- Data description: what each row represents, how many rows\n- Sample data: first 2-3 rows as example (use REAL numbers, not placeholders)\n- Formula columns: what calculations to add\n- Summary: what aggregations (SUM, AVERAGE)\n- Chart: type + what it shows\n- Conditional formatting: what to highlight\n\n## RULES\n\n- ALL labels, headers, and titles MUST be in Korean\n- Provide REALISTIC data appropriate for the topic\n- Numbers must be raw values (125000, not \"125,000\")\n- Percentages as decimals (0.15, not \"15%\")\n- Include at least one meaningful calculation (growth rate, variance, ratio)\n- Think like a professional analyst creating a real spreadsheet\n";
|
|
4
|
+
//# sourceMappingURL=excel-create-prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-create-prompts.d.ts","sourceRoot":"","sources":["../../../src/agents/office/excel-create-prompts.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,0BAA0B,0zOAuEtC,CAAC;AAEF,eAAO,MAAM,4BAA4B,sjDA8CxC,CAAC;AAEF,eAAO,MAAM,+BAA+B,wwCAgC3C,CAAC"}
|