@remixhq/core 0.1.13 → 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 (78) hide show
  1. package/dist/api.d.ts +76 -1
  2. package/dist/api.js +1 -1
  3. package/dist/auth.js +1 -1
  4. package/dist/binding-WiIRI2fl.d.ts +43 -0
  5. package/dist/binding.d.ts +1 -21
  6. package/dist/binding.js +2 -0
  7. package/dist/{chunk-EVWDYCBL.js → chunk-P6JHXOV4.js} +36 -23
  8. package/dist/{chunk-R7FVSCQW.js → chunk-US5SM7ZC.js} +19 -1
  9. package/dist/collab.d.ts +376 -611
  10. package/dist/collab.js +2381 -376
  11. package/dist/contracts-CHmD-fMj.d.ts +677 -0
  12. package/dist/history.d.ts +64 -0
  13. package/dist/history.js +529 -0
  14. package/dist/index.d.ts +1 -0
  15. package/dist/index.js +2 -2
  16. package/package.json +9 -3
  17. package/dist/chunk-2WGZS7CD.js +0 -0
  18. package/dist/chunk-34WDQCPF.js +0 -242
  19. package/dist/chunk-4276ARDF.js +0 -303
  20. package/dist/chunk-4L3ZBZUQ.js +0 -281
  21. package/dist/chunk-54CBEP2W.js +0 -570
  22. package/dist/chunk-55K5GHAZ.js +0 -252
  23. package/dist/chunk-5H5CZKGN.js +0 -691
  24. package/dist/chunk-5NTOJXEZ.js +0 -223
  25. package/dist/chunk-7WUKH3ZD.js +0 -221
  26. package/dist/chunk-AE2HPMUZ.js +0 -80
  27. package/dist/chunk-AEAOYVIL.js +0 -200
  28. package/dist/chunk-B5S3PUIR.js +0 -388
  29. package/dist/chunk-BJFCN2C3.js +0 -46
  30. package/dist/chunk-BNKPTE2U.js +0 -401
  31. package/dist/chunk-C5NBNU32.js +0 -240
  32. package/dist/chunk-CJFGQE7D.js +0 -46
  33. package/dist/chunk-CUUXZSKW.js +0 -611
  34. package/dist/chunk-DCU3646I.js +0 -12
  35. package/dist/chunk-DEWAIK5X.js +0 -11
  36. package/dist/chunk-DRD6EVTT.js +0 -447
  37. package/dist/chunk-DXCL6I4Q.js +0 -399
  38. package/dist/chunk-E4KAGBU7.js +0 -134
  39. package/dist/chunk-E6AYE22H.js +0 -343
  40. package/dist/chunk-EF3677RE.js +0 -93
  41. package/dist/chunk-EW4PWFHB.js +0 -46
  42. package/dist/chunk-FAZUMWBS.js +0 -93
  43. package/dist/chunk-GEHSFPCD.js +0 -93
  44. package/dist/chunk-GFOBGYW4.js +0 -252
  45. package/dist/chunk-INDDXWAH.js +0 -92
  46. package/dist/chunk-IXWQWFYT.js +0 -342
  47. package/dist/chunk-J3J4PBQ7.js +0 -710
  48. package/dist/chunk-K54U353Z.js +0 -691
  49. package/dist/chunk-K57ZFDGC.js +0 -15
  50. package/dist/chunk-NDA7EJJA.js +0 -286
  51. package/dist/chunk-NK2DA4X6.js +0 -357
  52. package/dist/chunk-OBYR4JHZ.js +0 -374
  53. package/dist/chunk-OJMTW22J.js +0 -286
  54. package/dist/chunk-OMUDRPUI.js +0 -195
  55. package/dist/chunk-ONKKRS2C.js +0 -239
  56. package/dist/chunk-OWFBBWU7.js +0 -196
  57. package/dist/chunk-OZRXDDEL.js +0 -46
  58. package/dist/chunk-P7EM3N73.js +0 -46
  59. package/dist/chunk-POYB6MCQ.js +0 -373
  60. package/dist/chunk-PR5QKMHM.js +0 -46
  61. package/dist/chunk-R44EOUS4.js +0 -288
  62. package/dist/chunk-RIP2MIZL.js +0 -710
  63. package/dist/chunk-RKMMEML5.js +0 -46
  64. package/dist/chunk-RM2BGDBB.js +0 -400
  65. package/dist/chunk-RREREIGW.js +0 -710
  66. package/dist/chunk-TQHLFQY4.js +0 -448
  67. package/dist/chunk-TY3SSQQK.js +0 -688
  68. package/dist/chunk-UGKPOCN5.js +0 -710
  69. package/dist/chunk-UIGKSCTD.js +0 -406
  70. package/dist/chunk-UWIVJRTI.js +0 -343
  71. package/dist/chunk-VA6WXRWB.js +0 -636
  72. package/dist/chunk-XC2FV57P.js +0 -385
  73. package/dist/chunk-XOQIADCH.js +0 -223
  74. package/dist/chunk-ZAQZKEH4.js +0 -46
  75. package/dist/chunk-ZBMOGUSJ.js +0 -17
  76. package/dist/chunk-ZXP6ENQY.js +0 -244
  77. package/dist/index.cjs +0 -1269
  78. package/dist/index.d.cts +0 -482
@@ -0,0 +1,677 @@
1
+ type JsonObject = Record<string, any>;
2
+
3
+ type TurnUsageCaptureSource = "agent_supplied" | "hook" | "proxy" | "historical_import" | "unknown";
4
+ type TurnUsageConfidence = "exact" | "partial" | "unknown";
5
+ type ModelCall = {
6
+ provider: string;
7
+ model: string | null;
8
+ tier: string | null;
9
+ requestId: string | null;
10
+ timestamp: string | null;
11
+ isSidechain: boolean;
12
+ inputTokens: number | null;
13
+ outputTokens: number | null;
14
+ cacheReadTokens: number | null;
15
+ cacheWriteTokens: number | null;
16
+ cacheWrite5mTokens: number | null;
17
+ cacheWrite1hTokens: number | null;
18
+ reasoningTokens: number | null;
19
+ audioInputTokens: number | null;
20
+ imageInputTokens: number | null;
21
+ };
22
+ type ServerToolUsage = {
23
+ provider: string;
24
+ tool: string;
25
+ unit: string;
26
+ quantity: number;
27
+ };
28
+ type TurnUsage = {
29
+ schemaVersion: 1;
30
+ capturedAt: string;
31
+ captureSource: TurnUsageCaptureSource;
32
+ confidence: TurnUsageConfidence;
33
+ agent: {
34
+ name: string;
35
+ version: string | null;
36
+ sessionId: string | null;
37
+ turnId: string | null;
38
+ plan: string | null;
39
+ };
40
+ calls: ModelCall[];
41
+ serverTools: ServerToolUsage[];
42
+ warnings: {
43
+ code: string;
44
+ message: string;
45
+ }[];
46
+ extensions: Record<string, unknown> | null;
47
+ };
48
+ type TurnUsagePreviousPatch = {
49
+ previousAgentTurnId: string;
50
+ previousSessionId: string;
51
+ usage: TurnUsage;
52
+ };
53
+ type TurnUsagePayload = {
54
+ schemaVersion: 1;
55
+ currentTurn: TurnUsage | null;
56
+ previousTurn: TurnUsagePreviousPatch | null;
57
+ };
58
+ type MergeRequestStatus = "open" | "approved" | "rejected" | "merged" | "closed";
59
+ type MergeRequestQueue = "reviewable" | "created_by_me" | "app_reviewable" | "app_outgoing" | "app_related_visible";
60
+ type MergeRequest = {
61
+ id: string;
62
+ sourceAppId: string;
63
+ sourceCommitId: string;
64
+ sourceTipCommitId: string | null;
65
+ targetAppId: string;
66
+ targetCommitId: string | null;
67
+ kind: "merge" | "sync";
68
+ status: MergeRequestStatus;
69
+ title: string | null;
70
+ description: string | null;
71
+ category: string | null;
72
+ tags: string[] | null;
73
+ createdBy: string;
74
+ reviewedBy: string | null;
75
+ mergedBy: string | null;
76
+ createdAt: string;
77
+ updatedAt: string;
78
+ mergedAt: string | null;
79
+ closedAt: string | null;
80
+ };
81
+ type MergeRequestReviewPrompt = {
82
+ commitId: string;
83
+ messageId: string | null;
84
+ prompt: string | null;
85
+ };
86
+ type MergeRequestReviewChangeStep = {
87
+ id: string;
88
+ appId: string;
89
+ threadId: string | null;
90
+ messageId: string | null;
91
+ commitId: string | null;
92
+ baseCommitHash: string | null;
93
+ headCommitHash: string | null;
94
+ changedFilesCount: number | null;
95
+ insertions: number | null;
96
+ deletions: number | null;
97
+ status: string | null;
98
+ statusError: string | null;
99
+ actor: {
100
+ type: string | null;
101
+ name: string | null;
102
+ version: string | null;
103
+ provider: string | null;
104
+ };
105
+ workspaceMetadata: JsonObject | null;
106
+ prompt: string | null;
107
+ diff: string;
108
+ createdAt: string;
109
+ };
110
+ type MergeRequestReview = {
111
+ mergeRequest: MergeRequest;
112
+ prompts: MergeRequestReviewPrompt[];
113
+ changeSteps: MergeRequestReviewChangeStep[];
114
+ unifiedDiff: string;
115
+ stats: {
116
+ changeStepCount: number;
117
+ changedFilesCount: number;
118
+ insertions: number;
119
+ deletions: number;
120
+ };
121
+ };
122
+ type CollabApproveMode = "remote-only" | "sync-target-repo";
123
+ type CollabStatusBlockedReason = "not_git_repo" | "not_bound" | "branch_binding_missing" | "family_ambiguous" | "missing_head" | "detached_head" | "branch_mismatch" | "dirty_worktree" | "baseline_missing" | "metadata_conflict" | "remote_error";
124
+ type CollabRepoStateKind = "idle" | "local_only_changed" | "server_only_changed" | "both_changed" | "external_local_base_changed" | "metadata_conflict" | "binding_problem";
125
+ type CollabPendingFinalizeState = "idle" | "queued" | "processing" | "retry_scheduled" | "awaiting_usage" | "failed";
126
+ type CollabPendingFinalizeSummary = {
127
+ state: CollabPendingFinalizeState;
128
+ activeJobCount: number;
129
+ queuedJobCount: number;
130
+ processingJobCount: number;
131
+ retryScheduledJobCount: number;
132
+ awaitingUsageJobCount: number;
133
+ failedJobCount: number;
134
+ oldestCapturedAt: string | null;
135
+ newestCapturedAt: string | null;
136
+ nextRetryAt: string | null;
137
+ latestError: string | null;
138
+ };
139
+ type CollabStatusRecommendedAction = "init" | "pull" | "re_anchor" | "reconcile" | "await_finalize" | "record" | "review_queue" | "choose_family" | "no_action";
140
+ type CollabStatus = {
141
+ schemaVersion: 1;
142
+ repo: {
143
+ isGitRepo: boolean;
144
+ repoRoot: string | null;
145
+ branch: string | null;
146
+ branchMismatch: boolean;
147
+ headCommitHash: string | null;
148
+ worktree: {
149
+ isClean: boolean;
150
+ entryCount: number;
151
+ hasTrackedChanges: boolean;
152
+ hasUntrackedFiles: boolean;
153
+ preview: string[];
154
+ };
155
+ };
156
+ binding: {
157
+ isBound: boolean;
158
+ path: string | null;
159
+ projectId: string | null;
160
+ currentAppId: string | null;
161
+ upstreamAppId: string | null;
162
+ isRemix: boolean | null;
163
+ threadId: string | null;
164
+ repoFingerprint: string | null;
165
+ remoteUrl: string | null;
166
+ dashboardUrl: string | null;
167
+ defaultBranch: string | null;
168
+ laneId: string | null;
169
+ branchName: string | null;
170
+ bindingMode: "legacy" | "lane" | "explicit_root" | null;
171
+ };
172
+ remote: {
173
+ checked: boolean;
174
+ error: string | null;
175
+ appStatus: string | null;
176
+ incomingOpenMergeRequestCount: number | null;
177
+ outgoingOpenMergeRequestCount: number | null;
178
+ };
179
+ sync: {
180
+ checked: boolean;
181
+ error: string | null;
182
+ canApply: boolean;
183
+ status: "not_available" | SyncLocalResponse["status"];
184
+ blockedReasons: CollabStatusBlockedReason[];
185
+ warnings: string[];
186
+ targetCommitHash: string | null;
187
+ targetCommitId: string | null;
188
+ stats: SyncLocalResponse["stats"] | null;
189
+ };
190
+ reconcile: {
191
+ checked: boolean;
192
+ error: string | null;
193
+ canApply: boolean;
194
+ status: "not_available" | "not_needed" | ReconcilePreflightResponse["status"];
195
+ blockedReasons: CollabStatusBlockedReason[];
196
+ warnings: string[];
197
+ targetHeadCommitHash: string | null;
198
+ targetHeadCommitId: string | null;
199
+ };
200
+ alignment: {
201
+ checked: boolean;
202
+ error: string | null;
203
+ repoState: CollabRepoStateKind | null;
204
+ canRecordTurn: boolean;
205
+ pendingFinalize: CollabPendingFinalizeSummary;
206
+ baseline: {
207
+ lastSnapshotId: string | null;
208
+ lastSnapshotHash: string | null;
209
+ lastServerHeadHash: string | null;
210
+ lastSeenLocalCommitHash: string | null;
211
+ };
212
+ current: {
213
+ snapshotHash: string | null;
214
+ serverHeadHash: string | null;
215
+ serverHeadCommitId: string | null;
216
+ localCommitHash: string | null;
217
+ };
218
+ };
219
+ recommendedAction: CollabStatusRecommendedAction;
220
+ warnings: string[];
221
+ };
222
+ type SyncLocalResponse = {
223
+ status: "up_to_date" | "delta_ready" | "ready_to_fast_forward" | "base_unknown" | "conflict_risk";
224
+ baseCommitHash: string;
225
+ targetCommitHash: string;
226
+ targetCommitId: string;
227
+ bundleRef: string | null;
228
+ bundleBase64: string | null;
229
+ bundleEncoding: "base64" | null;
230
+ bundleSizeBytes: number;
231
+ stats: {
232
+ changedFilesCount: number;
233
+ insertions: number;
234
+ deletions: number;
235
+ };
236
+ warnings: string[];
237
+ };
238
+ type AppHeadResponse = {
239
+ appId: string;
240
+ headCommitId: string;
241
+ headCommitHash: string;
242
+ status: string;
243
+ updatedAt: string;
244
+ };
245
+ type AppDeltaResponse = {
246
+ status: "up_to_date" | "delta_ready" | "base_unknown" | "content_equivalent" | "conflict_risk";
247
+ baseHeadHash: string;
248
+ targetHeadHash: string;
249
+ targetHeadCommitId: string | null;
250
+ diff: string;
251
+ diffSha256: string | null;
252
+ stats: {
253
+ changedFilesCount: number;
254
+ insertions: number;
255
+ deletions: number;
256
+ };
257
+ warnings: string[];
258
+ };
259
+ type SyncUpstreamResponse = {
260
+ status: "up-to-date" | "queued";
261
+ mergeRequestId?: string;
262
+ };
263
+ type CollabRecordingPreflightStatus = "not_git_repo" | "not_bound" | "branch_binding_missing" | "family_ambiguous" | "missing_head" | "branch_mismatch" | "metadata_conflict" | "ready" | "pull_required" | "re_anchor_required" | "reconcile_required";
264
+ type CollabRecordingPreflight = {
265
+ status: CollabRecordingPreflightStatus;
266
+ repoState: CollabRepoStateKind | null;
267
+ repoRoot: string | null;
268
+ appId: string | null;
269
+ currentBranch: string | null;
270
+ branchName: string | null;
271
+ headCommitHash: string | null;
272
+ worktreeClean: boolean;
273
+ syncStatus: SyncLocalResponse["status"] | AppDeltaResponse["status"] | null;
274
+ syncTargetCommitHash: string | null;
275
+ syncTargetCommitId: string | null;
276
+ reconcileTargetHeadCommitHash: string | null;
277
+ reconcileTargetHeadCommitId: string | null;
278
+ warnings: string[];
279
+ hint: string | null;
280
+ };
281
+ type ReconcilePreflightResponse = {
282
+ status: "up_to_date" | "ready_to_reconcile" | "metadata_conflict";
283
+ localHeadCommitHash: string;
284
+ targetHeadCommitId: string;
285
+ targetHeadCommitHash: string;
286
+ warnings: string[];
287
+ };
288
+ type AppReconcileResponse = {
289
+ id: string;
290
+ appId: string;
291
+ uploadId: string;
292
+ queueItemId: string | null;
293
+ requestedBy: string;
294
+ repoFingerprint: string | null;
295
+ remoteUrl: string | null;
296
+ defaultBranch: string | null;
297
+ localHeadCommitHash: string;
298
+ targetHeadCommitId: string | null;
299
+ targetHeadCommitHash: string | null;
300
+ mergeBaseCommitHash: string | null;
301
+ reconciledHeadCommitId: string | null;
302
+ reconciledHeadCommitHash: string | null;
303
+ localCommitHashes: string[];
304
+ reconciledCommitIds: string[];
305
+ reconciledCommitHashes: string[];
306
+ status: "pending" | "queued" | "processing" | "succeeded" | "failed" | "manual_reconcile_required" | "cancelled";
307
+ failureKind: string | null;
308
+ statusError: string | null;
309
+ idempotencyKey: string | null;
310
+ resultBundleRef: string | null;
311
+ queuePosition?: number | null;
312
+ runId?: string | null;
313
+ createdAt: string;
314
+ updatedAt: string;
315
+ };
316
+ type CollabApproveResult = {
317
+ mode: CollabApproveMode;
318
+ mergeRequestId: string;
319
+ terminalStatus: MergeRequestStatus;
320
+ targetAppId: string;
321
+ mergeRequest: MergeRequest;
322
+ repoRoot?: string;
323
+ localSync?: {
324
+ status: SyncLocalResponse["status"];
325
+ branch: string;
326
+ repoRoot: string;
327
+ baseCommitHash: string;
328
+ targetCommitHash: string;
329
+ targetCommitId: string | null;
330
+ stats: SyncLocalResponse["stats"];
331
+ bundleRef?: string | null;
332
+ bundleSizeBytes?: number;
333
+ localCommitHash: string | null;
334
+ applied: boolean;
335
+ dryRun: boolean;
336
+ };
337
+ };
338
+ type CollabTurn = {
339
+ id: string;
340
+ appId: string;
341
+ threadId: string;
342
+ humanMessageId: string;
343
+ assistantMessageId: string;
344
+ changeStepId: string | null;
345
+ actor: {
346
+ type: string;
347
+ name: string | null;
348
+ version: string | null;
349
+ provider: string | null;
350
+ };
351
+ workspaceMetadata: JsonObject | null;
352
+ idempotencyKey: string | null;
353
+ createdBy: string;
354
+ createdAt: string;
355
+ updatedAt: string;
356
+ prompt: string | null;
357
+ assistantResponse: string | null;
358
+ };
359
+ type CollabFinalizeTurnMode = "changed_turn" | "no_diff_turn";
360
+ type CollabFinalizeTurnAutoSync = {
361
+ requested: boolean;
362
+ eligible: boolean;
363
+ attempted: boolean;
364
+ applied: boolean;
365
+ trackedChangesDiscarded: boolean;
366
+ capturedUntrackedPathsCandidate: string[];
367
+ localHeadBefore: string | null;
368
+ localHeadAfter: string | null;
369
+ localRepoMutated: boolean;
370
+ };
371
+ type CollabFinalizeTurnResult = {
372
+ mode: CollabFinalizeTurnMode;
373
+ idempotencyKey: string;
374
+ queued: boolean;
375
+ jobId: string | null;
376
+ repoState: CollabRepoStateKind | null;
377
+ changeStep: JsonObject | null;
378
+ collabTurn: CollabTurn | null;
379
+ autoSync: CollabFinalizeTurnAutoSync | null;
380
+ warnings: string[];
381
+ };
382
+ type InvitationScopeType = "organization" | "project" | "app";
383
+ type MembershipScopeType = InvitationScopeType;
384
+ type OrganizationMemberRole = "owner" | "admin" | "member" | "viewer";
385
+ type ProjectMemberRole = "owner" | "maintainer" | "editor" | "viewer";
386
+ type AppMemberRole = "owner" | "maintainer" | "editor" | "viewer";
387
+ type OrganizationMember = {
388
+ id: string;
389
+ userId: string;
390
+ organizationId: string;
391
+ role: OrganizationMemberRole;
392
+ invitedBy: string | null;
393
+ createdAt: string;
394
+ updatedAt: string;
395
+ };
396
+ type ProjectMember = {
397
+ id: string;
398
+ userId: string;
399
+ projectId: string;
400
+ role: ProjectMemberRole;
401
+ invitedBy: string | null;
402
+ createdAt: string;
403
+ updatedAt: string;
404
+ };
405
+ type AppMember = {
406
+ id: string;
407
+ userId: string;
408
+ appId: string;
409
+ role: AppMemberRole;
410
+ invitedBy: string | null;
411
+ createdAt: string;
412
+ updatedAt: string;
413
+ };
414
+ type CollabMember = OrganizationMember | ProjectMember | AppMember;
415
+ type CollabApiClient = {
416
+ resolveProjectBinding(params: {
417
+ repoFingerprint?: string;
418
+ remoteUrl?: string;
419
+ branchName?: string;
420
+ }): Promise<unknown>;
421
+ resolveProjectLaneBinding(params: {
422
+ projectId?: string;
423
+ repoFingerprint?: string;
424
+ remoteUrl?: string;
425
+ defaultBranch?: string;
426
+ branchName: string;
427
+ }): Promise<unknown>;
428
+ ensureProjectLaneBinding(payload: {
429
+ projectId?: string;
430
+ repoFingerprint?: string;
431
+ remoteUrl?: string;
432
+ defaultBranch?: string;
433
+ branchName: string;
434
+ seedAppId?: string;
435
+ seedHeadCommitHash?: string;
436
+ }): Promise<unknown>;
437
+ bootstrapFreshProjectLane(payload: {
438
+ projectId?: string;
439
+ repoFingerprint?: string;
440
+ remoteUrl?: string;
441
+ defaultBranch?: string;
442
+ branchName: string;
443
+ seedAppId: string;
444
+ seedHeadCommitHash?: string;
445
+ }): Promise<unknown>;
446
+ getOrganization(orgId: string): Promise<unknown>;
447
+ getProject(projectId: string): Promise<unknown>;
448
+ listApps(params?: {
449
+ projectId?: string;
450
+ organizationId?: string;
451
+ ownership?: "mine" | "shared" | "all";
452
+ accessScope?: "all_readable" | "explicit_member";
453
+ createdBy?: "me" | string;
454
+ forked?: "only" | "exclude" | "all";
455
+ limit?: number;
456
+ offset?: number;
457
+ }): Promise<unknown>;
458
+ getApp(appId: string): Promise<unknown>;
459
+ getAppHead(appId: string): Promise<unknown>;
460
+ getAppDelta(appId: string, payload: {
461
+ baseHeadHash: string;
462
+ targetHeadHash?: string;
463
+ localSnapshotHash?: string;
464
+ repoFingerprint?: string;
465
+ remoteUrl?: string;
466
+ defaultBranch?: string;
467
+ }): Promise<unknown>;
468
+ getMergeRequest(mrId: string): Promise<unknown>;
469
+ presignImportUploadFirstParty(payload: {
470
+ file: {
471
+ name: string;
472
+ mimeType: string;
473
+ size: number;
474
+ checksumSha256?: string;
475
+ };
476
+ }): Promise<unknown>;
477
+ importFromUploadFirstParty(payload: {
478
+ uploadId: string;
479
+ appName?: string;
480
+ threadId?: string;
481
+ branch?: string;
482
+ path?: string;
483
+ platform?: string;
484
+ isPublic?: boolean;
485
+ remoteUrl?: string;
486
+ defaultBranch?: string;
487
+ repoFingerprint?: string;
488
+ headCommitHash?: string;
489
+ forceNew?: boolean;
490
+ }): Promise<unknown>;
491
+ forkApp(appId: string, payload?: {
492
+ name?: string;
493
+ platform?: string;
494
+ forkedFromCommitId?: string;
495
+ branchName?: string;
496
+ }): Promise<unknown>;
497
+ downloadAppBundle(appId: string): Promise<{
498
+ data: Buffer;
499
+ fileName: string | null;
500
+ contentType: string | null;
501
+ }>;
502
+ createChangeStep(appId: string, payload: {
503
+ threadId?: string;
504
+ collabLaneId?: string;
505
+ prompt: string;
506
+ assistantResponse?: string;
507
+ diff: string;
508
+ baseCommitHash?: string | null;
509
+ headCommitHash?: string | null;
510
+ changedFilesCount?: number;
511
+ insertions?: number;
512
+ deletions?: number;
513
+ actor?: {
514
+ type?: string;
515
+ name?: string;
516
+ version?: string;
517
+ provider?: string;
518
+ };
519
+ workspaceMetadata?: Record<string, unknown>;
520
+ idempotencyKey?: string;
521
+ }): Promise<unknown>;
522
+ startChangeStepReplay(appId: string, payload: {
523
+ prompt: string;
524
+ assistantResponse?: string;
525
+ diff: string;
526
+ baseCommitHash: string;
527
+ targetHeadCommitHash: string;
528
+ expectedPaths: string[];
529
+ actor?: {
530
+ type?: string;
531
+ name?: string;
532
+ version?: string;
533
+ provider?: string;
534
+ };
535
+ workspaceMetadata?: Record<string, unknown>;
536
+ idempotencyKey?: string;
537
+ }): Promise<unknown>;
538
+ getChangeStepReplay(appId: string, replayId: string): Promise<unknown>;
539
+ getChangeStepReplayDiff(appId: string, replayId: string): Promise<unknown>;
540
+ createCollabTurn(appId: string, payload: {
541
+ threadId?: string;
542
+ collabLaneId?: string;
543
+ prompt: string;
544
+ assistantResponse: string;
545
+ actor?: {
546
+ type?: string;
547
+ name?: string;
548
+ version?: string;
549
+ provider?: string;
550
+ };
551
+ workspaceMetadata?: Record<string, unknown>;
552
+ idempotencyKey?: string;
553
+ }): Promise<unknown>;
554
+ attachCollabTurnUsage(appId: string, payload: {
555
+ prompt: string;
556
+ workspaceMetadata: {
557
+ turnUsage: TurnUsagePayload;
558
+ } & Record<string, unknown>;
559
+ }): Promise<unknown>;
560
+ getChangeStep(appId: string, changeStepId: string): Promise<unknown>;
561
+ listMergeRequests(params?: {
562
+ queue?: MergeRequestQueue;
563
+ appId?: string;
564
+ sourceAppId?: string;
565
+ targetAppId?: string;
566
+ status?: string | string[];
567
+ kind?: string;
568
+ limit?: number;
569
+ offset?: number;
570
+ }): Promise<unknown>;
571
+ listCollabTurns(appId: string, params?: {
572
+ limit?: number;
573
+ offset?: number;
574
+ changeStepId?: string;
575
+ threadId?: string;
576
+ collabLaneId?: string;
577
+ createdAfter?: string;
578
+ createdBefore?: string;
579
+ }): Promise<unknown>;
580
+ openMergeRequest(sourceAppId: string): Promise<unknown>;
581
+ getMergeRequestReview(mrId: string): Promise<unknown>;
582
+ updateMergeRequest(mrId: string, payload: {
583
+ title?: string;
584
+ description?: string;
585
+ status?: string;
586
+ }): Promise<unknown>;
587
+ createOrganizationInvite(orgId: string, payload: {
588
+ email: string;
589
+ role?: string;
590
+ ttlDays?: number;
591
+ }): Promise<unknown>;
592
+ createProjectInvite(projectId: string, payload: {
593
+ email: string;
594
+ role?: string;
595
+ ttlDays?: number;
596
+ }): Promise<unknown>;
597
+ createAppInvite(appId: string, payload: {
598
+ email: string;
599
+ role?: string;
600
+ ttlDays?: number;
601
+ }): Promise<unknown>;
602
+ listOrganizationMembers(orgId: string, params?: {
603
+ limit?: number;
604
+ offset?: number;
605
+ }): Promise<unknown>;
606
+ updateOrganizationMember(orgId: string, userId: string, payload: {
607
+ role: OrganizationMemberRole;
608
+ }): Promise<unknown>;
609
+ listProjectMembers(projectId: string, params?: {
610
+ limit?: number;
611
+ offset?: number;
612
+ }): Promise<unknown>;
613
+ updateProjectMember(projectId: string, userId: string, payload: {
614
+ role: ProjectMemberRole;
615
+ }): Promise<unknown>;
616
+ listAppMembers(appId: string, params?: {
617
+ limit?: number;
618
+ offset?: number;
619
+ }): Promise<unknown>;
620
+ updateAppMember(appId: string, userId: string, payload: {
621
+ role: AppMemberRole;
622
+ }): Promise<unknown>;
623
+ listOrganizationInvites(orgId: string, params?: {
624
+ limit?: number;
625
+ offset?: number;
626
+ }): Promise<unknown>;
627
+ listProjectInvites(projectId: string, params?: {
628
+ limit?: number;
629
+ offset?: number;
630
+ }): Promise<unknown>;
631
+ listAppInvites(appId: string, params?: {
632
+ limit?: number;
633
+ offset?: number;
634
+ }): Promise<unknown>;
635
+ resendOrganizationInvite(orgId: string, inviteId: string, payload?: {
636
+ ttlDays?: number;
637
+ }): Promise<unknown>;
638
+ resendProjectInvite(projectId: string, inviteId: string, payload?: {
639
+ ttlDays?: number;
640
+ }): Promise<unknown>;
641
+ resendAppInvite(appId: string, inviteId: string, payload?: {
642
+ ttlDays?: number;
643
+ }): Promise<unknown>;
644
+ revokeOrganizationInvite(orgId: string, inviteId: string): Promise<unknown>;
645
+ revokeProjectInvite(projectId: string, inviteId: string): Promise<unknown>;
646
+ revokeAppInvite(appId: string, inviteId: string): Promise<unknown>;
647
+ syncUpstreamApp(appId: string): Promise<unknown>;
648
+ preflightAppReconcile(appId: string, payload: {
649
+ localHeadCommitHash: string;
650
+ repoFingerprint?: string;
651
+ remoteUrl?: string;
652
+ defaultBranch?: string;
653
+ }): Promise<unknown>;
654
+ startAppReconcile(appId: string, payload: {
655
+ uploadId: string;
656
+ localHeadCommitHash: string;
657
+ repoFingerprint?: string;
658
+ remoteUrl?: string;
659
+ defaultBranch?: string;
660
+ idempotencyKey?: string;
661
+ }): Promise<unknown>;
662
+ getAppReconcile(appId: string, reconcileId: string): Promise<unknown>;
663
+ downloadAppReconcileBundle(appId: string, reconcileId: string): Promise<{
664
+ data: Buffer;
665
+ fileName: string | null;
666
+ contentType: string | null;
667
+ }>;
668
+ syncLocalApp(appId: string, payload: {
669
+ baseCommitHash: string;
670
+ repoFingerprint?: string;
671
+ remoteUrl?: string;
672
+ defaultBranch?: string;
673
+ dryRun?: boolean;
674
+ }): Promise<unknown>;
675
+ };
676
+
677
+ export type { AppDeltaResponse as A, ProjectMemberRole as B, CollabApiClient as C, SyncLocalResponse as D, SyncUpstreamResponse as E, TurnUsageCaptureSource as F, TurnUsageConfidence as G, TurnUsagePreviousPatch as H, InvitationScopeType as I, JsonObject as J, MergeRequestQueue as M, OrganizationMember as O, ProjectMember as P, ReconcilePreflightResponse as R, ServerToolUsage as S, TurnUsage as T, TurnUsagePayload as a, CollabFinalizeTurnResult as b, CollabRecordingPreflight as c, CollabApproveMode as d, CollabApproveResult as e, MergeRequest as f, CollabMember as g, CollabStatus as h, MergeRequestReview as i, AppHeadResponse as j, AppMember as k, AppMemberRole as l, AppReconcileResponse as m, CollabFinalizeTurnAutoSync as n, CollabFinalizeTurnMode as o, CollabPendingFinalizeState as p, CollabPendingFinalizeSummary as q, CollabRecordingPreflightStatus as r, CollabRepoStateKind as s, CollabStatusBlockedReason as t, CollabStatusRecommendedAction as u, CollabTurn as v, MembershipScopeType as w, MergeRequestStatus as x, ModelCall as y, OrganizationMemberRole as z };