nexus-agents 2.28.0 → 2.29.0

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 (72) hide show
  1. package/README.md +11 -10
  2. package/dist/chunk-5VZLXMO7.js +838 -0
  3. package/dist/chunk-5VZLXMO7.js.map +1 -0
  4. package/dist/chunk-633WH2ML.js +127 -0
  5. package/dist/chunk-633WH2ML.js.map +1 -0
  6. package/dist/chunk-7F6HYUIY.js +327 -0
  7. package/dist/chunk-7F6HYUIY.js.map +1 -0
  8. package/dist/chunk-CLYZ7FWP.js +30 -0
  9. package/dist/chunk-CLYZ7FWP.js.map +1 -0
  10. package/dist/{chunk-QZEAD6AG.js → chunk-DAMRMAM2.js} +19526 -35943
  11. package/dist/chunk-DAMRMAM2.js.map +1 -0
  12. package/dist/{chunk-YSDUVCCZ.js → chunk-HH5LVGEE.js} +6 -6
  13. package/dist/{chunk-E7EX2KQJ.js → chunk-HWDBNDUX.js} +2 -2
  14. package/dist/chunk-I6YDS23R.js +354 -0
  15. package/dist/chunk-I6YDS23R.js.map +1 -0
  16. package/dist/{chunk-L2SHSW4T.js → chunk-IMWYKX4H.js} +4377 -4190
  17. package/dist/chunk-IMWYKX4H.js.map +1 -0
  18. package/dist/chunk-KGDG6PWZ.js +61 -0
  19. package/dist/chunk-KGDG6PWZ.js.map +1 -0
  20. package/dist/chunk-POBO4G2P.js +3700 -0
  21. package/dist/chunk-POBO4G2P.js.map +1 -0
  22. package/dist/chunk-S3BKWNST.js +13475 -0
  23. package/dist/chunk-S3BKWNST.js.map +1 -0
  24. package/dist/chunk-T7PU3NPQ.js +42 -0
  25. package/dist/chunk-T7PU3NPQ.js.map +1 -0
  26. package/dist/{chunk-UGNLR4NZ.js → chunk-WSK4VSXP.js} +2 -2
  27. package/dist/{chunk-LKSTILEE.js → chunk-ZBZJHXRT.js} +181 -1120
  28. package/dist/chunk-ZBZJHXRT.js.map +1 -0
  29. package/dist/cli.d.ts +2 -2
  30. package/dist/cli.js +1400 -649
  31. package/dist/cli.js.map +1 -1
  32. package/dist/composite-router-YPRWVTRB.js +17 -0
  33. package/dist/consensus-vote-DBE6RNZG.js +23 -0
  34. package/dist/{dist-H5XNXVAV.js → dist-7PQR2BQB.js} +1006 -954
  35. package/dist/dist-7PQR2BQB.js.map +1 -0
  36. package/dist/{doctor-deep-BDE2PHVX.js → doctor-deep-AWE7SRU6.js} +4 -3
  37. package/dist/expert-config-FHNBQRX2.js +22 -0
  38. package/dist/expert-config-FHNBQRX2.js.map +1 -0
  39. package/dist/factory-O5C7ZBZO.js +13 -0
  40. package/dist/factory-O5C7ZBZO.js.map +1 -0
  41. package/dist/factory-PCHGQ3ZG.js +16 -0
  42. package/dist/factory-PCHGQ3ZG.js.map +1 -0
  43. package/dist/index.d.ts +1253 -681
  44. package/dist/index.js +490 -313
  45. package/dist/index.js.map +1 -1
  46. package/dist/learning-persistence-WMWZJZ35.js +16 -0
  47. package/dist/learning-persistence-WMWZJZ35.js.map +1 -0
  48. package/dist/mcp-config-AUZQPUBY.js +12 -0
  49. package/dist/mcp-config-AUZQPUBY.js.map +1 -0
  50. package/dist/{model-capabilities-types-CSWO27YN.d.ts → model-capabilities-types-B57GZryc.d.ts} +1 -1
  51. package/dist/routing-memory-QY3XMU2R.js +13 -0
  52. package/dist/routing-memory-QY3XMU2R.js.map +1 -0
  53. package/dist/session-memory-3MBCE5KS.js +22 -0
  54. package/dist/session-memory-3MBCE5KS.js.map +1 -0
  55. package/dist/{setup-command-SS7LMN7Y.js → setup-command-IQ4MD3FT.js} +8 -5
  56. package/dist/setup-command-IQ4MD3FT.js.map +1 -0
  57. package/dist/setup-config-5YUPLDXF.js +10 -0
  58. package/dist/setup-config-5YUPLDXF.js.map +1 -0
  59. package/dist/weather-report-CC2C4KAX.js +15 -0
  60. package/dist/weather-report-CC2C4KAX.js.map +1 -0
  61. package/package.json +16 -18
  62. package/dist/chunk-L2SHSW4T.js.map +0 -1
  63. package/dist/chunk-LKSTILEE.js.map +0 -1
  64. package/dist/chunk-QZEAD6AG.js.map +0 -1
  65. package/dist/dist-H5XNXVAV.js.map +0 -1
  66. package/dist/setup-config-DSMOOLVW.js +0 -9
  67. /package/dist/{chunk-YSDUVCCZ.js.map → chunk-HH5LVGEE.js.map} +0 -0
  68. /package/dist/{chunk-E7EX2KQJ.js.map → chunk-HWDBNDUX.js.map} +0 -0
  69. /package/dist/{chunk-UGNLR4NZ.js.map → chunk-WSK4VSXP.js.map} +0 -0
  70. /package/dist/{doctor-deep-BDE2PHVX.js.map → composite-router-YPRWVTRB.js.map} +0 -0
  71. /package/dist/{setup-command-SS7LMN7Y.js.map → consensus-vote-DBE6RNZG.js.map} +0 -0
  72. /package/dist/{setup-config-DSMOOLVW.js.map → doctor-deep-AWE7SRU6.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import { ZodError, z, ZodType, ZodSafeParseResult } from 'zod';
2
- import { C as CliNameLiteral, M as ModelId } from './model-capabilities-types-CSWO27YN.js';
2
+ import { C as CliNameLiteral, M as ModelId } from './model-capabilities-types-B57GZryc.js';
3
3
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
4
4
  import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
5
- import { FastifyInstance } from 'fastify';
6
5
  import { ChildProcess } from 'node:child_process';
7
6
 
8
7
  /**
@@ -362,7 +361,7 @@ type AgentState$2 = 'idle' | 'thinking' | 'acting' | 'waiting' | 'error';
362
361
  * 'orchestrator' is the preferred name for the coordination agent (Issue #759).
363
362
  * 'tech_lead' is retained for backward compatibility but will be deprecated in v3.0.
364
363
  */
365
- type AgentRole = 'orchestrator' | 'tech_lead' | 'code_expert' | 'architecture_expert' | 'security_expert' | 'documentation_expert' | 'testing_expert' | 'devops_expert' | 'research_expert' | 'pm_expert' | 'ux_expert' | 'infrastructure_expert' | 'thinker' | 'worker' | 'verifier' | 'custom';
364
+ type AgentRole = 'orchestrator' | 'tech_lead' | 'code_expert' | 'architecture_expert' | 'security_expert' | 'documentation_expert' | 'testing_expert' | 'devops_expert' | 'research_expert' | 'pm_expert' | 'ux_expert' | 'infrastructure_expert' | 'qa_expert' | 'thinker' | 'worker' | 'verifier' | 'custom';
366
365
  /**
367
366
  * Agent capabilities.
368
367
  */
@@ -1543,17 +1542,6 @@ type OrchestrationObserverEvent = {
1543
1542
  * Observer event listener function.
1544
1543
  */
1545
1544
  type OrchestrationObserverListener = (event: OrchestrationObserverEvent) => void;
1546
- /**
1547
- * OrchestrationObserver configuration schema.
1548
- */
1549
- declare const OrchestrationObserverConfigSchema: z.ZodObject<{
1550
- maxRoutingHistory: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1551
- maxSessionHistory: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1552
- metricsUpdateIntervalMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1553
- verboseLogging: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1554
- tokenCostRates: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
1555
- }, z.core.$strip>;
1556
- type OrchestrationObserverConfig = z.infer<typeof OrchestrationObserverConfigSchema>;
1557
1545
  /**
1558
1546
  * OrchestrationObserver interface for dependency injection.
1559
1547
  */
@@ -1581,47 +1569,6 @@ interface IOrchestrationObserver {
1581
1569
  /** Check if observer is active */
1582
1570
  isActive(): boolean;
1583
1571
  }
1584
- /**
1585
- * Event topics the SwarmObserver subscribes to.
1586
- */
1587
- declare const ObserverTopics: {
1588
- /** All session events */
1589
- readonly SESSIONS: "session.*";
1590
- /** All agent events */
1591
- readonly AGENTS: "agent.*";
1592
- /** All consensus events */
1593
- readonly CONSENSUS: "consensus.*";
1594
- /** All protocol events */
1595
- readonly PROTOCOLS: "protocol.*";
1596
- /** Catch-all for any missed events */
1597
- readonly ALL: "*";
1598
- };
1599
- /**
1600
- * Options for creating an OrchestrationObserver.
1601
- */
1602
- interface OrchestrationObserverOptions {
1603
- config?: Partial<OrchestrationObserverConfig> | undefined;
1604
- logger?: ILogger | undefined;
1605
- }
1606
- /** @deprecated Use OrchestrationStats instead */
1607
- type SwarmStats = OrchestrationStats;
1608
- /** @deprecated Use OrchestrationObserverEvent instead */
1609
- type SwarmObserverEvent = OrchestrationObserverEvent;
1610
- /** @deprecated Use OrchestrationObserverListener instead */
1611
- type SwarmObserverListener = OrchestrationObserverListener;
1612
- /** @deprecated Use OrchestrationObserverConfig instead */
1613
- type SwarmObserverConfig$1 = OrchestrationObserverConfig;
1614
- declare const SwarmObserverConfigSchema$1: z.ZodObject<{
1615
- maxRoutingHistory: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1616
- maxSessionHistory: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1617
- metricsUpdateIntervalMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1618
- verboseLogging: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1619
- tokenCostRates: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
1620
- }, z.core.$strip>;
1621
- /** @deprecated Use IOrchestrationObserver instead */
1622
- type ISwarmObserver$1 = IOrchestrationObserver;
1623
- /** @deprecated Use OrchestrationObserverOptions instead */
1624
- type SwarmObserverOptions = OrchestrationObserverOptions;
1625
1572
 
1626
1573
  /**
1627
1574
  * nexus-agents/cli-adapters - ZeroRouter Types
@@ -2506,6 +2453,7 @@ declare const OutcomeQuerySchema: z.ZodObject<{
2506
2453
  }>>;
2507
2454
  since: z.ZodOptional<z.ZodString>;
2508
2455
  limit: z.ZodOptional<z.ZodNumber>;
2456
+ excludeQualitySignals: z.ZodOptional<z.ZodArray<z.ZodString>>;
2509
2457
  }, z.core.$strip>;
2510
2458
  /** A single recorded task execution outcome. */
2511
2459
  type TaskOutcome$2 = z.infer<typeof TaskOutcomeSchema$2>;
@@ -3009,7 +2957,11 @@ declare class CompositeRouter implements ICompositeRouter {
3009
2957
  private initializeCoreRouters;
3010
2958
  private initializeMemoryAndStages;
3011
2959
  private initializeOptionalStages;
3012
- /** Warm-start LinUCB bandit from persisted outcomes (Issue #1015). Best-effort. */
2960
+ /** Emit routing.decision event to pipeline event bus (#1687). */
2961
+ private emitRoutingDecision;
2962
+ /** Warm-start LinUCB bandit from persisted outcomes (Issue #1015).
2963
+ * Uses a 30-day lookback window so stale outcomes don't override
2964
+ * routing changes like primaryCli specialization (#1667). */
3013
2965
  private warmStartBandit;
3014
2966
  private logInitialization;
3015
2967
  route(task: CliTask): Promise<Result<CompositeRoutingDecision, CompositeRoutingError>>;
@@ -4383,6 +4335,21 @@ declare const AppConfigSchema: z.ZodObject<{
4383
4335
  ANALYZED: "ANALYZED";
4384
4336
  ORCHESTRATED: "ORCHESTRATED";
4385
4337
  }>>>;
4338
+ upstreamServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
4339
+ name: z.ZodString;
4340
+ command: z.ZodEnum<{
4341
+ docker: "docker";
4342
+ python: "python";
4343
+ node: "node";
4344
+ npx: "npx";
4345
+ python3: "python3";
4346
+ uvx: "uvx";
4347
+ }>;
4348
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
4349
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4350
+ lazy: z.ZodDefault<z.ZodBoolean>;
4351
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
4352
+ }, z.core.$strip>>>;
4386
4353
  }, z.core.$strip>>;
4387
4354
  }, z.core.$strip>;
4388
4355
  type AppConfig = z.infer<typeof AppConfigSchema>;
@@ -5022,7 +4989,7 @@ declare function calculateDelay(attempt: number, config: RetryConfig): number;
5022
4989
  * @param error - The error to check
5023
4990
  * @returns True if the error is retryable
5024
4991
  */
5025
- declare function isRetryableError(error: unknown): boolean;
4992
+ declare function isRetryableError$1(error: unknown): boolean;
5026
4993
  /**
5027
4994
  * Options for withRetry function.
5028
4995
  */
@@ -5626,10 +5593,6 @@ declare class ClaudeAdapter extends BaseAdapter {
5626
5593
  * Executes streaming completion and pushes chunks to the controller.
5627
5594
  */
5628
5595
  private executeStream;
5629
- /**
5630
- * Extracts system prompt from request, checking both systemPrompt field and messages.
5631
- */
5632
- private extractSystemPrompt;
5633
5596
  /**
5634
5597
  * Builds Anthropic API request parameters from our CompletionRequest.
5635
5598
  */
@@ -5868,7 +5831,6 @@ declare class OllamaAdapter extends BaseAdapter {
5868
5831
  stream(request: CompletionRequest): AsyncIterable<StreamChunk>;
5869
5832
  countTokens(text: string): Promise<number>;
5870
5833
  private executeStream;
5871
- private extractSystemPrompt;
5872
5834
  private buildOptions;
5873
5835
  private applyFormatAndTools;
5874
5836
  private buildRequestParams;
@@ -5996,10 +5958,6 @@ declare class GeminiAdapter extends BaseAdapter {
5996
5958
  * Executes streaming completion and pushes chunks to the controller.
5997
5959
  */
5998
5960
  private executeStream;
5999
- /**
6000
- * Extracts system prompt from request.
6001
- */
6002
- private extractSystemPrompt;
6003
5961
  /**
6004
5962
  * Builds generation config from request parameters.
6005
5963
  */
@@ -6240,6 +6198,35 @@ interface CircuitStateChangeEvent {
6240
6198
  * Event listener for circuit state changes.
6241
6199
  */
6242
6200
  type CircuitStateChangeListener = (event: CircuitStateChangeEvent) => void;
6201
+ /**
6202
+ * Interface for circuit breaker operations.
6203
+ */
6204
+ interface ICircuitBreaker {
6205
+ /**
6206
+ * Executes a function with circuit breaker protection.
6207
+ */
6208
+ execute<T>(fn: () => Promise<T>): Promise<Result<T, CircuitError>>;
6209
+ /**
6210
+ * Gets the current circuit state.
6211
+ */
6212
+ getState(): CircuitState;
6213
+ /**
6214
+ * Gets a full snapshot of circuit breaker state.
6215
+ */
6216
+ getSnapshot(): CircuitBreakerSnapshot;
6217
+ /**
6218
+ * Manually resets the circuit breaker to closed state.
6219
+ */
6220
+ reset(): void;
6221
+ /**
6222
+ * Records a failure manually (for external failure detection).
6223
+ */
6224
+ recordFailure(category: FailureCategory$1): void;
6225
+ /**
6226
+ * Records a success manually (for external success detection).
6227
+ */
6228
+ recordSuccess(): void;
6229
+ }
6243
6230
  /**
6244
6231
  * Error codes specific to circuit breaker.
6245
6232
  */
@@ -10555,13 +10542,15 @@ interface ExpertConfig {
10555
10542
  capabilities: AgentCapability[];
10556
10543
  /** Optional model preferences */
10557
10544
  modelPreference?: ModelPreference;
10545
+ /** Optional tool restrictions (allowlist/denylist per role) */
10546
+ toolRestrictions?: ToolRestrictions;
10558
10547
  /** Optional metadata for extensions */
10559
10548
  metadata?: Record<string, unknown>;
10560
10549
  }
10561
10550
  /**
10562
10551
  * Built-in expert type identifiers.
10563
10552
  */
10564
- type BuiltInExpertType = 'code' | 'architecture' | 'security' | 'documentation' | 'testing' | 'devops' | 'research' | 'pm' | 'ux' | 'infrastructure';
10553
+ type BuiltInExpertType = 'code' | 'architecture' | 'security' | 'documentation' | 'testing' | 'devops' | 'research' | 'pm' | 'ux' | 'infrastructure' | 'qa';
10565
10554
  /**
10566
10555
  * Zod schema for ModelPreference.
10567
10556
  */
@@ -10574,6 +10563,17 @@ declare const ModelPreferenceSchema: z.ZodObject<{
10574
10563
  /**
10575
10564
  * Zod schema for ExpertConfig.
10576
10565
  */
10566
+ /**
10567
+ * Tool restriction configuration for expert roles.
10568
+ * Inspired by Augment Code's subagent tool access control.
10569
+ * Allowlist takes priority — if set, only listed tools are available.
10570
+ * Denylist blocks specific tools (used when allowlist is not set).
10571
+ */
10572
+ declare const ToolRestrictionsSchema: z.ZodOptional<z.ZodObject<{
10573
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
10574
+ deniedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
10575
+ }, z.core.$strip>>;
10576
+ type ToolRestrictions = z.infer<typeof ToolRestrictionsSchema>;
10577
10577
  declare const ExpertConfigSchema: z.ZodObject<{
10578
10578
  id: z.ZodString;
10579
10579
  name: z.ZodString;
@@ -10590,6 +10590,7 @@ declare const ExpertConfigSchema: z.ZodObject<{
10590
10590
  pm_expert: "pm_expert";
10591
10591
  ux_expert: "ux_expert";
10592
10592
  infrastructure_expert: "infrastructure_expert";
10593
+ qa_expert: "qa_expert";
10593
10594
  }>;
10594
10595
  systemPrompt: z.ZodString;
10595
10596
  capabilities: z.ZodArray<z.ZodEnum<{
@@ -10607,6 +10608,10 @@ declare const ExpertConfigSchema: z.ZodObject<{
10607
10608
  temperature: z.ZodOptional<z.ZodNumber>;
10608
10609
  maxTokens: z.ZodOptional<z.ZodNumber>;
10609
10610
  }, z.core.$strip>>;
10611
+ toolRestrictions: z.ZodOptional<z.ZodObject<{
10612
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
10613
+ deniedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
10614
+ }, z.core.$strip>>;
10610
10615
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10611
10616
  }, z.core.$strip>;
10612
10617
  /**
@@ -13012,206 +13017,6 @@ declare class SkillLoader implements ISkillLoader {
13012
13017
  */
13013
13018
  declare function createSkillLoader(library: SkillLibrary, config?: Partial<SkillLoaderConfig>, logger?: ILogger): ISkillLoader;
13014
13019
 
13015
- /**
13016
- * OrchestrationObserver - Real-time multi-agent orchestration visibility.
13017
- * (Source: Issue #187, renamed from SwarmObserver in Issue #251)
13018
- * @module agents/observability/orchestration-observer
13019
- */
13020
-
13021
- /**
13022
- * Provides real-time visibility into multi-agent orchestration.
13023
- * Tracks agent states, routing decisions, session metrics, and costs.
13024
- */
13025
- declare class OrchestrationObserver implements IOrchestrationObserver {
13026
- private readonly eventBus;
13027
- private readonly config;
13028
- private readonly logger;
13029
- private readonly agents;
13030
- private readonly routingHistory;
13031
- private readonly sessionMetrics;
13032
- private readonly listeners;
13033
- private readonly subscriptions;
13034
- private active;
13035
- private readonly startTime;
13036
- private totalTasks;
13037
- private successfulTasks;
13038
- private totalTaskDurationMs;
13039
- private eventsProcessed;
13040
- private consensusVotesRequested;
13041
- private consensusVotesCast;
13042
- private consensusReachedCount;
13043
- private consensusApproved;
13044
- private consensusRejected;
13045
- private consensusAbstained;
13046
- private consensusUnanimous;
13047
- constructor(eventBus: IEventBus$1, options?: OrchestrationObserverOptions);
13048
- start(): void;
13049
- stop(): void;
13050
- private subscribeToEvents;
13051
- private handleSessionEvent;
13052
- private handleAgentEvent;
13053
- /**
13054
- * Handles consensus events and tracks voting statistics.
13055
- * (Source: Issue #552 - Wire up consensus event handlers)
13056
- */
13057
- private handleConsensusEvent;
13058
- private onVoteRequested;
13059
- private onVoteCast;
13060
- private onConsensusReached;
13061
- private logVerbose;
13062
- private handleProtocolEvent;
13063
- private onSessionCreated;
13064
- private onSessionStatusChanged;
13065
- private onResultSubmitted;
13066
- private onSessionFinalized;
13067
- private onTaskDelegated;
13068
- private onResultBroadcast;
13069
- private updateAgentState;
13070
- private pruneOldMetrics;
13071
- getAgentStates(): readonly TrackedAgent[];
13072
- getRoutingHistory(limit?: number): readonly RoutingDecision$2[];
13073
- getSessionMetrics(sessionId?: string): readonly SessionMetrics[];
13074
- getStats(): OrchestrationStats;
13075
- recordRoutingDecision(decision: RoutingDecision$2): void;
13076
- recordTokenUsage(sessionId: string, model: CliName, tokens: TokenUsage$1): void;
13077
- addEventListener(listener: OrchestrationObserverListener): void;
13078
- removeEventListener(listener: OrchestrationObserverListener): void;
13079
- private emitObserverEvent;
13080
- isActive(): boolean;
13081
- }
13082
- /** Creates an OrchestrationObserver instance. */
13083
- declare function createOrchestrationObserver(eventBus: IEventBus$1, options?: OrchestrationObserverOptions): IOrchestrationObserver;
13084
- declare const SwarmObserver$1: typeof OrchestrationObserver;
13085
- declare const createSwarmObserver$1: typeof createOrchestrationObserver;
13086
-
13087
- /**
13088
- * nexus-agents/agents - OrchestrationObserver Helper Functions
13089
- *
13090
- * Pure helper functions for OrchestrationObserver that don't depend on class state.
13091
- * Extracted to reduce main class file size and improve testability.
13092
- *
13093
- * @module agents/observability/orchestration-observer-helpers
13094
- */
13095
-
13096
- /**
13097
- * Extracts a string field from a payload object safely.
13098
- *
13099
- * @param payload - The payload object to extract from
13100
- * @param field - The field name to extract
13101
- * @returns The string value or empty string if not found/invalid
13102
- */
13103
- declare function extractStringField(payload: Record<string, unknown>, field: string): string;
13104
- /**
13105
- * Extracts a number field from a payload object safely.
13106
- *
13107
- * @param payload - The payload object to extract from
13108
- * @param field - The field name to extract
13109
- * @param defaultValue - Default value if not found
13110
- * @returns The number value or default if not found/invalid
13111
- */
13112
- declare function extractNumberField(payload: Record<string, unknown>, field: string, defaultValue?: number): number;
13113
- /**
13114
- * Extracts a boolean field from a payload object safely.
13115
- *
13116
- * @param payload - The payload object to extract from
13117
- * @param field - The field name to extract
13118
- * @returns The boolean value (defaults to false if not found/invalid)
13119
- */
13120
- declare function extractBooleanField(payload: Record<string, unknown>, field: string): boolean;
13121
- /**
13122
- * Extracts a string array field from a payload object safely.
13123
- *
13124
- * @param payload - The payload object to extract from
13125
- * @param field - The field name to extract
13126
- * @returns The string array or empty array if not found/invalid
13127
- */
13128
- declare function extractStringArrayField(payload: Record<string, unknown>, field: string): string[];
13129
- /**
13130
- * Extracts session ID from event object or payload.
13131
- *
13132
- * @param event - The domain event
13133
- * @param payload - The event payload
13134
- * @returns The session ID or empty string if not found
13135
- */
13136
- declare function extractSessionId(event: DomainEvent, payload: Record<string, unknown>): string;
13137
- /**
13138
- * Creates initial session metrics with default values.
13139
- *
13140
- * @param sessionId - The session ID
13141
- * @returns A new SessionMetrics object with initial values
13142
- */
13143
- declare function createInitialSessionMetrics(sessionId: string): SessionMetrics;
13144
- /**
13145
- * Creates initial token usage with zero values.
13146
- *
13147
- * @returns A new TokenUsage object with zero values
13148
- */
13149
- declare function createInitialTokenUsage(): TokenUsage$1;
13150
- /**
13151
- * Creates initial cost metrics with zero values.
13152
- *
13153
- * @returns A new CostMetrics object with zero values
13154
- */
13155
- declare function createInitialCostMetrics(): CostMetrics;
13156
- /**
13157
- * Creates a new TrackedAgent object with initial values.
13158
- *
13159
- * @param agentId - The agent ID
13160
- * @param state - The initial agent state
13161
- * @param role - The agent role (defaults to 'unknown')
13162
- * @param currentTask - Optional current task description
13163
- * @returns A new TrackedAgent object
13164
- */
13165
- declare function createTrackedAgent(agentId: string, state: AgentState$1, role?: string, currentTask?: string): TrackedAgent;
13166
- /**
13167
- * Calculates routing distribution from routing history.
13168
- *
13169
- * @param routingHistory - The routing decision history
13170
- * @returns A record mapping CLI names to counts
13171
- */
13172
- declare function calculateRoutingDistribution(routingHistory: readonly RoutingDecision$2[]): Record<CliName, number>;
13173
- /**
13174
- * Aggregates token and cost totals from session metrics.
13175
- *
13176
- * @param sessionMetrics - Iterable of session metrics
13177
- * @returns Object containing total tokens and total cost
13178
- */
13179
- declare function calculateMetricsTotals(sessionMetrics: Iterable<SessionMetrics>): {
13180
- totalTokens: number;
13181
- totalCost: number;
13182
- };
13183
- /**
13184
- * Counts active sessions (sessions without a completedAt timestamp).
13185
- *
13186
- * @param sessionMetrics - Iterable of session metrics
13187
- * @returns The count of active sessions
13188
- */
13189
- declare function countActiveSessions(sessionMetrics: Iterable<SessionMetrics>): number;
13190
- /**
13191
- * Finds the first active session (no completedAt) from metrics.
13192
- *
13193
- * @param sessionMetrics - Iterable of session metrics
13194
- * @returns The first active session or undefined
13195
- */
13196
- declare function findActiveSession(sessionMetrics: Iterable<SessionMetrics>): SessionMetrics | undefined;
13197
- /**
13198
- * Identifies session IDs to remove based on max history limit.
13199
- * Returns oldest sessions first.
13200
- *
13201
- * @param sessions - Array of [sessionId, metrics] entries
13202
- * @param maxSessions - Maximum sessions to keep
13203
- * @returns Array of session IDs to remove
13204
- */
13205
- declare function identifySessionsToRemove(sessions: Array<[string, SessionMetrics]>, maxSessions: number): string[];
13206
- /**
13207
- * Calculates the cost for token usage based on rate.
13208
- *
13209
- * @param tokens - Token usage to calculate cost for
13210
- * @param ratePerThousand - Cost rate per 1000 tokens
13211
- * @returns The calculated cost in USD
13212
- */
13213
- declare function calculateTokenCost(tokens: TokenUsage$1, ratePerThousand: number): number;
13214
-
13215
13020
  /**
13216
13021
  * nexus-agents/agents - Forest-of-Thought Node Types
13217
13022
  *
@@ -18876,6 +18681,7 @@ interface CreateExpertResponse {
18876
18681
  * Uses createSecureHandler for standardized security middleware (Issue #531).
18877
18682
  * Includes timeout protection for CVE-2026-0621 mitigation (Issue #271).
18878
18683
  *
18684
+ * @category MCP
18879
18685
  * @param server - MCP server instance
18880
18686
  * @param deps - Tool dependencies
18881
18687
  */
@@ -18971,6 +18777,7 @@ interface RunWorkflowDeps extends BaseMcpToolDeps {
18971
18777
  * Uses createSecureHandler for standardized security middleware (Issue #531).
18972
18778
  * Includes timeout protection for CVE-2026-0621 mitigation (Issue #271).
18973
18779
  *
18780
+ * @category MCP
18974
18781
  * @param server - MCP server instance
18975
18782
  * @param deps - Tool dependencies
18976
18783
  */
@@ -19171,6 +18978,7 @@ declare class OrchestrationUnavailableError extends AgentError {
19171
18978
  /**
19172
18979
  * Registers the orchestrate tool with the MCP server.
19173
18980
  * Uses createSecureHandler (Issue #531) with timeout protection (Issue #271).
18981
+ * @category MCP
19174
18982
  */
19175
18983
  declare function registerOrchestrateTool(server: McpServer, deps: OrchestrateDeps): void;
19176
18984
 
@@ -20229,6 +20037,7 @@ declare function selectModel(input: DelegateInput, requirements: TaskRequirement
20229
20037
  * Uses createSecureHandler for standardized security middleware (Issue #531).
20230
20038
  * Includes timeout protection for CVE-2026-0621 mitigation (Issue #271).
20231
20039
  *
20040
+ * @category MCP
20232
20041
  * @param server - MCP server instance
20233
20042
  * @param deps - Dependencies
20234
20043
  */
@@ -20868,6 +20677,7 @@ interface ListExpertsResponse {
20868
20677
  * Uses createSecureHandler for standardized security middleware (Issue #531).
20869
20678
  * Includes timeout protection for CVE-2026-0621 mitigation (Issue #271).
20870
20679
  *
20680
+ * @category MCP
20871
20681
  * @param server - MCP server instance
20872
20682
  * @param deps - Tool dependencies
20873
20683
  */
@@ -20935,6 +20745,7 @@ interface ListWorkflowsResponse {
20935
20745
  * Uses createSecureHandler for standardized security middleware (Issue #531).
20936
20746
  * Includes timeout protection for CVE-2026-0621 mitigation (Issue #271).
20937
20747
  *
20748
+ * @category MCP
20938
20749
  * @param server - MCP server instance
20939
20750
  * @param deps - Tool dependencies
20940
20751
  */
@@ -20959,6 +20770,7 @@ declare const ExecuteExpertInputSchema: z.ZodObject<{
20959
20770
  task: z.ZodString;
20960
20771
  context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
20961
20772
  timeoutMs: z.ZodOptional<z.ZodNumber>;
20773
+ previousExpertSummary: z.ZodOptional<z.ZodString>;
20962
20774
  }, z.core.$strip>;
20963
20775
  /**
20964
20776
  * Type for validated execute expert input.
@@ -21005,6 +20817,7 @@ interface ExecuteExpertResponse {
21005
20817
  * Uses createSecureHandler for standardized security middleware (Issue #531).
21006
20818
  * Includes timeout protection for CVE-2026-0621 mitigation (Issue #271).
21007
20819
  *
20820
+ * @category MCP
21008
20821
  * @param server - MCP server instance
21009
20822
  * @param deps - Tool dependencies
21010
20823
  */
@@ -21024,6 +20837,7 @@ declare function registerExecuteExpertTool(server: McpServer, deps: ExecuteExper
21024
20837
  * - unanimous: 100% approval required
21025
20838
  * - proof_of_learning: weighted voting based on agent performance
21026
20839
  * - opinion_wise: higher-order voting with correlation awareness (Issue #333)
20840
+ * - higher_order: alias for opinion_wise (Issue #514)
21027
20841
  */
21028
20842
  declare const ConsensusAlgorithmSchema: z.ZodEnum<{
21029
20843
  simple_majority: "simple_majority";
@@ -21031,6 +20845,7 @@ declare const ConsensusAlgorithmSchema: z.ZodEnum<{
21031
20845
  unanimous: "unanimous";
21032
20846
  proof_of_learning: "proof_of_learning";
21033
20847
  opinion_wise: "opinion_wise";
20848
+ higher_order: "higher_order";
21034
20849
  }>;
21035
20850
  type ConsensusAlgorithm = z.infer<typeof ConsensusAlgorithmSchema>;
21036
20851
  /**
@@ -21109,6 +20924,7 @@ declare const ProposalSchema: z.ZodObject<{
21109
20924
  unanimous: "unanimous";
21110
20925
  proof_of_learning: "proof_of_learning";
21111
20926
  opinion_wise: "opinion_wise";
20927
+ higher_order: "higher_order";
21112
20928
  }>;
21113
20929
  timeout: z.ZodOptional<z.ZodNumber>;
21114
20930
  requiredVoters: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -21169,6 +20985,7 @@ declare const ConsensusResultSchema: z.ZodObject<{
21169
20985
  unanimous: "unanimous";
21170
20986
  proof_of_learning: "proof_of_learning";
21171
20987
  opinion_wise: "opinion_wise";
20988
+ higher_order: "higher_order";
21172
20989
  }>;
21173
20990
  timeout: z.ZodOptional<z.ZodNumber>;
21174
20991
  requiredVoters: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -21352,6 +21169,7 @@ declare const ConsensusMetricsSchema: z.ZodObject<{
21352
21169
  unanimous: "unanimous";
21353
21170
  proof_of_learning: "proof_of_learning";
21354
21171
  opinion_wise: "opinion_wise";
21172
+ higher_order: "higher_order";
21355
21173
  }>, z.ZodNumber>;
21356
21174
  }, z.core.$strip>;
21357
21175
 
@@ -21994,8 +21812,9 @@ interface IHigherOrderVoting {
21994
21812
  * - `unanimous`: Requires 100% approval
21995
21813
  * - `proof_of_learning`: Weighted by agent performance (Issue #103)
21996
21814
  * - `higher_order`: Bayesian-optimal with correlation awareness (Issue #514)
21815
+ * - `opinion_wise`: Alias for higher_order (Issue #333)
21997
21816
  */
21998
- type VotingStrategy = 'simple_majority' | 'supermajority' | 'unanimous' | 'proof_of_learning' | 'higher_order';
21817
+ type VotingStrategy = 'simple_majority' | 'supermajority' | 'unanimous' | 'proof_of_learning' | 'higher_order' | 'opinion_wise';
21999
21818
  declare const ConsensusVoteInputSchema: z.ZodObject<{
22000
21819
  proposal: z.ZodString;
22001
21820
  threshold: z.ZodOptional<z.ZodEnum<{
@@ -22008,6 +21827,7 @@ declare const ConsensusVoteInputSchema: z.ZodObject<{
22008
21827
  supermajority: "supermajority";
22009
21828
  unanimous: "unanimous";
22010
21829
  proof_of_learning: "proof_of_learning";
21830
+ opinion_wise: "opinion_wise";
22011
21831
  higher_order: "higher_order";
22012
21832
  }>>;
22013
21833
  quickMode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -22069,71 +21889,451 @@ interface ConsensusVoteDeps extends BaseMcpToolDeps {
22069
21889
  /**
22070
21890
  * Registers the consensus_vote tool with the MCP server.
22071
21891
  * Uses createSecureHandler (Issue #531) with timeout protection (Issue #271).
21892
+ * @category MCP
22072
21893
  */
22073
21894
  declare function registerConsensusVoteTool(server: McpServer, deps: ConsensusVoteDeps): void;
22074
21895
 
22075
21896
  /**
22076
- * nexus-agents/mcp - Issue Triage Tool
21897
+ * nexus-agents/mcp - Research Query Tool
22077
21898
  *
22078
- * MCP tool for automated GitHub issue triage using the full
22079
- * security pipeline (8/8 modules). Read-only by default.
21899
+ * MCP tool for querying the research registry.
21900
+ * Wraps existing CLI helpers: getResearchStatus(), findOverlaps(), generateStatsJson().
22080
21901
  *
22081
- * @module mcp/tools/issue-triage-tool
22082
- * (Source: Issue #828 Wire remaining security modules)
21902
+ * @module mcp/tools/research-query
21903
+ * (Source: Research System Enhancement - Phase 1A)
22083
21904
  */
22084
21905
 
22085
- declare const IssueTriageInputSchema: z.ZodObject<{
22086
- issueUrl: z.ZodString;
22087
- dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22088
- }, z.core.$strip>;
22089
- type IssueTriageInput = z.infer<typeof IssueTriageInputSchema>;
22090
- type IssueTriageDeps = BaseMcpToolDeps;
22091
- interface IssueTriageResponse {
22092
- readonly issueNumber: number;
22093
- readonly repository: string;
22094
- readonly category: string;
22095
- readonly categoryConfidence: number;
22096
- readonly trustAssessment: {
22097
- readonly trustTier: string;
22098
- readonly userRole: string;
22099
- readonly reputationScore?: number | undefined;
22100
- readonly isSuspicious: boolean;
22101
- readonly suspiciousSignals: readonly string[];
22102
- };
22103
- readonly proposedActions: ReadonlyArray<{
22104
- readonly type: string;
22105
- readonly description: string;
22106
- readonly policyApproved: boolean;
22107
- readonly corroborated: boolean;
21906
+ /**
21907
+ * Input schema for research_query tool.
21908
+ */
21909
+ declare const ResearchQueryInputSchema: z.ZodObject<{
21910
+ action: z.ZodEnum<{
21911
+ status: "status";
21912
+ search: "search";
21913
+ stats: "stats";
21914
+ overlap: "overlap";
22108
21915
  }>;
22109
- readonly durationMs: number;
21916
+ techniqueId: z.ZodOptional<z.ZodString>;
21917
+ query: z.ZodOptional<z.ZodString>;
21918
+ status: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
21919
+ rejected: "rejected";
21920
+ all: "all";
21921
+ implemented: "implemented";
21922
+ planned: "planned";
21923
+ "not-started": "not-started";
21924
+ }>>>;
21925
+ threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
21926
+ }, z.core.$strip>;
21927
+ /**
21928
+ * Type for validated research query input.
21929
+ */
21930
+ type ResearchQueryInput = z.infer<typeof ResearchQueryInputSchema>;
21931
+ /**
21932
+ * Dependencies for research_query tool.
21933
+ */
21934
+ type ResearchQueryDeps = BaseMcpToolDeps;
21935
+ /**
21936
+ * Response from research_query tool.
21937
+ */
21938
+ interface ResearchQueryResponse {
21939
+ /** Action that was performed */
21940
+ action: string;
21941
+ /** Whether the query succeeded */
21942
+ success: boolean;
21943
+ /** Query results */
21944
+ data: unknown;
22110
21945
  }
22111
21946
  /**
22112
- * Registers the issue_triage tool with the MCP server.
22113
- * Uses createSecureHandler for rate limiting and input sanitization.
21947
+ * Registers the research_query tool with the MCP server.
21948
+ *
21949
+ * @category MCP
21950
+ * @param server - MCP server instance
21951
+ * @param deps - Tool dependencies
22114
21952
  */
22115
- declare function registerIssueTriageTool(server: McpServer, deps: IssueTriageDeps): void;
21953
+ declare function registerResearchQueryTool(server: McpServer, deps: ResearchQueryDeps): void;
22116
21954
 
22117
21955
  /**
22118
- * nexus-agents/mcp - Run Graph Workflow Tool
21956
+ * nexus-agents/mcp - Research Add Tool
22119
21957
  *
22120
- * MCP tool for executing graph-based workflows with checkpointing,
22121
- * event streaming, and audit trail integration.
21958
+ * MCP tool for adding papers to the research registry.
21959
+ * Wraps existing CLI helpers: addResearchPaper(), fetchArxivMetadataResult().
22122
21960
  *
22123
- * @module mcp/tools/run-graph-workflow
22124
- * (Source: Issue #840 Expose graph workflows via MCP tool)
21961
+ * @module mcp/tools/research-add
21962
+ * (Source: Research System Enhancement - Phase 1B)
22125
21963
  */
22126
21964
 
22127
- declare const RunGraphWorkflowInputSchema: z.ZodObject<{
22128
- workflow: z.ZodString;
22129
- inputs: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
22130
- enableCheckpointing: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22131
- enableAuditTrail: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
21965
+ /**
21966
+ * Input schema for research_add tool.
21967
+ */
21968
+ declare const ResearchAddInputSchema: z.ZodObject<{
21969
+ arxivId: z.ZodString;
21970
+ topic: z.ZodOptional<z.ZodString>;
21971
+ priority: z.ZodOptional<z.ZodEnum<{
21972
+ P1: "P1";
21973
+ P2: "P2";
21974
+ P3: "P3";
21975
+ P4: "P4";
21976
+ }>>;
21977
+ dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22132
21978
  }, z.core.$strip>;
22133
- type RunGraphWorkflowInput = z.infer<typeof RunGraphWorkflowInputSchema>;
22134
- interface RunGraphWorkflowDeps extends BaseMcpToolDeps {
22135
- /** MCP notifier for client-visible logging (Issue #974) */
22136
- readonly notifier?: IMcpNotifier | undefined;
21979
+ /**
21980
+ * Type for validated research add input.
21981
+ */
21982
+ type ResearchAddInput = z.infer<typeof ResearchAddInputSchema>;
21983
+ /**
21984
+ * Dependencies for research_add tool.
21985
+ */
21986
+ type ResearchAddDeps = BaseMcpToolDeps;
21987
+ /**
21988
+ * Response from research_add tool.
21989
+ */
21990
+ interface ResearchAddResponse {
21991
+ /** Whether the operation succeeded */
21992
+ success: boolean;
21993
+ /** Paper ID */
21994
+ paperId: string;
21995
+ /** Paper title (empty on failure) */
21996
+ title: string;
21997
+ /** Human-readable message */
21998
+ message: string;
21999
+ /** Whether this was a dry run */
22000
+ dryRun: boolean;
22001
+ }
22002
+ /**
22003
+ * Registers the research_add tool with the MCP server.
22004
+ *
22005
+ * @category MCP
22006
+ * @param server - MCP server instance
22007
+ * @param deps - Tool dependencies
22008
+ */
22009
+ declare function registerResearchAddTool(server: McpServer, deps: ResearchAddDeps): void;
22010
+
22011
+ /**
22012
+ * nexus-agents/mcp - Research Add Source Tool
22013
+ *
22014
+ * MCP tool for adding non-paper sources (repos, tools, blogs) to the
22015
+ * research registry. Accepts pre-populated metadata or fetches from
22016
+ * GitHub via `gh` CLI (optional, graceful fallback).
22017
+ *
22018
+ * @module mcp/tools/research-add-source
22019
+ * @see Issue #1580
22020
+ */
22021
+
22022
+ declare const ResearchAddSourceInputSchema: z.ZodObject<{
22023
+ url: z.ZodString;
22024
+ name: z.ZodString;
22025
+ type: z.ZodEnum<{
22026
+ code_analysis: "code_analysis";
22027
+ specification: "specification";
22028
+ product_docs: "product_docs";
22029
+ research_blog: "research_blog";
22030
+ open_source_repo: "open_source_repo";
22031
+ }>;
22032
+ vendor: z.ZodOptional<z.ZodString>;
22033
+ topics: z.ZodOptional<z.ZodArray<z.ZodString>>;
22034
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
22035
+ quality_signals: z.ZodOptional<z.ZodObject<{
22036
+ stars_at_review: z.ZodOptional<z.ZodNumber>;
22037
+ language: z.ZodOptional<z.ZodString>;
22038
+ has_tests: z.ZodOptional<z.ZodBoolean>;
22039
+ has_docs: z.ZodOptional<z.ZodBoolean>;
22040
+ has_paper: z.ZodOptional<z.ZodBoolean>;
22041
+ }, z.core.$strip>>;
22042
+ techniques_extracted: z.ZodOptional<z.ZodArray<z.ZodString>>;
22043
+ verdict: z.ZodOptional<z.ZodEnum<{
22044
+ rejected: "rejected";
22045
+ monitoring: "monitoring";
22046
+ planned: "planned";
22047
+ adopted: "adopted";
22048
+ partially_adopted: "partially_adopted";
22049
+ }>>;
22050
+ verdict_notes: z.ZodOptional<z.ZodString>;
22051
+ dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22052
+ }, z.core.$strip>;
22053
+ type ResearchAddSourceInput = z.infer<typeof ResearchAddSourceInputSchema>;
22054
+ type ResearchAddSourceDeps = BaseMcpToolDeps;
22055
+ interface ResearchAddSourceResponse {
22056
+ success: boolean;
22057
+ sourceId: string;
22058
+ name: string;
22059
+ quality_score: number;
22060
+ evidence_tier: string;
22061
+ message: string;
22062
+ dryRun: boolean;
22063
+ }
22064
+ /** @category MCP */
22065
+ declare function registerResearchAddSourceTool(server: McpServer, deps: ResearchAddSourceDeps): void;
22066
+
22067
+ /**
22068
+ * nexus-agents/mcp - Research Discover Tool
22069
+ *
22070
+ * MCP tool for discovering new research papers and repos from external sources.
22071
+ * Searches arXiv, GitHub, and other sources for relevant research.
22072
+ *
22073
+ * @module mcp/tools/research-discover
22074
+ * (Source: Research System Enhancement - Phase 1C)
22075
+ */
22076
+
22077
+ /** A discovered research item. */
22078
+ interface DiscoveredItem {
22079
+ /** Source type */
22080
+ source: string;
22081
+ /** Item title */
22082
+ title: string;
22083
+ /** URL to the item */
22084
+ url: string;
22085
+ /** Brief description */
22086
+ description: string;
22087
+ /** Whether this item already exists in the registry */
22088
+ alreadyInRegistry: boolean;
22089
+ /** Discovery date */
22090
+ discoveredAt: string;
22091
+ /** Relevance score (0-1) relative to the search topic */
22092
+ relevanceScore?: number;
22093
+ }
22094
+ /**
22095
+ * Input schema for research_discover tool.
22096
+ */
22097
+ declare const ResearchDiscoverInputSchema: z.ZodObject<{
22098
+ topic: z.ZodString;
22099
+ source: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
22100
+ all: "all";
22101
+ arxiv: "arxiv";
22102
+ github: "github";
22103
+ google_ai: "google_ai";
22104
+ meta_fair: "meta_fair";
22105
+ microsoft: "microsoft";
22106
+ deepmind: "deepmind";
22107
+ semantic_scholar: "semantic_scholar";
22108
+ papers_with_code: "papers_with_code";
22109
+ openalex: "openalex";
22110
+ }>>>;
22111
+ maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
22112
+ sinceDate: z.ZodOptional<z.ZodString>;
22113
+ relevanceThreshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
22114
+ }, z.core.$strip>;
22115
+ /**
22116
+ * Type for validated research discover input.
22117
+ */
22118
+ type ResearchDiscoverInput = z.infer<typeof ResearchDiscoverInputSchema>;
22119
+ /**
22120
+ * Dependencies for research_discover tool.
22121
+ */
22122
+ type ResearchDiscoverDeps = BaseMcpToolDeps;
22123
+ /**
22124
+ * Response from research_discover tool.
22125
+ */
22126
+ interface ResearchDiscoverResponse {
22127
+ /** Topic that was searched */
22128
+ topic: string;
22129
+ /** Sources queried */
22130
+ sourcesQueried: string[];
22131
+ /** Sources that failed during discovery */
22132
+ failedSources: string[];
22133
+ /** Discovered items */
22134
+ items: DiscoveredItem[];
22135
+ /** Total items found (before filtering) */
22136
+ totalFound: number;
22137
+ /** Items already in registry (filtered out) */
22138
+ alreadyInRegistry: number;
22139
+ /** New items not yet in registry */
22140
+ newItems: number;
22141
+ /** Items filtered out by relevance threshold */
22142
+ filteredByRelevance: number;
22143
+ }
22144
+ /**
22145
+ * Registers the research_discover tool with the MCP server.
22146
+ *
22147
+ * @category MCP
22148
+ * @param server - MCP server instance
22149
+ * @param deps - Tool dependencies
22150
+ */
22151
+ declare function registerResearchDiscoverTool(server: McpServer, deps: ResearchDiscoverDeps): void;
22152
+
22153
+ /**
22154
+ * nexus-agents/mcp - Research Analyze Tool
22155
+ *
22156
+ * MCP tool for analyzing the research registry for gaps, trends,
22157
+ * priorities, stale entries, and coverage.
22158
+ *
22159
+ * @module mcp/tools/research-analyze
22160
+ * (Source: Research System Enhancement - Phase 1D)
22161
+ */
22162
+
22163
+ /**
22164
+ * Input schema for research_analyze tool.
22165
+ */
22166
+ declare const ResearchAnalyzeInputSchema: z.ZodObject<{
22167
+ focus: z.ZodEnum<{
22168
+ coverage: "coverage";
22169
+ trends: "trends";
22170
+ gaps: "gaps";
22171
+ priorities: "priorities";
22172
+ stale: "stale";
22173
+ }>;
22174
+ topic: z.ZodOptional<z.ZodString>;
22175
+ }, z.core.$strip>;
22176
+ /**
22177
+ * Type for validated research analyze input.
22178
+ */
22179
+ type ResearchAnalyzeInput = z.infer<typeof ResearchAnalyzeInputSchema>;
22180
+ /**
22181
+ * Dependencies for research_analyze tool.
22182
+ */
22183
+ type ResearchAnalyzeDeps = BaseMcpToolDeps;
22184
+ /**
22185
+ * Response from research_analyze tool.
22186
+ */
22187
+ interface ResearchAnalyzeResponse {
22188
+ /** Analysis focus that was performed */
22189
+ focus: string;
22190
+ /** Whether the analysis succeeded */
22191
+ success: boolean;
22192
+ /** Analysis results */
22193
+ analysis: unknown;
22194
+ /** Recommendations based on analysis */
22195
+ recommendations: string[];
22196
+ }
22197
+ /**
22198
+ * Registers the research_analyze tool with the MCP server.
22199
+ *
22200
+ * @category MCP
22201
+ * @param server - MCP server instance
22202
+ * @param deps - Tool dependencies
22203
+ */
22204
+ declare function registerResearchAnalyzeTool(server: McpServer, deps: ResearchAnalyzeDeps): void;
22205
+
22206
+ /**
22207
+ * nexus-agents/mcp - Research Catalog Review Tool
22208
+ *
22209
+ * MCP tool for reviewing auto-cataloged research references.
22210
+ * Actions: list, approve, dismiss, flush.
22211
+ *
22212
+ * @module mcp/tools/research-catalog-review
22213
+ * (Source: Research System Enhancement - Phase 5)
22214
+ */
22215
+
22216
+ /**
22217
+ * Input schema for research_catalog_review tool.
22218
+ */
22219
+ declare const ResearchCatalogReviewInputSchema: z.ZodObject<{
22220
+ action: z.ZodEnum<{
22221
+ list: "list";
22222
+ approve: "approve";
22223
+ dismiss: "dismiss";
22224
+ flush: "flush";
22225
+ }>;
22226
+ identifier: z.ZodOptional<z.ZodString>;
22227
+ topic: z.ZodOptional<z.ZodString>;
22228
+ createIssue: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22229
+ }, z.core.$strip>;
22230
+ /**
22231
+ * Dependencies for research_catalog_review tool.
22232
+ */
22233
+ type ResearchCatalogReviewDeps = BaseMcpToolDeps;
22234
+ /**
22235
+ * Registers the research_catalog_review tool with the MCP server.
22236
+ *
22237
+ * @category MCP
22238
+ * @param server - MCP server instance
22239
+ * @param deps - Tool dependencies
22240
+ */
22241
+ declare function registerResearchCatalogReviewTool(server: McpServer, deps: ResearchCatalogReviewDeps): void;
22242
+
22243
+ /**
22244
+ * nexus-agents/mcp - Research Synthesize Tool
22245
+ *
22246
+ * MCP tool for synthesizing the research registry by grouping papers
22247
+ * into topic clusters and generating structured synthesis summaries
22248
+ * with themes, findings, techniques, and implementation opportunities.
22249
+ *
22250
+ * @module mcp/tools/research-synthesize
22251
+ * (Source: Issue #1386 — Research Synthesis Pipeline)
22252
+ */
22253
+
22254
+ /**
22255
+ * Input schema for research_synthesize tool.
22256
+ */
22257
+ declare const ResearchSynthesizeInputSchema: z.ZodObject<{
22258
+ topic: z.ZodOptional<z.ZodString>;
22259
+ }, z.core.$strip>;
22260
+ /**
22261
+ * Type for validated research synthesize input.
22262
+ */
22263
+ type ResearchSynthesizeInput = z.infer<typeof ResearchSynthesizeInputSchema>;
22264
+ type ResearchSynthesizeDeps = BaseMcpToolDeps;
22265
+ /**
22266
+ * Registers the research_synthesize tool with the MCP server.
22267
+ *
22268
+ * @category MCP
22269
+ * @param server - MCP server instance
22270
+ * @param deps - Tool dependencies
22271
+ */
22272
+ declare function registerResearchSynthesizeTool(server: McpServer, deps: ResearchSynthesizeDeps): void;
22273
+
22274
+ /**
22275
+ * nexus-agents/mcp - Issue Triage Tool
22276
+ *
22277
+ * MCP tool for automated GitHub issue triage using the full
22278
+ * security pipeline (8/8 modules). Read-only by default.
22279
+ *
22280
+ * @module mcp/tools/issue-triage-tool
22281
+ * (Source: Issue #828 — Wire remaining security modules)
22282
+ */
22283
+
22284
+ declare const IssueTriageInputSchema: z.ZodObject<{
22285
+ issueUrl: z.ZodString;
22286
+ dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22287
+ }, z.core.$strip>;
22288
+ type IssueTriageInput = z.infer<typeof IssueTriageInputSchema>;
22289
+ type IssueTriageDeps = BaseMcpToolDeps;
22290
+ interface IssueTriageResponse {
22291
+ readonly issueNumber: number;
22292
+ readonly repository: string;
22293
+ readonly category: string;
22294
+ readonly categoryConfidence: number;
22295
+ readonly trustAssessment: {
22296
+ readonly trustTier: string;
22297
+ readonly userRole: string;
22298
+ readonly reputationScore?: number | undefined;
22299
+ readonly isSuspicious: boolean;
22300
+ readonly suspiciousSignals: readonly string[];
22301
+ };
22302
+ readonly proposedActions: ReadonlyArray<{
22303
+ readonly type: string;
22304
+ readonly description: string;
22305
+ readonly policyApproved: boolean;
22306
+ readonly corroborated: boolean;
22307
+ }>;
22308
+ readonly durationMs: number;
22309
+ }
22310
+ /**
22311
+ * Registers the issue_triage tool with the MCP server.
22312
+ * Uses createSecureHandler for rate limiting and input sanitization.
22313
+ * @category MCP
22314
+ */
22315
+ declare function registerIssueTriageTool(server: McpServer, deps: IssueTriageDeps): void;
22316
+
22317
+ /**
22318
+ * nexus-agents/mcp - Run Graph Workflow Tool
22319
+ *
22320
+ * MCP tool for executing graph-based workflows with checkpointing,
22321
+ * event streaming, and audit trail integration.
22322
+ *
22323
+ * @module mcp/tools/run-graph-workflow
22324
+ * (Source: Issue #840 — Expose graph workflows via MCP tool)
22325
+ */
22326
+
22327
+ declare const RunGraphWorkflowInputSchema: z.ZodObject<{
22328
+ workflow: z.ZodString;
22329
+ inputs: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
22330
+ enableCheckpointing: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22331
+ enableAuditTrail: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22332
+ }, z.core.$strip>;
22333
+ type RunGraphWorkflowInput = z.infer<typeof RunGraphWorkflowInputSchema>;
22334
+ interface RunGraphWorkflowDeps extends BaseMcpToolDeps {
22335
+ /** MCP notifier for client-visible logging (Issue #974) */
22336
+ readonly notifier?: IMcpNotifier | undefined;
22137
22337
  }
22138
22338
  interface RunGraphWorkflowResponse {
22139
22339
  readonly workflow: string;
@@ -22151,7 +22351,7 @@ interface GraphEventSummary {
22151
22351
  readonly nodeId?: string | undefined;
22152
22352
  readonly detail?: string | undefined;
22153
22353
  }
22154
- /** Registers the run_graph_workflow tool with an MCP server. */
22354
+ /** Registers the run_graph_workflow tool with an MCP server. @category MCP */
22155
22355
  declare function registerRunGraphWorkflowTool(server: McpServer, deps: RunGraphWorkflowDeps): void;
22156
22356
 
22157
22357
  /**
@@ -22170,7 +22370,7 @@ declare const ExecuteSpecInputSchema: z.ZodObject<{
22170
22370
  }, z.core.$strip>;
22171
22371
  type ExecuteSpecInput = z.infer<typeof ExecuteSpecInputSchema>;
22172
22372
  type ExecuteSpecDeps = BaseMcpToolDeps;
22173
- /** Registers the execute_spec tool with an MCP server. */
22373
+ /** Registers the execute_spec tool with an MCP server. @category MCP */
22174
22374
  declare function registerExecuteSpecTool(server: McpServer, deps: ExecuteSpecDeps): void;
22175
22375
 
22176
22376
  /**
@@ -22269,6 +22469,139 @@ interface SessionMemoryConfig {
22269
22469
  readonly logger?: ILogger;
22270
22470
  }
22271
22471
 
22472
+ /**
22473
+ * nexus-agents/mcp - Memory Query Tool
22474
+ *
22475
+ * MCP tool for unified memory search across all backends.
22476
+ * Exposes ToolMemoryManager.queryAll() as an MCP tool.
22477
+ *
22478
+ * @module mcp/tools/memory-query
22479
+ * (Source: Issue #751 - Memory observability MCP tools)
22480
+ */
22481
+
22482
+ /**
22483
+ * Input schema for memory_query tool.
22484
+ */
22485
+ declare const MemoryQueryInputSchema: z.ZodObject<{
22486
+ query: z.ZodString;
22487
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
22488
+ source: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
22489
+ session: "session";
22490
+ belief: "belief";
22491
+ all: "all";
22492
+ adaptive: "adaptive";
22493
+ agentic: "agentic";
22494
+ typed: "typed";
22495
+ }>>>;
22496
+ }, z.core.$strip>;
22497
+ /**
22498
+ * Type for validated memory query input.
22499
+ */
22500
+ type MemoryQueryInput = z.infer<typeof MemoryQueryInputSchema>;
22501
+ /**
22502
+ * Dependencies for memory_query tool.
22503
+ */
22504
+ type MemoryQueryDeps = BaseMcpToolDeps;
22505
+ /**
22506
+ * Registers the memory_query tool with the MCP server.
22507
+ *
22508
+ * @category MCP
22509
+ * @param server - MCP server instance
22510
+ * @param deps - Tool dependencies
22511
+ */
22512
+ declare function registerMemoryQueryTool(server: McpServer, deps: MemoryQueryDeps): void;
22513
+
22514
+ /**
22515
+ * nexus-agents/mcp - Memory Stats Tool
22516
+ *
22517
+ * MCP tool for memory system observability dashboard.
22518
+ * Aggregates stats from all memory backends.
22519
+ *
22520
+ * @module mcp/tools/memory-stats
22521
+ * (Source: Issue #751 - Memory observability MCP tools)
22522
+ */
22523
+
22524
+ /**
22525
+ * Input schema for memory_stats tool.
22526
+ */
22527
+ declare const MemoryStatsInputSchema: z.ZodObject<{
22528
+ includeDecay: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22529
+ }, z.core.$strip>;
22530
+ /**
22531
+ * Dependencies for memory_stats tool.
22532
+ */
22533
+ type MemoryStatsDeps = BaseMcpToolDeps;
22534
+ /**
22535
+ * Registers the memory_stats tool with the MCP server.
22536
+ *
22537
+ * @category MCP
22538
+ * @param server - MCP server instance
22539
+ * @param deps - Tool dependencies
22540
+ */
22541
+ declare function registerMemoryStatsTool(server: McpServer, deps: MemoryStatsDeps): void;
22542
+
22543
+ /**
22544
+ * nexus-agents/mcp - Memory Write Tool
22545
+ *
22546
+ * MCP tool for manual memory injection across backends.
22547
+ * Supports session (learnings), belief (triples), agentic (knowledge),
22548
+ * adaptive (priority-scored), and typed (MIRIX-style) writes.
22549
+ *
22550
+ * @module mcp/tools/memory-write
22551
+ * (Source: Issue #1090 - Add memory_write MCP tool)
22552
+ */
22553
+
22554
+ /**
22555
+ * Input schema for memory_write tool.
22556
+ */
22557
+ declare const MemoryWriteInputSchema: z.ZodObject<{
22558
+ key: z.ZodString;
22559
+ content: z.ZodString;
22560
+ backend: z.ZodEnum<{
22561
+ session: "session";
22562
+ belief: "belief";
22563
+ adaptive: "adaptive";
22564
+ agentic: "agentic";
22565
+ typed: "typed";
22566
+ }>;
22567
+ confidence: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
22568
+ low: "low";
22569
+ medium: "medium";
22570
+ high: "high";
22571
+ }>>>;
22572
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
22573
+ }, z.core.$strip>;
22574
+ /**
22575
+ * Type for validated memory write input.
22576
+ */
22577
+ type MemoryWriteInput = z.infer<typeof MemoryWriteInputSchema>;
22578
+ /**
22579
+ * Dependencies for memory_write tool.
22580
+ */
22581
+ type MemoryWriteDeps = BaseMcpToolDeps;
22582
+ /**
22583
+ * Registers the memory_write tool with the MCP server.
22584
+ *
22585
+ * @category MCP
22586
+ * @param server - MCP server instance
22587
+ * @param deps - Tool dependencies
22588
+ */
22589
+ declare function registerMemoryWriteTool(server: McpServer, deps: MemoryWriteDeps): void;
22590
+
22591
+ /**
22592
+ * nexus-agents/mcp - Weather Report MCP Tool
22593
+ *
22594
+ * Read-only MCP tool that returns per-CLI, per-category performance
22595
+ * data and adaptive routing bonuses from the OutcomeStore.
22596
+ *
22597
+ * @module mcp/tools/weather-report-tool
22598
+ * (Source: Issue #865 — Weather report with adaptive routing)
22599
+ */
22600
+
22601
+ type WeatherReportDeps = BaseMcpToolDeps;
22602
+ /** @category MCP */
22603
+ declare function registerWeatherReportTool(server: McpServer, deps: WeatherReportDeps): void;
22604
+
22272
22605
  /**
22273
22606
  * Type definitions for the Weather Report MCP tool.
22274
22607
  *
@@ -22279,6 +22612,27 @@ interface SessionMemoryConfig {
22279
22612
  * (Source: Issue #865 — Weather report with adaptive routing)
22280
22613
  */
22281
22614
 
22615
+ declare const WeatherReportInputSchema: z.ZodObject<{
22616
+ cli: z.ZodOptional<z.ZodEnum<{
22617
+ claude: "claude";
22618
+ gemini: "gemini";
22619
+ codex: "codex";
22620
+ opencode: "opencode";
22621
+ }>>;
22622
+ category: z.ZodOptional<z.ZodEnum<{
22623
+ planning: "planning";
22624
+ code_generation: "code_generation";
22625
+ code_review: "code_review";
22626
+ research: "research";
22627
+ architecture: "architecture";
22628
+ security_review: "security_review";
22629
+ documentation: "documentation";
22630
+ testing: "testing";
22631
+ devops: "devops";
22632
+ exploration: "exploration";
22633
+ }>>;
22634
+ includeAdaptive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22635
+ }, z.core.$strip>;
22282
22636
  /** Options for generateWeatherReport (all fields optional). */
22283
22637
  interface WeatherReportOptions {
22284
22638
  readonly cli?: CliNameLiteral;
@@ -22472,6 +22826,41 @@ type WeatherReportConfig = z.infer<typeof WeatherReportConfigSchema>;
22472
22826
  */
22473
22827
  declare function generateWeatherReport(input: WeatherReportOptions, config?: Partial<WeatherReportConfig>): WeatherReportResponse;
22474
22828
 
22829
+ /**
22830
+ * nexus-agents/mcp - Registry Import MCP Tool
22831
+ *
22832
+ * Generates draft ModelCapability entries for adding new models
22833
+ * to the canonical registry. Quality scores default to 5/10
22834
+ * and require human review before routing trusts them.
22835
+ *
22836
+ * @module mcp/tools/registry-import-tool
22837
+ * (Source: Issue #889, Epic #888)
22838
+ */
22839
+
22840
+ type RegistryImportDeps = BaseMcpToolDeps;
22841
+ /** @category MCP */
22842
+ declare function registerRegistryImportTool(server: McpServer, deps: RegistryImportDeps): void;
22843
+
22844
+ /**
22845
+ * nexus-agents/mcp - Registry Import Types
22846
+ *
22847
+ * Input/output types for the registry_import MCP tool.
22848
+ *
22849
+ * @module mcp/tools/registry-import-types
22850
+ * (Source: Issue #889, Epic #888)
22851
+ */
22852
+
22853
+ declare const RegistryImportInputSchema: z.ZodObject<{
22854
+ provider: z.ZodEnum<{
22855
+ anthropic: "anthropic";
22856
+ google: "google";
22857
+ openai: "openai";
22858
+ }>;
22859
+ modelId: z.ZodString;
22860
+ dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22861
+ }, z.core.$strip>;
22862
+ type RegistryImportInput = z.infer<typeof RegistryImportInputSchema>;
22863
+
22475
22864
  /**
22476
22865
  * nexus-agents/mcp - Repository Analyze MCP Tool
22477
22866
  *
@@ -22484,6 +22873,7 @@ declare function generateWeatherReport(input: WeatherReportOptions, config?: Par
22484
22873
  */
22485
22874
 
22486
22875
  type RepoAnalyzeDeps = BaseMcpToolDeps;
22876
+ /** @category MCP */
22487
22877
  declare function registerRepoAnalyzeTool(server: McpServer, deps: RepoAnalyzeDeps): void;
22488
22878
 
22489
22879
  /**
@@ -22564,7 +22954,7 @@ interface GhRepoMetadata {
22564
22954
  } | null;
22565
22955
  }
22566
22956
  /** Analyze a GitHub repository given its metadata and file tree. */
22567
- declare function analyzeRepo(metadata: GhRepoMetadata, topLevelEntries: readonly string[]): RepoAnalysis;
22957
+ declare function analyzeRepo(metadata: GhRepoMetadata, topLevelEntries: readonly string[], workflowEntries?: readonly string[]): RepoAnalysis;
22568
22958
  /** Fetch repo data from GitHub and produce analysis. */
22569
22959
  declare function analyzeGitHubRepo(input: RepoAnalyzeInput): Promise<RepoAnalysis>;
22570
22960
 
@@ -22579,6 +22969,7 @@ declare function analyzeGitHubRepo(input: RepoAnalyzeInput): Promise<RepoAnalysi
22579
22969
  */
22580
22970
 
22581
22971
  type RepoSecurityPlanDeps = BaseMcpToolDeps;
22972
+ /** @category MCP */
22582
22973
  declare function registerRepoSecurityPlanTool(server: McpServer, deps: RepoSecurityPlanDeps): void;
22583
22974
 
22584
22975
  /**
@@ -22742,6 +23133,70 @@ declare function clearRegistryCache(): void;
22742
23133
  */
22743
23134
  declare function getRegistryManifest(): Promise<ScannerRegistryManifest | null>;
22744
23135
 
23136
+ /**
23137
+ * nexus-agents/mcp - Search Codebase MCP Tool
23138
+ *
23139
+ * Keyword search across an indexed codebase symbol table.
23140
+ * Returns matching functions, classes, methods, interfaces, and types
23141
+ * with relevance scoring and file locations.
23142
+ *
23143
+ * @module mcp/tools/search-codebase-tool
23144
+ */
23145
+
23146
+ declare const SearchCodebaseInputSchema: z.ZodObject<{
23147
+ query: z.ZodString;
23148
+ directory: z.ZodOptional<z.ZodString>;
23149
+ limit: z.ZodOptional<z.ZodNumber>;
23150
+ mode: z.ZodOptional<z.ZodEnum<{
23151
+ search: "search";
23152
+ summary: "summary";
23153
+ list: "list";
23154
+ }>>;
23155
+ }, z.core.$strip>;
23156
+ type SearchCodebaseDeps = BaseMcpToolDeps;
23157
+ /** @category MCP */
23158
+ declare function registerSearchCodebaseTool(server: McpServer, deps: SearchCodebaseDeps): void;
23159
+
23160
+ /**
23161
+ * nexus-agents/mcp - Extract Symbols MCP Tool
23162
+ *
23163
+ * AST-based symbol extraction for token-efficient code retrieval.
23164
+ * Returns function, class, method, interface, type definitions from
23165
+ * TypeScript/JavaScript files — 80%+ smaller than full file reads.
23166
+ *
23167
+ * @module mcp/tools/extract-symbols-tool
23168
+ */
23169
+
23170
+ declare const ExtractSymbolsInputSchema: z.ZodObject<{
23171
+ filePath: z.ZodString;
23172
+ mode: z.ZodOptional<z.ZodEnum<{
23173
+ full: "full";
23174
+ index: "index";
23175
+ }>>;
23176
+ }, z.core.$strip>;
23177
+ type ExtractSymbolsDeps = BaseMcpToolDeps;
23178
+ /** @category MCP */
23179
+ declare function registerExtractSymbolsTool(server: McpServer, deps: ExtractSymbolsDeps): void;
23180
+
23181
+ /**
23182
+ * nexus-agents/mcp - Query Trace MCP Tool (Epic #952, Phase 5)
23183
+ *
23184
+ * Read-only MCP tool that queries execution traces from disk
23185
+ * (./runs/{runId}/trace.jsonl) written by TraceWriter.
23186
+ *
23187
+ * @module mcp/tools/query-trace-tool
23188
+ */
23189
+
23190
+ declare const QueryTraceInputSchema: z.ZodObject<{
23191
+ runId: z.ZodString;
23192
+ eventType: z.ZodOptional<z.ZodString>;
23193
+ limit: z.ZodOptional<z.ZodNumber>;
23194
+ }, z.core.$strip>;
23195
+ type QueryTraceInput = z.infer<typeof QueryTraceInputSchema>;
23196
+ type QueryTraceDeps = BaseMcpToolDeps;
23197
+ /** @category MCP */
23198
+ declare function registerQueryTraceTool(server: McpServer, deps: QueryTraceDeps): void;
23199
+
22745
23200
  /**
22746
23201
  * Pipeline Event Types — V2 Observability (Issue #912, Phase 4-1)
22747
23202
  *
@@ -23148,13 +23603,9 @@ declare abstract class BaseCliAdapter implements ICliAdapter {
23148
23603
  */
23149
23604
  private computeTimeout;
23150
23605
  /**
23151
- * Executes task with retry logic.
23606
+ * Executes task with retry logic via shared retry loop.
23152
23607
  */
23153
23608
  private executeWithRetry;
23154
- /**
23155
- * Checks if this attempt should be the final one.
23156
- */
23157
- private isTerminalAttempt;
23158
23609
  /**
23159
23610
  * Performs a health check.
23160
23611
  */
@@ -23201,6 +23652,52 @@ declare abstract class BaseCliAdapter implements ICliAdapter {
23201
23652
  protected delay(ms: number): Promise<void>;
23202
23653
  }
23203
23654
 
23655
+ /**
23656
+ * nexus-agents/cli-adapters - Unified CLI Retry Loop
23657
+ *
23658
+ * Single retry loop used by all CLI adapters (base + Gemini).
23659
+ * Supports optional circuit breaker integration.
23660
+ *
23661
+ * (Source: Issue #1596 — Extract shared prompt utils and rate-limit patterns)
23662
+ */
23663
+
23664
+ interface CliRetryLoopConfig {
23665
+ readonly maxRetries: number;
23666
+ readonly allowRetry: boolean;
23667
+ readonly baseDelayMs: number;
23668
+ readonly maxDelayMs: number;
23669
+ readonly circuitBreaker?: ICircuitBreaker | null;
23670
+ readonly cli: CliName;
23671
+ readonly logger: ILogger;
23672
+ }
23673
+ interface CliRetryResult {
23674
+ readonly response: CliResponse;
23675
+ readonly retryCount: number;
23676
+ }
23677
+ /**
23678
+ * Calculates exponential backoff delay with jitter.
23679
+ *
23680
+ * @param attempt - Current attempt number (1-indexed)
23681
+ * @param baseDelayMs - Base delay in milliseconds
23682
+ * @param maxDelayMs - Maximum delay cap in milliseconds
23683
+ * @returns Delay in milliseconds with jitter applied
23684
+ */
23685
+ declare function calculateBackoffDelay(attempt: number, baseDelayMs: number, maxDelayMs: number): number;
23686
+ /** Determines if an error code is retryable. */
23687
+ declare function isRetryableError(code: CliErrorCode): boolean;
23688
+ /**
23689
+ * Categorizes a CLI error for circuit breaker tracking.
23690
+ * Returns a FailureCategory compatible with the circuit breaker.
23691
+ */
23692
+ declare function categorizeError(error: CliError): FailureCategory$1;
23693
+ /**
23694
+ * Executes a CLI operation with retry logic and optional circuit breaker.
23695
+ *
23696
+ * Used by both BaseCliAdapter (no circuit breaker) and GeminiCliAdapter
23697
+ * (with circuit breaker) to eliminate duplicate retry implementations.
23698
+ */
23699
+ declare function executeCliRetryLoop(executeFn: () => Promise<Result<CliResponse, CliError>>, config: CliRetryLoopConfig): Promise<Result<CliRetryResult, CliError>>;
23700
+
23204
23701
  /**
23205
23702
  * nexus-agents/cli-adapters - Subprocess Adapter
23206
23703
  *
@@ -23419,9 +23916,6 @@ declare class GeminiCliAdapter extends SubprocessCliAdapter {
23419
23916
  private buildExecutionOptions;
23420
23917
  private buildExecutionResult;
23421
23918
  private executeWithRetryTracking;
23422
- private shouldRetry;
23423
- private logRetryAttempt;
23424
- private logRetryDelay;
23425
23919
  }
23426
23920
 
23427
23921
  /**
@@ -24742,363 +25236,48 @@ declare function actorFromContext(ctx: RequestContext, fallback?: AuditActor): A
24742
25236
  /**
24743
25237
  * Maps tool result to audit outcome.
24744
25238
  */
24745
- declare function resultToOutcome(isError: boolean | undefined, isPolicyDenied: boolean): AuditOutcome;
24746
- /** Options for logging tool invocation audit */
24747
- interface LogToolInvocationOpts {
24748
- auditLogger: IAuditLogger;
24749
- toolName: string;
24750
- outcome: AuditOutcome;
24751
- actor: AuditActor;
24752
- requestId: string;
24753
- durationMs?: number | undefined;
24754
- errorMessage?: string | undefined;
24755
- }
24756
- /**
24757
- * Logs tool invocation to audit logger.
24758
- */
24759
- declare function logToolInvocationAudit(opts: LogToolInvocationOpts): void;
24760
- /** Options for logging policy audit */
24761
- interface LogPolicyAuditOpts {
24762
- auditLogger: IAuditLogger;
24763
- policyName: string;
24764
- decision: 'allow' | 'deny';
24765
- reason: string;
24766
- toolName: string;
24767
- actor: AuditActor;
24768
- requestId: string;
24769
- }
24770
- /**
24771
- * Logs policy decision to audit logger.
24772
- */
24773
- declare function logPolicyAudit(opts: LogPolicyAuditOpts): void;
24774
- /** Options for logging rate limit audit */
24775
- interface LogRateLimitAuditOpts {
24776
- auditLogger: IAuditLogger;
24777
- toolName: string;
24778
- actor: AuditActor;
24779
- currentRate: number;
24780
- limitRate: number;
24781
- requestId: string;
24782
- }
24783
- /**
24784
- * Logs rate limit violation to audit logger.
24785
- */
24786
- declare function logRateLimitAudit(opts: LogRateLimitAuditOpts): void;
24787
-
24788
- /**
24789
- * nexus-agents/api - REST API Types
24790
- *
24791
- * Type definitions for the REST API gateway.
24792
- * Mirrors MCP tool interfaces with REST-specific extensions.
24793
- *
24794
- * (Source: Issue #184 - REST API gateway for non-MCP clients)
24795
- *
24796
- * @module api/rest-types
24797
- */
24798
-
24799
- /**
24800
- * REST API server configuration.
24801
- */
24802
- declare const RestApiConfigSchema: z.ZodObject<{
24803
- port: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
24804
- host: z.ZodDefault<z.ZodOptional<z.ZodString>>;
24805
- basePath: z.ZodDefault<z.ZodOptional<z.ZodString>>;
24806
- enableCors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
24807
- corsOrigins: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
24808
- enableSwagger: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
24809
- rateLimitPerMinute: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
24810
- apiKeyHeader: z.ZodDefault<z.ZodOptional<z.ZodString>>;
24811
- trustProxy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
24812
- maxBodySize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
24813
- }, z.core.$strip>;
24814
- type RestApiConfig = z.infer<typeof RestApiConfigSchema>;
24815
- /**
24816
- * API key configuration.
24817
- */
24818
- interface ApiKeyConfig {
24819
- /** API key value */
24820
- key: string;
24821
- /** Optional name/label */
24822
- name?: string | undefined;
24823
- /** Allowed endpoints (empty = all) */
24824
- allowedEndpoints?: string[] | undefined;
24825
- /** Rate limit override */
24826
- rateLimitOverride?: number | undefined;
24827
- }
24828
- /**
24829
- * Authenticated request context.
24830
- */
24831
- interface AuthContext {
24832
- /** Whether request is authenticated */
24833
- authenticated: boolean;
24834
- /** API key name if authenticated */
24835
- keyName?: string | undefined;
24836
- /** Client ID for tracking */
24837
- clientId: string;
24838
- }
24839
- /**
24840
- * Standard API error response.
24841
- */
24842
- declare const ApiErrorSchema: z.ZodObject<{
24843
- error: z.ZodObject<{
24844
- code: z.ZodString;
24845
- message: z.ZodString;
24846
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
24847
- }, z.core.$strip>;
24848
- requestId: z.ZodString;
24849
- timestamp: z.ZodString;
24850
- }, z.core.$strip>;
24851
- type ApiError = z.infer<typeof ApiErrorSchema>;
24852
- /**
24853
- * POST /orchestrate request body.
24854
- */
24855
- declare const OrchestrateRequestSchema: z.ZodObject<{
24856
- task: z.ZodString;
24857
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
24858
- constraints: z.ZodOptional<z.ZodObject<{
24859
- maxTokens: z.ZodOptional<z.ZodNumber>;
24860
- maxCostUsd: z.ZodOptional<z.ZodNumber>;
24861
- maxDurationMs: z.ZodOptional<z.ZodNumber>;
24862
- }, z.core.$strip>>;
24863
- }, z.core.$strip>;
24864
- type OrchestrateRequest = z.infer<typeof OrchestrateRequestSchema>;
24865
- /**
24866
- * POST /orchestrate response body.
24867
- */
24868
- declare const OrchestrateResponseSchema: z.ZodObject<{
24869
- taskId: z.ZodString;
24870
- analysis: z.ZodObject<{
24871
- complexity: z.ZodNumber;
24872
- taskType: z.ZodString;
24873
- requirements: z.ZodArray<z.ZodString>;
24874
- approach: z.ZodString;
24875
- }, z.core.$strip>;
24876
- result: z.ZodUnknown;
24877
- metadata: z.ZodObject<{
24878
- durationMs: z.ZodNumber;
24879
- tokensUsed: z.ZodNumber;
24880
- expertsUsed: z.ZodArray<z.ZodString>;
24881
- }, z.core.$strip>;
24882
- }, z.core.$strip>;
24883
- type OrchestrateResponse = z.infer<typeof OrchestrateResponseSchema>;
24884
- /**
24885
- * POST /delegate request body.
24886
- */
24887
- declare const DelegateRequestSchema: z.ZodObject<{
24888
- task: z.ZodString;
24889
- preferredModel: z.ZodOptional<z.ZodEnum<{
24890
- claude: "claude";
24891
- gemini: "gemini";
24892
- codex: "codex";
24893
- opencode: "opencode";
24894
- }>>;
24895
- constraints: z.ZodOptional<z.ZodObject<{
24896
- maxTokens: z.ZodOptional<z.ZodNumber>;
24897
- maxCostUsd: z.ZodOptional<z.ZodNumber>;
24898
- maxLatencyMs: z.ZodOptional<z.ZodNumber>;
24899
- }, z.core.$strip>>;
24900
- }, z.core.$strip>;
24901
- type DelegateRequest = z.infer<typeof DelegateRequestSchema>;
24902
- /**
24903
- * POST /delegate response body.
24904
- */
24905
- declare const DelegateResponseSchema: z.ZodObject<{
24906
- selectedModel: z.ZodString;
24907
- confidence: z.ZodNumber;
24908
- reason: z.ZodString;
24909
- result: z.ZodOptional<z.ZodUnknown>;
24910
- alternatives: z.ZodArray<z.ZodString>;
24911
- }, z.core.$strip>;
24912
- type DelegateResponse = z.infer<typeof DelegateResponseSchema>;
24913
- /**
24914
- * POST /workflow request body.
24915
- */
24916
- declare const WorkflowRequestSchema: z.ZodObject<{
24917
- workflowId: z.ZodOptional<z.ZodString>;
24918
- workflowYaml: z.ZodOptional<z.ZodString>;
24919
- inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
24920
- }, z.core.$strip>;
24921
- type WorkflowRequest = z.infer<typeof WorkflowRequestSchema>;
24922
- /**
24923
- * POST /workflow response body.
24924
- */
24925
- declare const WorkflowResponseSchema: z.ZodObject<{
24926
- executionId: z.ZodString;
24927
- status: z.ZodEnum<{
24928
- failed: "failed";
24929
- completed: "completed";
24930
- timeout: "timeout";
24931
- }>;
24932
- stepResults: z.ZodArray<z.ZodObject<{
24933
- stepId: z.ZodString;
24934
- status: z.ZodString;
24935
- output: z.ZodOptional<z.ZodUnknown>;
24936
- durationMs: z.ZodNumber;
24937
- }, z.core.$strip>>;
24938
- finalOutput: z.ZodOptional<z.ZodUnknown>;
24939
- metadata: z.ZodObject<{
24940
- totalDurationMs: z.ZodNumber;
24941
- stepsCompleted: z.ZodNumber;
24942
- stepsFailed: z.ZodNumber;
24943
- }, z.core.$strip>;
24944
- }, z.core.$strip>;
24945
- type WorkflowResponse = z.infer<typeof WorkflowResponseSchema>;
24946
- /**
24947
- * POST /expert request body.
24948
- */
24949
- declare const ExpertRequestSchema: z.ZodObject<{
24950
- type: z.ZodEnum<{
24951
- code: "code";
24952
- security: "security";
24953
- architecture: "architecture";
24954
- documentation: "documentation";
24955
- testing: "testing";
24956
- }>;
24957
- task: z.ZodString;
24958
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
24959
- }, z.core.$strip>;
24960
- type ExpertRequest = z.infer<typeof ExpertRequestSchema>;
24961
- /**
24962
- * POST /expert response body.
24963
- */
24964
- declare const ExpertResponseSchema: z.ZodObject<{
24965
- expertId: z.ZodString;
24966
- expertType: z.ZodString;
24967
- result: z.ZodUnknown;
24968
- metadata: z.ZodObject<{
24969
- durationMs: z.ZodNumber;
24970
- tokensUsed: z.ZodNumber;
24971
- }, z.core.$strip>;
24972
- }, z.core.$strip>;
24973
- type ExpertResponse = z.infer<typeof ExpertResponseSchema>;
24974
- /**
24975
- * GET /health response.
24976
- */
24977
- declare const HealthResponseSchema: z.ZodObject<{
24978
- status: z.ZodEnum<{
24979
- healthy: "healthy";
24980
- degraded: "degraded";
24981
- unhealthy: "unhealthy";
24982
- }>;
24983
- version: z.ZodString;
24984
- uptime: z.ZodNumber;
24985
- checks: z.ZodRecord<z.ZodString, z.ZodObject<{
24986
- status: z.ZodEnum<{
24987
- pass: "pass";
24988
- fail: "fail";
24989
- }>;
24990
- message: z.ZodOptional<z.ZodString>;
24991
- }, z.core.$strip>>;
24992
- }, z.core.$strip>;
24993
- type HealthResponse = z.infer<typeof HealthResponseSchema>;
24994
- /**
24995
- * GET /metrics response (Prometheus format handled separately).
24996
- */
24997
- declare const MetricsResponseSchema: z.ZodObject<{
24998
- requestsTotal: z.ZodNumber;
24999
- requestsPerEndpoint: z.ZodRecord<z.ZodString, z.ZodNumber>;
25000
- avgResponseTimeMs: z.ZodNumber;
25001
- errorRate: z.ZodNumber;
25002
- activeConnections: z.ZodNumber;
25003
- }, z.core.$strip>;
25004
- type MetricsResponse = z.infer<typeof MetricsResponseSchema>;
25005
- /**
25006
- * REST API server interface.
25007
- */
25008
- interface IRestApiServer {
25009
- /** Start the server */
25010
- start(): Promise<void>;
25011
- /** Stop the server */
25012
- stop(): Promise<void>;
25013
- /** Get the Fastify instance */
25014
- getInstance(): FastifyInstance;
25015
- /** Check if server is running */
25016
- isRunning(): boolean;
25017
- /** Get server address */
25018
- getAddress(): string | null;
25019
- }
25020
-
25021
- /**
25022
- * nexus-agents/api - REST API Server
25023
- *
25024
- * Fastify-based REST API gateway exposing nexus-agents capabilities.
25025
- * Provides HTTP interface for non-MCP clients.
25026
- *
25027
- * (Source: Issue #184 - REST API gateway for non-MCP clients)
25028
- *
25029
- * @module api/rest-server
25030
- */
25031
-
25239
+ declare function resultToOutcome(isError: boolean | undefined, isPolicyDenied: boolean): AuditOutcome;
25240
+ /** Options for logging tool invocation audit */
25241
+ interface LogToolInvocationOpts {
25242
+ auditLogger: IAuditLogger;
25243
+ toolName: string;
25244
+ outcome: AuditOutcome;
25245
+ actor: AuditActor;
25246
+ requestId: string;
25247
+ durationMs?: number | undefined;
25248
+ errorMessage?: string | undefined;
25249
+ }
25032
25250
  /**
25033
- * REST API server options.
25251
+ * Logs tool invocation to audit logger.
25034
25252
  */
25035
- interface RestApiServerOptions {
25036
- config?: Partial<RestApiConfig> | undefined;
25037
- logger?: ILogger | undefined;
25038
- apiKeys?: ApiKeyConfig[] | undefined;
25253
+ declare function logToolInvocationAudit(opts: LogToolInvocationOpts): void;
25254
+ /** Options for logging policy audit */
25255
+ interface LogPolicyAuditOpts {
25256
+ auditLogger: IAuditLogger;
25257
+ policyName: string;
25258
+ decision: 'allow' | 'deny';
25259
+ reason: string;
25260
+ toolName: string;
25261
+ actor: AuditActor;
25262
+ requestId: string;
25039
25263
  }
25040
25264
  /**
25041
- * REST API Server providing HTTP interface to nexus-agents.
25042
- *
25043
- * @example
25044
- * ```typescript
25045
- * const server = new RestApiServer({
25046
- * config: { port: 3000 },
25047
- * apiKeys: [{ key: 'my-secret-key', name: 'default' }],
25048
- * });
25049
- *
25050
- * await server.start();
25051
- * // Server running at http://0.0.0.0:3000
25052
- *
25053
- * await server.stop();
25054
- * ```
25265
+ * Logs policy decision to audit logger.
25055
25266
  */
25056
- declare class RestApiServer implements IRestApiServer {
25057
- private readonly config;
25058
- private readonly logger;
25059
- private readonly apiKeys;
25060
- private fastify;
25061
- private running;
25062
- private address;
25063
- private readonly startTime;
25064
- private requestCount;
25065
- private readonly requestsPerEndpoint;
25066
- private totalResponseTimeMs;
25067
- private errorCount;
25068
- constructor(options?: RestApiServerOptions);
25069
- start(): Promise<void>;
25070
- stop(): Promise<void>;
25071
- getInstance(): FastifyInstance;
25072
- isRunning(): boolean;
25073
- getAddress(): string | null;
25074
- private createFastifyInstance;
25075
- private registerPlugins;
25076
- private registerSwagger;
25077
- private registerMiddleware;
25078
- /** Adds security headers to all responses (Issue #740). */
25079
- private registerSecurityHeaders;
25080
- /** Registers request-level hooks (logging, auth, response tracking). */
25081
- private registerRequestHooks;
25082
- /** Checks if a URL path matches a public (unauthenticated) endpoint. */
25083
- private isPublicPath;
25084
- private authenticateRequest;
25085
- /** Extract a single string value from request headers (handles string[] case). */
25086
- private getHeaderString;
25087
- private getRateLimitKey;
25088
- private getClientId;
25089
- private generateRequestId;
25090
- getMetrics(): {
25091
- requestsTotal: number;
25092
- requestsPerEndpoint: Record<string, number>;
25093
- avgResponseTimeMs: number;
25094
- errorRate: number;
25095
- uptimeMs: number;
25096
- };
25267
+ declare function logPolicyAudit(opts: LogPolicyAuditOpts): void;
25268
+ /** Options for logging rate limit audit */
25269
+ interface LogRateLimitAuditOpts {
25270
+ auditLogger: IAuditLogger;
25271
+ toolName: string;
25272
+ actor: AuditActor;
25273
+ currentRate: number;
25274
+ limitRate: number;
25275
+ requestId: string;
25097
25276
  }
25098
25277
  /**
25099
- * Creates a REST API server instance.
25278
+ * Logs rate limit violation to audit logger.
25100
25279
  */
25101
- declare function createRestApiServer(options?: RestApiServerOptions): IRestApiServer;
25280
+ declare function logRateLimitAudit(opts: LogRateLimitAuditOpts): void;
25102
25281
 
25103
25282
  /**
25104
25283
  * nexus-agents/security/sandbox - Type Definitions
@@ -27197,13 +27376,13 @@ declare function decomposeSpec(spec: ParsedSpec): Result<TaskDag, DecomposeError
27197
27376
  /**
27198
27377
  * Which stage of the pipeline failed.
27199
27378
  */
27200
- type PipelineStage = 'parse' | 'decompose' | 'compile';
27379
+ type PipelineStage$1 = 'parse' | 'decompose' | 'compile';
27201
27380
  /**
27202
27381
  * Error detail when the spec pipeline fails.
27203
27382
  */
27204
27383
  interface PipelineError {
27205
27384
  readonly message: string;
27206
- readonly stage: PipelineStage;
27385
+ readonly stage: PipelineStage$1;
27207
27386
  }
27208
27387
  /**
27209
27388
  * A graph node handler function — takes state, returns partial state update.
@@ -28100,6 +28279,134 @@ declare class NoAdapterError extends Error {
28100
28279
  */
28101
28280
  declare function collectRealVotes(options: CollectRealVotesOptions): Promise<readonly AgentVoteResult[]>;
28102
28281
 
28282
+ /**
28283
+ * nexus-agents/agents - OrchestrationObserver Helper Functions
28284
+ *
28285
+ * Pure helper functions for OrchestrationObserver that don't depend on class state.
28286
+ * Extracted to reduce main class file size and improve testability.
28287
+ *
28288
+ * @module agents/observability/orchestration-observer-helpers
28289
+ */
28290
+
28291
+ /**
28292
+ * Extracts a string field from a payload object safely.
28293
+ *
28294
+ * @param payload - The payload object to extract from
28295
+ * @param field - The field name to extract
28296
+ * @returns The string value or empty string if not found/invalid
28297
+ */
28298
+ declare function extractStringField(payload: Record<string, unknown>, field: string): string;
28299
+ /**
28300
+ * Extracts a number field from a payload object safely.
28301
+ *
28302
+ * @param payload - The payload object to extract from
28303
+ * @param field - The field name to extract
28304
+ * @param defaultValue - Default value if not found
28305
+ * @returns The number value or default if not found/invalid
28306
+ */
28307
+ declare function extractNumberField(payload: Record<string, unknown>, field: string, defaultValue?: number): number;
28308
+ /**
28309
+ * Extracts a boolean field from a payload object safely.
28310
+ *
28311
+ * @param payload - The payload object to extract from
28312
+ * @param field - The field name to extract
28313
+ * @returns The boolean value (defaults to false if not found/invalid)
28314
+ */
28315
+ declare function extractBooleanField(payload: Record<string, unknown>, field: string): boolean;
28316
+ /**
28317
+ * Extracts a string array field from a payload object safely.
28318
+ *
28319
+ * @param payload - The payload object to extract from
28320
+ * @param field - The field name to extract
28321
+ * @returns The string array or empty array if not found/invalid
28322
+ */
28323
+ declare function extractStringArrayField(payload: Record<string, unknown>, field: string): string[];
28324
+ /**
28325
+ * Extracts session ID from event object or payload.
28326
+ *
28327
+ * @param event - The domain event
28328
+ * @param payload - The event payload
28329
+ * @returns The session ID or empty string if not found
28330
+ */
28331
+ declare function extractSessionId(event: DomainEvent, payload: Record<string, unknown>): string;
28332
+ /**
28333
+ * Creates initial session metrics with default values.
28334
+ *
28335
+ * @param sessionId - The session ID
28336
+ * @returns A new SessionMetrics object with initial values
28337
+ */
28338
+ declare function createInitialSessionMetrics(sessionId: string): SessionMetrics;
28339
+ /**
28340
+ * Creates initial token usage with zero values.
28341
+ *
28342
+ * @returns A new TokenUsage object with zero values
28343
+ */
28344
+ declare function createInitialTokenUsage(): TokenUsage$1;
28345
+ /**
28346
+ * Creates initial cost metrics with zero values.
28347
+ *
28348
+ * @returns A new CostMetrics object with zero values
28349
+ */
28350
+ declare function createInitialCostMetrics(): CostMetrics;
28351
+ /**
28352
+ * Creates a new TrackedAgent object with initial values.
28353
+ *
28354
+ * @param agentId - The agent ID
28355
+ * @param state - The initial agent state
28356
+ * @param role - The agent role (defaults to 'unknown')
28357
+ * @param currentTask - Optional current task description
28358
+ * @returns A new TrackedAgent object
28359
+ */
28360
+ declare function createTrackedAgent(agentId: string, state: AgentState$1, role?: string, currentTask?: string): TrackedAgent;
28361
+ /**
28362
+ * Calculates routing distribution from routing history.
28363
+ *
28364
+ * @param routingHistory - The routing decision history
28365
+ * @returns A record mapping CLI names to counts
28366
+ */
28367
+ declare function calculateRoutingDistribution(routingHistory: readonly RoutingDecision$2[]): Record<CliName, number>;
28368
+ /**
28369
+ * Aggregates token and cost totals from session metrics.
28370
+ *
28371
+ * @param sessionMetrics - Iterable of session metrics
28372
+ * @returns Object containing total tokens and total cost
28373
+ */
28374
+ declare function calculateMetricsTotals(sessionMetrics: Iterable<SessionMetrics>): {
28375
+ totalTokens: number;
28376
+ totalCost: number;
28377
+ };
28378
+ /**
28379
+ * Counts active sessions (sessions without a completedAt timestamp).
28380
+ *
28381
+ * @param sessionMetrics - Iterable of session metrics
28382
+ * @returns The count of active sessions
28383
+ */
28384
+ declare function countActiveSessions(sessionMetrics: Iterable<SessionMetrics>): number;
28385
+ /**
28386
+ * Finds the first active session (no completedAt) from metrics.
28387
+ *
28388
+ * @param sessionMetrics - Iterable of session metrics
28389
+ * @returns The first active session or undefined
28390
+ */
28391
+ declare function findActiveSession(sessionMetrics: Iterable<SessionMetrics>): SessionMetrics | undefined;
28392
+ /**
28393
+ * Identifies session IDs to remove based on max history limit.
28394
+ * Returns oldest sessions first.
28395
+ *
28396
+ * @param sessions - Array of [sessionId, metrics] entries
28397
+ * @param maxSessions - Maximum sessions to keep
28398
+ * @returns Array of session IDs to remove
28399
+ */
28400
+ declare function identifySessionsToRemove(sessions: Array<[string, SessionMetrics]>, maxSessions: number): string[];
28401
+ /**
28402
+ * Calculates the cost for token usage based on rate.
28403
+ *
28404
+ * @param tokens - Token usage to calculate cost for
28405
+ * @param ratePerThousand - Cost rate per 1000 tokens
28406
+ * @returns The calculated cost in USD
28407
+ */
28408
+ declare function calculateTokenCost(tokens: TokenUsage$1, ratePerThousand: number): number;
28409
+
28103
28410
  /**
28104
28411
  * nexus-agents/swe-bench - Type Definitions
28105
28412
  *
@@ -28135,6 +28442,10 @@ interface SWEBenchInstance {
28135
28442
  readonly version?: string;
28136
28443
  /** Environment setup script. */
28137
28444
  readonly environment_setup_commit?: string;
28445
+ /** Tests that should pass after the fix (currently failing). */
28446
+ readonly FAIL_TO_PASS?: readonly string[];
28447
+ /** Tests that should continue passing after the fix. */
28448
+ readonly PASS_TO_PASS?: readonly string[];
28138
28449
  }
28139
28450
  /**
28140
28451
  * A prediction/solution for a SWE-bench instance.
@@ -28459,7 +28770,7 @@ declare function validatePrediction(prediction: unknown): prediction is SWEBench
28459
28770
  /**
28460
28771
  * System prompt for SWE-bench agent.
28461
28772
  */
28462
- declare const SWE_BENCH_SYSTEM_PROMPT = "You are an expert software engineer solving GitHub issues.\n\nYour task is to find the root cause and fix it with a minimal patch. Change as few lines as possible. Do not refactor surrounding code.\n\nGuidelines:\n1. Read the problem statement carefully.\n2. Read the FAIL_TO_PASS test names to understand expected behavior, but do NOT edit test files.\n3. Start with files mentioned in the error/traceback, then search for the function/class name.\n4. Identify the root cause of the issue.\n5. Edit only the source files needed for a minimal fix. Maintain backward compatibility.\n6. Run `git diff` to verify your changes are correct BEFORE outputting the patch.\n\nIMPORTANT: After making your fix, output the patch using this exact format:\n\n```diff\n[paste your \"git diff\" output here]\n```";
28773
+ declare const SWE_BENCH_SYSTEM_PROMPT = "You are an expert software engineer solving GitHub issues.\n\nYour task is to find the root cause and fix it with a minimal patch. Change as few lines as possible. Do not refactor surrounding code.\n\nGuidelines:\n1. Read the problem statement carefully.\n2. Read the FAIL_TO_PASS test names to understand expected behavior, but do NOT edit test files.\n3. Start with files mentioned in the error/traceback, then search for the function/class name.\n4. Identify the root cause of the issue.\n5. Edit only the source files needed for a minimal fix. Maintain backward compatibility.\n6. VERIFY your fix by running the failing test(s) BEFORE outputting the patch.\n7. If the test still fails after your fix, analyze the failure output and iterate.\n8. Run `git diff` to confirm your final changes.\n\nCONTEXT BUDGET: You have limited context. Be efficient:\n- Don't read entire files \u2014 use grep/search to find relevant sections\n- Don't explore the whole codebase \u2014 go directly to files mentioned in the error\n- Keep your analysis concise \u2014 focus on the root cause, not comprehensive review\n- If you're running low on context, output your best patch immediately\n\nIMPORTANT: After making your fix, output the patch using this exact format:\n\n```diff\n[paste your \"git diff\" output here]\n```";
28463
28774
  /**
28464
28775
  * Creates a user prompt for a specific SWE-bench instance.
28465
28776
  */
@@ -31086,9 +31397,6 @@ declare function extractFilesFromResponse(response: string): ExploredFile[];
31086
31397
  * Returns null if none found. Truncates to 200 chars.
31087
31398
  */
31088
31399
  declare function extractHypothesis(response: string): string | null;
31089
- /**
31090
- * Extracts an approach record from agent response and iteration metadata.
31091
- */
31092
31400
  declare function extractApproach(response: string, iteration: number, hadPatch: boolean, patchApplied: boolean): ApproachRecord;
31093
31401
  /**
31094
31402
  * Merges new findings into existing context.
@@ -31899,6 +32207,268 @@ interface V2Config {
31899
32207
  */
31900
32208
  declare function resolveV2Config(): V2Config;
31901
32209
 
32210
+ /**
32211
+ * Multi-Agent Development Pipeline (#1684)
32212
+ *
32213
+ * Orchestrates the full development workflow with iterative loops:
32214
+ *
32215
+ * 1. RESEARCH — research expert gathers context
32216
+ * 2. PLAN+VOTE — architect plans, consensus votes, iterate on feedback
32217
+ * 3. DECOMPOSE — PM splits approved plan into phases/epics/issues
32218
+ * 4. IMPLEMENT — code experts work assigned tasks in parallel
32219
+ * 5. QA REVIEW — QA expert reviews, sends back to PM if issues found
32220
+ * 6. SECURITY — SARIF scan blocks on critical/high findings
32221
+ * 7. SHIP — all gates passed
32222
+ *
32223
+ * Each stage can iterate: vote feedback loops back to plan,
32224
+ * QA failures loop back to implementation via PM reassignment.
32225
+ *
32226
+ * @module pipeline/dev-pipeline
32227
+ */
32228
+ /** Agent roles used in the pipeline. */
32229
+ type PipelineRole = 'researcher' | 'architect' | 'pm' | 'coder' | 'qa' | 'security';
32230
+ /** A task decomposed by the PM, potentially with conditional approval requirements. */
32231
+ interface PipelineTask {
32232
+ readonly id: string;
32233
+ readonly title: string;
32234
+ readonly description: string;
32235
+ readonly assignedTo: PipelineRole;
32236
+ readonly status: 'pending' | 'in_progress' | 'review' | 'done' | 'rejected';
32237
+ readonly feedback?: string;
32238
+ /** Implementation text from the code expert (surfaced for harness use). */
32239
+ readonly implementation?: string;
32240
+ /** Conditions required for task completion (from conditional_go vote). */
32241
+ readonly conditions?: readonly string[] | undefined;
32242
+ /** Caveats/warnings associated with the task (from conditional_go vote). */
32243
+ readonly caveats?: readonly string[] | undefined;
32244
+ }
32245
+ /** Vote result from consensus — discriminated union with conditional approval support. */
32246
+ type VoteResult = {
32247
+ readonly kind: 'approved';
32248
+ readonly approvalPercentage: number;
32249
+ } | {
32250
+ readonly kind: 'rejected';
32251
+ readonly feedback: string;
32252
+ readonly approvalPercentage: number;
32253
+ } | {
32254
+ readonly kind: 'conditional_go';
32255
+ readonly conditions: readonly string[];
32256
+ readonly caveats: readonly string[];
32257
+ readonly approvalPercentage: number;
32258
+ };
32259
+ /** QA review result. */
32260
+ interface QaReviewResult {
32261
+ readonly verdict: 'pass' | 'needs_work' | 'reject';
32262
+ readonly feedback: string;
32263
+ readonly issues: readonly string[];
32264
+ }
32265
+ /** Overall pipeline result. */
32266
+ interface DevPipelineResult {
32267
+ readonly completed: boolean;
32268
+ readonly plan: string;
32269
+ readonly tasks: readonly PipelineTask[];
32270
+ readonly voteIterations: number;
32271
+ readonly qaIterations: number;
32272
+ readonly securityPassed: boolean;
32273
+ }
32274
+ /** Pluggable stage implementations — inject real or mock agents. */
32275
+ interface DevPipelineStages {
32276
+ /** Research expert gathers context for the task. */
32277
+ research(task: string): Promise<string>;
32278
+ /** Architect creates a plan from research + task. */
32279
+ plan(task: string, research: string, priorFeedback?: string): Promise<string>;
32280
+ /** Consensus vote on the plan. Returns approval + feedback. */
32281
+ vote(plan: string): Promise<VoteResult>;
32282
+ /** PM decomposes approved plan into tasks. */
32283
+ decompose(plan: string): Promise<PipelineTask[]>;
32284
+ /** Code expert implements a task. Returns the work product. */
32285
+ implement(task: PipelineTask): Promise<string>;
32286
+ /** QA expert reviews implementation. */
32287
+ qaReview(task: PipelineTask, implementation: string): Promise<QaReviewResult>;
32288
+ /** Security scan. Returns true if passed. */
32289
+ securityScan(): Promise<{
32290
+ passed: boolean;
32291
+ feedback: string;
32292
+ }>;
32293
+ }
32294
+ /** Pipeline execution mode. */
32295
+ type PipelineMode = 'autonomous' | 'harness';
32296
+ /** Options for pipeline execution. */
32297
+ interface DevPipelineOptions {
32298
+ /** Session ID for checkpoint/resume. Omit for no persistence. */
32299
+ readonly sessionId?: string | undefined;
32300
+ /** When true, stop after plan+vote and return partial result (#1717). */
32301
+ readonly dryRun?: boolean | undefined;
32302
+ /**
32303
+ * Pipeline mode (#1704):
32304
+ * - 'autonomous' (default): full pipeline runs internally
32305
+ * - 'harness': stops after decompose, returns tasks for external implementation
32306
+ */
32307
+ readonly mode?: PipelineMode | undefined;
32308
+ }
32309
+ /**
32310
+ * Execute the full multi-agent development pipeline.
32311
+ *
32312
+ * When `sessionId` is provided, each stage checkpoints to disk. On crash,
32313
+ * re-running with the same sessionId resumes from the last completed stage.
32314
+ *
32315
+ * @param task - High-level task description
32316
+ * @param stages - Pluggable stage implementations
32317
+ * @param options - Pipeline options (sessionId for checkpoint/resume)
32318
+ * @returns Pipeline result with all outputs
32319
+ */
32320
+ declare function runDevPipeline(task: string, stages: DevPipelineStages, options?: DevPipelineOptions): Promise<DevPipelineResult>;
32321
+
32322
+ /**
32323
+ * Expert Bridge — Programmatic access to the execute_expert pipeline (#1693)
32324
+ *
32325
+ * Provides a clean wrapper for calling experts with the full pipeline:
32326
+ * timeout, fallback cascade, degradation detection, heartbeat, outcome recording.
32327
+ *
32328
+ * DRY: reuses createBuiltInExpert + CompositeRouter instead of reimplementing.
32329
+ *
32330
+ * @module pipeline/expert-bridge
32331
+ */
32332
+
32333
+ /** Result of an expert execution. */
32334
+ interface ExpertBridgeResult {
32335
+ readonly success: boolean;
32336
+ readonly text: string;
32337
+ readonly expertType: BuiltInExpertType;
32338
+ readonly durationMs: number;
32339
+ readonly error?: string;
32340
+ }
32341
+ declare function executeExpert(expertType: BuiltInExpertType, prompt: string): Promise<ExpertBridgeResult>;
32342
+
32343
+ /** A tracked task/issue. */
32344
+ interface TrackedTask {
32345
+ /** Backend-specific ID (issue number or local ID). */
32346
+ readonly id: string;
32347
+ readonly title: string;
32348
+ readonly status: 'open' | 'in_progress' | 'closed';
32349
+ readonly url?: string | undefined;
32350
+ }
32351
+ /** Task tracker interface — create, update, comment. */
32352
+ interface ITaskTracker {
32353
+ createTask(title: string, body: string): Promise<TrackedTask>;
32354
+ updateStatus(taskId: string, status: TrackedTask['status']): Promise<void>;
32355
+ postComment(taskId: string, comment: string): Promise<void>;
32356
+ }
32357
+
32358
+ /**
32359
+ * Agent Executor — Connects pipeline stages to nexus-agents infrastructure (#1684)
32360
+ *
32361
+ * DRY integration (Issue #1691):
32362
+ * - CompositeRouter for intelligent multi-CLI routing (#1692)
32363
+ * - Pipeline observability events + OutcomeStore recording (#1696)
32364
+ * - Task tracker for GitHub/GitLab/JSON issue management
32365
+ *
32366
+ * @module pipeline/agent-executor
32367
+ */
32368
+
32369
+ /** Configuration for the agent executor. */
32370
+ interface AgentExecutorConfig {
32371
+ readonly scanTarget?: string | undefined;
32372
+ readonly simulateVotes?: boolean | undefined;
32373
+ readonly tracker?: ITaskTracker | undefined;
32374
+ readonly issueNumber?: number | undefined;
32375
+ readonly repo?: string | undefined;
32376
+ }
32377
+ /** Flush pipeline memory session. Called at end of pipeline run. Exported for dry-run cleanup. */
32378
+ declare function flushPipelineMemory(): void;
32379
+ declare function createAgentStages(config?: AgentExecutorConfig): DevPipelineStages;
32380
+
32381
+ /**
32382
+ * Research Trigger — Auto-create pipeline tasks from research discoveries (#1715)
32383
+ *
32384
+ * When research_discover finds high-quality papers/repos, this module
32385
+ * converts them into PipelineTask[] for the dev pipeline to assess.
32386
+ * Part of the Central Workflow Hub (#1711).
32387
+ *
32388
+ * @module pipeline/research-trigger
32389
+ */
32390
+
32391
+ /** Configuration for research trigger behavior. */
32392
+ interface ResearchTriggerConfig {
32393
+ /** Minimum quality score to trigger (0-10). Default: 7 */
32394
+ readonly qualityThreshold?: number | undefined;
32395
+ /** Max tasks per invocation. Default: 3 */
32396
+ readonly maxTriggers?: number | undefined;
32397
+ /** Topic filter for research_discover. */
32398
+ readonly topic?: string | undefined;
32399
+ /** Known task IDs to skip (dedup). */
32400
+ readonly existingTaskIds?: ReadonlySet<string> | undefined;
32401
+ }
32402
+ /**
32403
+ * Check for research discoveries and convert high-quality ones to pipeline tasks.
32404
+ *
32405
+ * Calls research_discover via expert-bridge, filters by quality threshold,
32406
+ * deduplicates against known tasks, and rate-limits output.
32407
+ *
32408
+ * Returns empty array when expert-bridge is unavailable (graceful degradation).
32409
+ */
32410
+ declare function checkForResearchTriggers(config?: ResearchTriggerConfig): Promise<PipelineTask[]>;
32411
+
32412
+ /**
32413
+ * Pipeline Checkpoint — Persist stage results for crash recovery (#1703)
32414
+ *
32415
+ * DRY: reuses ensureCheckpointDir from wave-checkpoint-persistence for
32416
+ * directory management and path security. Pipeline-specific JSONL schema.
32417
+ *
32418
+ * Storage: ~/.nexus-agents/checkpoints/pipeline-{sessionId}.jsonl
32419
+ *
32420
+ * @module pipeline/pipeline-checkpoint
32421
+ */
32422
+
32423
+ /** Stages that can be checkpointed. */
32424
+ type PipelineStage = 'research' | 'plan' | 'vote' | 'decompose' | 'implement' | 'security';
32425
+ /** Discriminated union of stage data. */
32426
+ type PipelineStageData = {
32427
+ readonly type: 'research';
32428
+ readonly text: string;
32429
+ } | {
32430
+ readonly type: 'plan';
32431
+ readonly text: string;
32432
+ readonly iterations: number;
32433
+ } | {
32434
+ readonly type: 'vote';
32435
+ readonly approved: boolean;
32436
+ readonly conditional: boolean;
32437
+ readonly conditions?: readonly string[];
32438
+ readonly caveats?: readonly string[];
32439
+ readonly iterations: number;
32440
+ } | {
32441
+ readonly type: 'decompose';
32442
+ readonly tasks: readonly PipelineTask[];
32443
+ } | {
32444
+ readonly type: 'implement';
32445
+ readonly tasks: readonly PipelineTask[];
32446
+ } | {
32447
+ readonly type: 'security';
32448
+ readonly passed: boolean;
32449
+ };
32450
+ /** Partial pipeline state loaded from checkpoints. */
32451
+ interface PipelineCheckpointState {
32452
+ readonly research?: string;
32453
+ readonly plan?: string;
32454
+ readonly voteIterations?: number;
32455
+ readonly voteConditional?: boolean;
32456
+ readonly voteConditions?: readonly string[];
32457
+ readonly voteCaveats?: readonly string[];
32458
+ readonly tasks?: readonly PipelineTask[];
32459
+ readonly implementedTasks?: readonly PipelineTask[];
32460
+ readonly securityPassed?: boolean;
32461
+ readonly lastCompletedStage?: PipelineStage;
32462
+ }
32463
+ /** Append a stage checkpoint to disk. */
32464
+ declare function saveStageCheckpoint(sessionId: string, stage: PipelineStage, data: PipelineStageData, customDir?: string): boolean;
32465
+ /** Load checkpoint state for a session. Returns null if no checkpoints exist. */
32466
+ declare function loadCheckpointState(sessionId: string, customDir?: string): PipelineCheckpointState | null;
32467
+ /** Delete checkpoint file on successful completion. */
32468
+ declare function cleanupCheckpoint(sessionId: string, customDir?: string): boolean;
32469
+ /** Build a DevPipelineResult from checkpoint state (for resume scenarios). */
32470
+ declare function checkpointToResult(state: PipelineCheckpointState): Partial<DevPipelineResult>;
32471
+
31902
32472
  /**
31903
32473
  * nexus-agents/scm - SCM Provider Types
31904
32474
  *
@@ -32044,6 +32614,7 @@ interface IScmProvider {
32044
32614
  readonly repo: string;
32045
32615
  getIssue(number: number): Promise<Result<ScmIssue, ScmError>>;
32046
32616
  listIssues(filters?: IssueFilters): Promise<Result<readonly ScmIssue[], ScmError>>;
32617
+ createIssue(title: string, body: string, labels?: readonly string[]): Promise<Result<ScmIssue, ScmError>>;
32047
32618
  addLabels(issueNumber: number, labels: readonly string[]): Promise<Result<void, ScmError>>;
32048
32619
  createPR(options: CreatePROptions): Promise<Result<ScmPullRequest, ScmError>>;
32049
32620
  mergePR(prNumber: number, options?: MergePROptions): Promise<Result<void, ScmError>>;
@@ -32147,6 +32718,7 @@ declare class GitHubProvider implements IScmProvider {
32147
32718
  createPR(options: CreatePROptions): Promise<Result<ScmPullRequest, ScmError>>;
32148
32719
  mergePR(prNumber: number, options?: MergePROptions): Promise<Result<void, ScmError>>;
32149
32720
  getPRStatus(prNumber: number): Promise<Result<PRStatus, ScmError>>;
32721
+ createIssue(title: string, body: string, labels?: readonly string[]): Promise<Result<ScmIssue, ScmError>>;
32150
32722
  addComment(issueNumber: number, body: string): Promise<Result<void, ScmError>>;
32151
32723
  listComments(issueNumber: number): Promise<Result<readonly ScmComment[], ScmError>>;
32152
32724
  }
@@ -32247,4 +32819,4 @@ declare function createScmProvider(config: CreateScmProviderConfig): Promise<Res
32247
32819
  */
32248
32820
  declare function createGitHubProvider(repo: string): IScmProvider;
32249
32821
 
32250
- export { ALLOWED_COMMANDS, ARTIFACT_TYPES, AbTestTracker, type ActionContext, type ActionRecord, type ActionValidationResult, type ActivationOptions, type ActivationStrategy, ActivationStrategySchema, type ActivityItem, type AdapterConfig, AdapterConfigSchema, type AdapterCreator, AdapterFactory, AdapterModelError, RateLimiter$1 as AdapterRateLimiter, type RateLimiterConfig$1 as AdapterRateLimiterConfig, type RegisterOptions$1 as AdapterRegisterOptions, type AdaptiveThresholdResult, type AgentAction, AgentActionSchema, type AgentActionType, AgentCapability, type AgentCluster, type AgentContext, AgentError, type AgentEvent, AgentEventSchema, type AgentExecutionResult, type AgentFinding, AgentFindingSchema, type AgentId, type AgentMessage, AgentMessageSchema, type AgentMessageType, type AgentPairKey, type AgentPerformance, AgentPerformanceSchema, type AgentResponse, type AgentRole, AgentRoleSchema, type AgentRoleType, AgentRunnerError, type AgentState$2 as AgentState, AgentStateMachine, AgentStateSchema, type AgentStatus, StepExecutor as AgentStepExecutor, type AgentVoteResult, type AgentVoteSummary, type AggregatedResult, type AggregationMetadata, type AggregationStrategy, type AggregatorInput, type AggregatorOptions, AnalysisError$1 as AnalysisError, type ApiDocumentation, type ApiEndpoint, type ApiKeyConfig, type ApiType, type AppConfig, AppConfigSchema, type ApproachOutcome, type ApproachRecord, type ArchitectureAnalysisResult, type ArchitectureDecision, ArchitectureExpert, type ArchitectureExpertOptions, type ArchitecturePattern, type ArchitectureStyle, type Artifact, type ArtifactFilter, type ArtifactRef, ArtifactRefSchema, ArtifactStore, type ArtifactStoreOptions, type ArtifactType, type AuditActor, AuditActorSchema, type AuditCategory, AuditCategorySchema, AuditError, type AuditEvent$1 as AuditEvent, type AuditEventInput, AuditEventInputSchema, AuditEventSchema, type AuditHandlerConfig, type AuditLogConfig, AuditLogConfigSchema, AuditLogger, type AuditOutcome, AuditOutcomeSchema, type AuditQueryCriteria, AuditQueryCriteriaSchema, type AuditResource, AuditResourceSchema, type AuditSeverity, AuditSeveritySchema, AuditTrail, type AuthContext, type AuthorizationMethod, AuthorizationMethodSchema, AvailabilityCache, type AvailabilityCacheConfig, BIAS_CATEGORY, BUILT_IN_EXPERTS, BUILT_IN_RULES, BUILT_IN_TEMPLATES, BaseAdapter, type BaseAdapterConfig, type BaseAdapterOptions, BaseAgent, type BaseAgentOptions, BaseAgentOptionsSchema, BaseCliAdapter, type BaseMcpToolDeps, type BenchmarkRunOptions, type BenchmarkRunResult, type BestSolution, BestSolutionSchema, type BottleneckInfo, type BuiltInExpertType, BuiltInExpertTypeSchema, CHECKPOINT_SCHEMA_VERSION, CLAUDE_MODELS, CLAUDE_MODEL_ALIASES, DEFAULT_CACHE_CONFIG as CLI_DEFAULT_CACHE_CONFIG, DEFAULT_CAPABILITIES$1 as CLI_DEFAULT_CAPABILITIES, DEFAULT_COMPOSITE_CONFIG as CLI_DEFAULT_COMPOSITE_CONFIG, CLI_TIMEOUT_PROFILES, CLI_VERSION_REQUIREMENTS, COMPLEXITY_ORDER, CORE_PLUGINS, type CancelledResultFactory, type CapabilityProfile, type CapacityStatus, type Checkpoint, type CheckpointSummary, type CircuitProtectedResult, type ClassifyInput, type ClassifyResult, ClaudeAdapter, type ClaudeAdapterConfig, ClaudeCliAdapter, type ClaudeCliResponse, ClaudeResponseParser, type CliAdapterConfig, CliAgentExecutor, type CliAgentExecutorConfig, type CacheStats as CliCacheStats, type CapabilityProfile$1 as CliCapabilityProfile, type CliCircuitBreakerConfig, CliCircuitBreakerIntegration, type CliCircuitHealthStatus, CliDetectionCache, type CliDetectionCacheConfig, CliDetectionCacheConfigSchema, type CliError, type CliErrorCode, type ExecutionOptions$1 as CliExecutionOptions, type CliHealthResult, type ModelInfo as CliModelInfo, type CliName, type CliResponse, type CliTask, type TaskComplexity$1 as CliTaskComplexity, type TokenUsage$2 as CliTokenUsage, type CliTransport, type CodeAnalysisResult, type CodeChange, CodeChangeSchema, CodeExpert, type CodeExpertOptions, CodexCliAdapter, type CodexCliResponse, CodexMcpAdapter, CodexResponseParser, type CollaborationConfig, CollaborationConfigSchema, type CollaborationMessage, type CollaborationPattern, CollaborationPatternSchema, type CollaborationResult, CollaborationSession, type CollaborationSessionOptions, type CollectRealVotesOptions, CompactDashboardRenderer, type ComparisonReport, type ComparisonResult, type CompetitorResult, type CompetitorSystem, type CompileOptions, type CompileResult$2 as CompileResult, type CompiledGraph, type CompiledPipeline, type CompletionRequest, type CompletionResponse, type ComplexityLevel, ComplexityLevelSchema, type ComplianceStatus, CompositeRouter, type CompositeRouterConfig, CompositeRouterConfigSchema, type CompositeRouterStats, type CompositeRoutingDecision, CompositeRoutingError, type CompositionStep, type CompositionValidation, type ComputedReward, type ConfidenceInterval, ConfigError, type ExpertConfig$1 as ConfigExpertConfig, ExpertConfigSchema$1 as ConfigExpertConfigSchema, type ExpertDefinition$1 as ConfigExpertDefinition, ExpertDefinitionSchema as ConfigExpertDefinitionSchema, type Conflict, type ConflictResolver, type ConflictWarning, type ConsensusAlgorithm, ConsensusAlgorithmSchema, ConsensusEngine, type ConsensusEngineConfig, ConsensusEngineConfigSchema, ConsensusError, type ConsensusMetrics, ConsensusMetricsSchema, ConsensusProtocol, type ConsensusResult, ConsensusResultSchema, type ConsensusVoteDeps, type ConsensusVoteInput, ConsensusVoteInputSchema, type ConsensusVoteResponse, type ConsolidatedFinding, type ContentBlock, ContentPriority, type ContextBudget, ContextBudgetSchema, type ContextFilter, ContextFilterSchema, type ContextItem, ContextManager, type ContextManagerConfig, ContextManagerConfigSchema, type ContextPruneStrategy, ContextPruneStrategySchema, ContextPruner, type ContextPrunerConfig, ContextPrunerConfigSchema, type ContextStats, type ContributionScore, type CorePluginRegistrationResult, type CorrelationCoefficient, CorrelationCoefficientSchema, type CorrelationMatrix, CorrelationTracker, type CorrelationTrackerStats, CorrelationTrackerStatsSchema, type CorroborationEvent, type CorroborationResult, type CorroborationRule, type CostEstimate, CostEstimateSchema, type CostMetrics, type CoverageAnalysis, type CoverageMetrics, CoverageMetricsSchema, type CreateExecutionContextOptions, type CreateExpertDeps, type CreateExpertInput, CreateExpertInputSchema, type CreateExpertOptions, type CreateExpertResponse, type CreateForestInput, type CreateNodeInput, type CreatePROptions, type CreateScmProviderConfig, type CreateSkillOptions, type CreateStreamOptions, type CreateTreeInput, type CriterionFailure, type CriterionResult, CriterionResultSchema, CriterionType, CriterionTypeSchema, type CriterionTypeType, type CrossTreeInfo, CrossTreeInfoSchema, type CrossTreeStrategy, CrossTreeStrategySchema, type CuratedContextItem, type CurationResult, DECEPTION_CATEGORY, DEFAULT_ACTIVATION_OPTIONS, DEFAULT_BUDGET, DEFAULT_COMPOSER_CONFIG, DEFAULT_CONSENSUS_CONFIG, DEFAULT_DASHBOARD_CONFIG, DEFAULT_DASHBOARD_RENDER_OPTIONS, DEFAULT_DISTILLER_CONFIG, DEFAULT_EVALUATION_CONFIG, DEFAULT_EXECUTION_TIME_MS, DEFAULT_FEEDBACK_COLLECTOR_CONFIG, DEFAULT_FEEDBACK_INTEGRATION_CONFIG, DEFAULT_FOREST_CONFIG, DEFAULT_HARNESS_EXECUTION_CONFIG, DEFAULT_HIGHER_ORDER_CONFIG, DEFAULT_MAX_RETRIES, DEFAULT_OUTCOME_STORAGE_CONFIG, DEFAULT_PATCH_OPTIONS, DEFAULT_PATH_SCORING_OPTIONS, DEFAULT_PERMISSIONS, DEFAULT_POLICIES, DEFAULT_PREFERENCE_ROUTER_CONFIG, DEFAULT_RBAC, DEFAULT_REPORT_CONFIG, DEFAULT_RESOURCE_LIMITS, DEFAULT_RETRY_CONFIG, DEFAULT_ROLE_MAPPINGS, DEFAULT_SKILL_LIBRARY_CONFIG, DEFAULT_SKILL_LOADER_CONFIG, DEFAULT_STATISTICAL_OPTIONS, DEFAULT_SWARM_OBSERVER_CONFIG, DEFAULT_SWE_BENCH_CONFIG, DEFAULT_TEST_RUNNER_CONFIG, DEFAULT_TIMEOUTS, DEFAULT_TIMEOUT_PROFILE, DEFAULT_TRINITY_CONFIG, DEFAULT_VOTING_PROTOCOL_CONFIG, DEFAULT_WAVE_CONFIG, DEFAULT_WEIGHTED_VOTING_CONFIG, type DagEdge, DagEdgeSchema, Dashboard, type DashboardConfig, DashboardConfigSchema, type DashboardFilter, type DashboardFormat, type DashboardHealthIndicators, type DashboardOutcome, type DashboardRenderOptions, type DashboardSnapshot, type DashboardSummary, type DashboardUpdateOptions, DatasetLoadError, type DatasetLoadOptions, type DatasetLoadResult, type DecomposeError, type DelegateDeps, type DelegateInput, type DelegateInputLike, DelegateInputSchema, type DelegateOutput, DelegateOutputSchema, type DependencyError, type DependencyErrorCode, DependencyErrorCodeSchema, DependencyErrorSchema, DependencyGraph, type DependencyStructure, DirectedInteractionGraph, type DiskSpaceValidation, type DistilledRule, type DistillerConfig, type DistillerStats, type DistributionStats, type DockerExecutionState, type DockerValidation, DocumentationExpert, type DocumentationExpertOptions, type DocumentationResult, type DocumentationSection, type DryRunResult, END, EXPERT_CAPABILITIES, EXPERT_DEFAULT_CAPABILITIES, EXPERT_DEFAULT_TEMPERATURES, EXPERT_TYPE_TO_ROLE, type EnvValidationResult, type EnvironmentValidationResult, ErrorCode, type ErrorHandler, type ErrorPayload, type EvaluationCacheLevel, type EvaluationCriterion, EvaluationCriterionSchema, type EvaluationErrorCode, EvaluationHarness, type EvaluationHarnessConfig, EvaluationHarnessError, type EvaluationMetrics, type EvaluationMode, type EvaluationPhase, type EvaluationProgress, type EvaluationProgressCallback, type EvaluationReport, type EvaluationRunResult, type EvaluationValidationResult, EventBus, type EventBusBridgeOptions, type EventBusBridgeResult, type EventBusOptions, type EventFilter, type EventHandler, type EventPayload, type EventType, type ExecuteExpertDeps, type ExecuteExpertInput, ExecuteExpertInputSchema, type ExecuteExpertResponse, type ExecuteSpecDeps, type ExecuteSpecInput, ExecuteSpecInputSchema, type ExecutionContext$1 as ExecutionContext, type ExecutionMode, type ExecutionPhase$1 as ExecutionPhase, type ExecutionPlan$2 as ExecutionPlan, type ExecutionStage, type ExecutorWithModel, ExpectedOutcome, ExpectedOutcomeSchema, type ExpectedOutcomeType, type ExperienceRecord, type ExperienceStep, type ExperimentDefinition, type ExperimentExport, type ExperimentOutcome, type ExperimentResult, type ExperimentStatus, type ExperimentSummary, type ExperimentVariant, Expert, type ExpertAssignment, ExpertAssignmentSchema, ExpertCollaborationPattern, type ExpertCollaborationPatternType, type ExpertConfig, ExpertConfigSchema, type ExpertDefinition, type ExpertDomain, ExpertDomainSchema, ExpertFactory, ExpertFactoryAdapter, type ExpertInfo, type ExpertMatch, ExpertMatchSchema, type ExpertOptions, ExpertOptionsSchema, type ExpertOutput, ExpertOutputSchema, type ExpertParticipation, ExpertParticipationSchema, type RegisterOptions as ExpertRegisterOptions, ExpertRegistry$1 as ExpertRegistry, type ExpertResult, type ExpertResultSummary, type ExplorationEvent, ExplorationEventSchema, type ExplorationEventType, ExplorationEventTypeSchema, type ExploredFile, type ExpressionType, FALLBACK_SCANNER_DATA, FactoryError, type FailureAnalysis$1 as FailureAnalysis, type AnalysisError as FailureAnalysisError, type FailureCategory, type FailurePattern$1 as FailurePattern, FailurePatternSchema, type FailureStatistics, type FailureType, type FallbackBehavior, type FallbackEntry, type FeedbackCollectorConfig, FeedbackCollectorConfigSchema, FeedbackIntegration, type FeedbackIntegrationConfig, type FeedbackLoopStats, type FeedbackMessage, type RoutingDecision as FeedbackRoutingDecision, RoutingDecisionSchema as FeedbackRoutingDecisionSchema, FileAuditStorage, type FileReference, FileReferenceSchema, type FileRelevance, type FindingVote, FindingVoteSchema, type Artifact$1 as FirewallArtifact, type PolicyContext$1 as FirewallPolicyContext, type PolicyDecision$2 as FirewallPolicyDecision, type PolicyRule$1 as FirewallPolicyRule, type FirewallResult, type Forest, type ForestConfig, ForestConfigSchema, type ForestId, type ForestPruningStrategy, ForestPruningStrategySchema, type ForestResult, ForestResultSchema, type ForestState, ForestStateSchema, type ForestStatistics, ForestStatisticsSchema, type FrameworkDetectionResult, type FullCapableProvider, GEMINI_MODELS, GEMINI_MODEL_ALIASES, GeminiAdapter, type GeminiAdapterConfig, GeminiCliAdapter, type GeminiCliResponse, GeminiResponseParser, type GeneratedMcpConfig, type GeneratedTest, GeneratedTestSchema, type GitHubInput, GitHubProvider, GitHubReviewer, GitHubUserInfo, type GitHubUserMetadata, type GitHubUserRole, GitHubUserRoleSchema, GraphBuilder, type GraphCompileError, type GraphEdge, type GraphEdgeDisplay, type GraphEvent, type GraphExecuteOptions, type GraphExecutionAuditEvent, type GraphExecutionResult, type GraphNode, type GraphState, type GraphStats, type GraphSummary, type GraphWorkflowInfo, HARM_EMOTIONAL_CATEGORY, HARM_FINANCIAL_CATEGORY, HARM_PHYSICAL_CATEGORY, type HarnessErrorCode, type HarnessExecutionConfig, type HarnessExecutionProgress, type HarnessExecutionResult, type HarnessExecutionState, HarnessExecutor, HarnessExecutorError, type HarnessProgressCallback, type HarnessValidationResult, type HealthStatus, type HigherOrderVotingConfig, HigherOrderVotingConfigSchema, type HigherOrderVotingResult, HigherOrderVotingResultSchema, HigherOrderVotingStrategy, type HookError, HostileInputFirewall, type IAbTestTracker, type IAgent, type IAgentExecutor, type IArtifactStore, type IAuditLogger, type IAuditStorage, type IBenchmarkWriter, type ICTMConfig, ICTMConfigSchema, type ICTMInferenceResult, ICTMInferenceResultSchema, type ICheckpointStore, type ICliAdapter, type ICliCircuitBreakerIntegration, type ICliDetectionCache, type ICliResponseParser, type ICollaborationProtocol, type ICompositeRouter, type IConsensusEngine, type ICorrelationTracker, type IDashboard, type IDashboardRenderer, type IEvaluationHarness, type IEventBus, type IFeedbackIntegration, type IHarnessExecutor, type IHigherOrderVoting, type ISwarmObserver as IInteractionObserver, type ILogger, type IMcpNotifier, type IModelAdapter, INSTRUCTION_SAFETY_CATEGORY, type IOrchestrationObserver, type IOrchestrator, type IOrchestratorFactory, type IOutcomeFeedback, type IOutcomeStorage, type IPatchApplicator, type IPluginRegistry, type IPolicyEngine, type IPolicyFirewall, type IPreferenceDataStore, type IReportGenerator, type IRestApiServer, type IRoutingMemory$1 as IRoutingMemory, type ISQLiteDatabase, type ISQLiteStatement, type ISandboxExecutor, type IScmProvider, type IScmReviewer, type IScmUserInfo, type ISkillDependencyGraph, type ISkillLoader, type ISwarmObserver$1 as ISwarmObserver, type ITemplateRegistry, type ITestRunner, type ITokenCounter, type IVotingProtocol, type IVotingStrategy, type IWeightedVoting, type IWorkflowEngine, type IWorkflowRouter, type ImprovementSuggestion, InMemoryAuditStorage, InMemoryCheckpointStore, InMemoryPreferenceStore, type IndependentSubset, IndependentSubsetSchema, type InjectionFlag, InjectionFlagSchema, type InputBinding, type InputDefinition, type InputDefinitionInput, type InputDefinitionOutput, InputDefinitionSchema, type InputType, InputTypeSchema, type InstanceEvaluationResult, type InteractionEdge, type InteractionGraph, type SwarmObserverConfig as InteractionObserverConfig, SwarmObserverConfigSchema as InteractionObserverConfigSchema, type InteractionOutcome, SwarmObserver as InteractionSwarmObserver, type InvalidVar, type IssueFilters, type IssueReference, IssueReferenceSchema, type IssueTriageDeps, type IssueTriageInput, IssueTriageInputSchema, type IssueTriageResponse, type IterationContext, JsonDashboardRenderer, KNOWN_SECTIONS, type KnownSection, type LanguageMatrixEntry, type LeaderboardEntry, type LeaderboardSnapshot, type LearningProgress, type LibraryStatistics, type ListExpertsDeps, type ListExpertsInput, ListExpertsInputSchema, type ListExpertsResponse, type ListWorkflowsDeps, type ListWorkflowsInput, ListWorkflowsInputSchema, type ListWorkflowsResponse, type LoadedSkillSet, LoadedSkillSetSchema, LockedWriter, type LogContext, type LogEntry, type LogLevel, type LogPolicyAuditOpts, type LogRateLimitAuditOpts, type LogToolInvocationOpts, type LoggingConfig, LoggingConfigSchema, MANIPULATION_CATEGORY, MAX_EXECUTION_TIME_MS, MIN_EXPERTS_FOR_PATTERN, MODEL_CAPABILITIES, type McpConfigOptions, type IExpertFactory$1 as McpExpertFactory, type McpLogContext, type McpLogLevel, RateLimiter as McpRateLimiter, type RateLimiterConfig as McpRateLimiterConfig, type MemoryInfo, type MemoryPayload, type MergePROptions, type Message, type MessagePayload, type MessageRole, ModelCapability, type ModelConfig, ModelConfigSchema, ModelError, type ModelMetrics, type ModelPerformanceSummary, type ModelPreference, ModelPreferenceSchema, type ModelPricing, type ModelSelection, ModelSelectionSchema, type ModelTiers, ModelTiersSchema, NOOP_NOTIFIER, NexusAgentExecutor, type NexusAgentExecutorConfig, NexusError, type NexusErrorOptions, NoAdapterError, type NodeHandler$1 as NodeHandler, type NodeHandlerFactory, type NodeHook, type NodeHookContext, type NodeId, type NodeResult, type NodeState, NodeStateSchema, OLLAMA_MODELS, OPENAI_MODELS, OPENAI_MODEL_ALIASES, OWVoting, type OWVotingOptions, type AgentState$1 as ObserverAgentState, type TokenUsage$1 as ObserverTokenUsage, ObserverTopics, OllamaAdapter, type OllamaAdapterConfig, OpenAIAdapter, type OpenAIAdapterConfig, OpenCodeCliAdapter, type OrchestrateDeps, type OrchestrateInput, type OrchestrateInputLike, OrchestrateInputSchema, type OrchestrateOutput, OrchestrateOutputSchema, OrchestrationError, OrchestrationObserver, type OrchestrationObserverConfig, OrchestrationObserverConfigSchema, type OrchestrationObserverEvent, type OrchestrationObserverListener, type OrchestrationObserverOptions, type OrchestrationStats, OrchestrationUnavailableError, Orchestrator, type OrchestratorDefinition, OrchestratorError, type OrchestratorErrorCode, type OrchestratorExecuteOptions, OrchestratorFactory, type OrchestratorFactoryConfig, type OrchestratorOptions, OrchestratorOptionsSchema, type OrchestratorResult, type OrchestratorStep, type OrchestratorType, type OutcomeClass, type OutcomeFailureCategory, OutcomeFailureCategorySchema, OutcomeFeedbackCollector, type OutcomeProcessedCallback, type OutcomeRecord, type OutcomeStorageConfig, OutcomeStorageConfigSchema, OutcomeStorageError, OutcomeStore, type OutcomeStoreConfig, type TaskOutcome$2 as OutcomeTaskRecord, TaskOutcomeSchema$2 as OutcomeTaskSchema, PIPELINE_EVENT_TYPES, PLUGIN_TRUST_LEVELS, PRIVACY_CATEGORY, PROMPT_DEFINITIONS, type PairwiseVotingHistory, PairwiseVotingHistorySchema, type ParallelOptions, ParallelProtocol, ParseError, type ParsedExpression, type ParsedSpec, ParsedSpecSchema, type ParsedTemplate, type PatchApplicationOptions, type PatchApplicationResult, PatchApplicator, PatchApplicatorError, type PatchErrorCode, type PatchFormat, type PatchValidationResult, type PathAccessRule, type PathScore, type PathScoreBreakdown, PathScoreBreakdownSchema, PathScoreSchema, type PathScoringOptions, type PatternMetrics, type PatternOutcome, type PatternType, type PerformanceMatrixEntry, type PerformanceSummary, type PersistentDistillerConfig, PersistentOutcomeStore, type PersistentOutcomeStoreConfig, PersistentStrategyDistiller, type PipelineBridgeResult, type PipelineError, type PipelineEvent, type PipelineEventType, type PipelineExecuteOptions, type PipelineMetrics, type PipelinePlugin, type PolicyMode as PipelinePolicyMode, type PolicyViolation as PipelinePolicyViolation, type PipelineResult, PipelineRunner, type PipelineStage, type PlanCompileOptions, type PlanContract, PlanContractSchema, type PluginManifest, PluginManifestSchema, PluginRegistry, type PluginRegistryOptions, type PluginTrustLevel, type ValidationError as PluginValidationError, type PolicyConfig, PolicyConfigSchema, type PolicyContext, type PolicyDecision, type PolicyDecisionAuditOpts, PolicyEngine, PolicyError, type PolicyEvalResult, type PolicyEvaluation, type PolicyEvaluatorOptions, PolicyFirewall, type PolicyFirewallConfig, type PolicyGateEvent, type PolicyGateSpec, PolicyGateSpecSchema, type PolicyMode$1 as PolicyMode, type PolicyRule, type PolicyViolation$1 as PolicyViolation, type PreconditionConfig, type PreconditionOutcome, type PreconditionResult, PredictionWriteError, PredictionWriter, type PredictionWriterOptions, type PreferenceDataPoint, type PreferenceFilter, type PreferenceModelStats, type PreferencePrediction, type PreferenceRecord, PreferenceRouter, type PreferenceRouterConfig, PreferenceRouterConfigSchema, type PreferenceRoutingDecision, type PreferenceSignal, type PreferredCapability, type ProbeFn, type ProbeResult, type ProgressCallback, type PromptDefinition, type PromptMessage, type PromptRegistrationResult, ProofOfLearningStrategy, type Proposal, type ProposalId, ProposalSchema, type ProposalState, type ProposalStatus, ProposalStatusSchema, ProtocolFactory, type ProtocolOptions, type ProvenanceEntry, type ProviderConfig, ProviderConfigSchema, type PruneOptions, type PruneResult, PruningStrategy, type PythonValidation, type QualityAttribute, type QualityRequirement, type QualityScorer, type QualitySignals, QualitySignalsSchema, QueryFeatureExtractor, type QueryFeatures, type QueryOptions, REJECTION_CATEGORIES, REPO_COMPLEXITY, RISK_AWARENESS_CATEGORY, ROBUSTNESS_CATEGORY, ROLE_DEFAULT_TRUST, type RateLimitAuditOpts, RateLimitError, type RateLimitExceeded, type RateLimiterState, type RawHarnessOutput, type RawHarnessProgress, type RawInstanceResult, type RawTestResult, type ReasoningDepth, ReasoningDepthSchema, type ReasoningNode, type ReasoningNodeMetadata, ReasoningNodeMetadataSchema, ReasoningNodeSchema, type ReasoningStepType, ReasoningStepTypeSchema, type ReasoningTree, ReasoningTreeSchema, type RecordExecutionOptions, type RecordInteractionOptions, type RecordOutcomeParams, type RegistrationError, RegistryError, type RegistryRelationship, type RegistryScanner, type RegistryStats, type RegretAnalysis, type RejectionCategory, RejectionCategorySchema, type RepoAnalysis, type RepoAnalyzeDeps, type RepoAnalyzeInput, RepoAnalyzeInputSchema, type RepoSecurityPlan, type RepoSecurityPlanDeps, type RepoSecurityPlanInput, RepoSecurityPlanInputSchema, type ReportComparison, type ReportConfig, type ReportDetailLevel, type ReportFormat, ReportGenerationError, ReportGenerator, type ReportInstanceDetails, type ReportMetadata, type ReportMetrics, type ReportRepositoryBreakdown, type ReportSummary, type RepositoryMetrics, type ReputationAssessment, ReputationCache, type ReputationEvent, type ResolutionStatus, type ResolveResult, type ResourceLimits, type ResourceStatistics, type ResourceUsage, type RestApiConfig, RestApiConfigSchema, type ApiError as RestApiError, RestApiServer, type RestApiServerOptions, type DelegateRequest as RestDelegateRequest, DelegateRequestSchema as RestDelegateRequestSchema, type DelegateResponse as RestDelegateResponse, type ExpertRequest as RestExpertRequest, ExpertRequestSchema as RestExpertRequestSchema, type ExpertResponse as RestExpertResponse, type HealthResponse as RestHealthResponse, type MetricsResponse as RestMetricsResponse, type OrchestrateRequest as RestOrchestrateRequest, OrchestrateRequestSchema as RestOrchestrateRequestSchema, type OrchestrateResponse as RestOrchestrateResponse, type WorkflowRequest as RestWorkflowRequest, WorkflowRequestSchema as RestWorkflowRequestSchema, type WorkflowResponse as RestWorkflowResponse, type Result, ResultAggregator, type ResultConflict, type ResultSubmissionMessage, type ResultSummary, type RetryAttemptInfo, type RetryConfig, RetryExhaustedError, type ReviewCapableProvider, ReviewProtocol, type ReviewRequestMessage, type ReviewResponseMessage, ReviewResponseMessageSchema, RiskLevel, RiskLevelSchema, type RiskLevelType, type RoleSkillMapping, type RoundSummary, type RouterType, type DashboardConfig$1 as RoutingDashboardConfig, type RoutingDecision$2 as RoutingDecision, type RoutingDecisionRecord, RoutingMemoryError, type RoutingMemoryExport, type RoutingMemoryStats$1 as RoutingMemoryStats, type RoutingMetrics, RoutingMetricsCollector, type RoutingMetricsConfig, type RoutingRecord, type RuleStatus, type RulesSnapshot, RulesSnapshotSchema, type RunGraphWorkflowDeps, type RunGraphWorkflowInput, RunGraphWorkflowInputSchema, type RunGraphWorkflowResponse, type RunOptions, type RunProgress, type RunStatus, type RunWorkflowDeps, type RunWorkflowInput, RunWorkflowInputSchema, type RunnerConfig, type RunnerErrorCode, SAFETY_CATEGORIES, SAFETY_CATEGORY_MAP, PROVIDER_ENV_KEYS as SDK_PROVIDER_ENV_KEYS, DEFAULT_CAPABILITIES as SKILL_DEFAULT_CAPABILITIES, SKILL_PERMISSIONS, SQLiteOutcomeStorage, STAGE_TYPES, START, type SWEBenchCheckpoint, type SWEBenchConfig, type CostEstimate$1 as SWEBenchCostEstimate, type SWEBenchDatasetInfo, type SWEBenchEvalResult, type FailureAnalysis as SWEBenchFailureAnalysis, type FailurePattern as SWEBenchFailurePattern, type SWEBenchInstance, type SWEBenchPrediction, type SWEBenchRunResult, SWEBenchRunner, SWEBenchRunnerError, type SWEBenchSummary, type SWEBenchVariant, SWE_BENCH_DATASETS, SWE_BENCH_SYSTEM_PROMPT, type SafetyCategory, SafetyCategoryId, SafetyCategoryIdSchema, type SafetyCategoryIdType, SafetyCategorySchema, type SafetyTaxonomySummary, type SafetyTestCase, SafetyTestCaseSchema, type SandboxConfig, type SandboxExecutionOptions, type SandboxMode, type SandboxPolicy, type SandboxResult, type SanitizationEvent, type SanitizedInput, SanitizedInputSchema, type SanitizerConfig, SanitizerConfigSchema, type ScannerData, type ScannerEntry, type ScannerRecommendation, type ScannerRegistryManifest, type ScenarioError, type ScenarioResult, ScenarioResultSchema, type ScmComment, type ScmCommentDetail, ScmError, type ScmFileChange, type ScmIssue, type ScmIssueDetail, type PRStatus as ScmPRStatus, type ScmPlatform, type ScmPullRequest, type ScmPullRequestDetail, type ScmReviewDecision, type ScmToken, type ScmUserMetadata, type ScoreBreakdown, ScoreBreakdownSchema, SdkAdapter, type SdkAdapterConfig, type SdkProviderId, type SecurityAnalysisResult, type AuditEvent as SecurityAuditEvent, type AuditQuery as SecurityAuditQuery, type SecurityCapability, type SecurityConfig, SecurityConfigSchema, SecurityError, type SecurityErrorCode, SecurityErrorCodeSchema, type SecurityEventAuditOpts, SecurityExpert, type SecurityExpertOptions, type SecurityFocusArea, type PolicyDecision$1 as SecurityPolicyDecision, SelectionError, type ExpertRegistry as SelectionExpertRegistry, type SelectionOptions, SelectionOptionsSchema, type SelectionResult$1 as SelectionResult, SelectionResultSchema, SequentialProtocol, type SerializedError, type ServerConfig, type ServerError, type ServerInstance, type SessionEvent, type SessionMetrics, type SessionState, type SessionStatus, SessionStatusSchema, type SharedConclusion, SharedConclusionSchema, type SharedInsight, SharedInsightSchema, SimpleAgent, SimpleMajorityStrategy, type Skill, AgentRoleSchema$2 as SkillAgentRoleSchema, type SkillAttestation, SkillAttestationSchema, type SkillCapabilities, SkillCapabilitiesSchema, type SkillCategory, type SkillComplexity, SkillComposer, type SkillComposerConfig, type SkillComposition, type SkillCompositionRequest, type SkillDependency, SkillDependencyGraph, SkillDependencySchema, type SkillDependencyType, SkillDependencyTypeSchema, type SkillExample, type SkillExecution, type SkillExecutionStatus, SkillLibrary, type SkillLibraryConfig, SkillLoader, type SkillLoaderConfig, SkillLoaderConfigSchema, type SkillLoaderError, type SkillLoaderErrorCode, SkillLoaderErrorSchema, type SkillMetrics, type SkillParameter, type SkillPermission, SkillPermissionSchema, type SkillProvenance, SkillProvenanceSchema, type SkillQuery, type SkillRBAC, SkillRBACSchema, type SkillSearchResult, type SkillSecurityError, SkillSecurityErrorSchema, type SkillStore, type SkillWithMetrics, type SortOptions, type SourceCitation, SourceCitationSchema, type SpanId, type SpecExecutionError, type SpecExecutionOptions, type SpecExecutionResult, type SpecParseError, type StageContext, type StageResult, StageResultSchema, type StageSpec, StageSpecSchema, type StageType, type StateChangeCallback, type StateChangePayload, type StateFieldSchema, type StateMachineOptions, type StateReducer, type StateSchema, type StateTransition, type StateTransitionEvent, type StatisticalOptions, type StatisticalSummary, type StatusUpdateMessage, type StepExecutionOptions, type StepExecutor$1 as StepExecutor, type StepExecutorDeps, type StepResult, type StepResultSummary, type StopReason, type StoredModelStats, type StoredReward, type StoredRoutingDecision, type StoredTaskOutcome, type StrategyAction, StrategyDistiller, StreamCancelledError, type StreamChunk, StreamController, StreamError, type StreamState, AgentRoleSchema$1 as StrictAgentRoleSchema, InputDefinitionSchema$1 as StrictInputDefinitionSchema, WorkflowDefinitionSchema$1 as StrictWorkflowDefinitionSchema, WorkflowStepSchema$1 as StrictWorkflowStepSchema, type StrippedElement, StrippedElementSchema, type SubTask, SubTaskSchema, SubprocessCliAdapter, type SubtaskNode, SubtaskNodeSchema, type SubtaskPriority, SubtaskPrioritySchema, type SubtaskStatus, SubtaskStatusSchema, type SubtaskType, SubtaskTypeSchema, SupermajorityStrategy, type SuspiciousSignal, SuspiciousSignalSchema, type AgentState as SwarmAgentState, type SwarmHealthMetrics$1 as SwarmHealthMetrics, SwarmObserver$1 as SwarmObserver, type SwarmObserverConfig$1 as SwarmObserverConfig, SwarmObserverConfigSchema$1 as SwarmObserverConfigSchema, type SwarmObserverEvent, type SwarmObserverListener, type SwarmObserverOptions, type SwarmStats, type SwebenchValidation, type SycophancyIndicator, type SycophancyReport, type SynthesizedResult, SynthesizedResultSchema, type SystemComponent, TASK_STATUSES, TASK_TYPE_EXPERTS, TEMPLATE_CATEGORIES, TEMPLATE_KEYWORDS, TRINITY_ROLE_MAX_TOKENS, TRINITY_ROLE_PROMPTS, TRINITY_ROLE_TEMPERATURES, TRUST_TIER_NUMERIC, type Task$1 as Task, type TaskAnalysis, type TaskAnalysisResult, TaskAnalysisResultSchema, TaskAnalysisSchema, type TaskAssignmentMessage, TaskComplexity, type TaskContext, type TaskContract, TaskContractSchema, type TaskDag, TaskDagSchema, TaskDomain$1 as TaskDomain, type TaskId, type TaskOutcome$1 as TaskOutcome, type TaskOutcomeRecord, TaskOutcomeSchema$1 as TaskOutcomeSchema, type TaskPayload, type TaskProfileSummary, TaskQueue, type TaskRequirements, type TaskResult, TaskSchema, type TaskSignals, type TaskStatus, type TaskToolResponse, type TaskTypePerformance, type TemplateCategory, TemplateCategorySchema, type TemplateMetadata, TemplateMetadataSchema, TemplateRegistry, type TerminationReason, TerminationReasonSchema, type TestCaseResult, type TestFramework, type TestQuality, TestRunner, type TestRunnerConfig, TestRunnerError, type TestRunnerErrorCode, type TestStatus, type TestSuiteResult, type TestingAnalysisResult, TestingExpert, type TestingExpertOptions, type TextContent, TextDashboardRenderer, type ThinkerOutput, type ThresholdUpdateDetail, type TimeConstraint, type TimePeriod, TimeoutError, type TimeoutProfile, type TimingStatistics, TokenCountError, type TokenCountResult, TokenCounter, type TokenCounterConfig, TokenCounterProvider, type TokenResolverConfig, type TokenStrategy, type TokenUsage, type TokenUsageBreakdown, type TokensByPhase, type ToolCompletedEvent, type ToolDefinition, type ToolInvocationAuditOpts, type ToolInvokedEvent, type ToolPayload, type ToolRegistrationOptions, type ToolRegistrationResult, type ToolResult, type ToolSet, ToolSetSchema, type TraceEvent, type TraceEventType, type TraceId, TraceLogger, type TraceLoggerOptions, type TrackedAgent, type TransitionErrorCallback, type TreeId, type TreeState, TreeStateSchema, type TreeStatistics, TreeStatisticsSchema, type Trend, type TrendDetectedDetail, type TrinityConfig, TrinityConfigSchema, TrinityCoordinator, type TrinityExecuteOptions, type TrinityPhase, type TrinityPhaseResult, TrinityPhaseSchema, type TrinityResult, type TrinityRole, type TrinityRoleConfig, TrinityRoleSchema, TrinityStopReasonSchema, type TrustClassificationEvent, type TrustTier, TrustTierSchema, UnanimousStrategy, type UnknownVar, type Unsubscribe, type V2Config, type V2Mode, VERSION, VOTING_THRESHOLDS, ValidationDashboard, ValidationError$1 as ValidationError, type ValidationIssue, type VariantStats, type VerificationResult, type VerifierOutput, VerifierVerdictSchema, type VersionRequirements, type VersionStatus, type Violation, ViolationSchema, type Vote, type VoteCounts, type VoteDecision$1 as VoteDecision, VoteDecisionSchema$1 as VoteDecisionSchema, type VoteDecisionStatus, type VoteMessage, VoteMessageSchema, VoteSchema, type VotingObservation, VotingObservationSchema, type VotingOutcome, VotingProtocol, type VotingProtocolConfig, VotingProtocolConfigSchema, type VotingProtocolResult, type VotingRound, type VotingRoundPhase, VotingRoundPhaseSchema, type VotingRoundStatus, VotingRoundStatusSchema, type VotingSession, VotingStrategyFactory, type Vulnerability, VulnerabilitySchema, VulnerabilitySeveritySchema, type WaveExecutionResult, type WaveResult, WaveScheduler, type WaveSchedulerConfig, type WaveTask, type WaveTaskExecutor, type WaveTaskResult, type WeightedAgentRecord, type WeightedConsensusResult, type WeightedVoteCounts, WeightedVoting, type WeightedVotingConfig, type WeightedVotingOptions, type WinLossAnalysis, type WithRetryOptions, type WorkChunk, type WorkerOutput, type WorkflowAdapterConfig, type WorkflowConfig, WorkflowConfigSchema, type WorkflowDefinition, type WorkflowDefinitionInput, type WorkflowDefinitionOutput, WorkflowDefinitionSchema, type WorkflowEngineFactoryConfig, WorkflowError, type WorkflowExecutionContext, type ExecutionPlan$1 as WorkflowExecutionPlan, type IExpertFactory$2 as WorkflowExpertFactory, type WorkflowInfo, WorkflowInputsSchema, WorkflowOrchestratorAdapter, type WorkflowPattern, type WorkflowRouterOptions, type RoutingDecision$1 as WorkflowRoutingDecision, type WorkflowStep$1 as WorkflowStep, type WorkflowStepInput, type WorkflowStepOutput, WorkflowStepSchema, type WorkflowTemplate, type WorkflowToolResult, actorFromContext, aggregateResults, analysisToTaskContract, analyzeTask as analyzeDelegateTask, analyzeFailures, analyzeGitHubRepo, analyzeRepo, analyzeTask$1 as analyzeTask, append, applyPatch, areStepsCompleted, assessReputation, bufferStream, buildDependencyGraph, buildDockerArgs, buildEnrichedPrompt, buildFinalResult, buildHarnessArgs, buildHarnessCommand, buildPendingResult, buildPlanFromAnalysis, buildDependencyGraph$1 as buildSkillDependencyGraph, buildTimeoutResult, calculateDelay, calculateDistributionStats, calculateEstimatedRemaining, calculateMetrics, calculateMetricsTotals, calculateMinSampleSize, calculateRegret, calculateRepositoryMetrics, calculateRoutingDistribution, calculateTokenCost, calculateVoteWeight, calculateWinLoss, canApplyPatch, canExecuteSkill, canInfluenceDecisions, canProceed, cancelExecution, categorizeOutcomeError, categorizeOutcomeErrorMessage, checkPermissionBoundary, checkPipelinePolicy, chunkByDirectory, classifyTrust, clearRegistryCache, clearTemplateCache, closeServer, collectRealVotes, collectStream, compareProportions, compilePlan, compileSpecToGraph, computeAdaptiveThresholds, computeOutcomeReward, concatStreams, connectTransport, containsExpressions, countActiveSessions, createAbTestTracker, createAgentPairKey, createStepExecutor as createAgentStepExecutor, createAllAdapters, createArchitectureExpert, createAttestation, createAuditLogger, createAuditTrail, createBenchmarkMemory, createCheckpoint, createCheckpointStore, createClaudeAdapter, createCliAdapter, createCliCircuitBreakerIntegration, createCliDetectionCache, createCliExecutor, createCodeExpert, createCollaborationSession, createCompositeRouter, createConsensusEngine, createContextItem, createCorePluginRegistry, createCorrelationTracker, createDashboard, createDashboardRenderer, createDefaultDeps, createDefaultPolicyEngine, createDefaultPolicyFirewall, createDefaultRateLimiter, createDefaultRegistry, createDelegatePipeline, createDependencyError, createDocumentationExpert, createDryRunHandler, createEmptyContext, createEvaluationHarness, createEventBusBridge, createExecutionContext, createExecutionPlan, createExecutor, createExplorationPrompt, createFeedbackIntegration, createFeedbackSubscriber, createFullGitHubProvider, createGeminiAdapter, createGitHubAdapter, createGitHubProvider, createGraphAuditBridge, createHarnessExecutor, createHigherOrderVotingStrategy, createInitialCostMetrics, createInitialProgress, createInitialSessionMetrics, createInitialTokenUsage, createInitializedWorkflowEngine, createInstancePrompt, createInteractionGraph, createSwarmObserver as createInteractionSwarmObserver, createIsolatedRegistry, createLogger, createMcpLogger, createMcpNotifier, createMockExecutor, createNexusExecutorFromEnv, createOWVoting, createOllamaAdapter, createOpenAIAdapter, createOrchestrationObserver, createOrchestrator, createOrchestratorFactory, createOutcomeFeedbackCollector, createOutcomeStorage, createPatchApplicator, createPolicyContext, createPrediction, createPreferenceRouter, createProductionWorkflowEngine, createProgressAdapter, createProtocolFactory, createRateLimiter, createRealWorkflowEngine, createReportGenerator, createRestApiServer, createResultAggregator, createRetryPrompt, createRoutingDecision, createRoutingMetricsCollector, createRunner, createSandboxExecutor, createScmProvider, createSecurityError, createSecurityExpert, createServer, createSkillComposer, createSkillDependencyGraph, createSkillLibrary, createSkillLoader, createStateComparisonVerifier, createStateGuard, createStateMachine, createStrategyDistiller, createStrategyFactory, createStream, createSummaryPrompt, createSwarmObserver$1 as createSwarmObserver, createTaskOutcome, createTaskQueue, createTemplateRegistry, createTestRunner, createTestingExpert, createTimer, createTokenCounter, createToolLogger, createTrackedAgent, createTrinityCoordinator, createValidatedExecutor, createValidatedHarness, createValidationDashboard, createValidator, createVariantRunner, createVotingProtocol, createWaveScheduler, createWeightedVoting, createWorkflowEngineDeps, createWorkflowEngineDepsAsync, createWorkflowRouter, curateContext, customReducer, decomposeSpec, defaultConfig, delegateInputToTaskContract, denyMutationsWithoutModeRule, detectFailurePatterns, detectLatencyPatterns, detectSuccessPatterns, detectTestFramework, detectTrend, determineFinalStatus, emitCorroborationEvent, emitExecutionComplete, emitGraphExecutionEvent, emitNodeResults, emitNodeStarted, emitPolicyEvent, emitReputationEvent, emitSanitizationEvent, emitStateUpdated, emitStepCompleted, emitThresholdUpdate, emitTrendDetected, emitTrustEvent, err, estimateDifficulty, estimateTaskComplexity, estimateTokens, evaluatePolicy as evaluatePipelinePolicy, evaluatePolicy$2 as evaluatePolicy, evaluatePredictions, evaluatePolicy$1 as evaluateSecurityPolicy, executeDelegatePipeline, executeGraph, executeHarness, executeInDocker, executeOrchestratePipeline, executeParallel, executeSpec, exportReport, extractApproach, extractBooleanField, extractExpressions, extractFilesFromResponse, extractHypothesis, extractModelName, extractNonErrorMessage, extractNumberField, extractPastSuccessRates, extractPatch, extractRepoFromInstanceId, extractRepoName, extractSessionId, extractStringArrayField, extractStringField, filterAvailableModels, filterByRepo, filterByVersion, filterStream, findActiveSession, findMissingDependencies, formatCompileError, formatContextForPrompt, formatValidationResult, fromArray, generateATL, generateMcpConfig, generateProposalId, generateReport, generateSecurityPlan, generateWeatherReport, getAllTestCases, getAvailabilityCache, getAvailableClis, getAvailableRoles, getBuiltInTemplates, getBuiltInTemplatesPath, getBuiltInTemplatesWithMetadata, getCapabilitiesForRole, getCategoriesByMinRiskLevel, getCliForModelId, getCompletedInstanceIds, getCompletedSteps, getCorroborationRules, getCpuCores, getDatasetInfo, getDefaultAllowedTools, getDockerVersion, getEventBusStats, getExecutionDuration, getExecutionOrder, getExpertRegistry, getFallbackChain, getGraphRegistry, getGraphWorkflowList, getInstance, getKnownNexusVarNames, getMemoryInfo, getOutcomeStore, getPipelineArtifactStore, getPipelinePluginRegistry, getPolicy, getPolicyMode, getPythonVersion, getRecommendedRole, getReferencedSteps, getRegistryManifest, getRequiredTrustTier, getResultsFilePath, getSafetyCategory, getSafetyTaxonomySummary, getSkillSetForTask, getSkillsForTask, getStepResult, getSwarmObserver, getSwebenchVersion, getTestCasesByTags, getTimeoutForTask, getTimeoutForTaskAuto, getTokenEnvVars, getTopologicalOrder, getVariable, hasToken, ictmToExpertConfig, identifySessionsToRemove, inferICTM, initializeAgentSkills, initializeBuiltInTemplates, initializeEventBusBridge, isCancelled, isCliAvailable$1 as isCliAvailable, isErr, isMutatingAction, isOk, isReadOnlyAction, isRetryableError, isCliAvailable as isSWEBenchCliAvailable, isStepCompleted, isZodError, listInstances, loadDataset, loadTemplateFile, loadTemplatesFromDirectory, loadWorkflowFile, logPolicyAudit, logRateLimitAudit, logToolError, logToolInvocationAudit, logToolStart, logToolSuccess, logger, map, mapAuthorAssociation, mapErr, mapResolutionStatus, mapStateToPhase, mapTestStatus, meanConfidenceInterval, mergeStreams, normalizeRepoId, ok, orchestrateInputToTaskContract, overwrite, parseATL, parseAgentPairKey, parseExpression, parseJsonResults, parseProgressLine, parseSpec, parseStdoutResults, parseTemplateContent, parseTestResults, parseWorkflowJson, parseWorkflowYaml, proportionConfidenceInterval, quickRun, quickSelect, readJsonResults, readPredictions, recordOutcome, reduceStream, registerConsensusVoteTool, registerCorePlugins, registerCreateExpertTool, registerDelegateToModelTool, registerExecuteExpertTool, registerExecuteSpecTool, registerExpertsResource, registerIssueTriageTool, registerListExpertsTool, registerListWorkflowsTool, registerModelsResource, registerOrchestrateTool, registerPrompts, registerRepoAnalyzeTool, registerRepoSecurityPlanTool, registerResearchResource, registerResources, registerRunGraphWorkflowTool, registerRunWorkflowTool, registerTools, requiresCitation, requiresCorroboration, resetAvailabilityCache, resetPipelineArtifactStore, resetPipelinePluginRegistry, resetRegistry, resolveExpression, resolveFallback, resolveInput, resolveScannerData, resolveStringExpressions, resolveToken, resolveV2Config, resolveWithFallbacks, resultToOutcome, runAgentOnInstance, runBenchmarkInstances, runBenchmarkParallel, runPreconditions, runSingleInstance, runTests, runVerification, safePathsRule, safeValidateExpertConfig, sanitize, sanitizeInput, scoreByHybrid, scoreByImportance, scoreByRecency, selectExperts, selectModel, setSwarmObserver, setVariable, sigmoidConfidence, skip, sleep, snapshotContext, sortByPriority, startStdioServer, storeStepResult, take, takeUntil, tapStream, taskContractToToolResponse, toolError, toolSuccess, toolSuccessStructured, transformHarnessOutput, transformHarnessProgress, transformInstanceResult, transformStream, transformTestResult, unwrap, unwrapOr, updateContext, validateAgentAction, validateCommand, validateCorroboration, validateDependencyGraph, validateDiskSpace, validateDocker, validateEnvironment, validateEvaluationCriterion, validateExpertConfig, validateExpressions, validateICTM, validateNexusEnv, validatePatch, validatePatchFormat, validatePrediction, validatePredictionsFile, validatePython, validateRequiredInputs, validateSafetyCategory, validateScenario, validateCapabilities as validateSkillCapabilities, validateSkillExecution, validateSkillProvenance, validateRBAC as validateSkillRBAC, validateSwebench, validateTestCase, validateToolInput, validateWorkflow, validateWorkflowDependencies, withLogging, withRetry, withRetryWrapper, withTimeout, writePredictions };
32822
+ export { ALLOWED_COMMANDS, ARTIFACT_TYPES, AbTestTracker, type ActionContext, type ActionRecord, type ActionValidationResult, type ActivationOptions, type ActivationStrategy, ActivationStrategySchema, type ActivityItem, type AdapterConfig, AdapterConfigSchema, type AdapterCreator, AdapterFactory, AdapterModelError, RateLimiter$1 as AdapterRateLimiter, type RateLimiterConfig$1 as AdapterRateLimiterConfig, type RegisterOptions$1 as AdapterRegisterOptions, type AdaptiveThresholdResult, type AgentAction, AgentActionSchema, type AgentActionType, AgentCapability, type AgentCluster, type AgentContext, AgentError, type AgentEvent, AgentEventSchema, type AgentExecutionResult, type AgentExecutorConfig, type AgentFinding, AgentFindingSchema, type AgentId, type AgentMessage, AgentMessageSchema, type AgentMessageType, type AgentPairKey, type AgentPerformance, AgentPerformanceSchema, type AgentResponse, type AgentRole, AgentRoleSchema, type AgentRoleType, AgentRunnerError, type AgentState$2 as AgentState, AgentStateMachine, type AgentStatus, StepExecutor as AgentStepExecutor, type AgentVoteResult, type AgentVoteSummary, type AggregatedResult, type AggregationMetadata, type AggregationStrategy, type AggregatorInput, type AggregatorOptions, AnalysisError$1 as AnalysisError, type ApiDocumentation, type ApiEndpoint, type ApiType, type AppConfig, AppConfigSchema, type ApproachOutcome, type ApproachRecord, type ArchitectureAnalysisResult, type ArchitectureDecision, ArchitectureExpert, type ArchitectureExpertOptions, type ArchitecturePattern, type ArchitectureStyle, type Artifact, type ArtifactFilter, type ArtifactRef, ArtifactRefSchema, ArtifactStore, type ArtifactStoreOptions, type ArtifactType, type AuditActor, AuditActorSchema, type AuditCategory, AuditCategorySchema, AuditError, type AuditEvent$1 as AuditEvent, type AuditEventInput, AuditEventInputSchema, AuditEventSchema, type AuditHandlerConfig, type AuditLogConfig, AuditLogConfigSchema, AuditLogger, type AuditOutcome, AuditOutcomeSchema, type AuditQueryCriteria, AuditQueryCriteriaSchema, type AuditResource, AuditResourceSchema, type AuditSeverity, AuditSeveritySchema, AuditTrail, type AuthorizationMethod, AuthorizationMethodSchema, AvailabilityCache, type AvailabilityCacheConfig, BIAS_CATEGORY, BUILT_IN_EXPERTS, BUILT_IN_RULES, BUILT_IN_TEMPLATES, BaseAdapter, type BaseAdapterConfig, type BaseAdapterOptions, BaseAgent, type BaseAgentOptions, BaseAgentOptionsSchema, BaseCliAdapter, type BaseMcpToolDeps, type BenchmarkRunOptions, type BenchmarkRunResult, type BestSolution, BestSolutionSchema, type BottleneckInfo, type BuiltInExpertType, BuiltInExpertTypeSchema, CHECKPOINT_SCHEMA_VERSION, CLAUDE_MODELS, CLAUDE_MODEL_ALIASES, DEFAULT_CACHE_CONFIG as CLI_DEFAULT_CACHE_CONFIG, DEFAULT_CAPABILITIES$1 as CLI_DEFAULT_CAPABILITIES, DEFAULT_COMPOSITE_CONFIG as CLI_DEFAULT_COMPOSITE_CONFIG, CLI_TIMEOUT_PROFILES, CLI_VERSION_REQUIREMENTS, COMPLEXITY_ORDER, CORE_PLUGINS, type CancelledResultFactory, type CapabilityProfile, type CapacityStatus, type Checkpoint, type CheckpointSummary, type FailureCategory$1 as CircuitBreakerFailureCategory, type CircuitProtectedResult, type CircuitState, type ClassifyInput, type ClassifyResult, ClaudeAdapter, type ClaudeAdapterConfig, ClaudeCliAdapter, type ClaudeCliResponse, ClaudeResponseParser, type CliAdapterConfig, CliAgentExecutor, type CliAgentExecutorConfig, type CacheStats as CliCacheStats, type CapabilityProfile$1 as CliCapabilityProfile, type CliCircuitBreakerConfig, CliCircuitBreakerIntegration, type CliCircuitHealthStatus, CliDetectionCache, type CliDetectionCacheConfig, CliDetectionCacheConfigSchema, type CliError, type CliErrorCode, type ExecutionOptions$1 as CliExecutionOptions, type CliHealthResult, type ModelInfo as CliModelInfo, type CliName, type CliResponse, type CliRetryLoopConfig, type CliRetryResult, type CliTask, type TaskComplexity$1 as CliTaskComplexity, type TokenUsage$2 as CliTokenUsage, type CliTransport, type CodeAnalysisResult, type CodeChange, CodeChangeSchema, CodeExpert, type CodeExpertOptions, CodexCliAdapter, type CodexCliResponse, CodexMcpAdapter, CodexResponseParser, type CollaborationConfig, CollaborationConfigSchema, type CollaborationMessage, type CollaborationPattern, CollaborationPatternSchema, type CollaborationResult, CollaborationSession, type CollaborationSessionOptions, type CollectRealVotesOptions, CompactDashboardRenderer, type ComparisonReport, type ComparisonResult, type CompetitorResult, type CompetitorSystem, type CompileOptions, type CompileResult$2 as CompileResult, type CompiledGraph, type CompiledPipeline, type CompletionRequest, type CompletionResponse, type ComplexityLevel, ComplexityLevelSchema, type ComplianceStatus, CompositeRouter, type CompositeRouterConfig, CompositeRouterConfigSchema, type CompositeRouterStats, type CompositeRoutingDecision, CompositeRoutingError, type CompositionStep, type CompositionValidation, type ComputedReward, type ConfidenceInterval, ConfigError, type ExpertConfig$1 as ConfigExpertConfig, ExpertConfigSchema$1 as ConfigExpertConfigSchema, type ExpertDefinition$1 as ConfigExpertDefinition, ExpertDefinitionSchema as ConfigExpertDefinitionSchema, type Conflict, type ConflictResolver, type ConflictWarning, type ConsensusAlgorithm, ConsensusAlgorithmSchema, ConsensusEngine, type ConsensusEngineConfig, ConsensusEngineConfigSchema, ConsensusError, type ConsensusMetrics, ConsensusMetricsSchema, ConsensusProtocol, type ConsensusResult, ConsensusResultSchema, type ConsensusVoteDeps, type ConsensusVoteInput, ConsensusVoteInputSchema, type ConsensusVoteResponse, type ConsolidatedFinding, type ContentBlock, ContentPriority, type ContextBudget, ContextBudgetSchema, type ContextFilter, ContextFilterSchema, type ContextItem, ContextManager, type ContextManagerConfig, ContextManagerConfigSchema, type ContextPruneStrategy, ContextPruneStrategySchema, ContextPruner, type ContextPrunerConfig, ContextPrunerConfigSchema, type ContextStats, type ContributionScore, type CorePluginRegistrationResult, type CorrelationCoefficient, CorrelationCoefficientSchema, type CorrelationMatrix, CorrelationTracker, type CorrelationTrackerStats, CorrelationTrackerStatsSchema, type CorroborationEvent, type CorroborationResult, type CorroborationRule, type CostEstimate, CostEstimateSchema, type CoverageAnalysis, type CoverageMetrics, CoverageMetricsSchema, type CreateExecutionContextOptions, type CreateExpertDeps, type CreateExpertInput, CreateExpertInputSchema, type CreateExpertOptions, type CreateExpertResponse, type CreateForestInput, type CreateNodeInput, type CreatePROptions, type CreateScmProviderConfig, type CreateSkillOptions, type CreateStreamOptions, type CreateTreeInput, type CriterionFailure, type CriterionResult, CriterionResultSchema, CriterionType, CriterionTypeSchema, type CriterionTypeType, type CrossTreeInfo, CrossTreeInfoSchema, type CrossTreeStrategy, CrossTreeStrategySchema, type CuratedContextItem, type CurationResult, DECEPTION_CATEGORY, DEFAULT_ACTIVATION_OPTIONS, DEFAULT_BUDGET, DEFAULT_COMPOSER_CONFIG, DEFAULT_CONSENSUS_CONFIG, DEFAULT_DASHBOARD_CONFIG, DEFAULT_DASHBOARD_RENDER_OPTIONS, DEFAULT_DISTILLER_CONFIG, DEFAULT_EVALUATION_CONFIG, DEFAULT_EXECUTION_TIME_MS, DEFAULT_FEEDBACK_COLLECTOR_CONFIG, DEFAULT_FEEDBACK_INTEGRATION_CONFIG, DEFAULT_FOREST_CONFIG, DEFAULT_HARNESS_EXECUTION_CONFIG, DEFAULT_HIGHER_ORDER_CONFIG, DEFAULT_MAX_RETRIES, DEFAULT_OUTCOME_STORAGE_CONFIG, DEFAULT_PATCH_OPTIONS, DEFAULT_PATH_SCORING_OPTIONS, DEFAULT_PERMISSIONS, DEFAULT_POLICIES, DEFAULT_PREFERENCE_ROUTER_CONFIG, DEFAULT_RBAC, DEFAULT_REPORT_CONFIG, DEFAULT_RESOURCE_LIMITS, DEFAULT_RETRY_CONFIG, DEFAULT_ROLE_MAPPINGS, DEFAULT_SKILL_LIBRARY_CONFIG, DEFAULT_SKILL_LOADER_CONFIG, DEFAULT_STATISTICAL_OPTIONS, DEFAULT_SWARM_OBSERVER_CONFIG, DEFAULT_SWE_BENCH_CONFIG, DEFAULT_TEST_RUNNER_CONFIG, DEFAULT_TIMEOUTS, DEFAULT_TIMEOUT_PROFILE, DEFAULT_TRINITY_CONFIG, DEFAULT_VOTING_PROTOCOL_CONFIG, DEFAULT_WAVE_CONFIG, DEFAULT_WEIGHTED_VOTING_CONFIG, type DagEdge, DagEdgeSchema, Dashboard, type DashboardConfig, DashboardConfigSchema, type DashboardFilter, type DashboardFormat, type DashboardHealthIndicators, type DashboardOutcome, type DashboardRenderOptions, type DashboardSnapshot, type DashboardSummary, type DashboardUpdateOptions, DatasetLoadError, type DatasetLoadOptions, type DatasetLoadResult, type DecomposeError, type DelegateDeps, type DelegateInput, type DelegateInputLike, DelegateInputSchema, type DelegateOutput, DelegateOutputSchema, type DependencyError, type DependencyErrorCode, DependencyErrorCodeSchema, DependencyErrorSchema, DependencyGraph, type DependencyStructure, type DevPipelineOptions, type DevPipelineResult, type DevPipelineStages, DirectedInteractionGraph, type DiskSpaceValidation, type DistilledRule, type DistillerConfig, type DistillerStats, type DistributionStats, type DockerExecutionState, type DockerValidation, DocumentationExpert, type DocumentationExpertOptions, type DocumentationResult, type DocumentationSection, type DryRunResult, END, EXPERT_CAPABILITIES, EXPERT_DEFAULT_CAPABILITIES, EXPERT_DEFAULT_TEMPERATURES, EXPERT_TYPE_TO_ROLE, type EnvValidationResult, type EnvironmentValidationResult, ErrorCode, type ErrorHandler, type ErrorPayload, type EvaluationCacheLevel, type EvaluationCriterion, EvaluationCriterionSchema, type EvaluationErrorCode, EvaluationHarness, type EvaluationHarnessConfig, EvaluationHarnessError, type EvaluationMetrics, type EvaluationMode, type EvaluationPhase, type EvaluationProgress, type EvaluationProgressCallback, type EvaluationReport, type EvaluationRunResult, type EvaluationValidationResult, EventBus, type EventBusBridgeOptions, type EventBusBridgeResult, type EventBusOptions, type EventFilter, type EventHandler, type EventPayload, type EventType, type ExecuteExpertDeps, type ExecuteExpertInput, ExecuteExpertInputSchema, type ExecuteExpertResponse, type ExecuteSpecDeps, type ExecuteSpecInput, ExecuteSpecInputSchema, type ExecutionContext$1 as ExecutionContext, type ExecutionMode, type ExecutionPhase$1 as ExecutionPhase, type ExecutionPlan$2 as ExecutionPlan, type ExecutionStage, type ExecutorWithModel, ExpectedOutcome, ExpectedOutcomeSchema, type ExpectedOutcomeType, type ExperienceRecord, type ExperienceStep, type ExperimentDefinition, type ExperimentExport, type ExperimentOutcome, type ExperimentResult, type ExperimentStatus, type ExperimentSummary, type ExperimentVariant, Expert, type ExpertAssignment, ExpertAssignmentSchema, type ExpertBridgeResult, ExpertCollaborationPattern, type ExpertCollaborationPatternType, type ExpertConfig, ExpertConfigSchema, type ExpertDefinition, type ExpertDomain, ExpertDomainSchema, ExpertFactory, ExpertFactoryAdapter, type ExpertInfo, type ExpertMatch, ExpertMatchSchema, type ExpertOptions, ExpertOptionsSchema, type ExpertOutput, ExpertOutputSchema, type ExpertParticipation, ExpertParticipationSchema, type RegisterOptions as ExpertRegisterOptions, ExpertRegistry$1 as ExpertRegistry, type ExpertResult, type ExpertResultSummary, type ExplorationEvent, ExplorationEventSchema, type ExplorationEventType, ExplorationEventTypeSchema, type ExploredFile, type ExpressionType, type ExtractSymbolsDeps, ExtractSymbolsInputSchema, FALLBACK_SCANNER_DATA, FactoryError, type FailureAnalysis$1 as FailureAnalysis, type AnalysisError as FailureAnalysisError, type FailureCategory, type FailurePattern$1 as FailurePattern, FailurePatternSchema, type FailureStatistics, type FailureType, type FallbackBehavior, type FallbackEntry, type FeedbackCollectorConfig, FeedbackCollectorConfigSchema, FeedbackIntegration, type FeedbackIntegrationConfig, type FeedbackLoopStats, type FeedbackMessage, type RoutingDecision as FeedbackRoutingDecision, RoutingDecisionSchema as FeedbackRoutingDecisionSchema, FileAuditStorage, type FileReference, FileReferenceSchema, type FileRelevance, type FindingVote, FindingVoteSchema, type Artifact$1 as FirewallArtifact, type PolicyContext$1 as FirewallPolicyContext, type PolicyDecision$2 as FirewallPolicyDecision, type PolicyRule$1 as FirewallPolicyRule, type FirewallResult, type Forest, type ForestConfig, ForestConfigSchema, type ForestId, type ForestPruningStrategy, ForestPruningStrategySchema, type ForestResult, ForestResultSchema, type ForestState, ForestStateSchema, type ForestStatistics, ForestStatisticsSchema, type FrameworkDetectionResult, type FullCapableProvider, GEMINI_MODELS, GEMINI_MODEL_ALIASES, GeminiAdapter, type GeminiAdapterConfig, GeminiCliAdapter, type GeminiCliResponse, GeminiResponseParser, type GeneratedMcpConfig, type GeneratedTest, GeneratedTestSchema, type GitHubInput, GitHubProvider, GitHubReviewer, GitHubUserInfo, type GitHubUserMetadata, type GitHubUserRole, GitHubUserRoleSchema, GraphBuilder, type GraphCompileError, type GraphEdge, type GraphEdgeDisplay, type GraphEvent, type GraphExecuteOptions, type GraphExecutionAuditEvent, type GraphExecutionResult, type GraphNode, type GraphState, type GraphStats, type GraphSummary, type GraphWorkflowInfo, HARM_EMOTIONAL_CATEGORY, HARM_FINANCIAL_CATEGORY, HARM_PHYSICAL_CATEGORY, type HarnessErrorCode, type HarnessExecutionConfig, type HarnessExecutionProgress, type HarnessExecutionResult, type HarnessExecutionState, HarnessExecutor, HarnessExecutorError, type HarnessProgressCallback, type HarnessValidationResult, type HealthStatus, type HigherOrderVotingConfig, HigherOrderVotingConfigSchema, type HigherOrderVotingResult, HigherOrderVotingResultSchema, HigherOrderVotingStrategy, type HookError, HostileInputFirewall, type IAbTestTracker, type IAgent, type IAgentExecutor, type IArtifactStore, type IAuditLogger, type IAuditStorage, type IBenchmarkWriter, type ICTMConfig, ICTMConfigSchema, type ICTMInferenceResult, ICTMInferenceResultSchema, type ICheckpointStore, type ICircuitBreaker, type ICliAdapter, type ICliCircuitBreakerIntegration, type ICliDetectionCache, type ICliResponseParser, type ICollaborationProtocol, type ICompositeRouter, type IConsensusEngine, type ICorrelationTracker, type IDashboard, type IDashboardRenderer, type IEvaluationHarness, type IEventBus, type IFeedbackIntegration, type IHarnessExecutor, type IHigherOrderVoting, type ISwarmObserver as IInteractionObserver, type ILogger, type IMcpNotifier, type IModelAdapter, INSTRUCTION_SAFETY_CATEGORY, type IOrchestrator, type IOrchestratorFactory, type IOutcomeFeedback, type IOutcomeStorage, type IPatchApplicator, type IPluginRegistry, type IPolicyEngine, type IPolicyFirewall, type IPreferenceDataStore, type IReportGenerator, type IRoutingMemory$1 as IRoutingMemory, type ISQLiteDatabase, type ISQLiteStatement, type ISandboxExecutor, type IScmProvider, type IScmReviewer, type IScmUserInfo, type ISkillDependencyGraph, type ISkillLoader, type ITemplateRegistry, type ITestRunner, type ITokenCounter, type IVotingProtocol, type IVotingStrategy, type IWeightedVoting, type IWorkflowEngine, type IWorkflowRouter, type ImprovementSuggestion, InMemoryAuditStorage, InMemoryCheckpointStore, InMemoryPreferenceStore, type IndependentSubset, IndependentSubsetSchema, type InjectionFlag, InjectionFlagSchema, type InputBinding, type InputDefinition, type InputDefinitionInput, type InputDefinitionOutput, InputDefinitionSchema, type InputType, InputTypeSchema, type InstanceEvaluationResult, type InteractionEdge, type InteractionGraph, type SwarmObserverConfig as InteractionObserverConfig, SwarmObserverConfigSchema as InteractionObserverConfigSchema, type InteractionOutcome, SwarmObserver as InteractionSwarmObserver, type InvalidVar, type IssueFilters, type IssueReference, IssueReferenceSchema, type IssueTriageDeps, type IssueTriageInput, IssueTriageInputSchema, type IssueTriageResponse, type IterationContext, JsonDashboardRenderer, KNOWN_SECTIONS, type KnownSection, type LanguageMatrixEntry, type LeaderboardEntry, type LeaderboardSnapshot, type LearningProgress, type LibraryStatistics, type ListExpertsDeps, type ListExpertsInput, ListExpertsInputSchema, type ListExpertsResponse, type ListWorkflowsDeps, type ListWorkflowsInput, ListWorkflowsInputSchema, type ListWorkflowsResponse, type LoadedSkillSet, LoadedSkillSetSchema, LockedWriter, type LogContext, type LogEntry, type LogLevel, type LogPolicyAuditOpts, type LogRateLimitAuditOpts, type LogToolInvocationOpts, type LoggingConfig, LoggingConfigSchema, MANIPULATION_CATEGORY, MAX_EXECUTION_TIME_MS, MIN_EXPERTS_FOR_PATTERN, MODEL_CAPABILITIES, type McpConfigOptions, type IExpertFactory$1 as McpExpertFactory, type McpLogContext, type McpLogLevel, RateLimiter as McpRateLimiter, type RateLimiterConfig as McpRateLimiterConfig, type MemoryInfo, type MemoryPayload, type MemoryQueryInput, MemoryQueryInputSchema, MemoryStatsInputSchema, type MemoryWriteInput, MemoryWriteInputSchema, type MergePROptions, type Message, type MessagePayload, type MessageRole, ModelCapability, type ModelConfig, ModelConfigSchema, ModelError, type ModelMetrics, type ModelPerformanceSummary, type ModelPreference, ModelPreferenceSchema, type ModelPricing, type ModelSelection, ModelSelectionSchema, type ModelTiers, ModelTiersSchema, NOOP_NOTIFIER, NexusAgentExecutor, type NexusAgentExecutorConfig, NexusError, type NexusErrorOptions, NoAdapterError, type NodeHandler$1 as NodeHandler, type NodeHandlerFactory, type NodeHook, type NodeHookContext, type NodeId, type NodeResult, type NodeState, NodeStateSchema, OLLAMA_MODELS, OPENAI_MODELS, OPENAI_MODEL_ALIASES, OWVoting, type OWVotingOptions, OllamaAdapter, type OllamaAdapterConfig, OpenAIAdapter, type OpenAIAdapterConfig, OpenCodeCliAdapter, type OrchestrateDeps, type OrchestrateInput, type OrchestrateInputLike, OrchestrateInputSchema, type OrchestrateOutput, OrchestrateOutputSchema, OrchestrationError, OrchestrationUnavailableError, Orchestrator, type OrchestratorDefinition, OrchestratorError, type OrchestratorErrorCode, type OrchestratorExecuteOptions, OrchestratorFactory, type OrchestratorFactoryConfig, type OrchestratorOptions, OrchestratorOptionsSchema, type OrchestratorResult, type OrchestratorStep, type OrchestratorType, type OutcomeClass, type OutcomeFailureCategory, OutcomeFailureCategorySchema, OutcomeFeedbackCollector, type OutcomeProcessedCallback, type OutcomeRecord, type OutcomeStorageConfig, OutcomeStorageConfigSchema, OutcomeStorageError, OutcomeStore, type OutcomeStoreConfig, type TaskOutcome$2 as OutcomeTaskRecord, TaskOutcomeSchema$2 as OutcomeTaskSchema, PIPELINE_EVENT_TYPES, PLUGIN_TRUST_LEVELS, PRIVACY_CATEGORY, PROMPT_DEFINITIONS, type PairwiseVotingHistory, PairwiseVotingHistorySchema, type ParallelOptions, ParallelProtocol, ParseError, type ParsedExpression, type ParsedSpec, ParsedSpecSchema, type ParsedTemplate, type PatchApplicationOptions, type PatchApplicationResult, PatchApplicator, PatchApplicatorError, type PatchErrorCode, type PatchFormat, type PatchValidationResult, type PathAccessRule, type PathScore, type PathScoreBreakdown, PathScoreBreakdownSchema, PathScoreSchema, type PathScoringOptions, type PatternMetrics, type PatternOutcome, type PatternType, type PerformanceMatrixEntry, type PerformanceSummary, type PersistentDistillerConfig, PersistentOutcomeStore, type PersistentOutcomeStoreConfig, PersistentStrategyDistiller, type PipelineBridgeResult, type PipelineCheckpointState, type PipelineError, type PipelineEvent, type PipelineEventType, type PipelineExecuteOptions, type PipelineMetrics, type PipelinePlugin, type PolicyMode as PipelinePolicyMode, type PolicyViolation as PipelinePolicyViolation, type PipelineResult, type PipelineRole, PipelineRunner, type PipelineStage$1 as PipelineStage, type PipelineTask, type PlanCompileOptions, type PlanContract, PlanContractSchema, type PluginManifest, PluginManifestSchema, PluginRegistry, type PluginRegistryOptions, type PluginTrustLevel, type ValidationError as PluginValidationError, type PolicyConfig, PolicyConfigSchema, type PolicyContext, type PolicyDecision, type PolicyDecisionAuditOpts, PolicyEngine, PolicyError, type PolicyEvalResult, type PolicyEvaluation, type PolicyEvaluatorOptions, PolicyFirewall, type PolicyFirewallConfig, type PolicyGateEvent, type PolicyGateSpec, PolicyGateSpecSchema, type PolicyMode$1 as PolicyMode, type PolicyRule, type PolicyViolation$1 as PolicyViolation, type PreconditionConfig, type PreconditionOutcome, type PreconditionResult, PredictionWriteError, PredictionWriter, type PredictionWriterOptions, type PreferenceDataPoint, type PreferenceFilter, type PreferenceModelStats, type PreferencePrediction, type PreferenceRecord, PreferenceRouter, type PreferenceRouterConfig, PreferenceRouterConfigSchema, type PreferenceRoutingDecision, type PreferenceSignal, type PreferredCapability, type ProbeFn, type ProbeResult, type ProgressCallback, type PromptDefinition, type PromptMessage, type PromptRegistrationResult, ProofOfLearningStrategy, type Proposal, type ProposalId, ProposalSchema, type ProposalState, type ProposalStatus, ProposalStatusSchema, ProtocolFactory, type ProtocolOptions, type ProvenanceEntry, type ProviderConfig, ProviderConfigSchema, type PruneOptions, type PruneResult, PruningStrategy, type PythonValidation, type QaReviewResult, type QualityAttribute, type QualityRequirement, type QualityScorer, type QualitySignals, QualitySignalsSchema, QueryFeatureExtractor, type QueryFeatures, type QueryOptions, type QueryTraceInput, QueryTraceInputSchema, REJECTION_CATEGORIES, REPO_COMPLEXITY, RISK_AWARENESS_CATEGORY, ROBUSTNESS_CATEGORY, ROLE_DEFAULT_TRUST, type RateLimitAuditOpts, RateLimitError, type RateLimitExceeded, type RateLimiterState, type RawHarnessOutput, type RawHarnessProgress, type RawInstanceResult, type RawTestResult, type ReasoningDepth, ReasoningDepthSchema, type ReasoningNode, type ReasoningNodeMetadata, ReasoningNodeMetadataSchema, ReasoningNodeSchema, type ReasoningStepType, ReasoningStepTypeSchema, type ReasoningTree, ReasoningTreeSchema, type RecordExecutionOptions, type RecordInteractionOptions, type RecordOutcomeParams, type RegistrationError, RegistryError, type RegistryImportInput, RegistryImportInputSchema, type RegistryRelationship, type RegistryScanner, type RegistryStats, type RegretAnalysis, type RejectionCategory, RejectionCategorySchema, type RepoAnalysis, type RepoAnalyzeDeps, type RepoAnalyzeInput, RepoAnalyzeInputSchema, type RepoSecurityPlan, type RepoSecurityPlanDeps, type RepoSecurityPlanInput, RepoSecurityPlanInputSchema, type ReportComparison, type ReportConfig, type ReportDetailLevel, type ReportFormat, ReportGenerationError, ReportGenerator, type ReportInstanceDetails, type ReportMetadata, type ReportMetrics, type ReportRepositoryBreakdown, type ReportSummary, type RepositoryMetrics, type ReputationAssessment, ReputationCache, type ReputationEvent, type ResearchAddDeps, type ResearchAddInput, ResearchAddInputSchema, type ResearchAddResponse, type ResearchAddSourceDeps, type ResearchAddSourceInput, ResearchAddSourceInputSchema, type ResearchAddSourceResponse, type ResearchAnalyzeDeps, type ResearchAnalyzeInput, ResearchAnalyzeInputSchema, type ResearchAnalyzeResponse, type ResearchCatalogReviewDeps, ResearchCatalogReviewInputSchema, type ResearchDiscoverDeps, type ResearchDiscoverInput, ResearchDiscoverInputSchema, type ResearchDiscoverResponse, type ResearchQueryDeps, type ResearchQueryInput, ResearchQueryInputSchema, type ResearchQueryResponse, type ResearchSynthesizeDeps, type ResearchSynthesizeInput, ResearchSynthesizeInputSchema, type ResearchTriggerConfig, type ResolutionStatus, type ResolveResult, type ResourceLimits, type ResourceStatistics, type ResourceUsage, type Result, ResultAggregator, type ResultConflict, type ResultSubmissionMessage, type ResultSummary, type RetryAttemptInfo, type RetryConfig, RetryExhaustedError, type ReviewCapableProvider, ReviewProtocol, type ReviewRequestMessage, type ReviewResponseMessage, ReviewResponseMessageSchema, RiskLevel, RiskLevelSchema, type RiskLevelType, type RoleSkillMapping, type RoundSummary, type RouterType, type DashboardConfig$1 as RoutingDashboardConfig, type RoutingDecisionRecord, RoutingMemoryError, type RoutingMemoryExport, type RoutingMemoryStats$1 as RoutingMemoryStats, type RoutingMetrics, RoutingMetricsCollector, type RoutingMetricsConfig, type RoutingRecord, type RuleStatus, type RulesSnapshot, RulesSnapshotSchema, type RunGraphWorkflowDeps, type RunGraphWorkflowInput, RunGraphWorkflowInputSchema, type RunGraphWorkflowResponse, type RunOptions, type RunProgress, type RunStatus, type RunWorkflowDeps, type RunWorkflowInput, RunWorkflowInputSchema, type RunnerConfig, type RunnerErrorCode, SAFETY_CATEGORIES, SAFETY_CATEGORY_MAP, PROVIDER_ENV_KEYS as SDK_PROVIDER_ENV_KEYS, DEFAULT_CAPABILITIES as SKILL_DEFAULT_CAPABILITIES, SKILL_PERMISSIONS, SQLiteOutcomeStorage, STAGE_TYPES, START, type SWEBenchCheckpoint, type SWEBenchConfig, type CostEstimate$1 as SWEBenchCostEstimate, type SWEBenchDatasetInfo, type SWEBenchEvalResult, type FailureAnalysis as SWEBenchFailureAnalysis, type FailurePattern as SWEBenchFailurePattern, type SWEBenchInstance, type SWEBenchPrediction, type SWEBenchRunResult, SWEBenchRunner, SWEBenchRunnerError, type SWEBenchSummary, type SWEBenchVariant, SWE_BENCH_DATASETS, SWE_BENCH_SYSTEM_PROMPT, type SafetyCategory, SafetyCategoryId, SafetyCategoryIdSchema, type SafetyCategoryIdType, SafetyCategorySchema, type SafetyTaxonomySummary, type SafetyTestCase, SafetyTestCaseSchema, type SandboxConfig, type SandboxExecutionOptions, type SandboxMode, type SandboxPolicy, type SandboxResult, type SanitizationEvent, type SanitizedInput, SanitizedInputSchema, type SanitizerConfig, SanitizerConfigSchema, type ScannerData, type ScannerEntry, type ScannerRecommendation, type ScannerRegistryManifest, type ScenarioError, type ScenarioResult, ScenarioResultSchema, type ScmComment, type ScmCommentDetail, ScmError, type ScmFileChange, type ScmIssue, type ScmIssueDetail, type PRStatus as ScmPRStatus, type ScmPlatform, type ScmPullRequest, type ScmPullRequestDetail, type ScmReviewDecision, type ScmToken, type ScmUserMetadata, type ScoreBreakdown, ScoreBreakdownSchema, SdkAdapter, type SdkAdapterConfig, type SdkProviderId, type SearchCodebaseDeps, SearchCodebaseInputSchema, type SecurityAnalysisResult, type AuditEvent as SecurityAuditEvent, type AuditQuery as SecurityAuditQuery, type SecurityCapability, type SecurityConfig, SecurityConfigSchema, SecurityError, type SecurityErrorCode, SecurityErrorCodeSchema, type SecurityEventAuditOpts, SecurityExpert, type SecurityExpertOptions, type SecurityFocusArea, type PolicyDecision$1 as SecurityPolicyDecision, SelectionError, type ExpertRegistry as SelectionExpertRegistry, type SelectionOptions, SelectionOptionsSchema, type SelectionResult$1 as SelectionResult, SelectionResultSchema, SequentialProtocol, type SerializedError, type ServerConfig, type ServerError, type ServerInstance, type SessionEvent, type SessionState, type SessionStatus, SessionStatusSchema, type SharedConclusion, SharedConclusionSchema, type SharedInsight, SharedInsightSchema, SimpleAgent, SimpleMajorityStrategy, type Skill, AgentRoleSchema$2 as SkillAgentRoleSchema, type SkillAttestation, SkillAttestationSchema, type SkillCapabilities, SkillCapabilitiesSchema, type SkillCategory, type SkillComplexity, SkillComposer, type SkillComposerConfig, type SkillComposition, type SkillCompositionRequest, type SkillDependency, SkillDependencyGraph, SkillDependencySchema, type SkillDependencyType, SkillDependencyTypeSchema, type SkillExample, type SkillExecution, type SkillExecutionStatus, SkillLibrary, type SkillLibraryConfig, SkillLoader, type SkillLoaderConfig, SkillLoaderConfigSchema, type SkillLoaderError, type SkillLoaderErrorCode, SkillLoaderErrorSchema, type SkillMetrics, type SkillParameter, type SkillPermission, SkillPermissionSchema, type SkillProvenance, SkillProvenanceSchema, type SkillQuery, type SkillRBAC, SkillRBACSchema, type SkillSearchResult, type SkillSecurityError, SkillSecurityErrorSchema, type SkillStore, type SkillWithMetrics, type SortOptions, type SourceCitation, SourceCitationSchema, type SpanId, type SpecExecutionError, type SpecExecutionOptions, type SpecExecutionResult, type SpecParseError, type StageContext, type StageResult, StageResultSchema, type StageSpec, StageSpecSchema, type StageType, type StateChangeCallback, type StateChangePayload, type StateFieldSchema, type StateMachineOptions, type StateReducer, type StateSchema, type StateTransition, type StateTransitionEvent, type StatisticalOptions, type StatisticalSummary, type StatusUpdateMessage, type StepExecutionOptions, type StepExecutor$1 as StepExecutor, type StepExecutorDeps, type StepResult, type StepResultSummary, type StopReason, type StoredModelStats, type StoredReward, type StoredRoutingDecision, type StoredTaskOutcome, type StrategyAction, StrategyDistiller, StreamCancelledError, type StreamChunk, StreamController, StreamError, type StreamState, AgentRoleSchema$1 as StrictAgentRoleSchema, InputDefinitionSchema$1 as StrictInputDefinitionSchema, WorkflowDefinitionSchema$1 as StrictWorkflowDefinitionSchema, WorkflowStepSchema$1 as StrictWorkflowStepSchema, type StrippedElement, StrippedElementSchema, type SubTask, SubTaskSchema, SubprocessCliAdapter, type SubtaskNode, SubtaskNodeSchema, type SubtaskPriority, SubtaskPrioritySchema, type SubtaskStatus, SubtaskStatusSchema, type SubtaskType, SubtaskTypeSchema, SupermajorityStrategy, type SuspiciousSignal, SuspiciousSignalSchema, type AgentState as SwarmAgentState, type SwarmHealthMetrics$1 as SwarmHealthMetrics, type SwebenchValidation, type SycophancyIndicator, type SycophancyReport, type SynthesizedResult, SynthesizedResultSchema, type SystemComponent, TASK_STATUSES, TASK_TYPE_EXPERTS, TEMPLATE_CATEGORIES, TEMPLATE_KEYWORDS, TRINITY_ROLE_MAX_TOKENS, TRINITY_ROLE_PROMPTS, TRINITY_ROLE_TEMPERATURES, TRUST_TIER_NUMERIC, type Task$1 as Task, type TaskAnalysis, type TaskAnalysisResult, TaskAnalysisResultSchema, TaskAnalysisSchema, type TaskAssignmentMessage, TaskComplexity, type TaskContext, type TaskContract, TaskContractSchema, type TaskDag, TaskDagSchema, TaskDomain$1 as TaskDomain, type TaskId, type TaskOutcome$1 as TaskOutcome, type TaskOutcomeRecord, TaskOutcomeSchema$1 as TaskOutcomeSchema, type TaskPayload, type TaskProfileSummary, TaskQueue, type TaskRequirements, type TaskResult, TaskSchema, type TaskSignals, type TaskStatus, type TaskToolResponse, type TaskTypePerformance, type TemplateCategory, TemplateCategorySchema, type TemplateMetadata, TemplateMetadataSchema, TemplateRegistry, type TerminationReason, TerminationReasonSchema, type TestCaseResult, type TestFramework, type TestQuality, TestRunner, type TestRunnerConfig, TestRunnerError, type TestRunnerErrorCode, type TestStatus, type TestSuiteResult, type TestingAnalysisResult, TestingExpert, type TestingExpertOptions, type TextContent, TextDashboardRenderer, type ThinkerOutput, type ThresholdUpdateDetail, type TimeConstraint, type TimePeriod, TimeoutError, type TimeoutProfile, type TimingStatistics, TokenCountError, type TokenCountResult, TokenCounter, type TokenCounterConfig, TokenCounterProvider, type TokenResolverConfig, type TokenStrategy, type TokenUsage, type TokenUsageBreakdown, type TokensByPhase, type ToolCompletedEvent, type ToolDefinition, type ToolInvocationAuditOpts, type ToolInvokedEvent, type ToolPayload, type ToolRegistrationOptions, type ToolRegistrationResult, type ToolResult, type ToolSet, ToolSetSchema, type TraceEvent, type TraceEventType, type TraceId, TraceLogger, type TraceLoggerOptions, type TransitionErrorCallback, type TreeId, type TreeState, TreeStateSchema, type TreeStatistics, TreeStatisticsSchema, type Trend, type TrendDetectedDetail, type TrinityConfig, TrinityConfigSchema, TrinityCoordinator, type TrinityExecuteOptions, type TrinityPhase, type TrinityPhaseResult, TrinityPhaseSchema, type TrinityResult, type TrinityRole, type TrinityRoleConfig, TrinityRoleSchema, TrinityStopReasonSchema, type TrustClassificationEvent, type TrustTier, TrustTierSchema, UnanimousStrategy, type UnknownVar, type Unsubscribe, type V2Config, type V2Mode, VERSION, VOTING_THRESHOLDS, ValidationDashboard, ValidationError$1 as ValidationError, type ValidationIssue, type VariantStats, type VerificationResult, type VerifierOutput, VerifierVerdictSchema, type VersionRequirements, type VersionStatus, type Violation, ViolationSchema, type Vote, type VoteCounts, type VoteDecision$1 as VoteDecision, VoteDecisionSchema$1 as VoteDecisionSchema, type VoteDecisionStatus, type VoteMessage, VoteMessageSchema, type VoteResult, VoteSchema, type VotingObservation, VotingObservationSchema, type VotingOutcome, VotingProtocol, type VotingProtocolConfig, VotingProtocolConfigSchema, type VotingProtocolResult, type VotingRound, type VotingRoundPhase, VotingRoundPhaseSchema, type VotingRoundStatus, VotingRoundStatusSchema, type VotingSession, VotingStrategyFactory, type Vulnerability, VulnerabilitySchema, VulnerabilitySeveritySchema, type WaveExecutionResult, type WaveResult, WaveScheduler, type WaveSchedulerConfig, type WaveTask, type WaveTaskExecutor, type WaveTaskResult, WeatherReportInputSchema, type WeightedAgentRecord, type WeightedConsensusResult, type WeightedVoteCounts, WeightedVoting, type WeightedVotingConfig, type WeightedVotingOptions, type WinLossAnalysis, type WithRetryOptions, type WorkChunk, type WorkerOutput, type WorkflowAdapterConfig, type WorkflowConfig, WorkflowConfigSchema, type WorkflowDefinition, type WorkflowDefinitionInput, type WorkflowDefinitionOutput, WorkflowDefinitionSchema, type WorkflowEngineFactoryConfig, WorkflowError, type WorkflowExecutionContext, type ExecutionPlan$1 as WorkflowExecutionPlan, type IExpertFactory$2 as WorkflowExpertFactory, type WorkflowInfo, WorkflowInputsSchema, WorkflowOrchestratorAdapter, type WorkflowPattern, type WorkflowRouterOptions, type RoutingDecision$1 as WorkflowRoutingDecision, type WorkflowStep$1 as WorkflowStep, type WorkflowStepInput, type WorkflowStepOutput, WorkflowStepSchema, type WorkflowTemplate, type WorkflowToolResult, actorFromContext, aggregateResults, analysisToTaskContract, analyzeTask as analyzeDelegateTask, analyzeFailures, analyzeGitHubRepo, analyzeRepo, analyzeTask$1 as analyzeTask, append, applyPatch, areStepsCompleted, assessReputation, bufferStream, buildDependencyGraph, buildDockerArgs, buildEnrichedPrompt, buildFinalResult, buildHarnessArgs, buildHarnessCommand, buildPendingResult, buildPlanFromAnalysis, buildDependencyGraph$1 as buildSkillDependencyGraph, buildTimeoutResult, calculateDelay, calculateDistributionStats, calculateEstimatedRemaining, calculateMetrics, calculateMetricsTotals, calculateMinSampleSize, calculateRegret, calculateRepositoryMetrics, calculateRoutingDistribution, calculateTokenCost, calculateVoteWeight, calculateWinLoss, canApplyPatch, canExecuteSkill, canInfluenceDecisions, canProceed, cancelExecution, categorizeOutcomeError, categorizeOutcomeErrorMessage, checkForResearchTriggers, checkPermissionBoundary, checkPipelinePolicy, checkpointToResult, chunkByDirectory, classifyTrust, cleanupCheckpoint, clearRegistryCache, clearTemplateCache, calculateBackoffDelay as cliCalculateBackoffDelay, categorizeError as cliCategorizeError, closeServer, collectRealVotes, collectStream, compareProportions, compilePlan, compileSpecToGraph, computeAdaptiveThresholds, computeOutcomeReward, concatStreams, connectTransport, containsExpressions, countActiveSessions, createAbTestTracker, createAgentPairKey, createAgentStages, createStepExecutor as createAgentStepExecutor, createAllAdapters, createArchitectureExpert, createAttestation, createAuditLogger, createAuditTrail, createBenchmarkMemory, createCheckpoint, createCheckpointStore, createClaudeAdapter, createCliAdapter, createCliCircuitBreakerIntegration, createCliDetectionCache, createCliExecutor, createCodeExpert, createCollaborationSession, createCompositeRouter, createConsensusEngine, createContextItem, createCorePluginRegistry, createCorrelationTracker, createDashboard, createDashboardRenderer, createDefaultDeps, createDefaultPolicyEngine, createDefaultPolicyFirewall, createDefaultRateLimiter, createDefaultRegistry, createDelegatePipeline, createDependencyError, createDocumentationExpert, createDryRunHandler, createEmptyContext, createEvaluationHarness, createEventBusBridge, createExecutionContext, createExecutionPlan, createExecutor, createExplorationPrompt, createFeedbackIntegration, createFeedbackSubscriber, createFullGitHubProvider, createGeminiAdapter, createGitHubAdapter, createGitHubProvider, createGraphAuditBridge, createHarnessExecutor, createHigherOrderVotingStrategy, createInitialCostMetrics, createInitialProgress, createInitialSessionMetrics, createInitialTokenUsage, createInitializedWorkflowEngine, createInstancePrompt, createInteractionGraph, createSwarmObserver as createInteractionSwarmObserver, createIsolatedRegistry, createLogger, createMcpLogger, createMcpNotifier, createMockExecutor, createNexusExecutorFromEnv, createOWVoting, createOllamaAdapter, createOpenAIAdapter, createOrchestrator, createOrchestratorFactory, createOutcomeFeedbackCollector, createOutcomeStorage, createPatchApplicator, createPolicyContext, createPrediction, createPreferenceRouter, createProductionWorkflowEngine, createProgressAdapter, createProtocolFactory, createRateLimiter, createRealWorkflowEngine, createReportGenerator, createResultAggregator, createRetryPrompt, createRoutingDecision, createRoutingMetricsCollector, createRunner, createSandboxExecutor, createScmProvider, createSecurityError, createSecurityExpert, createServer, createSkillComposer, createSkillDependencyGraph, createSkillLibrary, createSkillLoader, createStateComparisonVerifier, createStateGuard, createStateMachine, createStrategyDistiller, createStrategyFactory, createStream, createSummaryPrompt, createTaskOutcome, createTaskQueue, createTemplateRegistry, createTestRunner, createTestingExpert, createTimer, createTokenCounter, createToolLogger, createTrackedAgent, createTrinityCoordinator, createValidatedExecutor, createValidatedHarness, createValidationDashboard, createValidator, createVariantRunner, createVotingProtocol, createWaveScheduler, createWeightedVoting, createWorkflowEngineDeps, createWorkflowEngineDepsAsync, createWorkflowRouter, curateContext, customReducer, decomposeSpec, defaultConfig, delegateInputToTaskContract, denyMutationsWithoutModeRule, detectFailurePatterns, detectLatencyPatterns, detectSuccessPatterns, detectTestFramework, detectTrend, determineFinalStatus, emitCorroborationEvent, emitExecutionComplete, emitGraphExecutionEvent, emitNodeResults, emitNodeStarted, emitPolicyEvent, emitReputationEvent, emitSanitizationEvent, emitStateUpdated, emitStepCompleted, emitThresholdUpdate, emitTrendDetected, emitTrustEvent, err, estimateDifficulty, estimateTaskComplexity, estimateTokens, evaluatePolicy as evaluatePipelinePolicy, evaluatePolicy$2 as evaluatePolicy, evaluatePredictions, evaluatePolicy$1 as evaluateSecurityPolicy, executeCliRetryLoop, executeDelegatePipeline, executeExpert, executeGraph, executeHarness, executeInDocker, executeOrchestratePipeline, executeParallel, executeSpec, exportReport, extractApproach, extractBooleanField, extractExpressions, extractFilesFromResponse, extractHypothesis, extractModelName, extractNonErrorMessage, extractNumberField, extractPastSuccessRates, extractPatch, extractRepoFromInstanceId, extractRepoName, extractSessionId, extractStringArrayField, extractStringField, filterAvailableModels, filterByRepo, filterByVersion, filterStream, findActiveSession, findMissingDependencies, flushPipelineMemory, formatCompileError, formatContextForPrompt, formatValidationResult, fromArray, generateATL, generateMcpConfig, generateProposalId, generateReport, generateSecurityPlan, generateWeatherReport, getAllTestCases, getAvailabilityCache, getAvailableClis, getAvailableRoles, getBuiltInTemplates, getBuiltInTemplatesPath, getBuiltInTemplatesWithMetadata, getCapabilitiesForRole, getCategoriesByMinRiskLevel, getCliForModelId, getCompletedInstanceIds, getCompletedSteps, getCorroborationRules, getCpuCores, getDatasetInfo, getDefaultAllowedTools, getDockerVersion, getEventBusStats, getExecutionDuration, getExecutionOrder, getExpertRegistry, getFallbackChain, getGraphRegistry, getGraphWorkflowList, getInstance, getKnownNexusVarNames, getMemoryInfo, getOutcomeStore, getPipelineArtifactStore, getPipelinePluginRegistry, getPolicy, getPolicyMode, getPythonVersion, getRecommendedRole, getReferencedSteps, getRegistryManifest, getRequiredTrustTier, getResultsFilePath, getSafetyCategory, getSafetyTaxonomySummary, getSkillSetForTask, getSkillsForTask, getStepResult, getSwarmObserver, getSwebenchVersion, getTestCasesByTags, getTimeoutForTask, getTimeoutForTaskAuto, getTokenEnvVars, getTopologicalOrder, getVariable, hasToken, ictmToExpertConfig, identifySessionsToRemove, inferICTM, initializeAgentSkills, initializeBuiltInTemplates, initializeEventBusBridge, isCancelled, isCliAvailable$1 as isCliAvailable, isRetryableError as isCliRetryableError, isErr, isMutatingAction, isOk, isReadOnlyAction, isRetryableError$1 as isRetryableError, isCliAvailable as isSWEBenchCliAvailable, isStepCompleted, isZodError, listInstances, loadCheckpointState, loadDataset, loadTemplateFile, loadTemplatesFromDirectory, loadWorkflowFile, logPolicyAudit, logRateLimitAudit, logToolError, logToolInvocationAudit, logToolStart, logToolSuccess, logger, map, mapAuthorAssociation, mapErr, mapResolutionStatus, mapStateToPhase, mapTestStatus, meanConfidenceInterval, mergeStreams, normalizeRepoId, ok, orchestrateInputToTaskContract, overwrite, parseATL, parseAgentPairKey, parseExpression, parseJsonResults, parseProgressLine, parseSpec, parseStdoutResults, parseTemplateContent, parseTestResults, parseWorkflowJson, parseWorkflowYaml, proportionConfidenceInterval, quickRun, quickSelect, readJsonResults, readPredictions, recordOutcome, reduceStream, registerConsensusVoteTool, registerCorePlugins, registerCreateExpertTool, registerDelegateToModelTool, registerExecuteExpertTool, registerExecuteSpecTool, registerExpertsResource, registerExtractSymbolsTool, registerIssueTriageTool, registerListExpertsTool, registerListWorkflowsTool, registerMemoryQueryTool, registerMemoryStatsTool, registerMemoryWriteTool, registerModelsResource, registerOrchestrateTool, registerPrompts, registerQueryTraceTool, registerRegistryImportTool, registerRepoAnalyzeTool, registerRepoSecurityPlanTool, registerResearchAddSourceTool, registerResearchAddTool, registerResearchAnalyzeTool, registerResearchCatalogReviewTool, registerResearchDiscoverTool, registerResearchQueryTool, registerResearchResource, registerResearchSynthesizeTool, registerResources, registerRunGraphWorkflowTool, registerRunWorkflowTool, registerSearchCodebaseTool, registerTools, registerWeatherReportTool, requiresCitation, requiresCorroboration, resetAvailabilityCache, resetPipelineArtifactStore, resetPipelinePluginRegistry, resetRegistry, resolveExpression, resolveFallback, resolveInput, resolveScannerData, resolveStringExpressions, resolveToken, resolveV2Config, resolveWithFallbacks, resultToOutcome, runAgentOnInstance, runBenchmarkInstances, runBenchmarkParallel, runDevPipeline, runPreconditions, runSingleInstance, runTests, runVerification, safePathsRule, safeValidateExpertConfig, sanitize, sanitizeInput, saveStageCheckpoint, scoreByHybrid, scoreByImportance, scoreByRecency, selectExperts, selectModel, setSwarmObserver, setVariable, sigmoidConfidence, skip, sleep, snapshotContext, sortByPriority, startStdioServer, storeStepResult, take, takeUntil, tapStream, taskContractToToolResponse, toolError, toolSuccess, toolSuccessStructured, transformHarnessOutput, transformHarnessProgress, transformInstanceResult, transformStream, transformTestResult, unwrap, unwrapOr, updateContext, validateAgentAction, validateCommand, validateCorroboration, validateDependencyGraph, validateDiskSpace, validateDocker, validateEnvironment, validateEvaluationCriterion, validateExpertConfig, validateExpressions, validateICTM, validateNexusEnv, validatePatch, validatePatchFormat, validatePrediction, validatePredictionsFile, validatePython, validateRequiredInputs, validateSafetyCategory, validateScenario, validateCapabilities as validateSkillCapabilities, validateSkillExecution, validateSkillProvenance, validateRBAC as validateSkillRBAC, validateSwebench, validateTestCase, validateToolInput, validateWorkflow, validateWorkflowDependencies, withLogging, withRetry, withRetryWrapper, withTimeout, writePredictions };