@ricsam/r5dctl 0.0.59 → 0.0.60

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.
@@ -1,4 +1,4 @@
1
- import { R5dctlClient, type R5dctlConversationRenderOptions, type R5dctlConversationResponse, type R5dctlConversationNodeResponse, type R5dctlConversationOverviewResponse, type R5dctlConversationWorkDetail, type R5dctlConversationWorkResponse, type R5dctlEnvData, type R5dctlK8sResourceHistory, type R5dctlK8sUsage, type R5dctlK8sWorkload, type R5dctlProcessInspection, type R5dctlProcessListInput, type R5dctlProcessRun, type R5dctlWorkspaceStatus, type R5dctlWorkspaceSyncResult, type ChatMode, type ModelTier } from "@ricsam/r5d-api";
1
+ import { R5dctlClient, type R5dctlConversationRenderOptions, type R5dctlConversationResponse, type R5dctlConversationNodeResponse, type R5dctlConversationOverviewResponse, type R5dctlConversationWorkDetail, type R5dctlConversationWorkResponse, type R5dctlEnvData, type R5dctlK8sResourceHistory, type R5dctlK8sUsage, type R5dctlK8sWorkload, type R5dctlProcessInspection, type R5dctlProcessListInput, type R5dctlProcessRun, type R5dctlWorkspaceStatus, type R5dctlWorkspaceSyncResult, type R5dctlAgentSource, type R5dctlAgentType, type ChatMode, type ModelTier } from "@ricsam/r5d-api";
2
2
  export type GlobalOptions = {
3
3
  baseUrl?: string;
4
4
  json: boolean;
@@ -29,6 +29,9 @@ type CommandExecutionPlan = {
29
29
  } | {
30
30
  kind: "shell";
31
31
  command?: string;
32
+ } | {
33
+ kind: "agent";
34
+ command: R5dctlBranchAgentCommand;
32
35
  } | {
33
36
  kind: "cli-help";
34
37
  text: string;
@@ -36,6 +39,35 @@ type CommandExecutionPlan = {
36
39
  type ConversationRenderOptions = Required<R5dctlConversationRenderOptions>;
37
40
  export declare function getCliHelpText(): string;
38
41
  export declare function getR5dctlVersion(): string;
42
+ export type R5dctlBranchAgentCommand = {
43
+ kind: "start";
44
+ project: string;
45
+ worker: string;
46
+ source: R5dctlAgentSource;
47
+ agentType: R5dctlAgentType;
48
+ prompt: string;
49
+ } | {
50
+ kind: "status";
51
+ sessionId: string;
52
+ } | {
53
+ kind: "prompt";
54
+ worker: string;
55
+ sessionId: string;
56
+ prompt: string;
57
+ } | {
58
+ kind: "merge";
59
+ worker: string;
60
+ sessionId: string;
61
+ } | {
62
+ kind: "stop";
63
+ sessionId: string;
64
+ } | {
65
+ kind: "finish-merge";
66
+ worker: string;
67
+ resolverSessionId: string;
68
+ summary: string;
69
+ };
70
+ export declare function parseBranchAgentCommand(options: Pick<GlobalOptions, "project" | "branch" | "session">, args: string[]): R5dctlBranchAgentCommand;
39
71
  export declare function parseGlobalArgs(argv: string[]): {
40
72
  options: GlobalOptions;
41
73
  rest: string[];
@@ -134,6 +166,70 @@ export declare function parseGetEnvsArgs(args: string[]): {
134
166
  };
135
167
  export declare function renderEnvValues(data: R5dctlEnvData): string;
136
168
  export declare function getProjectEnvValue(data: R5dctlEnvData, name: string): string;
169
+ export type R5dctlBranchAgentResponse = {
170
+ sessionId?: string;
171
+ sessionUrl?: string;
172
+ branchName?: string;
173
+ source?: R5dctlAgentSource;
174
+ baselineCommit?: string | null;
175
+ workspaceHead?: string | null;
176
+ worker?: string;
177
+ status?: string;
178
+ runStatus?: unknown;
179
+ headCommit?: string | null;
180
+ headCommitError?: string;
181
+ promptDisposition?: string;
182
+ error?: string;
183
+ summary?: string;
184
+ diffSummary?: string;
185
+ merge?: unknown;
186
+ attemptId?: string;
187
+ sourceBranch?: string;
188
+ targetBranch?: string;
189
+ commitHash?: string;
190
+ resolverSessionId?: string;
191
+ resolverBranch?: string;
192
+ folderPath?: string;
193
+ conflictedFiles?: string[];
194
+ failureReason?: string;
195
+ message?: string;
196
+ };
197
+ export type R5dctlBranchAgentClient = {
198
+ projects: {
199
+ agents: {
200
+ start: (projectRef: string, input: {
201
+ source: R5dctlAgentSource;
202
+ agentType: R5dctlAgentType;
203
+ prompt: string;
204
+ worker: string;
205
+ requestId: string;
206
+ }) => Promise<R5dctlBranchAgentResponse>;
207
+ };
208
+ };
209
+ agents: {
210
+ status: (sessionId: string) => Promise<R5dctlBranchAgentResponse>;
211
+ sendPrompt: (sessionId: string, input: {
212
+ prompt: string;
213
+ worker: string;
214
+ }) => Promise<R5dctlBranchAgentResponse>;
215
+ merge: (sessionId: string, input: {
216
+ worker: string;
217
+ }) => Promise<R5dctlBranchAgentResponse>;
218
+ stop: (sessionId: string) => Promise<R5dctlBranchAgentResponse>;
219
+ finishMerge: (resolverSessionId: string, input: {
220
+ worker: string;
221
+ summary: string;
222
+ }) => Promise<R5dctlBranchAgentResponse>;
223
+ };
224
+ };
225
+ export declare function renderBranchAgentStart(agent: R5dctlBranchAgentResponse): string;
226
+ export declare function renderBranchAgentStatus(agent: R5dctlBranchAgentResponse): string;
227
+ export declare function renderBranchAgentMerge(result: R5dctlBranchAgentResponse): string;
228
+ export type R5dctlBranchAgentDispatchResult = {
229
+ data: R5dctlBranchAgentResponse;
230
+ human: string;
231
+ };
232
+ export declare function dispatchBranchAgentCommand(client: R5dctlBranchAgentClient, command: R5dctlBranchAgentCommand): Promise<R5dctlBranchAgentDispatchResult>;
137
233
  export declare function parseConversationRenderArgs(args: string[]): ConversationRenderOptions;
138
234
  export declare function renderConversationResponse(read: R5dctlConversationResponse): string;
139
235
  export declare function parseConversationWorkDetailArgs(args: string[]): R5dctlConversationWorkDetail;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricsam/r5dctl",
3
- "version": "0.0.59",
3
+ "version": "0.0.60",
4
4
  "type": "module",
5
5
  "main": "./dist/cjs/cli.cjs",
6
6
  "module": "./dist/mjs/cli.mjs",
@@ -26,7 +26,7 @@
26
26
  "r5dctl": "dist/cjs/main.cjs"
27
27
  },
28
28
  "dependencies": {
29
- "@ricsam/r5d-api": "^0.0.59",
29
+ "@ricsam/r5d-api": "^0.0.60",
30
30
  "dotenv": "^17",
31
31
  "qrcode": "^1.5.4",
32
32
  "ws": "^8.18.3"