@ricsam/r5d-api 0.0.35 → 0.0.37

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.
@@ -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)}`
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-api",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "type": "commonjs"
5
5
  }
@@ -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)}`
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-api",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "type": "module"
5
5
  }
@@ -1,4 +1,4 @@
1
- export type ChatMode = "ask" | "plan" | "build" | "agent" | "explore" | "review" | "test" | "research" | "security_review" | "large_diff_remediation" | "merge_conflict_resolution";
1
+ export type ChatMode = "ask" | "plan" | "build" | "agent" | "explore" | "test" | "research" | "security_review" | "large_diff_remediation" | "merge_conflict_resolution";
2
2
  export type ModelTier = "low" | "medium" | "high" | "max";
3
3
  export type R5dctlAgentType = "research" | "debug" | "test";
4
4
  export type R5dctlProject = {
@@ -167,21 +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 R5dctlProcessRepositoryOutcome = {
171
- projectId: string;
172
- projectPath?: string;
173
- branchName: string;
174
- observedDuringSynchronization: true;
175
- status: "clean" | "published" | "no_change" | "blocked_large_diff" | "blocked_remediation" | "failed";
176
- startCommitHash?: string;
177
- publishedCommitHash?: string;
178
- diffSizeBytes?: number;
179
- principalSynchronizationState?: "pending" | "synced" | "failed";
180
- fanOutState?: "scheduled" | "failed";
181
- branchActionId?: string;
182
- largeDiffIncidentId?: string;
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;
183
194
  error?: string;
184
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
+ };
185
206
  export type R5dctlProcessRun = {
186
207
  runId: string;
187
208
  projectId: string;
@@ -194,14 +215,6 @@ export type R5dctlProcessRun = {
194
215
  mode: "foreground" | "detached";
195
216
  pid?: number;
196
217
  processGroupId?: number;
197
- startCommitHash: string;
198
- launchWorkspaceActionId?: string;
199
- terminalWorkspaceActionId?: string;
200
- terminalSyncClaimedAt?: string;
201
- repositoryOutcomes: R5dctlProcessRepositoryOutcome[];
202
- syncState: "pending_process_exit" | "synced" | "blocked_large_diff" | "waiting_for_worker" | "stale_workspace";
203
- publishedCommitHash?: string;
204
- principalSynchronizationState?: "pending" | "synced" | "failed";
205
218
  argv: string[];
206
219
  command: string;
207
220
  cwd?: string;
@@ -215,6 +228,7 @@ export type R5dctlProcessRun = {
215
228
  stderrBytes: number;
216
229
  cancelRequested: boolean;
217
230
  error?: string;
231
+ workspaceSync?: Pick<R5dctlWorkspaceSyncResult, "attemptId" | "outcome" | "publishedHead" | "affectedProjects" | "localChangesDiscarded" | "discardedPaths">;
218
232
  };
219
233
  export type R5dctlProcessListInput = {
220
234
  project?: string;
@@ -310,6 +324,16 @@ export declare class R5dctlClient {
310
324
  inspect: (runId: string) => Promise<R5dctlProcessInspection>;
311
325
  stop: (runId: string) => Promise<R5dctlProcessRun>;
312
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
+ };
313
337
  readonly projects: {
314
338
  list: () => Promise<R5dctlProject[]>;
315
339
  describe: (projectRef: string) => Promise<R5dctlProjectDescription>;
@@ -362,6 +386,9 @@ export declare class R5dctlClient {
362
386
  }) => Promise<R5dctlAgentStatusResponse>;
363
387
  };
364
388
  readonly sessions: {
389
+ recent: (input?: {
390
+ limit?: number;
391
+ }) => Promise<R5dctlSessionDescription[]>;
365
392
  describe: (sessionId: string) => Promise<R5dctlSessionDescription>;
366
393
  update: (sessionId: string, input: R5dctlSessionUpdateInput) => Promise<R5dctlSessionDescription>;
367
394
  delete: (sessionId: string) => Promise<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-api",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "type": "module",
5
5
  "main": "./dist/cjs/index.cjs",
6
6
  "module": "./dist/mjs/index.mjs",