@ricsam/r5dctl 0.0.35 → 0.0.36
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 +7 -17
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/cli.mjs +7 -17
- package/dist/mjs/package.json +1 -1
- package/dist/types/cli.d.ts +1 -1
- package/package.json +2 -2
package/dist/cjs/cli.cjs
CHANGED
|
@@ -68,7 +68,6 @@ const CHAT_MODES = /* @__PURE__ */ new Set([
|
|
|
68
68
|
"build",
|
|
69
69
|
"agent",
|
|
70
70
|
"explore",
|
|
71
|
-
"review",
|
|
72
71
|
"test",
|
|
73
72
|
"research",
|
|
74
73
|
"security_review",
|
|
@@ -210,7 +209,7 @@ const SHARED_HELP_ENTRIES = [
|
|
|
210
209
|
{
|
|
211
210
|
section: "processes",
|
|
212
211
|
usage: "ps inspect <run-id>",
|
|
213
|
-
description: "Inspect
|
|
212
|
+
description: "Inspect process metadata and bounded stdout/stderr tails."
|
|
214
213
|
},
|
|
215
214
|
{ section: "processes", usage: "ps stop <run-id>", description: "Gracefully stop an active process with SIGTERM." },
|
|
216
215
|
{
|
|
@@ -1040,33 +1039,23 @@ function renderProcessHistory(processes, nowMs = Date.now()) {
|
|
|
1040
1039
|
return processes.length === 0 ? "No process history.\n" : renderProcessList(processes, nowMs);
|
|
1041
1040
|
}
|
|
1042
1041
|
function renderProcessInspection(process2) {
|
|
1043
|
-
const repositories = process2.repositoryOutcomes.length === 0 ? " (none)" : process2.repositoryOutcomes.map(
|
|
1044
|
-
(outcome) => ` ${outcome.projectPath ?? outcome.projectId} ${outcome.branchName}: ${outcome.status}${outcome.startCommitHash ? `; start ${outcome.startCommitHash}` : ""}${outcome.publishedCommitHash ? ` (${outcome.publishedCommitHash})` : ""}${outcome.branchActionId ? `; branch action ${outcome.branchActionId}` : ""}${outcome.largeDiffIncidentId ? `; incident ${outcome.largeDiffIncidentId}` : ""}${outcome.diffSizeBytes !== void 0 ? `; ${outcome.diffSizeBytes} diff bytes` : ""}${outcome.principalSynchronizationState ? `; principal ${outcome.principalSynchronizationState}` : ""}${outcome.fanOutState ? `; fan-out ${outcome.fanOutState}` : ""}${outcome.error ? ` \u2014 ${outcome.error}` : ""}`
|
|
1045
|
-
).join("\n");
|
|
1046
1042
|
return [
|
|
1047
1043
|
`Run: ${process2.runId}`,
|
|
1048
|
-
`Status: ${process2.status}
|
|
1044
|
+
`Status: ${process2.status}`,
|
|
1049
1045
|
`Mode: ${process2.mode}`,
|
|
1050
1046
|
`Worker: ${process2.workerLabel} (${process2.platform ?? "unknown"}/${process2.arch ?? "unknown"})`,
|
|
1051
1047
|
`Project: ${process2.projectPath} ${process2.branchName}`,
|
|
1052
1048
|
`Session: ${process2.sessionId}`,
|
|
1053
1049
|
`Command: ${process2.command}`,
|
|
1054
1050
|
`Argv: ${JSON.stringify(process2.argv)}`,
|
|
1055
|
-
`CWD: ${process2.cwd ?? "(
|
|
1051
|
+
`CWD: ${process2.cwd ?? "(project root)"}`,
|
|
1056
1052
|
`PID/process group: ${process2.pid ?? "(unknown)"}/${process2.processGroupId ?? "(unknown)"}`,
|
|
1057
|
-
`Starting canonical commit: ${process2.startCommitHash}`,
|
|
1058
1053
|
`Started: ${process2.startedAt}`,
|
|
1059
1054
|
`Updated: ${process2.updatedAt}`,
|
|
1060
1055
|
`Completed: ${process2.completedAt ?? "(running)"}`,
|
|
1061
1056
|
`Exit code: ${process2.exitCode ?? "(none)"}`,
|
|
1062
1057
|
`Error: ${process2.error ?? "(none)"}`,
|
|
1063
|
-
`
|
|
1064
|
-
`Terminal sync action: ${process2.terminalWorkspaceActionId ?? "(pending)"}`,
|
|
1065
|
-
`Terminal sync claimed: ${process2.terminalSyncClaimedAt ?? "(pending)"}`,
|
|
1066
|
-
`Published origin commit: ${process2.publishedCommitHash ?? "(none)"}`,
|
|
1067
|
-
`Principal synchronization: ${process2.principalSynchronizationState ?? "(pending)"}`,
|
|
1068
|
-
"Repositories observed during synchronization:",
|
|
1069
|
-
repositories,
|
|
1058
|
+
`Log: ${process2.logPath}`,
|
|
1070
1059
|
"",
|
|
1071
1060
|
`stdout tail${process2.stdoutTailTruncated ? " (truncated)" : ""}:`,
|
|
1072
1061
|
process2.stdoutTail || "(empty)",
|
|
@@ -1356,6 +1345,7 @@ async function executeR5dctlCommand(client, json, args) {
|
|
|
1356
1345
|
return;
|
|
1357
1346
|
}
|
|
1358
1347
|
if (first === "ps" && second === "inspect") {
|
|
1348
|
+
if (args.length > 3) throw new Error(`Unexpected ps inspect value: ${args[3]}`);
|
|
1359
1349
|
const process2 = await client.processes.inspect(requireValue(args[2], "Missing process run id"));
|
|
1360
1350
|
write(process2, renderProcessInspection(process2));
|
|
1361
1351
|
return;
|
|
@@ -1690,11 +1680,11 @@ function resolveCommandExecution(options, rest) {
|
|
|
1690
1680
|
["--project", filters.project],
|
|
1691
1681
|
["--branch", filters.branch],
|
|
1692
1682
|
["--session", filters.session],
|
|
1693
|
-
["--worker", filters.worker]
|
|
1694
|
-
["--limit", filters.limit?.toString()]
|
|
1683
|
+
["--worker", filters.worker]
|
|
1695
1684
|
]) {
|
|
1696
1685
|
if (value) pluginArgs.push(flag, value);
|
|
1697
1686
|
}
|
|
1687
|
+
if (filters.limit !== void 0) pluginArgs.push("--limit", String(filters.limit));
|
|
1698
1688
|
return { kind: "plugin", pluginArgs };
|
|
1699
1689
|
}
|
|
1700
1690
|
if (subcommand === "inspect") {
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/cli.mjs
CHANGED
|
@@ -15,7 +15,6 @@ const CHAT_MODES = /* @__PURE__ */ new Set([
|
|
|
15
15
|
"build",
|
|
16
16
|
"agent",
|
|
17
17
|
"explore",
|
|
18
|
-
"review",
|
|
19
18
|
"test",
|
|
20
19
|
"research",
|
|
21
20
|
"security_review",
|
|
@@ -157,7 +156,7 @@ const SHARED_HELP_ENTRIES = [
|
|
|
157
156
|
{
|
|
158
157
|
section: "processes",
|
|
159
158
|
usage: "ps inspect <run-id>",
|
|
160
|
-
description: "Inspect
|
|
159
|
+
description: "Inspect process metadata and bounded stdout/stderr tails."
|
|
161
160
|
},
|
|
162
161
|
{ section: "processes", usage: "ps stop <run-id>", description: "Gracefully stop an active process with SIGTERM." },
|
|
163
162
|
{
|
|
@@ -987,33 +986,23 @@ function renderProcessHistory(processes, nowMs = Date.now()) {
|
|
|
987
986
|
return processes.length === 0 ? "No process history.\n" : renderProcessList(processes, nowMs);
|
|
988
987
|
}
|
|
989
988
|
function renderProcessInspection(process2) {
|
|
990
|
-
const repositories = process2.repositoryOutcomes.length === 0 ? " (none)" : process2.repositoryOutcomes.map(
|
|
991
|
-
(outcome) => ` ${outcome.projectPath ?? outcome.projectId} ${outcome.branchName}: ${outcome.status}${outcome.startCommitHash ? `; start ${outcome.startCommitHash}` : ""}${outcome.publishedCommitHash ? ` (${outcome.publishedCommitHash})` : ""}${outcome.branchActionId ? `; branch action ${outcome.branchActionId}` : ""}${outcome.largeDiffIncidentId ? `; incident ${outcome.largeDiffIncidentId}` : ""}${outcome.diffSizeBytes !== void 0 ? `; ${outcome.diffSizeBytes} diff bytes` : ""}${outcome.principalSynchronizationState ? `; principal ${outcome.principalSynchronizationState}` : ""}${outcome.fanOutState ? `; fan-out ${outcome.fanOutState}` : ""}${outcome.error ? ` \u2014 ${outcome.error}` : ""}`
|
|
992
|
-
).join("\n");
|
|
993
989
|
return [
|
|
994
990
|
`Run: ${process2.runId}`,
|
|
995
|
-
`Status: ${process2.status}
|
|
991
|
+
`Status: ${process2.status}`,
|
|
996
992
|
`Mode: ${process2.mode}`,
|
|
997
993
|
`Worker: ${process2.workerLabel} (${process2.platform ?? "unknown"}/${process2.arch ?? "unknown"})`,
|
|
998
994
|
`Project: ${process2.projectPath} ${process2.branchName}`,
|
|
999
995
|
`Session: ${process2.sessionId}`,
|
|
1000
996
|
`Command: ${process2.command}`,
|
|
1001
997
|
`Argv: ${JSON.stringify(process2.argv)}`,
|
|
1002
|
-
`CWD: ${process2.cwd ?? "(
|
|
998
|
+
`CWD: ${process2.cwd ?? "(project root)"}`,
|
|
1003
999
|
`PID/process group: ${process2.pid ?? "(unknown)"}/${process2.processGroupId ?? "(unknown)"}`,
|
|
1004
|
-
`Starting canonical commit: ${process2.startCommitHash}`,
|
|
1005
1000
|
`Started: ${process2.startedAt}`,
|
|
1006
1001
|
`Updated: ${process2.updatedAt}`,
|
|
1007
1002
|
`Completed: ${process2.completedAt ?? "(running)"}`,
|
|
1008
1003
|
`Exit code: ${process2.exitCode ?? "(none)"}`,
|
|
1009
1004
|
`Error: ${process2.error ?? "(none)"}`,
|
|
1010
|
-
`
|
|
1011
|
-
`Terminal sync action: ${process2.terminalWorkspaceActionId ?? "(pending)"}`,
|
|
1012
|
-
`Terminal sync claimed: ${process2.terminalSyncClaimedAt ?? "(pending)"}`,
|
|
1013
|
-
`Published origin commit: ${process2.publishedCommitHash ?? "(none)"}`,
|
|
1014
|
-
`Principal synchronization: ${process2.principalSynchronizationState ?? "(pending)"}`,
|
|
1015
|
-
"Repositories observed during synchronization:",
|
|
1016
|
-
repositories,
|
|
1005
|
+
`Log: ${process2.logPath}`,
|
|
1017
1006
|
"",
|
|
1018
1007
|
`stdout tail${process2.stdoutTailTruncated ? " (truncated)" : ""}:`,
|
|
1019
1008
|
process2.stdoutTail || "(empty)",
|
|
@@ -1303,6 +1292,7 @@ async function executeR5dctlCommand(client, json, args) {
|
|
|
1303
1292
|
return;
|
|
1304
1293
|
}
|
|
1305
1294
|
if (first === "ps" && second === "inspect") {
|
|
1295
|
+
if (args.length > 3) throw new Error(`Unexpected ps inspect value: ${args[3]}`);
|
|
1306
1296
|
const process2 = await client.processes.inspect(requireValue(args[2], "Missing process run id"));
|
|
1307
1297
|
write(process2, renderProcessInspection(process2));
|
|
1308
1298
|
return;
|
|
@@ -1637,11 +1627,11 @@ function resolveCommandExecution(options, rest) {
|
|
|
1637
1627
|
["--project", filters.project],
|
|
1638
1628
|
["--branch", filters.branch],
|
|
1639
1629
|
["--session", filters.session],
|
|
1640
|
-
["--worker", filters.worker]
|
|
1641
|
-
["--limit", filters.limit?.toString()]
|
|
1630
|
+
["--worker", filters.worker]
|
|
1642
1631
|
]) {
|
|
1643
1632
|
if (value) pluginArgs.push(flag, value);
|
|
1644
1633
|
}
|
|
1634
|
+
if (filters.limit !== void 0) pluginArgs.push("--limit", String(filters.limit));
|
|
1645
1635
|
return { kind: "plugin", pluginArgs };
|
|
1646
1636
|
}
|
|
1647
1637
|
if (subcommand === "inspect") {
|
package/dist/mjs/package.json
CHANGED
package/dist/types/cli.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type R5dctlConversationRenderOptions, type R5dctlConversationResponse, type R5dctlConversationOverviewResponse, type R5dctlConversationWorkDetail, type R5dctlConversationWorkResponse, type R5dctlEnvData, type
|
|
1
|
+
import { type R5dctlConversationRenderOptions, type R5dctlConversationResponse, type R5dctlConversationOverviewResponse, type R5dctlConversationWorkDetail, type R5dctlConversationWorkResponse, type R5dctlEnvData, type R5dctlProcessInspection, type R5dctlProcessListInput, type R5dctlProcessRun, type ChatMode, type ModelTier } from "@ricsam/r5d-api";
|
|
2
2
|
export type GlobalOptions = {
|
|
3
3
|
baseUrl?: string;
|
|
4
4
|
json: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ricsam/r5dctl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
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.36",
|
|
30
30
|
"dotenv": "^17",
|
|
31
31
|
"ws": "^8.18.3"
|
|
32
32
|
},
|