substrate-ai 0.21.17 → 0.21.19
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/cli/index.js +78 -15
- package/dist/{health-CI8pIygU.js → health-CzbtBIx0.js} +2 -2
- package/dist/{health-C1m6-7WH.js → health-Dn_4DY__.js} +2 -2
- package/dist/index.d.ts +33 -1
- package/dist/{interactive-prompt-BWdH9Lb9.js → interactive-prompt-DVX_J6Mp.js} +2 -2
- package/dist/{manifest-read-3cF8yP3_.js → manifest-read-B80k9pb_.js} +40 -4
- package/dist/modules/interactive-prompt/index.js +2 -2
- package/dist/{run-AKetuV82.js → run-BYySwmdu.js} +737 -553
- package/dist/{run-CvP_sgQ4.js → run-In1WjgGG.js} +4 -4
- package/package.json +1 -1
- package/packs/bmad/prompts/ux-step-3-journeys.md +18 -6
package/dist/cli/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-
|
|
2
|
+
import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-CzbtBIx0.js";
|
|
3
3
|
import { createLogger } from "../logger-KeHncl-f.js";
|
|
4
4
|
import { createEventBus } from "../helpers-CElYrONe.js";
|
|
5
5
|
import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createGitWorktreeManager, createPipelineRun, createStderrLogger, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-BZGqn-XQ.js";
|
|
6
6
|
import "../adapter-registry-DXLMTmfD.js";
|
|
7
|
-
import { ACCEPTANCE_CONTRACT_PROFILE_PATH, JOURNEY_CANDIDATE_PATH, JOURNEY_DEFERRALS_PATH, JOURNEY_REGISTRY_PATH, RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, checkRegistryStaleness, clearGateDemotion, computePrecision, computeRecall, demoteGate, diffJourneySets, isProjectContainedPath, loadAcceptanceContractFromTrustedTree, loadJourneyRegistryFromFile, loadJourneyRegistryFromTrustedTree, parseAcceptanceContract, parseJourneyCandidate, parseJourneyDeferrals, parseJourneyRegistry, parseRuntimeProbes, ratifyCandidate, readAcceptanceMetrics, readCurrentRunId, readGateState, readTrustedFileContent, recordCanary, recordOverride, renderRegistryDiff, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck, runCanary } from "../manifest-read-
|
|
8
|
-
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-
|
|
7
|
+
import { ACCEPTANCE_CONTRACT_PROFILE_PATH, JOURNEY_CANDIDATE_PATH, JOURNEY_DEFERRALS_PATH, JOURNEY_REGISTRY_PATH, RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, checkRegistryStaleness, clearGateDemotion, computePrecision, computeRecall, demoteGate, diffJourneySets, isProjectContainedPath, loadAcceptanceContractFromTrustedTree, loadJourneyRegistryFromFile, loadJourneyRegistryFromTrustedTree, parseAcceptanceContract, parseJourneyCandidate, parseJourneyDeferrals, parseJourneyRegistry, parseRuntimeProbes, ratifyCandidate, readAcceptanceMetrics, readCurrentRunId, readGateState, readTrustedFileContent, recordCanary, recordOverride, renderRegistryDiff, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck, runCanary } from "../manifest-read-B80k9pb_.js";
|
|
8
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-BYySwmdu.js";
|
|
9
9
|
import "../errors-xSeGw6pf.js";
|
|
10
10
|
import { AcceptanceCompletenessResultSchema, AcceptanceDeriveResultSchema, assemblePrompt, getTokenCeiling, runAcceptanceJudge } from "../acceptance-judge-COyOxhQ2.js";
|
|
11
11
|
import "../routing-DZT5PN3N.js";
|
|
12
12
|
import { WorkGraphRepository } from "../work-graph-repository-4cKsf8Lf.js";
|
|
13
13
|
import "../decisions-BAaxpVD0.js";
|
|
14
14
|
import "../decision-router-Dyby0fUf.js";
|
|
15
|
-
import "../interactive-prompt-
|
|
15
|
+
import "../interactive-prompt-DVX_J6Mp.js";
|
|
16
16
|
import "../recovery-engine-dtLHyV4M.js";
|
|
17
17
|
import "../version-manager-impl-DMTw551Q.js";
|
|
18
18
|
import { registerUpgradeCommand } from "../upgrade-CNGc12AV.js";
|
|
@@ -6667,7 +6667,8 @@ async function runFullPipelineFromPhase(options) {
|
|
|
6667
6667
|
pack,
|
|
6668
6668
|
contextCompiler,
|
|
6669
6669
|
dispatcher,
|
|
6670
|
-
agentId
|
|
6670
|
+
agentId,
|
|
6671
|
+
eventBus
|
|
6671
6672
|
};
|
|
6672
6673
|
const agentAdapter = agentId != null ? injectedRegistry.get(agentId) : void 0;
|
|
6673
6674
|
const adapterDefaultCycles = agentAdapter?.getCapabilities?.()?.defaultMaxReviewCycles;
|
|
@@ -7137,7 +7138,7 @@ async function runStatusAction(options) {
|
|
|
7137
7138
|
logger$17.debug({ err }, "Work graph query failed, continuing without work graph data");
|
|
7138
7139
|
}
|
|
7139
7140
|
if (run === void 0) {
|
|
7140
|
-
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-
|
|
7141
|
+
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-Dn_4DY__.js");
|
|
7141
7142
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
7142
7143
|
const processInfo = inspectProcessTree$1({
|
|
7143
7144
|
projectRoot,
|
|
@@ -7779,7 +7780,8 @@ async function runAmendAction(options) {
|
|
|
7779
7780
|
pack,
|
|
7780
7781
|
contextCompiler,
|
|
7781
7782
|
dispatcher,
|
|
7782
|
-
agentId
|
|
7783
|
+
agentId,
|
|
7784
|
+
eventBus
|
|
7783
7785
|
};
|
|
7784
7786
|
const phaseOrder = [
|
|
7785
7787
|
"analysis",
|
|
@@ -8666,7 +8668,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
8666
8668
|
await initSchema(expAdapter);
|
|
8667
8669
|
const { runRunAction: runPipeline } = await import(
|
|
8668
8670
|
/* @vite-ignore */
|
|
8669
|
-
"../run-
|
|
8671
|
+
"../run-In1WjgGG.js"
|
|
8670
8672
|
);
|
|
8671
8673
|
const runStoryFn = async (opts) => {
|
|
8672
8674
|
const exitCode = await runPipeline({
|
|
@@ -13601,6 +13603,37 @@ async function runAcceptanceDerive(deps, params) {
|
|
|
13601
13603
|
//#region src/modules/compiled-workflows/acceptance-completeness.ts
|
|
13602
13604
|
const logger$1 = createLogger("compiled-workflows:acceptance-completeness");
|
|
13603
13605
|
const SOURCE_CONTENT_CAP = 12e4;
|
|
13606
|
+
/**
|
|
13607
|
+
* Generic actor/domain words that appear across nearly every journey title —
|
|
13608
|
+
* excluded from the F2 registered-disposition cross-check so a shared
|
|
13609
|
+
* "operator"/"user" doesn't let an unrelated id launder a journey.
|
|
13610
|
+
*/
|
|
13611
|
+
const GENERIC_JOURNEY_TOKENS = new Set([
|
|
13612
|
+
"operator",
|
|
13613
|
+
"user",
|
|
13614
|
+
"users",
|
|
13615
|
+
"system",
|
|
13616
|
+
"admin",
|
|
13617
|
+
"customer",
|
|
13618
|
+
"client",
|
|
13619
|
+
"receives",
|
|
13620
|
+
"receive",
|
|
13621
|
+
"views",
|
|
13622
|
+
"view",
|
|
13623
|
+
"gets",
|
|
13624
|
+
"sees",
|
|
13625
|
+
"runs",
|
|
13626
|
+
"uses",
|
|
13627
|
+
"page",
|
|
13628
|
+
"data",
|
|
13629
|
+
"their",
|
|
13630
|
+
"them",
|
|
13631
|
+
"from",
|
|
13632
|
+
"with",
|
|
13633
|
+
"into",
|
|
13634
|
+
"when",
|
|
13635
|
+
"then"
|
|
13636
|
+
]);
|
|
13604
13637
|
function normalizeForGrounding(s) {
|
|
13605
13638
|
return s.replace(/\s+/g, " ").trim().toLowerCase();
|
|
13606
13639
|
}
|
|
@@ -13613,23 +13646,48 @@ function normalizeForGrounding(s) {
|
|
|
13613
13646
|
* 120k-char document ground trivially, fabrications don't)
|
|
13614
13647
|
*/
|
|
13615
13648
|
function validateCompletenessClaims(claims, registry, prdContent) {
|
|
13616
|
-
const
|
|
13649
|
+
const registeredById = new Map(registry.journeys.map((j) => [j.id, j]));
|
|
13617
13650
|
const excluded = new Set((registry.provenance?.excluded ?? []).map((e) => e.candidate));
|
|
13618
|
-
const haystack =
|
|
13651
|
+
const haystack = normalizeForGrounding(prdContent);
|
|
13619
13652
|
for (const claim of claims) {
|
|
13653
|
+
let citedJourneyTitle;
|
|
13620
13654
|
if (claim.disposition === "registered") {
|
|
13621
|
-
|
|
13655
|
+
const journey = claim.registry_ref !== void 0 ? registeredById.get(claim.registry_ref) : void 0;
|
|
13656
|
+
if (journey === void 0) return `claim "${claim.description}" says registered but cites no real registry id (got ${JSON.stringify(claim.registry_ref)})`;
|
|
13657
|
+
citedJourneyTitle = journey.title;
|
|
13622
13658
|
}
|
|
13623
13659
|
if (claim.disposition === "excluded") {
|
|
13624
13660
|
if (claim.registry_ref === void 0 || !excluded.has(claim.registry_ref)) return `claim "${claim.description}" says excluded but cites no real exclusion candidate (got ${JSON.stringify(claim.registry_ref)})`;
|
|
13625
13661
|
}
|
|
13626
|
-
const
|
|
13627
|
-
|
|
13628
|
-
|
|
13629
|
-
|
|
13662
|
+
const normSpan = normalizeForGrounding(claim.prd_span);
|
|
13663
|
+
const spanTokens = normSpan.split(" ").map((t) => t.replace(/[^a-z0-9]/g, "")).filter((t) => t.length >= 3);
|
|
13664
|
+
if (spanTokens.length < 3) return `claim "${claim.description}" cites too thin a prd_span ("${claim.prd_span}") — quote a substantive span (a full phrase) of the document`;
|
|
13665
|
+
const present = spanTokens.filter((t) => haystack.includes(t)).length;
|
|
13666
|
+
if (present / spanTokens.length < .6) return `claim "${claim.description}" prd_span does not appear in the document (only ${String(present)}/${String(spanTokens.length)} tokens present — fabricated citation?)`;
|
|
13667
|
+
if (!hasContiguousAnchor(spanTokens, haystack)) return `claim "${claim.description}" prd_span has no contiguous fragment in the document ("${claim.prd_span.slice(0, 80)}…" — assembled from scattered words rather than quoted?)`;
|
|
13668
|
+
if (citedJourneyTitle !== void 0) {
|
|
13669
|
+
const alnum = (s) => normalizeForGrounding(s).split(" ").map((t) => t.replace(/[^a-z0-9]/g, "")).filter((t) => t.length >= 4);
|
|
13670
|
+
const titleTokens = new Set(alnum(citedJourneyTitle).filter((t) => !GENERIC_JOURNEY_TOKENS.has(t)));
|
|
13671
|
+
const claimTokens = new Set([...alnum(claim.description), ...alnum(claim.prd_span)]);
|
|
13672
|
+
const overlaps = [...titleTokens].some((t) => claimTokens.has(t));
|
|
13673
|
+
if (titleTokens.size > 0 && !overlaps) return `claim "${claim.description}" is marked registered→${claim.registry_ref ?? ""} but shares no distinctive language with that journey's title ("${citedJourneyTitle}") — a registered disposition must be about the journey it cites (possible undispositioned-suppression)`;
|
|
13674
|
+
}
|
|
13630
13675
|
}
|
|
13631
13676
|
return void 0;
|
|
13632
13677
|
}
|
|
13678
|
+
/**
|
|
13679
|
+
* Anti-fabrication anchor (RP5.1 F4, corpus-calibrated): at least ONE
|
|
13680
|
+
* contiguous 3-token run of the span must appear in the document. A real
|
|
13681
|
+
* quote/near-quote always retains some intact fragment; F4's attack (a span
|
|
13682
|
+
* assembled from individually-common words) has none. Deliberately lenient —
|
|
13683
|
+
* a single 3-gram, not a majority contiguous run — because the checker's
|
|
13684
|
+
* findings are advisory and false positives burn operator trust (F7).
|
|
13685
|
+
*/
|
|
13686
|
+
function hasContiguousAnchor(spanTokens, haystack) {
|
|
13687
|
+
if (spanTokens.length < 3) return false;
|
|
13688
|
+
for (let i = 0; i + 3 <= spanTokens.length; i++) if (haystack.includes(spanTokens.slice(i, i + 3).join(" "))) return true;
|
|
13689
|
+
return false;
|
|
13690
|
+
}
|
|
13633
13691
|
function renderRegistryForPrompt(registry) {
|
|
13634
13692
|
const journeys = registry.journeys.map((j) => `- id: ${j.id}\n title: ${j.title}\n criticality: ${j.criticality}`).join("\n");
|
|
13635
13693
|
const excluded = (registry.provenance?.excluded ?? []).map((e) => `- candidate: ${e.candidate}\n reason: ${e.reason}`).join("\n");
|
|
@@ -14245,6 +14303,11 @@ function registerAcceptanceCommand(program, version, registry) {
|
|
|
14245
14303
|
} catch {
|
|
14246
14304
|
existingRegistry = void 0;
|
|
14247
14305
|
}
|
|
14306
|
+
if (!isProjectContainedPath(candidate.derived_from)) {
|
|
14307
|
+
process.stdout.write(`acceptance ratify: candidate derived_from "${candidate.derived_from}" resolves outside the project — refusing to ratify\n`);
|
|
14308
|
+
process.exit(ACCEPTANCE_EXIT_ERROR);
|
|
14309
|
+
return;
|
|
14310
|
+
}
|
|
14248
14311
|
let sourceContent;
|
|
14249
14312
|
try {
|
|
14250
14313
|
sourceContent = await readFile$1(join$1(projectRoot, candidate.derived_from), "utf-8");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
2
|
import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-BZGqn-XQ.js";
|
|
3
|
-
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-
|
|
3
|
+
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-B80k9pb_.js";
|
|
4
4
|
import { createRequire } from "module";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1000,4 +1000,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
|
|
|
1000
1000
|
|
|
1001
1001
|
//#endregion
|
|
1002
1002
|
export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, runHealthAction, validateStoryKey };
|
|
1003
|
-
//# sourceMappingURL=health-
|
|
1003
|
+
//# sourceMappingURL=health-CzbtBIx0.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-
|
|
1
|
+
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-CzbtBIx0.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./dist-BZGqn-XQ.js";
|
|
4
|
-
import "./manifest-read-
|
|
4
|
+
import "./manifest-read-B80k9pb_.js";
|
|
5
5
|
import "./work-graph-repository-4cKsf8Lf.js";
|
|
6
6
|
import "./decisions-BAaxpVD0.js";
|
|
7
7
|
|
package/dist/index.d.ts
CHANGED
|
@@ -260,6 +260,23 @@ interface AcceptanceVerdictEvent {
|
|
|
260
260
|
excerpt: string;
|
|
261
261
|
}[];
|
|
262
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* RP4.2 (registry-provenance): a journey-registry CANDIDATE was synthesized
|
|
265
|
+
* at solutioning close from the UX phase's structured journeys. The
|
|
266
|
+
* candidate is NOT authoritative and the gate ignores it — ratification
|
|
267
|
+
* (`substrate acceptance ratify`) is a manual operator action, always.
|
|
268
|
+
* `undispositioned` carries the RP3.1 pre-pass result when a ratified
|
|
269
|
+
* registry already exists.
|
|
270
|
+
*/
|
|
271
|
+
interface AcceptanceDerivedEvent {
|
|
272
|
+
type: 'acceptance:derived';
|
|
273
|
+
ts: string;
|
|
274
|
+
candidate_path: string;
|
|
275
|
+
journey_count: number;
|
|
276
|
+
critical_count: number;
|
|
277
|
+
source_sha256: string;
|
|
278
|
+
undispositioned: string[];
|
|
279
|
+
}
|
|
263
280
|
/**
|
|
264
281
|
* RP2.1 (registry-provenance): the registry's provenance `derived_from`
|
|
265
282
|
* source no longer hashes to the recorded ratification baseline (`stale`),
|
|
@@ -923,7 +940,7 @@ interface PipelineMergeConflictDetectedEvent {
|
|
|
923
940
|
* }
|
|
924
941
|
* ```
|
|
925
942
|
*/
|
|
926
|
-
type PipelineEvent = PipelineStartEvent | PipelineCompleteEvent | PipelinePreFlightFailureEvent | PipelineProfileStaleEvent | PipelineContractMismatchEvent | PipelineContractVerificationSummaryEvent | StoryPhaseEvent | StoryDoneEvent | StoryCommittedEvent | StoryMergedEvent | StoryFinalizedEvent | AcceptanceCoverageEvent | AcceptanceStartedEvent | AcceptanceRenderedEvent | AcceptanceVerdictEvent | AcceptanceCanaryEvent | AcceptanceRegistryStaleEvent | StoryEscalationEvent | StoryWarnEvent | StoryLogEvent | PipelineHeartbeatEvent | StoryStallEvent | StoryZeroDiffEscalationEvent | StoryBuildVerificationFailedEvent | StoryBuildVerificationPassedEvent | StoryInterfaceChangeWarningEvent | StoryMetricsEvent | SupervisorPollEvent | SupervisorKillEvent | SupervisorRestartEvent | SupervisorAbortEvent | SupervisorSummaryEvent | SupervisorAnalysisCompleteEvent | SupervisorAnalysisErrorEvent | SupervisorExperimentStartEvent | SupervisorExperimentSkipEvent | SupervisorExperimentRecommendationsEvent | SupervisorExperimentCompleteEvent | SupervisorExperimentErrorEvent | RoutingModelSelectedEvent | PipelinePhaseStartEvent | PipelinePhaseCompleteEvent | StoryAutoApprovedEvent | VerificationCheckCompleteEvent | VerificationStoryCompleteEvent | CostWarningEvent | CostCeilingReachedEvent | DecisionHaltSkippedNonInteractiveEvent | PipelineMergeConflictDetectedEvent; //#endregion
|
|
943
|
+
type PipelineEvent = PipelineStartEvent | PipelineCompleteEvent | PipelinePreFlightFailureEvent | PipelineProfileStaleEvent | PipelineContractMismatchEvent | PipelineContractVerificationSummaryEvent | StoryPhaseEvent | StoryDoneEvent | StoryCommittedEvent | StoryMergedEvent | StoryFinalizedEvent | AcceptanceCoverageEvent | AcceptanceStartedEvent | AcceptanceRenderedEvent | AcceptanceVerdictEvent | AcceptanceCanaryEvent | AcceptanceRegistryStaleEvent | AcceptanceDerivedEvent | StoryEscalationEvent | StoryWarnEvent | StoryLogEvent | PipelineHeartbeatEvent | StoryStallEvent | StoryZeroDiffEscalationEvent | StoryBuildVerificationFailedEvent | StoryBuildVerificationPassedEvent | StoryInterfaceChangeWarningEvent | StoryMetricsEvent | SupervisorPollEvent | SupervisorKillEvent | SupervisorRestartEvent | SupervisorAbortEvent | SupervisorSummaryEvent | SupervisorAnalysisCompleteEvent | SupervisorAnalysisErrorEvent | SupervisorExperimentStartEvent | SupervisorExperimentSkipEvent | SupervisorExperimentRecommendationsEvent | SupervisorExperimentCompleteEvent | SupervisorExperimentErrorEvent | RoutingModelSelectedEvent | PipelinePhaseStartEvent | PipelinePhaseCompleteEvent | StoryAutoApprovedEvent | VerificationCheckCompleteEvent | VerificationStoryCompleteEvent | CostWarningEvent | CostCeilingReachedEvent | DecisionHaltSkippedNonInteractiveEvent | PipelineMergeConflictDetectedEvent; //#endregion
|
|
927
944
|
//#region src/core/errors.d.ts
|
|
928
945
|
|
|
929
946
|
/**
|
|
@@ -1866,6 +1883,21 @@ interface OrchestratorEvents {
|
|
|
1866
1883
|
durationMs: number;
|
|
1867
1884
|
};
|
|
1868
1885
|
/** Readiness check has completed — emitted for all verdicts (READY, NEEDS_WORK, NOT_READY) */
|
|
1886
|
+
/**
|
|
1887
|
+
* RP4.2 (registry-provenance): a journey-registry CANDIDATE was synthesized
|
|
1888
|
+
* at solutioning close from the UX phase's structured journeys. Candidate
|
|
1889
|
+
* ONLY — ratification is a manual operator action, always. Mapped to the
|
|
1890
|
+
* NDJSON `acceptance:derived` event.
|
|
1891
|
+
*/
|
|
1892
|
+
'solutioning:acceptance-candidate': {
|
|
1893
|
+
runId: string;
|
|
1894
|
+
candidatePath: string;
|
|
1895
|
+
journeyCount: number;
|
|
1896
|
+
criticalCount: number;
|
|
1897
|
+
sourceSha256: string;
|
|
1898
|
+
/** RP3.1 pre-pass: structured journey ids a ratified registry neither covers nor excludes. */
|
|
1899
|
+
undispositioned: string[];
|
|
1900
|
+
};
|
|
1869
1901
|
'solutioning:readiness-check': {
|
|
1870
1902
|
runId: string;
|
|
1871
1903
|
verdict: 'READY' | 'NEEDS_WORK' | 'NOT_READY';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-
|
|
2
|
+
import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-B80k9pb_.js";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
5
5
|
import * as readline from "node:readline";
|
|
@@ -180,4 +180,4 @@ async function runInteractivePrompt(decisionContext) {
|
|
|
180
180
|
|
|
181
181
|
//#endregion
|
|
182
182
|
export { runInteractivePrompt };
|
|
183
|
-
//# sourceMappingURL=interactive-prompt-
|
|
183
|
+
//# sourceMappingURL=interactive-prompt-DVX_J6Mp.js.map
|
|
@@ -5558,8 +5558,9 @@ function endStatesEqual(a, b) {
|
|
|
5558
5558
|
es.walk,
|
|
5559
5559
|
es.then
|
|
5560
5560
|
]);
|
|
5561
|
-
const aKeys =
|
|
5562
|
-
|
|
5561
|
+
const aKeys = a.map(key).sort();
|
|
5562
|
+
const bKeys = b.map(key).sort();
|
|
5563
|
+
return aKeys.every((k, i) => k === bKeys[i]);
|
|
5563
5564
|
}
|
|
5564
5565
|
/**
|
|
5565
5566
|
* Diff the current registry's journeys against a candidate's. Field-level on
|
|
@@ -5641,6 +5642,41 @@ function checkRegistryStaleness(registry, sourceContent) {
|
|
|
5641
5642
|
derivedFrom: prov.derived_from
|
|
5642
5643
|
};
|
|
5643
5644
|
}
|
|
5645
|
+
/**
|
|
5646
|
+
* Map known journey ids (from structured planning artifacts — RP4.1) against
|
|
5647
|
+
* the registry's dispositions: registered (a journey entry) or excluded (a
|
|
5648
|
+
* provenance exclusion, matched on id-or-title candidate string). Anything
|
|
5649
|
+
* else is UNDISPOSITIONED — a journey the planning lineage emitted that the
|
|
5650
|
+
* registry neither covers nor consciously excludes.
|
|
5651
|
+
*
|
|
5652
|
+
* Pure set arithmetic: no LLM, nothing to game, guaranteed catches. The
|
|
5653
|
+
* checker agent (RP3.2) covers the fuzzy remainder (journeys only expressed
|
|
5654
|
+
* in PRD prose).
|
|
5655
|
+
*/
|
|
5656
|
+
function computeUndispositioned(knownJourneyIds, registry) {
|
|
5657
|
+
const registered = new Set(registry.journeys.map((j) => j.id));
|
|
5658
|
+
const excluded = new Set((registry.provenance?.excluded ?? []).map((e) => e.candidate));
|
|
5659
|
+
const excludedTitles = excluded;
|
|
5660
|
+
const out = [];
|
|
5661
|
+
const seen = new Set();
|
|
5662
|
+
for (const id of knownJourneyIds) {
|
|
5663
|
+
if (seen.has(id)) continue;
|
|
5664
|
+
seen.add(id);
|
|
5665
|
+
if (registered.has(id)) out.push({
|
|
5666
|
+
id,
|
|
5667
|
+
disposition: "registered"
|
|
5668
|
+
});
|
|
5669
|
+
else if (excludedTitles.has(id)) out.push({
|
|
5670
|
+
id,
|
|
5671
|
+
disposition: "excluded"
|
|
5672
|
+
});
|
|
5673
|
+
else out.push({
|
|
5674
|
+
id,
|
|
5675
|
+
disposition: "undispositioned"
|
|
5676
|
+
});
|
|
5677
|
+
}
|
|
5678
|
+
return out;
|
|
5679
|
+
}
|
|
5644
5680
|
/** Render a diff for humans (derive/ratify CLI output). */
|
|
5645
5681
|
function renderRegistryDiff(diff) {
|
|
5646
5682
|
const lines = [];
|
|
@@ -7751,5 +7787,5 @@ async function resolveRunManifest(dbRoot, runId) {
|
|
|
7751
7787
|
}
|
|
7752
7788
|
|
|
7753
7789
|
//#endregion
|
|
7754
|
-
export { ACCEPTANCE_CONTRACT_PROFILE_PATH, FindingsInjector, JOURNEY_CANDIDATE_PATH, JOURNEY_DEFERRALS_PATH, JOURNEY_REGISTRY_PATH, RunManifest, RuntimeProbeListSchema, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, applyConfigToGraph, checkRegistryStaleness, clearGateDemotion, computeJourneyCoverage, computePrecision, computeRecall, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, demoteGate, detectsEventDrivenAC, detectsStateIntegratingAC, diffJourneySets, effectiveAcceptanceMode, extractTargetFilesFromStoryContent, isProjectContainedPath, loadAcceptanceContractFromTrustedTree, loadJourneyDeferralsFromTrustedTree, loadJourneyRegistryFromFile, loadJourneyRegistryFromTrustedTree, parseAcceptanceContract, parseJourneyCandidate, parseJourneyDeferrals, parseJourneyRegistry, parseRuntimeProbes, parseStoryFrontmatter, ratifyCandidate, readAcceptanceMetrics, readCurrentRunId, readGateState, readTrustedFileContent, recordCanary, recordCriticalFail, recordOverride, renderFindings, renderRegistryDiff, renderSurface, renderVerdictHtml, resolveGraphPath, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck, runCanary, runStaleVerificationRecovery, summarizeCoverage };
|
|
7755
|
-
//# sourceMappingURL=manifest-read-
|
|
7790
|
+
export { ACCEPTANCE_CONTRACT_PROFILE_PATH, FindingsInjector, JOURNEY_CANDIDATE_PATH, JOURNEY_DEFERRALS_PATH, JOURNEY_REGISTRY_PATH, RunManifest, RuntimeProbeListSchema, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, applyConfigToGraph, checkRegistryStaleness, clearGateDemotion, computeJourneyCoverage, computePrecision, computeRecall, computeUndispositioned, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, demoteGate, detectsEventDrivenAC, detectsStateIntegratingAC, diffJourneySets, effectiveAcceptanceMode, extractTargetFilesFromStoryContent, isProjectContainedPath, loadAcceptanceContractFromTrustedTree, loadJourneyDeferralsFromTrustedTree, loadJourneyRegistryFromFile, loadJourneyRegistryFromTrustedTree, parseAcceptanceContract, parseJourneyCandidate, parseJourneyDeferrals, parseJourneyRegistry, parseRuntimeProbes, parseStoryFrontmatter, ratifyCandidate, readAcceptanceMetrics, readCurrentRunId, readGateState, readTrustedFileContent, recordCanary, recordCriticalFail, recordOverride, renderFindings, renderRegistryDiff, renderSurface, renderVerdictHtml, resolveGraphPath, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck, runCanary, runStaleVerificationRecovery, summarizeCoverage };
|
|
7791
|
+
//# sourceMappingURL=manifest-read-B80k9pb_.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../logger-KeHncl-f.js";
|
|
2
2
|
import "../../dist-BZGqn-XQ.js";
|
|
3
|
-
import "../../manifest-read-
|
|
4
|
-
import { runInteractivePrompt } from "../../interactive-prompt-
|
|
3
|
+
import "../../manifest-read-B80k9pb_.js";
|
|
4
|
+
import { runInteractivePrompt } from "../../interactive-prompt-DVX_J6Mp.js";
|
|
5
5
|
|
|
6
6
|
export { runInteractivePrompt };
|