@ricsam/r5dctl 0.0.17 → 0.0.19

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,19 @@ 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 transcript without system/tools
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 --system # include system prompt messages
62
+ r5dctl -s <session-id> conversation --raw --tools --system # exact raw agent request transcript
59
63
  r5dctl -s <session-id> prompt --mode plan --model max "..."
60
64
  r5dctl -s <session-id> answer-questions -a1 "Recipe Collection" -a2 "Both Manual & AI"
61
65
  r5dctl -s <session-id> apply-required-envs -e backend/KEY=value -e frontend/KEY=value
62
66
 
63
67
  ```
64
68
 
69
+ Conversation output is human-readable by default and excludes both the system prompt and tool definitions. `--raw` keeps the transcript layout but renders structured message and tool parts as JSON, `--tools` includes the provider-shaped tool definitions, and `--system` includes system prompt messages. The global `--json` flag remains separate and prints the complete API response envelope.
70
+
65
71
  Project mode is derived from the persisted `backwardsCompatible` project setting:
66
72
 
67
73
  - `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] [--system]",
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,25 @@ 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, includeSystem: 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
+ }
863
+ if (arg === "--system") {
864
+ options.includeSystem = true;
865
+ continue;
866
+ }
852
867
  throw new Error(`Unknown conversation argument: ${arg}`);
853
868
  }
854
869
  return options;
855
870
  }
856
- function renderConversationResponse(read, options = {}) {
857
- void options;
871
+ function renderConversationResponse(read) {
858
872
  return read.agentText.endsWith("\n") ? read.agentText : `${read.agentText}
859
873
  `;
860
874
  }
@@ -1019,8 +1033,9 @@ ${result.message}
1019
1033
  }
1020
1034
  if (first === "sessions" && second === "conversation" || first === "conversation") {
1021
1035
  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))));
1036
+ const renderOptions = parseConversationRenderArgs(args.slice(offset + 1));
1037
+ const read = await client.sessions.conversation(requireValue(args[offset], "Missing session id"), renderOptions);
1038
+ write(read, renderConversationResponse(read));
1024
1039
  return;
1025
1040
  }
1026
1041
  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.19",
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] [--system]",
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,25 @@ 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, includeSystem: 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
+ }
823
+ if (arg === "--system") {
824
+ options.includeSystem = true;
825
+ continue;
826
+ }
812
827
  throw new Error(`Unknown conversation argument: ${arg}`);
813
828
  }
814
829
  return options;
815
830
  }
816
- function renderConversationResponse(read, options = {}) {
817
- void options;
831
+ function renderConversationResponse(read) {
818
832
  return read.agentText.endsWith("\n") ? read.agentText : `${read.agentText}
819
833
  `;
820
834
  }
@@ -979,8 +993,9 @@ ${result.message}
979
993
  }
980
994
  if (first === "sessions" && second === "conversation" || first === "conversation") {
981
995
  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))));
996
+ const renderOptions = parseConversationRenderArgs(args.slice(offset + 1));
997
+ const read = await client.sessions.conversation(requireValue(args[offset], "Missing session id"), renderOptions);
998
+ write(read, renderConversationResponse(read));
984
999
  return;
985
1000
  }
986
1001
  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.19",
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.19",
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.19"
30
30
  },
31
31
  "files": [
32
32
  "dist",