@elqnt/agents 2.0.7 → 2.1.1

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 (39) hide show
  1. package/dist/agent-models-mCYzjfGp.d.mts +2400 -0
  2. package/dist/agent-models-mCYzjfGp.d.ts +2400 -0
  3. package/dist/api/index.d.mts +103 -0
  4. package/dist/api/index.d.ts +103 -0
  5. package/dist/api/index.js +78 -0
  6. package/dist/api/index.js.map +1 -0
  7. package/dist/api/index.mjs +78 -0
  8. package/dist/api/index.mjs.map +1 -0
  9. package/dist/chunk-3VJNDDME.mjs +401 -0
  10. package/dist/chunk-3VJNDDME.mjs.map +1 -0
  11. package/dist/chunk-K3OAYHF3.js +202 -0
  12. package/dist/chunk-K3OAYHF3.js.map +1 -0
  13. package/dist/chunk-O2SYQSU2.mjs +398 -0
  14. package/dist/chunk-O2SYQSU2.mjs.map +1 -0
  15. package/dist/chunk-RPXANLP2.js +398 -0
  16. package/dist/chunk-RPXANLP2.js.map +1 -0
  17. package/dist/chunk-SWJ66D7X.js +401 -0
  18. package/dist/chunk-SWJ66D7X.js.map +1 -0
  19. package/dist/chunk-SZP2G5I7.mjs +202 -0
  20. package/dist/chunk-SZP2G5I7.mjs.map +1 -0
  21. package/dist/hooks/index.d.mts +57 -0
  22. package/dist/hooks/index.d.ts +57 -0
  23. package/dist/hooks/index.js +14 -0
  24. package/dist/hooks/index.js.map +1 -0
  25. package/dist/hooks/index.mjs +14 -0
  26. package/dist/hooks/index.mjs.map +1 -0
  27. package/dist/index.d.mts +6 -2257
  28. package/dist/index.d.ts +6 -2257
  29. package/dist/index.js +479 -554
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +303 -177
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/models/index.d.mts +97 -0
  34. package/dist/models/index.d.ts +97 -0
  35. package/dist/models/index.js +398 -0
  36. package/dist/models/index.js.map +1 -0
  37. package/dist/models/index.mjs +398 -0
  38. package/dist/models/index.mjs.map +1 -0
  39. package/package.json +31 -14
@@ -0,0 +1,2400 @@
1
+ import { ProductNameTS, JSONSchema, ResponseMetadata } from '@elqnt/types';
2
+
3
+ /**
4
+ * AgentContext accumulates meaningful state from agentic tool executions.
5
+ * It provides a structured, schema-driven view of what happened during a chat
6
+ * and what meaningful data was extracted.
7
+ * Stored in: agent_contexts_org_{orgId} with key: {agentId}:{chatKey}
8
+ */
9
+ interface AgentContext {
10
+ /**
11
+ * Identity - used for storage key and cross-references
12
+ */
13
+ orgId: string;
14
+ agentId: string;
15
+ chatKey: string;
16
+ /**
17
+ * Schema defines the shape of accumulated variables
18
+ * Tools contribute to this schema as they execute
19
+ */
20
+ schema: any;
21
+ /**
22
+ * Variables is the merged view of all important outputs
23
+ * This is what gets displayed in the "Agent Context" panel
24
+ */
25
+ variables: {
26
+ [key: string]: any;
27
+ };
28
+ /**
29
+ * Executions tracks each tool call with full input/output
30
+ * Similar to NodeStates in workflow engine
31
+ */
32
+ executions: AgentExecution[];
33
+ /**
34
+ * PendingPlan holds an execution plan awaiting user approval
35
+ * Part of the Plan → Approve → Execute flow
36
+ */
37
+ pendingPlan?: ExecutionPlan;
38
+ /**
39
+ * CompletedPlans holds historical plans (for reference/audit)
40
+ */
41
+ completedPlans?: ExecutionPlan[];
42
+ /**
43
+ * Tracking
44
+ */
45
+ createdAt: number;
46
+ lastUpdated: number;
47
+ /**
48
+ * Size management
49
+ */
50
+ archivedExecutionCount?: number;
51
+ }
52
+ /**
53
+ * AgentExecution represents one tool call during the agentic loop.
54
+ * Similar to NodeState in the workflow engine.
55
+ */
56
+ interface AgentExecution {
57
+ /**
58
+ * Identity
59
+ */
60
+ id: string;
61
+ toolName: string;
62
+ toolId?: string;
63
+ /**
64
+ * Display
65
+ */
66
+ title: string;
67
+ type: string;
68
+ icon?: string;
69
+ /**
70
+ * Status
71
+ */
72
+ status: ExecutionStatusTS;
73
+ error?: string;
74
+ /**
75
+ * Schema-driven Input/Output (like NodeInput/NodeOutput)
76
+ */
77
+ inputSchema?: any;
78
+ input: {
79
+ [key: string]: any;
80
+ };
81
+ outputSchema?: any;
82
+ output?: {
83
+ [key: string]: any;
84
+ };
85
+ /**
86
+ * Merge Configuration - how this execution's output merges into Variables
87
+ */
88
+ mergeConfig?: MergeConfig;
89
+ /**
90
+ * Timing
91
+ */
92
+ startedAt: number;
93
+ completedAt?: number;
94
+ duration?: number;
95
+ }
96
+ /**
97
+ * ExecutionStatus represents the status of a tool execution
98
+ */
99
+ type ExecutionStatus = string;
100
+ declare const ExecutionStatusPending: ExecutionStatus;
101
+ declare const ExecutionStatusRunning: ExecutionStatus;
102
+ declare const ExecutionStatusCompleted: ExecutionStatus;
103
+ declare const ExecutionStatusFailed: ExecutionStatus;
104
+ declare const ExecutionStatusSkipped: ExecutionStatus;
105
+ type ExecutionStatusTS = 'pending' | 'running' | 'completed' | 'failed' | 'skipped';
106
+ /**
107
+ * MergeConfig defines how tool output gets merged into AgentContext.Variables
108
+ */
109
+ interface MergeConfig {
110
+ /**
111
+ * Keys to extract from output and merge into variables
112
+ */
113
+ mergeKeys?: string[];
114
+ /**
115
+ * Target path in variables
116
+ * Examples: "shipperName" (direct), "documents[]" (append to array)
117
+ */
118
+ targetPath?: string;
119
+ /**
120
+ * Strategy: "replace" | "merge" | "append"
121
+ * - replace: overwrite the target path
122
+ * - merge: deep merge objects
123
+ * - append: append to array (use with "path[]" syntax)
124
+ */
125
+ strategy?: MergeStrategy;
126
+ }
127
+ /**
128
+ * MergeStrategy defines how values are merged into variables
129
+ */
130
+ type MergeStrategy = string;
131
+ declare const MergeStrategyReplace: MergeStrategy;
132
+ declare const MergeStrategyMerge: MergeStrategy;
133
+ declare const MergeStrategyAppend: MergeStrategy;
134
+ type MergeStrategyTS = 'replace' | 'merge' | 'append';
135
+ /**
136
+ * AgentContextConfig is defined on the Agent to configure how context is managed
137
+ */
138
+ interface AgentContextConfig {
139
+ /**
140
+ * Base schema - defines the expected shape of accumulated context
141
+ */
142
+ schema: any;
143
+ /**
144
+ * Default/initial values when context is created
145
+ */
146
+ defaultVariables?: {
147
+ [key: string]: any;
148
+ };
149
+ /**
150
+ * Whether to extend schema at runtime when new keys appear
151
+ */
152
+ allowSchemaExtension: boolean;
153
+ }
154
+ /**
155
+ * Constants for size management
156
+ */
157
+ declare const MaxExecutions = 100;
158
+ /**
159
+ * Constants for size management
160
+ */
161
+ declare const ExecutionTTLHours = 72;
162
+ /**
163
+ * ExecutionPlan represents a planned sequence of tool executions
164
+ * that requires user approval before execution.
165
+ */
166
+ interface ExecutionPlan {
167
+ /**
168
+ * Identity
169
+ */
170
+ id: string;
171
+ chatKey: string;
172
+ agentId: string;
173
+ orgId: string;
174
+ /**
175
+ * Plan metadata
176
+ */
177
+ title: string;
178
+ description: string;
179
+ createdAt: number;
180
+ /**
181
+ * Planned steps
182
+ */
183
+ steps: PlannedStep[];
184
+ /**
185
+ * Status tracking
186
+ */
187
+ status: PlanStatusTS;
188
+ approvedAt?: number;
189
+ approvedBy?: string;
190
+ rejectedAt?: number;
191
+ rejectionReason?: string;
192
+ /**
193
+ * Execution tracking (populated after approval)
194
+ */
195
+ executionStartedAt?: number;
196
+ executionCompletedAt?: number;
197
+ currentStepIndex: number;
198
+ }
199
+ /**
200
+ * PlanStatus represents the status of an execution plan
201
+ */
202
+ type PlanStatus = string;
203
+ declare const PlanStatusPendingApproval: PlanStatus;
204
+ declare const PlanStatusApproved: PlanStatus;
205
+ declare const PlanStatusExecuting: PlanStatus;
206
+ declare const PlanStatusCompleted: PlanStatus;
207
+ declare const PlanStatusRejected: PlanStatus;
208
+ declare const PlanStatusCancelled: PlanStatus;
209
+ type PlanStatusTS = 'pending_approval' | 'approved' | 'executing' | 'completed' | 'rejected' | 'cancelled';
210
+ /**
211
+ * PlannedStep represents a single step in an execution plan
212
+ */
213
+ interface PlannedStep {
214
+ /**
215
+ * Identity
216
+ */
217
+ id: string;
218
+ order: number;
219
+ /**
220
+ * Tool information
221
+ */
222
+ toolName: string;
223
+ toolId?: string;
224
+ title: string;
225
+ description: string;
226
+ icon?: string;
227
+ /**
228
+ * Planned input (may reference outputs from previous steps)
229
+ */
230
+ plannedInput: {
231
+ [key: string]: any;
232
+ };
233
+ /**
234
+ * Dependencies (step IDs that must complete before this one)
235
+ */
236
+ dependsOn?: string[];
237
+ /**
238
+ * Optional: user can toggle individual steps
239
+ */
240
+ enabled: boolean;
241
+ /**
242
+ * After execution (populated during/after execution)
243
+ */
244
+ status: ExecutionStatusTS;
245
+ output?: {
246
+ [key: string]: any;
247
+ };
248
+ error?: string;
249
+ startedAt?: number;
250
+ completedAt?: number;
251
+ }
252
+ /**
253
+ * PlanApprovalConfig configures when an agent requires plan approval
254
+ */
255
+ interface PlanApprovalConfig {
256
+ /**
257
+ * Always require approval for any multi-tool operation
258
+ */
259
+ alwaysRequire: boolean;
260
+ /**
261
+ * Require approval only for these tool names
262
+ */
263
+ requireForTools?: string[];
264
+ /**
265
+ * Require approval when estimated execution time exceeds threshold (seconds)
266
+ */
267
+ timeThresholdSeconds?: number;
268
+ /**
269
+ * Require approval when number of steps exceeds threshold
270
+ */
271
+ stepCountThreshold?: number;
272
+ /**
273
+ * Auto-approve if user has previously approved similar plans
274
+ */
275
+ allowAutoApprove: boolean;
276
+ }
277
+ /**
278
+ * CreateToolDefinitionRequest represents a request to create a tool definition
279
+ */
280
+ interface CreateToolDefinitionRequest {
281
+ orgId: string;
282
+ toolDefinition?: ToolDefinition;
283
+ }
284
+ /**
285
+ * UpdateToolDefinitionRequest represents a request to update a tool definition
286
+ */
287
+ interface UpdateToolDefinitionRequest {
288
+ orgId: string;
289
+ toolDefinition?: ToolDefinition;
290
+ }
291
+ /**
292
+ * GetToolDefinitionRequest represents a request to get a tool definition
293
+ */
294
+ interface GetToolDefinitionRequest {
295
+ orgId: string;
296
+ toolDefinitionId: string;
297
+ }
298
+ /**
299
+ * DeleteToolDefinitionRequest represents a request to delete a tool definition
300
+ */
301
+ interface DeleteToolDefinitionRequest {
302
+ orgId: string;
303
+ toolDefinitionId: string;
304
+ }
305
+ /**
306
+ * ListToolDefinitionsRequest represents a request to list tool definitions
307
+ */
308
+ interface ListToolDefinitionsRequest {
309
+ orgId: string;
310
+ onlySystem?: boolean;
311
+ enabled?: boolean;
312
+ limit?: number;
313
+ offset?: number;
314
+ }
315
+ /**
316
+ * ToolDefinitionResponse represents a response containing a tool definition
317
+ */
318
+ interface ToolDefinitionResponse {
319
+ toolDefinition?: ToolDefinition;
320
+ metadata: any;
321
+ }
322
+ /**
323
+ * ToolDefinitionsListResponse represents a response containing multiple tool definitions
324
+ */
325
+ interface ToolDefinitionsListResponse {
326
+ toolDefinitions: ToolDefinition[];
327
+ total: number;
328
+ metadata: any;
329
+ }
330
+ /**
331
+ * CreateSubAgentRequest represents a request to create a sub-agent
332
+ */
333
+ interface CreateSubAgentRequest {
334
+ orgId: string;
335
+ subAgent?: SubAgent;
336
+ }
337
+ /**
338
+ * UpdateSubAgentRequest represents a request to update a sub-agent
339
+ */
340
+ interface UpdateSubAgentRequest {
341
+ orgId: string;
342
+ subAgent?: SubAgent;
343
+ }
344
+ /**
345
+ * GetSubAgentRequest represents a request to get a sub-agent
346
+ */
347
+ interface GetSubAgentRequest {
348
+ orgId: string;
349
+ subAgentId: string;
350
+ }
351
+ /**
352
+ * DeleteSubAgentRequest represents a request to delete a sub-agent
353
+ */
354
+ interface DeleteSubAgentRequest {
355
+ orgId: string;
356
+ subAgentId: string;
357
+ }
358
+ /**
359
+ * ListSubAgentsRequest represents a request to list sub-agents
360
+ */
361
+ interface ListSubAgentsRequest {
362
+ orgId: string;
363
+ onlySystem?: boolean;
364
+ enabled?: boolean;
365
+ limit?: number;
366
+ offset?: number;
367
+ }
368
+ /**
369
+ * SubAgentResponse represents a response containing a sub-agent
370
+ */
371
+ interface SubAgentResponse {
372
+ subAgent?: SubAgent;
373
+ metadata: any;
374
+ }
375
+ /**
376
+ * SubAgentsListResponse represents a response containing multiple sub-agents
377
+ */
378
+ interface SubAgentsListResponse {
379
+ subAgents: SubAgent[];
380
+ total: number;
381
+ metadata: any;
382
+ }
383
+ /**
384
+ * GetToolDefinitionsByIDsRequest represents a request to get multiple tool definitions by IDs
385
+ */
386
+ interface GetToolDefinitionsByIDsRequest {
387
+ orgId: string;
388
+ toolDefinitionIds: string[];
389
+ }
390
+ /**
391
+ * GetToolDefinitionsByIDsResponse represents a response containing multiple tool definitions
392
+ */
393
+ interface GetToolDefinitionsByIDsResponse {
394
+ toolDefinitions: ToolDefinition[];
395
+ metadata: any;
396
+ }
397
+ /**
398
+ * GetSubAgentsByIDsRequest represents a request to get multiple sub-agents by IDs
399
+ */
400
+ interface GetSubAgentsByIDsRequest {
401
+ orgId: string;
402
+ subAgentIds: string[];
403
+ }
404
+ /**
405
+ * GetSubAgentsByIDsResponse represents a response containing multiple sub-agents
406
+ */
407
+ interface GetSubAgentsByIDsResponse {
408
+ subAgents: SubAgent[];
409
+ metadata: any;
410
+ }
411
+ interface ExecuteToolRequest {
412
+ orgId: string;
413
+ agentId?: string;
414
+ tool?: AgentTool;
415
+ input: {
416
+ [key: string]: any;
417
+ };
418
+ metadata?: {
419
+ [key: string]: any;
420
+ };
421
+ context?: {
422
+ [key: string]: any;
423
+ };
424
+ chatKey?: string;
425
+ }
426
+ interface ExecuteToolResponse {
427
+ result: {
428
+ [key: string]: any;
429
+ };
430
+ metadata: any;
431
+ }
432
+ /**
433
+ * CreateSkillRequest represents a request to create a skill
434
+ */
435
+ interface CreateSkillRequest {
436
+ orgId: string;
437
+ skill?: Skill;
438
+ }
439
+ /**
440
+ * UpdateSkillRequest represents a request to update a skill
441
+ */
442
+ interface UpdateSkillRequest {
443
+ orgId: string;
444
+ skill?: Skill;
445
+ }
446
+ /**
447
+ * GetSkillRequest represents a request to get a skill
448
+ */
449
+ interface GetSkillRequest {
450
+ orgId: string;
451
+ skillId: string;
452
+ }
453
+ /**
454
+ * DeleteSkillRequest represents a request to delete a skill
455
+ */
456
+ interface DeleteSkillRequest {
457
+ orgId: string;
458
+ skillId: string;
459
+ }
460
+ /**
461
+ * ListSkillsRequest represents a request to list skills
462
+ */
463
+ interface ListSkillsRequest {
464
+ orgId: string;
465
+ category?: SkillCategory;
466
+ onlySystem?: boolean;
467
+ enabled?: boolean;
468
+ limit?: number;
469
+ offset?: number;
470
+ }
471
+ /**
472
+ * SkillResponse represents a response containing a skill
473
+ */
474
+ interface SkillResponse {
475
+ skill?: Skill;
476
+ metadata: any;
477
+ }
478
+ /**
479
+ * SkillsListResponse represents a response containing multiple skills
480
+ */
481
+ interface SkillsListResponse {
482
+ skills: Skill[];
483
+ total: number;
484
+ metadata: any;
485
+ }
486
+ /**
487
+ * GetSkillsByIDsRequest represents a request to get multiple skills by IDs
488
+ */
489
+ interface GetSkillsByIDsRequest {
490
+ orgId: string;
491
+ skillIds: string[];
492
+ }
493
+ /**
494
+ * GetSkillsByIDsResponse represents a response containing multiple skills
495
+ */
496
+ interface GetSkillsByIDsResponse {
497
+ skills: Skill[];
498
+ metadata: any;
499
+ }
500
+ /**
501
+ * UpdateSkillOrgConfigRequest updates org-level config for a skill
502
+ */
503
+ interface UpdateSkillOrgConfigRequest {
504
+ orgId: string;
505
+ skillId: string;
506
+ orgConfig: {
507
+ [key: string]: any;
508
+ };
509
+ }
510
+ /**
511
+ * UpdateAgentSkillConfigRequest updates agent-level config for a skill
512
+ */
513
+ interface UpdateAgentSkillConfigRequest {
514
+ orgId: string;
515
+ agentId: string;
516
+ skillId: string;
517
+ config: {
518
+ [key: string]: any;
519
+ };
520
+ }
521
+ /**
522
+ * GetAgentSkillConfigRequest gets agent-level config for a skill
523
+ */
524
+ interface GetAgentSkillConfigRequest {
525
+ orgId: string;
526
+ agentId: string;
527
+ skillId: string;
528
+ }
529
+ /**
530
+ * AgentSkillConfigResponse contains agent skill config
531
+ */
532
+ interface AgentSkillConfigResponse {
533
+ agentSkill?: AgentSkill;
534
+ metadata: any;
535
+ }
536
+ /**
537
+ * GetSkillUserConfigRequest gets user-level config for a skill
538
+ */
539
+ interface GetSkillUserConfigRequest {
540
+ orgId: string;
541
+ userId: string;
542
+ skillId: string;
543
+ agentId?: string;
544
+ }
545
+ /**
546
+ * UpdateSkillUserConfigRequest updates user-level config for a skill
547
+ */
548
+ interface UpdateSkillUserConfigRequest {
549
+ orgId: string;
550
+ userId: string;
551
+ skillId: string;
552
+ agentId?: string;
553
+ enabled?: boolean;
554
+ displayOrder?: number;
555
+ config?: {
556
+ [key: string]: any;
557
+ };
558
+ }
559
+ /**
560
+ * DeleteSkillUserConfigRequest deletes user-level config for a skill
561
+ */
562
+ interface DeleteSkillUserConfigRequest {
563
+ orgId: string;
564
+ userId: string;
565
+ skillId: string;
566
+ agentId?: string;
567
+ }
568
+ /**
569
+ * ListSkillUserConfigRequest lists user configs for skills
570
+ */
571
+ interface ListSkillUserConfigRequest {
572
+ orgId: string;
573
+ userId: string;
574
+ agentId?: string;
575
+ limit?: number;
576
+ offset?: number;
577
+ }
578
+ /**
579
+ * SkillUserConfigResponse contains a user's skill config
580
+ */
581
+ interface SkillUserConfigResponse {
582
+ userConfig?: SkillUserConfig;
583
+ metadata: any;
584
+ }
585
+ /**
586
+ * SkillUserConfigListResponse contains multiple user skill configs
587
+ */
588
+ interface SkillUserConfigListResponse {
589
+ userConfigs: SkillUserConfig[];
590
+ total: number;
591
+ metadata: any;
592
+ }
593
+ /**
594
+ * ResolveSkillConfigRequest resolves merged config for a skill (org + agent + user)
595
+ */
596
+ interface ResolveSkillConfigRequest {
597
+ orgId: string;
598
+ userId: string;
599
+ agentId: string;
600
+ skillId: string;
601
+ }
602
+ /**
603
+ * ResolveSkillConfigResponse contains the merged skill config
604
+ */
605
+ interface ResolveSkillConfigResponse {
606
+ skillId: string;
607
+ skillName: string;
608
+ resolvedConfig: {
609
+ [key: string]: any;
610
+ };
611
+ /**
612
+ * Source indicates which level each config key came from
613
+ */
614
+ configSources?: {
615
+ [key: string]: string;
616
+ };
617
+ metadata: any;
618
+ }
619
+ /**
620
+ * CreateAgentJobRequest represents a request to create an agent job
621
+ */
622
+ interface CreateAgentJobRequest {
623
+ orgId: string;
624
+ job?: AgentJob;
625
+ }
626
+ /**
627
+ * UpdateAgentJobRequest represents a request to update an agent job
628
+ */
629
+ interface UpdateAgentJobRequest {
630
+ orgId: string;
631
+ job?: AgentJob;
632
+ }
633
+ /**
634
+ * AgentJobIDRequest represents a request that only needs org + job ID
635
+ * Used for: Get, Delete, Pause, Resume operations
636
+ */
637
+ interface AgentJobIDRequest {
638
+ orgId: string;
639
+ jobId: string;
640
+ }
641
+ /**
642
+ * ListAgentJobsRequest represents a request to list agent jobs
643
+ */
644
+ interface ListAgentJobsRequest {
645
+ orgId: string;
646
+ agentId?: string;
647
+ ownerId?: string;
648
+ scope?: JobScope;
649
+ status?: JobStatus;
650
+ frequency?: JobFrequency;
651
+ limit?: number;
652
+ offset?: number;
653
+ }
654
+ /**
655
+ * AgentJobResponse represents a response containing an agent job
656
+ */
657
+ interface AgentJobResponse {
658
+ job?: AgentJob;
659
+ metadata: any;
660
+ }
661
+ /**
662
+ * AgentJobsListResponse represents a response containing multiple agent jobs
663
+ */
664
+ interface AgentJobsListResponse {
665
+ jobs: AgentJob[];
666
+ total: number;
667
+ metadata: any;
668
+ }
669
+ /**
670
+ * AgentJobTriggerRequest represents a request from scheduler service to trigger jobs
671
+ * The trigger processes ALL orgs automatically by fetching them via admin.orgs.list
672
+ */
673
+ interface AgentJobTriggerRequest {
674
+ timestamp: string;
675
+ }
676
+ /**
677
+ * AgentJobTriggerResponse represents the response for job trigger processing
678
+ */
679
+ interface AgentJobTriggerResponse {
680
+ results: JobExecutionResult[];
681
+ total: number;
682
+ executed: number;
683
+ skipped: number;
684
+ errors: number;
685
+ metadata: any;
686
+ }
687
+ /**
688
+ * ListExecutionsByJobRequest represents a request to list executions for a job
689
+ */
690
+ interface ListExecutionsByJobRequest {
691
+ orgId: string;
692
+ jobId: string;
693
+ limit?: number;
694
+ offset?: number;
695
+ }
696
+ /**
697
+ * ListExecutionsByAgentRequest represents a request to list executions for an agent
698
+ */
699
+ interface ListExecutionsByAgentRequest {
700
+ orgId: string;
701
+ agentId: string;
702
+ limit?: number;
703
+ offset?: number;
704
+ }
705
+ /**
706
+ * ListExecutionsResponse represents the response with executions list
707
+ */
708
+ interface ListExecutionsResponse {
709
+ executions: JobExecution[];
710
+ total: number;
711
+ metadata: any;
712
+ }
713
+ /**
714
+ * GetExecutionRequest represents a request to get an execution
715
+ */
716
+ interface GetExecutionRequest {
717
+ orgId: string;
718
+ executionId: string;
719
+ }
720
+ /**
721
+ * ExecutionResponse represents the response with a single execution
722
+ */
723
+ interface ExecutionResponse {
724
+ execution?: JobExecution;
725
+ metadata: any;
726
+ }
727
+ /**
728
+ * TTLCleanupRequest represents a request to run TTL cleanup
729
+ */
730
+ interface TTLCleanupRequest {
731
+ retentionDays?: number;
732
+ }
733
+ /**
734
+ * TTLCleanupResponse represents the response from TTL cleanup
735
+ */
736
+ interface TTLCleanupResponse {
737
+ totalDeleted: number;
738
+ orgResults?: {
739
+ [key: string]: number;
740
+ };
741
+ duration: string;
742
+ metadata: any;
743
+ }
744
+ type AgentTypeTS = 'chat' | 'react';
745
+ type AgentSubTypeTS = 'chat' | 'react' | 'workflow' | 'document';
746
+ type AgentStatusTS = 'draft' | 'active' | 'inactive' | 'archived';
747
+ type AgentScopeTS = 'org' | 'team' | 'user';
748
+ /**
749
+ * AgentScope defines the visibility scope of an agent
750
+ */
751
+ type AgentScope = string;
752
+ declare const AgentScopeOrg: AgentScope;
753
+ declare const AgentScopeTeam: AgentScope;
754
+ declare const AgentScopeUser: AgentScope;
755
+ type SkillCategoryTS = 'productivity' | 'creative' | 'integration' | 'analysis' | 'communication' | 'custom';
756
+ type IntegrationProviderTS = 'google' | 'microsoft';
757
+ type IntegrationTypeTS = 'email' | 'calendar' | 'drive';
758
+ type SkillCategory = string;
759
+ declare const SkillCategoryProductivity: SkillCategory;
760
+ declare const SkillCategoryCreative: SkillCategory;
761
+ declare const SkillCategoryIntegration: SkillCategory;
762
+ declare const SkillCategoryAnalysis: SkillCategory;
763
+ declare const SkillCategoryCommunication: SkillCategory;
764
+ declare const SkillCategoryCustom: SkillCategory;
765
+ /**
766
+ * IntegrationRequirement specifies an OAuth integration needed for a skill to function
767
+ * Skills with integration requirements are only available to users who have connected the required provider
768
+ */
769
+ interface IntegrationRequirement {
770
+ provider: string;
771
+ type: string;
772
+ }
773
+ /**
774
+ * Skill represents a bundled set of tools with a prompt extension
775
+ * Skills can be activated at runtime to extend agent capabilities
776
+ */
777
+ interface Skill {
778
+ id: string;
779
+ orgId?: string;
780
+ name: string;
781
+ title: string;
782
+ description?: string;
783
+ longDescription?: string;
784
+ category: SkillCategoryTS;
785
+ slashCommand?: string;
786
+ tags?: string[];
787
+ tools?: AgentTool[];
788
+ systemPromptExtension?: string;
789
+ iconName?: string;
790
+ configSchema?: JSONSchema;
791
+ config?: {
792
+ [key: string]: any;
793
+ };
794
+ requiredIntegrations?: IntegrationRequirement[];
795
+ /**
796
+ * Config schemas for each level (JSON Schema definitions)
797
+ */
798
+ orgConfigSchema?: JSONSchema;
799
+ agentConfigSchema?: JSONSchema;
800
+ userConfigSchema?: JSONSchema;
801
+ orgConfig?: {
802
+ [key: string]: any;
803
+ };
804
+ enabled: boolean;
805
+ isSystem?: boolean;
806
+ featured?: boolean;
807
+ persisted?: boolean;
808
+ displayOrder?: number;
809
+ createdAt?: string;
810
+ updatedAt?: string;
811
+ }
812
+ /**
813
+ * AgentSkill represents an agent's configuration for a specific skill
814
+ */
815
+ interface AgentSkill {
816
+ skillId: string;
817
+ skillName?: string;
818
+ enabled: boolean;
819
+ order: number;
820
+ config?: {
821
+ [key: string]: any;
822
+ };
823
+ }
824
+ /**
825
+ * SkillUserConfig stores user-level preferences and OAuth tokens for a skill
826
+ */
827
+ interface SkillUserConfig {
828
+ id: string;
829
+ userId: string;
830
+ skillId: string;
831
+ agentId?: string;
832
+ enabled: boolean;
833
+ displayOrder?: number;
834
+ config?: {
835
+ [key: string]: any;
836
+ };
837
+ createdAt: string;
838
+ updatedAt: string;
839
+ }
840
+ type AgentType = string;
841
+ declare const AgentTypeChat: AgentType;
842
+ declare const AgentTypeReact: AgentType;
843
+ type AgentSubType = string;
844
+ /**
845
+ * Agent SubTypes
846
+ */
847
+ declare const AgentSubTypeChat: AgentSubType;
848
+ /**
849
+ * Agent SubTypes
850
+ */
851
+ declare const AgentSubTypeReact: AgentSubType;
852
+ /**
853
+ * Agent SubTypes
854
+ */
855
+ declare const AgentSubTypeWorkflow: AgentSubType;
856
+ /**
857
+ * Agent SubTypes
858
+ */
859
+ declare const AgentSubTypeDocument: AgentSubType;
860
+ type AgentStatus = string;
861
+ declare const AgentStatusDraft: AgentStatus;
862
+ declare const AgentStatusActive: AgentStatus;
863
+ declare const AgentStatusInactive: AgentStatus;
864
+ declare const AgentStatusArchived: AgentStatus;
865
+ interface DefaultDefinitions {
866
+ agents: Agent[];
867
+ toolDefinitions: ToolDefinition[];
868
+ subAgents: SubAgent[];
869
+ skills?: Skill[];
870
+ }
871
+ /**
872
+ * AgentTool represents an agent's configuration for a specific tool
873
+ * Includes denormalized tool information to avoid joins at runtime
874
+ */
875
+ interface AgentTool {
876
+ toolId: string;
877
+ toolName: string;
878
+ title?: string;
879
+ description?: string;
880
+ type?: string;
881
+ inputSchema?: JSONSchema;
882
+ outputSchema?: JSONSchema;
883
+ configSchema?: JSONSchema;
884
+ config?: {
885
+ [key: string]: any;
886
+ };
887
+ mergeConfig?: MergeConfig;
888
+ enabled: boolean;
889
+ isSystem?: boolean;
890
+ createdAt?: string;
891
+ updatedAt?: string;
892
+ order?: number;
893
+ }
894
+ /**
895
+ * Core agent entity - shared by both types
896
+ */
897
+ interface Agent {
898
+ id?: string;
899
+ orgId: string;
900
+ product: ProductNameTS;
901
+ type: AgentTypeTS;
902
+ subType: AgentSubTypeTS;
903
+ name: string;
904
+ title: string;
905
+ description?: string;
906
+ status: AgentStatusTS;
907
+ version: string;
908
+ /**
909
+ * === LLM CONFIG ===
910
+ */
911
+ provider: string;
912
+ model: string;
913
+ temperature: number;
914
+ maxTokens: number;
915
+ systemPrompt: string;
916
+ goal?: string;
917
+ /**
918
+ * Shared metadata
919
+ */
920
+ tags?: string[];
921
+ isDefault: boolean;
922
+ isPublic: boolean;
923
+ /**
924
+ * === Tool and SubAgent References ===
925
+ */
926
+ tools?: AgentTool[];
927
+ subAgentIds?: string[];
928
+ /**
929
+ * === Skills Configuration ===
930
+ */
931
+ skills?: AgentSkill[];
932
+ /**
933
+ * === Essential Configs ===
934
+ */
935
+ csatConfig: CSATConfig;
936
+ handoffConfig: HandoffConfig;
937
+ /**
938
+ * === Widget Embed Config ===
939
+ */
940
+ widgetConfig?: WidgetConfig;
941
+ /**
942
+ * === TYPE-SPECIFIC CORE CONFIG ===
943
+ */
944
+ reactConfig?: ReactAgentConfig;
945
+ /**
946
+ * === CROSS-CUTTING FEATURES (can be used by any agent type) ===
947
+ */
948
+ userSuggestedActionsConfig?: UserSuggestedActionsConfig;
949
+ /**
950
+ * === AGENT CONTEXT CONFIG ===
951
+ * Defines how AgentContext is initialized and managed for this agent
952
+ */
953
+ contextConfig?: AgentContextConfig;
954
+ /**
955
+ * === SCHEMA-DRIVEN AGENT CONFIG ===
956
+ * Use ConfigSchema to auto-generate UI and validate values in Config
957
+ */
958
+ configSchema: JSONSchema;
959
+ config?: {
960
+ [key: string]: any;
961
+ };
962
+ /**
963
+ * === UI DISPLAY CONFIG ===
964
+ */
965
+ iconName?: string;
966
+ capabilities?: string[];
967
+ samplePrompts?: string[];
968
+ /**
969
+ * === SHARED BEHAVIOR CONFIG ===
970
+ */
971
+ responseStyle?: string;
972
+ personalityTraits?: string[];
973
+ fallbackMessage?: string;
974
+ /**
975
+ * === SHARED PERFORMANCE CONFIG ===
976
+ */
977
+ responseDelay?: number;
978
+ maxConcurrency?: number;
979
+ sessionTimeout?: number;
980
+ /**
981
+ * === TEMPLATE & SCOPE FIELDS ===
982
+ */
983
+ sourceTemplateId?: string;
984
+ sourceTemplateVersion?: string;
985
+ scope: AgentScopeTS;
986
+ scopeId?: string;
987
+ isFavorite: boolean;
988
+ lastUsedAt?: string;
989
+ usageCount: number;
990
+ /**
991
+ * Audit fields
992
+ */
993
+ createdAt: string;
994
+ updatedAt: string;
995
+ createdBy: string;
996
+ updatedBy: string;
997
+ metadata?: {
998
+ [key: string]: any;
999
+ };
1000
+ }
1001
+ /**
1002
+ * Handoff Configuration
1003
+ */
1004
+ interface HandoffConfig {
1005
+ enabled: boolean;
1006
+ triggerKeywords: string[];
1007
+ queueId?: string;
1008
+ handoffMessage: string;
1009
+ }
1010
+ /**
1011
+ * WidgetConfig defines the configuration for an embeddable chat widget
1012
+ */
1013
+ interface WidgetConfig {
1014
+ enabled: boolean;
1015
+ widgetId: string;
1016
+ appearance: WidgetAppearance;
1017
+ behavior: WidgetBehavior;
1018
+ security: WidgetSecurity;
1019
+ }
1020
+ /**
1021
+ * WidgetAppearance defines the visual customization of the widget
1022
+ */
1023
+ interface WidgetAppearance {
1024
+ position: string;
1025
+ primaryColor: string;
1026
+ backgroundColor: string;
1027
+ textColor: string;
1028
+ borderRadius: number;
1029
+ bubbleSize: number;
1030
+ bubbleIconUrl?: string;
1031
+ }
1032
+ /**
1033
+ * WidgetBehavior defines the behavioral settings of the widget
1034
+ */
1035
+ interface WidgetBehavior {
1036
+ welcomeMessage: string;
1037
+ suggestedPrompts?: string[];
1038
+ autoOpenDelay: number;
1039
+ showPoweredBy: boolean;
1040
+ }
1041
+ /**
1042
+ * WidgetSecurity defines the security settings for the widget
1043
+ */
1044
+ interface WidgetSecurity {
1045
+ allowedDomains: string[];
1046
+ }
1047
+ /**
1048
+ * AgentFilters for filtering agents in list operations
1049
+ */
1050
+ interface AgentFilters {
1051
+ product?: ProductNameTS;
1052
+ type?: AgentType;
1053
+ subType?: AgentSubType;
1054
+ status?: AgentStatus;
1055
+ isDefault?: boolean;
1056
+ isPublic?: boolean;
1057
+ tags?: string[];
1058
+ limit?: number;
1059
+ offset?: number;
1060
+ }
1061
+ /**
1062
+ * AgentSummary is a lightweight representation of an agent for list views
1063
+ * Contains essential display fields plus metadata needed for chat initialization
1064
+ */
1065
+ interface AgentSummary {
1066
+ id: string;
1067
+ name: string;
1068
+ title: string;
1069
+ description?: string;
1070
+ iconName?: string;
1071
+ type: AgentTypeTS;
1072
+ status: AgentStatusTS;
1073
+ isDefault: boolean;
1074
+ isPublic: boolean;
1075
+ capabilities?: string[];
1076
+ samplePrompts?: string[];
1077
+ skills?: AgentSkill[];
1078
+ metadata?: {
1079
+ [key: string]: any;
1080
+ };
1081
+ }
1082
+ /**
1083
+ * ToolDefinition represents an abstract/generic tool definition that can be customized per agent
1084
+ * This is the "template" that agents use to create their AgentTool configurations
1085
+ */
1086
+ interface ToolDefinition {
1087
+ id: string;
1088
+ name: string;
1089
+ title: string;
1090
+ description: string;
1091
+ type?: string;
1092
+ inputSchema: JSONSchema;
1093
+ outputSchema?: JSONSchema;
1094
+ configSchema: JSONSchema;
1095
+ config?: {
1096
+ [key: string]: any;
1097
+ };
1098
+ mergeConfig?: MergeConfig;
1099
+ enabled: boolean;
1100
+ isSystem: boolean;
1101
+ metadata?: {
1102
+ [key: string]: any;
1103
+ };
1104
+ createdAt: string;
1105
+ updatedAt: string;
1106
+ }
1107
+ /**
1108
+ * ToolExecution represents the execution context for a tool
1109
+ */
1110
+ interface ToolExecution {
1111
+ id: string;
1112
+ title: string;
1113
+ toolId: string;
1114
+ toolName: string;
1115
+ status: ToolExecutionStatusTS;
1116
+ input: {
1117
+ [key: string]: any;
1118
+ };
1119
+ result?: {
1120
+ [key: string]: any;
1121
+ };
1122
+ error?: string;
1123
+ context?: {
1124
+ [key: string]: any;
1125
+ };
1126
+ startedAt: number;
1127
+ completedAt?: number;
1128
+ retryCount: number;
1129
+ progress?: ToolExecutionProgress[];
1130
+ }
1131
+ interface ToolExecutionProgress {
1132
+ status: ToolExecutionStatusTS;
1133
+ timestamp: number;
1134
+ message?: string;
1135
+ error?: string;
1136
+ metadata?: {
1137
+ [key: string]: any;
1138
+ };
1139
+ }
1140
+ /**
1141
+ * ToolExecutionStatus represents the status of a tool execution
1142
+ */
1143
+ type ToolExecutionStatus = string;
1144
+ declare const ToolExecutionStatusStarted: ToolExecutionStatus;
1145
+ declare const ToolExecutionStatusExecuting: ToolExecutionStatus;
1146
+ declare const ToolExecutionStatusCompleted: ToolExecutionStatus;
1147
+ declare const ToolExecutionStatusFailed: ToolExecutionStatus;
1148
+ declare const ToolExecutionStatusTimeout: ToolExecutionStatus;
1149
+ declare const ToolExecutionStatusSkipped: ToolExecutionStatus;
1150
+ /**
1151
+ * SubAgent represents a sub-agent composed of tools
1152
+ */
1153
+ interface SubAgent {
1154
+ id: string;
1155
+ orgId: string;
1156
+ name: string;
1157
+ title: string;
1158
+ description: string;
1159
+ prompt: string;
1160
+ toolIds: string[];
1161
+ inputSchema: JSONSchema;
1162
+ outputSchema: JSONSchema;
1163
+ configSchema: JSONSchema;
1164
+ config?: {
1165
+ [key: string]: any;
1166
+ };
1167
+ version: string;
1168
+ enabled: boolean;
1169
+ isSystem: boolean;
1170
+ createdAt: string;
1171
+ updatedAt: string;
1172
+ createdBy: string;
1173
+ updatedBy: string;
1174
+ }
1175
+ /**
1176
+ * AgentToolConfiguration represents how an agent uses tools
1177
+ */
1178
+ interface AgentToolConfiguration {
1179
+ enabledTools: string[];
1180
+ enabledSubAgents: string[];
1181
+ toolConfigs: {
1182
+ [key: string]: ToolConfig;
1183
+ };
1184
+ executionPolicy: ToolExecutionPolicy;
1185
+ maxParallelCalls: number;
1186
+ requireApproval: boolean;
1187
+ }
1188
+ /**
1189
+ * ToolExecutionPolicy defines how tools are executed
1190
+ */
1191
+ interface ToolExecutionPolicy {
1192
+ mode: ExecutionModeTS;
1193
+ maxIterations: number;
1194
+ stopOnError: boolean;
1195
+ retryOnFailure: boolean;
1196
+ timeoutSeconds: number;
1197
+ }
1198
+ /**
1199
+ * ExecutionMode defines how tools are executed
1200
+ */
1201
+ type ExecutionMode = string;
1202
+ declare const ExecutionModeSync: ExecutionMode;
1203
+ declare const ExecutionModeAsync: ExecutionMode;
1204
+ declare const ExecutionModeAsyncClient: ExecutionMode;
1205
+ /**
1206
+ * CreateExecutionPlanRequest represents a request to create an execution plan
1207
+ */
1208
+ interface CreateExecutionPlanRequest {
1209
+ agentInstanceId: string;
1210
+ orgId: string;
1211
+ input: string;
1212
+ context?: {
1213
+ [key: string]: any;
1214
+ };
1215
+ availableTools: ToolDefinition[];
1216
+ }
1217
+ /**
1218
+ * CreateExecutionPlanResponse represents the response with an execution plan
1219
+ */
1220
+ interface CreateExecutionPlanResponse {
1221
+ agentInstanceId: string;
1222
+ executionPlan: ToolExecution[];
1223
+ estimatedTime?: any;
1224
+ }
1225
+ /**
1226
+ * ExecutePlanRequest represents a request to execute the plan
1227
+ */
1228
+ interface ExecutePlanRequest {
1229
+ agentInstanceId: string;
1230
+ orgId: string;
1231
+ approveAll?: boolean;
1232
+ }
1233
+ /**
1234
+ * ExecutePlanResponse represents the response after executing the plan
1235
+ */
1236
+ interface ExecutePlanResponse {
1237
+ stateId: string;
1238
+ status: ToolExecutionStatusTS;
1239
+ executedTools: ToolExecution[];
1240
+ finalResult?: any;
1241
+ errors?: string[];
1242
+ }
1243
+ type ToolExecutionStatusTS = 'pending' | 'executing' | 'completed' | 'failed' | 'timeout' | 'skipped';
1244
+ type ExecutionModeTS = 'sync' | 'async' | 'asyncClient';
1245
+ /**
1246
+ * GetWidgetConfigRequest represents a request to get widget config for an agent
1247
+ */
1248
+ interface GetWidgetConfigRequest {
1249
+ orgId: string;
1250
+ agentId: string;
1251
+ }
1252
+ /**
1253
+ * GetWidgetConfigResponse represents the response with widget config
1254
+ */
1255
+ interface GetWidgetConfigResponse {
1256
+ config?: WidgetConfig;
1257
+ metadata: any;
1258
+ }
1259
+ /**
1260
+ * SaveWidgetConfigRequest represents a request to save widget config for an agent
1261
+ */
1262
+ interface SaveWidgetConfigRequest {
1263
+ orgId: string;
1264
+ agentId: string;
1265
+ config?: WidgetConfig;
1266
+ }
1267
+ /**
1268
+ * SaveWidgetConfigResponse represents the response after saving widget config
1269
+ */
1270
+ interface SaveWidgetConfigResponse {
1271
+ config?: WidgetConfig;
1272
+ metadata: any;
1273
+ }
1274
+ type JobScopeTS = 'private' | 'team' | 'org';
1275
+ type JobStatusTS = 'active' | 'executing' | 'paused' | 'disabled';
1276
+ type JobFrequencyTS = 'one-time' | 'schedule';
1277
+ type JobExecutionStatusTS = 'running' | 'success' | 'failed' | 'timed_out';
1278
+ /**
1279
+ * JobScope defines who can see and use the job
1280
+ */
1281
+ type JobScope = string;
1282
+ declare const JobScopePrivate: JobScope;
1283
+ declare const JobScopeTeam: JobScope;
1284
+ declare const JobScopeOrg: JobScope;
1285
+ /**
1286
+ * JobStatus defines the current state of a job
1287
+ */
1288
+ type JobStatus = string;
1289
+ declare const JobStatusActive: JobStatus;
1290
+ declare const JobStatusExecuting: JobStatus;
1291
+ declare const JobStatusPaused: JobStatus;
1292
+ declare const JobStatusDisabled: JobStatus;
1293
+ /**
1294
+ * JobFrequency defines whether a job runs once or on a schedule
1295
+ */
1296
+ type JobFrequency = string;
1297
+ declare const JobFrequencyOneTime: JobFrequency;
1298
+ declare const JobFrequencySchedule: JobFrequency;
1299
+ /**
1300
+ * AgentJob represents a scheduled or one-time execution configuration for an agent
1301
+ */
1302
+ interface AgentJob {
1303
+ id: string;
1304
+ agentId: string;
1305
+ ownerId: string;
1306
+ ownerEmail?: string;
1307
+ teamId?: string;
1308
+ /**
1309
+ * Job identity
1310
+ */
1311
+ name: string;
1312
+ description?: string;
1313
+ /**
1314
+ * Scope determines who can see/manage and execution context
1315
+ */
1316
+ scope: JobScopeTS;
1317
+ /**
1318
+ * Job configuration
1319
+ */
1320
+ frequency: JobFrequencyTS;
1321
+ cron?: string;
1322
+ timezone?: string;
1323
+ prompt: string;
1324
+ /**
1325
+ * Status
1326
+ */
1327
+ status: JobStatusTS;
1328
+ /**
1329
+ * Tracking fields (managed by system)
1330
+ */
1331
+ lastRunAt?: string;
1332
+ nextRunAt?: string;
1333
+ runCount: number;
1334
+ lastError?: string;
1335
+ /**
1336
+ * Circuit breaker fields
1337
+ */
1338
+ consecutiveFailures: number;
1339
+ disabledUntil?: string;
1340
+ /**
1341
+ * Execution tracking (updated by Runtime Service)
1342
+ */
1343
+ lastExecutionId?: string;
1344
+ lastExecutionStatus?: string;
1345
+ lastExecutedAt?: string;
1346
+ /**
1347
+ * Audit fields
1348
+ */
1349
+ createdAt: string;
1350
+ updatedAt: string;
1351
+ }
1352
+ /**
1353
+ * JobExecutionStatus defines the status of a job execution
1354
+ */
1355
+ type JobExecutionStatus = string;
1356
+ declare const JobExecutionStatusRunning: JobExecutionStatus;
1357
+ declare const JobExecutionStatusSuccess: JobExecutionStatus;
1358
+ declare const JobExecutionStatusFailed: JobExecutionStatus;
1359
+ declare const JobExecutionStatusTimedOut: JobExecutionStatus;
1360
+ /**
1361
+ * ArtifactRef represents a reference to an artifact produced during execution
1362
+ * Actual files are stored by tools; this just tracks references
1363
+ */
1364
+ interface ArtifactRef {
1365
+ type: string;
1366
+ name: string;
1367
+ path?: string;
1368
+ size?: number;
1369
+ content?: string;
1370
+ }
1371
+ /**
1372
+ * JobExecution represents a single execution of an agent job
1373
+ */
1374
+ interface JobExecution {
1375
+ id: string;
1376
+ jobId: string;
1377
+ agentId: string;
1378
+ /**
1379
+ * Execution status
1380
+ */
1381
+ status: JobExecutionStatusTS;
1382
+ startedAt: string;
1383
+ completedAt?: string;
1384
+ /**
1385
+ * Execution metrics
1386
+ */
1387
+ roundsExecuted: number;
1388
+ totalTokens: number;
1389
+ /**
1390
+ * Results
1391
+ */
1392
+ result?: any;
1393
+ error?: string;
1394
+ artifacts?: ArtifactRef[];
1395
+ metadata?: any;
1396
+ /**
1397
+ * Audit
1398
+ */
1399
+ createdAt: string;
1400
+ }
1401
+ /**
1402
+ * JobExecutionResult represents the result of processing a single agent job
1403
+ */
1404
+ interface JobExecutionResult {
1405
+ jobId: string;
1406
+ agentId: string;
1407
+ jobName: string;
1408
+ executed: boolean;
1409
+ error?: string;
1410
+ }
1411
+ /**
1412
+ * ProcessJobTriggerResult represents the result of processing all agent jobs
1413
+ */
1414
+ interface ProcessJobTriggerResult {
1415
+ results: JobExecutionResult[];
1416
+ total: number;
1417
+ executed: number;
1418
+ skipped: number;
1419
+ errors: number;
1420
+ }
1421
+ /**
1422
+ * ExecuteJobRequest is sent to Runtime Service to execute a job
1423
+ */
1424
+ interface ExecuteJobRequest {
1425
+ /**
1426
+ * Execution identification (created by Agents Service before dispatch)
1427
+ */
1428
+ executionId: string;
1429
+ /**
1430
+ * Job identification
1431
+ */
1432
+ jobId: string;
1433
+ agentId: string;
1434
+ orgId: string;
1435
+ /**
1436
+ * Execution context
1437
+ */
1438
+ prompt: string;
1439
+ scope: JobScopeTS;
1440
+ ownerId: string;
1441
+ ownerEmail?: string;
1442
+ /**
1443
+ * Agent configuration (denormalized for Runtime)
1444
+ */
1445
+ agent: Agent;
1446
+ /**
1447
+ * Execution settings
1448
+ */
1449
+ timeoutMinutes?: number;
1450
+ metadata?: {
1451
+ [key: string]: any;
1452
+ };
1453
+ }
1454
+ /**
1455
+ * ExecutionCompletedEvent is received from Runtime Service when execution completes
1456
+ */
1457
+ interface ExecutionCompletedEvent {
1458
+ /**
1459
+ * Identification
1460
+ */
1461
+ executionId: string;
1462
+ jobId: string;
1463
+ orgId: string;
1464
+ /**
1465
+ * Status: "success", "failed", "timed_out"
1466
+ */
1467
+ status: string;
1468
+ /**
1469
+ * Results (present on success)
1470
+ */
1471
+ result?: any;
1472
+ artifacts?: ArtifactRef[];
1473
+ /**
1474
+ * Error info (present on failure)
1475
+ */
1476
+ error?: string;
1477
+ /**
1478
+ * Metrics
1479
+ */
1480
+ roundsExecuted: number;
1481
+ totalTokens: number;
1482
+ /**
1483
+ * Timing
1484
+ */
1485
+ completedAt: string;
1486
+ /**
1487
+ * Additional context
1488
+ */
1489
+ metadata?: {
1490
+ [key: string]: any;
1491
+ };
1492
+ }
1493
+ /**
1494
+ * CSAT Configuration
1495
+ */
1496
+ interface CSATConfig {
1497
+ enabled: boolean;
1498
+ survey?: CSATSurvey;
1499
+ }
1500
+ interface CSATQuestion {
1501
+ question: {
1502
+ [key: string]: string;
1503
+ };
1504
+ showRating: boolean;
1505
+ showComment: boolean;
1506
+ }
1507
+ interface CSATSurvey {
1508
+ questions: CSATQuestion[];
1509
+ timeThreshold: number;
1510
+ closeOnResponse: boolean;
1511
+ }
1512
+ interface CSATAnswer {
1513
+ question: string;
1514
+ lang?: string;
1515
+ rating?: number;
1516
+ comment?: string;
1517
+ }
1518
+ interface CSATResponse {
1519
+ answers: CSATAnswer[];
1520
+ submittedAt: number;
1521
+ overallRating: number;
1522
+ }
1523
+ /**
1524
+ * ReAct Agent Configuration
1525
+ */
1526
+ interface ReactAgentConfig {
1527
+ /**
1528
+ * Core ReAct Configuration
1529
+ */
1530
+ maxIterations: number;
1531
+ reasoningPrompt: string;
1532
+ stopConditions: string[];
1533
+ availableTools: string[];
1534
+ requireConfirmation: boolean;
1535
+ /**
1536
+ * LLM Configuration
1537
+ */
1538
+ model: string;
1539
+ temperature: number;
1540
+ maxTokens: number;
1541
+ provider: string;
1542
+ /**
1543
+ * Context Management
1544
+ */
1545
+ maxContextLength: number;
1546
+ memoryRetention: number;
1547
+ compressionStrategy: string;
1548
+ /**
1549
+ * Tool Configuration
1550
+ */
1551
+ toolConfigs?: {
1552
+ [key: string]: ToolConfig;
1553
+ };
1554
+ mcpServers?: MCPServerConfig[];
1555
+ /**
1556
+ * Execution Configuration
1557
+ */
1558
+ timeoutMinutes: number;
1559
+ retryAttempts: number;
1560
+ parallelExecution: boolean;
1561
+ /**
1562
+ * Safety Configuration
1563
+ */
1564
+ dangerousOperations?: string[];
1565
+ allowedFileTypes?: string[];
1566
+ restrictedPaths?: string[];
1567
+ }
1568
+ interface ToolConfig {
1569
+ enabled: boolean;
1570
+ timeoutSeconds: number;
1571
+ retryPolicy: RetryPolicy;
1572
+ configuration?: {
1573
+ [key: string]: any;
1574
+ };
1575
+ }
1576
+ interface RetryPolicy {
1577
+ maxAttempts: number;
1578
+ backoffStrategy: string;
1579
+ backoffDelay: any;
1580
+ }
1581
+ interface MCPServerConfig {
1582
+ name: string;
1583
+ endpoint: string;
1584
+ trusted: boolean;
1585
+ timeout: number;
1586
+ credentials?: {
1587
+ [key: string]: string;
1588
+ };
1589
+ }
1590
+ interface CreateAgentRequest {
1591
+ agent?: Agent;
1592
+ orgId: string;
1593
+ }
1594
+ interface AgentResponse {
1595
+ agent?: Agent;
1596
+ metadata: any;
1597
+ }
1598
+ interface GetAgentRequest {
1599
+ id?: string;
1600
+ name?: string;
1601
+ orgId: string;
1602
+ }
1603
+ interface UpdateAgentRequest {
1604
+ agent: Agent;
1605
+ orgId: string;
1606
+ }
1607
+ interface DeleteAgentRequest {
1608
+ id: string;
1609
+ orgId: string;
1610
+ }
1611
+ interface ListAgentsRequest {
1612
+ orgId: string;
1613
+ filters?: AgentFilters;
1614
+ }
1615
+ interface ListAgentsResponse {
1616
+ agents: Agent[];
1617
+ metadata: any;
1618
+ }
1619
+ /**
1620
+ * ListAgentsSummaryRequest requests a lightweight list of agents
1621
+ */
1622
+ interface ListAgentsSummaryRequest {
1623
+ orgId: string;
1624
+ filters?: AgentFilters;
1625
+ }
1626
+ /**
1627
+ * ListAgentsSummaryResponse returns lightweight agent summaries for list views
1628
+ */
1629
+ interface ListAgentsSummaryResponse {
1630
+ agents: AgentSummary[];
1631
+ metadata: any;
1632
+ }
1633
+ interface GetDefaultAgentRequest {
1634
+ orgId: string;
1635
+ agentType: AgentType;
1636
+ }
1637
+ interface UpdateOrgAgentsRequest {
1638
+ orgId: string;
1639
+ defaultDefinitions?: DefaultDefinitions;
1640
+ }
1641
+ interface UpdateOrgAgentsResponse {
1642
+ toolsCreated: number;
1643
+ subAgentsCreated: number;
1644
+ agentsCreated: number;
1645
+ skillsCreated: number;
1646
+ metadata: ResponseMetadata;
1647
+ }
1648
+ /**
1649
+ * Core Agent Operations
1650
+ */
1651
+ declare const AgentCreateSubject = "agent.create";
1652
+ /**
1653
+ * Core Agent Operations
1654
+ */
1655
+ declare const AgentCreatedSubject = "agent.created";
1656
+ /**
1657
+ * Core Agent Operations
1658
+ */
1659
+ declare const AgentGetSubject = "agent.get";
1660
+ /**
1661
+ * Core Agent Operations
1662
+ */
1663
+ declare const AgentUpdateSubject = "agent.update";
1664
+ /**
1665
+ * Core Agent Operations
1666
+ */
1667
+ declare const AgentUpdatedSubject = "agent.updated";
1668
+ /**
1669
+ * Core Agent Operations
1670
+ */
1671
+ declare const AgentDeleteSubject = "agent.delete";
1672
+ /**
1673
+ * Core Agent Operations
1674
+ */
1675
+ declare const AgentDeletedSubject = "agent.deleted";
1676
+ /**
1677
+ * Core Agent Operations
1678
+ */
1679
+ declare const AgentListSubject = "agent.list";
1680
+ /**
1681
+ * Core Agent Operations
1682
+ */
1683
+ declare const AgentListSummarySubject = "agent.list.summary";
1684
+ /**
1685
+ * Core Agent Operations
1686
+ */
1687
+ declare const AgentSearchSubject = "agent.search";
1688
+ /**
1689
+ * Agent Type Specific Operations
1690
+ */
1691
+ declare const AgentChatCreateSubject = "agent.chat.create";
1692
+ /**
1693
+ * Agent Type Specific Operations
1694
+ */
1695
+ declare const AgentChatUpdateSubject = "agent.chat.update";
1696
+ /**
1697
+ * Agent Type Specific Operations
1698
+ */
1699
+ declare const AgentChatGetSubject = "agent.chat.get";
1700
+ /**
1701
+ * Agent Type Specific Operations
1702
+ */
1703
+ declare const AgentChatValidateSubject = "agent.chat.validate";
1704
+ /**
1705
+ * Agent Type Specific Operations
1706
+ */
1707
+ declare const AgentReactCreateSubject = "agent.react.create";
1708
+ /**
1709
+ * Agent Type Specific Operations
1710
+ */
1711
+ declare const AgentReactUpdateSubject = "agent.react.update";
1712
+ /**
1713
+ * Agent Type Specific Operations
1714
+ */
1715
+ declare const AgentReactGetSubject = "agent.react.get";
1716
+ /**
1717
+ * Agent Type Specific Operations
1718
+ */
1719
+ declare const AgentReactValidateSubject = "agent.react.validate";
1720
+ /**
1721
+ * Execution Coordination
1722
+ */
1723
+ declare const AgentExecuteSubject = "agent.execute";
1724
+ /**
1725
+ * Execution Coordination
1726
+ */
1727
+ declare const AgentExecuteStatusSubject = "agent.execute.status";
1728
+ /**
1729
+ * Execution Coordination
1730
+ */
1731
+ declare const AgentExecuteStopSubject = "agent.execute.stop";
1732
+ /**
1733
+ * Version Management
1734
+ */
1735
+ declare const AgentVersionCreateSubject = "agent.version.create";
1736
+ /**
1737
+ * Version Management
1738
+ */
1739
+ declare const AgentVersionCreatedSubject = "agent.version.created";
1740
+ /**
1741
+ * Version Management
1742
+ */
1743
+ declare const AgentVersionGetSubject = "agent.version.get";
1744
+ /**
1745
+ * Version Management
1746
+ */
1747
+ declare const AgentVersionListSubject = "agent.version.list";
1748
+ /**
1749
+ * Version Management
1750
+ */
1751
+ declare const AgentVersionActivateSubject = "agent.version.activate";
1752
+ /**
1753
+ * Version Management
1754
+ */
1755
+ declare const AgentVersionActivatedSubject = "agent.version.activated";
1756
+ /**
1757
+ * Default Agent Management
1758
+ */
1759
+ declare const AgentEnsureDefaultSubject = "agent.ensure-default";
1760
+ /**
1761
+ * Default Agent Management
1762
+ */
1763
+ declare const AgentGetDefaultSubject = "agent.get-default";
1764
+ /**
1765
+ * Organization Management
1766
+ */
1767
+ declare const AgentGetByOrgSubject = "agent.get-by-org";
1768
+ /**
1769
+ * Organization Management
1770
+ */
1771
+ declare const AgentCloneSubject = "agent.clone";
1772
+ /**
1773
+ * Organization Management
1774
+ */
1775
+ declare const AgentExportSubject = "agent.export";
1776
+ /**
1777
+ * Organization Management
1778
+ */
1779
+ declare const AgentImportSubject = "agent.import";
1780
+ /**
1781
+ * Organization Management
1782
+ */
1783
+ declare const AgentUpdateOrgSubject = "agent.update-org-agents";
1784
+ /**
1785
+ * Configuration Templates
1786
+ */
1787
+ declare const AgentTemplateListSubject = "agent.template.list";
1788
+ /**
1789
+ * Configuration Templates
1790
+ */
1791
+ declare const AgentTemplateGetSubject = "agent.template.get";
1792
+ /**
1793
+ * Configuration Templates
1794
+ */
1795
+ declare const AgentFromTemplateSubject = "agent.from-template";
1796
+ /**
1797
+ * Chat Service Integration
1798
+ */
1799
+ declare const ChatAgentExecuteSubject = "chat.agent.execute";
1800
+ /**
1801
+ * Execution Service Integration
1802
+ */
1803
+ declare const ChatAgentStatusSubject = "chat.agent.status";
1804
+ /**
1805
+ * ReAct Service Integration
1806
+ */
1807
+ declare const ReactAgentExecuteSubject = "react.agent.execute";
1808
+ /**
1809
+ * Execution Service Integration
1810
+ */
1811
+ declare const ReactAgentStatusSubject = "react.agent.status";
1812
+ /**
1813
+ * Execution Service Integration
1814
+ */
1815
+ declare const ReactAgentStopSubject = "react.agent.stop";
1816
+ /**
1817
+ * Workflow Service Integration
1818
+ */
1819
+ declare const WorkflowAgentGetSubject = "workflow.agent.get";
1820
+ /**
1821
+ * Execution Service Integration
1822
+ */
1823
+ declare const WorkflowAgentUpdateSubject = "workflow.agent.update";
1824
+ /**
1825
+ * ToolDefinitions Management
1826
+ */
1827
+ declare const ToolDefinitionsCreateSubject = "agents.tool-definitions.create";
1828
+ /**
1829
+ * ToolDefinitions Management
1830
+ */
1831
+ declare const ToolDefinitionsCreatedSubject = "agents.tool-definitions.created";
1832
+ /**
1833
+ * ToolDefinitions Management
1834
+ */
1835
+ declare const ToolDefinitionsGetSubject = "agents.tool-definitions.get";
1836
+ /**
1837
+ * ToolDefinitions Management
1838
+ */
1839
+ declare const ToolDefinitionsUpdateSubject = "agents.tool-definitions.update";
1840
+ /**
1841
+ * ToolDefinitions Management
1842
+ */
1843
+ declare const ToolDefinitionsUpdatedSubject = "agents.tool-definitions.updated";
1844
+ /**
1845
+ * ToolDefinitions Management
1846
+ */
1847
+ declare const ToolDefinitionsDeleteSubject = "agents.tool-definitions.delete";
1848
+ /**
1849
+ * ToolDefinitions Management
1850
+ */
1851
+ declare const ToolDefinitionsDeletedSubject = "agents.tool-definitions.deleted";
1852
+ /**
1853
+ * ToolDefinitions Management
1854
+ */
1855
+ declare const ToolDefinitionsListSubject = "agents.tool-definitions.list";
1856
+ /**
1857
+ * ToolDefinitions Management
1858
+ */
1859
+ declare const ToolDefinitionsGetByIDsSubject = "agents.tool-definitions.get-by-ids";
1860
+ /**
1861
+ * ToolDefinitions Management
1862
+ */
1863
+ declare const ToolDefinitionsExecuteSubject = "agents.tool-definitions.execute";
1864
+ /**
1865
+ * ToolDefinitions Management
1866
+ */
1867
+ declare const ToolDefinitionsValidateSubject = "agents.tool-definitions.validate";
1868
+ /**
1869
+ * SubAgents Management
1870
+ */
1871
+ declare const SubAgentsCreateSubject = "agents.subagents.create";
1872
+ /**
1873
+ * SubAgents Management
1874
+ */
1875
+ declare const SubAgentsCreatedSubject = "agents.subagents.created";
1876
+ /**
1877
+ * SubAgents Management
1878
+ */
1879
+ declare const SubAgentsGetSubject = "agents.subagents.get";
1880
+ /**
1881
+ * SubAgents Management
1882
+ */
1883
+ declare const SubAgentsUpdateSubject = "agents.subagents.update";
1884
+ /**
1885
+ * SubAgents Management
1886
+ */
1887
+ declare const SubAgentsUpdatedSubject = "agents.subagents.updated";
1888
+ /**
1889
+ * SubAgents Management
1890
+ */
1891
+ declare const SubAgentsDeleteSubject = "agents.subagents.delete";
1892
+ /**
1893
+ * SubAgents Management
1894
+ */
1895
+ declare const SubAgentsDeletedSubject = "agents.subagents.deleted";
1896
+ /**
1897
+ * SubAgents Management
1898
+ */
1899
+ declare const SubAgentsListSubject = "agents.subagents.list";
1900
+ /**
1901
+ * SubAgents Management
1902
+ */
1903
+ declare const SubAgentsGetByIDsSubject = "agents.subagents.get-by-ids";
1904
+ /**
1905
+ * SubAgents Management
1906
+ */
1907
+ declare const SubAgentsExecuteSubject = "agents.subagents.execute";
1908
+ /**
1909
+ * SubAgents Management
1910
+ */
1911
+ declare const SubAgentsValidateSubject = "agents.subagents.validate";
1912
+ /**
1913
+ * Skills Management
1914
+ */
1915
+ declare const SkillsCreateSubject = "agents.skills.create";
1916
+ /**
1917
+ * Skills Management
1918
+ */
1919
+ declare const SkillsCreatedSubject = "agents.skills.created";
1920
+ /**
1921
+ * Skills Management
1922
+ */
1923
+ declare const SkillsGetSubject = "agents.skills.get";
1924
+ /**
1925
+ * Skills Management
1926
+ */
1927
+ declare const SkillsUpdateSubject = "agents.skills.update";
1928
+ /**
1929
+ * Skills Management
1930
+ */
1931
+ declare const SkillsUpdatedSubject = "agents.skills.updated";
1932
+ /**
1933
+ * Skills Management
1934
+ */
1935
+ declare const SkillsDeleteSubject = "agents.skills.delete";
1936
+ /**
1937
+ * Skills Management
1938
+ */
1939
+ declare const SkillsDeletedSubject = "agents.skills.deleted";
1940
+ /**
1941
+ * Skills Management
1942
+ */
1943
+ declare const SkillsListSubject = "agents.skills.list";
1944
+ /**
1945
+ * Skills Management
1946
+ */
1947
+ declare const SkillsGetByIDsSubject = "agents.skills.get-by-ids";
1948
+ /**
1949
+ * Skill Org Config
1950
+ */
1951
+ declare const SkillsUpdateOrgConfigSubject = "agents.skills.update-org-config";
1952
+ /**
1953
+ * Agent Skill Config
1954
+ */
1955
+ declare const AgentSkillUpdateConfigSubject = "agents.skills.agent.update-config";
1956
+ /**
1957
+ * Skills Management
1958
+ */
1959
+ declare const AgentSkillGetConfigSubject = "agents.skills.agent.get-config";
1960
+ /**
1961
+ * Skill User Config Management
1962
+ */
1963
+ declare const SkillUserConfigGetSubject = "agents.skills.user-config.get";
1964
+ /**
1965
+ * Skill User Config Management
1966
+ */
1967
+ declare const SkillUserConfigUpdateSubject = "agents.skills.user-config.update";
1968
+ /**
1969
+ * Skill User Config Management
1970
+ */
1971
+ declare const SkillUserConfigDeleteSubject = "agents.skills.user-config.delete";
1972
+ /**
1973
+ * Skill User Config Management
1974
+ */
1975
+ declare const SkillUserConfigListSubject = "agents.skills.user-config.list";
1976
+ /**
1977
+ * Config Resolution (merges org + agent + user config)
1978
+ */
1979
+ declare const SkillResolveConfigSubject = "agents.skills.resolve-config";
1980
+ /**
1981
+ * Widget Config Management
1982
+ */
1983
+ declare const WidgetConfigGetByAgentSubject = "widgets.config.get.by.agent";
1984
+ /**
1985
+ * Widget Config Management
1986
+ */
1987
+ declare const WidgetConfigSaveSubject = "widgets.config.save";
1988
+ /**
1989
+ * Job CRUD Operations
1990
+ */
1991
+ declare const AgentJobCreateSubject = "agents.jobs.create";
1992
+ /**
1993
+ * Agent Job Management
1994
+ */
1995
+ declare const AgentJobGetSubject = "agents.jobs.get";
1996
+ /**
1997
+ * Agent Job Management
1998
+ */
1999
+ declare const AgentJobUpdateSubject = "agents.jobs.update";
2000
+ /**
2001
+ * Agent Job Management
2002
+ */
2003
+ declare const AgentJobDeleteSubject = "agents.jobs.delete";
2004
+ /**
2005
+ * Agent Job Management
2006
+ */
2007
+ declare const AgentJobListSubject = "agents.jobs.list";
2008
+ /**
2009
+ * Job Actions
2010
+ */
2011
+ declare const AgentJobPauseSubject = "agents.jobs.pause";
2012
+ /**
2013
+ * Agent Job Management
2014
+ */
2015
+ declare const AgentJobResumeSubject = "agents.jobs.resume";
2016
+ /**
2017
+ * Job Trigger (from Scheduler Service)
2018
+ */
2019
+ declare const AgentJobTriggerSubject = "agents.job.trigger";
2020
+ /**
2021
+ * Execution Query Operations
2022
+ */
2023
+ declare const JobExecutionGetSubject = "agents.executions.get";
2024
+ /**
2025
+ * Job Execution Management
2026
+ */
2027
+ declare const JobExecutionListSubject = "agents.executions.list";
2028
+ /**
2029
+ * Runtime Service Communication
2030
+ */
2031
+ declare const RuntimeJobExecuteSubject = "runtime.job.execute";
2032
+ /**
2033
+ * Job Execution Management
2034
+ */
2035
+ declare const RuntimeJobCompletedSubject = "runtime.job.completed";
2036
+ /**
2037
+ * TTL Cleanup (triggered by Scheduler)
2038
+ */
2039
+ declare const ExecutionsTTLCleanupSubject = "maintenance.executions.cleanup";
2040
+ /**
2041
+ * Agent Instance Management
2042
+ */
2043
+ declare const AgentInstanceCreateSubject = "agents.instance.create";
2044
+ /**
2045
+ * Agent Instance Management
2046
+ */
2047
+ declare const AgentInstanceCreatedSubject = "agents.instance.created";
2048
+ /**
2049
+ * Agent Instance Management
2050
+ */
2051
+ declare const AgentInstanceGetSubject = "agents.instance.get";
2052
+ /**
2053
+ * Agent Instance Management
2054
+ */
2055
+ declare const AgentInstanceUpdateSubject = "agents.instance.update";
2056
+ /**
2057
+ * Agent Instance Management
2058
+ */
2059
+ declare const AgentInstanceUpdatedSubject = "agents.instance.updated";
2060
+ /**
2061
+ * Agent Instance Management
2062
+ */
2063
+ declare const AgentInstanceListSubject = "agents.instance.list";
2064
+ /**
2065
+ * Agent Instance Management
2066
+ */
2067
+ declare const AgentInstanceDeleteSubject = "agents.instance.delete";
2068
+ /**
2069
+ * Agent Instance Management
2070
+ */
2071
+ declare const AgentInstanceDeletedSubject = "agents.instance.deleted";
2072
+ /**
2073
+ * Execution Plan Operations
2074
+ */
2075
+ declare const AgentInstanceCreatePlanSubject = "agents.instance.create-plan";
2076
+ /**
2077
+ * Agent Instance Management
2078
+ */
2079
+ declare const AgentInstanceExecutePlanSubject = "agents.instance.execute-plan";
2080
+ /**
2081
+ * Agent Instance Management
2082
+ */
2083
+ declare const AgentInstancePausePlanSubject = "agents.instance.pause-plan";
2084
+ /**
2085
+ * Agent Instance Management
2086
+ */
2087
+ declare const AgentInstanceResumePlanSubject = "agents.instance.resume-plan";
2088
+ /**
2089
+ * Agent Instance Management
2090
+ */
2091
+ declare const AgentInstanceCancelPlanSubject = "agents.instance.cancel-plan";
2092
+ /**
2093
+ * Execution History
2094
+ */
2095
+ declare const AgentInstanceGetHistorySubject = "agents.instance.get-history";
2096
+ /**
2097
+ * Agent Instance Management
2098
+ */
2099
+ declare const AgentInstanceClearHistorySubject = "agents.instance.clear-history";
2100
+ type AgentCategoryTS = 'support' | 'sales' | 'research' | 'writing' | 'productivity' | 'development' | 'marketing' | 'hr' | 'finance' | 'general';
2101
+ type TemplateStatusTS = 'published' | 'draft';
2102
+ type PublisherTypeTS = 'eloquent' | 'partner';
2103
+ /**
2104
+ * AgentCategory defines the category of an agent template
2105
+ */
2106
+ type AgentCategory = string;
2107
+ declare const AgentCategorySupport: AgentCategory;
2108
+ declare const AgentCategorySales: AgentCategory;
2109
+ declare const AgentCategoryResearch: AgentCategory;
2110
+ declare const AgentCategoryWriting: AgentCategory;
2111
+ declare const AgentCategoryProductivity: AgentCategory;
2112
+ declare const AgentCategoryDevelopment: AgentCategory;
2113
+ declare const AgentCategoryMarketing: AgentCategory;
2114
+ declare const AgentCategoryHR: AgentCategory;
2115
+ declare const AgentCategoryFinance: AgentCategory;
2116
+ declare const AgentCategoryGeneral: AgentCategory;
2117
+ /**
2118
+ * TemplateStatus defines the publication status of a template
2119
+ */
2120
+ type TemplateStatus = string;
2121
+ declare const TemplateStatusPublished: TemplateStatus;
2122
+ declare const TemplateStatusDraft: TemplateStatus;
2123
+ /**
2124
+ * PublisherType defines who published the template
2125
+ */
2126
+ type PublisherType = string;
2127
+ declare const PublisherTypeEloquent: PublisherType;
2128
+ declare const PublisherTypePartner: PublisherType;
2129
+ /**
2130
+ * CustomizableField defines a field that users can customize when adding an agent from a template
2131
+ */
2132
+ interface CustomizableField {
2133
+ field: string;
2134
+ label: string;
2135
+ description: string;
2136
+ type: string;
2137
+ required: boolean;
2138
+ }
2139
+ /**
2140
+ * AgentTemplate represents a pre-built agent in the marketplace
2141
+ */
2142
+ interface AgentTemplate {
2143
+ id: string;
2144
+ /**
2145
+ * Identity
2146
+ */
2147
+ name: string;
2148
+ title: string;
2149
+ description: string;
2150
+ longDescription?: string;
2151
+ /**
2152
+ * Categorization
2153
+ */
2154
+ category: AgentCategoryTS;
2155
+ tags?: string[];
2156
+ industry?: string[];
2157
+ useCase?: string[];
2158
+ /**
2159
+ * Discovery
2160
+ */
2161
+ featured: boolean;
2162
+ popularityScore: number;
2163
+ installCount: number;
2164
+ /**
2165
+ * Visual
2166
+ */
2167
+ iconName?: string;
2168
+ coverImageUrl?: string;
2169
+ /**
2170
+ * The actual agent configuration (copied when user adds)
2171
+ */
2172
+ agentConfig: Agent;
2173
+ /**
2174
+ * What's included
2175
+ */
2176
+ includedSkillNames?: string[];
2177
+ includedToolNames?: string[];
2178
+ /**
2179
+ * Requirements
2180
+ */
2181
+ requiredIntegrations?: IntegrationRequirement[];
2182
+ /**
2183
+ * Publisher
2184
+ */
2185
+ publisherName?: string;
2186
+ publisherType: PublisherTypeTS;
2187
+ /**
2188
+ * Customization hints
2189
+ */
2190
+ customizableFields?: CustomizableField[];
2191
+ /**
2192
+ * Status
2193
+ */
2194
+ status: TemplateStatusTS;
2195
+ version: string;
2196
+ /**
2197
+ * Audit
2198
+ */
2199
+ createdAt: string;
2200
+ updatedAt: string;
2201
+ }
2202
+ /**
2203
+ * TemplateCategoryCount represents a template category with its count
2204
+ */
2205
+ interface TemplateCategoryCount {
2206
+ name: string;
2207
+ count: number;
2208
+ }
2209
+ /**
2210
+ * TemplateFilters for filtering templates in list operations
2211
+ */
2212
+ interface TemplateFilters {
2213
+ category?: AgentCategoryTS;
2214
+ industry?: string;
2215
+ useCase?: string;
2216
+ featured?: boolean;
2217
+ status?: TemplateStatusTS;
2218
+ query?: string;
2219
+ sort?: string;
2220
+ limit?: number;
2221
+ offset?: number;
2222
+ }
2223
+ /**
2224
+ * Config and request models for product service integration
2225
+ */
2226
+ interface UserSuggestedActionsConfig {
2227
+ enabled: boolean;
2228
+ actionTypes: string[];
2229
+ maxActions: number;
2230
+ cooldownSeconds: number;
2231
+ }
2232
+ interface UserSuggestedAction {
2233
+ title: string;
2234
+ actionType: string;
2235
+ input?: string;
2236
+ priority?: number;
2237
+ metadata?: {
2238
+ [key: string]: any;
2239
+ };
2240
+ }
2241
+ interface UserSuggestedActionsRequest {
2242
+ orgId: string;
2243
+ chatKey: string;
2244
+ config: UserSuggestedActionsConfig;
2245
+ metadata?: {
2246
+ [key: string]: any;
2247
+ };
2248
+ }
2249
+ interface UserSuggestedActionsResponse {
2250
+ actions: UserSuggestedAction[];
2251
+ metadata: any;
2252
+ }
2253
+ /**
2254
+ * ValidationError represents a validation error with field and message
2255
+ */
2256
+ interface ValidationError {
2257
+ field: string;
2258
+ message: string;
2259
+ }
2260
+ /**
2261
+ * ValidationErrors represents a collection of validation errors
2262
+ */
2263
+ type ValidationErrors = ValidationError[];
2264
+ /**
2265
+ * AgentWidget represents a widget configuration for an agent
2266
+ */
2267
+ interface AgentWidget {
2268
+ id: string;
2269
+ agentId: string;
2270
+ orgId: string;
2271
+ widgetId: string;
2272
+ name: string;
2273
+ title: string;
2274
+ description?: string;
2275
+ enabled: boolean;
2276
+ isDefault: boolean;
2277
+ appearance: WidgetAppearance;
2278
+ behavior: WidgetBehavior;
2279
+ security: WidgetSecurity;
2280
+ createdAt: string;
2281
+ updatedAt: string;
2282
+ createdBy?: string;
2283
+ }
2284
+ /**
2285
+ * AgentWidget NATS Subjects
2286
+ */
2287
+ declare const AgentWidgetsCreateSubject = "agents.widgets.create";
2288
+ /**
2289
+ * AgentWidget NATS Subjects
2290
+ */
2291
+ declare const AgentWidgetsGetSubject = "agents.widgets.get";
2292
+ /**
2293
+ * AgentWidget NATS Subjects
2294
+ */
2295
+ declare const AgentWidgetsGetByWidgetID = "agents.widgets.get-by-widget-id";
2296
+ /**
2297
+ * AgentWidget NATS Subjects
2298
+ */
2299
+ declare const AgentWidgetsUpdateSubject = "agents.widgets.update";
2300
+ /**
2301
+ * AgentWidget NATS Subjects
2302
+ */
2303
+ declare const AgentWidgetsDeleteSubject = "agents.widgets.delete";
2304
+ /**
2305
+ * AgentWidget NATS Subjects
2306
+ */
2307
+ declare const AgentWidgetsListSubject = "agents.widgets.list";
2308
+ /**
2309
+ * AgentWidget NATS Subjects
2310
+ */
2311
+ declare const AgentWidgetsSetDefaultSubject = "agents.widgets.set-default";
2312
+ /**
2313
+ * AgentWidget NATS Subjects
2314
+ */
2315
+ declare const AgentWidgetsGetDefaultSubject = "agents.widgets.get-default";
2316
+ /**
2317
+ * CreateAgentWidgetRequest is the request to create a new widget
2318
+ */
2319
+ interface CreateAgentWidgetRequest {
2320
+ orgId: string;
2321
+ agentId: string;
2322
+ widget: AgentWidget;
2323
+ }
2324
+ /**
2325
+ * AgentWidgetResponse is the response for single widget operations
2326
+ */
2327
+ interface AgentWidgetResponse {
2328
+ widget?: AgentWidget;
2329
+ metadata: any;
2330
+ }
2331
+ /**
2332
+ * GetAgentWidgetRequest is the request to get a widget by ID
2333
+ */
2334
+ interface GetAgentWidgetRequest {
2335
+ orgId: string;
2336
+ widgetId: string;
2337
+ }
2338
+ /**
2339
+ * GetWidgetByWidgetIDRequest is the request to get a widget by its embed widget_id
2340
+ */
2341
+ interface GetWidgetByWidgetIDRequest {
2342
+ widgetId: string;
2343
+ }
2344
+ /**
2345
+ * UpdateAgentWidgetRequest is the request to update a widget
2346
+ */
2347
+ interface UpdateAgentWidgetRequest {
2348
+ orgId: string;
2349
+ widget: AgentWidget;
2350
+ }
2351
+ /**
2352
+ * DeleteAgentWidgetRequest is the request to delete a widget
2353
+ */
2354
+ interface DeleteAgentWidgetRequest {
2355
+ orgId: string;
2356
+ widgetId: string;
2357
+ }
2358
+ /**
2359
+ * ListAgentWidgetsRequest is the request to list widgets for an agent
2360
+ */
2361
+ interface ListAgentWidgetsRequest {
2362
+ orgId: string;
2363
+ agentId: string;
2364
+ }
2365
+ /**
2366
+ * ListAgentWidgetsResponse is the response for listing widgets
2367
+ */
2368
+ interface ListAgentWidgetsResponse {
2369
+ widgets: AgentWidget[];
2370
+ metadata: any;
2371
+ }
2372
+ /**
2373
+ * SetDefaultWidgetRequest is the request to set a widget as default
2374
+ */
2375
+ interface SetDefaultWidgetRequest {
2376
+ orgId: string;
2377
+ agentId: string;
2378
+ widgetId: string;
2379
+ }
2380
+ /**
2381
+ * GetDefaultWidgetRequest is the request to get the default widget for an agent
2382
+ */
2383
+ interface GetDefaultWidgetRequest {
2384
+ orgId: string;
2385
+ agentId: string;
2386
+ }
2387
+ /**
2388
+ * PublicWidgetConfig is the config exposed to the widget client (no sensitive data)
2389
+ */
2390
+ interface PublicWidgetConfig {
2391
+ widgetId: string;
2392
+ agentId: string;
2393
+ orgId: string;
2394
+ name: string;
2395
+ title: string;
2396
+ appearance: WidgetAppearance;
2397
+ behavior: WidgetBehavior;
2398
+ }
2399
+
2400
+ export { AgentJobDeleteSubject as $, type Agent as A, AgentExecuteSubject as B, type AgentExecution as C, AgentExportSubject as D, type AgentFilters as E, AgentFromTemplateSubject as F, AgentGetByOrgSubject as G, AgentGetDefaultSubject as H, AgentGetSubject as I, AgentImportSubject as J, AgentInstanceCancelPlanSubject as K, AgentInstanceClearHistorySubject as L, AgentInstanceCreatePlanSubject as M, AgentInstanceCreateSubject as N, AgentInstanceCreatedSubject as O, AgentInstanceDeleteSubject as P, AgentInstanceDeletedSubject as Q, AgentInstanceExecutePlanSubject as R, AgentInstanceGetHistorySubject as S, AgentInstanceGetSubject as T, AgentInstanceListSubject as U, AgentInstancePausePlanSubject as V, AgentInstanceResumePlanSubject as W, AgentInstanceUpdateSubject as X, AgentInstanceUpdatedSubject as Y, type AgentJob as Z, AgentJobCreateSubject as _, type AgentCategory as a, AgentWidgetsGetByWidgetID as a$, AgentJobGetSubject as a0, type AgentJobIDRequest as a1, AgentJobListSubject as a2, AgentJobPauseSubject as a3, type AgentJobResponse as a4, AgentJobResumeSubject as a5, type AgentJobTriggerRequest as a6, type AgentJobTriggerResponse as a7, AgentJobTriggerSubject as a8, AgentJobUpdateSubject as a9, AgentSubTypeDocument as aA, AgentSubTypeReact as aB, type AgentSubTypeTS as aC, AgentSubTypeWorkflow as aD, type AgentSummary as aE, type AgentTemplate as aF, AgentTemplateGetSubject as aG, AgentTemplateListSubject as aH, type AgentTool as aI, type AgentToolConfiguration as aJ, type AgentType as aK, AgentTypeChat as aL, AgentTypeReact as aM, type AgentTypeTS as aN, AgentUpdateOrgSubject as aO, AgentUpdateSubject as aP, AgentUpdatedSubject as aQ, AgentVersionActivateSubject as aR, AgentVersionActivatedSubject as aS, AgentVersionCreateSubject as aT, AgentVersionCreatedSubject as aU, AgentVersionGetSubject as aV, AgentVersionListSubject as aW, type AgentWidget as aX, type AgentWidgetResponse as aY, AgentWidgetsCreateSubject as aZ, AgentWidgetsDeleteSubject as a_, type AgentJobsListResponse as aa, AgentListSubject as ab, AgentListSummarySubject as ac, AgentReactCreateSubject as ad, AgentReactGetSubject as ae, AgentReactUpdateSubject as af, AgentReactValidateSubject as ag, type AgentResponse as ah, type AgentScope as ai, AgentScopeOrg as aj, type AgentScopeTS as ak, AgentScopeTeam as al, AgentScopeUser as am, AgentSearchSubject as an, type AgentSkill as ao, type AgentSkillConfigResponse as ap, AgentSkillGetConfigSubject as aq, AgentSkillUpdateConfigSubject as ar, type AgentStatus as as, AgentStatusActive as at, AgentStatusArchived as au, AgentStatusDraft as av, AgentStatusInactive as aw, type AgentStatusTS as ax, type AgentSubType as ay, AgentSubTypeChat as az, AgentCategoryDevelopment as b, type GetSubAgentsByIDsResponse as b$, AgentWidgetsGetDefaultSubject as b0, AgentWidgetsGetSubject as b1, AgentWidgetsListSubject as b2, AgentWidgetsSetDefaultSubject as b3, AgentWidgetsUpdateSubject as b4, type ArtifactRef as b5, type CSATAnswer as b6, type CSATConfig as b7, type CSATQuestion as b8, type CSATResponse as b9, ExecutionModeAsync as bA, ExecutionModeAsyncClient as bB, ExecutionModeSync as bC, type ExecutionModeTS as bD, type ExecutionPlan as bE, type ExecutionResponse as bF, type ExecutionStatus as bG, ExecutionStatusCompleted as bH, ExecutionStatusFailed as bI, ExecutionStatusPending as bJ, ExecutionStatusRunning as bK, ExecutionStatusSkipped as bL, type ExecutionStatusTS as bM, ExecutionTTLHours as bN, ExecutionsTTLCleanupSubject as bO, type GetAgentRequest as bP, type GetAgentSkillConfigRequest as bQ, type GetAgentWidgetRequest as bR, type GetDefaultAgentRequest as bS, type GetDefaultWidgetRequest as bT, type GetExecutionRequest as bU, type GetSkillRequest as bV, type GetSkillUserConfigRequest as bW, type GetSkillsByIDsRequest as bX, type GetSkillsByIDsResponse as bY, type GetSubAgentRequest as bZ, type GetSubAgentsByIDsRequest as b_, type CSATSurvey as ba, ChatAgentExecuteSubject as bb, ChatAgentStatusSubject as bc, type CreateAgentJobRequest as bd, type CreateAgentRequest as be, type CreateAgentWidgetRequest as bf, type CreateExecutionPlanRequest as bg, type CreateExecutionPlanResponse as bh, type CreateSkillRequest as bi, type CreateSubAgentRequest as bj, type CreateToolDefinitionRequest as bk, type CustomizableField as bl, type DefaultDefinitions as bm, type DeleteAgentRequest as bn, type DeleteAgentWidgetRequest as bo, type DeleteSkillRequest as bp, type DeleteSkillUserConfigRequest as bq, type DeleteSubAgentRequest as br, type DeleteToolDefinitionRequest as bs, type ExecuteJobRequest as bt, type ExecutePlanRequest as bu, type ExecutePlanResponse as bv, type ExecuteToolRequest as bw, type ExecuteToolResponse as bx, type ExecutionCompletedEvent as by, type ExecutionMode as bz, AgentCategoryFinance as c, PlanStatusPendingApproval as c$, type GetToolDefinitionRequest as c0, type GetToolDefinitionsByIDsRequest as c1, type GetToolDefinitionsByIDsResponse as c2, type GetWidgetByWidgetIDRequest as c3, type GetWidgetConfigRequest as c4, type GetWidgetConfigResponse as c5, type HandoffConfig as c6, type IntegrationProviderTS as c7, type IntegrationRequirement as c8, type IntegrationTypeTS as c9, type ListAgentWidgetsRequest as cA, type ListAgentWidgetsResponse as cB, type ListAgentsRequest as cC, type ListAgentsResponse as cD, type ListAgentsSummaryRequest as cE, type ListAgentsSummaryResponse as cF, type ListExecutionsByAgentRequest as cG, type ListExecutionsByJobRequest as cH, type ListExecutionsResponse as cI, type ListSkillUserConfigRequest as cJ, type ListSkillsRequest as cK, type ListSubAgentsRequest as cL, type ListToolDefinitionsRequest as cM, type MCPServerConfig as cN, MaxExecutions as cO, type MergeConfig as cP, type MergeStrategy as cQ, MergeStrategyAppend as cR, MergeStrategyMerge as cS, MergeStrategyReplace as cT, type MergeStrategyTS as cU, type PlanApprovalConfig as cV, type PlanStatus as cW, PlanStatusApproved as cX, PlanStatusCancelled as cY, PlanStatusCompleted as cZ, PlanStatusExecuting as c_, type JobExecution as ca, JobExecutionGetSubject as cb, JobExecutionListSubject as cc, type JobExecutionResult as cd, type JobExecutionStatus as ce, JobExecutionStatusFailed as cf, JobExecutionStatusRunning as cg, JobExecutionStatusSuccess as ch, type JobExecutionStatusTS as ci, JobExecutionStatusTimedOut as cj, type JobFrequency as ck, JobFrequencyOneTime as cl, JobFrequencySchedule as cm, type JobFrequencyTS as cn, type JobScope as co, JobScopeOrg as cp, JobScopePrivate as cq, type JobScopeTS as cr, JobScopeTeam as cs, type JobStatus as ct, JobStatusActive as cu, JobStatusDisabled as cv, JobStatusExecuting as cw, JobStatusPaused as cx, type JobStatusTS as cy, type ListAgentJobsRequest as cz, AgentCategoryGeneral as d, SubAgentsUpdatedSubject as d$, PlanStatusRejected as d0, type PlanStatusTS as d1, type PlannedStep as d2, type ProcessJobTriggerResult as d3, type PublicWidgetConfig as d4, type PublisherType as d5, PublisherTypeEloquent as d6, PublisherTypePartner as d7, type PublisherTypeTS as d8, type ReactAgentConfig as d9, type SkillUserConfigListResponse as dA, SkillUserConfigListSubject as dB, type SkillUserConfigResponse as dC, SkillUserConfigUpdateSubject as dD, SkillsCreateSubject as dE, SkillsCreatedSubject as dF, SkillsDeleteSubject as dG, SkillsDeletedSubject as dH, SkillsGetByIDsSubject as dI, SkillsGetSubject as dJ, type SkillsListResponse as dK, SkillsListSubject as dL, SkillsUpdateOrgConfigSubject as dM, SkillsUpdateSubject as dN, SkillsUpdatedSubject as dO, type SubAgent as dP, type SubAgentResponse as dQ, SubAgentsCreateSubject as dR, SubAgentsCreatedSubject as dS, SubAgentsDeleteSubject as dT, SubAgentsDeletedSubject as dU, SubAgentsExecuteSubject as dV, SubAgentsGetByIDsSubject as dW, SubAgentsGetSubject as dX, type SubAgentsListResponse as dY, SubAgentsListSubject as dZ, SubAgentsUpdateSubject as d_, ReactAgentExecuteSubject as da, ReactAgentStatusSubject as db, ReactAgentStopSubject as dc, type ResolveSkillConfigRequest as dd, type ResolveSkillConfigResponse as de, type RetryPolicy as df, RuntimeJobCompletedSubject as dg, RuntimeJobExecuteSubject as dh, type SaveWidgetConfigRequest as di, type SaveWidgetConfigResponse as dj, type SetDefaultWidgetRequest as dk, type Skill as dl, type SkillCategory as dm, SkillCategoryAnalysis as dn, SkillCategoryCommunication as dp, SkillCategoryCreative as dq, SkillCategoryCustom as dr, SkillCategoryIntegration as ds, SkillCategoryProductivity as dt, type SkillCategoryTS as du, SkillResolveConfigSubject as dv, type SkillResponse as dw, type SkillUserConfig as dx, SkillUserConfigDeleteSubject as dy, SkillUserConfigGetSubject as dz, AgentCategoryHR as e, SubAgentsValidateSubject as e0, type TTLCleanupRequest as e1, type TTLCleanupResponse as e2, type TemplateCategoryCount as e3, type TemplateFilters as e4, type TemplateStatus as e5, TemplateStatusDraft as e6, TemplateStatusPublished as e7, type TemplateStatusTS as e8, type ToolConfig as e9, type UpdateAgentRequest as eA, type UpdateAgentSkillConfigRequest as eB, type UpdateAgentWidgetRequest as eC, type UpdateOrgAgentsRequest as eD, type UpdateOrgAgentsResponse as eE, type UpdateSkillOrgConfigRequest as eF, type UpdateSkillRequest as eG, type UpdateSkillUserConfigRequest as eH, type UpdateSubAgentRequest as eI, type UpdateToolDefinitionRequest as eJ, type UserSuggestedAction as eK, type UserSuggestedActionsConfig as eL, type UserSuggestedActionsRequest as eM, type UserSuggestedActionsResponse as eN, type ValidationError as eO, type ValidationErrors as eP, type WidgetAppearance as eQ, type WidgetBehavior as eR, type WidgetConfig as eS, WidgetConfigGetByAgentSubject as eT, WidgetConfigSaveSubject as eU, type WidgetSecurity as eV, WorkflowAgentGetSubject as eW, WorkflowAgentUpdateSubject as eX, type ToolDefinition as ea, type ToolDefinitionResponse as eb, ToolDefinitionsCreateSubject as ec, ToolDefinitionsCreatedSubject as ed, ToolDefinitionsDeleteSubject as ee, ToolDefinitionsDeletedSubject as ef, ToolDefinitionsExecuteSubject as eg, ToolDefinitionsGetByIDsSubject as eh, ToolDefinitionsGetSubject as ei, type ToolDefinitionsListResponse as ej, ToolDefinitionsListSubject as ek, ToolDefinitionsUpdateSubject as el, ToolDefinitionsUpdatedSubject as em, ToolDefinitionsValidateSubject as en, type ToolExecution as eo, type ToolExecutionPolicy as ep, type ToolExecutionProgress as eq, type ToolExecutionStatus as er, ToolExecutionStatusCompleted as es, ToolExecutionStatusExecuting as et, ToolExecutionStatusFailed as eu, ToolExecutionStatusSkipped as ev, ToolExecutionStatusStarted as ew, type ToolExecutionStatusTS as ex, ToolExecutionStatusTimeout as ey, type UpdateAgentJobRequest as ez, AgentCategoryMarketing as f, AgentCategoryProductivity as g, AgentCategoryResearch as h, AgentCategorySales as i, AgentCategorySupport as j, type AgentCategoryTS as k, AgentCategoryWriting as l, AgentChatCreateSubject as m, AgentChatGetSubject as n, AgentChatUpdateSubject as o, AgentChatValidateSubject as p, AgentCloneSubject as q, type AgentContext as r, type AgentContextConfig as s, AgentCreateSubject as t, AgentCreatedSubject as u, AgentDeleteSubject as v, AgentDeletedSubject as w, AgentEnsureDefaultSubject as x, AgentExecuteStatusSubject as y, AgentExecuteStopSubject as z };