@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/collab.d.ts
ADDED
|
@@ -0,0 +1,680 @@
|
|
|
1
|
+
type JsonObject = Record<string, any>;
|
|
2
|
+
type MergeRequestStatus = "open" | "approved" | "rejected" | "merged" | "closed";
|
|
3
|
+
type MergeRequest = {
|
|
4
|
+
id: string;
|
|
5
|
+
sourceAppId: string;
|
|
6
|
+
sourceCommitId: string;
|
|
7
|
+
sourceTipCommitId: string | null;
|
|
8
|
+
targetAppId: string;
|
|
9
|
+
targetCommitId: string | null;
|
|
10
|
+
status: MergeRequestStatus;
|
|
11
|
+
title: string | null;
|
|
12
|
+
description: string | null;
|
|
13
|
+
category: string | null;
|
|
14
|
+
tags: string[] | null;
|
|
15
|
+
createdBy: string;
|
|
16
|
+
reviewedBy: string | null;
|
|
17
|
+
mergedBy: string | null;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
mergedAt: string | null;
|
|
21
|
+
closedAt: string | null;
|
|
22
|
+
};
|
|
23
|
+
type MergeRequestReviewPrompt = {
|
|
24
|
+
commitId: string;
|
|
25
|
+
messageId: string | null;
|
|
26
|
+
prompt: string | null;
|
|
27
|
+
};
|
|
28
|
+
type MergeRequestReviewChangeStep = {
|
|
29
|
+
id: string;
|
|
30
|
+
appId: string;
|
|
31
|
+
threadId: string | null;
|
|
32
|
+
messageId: string | null;
|
|
33
|
+
commitId: string | null;
|
|
34
|
+
baseCommitHash: string | null;
|
|
35
|
+
headCommitHash: string | null;
|
|
36
|
+
changedFilesCount: number | null;
|
|
37
|
+
insertions: number | null;
|
|
38
|
+
deletions: number | null;
|
|
39
|
+
status: string | null;
|
|
40
|
+
statusError: string | null;
|
|
41
|
+
actor: {
|
|
42
|
+
type: string | null;
|
|
43
|
+
name: string | null;
|
|
44
|
+
version: string | null;
|
|
45
|
+
provider: string | null;
|
|
46
|
+
};
|
|
47
|
+
workspaceMetadata: JsonObject | null;
|
|
48
|
+
prompt: string | null;
|
|
49
|
+
diff: string;
|
|
50
|
+
createdAt: string;
|
|
51
|
+
};
|
|
52
|
+
type MergeRequestReview = {
|
|
53
|
+
mergeRequest: MergeRequest;
|
|
54
|
+
prompts: MergeRequestReviewPrompt[];
|
|
55
|
+
changeSteps: MergeRequestReviewChangeStep[];
|
|
56
|
+
unifiedDiff: string;
|
|
57
|
+
stats: {
|
|
58
|
+
changeStepCount: number;
|
|
59
|
+
changedFilesCount: number;
|
|
60
|
+
insertions: number;
|
|
61
|
+
deletions: number;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
type CollabApproveMode = "remote-only" | "sync-target-repo";
|
|
65
|
+
type CollabStatusBlockedReason = "not_git_repo" | "not_bound" | "missing_head" | "detached_head" | "branch_mismatch" | "dirty_worktree" | "metadata_conflict" | "remote_error";
|
|
66
|
+
type CollabStatusRecommendedAction = "init" | "sync" | "reconcile" | "review_inbox" | "no_action";
|
|
67
|
+
type CollabStatus = {
|
|
68
|
+
schemaVersion: 1;
|
|
69
|
+
repo: {
|
|
70
|
+
isGitRepo: boolean;
|
|
71
|
+
repoRoot: string | null;
|
|
72
|
+
branch: string | null;
|
|
73
|
+
branchMismatch: boolean;
|
|
74
|
+
headCommitHash: string | null;
|
|
75
|
+
worktree: {
|
|
76
|
+
isClean: boolean;
|
|
77
|
+
entryCount: number;
|
|
78
|
+
hasTrackedChanges: boolean;
|
|
79
|
+
hasUntrackedFiles: boolean;
|
|
80
|
+
preview: string[];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
binding: {
|
|
84
|
+
isBound: boolean;
|
|
85
|
+
path: string | null;
|
|
86
|
+
projectId: string | null;
|
|
87
|
+
currentAppId: string | null;
|
|
88
|
+
upstreamAppId: string | null;
|
|
89
|
+
isRemix: boolean | null;
|
|
90
|
+
threadId: string | null;
|
|
91
|
+
repoFingerprint: string | null;
|
|
92
|
+
remoteUrl: string | null;
|
|
93
|
+
defaultBranch: string | null;
|
|
94
|
+
preferredBranch: string | null;
|
|
95
|
+
};
|
|
96
|
+
remote: {
|
|
97
|
+
checked: boolean;
|
|
98
|
+
error: string | null;
|
|
99
|
+
appStatus: string | null;
|
|
100
|
+
incomingOpenMergeRequestCount: number | null;
|
|
101
|
+
outgoingOpenMergeRequestCount: number | null;
|
|
102
|
+
};
|
|
103
|
+
sync: {
|
|
104
|
+
checked: boolean;
|
|
105
|
+
error: string | null;
|
|
106
|
+
canApply: boolean;
|
|
107
|
+
status: "not_available" | SyncLocalResponse["status"];
|
|
108
|
+
blockedReasons: CollabStatusBlockedReason[];
|
|
109
|
+
warnings: string[];
|
|
110
|
+
targetCommitHash: string | null;
|
|
111
|
+
targetCommitId: string | null;
|
|
112
|
+
stats: SyncLocalResponse["stats"] | null;
|
|
113
|
+
};
|
|
114
|
+
reconcile: {
|
|
115
|
+
checked: boolean;
|
|
116
|
+
error: string | null;
|
|
117
|
+
canApply: boolean;
|
|
118
|
+
status: "not_available" | "not_needed" | ReconcilePreflightResponse["status"];
|
|
119
|
+
blockedReasons: CollabStatusBlockedReason[];
|
|
120
|
+
warnings: string[];
|
|
121
|
+
targetHeadCommitHash: string | null;
|
|
122
|
+
targetHeadCommitId: string | null;
|
|
123
|
+
};
|
|
124
|
+
recommendedAction: CollabStatusRecommendedAction;
|
|
125
|
+
warnings: string[];
|
|
126
|
+
};
|
|
127
|
+
type SyncLocalResponse = {
|
|
128
|
+
status: "up_to_date" | "ready_to_fast_forward" | "base_unknown" | "conflict_risk";
|
|
129
|
+
baseCommitHash: string;
|
|
130
|
+
targetCommitHash: string;
|
|
131
|
+
targetCommitId: string;
|
|
132
|
+
bundleRef: string | null;
|
|
133
|
+
bundleBase64: string | null;
|
|
134
|
+
bundleEncoding: "base64" | null;
|
|
135
|
+
bundleSizeBytes: number;
|
|
136
|
+
stats: {
|
|
137
|
+
changedFilesCount: number;
|
|
138
|
+
insertions: number;
|
|
139
|
+
deletions: number;
|
|
140
|
+
};
|
|
141
|
+
warnings: string[];
|
|
142
|
+
};
|
|
143
|
+
type SyncUpstreamResponse = {
|
|
144
|
+
status: "up-to-date" | "queued";
|
|
145
|
+
mergeRequestId?: string;
|
|
146
|
+
};
|
|
147
|
+
type ReconcilePreflightResponse = {
|
|
148
|
+
status: "up_to_date" | "ready_to_reconcile" | "metadata_conflict";
|
|
149
|
+
localHeadCommitHash: string;
|
|
150
|
+
targetHeadCommitId: string;
|
|
151
|
+
targetHeadCommitHash: string;
|
|
152
|
+
warnings: string[];
|
|
153
|
+
};
|
|
154
|
+
type AppReconcileResponse = {
|
|
155
|
+
id: string;
|
|
156
|
+
appId: string;
|
|
157
|
+
uploadId: string;
|
|
158
|
+
queueItemId: string | null;
|
|
159
|
+
requestedBy: string;
|
|
160
|
+
repoFingerprint: string | null;
|
|
161
|
+
remoteUrl: string | null;
|
|
162
|
+
defaultBranch: string | null;
|
|
163
|
+
localHeadCommitHash: string;
|
|
164
|
+
targetHeadCommitId: string | null;
|
|
165
|
+
targetHeadCommitHash: string | null;
|
|
166
|
+
mergeBaseCommitHash: string | null;
|
|
167
|
+
reconciledHeadCommitId: string | null;
|
|
168
|
+
reconciledHeadCommitHash: string | null;
|
|
169
|
+
localCommitHashes: string[];
|
|
170
|
+
reconciledCommitIds: string[];
|
|
171
|
+
reconciledCommitHashes: string[];
|
|
172
|
+
status: "pending" | "queued" | "processing" | "succeeded" | "failed" | "manual_reconcile_required" | "cancelled";
|
|
173
|
+
failureKind: string | null;
|
|
174
|
+
statusError: string | null;
|
|
175
|
+
idempotencyKey: string | null;
|
|
176
|
+
resultBundleRef: string | null;
|
|
177
|
+
queuePosition?: number | null;
|
|
178
|
+
runId?: string | null;
|
|
179
|
+
createdAt: string;
|
|
180
|
+
updatedAt: string;
|
|
181
|
+
};
|
|
182
|
+
type CollabApproveResult = {
|
|
183
|
+
mode: CollabApproveMode;
|
|
184
|
+
mergeRequestId: string;
|
|
185
|
+
terminalStatus: MergeRequestStatus;
|
|
186
|
+
targetAppId: string;
|
|
187
|
+
mergeRequest: MergeRequest;
|
|
188
|
+
repoRoot?: string;
|
|
189
|
+
localSync?: {
|
|
190
|
+
status: SyncLocalResponse["status"];
|
|
191
|
+
branch: string;
|
|
192
|
+
repoRoot: string;
|
|
193
|
+
baseCommitHash: string;
|
|
194
|
+
targetCommitHash: string;
|
|
195
|
+
targetCommitId: string;
|
|
196
|
+
stats: SyncLocalResponse["stats"];
|
|
197
|
+
bundleRef?: string | null;
|
|
198
|
+
bundleSizeBytes?: number;
|
|
199
|
+
localCommitHash: string;
|
|
200
|
+
applied: boolean;
|
|
201
|
+
dryRun: boolean;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
type CollabTurn = {
|
|
205
|
+
id: string;
|
|
206
|
+
appId: string;
|
|
207
|
+
threadId: string;
|
|
208
|
+
humanMessageId: string;
|
|
209
|
+
assistantMessageId: string;
|
|
210
|
+
changeStepId: string | null;
|
|
211
|
+
actor: {
|
|
212
|
+
type: string;
|
|
213
|
+
name: string | null;
|
|
214
|
+
version: string | null;
|
|
215
|
+
provider: string | null;
|
|
216
|
+
};
|
|
217
|
+
workspaceMetadata: JsonObject | null;
|
|
218
|
+
idempotencyKey: string | null;
|
|
219
|
+
createdBy: string;
|
|
220
|
+
createdAt: string;
|
|
221
|
+
updatedAt: string;
|
|
222
|
+
prompt: string | null;
|
|
223
|
+
assistantResponse: string | null;
|
|
224
|
+
};
|
|
225
|
+
type InvitationScopeType = "organization" | "project" | "app";
|
|
226
|
+
type CollabApiClient = {
|
|
227
|
+
resolveProjectBinding(params: {
|
|
228
|
+
repoFingerprint?: string;
|
|
229
|
+
remoteUrl?: string;
|
|
230
|
+
}): Promise<unknown>;
|
|
231
|
+
getOrganization(orgId: string): Promise<unknown>;
|
|
232
|
+
getProject(projectId: string): Promise<unknown>;
|
|
233
|
+
listApps(params?: {
|
|
234
|
+
projectId?: string;
|
|
235
|
+
organizationId?: string;
|
|
236
|
+
forked?: "only" | "exclude" | "all";
|
|
237
|
+
}): Promise<unknown>;
|
|
238
|
+
getApp(appId: string): Promise<unknown>;
|
|
239
|
+
getMergeRequest(mrId: string): Promise<unknown>;
|
|
240
|
+
presignImportUploadFirstParty(payload: {
|
|
241
|
+
file: {
|
|
242
|
+
name: string;
|
|
243
|
+
mimeType: string;
|
|
244
|
+
size: number;
|
|
245
|
+
checksumSha256?: string;
|
|
246
|
+
};
|
|
247
|
+
}): Promise<unknown>;
|
|
248
|
+
importFromUploadFirstParty(payload: {
|
|
249
|
+
uploadId: string;
|
|
250
|
+
appName?: string;
|
|
251
|
+
threadId?: string;
|
|
252
|
+
path?: string;
|
|
253
|
+
platform?: string;
|
|
254
|
+
isPublic?: boolean;
|
|
255
|
+
remoteUrl?: string;
|
|
256
|
+
defaultBranch?: string;
|
|
257
|
+
repoFingerprint?: string;
|
|
258
|
+
headCommitHash?: string;
|
|
259
|
+
}): Promise<unknown>;
|
|
260
|
+
forkApp(appId: string, payload?: {
|
|
261
|
+
name?: string;
|
|
262
|
+
platform?: string;
|
|
263
|
+
forkedFromCommitId?: string;
|
|
264
|
+
}): Promise<unknown>;
|
|
265
|
+
downloadAppBundle(appId: string): Promise<{
|
|
266
|
+
data: Buffer;
|
|
267
|
+
fileName: string | null;
|
|
268
|
+
contentType: string | null;
|
|
269
|
+
}>;
|
|
270
|
+
createChangeStep(appId: string, payload: {
|
|
271
|
+
threadId?: string;
|
|
272
|
+
prompt: string;
|
|
273
|
+
assistantResponse?: string;
|
|
274
|
+
diff: string;
|
|
275
|
+
baseCommitHash?: string | null;
|
|
276
|
+
headCommitHash?: string | null;
|
|
277
|
+
changedFilesCount?: number;
|
|
278
|
+
insertions?: number;
|
|
279
|
+
deletions?: number;
|
|
280
|
+
actor?: {
|
|
281
|
+
type?: string;
|
|
282
|
+
name?: string;
|
|
283
|
+
version?: string;
|
|
284
|
+
provider?: string;
|
|
285
|
+
};
|
|
286
|
+
workspaceMetadata?: Record<string, unknown>;
|
|
287
|
+
idempotencyKey?: string;
|
|
288
|
+
}): Promise<unknown>;
|
|
289
|
+
startChangeStepReplay(appId: string, payload: {
|
|
290
|
+
prompt: string;
|
|
291
|
+
assistantResponse?: string;
|
|
292
|
+
diff: string;
|
|
293
|
+
baseCommitHash: string;
|
|
294
|
+
targetHeadCommitHash: string;
|
|
295
|
+
expectedPaths: string[];
|
|
296
|
+
actor?: {
|
|
297
|
+
type?: string;
|
|
298
|
+
name?: string;
|
|
299
|
+
version?: string;
|
|
300
|
+
provider?: string;
|
|
301
|
+
};
|
|
302
|
+
workspaceMetadata?: Record<string, unknown>;
|
|
303
|
+
idempotencyKey?: string;
|
|
304
|
+
}): Promise<unknown>;
|
|
305
|
+
getChangeStepReplay(appId: string, replayId: string): Promise<unknown>;
|
|
306
|
+
getChangeStepReplayDiff(appId: string, replayId: string): Promise<unknown>;
|
|
307
|
+
createCollabTurn(appId: string, payload: {
|
|
308
|
+
threadId?: string;
|
|
309
|
+
prompt: string;
|
|
310
|
+
assistantResponse: string;
|
|
311
|
+
actor?: {
|
|
312
|
+
type?: string;
|
|
313
|
+
name?: string;
|
|
314
|
+
version?: string;
|
|
315
|
+
provider?: string;
|
|
316
|
+
};
|
|
317
|
+
workspaceMetadata?: Record<string, unknown>;
|
|
318
|
+
idempotencyKey?: string;
|
|
319
|
+
}): Promise<unknown>;
|
|
320
|
+
getChangeStep(appId: string, changeStepId: string): Promise<unknown>;
|
|
321
|
+
listMergeRequests(params?: {
|
|
322
|
+
sourceAppId?: string;
|
|
323
|
+
targetAppId?: string;
|
|
324
|
+
status?: string | string[];
|
|
325
|
+
kind?: string;
|
|
326
|
+
}): Promise<unknown>;
|
|
327
|
+
openMergeRequest(sourceAppId: string): Promise<unknown>;
|
|
328
|
+
getMergeRequestReview(mrId: string): Promise<unknown>;
|
|
329
|
+
updateMergeRequest(mrId: string, payload: {
|
|
330
|
+
title?: string;
|
|
331
|
+
description?: string;
|
|
332
|
+
status?: string;
|
|
333
|
+
}): Promise<unknown>;
|
|
334
|
+
createOrganizationInvite(orgId: string, payload: {
|
|
335
|
+
email: string;
|
|
336
|
+
role?: string;
|
|
337
|
+
ttlDays?: number;
|
|
338
|
+
}): Promise<unknown>;
|
|
339
|
+
createProjectInvite(projectId: string, payload: {
|
|
340
|
+
email: string;
|
|
341
|
+
role?: string;
|
|
342
|
+
ttlDays?: number;
|
|
343
|
+
}): Promise<unknown>;
|
|
344
|
+
createAppInvite(appId: string, payload: {
|
|
345
|
+
email: string;
|
|
346
|
+
role?: string;
|
|
347
|
+
ttlDays?: number;
|
|
348
|
+
}): Promise<unknown>;
|
|
349
|
+
listOrganizationInvites(orgId: string): Promise<unknown>;
|
|
350
|
+
listProjectInvites(projectId: string): Promise<unknown>;
|
|
351
|
+
listAppInvites(appId: string): Promise<unknown>;
|
|
352
|
+
resendOrganizationInvite(orgId: string, inviteId: string, payload?: {
|
|
353
|
+
ttlDays?: number;
|
|
354
|
+
}): Promise<unknown>;
|
|
355
|
+
resendProjectInvite(projectId: string, inviteId: string, payload?: {
|
|
356
|
+
ttlDays?: number;
|
|
357
|
+
}): Promise<unknown>;
|
|
358
|
+
resendAppInvite(appId: string, inviteId: string, payload?: {
|
|
359
|
+
ttlDays?: number;
|
|
360
|
+
}): Promise<unknown>;
|
|
361
|
+
revokeOrganizationInvite(orgId: string, inviteId: string): Promise<unknown>;
|
|
362
|
+
revokeProjectInvite(projectId: string, inviteId: string): Promise<unknown>;
|
|
363
|
+
revokeAppInvite(appId: string, inviteId: string): Promise<unknown>;
|
|
364
|
+
syncUpstreamApp(appId: string): Promise<unknown>;
|
|
365
|
+
preflightAppReconcile(appId: string, payload: {
|
|
366
|
+
localHeadCommitHash: string;
|
|
367
|
+
repoFingerprint?: string;
|
|
368
|
+
remoteUrl?: string;
|
|
369
|
+
defaultBranch?: string;
|
|
370
|
+
}): Promise<unknown>;
|
|
371
|
+
startAppReconcile(appId: string, payload: {
|
|
372
|
+
uploadId: string;
|
|
373
|
+
localHeadCommitHash: string;
|
|
374
|
+
repoFingerprint?: string;
|
|
375
|
+
remoteUrl?: string;
|
|
376
|
+
defaultBranch?: string;
|
|
377
|
+
idempotencyKey?: string;
|
|
378
|
+
}): Promise<unknown>;
|
|
379
|
+
getAppReconcile(appId: string, reconcileId: string): Promise<unknown>;
|
|
380
|
+
downloadAppReconcileBundle(appId: string, reconcileId: string): Promise<{
|
|
381
|
+
data: Buffer;
|
|
382
|
+
fileName: string | null;
|
|
383
|
+
contentType: string | null;
|
|
384
|
+
}>;
|
|
385
|
+
syncLocalApp(appId: string, payload: {
|
|
386
|
+
baseCommitHash: string;
|
|
387
|
+
repoFingerprint?: string;
|
|
388
|
+
remoteUrl?: string;
|
|
389
|
+
defaultBranch?: string;
|
|
390
|
+
dryRun?: boolean;
|
|
391
|
+
}): Promise<unknown>;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
declare function collabAdd(params: {
|
|
395
|
+
api: CollabApiClient;
|
|
396
|
+
cwd: string;
|
|
397
|
+
prompt: string;
|
|
398
|
+
assistantResponse?: string | null;
|
|
399
|
+
diff?: string | null;
|
|
400
|
+
diffSource?: "worktree" | "external";
|
|
401
|
+
sync?: boolean;
|
|
402
|
+
allowBranchMismatch?: boolean;
|
|
403
|
+
idempotencyKey?: string | null;
|
|
404
|
+
actor?: {
|
|
405
|
+
type?: string;
|
|
406
|
+
name?: string;
|
|
407
|
+
version?: string;
|
|
408
|
+
provider?: string;
|
|
409
|
+
};
|
|
410
|
+
}): Promise<JsonObject>;
|
|
411
|
+
|
|
412
|
+
declare function collabRecordTurn(params: {
|
|
413
|
+
api: CollabApiClient;
|
|
414
|
+
cwd: string;
|
|
415
|
+
prompt: string;
|
|
416
|
+
assistantResponse: string;
|
|
417
|
+
allowBranchMismatch?: boolean;
|
|
418
|
+
idempotencyKey?: string | null;
|
|
419
|
+
actor?: {
|
|
420
|
+
type?: string;
|
|
421
|
+
name?: string;
|
|
422
|
+
version?: string;
|
|
423
|
+
provider?: string;
|
|
424
|
+
};
|
|
425
|
+
}): Promise<CollabTurn>;
|
|
426
|
+
|
|
427
|
+
declare function collabApprove(params: {
|
|
428
|
+
api: CollabApiClient;
|
|
429
|
+
mrId: string;
|
|
430
|
+
mode: CollabApproveMode;
|
|
431
|
+
cwd?: string;
|
|
432
|
+
allowBranchMismatch?: boolean;
|
|
433
|
+
}): Promise<CollabApproveResult>;
|
|
434
|
+
|
|
435
|
+
declare function collabInbox(params: {
|
|
436
|
+
api: CollabApiClient;
|
|
437
|
+
}): Promise<{
|
|
438
|
+
mergeRequests: any;
|
|
439
|
+
}>;
|
|
440
|
+
|
|
441
|
+
declare function collabInit(params: {
|
|
442
|
+
api: CollabApiClient;
|
|
443
|
+
cwd: string;
|
|
444
|
+
appName?: string | null;
|
|
445
|
+
path?: string | null;
|
|
446
|
+
forceNew?: boolean;
|
|
447
|
+
}): Promise<{
|
|
448
|
+
warnings?: string[] | undefined;
|
|
449
|
+
reused: boolean;
|
|
450
|
+
projectId: string;
|
|
451
|
+
appId: string;
|
|
452
|
+
upstreamAppId: string;
|
|
453
|
+
bindingPath: string;
|
|
454
|
+
repoRoot: string;
|
|
455
|
+
} | {
|
|
456
|
+
warnings?: string[] | undefined;
|
|
457
|
+
reused: boolean;
|
|
458
|
+
projectId: string;
|
|
459
|
+
appId: string;
|
|
460
|
+
upstreamAppId: string;
|
|
461
|
+
bindingPath: string;
|
|
462
|
+
repoRoot: string;
|
|
463
|
+
remoteUrl: string | null;
|
|
464
|
+
defaultBranch: string | null;
|
|
465
|
+
preferredBranch: string | null;
|
|
466
|
+
}>;
|
|
467
|
+
|
|
468
|
+
declare function collabInvite(params: {
|
|
469
|
+
api: CollabApiClient;
|
|
470
|
+
cwd: string;
|
|
471
|
+
email: string;
|
|
472
|
+
role?: string | null;
|
|
473
|
+
ttlDays?: number;
|
|
474
|
+
scope?: InvitationScopeType | null;
|
|
475
|
+
targetId?: string | null;
|
|
476
|
+
}): Promise<{
|
|
477
|
+
scopeType: InvitationScopeType;
|
|
478
|
+
targetId: string;
|
|
479
|
+
}>;
|
|
480
|
+
|
|
481
|
+
declare function collabList(params: {
|
|
482
|
+
api: CollabApiClient;
|
|
483
|
+
}): Promise<{
|
|
484
|
+
apps: JsonObject[];
|
|
485
|
+
}>;
|
|
486
|
+
|
|
487
|
+
declare function collabReconcile(params: {
|
|
488
|
+
api: CollabApiClient;
|
|
489
|
+
cwd: string;
|
|
490
|
+
dryRun: boolean;
|
|
491
|
+
allowBranchMismatch?: boolean;
|
|
492
|
+
}): Promise<{
|
|
493
|
+
status: "ready_to_fast_forward";
|
|
494
|
+
branch: string;
|
|
495
|
+
repoRoot: string;
|
|
496
|
+
baseCommitHash: string;
|
|
497
|
+
targetCommitHash: string;
|
|
498
|
+
targetCommitId: string;
|
|
499
|
+
stats: {
|
|
500
|
+
changedFilesCount: number;
|
|
501
|
+
insertions: number;
|
|
502
|
+
deletions: number;
|
|
503
|
+
};
|
|
504
|
+
bundleRef: string | null;
|
|
505
|
+
bundleSizeBytes: number;
|
|
506
|
+
localCommitHash: string;
|
|
507
|
+
applied: boolean;
|
|
508
|
+
dryRun: boolean;
|
|
509
|
+
} | {
|
|
510
|
+
status: "up_to_date";
|
|
511
|
+
branch: string;
|
|
512
|
+
repoRoot: string;
|
|
513
|
+
baseCommitHash: string;
|
|
514
|
+
targetCommitHash: string;
|
|
515
|
+
targetCommitId: string;
|
|
516
|
+
stats: {
|
|
517
|
+
changedFilesCount: number;
|
|
518
|
+
insertions: number;
|
|
519
|
+
deletions: number;
|
|
520
|
+
};
|
|
521
|
+
localCommitHash: string;
|
|
522
|
+
applied: boolean;
|
|
523
|
+
dryRun: boolean;
|
|
524
|
+
} | {
|
|
525
|
+
status: "ready_to_reconcile";
|
|
526
|
+
branch: string;
|
|
527
|
+
repoRoot: string;
|
|
528
|
+
localHeadCommitHash: string;
|
|
529
|
+
targetHeadCommitId: string;
|
|
530
|
+
targetHeadCommitHash: string;
|
|
531
|
+
warnings: string[];
|
|
532
|
+
applied: boolean;
|
|
533
|
+
dryRun: boolean;
|
|
534
|
+
} | {
|
|
535
|
+
status: "queued" | "pending" | "processing" | "succeeded" | "failed" | "manual_reconcile_required" | "cancelled";
|
|
536
|
+
reconcileId: string;
|
|
537
|
+
mergeBaseCommitHash: string | null;
|
|
538
|
+
reconciledHeadCommitId: string | null;
|
|
539
|
+
reconciledHeadCommitHash: string | null;
|
|
540
|
+
backupBranchName: string;
|
|
541
|
+
localCommitHash: string;
|
|
542
|
+
applied: boolean;
|
|
543
|
+
dryRun: boolean;
|
|
544
|
+
warnings: string[];
|
|
545
|
+
branch: string;
|
|
546
|
+
repoRoot: string;
|
|
547
|
+
localHeadCommitHash: string;
|
|
548
|
+
targetHeadCommitId: string;
|
|
549
|
+
targetHeadCommitHash: string;
|
|
550
|
+
}>;
|
|
551
|
+
|
|
552
|
+
declare function collabReject(params: {
|
|
553
|
+
api: CollabApiClient;
|
|
554
|
+
mrId: string;
|
|
555
|
+
}): Promise<JsonObject>;
|
|
556
|
+
|
|
557
|
+
declare function collabRemix(params: {
|
|
558
|
+
api: CollabApiClient;
|
|
559
|
+
cwd: string;
|
|
560
|
+
appId?: string | null;
|
|
561
|
+
name?: string | null;
|
|
562
|
+
outputDir?: string | null;
|
|
563
|
+
}): Promise<{
|
|
564
|
+
appId: string;
|
|
565
|
+
projectId: string;
|
|
566
|
+
upstreamAppId: string;
|
|
567
|
+
bindingPath: string;
|
|
568
|
+
repoRoot: string;
|
|
569
|
+
}>;
|
|
570
|
+
|
|
571
|
+
declare function collabRequestMerge(params: {
|
|
572
|
+
api: CollabApiClient;
|
|
573
|
+
cwd: string;
|
|
574
|
+
}): Promise<JsonObject>;
|
|
575
|
+
|
|
576
|
+
declare function collabStatus(params: {
|
|
577
|
+
api?: CollabApiClient | null;
|
|
578
|
+
cwd: string;
|
|
579
|
+
}): Promise<CollabStatus>;
|
|
580
|
+
|
|
581
|
+
declare function collabSync(params: {
|
|
582
|
+
api: CollabApiClient;
|
|
583
|
+
cwd: string;
|
|
584
|
+
dryRun: boolean;
|
|
585
|
+
allowBranchMismatch?: boolean;
|
|
586
|
+
}): Promise<{
|
|
587
|
+
status: "ready_to_fast_forward";
|
|
588
|
+
branch: string;
|
|
589
|
+
repoRoot: string;
|
|
590
|
+
baseCommitHash: string;
|
|
591
|
+
targetCommitHash: string;
|
|
592
|
+
targetCommitId: string;
|
|
593
|
+
stats: {
|
|
594
|
+
changedFilesCount: number;
|
|
595
|
+
insertions: number;
|
|
596
|
+
deletions: number;
|
|
597
|
+
};
|
|
598
|
+
bundleRef: string | null;
|
|
599
|
+
bundleSizeBytes: number;
|
|
600
|
+
localCommitHash: string;
|
|
601
|
+
applied: boolean;
|
|
602
|
+
dryRun: boolean;
|
|
603
|
+
} | {
|
|
604
|
+
status: "up_to_date";
|
|
605
|
+
branch: string;
|
|
606
|
+
repoRoot: string;
|
|
607
|
+
baseCommitHash: string;
|
|
608
|
+
targetCommitHash: string;
|
|
609
|
+
targetCommitId: string;
|
|
610
|
+
stats: {
|
|
611
|
+
changedFilesCount: number;
|
|
612
|
+
insertions: number;
|
|
613
|
+
deletions: number;
|
|
614
|
+
};
|
|
615
|
+
localCommitHash: string;
|
|
616
|
+
applied: boolean;
|
|
617
|
+
dryRun: boolean;
|
|
618
|
+
}>;
|
|
619
|
+
|
|
620
|
+
declare function collabSyncUpstream(params: {
|
|
621
|
+
api: CollabApiClient;
|
|
622
|
+
cwd: string;
|
|
623
|
+
}): Promise<{
|
|
624
|
+
status: "up-to-date";
|
|
625
|
+
repoRoot: string;
|
|
626
|
+
appId: string;
|
|
627
|
+
upstreamAppId: string;
|
|
628
|
+
localUpdated: boolean;
|
|
629
|
+
} | {
|
|
630
|
+
warnings?: string[] | undefined;
|
|
631
|
+
status: "queued";
|
|
632
|
+
mergeRequestId: string | null;
|
|
633
|
+
repoRoot: string;
|
|
634
|
+
appId: string;
|
|
635
|
+
upstreamAppId: string;
|
|
636
|
+
remoteHeadCommitId: string | null;
|
|
637
|
+
localSync: {
|
|
638
|
+
warnings?: string[] | undefined;
|
|
639
|
+
status: "ready_to_fast_forward";
|
|
640
|
+
branch: string;
|
|
641
|
+
repoRoot: string;
|
|
642
|
+
baseCommitHash: string;
|
|
643
|
+
targetCommitHash: string;
|
|
644
|
+
targetCommitId: string;
|
|
645
|
+
stats: {
|
|
646
|
+
changedFilesCount: number;
|
|
647
|
+
insertions: number;
|
|
648
|
+
deletions: number;
|
|
649
|
+
};
|
|
650
|
+
bundleRef: string | null;
|
|
651
|
+
bundleSizeBytes: number;
|
|
652
|
+
localCommitHash: string;
|
|
653
|
+
applied: boolean;
|
|
654
|
+
dryRun: boolean;
|
|
655
|
+
} | {
|
|
656
|
+
warnings?: string[] | undefined;
|
|
657
|
+
status: "up_to_date";
|
|
658
|
+
branch: string;
|
|
659
|
+
repoRoot: string;
|
|
660
|
+
baseCommitHash: string;
|
|
661
|
+
targetCommitHash: string;
|
|
662
|
+
targetCommitId: string;
|
|
663
|
+
stats: {
|
|
664
|
+
changedFilesCount: number;
|
|
665
|
+
insertions: number;
|
|
666
|
+
deletions: number;
|
|
667
|
+
};
|
|
668
|
+
localCommitHash: string;
|
|
669
|
+
applied: boolean;
|
|
670
|
+
dryRun: boolean;
|
|
671
|
+
};
|
|
672
|
+
localUpdated: boolean;
|
|
673
|
+
}>;
|
|
674
|
+
|
|
675
|
+
declare function collabView(params: {
|
|
676
|
+
api: CollabApiClient;
|
|
677
|
+
mrId: string;
|
|
678
|
+
}): Promise<MergeRequestReview>;
|
|
679
|
+
|
|
680
|
+
export { type AppReconcileResponse, type CollabApiClient, type CollabApproveMode, type CollabApproveResult, type CollabStatus, type CollabStatusBlockedReason, type CollabStatusRecommendedAction, type CollabTurn, type InvitationScopeType, type JsonObject, type MergeRequest, type MergeRequestReview, type MergeRequestStatus, type ReconcilePreflightResponse, type SyncLocalResponse, type SyncUpstreamResponse, collabAdd, collabApprove, collabInbox, collabInit, collabInvite, collabList, collabReconcile, collabRecordTurn, collabReject, collabRemix, collabRequestMerge, collabStatus, collabSync, collabSyncUpstream, collabView };
|