@lssm/example.agent-console 0.0.0-canary-20251223214424 → 0.0.0-canary-20251225042407

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 (55) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +29 -29
  2. package/.turbo/turbo-build.log +32 -32
  3. package/CHANGELOG.md +6 -6
  4. package/dist/agent/agent.event.d.ts.map +1 -1
  5. package/dist/agent/agent.event.js +41 -12
  6. package/dist/agent/agent.event.js.map +1 -1
  7. package/dist/agent/agent.operation.d.ts +5 -39
  8. package/dist/agent/agent.operation.d.ts.map +1 -1
  9. package/dist/agent/agent.operation.js +12 -9
  10. package/dist/agent/agent.operation.js.map +1 -1
  11. package/dist/agent/agent.presentation.d.ts.map +1 -1
  12. package/dist/agent/agent.presentation.js +19 -6
  13. package/dist/agent/agent.presentation.js.map +1 -1
  14. package/dist/agent.feature.js +76 -69
  15. package/dist/agent.feature.js.map +1 -1
  16. package/dist/run/run.entity.d.ts +56 -56
  17. package/dist/run/run.enum.d.ts +5 -5
  18. package/dist/run/run.event.d.ts +70 -70
  19. package/dist/run/run.event.d.ts.map +1 -1
  20. package/dist/run/run.event.js +69 -21
  21. package/dist/run/run.event.js.map +1 -1
  22. package/dist/run/run.operation.d.ts +182 -176
  23. package/dist/run/run.operation.d.ts.map +1 -1
  24. package/dist/run/run.operation.js +16 -10
  25. package/dist/run/run.operation.js.map +1 -1
  26. package/dist/run/run.presentation.d.ts.map +1 -1
  27. package/dist/run/run.presentation.js +13 -4
  28. package/dist/run/run.presentation.js.map +1 -1
  29. package/dist/run/run.schema.d.ts +99 -99
  30. package/dist/tool/tool.entity.d.ts +24 -24
  31. package/dist/tool/tool.enum.d.ts +4 -4
  32. package/dist/tool/tool.event.d.ts +24 -24
  33. package/dist/tool/tool.event.d.ts.map +1 -1
  34. package/dist/tool/tool.event.js +25 -9
  35. package/dist/tool/tool.event.js.map +1 -1
  36. package/dist/tool/tool.handler.d.ts.map +1 -1
  37. package/dist/tool/tool.operation.d.ts +108 -102
  38. package/dist/tool/tool.operation.d.ts.map +1 -1
  39. package/dist/tool/tool.operation.js +14 -8
  40. package/dist/tool/tool.operation.js.map +1 -1
  41. package/dist/tool/tool.presentation.d.ts.map +1 -1
  42. package/dist/tool/tool.presentation.js +13 -4
  43. package/dist/tool/tool.presentation.js.map +1 -1
  44. package/package.json +8 -8
  45. package/src/agent/agent.event.ts +34 -12
  46. package/src/agent/agent.operation.ts +12 -9
  47. package/src/agent/agent.presentation.ts +16 -3
  48. package/src/agent.feature.ts +58 -56
  49. package/src/run/run.event.ts +58 -21
  50. package/src/run/run.operation.ts +16 -10
  51. package/src/run/run.presentation.ts +11 -2
  52. package/src/tool/tool.event.ts +27 -10
  53. package/src/tool/tool.operation.ts +14 -8
  54. package/src/tool/tool.presentation.ts +11 -2
  55. package/tsconfig.tsbuildinfo +1 -1
@@ -2,6 +2,7 @@ import { ScalarTypeEnum, defineEnum } from "@lssm/lib.schema";
2
2
  import { defineEvent, defineSchemaModel as defineSchemaModel$1 } from "@lssm/lib.contracts";
3
3
 
4
4
  //#region src/run/run.event.ts
5
+ const OWNERS = ["@agent-console-team"];
5
6
  /**
6
7
  * Payload for run started event.
7
8
  */
@@ -47,9 +48,14 @@ const RunStartedPayload = defineSchemaModel$1({
47
48
  * RunStartedEvent - An agent run was started.
48
49
  */
49
50
  const RunStartedEvent = defineEvent({
50
- name: "agent.run.started",
51
- version: 1,
52
- description: "An agent run was started.",
51
+ meta: {
52
+ key: "agent.run.started",
53
+ version: 1,
54
+ description: "An agent run was started.",
55
+ stability: "stable",
56
+ owners: [...OWNERS],
57
+ tags: ["run", "started"]
58
+ },
53
59
  payload: RunStartedPayload
54
60
  });
55
61
  /**
@@ -117,9 +123,14 @@ const RunCompletedPayload = defineSchemaModel$1({
117
123
  * RunCompletedEvent - An agent run completed successfully.
118
124
  */
119
125
  const RunCompletedEvent = defineEvent({
120
- name: "agent.run.completed",
121
- version: 1,
122
- description: "An agent run completed successfully.",
126
+ meta: {
127
+ key: "agent.run.completed",
128
+ version: 1,
129
+ description: "An agent run completed successfully.",
130
+ stability: "stable",
131
+ owners: [...OWNERS],
132
+ tags: ["run", "completed"]
133
+ },
123
134
  payload: RunCompletedPayload
124
135
  });
125
136
  /**
@@ -179,9 +190,14 @@ const RunFailedPayload = defineSchemaModel$1({
179
190
  * RunFailedEvent - An agent run failed.
180
191
  */
181
192
  const RunFailedEvent = defineEvent({
182
- name: "agent.run.failed",
183
- version: 1,
184
- description: "An agent run encountered an error.",
193
+ meta: {
194
+ key: "agent.run.failed",
195
+ version: 1,
196
+ description: "An agent run encountered an error.",
197
+ stability: "stable",
198
+ owners: [...OWNERS],
199
+ tags: ["run", "failed"]
200
+ },
185
201
  payload: RunFailedPayload
186
202
  });
187
203
  /**
@@ -233,9 +249,14 @@ const RunCancelledPayload = defineSchemaModel$1({
233
249
  * RunCancelledEvent - An agent run was cancelled.
234
250
  */
235
251
  const RunCancelledEvent = defineEvent({
236
- name: "agent.run.cancelled",
237
- version: 1,
238
- description: "An agent run was cancelled by the user.",
252
+ meta: {
253
+ key: "agent.run.cancelled",
254
+ version: 1,
255
+ description: "An agent run was cancelled by the user.",
256
+ stability: "stable",
257
+ owners: [...OWNERS],
258
+ tags: ["run", "cancelled"]
259
+ },
239
260
  payload: RunCancelledPayload
240
261
  });
241
262
  /**
@@ -275,9 +296,18 @@ const ToolInvokedPayload = defineSchemaModel$1({
275
296
  * ToolInvokedEvent - A tool was invoked during a run.
276
297
  */
277
298
  const ToolInvokedEvent = defineEvent({
278
- name: "agent.run.toolInvoked",
279
- version: 1,
280
- description: "A tool was invoked during an agent run.",
299
+ meta: {
300
+ key: "agent.run.toolInvoked",
301
+ version: 1,
302
+ description: "A tool was invoked during an agent run.",
303
+ stability: "stable",
304
+ owners: [...OWNERS],
305
+ tags: [
306
+ "run",
307
+ "tool",
308
+ "invoked"
309
+ ]
310
+ },
281
311
  payload: ToolInvokedPayload
282
312
  });
283
313
  /**
@@ -329,9 +359,18 @@ const ToolCompletedPayload = defineSchemaModel$1({
329
359
  * ToolCompletedEvent - A tool invocation completed.
330
360
  */
331
361
  const ToolCompletedEvent = defineEvent({
332
- name: "agent.run.toolCompleted",
333
- version: 1,
334
- description: "A tool invocation completed during an agent run.",
362
+ meta: {
363
+ key: "agent.run.toolCompleted",
364
+ version: 1,
365
+ description: "A tool invocation completed during an agent run.",
366
+ stability: "stable",
367
+ owners: [...OWNERS],
368
+ tags: [
369
+ "run",
370
+ "tool",
371
+ "completed"
372
+ ]
373
+ },
335
374
  payload: ToolCompletedPayload
336
375
  });
337
376
  /**
@@ -375,9 +414,18 @@ const MessageGeneratedPayload = defineSchemaModel$1({
375
414
  * MessageGeneratedEvent - Agent generated a message.
376
415
  */
377
416
  const MessageGeneratedEvent = defineEvent({
378
- name: "agent.run.messageGenerated",
379
- version: 1,
380
- description: "An agent generated a message during a run.",
417
+ meta: {
418
+ key: "agent.run.messageGenerated",
419
+ version: 1,
420
+ description: "An agent generated a message during a run.",
421
+ stability: "stable",
422
+ owners: [...OWNERS],
423
+ tags: [
424
+ "run",
425
+ "message",
426
+ "generated"
427
+ ]
428
+ },
381
429
  payload: MessageGeneratedPayload
382
430
  });
383
431
 
@@ -1 +1 @@
1
- {"version":3,"file":"run.event.js","names":["defineSchemaModel"],"sources":["../../src/run/run.event.ts"],"sourcesContent":["import { defineEvent, defineSchemaModel } from '@lssm/lib.contracts';\nimport { ScalarTypeEnum, defineEnum } from '@lssm/lib.schema';\n\n/**\n * Payload for run started event.\n */\nconst RunStartedPayload = defineSchemaModel({\n name: 'RunStartedPayload',\n description: 'Payload for run started event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n input: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunStartedEvent - An agent run was started.\n */\nexport const RunStartedEvent = defineEvent({\n name: 'agent.run.started',\n version: 1,\n description: 'An agent run was started.',\n payload: RunStartedPayload,\n});\n\n/**\n * Payload for run completed event.\n */\nconst RunCompletedPayload = defineSchemaModel({\n name: 'RunCompletedPayload',\n description: 'Payload for run completed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n promptTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completionTokens: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n estimatedCostUsd: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: true,\n },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunCompletedEvent - An agent run completed successfully.\n */\nexport const RunCompletedEvent = defineEvent({\n name: 'agent.run.completed',\n version: 1,\n description: 'An agent run completed successfully.',\n payload: RunCompletedPayload,\n});\n\n/**\n * Payload for run failed event.\n */\nconst RunFailedPayload = defineSchemaModel({\n name: 'RunFailedPayload',\n description: 'Payload for run failed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n errorMessage: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n errorCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n failedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunFailedEvent - An agent run failed.\n */\nexport const RunFailedEvent = defineEvent({\n name: 'agent.run.failed',\n version: 1,\n description: 'An agent run encountered an error.',\n payload: RunFailedPayload,\n});\n\n/**\n * Payload for run cancelled event.\n */\nconst RunCancelledPayload = defineSchemaModel({\n name: 'RunCancelledPayload',\n description: 'Payload for run cancelled event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n cancelledBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n cancelledAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunCancelledEvent - An agent run was cancelled.\n */\nexport const RunCancelledEvent = defineEvent({\n name: 'agent.run.cancelled',\n version: 1,\n description: 'An agent run was cancelled by the user.',\n payload: RunCancelledPayload,\n});\n\n/**\n * Payload for tool invoked event.\n */\nconst ToolInvokedPayload = defineSchemaModel({\n name: 'ToolInvokedPayload',\n description: 'Payload for tool invoked event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n input: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n invokedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolInvokedEvent - A tool was invoked during a run.\n */\nexport const ToolInvokedEvent = defineEvent({\n name: 'agent.run.toolInvoked',\n version: 1,\n description: 'A tool was invoked during an agent run.',\n payload: ToolInvokedPayload,\n});\n\n/**\n * Payload for tool completed event.\n */\nconst ToolCompletedPayload = defineSchemaModel({\n name: 'ToolCompletedPayload',\n description: 'Payload for tool completed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n errorMessage: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolCompletedEvent - A tool invocation completed.\n */\nexport const ToolCompletedEvent = defineEvent({\n name: 'agent.run.toolCompleted',\n version: 1,\n description: 'A tool invocation completed during an agent run.',\n payload: ToolCompletedPayload,\n});\n\n/**\n * Message type enum.\n */\nconst MessageTypeEnum = defineEnum('MessageType', ['assistant', 'system']);\n\n/**\n * Payload for message generated event.\n */\nconst MessageGeneratedPayload = defineSchemaModel({\n name: 'MessageGeneratedPayload',\n description: 'Payload for message generated event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n messageType: { type: MessageTypeEnum, isOptional: false },\n content: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n tokensUsed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n generatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * MessageGeneratedEvent - Agent generated a message.\n */\nexport const MessageGeneratedEvent = defineEvent({\n name: 'agent.run.messageGenerated',\n version: 1,\n description: 'An agent generated a message during a run.',\n payload: MessageGeneratedPayload,\n});\n"],"mappings":";;;;;;;AAMA,MAAM,oBAAoBA,oBAAkB;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACvE,OAAO;GAAE,MAAM,eAAe,YAAY;GAAE,YAAY;GAAO;EAC/D,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,kBAAkB,YAAY;CACzC,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC;;;;AAKF,MAAM,sBAAsBA,oBAAkB;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,gBAAgB;GACd,MAAM,eAAe,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,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,YAAY;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACtE,aAAa;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACpE;CACF,CAAC;;;;AAKF,MAAa,wBAAwB,YAAY;CAC/C,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC"}
1
+ {"version":3,"file":"run.event.js","names":["defineSchemaModel"],"sources":["../../src/run/run.event.ts"],"sourcesContent":["import { defineEvent, defineSchemaModel } from '@lssm/lib.contracts';\nimport { ScalarTypeEnum, defineEnum } from '@lssm/lib.schema';\n\nconst OWNERS = ['@agent-console-team'] as const;\n\n/**\n * Payload for run started event.\n */\nconst RunStartedPayload = defineSchemaModel({\n name: 'RunStartedPayload',\n description: 'Payload for run started event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n input: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunStartedEvent - An agent run was started.\n */\nexport const RunStartedEvent = defineEvent({\n meta: {\n key: 'agent.run.started',\n version: 1,\n description: 'An agent run was started.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'started'],\n },\n payload: RunStartedPayload,\n});\n\n/**\n * Payload for run completed event.\n */\nconst RunCompletedPayload = defineSchemaModel({\n name: 'RunCompletedPayload',\n description: 'Payload for run completed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n promptTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completionTokens: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n estimatedCostUsd: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: true,\n },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunCompletedEvent - An agent run completed successfully.\n */\nexport const RunCompletedEvent = defineEvent({\n meta: {\n key: 'agent.run.completed',\n version: 1,\n description: 'An agent run completed successfully.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'completed'],\n },\n payload: RunCompletedPayload,\n});\n\n/**\n * Payload for run failed event.\n */\nconst RunFailedPayload = defineSchemaModel({\n name: 'RunFailedPayload',\n description: 'Payload for run failed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n errorMessage: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n errorCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n failedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunFailedEvent - An agent run failed.\n */\nexport const RunFailedEvent = defineEvent({\n meta: {\n key: 'agent.run.failed',\n version: 1,\n description: 'An agent run encountered an error.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'failed'],\n },\n payload: RunFailedPayload,\n});\n\n/**\n * Payload for run cancelled event.\n */\nconst RunCancelledPayload = defineSchemaModel({\n name: 'RunCancelledPayload',\n description: 'Payload for run cancelled event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n cancelledBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n cancelledAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunCancelledEvent - An agent run was cancelled.\n */\nexport const RunCancelledEvent = defineEvent({\n meta: {\n key: 'agent.run.cancelled',\n version: 1,\n description: 'An agent run was cancelled by the user.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'cancelled'],\n },\n payload: RunCancelledPayload,\n});\n\n/**\n * Payload for tool invoked event.\n */\nconst ToolInvokedPayload = defineSchemaModel({\n name: 'ToolInvokedPayload',\n description: 'Payload for tool invoked event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n input: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n invokedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolInvokedEvent - A tool was invoked during a run.\n */\nexport const ToolInvokedEvent = defineEvent({\n meta: {\n key: 'agent.run.toolInvoked',\n version: 1,\n description: 'A tool was invoked during an agent run.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'tool', 'invoked'],\n },\n payload: ToolInvokedPayload,\n});\n\n/**\n * Payload for tool completed event.\n */\nconst ToolCompletedPayload = defineSchemaModel({\n name: 'ToolCompletedPayload',\n description: 'Payload for tool completed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n errorMessage: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolCompletedEvent - A tool invocation completed.\n */\nexport const ToolCompletedEvent = defineEvent({\n meta: {\n key: 'agent.run.toolCompleted',\n version: 1,\n description: 'A tool invocation completed during an agent run.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'tool', 'completed'],\n },\n payload: ToolCompletedPayload,\n});\n\n/**\n * Message type enum.\n */\nconst MessageTypeEnum = defineEnum('MessageType', ['assistant', 'system']);\n\n/**\n * Payload for message generated event.\n */\nconst MessageGeneratedPayload = defineSchemaModel({\n name: 'MessageGeneratedPayload',\n description: 'Payload for message generated event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n messageType: { type: MessageTypeEnum, isOptional: false },\n content: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n tokensUsed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n generatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * MessageGeneratedEvent - Agent generated a message.\n */\nexport const MessageGeneratedEvent = defineEvent({\n meta: {\n key: 'agent.run.messageGenerated',\n version: 1,\n description: 'An agent generated a message during a run.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'message', 'generated'],\n },\n payload: MessageGeneratedPayload,\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,sBAAsB;;;;AAKtC,MAAM,oBAAoBA,oBAAkB;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACvE,OAAO;GAAE,MAAM,eAAe,YAAY;GAAE,YAAY;GAAO;EAC/D,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,kBAAkB,YAAY;CACzC,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,OAAO,UAAU;EACzB;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAM,sBAAsBA,oBAAkB;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;G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