nexus-agents 2.83.1 → 2.85.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.
- package/dist/{child-mcp-config-3ZW2UPKZ.js → child-mcp-config-FARMFCA3.js} +3 -3
- package/dist/{chunk-DWOSFYI2.js → chunk-25AQZKMN.js} +2 -2
- package/dist/{chunk-I2HMWH4R.js → chunk-2WCYG75B.js} +13 -2
- package/dist/chunk-2WCYG75B.js.map +1 -0
- package/dist/{chunk-A6WC5I7V.js → chunk-4MYJNFYL.js} +4 -4
- package/dist/{chunk-W6MLS2UL.js → chunk-4S5GY2MF.js} +2 -2
- package/dist/{chunk-7V367KT4.js → chunk-4SU4Q37U.js} +7 -23
- package/dist/chunk-4SU4Q37U.js.map +1 -0
- package/dist/{chunk-J4ZBKE4B.js → chunk-6KZL5DMU.js} +910 -308
- package/dist/chunk-6KZL5DMU.js.map +1 -0
- package/dist/{chunk-JA6ON2RP.js → chunk-6QKMUPDP.js} +2 -2
- package/dist/{chunk-MATFDJRW.js → chunk-7J7D3LAL.js} +4 -4
- package/dist/{chunk-LM2S2QWO.js → chunk-CIW2BVSN.js} +3 -2
- package/dist/{chunk-LM2S2QWO.js.map → chunk-CIW2BVSN.js.map} +1 -1
- package/dist/{chunk-ZLGU7T6J.js → chunk-EL2KV773.js} +78 -63
- package/dist/chunk-EL2KV773.js.map +1 -0
- package/dist/{chunk-IM2B3FK2.js → chunk-ELVQORLX.js} +4 -4
- package/dist/chunk-ELVQORLX.js.map +1 -0
- package/dist/{chunk-VXIHHHLQ.js → chunk-FOG7PMGM.js} +2 -2
- package/dist/{chunk-HGPIHDC4.js → chunk-FR3P47J2.js} +4 -4
- package/dist/{chunk-ODKIRXN7.js → chunk-IF6TXCSE.js} +683 -227
- package/dist/chunk-IF6TXCSE.js.map +1 -0
- package/dist/{chunk-TKGVRHEI.js → chunk-J5S27RQ4.js} +2 -2
- package/dist/{chunk-UFUR6RBP.js → chunk-LY2KLNXM.js} +2 -2
- package/dist/{chunk-5QJPM5CB.js → chunk-NSOB2WRI.js} +3 -3
- package/dist/{chunk-4XSCU4B3.js → chunk-OXVOUVKH.js} +8 -8
- package/dist/{chunk-6XRNFLPI.js → chunk-POTGGTJD.js} +2 -2
- package/dist/{chunk-ZA6AZ7LK.js → chunk-QR4VYHMI.js} +6 -6
- package/dist/{chunk-FHY7I736.js → chunk-QR5KHIZG.js} +2 -2
- package/dist/{chunk-ELRNVADA.js → chunk-RTAIMK6P.js} +155 -47
- package/dist/chunk-RTAIMK6P.js.map +1 -0
- package/dist/{chunk-O3XJLOEX.js → chunk-SOKQOPTM.js} +2 -2
- package/dist/chunk-TRX7CAD5.js +27 -0
- package/dist/chunk-TRX7CAD5.js.map +1 -0
- package/dist/{chunk-BICIQYET.js → chunk-XZAWH36N.js} +3 -3
- package/dist/{chunk-6UI4NKT4.js → chunk-YLMB5MFQ.js} +27 -4
- package/dist/{chunk-6UI4NKT4.js.map → chunk-YLMB5MFQ.js.map} +1 -1
- package/dist/{chunk-BUXXAN6V.js → chunk-Z5BAZS6F.js} +2 -2
- package/dist/{chunk-SZZS57X7.js → chunk-ZF3MSYLG.js} +7 -7
- package/dist/{chunk-XODXYOFN.js → chunk-ZMERLMEP.js} +2 -2
- package/dist/{cli-circuit-breaker-LC4NZUGD.js → cli-circuit-breaker-LF22Z3QL.js} +5 -5
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +39 -34
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-GXQ25DO4.js → composite-router-TEXZI7WJ.js} +3 -3
- package/dist/{consensus-vote-MTLP6E72.js → consensus-vote-LPYEXUVC.js} +13 -12
- package/dist/{consensus-vote-types-CoGbAEjf.d.ts → consensus-vote-types-COAhHVIp.d.ts} +5 -0
- package/dist/{context-retriever-GQRC2MVM.js → context-retriever-3TKV4EEC.js} +7 -6
- package/dist/{dist-APHOQ26Z.js → dist-75MXB4R3.js} +917 -822
- package/dist/dist-75MXB4R3.js.map +1 -0
- package/dist/{doctor-deep-T3UUJX2E.js → doctor-deep-OUAKPLJX.js} +4 -4
- package/dist/expert-bridge-22UVN5TB.js +13 -0
- package/dist/{factory-OKNCTJO6.js → factory-IGHUOUBS.js} +6 -5
- package/dist/factory-JNXETBS4.js +14 -0
- package/dist/index.d.ts +137 -10
- package/dist/index.js +59 -26
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-KDTBKLXS.js → init-opencode-52TLZ2TO.js} +6 -6
- package/dist/issue-triage-WUK7L25X.js +15 -0
- package/dist/{learning-persistence-NX2KHL5T.js → learning-persistence-5ALG6XRC.js} +2 -2
- package/dist/{registry-command-D56ROMFJ.js → registry-command-ZIAJB2J3.js} +3 -3
- package/dist/{repo-security-plan-N3CDMW6L.js → repo-security-plan-THHLNGEQ.js} +4 -4
- package/dist/{research-helpers-synthesize-36QBOKII.js → research-helpers-synthesize-KNRCAIXK.js} +4 -4
- package/dist/{routing-memory-6IEPJ3EP.js → routing-memory-UY6KTGT2.js} +3 -3
- package/dist/{session-memory-X6SCDFER.js → session-memory-PUJMR6FE.js} +4 -4
- package/dist/{setup-command-5AEO5A4Z.js → setup-command-ZXDAR3GQ.js} +12 -11
- package/dist/setup-config-EYY5AYZ3.js +10 -0
- package/dist/{setup-custom-api-RBOJT3SS.js → setup-custom-api-5XRNYFOP.js} +5 -5
- package/dist/{tool-memory-EEHITQRJ.js → tool-memory-PNAHRFZM.js} +6 -5
- package/dist/{weather-report-6BC3JK5H.js → weather-report-RQMZOL7C.js} +3 -3
- package/package.json +4 -4
- package/dist/chunk-7V367KT4.js.map +0 -1
- package/dist/chunk-ELRNVADA.js.map +0 -1
- package/dist/chunk-I2HMWH4R.js.map +0 -1
- package/dist/chunk-IM2B3FK2.js.map +0 -1
- package/dist/chunk-J4ZBKE4B.js.map +0 -1
- package/dist/chunk-ODKIRXN7.js.map +0 -1
- package/dist/chunk-ZLGU7T6J.js.map +0 -1
- package/dist/dist-APHOQ26Z.js.map +0 -1
- package/dist/expert-bridge-7LPGCPPR.js +0 -13
- package/dist/factory-3XB5CAAA.js +0 -14
- package/dist/issue-triage-MURMDN2G.js +0 -15
- package/dist/setup-config-RPSVIQJO.js +0 -10
- /package/dist/{child-mcp-config-3ZW2UPKZ.js.map → child-mcp-config-FARMFCA3.js.map} +0 -0
- /package/dist/{chunk-DWOSFYI2.js.map → chunk-25AQZKMN.js.map} +0 -0
- /package/dist/{chunk-A6WC5I7V.js.map → chunk-4MYJNFYL.js.map} +0 -0
- /package/dist/{chunk-W6MLS2UL.js.map → chunk-4S5GY2MF.js.map} +0 -0
- /package/dist/{chunk-JA6ON2RP.js.map → chunk-6QKMUPDP.js.map} +0 -0
- /package/dist/{chunk-MATFDJRW.js.map → chunk-7J7D3LAL.js.map} +0 -0
- /package/dist/{chunk-VXIHHHLQ.js.map → chunk-FOG7PMGM.js.map} +0 -0
- /package/dist/{chunk-HGPIHDC4.js.map → chunk-FR3P47J2.js.map} +0 -0
- /package/dist/{chunk-TKGVRHEI.js.map → chunk-J5S27RQ4.js.map} +0 -0
- /package/dist/{chunk-UFUR6RBP.js.map → chunk-LY2KLNXM.js.map} +0 -0
- /package/dist/{chunk-5QJPM5CB.js.map → chunk-NSOB2WRI.js.map} +0 -0
- /package/dist/{chunk-4XSCU4B3.js.map → chunk-OXVOUVKH.js.map} +0 -0
- /package/dist/{chunk-6XRNFLPI.js.map → chunk-POTGGTJD.js.map} +0 -0
- /package/dist/{chunk-ZA6AZ7LK.js.map → chunk-QR4VYHMI.js.map} +0 -0
- /package/dist/{chunk-FHY7I736.js.map → chunk-QR5KHIZG.js.map} +0 -0
- /package/dist/{chunk-O3XJLOEX.js.map → chunk-SOKQOPTM.js.map} +0 -0
- /package/dist/{chunk-BICIQYET.js.map → chunk-XZAWH36N.js.map} +0 -0
- /package/dist/{chunk-BUXXAN6V.js.map → chunk-Z5BAZS6F.js.map} +0 -0
- /package/dist/{chunk-SZZS57X7.js.map → chunk-ZF3MSYLG.js.map} +0 -0
- /package/dist/{chunk-XODXYOFN.js.map → chunk-ZMERLMEP.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-LC4NZUGD.js.map → cli-circuit-breaker-LF22Z3QL.js.map} +0 -0
- /package/dist/{composite-router-GXQ25DO4.js.map → composite-router-TEXZI7WJ.js.map} +0 -0
- /package/dist/{consensus-vote-MTLP6E72.js.map → consensus-vote-LPYEXUVC.js.map} +0 -0
- /package/dist/{context-retriever-GQRC2MVM.js.map → context-retriever-3TKV4EEC.js.map} +0 -0
- /package/dist/{doctor-deep-T3UUJX2E.js.map → doctor-deep-OUAKPLJX.js.map} +0 -0
- /package/dist/{expert-bridge-7LPGCPPR.js.map → expert-bridge-22UVN5TB.js.map} +0 -0
- /package/dist/{factory-3XB5CAAA.js.map → factory-IGHUOUBS.js.map} +0 -0
- /package/dist/{factory-OKNCTJO6.js.map → factory-JNXETBS4.js.map} +0 -0
- /package/dist/{init-opencode-KDTBKLXS.js.map → init-opencode-52TLZ2TO.js.map} +0 -0
- /package/dist/{issue-triage-MURMDN2G.js.map → issue-triage-WUK7L25X.js.map} +0 -0
- /package/dist/{learning-persistence-NX2KHL5T.js.map → learning-persistence-5ALG6XRC.js.map} +0 -0
- /package/dist/{registry-command-D56ROMFJ.js.map → registry-command-ZIAJB2J3.js.map} +0 -0
- /package/dist/{repo-security-plan-N3CDMW6L.js.map → repo-security-plan-THHLNGEQ.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-36QBOKII.js.map → research-helpers-synthesize-KNRCAIXK.js.map} +0 -0
- /package/dist/{routing-memory-6IEPJ3EP.js.map → routing-memory-UY6KTGT2.js.map} +0 -0
- /package/dist/{session-memory-X6SCDFER.js.map → session-memory-PUJMR6FE.js.map} +0 -0
- /package/dist/{setup-command-5AEO5A4Z.js.map → setup-command-ZXDAR3GQ.js.map} +0 -0
- /package/dist/{setup-config-RPSVIQJO.js.map → setup-config-EYY5AYZ3.js.map} +0 -0
- /package/dist/{setup-custom-api-RBOJT3SS.js.map → setup-custom-api-5XRNYFOP.js.map} +0 -0
- /package/dist/{tool-memory-EEHITQRJ.js.map → tool-memory-PNAHRFZM.js.map} +0 -0
- /package/dist/{weather-report-6BC3JK5H.js.map → weather-report-RQMZOL7C.js.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatDeepDiagnostics,
|
|
3
3
|
runDeepDiagnostics
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-SOKQOPTM.js";
|
|
5
|
+
import "./chunk-YLMB5MFQ.js";
|
|
6
|
+
import "./chunk-2WCYG75B.js";
|
|
7
7
|
import "./chunk-PR4QN5HX.js";
|
|
8
8
|
export {
|
|
9
9
|
formatDeepDiagnostics,
|
|
10
10
|
runDeepDiagnostics
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=doctor-deep-
|
|
12
|
+
//# sourceMappingURL=doctor-deep-OUAKPLJX.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
executeExpert,
|
|
3
|
+
shutdownExpertBridge
|
|
4
|
+
} from "./chunk-ZF3MSYLG.js";
|
|
5
|
+
import "./chunk-4S5GY2MF.js";
|
|
6
|
+
import "./chunk-YLMB5MFQ.js";
|
|
7
|
+
import "./chunk-2WCYG75B.js";
|
|
8
|
+
import "./chunk-PR4QN5HX.js";
|
|
9
|
+
export {
|
|
10
|
+
executeExpert,
|
|
11
|
+
shutdownExpertBridge
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=expert-bridge-22UVN5TB.js.map
|
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
createCliAdapter,
|
|
4
4
|
getAvailableClis,
|
|
5
5
|
isCliAvailable
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-RTAIMK6P.js";
|
|
7
|
+
import "./chunk-CIW2BVSN.js";
|
|
8
|
+
import "./chunk-TRX7CAD5.js";
|
|
9
|
+
import "./chunk-YLMB5MFQ.js";
|
|
10
|
+
import "./chunk-2WCYG75B.js";
|
|
10
11
|
import "./chunk-PR4QN5HX.js";
|
|
11
12
|
export {
|
|
12
13
|
createAllAdapters,
|
|
@@ -14,4 +15,4 @@ export {
|
|
|
14
15
|
getAvailableClis,
|
|
15
16
|
isCliAvailable
|
|
16
17
|
};
|
|
17
|
-
//# sourceMappingURL=factory-
|
|
18
|
+
//# sourceMappingURL=factory-IGHUOUBS.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createGitHubProvider,
|
|
3
|
+
createScmProvider
|
|
4
|
+
} from "./chunk-7J7D3LAL.js";
|
|
5
|
+
import "./chunk-ZMERLMEP.js";
|
|
6
|
+
import "./chunk-EL2KV773.js";
|
|
7
|
+
import "./chunk-YLMB5MFQ.js";
|
|
8
|
+
import "./chunk-2WCYG75B.js";
|
|
9
|
+
import "./chunk-PR4QN5HX.js";
|
|
10
|
+
export {
|
|
11
|
+
createGitHubProvider,
|
|
12
|
+
createScmProvider
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=factory-JNXETBS4.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ZodError, z, ZodType, ZodSafeParseResult } from 'zod';
|
|
2
|
-
import { C as CliNameLiteral, I as InputModality, O as OutputModality, T as ToolCapability, S as SpecialFeature, P as Pricing, Q as QualityScores, M as ModelId, V as VotingStrategy } from './consensus-vote-types-
|
|
3
|
-
export { A as AgentVoteSummary, a as ConsensusVoteInput, b as ConsensusVoteInputSchema, c as ConsensusVoteResponse, d as VoteDecisionStatus } from './consensus-vote-types-
|
|
2
|
+
import { C as CliNameLiteral, I as InputModality, O as OutputModality, T as ToolCapability, S as SpecialFeature, P as Pricing, Q as QualityScores, M as ModelId, V as VotingStrategy } from './consensus-vote-types-COAhHVIp.js';
|
|
3
|
+
export { A as AgentVoteSummary, a as ConsensusVoteInput, b as ConsensusVoteInputSchema, c as ConsensusVoteResponse, d as VoteDecisionStatus } from './consensus-vote-types-COAhHVIp.js';
|
|
4
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
5
|
import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
6
6
|
|
|
@@ -532,9 +532,15 @@ interface IAgent {
|
|
|
532
532
|
/**
|
|
533
533
|
* Execute a task.
|
|
534
534
|
* @param task - Task to execute
|
|
535
|
+
* @param options - Optional execution options (#3016/#3040).
|
|
536
|
+
* `signal` cancels the in-flight model call when the caller's deadline
|
|
537
|
+
* wins a race; without it, the SDK keeps running to its own 10-minute
|
|
538
|
+
* timeout after the caller has already discarded the result.
|
|
535
539
|
* @returns Result with TaskResult or AgentError
|
|
536
540
|
*/
|
|
537
|
-
execute(task: Task$1
|
|
541
|
+
execute(task: Task$1, options?: {
|
|
542
|
+
signal?: AbortSignal;
|
|
543
|
+
}): Promise<Result<TaskResult, AgentError$1>>;
|
|
538
544
|
/**
|
|
539
545
|
* Handle an inter-agent message.
|
|
540
546
|
* @param msg - Message to handle
|
|
@@ -1061,6 +1067,14 @@ interface CliTask {
|
|
|
1061
1067
|
/** Additional CLI-specific options */
|
|
1062
1068
|
readonly options?: Record<string, unknown>;
|
|
1063
1069
|
}
|
|
1070
|
+
/**
|
|
1071
|
+
* Internal resolved-options shape — every "default-able" field is
|
|
1072
|
+
* required, but `signal` stays optional because it's a per-call hook,
|
|
1073
|
+
* not a value with a default. Used by adapter internals (subprocess,
|
|
1074
|
+
* codex-mcp) and tests as the "resolved" execution options. Public
|
|
1075
|
+
* callers should keep using `ExecutionOptions` (everything optional).
|
|
1076
|
+
*/
|
|
1077
|
+
type ResolvedExecutionOptions = Required<Omit<ExecutionOptions$1, 'signal'>> & Pick<ExecutionOptions$1, 'signal'>;
|
|
1064
1078
|
/**
|
|
1065
1079
|
* Execution options for CLI adapters.
|
|
1066
1080
|
*/
|
|
@@ -1075,6 +1089,23 @@ interface ExecutionOptions$1 {
|
|
|
1075
1089
|
readonly trackUsage?: boolean;
|
|
1076
1090
|
/** Progress callback invoked on subprocess stdout activity (Issue #1087). */
|
|
1077
1091
|
readonly onProgress?: (() => void) | undefined;
|
|
1092
|
+
/**
|
|
1093
|
+
* Cancellation signal (#3026 finding 2). When the signal aborts, the
|
|
1094
|
+
* adapter must cancel the in-flight execution promptly — for
|
|
1095
|
+
* subprocess adapters that means SIGTERM (with SIGKILL escalation
|
|
1096
|
+
* per #3026 finding 1). Without this, callers that use
|
|
1097
|
+
* `Promise.race([adapter.execute(task), timeout])` for cancellation
|
|
1098
|
+
* leak orphan subprocesses on race-loser: the timeout promise wins
|
|
1099
|
+
* the race but the adapter call keeps running, posting late results
|
|
1100
|
+
* into OutcomeStore + LinUCB state for a task whose decision has
|
|
1101
|
+
* already been recorded.
|
|
1102
|
+
*
|
|
1103
|
+
* Typed as `AbortSignal | undefined` (not `AbortSignal?`) so
|
|
1104
|
+
* `Required<ExecutionOptions>` — used pervasively by adapter
|
|
1105
|
+
* internals + tests as a resolved-options shape — keeps accepting
|
|
1106
|
+
* `signal: undefined` under `exactOptionalPropertyTypes`.
|
|
1107
|
+
*/
|
|
1108
|
+
readonly signal?: AbortSignal | undefined;
|
|
1078
1109
|
}
|
|
1079
1110
|
/**
|
|
1080
1111
|
* CLI adapter interface.
|
|
@@ -2724,6 +2755,22 @@ interface CompletionRequest {
|
|
|
2724
2755
|
responseFormat?: ResponseFormat;
|
|
2725
2756
|
/** Stop sequences */
|
|
2726
2757
|
stop?: string[];
|
|
2758
|
+
/**
|
|
2759
|
+
* Cancellation signal (#3036). When the signal aborts, the adapter
|
|
2760
|
+
* cancels the in-flight model call. All five concrete adapters
|
|
2761
|
+
* (claude, openai, ollama, gemini, openai-compat) honor this by
|
|
2762
|
+
* passing the signal to their respective vendor SDK.
|
|
2763
|
+
*
|
|
2764
|
+
* Used by `withWatchdog` to cancel race-loser model calls when the
|
|
2765
|
+
* worker-dispatch timeout wins. Without this, the SDK keeps running
|
|
2766
|
+
* after `Promise.race` resolves with the timeout — late results land
|
|
2767
|
+
* in OutcomeStore for a decision already discarded.
|
|
2768
|
+
*
|
|
2769
|
+
* Typed as `AbortSignal | undefined` (not `AbortSignal?`) so adapter
|
|
2770
|
+
* internals that destructure `request` keep working under
|
|
2771
|
+
* `exactOptionalPropertyTypes`.
|
|
2772
|
+
*/
|
|
2773
|
+
signal?: AbortSignal | undefined;
|
|
2727
2774
|
}
|
|
2728
2775
|
/**
|
|
2729
2776
|
* Token usage statistics.
|
|
@@ -3882,9 +3929,15 @@ interface IWorkflowEngine {
|
|
|
3882
3929
|
* Execute a workflow with inputs.
|
|
3883
3930
|
* @param workflow - Workflow definition
|
|
3884
3931
|
* @param inputs - Input values
|
|
3932
|
+
* @param options - Optional execution overrides. `phaseTimeoutMs` (#3017)
|
|
3933
|
+
* overrides the per-phase execution timeout for this run only — wins
|
|
3934
|
+
* over both `workflow.timeout` (set in the template YAML) and the
|
|
3935
|
+
* engine's `defaultTimeoutMs`.
|
|
3885
3936
|
* @returns Result with WorkflowResult or WorkflowError
|
|
3886
3937
|
*/
|
|
3887
|
-
execute(workflow: WorkflowDefinition, inputs: Record<string, unknown
|
|
3938
|
+
execute(workflow: WorkflowDefinition, inputs: Record<string, unknown>, options?: {
|
|
3939
|
+
phaseTimeoutMs?: number;
|
|
3940
|
+
}): Promise<Result<WorkflowResult, WorkflowError>>;
|
|
3888
3941
|
/**
|
|
3889
3942
|
* Get execution status.
|
|
3890
3943
|
* @param executionId - Execution ID to check
|
|
@@ -9210,12 +9263,22 @@ declare abstract class BaseAgent implements IAgent {
|
|
|
9210
9263
|
private readonly memoryConfig;
|
|
9211
9264
|
private memoryState;
|
|
9212
9265
|
private relevantMemories;
|
|
9266
|
+
/**
|
|
9267
|
+
* AbortSignal set by `execute()` when the caller passes one. `complete()`
|
|
9268
|
+
* forwards it onto `CompletionRequest.signal` so the in-flight model call
|
|
9269
|
+
* cancels when the caller's deadline wins a race (#3016/#3040). Set only
|
|
9270
|
+
* for the duration of one execute() and cleared in finally — the field is
|
|
9271
|
+
* single-task scoped and never crosses tasks.
|
|
9272
|
+
*/
|
|
9273
|
+
private currentExecutionSignal;
|
|
9213
9274
|
constructor(options: BaseAgentOptions);
|
|
9214
9275
|
get state(): AgentState$2;
|
|
9215
9276
|
/** Builds the context state object for helper functions. */
|
|
9216
9277
|
private get contextState();
|
|
9217
9278
|
initialize(ctx: AgentContext): Promise<Result<void, AgentError$1>>;
|
|
9218
|
-
execute(task: Task$1
|
|
9279
|
+
execute(task: Task$1, options?: {
|
|
9280
|
+
signal?: AbortSignal;
|
|
9281
|
+
}): Promise<Result<TaskResult, AgentError$1>>;
|
|
9219
9282
|
handleMessage(msg: AgentMessage): Promise<Result<AgentResponse, AgentError$1>>;
|
|
9220
9283
|
cleanup(): Promise<void>;
|
|
9221
9284
|
hasCapability(capability: AgentCapability): boolean;
|
|
@@ -19774,6 +19837,12 @@ declare const RunWorkflowInputSchema: z.ZodObject<{
|
|
|
19774
19837
|
template: z.ZodString;
|
|
19775
19838
|
inputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
19776
19839
|
dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
19840
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
19841
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
19842
|
+
async: "async";
|
|
19843
|
+
sync: "sync";
|
|
19844
|
+
}>>;
|
|
19845
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
19777
19846
|
}, z.core.$strip>;
|
|
19778
19847
|
type RunWorkflowInput = z.infer<typeof RunWorkflowInputSchema>;
|
|
19779
19848
|
/**
|
|
@@ -19952,6 +20021,11 @@ declare const OrchestrateInputSchema: z.ZodObject<{
|
|
|
19952
20021
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
19953
20022
|
maxIterations: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
19954
20023
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
20024
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
20025
|
+
async: "async";
|
|
20026
|
+
sync: "sync";
|
|
20027
|
+
}>>;
|
|
20028
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
19955
20029
|
}, z.core.$strip>;
|
|
19956
20030
|
type OrchestrateInput = z.infer<typeof OrchestrateInputSchema>;
|
|
19957
20031
|
declare const OrchestrateOutputSchema: z.ZodObject<{
|
|
@@ -24748,6 +24822,25 @@ declare class CapacityTracker {
|
|
|
24748
24822
|
private readonly usageHistory;
|
|
24749
24823
|
private requestCount;
|
|
24750
24824
|
private windowStart;
|
|
24825
|
+
/**
|
|
24826
|
+
* Timestamps of every recorded request (#3026 finding 4).
|
|
24827
|
+
*
|
|
24828
|
+
* Pre-fix, `requestCount` was a plain counter reset only by the
|
|
24829
|
+
* tumbling-window branch of `pruneOldEntries`. Under continuous
|
|
24830
|
+
* traffic across a window boundary, that branch drops requests that
|
|
24831
|
+
* are still inside the *sliding* window — e.g. with windowMs=60s, a
|
|
24832
|
+
* request at t=59s followed by one at t=61s would tumbling-reset
|
|
24833
|
+
* the counter to 1 even though the t=59s request is still inside
|
|
24834
|
+
* the [1s, 61s] window. The downstream `remainingRequests === 0`
|
|
24835
|
+
* exhaustion check fired prematurely (or too late) depending on
|
|
24836
|
+
* burst patterns.
|
|
24837
|
+
*
|
|
24838
|
+
* Counting via a per-request timestamp array that's pruned the same
|
|
24839
|
+
* way as `usageHistory` keeps the two views consistent. Every
|
|
24840
|
+
* `recordUsage` pushes here; `requestCount` is derived from
|
|
24841
|
+
* `.length` after pruning.
|
|
24842
|
+
*/
|
|
24843
|
+
private requestTimestamps;
|
|
24751
24844
|
constructor(config: CapacityTrackerConfig);
|
|
24752
24845
|
/**
|
|
24753
24846
|
* Records token usage from a completed request.
|
|
@@ -24816,7 +24909,7 @@ declare abstract class BaseCliAdapter implements ICliAdapter {
|
|
|
24816
24909
|
* Abstract method for executing a task.
|
|
24817
24910
|
* Implemented by concrete adapters.
|
|
24818
24911
|
*/
|
|
24819
|
-
abstract executeTask(task: CliTask, options:
|
|
24912
|
+
abstract executeTask(task: CliTask, options: ResolvedExecutionOptions): Promise<Result<CliResponse, CliError>>;
|
|
24820
24913
|
/**
|
|
24821
24914
|
* Abstract method for getting model info.
|
|
24822
24915
|
* Implemented by concrete adapters.
|
|
@@ -24852,7 +24945,7 @@ declare abstract class BaseCliAdapter implements ICliAdapter {
|
|
|
24852
24945
|
* the outer loop when their own transient-retry layer is active, so the
|
|
24853
24946
|
* two layers do not nest into multiplied spawns (#2824).
|
|
24854
24947
|
*/
|
|
24855
|
-
protected shouldOuterRetry(opts:
|
|
24948
|
+
protected shouldOuterRetry(opts: ResolvedExecutionOptions): boolean;
|
|
24856
24949
|
/**
|
|
24857
24950
|
* Executes task with retry logic via shared retry loop.
|
|
24858
24951
|
*/
|
|
@@ -25012,31 +25105,65 @@ declare abstract class SubprocessCliAdapter extends BaseCliAdapter {
|
|
|
25012
25105
|
* (#2824). The outer loop still runs once, so circuit-breaker failure
|
|
25013
25106
|
* recording is unaffected.
|
|
25014
25107
|
*/
|
|
25015
|
-
protected shouldOuterRetry(opts:
|
|
25108
|
+
protected shouldOuterRetry(opts: ResolvedExecutionOptions): boolean;
|
|
25016
25109
|
/**
|
|
25017
25110
|
* Gets CLI command and arguments for execution.
|
|
25018
25111
|
* If stdin is provided, it will be written to the process stdin.
|
|
25019
25112
|
*/
|
|
25020
25113
|
protected abstract getCommand(task: CliTask): CommandConfig;
|
|
25114
|
+
/**
|
|
25115
|
+
* Invokes the optional cleanup hook supplied by getCommand(). Sync
|
|
25116
|
+
* throws are swallowed (warn-only) and async rejections are caught
|
|
25117
|
+
* so cleanup failures never bubble up and mask the real subprocess
|
|
25118
|
+
* result.
|
|
25119
|
+
*/
|
|
25120
|
+
private runSubprocessCleanup;
|
|
25121
|
+
/**
|
|
25122
|
+
* #3026 finding 2: SIGTERM the child when the caller's AbortSignal
|
|
25123
|
+
* aborts mid-execution. Listener auto-detaches on `'close'` so we
|
|
25124
|
+
* don't leak across child lifetimes.
|
|
25125
|
+
*/
|
|
25126
|
+
private attachAbortSignal;
|
|
25021
25127
|
/**
|
|
25022
25128
|
* Executes a task via subprocess, with optional transient-error retry.
|
|
25023
25129
|
* When `transientRetry.enabled` is true, transient errors (timeout,
|
|
25024
25130
|
* rate_limit, connection, parse) are retried with exponential backoff
|
|
25025
25131
|
* (500ms, 1000ms). Parse errors get max 1 retry (#1533); others get 2.
|
|
25026
25132
|
*/
|
|
25027
|
-
executeTask(task: CliTask, options:
|
|
25133
|
+
executeTask(task: CliTask, options: ResolvedExecutionOptions): Promise<Result<CliResponse, CliError>>;
|
|
25028
25134
|
/**
|
|
25029
25135
|
* Retries a transient error with bounded exponential backoff.
|
|
25030
25136
|
*/
|
|
25031
25137
|
private retryTransient;
|
|
25032
25138
|
/**
|
|
25033
25139
|
* Spawns a single subprocess execution (no retry).
|
|
25140
|
+
*
|
|
25141
|
+
* `requestId` (#2963 site 3) correlates the timing-breakdown log emitted
|
|
25142
|
+
* on subprocess close back to the parent `executeTask` invocation —
|
|
25143
|
+
* essential when multiple subprocesses for the same CLI run concurrently
|
|
25144
|
+
* (pipelines, votes) and the JSDoc's stated goal ("group by cli + provider
|
|
25145
|
+
* + model and surface tail-latency outliers") requires a way to
|
|
25146
|
+
* disambiguate which timing row belongs to which call.
|
|
25034
25147
|
*/
|
|
25035
25148
|
private spawnSubprocess;
|
|
25036
25149
|
/**
|
|
25037
25150
|
* Sets up child process event handlers for output collection and error handling.
|
|
25038
25151
|
*/
|
|
25039
25152
|
private setupChildProcessHandlers;
|
|
25153
|
+
/**
|
|
25154
|
+
* Schedules the SIGTERM-on-timeout + SIGKILL-on-grace escalation
|
|
25155
|
+
* (#3026 finding 1).
|
|
25156
|
+
*
|
|
25157
|
+
* The primary timer fires SIGTERM and resolves the caller's promise
|
|
25158
|
+
* immediately so it doesn't wait on a hung child. The escalation
|
|
25159
|
+
* timer (`SIGKILL_GRACE_MS` later) checks whether the child actually
|
|
25160
|
+
* exited and force-reaps it with SIGKILL if not — preventing
|
|
25161
|
+
* zombie accumulation when a child ignores SIGTERM (Node CLIs that
|
|
25162
|
+
* install graceful-shutdown handlers can hang on a broken stream).
|
|
25163
|
+
* Both timers are cleared from the `'close'` handler so a child
|
|
25164
|
+
* that exits within the grace window doesn't see the second signal.
|
|
25165
|
+
*/
|
|
25166
|
+
private scheduleTimeoutWithSigkillEscalation;
|
|
25040
25167
|
/** Attach stdout/stderr data handlers + capture first-byte time (#2472). */
|
|
25041
25168
|
private attachStdoutHandlers;
|
|
25042
25169
|
/**
|
|
@@ -25310,7 +25437,7 @@ declare class CodexMcpAdapter extends BaseCliAdapter {
|
|
|
25310
25437
|
* Executes a task via MCP client.
|
|
25311
25438
|
* Called by BaseCliAdapter.execute() with retry handling.
|
|
25312
25439
|
*/
|
|
25313
|
-
executeTask(_task: CliTask, options:
|
|
25440
|
+
executeTask(_task: CliTask, options: ResolvedExecutionOptions): Promise<Result<CliResponse, CliError>>;
|
|
25314
25441
|
/**
|
|
25315
25442
|
* Calls the codex or codex-reply tool on Codex MCP server.
|
|
25316
25443
|
* @see https://developers.openai.com/codex/mcp/
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGitHubProvider,
|
|
3
3
|
createScmProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7J7D3LAL.js";
|
|
5
5
|
import {
|
|
6
6
|
ALLOWED_COMMANDS,
|
|
7
7
|
ARTIFACT_TYPES,
|
|
@@ -519,26 +519,26 @@ import {
|
|
|
519
519
|
validateWorkflow,
|
|
520
520
|
validateWorkflowDependencies,
|
|
521
521
|
withLogging
|
|
522
|
-
} from "./chunk-
|
|
522
|
+
} from "./chunk-6KZL5DMU.js";
|
|
523
523
|
import {
|
|
524
524
|
getTokenEnvVars,
|
|
525
525
|
hasToken,
|
|
526
526
|
resolveToken
|
|
527
|
-
} from "./chunk-
|
|
527
|
+
} from "./chunk-ZMERLMEP.js";
|
|
528
528
|
import "./chunk-X2M7OF27.js";
|
|
529
529
|
import {
|
|
530
530
|
OPENAI_MODELS,
|
|
531
531
|
OPENAI_MODEL_ALIASES,
|
|
532
532
|
OpenAIAdapter,
|
|
533
533
|
createOpenAIAdapter
|
|
534
|
-
} from "./chunk-
|
|
534
|
+
} from "./chunk-ELVQORLX.js";
|
|
535
535
|
import {
|
|
536
536
|
CliCircuitBreakerIntegration,
|
|
537
537
|
createCliCircuitBreakerIntegration
|
|
538
|
-
} from "./chunk-
|
|
538
|
+
} from "./chunk-XZAWH36N.js";
|
|
539
539
|
import {
|
|
540
540
|
executeExpert
|
|
541
|
-
} from "./chunk-
|
|
541
|
+
} from "./chunk-ZF3MSYLG.js";
|
|
542
542
|
import {
|
|
543
543
|
AgentFindingSchema,
|
|
544
544
|
AgentPerformanceSchema,
|
|
@@ -632,7 +632,7 @@ import {
|
|
|
632
632
|
validateToolInput,
|
|
633
633
|
withModelNotFoundFallback,
|
|
634
634
|
wrapResilientWithFallback
|
|
635
|
-
} from "./chunk-
|
|
635
|
+
} from "./chunk-IF6TXCSE.js";
|
|
636
636
|
import {
|
|
637
637
|
AdapterModelError,
|
|
638
638
|
BaseAdapter,
|
|
@@ -656,11 +656,11 @@ import {
|
|
|
656
656
|
transformStream,
|
|
657
657
|
validateApiKeyPresence,
|
|
658
658
|
withTimeout
|
|
659
|
-
} from "./chunk-
|
|
659
|
+
} from "./chunk-6QKMUPDP.js";
|
|
660
660
|
import {
|
|
661
661
|
PROVIDER_ENV_KEYS
|
|
662
|
-
} from "./chunk-
|
|
663
|
-
import "./chunk-
|
|
662
|
+
} from "./chunk-POTGGTJD.js";
|
|
663
|
+
import "./chunk-QR5KHIZG.js";
|
|
664
664
|
import {
|
|
665
665
|
AgentActionSchema,
|
|
666
666
|
GitHubReviewer,
|
|
@@ -693,11 +693,11 @@ import {
|
|
|
693
693
|
sanitizeInput,
|
|
694
694
|
validateAgentAction,
|
|
695
695
|
validateCorroboration
|
|
696
|
-
} from "./chunk-
|
|
696
|
+
} from "./chunk-NSOB2WRI.js";
|
|
697
697
|
import {
|
|
698
698
|
GitHubProvider,
|
|
699
699
|
ScmError
|
|
700
|
-
} from "./chunk-
|
|
700
|
+
} from "./chunk-EL2KV773.js";
|
|
701
701
|
import {
|
|
702
702
|
FALLBACK_SCANNER_DATA,
|
|
703
703
|
buildPlanFromAnalysis,
|
|
@@ -705,7 +705,7 @@ import {
|
|
|
705
705
|
generateSecurityPlan,
|
|
706
706
|
getRegistryManifest,
|
|
707
707
|
resolveScannerData
|
|
708
|
-
} from "./chunk-
|
|
708
|
+
} from "./chunk-J5S27RQ4.js";
|
|
709
709
|
import {
|
|
710
710
|
analyzeGitHubRepo,
|
|
711
711
|
analyzeRepo,
|
|
@@ -715,10 +715,10 @@ import "./chunk-3ACDP4E6.js";
|
|
|
715
715
|
import {
|
|
716
716
|
PersistentStrategyDistiller,
|
|
717
717
|
RulesSnapshotSchema
|
|
718
|
-
} from "./chunk-
|
|
718
|
+
} from "./chunk-FR3P47J2.js";
|
|
719
719
|
import {
|
|
720
720
|
MemoryError
|
|
721
|
-
} from "./chunk-
|
|
721
|
+
} from "./chunk-4SU4Q37U.js";
|
|
722
722
|
import {
|
|
723
723
|
AppConfigSchema,
|
|
724
724
|
ExpertConfigSchema,
|
|
@@ -737,7 +737,7 @@ import {
|
|
|
737
737
|
getKnownNexusVarNames,
|
|
738
738
|
startStdioServer,
|
|
739
739
|
validateNexusEnv
|
|
740
|
-
} from "./chunk-
|
|
740
|
+
} from "./chunk-OXVOUVKH.js";
|
|
741
741
|
import {
|
|
742
742
|
AvailabilityCache,
|
|
743
743
|
filterAvailableModels,
|
|
@@ -746,15 +746,15 @@ import {
|
|
|
746
746
|
getFallbackChain,
|
|
747
747
|
resetAvailabilityCache,
|
|
748
748
|
resolveFallback
|
|
749
|
-
} from "./chunk-
|
|
749
|
+
} from "./chunk-4S5GY2MF.js";
|
|
750
750
|
import {
|
|
751
751
|
AvailableModelsCache,
|
|
752
752
|
getDefaultAvailableModelsCache,
|
|
753
753
|
setDefaultAvailableModelsCache
|
|
754
|
-
} from "./chunk-
|
|
754
|
+
} from "./chunk-FOG7PMGM.js";
|
|
755
755
|
import {
|
|
756
756
|
DEFAULTS
|
|
757
|
-
} from "./chunk-
|
|
757
|
+
} from "./chunk-25AQZKMN.js";
|
|
758
758
|
import "./chunk-NUBSJGQZ.js";
|
|
759
759
|
import "./chunk-6T3EPABN.js";
|
|
760
760
|
import {
|
|
@@ -785,8 +785,9 @@ import {
|
|
|
785
785
|
isCliAvailable,
|
|
786
786
|
isRetryableError,
|
|
787
787
|
sleep
|
|
788
|
-
} from "./chunk-
|
|
789
|
-
import "./chunk-
|
|
788
|
+
} from "./chunk-RTAIMK6P.js";
|
|
789
|
+
import "./chunk-CIW2BVSN.js";
|
|
790
|
+
import "./chunk-TRX7CAD5.js";
|
|
790
791
|
import {
|
|
791
792
|
BUILT_IN_EXPERTS,
|
|
792
793
|
BuiltInExpertTypeSchema,
|
|
@@ -797,7 +798,7 @@ import {
|
|
|
797
798
|
validateExpertConfig
|
|
798
799
|
} from "./chunk-ZM4O442V.js";
|
|
799
800
|
import "./chunk-PQHVC4BD.js";
|
|
800
|
-
import "./chunk-
|
|
801
|
+
import "./chunk-LY2KLNXM.js";
|
|
801
802
|
import {
|
|
802
803
|
AgentCapability,
|
|
803
804
|
AgentError,
|
|
@@ -872,8 +873,8 @@ import {
|
|
|
872
873
|
toError,
|
|
873
874
|
unwrap,
|
|
874
875
|
unwrapOr
|
|
875
|
-
} from "./chunk-
|
|
876
|
-
import "./chunk-
|
|
876
|
+
} from "./chunk-YLMB5MFQ.js";
|
|
877
|
+
import "./chunk-2WCYG75B.js";
|
|
877
878
|
import "./chunk-PR4QN5HX.js";
|
|
878
879
|
|
|
879
880
|
// src/adapters/factory.ts
|
|
@@ -1484,6 +1485,36 @@ function withRetryWrapper(fn, options = {}) {
|
|
|
1484
1485
|
|
|
1485
1486
|
// src/adapters/ollama-adapter.ts
|
|
1486
1487
|
import { Ollama } from "ollama";
|
|
1488
|
+
|
|
1489
|
+
// src/adapters/abort-utils.ts
|
|
1490
|
+
var AbortError = class extends Error {
|
|
1491
|
+
name = "AbortError";
|
|
1492
|
+
constructor(message = "Operation aborted") {
|
|
1493
|
+
super(message);
|
|
1494
|
+
}
|
|
1495
|
+
};
|
|
1496
|
+
function raceAbort(promise, signal) {
|
|
1497
|
+
if (signal === void 0) return promise;
|
|
1498
|
+
if (signal.aborted) return Promise.reject(new AbortError());
|
|
1499
|
+
return new Promise((resolve2, reject) => {
|
|
1500
|
+
const onAbort = () => {
|
|
1501
|
+
reject(new AbortError());
|
|
1502
|
+
};
|
|
1503
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
1504
|
+
promise.then(
|
|
1505
|
+
(value) => {
|
|
1506
|
+
signal.removeEventListener("abort", onAbort);
|
|
1507
|
+
resolve2(value);
|
|
1508
|
+
},
|
|
1509
|
+
(error) => {
|
|
1510
|
+
signal.removeEventListener("abort", onAbort);
|
|
1511
|
+
reject(error instanceof Error ? error : new Error(String(error)));
|
|
1512
|
+
}
|
|
1513
|
+
);
|
|
1514
|
+
});
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
// src/adapters/ollama-adapter.ts
|
|
1487
1518
|
var OLLAMA_MODELS = {
|
|
1488
1519
|
LLAMA3_8B: "llama3:8b",
|
|
1489
1520
|
LLAMA3_70B: "llama3:70b",
|
|
@@ -1603,7 +1634,8 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
1603
1634
|
this.logRequest(request);
|
|
1604
1635
|
try {
|
|
1605
1636
|
const params = this.buildRequestParams(request);
|
|
1606
|
-
const
|
|
1637
|
+
const chatPromise = this.client.chat({ ...params, stream: false });
|
|
1638
|
+
const response = await raceAbort(chatPromise, request.signal);
|
|
1607
1639
|
const result = this.mapResponse(response);
|
|
1608
1640
|
this.logResponse(result);
|
|
1609
1641
|
return ok(result);
|
|
@@ -1965,6 +1997,7 @@ var GeminiAdapter = class extends BaseAdapter {
|
|
|
1965
1997
|
if (request.tools !== void 0 && request.tools.length > 0) {
|
|
1966
1998
|
config.tools = [{ functionDeclarations: request.tools.map(mapToolToFunctionDeclaration) }];
|
|
1967
1999
|
}
|
|
2000
|
+
if (request.signal !== void 0) config.abortSignal = request.signal;
|
|
1968
2001
|
return config;
|
|
1969
2002
|
}
|
|
1970
2003
|
/**
|
|
@@ -5937,7 +5970,7 @@ function buildVotingInput(plan, config) {
|
|
|
5937
5970
|
}
|
|
5938
5971
|
async function executeSingleVote(plan, config, log) {
|
|
5939
5972
|
try {
|
|
5940
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
5973
|
+
const { executeVoting } = await import("./consensus-vote-LPYEXUVC.js");
|
|
5941
5974
|
const input = buildVotingInput(plan, config);
|
|
5942
5975
|
const result = await executeVoting(input, log);
|
|
5943
5976
|
return parseVotingResult(result);
|