nexus-agents 4.5.1 → 4.6.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/{chunk-QNT5WS7E.js → chunk-EKS3ECXS.js} +2 -2
- package/dist/{chunk-EPD5MGPB.js → chunk-RWI6YQXG.js} +3 -3
- package/dist/{chunk-CGJPW5BI.js → chunk-ZZED3BWY.js} +26 -15
- package/dist/chunk-ZZED3BWY.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +44 -9
- package/dist/index.js +2 -2
- package/dist/{setup-command-DIL56GPR.js → setup-command-GEWL2HS4.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-CGJPW5BI.js.map +0 -1
- /package/dist/{chunk-QNT5WS7E.js.map → chunk-EKS3ECXS.js.map} +0 -0
- /package/dist/{chunk-EPD5MGPB.js.map → chunk-RWI6YQXG.js.map} +0 -0
- /package/dist/{setup-command-DIL56GPR.js.map → setup-command-GEWL2HS4.js.map} +0 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
defaultConfig,
|
|
10
10
|
initDataDirectories,
|
|
11
11
|
loadConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RWI6YQXG.js";
|
|
13
13
|
import {
|
|
14
14
|
BUILT_IN_EXPERTS
|
|
15
15
|
} from "./chunk-YPNQPT2F.js";
|
|
@@ -2001,4 +2001,4 @@ export {
|
|
|
2001
2001
|
setupCommand,
|
|
2002
2002
|
setupCommandAsync
|
|
2003
2003
|
};
|
|
2004
|
-
//# sourceMappingURL=chunk-
|
|
2004
|
+
//# sourceMappingURL=chunk-EKS3ECXS.js.map
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
} from "./chunk-OQLFRJCW.js";
|
|
53
53
|
|
|
54
54
|
// src/version.ts
|
|
55
|
-
var VERSION = true ? "4.
|
|
55
|
+
var VERSION = true ? "4.6.0" : "dev";
|
|
56
56
|
|
|
57
57
|
// src/config/schemas-core.ts
|
|
58
58
|
import { z } from "zod";
|
|
@@ -2339,7 +2339,7 @@ async function runDoctorFix(result) {
|
|
|
2339
2339
|
writeLine2("\u2500".repeat(40));
|
|
2340
2340
|
let fixCount = 0;
|
|
2341
2341
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
2342
|
-
const { runSetup } = await import("./setup-command-
|
|
2342
|
+
const { runSetup } = await import("./setup-command-GEWL2HS4.js");
|
|
2343
2343
|
const setupResult = runSetup({
|
|
2344
2344
|
skipMcp: true,
|
|
2345
2345
|
skipRules: true,
|
|
@@ -2452,4 +2452,4 @@ export {
|
|
|
2452
2452
|
startStdioServer,
|
|
2453
2453
|
closeServer
|
|
2454
2454
|
};
|
|
2455
|
-
//# sourceMappingURL=chunk-
|
|
2455
|
+
//# sourceMappingURL=chunk-RWI6YQXG.js.map
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
DEFAULT_TOOL_RATE_LIMITS,
|
|
24
24
|
clampTaskTtl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-RWI6YQXG.js";
|
|
26
26
|
import {
|
|
27
27
|
executeExpert
|
|
28
28
|
} from "./chunk-VRJAJUUR.js";
|
|
@@ -8308,10 +8308,14 @@ var AdaptiveProtocolSelector = class {
|
|
|
8308
8308
|
this.log = config?.logger ?? logger3;
|
|
8309
8309
|
}
|
|
8310
8310
|
/**
|
|
8311
|
-
*
|
|
8311
|
+
* Classify a task and report which protocol adaptation would choose.
|
|
8312
8312
|
*
|
|
8313
|
-
*
|
|
8314
|
-
*
|
|
8313
|
+
* The returned `pattern` is always `config.pattern`: `CollaborationPattern`
|
|
8314
|
+
* has no `auto` member, so there is no way for a caller to defer to
|
|
8315
|
+
* adaptation. `adaptivePattern` carries the advisory choice (#4833).
|
|
8316
|
+
*
|
|
8317
|
+
* @param config - Collaboration config; its `pattern` is always honoured
|
|
8318
|
+
* @returns The pattern in use, the advisory choice, and the classification
|
|
8315
8319
|
*/
|
|
8316
8320
|
selectProtocol(config) {
|
|
8317
8321
|
const explicitPattern = config.pattern;
|
|
@@ -8324,16 +8328,20 @@ var AdaptiveProtocolSelector = class {
|
|
|
8324
8328
|
const selectedPattern = mapping[classification.type] ?? DEFAULT_PROTOCOL_MAPPING[classification.type];
|
|
8325
8329
|
const wasOverridden = explicitPattern !== selectedPattern;
|
|
8326
8330
|
if (this.config.logDecisions) {
|
|
8327
|
-
this.log.info("Protocol
|
|
8331
|
+
this.log.info("Protocol classification (advisory)", {
|
|
8328
8332
|
taskType: classification.type,
|
|
8329
8333
|
confidence: classification.confidence,
|
|
8330
|
-
selectedPattern,
|
|
8331
|
-
explicitPattern,
|
|
8332
|
-
wasOverridden
|
|
8334
|
+
adaptivePattern: selectedPattern,
|
|
8335
|
+
patternInUse: explicitPattern,
|
|
8336
|
+
differsFromAdaptive: wasOverridden
|
|
8333
8337
|
});
|
|
8334
8338
|
}
|
|
8335
8339
|
return {
|
|
8336
|
-
pattern
|
|
8340
|
+
// Always the caller's pattern — the ternary this replaced returned
|
|
8341
|
+
// `explicitPattern` in both branches, since the false branch is reached
|
|
8342
|
+
// only when the two are equal (#4833).
|
|
8343
|
+
pattern: explicitPattern,
|
|
8344
|
+
adaptivePattern: selectedPattern,
|
|
8337
8345
|
classification,
|
|
8338
8346
|
wasOverridden
|
|
8339
8347
|
};
|
|
@@ -8363,16 +8371,18 @@ var AdaptiveProtocolSelector = class {
|
|
|
8363
8371
|
return this.factory.execute(adaptedConfig, agents);
|
|
8364
8372
|
}
|
|
8365
8373
|
/**
|
|
8366
|
-
* Get recommended protocol for a task without executing.
|
|
8374
|
+
* Get the recommended protocol for a task without executing.
|
|
8367
8375
|
*
|
|
8368
|
-
*
|
|
8376
|
+
* Returns the *adaptive* choice. It previously returned `selection.pattern`
|
|
8377
|
+
* — the caller's own input — so the "recommendation" echoed the question
|
|
8378
|
+
* back with reasoning attached that read as an answer (#4833).
|
|
8369
8379
|
*/
|
|
8370
8380
|
getRecommendation(config) {
|
|
8371
8381
|
const selection = this.selectProtocol(config);
|
|
8372
8382
|
const { type, confidence } = selection.classification;
|
|
8373
8383
|
const reasoning = type === "unknown" ? "Task type could not be determined with sufficient confidence. Using default protocol." : `Task classified as "${type}" type (confidence: ${(confidence * 100).toFixed(0)}%). ${type === "reasoning" ? "Voting/parallel protocols work better for reasoning tasks (+13.2%)." : "Consensus protocols work better for knowledge tasks (+2.8%)."}`;
|
|
8374
8384
|
return {
|
|
8375
|
-
recommendedPattern: selection.
|
|
8385
|
+
recommendedPattern: selection.adaptivePattern,
|
|
8376
8386
|
taskType: type,
|
|
8377
8387
|
confidence,
|
|
8378
8388
|
reasoning
|
|
@@ -8680,12 +8690,13 @@ var OrchestratorCollaborationHelper = class {
|
|
|
8680
8690
|
async executeCollaboration(config, agents, results) {
|
|
8681
8691
|
const recommendation = this.protocolSelector.getRecommendation(config);
|
|
8682
8692
|
this.logger.info("Protocol recommendation", {
|
|
8683
|
-
|
|
8693
|
+
recommendedPattern: recommendation.recommendedPattern,
|
|
8694
|
+
patternInUse: config.pattern,
|
|
8684
8695
|
taskType: recommendation.taskType,
|
|
8685
8696
|
confidence: recommendation.confidence
|
|
8686
8697
|
});
|
|
8687
8698
|
const collaborationResult = await this.protocolSelector.execute(
|
|
8688
|
-
{ ...config, pattern:
|
|
8699
|
+
{ ...config, pattern: config.pattern },
|
|
8689
8700
|
agents
|
|
8690
8701
|
);
|
|
8691
8702
|
if (!collaborationResult.ok) {
|
|
@@ -54506,4 +54517,4 @@ export {
|
|
|
54506
54517
|
shutdownFeedbackSubscriber,
|
|
54507
54518
|
createEventBusBridge
|
|
54508
54519
|
};
|
|
54509
|
-
//# sourceMappingURL=chunk-
|
|
54520
|
+
//# sourceMappingURL=chunk-ZZED3BWY.js.map
|