@ghostystudio/cli 0.27.0 → 0.27.1

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
@@ -87,6 +87,10 @@ Every command has its own help with examples: `ghosty <command> --help` or `ghos
87
87
 
88
88
  Exit codes: `0` ok · `1` API error · `2` usage error · `3` not signed in.
89
89
 
90
+ ### Changes in 0.27.1
91
+
92
+ - A 404 with a reason (no such bag, room or thread) prints that reason instead of a generic «Not found».
93
+
90
94
  ### Changes in 0.27.0
91
95
 
92
96
  - `schedule add <id> "…" --teams <workspace>#<room>[/<thread-id>] --at ISO | --in 30m`: at that time the agent answers in that Teams room or thread as if mentioned (with the room's memory). `schedule ls|rm <id> --teams <workspace>`.
package/dist/index.js CHANGED
@@ -8315,7 +8315,7 @@ async function postLong(path, body, timeoutMs = 9e5) {
8315
8315
  const req = httpsRequest(`${base}${path}`, {
8316
8316
  method: "POST",
8317
8317
  timeout: timeoutMs,
8318
- headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.27.0"}`, "content-type": "application/json", "content-length": Buffer.byteLength(data) }
8318
+ headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.27.1"}`, "content-type": "application/json", "content-length": Buffer.byteLength(data) }
8319
8319
  }, (res) => {
8320
8320
  let buf = "";
8321
8321
  res.on("data", (c) => buf += c);
@@ -8357,7 +8357,7 @@ async function request(path, opts = {}, retried = false) {
8357
8357
  method: opts.method ?? (opts.body !== void 0 || opts.raw !== void 0 ? "POST" : "GET"),
8358
8358
  headers: {
8359
8359
  authorization: `Bearer ${token}`,
8360
- "user-agent": `ghosty-cli/${"0.27.0"}`,
8360
+ "user-agent": `ghosty-cli/${"0.27.1"}`,
8361
8361
  "accept-language": lang(),
8362
8362
  ...opts.body !== void 0 ? { "content-type": "application/json" } : {},
8363
8363
  ...opts.headers
@@ -8383,6 +8383,7 @@ async function toError(res) {
8383
8383
  const detail = serverText(raw);
8384
8384
  if (res.status === 401) return new CliError(t("Your session is not valid anymore.", "Tu sesi\xF3n ya no es v\xE1lida."), EXIT.AUTH, t("Run: ghosty login", "Corre: ghosty login"));
8385
8385
  if (res.status === 403) return new CliError(t(`Not allowed: ${detail}`, `No permitido: ${detail}`), EXIT.API, t("If the agent was shared with you, its workspace (board, channels, numbers) stays with the owner: ask them to add you to that workspace. Otherwise run: ghosty login", "Si el agente se comparti\xF3 contigo, su espacio (tablero, canales, n\xFAmeros) sigue siendo del due\xF1o: p\xEDdele que te agregue a ese espacio. Si no, corre: ghosty login"));
8386
+ if (res.status === 404 && (body.message || body.error)) return new CliError(detail, EXIT.API);
8386
8387
  if (res.status === 404) return new CliError(t("Not found.", "No se encontr\xF3."), EXIT.API, t("Check the agent id (ghosty agents ls) or that your token belongs to that agent.", "Revisa el id del agente (ghosty agents ls) o que tu token sea de ese agente."));
8387
8388
  if (body.error === "restart_no_aplica" || body.error === "agente_sin_maquina") {
8388
8389
  return new CliError(t("This agent doesn't need a restart: new files, skills and MCP load on its next turn.", "Este agente no necesita reinicio: los archivos, skills y MCP nuevos se cargan en su siguiente turno."), EXIT.API);
@@ -9424,7 +9425,7 @@ async function call(path, v, init = {}) {
9424
9425
  "x-ghosty-ts": ts,
9425
9426
  "x-ghosty-sig": sig,
9426
9427
  "content-type": "application/json",
9427
- "user-agent": `ghosty-cli/${"0.27.0"}`
9428
+ "user-agent": `ghosty-cli/${"0.27.1"}`
9428
9429
  },
9429
9430
  body: method === "GET" ? void 0 : raw
9430
9431
  });
@@ -12288,7 +12289,7 @@ async function main() {
12288
12289
  const tokens = splitTokens(pos, v);
12289
12290
  globals.token = tokens.session;
12290
12291
  globals.profile = v.profile;
12291
- if (v.version) return out({ version: "0.27.0" }, () => "0.27.0");
12292
+ if (v.version) return out({ version: "0.27.1" }, () => "0.27.1");
12292
12293
  for (const n of normalizeArgs(pos, v)) if (!globals.json) info(dim(n));
12293
12294
  const context = (await readConfig()).workspace;
12294
12295
  if (!explicitToken()?.startsWith("gat_")) {
@@ -12417,7 +12418,7 @@ async function main() {
12417
12418
  throw unknown(cmd, cmd, COMMANDS, "ghosty --help");
12418
12419
  }
12419
12420
  }
12420
- var notice = updateNotice("0.27.0").catch(() => null);
12421
+ var notice = updateNotice("0.27.1").catch(() => null);
12421
12422
  main().then(
12422
12423
  async () => {
12423
12424
  const n = await notice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghostystudio/cli",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
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": {