hanseol-dev 5.0.2-dev.5 → 5.0.2-dev.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/agents/common/sub-agent.d.ts +21 -0
  2. package/dist/agents/common/sub-agent.d.ts.map +1 -1
  3. package/dist/agents/common/sub-agent.js +195 -10
  4. package/dist/agents/common/sub-agent.js.map +1 -1
  5. package/dist/agents/index.d.ts +1 -1
  6. package/dist/agents/index.d.ts.map +1 -1
  7. package/dist/agents/index.js +1 -1
  8. package/dist/agents/index.js.map +1 -1
  9. package/dist/agents/office/excel-agent.d.ts +1 -1
  10. package/dist/agents/office/excel-agent.d.ts.map +1 -1
  11. package/dist/agents/office/excel-agent.js +6 -6
  12. package/dist/agents/office/excel-agent.js.map +1 -1
  13. package/dist/agents/office/excel-create-agent.d.ts +3 -0
  14. package/dist/agents/office/excel-create-agent.d.ts.map +1 -0
  15. package/dist/agents/office/excel-create-agent.js +38 -0
  16. package/dist/agents/office/excel-create-agent.js.map +1 -0
  17. package/dist/agents/office/excel-create-prompts.d.ts +4 -0
  18. package/dist/agents/office/excel-create-prompts.d.ts.map +1 -0
  19. package/dist/agents/office/excel-create-prompts.js +154 -0
  20. package/dist/agents/office/excel-create-prompts.js.map +1 -0
  21. package/dist/agents/office/index.d.ts +6 -3
  22. package/dist/agents/office/index.d.ts.map +1 -1
  23. package/dist/agents/office/index.js +6 -3
  24. package/dist/agents/office/index.js.map +1 -1
  25. package/dist/agents/office/powerpoint-agent.d.ts +1 -1
  26. package/dist/agents/office/powerpoint-agent.d.ts.map +1 -1
  27. package/dist/agents/office/powerpoint-agent.js +6 -6
  28. package/dist/agents/office/powerpoint-agent.js.map +1 -1
  29. package/dist/agents/office/powerpoint-create-agent.d.ts +3 -0
  30. package/dist/agents/office/powerpoint-create-agent.d.ts.map +1 -0
  31. package/dist/agents/office/powerpoint-create-agent.js +348 -0
  32. package/dist/agents/office/powerpoint-create-agent.js.map +1 -0
  33. package/dist/agents/office/powerpoint-create-prompts.d.ts +6 -0
  34. package/dist/agents/office/powerpoint-create-prompts.d.ts.map +1 -0
  35. package/dist/agents/office/powerpoint-create-prompts.js +384 -0
  36. package/dist/agents/office/powerpoint-create-prompts.js.map +1 -0
  37. package/dist/agents/office/prompts.d.ts +10 -3
  38. package/dist/agents/office/prompts.d.ts.map +1 -1
  39. package/dist/agents/office/prompts.js +479 -59
  40. package/dist/agents/office/prompts.js.map +1 -1
  41. package/dist/agents/office/word-agent.d.ts +1 -1
  42. package/dist/agents/office/word-agent.d.ts.map +1 -1
  43. package/dist/agents/office/word-agent.js +6 -6
  44. package/dist/agents/office/word-agent.js.map +1 -1
  45. package/dist/agents/office/word-create-agent.d.ts +3 -0
  46. package/dist/agents/office/word-create-agent.d.ts.map +1 -0
  47. package/dist/agents/office/word-create-agent.js +38 -0
  48. package/dist/agents/office/word-create-agent.js.map +1 -0
  49. package/dist/agents/office/word-create-prompts.d.ts +4 -0
  50. package/dist/agents/office/word-create-prompts.d.ts.map +1 -0
  51. package/dist/agents/office/word-create-prompts.js +164 -0
  52. package/dist/agents/office/word-create-prompts.js.map +1 -0
  53. package/dist/cli.js +3 -0
  54. package/dist/cli.js.map +1 -1
  55. package/dist/constants.d.ts +1 -1
  56. package/dist/constants.d.ts.map +1 -1
  57. package/dist/constants.js +1 -1
  58. package/dist/constants.js.map +1 -1
  59. package/dist/pipe/pipe-runner.d.ts.map +1 -1
  60. package/dist/pipe/pipe-runner.js +20 -0
  61. package/dist/pipe/pipe-runner.js.map +1 -1
  62. package/dist/prompts/agents/planning.d.ts.map +1 -1
  63. package/dist/prompts/agents/planning.js +43 -15
  64. package/dist/prompts/agents/planning.js.map +1 -1
  65. package/dist/prompts/shared/tool-usage.d.ts.map +1 -1
  66. package/dist/prompts/shared/tool-usage.js +6 -3
  67. package/dist/prompts/shared/tool-usage.js.map +1 -1
  68. package/dist/prompts/system/plan-execute.js +1 -1
  69. package/dist/tools/office/excel-client.js +4 -4
  70. package/dist/tools/office/excel-tools/index.d.ts +2 -0
  71. package/dist/tools/office/excel-tools/index.d.ts.map +1 -1
  72. package/dist/tools/office/excel-tools/index.js +12 -0
  73. package/dist/tools/office/excel-tools/index.js.map +1 -1
  74. package/dist/tools/office/excel-tools/sheet-builders.d.ts +8 -0
  75. package/dist/tools/office/excel-tools/sheet-builders.d.ts.map +1 -0
  76. package/dist/tools/office/excel-tools/sheet-builders.js +414 -0
  77. package/dist/tools/office/excel-tools/sheet-builders.js.map +1 -0
  78. package/dist/tools/office/excel-tools.d.ts +1 -1
  79. package/dist/tools/office/excel-tools.d.ts.map +1 -1
  80. package/dist/tools/office/excel-tools.js +1 -1
  81. package/dist/tools/office/excel-tools.js.map +1 -1
  82. package/dist/tools/office/powerpoint-client.d.ts.map +1 -1
  83. package/dist/tools/office/powerpoint-client.js +9 -10
  84. package/dist/tools/office/powerpoint-client.js.map +1 -1
  85. package/dist/tools/office/powerpoint-tools/export.d.ts.map +1 -1
  86. package/dist/tools/office/powerpoint-tools/export.js +16 -1
  87. package/dist/tools/office/powerpoint-tools/export.js.map +1 -1
  88. package/dist/tools/office/powerpoint-tools/index.d.ts +2 -0
  89. package/dist/tools/office/powerpoint-tools/index.d.ts.map +1 -1
  90. package/dist/tools/office/powerpoint-tools/index.js +11 -0
  91. package/dist/tools/office/powerpoint-tools/index.js.map +1 -1
  92. package/dist/tools/office/powerpoint-tools/launch.d.ts.map +1 -1
  93. package/dist/tools/office/powerpoint-tools/launch.js +2 -0
  94. package/dist/tools/office/powerpoint-tools/launch.js.map +1 -1
  95. package/dist/tools/office/powerpoint-tools/layout-builders.d.ts +12 -0
  96. package/dist/tools/office/powerpoint-tools/layout-builders.d.ts.map +1 -0
  97. package/dist/tools/office/powerpoint-tools/layout-builders.js +771 -0
  98. package/dist/tools/office/powerpoint-tools/layout-builders.js.map +1 -0
  99. package/dist/tools/office/powerpoint-tools/slides.js +1 -1
  100. package/dist/tools/office/powerpoint-tools/slides.js.map +1 -1
  101. package/dist/tools/office/powerpoint-tools.d.ts +1 -1
  102. package/dist/tools/office/powerpoint-tools.d.ts.map +1 -1
  103. package/dist/tools/office/powerpoint-tools.js +1 -1
  104. package/dist/tools/office/powerpoint-tools.js.map +1 -1
  105. package/dist/tools/office/word-client.js +4 -4
  106. package/dist/tools/office/word-tools/index.d.ts +4 -1
  107. package/dist/tools/office/word-tools/index.d.ts.map +1 -1
  108. package/dist/tools/office/word-tools/index.js +15 -0
  109. package/dist/tools/office/word-tools/index.js.map +1 -1
  110. package/dist/tools/office/word-tools/section-builders.d.ts +10 -0
  111. package/dist/tools/office/word-tools/section-builders.d.ts.map +1 -0
  112. package/dist/tools/office/word-tools/section-builders.js +421 -0
  113. package/dist/tools/office/word-tools/section-builders.js.map +1 -0
  114. package/dist/tools/office/word-tools.d.ts +1 -1
  115. package/dist/tools/office/word-tools.d.ts.map +1 -1
  116. package/dist/tools/office/word-tools.js +1 -1
  117. package/dist/tools/office/word-tools.js.map +1 -1
  118. package/dist/tools/registry.d.ts.map +1 -1
  119. package/dist/tools/registry.js +7 -4
  120. package/dist/tools/registry.js.map +1 -1
  121. 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 { createWordWorkRequestTool } from './word-agent.js';
5
- export { createExcelWorkRequestTool } from './excel-agent.js';
6
- export { createPowerPointWorkRequestTool } from './powerpoint-agent.js';
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;AACtB,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,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 { createWordWorkRequestTool } from './word-agent.js';
5
- export { createExcelWorkRequestTool } from './excel-agent.js';
6
- export { createPowerPointWorkRequestTool } from './powerpoint-agent.js';
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;AACtB,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,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,3 +1,3 @@
1
1
  import { LLMAgentTool } from '../../tools/types.js';
2
- export declare function createPowerPointWorkRequestTool(): LLMAgentTool;
2
+ export declare function createPowerPointModifyRequestTool(): LLMAgentTool;
3
3
  //# sourceMappingURL=powerpoint-agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"powerpoint-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/office/powerpoint-agent.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAKpD,wBAAgB,+BAA+B,IAAI,YAAY,CAkC9D"}
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 createPowerPointWorkRequestTool() {
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: 'powerpoint_agent',
10
- description: 'Autonomous Microsoft PowerPoint specialist agent. Creates stunning presentations with professional slide designs, color schemes, shapes, text layouts, charts, and visual hierarchy — all automatically. Give it a topic or rough outline and it will produce a polished, enterprise-grade presentation with title slide, content slides (bullets, comparisons, metrics, timelines), and closing slide. Also capable of editing existing .pptx files. The agent runs independently with its own tools and returns the completed result.',
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 the PowerPoint agent. Include: presentation topic/title, desired slides and their content, any specific design preferences, and save path. The more detail you provide, the better the result. The agent will autonomously create a professional presentation.',
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: 70 });
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":"AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,UAAU,EAAE;YACV,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE;gBACR,IAAI,EAAE,kBAAkB;gBACxB,WAAW,EACT,ygBAAygB;gBAC3gB,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,WAAW,EAAE;4BACX,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,yRAAyR;yBAC5R;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,EAAE,EAAE,CACtB,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"}
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,3 @@
1
+ import { LLMAgentTool } from '../../tools/types.js';
2
+ export declare function createPowerPointCreateRequestTool(): LLMAgentTool;
3
+ //# sourceMappingURL=powerpoint-create-agent.d.ts.map
@@ -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;AAkahE,wBAAgB,iCAAiC,IAAI,YAAY,CA2BhE"}
@@ -0,0 +1,348 @@
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 extractContent(msg) {
22
+ const content = msg['content'];
23
+ if (content && content.trim())
24
+ return content;
25
+ const reasoning = msg['reasoning_content'];
26
+ if (reasoning && reasoning.trim())
27
+ return reasoning;
28
+ return '';
29
+ }
30
+ function validatePlan(plan) {
31
+ if (!plan.design?.color_scheme || !plan.design?.design_style) {
32
+ return 'Missing design.color_scheme or design.design_style';
33
+ }
34
+ if (!VALID_COLOR_SCHEMES.has(plan.design.color_scheme)) {
35
+ return `Invalid color_scheme: ${plan.design.color_scheme}`;
36
+ }
37
+ if (!VALID_DESIGN_STYLES.has(plan.design.design_style)) {
38
+ return `Invalid design_style: ${plan.design.design_style}`;
39
+ }
40
+ if (!Array.isArray(plan.slides) || plan.slides.length < 3) {
41
+ return 'slides array must have at least 3 entries';
42
+ }
43
+ if (plan.slides[0]?.tool !== 'ppt_build_title_slide') {
44
+ return 'First slide must be ppt_build_title_slide';
45
+ }
46
+ if (plan.slides[plan.slides.length - 1]?.tool !== 'ppt_build_closing_slide') {
47
+ return 'Last slide must be ppt_build_closing_slide';
48
+ }
49
+ for (let i = 0; i < plan.slides.length; i++) {
50
+ const s = plan.slides[i];
51
+ if (!VALID_SLIDE_TOOLS.has(s.tool)) {
52
+ return `Slide ${i + 1}: invalid tool "${s.tool}"`;
53
+ }
54
+ if (!s.title) {
55
+ return `Slide ${i + 1}: missing title`;
56
+ }
57
+ }
58
+ const counts = {};
59
+ for (const s of plan.slides) {
60
+ counts[s.tool] = (counts[s.tool] || 0) + 1;
61
+ }
62
+ if ((counts['ppt_build_layout_a'] || 0) > 3) {
63
+ return `Layout A count ${counts['ppt_build_layout_a']} exceeds max 3`;
64
+ }
65
+ if ((counts['ppt_build_layout_b'] || 0) > 4) {
66
+ return `Layout B count ${counts['ppt_build_layout_b']} exceeds max 4`;
67
+ }
68
+ const layoutTypes = new Set(plan.slides
69
+ .map(s => s.tool)
70
+ .filter(t => t.startsWith('ppt_build_layout_')));
71
+ if (layoutTypes.size < 5) {
72
+ return `Only ${layoutTypes.size} layout types used, need at least 5`;
73
+ }
74
+ return null;
75
+ }
76
+ function parseJsonPlan(raw) {
77
+ let cleaned = raw.trim();
78
+ if (cleaned.startsWith('```')) {
79
+ cleaned = cleaned.replace(/^```(?:json)?\s*\n?/, '').replace(/\n?```\s*$/, '');
80
+ }
81
+ try {
82
+ return JSON.parse(cleaned);
83
+ }
84
+ catch {
85
+ const match = cleaned.match(/\{[\s\S]*\}/);
86
+ if (match) {
87
+ try {
88
+ return JSON.parse(match[0]);
89
+ }
90
+ catch {
91
+ return null;
92
+ }
93
+ }
94
+ return null;
95
+ }
96
+ }
97
+ async function runStructured(llmClient, instruction) {
98
+ const startTime = Date.now();
99
+ const phaseLogger = getSubAgentPhaseLogger();
100
+ const toolCallLogger = getSubAgentToolCallLogger();
101
+ let totalToolCalls = 0;
102
+ logger.enter('PPT-Create.runStructured');
103
+ const hasKorean = /[\uac00-\ud7af\u1100-\u11ff]/.test(instruction);
104
+ const language = hasKorean ? 'ko' : 'en';
105
+ if (phaseLogger)
106
+ phaseLogger('powerpoint-create', 'enhancement', 'Generating creative guidance...');
107
+ let guidance = '';
108
+ try {
109
+ const enhRes = await llmClient.chatCompletion({
110
+ messages: [
111
+ { role: 'system', content: PPT_CREATE_ENHANCEMENT_PROMPT },
112
+ { role: 'user', content: instruction },
113
+ ],
114
+ temperature: 0.5,
115
+ max_tokens: 800,
116
+ });
117
+ const enhMsg = enhRes.choices[0]?.message;
118
+ guidance = enhMsg ? extractContent(enhMsg) : '';
119
+ if (phaseLogger)
120
+ phaseLogger('powerpoint-create', 'enhancement', `Done (${guidance.length} chars)`);
121
+ }
122
+ catch (e) {
123
+ logger.warn('PPT enhancement failed, proceeding without', { error: String(e) });
124
+ }
125
+ const enhancedInstruction = guidance
126
+ ? `${instruction}\n\n═══ CREATIVE GUIDANCE ═══\n${guidance}\n═══ END GUIDANCE ═══`
127
+ : instruction;
128
+ if (phaseLogger)
129
+ phaseLogger('powerpoint-create', 'planning', 'Generating JSON plan...');
130
+ let plan = null;
131
+ try {
132
+ const planRes = await llmClient.chatCompletion({
133
+ messages: [
134
+ { role: 'system', content: PPT_STRUCTURED_PLANNING_PROMPT },
135
+ { role: 'user', content: enhancedInstruction },
136
+ ],
137
+ temperature: 0.4,
138
+ max_tokens: 2000,
139
+ });
140
+ const planMsg = planRes.choices[0]?.message;
141
+ const rawPlan = planMsg ? extractContent(planMsg) : '';
142
+ plan = rawPlan ? parseJsonPlan(rawPlan) : null;
143
+ if (plan) {
144
+ const validationError = validatePlan(plan);
145
+ if (validationError) {
146
+ logger.warn('PPT plan validation failed', { error: validationError });
147
+ if (phaseLogger)
148
+ phaseLogger('powerpoint-create', 'planning', `Validation failed: ${validationError}. Falling back.`);
149
+ plan = null;
150
+ }
151
+ else {
152
+ if (phaseLogger)
153
+ phaseLogger('powerpoint-create', 'planning', `Done (${plan.slides.length} slides)`);
154
+ }
155
+ }
156
+ else {
157
+ logger.warn('PPT JSON plan parsing failed');
158
+ if (phaseLogger)
159
+ phaseLogger('powerpoint-create', 'planning', 'JSON parsing failed. Falling back.');
160
+ }
161
+ }
162
+ catch (e) {
163
+ logger.warn('PPT planning failed', { error: String(e) });
164
+ if (phaseLogger)
165
+ phaseLogger('powerpoint-create', 'planning', 'Planning error. Falling back.');
166
+ }
167
+ if (!plan) {
168
+ logger.info('PPT falling back to SubAgent.run()');
169
+ if (phaseLogger)
170
+ phaseLogger('powerpoint-create', 'fallback', 'Using SubAgent execution loop');
171
+ const agent = new SubAgent(llmClient, 'powerpoint-create', POWERPOINT_CREATE_TOOLS, PPT_CREATE_SYSTEM_PROMPT, {
172
+ maxIterations: 30,
173
+ planningPrompt: PPT_CREATE_PLANNING_PROMPT,
174
+ planningMaxTokens: 2000,
175
+ enhancementPrompt: PPT_CREATE_ENHANCEMENT_PROMPT,
176
+ enhancementMaxTokens: 800,
177
+ minToolCallsBeforeComplete: 14,
178
+ });
179
+ return agent.run(instruction);
180
+ }
181
+ if (phaseLogger)
182
+ phaseLogger('powerpoint-create', 'execution', 'Starting slide-by-slide execution...');
183
+ const toolMap = new Map();
184
+ for (const tool of POWERPOINT_CREATE_TOOLS) {
185
+ toolMap.set(tool.definition.function.name, tool);
186
+ }
187
+ const pathMatch = instruction.match(/([A-Za-z]:\\[^\s,]+\.pptx|\/[^\s,]+\.pptx)/i);
188
+ const savePath = pathMatch ? pathMatch[1] : undefined;
189
+ const createTool = toolMap.get('powerpoint_create');
190
+ if (!createTool) {
191
+ return { success: false, error: 'powerpoint_create tool not found' };
192
+ }
193
+ resetLayoutCounters();
194
+ const createResult = await createTool.execute({ reason: 'Creating new presentation' });
195
+ totalToolCalls++;
196
+ if (toolCallLogger)
197
+ toolCallLogger('powerpoint-create', 'powerpoint_create', { reason: 'Creating new presentation' }, createResult.result || createResult.error || '', createResult.success, 0, totalToolCalls);
198
+ if (!createResult.success) {
199
+ return { success: false, error: `Failed to create presentation: ${createResult.error}` };
200
+ }
201
+ const builtSlides = [];
202
+ for (let i = 0; i < plan.slides.length; i++) {
203
+ const slidePlan = plan.slides[i];
204
+ const slideNum = i + 1;
205
+ const tool = toolMap.get(slidePlan.tool);
206
+ if (!tool) {
207
+ logger.warn(`Tool ${slidePlan.tool} not found, skipping slide ${slideNum}`);
208
+ continue;
209
+ }
210
+ if (slidePlan.tool === 'ppt_build_title_slide') {
211
+ const args = {
212
+ title: slidePlan.title,
213
+ subtitle: slidePlan.params?.['subtitle'] || '',
214
+ date_text: slidePlan.params?.['date_text'] || '',
215
+ color_scheme: plan.design.color_scheme,
216
+ design_style: plan.design.design_style,
217
+ };
218
+ const result = await tool.execute(args);
219
+ totalToolCalls++;
220
+ if (toolCallLogger)
221
+ toolCallLogger('powerpoint-create', slidePlan.tool, args, result.result || result.error || '', result.success, slideNum, totalToolCalls);
222
+ if (result.success) {
223
+ builtSlides.push(`Slide ${slideNum}: ${slidePlan.title} (title)`);
224
+ }
225
+ else {
226
+ logger.warn(`Title slide failed: ${result.error}`);
227
+ }
228
+ continue;
229
+ }
230
+ if (slidePlan.tool === 'ppt_build_closing_slide') {
231
+ const closingText = slidePlan.params?.['text'] || slidePlan.title || '감사합니다';
232
+ const args = {
233
+ text: closingText,
234
+ subtitle: slidePlan.params?.['subtitle'] || '',
235
+ color_scheme: plan.design.color_scheme,
236
+ design_style: plan.design.design_style,
237
+ };
238
+ const result = await tool.execute(args);
239
+ totalToolCalls++;
240
+ if (toolCallLogger)
241
+ toolCallLogger('powerpoint-create', slidePlan.tool, args, result.result || result.error || '', result.success, slideNum, totalToolCalls);
242
+ if (result.success) {
243
+ builtSlides.push(`Slide ${slideNum}: ${closingText} (closing)`);
244
+ }
245
+ else {
246
+ logger.warn(`Closing slide failed: ${result.error}`);
247
+ }
248
+ continue;
249
+ }
250
+ const slideSystemPrompt = buildSlideSystemPrompt(slidePlan.tool, slidePlan.title, slidePlan.direction || '', guidance, language);
251
+ if (!slideSystemPrompt) {
252
+ logger.warn(`No system prompt for ${slidePlan.tool}, skipping`);
253
+ continue;
254
+ }
255
+ try {
256
+ const slideRes = await llmClient.chatCompletion({
257
+ messages: [
258
+ { role: 'system', content: slideSystemPrompt },
259
+ { role: 'user', content: `Build slide "${slidePlan.title}" now. Call the tool with all required parameters.` },
260
+ ],
261
+ tools: [tool.definition],
262
+ temperature: 0.3,
263
+ max_tokens: 2000,
264
+ });
265
+ const msg = slideRes.choices[0]?.message;
266
+ if (!msg?.tool_calls || msg.tool_calls.length === 0) {
267
+ logger.warn(`Slide ${slideNum}: LLM did not call tool, skipping`);
268
+ continue;
269
+ }
270
+ const tc = msg.tool_calls[0];
271
+ let args;
272
+ try {
273
+ args = JSON.parse(tc.function.arguments);
274
+ }
275
+ catch {
276
+ logger.warn(`Slide ${slideNum}: Invalid JSON args from LLM`);
277
+ continue;
278
+ }
279
+ args['color_scheme'] = plan.design.color_scheme;
280
+ args['design_style'] = plan.design.design_style;
281
+ const result = await tool.execute(args);
282
+ totalToolCalls++;
283
+ if (toolCallLogger)
284
+ toolCallLogger('powerpoint-create', tc.function.name, args, result.result || result.error || '', result.success, slideNum, totalToolCalls);
285
+ if (result.success) {
286
+ builtSlides.push(`Slide ${slideNum}: ${slidePlan.title} (${slidePlan.tool.replace('ppt_build_layout_', 'Layout ').toUpperCase()})`);
287
+ }
288
+ else {
289
+ logger.warn(`Slide ${slideNum} failed: ${result.error}`);
290
+ }
291
+ }
292
+ catch (e) {
293
+ logger.warn(`Slide ${slideNum} LLM call failed: ${e}`);
294
+ }
295
+ }
296
+ const saveTool = toolMap.get('powerpoint_save');
297
+ if (saveTool) {
298
+ const saveArgs = { reason: 'Saving completed presentation' };
299
+ if (savePath)
300
+ saveArgs['path'] = savePath;
301
+ const saveResult = await saveTool.execute(saveArgs);
302
+ totalToolCalls++;
303
+ if (toolCallLogger)
304
+ toolCallLogger('powerpoint-create', 'powerpoint_save', saveArgs, saveResult.result || saveResult.error || '', saveResult.success, 0, totalToolCalls);
305
+ if (!saveResult.success) {
306
+ const fallbackArgs = { reason: 'Retry save', path: 'C:\\temp\\presentation.pptx' };
307
+ const retryResult = await saveTool.execute(fallbackArgs);
308
+ totalToolCalls++;
309
+ if (toolCallLogger)
310
+ toolCallLogger('powerpoint-create', 'powerpoint_save', fallbackArgs, retryResult.result || retryResult.error || '', retryResult.success, 0, totalToolCalls);
311
+ }
312
+ }
313
+ const duration = Date.now() - startTime;
314
+ const summary = `Presentation created with ${builtSlides.length} slides (${plan.design.color_scheme}, ${plan.design.design_style} style):\n${builtSlides.join('\n')}`;
315
+ logger.exit('PPT-Create.runStructured', { slideCount: builtSlides.length, totalToolCalls, duration });
316
+ return {
317
+ success: true,
318
+ result: summary,
319
+ metadata: { iterations: plan.slides.length, toolCalls: totalToolCalls, duration },
320
+ };
321
+ }
322
+ export function createPowerPointCreateRequestTool() {
323
+ return {
324
+ definition: {
325
+ type: 'function',
326
+ function: {
327
+ name: 'powerpoint_create_agent',
328
+ 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.',
329
+ parameters: {
330
+ type: 'object',
331
+ properties: {
332
+ instruction: {
333
+ type: 'string',
334
+ 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.',
335
+ },
336
+ },
337
+ required: ['instruction'],
338
+ },
339
+ },
340
+ },
341
+ execute: async (args, llmClient) => {
342
+ return runStructured(llmClient, args['instruction']);
343
+ },
344
+ categories: ['llm-agent'],
345
+ requiresSubLLM: true,
346
+ };
347
+ }
348
+ //# 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,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AAsBxC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,uBAAuB;IAC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