@llm-dev-ops/agentics-cli 2.7.1 → 2.7.2
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/pipeline/auto-chain.d.ts +28 -2
- package/dist/pipeline/auto-chain.d.ts.map +1 -1
- package/dist/pipeline/auto-chain.js +66 -4
- package/dist/pipeline/auto-chain.js.map +1 -1
- package/dist/pipeline/enterprise/agent-error-capture.d.ts +76 -0
- package/dist/pipeline/enterprise/agent-error-capture.d.ts.map +1 -0
- package/dist/pipeline/enterprise/agent-error-capture.js +141 -0
- package/dist/pipeline/enterprise/agent-error-capture.js.map +1 -0
- package/dist/pipeline/enterprise/pass-executor.d.ts.map +1 -1
- package/dist/pipeline/enterprise/pass-executor.js +52 -0
- package/dist/pipeline/enterprise/pass-executor.js.map +1 -1
- package/dist/pipeline/enterprise/pipeline-orchestrator.d.ts.map +1 -1
- package/dist/pipeline/enterprise/pipeline-orchestrator.js +15 -0
- package/dist/pipeline/enterprise/pipeline-orchestrator.js.map +1 -1
- package/dist/pipeline/enterprise/types.d.ts +21 -0
- package/dist/pipeline/enterprise/types.d.ts.map +1 -1
- package/dist/pipeline/gate/feature-flags.d.ts +30 -0
- package/dist/pipeline/gate/feature-flags.d.ts.map +1 -0
- package/dist/pipeline/gate/feature-flags.js +37 -0
- package/dist/pipeline/gate/feature-flags.js.map +1 -0
- package/dist/pipeline/gate/phase-dependency-gate.d.ts +86 -0
- package/dist/pipeline/gate/phase-dependency-gate.d.ts.map +1 -1
- package/dist/pipeline/gate/phase-dependency-gate.js +263 -41
- package/dist/pipeline/gate/phase-dependency-gate.js.map +1 -1
- package/dist/pipeline/local-fallback/phase1-consensus-reader.d.ts +33 -0
- package/dist/pipeline/local-fallback/phase1-consensus-reader.d.ts.map +1 -0
- package/dist/pipeline/local-fallback/phase1-consensus-reader.js +99 -0
- package/dist/pipeline/local-fallback/phase1-consensus-reader.js.map +1 -0
- package/dist/pipeline/local-fallback/phase3-local-fallback.d.ts +26 -0
- package/dist/pipeline/local-fallback/phase3-local-fallback.d.ts.map +1 -0
- package/dist/pipeline/local-fallback/phase3-local-fallback.js +127 -0
- package/dist/pipeline/local-fallback/phase3-local-fallback.js.map +1 -0
- package/dist/pipeline/local-fallback/phase4-local-fallback.d.ts +21 -0
- package/dist/pipeline/local-fallback/phase4-local-fallback.d.ts.map +1 -0
- package/dist/pipeline/local-fallback/phase4-local-fallback.js +240 -0
- package/dist/pipeline/local-fallback/phase4-local-fallback.js.map +1 -0
- package/dist/pipeline/local-fallback/phase5a-local-fallback.d.ts +28 -0
- package/dist/pipeline/local-fallback/phase5a-local-fallback.d.ts.map +1 -0
- package/dist/pipeline/local-fallback/phase5a-local-fallback.js +166 -0
- package/dist/pipeline/local-fallback/phase5a-local-fallback.js.map +1 -0
- package/dist/pipeline/phases/prompt-generator.d.ts.map +1 -1
- package/dist/pipeline/phases/prompt-generator.js +209 -1
- package/dist/pipeline/phases/prompt-generator.js.map +1 -1
- package/dist/pipeline/ruflo-phase-executor.d.ts +8 -28
- package/dist/pipeline/ruflo-phase-executor.d.ts.map +1 -1
- package/dist/pipeline/ruflo-phase-executor.js +87 -0
- package/dist/pipeline/ruflo-phase-executor.js.map +1 -1
- package/dist/pipeline/swarm-orchestrator.d.ts +47 -0
- package/dist/pipeline/swarm-orchestrator.d.ts.map +1 -1
- package/dist/pipeline/swarm-orchestrator.js +130 -3
- package/dist/pipeline/swarm-orchestrator.js.map +1 -1
- package/package.json +1 -1
|
@@ -21,10 +21,20 @@ export interface AutoChainOptions {
|
|
|
21
21
|
readonly outputDir?: string;
|
|
22
22
|
readonly executionMode?: ExecutionMode;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* ADR-094 Decision 4 — `skipped-due-to-upstream` is a distinct phase-result
|
|
26
|
+
* state from `skipped` (which means "phase opted out") and `failed` (which
|
|
27
|
+
* means "phase ran and errored"). It signals "this phase did not run because
|
|
28
|
+
* an upstream phase was failed/blocked and we propagated", and ensures the
|
|
29
|
+
* `chainResult.phases[]` trace contract holds even when Phase 5 fails before
|
|
30
|
+
* Phase 6 runs. Pre-094 Phase 6 was invisible in the trace on upstream
|
|
31
|
+
* failure; under 094 it is always present with this status.
|
|
32
|
+
*/
|
|
33
|
+
export type PhaseStatus = 'completed' | 'failed' | 'skipped' | 'skipped-due-to-upstream';
|
|
34
|
+
export interface PhaseResult {
|
|
25
35
|
phase: number;
|
|
26
36
|
label: string;
|
|
27
|
-
status:
|
|
37
|
+
status: PhaseStatus;
|
|
28
38
|
timing: number;
|
|
29
39
|
artifacts: string[];
|
|
30
40
|
outputDir: string;
|
|
@@ -409,5 +419,21 @@ export declare function detectProjectLanguage(projectRoot: string, phase1Manifes
|
|
|
409
419
|
* to callers who only see stdout (e.g., Claude Code rendering `agentics ask`).
|
|
410
420
|
*/
|
|
411
421
|
export declare function formatAutoChainForDisplay(result: AutoChainResult): string;
|
|
422
|
+
/**
|
|
423
|
+
* ADR-094 Decision 4 — Phase 6 always emits a phase-result entry. When an
|
|
424
|
+
* upstream phase ends in `failed` or `blocked`, every downstream phase that
|
|
425
|
+
* has not already been pushed gets a `skipped-due-to-upstream` entry. This
|
|
426
|
+
* preserves the `chainResult.phases[]` trace contract: every run produces
|
|
427
|
+
* an entry per phase, regardless of where the chain ended.
|
|
428
|
+
*
|
|
429
|
+
* Mutates `phases` in place. Idempotent — phases already present on the list
|
|
430
|
+
* are not re-pushed. Exported for unit tests; production callers go through
|
|
431
|
+
* the early-return sites in `executeAutoChain`.
|
|
432
|
+
*/
|
|
433
|
+
export declare function pushSkippedDueToUpstream(phases: PhaseResult[], upstream: {
|
|
434
|
+
phase: number;
|
|
435
|
+
label: string;
|
|
436
|
+
reason: string;
|
|
437
|
+
}, runDir: string): void;
|
|
412
438
|
export {};
|
|
413
439
|
//# sourceMappingURL=auto-chain.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-chain.d.ts","sourceRoot":"","sources":["../../src/pipeline/auto-chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAC;AAYhC,OAAO,EAgBL,KAAK,2BAA2B,EAEjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,KAAK,OAAO,IAAI,WAAW,EAE3B,KAAK,YAAY,EAClB,MAAM,iCAAiC,CAAC;AAMzC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAED,
|
|
1
|
+
{"version":3,"file":"auto-chain.d.ts","sourceRoot":"","sources":["../../src/pipeline/auto-chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAC;AAYhC,OAAO,EAgBL,KAAK,2BAA2B,EAEjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,KAAK,OAAO,IAAI,WAAW,EAE3B,KAAK,YAAY,EAClB,MAAM,iCAAiC,CAAC;AAMzC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,yBAAyB,CAAC;AAEzF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,S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BAAsB,CACpC,QAAQ,EAAE,gBAAgB,GACzB;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,IAAI,GAAG;QAAE,MAAM,EAAE,mBAAmB,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CACrF,CASA;AAED,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvC,gBAAgB,CAyBlB;AAwFD;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAwGzE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,WAAW,EAAE,EACrB,QAAQ,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC1D,MAAM,EAAE,MAAM,GACb,IAAI,CA2BN"}
|
|
@@ -2604,6 +2604,8 @@ export async function executeAutoChain(traceId, options = {}) {
|
|
|
2604
2604
|
phases.push({ phase: 2, label: 'Deep Research', status: 'failed', timing: Date.now() - phaseStart, artifacts: [], outputDir: phaseDir, error: errMsg });
|
|
2605
2605
|
copyPlanningArtifacts(runDir, projectRoot);
|
|
2606
2606
|
await ensureAdrsExist(runDir, traceId, scenarioQuery);
|
|
2607
|
+
// ADR-094 Decision 4: emit skipped-due-to-upstream entries for phases 3..6.
|
|
2608
|
+
pushSkippedDueToUpstream(phases, { phase: 2, label: 'Deep Research', reason: errMsg }, runDir);
|
|
2607
2609
|
return buildResult(traceId, runDir, phases, pipelineStart, mode);
|
|
2608
2610
|
}
|
|
2609
2611
|
} // close ADR-PIPELINE-093 phase2 gate-else
|
|
@@ -2718,6 +2720,8 @@ export async function executeAutoChain(traceId, options = {}) {
|
|
|
2718
2720
|
phases.push({ phase: 3, label: 'SPARC + London TDD', status: 'failed', timing: Date.now() - phaseStart, artifacts: [], outputDir: phaseDir, error: errMsg });
|
|
2719
2721
|
copyPlanningArtifacts(runDir, projectRoot);
|
|
2720
2722
|
await ensureAdrsExist(runDir, traceId, scenarioQuery);
|
|
2723
|
+
// ADR-094 Decision 4: emit skipped-due-to-upstream entries for phases 4..6.
|
|
2724
|
+
pushSkippedDueToUpstream(phases, { phase: 3, label: 'SPARC + London TDD', reason: errMsg }, runDir);
|
|
2721
2725
|
return buildResult(traceId, runDir, phases, pipelineStart, mode);
|
|
2722
2726
|
}
|
|
2723
2727
|
}
|
|
@@ -3937,6 +3941,10 @@ services when the pilot validates the approach.
|
|
|
3937
3941
|
const phase5ManifestPath = path.join(phaseDir, 'phase5-manifest.json');
|
|
3938
3942
|
if (!fs.existsSync(phase5ManifestPath)) {
|
|
3939
3943
|
await ensureAdrsExist(runDir, traceId, scenarioQuery);
|
|
3944
|
+
// ADR-094 Decision 4: when Phase 6 cannot attempt degraded mode,
|
|
3945
|
+
// emit skipped-due-to-upstream entry so Phase 6 stays visible in
|
|
3946
|
+
// chainResult.phases — the trace contract that pre-094 dropped.
|
|
3947
|
+
pushSkippedDueToUpstream(phases, { phase: 5, label: 'Build', reason: errMsg }, runDir);
|
|
3940
3948
|
return buildResult(traceId, runDir, phases, pipelineStart, mode);
|
|
3941
3949
|
}
|
|
3942
3950
|
console.error(' [INFO] Phase 5 manifest written — Phase 6 will attempt degraded mode.');
|
|
@@ -4118,7 +4126,8 @@ services when the pilot validates the approach.
|
|
|
4118
4126
|
}
|
|
4119
4127
|
// ── Shutdown swarm and persist metrics ──
|
|
4120
4128
|
const totalTiming = Date.now() - pipelineStart;
|
|
4121
|
-
|
|
4129
|
+
// ADR-094 Decision 4: skipped-due-to-upstream is non-failure for success calc.
|
|
4130
|
+
const pipelineSuccess = phases.every(p => p.status === 'completed' || p.status === 'skipped' || p.status === 'skipped-due-to-upstream');
|
|
4122
4131
|
shutdownSwarm(traceId, pipelineSuccess, totalTiming);
|
|
4123
4132
|
// ── Final Summary ──
|
|
4124
4133
|
const result = buildResult(traceId, runDir, phases, pipelineStart, mode, scenarioBranch, commitHash, execCtx.remoteUrl,
|
|
@@ -4247,7 +4256,12 @@ function printFinalSummary(result) {
|
|
|
4247
4256
|
console.error(' Phase Summary:');
|
|
4248
4257
|
console.error(' ' + '-'.repeat(60));
|
|
4249
4258
|
for (const phase of result.phases) {
|
|
4250
|
-
|
|
4259
|
+
// ADR-094 Decision 4: distinct icon for skipped-due-to-upstream so the
|
|
4260
|
+
// user can see which phases were propagation-skipped vs. opted-out.
|
|
4261
|
+
const icon = phase.status === 'completed' ? '[OK]'
|
|
4262
|
+
: phase.status === 'skipped' ? '[--]'
|
|
4263
|
+
: phase.status === 'skipped-due-to-upstream' ? '[<-]'
|
|
4264
|
+
: '[!!]';
|
|
4251
4265
|
const timingStr = phase.timing > 0 ? `${(phase.timing / 1000).toFixed(1)}s` : 'cached';
|
|
4252
4266
|
const agentStr = phase.agenticsAgents
|
|
4253
4267
|
? ` agents: ${phase.agenticsAgents.responded}/${phase.agenticsAgents.total}`
|
|
@@ -4787,7 +4801,11 @@ export function formatAutoChainForDisplay(result) {
|
|
|
4787
4801
|
lines.push(' Phase Results:');
|
|
4788
4802
|
lines.push(' ' + '-'.repeat(68));
|
|
4789
4803
|
for (const phase of result.phases) {
|
|
4790
|
-
|
|
4804
|
+
// ADR-094 Decision 4: same icon set as printFinalSummary.
|
|
4805
|
+
const icon = phase.status === 'completed' ? '[OK]'
|
|
4806
|
+
: phase.status === 'skipped' ? '[--]'
|
|
4807
|
+
: phase.status === 'skipped-due-to-upstream' ? '[<-]'
|
|
4808
|
+
: '[!!]';
|
|
4791
4809
|
const timingStr = phase.timing > 0 ? `${(phase.timing / 1000).toFixed(1)}s` : 'cached';
|
|
4792
4810
|
lines.push(` ${icon} Phase ${phase.phase}: ${phase.label.padEnd(30)} ${timingStr.padStart(8)} (${phase.artifacts.length} artifacts)`);
|
|
4793
4811
|
if (phase.error) {
|
|
@@ -4848,8 +4866,52 @@ export function formatAutoChainForDisplay(result) {
|
|
|
4848
4866
|
lines.push('');
|
|
4849
4867
|
return lines.join('\n');
|
|
4850
4868
|
}
|
|
4869
|
+
/**
|
|
4870
|
+
* ADR-094 Decision 4 — Phase 6 always emits a phase-result entry. When an
|
|
4871
|
+
* upstream phase ends in `failed` or `blocked`, every downstream phase that
|
|
4872
|
+
* has not already been pushed gets a `skipped-due-to-upstream` entry. This
|
|
4873
|
+
* preserves the `chainResult.phases[]` trace contract: every run produces
|
|
4874
|
+
* an entry per phase, regardless of where the chain ended.
|
|
4875
|
+
*
|
|
4876
|
+
* Mutates `phases` in place. Idempotent — phases already present on the list
|
|
4877
|
+
* are not re-pushed. Exported for unit tests; production callers go through
|
|
4878
|
+
* the early-return sites in `executeAutoChain`.
|
|
4879
|
+
*/
|
|
4880
|
+
export function pushSkippedDueToUpstream(phases, upstream, runDir) {
|
|
4881
|
+
// Phase labels mirror the dispatch sites. Output dirs follow the existing
|
|
4882
|
+
// <runDir>/phaseN convention from auto-chain. Keep the table in this one
|
|
4883
|
+
// place so future phases land here too.
|
|
4884
|
+
const REMAINING = [
|
|
4885
|
+
{ phase: 2, label: 'Deep Research', dir: 'phase2' },
|
|
4886
|
+
{ phase: 3, label: 'SPARC + London TDD', dir: 'phase3' },
|
|
4887
|
+
{ phase: 4, label: 'ADRs + DDDs', dir: 'phase4' },
|
|
4888
|
+
{ phase: 5, label: 'Build', dir: 'phase5' },
|
|
4889
|
+
{ phase: 6, label: 'ERP Surface Push', dir: 'phase6' },
|
|
4890
|
+
];
|
|
4891
|
+
const reasonExcerpt = upstream.reason.length > 200
|
|
4892
|
+
? upstream.reason.slice(0, 200) + '…'
|
|
4893
|
+
: upstream.reason;
|
|
4894
|
+
for (const r of REMAINING) {
|
|
4895
|
+
if (r.phase <= upstream.phase)
|
|
4896
|
+
continue;
|
|
4897
|
+
if (phases.some((ph) => ph.phase === r.phase))
|
|
4898
|
+
continue;
|
|
4899
|
+
phases.push({
|
|
4900
|
+
phase: r.phase,
|
|
4901
|
+
label: r.label,
|
|
4902
|
+
status: 'skipped-due-to-upstream',
|
|
4903
|
+
timing: 0,
|
|
4904
|
+
artifacts: [],
|
|
4905
|
+
outputDir: path.join(runDir, r.dir),
|
|
4906
|
+
error: `Upstream phase ${upstream.phase} (${upstream.label}) failed: ${reasonExcerpt}`,
|
|
4907
|
+
});
|
|
4908
|
+
}
|
|
4909
|
+
}
|
|
4851
4910
|
function buildResult(traceId, runDir, phases, startTime, executionMode = 'development', scenarioBranch, commitHash, remoteUrl, blockedPhases) {
|
|
4852
|
-
|
|
4911
|
+
// ADR-094 Decision 4: `skipped-due-to-upstream` is treated like `skipped`
|
|
4912
|
+
// for the success check — it is not a failure of THIS phase, just a
|
|
4913
|
+
// propagation marker. `failed` remains the only status that flips success.
|
|
4914
|
+
const success = phases.every((p) => p.status === 'completed' || p.status === 'skipped' || p.status === 'skipped-due-to-upstream');
|
|
4853
4915
|
// Build GitHub URL if we have a remote and a branch
|
|
4854
4916
|
let githubUrl;
|
|
4855
4917
|
if (remoteUrl && scenarioBranch) {
|