substrate-ai 0.19.31 → 0.19.32
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 +9 -6
- package/dist/{health-C96NMCJX.js → health-BmmmZgp3.js} +1 -1
- package/dist/{health-DUgvybiN.js → health-D--wDx-U.js} +9 -1087
- package/dist/index.d.ts +57 -1
- package/dist/{run-CFmp4-qj.js → run-0MJeYpdb.js} +305 -821
- package/dist/{run-Bb51aPNw.js → run-BH03S2JH.js} +2 -2
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -673,6 +673,42 @@ interface VerificationStoryCompleteEvent {
|
|
|
673
673
|
/** Total duration of all checks in milliseconds */
|
|
674
674
|
duration_ms: number;
|
|
675
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* Emitted at most once per run when cumulative pipeline cost crosses 80% of
|
|
678
|
+
* the --cost-ceiling threshold.
|
|
679
|
+
*/
|
|
680
|
+
interface CostWarningEvent {
|
|
681
|
+
type: 'cost:warning';
|
|
682
|
+
/** ISO-8601 timestamp generated at emit time */
|
|
683
|
+
ts: string;
|
|
684
|
+
/** Cumulative pipeline cost in USD at the time of the check */
|
|
685
|
+
cumulative_cost: number;
|
|
686
|
+
/** Configured cost ceiling in USD */
|
|
687
|
+
ceiling: number;
|
|
688
|
+
/** (cumulative / ceiling) * 100, rounded to two decimal places */
|
|
689
|
+
percent_used: number;
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Emitted between story dispatches when cumulative cost ≥ 100% of the
|
|
693
|
+
* --cost-ceiling. Remaining undispatched stories are skipped.
|
|
694
|
+
*/
|
|
695
|
+
interface CostCeilingReachedEvent {
|
|
696
|
+
type: 'cost:ceiling-reached';
|
|
697
|
+
/** ISO-8601 timestamp generated at emit time */
|
|
698
|
+
ts: string;
|
|
699
|
+
/** Cumulative pipeline cost in USD at the time of the check */
|
|
700
|
+
cumulative_cost: number;
|
|
701
|
+
/** Configured cost ceiling in USD */
|
|
702
|
+
ceiling: number;
|
|
703
|
+
/** --halt-on value in effect ('none', 'all', or 'critical') */
|
|
704
|
+
halt_on: string;
|
|
705
|
+
/** 'stopped' for all halt-on modes in this story; interactive prompt is Epic 54 scope */
|
|
706
|
+
action: string;
|
|
707
|
+
/** Story keys skipped because budget was exhausted */
|
|
708
|
+
skipped_stories: string[];
|
|
709
|
+
/** 'critical' when halt_on is 'all' or 'critical'; absent when 'none' */
|
|
710
|
+
severity?: string;
|
|
711
|
+
}
|
|
676
712
|
/**
|
|
677
713
|
* Discriminated union of all pipeline event types.
|
|
678
714
|
*
|
|
@@ -685,7 +721,7 @@ interface VerificationStoryCompleteEvent {
|
|
|
685
721
|
* }
|
|
686
722
|
* ```
|
|
687
723
|
*/
|
|
688
|
-
type PipelineEvent = PipelineStartEvent | PipelineCompleteEvent | PipelinePreFlightFailureEvent | PipelineProfileStaleEvent | PipelineContractMismatchEvent | PipelineContractVerificationSummaryEvent | StoryPhaseEvent | StoryDoneEvent | 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; //#endregion
|
|
724
|
+
type PipelineEvent = PipelineStartEvent | PipelineCompleteEvent | PipelinePreFlightFailureEvent | PipelineProfileStaleEvent | PipelineContractMismatchEvent | PipelineContractVerificationSummaryEvent | StoryPhaseEvent | StoryDoneEvent | 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; //#endregion
|
|
689
725
|
//#region packages/core/dist/types.d.ts
|
|
690
726
|
|
|
691
727
|
/**
|
|
@@ -1642,6 +1678,7 @@ declare const SubstrateConfigSchema: z.ZodObject<{
|
|
|
1642
1678
|
}, z.core.$strict>>;
|
|
1643
1679
|
default_agent: z.ZodOptional<z.ZodString>;
|
|
1644
1680
|
supervisor_poll_interval_seconds: z.ZodOptional<z.ZodNumber>;
|
|
1681
|
+
retry_budget: z.ZodOptional<z.ZodNumber>;
|
|
1645
1682
|
}, z.core.$strict>;
|
|
1646
1683
|
type SubstrateConfig = z.infer<typeof SubstrateConfigSchema>;
|
|
1647
1684
|
|
|
@@ -2032,6 +2069,10 @@ interface OrchestratorEvents {
|
|
|
2032
2069
|
lastVerdict: string;
|
|
2033
2070
|
reviewCycles: number;
|
|
2034
2071
|
issues: unknown[];
|
|
2072
|
+
/** Retry budget at time of escalation — present when escalation reason is retry_budget_exhausted (Story 53-4) */
|
|
2073
|
+
retryBudget?: number;
|
|
2074
|
+
/** Retry count at time of escalation — present when escalation reason is retry_budget_exhausted (Story 53-4) */
|
|
2075
|
+
retryCount?: number;
|
|
2035
2076
|
/** Structured diagnosis with classification and recommended action (Story 22-3) */
|
|
2036
2077
|
diagnosis?: {
|
|
2037
2078
|
issueDistribution: 'concentrated' | 'widespread';
|
|
@@ -2206,6 +2247,21 @@ interface OrchestratorEvents {
|
|
|
2206
2247
|
phase: string;
|
|
2207
2248
|
ts: string;
|
|
2208
2249
|
};
|
|
2250
|
+
/** Cumulative pipeline cost has crossed 80% of the --cost-ceiling threshold (emitted at most once per run) */
|
|
2251
|
+
'cost:warning': {
|
|
2252
|
+
cumulative_cost: number;
|
|
2253
|
+
ceiling: number;
|
|
2254
|
+
percent_used: number;
|
|
2255
|
+
};
|
|
2256
|
+
/** Cost ceiling reached — remaining undispatched stories are skipped */
|
|
2257
|
+
'cost:ceiling-reached': {
|
|
2258
|
+
cumulative_cost: number;
|
|
2259
|
+
ceiling: number;
|
|
2260
|
+
halt_on: string;
|
|
2261
|
+
action: string;
|
|
2262
|
+
skipped_stories: string[];
|
|
2263
|
+
severity?: string;
|
|
2264
|
+
};
|
|
2209
2265
|
/**
|
|
2210
2266
|
* Emitted when a dev-story timeout has partial work on disk and the
|
|
2211
2267
|
* orchestrator captures it as a checkpoint for retry (Story 39-5).
|