nexus-agents 8.4.0 → 8.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/ast-rule-runner-3N7DX6XO.js +29 -0
- package/dist/chunk-4OILK4VD.js +7 -0
- package/dist/{chunk-FURVUS67.js → chunk-6UWWVTQH.js} +6 -6
- package/dist/{chunk-HVPF7BBS.js → chunk-I33FKHUF.js} +2 -2
- package/dist/{chunk-2LQROHUE.js → chunk-QMUXBHKO.js} +3 -3
- package/dist/{chunk-CFGJGRVF.js → chunk-SNWGBSQ7.js} +37 -3
- package/dist/chunk-SNWGBSQ7.js.map +1 -0
- package/dist/chunk-WZZQI774.js +244 -0
- package/dist/chunk-WZZQI774.js.map +1 -0
- package/dist/{chunk-FBAEBGQ3.js → chunk-ZIZVA5OL.js} +2 -2
- package/dist/cli.js +88 -7
- package/dist/cli.js.map +1 -1
- package/dist/{consensus-vote-R5GXCSXV.js → consensus-vote-222ZEN5J.js} +4 -4
- package/dist/{improvement-review-UBDVNB55.js → improvement-review-GGYLCRGQ.js} +4 -4
- package/dist/index.js +149 -361
- package/dist/index.js.map +1 -1
- package/dist/{setup-data-dir-EYIPKPGP.js → setup-data-dir-T4S46VSI.js} +3 -3
- package/dist/setup-data-dir-T4S46VSI.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-CFGJGRVF.js.map +0 -1
- package/dist/chunk-M5DIGZIM.js +0 -7
- /package/dist/{consensus-vote-R5GXCSXV.js.map → ast-rule-runner-3N7DX6XO.js.map} +0 -0
- /package/dist/{chunk-M5DIGZIM.js.map → chunk-4OILK4VD.js.map} +0 -0
- /package/dist/{chunk-FURVUS67.js.map → chunk-6UWWVTQH.js.map} +0 -0
- /package/dist/{chunk-HVPF7BBS.js.map → chunk-I33FKHUF.js.map} +0 -0
- /package/dist/{chunk-2LQROHUE.js.map → chunk-QMUXBHKO.js.map} +0 -0
- /package/dist/{chunk-FBAEBGQ3.js.map → chunk-ZIZVA5OL.js.map} +0 -0
- /package/dist/{improvement-review-UBDVNB55.js.map → consensus-vote-222ZEN5J.js.map} +0 -0
- /package/dist/{setup-data-dir-EYIPKPGP.js.map → improvement-review-GGYLCRGQ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -553,7 +553,7 @@ import {
|
|
|
553
553
|
withLogging,
|
|
554
554
|
withRetry,
|
|
555
555
|
withRetryWrapper
|
|
556
|
-
} from "./chunk-
|
|
556
|
+
} from "./chunk-6UWWVTQH.js";
|
|
557
557
|
import {
|
|
558
558
|
FALLBACK_SCANNER_DATA,
|
|
559
559
|
buildPlanFromAnalysis,
|
|
@@ -568,13 +568,25 @@ import {
|
|
|
568
568
|
normalizeRepoId
|
|
569
569
|
} from "./chunk-DGWT7DXX.js";
|
|
570
570
|
import "./chunk-64GMIUM5.js";
|
|
571
|
+
import {
|
|
572
|
+
AST_RULE_LANGUAGES,
|
|
573
|
+
AST_RULE_SEVERITIES,
|
|
574
|
+
DEFAULT_AST_QA_LIMIT,
|
|
575
|
+
MAX_AST_QA_LIMIT,
|
|
576
|
+
MAX_FILES_SCANNED,
|
|
577
|
+
collectAstQaFindings,
|
|
578
|
+
ensurePolyglotLangs,
|
|
579
|
+
getBuiltInAstRulesPath,
|
|
580
|
+
loadRules,
|
|
581
|
+
runAstQaRules
|
|
582
|
+
} from "./chunk-WZZQI774.js";
|
|
571
583
|
import "./chunk-BYUVLVN7.js";
|
|
572
584
|
import {
|
|
573
585
|
closeServer,
|
|
574
586
|
connectTransport,
|
|
575
587
|
createServer,
|
|
576
588
|
startStdioServer
|
|
577
|
-
} from "./chunk-
|
|
589
|
+
} from "./chunk-QMUXBHKO.js";
|
|
578
590
|
import {
|
|
579
591
|
OPENAI_MODELS,
|
|
580
592
|
OPENAI_MODEL_ALIASES,
|
|
@@ -632,7 +644,7 @@ import {
|
|
|
632
644
|
generateProposalId,
|
|
633
645
|
parseAgentPairKey,
|
|
634
646
|
registerConsensusVoteTool
|
|
635
|
-
} from "./chunk-
|
|
647
|
+
} from "./chunk-SNWGBSQ7.js";
|
|
636
648
|
import "./chunk-FECYCZZR.js";
|
|
637
649
|
import {
|
|
638
650
|
allOf
|
|
@@ -685,7 +697,7 @@ import {
|
|
|
685
697
|
import {
|
|
686
698
|
ImprovementReviewInputSchema,
|
|
687
699
|
registerImprovementReviewTool
|
|
688
|
-
} from "./chunk-
|
|
700
|
+
} from "./chunk-ZIZVA5OL.js";
|
|
689
701
|
import {
|
|
690
702
|
AgentPerformanceSchema,
|
|
691
703
|
ConsensusAlgorithmSchema,
|
|
@@ -721,10 +733,10 @@ import {
|
|
|
721
733
|
toolSuccess,
|
|
722
734
|
toolSuccessStructured,
|
|
723
735
|
validateToolInput
|
|
724
|
-
} from "./chunk-
|
|
736
|
+
} from "./chunk-I33FKHUF.js";
|
|
725
737
|
import {
|
|
726
738
|
VERSION
|
|
727
|
-
} from "./chunk-
|
|
739
|
+
} from "./chunk-4OILK4VD.js";
|
|
728
740
|
import {
|
|
729
741
|
AuditTrail,
|
|
730
742
|
MAX_STRIPPED_ELEMENTS_PER_EVENT,
|
|
@@ -2583,14 +2595,14 @@ import { z as z5 } from "zod";
|
|
|
2583
2595
|
var FirewallPolicyModeSchema = z5.enum(["off", "audit", "enforce"]);
|
|
2584
2596
|
var DEFAULT_FIREWALL_POLICY_MODE = "off";
|
|
2585
2597
|
var FIREWALL_POLICY_ENV_VAR = "NEXUS_FIREWALL_POLICY";
|
|
2586
|
-
function resolveFirewallPolicyMode(env = process.env,
|
|
2598
|
+
function resolveFirewallPolicyMode(env = process.env, logger11) {
|
|
2587
2599
|
return resolveEnvMode(
|
|
2588
2600
|
env[FIREWALL_POLICY_ENV_VAR],
|
|
2589
2601
|
FirewallPolicyModeSchema,
|
|
2590
2602
|
DEFAULT_FIREWALL_POLICY_MODE,
|
|
2591
2603
|
FIREWALL_POLICY_ENV_VAR,
|
|
2592
2604
|
{
|
|
2593
|
-
...
|
|
2605
|
+
...logger11 !== void 0 ? { logger: logger11 } : {},
|
|
2594
2606
|
// An explicit-but-invalid value lands on `audit`, NOT on the unset
|
|
2595
2607
|
// default `off`. Unset means "the operator has not opted in" and `off` is
|
|
2596
2608
|
// right for it; a typo means "the operator opted in and mistyped how",
|
|
@@ -3070,271 +3082,47 @@ function createGitHubAdapter() {
|
|
|
3070
3082
|
};
|
|
3071
3083
|
}
|
|
3072
3084
|
|
|
3073
|
-
// src/security/ast-rule-runner.ts
|
|
3074
|
-
import { existsSync } from "node:fs";
|
|
3075
|
-
import { readdir, readFile, stat } from "node:fs/promises";
|
|
3076
|
-
import { dirname, extname, join, relative, resolve, sep } from "node:path";
|
|
3077
|
-
import { fileURLToPath } from "node:url";
|
|
3078
|
-
import { parse, registerDynamicLanguage } from "@ast-grep/napi";
|
|
3079
|
-
import goLangRegistration from "@ast-grep/lang-go";
|
|
3080
|
-
import pythonLangRegistration from "@ast-grep/lang-python";
|
|
3081
|
-
import { parse as parseYaml } from "yaml";
|
|
3082
|
-
import { z as z8 } from "zod";
|
|
3083
|
-
var polyglotLangsRegistered = false;
|
|
3084
|
-
function ensurePolyglotLangs() {
|
|
3085
|
-
if (polyglotLangsRegistered) return;
|
|
3086
|
-
registerDynamicLanguage({ python: pythonLangRegistration, go: goLangRegistration });
|
|
3087
|
-
polyglotLangsRegistered = true;
|
|
3088
|
-
}
|
|
3089
|
-
var AST_RULE_LANGUAGES = ["python", "go"];
|
|
3090
|
-
var AST_RULE_SEVERITIES = ["error", "warning", "info"];
|
|
3091
|
-
var RuleFileSchema = z8.object({
|
|
3092
|
-
id: z8.string().min(1),
|
|
3093
|
-
language: z8.enum(AST_RULE_LANGUAGES),
|
|
3094
|
-
severity: z8.enum(AST_RULE_SEVERITIES),
|
|
3095
|
-
message: z8.string().min(1),
|
|
3096
|
-
rule: z8.record(z8.string(), z8.unknown())
|
|
3097
|
-
});
|
|
3098
|
-
var MAX_SNIPPET_CHARS = 200;
|
|
3099
|
-
var DEFAULT_AST_QA_LIMIT = 200;
|
|
3100
|
-
var MAX_AST_QA_LIMIT = 2e3;
|
|
3101
|
-
var AST_QA_MAX_DEPTH = 24;
|
|
3102
|
-
var MAX_FILES_SCANNED = 5e3;
|
|
3103
|
-
var logger4 = createLogger({ component: "ast-rule-runner" });
|
|
3104
|
-
async function loadRules(dir) {
|
|
3105
|
-
let entries;
|
|
3106
|
-
try {
|
|
3107
|
-
entries = (await readdir(dir)).filter((f) => f.endsWith(".yml") || f.endsWith(".yaml")).sort();
|
|
3108
|
-
} catch (caught) {
|
|
3109
|
-
const e = caught instanceof Error ? caught : new Error(String(caught));
|
|
3110
|
-
throw new ValidationError(`ast-rule-runner: cannot read rules dir ${dir}: ${e.message}`, {
|
|
3111
|
-
cause: e
|
|
3112
|
-
});
|
|
3113
|
-
}
|
|
3114
|
-
const rules = [];
|
|
3115
|
-
for (const file of entries) {
|
|
3116
|
-
const path = join(dir, file);
|
|
3117
|
-
const raw = await readFile(path, "utf8");
|
|
3118
|
-
let parsed;
|
|
3119
|
-
try {
|
|
3120
|
-
parsed = parseYaml(raw);
|
|
3121
|
-
} catch (caught) {
|
|
3122
|
-
const e = caught instanceof Error ? caught : new Error(String(caught));
|
|
3123
|
-
throw new ValidationError(`ast-rule-runner: malformed YAML in ${path}: ${e.message}`, {
|
|
3124
|
-
cause: e
|
|
3125
|
-
});
|
|
3126
|
-
}
|
|
3127
|
-
const result = RuleFileSchema.safeParse(parsed);
|
|
3128
|
-
if (!result.success) {
|
|
3129
|
-
throw new ValidationError(
|
|
3130
|
-
`ast-rule-runner: invalid rule file ${path}: ${formatZodError(result.error)}`
|
|
3131
|
-
);
|
|
3132
|
-
}
|
|
3133
|
-
rules.push(result.data);
|
|
3134
|
-
}
|
|
3135
|
-
return rules;
|
|
3136
|
-
}
|
|
3137
|
-
function getBuiltInAstRulesPath() {
|
|
3138
|
-
const currentFile = fileURLToPath(import.meta.url);
|
|
3139
|
-
const currentDir = dirname(currentFile);
|
|
3140
|
-
if (currentFile.includes(`${sep}dist${sep}`) || currentFile.endsWith(`${sep}dist`)) {
|
|
3141
|
-
const distIndex = currentFile.lastIndexOf(`${sep}dist${sep}`);
|
|
3142
|
-
if (distIndex !== -1) {
|
|
3143
|
-
const distDir = currentFile.substring(0, distIndex + 5);
|
|
3144
|
-
const bundledPath = join(distDir, "security", "ast-rules");
|
|
3145
|
-
if (existsSync(bundledPath)) return bundledPath;
|
|
3146
|
-
}
|
|
3147
|
-
}
|
|
3148
|
-
const possiblePaths = [
|
|
3149
|
-
join(currentDir, "ast-rules"),
|
|
3150
|
-
// Unbundled: sibling of this file in src/security/
|
|
3151
|
-
join(currentDir, "security", "ast-rules"),
|
|
3152
|
-
// Bundled chunk: dist/security sibling
|
|
3153
|
-
join(dirname(currentDir), "security", "ast-rules")
|
|
3154
|
-
];
|
|
3155
|
-
for (const path of possiblePaths) {
|
|
3156
|
-
if (existsSync(path)) return path;
|
|
3157
|
-
}
|
|
3158
|
-
return join(currentDir, "ast-rules");
|
|
3159
|
-
}
|
|
3160
|
-
function resolveWithinCwd(target) {
|
|
3161
|
-
const resolved = resolve(target);
|
|
3162
|
-
const cwdRoot = resolve(".");
|
|
3163
|
-
if (resolved !== cwdRoot && !resolved.startsWith(cwdRoot + sep)) {
|
|
3164
|
-
return { error: `Path traversal denied: scope must be within ${cwdRoot}` };
|
|
3165
|
-
}
|
|
3166
|
-
return { resolved };
|
|
3167
|
-
}
|
|
3168
|
-
var SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", "dist", ".git"]);
|
|
3169
|
-
var POLYGLOT_EXT_TO_LANG = {
|
|
3170
|
-
".py": "python",
|
|
3171
|
-
".go": "go"
|
|
3172
|
-
};
|
|
3173
|
-
function inferRuleLang(file) {
|
|
3174
|
-
return POLYGLOT_EXT_TO_LANG[extname(file).toLowerCase()] ?? null;
|
|
3175
|
-
}
|
|
3176
|
-
async function findPolyglotFiles(dir, maxDepth) {
|
|
3177
|
-
if (maxDepth <= 0) return [];
|
|
3178
|
-
const out = [];
|
|
3179
|
-
let entries;
|
|
3180
|
-
try {
|
|
3181
|
-
entries = await readdir(dir, { withFileTypes: true });
|
|
3182
|
-
} catch (caught) {
|
|
3183
|
-
const e = caught instanceof Error ? caught : new Error(String(caught));
|
|
3184
|
-
logger4.warn(`ast-rule-runner: skipped unreadable directory ${dir}: ${e.message}`);
|
|
3185
|
-
return out;
|
|
3186
|
-
}
|
|
3187
|
-
for (const entry of entries) {
|
|
3188
|
-
const fullPath = join(dir, entry.name);
|
|
3189
|
-
if (entry.isDirectory() && !SKIP_DIRS.has(entry.name)) {
|
|
3190
|
-
out.push(...await findPolyglotFiles(fullPath, maxDepth - 1));
|
|
3191
|
-
} else if (entry.isFile() && inferRuleLang(entry.name) !== null) {
|
|
3192
|
-
out.push(fullPath);
|
|
3193
|
-
}
|
|
3194
|
-
}
|
|
3195
|
-
return out;
|
|
3196
|
-
}
|
|
3197
|
-
function langToParseArg(lang) {
|
|
3198
|
-
ensurePolyglotLangs();
|
|
3199
|
-
return lang;
|
|
3200
|
-
}
|
|
3201
|
-
function scanFile(src, lang, applicable, budget) {
|
|
3202
|
-
const { rel, limit, alreadyFound } = budget;
|
|
3203
|
-
const root = parse(langToParseArg(lang), src).root();
|
|
3204
|
-
const lines = src.split("\n");
|
|
3205
|
-
const findings = [];
|
|
3206
|
-
let total = 0;
|
|
3207
|
-
for (const rule of applicable) {
|
|
3208
|
-
const config = { rule: rule.rule };
|
|
3209
|
-
for (const node of root.findAll(config)) {
|
|
3210
|
-
total += 1;
|
|
3211
|
-
if (alreadyFound + findings.length < limit) {
|
|
3212
|
-
const { start } = node.range();
|
|
3213
|
-
const rawLine = lines[start.line] ?? node.text();
|
|
3214
|
-
findings.push({
|
|
3215
|
-
ruleId: rule.id,
|
|
3216
|
-
severity: rule.severity,
|
|
3217
|
-
message: rule.message,
|
|
3218
|
-
file: rel,
|
|
3219
|
-
line: start.line + 1,
|
|
3220
|
-
column: start.column + 1,
|
|
3221
|
-
snippet: rawLine.trim().slice(0, MAX_SNIPPET_CHARS)
|
|
3222
|
-
});
|
|
3223
|
-
}
|
|
3224
|
-
}
|
|
3225
|
-
}
|
|
3226
|
-
return { findings, total };
|
|
3227
|
-
}
|
|
3228
|
-
async function assertScanRootIsDirectory(resolved) {
|
|
3229
|
-
let rootStat;
|
|
3230
|
-
try {
|
|
3231
|
-
rootStat = await stat(resolved);
|
|
3232
|
-
} catch (caught) {
|
|
3233
|
-
const e = caught instanceof Error ? caught : new Error(String(caught));
|
|
3234
|
-
throw new ValidationError(`ast-rule-runner: cannot read targetDir ${resolved}: ${e.message}`, {
|
|
3235
|
-
cause: e
|
|
3236
|
-
});
|
|
3237
|
-
}
|
|
3238
|
-
if (!rootStat.isDirectory()) {
|
|
3239
|
-
throw new ValidationError(
|
|
3240
|
-
`ast-rule-runner: targetDir must be a directory, got a non-directory path: ${resolved}`
|
|
3241
|
-
);
|
|
3242
|
-
}
|
|
3243
|
-
}
|
|
3244
|
-
async function resolveScanFiles(root) {
|
|
3245
|
-
const discovered = await findPolyglotFiles(root, AST_QA_MAX_DEPTH);
|
|
3246
|
-
const files = discovered.slice(0, MAX_FILES_SCANNED);
|
|
3247
|
-
const filesSkipped = discovered.length - files.length;
|
|
3248
|
-
const filesTruncated = filesSkipped > 0;
|
|
3249
|
-
if (filesTruncated) {
|
|
3250
|
-
logger4.warn(
|
|
3251
|
-
`ast-rule-runner: ${String(filesSkipped)} file(s) NOT scanned \u2014 file cap ${String(MAX_FILES_SCANNED)} exceeded (discovered=${String(discovered.length)}). Scan is PARTIAL; do not treat findings as exhaustive.`
|
|
3252
|
-
);
|
|
3253
|
-
}
|
|
3254
|
-
return { files, filesSkipped, filesTruncated };
|
|
3255
|
-
}
|
|
3256
|
-
async function collectAstQaFindings(opts) {
|
|
3257
|
-
const guard = resolveWithinCwd(opts.targetDir);
|
|
3258
|
-
if ("error" in guard) {
|
|
3259
|
-
throw new SecurityError(guard.error);
|
|
3260
|
-
}
|
|
3261
|
-
await assertScanRootIsDirectory(guard.resolved);
|
|
3262
|
-
const rulesDir = opts.rulesDir ?? getBuiltInAstRulesPath();
|
|
3263
|
-
const rules = await loadRules(rulesDir);
|
|
3264
|
-
const limit = Math.min(Math.max(opts.limit ?? DEFAULT_AST_QA_LIMIT, 1), MAX_AST_QA_LIMIT);
|
|
3265
|
-
const { files, filesSkipped, filesTruncated } = await resolveScanFiles(guard.resolved);
|
|
3266
|
-
const findings = [];
|
|
3267
|
-
let total = 0;
|
|
3268
|
-
for (const file of files) {
|
|
3269
|
-
const lang = inferRuleLang(file);
|
|
3270
|
-
if (lang === null) continue;
|
|
3271
|
-
const applicable = rules.filter((r) => r.language === lang);
|
|
3272
|
-
if (applicable.length === 0) continue;
|
|
3273
|
-
let src;
|
|
3274
|
-
try {
|
|
3275
|
-
src = await readFile(file, "utf8");
|
|
3276
|
-
} catch {
|
|
3277
|
-
logger4.warn(`ast-rule-runner: skipped unreadable file ${file}`);
|
|
3278
|
-
continue;
|
|
3279
|
-
}
|
|
3280
|
-
const rel = relative(guard.resolved, file) || file;
|
|
3281
|
-
const scanned = scanFile(src, lang, applicable, { rel, limit, alreadyFound: findings.length });
|
|
3282
|
-
findings.push(...scanned.findings);
|
|
3283
|
-
total += scanned.total;
|
|
3284
|
-
}
|
|
3285
|
-
if (total > findings.length) {
|
|
3286
|
-
logger4.warn(
|
|
3287
|
-
`ast-rule-runner: ${String(total - findings.length)} finding(s) omitted beyond limit=${String(limit)} (total=${String(total)})`
|
|
3288
|
-
);
|
|
3289
|
-
}
|
|
3290
|
-
return { findings, total, limit, filesScanned: files.length, filesSkipped, filesTruncated };
|
|
3291
|
-
}
|
|
3292
|
-
async function runAstQaRules(opts) {
|
|
3293
|
-
const { findings } = await collectAstQaFindings(opts);
|
|
3294
|
-
return findings;
|
|
3295
|
-
}
|
|
3296
|
-
|
|
3297
3085
|
// src/orchestration/spec-parser-types.ts
|
|
3298
|
-
import { z as
|
|
3299
|
-
var IssueReferenceSchema =
|
|
3086
|
+
import { z as z8 } from "zod";
|
|
3087
|
+
var IssueReferenceSchema = z8.object({
|
|
3300
3088
|
/** Issue/PR number */
|
|
3301
|
-
number:
|
|
3089
|
+
number: z8.number().int().positive(),
|
|
3302
3090
|
/** Raw text (e.g., "#123") */
|
|
3303
|
-
raw:
|
|
3091
|
+
raw: z8.string()
|
|
3304
3092
|
});
|
|
3305
|
-
var FileReferenceSchema =
|
|
3093
|
+
var FileReferenceSchema = z8.object({
|
|
3306
3094
|
/** File path (e.g., "src/foo.ts") */
|
|
3307
|
-
path:
|
|
3095
|
+
path: z8.string(),
|
|
3308
3096
|
/** Optional line number */
|
|
3309
|
-
line:
|
|
3097
|
+
line: z8.number().int().positive().optional()
|
|
3310
3098
|
});
|
|
3311
|
-
var TechStackSchema =
|
|
3099
|
+
var TechStackSchema = z8.object({
|
|
3312
3100
|
/** Programming language */
|
|
3313
|
-
language:
|
|
3101
|
+
language: z8.string().optional(),
|
|
3314
3102
|
/** Framework or library */
|
|
3315
|
-
framework:
|
|
3103
|
+
framework: z8.string().optional(),
|
|
3316
3104
|
/** Package manager */
|
|
3317
|
-
packageManager:
|
|
3105
|
+
packageManager: z8.string().optional()
|
|
3318
3106
|
});
|
|
3319
|
-
var ParsedSpecSchema =
|
|
3107
|
+
var ParsedSpecSchema = z8.object({
|
|
3320
3108
|
/** Spec title (from first H1 or H2 heading) */
|
|
3321
|
-
title:
|
|
3109
|
+
title: z8.string().min(1),
|
|
3322
3110
|
/** Overview/description text */
|
|
3323
|
-
overview:
|
|
3111
|
+
overview: z8.string(),
|
|
3324
3112
|
/** List of requirements */
|
|
3325
|
-
requirements:
|
|
3113
|
+
requirements: z8.array(z8.string()),
|
|
3326
3114
|
/** Acceptance criteria (checklist items) */
|
|
3327
|
-
acceptanceCriteria:
|
|
3115
|
+
acceptanceCriteria: z8.array(z8.string()),
|
|
3328
3116
|
/** Constraints or limitations */
|
|
3329
|
-
constraints:
|
|
3117
|
+
constraints: z8.array(z8.string()),
|
|
3330
3118
|
/** Issue/PR references found in the spec */
|
|
3331
|
-
issueReferences:
|
|
3119
|
+
issueReferences: z8.array(IssueReferenceSchema),
|
|
3332
3120
|
/** File path references found in the spec */
|
|
3333
|
-
fileReferences:
|
|
3121
|
+
fileReferences: z8.array(FileReferenceSchema),
|
|
3334
3122
|
/** Sections that were missing from the spec */
|
|
3335
|
-
missingSections:
|
|
3123
|
+
missingSections: z8.array(z8.string()),
|
|
3336
3124
|
/** Raw markdown source */
|
|
3337
|
-
rawMarkdown:
|
|
3125
|
+
rawMarkdown: z8.string(),
|
|
3338
3126
|
/** Inferred technology stack */
|
|
3339
3127
|
techStack: TechStackSchema.optional()
|
|
3340
3128
|
});
|
|
@@ -3350,136 +3138,136 @@ var KNOWN_SECTIONS = [
|
|
|
3350
3138
|
];
|
|
3351
3139
|
|
|
3352
3140
|
// src/orchestration/spec-decomposer-types.ts
|
|
3353
|
-
import { z as
|
|
3354
|
-
var SubtaskTypeSchema =
|
|
3355
|
-
var ComplexityLevelSchema =
|
|
3356
|
-
var SubtaskNodeSchema =
|
|
3141
|
+
import { z as z9 } from "zod";
|
|
3142
|
+
var SubtaskTypeSchema = z9.enum(["code", "test", "docs", "config", "refactor"]);
|
|
3143
|
+
var ComplexityLevelSchema = z9.enum(["simple", "moderate", "complex", "expert"]);
|
|
3144
|
+
var SubtaskNodeSchema = z9.object({
|
|
3357
3145
|
/** Unique identifier for this subtask */
|
|
3358
|
-
id:
|
|
3146
|
+
id: z9.string().min(1),
|
|
3359
3147
|
/** Human-readable description of what this subtask does */
|
|
3360
|
-
description:
|
|
3148
|
+
description: z9.string().min(1),
|
|
3361
3149
|
/** The type of work */
|
|
3362
3150
|
type: SubtaskTypeSchema,
|
|
3363
3151
|
/** Estimated complexity */
|
|
3364
3152
|
complexity: ComplexityLevelSchema,
|
|
3365
3153
|
/** Required capabilities for the executing agent */
|
|
3366
|
-
capabilities:
|
|
3154
|
+
capabilities: z9.array(z9.string()),
|
|
3367
3155
|
/** IDs of subtasks this depends on */
|
|
3368
|
-
dependsOn:
|
|
3156
|
+
dependsOn: z9.array(z9.string()),
|
|
3369
3157
|
/** Source requirement text that generated this subtask */
|
|
3370
|
-
sourceRequirement:
|
|
3158
|
+
sourceRequirement: z9.string().optional()
|
|
3371
3159
|
});
|
|
3372
|
-
var DagEdgeSchema =
|
|
3160
|
+
var DagEdgeSchema = z9.object({
|
|
3373
3161
|
/** Source subtask ID */
|
|
3374
|
-
from:
|
|
3162
|
+
from: z9.string().min(1),
|
|
3375
3163
|
/** Target subtask ID */
|
|
3376
|
-
to:
|
|
3164
|
+
to: z9.string().min(1)
|
|
3377
3165
|
});
|
|
3378
|
-
var TaskDagSchema =
|
|
3166
|
+
var TaskDagSchema = z9.object({
|
|
3379
3167
|
/** All subtask nodes */
|
|
3380
|
-
nodes:
|
|
3168
|
+
nodes: z9.array(SubtaskNodeSchema),
|
|
3381
3169
|
/** Dependency edges (from must complete before to) */
|
|
3382
|
-
edges:
|
|
3170
|
+
edges: z9.array(DagEdgeSchema),
|
|
3383
3171
|
/** Subtask IDs that can execute in parallel (no dependencies) */
|
|
3384
|
-
roots:
|
|
3172
|
+
roots: z9.array(z9.string()),
|
|
3385
3173
|
/** Total estimated complexity across all subtasks */
|
|
3386
3174
|
totalComplexity: ComplexityLevelSchema,
|
|
3387
3175
|
/** Source spec title for traceability */
|
|
3388
|
-
specTitle:
|
|
3176
|
+
specTitle: z9.string()
|
|
3389
3177
|
});
|
|
3390
3178
|
|
|
3391
3179
|
// src/orchestration/scenario-validator-types.ts
|
|
3392
|
-
import { z as
|
|
3393
|
-
var CriterionResultSchema =
|
|
3180
|
+
import { z as z10 } from "zod";
|
|
3181
|
+
var CriterionResultSchema = z10.object({
|
|
3394
3182
|
/** The original acceptance criterion text */
|
|
3395
|
-
criterion:
|
|
3183
|
+
criterion: z10.string(),
|
|
3396
3184
|
/** Whether this criterion was satisfied */
|
|
3397
|
-
met:
|
|
3185
|
+
met: z10.boolean(),
|
|
3398
3186
|
/** Which result(s) matched this criterion */
|
|
3399
|
-
matchedResults:
|
|
3187
|
+
matchedResults: z10.array(z10.string())
|
|
3400
3188
|
});
|
|
3401
|
-
var ScenarioResultSchema =
|
|
3189
|
+
var ScenarioResultSchema = z10.object({
|
|
3402
3190
|
/** Satisfaction score from 0 (none met) to 1 (all met) */
|
|
3403
|
-
satisfaction:
|
|
3191
|
+
satisfaction: z10.number().min(0).max(1),
|
|
3404
3192
|
/** Total acceptance criteria count */
|
|
3405
|
-
totalCriteria:
|
|
3193
|
+
totalCriteria: z10.number().int().nonnegative(),
|
|
3406
3194
|
/** Number of criteria met */
|
|
3407
|
-
metCount:
|
|
3195
|
+
metCount: z10.number().int().nonnegative(),
|
|
3408
3196
|
/** Per-criterion results */
|
|
3409
|
-
criteria:
|
|
3197
|
+
criteria: z10.array(CriterionResultSchema),
|
|
3410
3198
|
/** Whether all criteria are met */
|
|
3411
|
-
allMet:
|
|
3199
|
+
allMet: z10.boolean()
|
|
3412
3200
|
});
|
|
3413
3201
|
|
|
3414
3202
|
// src/orchestration/parallel-exploration-types.ts
|
|
3415
|
-
import { z as
|
|
3416
|
-
var ParallelExplorationConfigSchema =
|
|
3203
|
+
import { z as z11 } from "zod";
|
|
3204
|
+
var ParallelExplorationConfigSchema = z11.object({
|
|
3417
3205
|
/** Max CLIs to dispatch to in parallel (default: 3) */
|
|
3418
|
-
maxParallelClis:
|
|
3206
|
+
maxParallelClis: z11.number().int().min(1).max(4).default(3),
|
|
3419
3207
|
/** Timeout per CLI invocation in ms (default: explorationMs from centralized timeouts). */
|
|
3420
|
-
perCliTimeoutMs:
|
|
3208
|
+
perCliTimeoutMs: z11.number().int().min(1e3).max(3e5).default(PER_CLI_TASK_TIMEOUTS.explorationMs),
|
|
3421
3209
|
/** Maximum output chars per CLI response (default: 8000, raised from 4k for exploration depth). */
|
|
3422
|
-
maxOutputCharsPerCli:
|
|
3210
|
+
maxOutputCharsPerCli: z11.number().int().min(100).max(2e4).default(8e3)
|
|
3423
3211
|
});
|
|
3424
3212
|
|
|
3425
3213
|
// src/orchestration/triangulated-review-types.ts
|
|
3426
|
-
import { z as
|
|
3427
|
-
var TriangulatedReviewConfigSchema =
|
|
3214
|
+
import { z as z12 } from "zod";
|
|
3215
|
+
var TriangulatedReviewConfigSchema = z12.object({
|
|
3428
3216
|
/** Max CLIs to dispatch to (default: 3). */
|
|
3429
|
-
maxClis:
|
|
3217
|
+
maxClis: z12.number().int().min(1).max(4).default(3),
|
|
3430
3218
|
/** Per-CLI timeout in ms (default from config/timeouts.ts, Issue #984). */
|
|
3431
|
-
perCliTimeoutMs:
|
|
3219
|
+
perCliTimeoutMs: z12.number().int().min(PER_CLI_TASK_TIMEOUTS.minMs).max(PER_CLI_TASK_TIMEOUTS.maxMs).default(PER_CLI_TASK_TIMEOUTS.defaultMs),
|
|
3432
3220
|
/** Max chars per CLI response (default: 8000). */
|
|
3433
|
-
maxOutputCharsPerCli:
|
|
3221
|
+
maxOutputCharsPerCli: z12.number().int().min(100).max(3e4).default(8e3),
|
|
3434
3222
|
/** Line proximity for dedup: findings within N lines are considered same (default: 5). */
|
|
3435
|
-
lineProximity:
|
|
3223
|
+
lineProximity: z12.number().int().min(0).max(50).default(5)
|
|
3436
3224
|
});
|
|
3437
3225
|
|
|
3438
3226
|
// src/orchestration/triangulated-review.ts
|
|
3439
3227
|
var moduleLogger = createLogger({ component: "triangulated-review" });
|
|
3440
3228
|
|
|
3441
3229
|
// src/orchestration/consensus-plan-types.ts
|
|
3442
|
-
import { z as
|
|
3443
|
-
var PlanStepSchema =
|
|
3230
|
+
import { z as z13 } from "zod";
|
|
3231
|
+
var PlanStepSchema = z13.object({
|
|
3444
3232
|
/** Step description. */
|
|
3445
|
-
description:
|
|
3233
|
+
description: z13.string(),
|
|
3446
3234
|
/** Estimated complexity: low, medium, high. */
|
|
3447
|
-
complexity:
|
|
3235
|
+
complexity: z13.enum(["low", "medium", "high"]).default("medium"),
|
|
3448
3236
|
/** Dependencies on other step indices. */
|
|
3449
|
-
dependencies:
|
|
3237
|
+
dependencies: z13.array(z13.number().int().min(0)).default([])
|
|
3450
3238
|
});
|
|
3451
|
-
var PlanRiskSchema =
|
|
3239
|
+
var PlanRiskSchema = z13.object({
|
|
3452
3240
|
/** Risk description. */
|
|
3453
|
-
description:
|
|
3241
|
+
description: z13.string(),
|
|
3454
3242
|
/** Impact level. */
|
|
3455
|
-
impact:
|
|
3243
|
+
impact: z13.enum(["low", "medium", "high"]).default("medium"),
|
|
3456
3244
|
/** Mitigation strategy. */
|
|
3457
|
-
mitigation:
|
|
3245
|
+
mitigation: z13.string().default("")
|
|
3458
3246
|
});
|
|
3459
|
-
var ConsensusPlanConfigSchema =
|
|
3247
|
+
var ConsensusPlanConfigSchema = z13.object({
|
|
3460
3248
|
/** Max CLIs to dispatch to (default: 3). */
|
|
3461
|
-
maxClis:
|
|
3249
|
+
maxClis: z13.number().int().min(1).max(4).default(3),
|
|
3462
3250
|
/** Per-CLI timeout in ms (default from config/timeouts.ts, Issue #984). */
|
|
3463
|
-
perCliTimeoutMs:
|
|
3251
|
+
perCliTimeoutMs: z13.number().int().min(PER_CLI_TASK_TIMEOUTS.minMs).max(PER_CLI_TASK_TIMEOUTS.maxMs).default(PER_CLI_TASK_TIMEOUTS.defaultMs),
|
|
3464
3252
|
/** Max chars per CLI response (default: 8000). */
|
|
3465
|
-
maxOutputCharsPerCli:
|
|
3253
|
+
maxOutputCharsPerCli: z13.number().int().min(100).max(3e4).default(8e3)
|
|
3466
3254
|
});
|
|
3467
3255
|
|
|
3468
3256
|
// src/orchestration/consensus-plan.ts
|
|
3469
3257
|
var moduleLogger2 = createLogger({ component: "consensus-plan" });
|
|
3470
3258
|
|
|
3471
3259
|
// src/agents/observability/orchestration-observer-types.ts
|
|
3472
|
-
import { z as
|
|
3473
|
-
var AgentStateSchema =
|
|
3474
|
-
var OrchestrationObserverConfigSchema =
|
|
3260
|
+
import { z as z14 } from "zod";
|
|
3261
|
+
var AgentStateSchema = z14.enum(["idle", "thinking", "executing", "waiting", "error"]);
|
|
3262
|
+
var OrchestrationObserverConfigSchema = z14.object({
|
|
3475
3263
|
/** Maximum routing decisions to retain in history */
|
|
3476
|
-
maxRoutingHistory:
|
|
3264
|
+
maxRoutingHistory: z14.number().positive().optional().default(100),
|
|
3477
3265
|
/** Maximum session metrics to retain */
|
|
3478
|
-
maxSessionHistory:
|
|
3266
|
+
maxSessionHistory: z14.number().positive().optional().default(50),
|
|
3479
3267
|
/** Metrics update interval in ms */
|
|
3480
|
-
metricsUpdateIntervalMs:
|
|
3268
|
+
metricsUpdateIntervalMs: z14.number().positive().optional().default(5e3),
|
|
3481
3269
|
/** Enable detailed event logging */
|
|
3482
|
-
verboseLogging:
|
|
3270
|
+
verboseLogging: z14.boolean().optional().default(false),
|
|
3483
3271
|
/**
|
|
3484
3272
|
* Per-model cost rate override, USD per 1,000 tokens (#5180).
|
|
3485
3273
|
*
|
|
@@ -3498,13 +3286,13 @@ var OrchestrationObserverConfigSchema = z15.object({
|
|
|
3498
3286
|
* defect this replaces. An operator who wants the old figures can keep their
|
|
3499
3287
|
* existing scalar config and get byte-identical results.
|
|
3500
3288
|
*/
|
|
3501
|
-
tokenCostRates:
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
input:
|
|
3507
|
-
output:
|
|
3289
|
+
tokenCostRates: z14.record(
|
|
3290
|
+
z14.string(),
|
|
3291
|
+
z14.union([
|
|
3292
|
+
z14.number().nonnegative(),
|
|
3293
|
+
z14.object({
|
|
3294
|
+
input: z14.number().nonnegative(),
|
|
3295
|
+
output: z14.number().nonnegative()
|
|
3508
3296
|
})
|
|
3509
3297
|
])
|
|
3510
3298
|
).optional().default({})
|
|
@@ -3733,7 +3521,7 @@ var DEFAULT_BENCHMARK_CONFIG = {
|
|
|
3733
3521
|
|
|
3734
3522
|
// src/benchmarks/benchmark-runner.ts
|
|
3735
3523
|
import { cpus, totalmem, platform, arch } from "node:os";
|
|
3736
|
-
var
|
|
3524
|
+
var logger4 = createLogger({ component: "benchmark-runner" });
|
|
3737
3525
|
var LatencySampler = class {
|
|
3738
3526
|
samples = [];
|
|
3739
3527
|
startTimes = /* @__PURE__ */ new Map();
|
|
@@ -3829,11 +3617,11 @@ async function runOperationBenchmark(operation, datasetSize, fn, config = {}) {
|
|
|
3829
3617
|
const startTime = getTimeProvider().now();
|
|
3830
3618
|
const startMemory = process.memoryUsage().heapUsed;
|
|
3831
3619
|
let peakMemory = startMemory;
|
|
3832
|
-
|
|
3620
|
+
logger4.debug("Running warmup", { operation, iterations: cfg.warmupIterations });
|
|
3833
3621
|
for (let i = 0; i < cfg.warmupIterations; i++) {
|
|
3834
3622
|
await fn();
|
|
3835
3623
|
}
|
|
3836
|
-
|
|
3624
|
+
logger4.debug("Running measurements", { operation, iterations: cfg.measurementIterations });
|
|
3837
3625
|
for (let i = 0; i < cfg.measurementIterations; i++) {
|
|
3838
3626
|
const id = `op-${String(i)}`;
|
|
3839
3627
|
sampler.start(id);
|
|
@@ -3968,7 +3756,7 @@ ${"=".repeat(60)}`);
|
|
|
3968
3756
|
}
|
|
3969
3757
|
|
|
3970
3758
|
// src/benchmarks/memory-benchmarks.ts
|
|
3971
|
-
var
|
|
3759
|
+
var logger5 = createLogger({ component: "memory-benchmarks" });
|
|
3972
3760
|
var DEFAULT_MEMORY_BENCHMARK_CONFIG = {
|
|
3973
3761
|
...DEFAULT_BENCHMARK_CONFIG,
|
|
3974
3762
|
contentSizeBytes: 1024,
|
|
@@ -4076,9 +3864,9 @@ async function benchmarkPrune(backend, data, config) {
|
|
|
4076
3864
|
async function runMemoryBenchmarks(backend, name, config = {}) {
|
|
4077
3865
|
const cfg = { ...DEFAULT_MEMORY_BENCHMARK_CONFIG, ...config };
|
|
4078
3866
|
const operations = [];
|
|
4079
|
-
|
|
3867
|
+
logger5.info("Starting memory benchmarks", { name, sizes: cfg.datasetSizes });
|
|
4080
3868
|
for (const size of cfg.datasetSizes) {
|
|
4081
|
-
|
|
3869
|
+
logger5.info("Running benchmarks for dataset size", { size });
|
|
4082
3870
|
const data = generateTestData(size, cfg);
|
|
4083
3871
|
try {
|
|
4084
3872
|
const futureDate = new Date(getTimeProvider().now() + 365 * 24 * 60 * 60 * 1e3);
|
|
@@ -4092,7 +3880,7 @@ async function runMemoryBenchmarks(backend, name, config = {}) {
|
|
|
4092
3880
|
}
|
|
4093
3881
|
const environment = getBenchmarkEnvironment();
|
|
4094
3882
|
const summary = createBenchmarkSummary(operations, cfg);
|
|
4095
|
-
|
|
3883
|
+
logger5.info("Benchmarks complete", {
|
|
4096
3884
|
name,
|
|
4097
3885
|
passed: summary.passed,
|
|
4098
3886
|
avgP95: summary.avgP95Latency,
|
|
@@ -4138,7 +3926,7 @@ function compareBenchmarks(baseline, current) {
|
|
|
4138
3926
|
}
|
|
4139
3927
|
|
|
4140
3928
|
// src/benchmarks/token-benchmark.ts
|
|
4141
|
-
var
|
|
3929
|
+
var logger6 = createLogger({ component: "token-benchmark" });
|
|
4142
3930
|
var CHARS_PER_TOKEN = 4;
|
|
4143
3931
|
function estimateTokens2(text) {
|
|
4144
3932
|
return Math.ceil(text.length / CHARS_PER_TOKEN);
|
|
@@ -4156,7 +3944,7 @@ async function runTokenBenchmark(backend, config = {}) {
|
|
|
4156
3944
|
const cfg = { ...DEFAULT_MEMORY_BENCHMARK_CONFIG, ...config };
|
|
4157
3945
|
const results = [];
|
|
4158
3946
|
for (const size of cfg.datasetSizes) {
|
|
4159
|
-
|
|
3947
|
+
logger6.info("Running token benchmark", { size });
|
|
4160
3948
|
const data = generateTestData(size, cfg);
|
|
4161
3949
|
for (const entry of data.entries) {
|
|
4162
3950
|
await backend.store(entry.key, entry.content, {
|
|
@@ -4189,15 +3977,15 @@ async function runTokenBenchmark(backend, config = {}) {
|
|
|
4189
3977
|
}
|
|
4190
3978
|
|
|
4191
3979
|
// src/benchmarks/consolidation-benchmark.ts
|
|
4192
|
-
var
|
|
3980
|
+
var logger7 = createLogger({ component: "consolidation-benchmark" });
|
|
4193
3981
|
async function runConsolidationBenchmark(operations, config = {}) {
|
|
4194
3982
|
const cfg = { ...DEFAULT_MEMORY_BENCHMARK_CONFIG, ...config };
|
|
4195
3983
|
const benchmarks = [];
|
|
4196
|
-
|
|
3984
|
+
logger7.info("Starting consolidation benchmarks", {
|
|
4197
3985
|
operationCount: operations.length
|
|
4198
3986
|
});
|
|
4199
3987
|
for (const op of operations) {
|
|
4200
|
-
|
|
3988
|
+
logger7.info("Benchmarking consolidation operation", { name: op.name });
|
|
4201
3989
|
const benchmark = await runOperationBenchmark(
|
|
4202
3990
|
op.name,
|
|
4203
3991
|
0,
|
|
@@ -4312,7 +4100,7 @@ function formatBenchmarkReport(report) {
|
|
|
4312
4100
|
}
|
|
4313
4101
|
|
|
4314
4102
|
// src/benchmarks/adapter-latency-benchmark.ts
|
|
4315
|
-
var
|
|
4103
|
+
var logger8 = createLogger({ component: "adapter-latency-benchmark" });
|
|
4316
4104
|
var DEFAULT_ADAPTER_LATENCY_CONFIG = {
|
|
4317
4105
|
warmupIterations: 3,
|
|
4318
4106
|
measurementIterations: 10,
|
|
@@ -4362,7 +4150,7 @@ async function benchmarkScenario(adapter, scenario, config) {
|
|
|
4362
4150
|
const errors = [];
|
|
4363
4151
|
let successCount = 0;
|
|
4364
4152
|
let failureCount = 0;
|
|
4365
|
-
|
|
4153
|
+
logger8.info("Benchmarking scenario", {
|
|
4366
4154
|
adapter: adapter.name,
|
|
4367
4155
|
scenario: scenario.name,
|
|
4368
4156
|
warmup: config.warmupIterations,
|
|
@@ -4729,45 +4517,45 @@ function matchesArtifactFilter(artifact, filter) {
|
|
|
4729
4517
|
}
|
|
4730
4518
|
|
|
4731
4519
|
// src/pipeline/trace-schema.ts
|
|
4732
|
-
import { z as
|
|
4733
|
-
var ExecutionTraceEntrySchema =
|
|
4520
|
+
import { z as z15 } from "zod";
|
|
4521
|
+
var ExecutionTraceEntrySchema = z15.object({
|
|
4734
4522
|
/** Unix timestamp (ms). */
|
|
4735
|
-
timestamp:
|
|
4523
|
+
timestamp: z15.number(),
|
|
4736
4524
|
/** Run identifier (typically TaskContract.id). */
|
|
4737
|
-
runId:
|
|
4525
|
+
runId: z15.string().min(1),
|
|
4738
4526
|
/** Pipeline event type that produced this trace entry. */
|
|
4739
|
-
eventType:
|
|
4527
|
+
eventType: z15.string().min(1),
|
|
4740
4528
|
/** Execution ID for pipeline correlation. */
|
|
4741
|
-
executionId:
|
|
4529
|
+
executionId: z15.string().optional(),
|
|
4742
4530
|
/** Graph node or stage that produced this event. */
|
|
4743
|
-
nodeId:
|
|
4531
|
+
nodeId: z15.string().optional(),
|
|
4744
4532
|
/** Agent that executed this step. */
|
|
4745
|
-
agentId:
|
|
4533
|
+
agentId: z15.string().optional(),
|
|
4746
4534
|
/** Model used for this step. */
|
|
4747
|
-
modelId:
|
|
4535
|
+
modelId: z15.string().optional(),
|
|
4748
4536
|
/** Agent role (e.g., code_expert, security_expert). */
|
|
4749
|
-
role:
|
|
4537
|
+
role: z15.string().optional(),
|
|
4750
4538
|
/** Duration in milliseconds. */
|
|
4751
|
-
durationMs:
|
|
4539
|
+
durationMs: z15.number().optional(),
|
|
4752
4540
|
/** Human-readable model selection reasoning. */
|
|
4753
|
-
reasoning:
|
|
4541
|
+
reasoning: z15.string().optional(),
|
|
4754
4542
|
/** Routing decision path (stage:result pairs). */
|
|
4755
|
-
decisionPath:
|
|
4543
|
+
decisionPath: z15.array(z15.string()).optional(),
|
|
4756
4544
|
/** Error classification. */
|
|
4757
|
-
errorTaxonomy:
|
|
4545
|
+
errorTaxonomy: z15.enum(["retriable", "fatal"]).optional(),
|
|
4758
4546
|
/** Error message if this is a failure event. */
|
|
4759
|
-
error:
|
|
4547
|
+
error: z15.string().optional(),
|
|
4760
4548
|
/** Wave number (1-based) for wave dispatch events. */
|
|
4761
|
-
waveNumber:
|
|
4549
|
+
waveNumber: z15.number().optional(),
|
|
4762
4550
|
/** Total waves in the dispatch plan. */
|
|
4763
|
-
totalWaves:
|
|
4551
|
+
totalWaves: z15.number().optional(),
|
|
4764
4552
|
/** Number of workers in this wave. */
|
|
4765
|
-
workerCount:
|
|
4553
|
+
workerCount: z15.number().optional()
|
|
4766
4554
|
});
|
|
4767
4555
|
|
|
4768
4556
|
// src/security/quality-gate-types.ts
|
|
4769
|
-
import { z as
|
|
4770
|
-
var PipelineStageSchema =
|
|
4557
|
+
import { z as z16 } from "zod";
|
|
4558
|
+
var PipelineStageSchema = z16.enum([
|
|
4771
4559
|
"research",
|
|
4772
4560
|
"plan",
|
|
4773
4561
|
"vote",
|
|
@@ -4776,20 +4564,20 @@ var PipelineStageSchema = z17.enum([
|
|
|
4776
4564
|
"qa",
|
|
4777
4565
|
"ship"
|
|
4778
4566
|
]);
|
|
4779
|
-
var GateVerdictSchema =
|
|
4780
|
-
var GateCheckResultSchema =
|
|
4567
|
+
var GateVerdictSchema = z16.enum(["pass", "fail", "skip"]);
|
|
4568
|
+
var GateCheckResultSchema = z16.object({
|
|
4781
4569
|
/** Name of the check (e.g., 'tests_pass', 'lint_clean'). */
|
|
4782
|
-
name:
|
|
4570
|
+
name: z16.string().min(1),
|
|
4783
4571
|
/** Pass/fail/skip verdict. */
|
|
4784
4572
|
verdict: GateVerdictSchema,
|
|
4785
4573
|
/** Human-readable details. */
|
|
4786
|
-
details:
|
|
4574
|
+
details: z16.string().max(500),
|
|
4787
4575
|
/** Duration of the check in ms. */
|
|
4788
|
-
durationMs:
|
|
4576
|
+
durationMs: z16.number().nonnegative().optional()
|
|
4789
4577
|
});
|
|
4790
4578
|
|
|
4791
4579
|
// src/pipeline/quality-pipeline.ts
|
|
4792
|
-
var
|
|
4580
|
+
var logger9 = createLogger({ component: "quality-pipeline" });
|
|
4793
4581
|
|
|
4794
4582
|
// src/pipeline/iterative-consensus.ts
|
|
4795
4583
|
var defaultLogger = createLogger({ component: "iterative-consensus" });
|
|
@@ -4890,7 +4678,7 @@ function buildVotingInput(plan, config) {
|
|
|
4890
4678
|
}
|
|
4891
4679
|
async function executeSingleVote(plan, config, log) {
|
|
4892
4680
|
try {
|
|
4893
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
4681
|
+
const { executeVoting } = await import("./consensus-vote-222ZEN5J.js");
|
|
4894
4682
|
const input = buildVotingInput(plan, config);
|
|
4895
4683
|
const result = await executeVoting(input, log);
|
|
4896
4684
|
return parseVotingResult(result);
|
|
@@ -4923,7 +4711,7 @@ function parseVotingResult(result) {
|
|
|
4923
4711
|
}
|
|
4924
4712
|
|
|
4925
4713
|
// src/replay/replay-executor.ts
|
|
4926
|
-
var
|
|
4714
|
+
var logger10 = createLogger({ component: "ReplayExecutor" });
|
|
4927
4715
|
export {
|
|
4928
4716
|
ALLOWED_COMMANDS,
|
|
4929
4717
|
ARTIFACT_TYPES,
|