@ricsam/r5dctl 0.0.169 → 0.0.170
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/cli.cjs +10 -11
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/cli.mjs +10 -11
- package/dist/mjs/package.json +1 -1
- package/dist/types/cli.d.ts +4 -0
- package/package.json +2 -2
package/dist/cjs/cli.cjs
CHANGED
|
@@ -180,7 +180,7 @@ const SESSION_RUN_HELP_TEXT = [
|
|
|
180
180
|
' r5dctl -p <project> session start --worker <label> --worktree <branch> --model <tier> [-f|--follow|--watch] [--tools] [--parent-session <session-id>] "<prompt>"',
|
|
181
181
|
' 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>"',
|
|
182
182
|
" r5dctl session status <session-id>",
|
|
183
|
-
' r5dctl session prompt --worker <label> --mode <
|
|
183
|
+
' r5dctl session prompt --worker <label> --mode <plan|agent> --model <tier> [--delivery queue|steer|force] [--sender <name>] <session-id> "<prompt>"',
|
|
184
184
|
" r5dctl session stop <session-id>",
|
|
185
185
|
" r5dctl session set-worker <session-id> --worker <label>",
|
|
186
186
|
" r5dctl session process-log <run-id> [--tail <n>] [--grep <pattern>]",
|
|
@@ -205,7 +205,7 @@ const SESSION_RUN_HELP_TEXT = [
|
|
|
205
205
|
"The reserved topic `checkout` declares tracked-file writes in that checkout: claim it before running the command, hold it until the",
|
|
206
206
|
"write is done, and release it. A running session native to that branch holds `checkout` implicitly, so the call names who to message.",
|
|
207
207
|
"Commands started while a cross-scope `checkout` claim is held also fence the claimed checkout on the bound worker (the fence line says",
|
|
208
|
-
"whether the worker supports it). checkout path prints
|
|
208
|
+
"whether the worker supports it). checkout path prints the absolute checkout path of a project branch on the session's bound worker, one bare line (use --json for the checkout and worker too).",
|
|
209
209
|
"Agent shells act as their own session; user credentials select the acting session with -s or R5D_SESSION_ID.",
|
|
210
210
|
"A new worktree starts with the source checkout's uncommitted changes (--working-tree carry, the default);",
|
|
211
211
|
"--working-tree clean checks out the source branch's current commit only. Start and status print the mode, never a commit hash.",
|
|
@@ -349,7 +349,7 @@ const SHARED_HELP_ENTRIES = [
|
|
|
349
349
|
},
|
|
350
350
|
{
|
|
351
351
|
section: "sessions",
|
|
352
|
-
usage: 'session prompt --worker <label> --mode <
|
|
352
|
+
usage: 'session prompt --worker <label> --mode <plan|agent> --model <tier> [--delivery queue|steer|force] [--sender <name>] <session-id> "<prompt>"',
|
|
353
353
|
description: "Prompt a session: steer after the next tool result (default), queue a deferred follow-up, or force in place of the current tool round. An idle unfinished session may require explicit continuation or confirmation of interrupted tools. Blocked delivery reports the saved message/queue ID and reason; inspect the existing queue in the session UI instead of sending duplicates. The recipient sees the verified sender session id; --sender only adds a display title."
|
|
354
354
|
},
|
|
355
355
|
{
|
|
@@ -384,12 +384,12 @@ const SHARED_HELP_ENTRIES = [
|
|
|
384
384
|
},
|
|
385
385
|
{
|
|
386
386
|
section: "sessions",
|
|
387
|
-
usage: '-s <session-id> answer-questions --worker <label> --mode <
|
|
387
|
+
usage: '-s <session-id> answer-questions --worker <label> --mode <plan|agent> --model <tier> -a1 "<answer>" ...',
|
|
388
388
|
description: "Answer pending questions in order."
|
|
389
389
|
},
|
|
390
390
|
{
|
|
391
391
|
section: "sessions",
|
|
392
|
-
usage: "-s <session-id> answer-env-request --worker <label> --mode <
|
|
392
|
+
usage: "-s <session-id> answer-env-request --worker <label> --mode <plan|agent> --model <tier> [-e KEY=value] [--context <text>]",
|
|
393
393
|
description: "Answer a pending environment variable request with values, context, or both."
|
|
394
394
|
},
|
|
395
395
|
{
|
|
@@ -489,7 +489,7 @@ function resolveEntrypointPath(entrypoint) {
|
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
function getR5dctlVersion() {
|
|
492
|
-
if (true) return "0.0.
|
|
492
|
+
if (true) return "0.0.170";
|
|
493
493
|
const entrypoint = process.argv[1] ? resolveEntrypointPath(process.argv[1]) : null;
|
|
494
494
|
let current = entrypoint ? import_node_path.default.dirname(entrypoint) : process.cwd();
|
|
495
495
|
for (let index = 0; index < 12; index += 1) {
|
|
@@ -646,7 +646,7 @@ function requireModel(value) {
|
|
|
646
646
|
return model;
|
|
647
647
|
}
|
|
648
648
|
function requireSessionMode(value) {
|
|
649
|
-
const mode = requireValue(value?.trim(), "--mode <
|
|
649
|
+
const mode = requireValue(value?.trim(), "--mode <plan|agent> is required");
|
|
650
650
|
if (!R5DCTL_SESSION_MODES.has(mode)) {
|
|
651
651
|
throw new Error("Invalid --mode. Expected one of: plan, agent");
|
|
652
652
|
}
|
|
@@ -1147,9 +1147,8 @@ ${rows.join("\n")}
|
|
|
1147
1147
|
`;
|
|
1148
1148
|
}
|
|
1149
1149
|
function renderCheckoutPath(response) {
|
|
1150
|
-
return
|
|
1151
|
-
|
|
1152
|
-
);
|
|
1150
|
+
return `${response.path}
|
|
1151
|
+
`;
|
|
1153
1152
|
}
|
|
1154
1153
|
function assertAuthLoginArgs(args) {
|
|
1155
1154
|
const valueFlags = /* @__PURE__ */ new Set(["--device-name", "--worker-label"]);
|
|
@@ -1388,7 +1387,7 @@ function parseAnswerFlags(args) {
|
|
|
1388
1387
|
return ordered.map(([, value]) => value);
|
|
1389
1388
|
}
|
|
1390
1389
|
function requireChatMode(value) {
|
|
1391
|
-
const mode = requireValue(value?.trim(), "--mode <
|
|
1390
|
+
const mode = requireValue(value?.trim(), "--mode <plan|agent> is required");
|
|
1392
1391
|
if (!CHAT_MODES.has(mode)) throw new Error(`Invalid --mode: ${mode}`);
|
|
1393
1392
|
return mode;
|
|
1394
1393
|
}
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/cli.mjs
CHANGED
|
@@ -68,7 +68,7 @@ const SESSION_RUN_HELP_TEXT = [
|
|
|
68
68
|
' r5dctl -p <project> session start --worker <label> --worktree <branch> --model <tier> [-f|--follow|--watch] [--tools] [--parent-session <session-id>] "<prompt>"',
|
|
69
69
|
' 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>"',
|
|
70
70
|
" r5dctl session status <session-id>",
|
|
71
|
-
' r5dctl session prompt --worker <label> --mode <
|
|
71
|
+
' r5dctl session prompt --worker <label> --mode <plan|agent> --model <tier> [--delivery queue|steer|force] [--sender <name>] <session-id> "<prompt>"',
|
|
72
72
|
" r5dctl session stop <session-id>",
|
|
73
73
|
" r5dctl session set-worker <session-id> --worker <label>",
|
|
74
74
|
" r5dctl session process-log <run-id> [--tail <n>] [--grep <pattern>]",
|
|
@@ -93,7 +93,7 @@ const SESSION_RUN_HELP_TEXT = [
|
|
|
93
93
|
"The reserved topic `checkout` declares tracked-file writes in that checkout: claim it before running the command, hold it until the",
|
|
94
94
|
"write is done, and release it. A running session native to that branch holds `checkout` implicitly, so the call names who to message.",
|
|
95
95
|
"Commands started while a cross-scope `checkout` claim is held also fence the claimed checkout on the bound worker (the fence line says",
|
|
96
|
-
"whether the worker supports it). checkout path prints
|
|
96
|
+
"whether the worker supports it). checkout path prints the absolute checkout path of a project branch on the session's bound worker, one bare line (use --json for the checkout and worker too).",
|
|
97
97
|
"Agent shells act as their own session; user credentials select the acting session with -s or R5D_SESSION_ID.",
|
|
98
98
|
"A new worktree starts with the source checkout's uncommitted changes (--working-tree carry, the default);",
|
|
99
99
|
"--working-tree clean checks out the source branch's current commit only. Start and status print the mode, never a commit hash.",
|
|
@@ -237,7 +237,7 @@ const SHARED_HELP_ENTRIES = [
|
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
239
|
section: "sessions",
|
|
240
|
-
usage: 'session prompt --worker <label> --mode <
|
|
240
|
+
usage: 'session prompt --worker <label> --mode <plan|agent> --model <tier> [--delivery queue|steer|force] [--sender <name>] <session-id> "<prompt>"',
|
|
241
241
|
description: "Prompt a session: steer after the next tool result (default), queue a deferred follow-up, or force in place of the current tool round. An idle unfinished session may require explicit continuation or confirmation of interrupted tools. Blocked delivery reports the saved message/queue ID and reason; inspect the existing queue in the session UI instead of sending duplicates. The recipient sees the verified sender session id; --sender only adds a display title."
|
|
242
242
|
},
|
|
243
243
|
{
|
|
@@ -272,12 +272,12 @@ const SHARED_HELP_ENTRIES = [
|
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
274
|
section: "sessions",
|
|
275
|
-
usage: '-s <session-id> answer-questions --worker <label> --mode <
|
|
275
|
+
usage: '-s <session-id> answer-questions --worker <label> --mode <plan|agent> --model <tier> -a1 "<answer>" ...',
|
|
276
276
|
description: "Answer pending questions in order."
|
|
277
277
|
},
|
|
278
278
|
{
|
|
279
279
|
section: "sessions",
|
|
280
|
-
usage: "-s <session-id> answer-env-request --worker <label> --mode <
|
|
280
|
+
usage: "-s <session-id> answer-env-request --worker <label> --mode <plan|agent> --model <tier> [-e KEY=value] [--context <text>]",
|
|
281
281
|
description: "Answer a pending environment variable request with values, context, or both."
|
|
282
282
|
},
|
|
283
283
|
{
|
|
@@ -377,7 +377,7 @@ function resolveEntrypointPath(entrypoint) {
|
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
function getR5dctlVersion() {
|
|
380
|
-
if (true) return "0.0.
|
|
380
|
+
if (true) return "0.0.170";
|
|
381
381
|
const entrypoint = process.argv[1] ? resolveEntrypointPath(process.argv[1]) : null;
|
|
382
382
|
let current = entrypoint ? path.dirname(entrypoint) : process.cwd();
|
|
383
383
|
for (let index = 0; index < 12; index += 1) {
|
|
@@ -534,7 +534,7 @@ function requireModel(value) {
|
|
|
534
534
|
return model;
|
|
535
535
|
}
|
|
536
536
|
function requireSessionMode(value) {
|
|
537
|
-
const mode = requireValue(value?.trim(), "--mode <
|
|
537
|
+
const mode = requireValue(value?.trim(), "--mode <plan|agent> is required");
|
|
538
538
|
if (!R5DCTL_SESSION_MODES.has(mode)) {
|
|
539
539
|
throw new Error("Invalid --mode. Expected one of: plan, agent");
|
|
540
540
|
}
|
|
@@ -1035,9 +1035,8 @@ ${rows.join("\n")}
|
|
|
1035
1035
|
`;
|
|
1036
1036
|
}
|
|
1037
1037
|
function renderCheckoutPath(response) {
|
|
1038
|
-
return
|
|
1039
|
-
|
|
1040
|
-
);
|
|
1038
|
+
return `${response.path}
|
|
1039
|
+
`;
|
|
1041
1040
|
}
|
|
1042
1041
|
function assertAuthLoginArgs(args) {
|
|
1043
1042
|
const valueFlags = /* @__PURE__ */ new Set(["--device-name", "--worker-label"]);
|
|
@@ -1276,7 +1275,7 @@ function parseAnswerFlags(args) {
|
|
|
1276
1275
|
return ordered.map(([, value]) => value);
|
|
1277
1276
|
}
|
|
1278
1277
|
function requireChatMode(value) {
|
|
1279
|
-
const mode = requireValue(value?.trim(), "--mode <
|
|
1278
|
+
const mode = requireValue(value?.trim(), "--mode <plan|agent> is required");
|
|
1280
1279
|
if (!CHAT_MODES.has(mode)) throw new Error(`Invalid --mode: ${mode}`);
|
|
1281
1280
|
return mode;
|
|
1282
1281
|
}
|
package/dist/mjs/package.json
CHANGED
package/dist/types/cli.d.ts
CHANGED
|
@@ -257,6 +257,10 @@ export declare function renderSessionClaimResponse(response: {
|
|
|
257
257
|
fenceDetail?: string;
|
|
258
258
|
}, nowMs?: number): string;
|
|
259
259
|
export declare function renderSessionClaimList(response: R5dctlSessionClaimListResponse, nowMs?: number): string;
|
|
260
|
+
/** One bare line: agents compose `checkout path` with `$(…)` and `git -C`, so
|
|
261
|
+
* the answer must be the path and nothing else (stage 2026-09-17: a labelled
|
|
262
|
+
* three-line block reached `git -C` verbatim). The checkout, worker and path
|
|
263
|
+
* remain available together through `--json`. */
|
|
260
264
|
export declare function renderCheckoutPath(response: R5dctlCheckoutPathResponse): string;
|
|
261
265
|
export declare function parseGlobalArgs(argv: string[]): {
|
|
262
266
|
options: GlobalOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ricsam/r5dctl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.170",
|
|
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.
|
|
29
|
+
"@ricsam/r5d-api": "^0.0.170",
|
|
30
30
|
"dotenv": "^17",
|
|
31
31
|
"qrcode": "^1.5.4",
|
|
32
32
|
"ws": "^8.18.3"
|