@ricsam/r5d-api 0.0.74 → 0.0.76

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/README.md CHANGED
@@ -50,7 +50,7 @@ Trusted server-side callers that authenticate through custom headers, such as a
50
50
  - `processes.list({ project?, branch?, session?, worker? })`
51
51
  - `processes.stop(runId)`
52
52
  - `projects.list()`
53
- - `projects.create({ name?, orgId? })`
53
+ - `projects.create({ repositoryId })`
54
54
  - `projects.describe(projectRef)`
55
55
  - `projects.update(projectRef, { name?, mode? })`
56
56
  - `projects.delete(projectRef)`
@@ -59,8 +59,6 @@ Trusted server-side callers that authenticate through custom headers, such as a
59
59
  - `projects.sessions.list(projectRef, { branch? })`
60
60
  - `projects.sessions.create(projectRef, { branchName, name? })`
61
61
  - `projects.sessions.start(projectRef, { worker, model, prompt, requestId, worktree?, newWorktree?, source? })`
62
- - `projects.worktrees.merge(projectRef, sourceWorktree, { worker?, conflictMode })`
63
- - `projects.worktrees.finishMerge(projectRef, conflictWorktree, { worker, summary? })`
64
62
  - `sessions.describe(sessionId)`
65
63
  - `sessions.update(sessionId, { name })`
66
64
  - `sessions.delete(sessionId)`
@@ -77,7 +75,7 @@ Trusted server-side callers that authenticate through custom headers, such as a
77
75
 
78
76
  `sessions.prompt(...)` returns `promptDisposition: "queued" | "started"`, so callers can distinguish delivery to an active generation from a newly started generation. Session commands never rebind a session to another worker implicitly.
79
77
 
80
- `projects.sessions.start(...)` selects either an existing `worktree`, or a `newWorktree` plus `source: { type: "worktree", branchName }`. Session events are exposed as an authenticated async iterable over the raw `/api/sessions/:sessionId/events` SSE stream.
78
+ `projects.sessions.start(...)` selects either an existing `worktree`, or a `newWorktree` plus `source: { type: "worktree", branchName }`. It returns a durable `provisioning` handle immediately; poll `sessions.status(...)` until the run is queued, running, failed, or stopped before attaching to events. Reusing the same `requestId` and request body is idempotent. Session events are exposed as an authenticated async iterable over the raw `/api/sessions/:sessionId/events` SSE stream.
81
79
 
82
80
  ## Errors
83
81
 
@@ -397,22 +397,6 @@ class R5dctlClient {
397
397
  path: `/api/r5dctl/projects/${encodeURIComponent(projectRef)}/sessions/start`,
398
398
  body: input
399
399
  })
400
- },
401
- worktrees: {
402
- merge: (projectRef, sourceWorktree, input) => this.request({
403
- method: "POST",
404
- path: `/api/r5dctl/projects/${encodeURIComponent(projectRef)}/worktrees/${encodeURIComponent(sourceWorktree)}/merge`,
405
- body: input
406
- }),
407
- finishMerge: (projectRef, conflictWorktree, input) => this.request({
408
- method: "POST",
409
- path: `/api/r5dctl/projects/${encodeURIComponent(projectRef)}/worktrees/${encodeURIComponent(conflictWorktree)}/merge/finish`,
410
- body: input
411
- }),
412
- mergeAttempt: (projectRef, attemptId) => this.request({
413
- method: "GET",
414
- path: `/api/r5dctl/projects/${encodeURIComponent(projectRef)}/merge-attempts/${encodeURIComponent(attemptId)}`
415
- })
416
400
  }
417
401
  };
418
402
  sessions = {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-api",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "type": "commonjs"
5
5
  }
@@ -373,22 +373,6 @@ class R5dctlClient {
373
373
  path: `/api/r5dctl/projects/${encodeURIComponent(projectRef)}/sessions/start`,
374
374
  body: input
375
375
  })
376
- },
377
- worktrees: {
378
- merge: (projectRef, sourceWorktree, input) => this.request({
379
- method: "POST",
380
- path: `/api/r5dctl/projects/${encodeURIComponent(projectRef)}/worktrees/${encodeURIComponent(sourceWorktree)}/merge`,
381
- body: input
382
- }),
383
- finishMerge: (projectRef, conflictWorktree, input) => this.request({
384
- method: "POST",
385
- path: `/api/r5dctl/projects/${encodeURIComponent(projectRef)}/worktrees/${encodeURIComponent(conflictWorktree)}/merge/finish`,
386
- body: input
387
- }),
388
- mergeAttempt: (projectRef, attemptId) => this.request({
389
- method: "GET",
390
- path: `/api/r5dctl/projects/${encodeURIComponent(projectRef)}/merge-attempts/${encodeURIComponent(attemptId)}`
391
- })
392
376
  }
393
377
  };
394
378
  sessions = {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-api",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "type": "module"
5
5
  }
@@ -1,4 +1,4 @@
1
- export type ChatMode = "ask" | "plan" | "agent" | "large_diff_remediation" | "merge_conflict_resolution";
1
+ export type ChatMode = "ask" | "plan" | "agent" | "large_diff_remediation";
2
2
  export type R5dctlSessionMode = "ask" | "plan" | "agent";
3
3
  export type ModelTier = "low" | "medium" | "high" | "max";
4
4
  export type R5dctlWorktreeSource = {
@@ -14,9 +14,7 @@ export type R5dctlProject = {
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
16
  };
17
- export type R5dctlProjectDescription = R5dctlProject & {
18
- orgId: string | null;
19
- };
17
+ export type R5dctlProjectDescription = R5dctlProject;
20
18
  export type R5dctlBranch = {
21
19
  branchName: string;
22
20
  sessionCount: number;
@@ -199,23 +197,6 @@ export type R5dctlConversationForkResponse = {
199
197
  copiedNodeCount: number;
200
198
  };
201
199
  export type R5dctlSessionRunStatus = "idle" | "provisioning" | "queued" | "running" | "completed" | "failed" | "stopped";
202
- export type R5dctlWorktreeMergeResponse = {
203
- status: "merged" | "up_to_date" | "conflicts" | "provisioning" | "conflict_worktree_created" | "resolving" | "failed" | "stale";
204
- attemptId?: string;
205
- sourceWorktree: string;
206
- targetWorktree: string;
207
- conflictWorktree?: string;
208
- commitHash?: string;
209
- resolverSessionId?: string;
210
- folderPath?: string;
211
- worker?: string;
212
- conflictedFiles?: string[];
213
- failureReason?: string;
214
- message?: string;
215
- worktreeReady?: boolean;
216
- resolverAgentRunning?: boolean;
217
- };
218
- export type R5dctlMergeConflictMode = "none" | "worktree" | "agent";
219
200
  export type R5dctlSessionRunResponse = {
220
201
  sessionId: string;
221
202
  branchName: string;
@@ -357,24 +338,25 @@ export type R5dctlWorkspaceSyncResult = {
357
338
  toolCallId?: string;
358
339
  projectId?: string;
359
340
  branchName?: string;
360
- canonicalCheckoutOnly?: boolean;
361
341
  detail?: string;
362
342
  };
363
- outcome: "no_change" | "candidate_ready" | "published" | "updated" | "conflict_reset" | "large_diff_blocked" | "conflict_blocked" | "reset" | "failed";
343
+ outcome: "no_change" | "published" | "updated" | "conflict_reset" | "large_diff_blocked" | "conflict_blocked" | "reset" | "failed";
364
344
  startingHead: string | null;
365
- expectedHead?: string | null;
366
- candidateHead?: string;
367
- quarantineRef?: string;
345
+ localHead?: string;
368
346
  publishedHead?: string;
369
347
  rebaseCount: number;
370
348
  diffSizeBytes: number;
371
349
  gitStatus: string;
372
350
  affectedProjects: string[];
373
351
  affectedPaths: string[];
352
+ conflictPaths?: string[];
353
+ conflictSnapshotRefs?: {
354
+ local: string;
355
+ remote: string;
356
+ };
374
357
  discardedPaths: string[];
375
358
  localChangesDiscarded: boolean;
376
359
  dirtyGeneration?: number;
377
- sampledCanonicalCheckoutTreeHash?: string;
378
360
  telemetry?: {
379
361
  totalMs: number;
380
362
  queueMs: number;
@@ -388,36 +370,18 @@ export type R5dctlWorkspaceStatus = {
388
370
  latestSync: R5dctlWorkspaceSyncResult | null;
389
371
  workers: Array<{
390
372
  workerLabel: string;
391
- ready: boolean;
392
- manifestRevision: string | null;
373
+ configured: boolean;
393
374
  pendingCheckouts: Array<{
394
375
  projectId: string;
395
376
  branchName: string;
396
377
  }>;
397
378
  localHead: string | null;
398
- desiredCanonicalHead: string | null;
399
- dirtyGeneration: number;
400
- publishedGeneration: number;
401
- publicationState: "idle" | "scheduled" | "preparing" | "submitting" | "blocked";
402
- casRetries: number;
403
- lastNotifiedHead: string | null;
404
- lastNotifiedAt: string | null;
405
- fanoutLag: boolean;
406
- fanoutLagMs: number | null;
379
+ aheadOfOriginBranches: Array<{
380
+ projectId: string;
381
+ branchName: string;
382
+ ahead: number;
383
+ }>;
407
384
  }>;
408
- materialization: {
409
- desiredHead: string | null;
410
- materializedHead: string | null;
411
- state: "idle" | "pending" | "running" | "failed";
412
- retryCount: number;
413
- nextRetryAt: string | null;
414
- lastError: string | null;
415
- startedAt: string | null;
416
- completedAt: string | null;
417
- updatedAt: string;
418
- lag: boolean;
419
- lagMs: number;
420
- } | null;
421
385
  incident: {
422
386
  id: string;
423
387
  kind: "large_diff" | "sync_conflict";
@@ -670,8 +634,8 @@ export declare class R5dctlClient {
670
634
  };
671
635
  readonly projects: {
672
636
  list: () => Promise<R5dctlProject[]>;
673
- describe: (projectRef: string) => Promise<R5dctlProjectDescription>;
674
- update: (projectRef: string, input: R5dctlProjectUpdateInput) => Promise<R5dctlProjectDescription>;
637
+ describe: (projectRef: string) => Promise<R5dctlProject>;
638
+ update: (projectRef: string, input: R5dctlProjectUpdateInput) => Promise<R5dctlProject>;
675
639
  delete: (projectRef: string) => Promise<{
676
640
  success: boolean;
677
641
  }>;
@@ -699,17 +663,6 @@ export declare class R5dctlClient {
699
663
  create: (projectRef: string, input: R5dctlSessionCreateInput) => Promise<R5dctlSessionDescription>;
700
664
  start: (projectRef: string, input: R5dctlSessionStartInput) => Promise<R5dctlSessionRunResponse>;
701
665
  };
702
- worktrees: {
703
- merge: (projectRef: string, sourceWorktree: string, input: {
704
- worker?: string;
705
- conflictMode: R5dctlMergeConflictMode;
706
- }) => Promise<R5dctlWorktreeMergeResponse>;
707
- finishMerge: (projectRef: string, conflictWorktree: string, input: {
708
- worker: string;
709
- summary?: string;
710
- }) => Promise<R5dctlWorktreeMergeResponse>;
711
- mergeAttempt: (projectRef: string, attemptId: string) => Promise<R5dctlWorktreeMergeResponse>;
712
- };
713
666
  };
714
667
  readonly sessions: {
715
668
  recent: (input?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-api",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "type": "module",
5
5
  "main": "./dist/cjs/index.cjs",
6
6
  "module": "./dist/mjs/index.mjs",