@defai.digital/agent-domain 13.0.3

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 (77) hide show
  1. package/LICENSE +214 -0
  2. package/dist/enhanced-executor.d.ts +170 -0
  3. package/dist/enhanced-executor.d.ts.map +1 -0
  4. package/dist/enhanced-executor.js +1072 -0
  5. package/dist/enhanced-executor.js.map +1 -0
  6. package/dist/executor.d.ts +120 -0
  7. package/dist/executor.d.ts.map +1 -0
  8. package/dist/executor.js +929 -0
  9. package/dist/executor.js.map +1 -0
  10. package/dist/index.d.ts +25 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +34 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/loader.d.ts +50 -0
  15. package/dist/loader.d.ts.map +1 -0
  16. package/dist/loader.js +160 -0
  17. package/dist/loader.js.map +1 -0
  18. package/dist/persistent-registry.d.ts +105 -0
  19. package/dist/persistent-registry.d.ts.map +1 -0
  20. package/dist/persistent-registry.js +183 -0
  21. package/dist/persistent-registry.js.map +1 -0
  22. package/dist/production-factories.d.ts +70 -0
  23. package/dist/production-factories.d.ts.map +1 -0
  24. package/dist/production-factories.js +434 -0
  25. package/dist/production-factories.js.map +1 -0
  26. package/dist/prompt-executor.d.ts +119 -0
  27. package/dist/prompt-executor.d.ts.map +1 -0
  28. package/dist/prompt-executor.js +211 -0
  29. package/dist/prompt-executor.js.map +1 -0
  30. package/dist/registry.d.ts +57 -0
  31. package/dist/registry.d.ts.map +1 -0
  32. package/dist/registry.js +123 -0
  33. package/dist/registry.js.map +1 -0
  34. package/dist/selection-service.d.ts +74 -0
  35. package/dist/selection-service.d.ts.map +1 -0
  36. package/dist/selection-service.js +322 -0
  37. package/dist/selection-service.js.map +1 -0
  38. package/dist/selector.d.ts +51 -0
  39. package/dist/selector.d.ts.map +1 -0
  40. package/dist/selector.js +249 -0
  41. package/dist/selector.js.map +1 -0
  42. package/dist/stub-checkpoint.d.ts +23 -0
  43. package/dist/stub-checkpoint.d.ts.map +1 -0
  44. package/dist/stub-checkpoint.js +137 -0
  45. package/dist/stub-checkpoint.js.map +1 -0
  46. package/dist/stub-delegation-tracker.d.ts +25 -0
  47. package/dist/stub-delegation-tracker.d.ts.map +1 -0
  48. package/dist/stub-delegation-tracker.js +118 -0
  49. package/dist/stub-delegation-tracker.js.map +1 -0
  50. package/dist/stub-parallel-executor.d.ts +19 -0
  51. package/dist/stub-parallel-executor.d.ts.map +1 -0
  52. package/dist/stub-parallel-executor.js +176 -0
  53. package/dist/stub-parallel-executor.js.map +1 -0
  54. package/dist/types.d.ts +614 -0
  55. package/dist/types.d.ts.map +1 -0
  56. package/dist/types.js +15 -0
  57. package/dist/types.js.map +1 -0
  58. package/dist/workflow-templates.d.ts +117 -0
  59. package/dist/workflow-templates.d.ts.map +1 -0
  60. package/dist/workflow-templates.js +342 -0
  61. package/dist/workflow-templates.js.map +1 -0
  62. package/package.json +51 -0
  63. package/src/enhanced-executor.ts +1395 -0
  64. package/src/executor.ts +1153 -0
  65. package/src/index.ts +172 -0
  66. package/src/loader.ts +191 -0
  67. package/src/persistent-registry.ts +235 -0
  68. package/src/production-factories.ts +613 -0
  69. package/src/prompt-executor.ts +310 -0
  70. package/src/registry.ts +167 -0
  71. package/src/selection-service.ts +411 -0
  72. package/src/selector.ts +299 -0
  73. package/src/stub-checkpoint.ts +187 -0
  74. package/src/stub-delegation-tracker.ts +161 -0
  75. package/src/stub-parallel-executor.ts +224 -0
  76. package/src/types.ts +784 -0
  77. package/src/workflow-templates.ts +393 -0
@@ -0,0 +1,614 @@
1
+ /**
2
+ * Agent Domain Types
3
+ */
4
+ import { type AgentProfile, type AgentResult, type AgentRunOptions, type AgentError, type AgentEvent, type AgentWorkflowStep, type ToolExecutionResult, type DelegationContext, type DelegationCheckResult, type DelegationResult, type DelegationRequest as ContractDelegationRequest } from '@defai.digital/contracts';
5
+ /**
6
+ * Agent registry interface
7
+ */
8
+ export interface AgentRegistry {
9
+ /**
10
+ * Register a new agent profile
11
+ */
12
+ register(profile: AgentProfile): Promise<void>;
13
+ /**
14
+ * Get an agent by ID
15
+ */
16
+ get(agentId: string): Promise<AgentProfile | undefined>;
17
+ /**
18
+ * List all registered agents
19
+ */
20
+ list(filter?: AgentFilter): Promise<AgentProfile[]>;
21
+ /**
22
+ * Update an agent profile
23
+ */
24
+ update(agentId: string, updates: Partial<AgentProfile>): Promise<void>;
25
+ /**
26
+ * Remove an agent
27
+ */
28
+ remove(agentId: string): Promise<void>;
29
+ /**
30
+ * Check if an agent exists
31
+ */
32
+ exists(agentId: string): Promise<boolean>;
33
+ }
34
+ /**
35
+ * Filter options for listing agents
36
+ */
37
+ export interface AgentFilter {
38
+ team?: string;
39
+ tags?: string[];
40
+ enabled?: boolean;
41
+ capability?: string;
42
+ }
43
+ /**
44
+ * Agent executor interface
45
+ */
46
+ export interface AgentExecutor {
47
+ /**
48
+ * Execute an agent with the given input
49
+ */
50
+ execute(agentId: string, input: unknown, options?: AgentRunOptions): Promise<AgentResult>;
51
+ /**
52
+ * Cancel a running agent execution
53
+ */
54
+ cancel(executionId: string): Promise<void>;
55
+ /**
56
+ * Get execution status
57
+ */
58
+ getStatus(executionId: string): Promise<ExecutionStatus | undefined>;
59
+ }
60
+ /**
61
+ * Execution status
62
+ */
63
+ export interface ExecutionStatus {
64
+ executionId: string;
65
+ agentId: string;
66
+ status: 'running' | 'completed' | 'failed' | 'cancelled';
67
+ currentStep: string | undefined;
68
+ startedAt: string;
69
+ completedAt: string | undefined;
70
+ progress: ExecutionProgress | undefined;
71
+ }
72
+ /**
73
+ * Execution progress
74
+ */
75
+ export interface ExecutionProgress {
76
+ totalSteps: number;
77
+ completedSteps: number;
78
+ currentStepName: string | undefined;
79
+ percentComplete: number;
80
+ }
81
+ /**
82
+ * Delegation request
83
+ */
84
+ export interface DelegationRequest {
85
+ fromAgent: string;
86
+ toAgent: string;
87
+ task: string;
88
+ input: unknown;
89
+ timeout?: number;
90
+ context?: Record<string, unknown>;
91
+ }
92
+ /**
93
+ * Delegation tracker interface - port for tracking delegation chains
94
+ *
95
+ * Implementations provided via DelegationTrackerFactory in AgentDomainConfig.
96
+ * This allows the agent-domain to remain independent of execution implementations.
97
+ *
98
+ * Invariants:
99
+ * - INV-DT-001: Depth never exceeds maxDepth
100
+ * - INV-DT-002: No circular delegations allowed
101
+ */
102
+ export interface DelegationTrackerPort {
103
+ /** Get current delegation context */
104
+ getContext(): DelegationContext;
105
+ /** Check if delegation to target agent is allowed */
106
+ canDelegate(toAgentId: string): DelegationCheckResult;
107
+ /** Create delegation request */
108
+ createDelegationRequest(toAgentId: string, task: string, input?: unknown, timeout?: number): ContractDelegationRequest | null;
109
+ /** Create child context for delegated agent */
110
+ createChildContext(toAgentId: string): DelegationContext;
111
+ /** Record delegation result */
112
+ recordResult(result: DelegationResult): void;
113
+ /** Get delegation history */
114
+ getHistory(): DelegationResult[];
115
+ /** Check if we're at the root of delegation chain */
116
+ isRoot(): boolean;
117
+ /** Get remaining delegation depth */
118
+ getRemainingDepth(): number;
119
+ }
120
+ /**
121
+ * Factory function type for creating delegation trackers
122
+ * Injected via AgentDomainConfig for dependency inversion
123
+ */
124
+ export type DelegationTrackerFactory = (agentId: string, parentContext: DelegationContext | undefined, maxDepth: number) => DelegationTrackerPort;
125
+ /**
126
+ * Checkpoint storage port interface
127
+ *
128
+ * Implementations provided via CheckpointStorageFactory in config.
129
+ * INV-CP-001: Checkpoints contain all data needed to resume
130
+ */
131
+ export interface CheckpointStoragePort {
132
+ /** Save a checkpoint */
133
+ save(checkpoint: Checkpoint): Promise<void>;
134
+ /** Load a checkpoint by ID */
135
+ load(checkpointId: string): Promise<Checkpoint | null>;
136
+ /** Load latest checkpoint for an agent */
137
+ loadLatest(agentId: string, sessionId?: string): Promise<Checkpoint | null>;
138
+ /** List checkpoints for an agent */
139
+ list(agentId: string, sessionId?: string): Promise<Checkpoint[]>;
140
+ /** Delete a checkpoint */
141
+ delete(checkpointId: string): Promise<boolean>;
142
+ /** Delete expired checkpoints */
143
+ deleteExpired(): Promise<number>;
144
+ }
145
+ /**
146
+ * Checkpoint data structure
147
+ */
148
+ export interface Checkpoint {
149
+ checkpointId: string;
150
+ agentId: string;
151
+ sessionId?: string | undefined;
152
+ stepIndex: number;
153
+ stepId: string;
154
+ previousOutputs: Record<string, unknown>;
155
+ metadata?: Record<string, unknown> | undefined;
156
+ createdAt: string;
157
+ expiresAt?: string | undefined;
158
+ }
159
+ /**
160
+ * Checkpoint manager port interface
161
+ *
162
+ * Manages checkpoints for a specific agent execution.
163
+ * INV-CP-002: Resume starts from step after checkpoint
164
+ */
165
+ export interface CheckpointManagerPort {
166
+ /** Get configuration */
167
+ getConfig(): import('@defai.digital/contracts').CheckpointConfig;
168
+ /** Check if should create checkpoint at step index */
169
+ shouldCheckpoint(stepIndex: number): boolean;
170
+ /** Create a checkpoint */
171
+ createCheckpoint(stepIndex: number, stepId: string, previousOutputs: Record<string, unknown>, metadata?: Record<string, unknown>): Promise<Checkpoint>;
172
+ /** Get latest checkpoint */
173
+ getLatestCheckpoint(): Promise<Checkpoint | null>;
174
+ /** Get resume context from checkpoint */
175
+ getResumeContext(checkpointId: string): Promise<{
176
+ startFromStep: number;
177
+ previousOutputs: Record<string, unknown>;
178
+ } | null>;
179
+ /** Clean up expired checkpoints */
180
+ cleanup(): Promise<number>;
181
+ }
182
+ /**
183
+ * Factory for creating checkpoint storage
184
+ */
185
+ export type CheckpointStorageFactory = () => CheckpointStoragePort;
186
+ /**
187
+ * Factory for creating checkpoint managers
188
+ */
189
+ export type CheckpointManagerFactory = (agentId: string, sessionId: string | undefined, storage: CheckpointStoragePort, config: import('@defai.digital/contracts').CheckpointConfig) => CheckpointManagerPort;
190
+ /**
191
+ * Step executor function for parallel execution
192
+ */
193
+ export type ParallelStepExecutor = (step: AgentWorkflowStep, previousOutputs: Record<string, unknown>) => Promise<unknown>;
194
+ /**
195
+ * Result from parallel step execution
196
+ */
197
+ export interface ParallelStepResult {
198
+ stepId: string;
199
+ success: boolean;
200
+ output?: unknown;
201
+ error?: string;
202
+ durationMs: number;
203
+ cancelled?: boolean;
204
+ }
205
+ /**
206
+ * Result from parallel group execution
207
+ */
208
+ export interface ParallelGroupResult {
209
+ stepResults: ParallelStepResult[];
210
+ totalDurationMs: number;
211
+ allSucceeded: boolean;
212
+ failedCount: number;
213
+ cancelledCount: number;
214
+ }
215
+ /**
216
+ * Parallel executor port interface
217
+ *
218
+ * Executes workflow steps in parallel while respecting dependencies.
219
+ * INV-PE-001: Independent steps execute concurrently
220
+ * INV-PE-002: Dependencies honored (DAG ordering)
221
+ * INV-PE-003: Concurrency limit respected
222
+ */
223
+ export interface ParallelExecutorPort {
224
+ /** Get configuration */
225
+ getConfig(): import('@defai.digital/contracts').ParallelExecutionConfig;
226
+ /** Execute a group of steps in parallel */
227
+ executeGroup(steps: AgentWorkflowStep[], executor: ParallelStepExecutor, previousOutputs?: Record<string, unknown>): Promise<ParallelGroupResult>;
228
+ /** Build execution layers from steps (DAG analysis) */
229
+ buildExecutionLayers(steps: AgentWorkflowStep[]): AgentWorkflowStep[][];
230
+ /** Cancel ongoing execution */
231
+ cancel(): void;
232
+ }
233
+ /**
234
+ * Factory for creating parallel executors
235
+ */
236
+ export type ParallelExecutorFactory = (config: Partial<import('@defai.digital/contracts').ParallelExecutionConfig>) => ParallelExecutorPort;
237
+ /**
238
+ * Delegation manager interface
239
+ */
240
+ export interface DelegationManager {
241
+ /**
242
+ * Delegate a task to another agent
243
+ */
244
+ delegate(request: DelegationRequest): Promise<DelegationResult>;
245
+ /**
246
+ * Check if delegation is allowed
247
+ */
248
+ canDelegate(fromAgent: string, toAgent: string, depth: number): boolean;
249
+ /**
250
+ * Get current delegation depth
251
+ */
252
+ getDepth(executionId: string): number;
253
+ }
254
+ /**
255
+ * Event handler for agent events
256
+ */
257
+ export type AgentEventHandler = (event: AgentEvent) => void | Promise<void>;
258
+ /**
259
+ * Agent event emitter interface
260
+ */
261
+ export interface AgentEventEmitter {
262
+ /**
263
+ * Subscribe to agent events
264
+ */
265
+ on(type: AgentEvent['type'] | '*', handler: AgentEventHandler): void;
266
+ /**
267
+ * Unsubscribe from agent events
268
+ */
269
+ off(type: AgentEvent['type'] | '*', handler: AgentEventHandler): void;
270
+ /**
271
+ * Emit an agent event
272
+ */
273
+ emit(event: AgentEvent): void;
274
+ }
275
+ /**
276
+ * Step executor function type
277
+ */
278
+ export type StepExecutorFn = (step: AgentWorkflowStep, context: StepExecutionContext) => Promise<StepExecutionResult>;
279
+ /**
280
+ * Step execution context
281
+ */
282
+ export interface StepExecutionContext {
283
+ agentId: string;
284
+ executionId: string;
285
+ sessionId: string | undefined;
286
+ input: unknown;
287
+ previousOutputs: Record<string, unknown>;
288
+ memory: unknown[] | undefined;
289
+ provider: string | undefined;
290
+ model: string | undefined;
291
+ /**
292
+ * Delegation context for tracking delegation depth and chain
293
+ * INV-DT-001: Used to enforce max delegation depth
294
+ * INV-DT-002: Used to prevent circular delegations
295
+ */
296
+ delegationContext: import('@defai.digital/contracts').DelegationContext | undefined;
297
+ }
298
+ /**
299
+ * Step execution result
300
+ */
301
+ export interface StepExecutionResult {
302
+ success: boolean;
303
+ output?: unknown;
304
+ error: AgentError | undefined;
305
+ durationMs: number;
306
+ retryCount: number;
307
+ }
308
+ /**
309
+ * Prompt execution request
310
+ */
311
+ export interface PromptExecutionRequest {
312
+ /**
313
+ * The prompt text to send to the LLM
314
+ */
315
+ prompt: string;
316
+ /**
317
+ * System prompt (agent instructions)
318
+ */
319
+ systemPrompt?: string | undefined;
320
+ /**
321
+ * Provider to use (e.g., 'claude', 'gemini')
322
+ */
323
+ provider?: string | undefined;
324
+ /**
325
+ * Model to use (if not specified, provider default is used)
326
+ */
327
+ model?: string | undefined;
328
+ /**
329
+ * Maximum tokens to generate
330
+ */
331
+ maxTokens?: number | undefined;
332
+ /**
333
+ * Temperature for sampling (0-2)
334
+ */
335
+ temperature?: number | undefined;
336
+ /**
337
+ * Request timeout in milliseconds
338
+ */
339
+ timeout?: number | undefined;
340
+ }
341
+ /**
342
+ * Prompt execution response
343
+ */
344
+ export interface PromptExecutionResponse {
345
+ /**
346
+ * Whether execution succeeded
347
+ */
348
+ success: boolean;
349
+ /**
350
+ * Generated content (on success)
351
+ */
352
+ content?: string | undefined;
353
+ /**
354
+ * Error message (on failure)
355
+ */
356
+ error?: string | undefined;
357
+ /**
358
+ * Error code (on failure)
359
+ */
360
+ errorCode?: string | undefined;
361
+ /**
362
+ * Provider used
363
+ */
364
+ provider?: string | undefined;
365
+ /**
366
+ * Model used
367
+ */
368
+ model?: string | undefined;
369
+ /**
370
+ * Execution latency in milliseconds
371
+ */
372
+ latencyMs: number;
373
+ /**
374
+ * Token usage (if available)
375
+ */
376
+ usage?: {
377
+ inputTokens: number;
378
+ outputTokens: number;
379
+ totalTokens: number;
380
+ } | undefined;
381
+ }
382
+ /**
383
+ * Interface for executing prompts via LLM providers
384
+ * This abstraction allows the agent domain to remain independent of provider implementations
385
+ */
386
+ export interface PromptExecutor {
387
+ /**
388
+ * Execute a prompt and return the response
389
+ */
390
+ execute(request: PromptExecutionRequest): Promise<PromptExecutionResponse>;
391
+ /**
392
+ * Check if a provider is available
393
+ */
394
+ isProviderAvailable(providerId: string): Promise<boolean>;
395
+ /**
396
+ * Get list of available providers
397
+ */
398
+ getAvailableProviders(): Promise<string[]>;
399
+ /**
400
+ * Get the default provider ID
401
+ */
402
+ getDefaultProvider(): string;
403
+ }
404
+ /**
405
+ * Prompt step configuration
406
+ */
407
+ export interface PromptStepConfig {
408
+ /**
409
+ * The prompt template (supports ${variable} substitution)
410
+ */
411
+ prompt?: string | undefined;
412
+ /**
413
+ * System prompt override (defaults to agent.systemPrompt)
414
+ */
415
+ systemPrompt?: string | undefined;
416
+ /**
417
+ * Provider to use
418
+ */
419
+ provider?: string | undefined;
420
+ /**
421
+ * Model to use
422
+ */
423
+ model?: string | undefined;
424
+ /**
425
+ * Maximum tokens to generate
426
+ */
427
+ maxTokens?: number | undefined;
428
+ /**
429
+ * Temperature for sampling
430
+ */
431
+ temperature?: number | undefined;
432
+ /**
433
+ * Timeout for this step
434
+ */
435
+ timeout?: number | undefined;
436
+ }
437
+ /**
438
+ * Tool executor interface
439
+ *
440
+ * Bridges agent/workflow execution to MCP tools.
441
+ * Allows tool steps to execute real tools without direct dependency on mcp-server.
442
+ *
443
+ * Invariants:
444
+ * - INV-TOOL-001: Tool execution must validate inputs before execution
445
+ * - INV-TOOL-002: Tool results must be immutable (frozen) after creation
446
+ * - INV-TOOL-003: Unknown tools must return error, not throw
447
+ */
448
+ export interface ToolExecutor {
449
+ /**
450
+ * Execute a tool by name with the given arguments
451
+ */
452
+ execute(toolName: string, args: Record<string, unknown>): Promise<ToolExecutionResult>;
453
+ /**
454
+ * Check if a tool is available
455
+ */
456
+ isToolAvailable(toolName: string): boolean;
457
+ /**
458
+ * Get list of available tool names
459
+ */
460
+ getAvailableTools(): string[];
461
+ }
462
+ /**
463
+ * Ability manager interface (from ability-domain)
464
+ * Used to inject abilities into agent prompts
465
+ */
466
+ export interface AbilityManagerLike {
467
+ /**
468
+ * Inject abilities into agent context
469
+ */
470
+ injectAbilities(agentId: string, task: string, coreAbilities?: string[], options?: {
471
+ maxAbilities?: number;
472
+ maxTokens?: number;
473
+ includeMetadata?: boolean;
474
+ }): Promise<{
475
+ agentId: string;
476
+ injectedAbilities: string[];
477
+ combinedContent: string;
478
+ tokenCount?: number | undefined;
479
+ truncated: boolean;
480
+ }>;
481
+ }
482
+ /**
483
+ * Agent domain configuration
484
+ */
485
+ export interface AgentDomainConfig {
486
+ maxDelegationDepth: number;
487
+ defaultTimeout: number;
488
+ enableCheckpoints: boolean;
489
+ eventBufferSize: number;
490
+ /**
491
+ * Default provider for prompt execution
492
+ */
493
+ defaultProvider?: string | undefined;
494
+ /**
495
+ * Prompt executor for real LLM calls (if not provided, uses stub executor)
496
+ * NOTE: In production mode (NODE_ENV=production or AX_MODE=production),
497
+ * a real executor must be provided or an error will be thrown.
498
+ */
499
+ promptExecutor?: PromptExecutor | undefined;
500
+ /**
501
+ * Tool executor for executing MCP tools from workflow/agent steps.
502
+ * If not provided, tool steps will return placeholder results.
503
+ * NOTE: In production mode, a real executor should be provided.
504
+ *
505
+ * Invariants:
506
+ * - INV-TOOL-001: Tool execution validates inputs
507
+ * - INV-TOOL-002: Tool results are immutable
508
+ * - INV-TOOL-003: Unknown tools return errors gracefully
509
+ */
510
+ toolExecutor?: ToolExecutor | undefined;
511
+ /**
512
+ * Ability manager for injecting abilities into prompts (optional)
513
+ * INV-AGT-ABL-001: When provided, abilities are injected before prompt execution
514
+ */
515
+ abilityManager?: AbilityManagerLike | undefined;
516
+ /**
517
+ * Enable ability injection for prompt steps (default: true if abilityManager is provided)
518
+ */
519
+ enableAbilityInjection?: boolean | undefined;
520
+ /**
521
+ * Maximum tokens for ability injection (default: 10000)
522
+ */
523
+ maxAbilityTokens?: number | undefined;
524
+ /**
525
+ * Factory for creating delegation trackers (dependency injection)
526
+ * If not provided, uses a stub implementation that logs warnings.
527
+ *
528
+ * Invariants:
529
+ * - INV-DT-001: Depth never exceeds maxDepth
530
+ * - INV-DT-002: No circular delegations allowed
531
+ */
532
+ delegationTrackerFactory?: DelegationTrackerFactory | undefined;
533
+ }
534
+ /**
535
+ * Default agent domain configuration
536
+ */
537
+ export declare const DEFAULT_AGENT_DOMAIN_CONFIG: AgentDomainConfig;
538
+ /**
539
+ * Agent loader interface - loads agent profiles from various sources
540
+ */
541
+ export interface AgentLoader {
542
+ /**
543
+ * Load an agent profile by ID
544
+ */
545
+ load(agentId: string): Promise<AgentProfile | undefined>;
546
+ /**
547
+ * Load all agent profiles from the source
548
+ */
549
+ loadAll(): Promise<AgentProfile[]>;
550
+ /**
551
+ * Check if an agent exists in the source
552
+ */
553
+ exists(agentId: string): Promise<boolean>;
554
+ /**
555
+ * Reload agent profiles from source
556
+ */
557
+ reload(): Promise<void>;
558
+ }
559
+ /**
560
+ * Agent loader configuration
561
+ */
562
+ export interface AgentLoaderConfig {
563
+ /** Directory path to load agents from */
564
+ agentsDir: string;
565
+ /** File extensions to load (default: ['.yaml', '.yml', '.json']) */
566
+ extensions?: string[];
567
+ /** Watch for file changes */
568
+ watch?: boolean;
569
+ }
570
+ /**
571
+ * Agent selection result
572
+ */
573
+ export interface AgentSelectionResult {
574
+ /** Selected agent ID */
575
+ agentId: string;
576
+ /** Confidence score (0-1) */
577
+ confidence: number;
578
+ /** Reason for selection */
579
+ reason: string;
580
+ /** Alternative agents considered */
581
+ alternatives: {
582
+ agentId: string;
583
+ confidence: number;
584
+ }[];
585
+ }
586
+ /**
587
+ * Agent selector interface - selects the best agent for a task
588
+ */
589
+ export interface AgentSelector {
590
+ /**
591
+ * Select the best agent for a task
592
+ */
593
+ select(task: string, context?: AgentSelectionContext): Promise<AgentSelectionResult>;
594
+ /**
595
+ * Get all agents that match a task
596
+ */
597
+ match(task: string, context?: AgentSelectionContext): Promise<AgentSelectionResult[]>;
598
+ }
599
+ /**
600
+ * Context for agent selection
601
+ */
602
+ export interface AgentSelectionContext {
603
+ /** Current team (if any) */
604
+ team?: string;
605
+ /** Required capabilities */
606
+ requiredCapabilities?: string[];
607
+ /** Excluded agents */
608
+ excludeAgents?: string[];
609
+ /** Preferred provider */
610
+ preferredProvider?: string;
611
+ /** Maximum delegation depth */
612
+ maxDelegationDepth?: number;
613
+ }
614
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,IAAI,yBAAyB,EAKpD,MAAM,0BAA0B,CAAC;AAElC;;G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C3B,+BAA+B;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
package/dist/types.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Agent Domain Types
3
+ */
4
+ import { TIMEOUT_PROVIDER_DEFAULT, LIMIT_EVENT_BUFFER, PROVIDER_DEFAULT, LIMIT_DELEGATION_DEPTH, } from '@defai.digital/contracts';
5
+ /**
6
+ * Default agent domain configuration
7
+ */
8
+ export const DEFAULT_AGENT_DOMAIN_CONFIG = {
9
+ maxDelegationDepth: LIMIT_DELEGATION_DEPTH,
10
+ defaultTimeout: TIMEOUT_PROVIDER_DEFAULT,
11
+ enableCheckpoints: true,
12
+ eventBufferSize: LIMIT_EVENT_BUFFER,
13
+ defaultProvider: PROVIDER_DEFAULT,
14
+ };
15
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAYL,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAqpBlC;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC5D,kBAAkB,EAAE,sBAAsB;IAC1C,cAAc,EAAE,wBAAwB;IACxC,iBAAiB,EAAE,IAAI;IACvB,eAAe,EAAE,kBAAkB;IACnC,eAAe,EAAE,gBAAgB;CAClC,CAAC"}