@norskvideo/norsk-studio-alpha 1.27.0-2026-02-01-68c1474f → 1.27.0-2026-02-02-24ae15e8
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/client/info.js +145 -11
- package/lib/info.js +3 -1
- package/lib/info.js.map +1 -1
- package/lib/util.openaiAgent/_gen/schema.d.ts +17 -0
- package/lib/util.openaiAgent/_gen/schema.js +21 -0
- package/lib/util.openaiAgent/_gen/schema.js.map +1 -0
- package/lib/util.openaiAgent/_gen/types.d.ts +370 -0
- package/lib/util.openaiAgent/_gen/types.js +3 -0
- package/lib/util.openaiAgent/_gen/types.js.map +1 -0
- package/lib/util.openaiAgent/_gen/zod.d.ts +2 -0
- package/lib/util.openaiAgent/_gen/zod.js +147 -0
- package/lib/util.openaiAgent/_gen/zod.js.map +1 -0
- package/lib/util.openaiAgent/info.d.ts +63 -0
- package/lib/util.openaiAgent/info.js +133 -0
- package/lib/util.openaiAgent/info.js.map +1 -0
- package/lib/util.openaiAgent/runtime.d.ts +103 -0
- package/lib/util.openaiAgent/runtime.js +545 -0
- package/lib/util.openaiAgent/runtime.js.map +1 -0
- package/lib/util.openaiAgent/types.yaml +392 -0
- package/package.json +5 -4
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const runtime_types_1 = require("@norskvideo/norsk-studio/lib/extension/runtime-types");
|
|
7
|
+
const config_1 = __importDefault(require("@norskvideo/norsk-studio/lib/server/config"));
|
|
8
|
+
const api_1 = require("@norskvideo/norsk-studio/lib/server/api");
|
|
9
|
+
const logging_1 = require("@norskvideo/norsk-studio/lib/server/logging");
|
|
10
|
+
const api_validation_1 = require("@norskvideo/norsk-studio/lib/server/api-validation");
|
|
11
|
+
const agent_1 = require("@norskvideo/norsk-studio-built-ins/lib/shared/agent");
|
|
12
|
+
const agents_1 = require("@openai/agents");
|
|
13
|
+
const zod_1 = require("zod");
|
|
14
|
+
const schema_1 = require("./_gen/schema");
|
|
15
|
+
const path_1 = __importDefault(require("path"));
|
|
16
|
+
class OpenAIAgentDefinition {
|
|
17
|
+
async schemas() {
|
|
18
|
+
return (0, runtime_types_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), {
|
|
19
|
+
config: 'OpenAIAgentConfig',
|
|
20
|
+
state: 'State',
|
|
21
|
+
commands: 'Commands',
|
|
22
|
+
events: 'Events'
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async create(norsk, cfg, cb, runtime) {
|
|
26
|
+
const node = await OpenAIAgentNode.create(norsk, cfg, runtime);
|
|
27
|
+
cb(node);
|
|
28
|
+
}
|
|
29
|
+
handleCommand(node, command) {
|
|
30
|
+
node.handleCommand(command);
|
|
31
|
+
}
|
|
32
|
+
async instanceRoutes() {
|
|
33
|
+
return (0, api_1.defineJsonApi)(path_1.default.join(__dirname, 'types.yaml'), {
|
|
34
|
+
'/invocations': {
|
|
35
|
+
get: ({ node }) => ({
|
|
36
|
+
swt: api_validation_1.NoBody,
|
|
37
|
+
handler: async () => {
|
|
38
|
+
const invocations = node.invocationTracker.getHistory();
|
|
39
|
+
return { statusCode: 200, body: invocations };
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
},
|
|
43
|
+
'/timers': {
|
|
44
|
+
get: ({ node }) => ({
|
|
45
|
+
swt: api_validation_1.NoBody,
|
|
46
|
+
handler: async () => {
|
|
47
|
+
const timers = node.timerManager.getActiveTimers();
|
|
48
|
+
return { statusCode: 200, body: timers };
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
},
|
|
52
|
+
'/subscriptions': {
|
|
53
|
+
get: ({ node }) => ({
|
|
54
|
+
swt: api_validation_1.NoBody,
|
|
55
|
+
handler: async () => {
|
|
56
|
+
const subscriptions = node.eventManager.getActiveSubscriptions();
|
|
57
|
+
return { statusCode: 200, body: subscriptions };
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
},
|
|
61
|
+
'/memory': {
|
|
62
|
+
get: ({ node }) => ({
|
|
63
|
+
swt: api_validation_1.NoBody,
|
|
64
|
+
handler: async () => {
|
|
65
|
+
const memory = node.memoryManager.getAll();
|
|
66
|
+
return { statusCode: 200, body: memory };
|
|
67
|
+
}
|
|
68
|
+
}),
|
|
69
|
+
delete: ({ node }) => ({
|
|
70
|
+
swt: api_validation_1.NoBody,
|
|
71
|
+
handler: async () => {
|
|
72
|
+
node.memoryManager.clear();
|
|
73
|
+
return { statusCode: 204 };
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
},
|
|
77
|
+
'/prompt': {
|
|
78
|
+
post: ({ node }) => ({
|
|
79
|
+
swt: schema_1.SendPromptBody,
|
|
80
|
+
handler: async (req) => {
|
|
81
|
+
const invocationId = await node.invokeAgent(req.body.prompt, {
|
|
82
|
+
type: 'user_command',
|
|
83
|
+
source: 'api'
|
|
84
|
+
});
|
|
85
|
+
return { statusCode: 200, body: { invocationId } };
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.default = OpenAIAgentDefinition;
|
|
93
|
+
class OpenAIAgentNode {
|
|
94
|
+
id;
|
|
95
|
+
relatedMediaNodes = new runtime_types_1.RelatedMediaNodes();
|
|
96
|
+
norsk;
|
|
97
|
+
cfg;
|
|
98
|
+
runtime;
|
|
99
|
+
invocationTracker;
|
|
100
|
+
timerManager;
|
|
101
|
+
memoryManager;
|
|
102
|
+
eventManager;
|
|
103
|
+
agent;
|
|
104
|
+
conversationHistory = [];
|
|
105
|
+
invocationLock = false;
|
|
106
|
+
currentTriggerType = 'user_command';
|
|
107
|
+
currentTriggerSource;
|
|
108
|
+
runtimeToolsAdded = false;
|
|
109
|
+
constructor(norsk, cfg, runtime) {
|
|
110
|
+
this.id = cfg.id;
|
|
111
|
+
this.norsk = norsk;
|
|
112
|
+
this.cfg = cfg;
|
|
113
|
+
this.runtime = runtime;
|
|
114
|
+
this.invocationTracker = new agent_1.InvocationTracker({ maxHistory: 100 });
|
|
115
|
+
this.memoryManager = new agent_1.MemoryManager();
|
|
116
|
+
this.timerManager = new agent_1.TimerManager({
|
|
117
|
+
onTimerFired: async (timerId, reason) => {
|
|
118
|
+
this.runtime.updates.raiseEvent({
|
|
119
|
+
type: 'timer_fired',
|
|
120
|
+
timerId,
|
|
121
|
+
reason
|
|
122
|
+
});
|
|
123
|
+
await this.invokeAgent(`Timer fired. Reason: ${reason}`, {
|
|
124
|
+
type: 'timer',
|
|
125
|
+
source: timerId,
|
|
126
|
+
details: { reason }
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
this.eventManager = new agent_1.EventSubscriptionManager({
|
|
131
|
+
onEvent: async (componentId, event) => {
|
|
132
|
+
await this.invokeAgent(`Event from component '${componentId}': ${JSON.stringify(event)}`, {
|
|
133
|
+
type: 'component_event',
|
|
134
|
+
source: componentId,
|
|
135
|
+
details: { event }
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
subscribe: (componentId, handler) => {
|
|
139
|
+
runtime.shared.subscribeToComponentEvents(componentId, handler);
|
|
140
|
+
},
|
|
141
|
+
unsubscribe: (componentId, handler) => {
|
|
142
|
+
runtime.shared.unsubscribeToComponentEvents(componentId, handler);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
static async create(norsk, cfg, runtime) {
|
|
147
|
+
const node = new OpenAIAgentNode(norsk, cfg, runtime);
|
|
148
|
+
await node.initialise();
|
|
149
|
+
return node;
|
|
150
|
+
}
|
|
151
|
+
async initialise() {
|
|
152
|
+
this.runtime.updates.update({
|
|
153
|
+
status: 'idle',
|
|
154
|
+
activeTimerCount: 0,
|
|
155
|
+
activeSubscriptionCount: 0,
|
|
156
|
+
invocationCount: 0,
|
|
157
|
+
});
|
|
158
|
+
const apiKey = config_1.default.llm.openai?.apiKey?.();
|
|
159
|
+
if (!apiKey) {
|
|
160
|
+
(0, logging_1.errorlog)("No OpenAI API key configured", { agentId: this.cfg.id });
|
|
161
|
+
this.runtime.updates.update({
|
|
162
|
+
status: 'error',
|
|
163
|
+
errorMessage: 'No OpenAI API key configured'
|
|
164
|
+
});
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
process.env.OPENAI_API_KEY = apiKey;
|
|
168
|
+
void this.waitForToolsAndStart();
|
|
169
|
+
}
|
|
170
|
+
async waitForToolsAndStart() {
|
|
171
|
+
(0, logging_1.debuglog)("Waiting for runtime tools to be available", { agentId: this.cfg.id });
|
|
172
|
+
await this.runtime.llm.waitForTools();
|
|
173
|
+
this.runtimeToolsAdded = true;
|
|
174
|
+
this.createAgent();
|
|
175
|
+
if (this.cfg.initialPrompt) {
|
|
176
|
+
(0, logging_1.debuglog)("Running initial prompt", { agentId: this.cfg.id });
|
|
177
|
+
await this.invokeAgent(this.cfg.initialPrompt, {
|
|
178
|
+
type: 'user_command',
|
|
179
|
+
source: 'initial'
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
createAgent() {
|
|
184
|
+
const tools = this.buildTools();
|
|
185
|
+
const instructions = `${this.cfg.systemPrompt}
|
|
186
|
+
|
|
187
|
+
Your mission: ${this.cfg.mission}
|
|
188
|
+
|
|
189
|
+
When you receive events or timer notifications, evaluate them against your mission
|
|
190
|
+
and take appropriate action. Use tools to interact with the workflow.
|
|
191
|
+
|
|
192
|
+
Available capabilities:
|
|
193
|
+
- Set timers for scheduled checks (use set_timer)
|
|
194
|
+
- Subscribe to component events (use subscribe_to_events)
|
|
195
|
+
- Store/recall information in working memory (use store_memory/recall_memory)
|
|
196
|
+
- Interact with workflow components via runtime tools
|
|
197
|
+
|
|
198
|
+
To get current context:
|
|
199
|
+
- Use recall_memory to check stored information
|
|
200
|
+
- Use get_active_timers to see pending timers
|
|
201
|
+
- Use get_subscriptions to see active event subscriptions`;
|
|
202
|
+
this.agent = new agents_1.Agent({
|
|
203
|
+
name: `workflow_agent_${this.cfg.id}`,
|
|
204
|
+
model: this.cfg.model || 'gpt-4o',
|
|
205
|
+
instructions,
|
|
206
|
+
tools,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
buildTools() {
|
|
210
|
+
const tools = [];
|
|
211
|
+
tools.push((0, agents_1.tool)({
|
|
212
|
+
name: 'set_timer',
|
|
213
|
+
description: 'Schedule a future invocation. You will be notified when the timer fires. Use intervalMs to create a recurring timer that auto-reschedules.',
|
|
214
|
+
parameters: zod_1.z.object({
|
|
215
|
+
delayMs: zod_1.z.number().describe('Delay in milliseconds before first fire'),
|
|
216
|
+
reason: zod_1.z.string().describe('Why this timer is being set - included when it fires'),
|
|
217
|
+
intervalMs: zod_1.z.number().optional().describe('If set, timer will automatically reschedule at this interval after each fire')
|
|
218
|
+
}),
|
|
219
|
+
execute: async ({ delayMs, reason, intervalMs }) => {
|
|
220
|
+
const timerId = this.timerManager.setTimer(delayMs, reason, intervalMs);
|
|
221
|
+
if (!timerId) {
|
|
222
|
+
return JSON.stringify({ status: 'error', error: 'Max timers reached' });
|
|
223
|
+
}
|
|
224
|
+
this.runtime.updates.raiseEvent({
|
|
225
|
+
type: 'timer_set',
|
|
226
|
+
timerId,
|
|
227
|
+
delayMs,
|
|
228
|
+
reason,
|
|
229
|
+
intervalMs
|
|
230
|
+
});
|
|
231
|
+
this.runtime.updates.update({
|
|
232
|
+
activeTimerCount: this.timerManager.getCount()
|
|
233
|
+
});
|
|
234
|
+
const response = { status: 'scheduled', timerId, firesIn: `${delayMs}ms` };
|
|
235
|
+
if (intervalMs) {
|
|
236
|
+
response.recurring = true;
|
|
237
|
+
response.interval = `${intervalMs}ms`;
|
|
238
|
+
}
|
|
239
|
+
return JSON.stringify(response);
|
|
240
|
+
}
|
|
241
|
+
}));
|
|
242
|
+
tools.push((0, agents_1.tool)({
|
|
243
|
+
name: 'cancel_timer',
|
|
244
|
+
description: 'Cancel a previously set timer.',
|
|
245
|
+
parameters: zod_1.z.object({
|
|
246
|
+
timerId: zod_1.z.string().describe('ID of the timer to cancel')
|
|
247
|
+
}),
|
|
248
|
+
execute: async ({ timerId }) => {
|
|
249
|
+
const cancelled = this.timerManager.cancelTimer(timerId);
|
|
250
|
+
if (cancelled) {
|
|
251
|
+
this.runtime.updates.raiseEvent({
|
|
252
|
+
type: 'timer_cancelled',
|
|
253
|
+
timerId
|
|
254
|
+
});
|
|
255
|
+
this.runtime.updates.update({
|
|
256
|
+
activeTimerCount: this.timerManager.getCount()
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
return JSON.stringify({ status: cancelled ? 'cancelled' : 'not_found', timerId });
|
|
260
|
+
}
|
|
261
|
+
}));
|
|
262
|
+
tools.push((0, agents_1.tool)({
|
|
263
|
+
name: 'get_active_timers',
|
|
264
|
+
description: 'Get list of currently active timers.',
|
|
265
|
+
parameters: zod_1.z.object({}),
|
|
266
|
+
execute: async () => {
|
|
267
|
+
const timers = this.timerManager.getActiveTimers();
|
|
268
|
+
return JSON.stringify(timers);
|
|
269
|
+
}
|
|
270
|
+
}));
|
|
271
|
+
tools.push((0, agents_1.tool)({
|
|
272
|
+
name: 'subscribe_to_events',
|
|
273
|
+
description: "Subscribe to events from a component. You will be notified when events occur. IMPORTANT: Use workflow_listComponents first to discover valid component IDs. Use listComponentEvents to discover available event types.",
|
|
274
|
+
parameters: zod_1.z.object({
|
|
275
|
+
componentId: zod_1.z.string().describe('ID of the component to subscribe to'),
|
|
276
|
+
eventTypes: zod_1.z.array(zod_1.z.string()).optional().describe('Whitelist of event types to receive. If omitted, ALL events are forwarded.')
|
|
277
|
+
}),
|
|
278
|
+
execute: async ({ componentId, eventTypes }) => {
|
|
279
|
+
const component = this.runtime.shared.findComponent(componentId);
|
|
280
|
+
if (!component) {
|
|
281
|
+
return JSON.stringify({
|
|
282
|
+
status: 'error',
|
|
283
|
+
error: `Component '${componentId}' not found. Use workflow_listComponents to discover valid IDs.`
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
const subscriptionId = this.eventManager.addSubscription(componentId, eventTypes);
|
|
287
|
+
if (!subscriptionId) {
|
|
288
|
+
return JSON.stringify({ status: 'error', error: 'Max subscriptions reached or already subscribed' });
|
|
289
|
+
}
|
|
290
|
+
this.runtime.updates.raiseEvent({
|
|
291
|
+
type: 'subscription_added',
|
|
292
|
+
subscriptionId,
|
|
293
|
+
componentId
|
|
294
|
+
});
|
|
295
|
+
this.runtime.updates.update({
|
|
296
|
+
activeSubscriptionCount: this.eventManager.getCount()
|
|
297
|
+
});
|
|
298
|
+
return JSON.stringify({ status: 'subscribed', subscriptionId, componentId, eventTypes: eventTypes ?? 'all' });
|
|
299
|
+
}
|
|
300
|
+
}));
|
|
301
|
+
tools.push((0, agents_1.tool)({
|
|
302
|
+
name: 'unsubscribe',
|
|
303
|
+
description: "Unsubscribe from a component's events.",
|
|
304
|
+
parameters: zod_1.z.object({
|
|
305
|
+
subscriptionId: zod_1.z.string().describe('ID of the subscription to remove')
|
|
306
|
+
}),
|
|
307
|
+
execute: async ({ subscriptionId }) => {
|
|
308
|
+
const removed = this.eventManager.removeSubscription(subscriptionId);
|
|
309
|
+
if (removed) {
|
|
310
|
+
this.runtime.updates.raiseEvent({
|
|
311
|
+
type: 'subscription_removed',
|
|
312
|
+
subscriptionId
|
|
313
|
+
});
|
|
314
|
+
this.runtime.updates.update({
|
|
315
|
+
activeSubscriptionCount: this.eventManager.getCount()
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
return JSON.stringify({ status: removed ? 'unsubscribed' : 'not_found', subscriptionId });
|
|
319
|
+
}
|
|
320
|
+
}));
|
|
321
|
+
tools.push((0, agents_1.tool)({
|
|
322
|
+
name: 'get_subscriptions',
|
|
323
|
+
description: 'Get list of active event subscriptions.',
|
|
324
|
+
parameters: zod_1.z.object({}),
|
|
325
|
+
execute: async () => {
|
|
326
|
+
const subscriptions = this.eventManager.getActiveSubscriptions();
|
|
327
|
+
return JSON.stringify(subscriptions);
|
|
328
|
+
}
|
|
329
|
+
}));
|
|
330
|
+
tools.push((0, agents_1.tool)({
|
|
331
|
+
name: 'store_memory',
|
|
332
|
+
description: 'Store information in working memory for future reference.',
|
|
333
|
+
parameters: zod_1.z.object({
|
|
334
|
+
key: zod_1.z.string().describe('Key to store the value under'),
|
|
335
|
+
value: zod_1.z.string().describe('Value to store')
|
|
336
|
+
}),
|
|
337
|
+
execute: async ({ key, value }) => {
|
|
338
|
+
const stored = this.memoryManager.set(key, value);
|
|
339
|
+
return JSON.stringify({ status: stored ? 'stored' : 'failed', key });
|
|
340
|
+
}
|
|
341
|
+
}));
|
|
342
|
+
tools.push((0, agents_1.tool)({
|
|
343
|
+
name: 'recall_memory',
|
|
344
|
+
description: 'Retrieve information from working memory.',
|
|
345
|
+
parameters: zod_1.z.object({
|
|
346
|
+
key: zod_1.z.string().describe('Key to retrieve')
|
|
347
|
+
}),
|
|
348
|
+
execute: async ({ key }) => {
|
|
349
|
+
const value = this.memoryManager.get(key);
|
|
350
|
+
return JSON.stringify({ status: value !== undefined ? 'found' : 'not_found', key, value });
|
|
351
|
+
}
|
|
352
|
+
}));
|
|
353
|
+
tools.push((0, agents_1.tool)({
|
|
354
|
+
name: 'list_memory',
|
|
355
|
+
description: 'List all keys and values in working memory.',
|
|
356
|
+
parameters: zod_1.z.object({}),
|
|
357
|
+
execute: async () => {
|
|
358
|
+
const memory = this.memoryManager.getAll();
|
|
359
|
+
return JSON.stringify(memory);
|
|
360
|
+
}
|
|
361
|
+
}));
|
|
362
|
+
if (this.runtimeToolsAdded) {
|
|
363
|
+
const llmService = this.runtime.llm;
|
|
364
|
+
const availableTools = llmService.getAvailableTools();
|
|
365
|
+
(0, logging_1.debuglog)("Adding runtime tools", {
|
|
366
|
+
agentId: this.cfg.id,
|
|
367
|
+
toolCount: availableTools.length,
|
|
368
|
+
toolNames: availableTools.map(t => t.name)
|
|
369
|
+
});
|
|
370
|
+
for (const rtTool of availableTools) {
|
|
371
|
+
const params = this.jsonSchemaToZod(rtTool.inputSchema);
|
|
372
|
+
tools.push((0, agents_1.tool)({
|
|
373
|
+
name: rtTool.name,
|
|
374
|
+
description: rtTool.description,
|
|
375
|
+
parameters: params,
|
|
376
|
+
execute: async (args) => {
|
|
377
|
+
const result = await llmService.executeTool(rtTool.name, args);
|
|
378
|
+
const MAX_RESULT_LENGTH = 32000;
|
|
379
|
+
const resultStr = typeof result === 'string' ? result : JSON.stringify(result);
|
|
380
|
+
if (resultStr.length > MAX_RESULT_LENGTH) {
|
|
381
|
+
return resultStr.substring(0, MAX_RESULT_LENGTH) +
|
|
382
|
+
'\n\n[TRUNCATED - result was ' + resultStr.length + ' characters]';
|
|
383
|
+
}
|
|
384
|
+
return resultStr;
|
|
385
|
+
}
|
|
386
|
+
}));
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
return tools;
|
|
390
|
+
}
|
|
391
|
+
jsonSchemaToZod(schema) {
|
|
392
|
+
const s = schema;
|
|
393
|
+
if (s.type !== 'object') {
|
|
394
|
+
return zod_1.z.object({});
|
|
395
|
+
}
|
|
396
|
+
const properties = s.properties ?? {};
|
|
397
|
+
const required = s.required ?? [];
|
|
398
|
+
const shape = {};
|
|
399
|
+
for (const [key, propSchema] of Object.entries(properties)) {
|
|
400
|
+
const zodType = this.jsonSchemaPropertyToZod(propSchema);
|
|
401
|
+
shape[key] = required.includes(key) ? zodType : zodType.optional();
|
|
402
|
+
}
|
|
403
|
+
return zod_1.z.object(shape);
|
|
404
|
+
}
|
|
405
|
+
jsonSchemaPropertyToZod(schema) {
|
|
406
|
+
const s = schema;
|
|
407
|
+
switch (s.type) {
|
|
408
|
+
case 'string':
|
|
409
|
+
return zod_1.z.string();
|
|
410
|
+
case 'number':
|
|
411
|
+
return zod_1.z.number();
|
|
412
|
+
case 'integer':
|
|
413
|
+
return zod_1.z.number().int();
|
|
414
|
+
case 'boolean':
|
|
415
|
+
return zod_1.z.boolean();
|
|
416
|
+
case 'array':
|
|
417
|
+
if (s.items) {
|
|
418
|
+
return zod_1.z.array(this.jsonSchemaPropertyToZod(s.items));
|
|
419
|
+
}
|
|
420
|
+
return zod_1.z.array(zod_1.z.any());
|
|
421
|
+
case 'object': {
|
|
422
|
+
const properties = s.properties ?? {};
|
|
423
|
+
const required = s.required ?? [];
|
|
424
|
+
const shape = {};
|
|
425
|
+
for (const [key, propSchema] of Object.entries(properties)) {
|
|
426
|
+
const zodType = this.jsonSchemaPropertyToZod(propSchema);
|
|
427
|
+
shape[key] = required.includes(key) ? zodType : zodType.optional();
|
|
428
|
+
}
|
|
429
|
+
return zod_1.z.object(shape);
|
|
430
|
+
}
|
|
431
|
+
default:
|
|
432
|
+
return zod_1.z.any();
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
async invokeAgent(message, trigger) {
|
|
436
|
+
if (!this.agent) {
|
|
437
|
+
throw new Error('Agent not initialized');
|
|
438
|
+
}
|
|
439
|
+
if (this.invocationLock) {
|
|
440
|
+
(0, logging_1.debuglog)("Skipping invocation - another invocation in progress", {
|
|
441
|
+
agentId: this.cfg.id,
|
|
442
|
+
triggerType: trigger.type
|
|
443
|
+
});
|
|
444
|
+
return 'skipped-concurrent';
|
|
445
|
+
}
|
|
446
|
+
this.invocationLock = true;
|
|
447
|
+
(0, logging_1.debuglog)("invokeAgent starting", {
|
|
448
|
+
agentId: this.cfg.id,
|
|
449
|
+
triggerType: trigger.type,
|
|
450
|
+
triggerSource: trigger.source,
|
|
451
|
+
message: message.substring(0, 100)
|
|
452
|
+
});
|
|
453
|
+
const invocationId = this.invocationTracker.startInvocation(trigger, message);
|
|
454
|
+
this.currentTriggerType = trigger.type;
|
|
455
|
+
this.currentTriggerSource = trigger.source;
|
|
456
|
+
this.runtime.updates.raiseEvent({
|
|
457
|
+
type: 'agent_invoked',
|
|
458
|
+
trigger: trigger.type,
|
|
459
|
+
prompt: message
|
|
460
|
+
});
|
|
461
|
+
this.runtime.updates.update({
|
|
462
|
+
status: 'thinking',
|
|
463
|
+
currentTask: message
|
|
464
|
+
});
|
|
465
|
+
try {
|
|
466
|
+
const contextInfo = `
|
|
467
|
+
Current context:
|
|
468
|
+
- Working memory: ${JSON.stringify(this.memoryManager.getAll())}
|
|
469
|
+
- Active timers: ${this.timerManager.getCount()}
|
|
470
|
+
- Active subscriptions: ${this.eventManager.getCount()}
|
|
471
|
+
|
|
472
|
+
User message: ${message}`;
|
|
473
|
+
this.conversationHistory.push({ role: 'user', content: message });
|
|
474
|
+
const result = await (0, agents_1.run)(this.agent, contextInfo, {
|
|
475
|
+
maxTurns: this.cfg.maxStepsPerInvocation ?? 20,
|
|
476
|
+
});
|
|
477
|
+
const finalResult = typeof result.finalOutput === 'string'
|
|
478
|
+
? result.finalOutput
|
|
479
|
+
: JSON.stringify(result.finalOutput);
|
|
480
|
+
this.conversationHistory.push({ role: 'assistant', content: finalResult });
|
|
481
|
+
const MAX_HISTORY = 50;
|
|
482
|
+
if (this.conversationHistory.length > MAX_HISTORY) {
|
|
483
|
+
this.conversationHistory = this.conversationHistory.slice(-MAX_HISTORY);
|
|
484
|
+
}
|
|
485
|
+
this.invocationTracker.completeInvocation(finalResult);
|
|
486
|
+
this.runtime.updates.update({
|
|
487
|
+
status: 'idle',
|
|
488
|
+
currentTask: undefined,
|
|
489
|
+
invocationCount: (this.runtime.updates.latest().invocationCount ?? 0) + 1,
|
|
490
|
+
lastActivity: new Date().toISOString()
|
|
491
|
+
});
|
|
492
|
+
this.runtime.updates.raiseEvent({
|
|
493
|
+
type: 'agent_completed',
|
|
494
|
+
invocationId,
|
|
495
|
+
result: finalResult,
|
|
496
|
+
toolsUsed: []
|
|
497
|
+
});
|
|
498
|
+
return invocationId;
|
|
499
|
+
}
|
|
500
|
+
catch (error) {
|
|
501
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
502
|
+
(0, logging_1.errorlog)("Agent invocation failed", { agentId: this.cfg.id, error: errorMessage });
|
|
503
|
+
this.invocationTracker.completeInvocation(`Error: ${errorMessage}`);
|
|
504
|
+
this.runtime.updates.update({
|
|
505
|
+
status: 'error',
|
|
506
|
+
currentTask: undefined,
|
|
507
|
+
errorMessage
|
|
508
|
+
});
|
|
509
|
+
this.runtime.updates.raiseEvent({
|
|
510
|
+
type: 'error_occurred',
|
|
511
|
+
error: errorMessage
|
|
512
|
+
});
|
|
513
|
+
return invocationId;
|
|
514
|
+
}
|
|
515
|
+
finally {
|
|
516
|
+
this.invocationLock = false;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
handleCommand(command) {
|
|
520
|
+
switch (command.type) {
|
|
521
|
+
case 'send_prompt':
|
|
522
|
+
void this.invokeAgent(command.prompt, { type: 'user_command', source: 'command' });
|
|
523
|
+
break;
|
|
524
|
+
case 'cancel_current':
|
|
525
|
+
this.invocationTracker.cancelInvocation();
|
|
526
|
+
break;
|
|
527
|
+
case 'clear_memory':
|
|
528
|
+
this.memoryManager.clear();
|
|
529
|
+
break;
|
|
530
|
+
case 'clear_timers':
|
|
531
|
+
this.timerManager.cancelAll();
|
|
532
|
+
this.runtime.updates.update({
|
|
533
|
+
activeTimerCount: 0
|
|
534
|
+
});
|
|
535
|
+
break;
|
|
536
|
+
case 'clear_subscriptions':
|
|
537
|
+
this.eventManager.removeAll();
|
|
538
|
+
this.runtime.updates.update({
|
|
539
|
+
activeSubscriptionCount: 0
|
|
540
|
+
});
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/util.openaiAgent/runtime.ts"],"names":[],"mappings":";;;;;AACA,wFAS8D;AAC9D,wFAAgE;AAChE,iEAAwE;AACxE,yEAAiF;AAEjF,uFAA4E;AAC5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