@remixhq/core 0.1.14 → 0.1.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.
Files changed (72) hide show
  1. package/dist/api.d.ts +1 -1
  2. package/dist/collab.d.ts +2 -2
  3. package/dist/collab.js +1 -1
  4. package/dist/{contracts-NbV3P_Rl.d.ts → contracts-CHmD-fMj.d.ts} +1 -1
  5. package/dist/history.d.ts +64 -0
  6. package/dist/history.js +529 -0
  7. package/dist/index.d.ts +1 -1
  8. package/package.json +6 -2
  9. package/dist/chunk-2WGZS7CD.js +0 -0
  10. package/dist/chunk-34WDQCPF.js +0 -242
  11. package/dist/chunk-4276ARDF.js +0 -303
  12. package/dist/chunk-4L3ZBZUQ.js +0 -281
  13. package/dist/chunk-54CBEP2W.js +0 -570
  14. package/dist/chunk-55K5GHAZ.js +0 -252
  15. package/dist/chunk-5H5CZKGN.js +0 -691
  16. package/dist/chunk-5NTOJXEZ.js +0 -223
  17. package/dist/chunk-7WUKH3ZD.js +0 -221
  18. package/dist/chunk-AE2HPMUZ.js +0 -80
  19. package/dist/chunk-AEAOYVIL.js +0 -200
  20. package/dist/chunk-B5S3PUIR.js +0 -388
  21. package/dist/chunk-BJFCN2C3.js +0 -46
  22. package/dist/chunk-BNKPTE2U.js +0 -401
  23. package/dist/chunk-C5NBNU32.js +0 -240
  24. package/dist/chunk-CJFGQE7D.js +0 -46
  25. package/dist/chunk-CUUXZSKW.js +0 -611
  26. package/dist/chunk-DCU3646I.js +0 -12
  27. package/dist/chunk-DEWAIK5X.js +0 -11
  28. package/dist/chunk-DRD6EVTT.js +0 -447
  29. package/dist/chunk-DXCL6I4Q.js +0 -399
  30. package/dist/chunk-E4KAGBU7.js +0 -134
  31. package/dist/chunk-E6AYE22H.js +0 -343
  32. package/dist/chunk-EF3677RE.js +0 -93
  33. package/dist/chunk-EVWDYCBL.js +0 -223
  34. package/dist/chunk-EW4PWFHB.js +0 -46
  35. package/dist/chunk-FAZUMWBS.js +0 -93
  36. package/dist/chunk-GEHSFPCD.js +0 -93
  37. package/dist/chunk-GFOBGYW4.js +0 -252
  38. package/dist/chunk-INDDXWAH.js +0 -92
  39. package/dist/chunk-IXWQWFYT.js +0 -342
  40. package/dist/chunk-J3J4PBQ7.js +0 -710
  41. package/dist/chunk-K54U353Z.js +0 -691
  42. package/dist/chunk-K57ZFDGC.js +0 -15
  43. package/dist/chunk-NDA7EJJA.js +0 -286
  44. package/dist/chunk-NK2DA4X6.js +0 -357
  45. package/dist/chunk-OBYR4JHZ.js +0 -374
  46. package/dist/chunk-OJMTW22J.js +0 -286
  47. package/dist/chunk-OMUDRPUI.js +0 -195
  48. package/dist/chunk-ONKKRS2C.js +0 -239
  49. package/dist/chunk-OWFBBWU7.js +0 -196
  50. package/dist/chunk-OZRXDDEL.js +0 -46
  51. package/dist/chunk-P7EM3N73.js +0 -46
  52. package/dist/chunk-POYB6MCQ.js +0 -373
  53. package/dist/chunk-PR5QKMHM.js +0 -46
  54. package/dist/chunk-R44EOUS4.js +0 -288
  55. package/dist/chunk-R7FVSCQW.js +0 -415
  56. package/dist/chunk-RIP2MIZL.js +0 -710
  57. package/dist/chunk-RKMMEML5.js +0 -46
  58. package/dist/chunk-RM2BGDBB.js +0 -400
  59. package/dist/chunk-RREREIGW.js +0 -710
  60. package/dist/chunk-TQHLFQY4.js +0 -448
  61. package/dist/chunk-TY3SSQQK.js +0 -688
  62. package/dist/chunk-UGKPOCN5.js +0 -710
  63. package/dist/chunk-UIGKSCTD.js +0 -406
  64. package/dist/chunk-UWIVJRTI.js +0 -343
  65. package/dist/chunk-VA6WXRWB.js +0 -636
  66. package/dist/chunk-XC2FV57P.js +0 -385
  67. package/dist/chunk-XOQIADCH.js +0 -223
  68. package/dist/chunk-ZAQZKEH4.js +0 -46
  69. package/dist/chunk-ZBMOGUSJ.js +0 -17
  70. package/dist/chunk-ZXP6ENQY.js +0 -244
  71. package/dist/index.cjs +0 -1269
  72. package/dist/index.d.cts +0 -482
package/dist/index.d.cts DELETED
@@ -1,482 +0,0 @@
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 };