@ricsam/r5dctl 0.0.105 → 0.0.107

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
@@ -64,7 +64,7 @@ r5dctl -p <project> get envs --show-values
64
64
  r5dctl -p <project> get env API_KEY
65
65
  r5dctl -p <project> set envs --from-env-file ~/.env --only-missing
66
66
  r5dctl -p <project> set envs -e API_KEY=value --description "API credential"
67
- r5dctl -p <project> get sessions --branch <branch>
67
+ r5dctl -p <project> get sessions --branch <branch> # each session's live state and last activity
68
68
  r5dctl -p <project> create session -b <branch> --name "Spec session"
69
69
  r5dctl describe session <session-id>
70
70
  r5dctl -s <session-id> update session --name "Renamed session"
@@ -87,6 +87,7 @@ r5dctl conversation move-head <session-id> <node-id> # rewind or replay the
87
87
  r5dctl conversation fork <session-id> <node-id> # copy the branch up to a node into a new session
88
88
  r5dctl conversation fork <session-id> <node-id> --name "Retry with tests"
89
89
  r5dctl session prompt --worker <label> --mode plan --model max <session-id> "..."
90
+ r5dctl session prompt --worker <label> --mode agent --model max --delivery queue <session-id> "..." # after the current turn
90
91
  r5dctl -s <session-id> answer-questions --worker <label> --mode plan --model max -a1 "Recipe Collection" -a2 "Both Manual & AI"
91
92
  r5dctl -s <session-id> answer-env-request --worker <label> --mode agent --model max -e KEY=value --context "Generate the remaining salts"
92
93
 
@@ -95,6 +96,7 @@ r5dctl -p <project> session start --worker <label> --new-worktree fix/tests --so
95
96
  r5dctl -p <project> session start --worker <label> --new-worktree fix/tests --source worktree:main --working-tree clean --model max "Fix the failing tests from main's committed state"
96
97
  r5dctl session status <session-id>
97
98
  r5dctl session prompt --worker <label> --mode agent --model max <session-id> "Also check the migration"
99
+ r5dctl session prompt --worker <label> --mode agent --model max --delivery force <session-id> "Stop that and fix the build first"
98
100
  r5dctl session stop <session-id>
99
101
  r5dctl session process-log <run-id> --tail 200
100
102
  r5dctl session process-log <run-id> --grep "error|failed"
@@ -129,7 +131,13 @@ pull requests.
129
131
 
130
132
  `get branches` lists every branch the project knows about, including managed branches without sessions. A worker whose workspace sync found a configured branch's checkout directory missing, or present but not a linked worktree of the project, skips that branch and reports it; the listing then shows `checkout=missing on <worker>` or `checkout=not_a_worktree on <worker>`, and `workspace status` prints a `Missing checkouts on <worker>` line. Recover either by deleting the branch with `delete branch <branch> --confirm` or by reconnecting that worker, which recreates the checkout without snapshotting the project's other checkouts.
131
133
 
132
- `session start` creates an ordinary agent-mode chat on an explicitly selected existing worktree, or creates a named linked worktree from an explicit `worktree:<branch>` source. A new worktree is cut from the source branch's current commit; `--working-tree carry` (the default, `git switch -c` semantics) also copies the source checkout's uncommitted changes into it, while `--working-tree clean` checks out that commit only. The new session's first message states which mode applies, and the start output prints `Source` and `Working tree` lines. A clean request fails with a clear error when the selected worker predates the option, because such a worker would silently carry instead. It requires project, worker, model, and prompt and never infers them from the current shell. Start returns a durable `provisioning` handle immediately; workspace synchronization, linked-worktree creation, and prompt enqueue continue in the background and are visible through `session status`. Idempotent request retries return the same handle. Prompts return after durable enqueue. Task specialization belongs in the prompt; there are no predefined debug, explore, research, or test agents. `session stop` returns as soon as the agent run is stopped; the stopped worktree's workspace Git synchronization finishes asynchronously behind the response.
134
+ `session start` creates an ordinary agent-mode chat on an explicitly selected existing worktree, or creates a named linked worktree from an explicit `worktree:<branch>` source. A new worktree is cut from the source branch's current commit; `--working-tree carry` (the default, `git switch -c` semantics) also copies the source checkout's uncommitted changes into it, while `--working-tree clean` checks out that commit only. The new session's first message states which mode applies, and the start output prints `Source` and `Working tree` lines. A clean request fails with a clear error when the selected worker predates the option, because such a worker would silently carry instead. It requires project, worker, model, and prompt and never infers them from the current shell. Start returns a durable `provisioning` handle immediately; workspace synchronization, linked-worktree creation, and prompt enqueue continue in the background and are visible through `session status`. Idempotent request retries return the same handle. Prompts return after durable enqueue. Task specialization belongs in the prompt; there are no predefined debug, explore, research, or test agents.
135
+
136
+ `session prompt` works on any project session you can access, including one created in the web UI. `--delivery` decides how the prompt reaches a session whose agent is busy: `steer` (the default) lands inside the current turn right after the agent's next tool result, `queue` waits until the agent finishes the whole turn, and `force` aborts the agent's current round of tool calls and continues from the prompt instead. An idle session starts a new generation whatever the delivery, and a steer queued while the session was idle with an unfinished turn is still heard by the generation that resumes it. The response's `Prompt:` line reports `started`, `steered`, `queued`, or `forced`. `session stop` returns as soon as the agent run is stopped; the stopped worktree's workspace Git synchronization finishes asynchronously behind the response.
137
+
138
+ `get sessions` lists a project's sessions, newest first, and appends each session's live state (`running`, `stopping`, `paused`, `provisioning`, `queued`, or `idle`) and how long ago its conversation last advanced (`running, last active 12s ago`). Several sessions can work in the same branch checkout at once (task chips, shared-mode sub-agents, sessions the user starts), so run it with `--branch` before relying on a working tree or reviewing what changed in it. A server that predates the fields prints the id, branch, and name only.
139
+
140
+ `session stop` also stops every sub-agent session the stopped session started, directly or through its own children, and `session status` prints `Child sessions: <active> active of <total>` for a session that launched sub-agents.
133
141
 
134
142
  `session status` reports the run lifecycle and the launch-time `Source` and `Working tree` facts only. It deliberately prints no commit hash for the worktree, not even the launch baseline: a hash would be stale by the time a caller acts on it, because commits can land between the read and the action. Find the base and the branch's commits with git in the worker checkout instead, for example `git merge-base <your-branch> <branch>`, `git log --oneline <your-branch>..<branch>`, and `git status` in the branch folder, as the `Branch state` line reminds you. While a new worktree is still provisioning, a `Provisioning` line reports where its creation stands in the worker's operation queue and since when (`Provisioning: queued behind 3 worker operations since 2026-09-03T11:41:30Z`); a worker that predates operation receipts leaves that line out.
135
143
 
package/dist/cjs/cli.cjs CHANGED
@@ -89,6 +89,7 @@ __export(cli_exports, {
89
89
  renderProcessInspection: () => renderProcessInspection,
90
90
  renderProcessList: () => renderProcessList,
91
91
  renderProcessLog: () => renderProcessLog,
92
+ renderSessionList: () => renderSessionList,
92
93
  renderSessionRunStart: () => renderSessionRunStart,
93
94
  renderSessionRunStatus: () => renderSessionRunStatus,
94
95
  renderWorkspaceStatus: () => renderWorkspaceStatus,
@@ -112,6 +113,8 @@ var import_r5d_api = require("@ricsam/r5d-api");
112
113
  var import_shell = require("./shell.cjs");
113
114
  const CHAT_MODES = /* @__PURE__ */ new Set(["plan", "agent", "large_diff_remediation"]);
114
115
  const R5DCTL_SESSION_MODES = /* @__PURE__ */ new Set(["plan", "agent"]);
116
+ const R5DCTL_PROMPT_DELIVERIES = /* @__PURE__ */ new Set(["queue", "steer", "force"]);
117
+ const R5DCTL_PROMPT_DEFAULT_DELIVERY = "steer";
115
118
  const MODEL_TIERS = /* @__PURE__ */ new Set(["low", "medium", "high", "max"]);
116
119
  const R5DCTL_PACKAGE_NAME = "@ricsam/r5dctl";
117
120
  const CLI_GLOBAL_OPTION_HELP = [
@@ -174,11 +177,13 @@ const SESSION_RUN_HELP_TEXT = [
174
177
  ' r5dctl -p <project> session start --worker <label> --worktree <branch> --model <tier> [-f|--follow|--watch] [--tools] [--parent-session <session-id>] "<prompt>"',
175
178
  ' r5dctl -p <project> session start --worker <label> --new-worktree <branch> --source worktree:<branch> [--working-tree carry|clean] --model <tier> [-f|--follow|--watch] [--tools] [--parent-session <session-id>] "<prompt>"',
176
179
  " r5dctl session status <session-id>",
177
- ' r5dctl session prompt --worker <label> --mode <mode> --model <tier> <session-id> "<prompt>"',
180
+ ' r5dctl session prompt --worker <label> --mode <mode> --model <tier> [--delivery queue|steer|force] <session-id> "<prompt>"',
178
181
  " r5dctl session stop <session-id>",
179
182
  " r5dctl session process-log <run-id> [--tail <n>] [--grep <pattern>]",
180
183
  "",
181
184
  "Create, inspect, resume, and stop ordinary agent sessions.",
185
+ "prompt reaches a busy session by --delivery: steer (default) lands after the agent's next tool result,",
186
+ "queue waits for the current turn to finish, force replaces the agent's current tool round. An idle session starts a new generation either way.",
182
187
  "A new worktree starts with the source checkout's uncommitted changes (--working-tree carry, the default);",
183
188
  "--working-tree clean checks out the source branch's current commit only. Start and status print the mode, never a commit hash.",
184
189
  "Use -f/--follow/--watch to attach after a start; Ctrl-C detaches without stopping the session.",
@@ -308,8 +313,8 @@ const SHARED_HELP_ENTRIES = [
308
313
  },
309
314
  {
310
315
  section: "sessions",
311
- usage: 'session prompt --worker <label> --mode <mode> --model <tier> <session-id> "<prompt>"',
312
- description: "Queue a prompt or start a new session generation."
316
+ usage: 'session prompt --worker <label> --mode <mode> --model <tier> [--delivery queue|steer|force] <session-id> "<prompt>"',
317
+ description: "Prompt a session: steer into the current turn after the next tool result (default), queue behind the turn, or force in place of the current tool round; an idle session starts a new generation."
313
318
  },
314
319
  {
315
320
  section: "sessions",
@@ -602,6 +607,14 @@ function requireSessionMode(value) {
602
607
  }
603
608
  return mode;
604
609
  }
610
+ function parsePromptDelivery(value) {
611
+ if (value === void 0) return R5DCTL_PROMPT_DEFAULT_DELIVERY;
612
+ const delivery = value.trim();
613
+ if (!R5DCTL_PROMPT_DELIVERIES.has(delivery)) {
614
+ throw new Error("Invalid --delivery. Expected one of: queue, steer, force");
615
+ }
616
+ return delivery;
617
+ }
605
618
  function parseBranchCreateArgs(args) {
606
619
  const parsed = parseCommandOperands(args, /* @__PURE__ */ new Set(["--source", "--working-tree", "--worker"]), /* @__PURE__ */ new Map(), "create branch", 1);
607
620
  if (parsed.positionals.length > 0) throw new Error(`Unexpected create branch argument: ${parsed.positionals[0]}`);
@@ -801,7 +814,7 @@ function parseSessionRunCommand(options, args) {
801
814
  return { kind: subcommand, sessionId };
802
815
  }
803
816
  if (subcommand === "prompt") {
804
- const parsed = parseCommandOperands(commandArgs, /* @__PURE__ */ new Set(["--worker", "--mode", "--model"]), /* @__PURE__ */ new Map(), "session prompt", 1);
817
+ const parsed = parseCommandOperands(commandArgs, /* @__PURE__ */ new Set(["--worker", "--mode", "--model", "--delivery"]), /* @__PURE__ */ new Map(), "session prompt", 1);
805
818
  const sessionId = requireValue(parsed.positionals[0], "Session id is required for `session prompt`");
806
819
  const prompt = parsed.positionals.slice(1).join(" ").trim();
807
820
  if (!prompt) throw new Error("Prompt is required for `session prompt`");
@@ -811,7 +824,8 @@ function parseSessionRunCommand(options, args) {
811
824
  sessionId,
812
825
  prompt,
813
826
  mode: requireSessionMode(parsed.values.get("--mode")),
814
- model: requireModel(parsed.values.get("--model"))
827
+ model: requireModel(parsed.values.get("--model")),
828
+ delivery: parsePromptDelivery(parsed.values.get("--delivery"))
815
829
  };
816
830
  }
817
831
  throw new Error(`Unknown session command: ${subcommand}`);
@@ -1635,11 +1649,15 @@ function renderProjectList(projects) {
1635
1649
  Mode: ${project.mode}`).join("\n\n")}
1636
1650
  `;
1637
1651
  }
1638
- function renderSessionList(sessions) {
1652
+ function formatSessionActivity(session, nowMs) {
1653
+ if (!session.runState) return void 0;
1654
+ return session.lastActivityAt ? `${session.runState}, last active ${formatProcessAge(session.lastActivityAt, nowMs)} ago` : session.runState;
1655
+ }
1656
+ function renderSessionList(sessions, nowMs = Date.now()) {
1639
1657
  if (sessions.length === 0) {
1640
1658
  return "No sessions found.\n";
1641
1659
  }
1642
- return `${sessions.map((session) => `${session.id} ${session.branchName} ${session.name ?? "(unnamed)"}`).join("\n")}
1660
+ return `${sessions.map((session) => [session.id, session.branchName, formatSessionActivity(session, nowMs), session.name ?? "(unnamed)"].filter(Boolean).join(" ")).join("\n")}
1643
1661
  `;
1644
1662
  }
1645
1663
  function renderRecentSessionList(sessions) {
@@ -2130,6 +2148,13 @@ function formatProvisioningQueueLine(session) {
2130
2148
  if (position === 0) return `Provisioning: worker started the branch operation at ${since}`;
2131
2149
  return `Provisioning: queued behind ${position} worker operation${position === 1 ? "" : "s"} since ${since}`;
2132
2150
  }
2151
+ function formatChildSessionsLine(session) {
2152
+ const children = session.childSessions;
2153
+ if (!children || typeof children !== "object") return void 0;
2154
+ const { total, active } = children;
2155
+ if (!Number.isInteger(total) || !Number.isInteger(active) || total <= 0 || active < 0) return void 0;
2156
+ return `Child sessions: ${active} active of ${total}`;
2157
+ }
2133
2158
  function renderSessionRunStatus(session) {
2134
2159
  const status = formatStatusValue(session.status) ?? "unknown";
2135
2160
  const lines = [`Session: ${responseString(session, "sessionId") ?? "(unknown)"}`, `Status: ${status}`];
@@ -2150,6 +2175,8 @@ function renderSessionRunStatus(session) {
2150
2175
  const value = responseString(session, key);
2151
2176
  if (value) lines.push(`${label}: ${value}`);
2152
2177
  }
2178
+ const childSessions = formatChildSessionsLine(session);
2179
+ if (childSessions) lines.push(childSessions);
2153
2180
  lines.push(`Branch state: ${formatBranchStateHint(branch)}`);
2154
2181
  const error = responseString(session, "error");
2155
2182
  if (error) lines.push(`Error: ${error}`);
@@ -2194,7 +2221,8 @@ async function dispatchSessionRunCommand(client, command) {
2194
2221
  worker: command.worker,
2195
2222
  mode: command.mode,
2196
2223
  model: command.model,
2197
- requestId: (0, import_node_crypto.randomUUID)()
2224
+ requestId: (0, import_node_crypto.randomUUID)(),
2225
+ delivery: command.delivery
2198
2226
  });
2199
2227
  return { data: data2, human: renderSessionRunStatus(data2) };
2200
2228
  }
@@ -3742,6 +3770,7 @@ async function main(argv = process.argv.slice(2)) {
3742
3770
  renderProcessInspection,
3743
3771
  renderProcessList,
3744
3772
  renderProcessLog,
3773
+ renderSessionList,
3745
3774
  renderSessionRunStart,
3746
3775
  renderSessionRunStatus,
3747
3776
  renderWorkspaceStatus,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5dctl",
3
- "version": "0.0.105",
3
+ "version": "0.0.107",
4
4
  "type": "commonjs"
5
5
  }
package/dist/mjs/cli.mjs CHANGED
@@ -13,6 +13,8 @@ import {
13
13
  import { runR5dctlShell } from "./shell.mjs";
14
14
  const CHAT_MODES = /* @__PURE__ */ new Set(["plan", "agent", "large_diff_remediation"]);
15
15
  const R5DCTL_SESSION_MODES = /* @__PURE__ */ new Set(["plan", "agent"]);
16
+ const R5DCTL_PROMPT_DELIVERIES = /* @__PURE__ */ new Set(["queue", "steer", "force"]);
17
+ const R5DCTL_PROMPT_DEFAULT_DELIVERY = "steer";
16
18
  const MODEL_TIERS = /* @__PURE__ */ new Set(["low", "medium", "high", "max"]);
17
19
  const R5DCTL_PACKAGE_NAME = "@ricsam/r5dctl";
18
20
  const CLI_GLOBAL_OPTION_HELP = [
@@ -75,11 +77,13 @@ const SESSION_RUN_HELP_TEXT = [
75
77
  ' r5dctl -p <project> session start --worker <label> --worktree <branch> --model <tier> [-f|--follow|--watch] [--tools] [--parent-session <session-id>] "<prompt>"',
76
78
  ' r5dctl -p <project> session start --worker <label> --new-worktree <branch> --source worktree:<branch> [--working-tree carry|clean] --model <tier> [-f|--follow|--watch] [--tools] [--parent-session <session-id>] "<prompt>"',
77
79
  " r5dctl session status <session-id>",
78
- ' r5dctl session prompt --worker <label> --mode <mode> --model <tier> <session-id> "<prompt>"',
80
+ ' r5dctl session prompt --worker <label> --mode <mode> --model <tier> [--delivery queue|steer|force] <session-id> "<prompt>"',
79
81
  " r5dctl session stop <session-id>",
80
82
  " r5dctl session process-log <run-id> [--tail <n>] [--grep <pattern>]",
81
83
  "",
82
84
  "Create, inspect, resume, and stop ordinary agent sessions.",
85
+ "prompt reaches a busy session by --delivery: steer (default) lands after the agent's next tool result,",
86
+ "queue waits for the current turn to finish, force replaces the agent's current tool round. An idle session starts a new generation either way.",
83
87
  "A new worktree starts with the source checkout's uncommitted changes (--working-tree carry, the default);",
84
88
  "--working-tree clean checks out the source branch's current commit only. Start and status print the mode, never a commit hash.",
85
89
  "Use -f/--follow/--watch to attach after a start; Ctrl-C detaches without stopping the session.",
@@ -209,8 +213,8 @@ const SHARED_HELP_ENTRIES = [
209
213
  },
210
214
  {
211
215
  section: "sessions",
212
- usage: 'session prompt --worker <label> --mode <mode> --model <tier> <session-id> "<prompt>"',
213
- description: "Queue a prompt or start a new session generation."
216
+ usage: 'session prompt --worker <label> --mode <mode> --model <tier> [--delivery queue|steer|force] <session-id> "<prompt>"',
217
+ description: "Prompt a session: steer into the current turn after the next tool result (default), queue behind the turn, or force in place of the current tool round; an idle session starts a new generation."
214
218
  },
215
219
  {
216
220
  section: "sessions",
@@ -503,6 +507,14 @@ function requireSessionMode(value) {
503
507
  }
504
508
  return mode;
505
509
  }
510
+ function parsePromptDelivery(value) {
511
+ if (value === void 0) return R5DCTL_PROMPT_DEFAULT_DELIVERY;
512
+ const delivery = value.trim();
513
+ if (!R5DCTL_PROMPT_DELIVERIES.has(delivery)) {
514
+ throw new Error("Invalid --delivery. Expected one of: queue, steer, force");
515
+ }
516
+ return delivery;
517
+ }
506
518
  function parseBranchCreateArgs(args) {
507
519
  const parsed = parseCommandOperands(args, /* @__PURE__ */ new Set(["--source", "--working-tree", "--worker"]), /* @__PURE__ */ new Map(), "create branch", 1);
508
520
  if (parsed.positionals.length > 0) throw new Error(`Unexpected create branch argument: ${parsed.positionals[0]}`);
@@ -702,7 +714,7 @@ function parseSessionRunCommand(options, args) {
702
714
  return { kind: subcommand, sessionId };
703
715
  }
704
716
  if (subcommand === "prompt") {
705
- const parsed = parseCommandOperands(commandArgs, /* @__PURE__ */ new Set(["--worker", "--mode", "--model"]), /* @__PURE__ */ new Map(), "session prompt", 1);
717
+ const parsed = parseCommandOperands(commandArgs, /* @__PURE__ */ new Set(["--worker", "--mode", "--model", "--delivery"]), /* @__PURE__ */ new Map(), "session prompt", 1);
706
718
  const sessionId = requireValue(parsed.positionals[0], "Session id is required for `session prompt`");
707
719
  const prompt = parsed.positionals.slice(1).join(" ").trim();
708
720
  if (!prompt) throw new Error("Prompt is required for `session prompt`");
@@ -712,7 +724,8 @@ function parseSessionRunCommand(options, args) {
712
724
  sessionId,
713
725
  prompt,
714
726
  mode: requireSessionMode(parsed.values.get("--mode")),
715
- model: requireModel(parsed.values.get("--model"))
727
+ model: requireModel(parsed.values.get("--model")),
728
+ delivery: parsePromptDelivery(parsed.values.get("--delivery"))
716
729
  };
717
730
  }
718
731
  throw new Error(`Unknown session command: ${subcommand}`);
@@ -1536,11 +1549,15 @@ function renderProjectList(projects) {
1536
1549
  Mode: ${project.mode}`).join("\n\n")}
1537
1550
  `;
1538
1551
  }
1539
- function renderSessionList(sessions) {
1552
+ function formatSessionActivity(session, nowMs) {
1553
+ if (!session.runState) return void 0;
1554
+ return session.lastActivityAt ? `${session.runState}, last active ${formatProcessAge(session.lastActivityAt, nowMs)} ago` : session.runState;
1555
+ }
1556
+ function renderSessionList(sessions, nowMs = Date.now()) {
1540
1557
  if (sessions.length === 0) {
1541
1558
  return "No sessions found.\n";
1542
1559
  }
1543
- return `${sessions.map((session) => `${session.id} ${session.branchName} ${session.name ?? "(unnamed)"}`).join("\n")}
1560
+ return `${sessions.map((session) => [session.id, session.branchName, formatSessionActivity(session, nowMs), session.name ?? "(unnamed)"].filter(Boolean).join(" ")).join("\n")}
1544
1561
  `;
1545
1562
  }
1546
1563
  function renderRecentSessionList(sessions) {
@@ -2031,6 +2048,13 @@ function formatProvisioningQueueLine(session) {
2031
2048
  if (position === 0) return `Provisioning: worker started the branch operation at ${since}`;
2032
2049
  return `Provisioning: queued behind ${position} worker operation${position === 1 ? "" : "s"} since ${since}`;
2033
2050
  }
2051
+ function formatChildSessionsLine(session) {
2052
+ const children = session.childSessions;
2053
+ if (!children || typeof children !== "object") return void 0;
2054
+ const { total, active } = children;
2055
+ if (!Number.isInteger(total) || !Number.isInteger(active) || total <= 0 || active < 0) return void 0;
2056
+ return `Child sessions: ${active} active of ${total}`;
2057
+ }
2034
2058
  function renderSessionRunStatus(session) {
2035
2059
  const status = formatStatusValue(session.status) ?? "unknown";
2036
2060
  const lines = [`Session: ${responseString(session, "sessionId") ?? "(unknown)"}`, `Status: ${status}`];
@@ -2051,6 +2075,8 @@ function renderSessionRunStatus(session) {
2051
2075
  const value = responseString(session, key);
2052
2076
  if (value) lines.push(`${label}: ${value}`);
2053
2077
  }
2078
+ const childSessions = formatChildSessionsLine(session);
2079
+ if (childSessions) lines.push(childSessions);
2054
2080
  lines.push(`Branch state: ${formatBranchStateHint(branch)}`);
2055
2081
  const error = responseString(session, "error");
2056
2082
  if (error) lines.push(`Error: ${error}`);
@@ -2095,7 +2121,8 @@ async function dispatchSessionRunCommand(client, command) {
2095
2121
  worker: command.worker,
2096
2122
  mode: command.mode,
2097
2123
  model: command.model,
2098
- requestId: randomUUID()
2124
+ requestId: randomUUID(),
2125
+ delivery: command.delivery
2099
2126
  });
2100
2127
  return { data: data2, human: renderSessionRunStatus(data2) };
2101
2128
  }
@@ -3642,6 +3669,7 @@ export {
3642
3669
  renderProcessInspection,
3643
3670
  renderProcessList,
3644
3671
  renderProcessLog,
3672
+ renderSessionList,
3645
3673
  renderSessionRunStart,
3646
3674
  renderSessionRunStatus,
3647
3675
  renderWorkspaceStatus,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5dctl",
3
- "version": "0.0.105",
3
+ "version": "0.0.107",
4
4
  "type": "module"
5
5
  }
@@ -1,4 +1,4 @@
1
- import { R5dctlApiError, R5dctlClient, type R5dctlConversationForkResponse, type R5dctlConversationHeadResponse, 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 R5dctlProcessLog, type R5dctlProcessRun, type R5dctlBranch, type R5dctlBranchDeleteResponse, type R5dctlBranchDescription, type R5dctlBranchOperation, type R5dctlSessionEvent, type R5dctlSessionStartInput, type R5dctlWorkspaceStatus, type R5dctlWorkspaceSyncResult, type R5dctlWorkingTreeMode, type R5dctlWorktreeSource, type R5dctlSessionMode, type ChatMode, type ModelTier } from "@ricsam/r5d-api";
1
+ import { R5dctlApiError, R5dctlClient, type R5dctlConversationForkResponse, type R5dctlConversationHeadResponse, 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 R5dctlProcessLog, type R5dctlProcessRun, type R5dctlBranch, type R5dctlBranchDeleteResponse, type R5dctlBranchDescription, type R5dctlBranchOperation, type R5dctlSessionSummary, type R5dctlSessionEvent, type R5dctlSessionStartInput, type R5dctlWorkspaceStatus, type R5dctlWorkspaceSyncResult, type R5dctlWorkingTreeMode, type R5dctlWorktreeSource, type R5dctlPromptDelivery, type R5dctlSessionMode, type ChatMode, type ModelTier } from "@ricsam/r5d-api";
2
2
  export type GlobalOptions = {
3
3
  baseUrl?: string;
4
4
  json: boolean;
@@ -75,6 +75,7 @@ export type R5dctlSessionRunCommand = R5dctlSessionStartCommand | {
75
75
  prompt: string;
76
76
  mode: R5dctlSessionMode;
77
77
  model: ModelTier;
78
+ delivery: R5dctlPromptDelivery;
78
79
  } | {
79
80
  kind: "stop";
80
81
  sessionId: string;
@@ -204,6 +205,7 @@ export declare function advanceTransientDevicePollBackoff(intervalMs: number, tr
204
205
  nextBackoffMs: number;
205
206
  };
206
207
  export declare function handleAuthLogin(client: R5dctlClient, options: GlobalOptions, commandArgs: string[], config: R5dctlConfig): Promise<void>;
208
+ export declare function renderSessionList(sessions: R5dctlSessionSummary[], nowMs?: number): string;
207
209
  export declare function renderWorkspaceStatus(status: R5dctlWorkspaceStatus): string;
208
210
  export declare function renderBranchList(branches: R5dctlBranch[]): string;
209
211
  export declare function renderWorkspaceSync(result: R5dctlWorkspaceSyncResult): string;
@@ -284,6 +286,11 @@ export type R5dctlCommandResponse = {
284
286
  error?: string;
285
287
  summary?: string;
286
288
  diffSummary?: string;
289
+ /** Sub-agent sessions this session launched; older servers omit it. */
290
+ childSessions?: {
291
+ total: number;
292
+ active: number;
293
+ };
287
294
  };
288
295
  export type R5dctlSessionRunClient = {
289
296
  projects: {
@@ -299,6 +306,7 @@ export type R5dctlSessionRunClient = {
299
306
  mode: R5dctlSessionMode;
300
307
  model: ModelTier;
301
308
  requestId: string;
309
+ delivery?: R5dctlPromptDelivery;
302
310
  }) => Promise<R5dctlCommandResponse>;
303
311
  stop: (sessionId: string) => Promise<R5dctlCommandResponse>;
304
312
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricsam/r5dctl",
3
- "version": "0.0.105",
3
+ "version": "0.0.107",
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.105",
29
+ "@ricsam/r5d-api": "^0.0.107",
30
30
  "dotenv": "^17",
31
31
  "qrcode": "^1.5.4",
32
32
  "ws": "^8.18.3"