substrate-ai 0.21.16 → 0.21.18

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.
@@ -1,7 +1,7 @@
1
- import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-CI8pIygU.js";
1
+ import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-Bu5nYB6q.js";
2
2
  import "./logger-KeHncl-f.js";
3
3
  import "./dist-BZGqn-XQ.js";
4
- import "./manifest-read-3cF8yP3_.js";
4
+ import "./manifest-read-leQdHLyo.js";
5
5
  import "./work-graph-repository-4cKsf8Lf.js";
6
6
  import "./decisions-BAaxpVD0.js";
7
7
 
@@ -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-3cF8yP3_.js";
3
+ import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-leQdHLyo.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-CI8pIygU.js.map
1003
+ //# sourceMappingURL=health-Bu5nYB6q.js.map
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-3cF8yP3_.js";
2
+ import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-leQdHLyo.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-BWdH9Lb9.js.map
183
+ //# sourceMappingURL=interactive-prompt-BbeQO4mm.js.map
@@ -5641,6 +5641,41 @@ function checkRegistryStaleness(registry, sourceContent) {
5641
5641
  derivedFrom: prov.derived_from
5642
5642
  };
5643
5643
  }
5644
+ /**
5645
+ * Map known journey ids (from structured planning artifacts — RP4.1) against
5646
+ * the registry's dispositions: registered (a journey entry) or excluded (a
5647
+ * provenance exclusion, matched on id-or-title candidate string). Anything
5648
+ * else is UNDISPOSITIONED — a journey the planning lineage emitted that the
5649
+ * registry neither covers nor consciously excludes.
5650
+ *
5651
+ * Pure set arithmetic: no LLM, nothing to game, guaranteed catches. The
5652
+ * checker agent (RP3.2) covers the fuzzy remainder (journeys only expressed
5653
+ * in PRD prose).
5654
+ */
5655
+ function computeUndispositioned(knownJourneyIds, registry) {
5656
+ const registered = new Set(registry.journeys.map((j) => j.id));
5657
+ const excluded = new Set((registry.provenance?.excluded ?? []).map((e) => e.candidate));
5658
+ const excludedTitles = excluded;
5659
+ const out = [];
5660
+ const seen = new Set();
5661
+ for (const id of knownJourneyIds) {
5662
+ if (seen.has(id)) continue;
5663
+ seen.add(id);
5664
+ if (registered.has(id)) out.push({
5665
+ id,
5666
+ disposition: "registered"
5667
+ });
5668
+ else if (excludedTitles.has(id)) out.push({
5669
+ id,
5670
+ disposition: "excluded"
5671
+ });
5672
+ else out.push({
5673
+ id,
5674
+ disposition: "undispositioned"
5675
+ });
5676
+ }
5677
+ return out;
5678
+ }
5644
5679
  /** Render a diff for humans (derive/ratify CLI output). */
5645
5680
  function renderRegistryDiff(diff) {
5646
5681
  const lines = [];
@@ -7751,5 +7786,5 @@ async function resolveRunManifest(dbRoot, runId) {
7751
7786
  }
7752
7787
 
7753
7788
  //#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-3cF8yP3_.js.map
7789
+ 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 };
7790
+ //# sourceMappingURL=manifest-read-leQdHLyo.js.map
@@ -1,6 +1,6 @@
1
1
  import "../../logger-KeHncl-f.js";
2
2
  import "../../dist-BZGqn-XQ.js";
3
- import "../../manifest-read-3cF8yP3_.js";
4
- import { runInteractivePrompt } from "../../interactive-prompt-BWdH9Lb9.js";
3
+ import "../../manifest-read-leQdHLyo.js";
4
+ import { runInteractivePrompt } from "../../interactive-prompt-BbeQO4mm.js";
5
5
 
6
6
  export { runInteractivePrompt };