@defai.digital/contracts 13.4.0 → 13.4.2

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 (58) hide show
  1. package/dist/ability/v1/schema.d.ts +19 -19
  2. package/dist/agent/v1/index.d.ts +1 -1
  3. package/dist/agent/v1/index.d.ts.map +1 -1
  4. package/dist/agent/v1/index.js +1 -1
  5. package/dist/agent/v1/index.js.map +1 -1
  6. package/dist/agent/v1/schema.d.ts +414 -66
  7. package/dist/agent/v1/schema.d.ts.map +1 -1
  8. package/dist/agent/v1/schema.js +82 -8
  9. package/dist/agent/v1/schema.js.map +1 -1
  10. package/dist/analysis/v1/schema.d.ts +6 -6
  11. package/dist/config/v1/config.d.ts.map +1 -1
  12. package/dist/config/v1/config.js +3 -3
  13. package/dist/config/v1/config.js.map +1 -1
  14. package/dist/constants.d.ts +20 -0
  15. package/dist/constants.d.ts.map +1 -1
  16. package/dist/constants.js +23 -0
  17. package/dist/constants.js.map +1 -1
  18. package/dist/cross-cutting/v1/saga.d.ts +2 -2
  19. package/dist/design/v1/schema.d.ts +12 -12
  20. package/dist/discussion/v1/temperatures.d.ts +12 -12
  21. package/dist/guard/v1/schema.d.ts +2 -2
  22. package/dist/mcp/v1/runtime/timeout.d.ts.map +1 -1
  23. package/dist/mcp/v1/runtime/timeout.js +2 -1
  24. package/dist/mcp/v1/runtime/timeout.js.map +1 -1
  25. package/dist/mcp/v1/schema.d.ts +2 -2
  26. package/dist/mcp/v1/tools/agent.d.ts +4 -4
  27. package/dist/mcp/v1/tools/tool-list-schemas.d.ts +23 -23
  28. package/dist/mcp/v1/tools/workflow.d.ts +2 -2
  29. package/dist/mcp-ecosystem/v1/schema.d.ts +68 -68
  30. package/dist/ml-lifecycle/v1/schema.d.ts +6 -6
  31. package/dist/orchestration/v1/schema.d.ts +50 -50
  32. package/dist/parallel-execution/v1/schema.d.ts +20 -20
  33. package/dist/review/v1/schema.d.ts +22 -6
  34. package/dist/review/v1/schema.d.ts.map +1 -1
  35. package/dist/review/v1/schema.js +8 -0
  36. package/dist/review/v1/schema.js.map +1 -1
  37. package/dist/semantic-context/v1/schema.d.ts +34 -26
  38. package/dist/semantic-context/v1/schema.d.ts.map +1 -1
  39. package/dist/semantic-context/v1/schema.js +8 -2
  40. package/dist/semantic-context/v1/schema.js.map +1 -1
  41. package/dist/session/v1/schema.d.ts +2 -1
  42. package/dist/session/v1/schema.d.ts.map +1 -1
  43. package/dist/session/v1/schema.js +2 -1
  44. package/dist/session/v1/schema.js.map +1 -1
  45. package/dist/telemetry/v1/schema.d.ts +2 -2
  46. package/dist/trace/v1/schema.d.ts +5 -3
  47. package/dist/trace/v1/schema.d.ts.map +1 -1
  48. package/dist/trace/v1/schema.js +4 -2
  49. package/dist/trace/v1/schema.js.map +1 -1
  50. package/dist/workflow/v1/schema.d.ts +39 -3
  51. package/dist/workflow/v1/schema.d.ts.map +1 -1
  52. package/dist/workflow/v1/schema.js +11 -2
  53. package/dist/workflow/v1/schema.js.map +1 -1
  54. package/dist/workflow-templates/v1/schema.d.ts +18 -18
  55. package/dist/workflow-templates/v1/schema.d.ts.map +1 -1
  56. package/dist/workflow-templates/v1/schema.js +2 -1
  57. package/dist/workflow-templates/v1/schema.js.map +1 -1
  58. package/package.json +1 -1
@@ -67,6 +67,60 @@ export type RedirectRule = z.infer<typeof RedirectRuleSchema>;
67
67
  */
68
68
  export declare const AgentCategorySchema: z.ZodEnum<["orchestrator", "implementer", "reviewer", "specialist", "generalist"]>;
69
69
  export type AgentCategory = z.infer<typeof AgentCategorySchema>;
70
+ /**
71
+ * Task type for agent capability routing
72
+ *
73
+ * Standard task types that agents can declare capabilities for.
74
+ * Used by the capability router to match incoming tasks to workflows.
75
+ *
76
+ * Note: This is distinct from routing/v1 TaskType which is for model routing.
77
+ * This schema is specifically for agent capability-to-workflow mapping.
78
+ */
79
+ export declare const AgentTaskTypeSchema: z.ZodEnum<["code-review", "debugging", "refactoring", "api-design", "implementation", "testing", "documentation", "analysis", "planning", "general"]>;
80
+ export type AgentTaskType = z.infer<typeof AgentTaskTypeSchema>;
81
+ /**
82
+ * Capability mapping - connects task types to workflows
83
+ *
84
+ * Enables agents to declare specialized workflows for different task types.
85
+ * When a task is classified, the agent executor routes to the appropriate
86
+ * workflow and injects relevant abilities.
87
+ *
88
+ * Invariants:
89
+ * - INV-CAP-001: workflowRef must reference valid workflow file
90
+ * - INV-CAP-002: inputSchemaRef, when specified, must be satisfied before execution
91
+ * - INV-CAP-003: Standard workflows (std/*) are shared, not copied per-agent
92
+ * - INV-CAP-004: TaskType classification is deterministic (same input = same taskType)
93
+ * - INV-CAP-005: If no capability matches, agent falls back to default workflow
94
+ */
95
+ export declare const CapabilityMappingSchema: z.ZodObject<{
96
+ /** Task type this capability handles */
97
+ taskType: z.ZodEnum<["code-review", "debugging", "refactoring", "api-design", "implementation", "testing", "documentation", "analysis", "planning", "general"]>;
98
+ /** Reference to workflow file (e.g., "std/code-review" or "custom/my-workflow") */
99
+ workflowRef: z.ZodString;
100
+ /** Input schema name for strict validation (optional, defaults to general) */
101
+ inputSchemaRef: z.ZodOptional<z.ZodString>;
102
+ /** Abilities to inject for this task type */
103
+ abilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
104
+ /** Priority when multiple capabilities match (higher = preferred) */
105
+ priority: z.ZodDefault<z.ZodNumber>;
106
+ /** Description for this capability */
107
+ description: z.ZodOptional<z.ZodString>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ priority: number;
110
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
111
+ workflowRef: string;
112
+ description?: string | undefined;
113
+ abilities?: string[] | undefined;
114
+ inputSchemaRef?: string | undefined;
115
+ }, {
116
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
117
+ workflowRef: string;
118
+ description?: string | undefined;
119
+ priority?: number | undefined;
120
+ abilities?: string[] | undefined;
121
+ inputSchemaRef?: string | undefined;
122
+ }>;
123
+ export type CapabilityMapping = z.infer<typeof CapabilityMappingSchema>;
70
124
  /**
71
125
  * Selection metadata for agent routing
72
126
  *
@@ -238,13 +292,13 @@ export declare const AgentWorkflowStepSchema: z.ZodObject<{
238
292
  name: string;
239
293
  config: Record<string, unknown>;
240
294
  parallel?: boolean | undefined;
295
+ description?: string | undefined;
241
296
  retryPolicy?: {
242
297
  maxAttempts: number;
243
298
  backoffMs: number;
244
299
  backoffMultiplier: number;
245
300
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
246
301
  } | undefined;
247
- description?: string | undefined;
248
302
  dependencies?: string[] | undefined;
249
303
  outputs?: string[] | undefined;
250
304
  timeoutMs?: number | undefined;
@@ -258,6 +312,7 @@ export declare const AgentWorkflowStepSchema: z.ZodObject<{
258
312
  stepId: string;
259
313
  name: string;
260
314
  parallel?: boolean | undefined;
315
+ description?: string | undefined;
261
316
  retryPolicy?: {
262
317
  maxAttempts: number;
263
318
  backoffMs: number;
@@ -265,7 +320,6 @@ export declare const AgentWorkflowStepSchema: z.ZodObject<{
265
320
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
266
321
  } | undefined;
267
322
  config?: Record<string, unknown> | undefined;
268
- description?: string | undefined;
269
323
  dependencies?: string[] | undefined;
270
324
  outputs?: string[] | undefined;
271
325
  timeoutMs?: number | undefined;
@@ -330,13 +384,13 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
330
384
  name: string;
331
385
  config: Record<string, unknown>;
332
386
  parallel?: boolean | undefined;
387
+ description?: string | undefined;
333
388
  retryPolicy?: {
334
389
  maxAttempts: number;
335
390
  backoffMs: number;
336
391
  backoffMultiplier: number;
337
392
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
338
393
  } | undefined;
339
- description?: string | undefined;
340
394
  dependencies?: string[] | undefined;
341
395
  outputs?: string[] | undefined;
342
396
  timeoutMs?: number | undefined;
@@ -350,6 +404,7 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
350
404
  stepId: string;
351
405
  name: string;
352
406
  parallel?: boolean | undefined;
407
+ description?: string | undefined;
353
408
  retryPolicy?: {
354
409
  maxAttempts: number;
355
410
  backoffMs: number;
@@ -357,7 +412,6 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
357
412
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
358
413
  } | undefined;
359
414
  config?: Record<string, unknown> | undefined;
360
- description?: string | undefined;
361
415
  dependencies?: string[] | undefined;
362
416
  outputs?: string[] | undefined;
363
417
  timeoutMs?: number | undefined;
@@ -495,12 +549,64 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
495
549
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
496
550
  createdAt: z.ZodOptional<z.ZodString>;
497
551
  updatedAt: z.ZodOptional<z.ZodString>;
498
- }, "strip", z.ZodTypeAny, {
552
+ /**
553
+ * Capability mappings for task-specific routing
554
+ *
555
+ * When present, agent executor:
556
+ * 1. Classifies incoming task to taskType
557
+ * 2. Finds matching capability mapping
558
+ * 3. Loads referenced workflow
559
+ * 4. Injects specified abilities
560
+ * 5. Executes with context
561
+ *
562
+ * Fallback: If no capability matches, uses agent's default workflow
563
+ *
564
+ * @example
565
+ * capabilityMappings: [
566
+ * {
567
+ * taskType: 'code-review',
568
+ * workflowRef: 'std/code-review',
569
+ * abilities: ['code-review-checklist', 'security-patterns'],
570
+ * priority: 80
571
+ * }
572
+ * ]
573
+ */
574
+ capabilityMappings: z.ZodOptional<z.ZodArray<z.ZodObject<{
575
+ /** Task type this capability handles */
576
+ taskType: z.ZodEnum<["code-review", "debugging", "refactoring", "api-design", "implementation", "testing", "documentation", "analysis", "planning", "general"]>;
577
+ /** Reference to workflow file (e.g., "std/code-review" or "custom/my-workflow") */
578
+ workflowRef: z.ZodString;
579
+ /** Input schema name for strict validation (optional, defaults to general) */
580
+ inputSchemaRef: z.ZodOptional<z.ZodString>;
581
+ /** Abilities to inject for this task type */
582
+ abilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
583
+ /** Priority when multiple capabilities match (higher = preferred) */
584
+ priority: z.ZodDefault<z.ZodNumber>;
585
+ /** Description for this capability */
586
+ description: z.ZodOptional<z.ZodString>;
587
+ }, "strip", z.ZodTypeAny, {
588
+ priority: number;
589
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
590
+ workflowRef: string;
591
+ description?: string | undefined;
592
+ abilities?: string[] | undefined;
593
+ inputSchemaRef?: string | undefined;
594
+ }, {
595
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
596
+ workflowRef: string;
597
+ description?: string | undefined;
598
+ priority?: number | undefined;
599
+ abilities?: string[] | undefined;
600
+ inputSchemaRef?: string | undefined;
601
+ }>, "many">>;
602
+ }, "strict", z.ZodTypeAny, {
499
603
  description: string;
500
604
  enabled: boolean;
501
605
  agentId: string;
502
606
  parallel?: boolean | undefined;
607
+ dependencies?: string[] | undefined;
503
608
  version?: string | undefined;
609
+ tags?: string[] | undefined;
504
610
  metadata?: Record<string, unknown> | undefined;
505
611
  priority?: number | undefined;
506
612
  team?: string | undefined;
@@ -508,20 +614,19 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
508
614
  capabilities?: string[] | undefined;
509
615
  role?: string | undefined;
510
616
  expertise?: string[] | undefined;
511
- tags?: string[] | undefined;
512
617
  workflow?: {
513
618
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
514
619
  stepId: string;
515
620
  name: string;
516
621
  config: Record<string, unknown>;
517
622
  parallel?: boolean | undefined;
623
+ description?: string | undefined;
518
624
  retryPolicy?: {
519
625
  maxAttempts: number;
520
626
  backoffMs: number;
521
627
  backoffMultiplier: number;
522
628
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
523
629
  } | undefined;
524
- description?: string | undefined;
525
630
  dependencies?: string[] | undefined;
526
631
  outputs?: string[] | undefined;
527
632
  timeoutMs?: number | undefined;
@@ -537,7 +642,6 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
537
642
  canWriteToShared?: boolean | undefined;
538
643
  delegationTimeout?: number | undefined;
539
644
  } | undefined;
540
- dependencies?: string[] | undefined;
541
645
  systemPrompt?: string | undefined;
542
646
  createdAt?: string | undefined;
543
647
  updatedAt?: string | undefined;
@@ -577,11 +681,21 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
577
681
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
578
682
  } | undefined;
579
683
  collaboratesWith?: string[] | undefined;
684
+ capabilityMappings?: {
685
+ priority: number;
686
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
687
+ workflowRef: string;
688
+ description?: string | undefined;
689
+ abilities?: string[] | undefined;
690
+ inputSchemaRef?: string | undefined;
691
+ }[] | undefined;
580
692
  }, {
581
693
  description: string;
582
694
  agentId: string;
583
695
  parallel?: boolean | undefined;
696
+ dependencies?: string[] | undefined;
584
697
  version?: string | undefined;
698
+ tags?: string[] | undefined;
585
699
  metadata?: Record<string, unknown> | undefined;
586
700
  enabled?: boolean | undefined;
587
701
  priority?: number | undefined;
@@ -590,12 +704,12 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
590
704
  capabilities?: string[] | undefined;
591
705
  role?: string | undefined;
592
706
  expertise?: string[] | undefined;
593
- tags?: string[] | undefined;
594
707
  workflow?: {
595
708
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
596
709
  stepId: string;
597
710
  name: string;
598
711
  parallel?: boolean | undefined;
712
+ description?: string | undefined;
599
713
  retryPolicy?: {
600
714
  maxAttempts: number;
601
715
  backoffMs: number;
@@ -603,7 +717,6 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
603
717
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
604
718
  } | undefined;
605
719
  config?: Record<string, unknown> | undefined;
606
- description?: string | undefined;
607
720
  dependencies?: string[] | undefined;
608
721
  outputs?: string[] | undefined;
609
722
  timeoutMs?: number | undefined;
@@ -619,7 +732,6 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
619
732
  canWriteToShared?: boolean | undefined;
620
733
  delegationTimeout?: number | undefined;
621
734
  } | undefined;
622
- dependencies?: string[] | undefined;
623
735
  systemPrompt?: string | undefined;
624
736
  createdAt?: string | undefined;
625
737
  updatedAt?: string | undefined;
@@ -659,12 +771,22 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
659
771
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
660
772
  } | undefined;
661
773
  collaboratesWith?: string[] | undefined;
774
+ capabilityMappings?: {
775
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
776
+ workflowRef: string;
777
+ description?: string | undefined;
778
+ priority?: number | undefined;
779
+ abilities?: string[] | undefined;
780
+ inputSchemaRef?: string | undefined;
781
+ }[] | undefined;
662
782
  }>, {
663
783
  description: string;
664
784
  enabled: boolean;
665
785
  agentId: string;
666
786
  parallel?: boolean | undefined;
787
+ dependencies?: string[] | undefined;
667
788
  version?: string | undefined;
789
+ tags?: string[] | undefined;
668
790
  metadata?: Record<string, unknown> | undefined;
669
791
  priority?: number | undefined;
670
792
  team?: string | undefined;
@@ -672,20 +794,19 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
672
794
  capabilities?: string[] | undefined;
673
795
  role?: string | undefined;
674
796
  expertise?: string[] | undefined;
675
- tags?: string[] | undefined;
676
797
  workflow?: {
677
798
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
678
799
  stepId: string;
679
800
  name: string;
680
801
  config: Record<string, unknown>;
681
802
  parallel?: boolean | undefined;
803
+ description?: string | undefined;
682
804
  retryPolicy?: {
683
805
  maxAttempts: number;
684
806
  backoffMs: number;
685
807
  backoffMultiplier: number;
686
808
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
687
809
  } | undefined;
688
- description?: string | undefined;
689
810
  dependencies?: string[] | undefined;
690
811
  outputs?: string[] | undefined;
691
812
  timeoutMs?: number | undefined;
@@ -701,7 +822,6 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
701
822
  canWriteToShared?: boolean | undefined;
702
823
  delegationTimeout?: number | undefined;
703
824
  } | undefined;
704
- dependencies?: string[] | undefined;
705
825
  systemPrompt?: string | undefined;
706
826
  createdAt?: string | undefined;
707
827
  updatedAt?: string | undefined;
@@ -741,11 +861,21 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
741
861
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
742
862
  } | undefined;
743
863
  collaboratesWith?: string[] | undefined;
864
+ capabilityMappings?: {
865
+ priority: number;
866
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
867
+ workflowRef: string;
868
+ description?: string | undefined;
869
+ abilities?: string[] | undefined;
870
+ inputSchemaRef?: string | undefined;
871
+ }[] | undefined;
744
872
  }, {
745
873
  description: string;
746
874
  agentId: string;
747
875
  parallel?: boolean | undefined;
876
+ dependencies?: string[] | undefined;
748
877
  version?: string | undefined;
878
+ tags?: string[] | undefined;
749
879
  metadata?: Record<string, unknown> | undefined;
750
880
  enabled?: boolean | undefined;
751
881
  priority?: number | undefined;
@@ -754,12 +884,12 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
754
884
  capabilities?: string[] | undefined;
755
885
  role?: string | undefined;
756
886
  expertise?: string[] | undefined;
757
- tags?: string[] | undefined;
758
887
  workflow?: {
759
888
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
760
889
  stepId: string;
761
890
  name: string;
762
891
  parallel?: boolean | undefined;
892
+ description?: string | undefined;
763
893
  retryPolicy?: {
764
894
  maxAttempts: number;
765
895
  backoffMs: number;
@@ -767,7 +897,6 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
767
897
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
768
898
  } | undefined;
769
899
  config?: Record<string, unknown> | undefined;
770
- description?: string | undefined;
771
900
  dependencies?: string[] | undefined;
772
901
  outputs?: string[] | undefined;
773
902
  timeoutMs?: number | undefined;
@@ -783,7 +912,6 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
783
912
  canWriteToShared?: boolean | undefined;
784
913
  delegationTimeout?: number | undefined;
785
914
  } | undefined;
786
- dependencies?: string[] | undefined;
787
915
  systemPrompt?: string | undefined;
788
916
  createdAt?: string | undefined;
789
917
  updatedAt?: string | undefined;
@@ -823,6 +951,14 @@ export declare const AgentProfileSchema: z.ZodEffects<z.ZodObject<{
823
951
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
824
952
  } | undefined;
825
953
  collaboratesWith?: string[] | undefined;
954
+ capabilityMappings?: {
955
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
956
+ workflowRef: string;
957
+ description?: string | undefined;
958
+ priority?: number | undefined;
959
+ abilities?: string[] | undefined;
960
+ inputSchemaRef?: string | undefined;
961
+ }[] | undefined;
826
962
  }>;
827
963
  export type AgentProfile = z.infer<typeof AgentProfileSchema>;
828
964
  /**
@@ -1026,13 +1162,13 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1026
1162
  name: string;
1027
1163
  config: Record<string, unknown>;
1028
1164
  parallel?: boolean | undefined;
1165
+ description?: string | undefined;
1029
1166
  retryPolicy?: {
1030
1167
  maxAttempts: number;
1031
1168
  backoffMs: number;
1032
1169
  backoffMultiplier: number;
1033
1170
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1034
1171
  } | undefined;
1035
- description?: string | undefined;
1036
1172
  dependencies?: string[] | undefined;
1037
1173
  outputs?: string[] | undefined;
1038
1174
  timeoutMs?: number | undefined;
@@ -1046,6 +1182,7 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1046
1182
  stepId: string;
1047
1183
  name: string;
1048
1184
  parallel?: boolean | undefined;
1185
+ description?: string | undefined;
1049
1186
  retryPolicy?: {
1050
1187
  maxAttempts: number;
1051
1188
  backoffMs: number;
@@ -1053,7 +1190,6 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1053
1190
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1054
1191
  } | undefined;
1055
1192
  config?: Record<string, unknown> | undefined;
1056
- description?: string | undefined;
1057
1193
  dependencies?: string[] | undefined;
1058
1194
  outputs?: string[] | undefined;
1059
1195
  timeoutMs?: number | undefined;
@@ -1191,12 +1327,64 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1191
1327
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1192
1328
  createdAt: z.ZodOptional<z.ZodString>;
1193
1329
  updatedAt: z.ZodOptional<z.ZodString>;
1194
- }, "strip", z.ZodTypeAny, {
1330
+ /**
1331
+ * Capability mappings for task-specific routing
1332
+ *
1333
+ * When present, agent executor:
1334
+ * 1. Classifies incoming task to taskType
1335
+ * 2. Finds matching capability mapping
1336
+ * 3. Loads referenced workflow
1337
+ * 4. Injects specified abilities
1338
+ * 5. Executes with context
1339
+ *
1340
+ * Fallback: If no capability matches, uses agent's default workflow
1341
+ *
1342
+ * @example
1343
+ * capabilityMappings: [
1344
+ * {
1345
+ * taskType: 'code-review',
1346
+ * workflowRef: 'std/code-review',
1347
+ * abilities: ['code-review-checklist', 'security-patterns'],
1348
+ * priority: 80
1349
+ * }
1350
+ * ]
1351
+ */
1352
+ capabilityMappings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1353
+ /** Task type this capability handles */
1354
+ taskType: z.ZodEnum<["code-review", "debugging", "refactoring", "api-design", "implementation", "testing", "documentation", "analysis", "planning", "general"]>;
1355
+ /** Reference to workflow file (e.g., "std/code-review" or "custom/my-workflow") */
1356
+ workflowRef: z.ZodString;
1357
+ /** Input schema name for strict validation (optional, defaults to general) */
1358
+ inputSchemaRef: z.ZodOptional<z.ZodString>;
1359
+ /** Abilities to inject for this task type */
1360
+ abilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1361
+ /** Priority when multiple capabilities match (higher = preferred) */
1362
+ priority: z.ZodDefault<z.ZodNumber>;
1363
+ /** Description for this capability */
1364
+ description: z.ZodOptional<z.ZodString>;
1365
+ }, "strip", z.ZodTypeAny, {
1366
+ priority: number;
1367
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
1368
+ workflowRef: string;
1369
+ description?: string | undefined;
1370
+ abilities?: string[] | undefined;
1371
+ inputSchemaRef?: string | undefined;
1372
+ }, {
1373
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
1374
+ workflowRef: string;
1375
+ description?: string | undefined;
1376
+ priority?: number | undefined;
1377
+ abilities?: string[] | undefined;
1378
+ inputSchemaRef?: string | undefined;
1379
+ }>, "many">>;
1380
+ }, "strict", z.ZodTypeAny, {
1195
1381
  description: string;
1196
1382
  enabled: boolean;
1197
1383
  agentId: string;
1198
1384
  parallel?: boolean | undefined;
1385
+ dependencies?: string[] | undefined;
1199
1386
  version?: string | undefined;
1387
+ tags?: string[] | undefined;
1200
1388
  metadata?: Record<string, unknown> | undefined;
1201
1389
  priority?: number | undefined;
1202
1390
  team?: string | undefined;
@@ -1204,20 +1392,19 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1204
1392
  capabilities?: string[] | undefined;
1205
1393
  role?: string | undefined;
1206
1394
  expertise?: string[] | undefined;
1207
- tags?: string[] | undefined;
1208
1395
  workflow?: {
1209
1396
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1210
1397
  stepId: string;
1211
1398
  name: string;
1212
1399
  config: Record<string, unknown>;
1213
1400
  parallel?: boolean | undefined;
1401
+ description?: string | undefined;
1214
1402
  retryPolicy?: {
1215
1403
  maxAttempts: number;
1216
1404
  backoffMs: number;
1217
1405
  backoffMultiplier: number;
1218
1406
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1219
1407
  } | undefined;
1220
- description?: string | undefined;
1221
1408
  dependencies?: string[] | undefined;
1222
1409
  outputs?: string[] | undefined;
1223
1410
  timeoutMs?: number | undefined;
@@ -1233,7 +1420,6 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1233
1420
  canWriteToShared?: boolean | undefined;
1234
1421
  delegationTimeout?: number | undefined;
1235
1422
  } | undefined;
1236
- dependencies?: string[] | undefined;
1237
1423
  systemPrompt?: string | undefined;
1238
1424
  createdAt?: string | undefined;
1239
1425
  updatedAt?: string | undefined;
@@ -1273,11 +1459,21 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1273
1459
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1274
1460
  } | undefined;
1275
1461
  collaboratesWith?: string[] | undefined;
1462
+ capabilityMappings?: {
1463
+ priority: number;
1464
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
1465
+ workflowRef: string;
1466
+ description?: string | undefined;
1467
+ abilities?: string[] | undefined;
1468
+ inputSchemaRef?: string | undefined;
1469
+ }[] | undefined;
1276
1470
  }, {
1277
1471
  description: string;
1278
1472
  agentId: string;
1279
1473
  parallel?: boolean | undefined;
1474
+ dependencies?: string[] | undefined;
1280
1475
  version?: string | undefined;
1476
+ tags?: string[] | undefined;
1281
1477
  metadata?: Record<string, unknown> | undefined;
1282
1478
  enabled?: boolean | undefined;
1283
1479
  priority?: number | undefined;
@@ -1286,12 +1482,12 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1286
1482
  capabilities?: string[] | undefined;
1287
1483
  role?: string | undefined;
1288
1484
  expertise?: string[] | undefined;
1289
- tags?: string[] | undefined;
1290
1485
  workflow?: {
1291
1486
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1292
1487
  stepId: string;
1293
1488
  name: string;
1294
1489
  parallel?: boolean | undefined;
1490
+ description?: string | undefined;
1295
1491
  retryPolicy?: {
1296
1492
  maxAttempts: number;
1297
1493
  backoffMs: number;
@@ -1299,7 +1495,6 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1299
1495
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1300
1496
  } | undefined;
1301
1497
  config?: Record<string, unknown> | undefined;
1302
- description?: string | undefined;
1303
1498
  dependencies?: string[] | undefined;
1304
1499
  outputs?: string[] | undefined;
1305
1500
  timeoutMs?: number | undefined;
@@ -1315,7 +1510,6 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1315
1510
  canWriteToShared?: boolean | undefined;
1316
1511
  delegationTimeout?: number | undefined;
1317
1512
  } | undefined;
1318
- dependencies?: string[] | undefined;
1319
1513
  systemPrompt?: string | undefined;
1320
1514
  createdAt?: string | undefined;
1321
1515
  updatedAt?: string | undefined;
@@ -1355,12 +1549,22 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1355
1549
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1356
1550
  } | undefined;
1357
1551
  collaboratesWith?: string[] | undefined;
1552
+ capabilityMappings?: {
1553
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
1554
+ workflowRef: string;
1555
+ description?: string | undefined;
1556
+ priority?: number | undefined;
1557
+ abilities?: string[] | undefined;
1558
+ inputSchemaRef?: string | undefined;
1559
+ }[] | undefined;
1358
1560
  }>, {
1359
1561
  description: string;
1360
1562
  enabled: boolean;
1361
1563
  agentId: string;
1362
1564
  parallel?: boolean | undefined;
1565
+ dependencies?: string[] | undefined;
1363
1566
  version?: string | undefined;
1567
+ tags?: string[] | undefined;
1364
1568
  metadata?: Record<string, unknown> | undefined;
1365
1569
  priority?: number | undefined;
1366
1570
  team?: string | undefined;
@@ -1368,20 +1572,19 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1368
1572
  capabilities?: string[] | undefined;
1369
1573
  role?: string | undefined;
1370
1574
  expertise?: string[] | undefined;
1371
- tags?: string[] | undefined;
1372
1575
  workflow?: {
1373
1576
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1374
1577
  stepId: string;
1375
1578
  name: string;
1376
1579
  config: Record<string, unknown>;
1377
1580
  parallel?: boolean | undefined;
1581
+ description?: string | undefined;
1378
1582
  retryPolicy?: {
1379
1583
  maxAttempts: number;
1380
1584
  backoffMs: number;
1381
1585
  backoffMultiplier: number;
1382
1586
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1383
1587
  } | undefined;
1384
- description?: string | undefined;
1385
1588
  dependencies?: string[] | undefined;
1386
1589
  outputs?: string[] | undefined;
1387
1590
  timeoutMs?: number | undefined;
@@ -1397,7 +1600,6 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1397
1600
  canWriteToShared?: boolean | undefined;
1398
1601
  delegationTimeout?: number | undefined;
1399
1602
  } | undefined;
1400
- dependencies?: string[] | undefined;
1401
1603
  systemPrompt?: string | undefined;
1402
1604
  createdAt?: string | undefined;
1403
1605
  updatedAt?: string | undefined;
@@ -1437,11 +1639,21 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1437
1639
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1438
1640
  } | undefined;
1439
1641
  collaboratesWith?: string[] | undefined;
1642
+ capabilityMappings?: {
1643
+ priority: number;
1644
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
1645
+ workflowRef: string;
1646
+ description?: string | undefined;
1647
+ abilities?: string[] | undefined;
1648
+ inputSchemaRef?: string | undefined;
1649
+ }[] | undefined;
1440
1650
  }, {
1441
1651
  description: string;
1442
1652
  agentId: string;
1443
1653
  parallel?: boolean | undefined;
1654
+ dependencies?: string[] | undefined;
1444
1655
  version?: string | undefined;
1656
+ tags?: string[] | undefined;
1445
1657
  metadata?: Record<string, unknown> | undefined;
1446
1658
  enabled?: boolean | undefined;
1447
1659
  priority?: number | undefined;
@@ -1450,12 +1662,12 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1450
1662
  capabilities?: string[] | undefined;
1451
1663
  role?: string | undefined;
1452
1664
  expertise?: string[] | undefined;
1453
- tags?: string[] | undefined;
1454
1665
  workflow?: {
1455
1666
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1456
1667
  stepId: string;
1457
1668
  name: string;
1458
1669
  parallel?: boolean | undefined;
1670
+ description?: string | undefined;
1459
1671
  retryPolicy?: {
1460
1672
  maxAttempts: number;
1461
1673
  backoffMs: number;
@@ -1463,7 +1675,6 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1463
1675
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1464
1676
  } | undefined;
1465
1677
  config?: Record<string, unknown> | undefined;
1466
- description?: string | undefined;
1467
1678
  dependencies?: string[] | undefined;
1468
1679
  outputs?: string[] | undefined;
1469
1680
  timeoutMs?: number | undefined;
@@ -1479,7 +1690,6 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1479
1690
  canWriteToShared?: boolean | undefined;
1480
1691
  delegationTimeout?: number | undefined;
1481
1692
  } | undefined;
1482
- dependencies?: string[] | undefined;
1483
1693
  systemPrompt?: string | undefined;
1484
1694
  createdAt?: string | undefined;
1485
1695
  updatedAt?: string | undefined;
@@ -1519,6 +1729,14 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1519
1729
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1520
1730
  } | undefined;
1521
1731
  collaboratesWith?: string[] | undefined;
1732
+ capabilityMappings?: {
1733
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
1734
+ workflowRef: string;
1735
+ description?: string | undefined;
1736
+ priority?: number | undefined;
1737
+ abilities?: string[] | undefined;
1738
+ inputSchemaRef?: string | undefined;
1739
+ }[] | undefined;
1522
1740
  }>;
1523
1741
  }, "strip", z.ZodTypeAny, {
1524
1742
  type: "registered";
@@ -1527,7 +1745,9 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1527
1745
  enabled: boolean;
1528
1746
  agentId: string;
1529
1747
  parallel?: boolean | undefined;
1748
+ dependencies?: string[] | undefined;
1530
1749
  version?: string | undefined;
1750
+ tags?: string[] | undefined;
1531
1751
  metadata?: Record<string, unknown> | undefined;
1532
1752
  priority?: number | undefined;
1533
1753
  team?: string | undefined;
@@ -1535,20 +1755,19 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1535
1755
  capabilities?: string[] | undefined;
1536
1756
  role?: string | undefined;
1537
1757
  expertise?: string[] | undefined;
1538
- tags?: string[] | undefined;
1539
1758
  workflow?: {
1540
1759
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1541
1760
  stepId: string;
1542
1761
  name: string;
1543
1762
  config: Record<string, unknown>;
1544
1763
  parallel?: boolean | undefined;
1764
+ description?: string | undefined;
1545
1765
  retryPolicy?: {
1546
1766
  maxAttempts: number;
1547
1767
  backoffMs: number;
1548
1768
  backoffMultiplier: number;
1549
1769
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1550
1770
  } | undefined;
1551
- description?: string | undefined;
1552
1771
  dependencies?: string[] | undefined;
1553
1772
  outputs?: string[] | undefined;
1554
1773
  timeoutMs?: number | undefined;
@@ -1564,7 +1783,6 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1564
1783
  canWriteToShared?: boolean | undefined;
1565
1784
  delegationTimeout?: number | undefined;
1566
1785
  } | undefined;
1567
- dependencies?: string[] | undefined;
1568
1786
  systemPrompt?: string | undefined;
1569
1787
  createdAt?: string | undefined;
1570
1788
  updatedAt?: string | undefined;
@@ -1604,6 +1822,14 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1604
1822
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1605
1823
  } | undefined;
1606
1824
  collaboratesWith?: string[] | undefined;
1825
+ capabilityMappings?: {
1826
+ priority: number;
1827
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
1828
+ workflowRef: string;
1829
+ description?: string | undefined;
1830
+ abilities?: string[] | undefined;
1831
+ inputSchemaRef?: string | undefined;
1832
+ }[] | undefined;
1607
1833
  };
1608
1834
  }, {
1609
1835
  type: "registered";
@@ -1611,7 +1837,9 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1611
1837
  description: string;
1612
1838
  agentId: string;
1613
1839
  parallel?: boolean | undefined;
1840
+ dependencies?: string[] | undefined;
1614
1841
  version?: string | undefined;
1842
+ tags?: string[] | undefined;
1615
1843
  metadata?: Record<string, unknown> | undefined;
1616
1844
  enabled?: boolean | undefined;
1617
1845
  priority?: number | undefined;
@@ -1620,12 +1848,12 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1620
1848
  capabilities?: string[] | undefined;
1621
1849
  role?: string | undefined;
1622
1850
  expertise?: string[] | undefined;
1623
- tags?: string[] | undefined;
1624
1851
  workflow?: {
1625
1852
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
1626
1853
  stepId: string;
1627
1854
  name: string;
1628
1855
  parallel?: boolean | undefined;
1856
+ description?: string | undefined;
1629
1857
  retryPolicy?: {
1630
1858
  maxAttempts: number;
1631
1859
  backoffMs: number;
@@ -1633,7 +1861,6 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1633
1861
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1634
1862
  } | undefined;
1635
1863
  config?: Record<string, unknown> | undefined;
1636
- description?: string | undefined;
1637
1864
  dependencies?: string[] | undefined;
1638
1865
  outputs?: string[] | undefined;
1639
1866
  timeoutMs?: number | undefined;
@@ -1649,7 +1876,6 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1649
1876
  canWriteToShared?: boolean | undefined;
1650
1877
  delegationTimeout?: number | undefined;
1651
1878
  } | undefined;
1652
- dependencies?: string[] | undefined;
1653
1879
  systemPrompt?: string | undefined;
1654
1880
  createdAt?: string | undefined;
1655
1881
  updatedAt?: string | undefined;
@@ -1689,6 +1915,14 @@ export declare const AgentEventPayloadSchema: z.ZodDiscriminatedUnion<"type", [z
1689
1915
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
1690
1916
  } | undefined;
1691
1917
  collaboratesWith?: string[] | undefined;
1918
+ capabilityMappings?: {
1919
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
1920
+ workflowRef: string;
1921
+ description?: string | undefined;
1922
+ priority?: number | undefined;
1923
+ abilities?: string[] | undefined;
1924
+ inputSchemaRef?: string | undefined;
1925
+ }[] | undefined;
1692
1926
  };
1693
1927
  }>, z.ZodObject<{
1694
1928
  type: z.ZodLiteral<"started">;
@@ -1935,13 +2169,13 @@ export declare const AgentEventSchema: z.ZodObject<{
1935
2169
  name: string;
1936
2170
  config: Record<string, unknown>;
1937
2171
  parallel?: boolean | undefined;
2172
+ description?: string | undefined;
1938
2173
  retryPolicy?: {
1939
2174
  maxAttempts: number;
1940
2175
  backoffMs: number;
1941
2176
  backoffMultiplier: number;
1942
2177
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1943
2178
  } | undefined;
1944
- description?: string | undefined;
1945
2179
  dependencies?: string[] | undefined;
1946
2180
  outputs?: string[] | undefined;
1947
2181
  timeoutMs?: number | undefined;
@@ -1955,6 +2189,7 @@ export declare const AgentEventSchema: z.ZodObject<{
1955
2189
  stepId: string;
1956
2190
  name: string;
1957
2191
  parallel?: boolean | undefined;
2192
+ description?: string | undefined;
1958
2193
  retryPolicy?: {
1959
2194
  maxAttempts: number;
1960
2195
  backoffMs: number;
@@ -1962,7 +2197,6 @@ export declare const AgentEventSchema: z.ZodObject<{
1962
2197
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
1963
2198
  } | undefined;
1964
2199
  config?: Record<string, unknown> | undefined;
1965
- description?: string | undefined;
1966
2200
  dependencies?: string[] | undefined;
1967
2201
  outputs?: string[] | undefined;
1968
2202
  timeoutMs?: number | undefined;
@@ -2100,12 +2334,64 @@ export declare const AgentEventSchema: z.ZodObject<{
2100
2334
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2101
2335
  createdAt: z.ZodOptional<z.ZodString>;
2102
2336
  updatedAt: z.ZodOptional<z.ZodString>;
2103
- }, "strip", z.ZodTypeAny, {
2337
+ /**
2338
+ * Capability mappings for task-specific routing
2339
+ *
2340
+ * When present, agent executor:
2341
+ * 1. Classifies incoming task to taskType
2342
+ * 2. Finds matching capability mapping
2343
+ * 3. Loads referenced workflow
2344
+ * 4. Injects specified abilities
2345
+ * 5. Executes with context
2346
+ *
2347
+ * Fallback: If no capability matches, uses agent's default workflow
2348
+ *
2349
+ * @example
2350
+ * capabilityMappings: [
2351
+ * {
2352
+ * taskType: 'code-review',
2353
+ * workflowRef: 'std/code-review',
2354
+ * abilities: ['code-review-checklist', 'security-patterns'],
2355
+ * priority: 80
2356
+ * }
2357
+ * ]
2358
+ */
2359
+ capabilityMappings: z.ZodOptional<z.ZodArray<z.ZodObject<{
2360
+ /** Task type this capability handles */
2361
+ taskType: z.ZodEnum<["code-review", "debugging", "refactoring", "api-design", "implementation", "testing", "documentation", "analysis", "planning", "general"]>;
2362
+ /** Reference to workflow file (e.g., "std/code-review" or "custom/my-workflow") */
2363
+ workflowRef: z.ZodString;
2364
+ /** Input schema name for strict validation (optional, defaults to general) */
2365
+ inputSchemaRef: z.ZodOptional<z.ZodString>;
2366
+ /** Abilities to inject for this task type */
2367
+ abilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2368
+ /** Priority when multiple capabilities match (higher = preferred) */
2369
+ priority: z.ZodDefault<z.ZodNumber>;
2370
+ /** Description for this capability */
2371
+ description: z.ZodOptional<z.ZodString>;
2372
+ }, "strip", z.ZodTypeAny, {
2373
+ priority: number;
2374
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
2375
+ workflowRef: string;
2376
+ description?: string | undefined;
2377
+ abilities?: string[] | undefined;
2378
+ inputSchemaRef?: string | undefined;
2379
+ }, {
2380
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
2381
+ workflowRef: string;
2382
+ description?: string | undefined;
2383
+ priority?: number | undefined;
2384
+ abilities?: string[] | undefined;
2385
+ inputSchemaRef?: string | undefined;
2386
+ }>, "many">>;
2387
+ }, "strict", z.ZodTypeAny, {
2104
2388
  description: string;
2105
2389
  enabled: boolean;
2106
2390
  agentId: string;
2107
2391
  parallel?: boolean | undefined;
2392
+ dependencies?: string[] | undefined;
2108
2393
  version?: string | undefined;
2394
+ tags?: string[] | undefined;
2109
2395
  metadata?: Record<string, unknown> | undefined;
2110
2396
  priority?: number | undefined;
2111
2397
  team?: string | undefined;
@@ -2113,20 +2399,19 @@ export declare const AgentEventSchema: z.ZodObject<{
2113
2399
  capabilities?: string[] | undefined;
2114
2400
  role?: string | undefined;
2115
2401
  expertise?: string[] | undefined;
2116
- tags?: string[] | undefined;
2117
2402
  workflow?: {
2118
2403
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2119
2404
  stepId: string;
2120
2405
  name: string;
2121
2406
  config: Record<string, unknown>;
2122
2407
  parallel?: boolean | undefined;
2408
+ description?: string | undefined;
2123
2409
  retryPolicy?: {
2124
2410
  maxAttempts: number;
2125
2411
  backoffMs: number;
2126
2412
  backoffMultiplier: number;
2127
2413
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2128
2414
  } | undefined;
2129
- description?: string | undefined;
2130
2415
  dependencies?: string[] | undefined;
2131
2416
  outputs?: string[] | undefined;
2132
2417
  timeoutMs?: number | undefined;
@@ -2142,7 +2427,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2142
2427
  canWriteToShared?: boolean | undefined;
2143
2428
  delegationTimeout?: number | undefined;
2144
2429
  } | undefined;
2145
- dependencies?: string[] | undefined;
2146
2430
  systemPrompt?: string | undefined;
2147
2431
  createdAt?: string | undefined;
2148
2432
  updatedAt?: string | undefined;
@@ -2182,11 +2466,21 @@ export declare const AgentEventSchema: z.ZodObject<{
2182
2466
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2183
2467
  } | undefined;
2184
2468
  collaboratesWith?: string[] | undefined;
2469
+ capabilityMappings?: {
2470
+ priority: number;
2471
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
2472
+ workflowRef: string;
2473
+ description?: string | undefined;
2474
+ abilities?: string[] | undefined;
2475
+ inputSchemaRef?: string | undefined;
2476
+ }[] | undefined;
2185
2477
  }, {
2186
2478
  description: string;
2187
2479
  agentId: string;
2188
2480
  parallel?: boolean | undefined;
2481
+ dependencies?: string[] | undefined;
2189
2482
  version?: string | undefined;
2483
+ tags?: string[] | undefined;
2190
2484
  metadata?: Record<string, unknown> | undefined;
2191
2485
  enabled?: boolean | undefined;
2192
2486
  priority?: number | undefined;
@@ -2195,12 +2489,12 @@ export declare const AgentEventSchema: z.ZodObject<{
2195
2489
  capabilities?: string[] | undefined;
2196
2490
  role?: string | undefined;
2197
2491
  expertise?: string[] | undefined;
2198
- tags?: string[] | undefined;
2199
2492
  workflow?: {
2200
2493
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2201
2494
  stepId: string;
2202
2495
  name: string;
2203
2496
  parallel?: boolean | undefined;
2497
+ description?: string | undefined;
2204
2498
  retryPolicy?: {
2205
2499
  maxAttempts: number;
2206
2500
  backoffMs: number;
@@ -2208,7 +2502,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2208
2502
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2209
2503
  } | undefined;
2210
2504
  config?: Record<string, unknown> | undefined;
2211
- description?: string | undefined;
2212
2505
  dependencies?: string[] | undefined;
2213
2506
  outputs?: string[] | undefined;
2214
2507
  timeoutMs?: number | undefined;
@@ -2224,7 +2517,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2224
2517
  canWriteToShared?: boolean | undefined;
2225
2518
  delegationTimeout?: number | undefined;
2226
2519
  } | undefined;
2227
- dependencies?: string[] | undefined;
2228
2520
  systemPrompt?: string | undefined;
2229
2521
  createdAt?: string | undefined;
2230
2522
  updatedAt?: string | undefined;
@@ -2264,12 +2556,22 @@ export declare const AgentEventSchema: z.ZodObject<{
2264
2556
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2265
2557
  } | undefined;
2266
2558
  collaboratesWith?: string[] | undefined;
2559
+ capabilityMappings?: {
2560
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
2561
+ workflowRef: string;
2562
+ description?: string | undefined;
2563
+ priority?: number | undefined;
2564
+ abilities?: string[] | undefined;
2565
+ inputSchemaRef?: string | undefined;
2566
+ }[] | undefined;
2267
2567
  }>, {
2268
2568
  description: string;
2269
2569
  enabled: boolean;
2270
2570
  agentId: string;
2271
2571
  parallel?: boolean | undefined;
2572
+ dependencies?: string[] | undefined;
2272
2573
  version?: string | undefined;
2574
+ tags?: string[] | undefined;
2273
2575
  metadata?: Record<string, unknown> | undefined;
2274
2576
  priority?: number | undefined;
2275
2577
  team?: string | undefined;
@@ -2277,20 +2579,19 @@ export declare const AgentEventSchema: z.ZodObject<{
2277
2579
  capabilities?: string[] | undefined;
2278
2580
  role?: string | undefined;
2279
2581
  expertise?: string[] | undefined;
2280
- tags?: string[] | undefined;
2281
2582
  workflow?: {
2282
2583
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2283
2584
  stepId: string;
2284
2585
  name: string;
2285
2586
  config: Record<string, unknown>;
2286
2587
  parallel?: boolean | undefined;
2588
+ description?: string | undefined;
2287
2589
  retryPolicy?: {
2288
2590
  maxAttempts: number;
2289
2591
  backoffMs: number;
2290
2592
  backoffMultiplier: number;
2291
2593
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2292
2594
  } | undefined;
2293
- description?: string | undefined;
2294
2595
  dependencies?: string[] | undefined;
2295
2596
  outputs?: string[] | undefined;
2296
2597
  timeoutMs?: number | undefined;
@@ -2306,7 +2607,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2306
2607
  canWriteToShared?: boolean | undefined;
2307
2608
  delegationTimeout?: number | undefined;
2308
2609
  } | undefined;
2309
- dependencies?: string[] | undefined;
2310
2610
  systemPrompt?: string | undefined;
2311
2611
  createdAt?: string | undefined;
2312
2612
  updatedAt?: string | undefined;
@@ -2346,11 +2646,21 @@ export declare const AgentEventSchema: z.ZodObject<{
2346
2646
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2347
2647
  } | undefined;
2348
2648
  collaboratesWith?: string[] | undefined;
2649
+ capabilityMappings?: {
2650
+ priority: number;
2651
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
2652
+ workflowRef: string;
2653
+ description?: string | undefined;
2654
+ abilities?: string[] | undefined;
2655
+ inputSchemaRef?: string | undefined;
2656
+ }[] | undefined;
2349
2657
  }, {
2350
2658
  description: string;
2351
2659
  agentId: string;
2352
2660
  parallel?: boolean | undefined;
2661
+ dependencies?: string[] | undefined;
2353
2662
  version?: string | undefined;
2663
+ tags?: string[] | undefined;
2354
2664
  metadata?: Record<string, unknown> | undefined;
2355
2665
  enabled?: boolean | undefined;
2356
2666
  priority?: number | undefined;
@@ -2359,12 +2669,12 @@ export declare const AgentEventSchema: z.ZodObject<{
2359
2669
  capabilities?: string[] | undefined;
2360
2670
  role?: string | undefined;
2361
2671
  expertise?: string[] | undefined;
2362
- tags?: string[] | undefined;
2363
2672
  workflow?: {
2364
2673
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2365
2674
  stepId: string;
2366
2675
  name: string;
2367
2676
  parallel?: boolean | undefined;
2677
+ description?: string | undefined;
2368
2678
  retryPolicy?: {
2369
2679
  maxAttempts: number;
2370
2680
  backoffMs: number;
@@ -2372,7 +2682,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2372
2682
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2373
2683
  } | undefined;
2374
2684
  config?: Record<string, unknown> | undefined;
2375
- description?: string | undefined;
2376
2685
  dependencies?: string[] | undefined;
2377
2686
  outputs?: string[] | undefined;
2378
2687
  timeoutMs?: number | undefined;
@@ -2388,7 +2697,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2388
2697
  canWriteToShared?: boolean | undefined;
2389
2698
  delegationTimeout?: number | undefined;
2390
2699
  } | undefined;
2391
- dependencies?: string[] | undefined;
2392
2700
  systemPrompt?: string | undefined;
2393
2701
  createdAt?: string | undefined;
2394
2702
  updatedAt?: string | undefined;
@@ -2428,6 +2736,14 @@ export declare const AgentEventSchema: z.ZodObject<{
2428
2736
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2429
2737
  } | undefined;
2430
2738
  collaboratesWith?: string[] | undefined;
2739
+ capabilityMappings?: {
2740
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
2741
+ workflowRef: string;
2742
+ description?: string | undefined;
2743
+ priority?: number | undefined;
2744
+ abilities?: string[] | undefined;
2745
+ inputSchemaRef?: string | undefined;
2746
+ }[] | undefined;
2431
2747
  }>;
2432
2748
  }, "strip", z.ZodTypeAny, {
2433
2749
  type: "registered";
@@ -2436,7 +2752,9 @@ export declare const AgentEventSchema: z.ZodObject<{
2436
2752
  enabled: boolean;
2437
2753
  agentId: string;
2438
2754
  parallel?: boolean | undefined;
2755
+ dependencies?: string[] | undefined;
2439
2756
  version?: string | undefined;
2757
+ tags?: string[] | undefined;
2440
2758
  metadata?: Record<string, unknown> | undefined;
2441
2759
  priority?: number | undefined;
2442
2760
  team?: string | undefined;
@@ -2444,20 +2762,19 @@ export declare const AgentEventSchema: z.ZodObject<{
2444
2762
  capabilities?: string[] | undefined;
2445
2763
  role?: string | undefined;
2446
2764
  expertise?: string[] | undefined;
2447
- tags?: string[] | undefined;
2448
2765
  workflow?: {
2449
2766
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2450
2767
  stepId: string;
2451
2768
  name: string;
2452
2769
  config: Record<string, unknown>;
2453
2770
  parallel?: boolean | undefined;
2771
+ description?: string | undefined;
2454
2772
  retryPolicy?: {
2455
2773
  maxAttempts: number;
2456
2774
  backoffMs: number;
2457
2775
  backoffMultiplier: number;
2458
2776
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2459
2777
  } | undefined;
2460
- description?: string | undefined;
2461
2778
  dependencies?: string[] | undefined;
2462
2779
  outputs?: string[] | undefined;
2463
2780
  timeoutMs?: number | undefined;
@@ -2473,7 +2790,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2473
2790
  canWriteToShared?: boolean | undefined;
2474
2791
  delegationTimeout?: number | undefined;
2475
2792
  } | undefined;
2476
- dependencies?: string[] | undefined;
2477
2793
  systemPrompt?: string | undefined;
2478
2794
  createdAt?: string | undefined;
2479
2795
  updatedAt?: string | undefined;
@@ -2513,6 +2829,14 @@ export declare const AgentEventSchema: z.ZodObject<{
2513
2829
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2514
2830
  } | undefined;
2515
2831
  collaboratesWith?: string[] | undefined;
2832
+ capabilityMappings?: {
2833
+ priority: number;
2834
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
2835
+ workflowRef: string;
2836
+ description?: string | undefined;
2837
+ abilities?: string[] | undefined;
2838
+ inputSchemaRef?: string | undefined;
2839
+ }[] | undefined;
2516
2840
  };
2517
2841
  }, {
2518
2842
  type: "registered";
@@ -2520,7 +2844,9 @@ export declare const AgentEventSchema: z.ZodObject<{
2520
2844
  description: string;
2521
2845
  agentId: string;
2522
2846
  parallel?: boolean | undefined;
2847
+ dependencies?: string[] | undefined;
2523
2848
  version?: string | undefined;
2849
+ tags?: string[] | undefined;
2524
2850
  metadata?: Record<string, unknown> | undefined;
2525
2851
  enabled?: boolean | undefined;
2526
2852
  priority?: number | undefined;
@@ -2529,12 +2855,12 @@ export declare const AgentEventSchema: z.ZodObject<{
2529
2855
  capabilities?: string[] | undefined;
2530
2856
  role?: string | undefined;
2531
2857
  expertise?: string[] | undefined;
2532
- tags?: string[] | undefined;
2533
2858
  workflow?: {
2534
2859
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2535
2860
  stepId: string;
2536
2861
  name: string;
2537
2862
  parallel?: boolean | undefined;
2863
+ description?: string | undefined;
2538
2864
  retryPolicy?: {
2539
2865
  maxAttempts: number;
2540
2866
  backoffMs: number;
@@ -2542,7 +2868,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2542
2868
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2543
2869
  } | undefined;
2544
2870
  config?: Record<string, unknown> | undefined;
2545
- description?: string | undefined;
2546
2871
  dependencies?: string[] | undefined;
2547
2872
  outputs?: string[] | undefined;
2548
2873
  timeoutMs?: number | undefined;
@@ -2558,7 +2883,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2558
2883
  canWriteToShared?: boolean | undefined;
2559
2884
  delegationTimeout?: number | undefined;
2560
2885
  } | undefined;
2561
- dependencies?: string[] | undefined;
2562
2886
  systemPrompt?: string | undefined;
2563
2887
  createdAt?: string | undefined;
2564
2888
  updatedAt?: string | undefined;
@@ -2598,6 +2922,14 @@ export declare const AgentEventSchema: z.ZodObject<{
2598
2922
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2599
2923
  } | undefined;
2600
2924
  collaboratesWith?: string[] | undefined;
2925
+ capabilityMappings?: {
2926
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
2927
+ workflowRef: string;
2928
+ description?: string | undefined;
2929
+ priority?: number | undefined;
2930
+ abilities?: string[] | undefined;
2931
+ inputSchemaRef?: string | undefined;
2932
+ }[] | undefined;
2601
2933
  };
2602
2934
  }>, z.ZodObject<{
2603
2935
  type: z.ZodLiteral<"started">;
@@ -2765,7 +3097,9 @@ export declare const AgentEventSchema: z.ZodObject<{
2765
3097
  enabled: boolean;
2766
3098
  agentId: string;
2767
3099
  parallel?: boolean | undefined;
3100
+ dependencies?: string[] | undefined;
2768
3101
  version?: string | undefined;
3102
+ tags?: string[] | undefined;
2769
3103
  metadata?: Record<string, unknown> | undefined;
2770
3104
  priority?: number | undefined;
2771
3105
  team?: string | undefined;
@@ -2773,20 +3107,19 @@ export declare const AgentEventSchema: z.ZodObject<{
2773
3107
  capabilities?: string[] | undefined;
2774
3108
  role?: string | undefined;
2775
3109
  expertise?: string[] | undefined;
2776
- tags?: string[] | undefined;
2777
3110
  workflow?: {
2778
3111
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2779
3112
  stepId: string;
2780
3113
  name: string;
2781
3114
  config: Record<string, unknown>;
2782
3115
  parallel?: boolean | undefined;
3116
+ description?: string | undefined;
2783
3117
  retryPolicy?: {
2784
3118
  maxAttempts: number;
2785
3119
  backoffMs: number;
2786
3120
  backoffMultiplier: number;
2787
3121
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2788
3122
  } | undefined;
2789
- description?: string | undefined;
2790
3123
  dependencies?: string[] | undefined;
2791
3124
  outputs?: string[] | undefined;
2792
3125
  timeoutMs?: number | undefined;
@@ -2802,7 +3135,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2802
3135
  canWriteToShared?: boolean | undefined;
2803
3136
  delegationTimeout?: number | undefined;
2804
3137
  } | undefined;
2805
- dependencies?: string[] | undefined;
2806
3138
  systemPrompt?: string | undefined;
2807
3139
  createdAt?: string | undefined;
2808
3140
  updatedAt?: string | undefined;
@@ -2842,6 +3174,14 @@ export declare const AgentEventSchema: z.ZodObject<{
2842
3174
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2843
3175
  } | undefined;
2844
3176
  collaboratesWith?: string[] | undefined;
3177
+ capabilityMappings?: {
3178
+ priority: number;
3179
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
3180
+ workflowRef: string;
3181
+ description?: string | undefined;
3182
+ abilities?: string[] | undefined;
3183
+ inputSchemaRef?: string | undefined;
3184
+ }[] | undefined;
2845
3185
  };
2846
3186
  } | {
2847
3187
  type: "started";
@@ -2903,7 +3243,9 @@ export declare const AgentEventSchema: z.ZodObject<{
2903
3243
  description: string;
2904
3244
  agentId: string;
2905
3245
  parallel?: boolean | undefined;
3246
+ dependencies?: string[] | undefined;
2906
3247
  version?: string | undefined;
3248
+ tags?: string[] | undefined;
2907
3249
  metadata?: Record<string, unknown> | undefined;
2908
3250
  enabled?: boolean | undefined;
2909
3251
  priority?: number | undefined;
@@ -2912,12 +3254,12 @@ export declare const AgentEventSchema: z.ZodObject<{
2912
3254
  capabilities?: string[] | undefined;
2913
3255
  role?: string | undefined;
2914
3256
  expertise?: string[] | undefined;
2915
- tags?: string[] | undefined;
2916
3257
  workflow?: {
2917
3258
  type: "prompt" | "tool" | "conditional" | "loop" | "parallel" | "discuss" | "delegate";
2918
3259
  stepId: string;
2919
3260
  name: string;
2920
3261
  parallel?: boolean | undefined;
3262
+ description?: string | undefined;
2921
3263
  retryPolicy?: {
2922
3264
  maxAttempts: number;
2923
3265
  backoffMs: number;
@@ -2925,7 +3267,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2925
3267
  retryOn?: ("timeout" | "rateLimit" | "serverError" | "networkError")[] | undefined;
2926
3268
  } | undefined;
2927
3269
  config?: Record<string, unknown> | undefined;
2928
- description?: string | undefined;
2929
3270
  dependencies?: string[] | undefined;
2930
3271
  outputs?: string[] | undefined;
2931
3272
  timeoutMs?: number | undefined;
@@ -2941,7 +3282,6 @@ export declare const AgentEventSchema: z.ZodObject<{
2941
3282
  canWriteToShared?: boolean | undefined;
2942
3283
  delegationTimeout?: number | undefined;
2943
3284
  } | undefined;
2944
- dependencies?: string[] | undefined;
2945
3285
  systemPrompt?: string | undefined;
2946
3286
  createdAt?: string | undefined;
2947
3287
  updatedAt?: string | undefined;
@@ -2981,6 +3321,14 @@ export declare const AgentEventSchema: z.ZodObject<{
2981
3321
  agentCategory?: "orchestrator" | "implementer" | "reviewer" | "specialist" | "generalist" | undefined;
2982
3322
  } | undefined;
2983
3323
  collaboratesWith?: string[] | undefined;
3324
+ capabilityMappings?: {
3325
+ taskType: "code-review" | "implementation" | "documentation" | "analysis" | "debugging" | "refactoring" | "api-design" | "testing" | "planning" | "general";
3326
+ workflowRef: string;
3327
+ description?: string | undefined;
3328
+ priority?: number | undefined;
3329
+ abilities?: string[] | undefined;
3330
+ inputSchemaRef?: string | undefined;
3331
+ }[] | undefined;
2984
3332
  };
2985
3333
  } | {
2986
3334
  type: "started";
@@ -3860,7 +4208,7 @@ export type ToolExecutionRequest = z.infer<typeof ToolExecutionRequestSchema>;
3860
4208
  * - INV-TOOL-003: Unknown tools must return error, not throw
3861
4209
  */
3862
4210
  export declare const ToolExecutorConfigSchema: z.ZodObject<{
3863
- /** Default timeout for tool execution in ms */
4211
+ /** Default timeout for tool execution in ms (20 minutes default) */
3864
4212
  defaultTimeoutMs: z.ZodDefault<z.ZodNumber>;
3865
4213
  /** Whether to validate inputs against tool schemas */
3866
4214
  validateInputs: z.ZodDefault<z.ZodBoolean>;