@remixhq/core 0.1.17 → 0.1.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/api.d.ts +34 -1
- package/dist/api.js +2 -2
- package/dist/auth.js +2 -2
- package/dist/binding.js +3 -3
- package/dist/chunk-7XJGOKEO.js +23 -0
- package/dist/{chunk-US5SM7ZC.js → chunk-C2FOZ3O7.js} +28 -5
- package/dist/{chunk-YCFLOHJV.js → chunk-DBVN42RF.js} +2 -2
- package/dist/{chunk-WT6VRLXU.js → chunk-S4ECO35X.js} +1 -1
- package/dist/{chunk-VM3CGCNX.js → chunk-XCZRNB35.js} +1 -1
- package/dist/{chunk-P6JHXOV4.js → chunk-XETDXVGM.js} +1 -1
- package/dist/collab.d.ts +27 -127
- package/dist/collab.js +314 -355
- package/dist/config.js +2 -2
- package/dist/{contracts-CHmD-fMj.d.ts → contracts-DiVLvPTG.d.ts} +33 -2
- package/dist/errors.d.ts +2 -0
- package/dist/errors.js +1 -1
- package/dist/history.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/repo.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-YZ34ICNN.js +0 -17
package/dist/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoreConfig } from './config.js';
|
|
2
2
|
import { T as TokenProvider } from './tokenProvider-BWTusyj4.js';
|
|
3
|
-
import { T as TurnUsage } from './contracts-
|
|
3
|
+
import { T as TurnUsage } from './contracts-DiVLvPTG.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
type HistoryImportProvider = "claude_code" | "cursor";
|
|
@@ -109,6 +109,8 @@ type MergeRequestReview = {
|
|
|
109
109
|
commitId: string | null;
|
|
110
110
|
baseCommitHash: string | null;
|
|
111
111
|
headCommitHash: string | null;
|
|
112
|
+
baseRevisionId: string | null;
|
|
113
|
+
resultRevisionId: string | null;
|
|
112
114
|
changedFilesCount: number | null;
|
|
113
115
|
insertions: number | null;
|
|
114
116
|
deletions: number | null;
|
|
@@ -507,6 +509,8 @@ type ApiClient = {
|
|
|
507
509
|
getAppDelta(appId: string, payload: {
|
|
508
510
|
baseHeadHash: string;
|
|
509
511
|
targetHeadHash?: string;
|
|
512
|
+
baseRevisionId?: string | null;
|
|
513
|
+
targetRevisionId?: string | null;
|
|
510
514
|
localSnapshotHash?: string;
|
|
511
515
|
repoFingerprint?: string;
|
|
512
516
|
remoteUrl?: string;
|
|
@@ -525,6 +529,7 @@ type ApiClient = {
|
|
|
525
529
|
diff: string;
|
|
526
530
|
baseCommitHash?: string | null;
|
|
527
531
|
headCommitHash?: string | null;
|
|
532
|
+
baseRevisionId?: string | null;
|
|
528
533
|
changedFilesCount?: number;
|
|
529
534
|
insertions?: number;
|
|
530
535
|
deletions?: number;
|
|
@@ -537,12 +542,19 @@ type ApiClient = {
|
|
|
537
542
|
workspaceMetadata?: Record<string, unknown>;
|
|
538
543
|
idempotencyKey?: string;
|
|
539
544
|
}): Promise<Json>;
|
|
545
|
+
listChangeSteps(appId: string, params?: {
|
|
546
|
+
limit?: number;
|
|
547
|
+
offset?: number;
|
|
548
|
+
idempotencyKey?: string;
|
|
549
|
+
}): Promise<Json>;
|
|
540
550
|
startChangeStepReplay(appId: string, payload: {
|
|
541
551
|
prompt: string;
|
|
542
552
|
assistantResponse?: string;
|
|
543
553
|
diff: string;
|
|
544
554
|
baseCommitHash: string;
|
|
545
555
|
targetHeadCommitHash: string;
|
|
556
|
+
baseRevisionId?: string | null;
|
|
557
|
+
targetRevisionId?: string | null;
|
|
546
558
|
expectedPaths: string[];
|
|
547
559
|
actor?: {
|
|
548
560
|
type?: string;
|
|
@@ -684,6 +696,9 @@ type ApiClient = {
|
|
|
684
696
|
syncUpstreamApp(appId: string): Promise<Json>;
|
|
685
697
|
preflightAppReconcile(appId: string, payload: {
|
|
686
698
|
localHeadCommitHash: string;
|
|
699
|
+
baseRevisionId?: string | null;
|
|
700
|
+
localRevisionId?: string | null;
|
|
701
|
+
targetRevisionId?: string | null;
|
|
687
702
|
repoFingerprint?: string;
|
|
688
703
|
remoteUrl?: string;
|
|
689
704
|
defaultBranch?: string;
|
|
@@ -691,6 +706,9 @@ type ApiClient = {
|
|
|
691
706
|
startAppReconcile(appId: string, payload: {
|
|
692
707
|
uploadId: string;
|
|
693
708
|
localHeadCommitHash: string;
|
|
709
|
+
baseRevisionId?: string | null;
|
|
710
|
+
localRevisionId?: string | null;
|
|
711
|
+
targetRevisionId?: string | null;
|
|
694
712
|
repoFingerprint?: string;
|
|
695
713
|
remoteUrl?: string;
|
|
696
714
|
defaultBranch?: string;
|
|
@@ -704,6 +722,7 @@ type ApiClient = {
|
|
|
704
722
|
}>;
|
|
705
723
|
syncLocalApp(appId: string, payload: {
|
|
706
724
|
baseCommitHash: string;
|
|
725
|
+
baseRevisionId?: string | null;
|
|
707
726
|
repoFingerprint?: string;
|
|
708
727
|
remoteUrl?: string;
|
|
709
728
|
defaultBranch?: string;
|
|
@@ -739,6 +758,20 @@ type ApiClient = {
|
|
|
739
758
|
declare function createApiClient(config: CoreConfig, opts?: {
|
|
740
759
|
apiKey?: string | null;
|
|
741
760
|
tokenProvider?: TokenProvider;
|
|
761
|
+
/**
|
|
762
|
+
* Per-request wall-clock budget applied to every call this client makes.
|
|
763
|
+
* When the deadline elapses the underlying fetch is aborted via
|
|
764
|
+
* `AbortSignal.timeout`, which surfaces as an `AbortError`/`TimeoutError`
|
|
765
|
+
* in the caller's catch block.
|
|
766
|
+
*
|
|
767
|
+
* Default: undefined (no timeout — same behavior as before this option
|
|
768
|
+
* existed). Long-tail callers like bundle uploads/downloads or history
|
|
769
|
+
* imports legitimately take longer than any reasonable hook budget, so
|
|
770
|
+
* we only opt-in for short-lived flows that have explicit recovery
|
|
771
|
+
* paths (e.g. plugin Stop hooks, where exceeding the budget triggers
|
|
772
|
+
* a deferred-turn defer + drainer retry).
|
|
773
|
+
*/
|
|
774
|
+
defaultRequestTimeoutMs?: number;
|
|
742
775
|
}): ApiClient;
|
|
743
776
|
|
|
744
777
|
export { type AgentMemoryItem, type AgentMemoryKind, type AgentMemorySearchItem, type AgentMemorySearchResponse, type AgentMemorySummary, type AgentMemoryTimelineResponse, type ApiClient, type AppContext, type AppContextAccessPath, type AppReconcileResponse, type Bundle, type BundlePlatform, type BundleStatus, type ChangeStepDiffResponse, type HistoricalTurnRecord, type HistoryImportCaptureSource, type HistoryImportProvider, type HistoryImportRecordMetadata, type HistoryImportWorkspaceMetadata, type ImportHistoryRecordOutcome, type ImportHistoryRequest, type ImportHistoryResponse, type InitiateBundleRequest, type InvitationRecord, type MergeRequest, type MergeRequestReview, type MergeRequestStatus, type ReconcilePreflightResponse, type SyncLocalResponse, type SyncUpstreamResponse, createApiClient };
|
package/dist/api.js
CHANGED
package/dist/auth.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
createSupabaseAuthHelpers,
|
|
5
5
|
shouldRefreshSoon,
|
|
6
6
|
storedSessionSchema
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-XETDXVGM.js";
|
|
8
|
+
import "./chunk-7XJGOKEO.js";
|
|
9
9
|
export {
|
|
10
10
|
createLocalSessionStore,
|
|
11
11
|
createStoredSessionTokenProvider,
|
package/dist/binding.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
readCollabBinding,
|
|
4
4
|
readCollabBindingState,
|
|
5
5
|
writeCollabBinding
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-DBVN42RF.js";
|
|
7
|
+
import "./chunk-S4ECO35X.js";
|
|
8
8
|
import "./chunk-GC2MOT3U.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-7XJGOKEO.js";
|
|
10
10
|
export {
|
|
11
11
|
getCollabBindingPath,
|
|
12
12
|
readCollabBinding,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/errors/cliError.ts
|
|
2
|
+
var RemixError = class extends Error {
|
|
3
|
+
code;
|
|
4
|
+
exitCode;
|
|
5
|
+
hint;
|
|
6
|
+
// HTTP status code when this error originates from an API response.
|
|
7
|
+
// null for non-HTTP errors (validation, local IO, programming bugs).
|
|
8
|
+
// Callers use this to distinguish transient (5xx) from permanent (4xx)
|
|
9
|
+
// API failures without resorting to error-message string matching.
|
|
10
|
+
statusCode;
|
|
11
|
+
constructor(message, opts) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.name = "RemixError";
|
|
14
|
+
this.code = opts?.code ?? null;
|
|
15
|
+
this.exitCode = opts?.exitCode ?? 1;
|
|
16
|
+
this.hint = opts?.hint ?? null;
|
|
17
|
+
this.statusCode = opts?.statusCode ?? null;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
RemixError
|
|
23
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RemixError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7XJGOKEO.js";
|
|
4
4
|
|
|
5
5
|
// src/api/client.ts
|
|
6
6
|
async function readJsonSafe(res) {
|
|
@@ -15,8 +15,13 @@ async function readJsonSafe(res) {
|
|
|
15
15
|
function createApiClient(config, opts) {
|
|
16
16
|
const apiKey = (opts?.apiKey ?? "").trim();
|
|
17
17
|
const tokenProvider = opts?.tokenProvider;
|
|
18
|
+
const defaultTimeoutMs = typeof opts?.defaultRequestTimeoutMs === "number" && opts.defaultRequestTimeoutMs > 0 ? opts.defaultRequestTimeoutMs : null;
|
|
18
19
|
const CLIENT_KEY_HEADER = "x-comerge-api-key";
|
|
19
|
-
|
|
20
|
+
function makeTimeoutSignal(timeoutMs) {
|
|
21
|
+
const ms = typeof timeoutMs === "number" && timeoutMs > 0 ? timeoutMs : defaultTimeoutMs;
|
|
22
|
+
return ms != null ? AbortSignal.timeout(ms) : void 0;
|
|
23
|
+
}
|
|
24
|
+
async function request(path, init, opts2) {
|
|
20
25
|
if (!tokenProvider) {
|
|
21
26
|
throw new RemixError("API client is missing a token provider.", {
|
|
22
27
|
exitCode: 1,
|
|
@@ -27,6 +32,7 @@ function createApiClient(config, opts) {
|
|
|
27
32
|
const url = new URL(path, config.apiUrl).toString();
|
|
28
33
|
const doFetch = async (bearer) => fetch(url, {
|
|
29
34
|
...init,
|
|
35
|
+
signal: makeTimeoutSignal(opts2?.timeoutMs),
|
|
30
36
|
headers: {
|
|
31
37
|
Accept: "application/json",
|
|
32
38
|
"Content-Type": "application/json",
|
|
@@ -43,12 +49,16 @@ function createApiClient(config, opts) {
|
|
|
43
49
|
if (!res.ok) {
|
|
44
50
|
const body = await readJsonSafe(res);
|
|
45
51
|
const msg = (body && typeof body === "object" && body && "message" in body && typeof body.message === "string" ? body.message : null) ?? `Request failed (status ${res.status})`;
|
|
46
|
-
throw new RemixError(msg, {
|
|
52
|
+
throw new RemixError(msg, {
|
|
53
|
+
exitCode: 1,
|
|
54
|
+
hint: body ? JSON.stringify(body, null, 2) : null,
|
|
55
|
+
statusCode: res.status
|
|
56
|
+
});
|
|
47
57
|
}
|
|
48
58
|
const json = await readJsonSafe(res);
|
|
49
59
|
return json ?? null;
|
|
50
60
|
}
|
|
51
|
-
async function requestBinary(path, init) {
|
|
61
|
+
async function requestBinary(path, init, opts2) {
|
|
52
62
|
if (!tokenProvider) {
|
|
53
63
|
throw new RemixError("API client is missing a token provider.", {
|
|
54
64
|
exitCode: 1,
|
|
@@ -59,6 +69,7 @@ function createApiClient(config, opts) {
|
|
|
59
69
|
const url = new URL(path, config.apiUrl).toString();
|
|
60
70
|
const doFetch = async (bearer) => fetch(url, {
|
|
61
71
|
...init,
|
|
72
|
+
signal: makeTimeoutSignal(opts2?.timeoutMs),
|
|
62
73
|
headers: {
|
|
63
74
|
Accept: "*/*",
|
|
64
75
|
...init?.headers ?? {},
|
|
@@ -74,7 +85,11 @@ function createApiClient(config, opts) {
|
|
|
74
85
|
if (!res.ok) {
|
|
75
86
|
const body = await readJsonSafe(res);
|
|
76
87
|
const msg = (body && typeof body === "object" && body && "message" in body && typeof body.message === "string" ? body.message : null) ?? `Request failed (status ${res.status})`;
|
|
77
|
-
throw new RemixError(msg, {
|
|
88
|
+
throw new RemixError(msg, {
|
|
89
|
+
exitCode: 1,
|
|
90
|
+
hint: body ? JSON.stringify(body, null, 2) : null,
|
|
91
|
+
statusCode: res.status
|
|
92
|
+
});
|
|
78
93
|
}
|
|
79
94
|
const contentDisposition = res.headers.get("content-disposition") ?? "";
|
|
80
95
|
const fileNameMatch = contentDisposition.match(/filename=\"([^\"]+)\"/i);
|
|
@@ -181,6 +196,14 @@ function createApiClient(config, opts) {
|
|
|
181
196
|
method: "POST",
|
|
182
197
|
body: JSON.stringify(payload)
|
|
183
198
|
}),
|
|
199
|
+
listChangeSteps: (appId, params) => {
|
|
200
|
+
const qs = new URLSearchParams();
|
|
201
|
+
if (params?.limit !== void 0) qs.set("limit", String(params.limit));
|
|
202
|
+
if (params?.offset !== void 0) qs.set("offset", String(params.offset));
|
|
203
|
+
if (params?.idempotencyKey) qs.set("idempotencyKey", params.idempotencyKey);
|
|
204
|
+
const suffix = qs.toString() ? `?${qs.toString()}` : "";
|
|
205
|
+
return request(`/v1/apps/${encodeURIComponent(appId)}/change-steps${suffix}`, { method: "GET" });
|
|
206
|
+
},
|
|
184
207
|
createCollabTurn: (appId, payload) => request(`/v1/apps/${encodeURIComponent(appId)}/collab-turns`, {
|
|
185
208
|
method: "POST",
|
|
186
209
|
body: JSON.stringify(payload)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getCurrentBranch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S4ECO35X.js";
|
|
4
4
|
import {
|
|
5
5
|
RemixError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7XJGOKEO.js";
|
|
7
7
|
|
|
8
8
|
// src/infrastructure/binding/collabBindingStore.ts
|
|
9
9
|
import fs2 from "fs/promises";
|
package/dist/collab.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CollabApiClient, a as TurnUsagePayload, b as CollabFinalizeTurnResult, c as CollabRecordingPreflight, d as CollabApproveMode, e as CollabApproveResult, M as MergeRequestQueue, f as MergeRequest, I as InvitationScopeType, g as CollabMember, J as JsonObject, A as AppDeltaResponse, h as CollabStatus, i as MergeRequestReview } from './contracts-
|
|
2
|
-
export { j as AppHeadResponse, k as AppMember, l as AppMemberRole, m as AppReconcileResponse, n as CollabFinalizeTurnAutoSync, o as CollabFinalizeTurnMode, p as CollabPendingFinalizeState, q as CollabPendingFinalizeSummary, r as CollabRecordingPreflightStatus, s as CollabRepoStateKind, t as CollabStatusBlockedReason, u as CollabStatusRecommendedAction, v as CollabTurn, w as MembershipScopeType, x as MergeRequestStatus, y as ModelCall, O as OrganizationMember, z as OrganizationMemberRole, P as ProjectMember, B as ProjectMemberRole, R as ReconcilePreflightResponse, S as ServerToolUsage, D as SyncLocalResponse, E as SyncUpstreamResponse, T as TurnUsage, F as TurnUsageCaptureSource, G as TurnUsageConfidence, H as TurnUsagePreviousPatch } from './contracts-
|
|
1
|
+
import { C as CollabApiClient, a as TurnUsagePayload, b as CollabFinalizeTurnResult, c as CollabRecordingPreflight, d as CollabApproveMode, e as CollabApproveResult, M as MergeRequestQueue, f as MergeRequest, I as InvitationScopeType, g as CollabMember, J as JsonObject, A as AppDeltaResponse, h as CollabStatus, i as MergeRequestReview } from './contracts-DiVLvPTG.js';
|
|
2
|
+
export { j as AppHeadResponse, k as AppMember, l as AppMemberRole, m as AppReconcileResponse, n as CollabFinalizeTurnAutoSync, o as CollabFinalizeTurnMode, p as CollabPendingFinalizeState, q as CollabPendingFinalizeSummary, r as CollabRecordingPreflightStatus, s as CollabRepoStateKind, t as CollabStatusBlockedReason, u as CollabStatusRecommendedAction, v as CollabTurn, w as MembershipScopeType, x as MergeRequestStatus, y as ModelCall, O as OrganizationMember, z as OrganizationMemberRole, P as ProjectMember, B as ProjectMemberRole, R as ReconcilePreflightResponse, S as ServerToolUsage, D as SyncLocalResponse, E as SyncUpstreamResponse, T as TurnUsage, F as TurnUsageCaptureSource, G as TurnUsageConfidence, H as TurnUsagePreviousPatch } from './contracts-DiVLvPTG.js';
|
|
3
3
|
import { B as BranchBindingMode } from './binding-WiIRI2fl.js';
|
|
4
4
|
|
|
5
5
|
declare function collabFinalizeTurn(params: {
|
|
@@ -45,7 +45,7 @@ declare function collabFinalizeTurn(params: {
|
|
|
45
45
|
awaitingUsageDeadlineMs?: number | null;
|
|
46
46
|
}): Promise<CollabFinalizeTurnResult>;
|
|
47
47
|
|
|
48
|
-
declare const FINALIZE_PREFLIGHT_FAILURE_CODES: readonly ["not_bound", "branch_binding_missing", "family_ambiguous", "metadata_conflict", "branch_mismatch", "missing_head", "remote_error", "pull_required", "
|
|
48
|
+
declare const FINALIZE_PREFLIGHT_FAILURE_CODES: readonly ["not_bound", "branch_binding_missing", "family_ambiguous", "metadata_conflict", "branch_mismatch", "missing_head", "remote_error", "pull_required", "reconcile_required", "baseline_missing"];
|
|
49
49
|
type FinalizePreflightFailureCode = (typeof FINALIZE_PREFLIGHT_FAILURE_CODES)[number];
|
|
50
50
|
declare function isFinalizePreflightFailureCode(value: unknown): value is FinalizePreflightFailureCode;
|
|
51
51
|
|
|
@@ -129,7 +129,7 @@ declare function collabUpdateMemberRole(params: {
|
|
|
129
129
|
member: CollabMember;
|
|
130
130
|
}>;
|
|
131
131
|
|
|
132
|
-
type InitBaselineStatus = "seeded" | "existing" | "
|
|
132
|
+
type InitBaselineStatus = "seeded" | "existing" | "baseline_missing" | "requires_sync";
|
|
133
133
|
type CollabInitQueuedResult = {
|
|
134
134
|
queued: true;
|
|
135
135
|
jobId: string;
|
|
@@ -271,90 +271,6 @@ declare function collabList(params: {
|
|
|
271
271
|
};
|
|
272
272
|
}>;
|
|
273
273
|
|
|
274
|
-
declare function collabReAnchor(params: {
|
|
275
|
-
api: CollabApiClient;
|
|
276
|
-
cwd: string;
|
|
277
|
-
dryRun?: boolean;
|
|
278
|
-
allowBranchMismatch?: boolean;
|
|
279
|
-
asyncSubmit?: boolean;
|
|
280
|
-
}): Promise<{
|
|
281
|
-
status: string;
|
|
282
|
-
repoRoot: string;
|
|
283
|
-
branch: string;
|
|
284
|
-
currentAppId: string;
|
|
285
|
-
localHeadCommitHash: string;
|
|
286
|
-
targetHeadCommitHash: string;
|
|
287
|
-
targetHeadCommitId: string;
|
|
288
|
-
warnings: string[];
|
|
289
|
-
applied: boolean;
|
|
290
|
-
dryRun: boolean;
|
|
291
|
-
} | {
|
|
292
|
-
status: "queued";
|
|
293
|
-
queued: true;
|
|
294
|
-
jobId: string;
|
|
295
|
-
repoRoot: string;
|
|
296
|
-
branch: string;
|
|
297
|
-
currentAppId: string;
|
|
298
|
-
dryRun: boolean;
|
|
299
|
-
applied: boolean;
|
|
300
|
-
localHeadCommitHash?: undefined;
|
|
301
|
-
targetHeadCommitHash?: undefined;
|
|
302
|
-
warnings?: undefined;
|
|
303
|
-
} | {
|
|
304
|
-
status: "queued";
|
|
305
|
-
queued: true;
|
|
306
|
-
jobId: string;
|
|
307
|
-
repoRoot: string;
|
|
308
|
-
branch: string;
|
|
309
|
-
currentAppId: string;
|
|
310
|
-
localHeadCommitHash: string;
|
|
311
|
-
targetHeadCommitHash: string;
|
|
312
|
-
warnings: string[];
|
|
313
|
-
dryRun: boolean;
|
|
314
|
-
applied: boolean;
|
|
315
|
-
}>;
|
|
316
|
-
declare function collabReAnchorSubmit(params: {
|
|
317
|
-
api: CollabApiClient;
|
|
318
|
-
cwd: string;
|
|
319
|
-
dryRun?: boolean;
|
|
320
|
-
allowBranchMismatch?: boolean;
|
|
321
|
-
}): Promise<{
|
|
322
|
-
status: string;
|
|
323
|
-
repoRoot: string;
|
|
324
|
-
branch: string;
|
|
325
|
-
currentAppId: string;
|
|
326
|
-
localHeadCommitHash: string;
|
|
327
|
-
targetHeadCommitHash: string;
|
|
328
|
-
targetHeadCommitId: string;
|
|
329
|
-
warnings: string[];
|
|
330
|
-
applied: boolean;
|
|
331
|
-
dryRun: boolean;
|
|
332
|
-
} | {
|
|
333
|
-
status: "queued";
|
|
334
|
-
queued: true;
|
|
335
|
-
jobId: string;
|
|
336
|
-
repoRoot: string;
|
|
337
|
-
branch: string;
|
|
338
|
-
currentAppId: string;
|
|
339
|
-
dryRun: boolean;
|
|
340
|
-
applied: boolean;
|
|
341
|
-
localHeadCommitHash?: undefined;
|
|
342
|
-
targetHeadCommitHash?: undefined;
|
|
343
|
-
warnings?: undefined;
|
|
344
|
-
} | {
|
|
345
|
-
status: "queued";
|
|
346
|
-
queued: true;
|
|
347
|
-
jobId: string;
|
|
348
|
-
repoRoot: string;
|
|
349
|
-
branch: string;
|
|
350
|
-
currentAppId: string;
|
|
351
|
-
localHeadCommitHash: string;
|
|
352
|
-
targetHeadCommitHash: string;
|
|
353
|
-
warnings: string[];
|
|
354
|
-
dryRun: boolean;
|
|
355
|
-
applied: boolean;
|
|
356
|
-
}>;
|
|
357
|
-
|
|
358
274
|
declare function collabReconcile(params: {
|
|
359
275
|
api: CollabApiClient;
|
|
360
276
|
cwd: string;
|
|
@@ -372,41 +288,6 @@ declare function collabReconcile(params: {
|
|
|
372
288
|
applied: boolean;
|
|
373
289
|
dryRun: boolean;
|
|
374
290
|
warnings?: string[];
|
|
375
|
-
} | {
|
|
376
|
-
status: string;
|
|
377
|
-
repoRoot: string;
|
|
378
|
-
branch: string;
|
|
379
|
-
currentAppId: string;
|
|
380
|
-
localHeadCommitHash: string;
|
|
381
|
-
targetHeadCommitHash: string;
|
|
382
|
-
targetHeadCommitId: string;
|
|
383
|
-
warnings: string[];
|
|
384
|
-
applied: boolean;
|
|
385
|
-
dryRun: boolean;
|
|
386
|
-
} | {
|
|
387
|
-
status: "queued";
|
|
388
|
-
queued: true;
|
|
389
|
-
jobId: string;
|
|
390
|
-
repoRoot: string;
|
|
391
|
-
branch: string;
|
|
392
|
-
currentAppId: string;
|
|
393
|
-
dryRun: boolean;
|
|
394
|
-
applied: boolean;
|
|
395
|
-
localHeadCommitHash?: undefined;
|
|
396
|
-
targetHeadCommitHash?: undefined;
|
|
397
|
-
warnings?: undefined;
|
|
398
|
-
} | {
|
|
399
|
-
status: "queued";
|
|
400
|
-
queued: true;
|
|
401
|
-
jobId: string;
|
|
402
|
-
repoRoot: string;
|
|
403
|
-
branch: string;
|
|
404
|
-
currentAppId: string;
|
|
405
|
-
localHeadCommitHash: string;
|
|
406
|
-
targetHeadCommitHash: string;
|
|
407
|
-
warnings: string[];
|
|
408
|
-
dryRun: boolean;
|
|
409
|
-
applied: boolean;
|
|
410
291
|
} | {
|
|
411
292
|
status: string;
|
|
412
293
|
repoRoot: string;
|
|
@@ -528,6 +409,7 @@ type PendingFinalizeJob = {
|
|
|
528
409
|
prompt: string;
|
|
529
410
|
assistantResponse: string;
|
|
530
411
|
baselineSnapshotId: string | null;
|
|
412
|
+
baselineServerRevisionId: string | null;
|
|
531
413
|
baselineServerHeadHash: string | null;
|
|
532
414
|
currentSnapshotId: string;
|
|
533
415
|
capturedAt: string;
|
|
@@ -565,6 +447,27 @@ declare function drainPendingFinalizeQueue(params: {
|
|
|
565
447
|
api: CollabApiClient;
|
|
566
448
|
}): Promise<CollabFinalizeTurnResult[]>;
|
|
567
449
|
|
|
450
|
+
type SnapshotFileMode = "file" | "executable" | "symlink";
|
|
451
|
+
type LocalSnapshotFile = {
|
|
452
|
+
path: string;
|
|
453
|
+
mode: SnapshotFileMode;
|
|
454
|
+
blobHash: string;
|
|
455
|
+
size: number;
|
|
456
|
+
};
|
|
457
|
+
type LocalSnapshotRecord = {
|
|
458
|
+
schemaVersion: 1;
|
|
459
|
+
id: string;
|
|
460
|
+
repoRoot: string;
|
|
461
|
+
repoFingerprint: string | null;
|
|
462
|
+
laneId: string | null;
|
|
463
|
+
branchName: string | null;
|
|
464
|
+
localCommitHash: string | null;
|
|
465
|
+
snapshotHash: string;
|
|
466
|
+
createdAt: string;
|
|
467
|
+
files: LocalSnapshotFile[];
|
|
468
|
+
};
|
|
469
|
+
declare function readLocalSnapshot(snapshotId: string | null | undefined): Promise<LocalSnapshotRecord | null>;
|
|
470
|
+
|
|
568
471
|
type ProcessOutcome = {
|
|
569
472
|
status: "completed";
|
|
570
473
|
jobId: string;
|
|
@@ -584,9 +487,6 @@ type ProcessOutcome = {
|
|
|
584
487
|
declare function collabInitProcess(jobId: string, opts: {
|
|
585
488
|
api: CollabApiClient;
|
|
586
489
|
}): Promise<ProcessOutcome>;
|
|
587
|
-
declare function collabReAnchorProcess(jobId: string, opts: {
|
|
588
|
-
api: CollabApiClient;
|
|
589
|
-
}): Promise<ProcessOutcome>;
|
|
590
490
|
declare function drainAsyncJobs(opts: {
|
|
591
491
|
api: CollabApiClient;
|
|
592
492
|
respectPidLock?: boolean;
|
|
@@ -697,4 +597,4 @@ declare function drainerLogPath(): string;
|
|
|
697
597
|
declare function getDrainerLogPath(): string;
|
|
698
598
|
declare function getDrainerPidPath(): string;
|
|
699
599
|
|
|
700
|
-
export { AppDeltaResponse, type AsyncJob, type AsyncJobBase, type AsyncJobKind, type AsyncJobStatus, type AsyncJobSummary, type AwaitAsyncJobResult, CollabApiClient, CollabApproveMode, CollabApproveResult, CollabFinalizeTurnResult, type CollabInitQueuedResult, CollabMember, CollabRecordingPreflight, CollabStatus, type DrainerLogEvent, FINALIZE_JOB_LOCK_STALE_MS, FINALIZE_PREFLIGHT_FAILURE_CODES, type FinalizePreflightFailureCode, type InitJobPayload, InvitationScopeType, JsonObject, MergeRequest, MergeRequestQueue, MergeRequestReview, type PendingFinalizeJob, type ReAnchorJobPayload, TurnUsagePayload, awaitAsyncJob, cleanStaleFinalizeJobLocks, collabApprove, collabCheckout, collabFinalizeTurn, collabInit, collabInitProcess, collabInitSubmit, collabInvite, collabList, collabListMembers, collabListMergeRequests,
|
|
600
|
+
export { AppDeltaResponse, type AsyncJob, type AsyncJobBase, type AsyncJobKind, type AsyncJobStatus, type AsyncJobSummary, type AwaitAsyncJobResult, CollabApiClient, CollabApproveMode, CollabApproveResult, CollabFinalizeTurnResult, type CollabInitQueuedResult, CollabMember, CollabRecordingPreflight, CollabStatus, type DrainerLogEvent, FINALIZE_JOB_LOCK_STALE_MS, FINALIZE_PREFLIGHT_FAILURE_CODES, type FinalizePreflightFailureCode, type InitJobPayload, InvitationScopeType, JsonObject, type LocalSnapshotRecord, MergeRequest, MergeRequestQueue, MergeRequestReview, type PendingFinalizeJob, type ReAnchorJobPayload, TurnUsagePayload, awaitAsyncJob, cleanStaleFinalizeJobLocks, collabApprove, collabCheckout, collabFinalizeTurn, collabInit, collabInitProcess, collabInitSubmit, collabInvite, collabList, collabListMembers, collabListMergeRequests, collabReconcile, collabRecordingPreflight, collabReject, collabRemix, collabRequestMerge, collabStatus, collabSync, collabSyncUpstream, collabUpdateMemberRole, collabView, deleteAsyncJob, drainAsyncJobs, drainPendingFinalizeQueue, drainerLogPath, findFailedAsyncJob, findPendingAsyncJob, forgetPendingFinalizeJob, getDrainerLogPath, getDrainerPidPath, getMemberRolesForScope, isFinalizePreflightFailureCode, listAsyncJobs, listAsyncJobsForRepo, listPendingFinalizeJobs, processPendingFinalizeJob, pruneTerminalAsyncJobs, readAsyncJob, readLocalSnapshot, readPendingFinalizeJob, requeuePendingFinalizeJob, summarizeAsyncJobs, updatePendingFinalizeJob, validateMemberRole };
|