@ricsam/r5d-api 0.0.36 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +21 -0
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/index.mjs +21 -0
- package/dist/mjs/package.json +1 -1
- package/dist/types/index.d.ts +50 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -192,6 +192,22 @@ class R5dctlClient {
|
|
|
192
192
|
body: {}
|
|
193
193
|
})
|
|
194
194
|
};
|
|
195
|
+
workspace = {
|
|
196
|
+
status: () => this.request({
|
|
197
|
+
method: "GET",
|
|
198
|
+
path: "/api/r5dctl/workspace"
|
|
199
|
+
}),
|
|
200
|
+
sync: (input = {}) => this.request({
|
|
201
|
+
method: "POST",
|
|
202
|
+
path: "/api/r5dctl/workspace/sync",
|
|
203
|
+
body: input
|
|
204
|
+
}),
|
|
205
|
+
reset: (input) => this.request({
|
|
206
|
+
method: "POST",
|
|
207
|
+
path: "/api/r5dctl/workspace/reset",
|
|
208
|
+
body: input
|
|
209
|
+
})
|
|
210
|
+
};
|
|
195
211
|
projects = {
|
|
196
212
|
list: () => this.request({
|
|
197
213
|
method: "GET",
|
|
@@ -280,6 +296,11 @@ class R5dctlClient {
|
|
|
280
296
|
})
|
|
281
297
|
};
|
|
282
298
|
sessions = {
|
|
299
|
+
recent: (input = {}) => this.request({
|
|
300
|
+
method: "GET",
|
|
301
|
+
path: "/api/r5dctl/sessions/recent",
|
|
302
|
+
query: { limit: input.limit?.toString() }
|
|
303
|
+
}),
|
|
283
304
|
describe: (sessionId) => this.request({
|
|
284
305
|
method: "GET",
|
|
285
306
|
path: `/api/r5dctl/sessions/${encodeURIComponent(sessionId)}`
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/index.mjs
CHANGED
|
@@ -168,6 +168,22 @@ class R5dctlClient {
|
|
|
168
168
|
body: {}
|
|
169
169
|
})
|
|
170
170
|
};
|
|
171
|
+
workspace = {
|
|
172
|
+
status: () => this.request({
|
|
173
|
+
method: "GET",
|
|
174
|
+
path: "/api/r5dctl/workspace"
|
|
175
|
+
}),
|
|
176
|
+
sync: (input = {}) => this.request({
|
|
177
|
+
method: "POST",
|
|
178
|
+
path: "/api/r5dctl/workspace/sync",
|
|
179
|
+
body: input
|
|
180
|
+
}),
|
|
181
|
+
reset: (input) => this.request({
|
|
182
|
+
method: "POST",
|
|
183
|
+
path: "/api/r5dctl/workspace/reset",
|
|
184
|
+
body: input
|
|
185
|
+
})
|
|
186
|
+
};
|
|
171
187
|
projects = {
|
|
172
188
|
list: () => this.request({
|
|
173
189
|
method: "GET",
|
|
@@ -256,6 +272,11 @@ class R5dctlClient {
|
|
|
256
272
|
})
|
|
257
273
|
};
|
|
258
274
|
sessions = {
|
|
275
|
+
recent: (input = {}) => this.request({
|
|
276
|
+
method: "GET",
|
|
277
|
+
path: "/api/r5dctl/sessions/recent",
|
|
278
|
+
query: { limit: input.limit?.toString() }
|
|
279
|
+
}),
|
|
259
280
|
describe: (sessionId) => this.request({
|
|
260
281
|
method: "GET",
|
|
261
282
|
path: `/api/r5dctl/sessions/${encodeURIComponent(sessionId)}`
|
package/dist/mjs/package.json
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -167,6 +167,42 @@ export type R5dctlApiKey = {
|
|
|
167
167
|
lastUsedAt: string | null;
|
|
168
168
|
};
|
|
169
169
|
export type R5dctlProcessRunStatus = "starting" | "running" | "exited" | "cancelled" | "failed";
|
|
170
|
+
export type R5dctlWorkspaceSyncResult = {
|
|
171
|
+
type: "workspace_sync";
|
|
172
|
+
attemptId: string;
|
|
173
|
+
workerLabel: string;
|
|
174
|
+
trigger: {
|
|
175
|
+
type: string;
|
|
176
|
+
sessionId?: string;
|
|
177
|
+
processRunId?: string;
|
|
178
|
+
toolCallId?: string;
|
|
179
|
+
projectId?: string;
|
|
180
|
+
branchName?: string;
|
|
181
|
+
detail?: string;
|
|
182
|
+
};
|
|
183
|
+
outcome: "no_change" | "published" | "updated" | "conflict_reset" | "large_diff_blocked" | "reset" | "failed";
|
|
184
|
+
startingHead: string | null;
|
|
185
|
+
candidateHead?: string;
|
|
186
|
+
publishedHead?: string;
|
|
187
|
+
rebaseCount: number;
|
|
188
|
+
diffSizeBytes: number;
|
|
189
|
+
gitStatus: string;
|
|
190
|
+
affectedProjects: string[];
|
|
191
|
+
affectedPaths: string[];
|
|
192
|
+
discardedPaths: string[];
|
|
193
|
+
localChangesDiscarded: boolean;
|
|
194
|
+
error?: string;
|
|
195
|
+
};
|
|
196
|
+
export type R5dctlWorkspaceStatus = {
|
|
197
|
+
head: string | null;
|
|
198
|
+
latestSync: R5dctlWorkspaceSyncResult | null;
|
|
199
|
+
incident: {
|
|
200
|
+
id: string;
|
|
201
|
+
originWorkerLabel: string;
|
|
202
|
+
remediationSessionId: string;
|
|
203
|
+
status: "remediating" | "waiting_for_worker";
|
|
204
|
+
} | null;
|
|
205
|
+
};
|
|
170
206
|
export type R5dctlProcessRun = {
|
|
171
207
|
runId: string;
|
|
172
208
|
projectId: string;
|
|
@@ -192,6 +228,7 @@ export type R5dctlProcessRun = {
|
|
|
192
228
|
stderrBytes: number;
|
|
193
229
|
cancelRequested: boolean;
|
|
194
230
|
error?: string;
|
|
231
|
+
workspaceSync?: Pick<R5dctlWorkspaceSyncResult, "attemptId" | "outcome" | "publishedHead" | "affectedProjects" | "localChangesDiscarded" | "discardedPaths">;
|
|
195
232
|
};
|
|
196
233
|
export type R5dctlProcessListInput = {
|
|
197
234
|
project?: string;
|
|
@@ -287,6 +324,16 @@ export declare class R5dctlClient {
|
|
|
287
324
|
inspect: (runId: string) => Promise<R5dctlProcessInspection>;
|
|
288
325
|
stop: (runId: string) => Promise<R5dctlProcessRun>;
|
|
289
326
|
};
|
|
327
|
+
readonly workspace: {
|
|
328
|
+
status: () => Promise<R5dctlWorkspaceStatus>;
|
|
329
|
+
sync: (input?: {
|
|
330
|
+
worker?: string;
|
|
331
|
+
}) => Promise<R5dctlWorkspaceSyncResult>;
|
|
332
|
+
reset: (input: {
|
|
333
|
+
worker?: string;
|
|
334
|
+
confirmed: true;
|
|
335
|
+
}) => Promise<R5dctlWorkspaceSyncResult>;
|
|
336
|
+
};
|
|
290
337
|
readonly projects: {
|
|
291
338
|
list: () => Promise<R5dctlProject[]>;
|
|
292
339
|
describe: (projectRef: string) => Promise<R5dctlProjectDescription>;
|
|
@@ -339,6 +386,9 @@ export declare class R5dctlClient {
|
|
|
339
386
|
}) => Promise<R5dctlAgentStatusResponse>;
|
|
340
387
|
};
|
|
341
388
|
readonly sessions: {
|
|
389
|
+
recent: (input?: {
|
|
390
|
+
limit?: number;
|
|
391
|
+
}) => Promise<R5dctlSessionDescription[]>;
|
|
342
392
|
describe: (sessionId: string) => Promise<R5dctlSessionDescription>;
|
|
343
393
|
update: (sessionId: string, input: R5dctlSessionUpdateInput) => Promise<R5dctlSessionDescription>;
|
|
344
394
|
delete: (sessionId: string) => Promise<{
|