@remixhq/core 0.1.2
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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/api.d.ts +494 -0
- package/dist/api.js +7 -0
- package/dist/auth.d.ts +27 -0
- package/dist/auth.js +15 -0
- package/dist/binding.d.ts +16 -0
- package/dist/binding.js +11 -0
- package/dist/chunk-2WGZS7CD.js +0 -0
- package/dist/chunk-34WDQCPF.js +242 -0
- package/dist/chunk-4OCNZHHR.js +0 -0
- package/dist/chunk-54CBEP2W.js +570 -0
- package/dist/chunk-55K5GHAZ.js +252 -0
- package/dist/chunk-5H5CZKGN.js +691 -0
- package/dist/chunk-5NTOJXEZ.js +223 -0
- package/dist/chunk-7WUKH3ZD.js +221 -0
- package/dist/chunk-AE2HPMUZ.js +80 -0
- package/dist/chunk-AEAOYVIL.js +200 -0
- package/dist/chunk-BJFCN2C3.js +46 -0
- package/dist/chunk-DCU3646I.js +12 -0
- package/dist/chunk-DEWAIK5X.js +11 -0
- package/dist/chunk-DRD6EVTT.js +447 -0
- package/dist/chunk-E4KAGBU7.js +134 -0
- package/dist/chunk-EF3677RE.js +93 -0
- package/dist/chunk-EVWDYCBL.js +223 -0
- package/dist/chunk-FAZUMWBS.js +93 -0
- package/dist/chunk-GC2MOT3U.js +12 -0
- package/dist/chunk-GFOBGYW4.js +252 -0
- package/dist/chunk-INDDXWAH.js +92 -0
- package/dist/chunk-K57ZFDGC.js +15 -0
- package/dist/chunk-NDA7EJJA.js +286 -0
- package/dist/chunk-NK2DA4X6.js +357 -0
- package/dist/chunk-OJMTW22J.js +286 -0
- package/dist/chunk-OMUDRPUI.js +195 -0
- package/dist/chunk-ONKKRS2C.js +239 -0
- package/dist/chunk-OWFBBWU7.js +196 -0
- package/dist/chunk-P7EM3N73.js +46 -0
- package/dist/chunk-PR5QKMHM.js +46 -0
- package/dist/chunk-RIP2MIZL.js +710 -0
- package/dist/chunk-TQHLFQY4.js +448 -0
- package/dist/chunk-TY3SSQQK.js +688 -0
- package/dist/chunk-UGKPOCN5.js +710 -0
- package/dist/chunk-VM3CGCNX.js +46 -0
- package/dist/chunk-XOQIADCH.js +223 -0
- package/dist/chunk-YZ34ICNN.js +17 -0
- package/dist/chunk-ZBMOGUSJ.js +17 -0
- package/dist/collab.d.ts +680 -0
- package/dist/collab.js +1917 -0
- package/dist/config.d.ts +22 -0
- package/dist/config.js +9 -0
- package/dist/errors.d.ts +21 -0
- package/dist/errors.js +12 -0
- package/dist/index.cjs +1269 -0
- package/dist/index.d.cts +482 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +34 -0
- package/dist/repo.d.ts +66 -0
- package/dist/repo.js +62 -0
- package/dist/tokenProvider-BWTusyj4.d.ts +63 -0
- package/package.json +72 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
declare class CliError extends Error {
|
|
2
|
+
readonly exitCode: number;
|
|
3
|
+
readonly hint: string | null;
|
|
4
|
+
constructor(message: string, opts?: {
|
|
5
|
+
exitCode?: number;
|
|
6
|
+
hint?: string | null;
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type JsonObject = Record<string, any>;
|
|
11
|
+
type SyncLocalResponse = {
|
|
12
|
+
status: "up_to_date" | "ready_to_fast_forward" | "base_unknown" | "conflict_risk";
|
|
13
|
+
baseCommitHash: string;
|
|
14
|
+
targetCommitHash: string;
|
|
15
|
+
targetCommitId: string;
|
|
16
|
+
bundleRef: string | null;
|
|
17
|
+
bundleBase64: string | null;
|
|
18
|
+
bundleEncoding: "base64" | null;
|
|
19
|
+
bundleSizeBytes: number;
|
|
20
|
+
stats: {
|
|
21
|
+
changedFilesCount: number;
|
|
22
|
+
insertions: number;
|
|
23
|
+
deletions: number;
|
|
24
|
+
};
|
|
25
|
+
warnings: string[];
|
|
26
|
+
};
|
|
27
|
+
type SyncUpstreamResponse = {
|
|
28
|
+
status: "up-to-date" | "queued";
|
|
29
|
+
mergeRequestId?: string;
|
|
30
|
+
};
|
|
31
|
+
type ReconcilePreflightResponse = {
|
|
32
|
+
status: "up_to_date" | "ready_to_reconcile" | "metadata_conflict";
|
|
33
|
+
localHeadCommitHash: string;
|
|
34
|
+
targetHeadCommitId: string;
|
|
35
|
+
targetHeadCommitHash: string;
|
|
36
|
+
warnings: string[];
|
|
37
|
+
};
|
|
38
|
+
type AppReconcileResponse = {
|
|
39
|
+
id: string;
|
|
40
|
+
appId: string;
|
|
41
|
+
uploadId: string;
|
|
42
|
+
queueItemId: string | null;
|
|
43
|
+
requestedBy: string;
|
|
44
|
+
repoFingerprint: string | null;
|
|
45
|
+
remoteUrl: string | null;
|
|
46
|
+
defaultBranch: string | null;
|
|
47
|
+
localHeadCommitHash: string;
|
|
48
|
+
targetHeadCommitId: string | null;
|
|
49
|
+
targetHeadCommitHash: string | null;
|
|
50
|
+
mergeBaseCommitHash: string | null;
|
|
51
|
+
reconciledHeadCommitId: string | null;
|
|
52
|
+
reconciledHeadCommitHash: string | null;
|
|
53
|
+
localCommitHashes: string[];
|
|
54
|
+
reconciledCommitIds: string[];
|
|
55
|
+
reconciledCommitHashes: string[];
|
|
56
|
+
status: "pending" | "queued" | "processing" | "succeeded" | "failed" | "manual_reconcile_required" | "cancelled";
|
|
57
|
+
failureKind: string | null;
|
|
58
|
+
statusError: string | null;
|
|
59
|
+
idempotencyKey: string | null;
|
|
60
|
+
resultBundleRef: string | null;
|
|
61
|
+
queuePosition?: number | null;
|
|
62
|
+
runId?: string | null;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
updatedAt: string;
|
|
65
|
+
};
|
|
66
|
+
type CollabApiClient = {
|
|
67
|
+
resolveProjectBinding(params: {
|
|
68
|
+
repoFingerprint?: string;
|
|
69
|
+
remoteUrl?: string;
|
|
70
|
+
}): Promise<unknown>;
|
|
71
|
+
listApps(params?: {
|
|
72
|
+
projectId?: string;
|
|
73
|
+
organizationId?: string;
|
|
74
|
+
forked?: "only" | "exclude" | "all";
|
|
75
|
+
}): Promise<unknown>;
|
|
76
|
+
getApp(appId: string): Promise<unknown>;
|
|
77
|
+
presignImportUploadFirstParty(payload: {
|
|
78
|
+
file: {
|
|
79
|
+
name: string;
|
|
80
|
+
mimeType: string;
|
|
81
|
+
size: number;
|
|
82
|
+
checksumSha256?: string;
|
|
83
|
+
};
|
|
84
|
+
}): Promise<unknown>;
|
|
85
|
+
importFromUploadFirstParty(payload: {
|
|
86
|
+
uploadId: string;
|
|
87
|
+
appName?: string;
|
|
88
|
+
threadId?: string;
|
|
89
|
+
path?: string;
|
|
90
|
+
platform?: string;
|
|
91
|
+
isPublic?: boolean;
|
|
92
|
+
remoteUrl?: string;
|
|
93
|
+
defaultBranch?: string;
|
|
94
|
+
repoFingerprint?: string;
|
|
95
|
+
headCommitHash?: string;
|
|
96
|
+
}): Promise<unknown>;
|
|
97
|
+
forkApp(appId: string, payload?: {
|
|
98
|
+
name?: string;
|
|
99
|
+
platform?: string;
|
|
100
|
+
forkedFromCommitId?: string;
|
|
101
|
+
}): Promise<unknown>;
|
|
102
|
+
downloadAppBundle(appId: string): Promise<{
|
|
103
|
+
data: Buffer;
|
|
104
|
+
fileName: string | null;
|
|
105
|
+
contentType: string | null;
|
|
106
|
+
}>;
|
|
107
|
+
createChangeStep(appId: string, payload: {
|
|
108
|
+
threadId?: string;
|
|
109
|
+
prompt: string;
|
|
110
|
+
diff: string;
|
|
111
|
+
baseCommitHash?: string | null;
|
|
112
|
+
headCommitHash?: string | null;
|
|
113
|
+
changedFilesCount?: number;
|
|
114
|
+
insertions?: number;
|
|
115
|
+
deletions?: number;
|
|
116
|
+
actor?: {
|
|
117
|
+
type?: string;
|
|
118
|
+
name?: string;
|
|
119
|
+
version?: string;
|
|
120
|
+
provider?: string;
|
|
121
|
+
};
|
|
122
|
+
workspaceMetadata?: Record<string, unknown>;
|
|
123
|
+
idempotencyKey?: string;
|
|
124
|
+
}): Promise<unknown>;
|
|
125
|
+
getChangeStep(appId: string, changeStepId: string): Promise<unknown>;
|
|
126
|
+
listMergeRequests(params?: {
|
|
127
|
+
sourceAppId?: string;
|
|
128
|
+
targetAppId?: string;
|
|
129
|
+
status?: string | string[];
|
|
130
|
+
kind?: string;
|
|
131
|
+
}): Promise<unknown>;
|
|
132
|
+
openMergeRequest(sourceAppId: string): Promise<unknown>;
|
|
133
|
+
getMergeRequestReview(mrId: string): Promise<unknown>;
|
|
134
|
+
updateMergeRequest(mrId: string, payload: {
|
|
135
|
+
title?: string;
|
|
136
|
+
description?: string;
|
|
137
|
+
status?: string;
|
|
138
|
+
}): Promise<unknown>;
|
|
139
|
+
createProjectInvite(projectId: string, payload: {
|
|
140
|
+
email: string;
|
|
141
|
+
role?: string;
|
|
142
|
+
ttlDays?: number;
|
|
143
|
+
}): Promise<unknown>;
|
|
144
|
+
syncUpstreamApp(appId: string): Promise<unknown>;
|
|
145
|
+
preflightAppReconcile(appId: string, payload: {
|
|
146
|
+
localHeadCommitHash: string;
|
|
147
|
+
repoFingerprint?: string;
|
|
148
|
+
remoteUrl?: string;
|
|
149
|
+
defaultBranch?: string;
|
|
150
|
+
}): Promise<unknown>;
|
|
151
|
+
startAppReconcile(appId: string, payload: {
|
|
152
|
+
uploadId: string;
|
|
153
|
+
localHeadCommitHash: string;
|
|
154
|
+
repoFingerprint?: string;
|
|
155
|
+
remoteUrl?: string;
|
|
156
|
+
defaultBranch?: string;
|
|
157
|
+
idempotencyKey?: string;
|
|
158
|
+
}): Promise<unknown>;
|
|
159
|
+
getAppReconcile(appId: string, reconcileId: string): Promise<unknown>;
|
|
160
|
+
downloadAppReconcileBundle(appId: string, reconcileId: string): Promise<{
|
|
161
|
+
data: Buffer;
|
|
162
|
+
fileName: string | null;
|
|
163
|
+
contentType: string | null;
|
|
164
|
+
}>;
|
|
165
|
+
syncLocalApp(appId: string, payload: {
|
|
166
|
+
baseCommitHash: string;
|
|
167
|
+
repoFingerprint?: string;
|
|
168
|
+
remoteUrl?: string;
|
|
169
|
+
defaultBranch?: string;
|
|
170
|
+
dryRun?: boolean;
|
|
171
|
+
}): Promise<unknown>;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
type CollabBinding = {
|
|
175
|
+
schemaVersion: 1;
|
|
176
|
+
projectId: string;
|
|
177
|
+
currentAppId: string;
|
|
178
|
+
upstreamAppId: string;
|
|
179
|
+
threadId: string | null;
|
|
180
|
+
repoFingerprint: string | null;
|
|
181
|
+
remoteUrl: string | null;
|
|
182
|
+
defaultBranch: string | null;
|
|
183
|
+
};
|
|
184
|
+
declare function getCollabBindingPath(repoRoot: string): string;
|
|
185
|
+
declare function readCollabBinding(repoRoot: string): Promise<CollabBinding | null>;
|
|
186
|
+
declare function writeCollabBinding(repoRoot: string, binding: Omit<CollabBinding, "schemaVersion">): Promise<string>;
|
|
187
|
+
|
|
188
|
+
declare function normalizeGitRemote(remote: string | null | undefined): string | null;
|
|
189
|
+
declare function findGitRoot(startDir: string): Promise<string>;
|
|
190
|
+
declare function getCurrentBranch(cwd: string): Promise<string | null>;
|
|
191
|
+
declare function getRemoteOriginUrl(cwd: string): Promise<string | null>;
|
|
192
|
+
declare function getDefaultBranch(cwd: string): Promise<string | null>;
|
|
193
|
+
declare function listUntrackedFiles(cwd: string): Promise<string[]>;
|
|
194
|
+
declare function getWorkingTreeDiff(cwd: string): Promise<string>;
|
|
195
|
+
declare function writeTempUnifiedDiffBackup(diff: string, prefix?: string): Promise<{
|
|
196
|
+
backupPath: string;
|
|
197
|
+
}>;
|
|
198
|
+
declare function getHeadCommitHash(cwd: string): Promise<string | null>;
|
|
199
|
+
declare function createGitBundle(cwd: string, bundleName?: string): Promise<{
|
|
200
|
+
bundlePath: string;
|
|
201
|
+
headCommitHash: string;
|
|
202
|
+
}>;
|
|
203
|
+
declare function ensureCleanWorktree(cwd: string, operation?: string): Promise<void>;
|
|
204
|
+
declare function discardTrackedChanges(cwd: string, operation?: string): Promise<string>;
|
|
205
|
+
declare function requireCurrentBranch(cwd: string): Promise<string>;
|
|
206
|
+
declare function importGitBundle(cwd: string, bundlePath: string, bundleRef: string): Promise<void>;
|
|
207
|
+
declare function cloneGitBundleToDirectory(bundlePath: string, targetDir: string): Promise<void>;
|
|
208
|
+
declare function ensureGitInfoExcludeEntries(cwd: string, entries: string[]): Promise<void>;
|
|
209
|
+
declare function ensureCommitExists(cwd: string, commitHash: string): Promise<void>;
|
|
210
|
+
declare function fastForwardToCommit(cwd: string, commitHash: string): Promise<string>;
|
|
211
|
+
declare function createBackupBranch(cwd: string, params?: {
|
|
212
|
+
branchName?: string | null;
|
|
213
|
+
sourceCommitHash?: string | null;
|
|
214
|
+
prefix?: string | null;
|
|
215
|
+
}): Promise<{
|
|
216
|
+
branchName: string;
|
|
217
|
+
commitHash: string;
|
|
218
|
+
}>;
|
|
219
|
+
declare function hardResetToCommit(cwd: string, commitHash: string, operation?: string): Promise<string>;
|
|
220
|
+
declare function buildRepoFingerprint(params: {
|
|
221
|
+
gitRoot: string;
|
|
222
|
+
remoteUrl: string | null;
|
|
223
|
+
defaultBranch?: string | null;
|
|
224
|
+
}): Promise<string>;
|
|
225
|
+
declare function summarizeUnifiedDiff(diff: string): {
|
|
226
|
+
changedFilesCount: number;
|
|
227
|
+
insertions: number;
|
|
228
|
+
deletions: number;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
declare function collabInit(params: {
|
|
232
|
+
api: CollabApiClient;
|
|
233
|
+
cwd: string;
|
|
234
|
+
appName?: string | null;
|
|
235
|
+
path?: string | null;
|
|
236
|
+
forceNew?: boolean;
|
|
237
|
+
}): Promise<{
|
|
238
|
+
reused: boolean;
|
|
239
|
+
projectId: string;
|
|
240
|
+
appId: string;
|
|
241
|
+
upstreamAppId: string;
|
|
242
|
+
bindingPath: string;
|
|
243
|
+
repoRoot: string;
|
|
244
|
+
remoteUrl?: undefined;
|
|
245
|
+
defaultBranch?: undefined;
|
|
246
|
+
} | {
|
|
247
|
+
reused: boolean;
|
|
248
|
+
projectId: string;
|
|
249
|
+
appId: string;
|
|
250
|
+
upstreamAppId: string;
|
|
251
|
+
bindingPath: string;
|
|
252
|
+
repoRoot: string;
|
|
253
|
+
remoteUrl: string | null;
|
|
254
|
+
defaultBranch: string | null;
|
|
255
|
+
}>;
|
|
256
|
+
|
|
257
|
+
declare function collabList(params: {
|
|
258
|
+
api: CollabApiClient;
|
|
259
|
+
}): Promise<{
|
|
260
|
+
apps: JsonObject[];
|
|
261
|
+
}>;
|
|
262
|
+
|
|
263
|
+
declare function collabRemix(params: {
|
|
264
|
+
api: CollabApiClient;
|
|
265
|
+
cwd: string;
|
|
266
|
+
appId?: string | null;
|
|
267
|
+
name?: string | null;
|
|
268
|
+
}): Promise<{
|
|
269
|
+
appId: string;
|
|
270
|
+
projectId: string;
|
|
271
|
+
upstreamAppId: string;
|
|
272
|
+
bindingPath: string;
|
|
273
|
+
repoRoot: string;
|
|
274
|
+
}>;
|
|
275
|
+
|
|
276
|
+
declare function collabAdd(params: {
|
|
277
|
+
api: CollabApiClient;
|
|
278
|
+
cwd: string;
|
|
279
|
+
prompt: string;
|
|
280
|
+
diff?: string | null;
|
|
281
|
+
diffSource?: "worktree" | "external";
|
|
282
|
+
sync?: boolean;
|
|
283
|
+
idempotencyKey?: string | null;
|
|
284
|
+
actor?: {
|
|
285
|
+
type?: string;
|
|
286
|
+
name?: string;
|
|
287
|
+
version?: string;
|
|
288
|
+
provider?: string;
|
|
289
|
+
};
|
|
290
|
+
}): Promise<JsonObject>;
|
|
291
|
+
|
|
292
|
+
declare function collabSync(params: {
|
|
293
|
+
api: CollabApiClient;
|
|
294
|
+
cwd: string;
|
|
295
|
+
dryRun: boolean;
|
|
296
|
+
}): Promise<{
|
|
297
|
+
status: "ready_to_fast_forward";
|
|
298
|
+
branch: string;
|
|
299
|
+
repoRoot: string;
|
|
300
|
+
baseCommitHash: string;
|
|
301
|
+
targetCommitHash: string;
|
|
302
|
+
targetCommitId: string;
|
|
303
|
+
stats: {
|
|
304
|
+
changedFilesCount: number;
|
|
305
|
+
insertions: number;
|
|
306
|
+
deletions: number;
|
|
307
|
+
};
|
|
308
|
+
bundleRef: string | null;
|
|
309
|
+
bundleSizeBytes: number;
|
|
310
|
+
localCommitHash: string;
|
|
311
|
+
applied: boolean;
|
|
312
|
+
dryRun: boolean;
|
|
313
|
+
} | {
|
|
314
|
+
status: "up_to_date";
|
|
315
|
+
branch: string;
|
|
316
|
+
repoRoot: string;
|
|
317
|
+
baseCommitHash: string;
|
|
318
|
+
targetCommitHash: string;
|
|
319
|
+
targetCommitId: string;
|
|
320
|
+
stats: {
|
|
321
|
+
changedFilesCount: number;
|
|
322
|
+
insertions: number;
|
|
323
|
+
deletions: number;
|
|
324
|
+
};
|
|
325
|
+
localCommitHash: string;
|
|
326
|
+
applied: boolean;
|
|
327
|
+
dryRun: boolean;
|
|
328
|
+
}>;
|
|
329
|
+
|
|
330
|
+
declare function collabSyncUpstream(params: {
|
|
331
|
+
api: CollabApiClient;
|
|
332
|
+
cwd: string;
|
|
333
|
+
}): Promise<{
|
|
334
|
+
status: "up-to-date";
|
|
335
|
+
repoRoot: string;
|
|
336
|
+
appId: string;
|
|
337
|
+
upstreamAppId: string;
|
|
338
|
+
localUpdated: boolean;
|
|
339
|
+
mergeRequestId?: undefined;
|
|
340
|
+
remoteHeadCommitId?: undefined;
|
|
341
|
+
localSync?: undefined;
|
|
342
|
+
} | {
|
|
343
|
+
status: "queued";
|
|
344
|
+
mergeRequestId: string | null;
|
|
345
|
+
repoRoot: string;
|
|
346
|
+
appId: string;
|
|
347
|
+
upstreamAppId: string;
|
|
348
|
+
remoteHeadCommitId: string | null;
|
|
349
|
+
localSync: {
|
|
350
|
+
status: "ready_to_fast_forward";
|
|
351
|
+
branch: string;
|
|
352
|
+
repoRoot: string;
|
|
353
|
+
baseCommitHash: string;
|
|
354
|
+
targetCommitHash: string;
|
|
355
|
+
targetCommitId: string;
|
|
356
|
+
stats: {
|
|
357
|
+
changedFilesCount: number;
|
|
358
|
+
insertions: number;
|
|
359
|
+
deletions: number;
|
|
360
|
+
};
|
|
361
|
+
bundleRef: string | null;
|
|
362
|
+
bundleSizeBytes: number;
|
|
363
|
+
localCommitHash: string;
|
|
364
|
+
applied: boolean;
|
|
365
|
+
dryRun: boolean;
|
|
366
|
+
} | {
|
|
367
|
+
status: "up_to_date";
|
|
368
|
+
branch: string;
|
|
369
|
+
repoRoot: string;
|
|
370
|
+
baseCommitHash: string;
|
|
371
|
+
targetCommitHash: string;
|
|
372
|
+
targetCommitId: string;
|
|
373
|
+
stats: {
|
|
374
|
+
changedFilesCount: number;
|
|
375
|
+
insertions: number;
|
|
376
|
+
deletions: number;
|
|
377
|
+
};
|
|
378
|
+
localCommitHash: string;
|
|
379
|
+
applied: boolean;
|
|
380
|
+
dryRun: boolean;
|
|
381
|
+
};
|
|
382
|
+
localUpdated: boolean;
|
|
383
|
+
}>;
|
|
384
|
+
|
|
385
|
+
declare function collabReconcile(params: {
|
|
386
|
+
api: CollabApiClient;
|
|
387
|
+
cwd: string;
|
|
388
|
+
dryRun: boolean;
|
|
389
|
+
}): Promise<{
|
|
390
|
+
status: "ready_to_fast_forward";
|
|
391
|
+
branch: string;
|
|
392
|
+
repoRoot: string;
|
|
393
|
+
baseCommitHash: string;
|
|
394
|
+
targetCommitHash: string;
|
|
395
|
+
targetCommitId: string;
|
|
396
|
+
stats: {
|
|
397
|
+
changedFilesCount: number;
|
|
398
|
+
insertions: number;
|
|
399
|
+
deletions: number;
|
|
400
|
+
};
|
|
401
|
+
bundleRef: string | null;
|
|
402
|
+
bundleSizeBytes: number;
|
|
403
|
+
localCommitHash: string;
|
|
404
|
+
applied: boolean;
|
|
405
|
+
dryRun: boolean;
|
|
406
|
+
} | {
|
|
407
|
+
status: "up_to_date";
|
|
408
|
+
branch: string;
|
|
409
|
+
repoRoot: string;
|
|
410
|
+
baseCommitHash: string;
|
|
411
|
+
targetCommitHash: string;
|
|
412
|
+
targetCommitId: string;
|
|
413
|
+
stats: {
|
|
414
|
+
changedFilesCount: number;
|
|
415
|
+
insertions: number;
|
|
416
|
+
deletions: number;
|
|
417
|
+
};
|
|
418
|
+
localCommitHash: string;
|
|
419
|
+
applied: boolean;
|
|
420
|
+
dryRun: boolean;
|
|
421
|
+
} | {
|
|
422
|
+
status: "ready_to_reconcile";
|
|
423
|
+
branch: string;
|
|
424
|
+
repoRoot: string;
|
|
425
|
+
localHeadCommitHash: string;
|
|
426
|
+
targetHeadCommitId: string;
|
|
427
|
+
targetHeadCommitHash: string;
|
|
428
|
+
warnings: string[];
|
|
429
|
+
applied: boolean;
|
|
430
|
+
dryRun: boolean;
|
|
431
|
+
} | {
|
|
432
|
+
status: "queued" | "pending" | "processing" | "succeeded" | "failed" | "manual_reconcile_required" | "cancelled";
|
|
433
|
+
reconcileId: string;
|
|
434
|
+
mergeBaseCommitHash: string;
|
|
435
|
+
reconciledHeadCommitId: string | null;
|
|
436
|
+
reconciledHeadCommitHash: string;
|
|
437
|
+
backupBranchName: string;
|
|
438
|
+
localCommitHash: string;
|
|
439
|
+
applied: boolean;
|
|
440
|
+
dryRun: boolean;
|
|
441
|
+
branch: string;
|
|
442
|
+
repoRoot: string;
|
|
443
|
+
localHeadCommitHash: string;
|
|
444
|
+
targetHeadCommitId: string;
|
|
445
|
+
targetHeadCommitHash: string;
|
|
446
|
+
warnings: string[];
|
|
447
|
+
}>;
|
|
448
|
+
|
|
449
|
+
declare function collabRequestMerge(params: {
|
|
450
|
+
api: CollabApiClient;
|
|
451
|
+
cwd: string;
|
|
452
|
+
}): Promise<JsonObject>;
|
|
453
|
+
|
|
454
|
+
declare function collabInbox(params: {
|
|
455
|
+
api: CollabApiClient;
|
|
456
|
+
}): Promise<{
|
|
457
|
+
mergeRequests: any;
|
|
458
|
+
}>;
|
|
459
|
+
|
|
460
|
+
declare function collabView(params: {
|
|
461
|
+
api: CollabApiClient;
|
|
462
|
+
mrId: string;
|
|
463
|
+
}): Promise<JsonObject>;
|
|
464
|
+
|
|
465
|
+
declare function collabApprove(params: {
|
|
466
|
+
api: CollabApiClient;
|
|
467
|
+
mrId: string;
|
|
468
|
+
}): Promise<JsonObject>;
|
|
469
|
+
|
|
470
|
+
declare function collabReject(params: {
|
|
471
|
+
api: CollabApiClient;
|
|
472
|
+
mrId: string;
|
|
473
|
+
}): Promise<JsonObject>;
|
|
474
|
+
|
|
475
|
+
declare function collabInvite(params: {
|
|
476
|
+
api: CollabApiClient;
|
|
477
|
+
cwd: string;
|
|
478
|
+
email: string;
|
|
479
|
+
role?: string | null;
|
|
480
|
+
}): Promise<JsonObject>;
|
|
481
|
+
|
|
482
|
+
export { type AppReconcileResponse, CliError, type CollabApiClient, type CollabBinding, type JsonObject, type ReconcilePreflightResponse, type SyncLocalResponse, type SyncUpstreamResponse, buildRepoFingerprint, cloneGitBundleToDirectory, collabAdd, collabApprove, collabInbox, collabInit, collabInvite, collabList, collabReconcile, collabReject, collabRemix, collabRequestMerge, collabSync, collabSyncUpstream, collabView, createBackupBranch, createGitBundle, discardTrackedChanges, ensureCleanWorktree, ensureCommitExists, ensureGitInfoExcludeEntries, fastForwardToCommit, findGitRoot, getCollabBindingPath, getCurrentBranch, getDefaultBranch, getHeadCommitHash, getRemoteOriginUrl, getWorkingTreeDiff, hardResetToCommit, importGitBundle, listUntrackedFiles, normalizeGitRemote, readCollabBinding, requireCurrentBranch, summarizeUnifiedDiff, writeCollabBinding, writeTempUnifiedDiffBackup };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { CliError, REMIX_ERROR_CODES, CliError as RemixError, RemixErrorCode } from './errors.js';
|
|
2
|
+
export { CoreConfig, ResolveConfigOptions, configSchema, resolveConfig } from './config.js';
|
|
3
|
+
export { S as SessionStore, a as StoredSession, c as createStoredSessionTokenProvider, s as shouldRefreshSoon, b as storedSessionSchema } from './tokenProvider-BWTusyj4.js';
|
|
4
|
+
export { createLocalSessionStore, createSupabaseAuthHelpers } from './auth.js';
|
|
5
|
+
export { AgentMemoryItem, AgentMemoryKind, AgentMemorySearchItem, AgentMemorySearchResponse, AgentMemorySummary, AgentMemoryTimelineResponse, ApiClient, AppReconcileResponse, Bundle, BundlePlatform, BundleStatus, ChangeStepDiffResponse, InitiateBundleRequest, MergeRequest, MergeRequestReview, MergeRequestStatus, ReconcilePreflightResponse, SyncLocalResponse, SyncUpstreamResponse, createApiClient } from './api.js';
|
|
6
|
+
import 'zod';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createApiClient
|
|
3
|
+
} from "./chunk-OJMTW22J.js";
|
|
4
|
+
import {
|
|
5
|
+
createLocalSessionStore,
|
|
6
|
+
createStoredSessionTokenProvider,
|
|
7
|
+
createSupabaseAuthHelpers,
|
|
8
|
+
shouldRefreshSoon,
|
|
9
|
+
storedSessionSchema
|
|
10
|
+
} from "./chunk-EVWDYCBL.js";
|
|
11
|
+
import {
|
|
12
|
+
configSchema,
|
|
13
|
+
resolveConfig
|
|
14
|
+
} from "./chunk-VM3CGCNX.js";
|
|
15
|
+
import "./chunk-4OCNZHHR.js";
|
|
16
|
+
import {
|
|
17
|
+
REMIX_ERROR_CODES
|
|
18
|
+
} from "./chunk-GC2MOT3U.js";
|
|
19
|
+
import {
|
|
20
|
+
RemixError
|
|
21
|
+
} from "./chunk-YZ34ICNN.js";
|
|
22
|
+
export {
|
|
23
|
+
RemixError as CliError,
|
|
24
|
+
REMIX_ERROR_CODES,
|
|
25
|
+
RemixError,
|
|
26
|
+
configSchema,
|
|
27
|
+
createApiClient,
|
|
28
|
+
createLocalSessionStore,
|
|
29
|
+
createStoredSessionTokenProvider,
|
|
30
|
+
createSupabaseAuthHelpers,
|
|
31
|
+
resolveConfig,
|
|
32
|
+
shouldRefreshSoon,
|
|
33
|
+
storedSessionSchema
|
|
34
|
+
};
|
package/dist/repo.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
declare function normalizeGitRemote(remote: string | null | undefined): string | null;
|
|
2
|
+
type RepoSnapshot = {
|
|
3
|
+
branch: string | null;
|
|
4
|
+
headCommitHash: string | null;
|
|
5
|
+
statusEntries: string[];
|
|
6
|
+
statusSha256: string;
|
|
7
|
+
workspaceDiffSha256: string | null;
|
|
8
|
+
};
|
|
9
|
+
declare function findGitRoot(startDir: string): Promise<string>;
|
|
10
|
+
declare function getAbsoluteGitDir(cwd: string): Promise<string>;
|
|
11
|
+
declare function getGitCommonDir(cwd: string): Promise<string>;
|
|
12
|
+
declare function getGitPath(cwd: string, relativePath: string): Promise<string>;
|
|
13
|
+
declare function getCurrentBranch(cwd: string): Promise<string | null>;
|
|
14
|
+
declare function getRemoteOriginUrl(cwd: string): Promise<string | null>;
|
|
15
|
+
declare function getDefaultBranch(cwd: string): Promise<string | null>;
|
|
16
|
+
declare function listUntrackedFiles(cwd: string): Promise<string[]>;
|
|
17
|
+
declare function getWorkingTreeDiff(cwd: string): Promise<string>;
|
|
18
|
+
declare function getWorkspaceDiff(cwd: string): Promise<{
|
|
19
|
+
diff: string;
|
|
20
|
+
includedUntrackedPaths: string[];
|
|
21
|
+
}>;
|
|
22
|
+
declare function writeTempUnifiedDiffBackup(diff: string, prefix?: string): Promise<{
|
|
23
|
+
backupPath: string;
|
|
24
|
+
diffSha256: string;
|
|
25
|
+
}>;
|
|
26
|
+
declare function getHeadCommitHash(cwd: string): Promise<string | null>;
|
|
27
|
+
declare function createGitBundle(cwd: string, bundleName?: string): Promise<{
|
|
28
|
+
bundlePath: string;
|
|
29
|
+
headCommitHash: string;
|
|
30
|
+
}>;
|
|
31
|
+
declare function captureRepoSnapshot(cwd: string, options?: {
|
|
32
|
+
includeWorkspaceDiffHash?: boolean;
|
|
33
|
+
}): Promise<RepoSnapshot>;
|
|
34
|
+
declare function assertRepoSnapshotUnchanged(cwd: string, snapshot: RepoSnapshot, params?: {
|
|
35
|
+
operation?: string | null;
|
|
36
|
+
recoveryHint?: string | null;
|
|
37
|
+
}): Promise<void>;
|
|
38
|
+
declare function ensureCleanWorktree(cwd: string, operation?: string): Promise<void>;
|
|
39
|
+
declare function discardTrackedChanges(cwd: string, operation?: string): Promise<string>;
|
|
40
|
+
declare function requireCurrentBranch(cwd: string): Promise<string>;
|
|
41
|
+
declare function importGitBundle(cwd: string, bundlePath: string, bundleRef: string): Promise<void>;
|
|
42
|
+
declare function cloneGitBundleToDirectory(bundlePath: string, targetDir: string): Promise<void>;
|
|
43
|
+
declare function ensureGitInfoExcludeEntries(cwd: string, entries: string[]): Promise<void>;
|
|
44
|
+
declare function ensureCommitExists(cwd: string, commitHash: string): Promise<void>;
|
|
45
|
+
declare function fastForwardToCommit(cwd: string, commitHash: string): Promise<string>;
|
|
46
|
+
declare function createBackupBranch(cwd: string, params?: {
|
|
47
|
+
branchName?: string | null;
|
|
48
|
+
sourceCommitHash?: string | null;
|
|
49
|
+
prefix?: string | null;
|
|
50
|
+
}): Promise<{
|
|
51
|
+
branchName: string;
|
|
52
|
+
commitHash: string;
|
|
53
|
+
}>;
|
|
54
|
+
declare function hardResetToCommit(cwd: string, commitHash: string, operation?: string): Promise<string>;
|
|
55
|
+
declare function buildRepoFingerprint(params: {
|
|
56
|
+
gitRoot: string;
|
|
57
|
+
remoteUrl: string | null;
|
|
58
|
+
defaultBranch?: string | null;
|
|
59
|
+
}): Promise<string>;
|
|
60
|
+
declare function summarizeUnifiedDiff(diff: string): {
|
|
61
|
+
changedFilesCount: number;
|
|
62
|
+
insertions: number;
|
|
63
|
+
deletions: number;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export { assertRepoSnapshotUnchanged, buildRepoFingerprint, captureRepoSnapshot, cloneGitBundleToDirectory, createBackupBranch, createGitBundle, discardTrackedChanges, ensureCleanWorktree, ensureCommitExists, ensureGitInfoExcludeEntries, fastForwardToCommit, findGitRoot, getAbsoluteGitDir, getCurrentBranch, getDefaultBranch, getGitCommonDir, getGitPath, getHeadCommitHash, getRemoteOriginUrl, getWorkingTreeDiff, getWorkspaceDiff, hardResetToCommit, importGitBundle, listUntrackedFiles, normalizeGitRemote, requireCurrentBranch, summarizeUnifiedDiff, writeTempUnifiedDiffBackup };
|
package/dist/repo.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertRepoSnapshotUnchanged,
|
|
3
|
+
buildRepoFingerprint,
|
|
4
|
+
captureRepoSnapshot,
|
|
5
|
+
cloneGitBundleToDirectory,
|
|
6
|
+
createBackupBranch,
|
|
7
|
+
createGitBundle,
|
|
8
|
+
discardTrackedChanges,
|
|
9
|
+
ensureCleanWorktree,
|
|
10
|
+
ensureCommitExists,
|
|
11
|
+
ensureGitInfoExcludeEntries,
|
|
12
|
+
fastForwardToCommit,
|
|
13
|
+
findGitRoot,
|
|
14
|
+
getAbsoluteGitDir,
|
|
15
|
+
getCurrentBranch,
|
|
16
|
+
getDefaultBranch,
|
|
17
|
+
getGitCommonDir,
|
|
18
|
+
getGitPath,
|
|
19
|
+
getHeadCommitHash,
|
|
20
|
+
getRemoteOriginUrl,
|
|
21
|
+
getWorkingTreeDiff,
|
|
22
|
+
getWorkspaceDiff,
|
|
23
|
+
hardResetToCommit,
|
|
24
|
+
importGitBundle,
|
|
25
|
+
listUntrackedFiles,
|
|
26
|
+
normalizeGitRemote,
|
|
27
|
+
requireCurrentBranch,
|
|
28
|
+
summarizeUnifiedDiff,
|
|
29
|
+
writeTempUnifiedDiffBackup
|
|
30
|
+
} from "./chunk-UGKPOCN5.js";
|
|
31
|
+
import "./chunk-GC2MOT3U.js";
|
|
32
|
+
import "./chunk-YZ34ICNN.js";
|
|
33
|
+
export {
|
|
34
|
+
assertRepoSnapshotUnchanged,
|
|
35
|
+
buildRepoFingerprint,
|
|
36
|
+
captureRepoSnapshot,
|
|
37
|
+
cloneGitBundleToDirectory,
|
|
38
|
+
createBackupBranch,
|
|
39
|
+
createGitBundle,
|
|
40
|
+
discardTrackedChanges,
|
|
41
|
+
ensureCleanWorktree,
|
|
42
|
+
ensureCommitExists,
|
|
43
|
+
ensureGitInfoExcludeEntries,
|
|
44
|
+
fastForwardToCommit,
|
|
45
|
+
findGitRoot,
|
|
46
|
+
getAbsoluteGitDir,
|
|
47
|
+
getCurrentBranch,
|
|
48
|
+
getDefaultBranch,
|
|
49
|
+
getGitCommonDir,
|
|
50
|
+
getGitPath,
|
|
51
|
+
getHeadCommitHash,
|
|
52
|
+
getRemoteOriginUrl,
|
|
53
|
+
getWorkingTreeDiff,
|
|
54
|
+
getWorkspaceDiff,
|
|
55
|
+
hardResetToCommit,
|
|
56
|
+
importGitBundle,
|
|
57
|
+
listUntrackedFiles,
|
|
58
|
+
normalizeGitRemote,
|
|
59
|
+
requireCurrentBranch,
|
|
60
|
+
summarizeUnifiedDiff,
|
|
61
|
+
writeTempUnifiedDiffBackup
|
|
62
|
+
};
|