nexus-agents 2.58.0 → 2.59.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-7EYQBG3W.js → chunk-7USAZET2.js} +3 -3
- package/dist/{chunk-JLYJQ7OG.js → chunk-V2Z7EHSY.js} +227 -203
- package/dist/chunk-V2Z7EHSY.js.map +1 -0
- package/dist/{chunk-GJ5BJU7A.js → chunk-ZOQQGA3L.js} +2 -2
- package/dist/cli.js +3 -3
- package/dist/index.js +2 -2
- package/dist/{setup-command-KSQEYBDA.js → setup-command-QAGEWX7G.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-JLYJQ7OG.js.map +0 -1
- /package/dist/{chunk-7EYQBG3W.js.map → chunk-7USAZET2.js.map} +0 -0
- /package/dist/{chunk-GJ5BJU7A.js.map → chunk-ZOQQGA3L.js.map} +0 -0
- /package/dist/{setup-command-KSQEYBDA.js.map → setup-command-QAGEWX7G.js.map} +0 -0
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
} from "./chunk-CLYZ7FWP.js";
|
|
36
36
|
|
|
37
37
|
// src/version.ts
|
|
38
|
-
var VERSION = true ? "2.
|
|
38
|
+
var VERSION = true ? "2.59.0" : "dev";
|
|
39
39
|
|
|
40
40
|
// src/config/schemas-core.ts
|
|
41
41
|
import { z } from "zod";
|
|
@@ -2024,7 +2024,7 @@ async function runDoctorFix(result) {
|
|
|
2024
2024
|
writeLine2("\u2500".repeat(40));
|
|
2025
2025
|
let fixCount = 0;
|
|
2026
2026
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
2027
|
-
const { runSetup } = await import("./setup-command-
|
|
2027
|
+
const { runSetup } = await import("./setup-command-QAGEWX7G.js");
|
|
2028
2028
|
const setupResult = runSetup({
|
|
2029
2029
|
skipMcp: true,
|
|
2030
2030
|
skipRules: true,
|
|
@@ -2133,4 +2133,4 @@ export {
|
|
|
2133
2133
|
startStdioServer,
|
|
2134
2134
|
closeServer
|
|
2135
2135
|
};
|
|
2136
|
-
//# sourceMappingURL=chunk-
|
|
2136
|
+
//# sourceMappingURL=chunk-7USAZET2.js.map
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
clampTaskTtl,
|
|
66
66
|
getAvailabilityCache,
|
|
67
67
|
resolveFallback
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-7USAZET2.js";
|
|
69
69
|
import {
|
|
70
70
|
DEFAULTS
|
|
71
71
|
} from "./chunk-H43PABG4.js";
|
|
@@ -23437,10 +23437,10 @@ function calculateZStatistic(params) {
|
|
|
23437
23437
|
function calculateDifferenceCI(p1, p2, total1, total2, confidence) {
|
|
23438
23438
|
const difference = p1 - p2;
|
|
23439
23439
|
const seDiff = Math.sqrt(p1 * (1 - p1) / (total1 || 1) + p2 * (1 - p2) / (total2 || 1));
|
|
23440
|
-
const
|
|
23440
|
+
const z104 = getZScore(confidence);
|
|
23441
23441
|
return {
|
|
23442
|
-
lower: difference -
|
|
23443
|
-
upper: difference +
|
|
23442
|
+
lower: difference - z104 * seDiff,
|
|
23443
|
+
upper: difference + z104 * seDiff,
|
|
23444
23444
|
estimate: difference,
|
|
23445
23445
|
confidence,
|
|
23446
23446
|
n: total1 + total2,
|
|
@@ -23463,11 +23463,11 @@ function proportionConfidenceInterval(successes, total, options = {}) {
|
|
|
23463
23463
|
standardError: 0
|
|
23464
23464
|
};
|
|
23465
23465
|
}
|
|
23466
|
-
const
|
|
23467
|
-
const z210 =
|
|
23466
|
+
const z104 = getZScore(opts.confidence);
|
|
23467
|
+
const z210 = z104 * z104;
|
|
23468
23468
|
const denominator = 1 + z210 / n;
|
|
23469
23469
|
const center = (p + z210 / (2 * n)) / denominator;
|
|
23470
|
-
const margin =
|
|
23470
|
+
const margin = z104 / denominator * Math.sqrt(p * (1 - p) / n + z210 / (4 * n * n));
|
|
23471
23471
|
const lower = Math.max(0, center - margin);
|
|
23472
23472
|
const upper = Math.min(1, center + margin);
|
|
23473
23473
|
const standardError = Math.sqrt(p * (1 - p) / n);
|
|
@@ -23497,8 +23497,8 @@ function meanConfidenceInterval(values, options = {}) {
|
|
|
23497
23497
|
const variance = values.reduce((sum, v) => sum + (v - mean) ** 2, 0) / (n - 1 || 1);
|
|
23498
23498
|
const stdDev = Math.sqrt(variance);
|
|
23499
23499
|
const standardError = stdDev / Math.sqrt(n);
|
|
23500
|
-
const
|
|
23501
|
-
const margin =
|
|
23500
|
+
const z104 = getZScore(opts.confidence);
|
|
23501
|
+
const margin = z104 * standardError;
|
|
23502
23502
|
return {
|
|
23503
23503
|
lower: mean - margin,
|
|
23504
23504
|
upper: mean + margin,
|
|
@@ -43776,6 +43776,29 @@ function registerPipelineTool(server, _deps) {
|
|
|
43776
43776
|
});
|
|
43777
43777
|
}
|
|
43778
43778
|
|
|
43779
|
+
// src/mcp/tools/supply-chain-tradeoff-panel.ts
|
|
43780
|
+
import { z as z94 } from "zod";
|
|
43781
|
+
var DEFAULT_AXES = [
|
|
43782
|
+
"build_time_determinism",
|
|
43783
|
+
"supply_chain_risk",
|
|
43784
|
+
"update_cadence"
|
|
43785
|
+
];
|
|
43786
|
+
var MAX_AXES = 6;
|
|
43787
|
+
var MAX_AXIS_NAME_LENGTH = 64;
|
|
43788
|
+
var MAX_PROPOSAL_LENGTH = 4e3;
|
|
43789
|
+
var MAX_CONTEXT_LENGTH = 4e3;
|
|
43790
|
+
var SupplyChainTradeoffPanelInputSchema = z94.object({
|
|
43791
|
+
proposal: z94.string().min(1).max(MAX_PROPOSAL_LENGTH).describe('The proposal under tradeoff review (e.g. "Should aegis-boot adopt cargo-nextest?")'),
|
|
43792
|
+
axes: z94.array(z94.string().min(1).max(MAX_AXIS_NAME_LENGTH)).min(1).max(MAX_AXES).optional().describe(
|
|
43793
|
+
`Tradeoff axes to evaluate. Default: ${DEFAULT_AXES.join(", ")}. Custom axes accepted; max ${String(MAX_AXES)}.`
|
|
43794
|
+
),
|
|
43795
|
+
context: z94.string().max(MAX_CONTEXT_LENGTH).optional().describe(
|
|
43796
|
+
"Optional context: relevant repo state, dependency tree, vendor publishing patterns, etc."
|
|
43797
|
+
),
|
|
43798
|
+
quickMode: z94.boolean().optional().default(false).describe("Use 3 voters (architect, security, scope_steward) instead of 7"),
|
|
43799
|
+
simulate: z94.boolean().optional().default(false).describe("Use simulated voters (testing only)")
|
|
43800
|
+
});
|
|
43801
|
+
|
|
43779
43802
|
// src/mcp/tools/tool-annotations.ts
|
|
43780
43803
|
var TOOL_ANNOTATIONS = {
|
|
43781
43804
|
delegate_to_model: {
|
|
@@ -44194,7 +44217,8 @@ function registerTools(server, options) {
|
|
|
44194
44217
|
"search_codebase",
|
|
44195
44218
|
"run_dev_pipeline",
|
|
44196
44219
|
"run_pipeline",
|
|
44197
|
-
"pr_review"
|
|
44220
|
+
"pr_review",
|
|
44221
|
+
"supply_chain_tradeoff_panel"
|
|
44198
44222
|
],
|
|
44199
44223
|
logger: logger56,
|
|
44200
44224
|
rateLimiter
|
|
@@ -44322,40 +44346,40 @@ var RiskLevel = /* @__PURE__ */ ((RiskLevel2) => {
|
|
|
44322
44346
|
})(RiskLevel || {});
|
|
44323
44347
|
|
|
44324
44348
|
// src/mcp/safety/stpa-schemas.ts
|
|
44325
|
-
import { z as
|
|
44326
|
-
var HazardCategorySchema =
|
|
44327
|
-
var HazardSeveritySchema =
|
|
44328
|
-
var ConstraintPrioritySchema =
|
|
44329
|
-
var RiskLevelSchema =
|
|
44330
|
-
var TriggerPatternSchema =
|
|
44331
|
-
parameter:
|
|
44332
|
-
matchType:
|
|
44333
|
-
pattern:
|
|
44334
|
-
reason:
|
|
44349
|
+
import { z as z95 } from "zod";
|
|
44350
|
+
var HazardCategorySchema = z95.enum(HazardCategory);
|
|
44351
|
+
var HazardSeveritySchema = z95.enum(HazardSeverity);
|
|
44352
|
+
var ConstraintPrioritySchema = z95.enum(ConstraintPriority);
|
|
44353
|
+
var RiskLevelSchema = z95.enum(RiskLevel);
|
|
44354
|
+
var TriggerPatternSchema = z95.object({
|
|
44355
|
+
parameter: z95.string().min(1),
|
|
44356
|
+
matchType: z95.enum(["contains", "regex", "equals", "startsWith", "endsWith"]),
|
|
44357
|
+
pattern: z95.string(),
|
|
44358
|
+
reason: z95.string()
|
|
44335
44359
|
});
|
|
44336
|
-
var HazardSchema =
|
|
44337
|
-
id:
|
|
44338
|
-
description:
|
|
44360
|
+
var HazardSchema = z95.object({
|
|
44361
|
+
id: z95.string().min(1),
|
|
44362
|
+
description: z95.string(),
|
|
44339
44363
|
category: HazardCategorySchema,
|
|
44340
44364
|
severity: HazardSeveritySchema,
|
|
44341
|
-
likelihood:
|
|
44342
|
-
triggerConditions:
|
|
44343
|
-
consequences:
|
|
44365
|
+
likelihood: z95.enum(["almost_certain", "likely", "possible", "unlikely", "rare"]),
|
|
44366
|
+
triggerConditions: z95.array(z95.string()),
|
|
44367
|
+
consequences: z95.array(z95.string())
|
|
44344
44368
|
});
|
|
44345
|
-
var UnsafeControlActionSchema =
|
|
44346
|
-
id:
|
|
44347
|
-
toolName:
|
|
44348
|
-
type:
|
|
44349
|
-
description:
|
|
44350
|
-
unsafeContext:
|
|
44351
|
-
relatedHazards:
|
|
44352
|
-
triggerPatterns:
|
|
44369
|
+
var UnsafeControlActionSchema = z95.object({
|
|
44370
|
+
id: z95.string().min(1),
|
|
44371
|
+
toolName: z95.string().min(1),
|
|
44372
|
+
type: z95.enum(["not_provided", "provided_causes_hazard", "wrong_timing", "wrong_duration"]),
|
|
44373
|
+
description: z95.string(),
|
|
44374
|
+
unsafeContext: z95.string(),
|
|
44375
|
+
relatedHazards: z95.array(z95.string()),
|
|
44376
|
+
triggerPatterns: z95.array(TriggerPatternSchema).optional()
|
|
44353
44377
|
});
|
|
44354
|
-
var SafetyConstraintSchema =
|
|
44355
|
-
id:
|
|
44356
|
-
description:
|
|
44357
|
-
mitigates:
|
|
44358
|
-
enforcement:
|
|
44378
|
+
var SafetyConstraintSchema = z95.object({
|
|
44379
|
+
id: z95.string().min(1),
|
|
44380
|
+
description: z95.string(),
|
|
44381
|
+
mitigates: z95.array(z95.string()),
|
|
44382
|
+
enforcement: z95.enum([
|
|
44359
44383
|
"prevent",
|
|
44360
44384
|
"require_confirmation",
|
|
44361
44385
|
"alert",
|
|
@@ -44363,54 +44387,54 @@ var SafetyConstraintSchema = z94.object({
|
|
|
44363
44387
|
"rate_limit",
|
|
44364
44388
|
"require_privilege"
|
|
44365
44389
|
]),
|
|
44366
|
-
validationFunction:
|
|
44390
|
+
validationFunction: z95.string().optional(),
|
|
44367
44391
|
priority: ConstraintPrioritySchema
|
|
44368
44392
|
});
|
|
44369
|
-
var PropertySchemaSchema =
|
|
44370
|
-
type:
|
|
44371
|
-
description:
|
|
44372
|
-
enum:
|
|
44373
|
-
pattern:
|
|
44374
|
-
minimum:
|
|
44375
|
-
maximum:
|
|
44393
|
+
var PropertySchemaSchema = z95.object({
|
|
44394
|
+
type: z95.string(),
|
|
44395
|
+
description: z95.string().optional(),
|
|
44396
|
+
enum: z95.array(z95.unknown()).optional(),
|
|
44397
|
+
pattern: z95.string().optional(),
|
|
44398
|
+
minimum: z95.number().optional(),
|
|
44399
|
+
maximum: z95.number().optional()
|
|
44376
44400
|
});
|
|
44377
|
-
var ToolInputSchemaSchema =
|
|
44378
|
-
type:
|
|
44379
|
-
properties:
|
|
44380
|
-
required:
|
|
44381
|
-
additionalProperties:
|
|
44401
|
+
var ToolInputSchemaSchema = z95.object({
|
|
44402
|
+
type: z95.string(),
|
|
44403
|
+
properties: z95.record(z95.string(), PropertySchemaSchema).optional(),
|
|
44404
|
+
required: z95.array(z95.string()).optional(),
|
|
44405
|
+
additionalProperties: z95.boolean().optional()
|
|
44382
44406
|
});
|
|
44383
|
-
var ToolDefinitionSchema =
|
|
44384
|
-
name:
|
|
44385
|
-
description:
|
|
44407
|
+
var ToolDefinitionSchema = z95.object({
|
|
44408
|
+
name: z95.string().min(1),
|
|
44409
|
+
description: z95.string(),
|
|
44386
44410
|
inputSchema: ToolInputSchemaSchema
|
|
44387
44411
|
});
|
|
44388
|
-
var AnalysisConfigurationSchema =
|
|
44389
|
-
includeLowSeverity:
|
|
44390
|
-
generateAllConstraints:
|
|
44391
|
-
checkInteractions:
|
|
44392
|
-
maxHazardsPerTool:
|
|
44393
|
-
categories:
|
|
44412
|
+
var AnalysisConfigurationSchema = z95.object({
|
|
44413
|
+
includeLowSeverity: z95.boolean().default(true),
|
|
44414
|
+
generateAllConstraints: z95.boolean().default(true),
|
|
44415
|
+
checkInteractions: z95.boolean().default(true),
|
|
44416
|
+
maxHazardsPerTool: z95.number().int().min(1).max(100).default(50),
|
|
44417
|
+
categories: z95.array(HazardCategorySchema).default([])
|
|
44394
44418
|
});
|
|
44395
|
-
var ConstraintViolationSchema =
|
|
44396
|
-
constraintId:
|
|
44397
|
-
constraintDescription:
|
|
44419
|
+
var ConstraintViolationSchema = z95.object({
|
|
44420
|
+
constraintId: z95.string().min(1),
|
|
44421
|
+
constraintDescription: z95.string(),
|
|
44398
44422
|
severity: HazardSeveritySchema,
|
|
44399
|
-
details:
|
|
44400
|
-
remediation:
|
|
44423
|
+
details: z95.string(),
|
|
44424
|
+
remediation: z95.string()
|
|
44401
44425
|
});
|
|
44402
|
-
var ValidationWarningSchema =
|
|
44403
|
-
code:
|
|
44404
|
-
message:
|
|
44405
|
-
affected:
|
|
44426
|
+
var ValidationWarningSchema = z95.object({
|
|
44427
|
+
code: z95.string().min(1),
|
|
44428
|
+
message: z95.string(),
|
|
44429
|
+
affected: z95.string()
|
|
44406
44430
|
});
|
|
44407
|
-
var ValidationResultSchema =
|
|
44408
|
-
valid:
|
|
44409
|
-
toolName:
|
|
44410
|
-
violations:
|
|
44411
|
-
passed:
|
|
44412
|
-
warnings:
|
|
44413
|
-
validatedAt:
|
|
44431
|
+
var ValidationResultSchema = z95.object({
|
|
44432
|
+
valid: z95.boolean(),
|
|
44433
|
+
toolName: z95.string().min(1),
|
|
44434
|
+
violations: z95.array(ConstraintViolationSchema),
|
|
44435
|
+
passed: z95.array(z95.string()),
|
|
44436
|
+
warnings: z95.array(ValidationWarningSchema),
|
|
44437
|
+
validatedAt: z95.date()
|
|
44414
44438
|
});
|
|
44415
44439
|
|
|
44416
44440
|
// src/mcp/safety/stpa-types.ts
|
|
@@ -45495,22 +45519,22 @@ var GeminiResponseParser = class {
|
|
|
45495
45519
|
};
|
|
45496
45520
|
|
|
45497
45521
|
// src/cli-adapters/task-analyzer.ts
|
|
45498
|
-
import { z as
|
|
45499
|
-
var TaskProfileSchema =
|
|
45522
|
+
import { z as z96 } from "zod";
|
|
45523
|
+
var TaskProfileSchema = z96.object({
|
|
45500
45524
|
/** Estimated input tokens required */
|
|
45501
|
-
contextRequired:
|
|
45525
|
+
contextRequired: z96.number().min(0),
|
|
45502
45526
|
/** Reasoning complexity on 0-10 scale */
|
|
45503
|
-
reasoningComplexity:
|
|
45527
|
+
reasoningComplexity: z96.number().min(0).max(10),
|
|
45504
45528
|
/** Whether task involves code generation */
|
|
45505
|
-
codeGeneration:
|
|
45529
|
+
codeGeneration: z96.boolean(),
|
|
45506
45530
|
/** Whether task involves multimodal content (images, etc.) */
|
|
45507
|
-
multimodal:
|
|
45531
|
+
multimodal: z96.boolean(),
|
|
45508
45532
|
/** Whether task can be split into parallel subtasks */
|
|
45509
|
-
parallelizable:
|
|
45533
|
+
parallelizable: z96.boolean(),
|
|
45510
45534
|
/** Whether cost should be minimized */
|
|
45511
|
-
budgetSensitive:
|
|
45535
|
+
budgetSensitive: z96.boolean(),
|
|
45512
45536
|
/** Primary task type classification */
|
|
45513
|
-
taskType:
|
|
45537
|
+
taskType: z96.enum([
|
|
45514
45538
|
"architecture",
|
|
45515
45539
|
"code_implementation",
|
|
45516
45540
|
"code_review",
|
|
@@ -45524,53 +45548,53 @@ var TaskProfileSchema = z95.object({
|
|
|
45524
45548
|
});
|
|
45525
45549
|
|
|
45526
45550
|
// src/cli-adapters/router-types.ts
|
|
45527
|
-
import { z as
|
|
45528
|
-
var RouterConfigSchema =
|
|
45529
|
-
minCapacityThreshold:
|
|
45530
|
-
preferCostEfficient:
|
|
45531
|
-
maxDecisionTimeMs:
|
|
45551
|
+
import { z as z97 } from "zod";
|
|
45552
|
+
var RouterConfigSchema = z97.object({
|
|
45553
|
+
minCapacityThreshold: z97.number().min(0).max(1).default(0.1),
|
|
45554
|
+
preferCostEfficient: z97.boolean().default(false),
|
|
45555
|
+
maxDecisionTimeMs: z97.number().min(1).max(1e3).default(100)
|
|
45532
45556
|
});
|
|
45533
45557
|
|
|
45534
45558
|
// src/cli-adapters/agreement-cascade-types.ts
|
|
45535
|
-
import { z as
|
|
45536
|
-
var AgreementCascadeConfigSchema =
|
|
45537
|
-
agreementThreshold:
|
|
45538
|
-
maxStages:
|
|
45539
|
-
modelTimeoutMs:
|
|
45559
|
+
import { z as z98 } from "zod";
|
|
45560
|
+
var AgreementCascadeConfigSchema = z98.object({
|
|
45561
|
+
agreementThreshold: z98.number().min(0.5).max(1).default(0.7),
|
|
45562
|
+
maxStages: z98.number().int().min(1).max(5).default(3),
|
|
45563
|
+
modelTimeoutMs: z98.number().int().min(1e3).max(3e5).default(6e4)
|
|
45540
45564
|
});
|
|
45541
45565
|
|
|
45542
45566
|
// src/cli-adapters/agreement-cascade-router.ts
|
|
45543
45567
|
var logger42 = createLogger({ component: "agreement-cascade-router" });
|
|
45544
45568
|
|
|
45545
45569
|
// src/cli-adapters/daao-types.ts
|
|
45546
|
-
import { z as
|
|
45547
|
-
var EncodedFeaturesSchema =
|
|
45570
|
+
import { z as z99 } from "zod";
|
|
45571
|
+
var EncodedFeaturesSchema = z99.object({
|
|
45548
45572
|
/** Lexical complexity score (vocabulary diversity, rare words) */
|
|
45549
|
-
lexicalComplexity:
|
|
45573
|
+
lexicalComplexity: z99.number().min(0).max(1),
|
|
45550
45574
|
/** Syntactic complexity score (sentence structure, nesting) */
|
|
45551
|
-
syntacticComplexity:
|
|
45575
|
+
syntacticComplexity: z99.number().min(0).max(1),
|
|
45552
45576
|
/** Semantic density score (concept density, abstraction level) */
|
|
45553
|
-
semanticDensity:
|
|
45577
|
+
semanticDensity: z99.number().min(0).max(1),
|
|
45554
45578
|
/** Technical specificity (domain-specific terminology) */
|
|
45555
|
-
technicalSpecificity:
|
|
45579
|
+
technicalSpecificity: z99.number().min(0).max(1),
|
|
45556
45580
|
/** Task scope (breadth of requirements) */
|
|
45557
|
-
taskScope:
|
|
45581
|
+
taskScope: z99.number().min(0).max(1),
|
|
45558
45582
|
/** Constraint complexity (constraints, edge cases, requirements) */
|
|
45559
|
-
constraintComplexity:
|
|
45583
|
+
constraintComplexity: z99.number().min(0).max(1),
|
|
45560
45584
|
/** Ambiguity level (inverse - higher means more clear/specific) */
|
|
45561
|
-
clarity:
|
|
45585
|
+
clarity: z99.number().min(0).max(1),
|
|
45562
45586
|
/** Output complexity expectation */
|
|
45563
|
-
outputComplexity:
|
|
45587
|
+
outputComplexity: z99.number().min(0).max(1)
|
|
45564
45588
|
});
|
|
45565
|
-
var FeatureWeightsSchema =
|
|
45566
|
-
lexicalComplexity:
|
|
45567
|
-
syntacticComplexity:
|
|
45568
|
-
semanticDensity:
|
|
45569
|
-
technicalSpecificity:
|
|
45570
|
-
taskScope:
|
|
45571
|
-
constraintComplexity:
|
|
45572
|
-
clarity:
|
|
45573
|
-
outputComplexity:
|
|
45589
|
+
var FeatureWeightsSchema = z99.object({
|
|
45590
|
+
lexicalComplexity: z99.number().min(0).max(1),
|
|
45591
|
+
syntacticComplexity: z99.number().min(0).max(1),
|
|
45592
|
+
semanticDensity: z99.number().min(0).max(1),
|
|
45593
|
+
technicalSpecificity: z99.number().min(0).max(1),
|
|
45594
|
+
taskScope: z99.number().min(0).max(1),
|
|
45595
|
+
constraintComplexity: z99.number().min(0).max(1),
|
|
45596
|
+
clarity: z99.number().min(0).max(1),
|
|
45597
|
+
outputComplexity: z99.number().min(0).max(1)
|
|
45574
45598
|
});
|
|
45575
45599
|
var DEFAULT_FEATURE_WEIGHTS = {
|
|
45576
45600
|
lexicalComplexity: 0.1,
|
|
@@ -45592,50 +45616,50 @@ var DEFAULT_DAAO_TIER_TO_CLIS = {
|
|
|
45592
45616
|
balanced: ["codex", "opencode", "gemini", "claude"],
|
|
45593
45617
|
powerful: ["claude", "codex", "opencode", "gemini"]
|
|
45594
45618
|
};
|
|
45595
|
-
var DAAOConfigSchema =
|
|
45619
|
+
var DAAOConfigSchema = z99.object({
|
|
45596
45620
|
/** Difficulty thresholds for level classification */
|
|
45597
|
-
thresholds:
|
|
45598
|
-
easyUpperBound:
|
|
45599
|
-
hardLowerBound:
|
|
45621
|
+
thresholds: z99.object({
|
|
45622
|
+
easyUpperBound: z99.number().min(0).max(1),
|
|
45623
|
+
hardLowerBound: z99.number().min(0).max(1)
|
|
45600
45624
|
}).default(DEFAULT_DAAO_THRESHOLDS),
|
|
45601
45625
|
/** Feature weights for difficulty aggregation */
|
|
45602
45626
|
weights: FeatureWeightsSchema.default(DEFAULT_FEATURE_WEIGHTS),
|
|
45603
45627
|
/** Mapping from model tier to CLI preference order */
|
|
45604
|
-
tierToClis:
|
|
45605
|
-
|
|
45606
|
-
|
|
45628
|
+
tierToClis: z99.record(
|
|
45629
|
+
z99.enum(["fast", "balanced", "powerful"]),
|
|
45630
|
+
z99.array(z99.enum(["claude", "gemini", "codex", "opencode"]))
|
|
45607
45631
|
).default(DEFAULT_DAAO_TIER_TO_CLIS),
|
|
45608
45632
|
/** Enable adaptive calibration from outcomes */
|
|
45609
|
-
enableCalibration:
|
|
45633
|
+
enableCalibration: z99.boolean().default(true),
|
|
45610
45634
|
/** Maximum outcomes to store for calibration */
|
|
45611
|
-
maxCalibrationOutcomes:
|
|
45635
|
+
maxCalibrationOutcomes: z99.number().int().positive().default(1e3),
|
|
45612
45636
|
/** Minimum outcomes before applying calibration adjustments */
|
|
45613
|
-
minCalibrationOutcomes:
|
|
45637
|
+
minCalibrationOutcomes: z99.number().int().positive().default(50),
|
|
45614
45638
|
/** Reconstruction error threshold for typical patterns */
|
|
45615
|
-
typicalPatternThreshold:
|
|
45639
|
+
typicalPatternThreshold: z99.number().min(0).max(1).default(0.3),
|
|
45616
45640
|
/** Verbose logging */
|
|
45617
|
-
verbose:
|
|
45641
|
+
verbose: z99.boolean().default(false)
|
|
45618
45642
|
});
|
|
45619
45643
|
|
|
45620
45644
|
// src/cli-adapters/task-classifier.ts
|
|
45621
|
-
import { z as
|
|
45622
|
-
var ClassificationPatternsSchema =
|
|
45623
|
-
code:
|
|
45624
|
-
research:
|
|
45625
|
-
documentation:
|
|
45626
|
-
analysis:
|
|
45645
|
+
import { z as z100 } from "zod";
|
|
45646
|
+
var ClassificationPatternsSchema = z100.object({
|
|
45647
|
+
code: z100.array(z100.string()).readonly(),
|
|
45648
|
+
research: z100.array(z100.string()).readonly(),
|
|
45649
|
+
documentation: z100.array(z100.string()).readonly(),
|
|
45650
|
+
analysis: z100.array(z100.string()).readonly()
|
|
45627
45651
|
});
|
|
45628
45652
|
|
|
45629
45653
|
// src/cli-adapters/response-cache-types.ts
|
|
45630
|
-
import { z as
|
|
45631
|
-
var ResponseCacheConfigSchema =
|
|
45632
|
-
defaultTTL:
|
|
45654
|
+
import { z as z101 } from "zod";
|
|
45655
|
+
var ResponseCacheConfigSchema = z101.object({
|
|
45656
|
+
defaultTTL: z101.number().min(1e3).max(36e5).default(3e5),
|
|
45633
45657
|
// 5 minutes
|
|
45634
|
-
maxEntries:
|
|
45635
|
-
maxMemoryMB:
|
|
45636
|
-
cleanupInterval:
|
|
45658
|
+
maxEntries: z101.number().min(10).max(1e5).default(1e3),
|
|
45659
|
+
maxMemoryMB: z101.number().min(1).max(1e3).default(50),
|
|
45660
|
+
cleanupInterval: z101.number().min(1e3).max(6e5).default(6e4),
|
|
45637
45661
|
// 1 minute
|
|
45638
|
-
enableLogging:
|
|
45662
|
+
enableLogging: z101.boolean().default(false)
|
|
45639
45663
|
});
|
|
45640
45664
|
|
|
45641
45665
|
// src/cli-adapters/response-cache-utils.ts
|
|
@@ -45643,12 +45667,12 @@ import { createHash as createHash4 } from "crypto";
|
|
|
45643
45667
|
var logger43 = createLogger({ component: "ResponseCacheUtils" });
|
|
45644
45668
|
|
|
45645
45669
|
// src/cli-adapters/unified-routing-types.ts
|
|
45646
|
-
import { z as
|
|
45647
|
-
var UnifiedRoutingDecisionSchema =
|
|
45648
|
-
selectedCli:
|
|
45649
|
-
confidence:
|
|
45650
|
-
reason:
|
|
45651
|
-
strategy:
|
|
45670
|
+
import { z as z102 } from "zod";
|
|
45671
|
+
var UnifiedRoutingDecisionSchema = z102.object({
|
|
45672
|
+
selectedCli: z102.string(),
|
|
45673
|
+
confidence: z102.number().min(0).max(1),
|
|
45674
|
+
reason: z102.string(),
|
|
45675
|
+
strategy: z102.enum([
|
|
45652
45676
|
"composite",
|
|
45653
45677
|
"quality",
|
|
45654
45678
|
"budget",
|
|
@@ -45660,57 +45684,57 @@ var UnifiedRoutingDecisionSchema = z101.object({
|
|
|
45660
45684
|
"linucb",
|
|
45661
45685
|
"direct"
|
|
45662
45686
|
]),
|
|
45663
|
-
decisionTimeMs:
|
|
45664
|
-
alternatives:
|
|
45665
|
-
stagesExecuted:
|
|
45666
|
-
withinBudget:
|
|
45667
|
-
estimatedComplexity:
|
|
45668
|
-
estimatedTokens:
|
|
45669
|
-
topsisScore:
|
|
45670
|
-
ucbScore:
|
|
45671
|
-
resolvedAtStage:
|
|
45672
|
-
consensusReached:
|
|
45673
|
-
agreementScore:
|
|
45674
|
-
metadata:
|
|
45687
|
+
decisionTimeMs: z102.number().nonnegative(),
|
|
45688
|
+
alternatives: z102.array(z102.string()).readonly(),
|
|
45689
|
+
stagesExecuted: z102.array(z102.string()).readonly(),
|
|
45690
|
+
withinBudget: z102.boolean().optional(),
|
|
45691
|
+
estimatedComplexity: z102.enum(["simple", "moderate", "complex", "expert"]).optional(),
|
|
45692
|
+
estimatedTokens: z102.number().int().positive().optional(),
|
|
45693
|
+
topsisScore: z102.number().optional(),
|
|
45694
|
+
ucbScore: z102.number().optional(),
|
|
45695
|
+
resolvedAtStage: z102.number().int().nonnegative().optional(),
|
|
45696
|
+
consensusReached: z102.boolean().optional(),
|
|
45697
|
+
agreementScore: z102.number().min(0).max(1).optional(),
|
|
45698
|
+
metadata: z102.record(z102.string(), z102.unknown()).optional()
|
|
45675
45699
|
});
|
|
45676
45700
|
|
|
45677
45701
|
// src/learning/outcome-feedback-types.ts
|
|
45678
|
-
import { z as
|
|
45679
|
-
var QualitySignalsSchema =
|
|
45680
|
-
testsPass:
|
|
45681
|
-
lintErrors:
|
|
45682
|
-
userApproved:
|
|
45683
|
-
retryCount:
|
|
45684
|
-
completionRatio:
|
|
45685
|
-
validStructure:
|
|
45686
|
-
coherenceScore:
|
|
45702
|
+
import { z as z103 } from "zod";
|
|
45703
|
+
var QualitySignalsSchema = z103.object({
|
|
45704
|
+
testsPass: z103.boolean().optional(),
|
|
45705
|
+
lintErrors: z103.number().int().min(0).optional(),
|
|
45706
|
+
userApproved: z103.boolean().optional(),
|
|
45707
|
+
retryCount: z103.number().int().min(0).default(0),
|
|
45708
|
+
completionRatio: z103.number().min(0).max(1).default(1),
|
|
45709
|
+
validStructure: z103.boolean().optional(),
|
|
45710
|
+
coherenceScore: z103.number().min(0).max(1).optional()
|
|
45687
45711
|
});
|
|
45688
|
-
var RoutingDecisionSchema =
|
|
45689
|
-
id:
|
|
45690
|
-
timestamp:
|
|
45691
|
-
query:
|
|
45692
|
-
routerType:
|
|
45693
|
-
selectedModel:
|
|
45694
|
-
selectedTier:
|
|
45695
|
-
armIndex:
|
|
45696
|
-
banditContext:
|
|
45697
|
-
queryFeatures:
|
|
45698
|
-
ucbScore:
|
|
45699
|
-
confidence:
|
|
45700
|
-
traceId:
|
|
45701
|
-
domain:
|
|
45712
|
+
var RoutingDecisionSchema = z103.object({
|
|
45713
|
+
id: z103.uuid(),
|
|
45714
|
+
timestamp: z103.iso.datetime(),
|
|
45715
|
+
query: z103.string(),
|
|
45716
|
+
routerType: z103.enum(["linucb", "preference", "quality", "cascade", "topsis"]),
|
|
45717
|
+
selectedModel: z103.string(),
|
|
45718
|
+
selectedTier: z103.enum(["strong", "weak"]).optional(),
|
|
45719
|
+
armIndex: z103.number().int().min(0).optional(),
|
|
45720
|
+
banditContext: z103.record(z103.string(), z103.unknown()).optional(),
|
|
45721
|
+
queryFeatures: z103.record(z103.string(), z103.unknown()).optional(),
|
|
45722
|
+
ucbScore: z103.number().optional(),
|
|
45723
|
+
confidence: z103.number().min(0).max(1).optional(),
|
|
45724
|
+
traceId: z103.string(),
|
|
45725
|
+
domain: z103.string().optional()
|
|
45702
45726
|
});
|
|
45703
|
-
var TaskOutcomeSchema =
|
|
45704
|
-
routingDecisionId:
|
|
45705
|
-
timestamp:
|
|
45706
|
-
outcomeClass:
|
|
45707
|
-
success:
|
|
45708
|
-
qualityScore:
|
|
45709
|
-
durationMs:
|
|
45710
|
-
tokenUsage:
|
|
45711
|
-
errorMessage:
|
|
45727
|
+
var TaskOutcomeSchema = z103.object({
|
|
45728
|
+
routingDecisionId: z103.uuid(),
|
|
45729
|
+
timestamp: z103.iso.datetime(),
|
|
45730
|
+
outcomeClass: z103.enum(["success", "partial", "failure", "timeout", "error"]),
|
|
45731
|
+
success: z103.boolean(),
|
|
45732
|
+
qualityScore: z103.number().min(0).max(1),
|
|
45733
|
+
durationMs: z103.number().min(0),
|
|
45734
|
+
tokenUsage: z103.number().int().min(0),
|
|
45735
|
+
errorMessage: z103.string().optional(),
|
|
45712
45736
|
qualitySignals: QualitySignalsSchema,
|
|
45713
|
-
traceId:
|
|
45737
|
+
traceId: z103.string()
|
|
45714
45738
|
});
|
|
45715
45739
|
var DEFAULT_FEEDBACK_COLLECTOR_CONFIG = {
|
|
45716
45740
|
maxPendingDecisions: 1e3,
|
|
@@ -45725,17 +45749,17 @@ var DEFAULT_FEEDBACK_COLLECTOR_CONFIG = {
|
|
|
45725
45749
|
targetTokenUsage: 2e3,
|
|
45726
45750
|
maxHistorySize: 1e4
|
|
45727
45751
|
};
|
|
45728
|
-
var FeedbackCollectorConfigSchema =
|
|
45729
|
-
maxPendingDecisions:
|
|
45730
|
-
pendingTimeoutMs:
|
|
45731
|
-
enableAutoReward:
|
|
45732
|
-
qualityWeight:
|
|
45733
|
-
speedWeight:
|
|
45734
|
-
efficiencyWeight:
|
|
45735
|
-
retryPenalty:
|
|
45736
|
-
targetDurationMs:
|
|
45737
|
-
targetTokenUsage:
|
|
45738
|
-
maxHistorySize:
|
|
45752
|
+
var FeedbackCollectorConfigSchema = z103.object({
|
|
45753
|
+
maxPendingDecisions: z103.number().int().positive().default(1e3),
|
|
45754
|
+
pendingTimeoutMs: z103.number().positive().default(3e5),
|
|
45755
|
+
enableAutoReward: z103.boolean().default(true),
|
|
45756
|
+
qualityWeight: z103.number().min(0).max(1).default(0.5),
|
|
45757
|
+
speedWeight: z103.number().min(0).max(1).default(0.2),
|
|
45758
|
+
efficiencyWeight: z103.number().min(0).max(1).default(0.2),
|
|
45759
|
+
retryPenalty: z103.number().min(0).max(1).default(0.1),
|
|
45760
|
+
targetDurationMs: z103.number().positive().default(5e3),
|
|
45761
|
+
targetTokenUsage: z103.number().positive().default(2e3),
|
|
45762
|
+
maxHistorySize: z103.number().int().positive().default(1e4)
|
|
45739
45763
|
});
|
|
45740
45764
|
|
|
45741
45765
|
// src/learning/outcome-feedback-helpers.ts
|
|
@@ -53643,4 +53667,4 @@ export {
|
|
|
53643
53667
|
detectBackend,
|
|
53644
53668
|
createTaskTracker
|
|
53645
53669
|
};
|
|
53646
|
-
//# sourceMappingURL=chunk-
|
|
53670
|
+
//# sourceMappingURL=chunk-V2Z7EHSY.js.map
|