@miller-tech/uap 1.222.0 → 2.0.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/README.md +19 -9
- package/config/exl3-profiles/qwen38-27b-exl3.env +68 -0
- package/config/llama-profiles/qwen38-27b-dflash2.env +6 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/benchmarks/paired/adapter.d.ts +15 -0
- package/dist/benchmarks/paired/adapter.d.ts.map +1 -1
- package/dist/benchmarks/paired/adapter.js +22 -1
- package/dist/benchmarks/paired/adapter.js.map +1 -1
- package/dist/bin/cli.js +20 -24
- package/dist/bin/cli.js.map +1 -1
- package/dist/cli/deliver.d.ts +34 -0
- package/dist/cli/deliver.d.ts.map +1 -1
- package/dist/cli/deliver.js +147 -20
- package/dist/cli/deliver.js.map +1 -1
- package/dist/cli/guided-setup.d.ts.map +1 -1
- package/dist/cli/guided-setup.js +15 -0
- package/dist/cli/guided-setup.js.map +1 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +3 -0
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/plan.d.ts.map +1 -1
- package/dist/cli/plan.js +8 -2
- package/dist/cli/plan.js.map +1 -1
- package/dist/cli/policy.d.ts.map +1 -1
- package/dist/cli/policy.js +104 -2
- package/dist/cli/policy.js.map +1 -1
- package/dist/cli/quality.d.ts +11 -0
- package/dist/cli/quality.d.ts.map +1 -0
- package/dist/cli/quality.js +213 -0
- package/dist/cli/quality.js.map +1 -0
- package/dist/cli/wizard-config.d.ts.map +1 -1
- package/dist/cli/wizard-config.js +19 -9
- package/dist/cli/wizard-config.js.map +1 -1
- package/dist/cli/worktree.d.ts.map +1 -1
- package/dist/cli/worktree.js +8 -1
- package/dist/cli/worktree.js.map +1 -1
- package/dist/dashboard/savings.d.ts +1 -4
- package/dist/dashboard/savings.d.ts.map +1 -1
- package/dist/dashboard/savings.js +2 -52
- package/dist/dashboard/savings.js.map +1 -1
- package/dist/delivery/acceptance-judge.d.ts +10 -0
- package/dist/delivery/acceptance-judge.d.ts.map +1 -1
- package/dist/delivery/acceptance-judge.js +45 -3
- package/dist/delivery/acceptance-judge.js.map +1 -1
- package/dist/delivery/agentic-executor.d.ts +12 -1
- package/dist/delivery/agentic-executor.d.ts.map +1 -1
- package/dist/delivery/agentic-executor.js +25 -5
- package/dist/delivery/agentic-executor.js.map +1 -1
- package/dist/delivery/bash-sweep.d.ts +12 -0
- package/dist/delivery/bash-sweep.d.ts.map +1 -1
- package/dist/delivery/bash-sweep.js +8 -1
- package/dist/delivery/bash-sweep.js.map +1 -1
- package/dist/delivery/convergence-loop.d.ts.map +1 -1
- package/dist/delivery/convergence-loop.js +6 -4
- package/dist/delivery/convergence-loop.js.map +1 -1
- package/dist/delivery/execution-gate.d.ts +1 -1
- package/dist/delivery/execution-gate.d.ts.map +1 -1
- package/dist/delivery/execution-gate.js +248 -5
- package/dist/delivery/execution-gate.js.map +1 -1
- package/dist/delivery/snapshot.d.ts +16 -0
- package/dist/delivery/snapshot.d.ts.map +1 -1
- package/dist/delivery/snapshot.js +113 -2
- package/dist/delivery/snapshot.js.map +1 -1
- package/dist/delivery/user-validation.d.ts.map +1 -1
- package/dist/delivery/user-validation.js +55 -10
- package/dist/delivery/user-validation.js.map +1 -1
- package/dist/delivery/verifier-ladder.d.ts +24 -0
- package/dist/delivery/verifier-ladder.d.ts.map +1 -1
- package/dist/delivery/verifier-ladder.js +119 -2
- package/dist/delivery/verifier-ladder.js.map +1 -1
- package/dist/generators/claude-md.js +17 -4
- package/dist/generators/claude-md.js.map +1 -1
- package/dist/policies/liveness.d.ts +105 -0
- package/dist/policies/liveness.d.ts.map +1 -0
- package/dist/policies/liveness.js +251 -0
- package/dist/policies/liveness.js.map +1 -0
- package/dist/policies/policy-memory.d.ts.map +1 -1
- package/dist/policies/policy-memory.js +3 -4
- package/dist/policies/policy-memory.js.map +1 -1
- package/dist/quality/baseline.d.ts +29 -0
- package/dist/quality/baseline.d.ts.map +1 -0
- package/dist/quality/baseline.js +79 -0
- package/dist/quality/baseline.js.map +1 -0
- package/dist/quality/complexity.d.ts +38 -0
- package/dist/quality/complexity.d.ts.map +1 -0
- package/dist/quality/complexity.js +239 -0
- package/dist/quality/complexity.js.map +1 -0
- package/dist/quality/config.d.ts +40 -0
- package/dist/quality/config.d.ts.map +1 -0
- package/dist/quality/config.js +77 -0
- package/dist/quality/config.js.map +1 -0
- package/dist/quality/crap.d.ts +11 -0
- package/dist/quality/crap.d.ts.map +1 -0
- package/dist/quality/crap.js +54 -0
- package/dist/quality/crap.js.map +1 -0
- package/dist/quality/languages.d.ts +25 -0
- package/dist/quality/languages.d.ts.map +1 -0
- package/dist/quality/languages.js +150 -0
- package/dist/quality/languages.js.map +1 -0
- package/dist/quality/report.d.ts +38 -0
- package/dist/quality/report.d.ts.map +1 -0
- package/dist/quality/report.js +251 -0
- package/dist/quality/report.js.map +1 -0
- package/dist/quality/scanner.d.ts +32 -0
- package/dist/quality/scanner.d.ts.map +1 -0
- package/dist/quality/scanner.js +127 -0
- package/dist/quality/scanner.js.map +1 -0
- package/dist/quality/tools.d.ts +28 -0
- package/dist/quality/tools.d.ts.map +1 -0
- package/dist/quality/tools.js +189 -0
- package/dist/quality/tools.js.map +1 -0
- package/dist/types/config.d.ts +148 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +35 -0
- package/dist/types/config.js.map +1 -1
- package/docs/ATTRIBUTION.md +0 -1
- package/docs/INDEX.md +38 -4
- package/docs/analysis/MARKET_POSITION.md +179 -0
- package/docs/architecture/OVERVIEW.md +82 -18
- package/docs/architecture/PROTOCOL.md +1 -1
- package/docs/benchmarks/PAIRED_FINDINGS.md +106 -0
- package/docs/benchmarks/PAIRED_HARNESS.md +16 -0
- package/docs/benchmarks/README.md +59 -0
- package/docs/design/UAP_REACTOR.md +0 -1
- package/docs/getting-started/INSTALLATION.md +1 -1
- package/docs/guides/AUTOMATIC.md +0 -14
- package/docs/guides/AUTOMATIC_FEATURES.md +1 -9
- package/docs/guides/COORDINATION.md +1 -1
- package/docs/guides/DELIVERY_PIPELINE.md +5 -0
- package/docs/guides/DEPLOY_BATCHING.md +1 -1
- package/docs/guides/DROIDS_AND_SKILLS.md +1 -1
- package/docs/guides/LOCAL_MODELS.md +6 -1
- package/docs/guides/MCP_ROUTER.md +1 -1
- package/docs/guides/MEMORY.md +1 -1
- package/docs/guides/MULTI_MODEL.md +1 -1
- package/docs/guides/ORCHESTRATOR.md +1 -1
- package/docs/guides/POLICIES.md +19 -3
- package/docs/guides/QWEN38_EXL3.md +114 -0
- package/docs/guides/WORKTREE_WORKFLOW.md +45 -1
- package/docs/integrations/MCP_ROUTER.md +1 -4
- package/docs/plans/deliver-hardening-plan-2026-07-13.md +173 -0
- package/docs/plans/deliver-hardening-review-response-2026-07-13.md +180 -0
- package/docs/plans/k3-uap-uplift-validation.md +216 -0
- package/docs/plans/qwen38-uap-retest-plan.md +196 -0
- package/docs/reference/API.md +1 -1
- package/docs/reference/CLI.md +49 -14
- package/docs/reference/COMPARISON.md +248 -0
- package/docs/reference/CONFIGURATION.md +1 -3
- package/docs/reference/DATABASE_SCHEMA.md +1 -1
- package/docs/reference/FEATURES.md +3 -3
- package/docs/reference/PATTERNS.md +1 -1
- package/docs/reference/PLATFORMS.md +1 -1
- package/package.json +2 -2
- package/scripts/maintenance/update-skills.py +0 -22
- package/scripts/maintenance/verify-compliance.sh +3 -3
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
- package/src/policies/enforcers/__pycache__/quality_metrics_gate.cpython-312.pyc +0 -0
- package/src/policies/enforcers/adr_guard.py +0 -0
- package/src/policies/enforcers/bearer_lockdown.py +0 -0
- package/src/policies/enforcers/branch_freshness.py +0 -0
- package/src/policies/enforcers/design_token_gate.py +0 -0
- package/src/policies/enforcers/enforcement_self_protect.py +70 -0
- package/src/policies/enforcers/expert_review_required.py +22 -0
- package/src/policies/enforcers/iac_plan_destruction_check.py +0 -0
- package/src/policies/enforcers/quality_metrics_gate.py +447 -0
- package/src/policies/enforcers/ship_loop_gate.py +0 -0
- package/src/policies/enforcers/validate_plan_on_change.py +0 -0
- package/src/policies/enforcers/visual_verification.py +0 -0
- package/src/policies/enforcers/workdir_scope.py +0 -0
- package/src/policies/schemas/policies/expert-review-required.md +9 -1
- package/src/policies/schemas/policies/quality-metrics-gate.md +74 -0
- package/templates/CLAUDE.template.md +1 -1
- package/templates/hooks/__pycache__/deliver_autoroute.cpython-312.pyc +0 -0
- package/templates/hooks/pre-tool-use-bash.sh +50 -3
- package/templates/hooks/pre-tool-use-edit-write.sh +31 -0
- package/templates/hooks/session-start.sh +15 -0
- package/templates/hooks/uap-policy-gate.sh +187 -5
- package/templates/stryker.config.json +14 -0
- package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-312.pyc +0 -0
- package/tools/agents/scripts/anthropic_proxy.py +254 -28
- package/tools/agents/tests/run_acceptance.py +0 -0
- package/tools/agents/tests/test_client_disconnect.py +0 -0
- package/tools/agents/tests/test_cycle_break_exploration.py +0 -0
- package/tools/agents/tests/test_deferral_break.py +0 -0
- package/tools/agents/tests/test_delivery_enforcement_all_langs.py +0 -0
- package/tools/agents/tests/test_delivery_enforcement_exemptions.py +0 -0
- package/tools/agents/tests/test_delivery_enforcement_filepath.py +0 -0
- package/tools/agents/tests/test_delivery_enforcement_web_and_bash.py +0 -0
- package/tools/agents/tests/test_delivery_enforcement_worktree.py +0 -0
- package/tools/agents/tests/test_delivery_enforcement_write_complexity.py +0 -0
- package/tools/agents/tests/test_disconnect_watcher.py +0 -0
- package/tools/agents/tests/test_doubling_break.py +0 -0
- package/tools/agents/tests/test_empty_maxtokens_recovery.py +0 -0
- package/tools/agents/tests/test_empty_tool_loop_break.py +0 -0
- package/tools/agents/tests/test_enforcement_self_protect.py +90 -0
- package/tools/agents/tests/test_enforcer_escape_hatches.py +0 -0
- package/tools/agents/tests/test_error_loop_break.py +0 -0
- package/tools/agents/tests/test_expert_review_pr_scope.py +13 -5
- package/tools/agents/tests/test_fastpath_config.py +0 -0
- package/tools/agents/tests/test_finalize_suppression.py +0 -0
- package/tools/agents/tests/test_gate_evidence.py +0 -0
- package/tools/agents/tests/test_gate_failclosed_indirection.py +0 -0
- package/tools/agents/tests/test_gate_integrity.py +0 -0
- package/tools/agents/tests/test_live_deliver_kill.py +0 -0
- package/tools/agents/tests/test_malformed_unclosed_think.py +0 -0
- package/tools/agents/tests/test_mandate_beats_recon.py +0 -0
- package/tools/agents/tests/test_mandate_deliver.py +0 -0
- package/tools/agents/tests/test_non_stream_resp_log.py +0 -0
- package/tools/agents/tests/test_output_token_ceilings.py +0 -0
- package/tools/agents/tests/test_overflow_truncate_count_tokens.py +0 -0
- package/tools/agents/tests/test_path_containment.py +0 -0
- package/tools/agents/tests/test_path_normalizer_hardened.py +0 -0
- package/tools/agents/tests/test_repeat_call_guard.py +0 -0
- package/tools/agents/tests/test_repeat_guard.py +0 -0
- package/tools/agents/tests/test_session_admission.py +0 -0
- package/tools/agents/tests/test_stream_heartbeat.py +0 -0
- package/tools/agents/tests/test_stream_thinking_deltas.py +405 -0
- package/tools/agents/tests/test_stuck_break_hard.py +0 -0
- package/tools/agents/tests/test_stuck_break_reattach.py +0 -0
- package/tools/agents/tests/test_turn_count_breaker_periodic.py +0 -0
- package/tools/agents/tests/test_upstream_chokepoint.py +0 -0
- package/tools/agents/tests/test_upstream_model_aliases.py +0 -0
- package/tools/agents/tests/test_validate_plan_gate.py +0 -0
- package/tools/agents/tests/test_vision_passthrough.py +0 -0
- package/tools/agents/tests/test_workdir_scope_enforcer.py +0 -0
- package/dist/cli/rtk.d.ts +0 -34
- package/dist/cli/rtk.d.ts.map +0 -1
- package/dist/cli/rtk.js +0 -401
- package/dist/cli/rtk.js.map +0 -1
- package/docs/integrations/RTK.md +0 -113
- package/scripts/setup/install-rtk.sh +0 -184
- package/src/policies/enforcers/rtk_wrap.py +0 -205
- package/src/policies/schemas/policies/rtk-wrap.md +0 -50
- package/tools/agents/tests/test_rtk_wrap.py +0 -151
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File scanner: turns source content into metric violations.
|
|
3
|
+
*
|
|
4
|
+
* Pure (no I/O beyond what callers hand it) so the CLI, the proxy enforcer's
|
|
5
|
+
* TS-side parity tests, and future callers all share one code path. External
|
|
6
|
+
* tool overrides (lizard numbers, jscpd clones, coverage) are merged in by
|
|
7
|
+
* report.ts — this module is the always-available built-in layer.
|
|
8
|
+
*/
|
|
9
|
+
import { extname } from 'path';
|
|
10
|
+
import { languageForFile, stripNoise } from './languages.js';
|
|
11
|
+
import { analyzeComplexity } from './complexity.js';
|
|
12
|
+
/** Explicit any/unknown usage patterns, per language family. Built from
|
|
13
|
+
* strings (not regex literals) on purpose: string contents are stripped
|
|
14
|
+
* before scanning, so this file does not trip the gate over its own
|
|
15
|
+
* patterns. */
|
|
16
|
+
const ANY_PATTERNS = [
|
|
17
|
+
// `: any`, `as any`, `<any>`, `Array<any>`, `Record<string, unknown>`, …
|
|
18
|
+
{
|
|
19
|
+
langs: ['typescript'],
|
|
20
|
+
re: new RegExp(':\\s*any\\b|:\\s*unknown\\b|\\bas\\s+any\\b|<any>|<unknown>|Array<\\s*any\\s*>', 'g'),
|
|
21
|
+
label: 'explicit any/unknown',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
langs: ['javascript'],
|
|
25
|
+
re: new RegExp('/\\*\\s*@type\\s*\\{[^}]*\\b(?:any|unknown)\\b[^}]*\\}\\s*\\*/', 'g'),
|
|
26
|
+
label: 'JSDoc any/unknown',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
langs: ['python'],
|
|
30
|
+
re: new RegExp(':\\s*Any\\b|->\\s*Any\\b|cast\\(\\s*Any\\b', 'g'),
|
|
31
|
+
label: 'typing.Any',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
/** Count explicit any/unknown usages in one file's content. */
|
|
35
|
+
export function countAnyTypes(content, file) {
|
|
36
|
+
const lang = languageForFile(file);
|
|
37
|
+
if (!lang)
|
|
38
|
+
return { count: 0, lines: [] };
|
|
39
|
+
const stripped = stripNoise(content, lang.commentStyle);
|
|
40
|
+
const lines = stripped.split('\n');
|
|
41
|
+
const hits = [];
|
|
42
|
+
for (const pat of ANY_PATTERNS) {
|
|
43
|
+
if (!pat.langs.includes(lang.name))
|
|
44
|
+
continue;
|
|
45
|
+
for (let i = 0; i < lines.length; i++) {
|
|
46
|
+
pat.re.lastIndex = 0;
|
|
47
|
+
let m;
|
|
48
|
+
while ((m = pat.re.exec(lines[i])) !== null) {
|
|
49
|
+
hits.push(i + 1);
|
|
50
|
+
if (m[0].length === 0)
|
|
51
|
+
pat.re.lastIndex++; // safety for zero-width
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return { count: hits.length, lines: [...new Set(hits)].sort((a, b) => a - b) };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Scan one file's content for the always-available metrics:
|
|
59
|
+
* LOC/file, per-function cyclomatic + cognitive complexity, any-types.
|
|
60
|
+
* Halstead/CRAP/coverage/mutation/duplication/dead-code need external data
|
|
61
|
+
* and are merged later by report.ts.
|
|
62
|
+
*/
|
|
63
|
+
export function scanContent(file, content, config) {
|
|
64
|
+
const lang = languageForFile(file);
|
|
65
|
+
if (!lang)
|
|
66
|
+
return [];
|
|
67
|
+
const t = config.thresholds;
|
|
68
|
+
const out = [];
|
|
69
|
+
const { functions, loc } = analyzeComplexity(content, lang);
|
|
70
|
+
if (loc > t.maxLocPerFile) {
|
|
71
|
+
out.push({
|
|
72
|
+
file,
|
|
73
|
+
metric: 'locPerFile',
|
|
74
|
+
value: loc,
|
|
75
|
+
threshold: t.maxLocPerFile,
|
|
76
|
+
signature: `${file}::locPerFile::<file>`,
|
|
77
|
+
message: `${file}: ${loc} LOC exceeds max ${t.maxLocPerFile}`,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
for (const fn of functions) {
|
|
81
|
+
if (fn.cyclomatic > t.maxCyclomatic) {
|
|
82
|
+
out.push({
|
|
83
|
+
file,
|
|
84
|
+
metric: 'cyclomatic',
|
|
85
|
+
value: fn.cyclomatic,
|
|
86
|
+
threshold: t.maxCyclomatic,
|
|
87
|
+
signature: `${file}::cyclomatic::${fn.name}@${fn.line}`,
|
|
88
|
+
message: `${file}:${fn.line} ${fn.name}() cyclomatic ${fn.cyclomatic} exceeds max ${t.maxCyclomatic}`,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (fn.cognitive > t.maxCognitive) {
|
|
92
|
+
out.push({
|
|
93
|
+
file,
|
|
94
|
+
metric: 'cognitive',
|
|
95
|
+
value: fn.cognitive,
|
|
96
|
+
threshold: t.maxCognitive,
|
|
97
|
+
signature: `${file}::cognitive::${fn.name}@${fn.line}`,
|
|
98
|
+
message: `${file}:${fn.line} ${fn.name}() cognitive ${fn.cognitive} exceeds max ${t.maxCognitive}`,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
const anyResult = countAnyTypes(content, file);
|
|
103
|
+
if (anyResult.count > t.maxAnyTypes) {
|
|
104
|
+
out.push({
|
|
105
|
+
file,
|
|
106
|
+
metric: 'anyTypes',
|
|
107
|
+
value: anyResult.count,
|
|
108
|
+
threshold: t.maxAnyTypes,
|
|
109
|
+
signature: `${file}::anyTypes::<file>`,
|
|
110
|
+
message: `${file}: ${anyResult.count} explicit any/unknown usage(s) (lines ${anyResult.lines.slice(0, 8).join(',')}) exceed max ${t.maxAnyTypes}`,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return out;
|
|
114
|
+
}
|
|
115
|
+
/** True when `file` is a scannable source path under the config's rules. */
|
|
116
|
+
export function isScannableSource(file, config) {
|
|
117
|
+
const norm = file.replace(/\\/g, '/');
|
|
118
|
+
const ext = extname(norm).toLowerCase();
|
|
119
|
+
if (!config.sourceExts.includes(ext))
|
|
120
|
+
return false;
|
|
121
|
+
for (const dir of config.excludeDirs) {
|
|
122
|
+
if (norm.includes(`/${dir}/`) || norm.startsWith(`${dir}/`))
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=scanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../src/quality/scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AA8BpD;;;eAGe;AACf,MAAM,YAAY,GAA0D;IAC1E,yEAAyE;IACzE;QACE,KAAK,EAAE,CAAC,YAAY,CAAC;QACrB,EAAE,EAAE,IAAI,MAAM,CAAC,gFAAgF,EAAE,GAAG,CAAC;QACrG,KAAK,EAAE,sBAAsB;KAC9B;IACD;QACE,KAAK,EAAE,CAAC,YAAY,CAAC;QACrB,EAAE,EAAE,IAAI,MAAM,CAAC,gEAAgE,EAAE,GAAG,CAAC;QACrF,KAAK,EAAE,mBAAmB;KAC3B;IACD;QACE,KAAK,EAAE,CAAC,QAAQ,CAAC;QACjB,EAAE,EAAE,IAAI,MAAM,CAAC,4CAA4C,EAAE,GAAG,CAAC;QACjE,KAAK,EAAE,YAAY;KACpB;CACF,CAAC;AAEF,+DAA+D;AAC/D,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,IAAY;IACzD,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IAC1C,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;I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GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;IAC5E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Violation } from './scanner.js';
|
|
2
|
+
import { QualityConfig } from './config.js';
|
|
3
|
+
export declare function toolAvailable(name: string): boolean;
|
|
4
|
+
export interface ToolStatus {
|
|
5
|
+
name: string;
|
|
6
|
+
available: boolean;
|
|
7
|
+
provides: string[];
|
|
8
|
+
}
|
|
9
|
+
/** Probe every optional tool the gate can use. */
|
|
10
|
+
export declare function probeTools(): ToolStatus[];
|
|
11
|
+
/**
|
|
12
|
+
* Run lizard over the given files; returns cyclomatic violations using
|
|
13
|
+
* lizard's authoritative CC numbers. Null when lizard is absent.
|
|
14
|
+
*/
|
|
15
|
+
export declare function lizardViolations(files: string[], root: string, config: QualityConfig): Violation[] | null;
|
|
16
|
+
/**
|
|
17
|
+
* Run rust-code-analysis over the given files; returns cognitive-complexity
|
|
18
|
+
* and Halstead-difficulty violations. Null when the tool is absent.
|
|
19
|
+
*/
|
|
20
|
+
export declare function rcaViolations(files: string[], root: string, config: QualityConfig): Violation[] | null;
|
|
21
|
+
/**
|
|
22
|
+
* Run jscpd duplication detection. Returns one violation per clone pair over
|
|
23
|
+
* the threshold count. Null when jscpd is absent or the run produced no fresh
|
|
24
|
+
* report (a failed/timed-out run must never re-read a STALE report and block
|
|
25
|
+
* on clones that no longer exist).
|
|
26
|
+
*/
|
|
27
|
+
export declare function jscpdViolations(root: string, config: QualityConfig): Violation[] | null;
|
|
28
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/quality/tools.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAqB,MAAM,aAAa,CAAC;AAE/D,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGnD;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,kDAAkD;AAClD,wBAAgB,UAAU,IAAI,UAAU,EAAE,CASzC;AAuDD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,GACpB,SAAS,EAAE,GAAG,IAAI,CAepB;AA8DD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,GACpB,SAAS,EAAE,GAAG,IAAI,CAgBpB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,SAAS,EAAE,GAAG,IAAI,CAoCvF"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External tool adapters. Every adapter follows the same contract:
|
|
3
|
+
* unavailable tool -> null (the metric is SKIPPED with a logged warning),
|
|
4
|
+
* available tool -> authoritative numbers that override the built-in
|
|
5
|
+
* heuristics. Nothing here throws on a missing binary.
|
|
6
|
+
*/
|
|
7
|
+
import { spawnSync } from 'child_process';
|
|
8
|
+
import { existsSync, mkdtempSync, readFileSync, rmSync } from 'fs';
|
|
9
|
+
import { tmpdir } from 'os';
|
|
10
|
+
import { join } from 'path';
|
|
11
|
+
export function toolAvailable(name) {
|
|
12
|
+
const r = spawnSync('which', [name], { encoding: 'utf-8', timeout: 5_000 });
|
|
13
|
+
return r.status === 0;
|
|
14
|
+
}
|
|
15
|
+
/** Probe every optional tool the gate can use. */
|
|
16
|
+
export function probeTools() {
|
|
17
|
+
return [
|
|
18
|
+
{ name: 'lizard', available: toolAvailable('lizard'), provides: ['cyclomatic', 'locPerFile'] },
|
|
19
|
+
{ name: 'rust-code-analysis', available: toolAvailable('rust-code-analysis'), provides: ['cognitive', 'halsteadDifficulty'] },
|
|
20
|
+
{ name: 'jscpd', available: toolAvailable('jscpd'), provides: ['duplicateBlocks'] },
|
|
21
|
+
{ name: 'knip', available: toolAvailable('knip'), provides: ['deadCode'] },
|
|
22
|
+
{ name: 'vulture', available: toolAvailable('vulture'), provides: ['deadCode (python)'] },
|
|
23
|
+
{ name: 'stryker', available: toolAvailable('stryker'), provides: ['survivingMutants'] },
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
function relFromRoot(abs, root) {
|
|
27
|
+
return abs.startsWith(root) ? abs.slice(root.length + 1) : abs;
|
|
28
|
+
}
|
|
29
|
+
function lizardFnViolation(fn, rel, t) {
|
|
30
|
+
if (fn.cyclomatic_complexity <= t.maxCyclomatic)
|
|
31
|
+
return null;
|
|
32
|
+
const name = (fn.long_name ?? fn.name).split('(')[0].trim();
|
|
33
|
+
const line = (fn.start_line ?? 0) + 1;
|
|
34
|
+
return {
|
|
35
|
+
file: rel,
|
|
36
|
+
metric: 'cyclomatic',
|
|
37
|
+
value: fn.cyclomatic_complexity,
|
|
38
|
+
threshold: t.maxCyclomatic,
|
|
39
|
+
signature: `${rel}::cyclomatic::${name}@${line}`,
|
|
40
|
+
message: `${rel}:${line} ${name}() cyclomatic ${fn.cyclomatic_complexity} (lizard) exceeds max ${t.maxCyclomatic}`,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function lizardFileViolations(f, root, t) {
|
|
44
|
+
const rel = relFromRoot(f.filename, root);
|
|
45
|
+
const out = [];
|
|
46
|
+
if (typeof f.nloc === 'number' && f.nloc > t.maxLocPerFile) {
|
|
47
|
+
out.push({
|
|
48
|
+
file: rel,
|
|
49
|
+
metric: 'locPerFile',
|
|
50
|
+
value: f.nloc,
|
|
51
|
+
threshold: t.maxLocPerFile,
|
|
52
|
+
signature: `${rel}::locPerFile::<file>`,
|
|
53
|
+
message: `${rel}: ${f.nloc} NLOC (lizard) exceeds max ${t.maxLocPerFile}`,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
for (const fn of f.function_list ?? []) {
|
|
57
|
+
const v = lizardFnViolation(fn, rel, t);
|
|
58
|
+
if (v)
|
|
59
|
+
out.push(v);
|
|
60
|
+
}
|
|
61
|
+
return out;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Run lizard over the given files; returns cyclomatic violations using
|
|
65
|
+
* lizard's authoritative CC numbers. Null when lizard is absent.
|
|
66
|
+
*/
|
|
67
|
+
export function lizardViolations(files, root, config) {
|
|
68
|
+
if (!toolAvailable('lizard') || files.length === 0)
|
|
69
|
+
return null;
|
|
70
|
+
const r = spawnSync('lizard', ['--json', ...files], {
|
|
71
|
+
cwd: root,
|
|
72
|
+
encoding: 'utf-8',
|
|
73
|
+
timeout: 120_000,
|
|
74
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
75
|
+
});
|
|
76
|
+
if (r.status !== 0 && !r.stdout)
|
|
77
|
+
return null;
|
|
78
|
+
try {
|
|
79
|
+
const filesOut = JSON.parse(r.stdout);
|
|
80
|
+
return filesOut.flatMap((f) => lizardFileViolations(f, root, config.thresholds));
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function* walkRca(unit) {
|
|
87
|
+
yield unit;
|
|
88
|
+
for (const s of unit.spaces ?? [])
|
|
89
|
+
yield* walkRca(s);
|
|
90
|
+
}
|
|
91
|
+
function rcaUnitViolations(unit, rel, t) {
|
|
92
|
+
const out = [];
|
|
93
|
+
const fnName = unit['function-name'] ?? '<unit>';
|
|
94
|
+
const line = (unit['start-line'] ?? 0) + 1;
|
|
95
|
+
const cog = unit.metrics?.cognitive?.sum;
|
|
96
|
+
if (typeof cog === 'number' && cog > t.maxCognitive) {
|
|
97
|
+
out.push({
|
|
98
|
+
file: rel,
|
|
99
|
+
metric: 'cognitive',
|
|
100
|
+
value: Math.round(cog),
|
|
101
|
+
threshold: t.maxCognitive,
|
|
102
|
+
signature: `${rel}::cognitive::${fnName}@${line}`,
|
|
103
|
+
message: `${rel}:${line} ${fnName}() cognitive ${Math.round(cog)} (rust-code-analysis) exceeds max ${t.maxCognitive}`,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
const hd = unit.metrics?.halstead?.difficulty;
|
|
107
|
+
if (typeof hd === 'number' && hd > t.maxHalsteadDifficulty) {
|
|
108
|
+
out.push({
|
|
109
|
+
file: rel,
|
|
110
|
+
metric: 'halsteadDifficulty',
|
|
111
|
+
value: Math.round(hd * 10) / 10,
|
|
112
|
+
threshold: t.maxHalsteadDifficulty,
|
|
113
|
+
signature: `${rel}::halsteadDifficulty::${fnName}@${line}`,
|
|
114
|
+
message: `${rel}:${line} ${fnName}() Halstead difficulty ${hd.toFixed(1)} exceeds max ${t.maxHalsteadDifficulty}`,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return out;
|
|
118
|
+
}
|
|
119
|
+
function rcaFileViolations(f, root, t) {
|
|
120
|
+
const rel = relFromRoot(f['file-name'] ?? '', root);
|
|
121
|
+
return (f.spaces ?? []).flatMap((sp) => [...walkRca(sp)].flatMap((unit) => rcaUnitViolations(unit, rel, t)));
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Run rust-code-analysis over the given files; returns cognitive-complexity
|
|
125
|
+
* and Halstead-difficulty violations. Null when the tool is absent.
|
|
126
|
+
*/
|
|
127
|
+
export function rcaViolations(files, root, config) {
|
|
128
|
+
if (!toolAvailable('rust-code-analysis') || files.length === 0)
|
|
129
|
+
return null;
|
|
130
|
+
const r = spawnSync('rust-code-analysis', ['--metrics', '-O', 'json', '-p', ...files], {
|
|
131
|
+
cwd: root,
|
|
132
|
+
encoding: 'utf-8',
|
|
133
|
+
timeout: 120_000,
|
|
134
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
135
|
+
});
|
|
136
|
+
if (!r.stdout)
|
|
137
|
+
return null;
|
|
138
|
+
try {
|
|
139
|
+
const parsed = JSON.parse(r.stdout);
|
|
140
|
+
const files = Array.isArray(parsed) ? parsed : Object.values(parsed);
|
|
141
|
+
return files.flatMap((f) => rcaFileViolations(f, root, config.thresholds));
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Run jscpd duplication detection. Returns one violation per clone pair over
|
|
149
|
+
* the threshold count. Null when jscpd is absent or the run produced no fresh
|
|
150
|
+
* report (a failed/timed-out run must never re-read a STALE report and block
|
|
151
|
+
* on clones that no longer exist).
|
|
152
|
+
*/
|
|
153
|
+
export function jscpdViolations(root, config) {
|
|
154
|
+
if (!toolAvailable('jscpd'))
|
|
155
|
+
return null;
|
|
156
|
+
// Per-run output dir: a fixed /tmp path collides across concurrent runs and
|
|
157
|
+
// leaks stale results into the next run.
|
|
158
|
+
const outDir = mkdtempSync(join(tmpdir(), 'uap-jscpd-'));
|
|
159
|
+
try {
|
|
160
|
+
// jscpd exits non-zero when clones are found — its exit code is signal,
|
|
161
|
+
// not failure. The report file's existence is what we trust.
|
|
162
|
+
spawnSync('jscpd', [root, '--reporters', 'json', '--output', outDir, '--silent', '--ignore', config.excludeDirs.map((d) => `**/${d}/**`).join(',')], { cwd: root, encoding: 'utf-8', timeout: 180_000, maxBuffer: 64 * 1024 * 1024 });
|
|
163
|
+
const reportPath = join(outDir, 'jscpd-report.json');
|
|
164
|
+
if (!existsSync(reportPath))
|
|
165
|
+
return null;
|
|
166
|
+
const report = JSON.parse(readFileSync(reportPath, 'utf-8'));
|
|
167
|
+
const dups = report.duplicates ?? [];
|
|
168
|
+
if (dups.length <= config.thresholds.maxDuplicateBlocks)
|
|
169
|
+
return [];
|
|
170
|
+
return dups.slice(0, 50).map((d) => {
|
|
171
|
+
const file = (d.firstFile?.name ?? '<unknown>').replace(/\\/g, '/');
|
|
172
|
+
return {
|
|
173
|
+
file,
|
|
174
|
+
metric: 'duplicateBlocks',
|
|
175
|
+
value: dups.length,
|
|
176
|
+
threshold: config.thresholds.maxDuplicateBlocks,
|
|
177
|
+
signature: `${file}::duplicateBlocks::<clone>`,
|
|
178
|
+
message: `${file}: duplicated block (${dups.length} clone(s) exceed max ${config.thresholds.maxDuplicateBlocks})`,
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
finally {
|
|
186
|
+
rmSync(outDir, { recursive: true, force: true });
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/quality/tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAI5B,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5E,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACxB,CAAC;AAQD,kDAAkD;AAClD,MAAM,UAAU,UAAU;IACxB,OAAO;QACL,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,EAAE;QAC9F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C,EAAE,EAAE;YACjC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,IAAI,WAAW,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACpE,OAAO;gBACL,IAAI;gBACJ,MAAM,EAAE,iBAA0B;gBAClC,KAAK,EAAE,IAAI,CAAC,MAAM;gBAClB,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,kBAAkB;gBAC/C,SAAS,EAAE,GAAG,IAAI,4BAA4B;gBAC9C,OAAO,EAAE,GAAG,IAAI,uBAAuB,IAAI,CAAC,MAAM,wBAAwB,MAAM,CAAC,UAAU,CAAC,kBAAkB,GAAG;aAClH,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;AACH,CAAC"}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -963,16 +963,19 @@ export declare const WorktreeSchema: z.ZodObject<{
|
|
|
963
963
|
directory: z.ZodDefault<z.ZodString>;
|
|
964
964
|
branchPrefix: z.ZodDefault<z.ZodString>;
|
|
965
965
|
autoCleanup: z.ZodDefault<z.ZodBoolean>;
|
|
966
|
+
enforce: z.ZodDefault<z.ZodBoolean>;
|
|
966
967
|
}, "strip", z.ZodTypeAny, {
|
|
967
968
|
enabled: boolean;
|
|
968
969
|
directory: string;
|
|
969
970
|
branchPrefix: string;
|
|
970
971
|
autoCleanup: boolean;
|
|
972
|
+
enforce: boolean;
|
|
971
973
|
}, {
|
|
972
974
|
enabled?: boolean | undefined;
|
|
973
975
|
directory?: string | undefined;
|
|
974
976
|
branchPrefix?: string | undefined;
|
|
975
977
|
autoCleanup?: boolean | undefined;
|
|
978
|
+
enforce?: boolean | undefined;
|
|
976
979
|
}>;
|
|
977
980
|
export declare const DroidSchema: z.ZodObject<{
|
|
978
981
|
name: z.ZodString;
|
|
@@ -1768,11 +1771,44 @@ export declare const DeliverySchema: z.ZodObject<{
|
|
|
1768
1771
|
escalateAfterFailures: z.ZodOptional<z.ZodNumber>;
|
|
1769
1772
|
escalateAfterEdits: z.ZodOptional<z.ZodNumber>;
|
|
1770
1773
|
complexEditChars: z.ZodOptional<z.ZodNumber>;
|
|
1774
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1775
|
+
routing: z.ZodOptional<z.ZodString>;
|
|
1776
|
+
criticality: z.ZodOptional<z.ZodEnum<["money", "normal", "sandbox"]>>;
|
|
1777
|
+
gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1778
|
+
id: z.ZodString;
|
|
1779
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1780
|
+
cmd: z.ZodString;
|
|
1781
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1782
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1783
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
1784
|
+
tier: z.ZodOptional<z.ZodEnum<["fast", "runtime", "integration", "deploy-dev", "final", "ci", "deploy-staging", "deploy-prod"]>>;
|
|
1785
|
+
timeoutSec: z.ZodOptional<z.ZodNumber>;
|
|
1786
|
+
}, "strip", z.ZodTypeAny, {
|
|
1787
|
+
id: string;
|
|
1788
|
+
required: boolean;
|
|
1789
|
+
cmd: string;
|
|
1790
|
+
name?: string | undefined;
|
|
1791
|
+
cwd?: string | undefined;
|
|
1792
|
+
scope?: string[] | undefined;
|
|
1793
|
+
tier?: "fast" | "runtime" | "integration" | "deploy-dev" | "final" | "ci" | "deploy-staging" | "deploy-prod" | undefined;
|
|
1794
|
+
timeoutSec?: number | undefined;
|
|
1795
|
+
}, {
|
|
1796
|
+
id: string;
|
|
1797
|
+
cmd: string;
|
|
1798
|
+
name?: string | undefined;
|
|
1799
|
+
required?: boolean | undefined;
|
|
1800
|
+
cwd?: string | undefined;
|
|
1801
|
+
scope?: string[] | undefined;
|
|
1802
|
+
tier?: "fast" | "runtime" | "integration" | "deploy-dev" | "final" | "ci" | "deploy-staging" | "deploy-prod" | undefined;
|
|
1803
|
+
timeoutSec?: number | undefined;
|
|
1804
|
+
}>, "many">>;
|
|
1771
1805
|
}, "strip", z.ZodTypeAny, {
|
|
1772
1806
|
enforcement: "off" | "block" | "advisory" | "escalate";
|
|
1773
1807
|
localMode: "block" | "advisory" | "escalate" | "deliver";
|
|
1774
1808
|
runtimeVerify: boolean;
|
|
1775
1809
|
userValidation: "off" | "block" | "advisory";
|
|
1810
|
+
routing?: string | undefined;
|
|
1811
|
+
model?: string | undefined;
|
|
1776
1812
|
maxRunMinutes?: number | undefined;
|
|
1777
1813
|
dockerFeatureCheck?: boolean | undefined;
|
|
1778
1814
|
trivialEditChars?: number | undefined;
|
|
@@ -1781,7 +1817,20 @@ export declare const DeliverySchema: z.ZodObject<{
|
|
|
1781
1817
|
escalateAfterFailures?: number | undefined;
|
|
1782
1818
|
escalateAfterEdits?: number | undefined;
|
|
1783
1819
|
complexEditChars?: number | undefined;
|
|
1820
|
+
criticality?: "money" | "normal" | "sandbox" | undefined;
|
|
1821
|
+
gates?: {
|
|
1822
|
+
id: string;
|
|
1823
|
+
required: boolean;
|
|
1824
|
+
cmd: string;
|
|
1825
|
+
name?: string | undefined;
|
|
1826
|
+
cwd?: string | undefined;
|
|
1827
|
+
scope?: string[] | undefined;
|
|
1828
|
+
tier?: "fast" | "runtime" | "integration" | "deploy-dev" | "final" | "ci" | "deploy-staging" | "deploy-prod" | undefined;
|
|
1829
|
+
timeoutSec?: number | undefined;
|
|
1830
|
+
}[] | undefined;
|
|
1784
1831
|
}, {
|
|
1832
|
+
routing?: string | undefined;
|
|
1833
|
+
model?: string | undefined;
|
|
1785
1834
|
enforcement?: "off" | "block" | "advisory" | "escalate" | undefined;
|
|
1786
1835
|
localMode?: "block" | "advisory" | "escalate" | "deliver" | undefined;
|
|
1787
1836
|
runtimeVerify?: boolean | undefined;
|
|
@@ -1794,6 +1843,17 @@ export declare const DeliverySchema: z.ZodObject<{
|
|
|
1794
1843
|
escalateAfterFailures?: number | undefined;
|
|
1795
1844
|
escalateAfterEdits?: number | undefined;
|
|
1796
1845
|
complexEditChars?: number | undefined;
|
|
1846
|
+
criticality?: "money" | "normal" | "sandbox" | undefined;
|
|
1847
|
+
gates?: {
|
|
1848
|
+
id: string;
|
|
1849
|
+
cmd: string;
|
|
1850
|
+
name?: string | undefined;
|
|
1851
|
+
required?: boolean | undefined;
|
|
1852
|
+
cwd?: string | undefined;
|
|
1853
|
+
scope?: string[] | undefined;
|
|
1854
|
+
tier?: "fast" | "runtime" | "integration" | "deploy-dev" | "final" | "ci" | "deploy-staging" | "deploy-prod" | undefined;
|
|
1855
|
+
timeoutSec?: number | undefined;
|
|
1856
|
+
}[] | undefined;
|
|
1797
1857
|
}>;
|
|
1798
1858
|
export declare const DesignSchema: z.ZodObject<{
|
|
1799
1859
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2510,16 +2570,19 @@ export declare const AgentContextConfigSchema: z.ZodObject<{
|
|
|
2510
2570
|
directory: z.ZodDefault<z.ZodString>;
|
|
2511
2571
|
branchPrefix: z.ZodDefault<z.ZodString>;
|
|
2512
2572
|
autoCleanup: z.ZodDefault<z.ZodBoolean>;
|
|
2573
|
+
enforce: z.ZodDefault<z.ZodBoolean>;
|
|
2513
2574
|
}, "strip", z.ZodTypeAny, {
|
|
2514
2575
|
enabled: boolean;
|
|
2515
2576
|
directory: string;
|
|
2516
2577
|
branchPrefix: string;
|
|
2517
2578
|
autoCleanup: boolean;
|
|
2579
|
+
enforce: boolean;
|
|
2518
2580
|
}, {
|
|
2519
2581
|
enabled?: boolean | undefined;
|
|
2520
2582
|
directory?: string | undefined;
|
|
2521
2583
|
branchPrefix?: string | undefined;
|
|
2522
2584
|
autoCleanup?: boolean | undefined;
|
|
2585
|
+
enforce?: boolean | undefined;
|
|
2523
2586
|
}>>;
|
|
2524
2587
|
droids: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2525
2588
|
name: z.ZodString;
|
|
@@ -3186,11 +3249,44 @@ export declare const AgentContextConfigSchema: z.ZodObject<{
|
|
|
3186
3249
|
escalateAfterFailures: z.ZodOptional<z.ZodNumber>;
|
|
3187
3250
|
escalateAfterEdits: z.ZodOptional<z.ZodNumber>;
|
|
3188
3251
|
complexEditChars: z.ZodOptional<z.ZodNumber>;
|
|
3252
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3253
|
+
routing: z.ZodOptional<z.ZodString>;
|
|
3254
|
+
criticality: z.ZodOptional<z.ZodEnum<["money", "normal", "sandbox"]>>;
|
|
3255
|
+
gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3256
|
+
id: z.ZodString;
|
|
3257
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3258
|
+
cmd: z.ZodString;
|
|
3259
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
3260
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3261
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
3262
|
+
tier: z.ZodOptional<z.ZodEnum<["fast", "runtime", "integration", "deploy-dev", "final", "ci", "deploy-staging", "deploy-prod"]>>;
|
|
3263
|
+
timeoutSec: z.ZodOptional<z.ZodNumber>;
|
|
3264
|
+
}, "strip", z.ZodTypeAny, {
|
|
3265
|
+
id: string;
|
|
3266
|
+
required: boolean;
|
|
3267
|
+
cmd: string;
|
|
3268
|
+
name?: string | undefined;
|
|
3269
|
+
cwd?: string | undefined;
|
|
3270
|
+
scope?: string[] | undefined;
|
|
3271
|
+
tier?: "fast" | "runtime" | "integration" | "deploy-dev" | "final" | "ci" | "deploy-staging" | "deploy-prod" | undefined;
|
|
3272
|
+
timeoutSec?: number | undefined;
|
|
3273
|
+
}, {
|
|
3274
|
+
id: string;
|
|
3275
|
+
cmd: string;
|
|
3276
|
+
name?: string | undefined;
|
|
3277
|
+
required?: boolean | undefined;
|
|
3278
|
+
cwd?: string | undefined;
|
|
3279
|
+
scope?: string[] | undefined;
|
|
3280
|
+
tier?: "fast" | "runtime" | "integration" | "deploy-dev" | "final" | "ci" | "deploy-staging" | "deploy-prod" | undefined;
|
|
3281
|
+
timeoutSec?: number | undefined;
|
|
3282
|
+
}>, "many">>;
|
|
3189
3283
|
}, "strip", z.ZodTypeAny, {
|
|
3190
3284
|
enforcement: "off" | "block" | "advisory" | "escalate";
|
|
3191
3285
|
localMode: "block" | "advisory" | "escalate" | "deliver";
|
|
3192
3286
|
runtimeVerify: boolean;
|
|
3193
3287
|
userValidation: "off" | "block" | "advisory";
|
|
3288
|
+
routing?: string | undefined;
|
|
3289
|
+
model?: string | undefined;
|
|
3194
3290
|
maxRunMinutes?: number | undefined;
|
|
3195
3291
|
dockerFeatureCheck?: boolean | undefined;
|
|
3196
3292
|
trivialEditChars?: number | undefined;
|
|
@@ -3199,7 +3295,20 @@ export declare const AgentContextConfigSchema: z.ZodObject<{
|
|
|
3199
3295
|
escalateAfterFailures?: number | undefined;
|
|
3200
3296
|
escalateAfterEdits?: number | undefined;
|
|
3201
3297
|
complexEditChars?: number | undefined;
|
|
3298
|
+
criticality?: "money" | "normal" | "sandbox" | undefined;
|
|
3299
|
+
gates?: {
|
|
3300
|
+
id: string;
|
|
3301
|
+
required: boolean;
|
|
3302
|
+
cmd: string;
|
|
3303
|
+
name?: string | undefined;
|
|
3304
|
+
cwd?: string | undefined;
|
|
3305
|
+
scope?: string[] | undefined;
|
|
3306
|
+
tier?: "fast" | "runtime" | "integration" | "deploy-dev" | "final" | "ci" | "deploy-staging" | "deploy-prod" | undefined;
|
|
3307
|
+
timeoutSec?: number | undefined;
|
|
3308
|
+
}[] | undefined;
|
|
3202
3309
|
}, {
|
|
3310
|
+
routing?: string | undefined;
|
|
3311
|
+
model?: string | undefined;
|
|
3203
3312
|
enforcement?: "off" | "block" | "advisory" | "escalate" | undefined;
|
|
3204
3313
|
localMode?: "block" | "advisory" | "escalate" | "deliver" | undefined;
|
|
3205
3314
|
runtimeVerify?: boolean | undefined;
|
|
@@ -3212,6 +3321,17 @@ export declare const AgentContextConfigSchema: z.ZodObject<{
|
|
|
3212
3321
|
escalateAfterFailures?: number | undefined;
|
|
3213
3322
|
escalateAfterEdits?: number | undefined;
|
|
3214
3323
|
complexEditChars?: number | undefined;
|
|
3324
|
+
criticality?: "money" | "normal" | "sandbox" | undefined;
|
|
3325
|
+
gates?: {
|
|
3326
|
+
id: string;
|
|
3327
|
+
cmd: string;
|
|
3328
|
+
name?: string | undefined;
|
|
3329
|
+
required?: boolean | undefined;
|
|
3330
|
+
cwd?: string | undefined;
|
|
3331
|
+
scope?: string[] | undefined;
|
|
3332
|
+
tier?: "fast" | "runtime" | "integration" | "deploy-dev" | "final" | "ci" | "deploy-staging" | "deploy-prod" | undefined;
|
|
3333
|
+
timeoutSec?: number | undefined;
|
|
3334
|
+
}[] | undefined;
|
|
3215
3335
|
}>>;
|
|
3216
3336
|
design: z.ZodOptional<z.ZodObject<{
|
|
3217
3337
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -3452,6 +3572,7 @@ export declare const AgentContextConfigSchema: z.ZodObject<{
|
|
|
3452
3572
|
directory: string;
|
|
3453
3573
|
branchPrefix: string;
|
|
3454
3574
|
autoCleanup: boolean;
|
|
3575
|
+
enforce: boolean;
|
|
3455
3576
|
} | undefined;
|
|
3456
3577
|
droids?: {
|
|
3457
3578
|
name: string;
|
|
@@ -3584,6 +3705,8 @@ export declare const AgentContextConfigSchema: z.ZodObject<{
|
|
|
3584
3705
|
localMode: "block" | "advisory" | "escalate" | "deliver";
|
|
3585
3706
|
runtimeVerify: boolean;
|
|
3586
3707
|
userValidation: "off" | "block" | "advisory";
|
|
3708
|
+
routing?: string | undefined;
|
|
3709
|
+
model?: string | undefined;
|
|
3587
3710
|
maxRunMinutes?: number | undefined;
|
|
3588
3711
|
dockerFeatureCheck?: boolean | undefined;
|
|
3589
3712
|
trivialEditChars?: number | undefined;
|
|
@@ -3592,6 +3715,17 @@ export declare const AgentContextConfigSchema: z.ZodObject<{
|
|
|
3592
3715
|
escalateAfterFailures?: number | undefined;
|
|
3593
3716
|
escalateAfterEdits?: number | undefined;
|
|
3594
3717
|
complexEditChars?: number | undefined;
|
|
3718
|
+
criticality?: "money" | "normal" | "sandbox" | undefined;
|
|
3719
|
+
gates?: {
|
|
3720
|
+
id: string;
|
|
3721
|
+
required: boolean;
|
|
3722
|
+
cmd: string;
|
|
3723
|
+
name?: string | undefined;
|
|
3724
|
+
cwd?: string | undefined;
|
|
3725
|
+
scope?: string[] | undefined;
|
|
3726
|
+
tier?: "fast" | "runtime" | "integration" | "deploy-dev" | "final" | "ci" | "deploy-staging" | "deploy-prod" | undefined;
|
|
3727
|
+
timeoutSec?: number | undefined;
|
|
3728
|
+
}[] | undefined;
|
|
3595
3729
|
} | undefined;
|
|
3596
3730
|
reactor?: {
|
|
3597
3731
|
enabled: boolean;
|
|
@@ -3773,6 +3907,7 @@ export declare const AgentContextConfigSchema: z.ZodObject<{
|
|
|
3773
3907
|
directory?: string | undefined;
|
|
3774
3908
|
branchPrefix?: string | undefined;
|
|
3775
3909
|
autoCleanup?: boolean | undefined;
|
|
3910
|
+
enforce?: boolean | undefined;
|
|
3776
3911
|
} | undefined;
|
|
3777
3912
|
droids?: {
|
|
3778
3913
|
name: string;
|
|
@@ -3901,6 +4036,8 @@ export declare const AgentContextConfigSchema: z.ZodObject<{
|
|
|
3901
4036
|
} | undefined;
|
|
3902
4037
|
} | undefined;
|
|
3903
4038
|
delivery?: {
|
|
4039
|
+
routing?: string | undefined;
|
|
4040
|
+
model?: string | undefined;
|
|
3904
4041
|
enforcement?: "off" | "block" | "advisory" | "escalate" | undefined;
|
|
3905
4042
|
localMode?: "block" | "advisory" | "escalate" | "deliver" | undefined;
|
|
3906
4043
|
runtimeVerify?: boolean | undefined;
|
|
@@ -3913,6 +4050,17 @@ export declare const AgentContextConfigSchema: z.ZodObject<{
|
|
|
3913
4050
|
escalateAfterFailures?: number | undefined;
|
|
3914
4051
|
escalateAfterEdits?: number | undefined;
|
|
3915
4052
|
complexEditChars?: number | undefined;
|
|
4053
|
+
criticality?: "money" | "normal" | "sandbox" | undefined;
|
|
4054
|
+
gates?: {
|
|
4055
|
+
id: string;
|
|
4056
|
+
cmd: string;
|
|
4057
|
+
name?: string | undefined;
|
|
4058
|
+
required?: boolean | undefined;
|
|
4059
|
+
cwd?: string | undefined;
|
|
4060
|
+
scope?: string[] | undefined;
|
|
4061
|
+
tier?: "fast" | "runtime" | "integration" | "deploy-dev" | "final" | "ci" | "deploy-staging" | "deploy-prod" | undefined;
|
|
4062
|
+
timeoutSec?: number | undefined;
|
|
4063
|
+
}[] | undefined;
|
|
3916
4064
|
} | undefined;
|
|
3917
4065
|
reactor?: {
|
|
3918
4066
|
enabled?: boolean | undefined;
|