illuma-agents 1.0.44 → 1.0.47
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/cjs/common/enum.cjs +1 -0
- package/dist/cjs/common/enum.cjs.map +1 -1
- package/dist/cjs/main.cjs +3 -6
- package/dist/cjs/main.cjs.map +1 -1
- package/dist/cjs/tools/PresentationTool.cjs +291 -0
- package/dist/cjs/tools/PresentationTool.cjs.map +1 -0
- package/dist/esm/common/enum.mjs +1 -0
- package/dist/esm/common/enum.mjs.map +1 -1
- package/dist/esm/main.mjs +1 -1
- package/dist/esm/tools/PresentationTool.mjs +288 -0
- package/dist/esm/tools/PresentationTool.mjs.map +1 -0
- package/dist/types/common/enum.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/tools/PresentationTool.d.ts +2358 -0
- package/package.json +1 -1
- package/src/common/enum.ts +1 -0
- package/src/index.ts +1 -1
- package/src/tools/PresentationTool.ts +356 -0
- package/dist/cjs/tools/DesktopTools.cjs +0 -270
- package/dist/cjs/tools/DesktopTools.cjs.map +0 -1
- package/dist/esm/tools/DesktopTools.mjs +0 -264
- package/dist/esm/tools/DesktopTools.mjs.map +0 -1
- package/dist/types/tools/DesktopTools.d.ts +0 -104
- package/src/tools/DesktopTools.ts +0 -433
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { config } from 'dotenv';
|
|
3
|
+
import fetch from 'node-fetch';
|
|
4
|
+
import { HttpsProxyAgent } from 'https-proxy-agent';
|
|
5
|
+
import { tool } from '@langchain/core/tools';
|
|
6
|
+
import { getEnvironmentVariable } from '@langchain/core/utils/env';
|
|
7
|
+
import { EnvVar, Constants } from '../common/enum.mjs';
|
|
8
|
+
import { getCodeBaseURL } from './CodeExecutor.mjs';
|
|
9
|
+
|
|
10
|
+
config();
|
|
11
|
+
// =============================================================================
|
|
12
|
+
// PRESENTATION TOOL CONSTANTS
|
|
13
|
+
// =============================================================================
|
|
14
|
+
const PRESENTATIONS_ENDPOINT = `${getCodeBaseURL()}/presentations/create`;
|
|
15
|
+
// =============================================================================
|
|
16
|
+
// SCHEMA DEFINITIONS
|
|
17
|
+
// =============================================================================
|
|
18
|
+
/**
|
|
19
|
+
* Position and size model (matches code-executor PptxPositionModel)
|
|
20
|
+
*/
|
|
21
|
+
const PositionSchema = z.object({
|
|
22
|
+
left: z.number().describe('Left position in points'),
|
|
23
|
+
top: z.number().describe('Top position in points'),
|
|
24
|
+
width: z.number().describe('Width in points'),
|
|
25
|
+
height: z.number().describe('Height in points'),
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Font styling model
|
|
29
|
+
*/
|
|
30
|
+
const FontSchema = z.object({
|
|
31
|
+
name: z.string().default('Arial').describe('Font family name'),
|
|
32
|
+
size: z.number().default(16).describe('Font size in points'),
|
|
33
|
+
italic: z.boolean().optional().describe('Italic text'),
|
|
34
|
+
color: z.string().default('000000').describe('Hex color without #'),
|
|
35
|
+
font_weight: z.number().optional().default(400).describe('400 = normal, 600+ = bold'),
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* Fill/background color model
|
|
39
|
+
*/
|
|
40
|
+
const FillSchema = z.object({
|
|
41
|
+
color: z.string().describe('Hex color without #'),
|
|
42
|
+
opacity: z.number().optional().default(1.0),
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Spacing/margin model
|
|
46
|
+
*/
|
|
47
|
+
const SpacingSchema = z.object({
|
|
48
|
+
top: z.number().default(0),
|
|
49
|
+
bottom: z.number().default(0),
|
|
50
|
+
left: z.number().default(0),
|
|
51
|
+
right: z.number().default(0),
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Paragraph model
|
|
55
|
+
*/
|
|
56
|
+
const ParagraphSchema = z.object({
|
|
57
|
+
text: z.string().describe('Text content (can contain basic HTML like <b>, <i>)'),
|
|
58
|
+
alignment: z.enum(['left', 'center', 'right', 'justify']).optional(),
|
|
59
|
+
font: FontSchema.optional(),
|
|
60
|
+
spacing: SpacingSchema.optional(),
|
|
61
|
+
line_height: z.number().optional(),
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* Picture source model
|
|
65
|
+
*/
|
|
66
|
+
const PictureSchema = z.object({
|
|
67
|
+
is_network: z.boolean().default(false).describe('True if path is a URL'),
|
|
68
|
+
path: z.string().describe('Image file path or URL'),
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* Object fit settings for images
|
|
72
|
+
*/
|
|
73
|
+
const ObjectFitSchema = z.object({
|
|
74
|
+
fit: z.enum(['contain', 'cover', 'fill']).optional(),
|
|
75
|
+
focus: z.array(z.number()).optional().describe('Focus point [x%, y%]'),
|
|
76
|
+
});
|
|
77
|
+
/**
|
|
78
|
+
* Text box shape
|
|
79
|
+
*/
|
|
80
|
+
const TextBoxShapeSchema = z.object({
|
|
81
|
+
shape_type: z.literal('textbox').default('textbox'),
|
|
82
|
+
position: PositionSchema,
|
|
83
|
+
paragraphs: z.array(ParagraphSchema).describe('Text paragraphs in the box'),
|
|
84
|
+
margin: SpacingSchema.optional(),
|
|
85
|
+
fill: FillSchema.optional(),
|
|
86
|
+
text_wrap: z.boolean().optional().default(true),
|
|
87
|
+
});
|
|
88
|
+
/**
|
|
89
|
+
* Auto shape (rectangle, rounded rectangle, etc.)
|
|
90
|
+
*/
|
|
91
|
+
const AutoShapeSchema = z.object({
|
|
92
|
+
shape_type: z.literal('autoshape').default('autoshape'),
|
|
93
|
+
autoshape_type: z.string().default('RECTANGLE').describe('Shape type: RECTANGLE, ROUNDED_RECTANGLE, OVAL, etc.'),
|
|
94
|
+
position: PositionSchema,
|
|
95
|
+
paragraphs: z.array(ParagraphSchema).optional(),
|
|
96
|
+
margin: SpacingSchema.optional(),
|
|
97
|
+
fill: FillSchema.optional(),
|
|
98
|
+
border_radius: z.number().optional(),
|
|
99
|
+
});
|
|
100
|
+
/**
|
|
101
|
+
* Picture shape
|
|
102
|
+
*/
|
|
103
|
+
const PictureShapeSchema = z.object({
|
|
104
|
+
shape_type: z.literal('picture').default('picture'),
|
|
105
|
+
position: PositionSchema,
|
|
106
|
+
picture: PictureSchema,
|
|
107
|
+
margin: SpacingSchema.optional(),
|
|
108
|
+
clip: z.boolean().optional().default(true),
|
|
109
|
+
opacity: z.number().optional(),
|
|
110
|
+
shape: z.enum(['rectangle', 'circle']).optional(),
|
|
111
|
+
object_fit: ObjectFitSchema.optional(),
|
|
112
|
+
});
|
|
113
|
+
/**
|
|
114
|
+
* Connector/line shape
|
|
115
|
+
*/
|
|
116
|
+
const ConnectorSchema = z.object({
|
|
117
|
+
shape_type: z.literal('connector').default('connector'),
|
|
118
|
+
connector_type: z.string().default('STRAIGHT').describe('STRAIGHT, ELBOW, CURVE'),
|
|
119
|
+
position: PositionSchema,
|
|
120
|
+
thickness: z.number().optional().default(0.5),
|
|
121
|
+
color: z.string().optional().default('000000'),
|
|
122
|
+
});
|
|
123
|
+
/**
|
|
124
|
+
* Union of all shape types
|
|
125
|
+
*/
|
|
126
|
+
const ShapeSchema = z.discriminatedUnion('shape_type', [
|
|
127
|
+
TextBoxShapeSchema,
|
|
128
|
+
AutoShapeSchema,
|
|
129
|
+
PictureShapeSchema,
|
|
130
|
+
ConnectorSchema,
|
|
131
|
+
]);
|
|
132
|
+
/**
|
|
133
|
+
* Slide model
|
|
134
|
+
*/
|
|
135
|
+
const SlideSchema = z.object({
|
|
136
|
+
background: FillSchema.optional().describe('Slide background color'),
|
|
137
|
+
note: z.string().optional().describe('Speaker notes for this slide'),
|
|
138
|
+
shapes: z.array(ShapeSchema).describe('Shapes on this slide'),
|
|
139
|
+
});
|
|
140
|
+
/**
|
|
141
|
+
* Brand settings for consistent theming
|
|
142
|
+
*/
|
|
143
|
+
const BrandSettingsSchema = z.object({
|
|
144
|
+
primary_color: z.string().default('000033').describe('Primary brand color'),
|
|
145
|
+
secondary_color: z.string().default('666666').describe('Secondary color'),
|
|
146
|
+
accent_color: z.string().default('0066CC').describe('Accent color'),
|
|
147
|
+
background_color: z.string().default('FFFFFF').describe('Background color'),
|
|
148
|
+
font_heading: z.string().default('Arial').describe('Heading font'),
|
|
149
|
+
font_body: z.string().default('Arial').describe('Body font'),
|
|
150
|
+
logo_url: z.string().optional().describe('Company logo URL'),
|
|
151
|
+
company_name: z.string().optional().describe('Company name'),
|
|
152
|
+
chart_colors: z.array(z.string()).optional().describe('Chart color palette'),
|
|
153
|
+
});
|
|
154
|
+
/**
|
|
155
|
+
* Full presentation model
|
|
156
|
+
*/
|
|
157
|
+
const PresentationSchema = z.object({
|
|
158
|
+
name: z.string().optional().describe('Presentation name'),
|
|
159
|
+
width: z.number().default(1280).describe('Slide width in points'),
|
|
160
|
+
height: z.number().default(720).describe('Slide height in points'),
|
|
161
|
+
slides: z.array(SlideSchema).describe('Array of slides'),
|
|
162
|
+
shapes: z.array(ShapeSchema).optional().describe('Global shapes (on all slides)'),
|
|
163
|
+
});
|
|
164
|
+
/**
|
|
165
|
+
* Main tool input schema
|
|
166
|
+
*/
|
|
167
|
+
const CreatePresentationToolSchema = z.object({
|
|
168
|
+
presentation: PresentationSchema.describe('The complete presentation structure with slides and shapes'),
|
|
169
|
+
brand: BrandSettingsSchema.optional().describe('Brand settings for consistent theming'),
|
|
170
|
+
});
|
|
171
|
+
// =============================================================================
|
|
172
|
+
// TOOL CREATION
|
|
173
|
+
// =============================================================================
|
|
174
|
+
/**
|
|
175
|
+
* Creates a presentation generation tool for LangChain agents.
|
|
176
|
+
*
|
|
177
|
+
* This tool allows agents to create PowerPoint presentations by providing
|
|
178
|
+
* structured slide data. The presentation is generated by the code-executor
|
|
179
|
+
* service and returned as a downloadable file.
|
|
180
|
+
*
|
|
181
|
+
* Architecture notes:
|
|
182
|
+
* - Charts and complex visualizations should be rendered as images on the client
|
|
183
|
+
* - The tool accepts image URLs/paths for chart/table screenshots
|
|
184
|
+
* - Text boxes, shapes, and images are supported as native PPTX elements
|
|
185
|
+
*/
|
|
186
|
+
function createPresentationTool(params = {}) {
|
|
187
|
+
const apiKey = params[EnvVar.CODE_API_KEY] ??
|
|
188
|
+
params.apiKey ??
|
|
189
|
+
getEnvironmentVariable(EnvVar.CODE_API_KEY) ??
|
|
190
|
+
'';
|
|
191
|
+
if (!apiKey) {
|
|
192
|
+
throw new Error('No API key provided for presentation tool.');
|
|
193
|
+
}
|
|
194
|
+
const description = `
|
|
195
|
+
Create a PowerPoint presentation from structured slide data.
|
|
196
|
+
|
|
197
|
+
USE THIS TOOL WHEN:
|
|
198
|
+
- User asks for a PowerPoint, PPTX, or presentation file
|
|
199
|
+
- User wants to export content as a presentation
|
|
200
|
+
|
|
201
|
+
SLIDE STRUCTURE:
|
|
202
|
+
Each slide contains shapes: textbox, autoshape, picture, connector.
|
|
203
|
+
- textbox: Text with paragraphs and formatting
|
|
204
|
+
- autoshape: Colored shapes (rectangles, rounded rectangles) with optional text
|
|
205
|
+
- picture: Images from URLs or file paths
|
|
206
|
+
- connector: Lines and connectors
|
|
207
|
+
|
|
208
|
+
STANDARD SLIDE DIMENSIONS:
|
|
209
|
+
- Width: 1280 points (13.33 inches)
|
|
210
|
+
- Height: 720 points (7.5 inches)
|
|
211
|
+
|
|
212
|
+
LAYOUT TIPS:
|
|
213
|
+
- Title: position ~{left: 80, top: 40, width: 1120, height: 80}
|
|
214
|
+
- Content area: position ~{left: 80, top: 140, width: 1120, height: 520}
|
|
215
|
+
- Leave margins of ~80 points on sides
|
|
216
|
+
|
|
217
|
+
NOTES:
|
|
218
|
+
- Charts/tables should be rendered as images and included via picture shapes
|
|
219
|
+
- Use brand settings for consistent theming across slides
|
|
220
|
+
- Generated file is auto-delivered to the user (no download links needed)
|
|
221
|
+
`.trim();
|
|
222
|
+
return tool(async ({ presentation, brand }, config) => {
|
|
223
|
+
const { session_id } = (config.toolCall ?? {});
|
|
224
|
+
const requestBody = {
|
|
225
|
+
presentation,
|
|
226
|
+
brand,
|
|
227
|
+
session_id,
|
|
228
|
+
};
|
|
229
|
+
try {
|
|
230
|
+
const fetchOptions = {
|
|
231
|
+
method: 'POST',
|
|
232
|
+
headers: {
|
|
233
|
+
'Content-Type': 'application/json',
|
|
234
|
+
'User-Agent': 'Ranger/1.0',
|
|
235
|
+
'X-API-Key': apiKey,
|
|
236
|
+
},
|
|
237
|
+
body: JSON.stringify(requestBody),
|
|
238
|
+
};
|
|
239
|
+
if (process.env.PROXY != null && process.env.PROXY !== '') {
|
|
240
|
+
fetchOptions.agent = new HttpsProxyAgent(process.env.PROXY);
|
|
241
|
+
}
|
|
242
|
+
const response = await fetch(PRESENTATIONS_ENDPOINT, fetchOptions);
|
|
243
|
+
if (!response.ok) {
|
|
244
|
+
const errorText = await response.text();
|
|
245
|
+
throw new Error(`Presentation creation failed: ${response.status} - ${errorText}`);
|
|
246
|
+
}
|
|
247
|
+
const result = await response.json();
|
|
248
|
+
if (!result.success) {
|
|
249
|
+
throw new Error(`Presentation creation failed: ${result.message}`);
|
|
250
|
+
}
|
|
251
|
+
const slideCount = presentation.slides.length;
|
|
252
|
+
const formattedOutput = `
|
|
253
|
+
Presentation created successfully!
|
|
254
|
+
- Slides: ${slideCount}
|
|
255
|
+
- File ID: ${result.file_id}
|
|
256
|
+
- Filename: ${result.filename}
|
|
257
|
+
|
|
258
|
+
The PowerPoint file is ready for download.
|
|
259
|
+
`.trim();
|
|
260
|
+
// Return content and artifact (like code executor)
|
|
261
|
+
// The artifact contains file info for client-side handling
|
|
262
|
+
return [
|
|
263
|
+
formattedOutput,
|
|
264
|
+
{
|
|
265
|
+
session_id: result.session_id,
|
|
266
|
+
file_id: result.file_id,
|
|
267
|
+
filename: result.filename,
|
|
268
|
+
type: 'presentation',
|
|
269
|
+
files: [{
|
|
270
|
+
id: result.file_id,
|
|
271
|
+
name: result.filename,
|
|
272
|
+
}],
|
|
273
|
+
},
|
|
274
|
+
];
|
|
275
|
+
}
|
|
276
|
+
catch (error) {
|
|
277
|
+
throw new Error(`Presentation creation error:\n\n${error?.message}`);
|
|
278
|
+
}
|
|
279
|
+
}, {
|
|
280
|
+
name: Constants.CREATE_PRESENTATION,
|
|
281
|
+
description,
|
|
282
|
+
schema: CreatePresentationToolSchema,
|
|
283
|
+
responseFormat: Constants.CONTENT_AND_ARTIFACT,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export { CreatePresentationToolSchema, createPresentationTool };
|
|
288
|
+
//# sourceMappingURL=PresentationTool.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PresentationTool.mjs","sources":["../../../src/tools/PresentationTool.ts"],"sourcesContent":["import { z } from 'zod';\r\nimport { config } from 'dotenv';\r\nimport fetch, { RequestInit } from 'node-fetch';\r\nimport { HttpsProxyAgent } from 'https-proxy-agent';\r\nimport { tool, DynamicStructuredTool } from '@langchain/core/tools';\r\nimport { getEnvironmentVariable } from '@langchain/core/utils/env';\r\nimport type * as t from '@/types';\r\nimport { EnvVar, Constants } from '@/common';\r\nimport { getCodeBaseURL } from './CodeExecutor';\r\n\r\nconfig();\r\n\r\n// =============================================================================\r\n// PRESENTATION TOOL CONSTANTS\r\n// =============================================================================\r\n\r\nconst PRESENTATIONS_ENDPOINT = `${getCodeBaseURL()}/presentations/create`;\r\n\r\n// =============================================================================\r\n// SCHEMA DEFINITIONS\r\n// =============================================================================\r\n\r\n/**\r\n * Position and size model (matches code-executor PptxPositionModel)\r\n */\r\nconst PositionSchema = z.object({\r\n left: z.number().describe('Left position in points'),\r\n top: z.number().describe('Top position in points'),\r\n width: z.number().describe('Width in points'),\r\n height: z.number().describe('Height in points'),\r\n});\r\n\r\n/**\r\n * Font styling model\r\n */\r\nconst FontSchema = z.object({\r\n name: z.string().default('Arial').describe('Font family name'),\r\n size: z.number().default(16).describe('Font size in points'),\r\n italic: z.boolean().optional().describe('Italic text'),\r\n color: z.string().default('000000').describe('Hex color without #'),\r\n font_weight: z.number().optional().default(400).describe('400 = normal, 600+ = bold'),\r\n});\r\n\r\n/**\r\n * Fill/background color model\r\n */\r\nconst FillSchema = z.object({\r\n color: z.string().describe('Hex color without #'),\r\n opacity: z.number().optional().default(1.0),\r\n});\r\n\r\n/**\r\n * Spacing/margin model\r\n */\r\nconst SpacingSchema = z.object({\r\n top: z.number().default(0),\r\n bottom: z.number().default(0),\r\n left: z.number().default(0),\r\n right: z.number().default(0),\r\n});\r\n\r\n/**\r\n * Paragraph model\r\n */\r\nconst ParagraphSchema = z.object({\r\n text: z.string().describe('Text content (can contain basic HTML like <b>, <i>)'),\r\n alignment: z.enum(['left', 'center', 'right', 'justify']).optional(),\r\n font: FontSchema.optional(),\r\n spacing: SpacingSchema.optional(),\r\n line_height: z.number().optional(),\r\n});\r\n\r\n/**\r\n * Picture source model\r\n */\r\nconst PictureSchema = z.object({\r\n is_network: z.boolean().default(false).describe('True if path is a URL'),\r\n path: z.string().describe('Image file path or URL'),\r\n});\r\n\r\n/**\r\n * Object fit settings for images\r\n */\r\nconst ObjectFitSchema = z.object({\r\n fit: z.enum(['contain', 'cover', 'fill']).optional(),\r\n focus: z.array(z.number()).optional().describe('Focus point [x%, y%]'),\r\n});\r\n\r\n/**\r\n * Text box shape\r\n */\r\nconst TextBoxShapeSchema = z.object({\r\n shape_type: z.literal('textbox').default('textbox'),\r\n position: PositionSchema,\r\n paragraphs: z.array(ParagraphSchema).describe('Text paragraphs in the box'),\r\n margin: SpacingSchema.optional(),\r\n fill: FillSchema.optional(),\r\n text_wrap: z.boolean().optional().default(true),\r\n});\r\n\r\n/**\r\n * Auto shape (rectangle, rounded rectangle, etc.)\r\n */\r\nconst AutoShapeSchema = z.object({\r\n shape_type: z.literal('autoshape').default('autoshape'),\r\n autoshape_type: z.string().default('RECTANGLE').describe('Shape type: RECTANGLE, ROUNDED_RECTANGLE, OVAL, etc.'),\r\n position: PositionSchema,\r\n paragraphs: z.array(ParagraphSchema).optional(),\r\n margin: SpacingSchema.optional(),\r\n fill: FillSchema.optional(),\r\n border_radius: z.number().optional(),\r\n});\r\n\r\n/**\r\n * Picture shape\r\n */\r\nconst PictureShapeSchema = z.object({\r\n shape_type: z.literal('picture').default('picture'),\r\n position: PositionSchema,\r\n picture: PictureSchema,\r\n margin: SpacingSchema.optional(),\r\n clip: z.boolean().optional().default(true),\r\n opacity: z.number().optional(),\r\n shape: z.enum(['rectangle', 'circle']).optional(),\r\n object_fit: ObjectFitSchema.optional(),\r\n});\r\n\r\n/**\r\n * Connector/line shape\r\n */\r\nconst ConnectorSchema = z.object({\r\n shape_type: z.literal('connector').default('connector'),\r\n connector_type: z.string().default('STRAIGHT').describe('STRAIGHT, ELBOW, CURVE'),\r\n position: PositionSchema,\r\n thickness: z.number().optional().default(0.5),\r\n color: z.string().optional().default('000000'),\r\n});\r\n\r\n/**\r\n * Union of all shape types\r\n */\r\nconst ShapeSchema = z.discriminatedUnion('shape_type', [\r\n TextBoxShapeSchema,\r\n AutoShapeSchema,\r\n PictureShapeSchema,\r\n ConnectorSchema,\r\n]);\r\n\r\n/**\r\n * Slide model\r\n */\r\nconst SlideSchema = z.object({\r\n background: FillSchema.optional().describe('Slide background color'),\r\n note: z.string().optional().describe('Speaker notes for this slide'),\r\n shapes: z.array(ShapeSchema).describe('Shapes on this slide'),\r\n});\r\n\r\n/**\r\n * Brand settings for consistent theming\r\n */\r\nconst BrandSettingsSchema = z.object({\r\n primary_color: z.string().default('000033').describe('Primary brand color'),\r\n secondary_color: z.string().default('666666').describe('Secondary color'),\r\n accent_color: z.string().default('0066CC').describe('Accent color'),\r\n background_color: z.string().default('FFFFFF').describe('Background color'),\r\n font_heading: z.string().default('Arial').describe('Heading font'),\r\n font_body: z.string().default('Arial').describe('Body font'),\r\n logo_url: z.string().optional().describe('Company logo URL'),\r\n company_name: z.string().optional().describe('Company name'),\r\n chart_colors: z.array(z.string()).optional().describe('Chart color palette'),\r\n});\r\n\r\n/**\r\n * Full presentation model\r\n */\r\nconst PresentationSchema = z.object({\r\n name: z.string().optional().describe('Presentation name'),\r\n width: z.number().default(1280).describe('Slide width in points'),\r\n height: z.number().default(720).describe('Slide height in points'),\r\n slides: z.array(SlideSchema).describe('Array of slides'),\r\n shapes: z.array(ShapeSchema).optional().describe('Global shapes (on all slides)'),\r\n});\r\n\r\n/**\r\n * Main tool input schema\r\n */\r\nconst CreatePresentationToolSchema = z.object({\r\n presentation: PresentationSchema.describe(\r\n 'The complete presentation structure with slides and shapes'\r\n ),\r\n brand: BrandSettingsSchema.optional().describe(\r\n 'Brand settings for consistent theming'\r\n ),\r\n});\r\n\r\n// =============================================================================\r\n// RESPONSE TYPES\r\n// =============================================================================\r\n\r\ninterface CreatePresentationResult {\r\n success: boolean;\r\n file_id: string;\r\n filename: string;\r\n session_id: string;\r\n message?: string;\r\n}\r\n\r\n// =============================================================================\r\n// TOOL PARAMETERS\r\n// =============================================================================\r\n\r\nexport interface PresentationToolParams {\r\n apiKey?: string;\r\n [EnvVar.CODE_API_KEY]?: string;\r\n user_id?: string;\r\n}\r\n\r\n// =============================================================================\r\n// TOOL CREATION\r\n// =============================================================================\r\n\r\n/**\r\n * Creates a presentation generation tool for LangChain agents.\r\n * \r\n * This tool allows agents to create PowerPoint presentations by providing\r\n * structured slide data. The presentation is generated by the code-executor\r\n * service and returned as a downloadable file.\r\n * \r\n * Architecture notes:\r\n * - Charts and complex visualizations should be rendered as images on the client\r\n * - The tool accepts image URLs/paths for chart/table screenshots\r\n * - Text boxes, shapes, and images are supported as native PPTX elements\r\n */\r\nfunction createPresentationTool(\r\n params: PresentationToolParams = {}\r\n): DynamicStructuredTool<typeof CreatePresentationToolSchema> {\r\n const apiKey =\r\n params[EnvVar.CODE_API_KEY] ??\r\n params.apiKey ??\r\n getEnvironmentVariable(EnvVar.CODE_API_KEY) ??\r\n '';\r\n \r\n if (!apiKey) {\r\n throw new Error('No API key provided for presentation tool.');\r\n }\r\n\r\n const description = `\r\nCreate a PowerPoint presentation from structured slide data.\r\n\r\nUSE THIS TOOL WHEN:\r\n- User asks for a PowerPoint, PPTX, or presentation file\r\n- User wants to export content as a presentation\r\n\r\nSLIDE STRUCTURE:\r\nEach slide contains shapes: textbox, autoshape, picture, connector.\r\n- textbox: Text with paragraphs and formatting\r\n- autoshape: Colored shapes (rectangles, rounded rectangles) with optional text\r\n- picture: Images from URLs or file paths\r\n- connector: Lines and connectors\r\n\r\nSTANDARD SLIDE DIMENSIONS:\r\n- Width: 1280 points (13.33 inches)\r\n- Height: 720 points (7.5 inches)\r\n\r\nLAYOUT TIPS:\r\n- Title: position ~{left: 80, top: 40, width: 1120, height: 80}\r\n- Content area: position ~{left: 80, top: 140, width: 1120, height: 520}\r\n- Leave margins of ~80 points on sides\r\n\r\nNOTES:\r\n- Charts/tables should be rendered as images and included via picture shapes\r\n- Use brand settings for consistent theming across slides\r\n- Generated file is auto-delivered to the user (no download links needed)\r\n`.trim();\r\n\r\n return tool<typeof CreatePresentationToolSchema>(\r\n async ({ presentation, brand }, config) => {\r\n const { session_id } = (config.toolCall ?? {}) as {\r\n session_id?: string;\r\n };\r\n\r\n const requestBody = {\r\n presentation,\r\n brand,\r\n session_id,\r\n };\r\n\r\n try {\r\n const fetchOptions: RequestInit = {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'User-Agent': 'Ranger/1.0',\r\n 'X-API-Key': apiKey,\r\n },\r\n body: JSON.stringify(requestBody),\r\n };\r\n\r\n if (process.env.PROXY != null && process.env.PROXY !== '') {\r\n fetchOptions.agent = new HttpsProxyAgent(process.env.PROXY);\r\n }\r\n\r\n const response = await fetch(PRESENTATIONS_ENDPOINT, fetchOptions);\r\n \r\n if (!response.ok) {\r\n const errorText = await response.text();\r\n throw new Error(`Presentation creation failed: ${response.status} - ${errorText}`);\r\n }\r\n\r\n const result: CreatePresentationResult = await response.json();\r\n \r\n if (!result.success) {\r\n throw new Error(`Presentation creation failed: ${result.message}`);\r\n }\r\n\r\n const slideCount = presentation.slides.length;\r\n const formattedOutput = `\r\nPresentation created successfully!\r\n- Slides: ${slideCount}\r\n- File ID: ${result.file_id}\r\n- Filename: ${result.filename}\r\n\r\nThe PowerPoint file is ready for download.\r\n`.trim();\r\n\r\n // Return content and artifact (like code executor)\r\n // The artifact contains file info for client-side handling\r\n return [\r\n formattedOutput,\r\n {\r\n session_id: result.session_id,\r\n file_id: result.file_id,\r\n filename: result.filename,\r\n type: 'presentation',\r\n files: [{\r\n id: result.file_id,\r\n name: result.filename,\r\n }],\r\n },\r\n ];\r\n } catch (error) {\r\n throw new Error(\r\n `Presentation creation error:\\n\\n${(error as Error | undefined)?.message}`\r\n );\r\n }\r\n },\r\n {\r\n name: Constants.CREATE_PRESENTATION,\r\n description,\r\n schema: CreatePresentationToolSchema,\r\n responseFormat: Constants.CONTENT_AND_ARTIFACT,\r\n }\r\n );\r\n}\r\n\r\nexport { createPresentationTool, CreatePresentationToolSchema };\r\n"],"names":[],"mappings":";;;;;;;;;AAUA,MAAM,EAAE;AAER;AACA;AACA;AAEA,MAAM,sBAAsB,GAAG,CAAA,EAAG,cAAc,EAAE,uBAAuB;AAEzE;AACA;AACA;AAEA;;AAEG;AACH,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IACpD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IAClD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IAC7C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;AAChD,CAAA,CAAC;AAEF;;AAEG;AACH,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;AAC1B,IAAA,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC;AAC9D,IAAA,IAAI,EAAE,CAAC,CAAC,MAAM,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AC,OAAO;oBACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;AACzB,oBAAA,IAAI,EAAE,cAAc;AACpB,oBAAA,KAAK,EAAE,CAAC;4BACN,EAAE,EAAE,MAAM,CAAC,OAAO;4BAClB,IAAI,EAAE,MAAM,CAAC,QAAQ;yBACtB,CAAC;AACH,iBAAA;aACF;;QACD,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CACb,CAAA,gCAAA,EAAoC,KAA2B,EAAE,OAAO,CAAE,CAAA,CAC3E;;AAEL,KAAC,EACD;QACE,IAAI,EAAE,SAAS,CAAC,mBAAmB;QACnC,WAAW;AACX,QAAA,MAAM,EAAE,4BAA4B;QACpC,cAAc,EAAE,SAAS,CAAC,oBAAoB;AAC/C,KAAA,CACF;AACH;;;;"}
|
|
@@ -118,6 +118,7 @@ export declare enum Callback {
|
|
|
118
118
|
export declare enum Constants {
|
|
119
119
|
OFFICIAL_CODE_BASEURL = "https://api.illuma.ai/v1",
|
|
120
120
|
EXECUTE_CODE = "execute_code",
|
|
121
|
+
CREATE_PRESENTATION = "create_presentation",
|
|
121
122
|
TOOL_SEARCH = "tool_search",
|
|
122
123
|
PROGRAMMATIC_TOOL_CALLING = "run_tools_with_code",
|
|
123
124
|
WEB_SEARCH = "web_search",
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export * from './messages';
|
|
|
6
6
|
export * from './graphs';
|
|
7
7
|
export * from './tools/Calculator';
|
|
8
8
|
export * from './tools/CodeExecutor';
|
|
9
|
+
export * from './tools/PresentationTool';
|
|
9
10
|
export * from './tools/BrowserTools';
|
|
10
|
-
export * from './tools/DesktopTools';
|
|
11
11
|
export * from './tools/ProgrammaticToolCalling';
|
|
12
12
|
export * from './tools/ToolSearch';
|
|
13
13
|
export * from './tools/handlers';
|