hanseol-dev 5.0.2-dev.5 → 5.0.2-dev.51
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 +337 -0
- package/dist/agents/office/powerpoint-create-agent.js.map +1 -0
- package/dist/agents/office/powerpoint-create-prompts.d.ts +6 -0
- package/dist/agents/office/powerpoint-create-prompts.d.ts.map +1 -0
- package/dist/agents/office/powerpoint-create-prompts.js +384 -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 +479 -59
- 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 -15
- 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.map +1 -1
- package/dist/tools/office/powerpoint-client.js +9 -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 +11 -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 +771 -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
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { OFFICE_BASE_PROMPT } from './prompts.js';
|
|
2
|
+
export const EXCEL_CREATE_SYSTEM_PROMPT = `${OFFICE_BASE_PROMPT}
|
|
3
|
+
|
|
4
|
+
## YOUR ROLE: Excel Spreadsheet CREATION Specialist
|
|
5
|
+
|
|
6
|
+
You create NEW Excel spreadsheets using HIGH-LEVEL sheet builder tools.
|
|
7
|
+
Each tool call creates a complete structure — you never deal with individual cell formatting.
|
|
8
|
+
|
|
9
|
+
## AVAILABLE TOOLS
|
|
10
|
+
|
|
11
|
+
### Lifecycle
|
|
12
|
+
- \`excel_create\` — Create a blank workbook
|
|
13
|
+
- \`excel_save\` — Save the workbook
|
|
14
|
+
- \`excel_screenshot\` — Take a screenshot for verification
|
|
15
|
+
|
|
16
|
+
### Sheet Management
|
|
17
|
+
- \`excel_add_sheet\` — Add a new sheet
|
|
18
|
+
- \`excel_rename_sheet\` — Rename a sheet
|
|
19
|
+
|
|
20
|
+
### Sheet Builders (1 call = 1 complete structure)
|
|
21
|
+
- \`excel_build_data_sheet\` — Title row + styled headers + data rows + number format + autofit
|
|
22
|
+
- \`excel_build_formula_columns\` — Add formula columns to existing data
|
|
23
|
+
- \`excel_build_summary_row\` — Add styled totals/summary row
|
|
24
|
+
- \`excel_build_chart\` — Add a styled chart
|
|
25
|
+
- \`excel_build_conditional_format\` — Apply conditional formatting
|
|
26
|
+
|
|
27
|
+
### Complete
|
|
28
|
+
- \`final_response\` — Return result when all work is done
|
|
29
|
+
|
|
30
|
+
## WORKFLOW
|
|
31
|
+
|
|
32
|
+
1. \`excel_create\` → create blank workbook
|
|
33
|
+
2. \`excel_build_data_sheet\` → main data sheet with title, headers, data
|
|
34
|
+
3. \`excel_build_formula_columns\` → calculated columns (growth %, variance, etc.)
|
|
35
|
+
4. \`excel_build_summary_row\` → totals/averages at bottom
|
|
36
|
+
5. \`excel_build_conditional_format\` → highlight key values
|
|
37
|
+
6. \`excel_build_chart\` → visual representation
|
|
38
|
+
7. Additional sheets if needed (repeat steps 2-6)
|
|
39
|
+
8. \`excel_save\` → save to path
|
|
40
|
+
9. \`final_response\` → report completion
|
|
41
|
+
|
|
42
|
+
## DESIGN CONSISTENCY
|
|
43
|
+
|
|
44
|
+
- Use the SAME \`color_scheme\` (or \`colors\`) and \`fonts\` across ALL builders
|
|
45
|
+
- The Enhancement LLM specifies the color scheme — use it consistently
|
|
46
|
+
- Available presets: MODERN_GREEN, WARM_AMBER, MINIMAL_SLATE, CORPORATE_BLUE, VIBRANT_CORAL, DEEP_PURPLE
|
|
47
|
+
|
|
48
|
+
## CRITICAL: Number Handling
|
|
49
|
+
|
|
50
|
+
- Write numbers AS NUMBERS, not strings: \`12500\`, not \`"12,500"\`
|
|
51
|
+
- Use \`number_formats\` parameter for display format: \`"#,##0"\`, \`"0.0%"\`
|
|
52
|
+
- Percentages: write as decimal (0.15 for 15%), format as \`"0.0%"\`
|
|
53
|
+
- Currency: write raw number, format as \`"₩#,##0"\` or \`"$#,##0"\`
|
|
54
|
+
|
|
55
|
+
## CONTENT QUALITY
|
|
56
|
+
|
|
57
|
+
- ALL labels and titles MUST be in Korean
|
|
58
|
+
- Data must be REALISTIC — use plausible numbers for the topic
|
|
59
|
+
- Include at least one formula column (growth, change, ratio, etc.)
|
|
60
|
+
- Include at least one summary row (SUM, AVERAGE)
|
|
61
|
+
- Include at least one chart
|
|
62
|
+
- NEVER use placeholder data like "데이터1", "값1"
|
|
63
|
+
|
|
64
|
+
## RULES
|
|
65
|
+
|
|
66
|
+
1. ALWAYS call \`excel_create\` first
|
|
67
|
+
2. ALWAYS save before completing
|
|
68
|
+
3. Numbers must be written as numbers, not formatted strings
|
|
69
|
+
4. Use \`excel_build_data_sheet\` for the main data — it handles everything
|
|
70
|
+
5. Add formulas AFTER data sheet is built (need row references)
|
|
71
|
+
6. Chart data_range must reference actual data range
|
|
72
|
+
7. NEVER call low-level Excel tools — only use the builders listed above
|
|
73
|
+
`;
|
|
74
|
+
export const EXCEL_CREATE_PLANNING_PROMPT = `You are the Planning LLM for an Excel Spreadsheet Creation Agent.
|
|
75
|
+
Given the user's request and the Enhancement LLM's creative content, create a concrete execution plan.
|
|
76
|
+
|
|
77
|
+
## OUTPUT FORMAT
|
|
78
|
+
|
|
79
|
+
MODE: CREATE
|
|
80
|
+
DESIGN DECISIONS:
|
|
81
|
+
- COLOR_SCHEME: [preset name or custom hex values]
|
|
82
|
+
- FONTS: [preset name or custom]
|
|
83
|
+
|
|
84
|
+
TOTAL_SHEETS: [number]
|
|
85
|
+
|
|
86
|
+
SHEET_PLAN:
|
|
87
|
+
For each sheet:
|
|
88
|
+
|
|
89
|
+
SHEET: "[sheet_name]"
|
|
90
|
+
1. [DATA] excel_build_data_sheet — Title: "...", Headers: [...], Rows: N
|
|
91
|
+
2. [FORMULA] excel_build_formula_columns — Columns: [col: formula description]
|
|
92
|
+
3. [SUMMARY] excel_build_summary_row — Row N+3: SUM/AVG for columns [...]
|
|
93
|
+
4. [FORMAT] excel_build_conditional_format — Range: "...", Rule: ...
|
|
94
|
+
5. [CHART] excel_build_chart — Type: ..., Range: "...", Title: "..."
|
|
95
|
+
|
|
96
|
+
## CONTENT DENSITY
|
|
97
|
+
|
|
98
|
+
- Data sheet: 5-15 data rows, 4-8 columns
|
|
99
|
+
- Formula columns: 1-3 calculated columns
|
|
100
|
+
- Summary row: SUM and/or AVERAGE for numeric columns
|
|
101
|
+
- Chart: matches the data story (bar for comparison, line for trends, pie for composition)
|
|
102
|
+
|
|
103
|
+
## CRITICAL: Numbers
|
|
104
|
+
|
|
105
|
+
- Plan data values as RAW NUMBERS: 125000, not "125,000"
|
|
106
|
+
- Plan percentages as DECIMALS: 0.15, not "15%"
|
|
107
|
+
- Specify number_formats separately: {"C": "#,##0", "D": "0.0%"}
|
|
108
|
+
|
|
109
|
+
## VERIFICATION
|
|
110
|
+
|
|
111
|
+
Before finalizing the plan, check:
|
|
112
|
+
✅ excel_create called first?
|
|
113
|
+
✅ Data has realistic, specific values?
|
|
114
|
+
✅ At least 1 formula column?
|
|
115
|
+
✅ Summary row included?
|
|
116
|
+
✅ At least 1 chart?
|
|
117
|
+
✅ Number formats specified?
|
|
118
|
+
✅ Save path specified?
|
|
119
|
+
✅ All Korean labels?
|
|
120
|
+
`;
|
|
121
|
+
export const EXCEL_CREATE_ENHANCEMENT_PROMPT = `You are the Enhancement LLM for an Excel Spreadsheet Creation Agent.
|
|
122
|
+
Generate rich, professional data content for the spreadsheet.
|
|
123
|
+
|
|
124
|
+
## OUTPUT FORMAT
|
|
125
|
+
|
|
126
|
+
DATA_TYPE: [sales/finance/HR/inventory/performance/survey]
|
|
127
|
+
TARGET_AUDIENCE: [executives/team/analysts/general]
|
|
128
|
+
TOTAL_SHEETS: [1-3]
|
|
129
|
+
|
|
130
|
+
DESIGN_SPECIFICATION:
|
|
131
|
+
- COLOR_SCHEME: [choose from: MODERN_GREEN, WARM_AMBER, MINIMAL_SLATE, CORPORATE_BLUE, VIBRANT_CORAL, DEEP_PURPLE — or specify custom hex]
|
|
132
|
+
- FONTS: [choose matching preset or custom {title, body}]
|
|
133
|
+
|
|
134
|
+
For each sheet:
|
|
135
|
+
SHEET: "[name]"
|
|
136
|
+
- Title: "..."
|
|
137
|
+
- Headers: ["col1", "col2", ...]
|
|
138
|
+
- Data description: what each row represents, how many rows
|
|
139
|
+
- Sample data: first 2-3 rows as example (use REAL numbers, not placeholders)
|
|
140
|
+
- Formula columns: what calculations to add
|
|
141
|
+
- Summary: what aggregations (SUM, AVERAGE)
|
|
142
|
+
- Chart: type + what it shows
|
|
143
|
+
- Conditional formatting: what to highlight
|
|
144
|
+
|
|
145
|
+
## RULES
|
|
146
|
+
|
|
147
|
+
- ALL labels, headers, and titles MUST be in Korean
|
|
148
|
+
- Provide REALISTIC data appropriate for the topic
|
|
149
|
+
- Numbers must be raw values (125000, not "125,000")
|
|
150
|
+
- Percentages as decimals (0.15, not "15%")
|
|
151
|
+
- Include at least one meaningful calculation (growth rate, variance, ratio)
|
|
152
|
+
- Think like a professional analyst creating a real spreadsheet
|
|
153
|
+
`;
|
|
154
|
+
//# sourceMappingURL=excel-create-prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"excel-create-prompts.js","sourceRoot":"","sources":["../../../src/agents/office/excel-create-prompts.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuE9D,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8C3C,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC9C,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export { SubAgent as OfficeSubAgent, type SubAgentConfig as OfficeSubAgentConfig } from '../common/index.js';
|
|
2
2
|
export { COMPLETE_TOOL_DEFINITION } from '../common/index.js';
|
|
3
3
|
export { WORD_SYSTEM_PROMPT, EXCEL_SYSTEM_PROMPT, POWERPOINT_SYSTEM_PROMPT, } from './prompts.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
4
|
+
export { createWordCreateRequestTool } from './word-create-agent.js';
|
|
5
|
+
export { createWordModifyRequestTool } from './word-agent.js';
|
|
6
|
+
export { createExcelCreateRequestTool } from './excel-create-agent.js';
|
|
7
|
+
export { createExcelModifyRequestTool } from './excel-agent.js';
|
|
8
|
+
export { createPowerPointCreateRequestTool } from './powerpoint-create-agent.js';
|
|
9
|
+
export { createPowerPointModifyRequestTool } from './powerpoint-agent.js';
|
|
7
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/office/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,KAAK,cAAc,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/office/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,KAAK,cAAc,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export { SubAgent as OfficeSubAgent } from '../common/index.js';
|
|
2
2
|
export { COMPLETE_TOOL_DEFINITION } from '../common/index.js';
|
|
3
3
|
export { WORD_SYSTEM_PROMPT, EXCEL_SYSTEM_PROMPT, POWERPOINT_SYSTEM_PROMPT, } from './prompts.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
4
|
+
export { createWordCreateRequestTool } from './word-create-agent.js';
|
|
5
|
+
export { createWordModifyRequestTool } from './word-agent.js';
|
|
6
|
+
export { createExcelCreateRequestTool } from './excel-create-agent.js';
|
|
7
|
+
export { createExcelModifyRequestTool } from './excel-agent.js';
|
|
8
|
+
export { createPowerPointCreateRequestTool } from './powerpoint-create-agent.js';
|
|
9
|
+
export { createPowerPointModifyRequestTool } from './powerpoint-agent.js';
|
|
7
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/office/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAA+C,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/office/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAA+C,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerpoint-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/office/powerpoint-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"powerpoint-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/office/powerpoint-agent.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAKpD,wBAAgB,iCAAiC,IAAI,YAAY,CAkChE"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { POWERPOINT_TOOLS } from '../../tools/office/powerpoint-tools.js';
|
|
2
2
|
import { SubAgent } from '../common/sub-agent.js';
|
|
3
|
-
import { POWERPOINT_SYSTEM_PROMPT } from './prompts.js';
|
|
4
|
-
export function
|
|
3
|
+
import { POWERPOINT_SYSTEM_PROMPT, POWERPOINT_PLANNING_PROMPT, POWERPOINT_ENHANCEMENT_PROMPT } from './prompts.js';
|
|
4
|
+
export function createPowerPointModifyRequestTool() {
|
|
5
5
|
return {
|
|
6
6
|
definition: {
|
|
7
7
|
type: 'function',
|
|
8
8
|
function: {
|
|
9
|
-
name: '
|
|
10
|
-
description: 'Autonomous
|
|
9
|
+
name: 'powerpoint_modify_agent',
|
|
10
|
+
description: 'Autonomous PowerPoint MODIFY agent for editing EXISTING .pptx files. Opens an existing presentation and makes targeted changes: edit text, rearrange slides, modify formatting, add/remove content, update charts, etc. For creating NEW presentations from scratch, use powerpoint_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 presentation. Include: file path to open, specific changes needed (text edits, slide modifications, formatting changes), and save path. The agent will open the file, make targeted edits, and save.',
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
required: ['instruction'],
|
|
@@ -21,7 +21,7 @@ export function createPowerPointWorkRequestTool() {
|
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
execute: async (args, llmClient) => {
|
|
24
|
-
const agent = new SubAgent(llmClient, 'powerpoint', POWERPOINT_TOOLS, POWERPOINT_SYSTEM_PROMPT, { maxIterations:
|
|
24
|
+
const agent = new SubAgent(llmClient, 'powerpoint', POWERPOINT_TOOLS, POWERPOINT_SYSTEM_PROMPT, { maxIterations: 200, planningPrompt: POWERPOINT_PLANNING_PROMPT, planningMaxTokens: 2000, enhancementPrompt: POWERPOINT_ENHANCEMENT_PROMPT, enhancementMaxTokens: 800, minToolCallsBeforeComplete: 80 });
|
|
25
25
|
return agent.run(args['instruction']);
|
|
26
26
|
},
|
|
27
27
|
categories: ['llm-agent'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powerpoint-agent.js","sourceRoot":"","sources":["../../../src/agents/office/powerpoint-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"powerpoint-agent.js","sourceRoot":"","sources":["../../../src/agents/office/powerpoint-agent.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAEnH,MAAM,UAAU,iCAAiC;IAC/C,OAAO;QACL,UAAU,EAAE;YACV,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE;gBACR,IAAI,EAAE,yBAAyB;gBAC/B,WAAW,EACT,2SAA2S;gBAC7S,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,WAAW,EAAE;4BACX,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,qPAAqP;yBACxP;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,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,EAAE,aAAa,EAAE,GAAG,EAAE,cAAc,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,IAAI,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,GAAG,EAAE,0BAA0B,EAAE,EAAE,EAAE,CACzM,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 @@
|
|
|
1
|
+
{"version":3,"file":"powerpoint-create-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/office/powerpoint-create-agent.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,YAAY,EAAc,MAAM,sBAAsB,CAAC;AAoZhE,wBAAgB,iCAAiC,IAAI,YAAY,CA2BhE"}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { POWERPOINT_CREATE_TOOLS } from '../../tools/office/powerpoint-tools.js';
|
|
2
|
+
import { resetLayoutCounters } from '../../tools/office/powerpoint-tools/layout-builders.js';
|
|
3
|
+
import { SubAgent } from '../common/sub-agent.js';
|
|
4
|
+
import { getSubAgentPhaseLogger, getSubAgentToolCallLogger } from '../common/sub-agent.js';
|
|
5
|
+
import { logger } from '../../utils/logger.js';
|
|
6
|
+
import { PPT_CREATE_SYSTEM_PROMPT, PPT_CREATE_PLANNING_PROMPT, PPT_CREATE_ENHANCEMENT_PROMPT, PPT_STRUCTURED_PLANNING_PROMPT, buildSlideSystemPrompt, } from './powerpoint-create-prompts.js';
|
|
7
|
+
const VALID_SLIDE_TOOLS = new Set([
|
|
8
|
+
'ppt_build_title_slide',
|
|
9
|
+
'ppt_build_layout_a',
|
|
10
|
+
'ppt_build_layout_b',
|
|
11
|
+
'ppt_build_layout_c',
|
|
12
|
+
'ppt_build_layout_d',
|
|
13
|
+
'ppt_build_layout_e',
|
|
14
|
+
'ppt_build_layout_f',
|
|
15
|
+
'ppt_build_closing_slide',
|
|
16
|
+
]);
|
|
17
|
+
const VALID_COLOR_SCHEMES = new Set([
|
|
18
|
+
'MODERN_TECH', 'WARM_EXECUTIVE', 'CLEAN_MINIMAL', 'CORPORATE', 'NATURE_FRESH', 'BOLD_MODERN',
|
|
19
|
+
]);
|
|
20
|
+
const VALID_DESIGN_STYLES = new Set(['sidebar', 'top_band', 'clean']);
|
|
21
|
+
function validatePlan(plan) {
|
|
22
|
+
if (!plan.design?.color_scheme || !plan.design?.design_style) {
|
|
23
|
+
return 'Missing design.color_scheme or design.design_style';
|
|
24
|
+
}
|
|
25
|
+
if (!VALID_COLOR_SCHEMES.has(plan.design.color_scheme)) {
|
|
26
|
+
return `Invalid color_scheme: ${plan.design.color_scheme}`;
|
|
27
|
+
}
|
|
28
|
+
if (!VALID_DESIGN_STYLES.has(plan.design.design_style)) {
|
|
29
|
+
return `Invalid design_style: ${plan.design.design_style}`;
|
|
30
|
+
}
|
|
31
|
+
if (!Array.isArray(plan.slides) || plan.slides.length < 3) {
|
|
32
|
+
return 'slides array must have at least 3 entries';
|
|
33
|
+
}
|
|
34
|
+
if (plan.slides[0]?.tool !== 'ppt_build_title_slide') {
|
|
35
|
+
return 'First slide must be ppt_build_title_slide';
|
|
36
|
+
}
|
|
37
|
+
if (plan.slides[plan.slides.length - 1]?.tool !== 'ppt_build_closing_slide') {
|
|
38
|
+
return 'Last slide must be ppt_build_closing_slide';
|
|
39
|
+
}
|
|
40
|
+
for (let i = 0; i < plan.slides.length; i++) {
|
|
41
|
+
const s = plan.slides[i];
|
|
42
|
+
if (!VALID_SLIDE_TOOLS.has(s.tool)) {
|
|
43
|
+
return `Slide ${i + 1}: invalid tool "${s.tool}"`;
|
|
44
|
+
}
|
|
45
|
+
if (!s.title) {
|
|
46
|
+
return `Slide ${i + 1}: missing title`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const counts = {};
|
|
50
|
+
for (const s of plan.slides) {
|
|
51
|
+
counts[s.tool] = (counts[s.tool] || 0) + 1;
|
|
52
|
+
}
|
|
53
|
+
if ((counts['ppt_build_layout_a'] || 0) > 3) {
|
|
54
|
+
return `Layout A count ${counts['ppt_build_layout_a']} exceeds max 3`;
|
|
55
|
+
}
|
|
56
|
+
if ((counts['ppt_build_layout_b'] || 0) > 4) {
|
|
57
|
+
return `Layout B count ${counts['ppt_build_layout_b']} exceeds max 4`;
|
|
58
|
+
}
|
|
59
|
+
const layoutTypes = new Set(plan.slides
|
|
60
|
+
.map(s => s.tool)
|
|
61
|
+
.filter(t => t.startsWith('ppt_build_layout_')));
|
|
62
|
+
if (layoutTypes.size < 5) {
|
|
63
|
+
return `Only ${layoutTypes.size} layout types used, need at least 5`;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
function parseJsonPlan(raw) {
|
|
68
|
+
let cleaned = raw.trim();
|
|
69
|
+
if (cleaned.startsWith('```')) {
|
|
70
|
+
cleaned = cleaned.replace(/^```(?:json)?\s*\n?/, '').replace(/\n?```\s*$/, '');
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
return JSON.parse(cleaned);
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
const match = cleaned.match(/\{[\s\S]*\}/);
|
|
77
|
+
if (match) {
|
|
78
|
+
try {
|
|
79
|
+
return JSON.parse(match[0]);
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function runStructured(llmClient, instruction) {
|
|
89
|
+
const startTime = Date.now();
|
|
90
|
+
const phaseLogger = getSubAgentPhaseLogger();
|
|
91
|
+
const toolCallLogger = getSubAgentToolCallLogger();
|
|
92
|
+
let totalToolCalls = 0;
|
|
93
|
+
logger.enter('PPT-Create.runStructured');
|
|
94
|
+
const hasKorean = /[\uac00-\ud7af\u1100-\u11ff]/.test(instruction);
|
|
95
|
+
const language = hasKorean ? 'ko' : 'en';
|
|
96
|
+
if (phaseLogger)
|
|
97
|
+
phaseLogger('powerpoint-create', 'enhancement', 'Generating creative guidance...');
|
|
98
|
+
let guidance = '';
|
|
99
|
+
try {
|
|
100
|
+
const enhRes = await llmClient.chatCompletion({
|
|
101
|
+
messages: [
|
|
102
|
+
{ role: 'system', content: PPT_CREATE_ENHANCEMENT_PROMPT },
|
|
103
|
+
{ role: 'user', content: instruction },
|
|
104
|
+
],
|
|
105
|
+
temperature: 0.5,
|
|
106
|
+
max_tokens: 800,
|
|
107
|
+
});
|
|
108
|
+
guidance = enhRes.choices[0]?.message?.content || '';
|
|
109
|
+
if (phaseLogger)
|
|
110
|
+
phaseLogger('powerpoint-create', 'enhancement', `Done (${guidance.length} chars)`);
|
|
111
|
+
}
|
|
112
|
+
catch (e) {
|
|
113
|
+
logger.warn('PPT enhancement failed, proceeding without', { error: String(e) });
|
|
114
|
+
}
|
|
115
|
+
const enhancedInstruction = guidance
|
|
116
|
+
? `${instruction}\n\n═══ CREATIVE GUIDANCE ═══\n${guidance}\n═══ END GUIDANCE ═══`
|
|
117
|
+
: instruction;
|
|
118
|
+
if (phaseLogger)
|
|
119
|
+
phaseLogger('powerpoint-create', 'planning', 'Generating JSON plan...');
|
|
120
|
+
let plan = null;
|
|
121
|
+
try {
|
|
122
|
+
const planRes = await llmClient.chatCompletion({
|
|
123
|
+
messages: [
|
|
124
|
+
{ role: 'system', content: PPT_STRUCTURED_PLANNING_PROMPT },
|
|
125
|
+
{ role: 'user', content: enhancedInstruction },
|
|
126
|
+
],
|
|
127
|
+
temperature: 0.4,
|
|
128
|
+
max_tokens: 2000,
|
|
129
|
+
});
|
|
130
|
+
const rawPlan = planRes.choices[0]?.message?.content || '';
|
|
131
|
+
plan = parseJsonPlan(rawPlan);
|
|
132
|
+
if (plan) {
|
|
133
|
+
const validationError = validatePlan(plan);
|
|
134
|
+
if (validationError) {
|
|
135
|
+
logger.warn('PPT plan validation failed', { error: validationError });
|
|
136
|
+
if (phaseLogger)
|
|
137
|
+
phaseLogger('powerpoint-create', 'planning', `Validation failed: ${validationError}. Falling back.`);
|
|
138
|
+
plan = null;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
if (phaseLogger)
|
|
142
|
+
phaseLogger('powerpoint-create', 'planning', `Done (${plan.slides.length} slides)`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
logger.warn('PPT JSON plan parsing failed');
|
|
147
|
+
if (phaseLogger)
|
|
148
|
+
phaseLogger('powerpoint-create', 'planning', 'JSON parsing failed. Falling back.');
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
catch (e) {
|
|
152
|
+
logger.warn('PPT planning failed', { error: String(e) });
|
|
153
|
+
if (phaseLogger)
|
|
154
|
+
phaseLogger('powerpoint-create', 'planning', 'Planning error. Falling back.');
|
|
155
|
+
}
|
|
156
|
+
if (!plan) {
|
|
157
|
+
logger.info('PPT falling back to SubAgent.run()');
|
|
158
|
+
if (phaseLogger)
|
|
159
|
+
phaseLogger('powerpoint-create', 'fallback', 'Using SubAgent execution loop');
|
|
160
|
+
const agent = new SubAgent(llmClient, 'powerpoint-create', POWERPOINT_CREATE_TOOLS, PPT_CREATE_SYSTEM_PROMPT, {
|
|
161
|
+
maxIterations: 30,
|
|
162
|
+
planningPrompt: PPT_CREATE_PLANNING_PROMPT,
|
|
163
|
+
planningMaxTokens: 2000,
|
|
164
|
+
enhancementPrompt: PPT_CREATE_ENHANCEMENT_PROMPT,
|
|
165
|
+
enhancementMaxTokens: 800,
|
|
166
|
+
minToolCallsBeforeComplete: 14,
|
|
167
|
+
});
|
|
168
|
+
return agent.run(instruction);
|
|
169
|
+
}
|
|
170
|
+
if (phaseLogger)
|
|
171
|
+
phaseLogger('powerpoint-create', 'execution', 'Starting slide-by-slide execution...');
|
|
172
|
+
const toolMap = new Map();
|
|
173
|
+
for (const tool of POWERPOINT_CREATE_TOOLS) {
|
|
174
|
+
toolMap.set(tool.definition.function.name, tool);
|
|
175
|
+
}
|
|
176
|
+
const pathMatch = instruction.match(/([A-Za-z]:\\[^\s,]+\.pptx|\/[^\s,]+\.pptx)/i);
|
|
177
|
+
const savePath = pathMatch ? pathMatch[1] : undefined;
|
|
178
|
+
const createTool = toolMap.get('powerpoint_create');
|
|
179
|
+
if (!createTool) {
|
|
180
|
+
return { success: false, error: 'powerpoint_create tool not found' };
|
|
181
|
+
}
|
|
182
|
+
resetLayoutCounters();
|
|
183
|
+
const createResult = await createTool.execute({ reason: 'Creating new presentation' });
|
|
184
|
+
totalToolCalls++;
|
|
185
|
+
if (toolCallLogger)
|
|
186
|
+
toolCallLogger('powerpoint-create', 'powerpoint_create', { reason: 'Creating new presentation' }, createResult.result || createResult.error || '', createResult.success, 0, totalToolCalls);
|
|
187
|
+
if (!createResult.success) {
|
|
188
|
+
return { success: false, error: `Failed to create presentation: ${createResult.error}` };
|
|
189
|
+
}
|
|
190
|
+
const builtSlides = [];
|
|
191
|
+
for (let i = 0; i < plan.slides.length; i++) {
|
|
192
|
+
const slidePlan = plan.slides[i];
|
|
193
|
+
const slideNum = i + 1;
|
|
194
|
+
const tool = toolMap.get(slidePlan.tool);
|
|
195
|
+
if (!tool) {
|
|
196
|
+
logger.warn(`Tool ${slidePlan.tool} not found, skipping slide ${slideNum}`);
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
if (slidePlan.tool === 'ppt_build_title_slide') {
|
|
200
|
+
const args = {
|
|
201
|
+
title: slidePlan.title,
|
|
202
|
+
subtitle: slidePlan.params?.['subtitle'] || '',
|
|
203
|
+
date_text: slidePlan.params?.['date_text'] || '',
|
|
204
|
+
color_scheme: plan.design.color_scheme,
|
|
205
|
+
design_style: plan.design.design_style,
|
|
206
|
+
};
|
|
207
|
+
const result = await tool.execute(args);
|
|
208
|
+
totalToolCalls++;
|
|
209
|
+
if (toolCallLogger)
|
|
210
|
+
toolCallLogger('powerpoint-create', slidePlan.tool, args, result.result || result.error || '', result.success, slideNum, totalToolCalls);
|
|
211
|
+
if (result.success) {
|
|
212
|
+
builtSlides.push(`Slide ${slideNum}: ${slidePlan.title} (title)`);
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
logger.warn(`Title slide failed: ${result.error}`);
|
|
216
|
+
}
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
if (slidePlan.tool === 'ppt_build_closing_slide') {
|
|
220
|
+
const closingText = slidePlan.params?.['text'] || slidePlan.title || '감사합니다';
|
|
221
|
+
const args = {
|
|
222
|
+
text: closingText,
|
|
223
|
+
subtitle: slidePlan.params?.['subtitle'] || '',
|
|
224
|
+
color_scheme: plan.design.color_scheme,
|
|
225
|
+
design_style: plan.design.design_style,
|
|
226
|
+
};
|
|
227
|
+
const result = await tool.execute(args);
|
|
228
|
+
totalToolCalls++;
|
|
229
|
+
if (toolCallLogger)
|
|
230
|
+
toolCallLogger('powerpoint-create', slidePlan.tool, args, result.result || result.error || '', result.success, slideNum, totalToolCalls);
|
|
231
|
+
if (result.success) {
|
|
232
|
+
builtSlides.push(`Slide ${slideNum}: ${closingText} (closing)`);
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
logger.warn(`Closing slide failed: ${result.error}`);
|
|
236
|
+
}
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
const slideSystemPrompt = buildSlideSystemPrompt(slidePlan.tool, slidePlan.title, slidePlan.direction || '', guidance, language);
|
|
240
|
+
if (!slideSystemPrompt) {
|
|
241
|
+
logger.warn(`No system prompt for ${slidePlan.tool}, skipping`);
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
try {
|
|
245
|
+
const slideRes = await llmClient.chatCompletion({
|
|
246
|
+
messages: [
|
|
247
|
+
{ role: 'system', content: slideSystemPrompt },
|
|
248
|
+
{ role: 'user', content: `Build slide "${slidePlan.title}" now. Call the tool with all required parameters.` },
|
|
249
|
+
],
|
|
250
|
+
tools: [tool.definition],
|
|
251
|
+
temperature: 0.3,
|
|
252
|
+
max_tokens: 2000,
|
|
253
|
+
});
|
|
254
|
+
const msg = slideRes.choices[0]?.message;
|
|
255
|
+
if (!msg?.tool_calls || msg.tool_calls.length === 0) {
|
|
256
|
+
logger.warn(`Slide ${slideNum}: LLM did not call tool, skipping`);
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
const tc = msg.tool_calls[0];
|
|
260
|
+
let args;
|
|
261
|
+
try {
|
|
262
|
+
args = JSON.parse(tc.function.arguments);
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
logger.warn(`Slide ${slideNum}: Invalid JSON args from LLM`);
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
args['color_scheme'] = plan.design.color_scheme;
|
|
269
|
+
args['design_style'] = plan.design.design_style;
|
|
270
|
+
const result = await tool.execute(args);
|
|
271
|
+
totalToolCalls++;
|
|
272
|
+
if (toolCallLogger)
|
|
273
|
+
toolCallLogger('powerpoint-create', tc.function.name, args, result.result || result.error || '', result.success, slideNum, totalToolCalls);
|
|
274
|
+
if (result.success) {
|
|
275
|
+
builtSlides.push(`Slide ${slideNum}: ${slidePlan.title} (${slidePlan.tool.replace('ppt_build_layout_', 'Layout ').toUpperCase()})`);
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
logger.warn(`Slide ${slideNum} failed: ${result.error}`);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
catch (e) {
|
|
282
|
+
logger.warn(`Slide ${slideNum} LLM call failed: ${e}`);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
const saveTool = toolMap.get('powerpoint_save');
|
|
286
|
+
if (saveTool) {
|
|
287
|
+
const saveArgs = { reason: 'Saving completed presentation' };
|
|
288
|
+
if (savePath)
|
|
289
|
+
saveArgs['path'] = savePath;
|
|
290
|
+
const saveResult = await saveTool.execute(saveArgs);
|
|
291
|
+
totalToolCalls++;
|
|
292
|
+
if (toolCallLogger)
|
|
293
|
+
toolCallLogger('powerpoint-create', 'powerpoint_save', saveArgs, saveResult.result || saveResult.error || '', saveResult.success, 0, totalToolCalls);
|
|
294
|
+
if (!saveResult.success) {
|
|
295
|
+
const fallbackArgs = { reason: 'Retry save', path: 'C:\\temp\\presentation.pptx' };
|
|
296
|
+
const retryResult = await saveTool.execute(fallbackArgs);
|
|
297
|
+
totalToolCalls++;
|
|
298
|
+
if (toolCallLogger)
|
|
299
|
+
toolCallLogger('powerpoint-create', 'powerpoint_save', fallbackArgs, retryResult.result || retryResult.error || '', retryResult.success, 0, totalToolCalls);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
const duration = Date.now() - startTime;
|
|
303
|
+
const summary = `Presentation created with ${builtSlides.length} slides (${plan.design.color_scheme}, ${plan.design.design_style} style):\n${builtSlides.join('\n')}`;
|
|
304
|
+
logger.exit('PPT-Create.runStructured', { slideCount: builtSlides.length, totalToolCalls, duration });
|
|
305
|
+
return {
|
|
306
|
+
success: true,
|
|
307
|
+
result: summary,
|
|
308
|
+
metadata: { iterations: plan.slides.length, toolCalls: totalToolCalls, duration },
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
export function createPowerPointCreateRequestTool() {
|
|
312
|
+
return {
|
|
313
|
+
definition: {
|
|
314
|
+
type: 'function',
|
|
315
|
+
function: {
|
|
316
|
+
name: 'powerpoint_create_agent',
|
|
317
|
+
description: 'Autonomous PowerPoint CREATION agent. Creates NEW presentations from scratch with professional slide designs, color schemes, and visual hierarchy. Uses high-level builder tools where each tool call creates one complete slide. Give it a topic or outline and it produces a polished, enterprise-grade presentation. For EDITING existing .pptx files, use powerpoint_modify_agent instead.',
|
|
318
|
+
parameters: {
|
|
319
|
+
type: 'object',
|
|
320
|
+
properties: {
|
|
321
|
+
instruction: {
|
|
322
|
+
type: 'string',
|
|
323
|
+
description: 'Detailed instruction for creating a new presentation. Include: topic/title, desired content, design preferences, and save path. The agent autonomously creates a professional presentation with title, content, and closing slides.',
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
required: ['instruction'],
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
execute: async (args, llmClient) => {
|
|
331
|
+
return runStructured(llmClient, args['instruction']);
|
|
332
|
+
},
|
|
333
|
+
categories: ['llm-agent'],
|
|
334
|
+
requiresSubLLM: true,
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
//# sourceMappingURL=powerpoint-create-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"powerpoint-create-agent.js","sourceRoot":"","sources":["../../../src/agents/office/powerpoint-create-agent.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EAAE,MA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