@ricsam/r5dctl 0.0.17 → 0.0.18

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
@@ -55,13 +55,18 @@ r5dctl describe session <session-id>
55
55
  r5dctl -s <session-id> update session --name "Renamed session"
56
56
  r5dctl -s <session-id> delete session
57
57
 
58
- r5dctl -s <session-id> conversation # exact agent request transcript
58
+ r5dctl -s <session-id> conversation # human-readable agent request transcript
59
+ r5dctl -s <session-id> conversation --raw # raw JSON message/tool parts
60
+ r5dctl -s <session-id> conversation --tools # include provider-shaped tool definitions
61
+ r5dctl -s <session-id> conversation --raw --tools # exact raw agent request transcript
59
62
  r5dctl -s <session-id> prompt --mode plan --model max "..."
60
63
  r5dctl -s <session-id> answer-questions -a1 "Recipe Collection" -a2 "Both Manual & AI"
61
64
  r5dctl -s <session-id> apply-required-envs -e backend/KEY=value -e frontend/KEY=value
62
65
 
63
66
  ```
64
67
 
68
+ Conversation output is human-readable by default. `--raw` keeps the transcript layout but renders structured message and tool parts as JSON, while `--tools` includes the provider-shaped tool definitions. The global `--json` flag remains separate and prints the complete API response envelope.
69
+
65
70
  Project mode is derived from the persisted `backwardsCompatible` project setting:
66
71
 
67
72
  - `greenfield`: agent can make breaking/reset-style changes
package/dist/cjs/cli.cjs CHANGED
@@ -116,7 +116,11 @@ const SHARED_HELP_ENTRIES = [
116
116
  { section: "sessions", usage: "describe session <session-id>", description: "Show session details." },
117
117
  { section: "sessions", usage: "-s <session-id> update session --name <name>", description: "Rename a session or clear its name." },
118
118
  { section: "sessions", usage: "-s <session-id> delete session", description: "Delete a session." },
119
- { section: "sessions", usage: "-s <session-id> conversation", description: "Read the exact agent request transcript." },
119
+ {
120
+ section: "sessions",
121
+ usage: "-s <session-id> conversation [--raw] [--tools]",
122
+ description: "Read the agent request transcript in human-readable form."
123
+ },
120
124
  {
121
125
  section: "sessions",
122
126
  usage: '-s <session-id> prompt --mode <mode> --model <tier> "<message>"',
@@ -846,15 +850,21 @@ function parseSessionUpdateArgs(args) {
846
850
  return input;
847
851
  }
848
852
  function parseConversationRenderArgs(args) {
849
- const options = {};
850
- for (let index = 0; index < args.length; index += 1) {
851
- const arg = args[index];
853
+ const options = { format: "human", includeTools: false };
854
+ for (const arg of args) {
855
+ if (arg === "--raw") {
856
+ options.format = "raw";
857
+ continue;
858
+ }
859
+ if (arg === "--tools") {
860
+ options.includeTools = true;
861
+ continue;
862
+ }
852
863
  throw new Error(`Unknown conversation argument: ${arg}`);
853
864
  }
854
865
  return options;
855
866
  }
856
- function renderConversationResponse(read, options = {}) {
857
- void options;
867
+ function renderConversationResponse(read) {
858
868
  return read.agentText.endsWith("\n") ? read.agentText : `${read.agentText}
859
869
  `;
860
870
  }
@@ -1019,8 +1029,9 @@ ${result.message}
1019
1029
  }
1020
1030
  if (first === "sessions" && second === "conversation" || first === "conversation") {
1021
1031
  const offset = first === "conversation" ? 1 : 2;
1022
- const read = await client.sessions.conversation(requireValue(args[offset], "Missing session id"));
1023
- write(read, renderConversationResponse(read, parseConversationRenderArgs(args.slice(offset + 1))));
1032
+ const renderOptions = parseConversationRenderArgs(args.slice(offset + 1));
1033
+ const read = await client.sessions.conversation(requireValue(args[offset], "Missing session id"), renderOptions);
1034
+ write(read, renderConversationResponse(read));
1024
1035
  return;
1025
1036
  }
1026
1037
  if (first === "sessions" && second === "prompt" || first === "prompt") {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5dctl",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "type": "commonjs"
5
5
  }
package/dist/mjs/cli.mjs CHANGED
@@ -76,7 +76,11 @@ const SHARED_HELP_ENTRIES = [
76
76
  { section: "sessions", usage: "describe session <session-id>", description: "Show session details." },
77
77
  { section: "sessions", usage: "-s <session-id> update session --name <name>", description: "Rename a session or clear its name." },
78
78
  { section: "sessions", usage: "-s <session-id> delete session", description: "Delete a session." },
79
- { section: "sessions", usage: "-s <session-id> conversation", description: "Read the exact agent request transcript." },
79
+ {
80
+ section: "sessions",
81
+ usage: "-s <session-id> conversation [--raw] [--tools]",
82
+ description: "Read the agent request transcript in human-readable form."
83
+ },
80
84
  {
81
85
  section: "sessions",
82
86
  usage: '-s <session-id> prompt --mode <mode> --model <tier> "<message>"',
@@ -806,15 +810,21 @@ function parseSessionUpdateArgs(args) {
806
810
  return input;
807
811
  }
808
812
  function parseConversationRenderArgs(args) {
809
- const options = {};
810
- for (let index = 0; index < args.length; index += 1) {
811
- const arg = args[index];
813
+ const options = { format: "human", includeTools: false };
814
+ for (const arg of args) {
815
+ if (arg === "--raw") {
816
+ options.format = "raw";
817
+ continue;
818
+ }
819
+ if (arg === "--tools") {
820
+ options.includeTools = true;
821
+ continue;
822
+ }
812
823
  throw new Error(`Unknown conversation argument: ${arg}`);
813
824
  }
814
825
  return options;
815
826
  }
816
- function renderConversationResponse(read, options = {}) {
817
- void options;
827
+ function renderConversationResponse(read) {
818
828
  return read.agentText.endsWith("\n") ? read.agentText : `${read.agentText}
819
829
  `;
820
830
  }
@@ -979,8 +989,9 @@ ${result.message}
979
989
  }
980
990
  if (first === "sessions" && second === "conversation" || first === "conversation") {
981
991
  const offset = first === "conversation" ? 1 : 2;
982
- const read = await client.sessions.conversation(requireValue(args[offset], "Missing session id"));
983
- write(read, renderConversationResponse(read, parseConversationRenderArgs(args.slice(offset + 1))));
992
+ const renderOptions = parseConversationRenderArgs(args.slice(offset + 1));
993
+ const read = await client.sessions.conversation(requireValue(args[offset], "Missing session id"), renderOptions);
994
+ write(read, renderConversationResponse(read));
984
995
  return;
985
996
  }
986
997
  if (first === "sessions" && second === "prompt" || first === "prompt") {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5dctl",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "type": "module"
5
5
  }
@@ -1,4 +1,4 @@
1
- import { type R5dctlConversationResponse, type ChatMode, type ModelTier } from "@ricsam/r5d-api";
1
+ import { type R5dctlConversationRenderOptions, type R5dctlConversationResponse, type ChatMode, type ModelTier } from "@ricsam/r5d-api";
2
2
  export type GlobalOptions = {
3
3
  baseUrl?: string;
4
4
  json: boolean;
@@ -30,7 +30,7 @@ type CommandExecutionPlan = {
30
30
  kind: "cli-help";
31
31
  text: string;
32
32
  };
33
- type ConversationRenderOptions = {};
33
+ type ConversationRenderOptions = Required<R5dctlConversationRenderOptions>;
34
34
  export declare function getCliHelpText(): string;
35
35
  export declare function getR5dctlVersion(): string;
36
36
  export declare function parseGlobalArgs(argv: string[]): {
@@ -45,7 +45,7 @@ export declare function parsePromptArgs(args: string[]): {
45
45
  message: string;
46
46
  };
47
47
  export declare function parseConversationRenderArgs(args: string[]): ConversationRenderOptions;
48
- export declare function renderConversationResponse(read: R5dctlConversationResponse, options?: ConversationRenderOptions): string;
48
+ export declare function renderConversationResponse(read: R5dctlConversationResponse): string;
49
49
  export declare function resolveCommandExecution(options: GlobalOptions, rest: string[]): CommandExecutionPlan;
50
50
  export declare function runR5dctlCli(argv: string[]): Promise<number>;
51
51
  export declare function main(argv?: string[]): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricsam/r5dctl",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
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.17"
29
+ "@ricsam/r5d-api": "^0.0.18"
30
30
  },
31
31
  "files": [
32
32
  "dist",