@resolveio/server-lib 22.3.186 → 22.3.188

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.
@@ -124,6 +124,7 @@ export interface ResolveIOAICoderWorkflowProofReadiness {
124
124
  evaluatedAt: string;
125
125
  }
126
126
  export type ResolveIOAICoderV6ContinuationAction = 'continue' | 'retry_same_step' | 'switch_to_repair' | 'park' | 'budget_stop' | 'infra_retry' | 'ready_to_publish';
127
+ export type ResolveIOAICoderNextActionCostRisk = 'free_or_deterministic' | 'small_model_or_qa' | 'expensive_model' | 'release_or_customer_send' | 'manual_blocked';
127
128
  export type ResolveIOAICoderWorkflowReadinessStatus = 'journey_contract_required' | 'journey_contract_repair_required' | 'workflow_build_ready' | 'workflow_qa_required' | 'workflow_business_proof_ready' | 'release_repair_required' | 'infra_repair_only' | 'compile_repair_only' | 'collect_new_evidence' | 'budget_stopped' | 'parked';
128
129
  export type ResolveIOAICoderWorkflowReadinessGate = 'journey_contract' | 'build' | 'workflow_qa' | 'release' | 'infra' | 'compile' | 'evidence' | 'manual';
129
130
  export type ResolveIOAICoderWorkflowProofCheckpointStatus = 'waiting_for_journey_contract' | 'waiting_for_workflow_proof' | 'waiting_for_new_evidence' | 'waiting_for_release_gate' | 'waiting_for_infra_or_compile' | 'ready_to_continue';
@@ -172,6 +173,49 @@ export interface ResolveIOAICoderWorkflowReadiness {
172
173
  businessProofArtifacts: string[];
173
174
  workflowProofCheckpoint: ResolveIOAICoderWorkflowProofCheckpoint;
174
175
  }
176
+ export interface ResolveIOAICoderNextActionContract {
177
+ contractId: string;
178
+ action: ResolveIOAICoderV6ContinuationAction;
179
+ label: string;
180
+ primaryCommand: string;
181
+ lane: ResolveIOAICoderV6Lane;
182
+ stepType: ResolveIOAICoderV6StepType;
183
+ safeToAutoRun: boolean;
184
+ requiresHumanApproval: boolean;
185
+ canRunWithoutCodexMonitor: boolean;
186
+ codexFallbackRequired: boolean;
187
+ codexFallbackReason: string;
188
+ costRisk: ResolveIOAICoderNextActionCostRisk;
189
+ workflowFirstSatisfied: boolean;
190
+ decisionBasis: {
191
+ journeyContractReady: boolean;
192
+ workflowProofReady: boolean;
193
+ sampleDataReady: boolean;
194
+ releaseBlocked: boolean;
195
+ routeOnlyBlocked: boolean;
196
+ infraOnly: boolean;
197
+ compileOnly: boolean;
198
+ sameFailureParked: boolean;
199
+ canPublish: boolean;
200
+ canPolishWowUi: boolean;
201
+ workflowReadinessStatus: string;
202
+ workflowProofCheckpointStatus: string;
203
+ failureClass: string;
204
+ evidenceHash: string;
205
+ hotfixCommitRequired: boolean;
206
+ liveHotfixBlockedUntilCommit: boolean;
207
+ };
208
+ preconditions: string[];
209
+ expectedStateTransition: string;
210
+ successEvidence: string[];
211
+ requiredHotfixCommitProof: string[];
212
+ stopConditions: string[];
213
+ forbiddenActions: string[];
214
+ nextCommands: string[];
215
+ blockers: string[];
216
+ ownerFiles?: string[];
217
+ createdAt: string;
218
+ }
175
219
  export interface ResolveIOAICoderV6SupervisorState {
176
220
  version: 'v6';
177
221
  runKind: ResolveIOAICoderV6RunKind;
@@ -296,6 +340,7 @@ export interface ResolveIOAICoderV6ContinuationDecision {
296
340
  budgetExceeded: boolean;
297
341
  workflowReadiness: ResolveIOAICoderWorkflowReadiness;
298
342
  workflowProofCheckpoint: ResolveIOAICoderWorkflowProofCheckpoint;
343
+ nextActionContract: ResolveIOAICoderNextActionContract;
299
344
  recoveryPlan: ResolveIOAIManagerRecoveryPlan;
300
345
  recoveryCheckpoint: ResolveIOAIManagerRecoveryCheckpoint;
301
346
  recoveryEvidenceProbe: ResolveIOAIManagerRecoveryEvidenceProbe;
@@ -339,6 +384,17 @@ export declare function buildResolveIOAICoderV6WorkflowReadiness(bundle: Resolve
339
384
  budgetExceeded?: boolean;
340
385
  repeatedNoProgressCount?: number;
341
386
  }): ResolveIOAICoderWorkflowReadiness;
387
+ export declare function buildResolveIOAICoderNextActionContract(input: {
388
+ bundle: ResolveIOAICoderV6StateBundle;
389
+ action: ResolveIOAICoderV6ContinuationAction;
390
+ reason: string;
391
+ nextLane: ResolveIOAICoderV6Lane;
392
+ nextStep: ResolveIOAICoderV6StepType;
393
+ budgetExceeded?: boolean;
394
+ workflowReadiness: ResolveIOAICoderWorkflowReadiness;
395
+ workflowProofCheckpoint: ResolveIOAICoderWorkflowProofCheckpoint;
396
+ now?: Date | string;
397
+ }): ResolveIOAICoderNextActionContract;
342
398
  export declare function buildResolveIOAICoderV6Budget(existing?: Partial<ResolveIOAICoderV6Budget>): ResolveIOAICoderV6Budget;
343
399
  export declare function initializeResolveIOAICoderV6State(input: ResolveIOAICoderV6InitializeInput): ResolveIOAICoderV6StateBundle;
344
400
  export declare function recordResolveIOAICoderV6Step(bundle: ResolveIOAICoderV6StateBundle, step: ResolveIOAICoderV6StepInput): ResolveIOAICoderV6StateBundle;
@@ -55,6 +55,7 @@ exports.evaluateResolveIOAICoderWorkflowProofReadiness = evaluateResolveIOAICode
55
55
  exports.fingerprintResolveIOAICoderV6Blocker = fingerprintResolveIOAICoderV6Blocker;
56
56
  exports.buildResolveIOAICoderWorkflowProofCheckpoint = buildResolveIOAICoderWorkflowProofCheckpoint;
57
57
  exports.buildResolveIOAICoderV6WorkflowReadiness = buildResolveIOAICoderV6WorkflowReadiness;
58
+ exports.buildResolveIOAICoderNextActionContract = buildResolveIOAICoderNextActionContract;
58
59
  exports.buildResolveIOAICoderV6Budget = buildResolveIOAICoderV6Budget;
59
60
  exports.initializeResolveIOAICoderV6State = initializeResolveIOAICoderV6State;
60
61
  exports.recordResolveIOAICoderV6Step = recordResolveIOAICoderV6Step;
@@ -1547,6 +1548,252 @@ function buildResolveIOAICoderV6WorkflowReadiness(bundle, context) {
1547
1548
  workflowProofCheckpoint: workflowProofCheckpoint
1548
1549
  };
1549
1550
  }
1551
+ function aicoderNextActionLabel(command) {
1552
+ switch (command) {
1553
+ case 'repair_aicoder_journey_contract':
1554
+ return 'Repair Journey Contract';
1555
+ case 'run_aicoder_workflow_build':
1556
+ return 'Build North-Star Workflow';
1557
+ case 'run_aicoder_workflow_qa':
1558
+ return 'Run Workflow QA';
1559
+ case 'repair_aicoder_release_gate':
1560
+ return 'Repair Release Gate';
1561
+ case 'repair_aicoder_compile_gate':
1562
+ return 'Repair Compile Gate';
1563
+ case 'repair_aicoder_infra_gate':
1564
+ return 'Repair Infra Gate';
1565
+ case 'run_aicoder_owner_scoped_repair':
1566
+ return 'Run Scoped Repair';
1567
+ case 'publish_aicoder_after_workflow_proof':
1568
+ return 'Publish After Workflow Proof';
1569
+ case 'park_aicoder_until_new_evidence':
1570
+ return 'Park Until New Evidence';
1571
+ case 'park_aicoder_budget_stop':
1572
+ return 'Park Budget Stop';
1573
+ default:
1574
+ return 'Continue Workflow';
1575
+ }
1576
+ }
1577
+ function aicoderNextActionPrimaryCommand(action, readiness) {
1578
+ if (action === 'budget_stop') {
1579
+ return 'park_aicoder_budget_stop';
1580
+ }
1581
+ if (action === 'park') {
1582
+ return 'park_aicoder_until_new_evidence';
1583
+ }
1584
+ if (action === 'infra_retry') {
1585
+ return readiness.compileOnly ? 'repair_aicoder_compile_gate' : 'repair_aicoder_infra_gate';
1586
+ }
1587
+ if (readiness.status === 'journey_contract_required' || readiness.status === 'journey_contract_repair_required') {
1588
+ return 'repair_aicoder_journey_contract';
1589
+ }
1590
+ if (readiness.status === 'workflow_build_ready') {
1591
+ return 'run_aicoder_workflow_build';
1592
+ }
1593
+ if (readiness.status === 'workflow_qa_required') {
1594
+ return 'run_aicoder_workflow_qa';
1595
+ }
1596
+ if (readiness.status === 'release_repair_required') {
1597
+ return 'repair_aicoder_release_gate';
1598
+ }
1599
+ if (action === 'ready_to_publish') {
1600
+ return 'publish_aicoder_after_workflow_proof';
1601
+ }
1602
+ if (action === 'switch_to_repair' || action === 'retry_same_step') {
1603
+ return 'run_aicoder_owner_scoped_repair';
1604
+ }
1605
+ return 'continue_aicoder_workflow';
1606
+ }
1607
+ function aicoderNextActionCostRisk(action, command, readiness) {
1608
+ if (action === 'park' || action === 'budget_stop' || readiness.requiresHumanDecision) {
1609
+ return 'manual_blocked';
1610
+ }
1611
+ if (action === 'ready_to_publish' || command === 'repair_aicoder_release_gate' || readiness.nextGate === 'release') {
1612
+ return 'release_or_customer_send';
1613
+ }
1614
+ if (command === 'run_aicoder_workflow_qa' || command === 'repair_aicoder_compile_gate' || command === 'repair_aicoder_infra_gate') {
1615
+ return 'small_model_or_qa';
1616
+ }
1617
+ if (command === 'continue_aicoder_workflow') {
1618
+ return 'free_or_deterministic';
1619
+ }
1620
+ return 'expensive_model';
1621
+ }
1622
+ function aicoderNextActionExpectedTransition(command) {
1623
+ switch (command) {
1624
+ case 'repair_aicoder_journey_contract':
1625
+ return 'Missing or invalid journey contract becomes a validated first/next/last workflow graph with QA rows.';
1626
+ case 'run_aicoder_workflow_build':
1627
+ return 'Journey contract becomes implemented workflow screens, hub action, data story, and reachable completion state.';
1628
+ case 'run_aicoder_workflow_qa':
1629
+ return 'Route/browser evidence becomes AIQaBusinessAssertion proof for the north-star workflow.';
1630
+ case 'repair_aicoder_release_gate':
1631
+ return 'Publish/deploy/sample-data blocker becomes hotfix evidence, release-gate evidence, or one explicit force-deploy decision.';
1632
+ case 'repair_aicoder_compile_gate':
1633
+ return 'Compile failure becomes a passing build or a new compile blocker fingerprint.';
1634
+ case 'repair_aicoder_infra_gate':
1635
+ return 'Infra/preflight failure becomes a passing startup/browser/Mongo gate or a new infra blocker fingerprint.';
1636
+ case 'run_aicoder_owner_scoped_repair':
1637
+ return 'Current blocker changes to passed, a new evidence hash, or a parked manual decision.';
1638
+ case 'publish_aicoder_after_workflow_proof':
1639
+ return 'Workflow-proven artifact moves through the release gate exactly once with publish/deploy evidence recorded.';
1640
+ case 'park_aicoder_budget_stop':
1641
+ case 'park_aicoder_until_new_evidence':
1642
+ return 'Runner stops spending until an operator records new evidence or an explicit next action.';
1643
+ default:
1644
+ return 'Runner advances to the next workflow-first gate with evidence recorded.';
1645
+ }
1646
+ }
1647
+ function buildResolveIOAICoderNextActionStopConditions(readiness, command) {
1648
+ var stopConditions = [
1649
+ 'Do not accept scorecard, wow score, or route load as app success without AIQaBusinessAssertion workflow proof.'
1650
+ ];
1651
+ if (!readiness.journeyContractReady || command === 'repair_aicoder_journey_contract') {
1652
+ stopConditions.push('Do not run build tasks until docs/APP_JOURNEY_CONTRACT.md validates with first/next/last workflow steps.');
1653
+ }
1654
+ if (!readiness.businessProofReady || readiness.routeOnlyBlocked || command === 'run_aicoder_workflow_qa') {
1655
+ stopConditions.push('Do not publish or run wow UI polish until workflow business proof passes.');
1656
+ stopConditions.push('Route-only proof must stay labeled as route evidence, not acceptance.');
1657
+ }
1658
+ if (readiness.releaseBlocked || command === 'repair_aicoder_release_gate') {
1659
+ stopConditions.push('Do not repeat a full publish/deploy until release blocker evidence changes or hotfix/force evidence is recorded.');
1660
+ }
1661
+ if (readiness.infraOnly || readiness.compileOnly) {
1662
+ stopConditions.push('Infra, startup, Puppeteer, Chrome, Mongo, and compile failures stay in infra/compile repair; do not charge them as product workflow failure.');
1663
+ }
1664
+ if (readiness.sameFailureParked) {
1665
+ stopConditions.push('Do not retry the same model/code repair until the blocker fingerprint, evidence hash, or workflow proof artifact changes.');
1666
+ }
1667
+ if (readiness.requiresHumanDecision) {
1668
+ stopConditions.push('Do not spend additional model or release budget until an operator records the next bounded action.');
1669
+ }
1670
+ return Array.from(new Set(stopConditions)).slice(0, 12);
1671
+ }
1672
+ function buildResolveIOAICoderNextActionContract(input) {
1673
+ var workflowReadiness = input.workflowReadiness;
1674
+ var workflowProofCheckpoint = input.workflowProofCheckpoint;
1675
+ var history = Array.isArray(input.bundle.aiCoderV6StepHistory) ? input.bundle.aiCoderV6StepHistory : [];
1676
+ var last = history[history.length - 1];
1677
+ var command = aicoderNextActionPrimaryCommand(input.action, workflowReadiness);
1678
+ var costRisk = aicoderNextActionCostRisk(input.action, command, workflowReadiness);
1679
+ var hotfixCommitRequired = command === 'repair_aicoder_release_gate'
1680
+ || workflowReadiness.releaseBlocked
1681
+ || workflowReadiness.nextGate === 'release';
1682
+ var liveHotfixBlockedUntilCommit = hotfixCommitRequired;
1683
+ var requiredHotfixCommitProof = hotfixCommitRequired
1684
+ ? ['sourceCommitSha', 'githubCommitUrl', 'gitCommitStatus=passed', 'gitPushStatus=passed']
1685
+ : [];
1686
+ var requiresHumanApproval = input.action === 'park'
1687
+ || input.action === 'budget_stop'
1688
+ || input.action === 'ready_to_publish'
1689
+ || input.budgetExceeded === true
1690
+ || workflowReadiness.requiresHumanDecision === true;
1691
+ var workflowFirstSatisfied = workflowReadiness.journeyContractReady
1692
+ && workflowReadiness.businessProofReady
1693
+ && !workflowReadiness.releaseBlocked
1694
+ && !workflowReadiness.routeOnlyBlocked
1695
+ && !workflowReadiness.infraOnly
1696
+ && !workflowReadiness.compileOnly
1697
+ && !workflowReadiness.sameFailureParked;
1698
+ var safeToAutoRun = !requiresHumanApproval && (command === 'repair_aicoder_journey_contract'
1699
+ || command === 'run_aicoder_workflow_build'
1700
+ || command === 'run_aicoder_workflow_qa'
1701
+ || command === 'repair_aicoder_release_gate'
1702
+ || command === 'repair_aicoder_compile_gate'
1703
+ || command === 'repair_aicoder_infra_gate'
1704
+ || (command === 'run_aicoder_owner_scoped_repair' && workflowReadiness.canRunProductRepair)
1705
+ || (command === 'continue_aicoder_workflow' && !workflowReadiness.blockers.length));
1706
+ var canRunWithoutCodexMonitor = safeToAutoRun
1707
+ && workflowProofCheckpoint.requiredEvidence.length > 0
1708
+ && workflowProofCheckpoint.nextAction.length > 0;
1709
+ var blockers = Array.from(new Set(__spreadArray(__spreadArray([], __read(workflowReadiness.blockers), false), __read((workflowProofCheckpoint.status === 'waiting_for_new_evidence' ? workflowProofCheckpoint.requiredResetEvidence : [])), false))).slice(0, 12);
1710
+ var preconditions = Array.from(new Set(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([
1711
+ workflowProofCheckpoint.nextAction
1712
+ ], __read(workflowProofCheckpoint.requiredEvidence), false), __read((workflowReadiness.journeyContractReady ? [] : ['validated APP_JOURNEY_CONTRACT.md journey_contract JSON'])), false), __read((workflowReadiness.canRunWorkflowQa ? ['workflow QA rows generated from the journey contract'] : [])), false), __read((workflowReadiness.releaseBlocked ? ['release blocker artifact or hotfix-first release evidence'] : [])), false), __read((hotfixCommitRequired ? ['sourceCommitSha, githubCommitUrl, passed gitCommitStatus, and passed gitPushStatus before live hotfix apply'] : [])), false).map(function (entry) { return cleanText(entry, 300); }).filter(Boolean))).slice(0, 12);
1713
+ var successEvidence = Array.from(new Set(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(workflowProofCheckpoint.requiredEvidence), false), __read((workflowReadiness.businessProofReady ? ['retained AIQaBusinessAssertion artifact'] : [])), false), __read((workflowReadiness.canPublish ? ['release gate accepts the workflow-proven artifact'] : [])), false), __read((command === 'repair_aicoder_release_gate' ? ['hotfix evidence or explicit one-time force release decision'] : [])), false), __read((hotfixCommitRequired ? ['GitHub commit and push proof for any manager-applied hotfix'] : [])), false).map(function (entry) { return cleanText(entry, 300); }).filter(Boolean))).slice(0, 12);
1714
+ var stopConditions = buildResolveIOAICoderNextActionStopConditions(workflowReadiness, command);
1715
+ if (hotfixCommitRequired) {
1716
+ stopConditions.push('Do not apply a live AICoder backend/static hotfix until sourceCommitSha, githubCommitUrl, passed gitCommitStatus, and passed gitPushStatus are recorded.');
1717
+ }
1718
+ var forbiddenActions = Array.from(new Set(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([
1719
+ 'accepting route-only proof as app success',
1720
+ 'accepting scorecard-only or wow-score-only proof as app success'
1721
+ ], __read((workflowReadiness.journeyContractReady ? [] : ['building product routes before the journey contract validates'])), false), __read((workflowReadiness.businessProofReady ? [] : ['publishing before north-star workflow business proof passes'])), false), __read((workflowReadiness.releaseBlocked ? ['rerunning full deploy/publish without changed release evidence'] : [])), false), __read((hotfixCommitRequired ? ['applying live hotfix before pushed GitHub commit proof'] : [])), false), __read((workflowReadiness.sameFailureParked ? ['retrying the same repair loop without new evidence'] : [])), false))).slice(0, 12);
1722
+ var nextCommands = Array.from(new Set(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([
1723
+ command
1724
+ ], __read((command === 'repair_aicoder_journey_contract' ? ['validate_aicoder_journey_contract', 'generate_workflow_qa_rows'] : [])), false), __read((command === 'run_aicoder_workflow_qa' ? ['execute_contract_qa_assertions', 'record_aiqa_business_assertion'] : [])), false), __read((command === 'repair_aicoder_release_gate' ? [
1725
+ 'collect_release_blocker_evidence',
1726
+ 'prefer_hotfix_before_full_deploy',
1727
+ 'prepare_hotfix_patch_without_live_apply',
1728
+ 'commit_and_push_hotfix_to_github',
1729
+ 'record_github_commit_for_hotfix',
1730
+ 'apply_live_hotfix_only_after_github_commit_proof'
1731
+ ] : [])), false), __read((command === 'repair_aicoder_compile_gate' ? ['rerun_compile_gate_only', 'record_compile_evidence_hash'] : [])), false), __read((command === 'repair_aicoder_infra_gate' ? ['rerun_preflight_gate_only', 'record_infra_evidence_hash'] : [])), false), [
1732
+ 'record_aicoder_next_action_result'
1733
+ ], false))).slice(0, 12);
1734
+ var contractBasis = {
1735
+ action: input.action,
1736
+ reason: cleanText(input.reason, 500),
1737
+ command: command,
1738
+ readinessStatus: workflowReadiness.status,
1739
+ checkpointStatus: workflowProofCheckpoint.status,
1740
+ failureClass: cleanText(last === null || last === void 0 ? void 0 : last.failureClass, 120),
1741
+ evidenceHash: (0, ai_runner_manager_policy_1.hashResolveIOAIManagerEvidence)(last)
1742
+ };
1743
+ return {
1744
+ contractId: "aicoder-next-".concat((0, ai_runner_manager_policy_1.hashResolveIOAIManagerEvidence)({
1745
+ failureClass: contractBasis.failureClass,
1746
+ summary: "".concat(contractBasis.reason, ":").concat(contractBasis.command, ":").concat(contractBasis.readinessStatus, ":").concat(contractBasis.checkpointStatus),
1747
+ evidenceHash: contractBasis.evidenceHash,
1748
+ changedFiles: last === null || last === void 0 ? void 0 : last.changedFiles,
1749
+ artifactPaths: last === null || last === void 0 ? void 0 : last.artifactPaths
1750
+ })),
1751
+ action: input.action,
1752
+ label: aicoderNextActionLabel(command),
1753
+ primaryCommand: command,
1754
+ lane: input.nextLane,
1755
+ stepType: input.nextStep,
1756
+ safeToAutoRun: safeToAutoRun,
1757
+ requiresHumanApproval: requiresHumanApproval,
1758
+ canRunWithoutCodexMonitor: canRunWithoutCodexMonitor,
1759
+ codexFallbackRequired: !canRunWithoutCodexMonitor && !requiresHumanApproval,
1760
+ codexFallbackReason: canRunWithoutCodexMonitor
1761
+ ? ''
1762
+ : requiresHumanApproval
1763
+ ? 'Operator approval is required before the next action.'
1764
+ : 'Next action needs stronger deterministic evidence before it can run unattended.',
1765
+ costRisk: costRisk,
1766
+ workflowFirstSatisfied: workflowFirstSatisfied,
1767
+ decisionBasis: {
1768
+ journeyContractReady: workflowReadiness.journeyContractReady,
1769
+ workflowProofReady: workflowReadiness.businessProofReady,
1770
+ sampleDataReady: workflowReadiness.businessProofReady && !workflowReadiness.releaseBlocked,
1771
+ releaseBlocked: workflowReadiness.releaseBlocked,
1772
+ routeOnlyBlocked: workflowReadiness.routeOnlyBlocked,
1773
+ infraOnly: workflowReadiness.infraOnly,
1774
+ compileOnly: workflowReadiness.compileOnly,
1775
+ sameFailureParked: workflowReadiness.sameFailureParked,
1776
+ canPublish: workflowReadiness.canPublish,
1777
+ canPolishWowUi: workflowReadiness.canPolishWowUi,
1778
+ workflowReadinessStatus: workflowReadiness.status,
1779
+ workflowProofCheckpointStatus: workflowProofCheckpoint.status,
1780
+ failureClass: contractBasis.failureClass,
1781
+ evidenceHash: cleanText((last === null || last === void 0 ? void 0 : last.evidenceHash) || contractBasis.evidenceHash, 160),
1782
+ hotfixCommitRequired: hotfixCommitRequired,
1783
+ liveHotfixBlockedUntilCommit: liveHotfixBlockedUntilCommit
1784
+ },
1785
+ preconditions: preconditions,
1786
+ expectedStateTransition: aicoderNextActionExpectedTransition(command),
1787
+ successEvidence: successEvidence,
1788
+ requiredHotfixCommitProof: requiredHotfixCommitProof,
1789
+ stopConditions: stopConditions,
1790
+ forbiddenActions: forbiddenActions,
1791
+ nextCommands: nextCommands,
1792
+ blockers: blockers,
1793
+ ownerFiles: cleanList(last === null || last === void 0 ? void 0 : last.changedFiles, 20, 500),
1794
+ createdAt: isoNow(input.now)
1795
+ };
1796
+ }
1550
1797
  function buildResolveIOAICoderV6Budget(existing) {
1551
1798
  return {
1552
1799
  maxPromptTokensPerNonInitialStep: Number((existing === null || existing === void 0 ? void 0 : existing.maxPromptTokensPerNonInitialStep) || 4000),
@@ -1825,7 +2072,17 @@ function decideResolveIOAICoderV6Continuation(bundle) {
1825
2072
  budgetExceeded: decision.budgetExceeded,
1826
2073
  repeatedNoProgressCount: decision.repeatedNoProgressCount
1827
2074
  });
1828
- return __assign(__assign({}, decision), { workflowReadiness: workflowReadiness, workflowProofCheckpoint: workflowReadiness.workflowProofCheckpoint });
2075
+ var workflowProofCheckpoint = workflowReadiness.workflowProofCheckpoint;
2076
+ return __assign(__assign({}, decision), { workflowReadiness: workflowReadiness, workflowProofCheckpoint: workflowProofCheckpoint, nextActionContract: buildResolveIOAICoderNextActionContract({
2077
+ bundle: bundle,
2078
+ action: decision.action,
2079
+ reason: decision.reason,
2080
+ nextLane: decision.nextLane,
2081
+ nextStep: decision.nextStep,
2082
+ budgetExceeded: decision.budgetExceeded,
2083
+ workflowReadiness: workflowReadiness,
2084
+ workflowProofCheckpoint: workflowProofCheckpoint
2085
+ }) });
1829
2086
  };
1830
2087
  var budgetExceeded = (budget.loopCount >= budget.maxLoopsPerRun && !managerDecision.loopBudgetShouldReset)
1831
2088
  || budget.totalPromptTokenEstimate >= budget.maxTotalPromptTokens