ai-foreman 1.7.13 → 1.7.15
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/README.md +33 -3
- package/dist/adapters/claude.d.ts +5 -0
- package/dist/adapters/claude.js +124 -16
- package/dist/adapters/codex.d.ts +2 -0
- package/dist/adapters/codex.js +32 -8
- package/dist/adapters/recovering.d.ts +2 -0
- package/dist/adapters/recovering.js +6 -0
- package/dist/adapters/types.d.ts +22 -0
- package/dist/agentRun.js +24 -4
- package/dist/branch/currentGuard.d.ts +2 -0
- package/dist/branch/currentGuard.js +9 -0
- package/dist/branch/finalization.d.ts +22 -0
- package/dist/branch/finalization.js +120 -0
- package/dist/branch/git.js +7 -2
- package/dist/branch/runner.d.ts +3 -2
- package/dist/branch/runner.js +277 -75
- package/dist/buildRuns.d.ts +1 -0
- package/dist/buildRuns.js +33 -3
- package/dist/cli/start.js +314 -86
- package/dist/cli/state.d.ts +4 -0
- package/dist/cli/state.js +69 -0
- package/dist/continuity.d.ts +4 -0
- package/dist/continuity.js +26 -3
- package/dist/foreman.d.ts +22 -4
- package/dist/foreman.js +105 -19
- package/dist/handoffs.d.ts +5 -2
- package/dist/handoffs.js +93 -12
- package/dist/index.js +2 -0
- package/dist/qaFailureDelivery.d.ts +100 -0
- package/dist/qaFailureDelivery.js +570 -0
- package/dist/qaProtocolV2.d.ts +233 -0
- package/dist/qaProtocolV2.js +114 -0
- package/dist/qaRecovery.d.ts +15 -3
- package/dist/qaRecovery.js +477 -83
- package/dist/qaReview.d.ts +42 -17
- package/dist/qaReview.js +1216 -457
- package/dist/qaRuntime.d.ts +14 -0
- package/dist/qaRuntime.js +44 -0
- package/dist/qaSnapshot.d.ts +34 -0
- package/dist/qaSnapshot.js +302 -34
- package/dist/roles.js +1 -0
- package/dist/stateTransfer.d.ts +57 -0
- package/dist/stateTransfer.js +644 -0
- package/dist/statusReporter.d.ts +2 -0
- package/dist/statusReporter.js +6 -0
- package/dist/workflowDb.d.ts +245 -2
- package/dist/workflowDb.js +647 -6
- package/package.json +15 -3
package/dist/qaReview.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import { type ProviderSessionRefV1, type QaFailureReportV1, type SessionStrategy
|
|
|
2
2
|
import type { BuilderAdapter, CompactResult } from "./adapters/types.js";
|
|
3
3
|
import type { RunObserver } from "./observability.js";
|
|
4
4
|
import type { TicketDef } from "./tickets/ticketSchema.js";
|
|
5
|
+
import type { QaFailureDeliveryInput, QaFailureDeliveryResult } from "./qaFailureDelivery.js";
|
|
5
6
|
import { type QaRecoveryPacket } from "./qaRecovery.js";
|
|
7
|
+
import { type HandoffAcceptanceReceiptV2, type QaConfinementV2 } from "./qaProtocolV2.js";
|
|
6
8
|
export interface QaStreamState {
|
|
7
9
|
sessionId?: string;
|
|
8
10
|
sessionRef?: ProviderSessionRefV1;
|
|
@@ -28,6 +30,8 @@ export interface QaReportHistoryEntry {
|
|
|
28
30
|
reportDigest?: string;
|
|
29
31
|
report?: QaFailureReportV1;
|
|
30
32
|
findingIds?: string[];
|
|
33
|
+
remediationRequestDigest?: string;
|
|
34
|
+
remediationRequest?: string;
|
|
31
35
|
fixSummaryDigest?: string;
|
|
32
36
|
fixSummary?: string;
|
|
33
37
|
remediationDigest?: string;
|
|
@@ -55,43 +59,56 @@ export type QaFixRequest = {
|
|
|
55
59
|
remediation: string;
|
|
56
60
|
history: QaReportHistoryEntry[];
|
|
57
61
|
latestBuilderResult: string;
|
|
58
|
-
} | {
|
|
59
|
-
kind: "plain-issues";
|
|
60
|
-
issues: string;
|
|
61
|
-
operatorApproved: true;
|
|
62
|
-
history: QaReportHistoryEntry[];
|
|
63
|
-
latestBuilderResult: string;
|
|
64
62
|
};
|
|
65
63
|
export type QaFixResult = {
|
|
66
64
|
ok: true;
|
|
67
65
|
response: string;
|
|
68
66
|
summary: string;
|
|
69
67
|
detail?: string;
|
|
68
|
+
providerTurnId?: string;
|
|
70
69
|
} | {
|
|
71
70
|
ok: false;
|
|
72
71
|
detail?: string;
|
|
73
72
|
response?: string;
|
|
74
73
|
summary?: string;
|
|
74
|
+
providerTurnId?: string;
|
|
75
75
|
};
|
|
76
76
|
export interface QaSessionHandle {
|
|
77
77
|
adapter: BuilderAdapter;
|
|
78
|
-
sessionIdentity
|
|
78
|
+
sessionIdentity(): ProviderSessionRefV1;
|
|
79
79
|
effectiveRoleInstructions: string;
|
|
80
80
|
runtimeContext: unknown;
|
|
81
81
|
skills: Array<{
|
|
82
82
|
name: string;
|
|
83
|
-
digest: string
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
digest: string;
|
|
84
|
+
path: string;
|
|
85
|
+
content: string;
|
|
86
86
|
}>;
|
|
87
|
-
|
|
87
|
+
confinement: QaConfinementV2 & {
|
|
88
|
+
digest: string;
|
|
89
|
+
};
|
|
90
|
+
handoffReceipt: {
|
|
91
|
+
kind: "initial";
|
|
92
|
+
} | {
|
|
93
|
+
kind: "accepted";
|
|
94
|
+
receipt: HandoffAcceptanceReceiptV2;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export interface QaSessionBoundaryResult {
|
|
98
|
+
handle: QaSessionHandle;
|
|
99
|
+
receipt: HandoffAcceptanceReceiptV2;
|
|
88
100
|
}
|
|
89
101
|
export interface QaSessionBoundaryRecovery {
|
|
102
|
+
runId: string;
|
|
103
|
+
ticketId: string;
|
|
104
|
+
packetId: string;
|
|
90
105
|
packetDigest: string;
|
|
91
106
|
reviewedStateDigest: string;
|
|
92
107
|
packetPath: string;
|
|
93
108
|
resources: Array<{
|
|
94
109
|
label: string;
|
|
110
|
+
purpose: string;
|
|
111
|
+
bytes: number;
|
|
95
112
|
digest: string;
|
|
96
113
|
requiredForRecovery: boolean;
|
|
97
114
|
mediaType: string;
|
|
@@ -118,12 +135,15 @@ export interface IsolatedQaOptions {
|
|
|
118
135
|
builderSummary: string;
|
|
119
136
|
qaStrategy: SessionStrategy;
|
|
120
137
|
state: QaStreamState;
|
|
121
|
-
createQa: (cwd: string, sessionId?: string) => Promise<
|
|
138
|
+
createQa: (cwd: string, sessionId?: string) => Promise<QaSessionHandle>;
|
|
122
139
|
/** Host-owned ordinary QA boundary. Fresh strategies must return a validated successor. */
|
|
123
|
-
sessionBoundary
|
|
140
|
+
sessionBoundary: (handle: QaSessionHandle, frozenAction: string, strategy: SessionStrategy, cwd: string, recovery?: QaSessionBoundaryRecovery) => Promise<QaSessionBoundaryResult>;
|
|
124
141
|
/** Persist provider-native automatic compactions without imposing an ordinary QA boundary. */
|
|
125
142
|
observeNativeCompactions?: (adapter: BuilderAdapter) => Promise<void>;
|
|
126
|
-
|
|
143
|
+
/** Legacy test seam. Production QA-failure remediation must use deliverFailure. */
|
|
144
|
+
fix?: (request: QaFixRequest) => Promise<QaFixResult>;
|
|
145
|
+
/** Canonical production delivery path for validated QA failure reports. */
|
|
146
|
+
deliverFailure?: (request: QaFailureDeliveryInput) => Promise<QaFailureDeliveryResult>;
|
|
127
147
|
maxCycles: number;
|
|
128
148
|
/** Durable QA execution scope; review/fix budgets survive worker restarts. */
|
|
129
149
|
recovery: {
|
|
@@ -166,9 +186,14 @@ export interface IsolatedQaResult {
|
|
|
166
186
|
outcome: "passed" | "blocked" | "needs-human" | "nonconverged" | "waived";
|
|
167
187
|
detail?: string;
|
|
168
188
|
summary?: string;
|
|
189
|
+
passCertificateId?: string;
|
|
190
|
+
sourceStateDigest?: string;
|
|
191
|
+
reviewBasisDigest?: string;
|
|
169
192
|
}
|
|
170
193
|
export declare function runIsolatedQa(opts: IsolatedQaOptions): Promise<IsolatedQaResult>;
|
|
171
|
-
export declare function buildQaReviewHandoff(ticket: TicketDef, builderSummary: string, diffDigest: string, validationChecklist: string[], changeSummary?: unknown): string;
|
|
194
|
+
export declare function buildQaReviewHandoff(ticket: TicketDef, builderSummary: string, diffDigest: string, validationChecklist: string[], changeSummary?: unknown, history?: QaReportHistoryEntry[]): string;
|
|
172
195
|
export declare function compactWithRetry(adapter: BuilderAdapter): Promise<CompactResult>;
|
|
173
|
-
export declare
|
|
174
|
-
export declare
|
|
196
|
+
export declare const QA_REPORT_RECOVERY_MENU: readonly ["Try a complete fresh QA review.", "Manually fix saved JSON for human inspection.", "Give QA specific instructions for a fresh review.", "Pause."];
|
|
197
|
+
export declare function beginQaFinalization(projectDir: string, sourceWorktree: string, runId: string, ticketId: string, certificateId: string, expectedSourceStateDigest: string, consumer: string, allowedProjectionPaths?: string[]): Promise<void>;
|
|
198
|
+
export declare function verifyPendingQaFinalizationSource(projectDir: string, sourceWorktree: string, runId: string, ticketId: string, allowProjection?: boolean, projectionOperationId?: string): Promise<void>;
|
|
199
|
+
export declare function completeQaFinalization(projectDir: string, runId: string, ticketId: string): void;
|