@ghostystudio/cli 0.10.2 → 0.11.0

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
@@ -43,6 +43,7 @@ ghosty try <id> "message" --waba --session PHONE [--media FILE] [--history FILE]
43
43
  ghosty try <id> --replay FILE --out DIR [--max 15] [--concurrency 8] [--resume]
44
44
  ghosty chat <id> ["message"] [--conversation ID]
45
45
  ghosty conversations ls <id>
46
+ ghosty conversations show <id> <conversation-id> [--limit 20] # what was said
46
47
 
47
48
  ghosty schedule add <id> "what to do" --in 30m | --at ISO [--every 12h --until ISO] [--conversation ID] [--title T]
48
49
  ghosty schedule ls <id>
@@ -74,6 +75,10 @@ Exit codes: `0` ok · `1` API error · `2` usage error · `3` not signed in.
74
75
  - `try --replay FILE --out DIR`: replays real conversations from your machine. The report is written after every step, survives Ghosty deploys (it honors `Retry-After`), and `--resume` continues a partial run.
75
76
  - `agents doctor` speaks English like the rest of the CLI; `channels whatsapp ls` returns a full URL.
76
77
 
78
+ ### Changes in 0.11.0
79
+
80
+ - New: `conversations show` (what was said in a conversation; `--limit 0` for all).
81
+
77
82
  ### Changes in 0.10.0
78
83
 
79
84
  - Tells you when a new version is out (checks npm once a day, on stderr; `GHOSTY_NO_UPDATE_CHECK=1` or `CI` turns it off). An unknown option on an old version says to update.
package/dist/index.js CHANGED
@@ -282,7 +282,7 @@ async function postLong(path, body, timeoutMs = 9e5) {
282
282
  const req = httpsRequest(`${base}${path}`, {
283
283
  method: "POST",
284
284
  timeout: timeoutMs,
285
- headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.10.2"}`, "content-type": "application/json", "content-length": Buffer.byteLength(data) }
285
+ headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.11.0"}`, "content-type": "application/json", "content-length": Buffer.byteLength(data) }
286
286
  }, (res) => {
287
287
  let buf = "";
288
288
  res.on("data", (c) => buf += c);
@@ -324,7 +324,7 @@ async function request(path, opts = {}, retried = false) {
324
324
  method: opts.method ?? (opts.body !== void 0 || opts.raw !== void 0 ? "POST" : "GET"),
325
325
  headers: {
326
326
  authorization: `Bearer ${token}`,
327
- "user-agent": `ghosty-cli/${"0.10.2"}`,
327
+ "user-agent": `ghosty-cli/${"0.11.0"}`,
328
328
  ...opts.body !== void 0 ? { "content-type": "application/json" } : {},
329
329
  ...opts.headers
330
330
  },
@@ -851,6 +851,17 @@ async function conversationsLs(agent) {
851
851
  const rows = r.conversaciones.map((c) => ({ id: c.id, title: c.titulo, updated: c.actualizada }));
852
852
  out(rows, () => table(rows, ["id", "title", "updated"]));
853
853
  }
854
+ async function conversationsShow(agent, sid, v) {
855
+ if (!agent || !sid) throw usage("Missing agent id or conversation id.", "Example: ghosty conversations show <agent-id> <conversation-id> [--limit 20]");
856
+ const tail = v.limit ?? "20";
857
+ const r = await api(convPath(agent, `/${enc3(sid)}?tail=${enc3(tail)}`));
858
+ out(r, () => {
859
+ const lines = r.messages.map((m) => `${bold(m.role === "user" ? "User" : m.role === "assistant" ? "Agent" : m.role)} ${m.text.trim()}`);
860
+ const head = r.saltados ? [dim(`(${r.saltados} earlier messages not shown \xB7 --limit 0 for all)`)] : [];
861
+ const tailNote = r.enCurso ? [dim("(a turn is running: its answer is not here yet)")] : [];
862
+ return [...head, ...lines, ...tailNote].join("\n\n") || dim("(empty)");
863
+ });
864
+ }
854
865
  async function turn(agent, sid, text, first) {
855
866
  const turnId = randomUUID();
856
867
  const ctrl = new AbortController();
@@ -1125,7 +1136,7 @@ async function call(path, v, init = {}) {
1125
1136
  "x-ghosty-ts": ts,
1126
1137
  "x-ghosty-sig": sig,
1127
1138
  "content-type": "application/json",
1128
- "user-agent": `ghosty-cli/${"0.10.2"}`
1139
+ "user-agent": `ghosty-cli/${"0.11.0"}`
1129
1140
  },
1130
1141
  body: method === "GET" ? void 0 : raw
1131
1142
  });
@@ -1786,7 +1797,7 @@ var HELPS = {
1786
1797
  },
1787
1798
  chat: {
1788
1799
  summary: "Stream a conversation; with no message it is interactive.",
1789
- usage: ['ghosty chat <agent-id> ["message"] [--conversation ID]', "ghosty conversations ls <agent-id>"],
1800
+ usage: ['ghosty chat <agent-id> ["message"] [--conversation ID]', "ghosty conversations ls <agent-id>", "ghosty conversations show <agent-id> <conversation-id> [--limit 20]"],
1790
1801
  examples: ['ghosty chat <id> "hola"', "ghosty chat <id>"],
1791
1802
  learn: `${REF}#conversaciones`
1792
1803
  },
@@ -1941,6 +1952,7 @@ ${bold("Talk to an agent")}
1941
1952
  --replay FILE --out DIR Replay real conversations; report written locally [--max 15] [--concurrency 8] [--resume]
1942
1953
  chat <id> ["message"] Stream a conversation (no message = interactive) [--conversation ID]
1943
1954
  conversations ls <id> List conversations
1955
+ conversations show <id> <conversation> What was said [--limit 20] (0 = all)
1944
1956
  turns ls <id> Recent turns and why they failed [--errors] [--since 1h] [--limit N]
1945
1957
  turns show <id> [turn] Where a turn's time went: each tool with its seconds, output tokens (default: last)
1946
1958
 
@@ -2067,7 +2079,7 @@ async function main() {
2067
2079
  const tokens = splitTokens(pos, v);
2068
2080
  globals.token = tokens.session;
2069
2081
  globals.profile = v.profile;
2070
- if (v.version) return out({ version: "0.10.2" }, () => "0.10.2");
2082
+ if (v.version) return out({ version: "0.11.0" }, () => "0.11.0");
2071
2083
  const [cmd, sub, a1, a2] = pos;
2072
2084
  if (cmd === "partner" && (v.help || !sub || sub === "help")) return out({ help: PARTNER_HELP }, () => PARTNER_HELP);
2073
2085
  const topic = cmd === "help" ? sub : v.help ? cmd : void 0;
@@ -2129,7 +2141,8 @@ async function main() {
2129
2141
  return chat(sub, a1, v);
2130
2142
  case "conversations":
2131
2143
  if (sub === "ls" || sub === "list") return conversationsLs(a1);
2132
- throw usage(`Unknown conversations subcommand: ${sub ?? "(none)"}.`, "Try: ghosty conversations ls <agent-id>");
2144
+ if (sub === "show") return conversationsShow(a1, a2, v);
2145
+ throw usage(`Unknown conversations subcommand: ${sub ?? "(none)"}.`, "Try: ghosty conversations ls <agent-id> \xB7 ghosty conversations show <agent-id> <conversation-id>");
2133
2146
  case "schedule":
2134
2147
  return scheduleCmd(sub, a1, a2, v);
2135
2148
  case "partner":
@@ -2150,7 +2163,7 @@ async function main() {
2150
2163
  throw unknown(cmd, cmd, COMMANDS, "ghosty --help");
2151
2164
  }
2152
2165
  }
2153
- var notice = updateNotice("0.10.2").catch(() => null);
2166
+ var notice = updateNotice("0.11.0").catch(() => null);
2154
2167
  main().then(
2155
2168
  async () => {
2156
2169
  const n = await notice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghostystudio/cli",
3
- "version": "0.10.2",
3
+ "version": "0.11.0",
4
4
  "description": "Official Ghosty Studio CLI — configure, test and chat with your agents from the terminal. Built for humans and coding agents.",
5
5
  "type": "module",
6
6
  "bin": {