@ghostystudio/cli 0.22.0 → 0.23.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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +21 -13
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -95,7 +95,7 @@ Exit codes: `0` ok · `1` API error · `2` usage error · `3` not signed in.
95
95
  - `try --waba` archives its test card when it ends (`--keep` leaves it) and auto-stage no longer runs on tests.
96
96
  - `agents set --unset-env K1,K2`.
97
97
  - `ghosty plan apply [workspace] [--dry-run]`: apply a scheduled plan now, showing what changes (staff, or the owner without a subscription).
98
- - `agents box` shows capacity (conversations per box, boxes on, turns running, plan); `ghosty usage --boxes [--workspace]` per agent.
98
+ - `agents box` shows capacity (conversations per box, boxes on, turns running, plan); `ghosty usage --boxes [--workspace]`: the workspace's boxes against its limit (spares, asleep) and per agent.
99
99
  - `channels whatsapp history` also copies photos/PDFs/audio into gs (`--media` re-copies missing ones; Formmy keeps files 7 days).
100
100
 
101
101
  ### Changes in 0.21.0
package/dist/index.js CHANGED
@@ -8261,7 +8261,7 @@ async function postLong(path, body, timeoutMs = 9e5) {
8261
8261
  const req = httpsRequest(`${base}${path}`, {
8262
8262
  method: "POST",
8263
8263
  timeout: timeoutMs,
8264
- headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.22.0"}`, "content-type": "application/json", "content-length": Buffer.byteLength(data) }
8264
+ headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.23.0"}`, "content-type": "application/json", "content-length": Buffer.byteLength(data) }
8265
8265
  }, (res) => {
8266
8266
  let buf = "";
8267
8267
  res.on("data", (c) => buf += c);
@@ -8303,7 +8303,7 @@ async function request(path, opts = {}, retried = false) {
8303
8303
  method: opts.method ?? (opts.body !== void 0 || opts.raw !== void 0 ? "POST" : "GET"),
8304
8304
  headers: {
8305
8305
  authorization: `Bearer ${token}`,
8306
- "user-agent": `ghosty-cli/${"0.22.0"}`,
8306
+ "user-agent": `ghosty-cli/${"0.23.0"}`,
8307
8307
  "accept-language": lang(),
8308
8308
  ...opts.body !== void 0 ? { "content-type": "application/json" } : {},
8309
8309
  ...opts.headers
@@ -9297,7 +9297,7 @@ async function call(path, v, init = {}) {
9297
9297
  "x-ghosty-ts": ts,
9298
9298
  "x-ghosty-sig": sig,
9299
9299
  "content-type": "application/json",
9300
- "user-agent": `ghosty-cli/${"0.22.0"}`
9300
+ "user-agent": `ghosty-cli/${"0.23.0"}`
9301
9301
  },
9302
9302
  body: method === "GET" ? void 0 : raw
9303
9303
  });
@@ -10892,9 +10892,9 @@ HELPS.board = HELPS.cards;
10892
10892
  HELPS.conversations = HELPS.chat;
10893
10893
  HELPS.usage = {
10894
10894
  ...HELPS.me,
10895
- summary: "Your plan and how much you've used this week and month. With --boxes: a workspace's boxes and capacity per agent.",
10895
+ summary: "Your plan and how much you've used this week and month. With --boxes: a workspace's boxes against its limit, and per agent.",
10896
10896
  usage: ["ghosty usage", "ghosty me usage", "ghosty usage --boxes [--workspace SLUG]"],
10897
- flags: [["--boxes", "per agent: conversations per box, boxes on, turns running now; plus what the plan allows (parallel, boxes, hosting)"], ["--workspace SLUG", "--boxes: which workspace (default: the one from ghosty use)"]],
10897
+ flags: [["--boxes", "the workspace's boxes against its limit (spares, asleep) and, per agent: conversations per box, boxes, awake, spares, turns running now"], ["--workspace SLUG", "--boxes: which workspace (default: the one from ghosty use)"]],
10898
10898
  examples: ["ghosty usage", "ghosty usage --json", "ghosty usage --boxes --workspace siiqtec"],
10899
10899
  learn: `${REF}#uso`
10900
10900
  };
@@ -11261,10 +11261,18 @@ ${t("Apply this plan now?", "\xBFAplicar este plan ya?")}`, { yes: v.yes, retry:
11261
11261
  async function boxesUsage(slug) {
11262
11262
  if (!slug) throw usage(t("Which workspace?", "\xBFQu\xE9 espacio?"), "ghosty usage --boxes --workspace <slug> (or ghosty use <workspace>)");
11263
11263
  const r = await api(`/api/v2/workspaces/${encodeURIComponent(slug)}/boxes`);
11264
- const rows = r.agents.map((a) => ({ agent: a.name ?? a.id, engine: a.engine, "per box": a.conversationsPerBox ?? "", "boxes on": a.boxesOn ?? "", "running now": a.activeTurns ?? "", ...a.error ? { note: a.error } : {} }));
11265
- out(r, () => `${bold(r.workspace)} ${dim(t(`plan: ${r.plan.parallel} in parallel \xB7 up to ${r.plan.maxBoxes} box(es) \xB7 ${r.plan.hotBoxes} hosting`, `plan: ${r.plan.parallel} en paralelo \xB7 hasta ${r.plan.maxBoxes} caja(s) \xB7 ${r.plan.hotBoxes} de hosting`))}
11266
- ${table(rows, ["agent", "engine", "per box", "boxes on", "running now"])}
11267
- ${dim(t(`${r.totals.boxesOn} box(es) on \xB7 ${r.totals.activeTurns} turn(s) running`, `${r.totals.boxesOn} caja(s) encendida(s) \xB7 ${r.totals.activeTurns} turno(s) corriendo`))}`);
11264
+ const rows = r.agents.map((a) => ({ agent: a.name ?? a.id, engine: a.engine, "per box": a.conversationsPerBox ?? "", boxes: a.boxes ?? "", on: a.boxesOn ?? "", spares: a.spares ?? "", "running now": a.activeTurns ?? "", ...a.error ? { note: a.error } : {} }));
11265
+ const head = `${bold(r.workspace)} ${dim(t(`plan: ${r.plan.parallel} in parallel \xB7 up to ${r.plan.maxBoxes} box(es) \xB7 ${r.plan.hotBoxes} always-on spare(s)`, `plan: ${r.plan.parallel} en paralelo \xB7 hasta ${r.plan.maxBoxes} caja(s) \xB7 ${r.plan.hotBoxes} spare(s) siempre encendido(s)`))}`;
11266
+ const space = r.space ? (r.space.used > r.space.limit ? (s) => s : dim)(
11267
+ t(
11268
+ `${r.space.used} of ${r.space.limit} box(es) in use \xB7 ${r.space.spares} spare \xB7 ${r.space.asleep} asleep${r.space.used > r.space.limit ? " \xB7 OVER the limit" : ""}`,
11269
+ `${r.space.used} de ${r.space.limit} caja(s) \xB7 ${r.space.spares} spare \xB7 ${r.space.asleep} dormida(s)${r.space.used > r.space.limit ? " \xB7 SOBRE el tope" : ""}`
11270
+ )
11271
+ ) : dim(t("(could not read the host)", "(no pude leer el host)"));
11272
+ out(r, () => `${head}
11273
+ ${space}
11274
+ ${table(rows, ["agent", "engine", "per box", "boxes", "on", "spares", "running now"])}
11275
+ ${dim(t(`${r.totals.activeTurns} turn(s) running`, `${r.totals.activeTurns} turno(s) corriendo`))}`);
11268
11276
  }
11269
11277
 
11270
11278
  // src/index.ts
@@ -11277,7 +11285,7 @@ ${bold("Session")}
11277
11285
  whoami Show who you are signed in as
11278
11286
  use [workspace] Default workspace for boards, agents create and agents ls [--clear]
11279
11287
  completion zsh|bash|fish Tab completion for commands, flags, agents and workspaces
11280
- usage Your plan and how much you've used this week and month [--boxes: boxes and capacity per agent]
11288
+ usage Your plan and how much you've used this week and month [--boxes: boxes vs the workspace limit]
11281
11289
  plan apply [workspace] Apply a scheduled plan now, showing what changes [--dry-run]
11282
11290
 
11283
11291
  ${bold("Agents")}
@@ -11372,7 +11380,7 @@ ${bold("Sesi\xF3n")}
11372
11380
  whoami Muestra con qu\xE9 cuenta entraste
11373
11381
  use [espacio] Espacio por default para boards, agents create y agents ls [--clear]
11374
11382
  completion zsh|bash|fish Autocompletado con TAB: comandos, opciones, agentes y espacios
11375
- usage Tu plan y cu\xE1nto llevas usado esta semana y este mes [--boxes: cajas y capacidad por agente]
11383
+ usage Tu plan y cu\xE1nto llevas usado esta semana y este mes [--boxes: cajas contra el tope del espacio]
11376
11384
  plan apply [espacio] Aplica ya un plan programado, ense\xF1ando qu\xE9 cambia [--dry-run]
11377
11385
 
11378
11386
  ${bold("Agentes")}
@@ -11621,7 +11629,7 @@ async function main() {
11621
11629
  const tokens = splitTokens(pos, v);
11622
11630
  globals.token = tokens.session;
11623
11631
  globals.profile = v.profile;
11624
- if (v.version) return out({ version: "0.22.0" }, () => "0.22.0");
11632
+ if (v.version) return out({ version: "0.23.0" }, () => "0.23.0");
11625
11633
  for (const n of normalizeArgs(pos, v)) if (!globals.json) info(dim(n));
11626
11634
  const context = (await readConfig()).workspace;
11627
11635
  if (!explicitToken()?.startsWith("gat_")) {
@@ -11740,7 +11748,7 @@ async function main() {
11740
11748
  throw unknown(cmd, cmd, COMMANDS, "ghosty --help");
11741
11749
  }
11742
11750
  }
11743
- var notice = updateNotice("0.22.0").catch(() => null);
11751
+ var notice = updateNotice("0.23.0").catch(() => null);
11744
11752
  main().then(
11745
11753
  async () => {
11746
11754
  const n = await notice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghostystudio/cli",
3
- "version": "0.22.0",
3
+ "version": "0.23.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": {