@ghostystudio/cli 0.7.0 → 0.7.2

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 (2) hide show
  1. package/dist/index.js +12 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -290,7 +290,7 @@ async function request(path, opts = {}, retried = false) {
290
290
  method: opts.method ?? (opts.body !== void 0 || opts.raw !== void 0 ? "POST" : "GET"),
291
291
  headers: {
292
292
  authorization: `Bearer ${token}`,
293
- "user-agent": `ghosty-cli/${"0.7.0"}`,
293
+ "user-agent": `ghosty-cli/${"0.7.2"}`,
294
294
  ...opts.body !== void 0 ? { "content-type": "application/json" } : {},
295
295
  ...opts.headers
296
296
  },
@@ -502,9 +502,11 @@ async function agentsDemo(id, v) {
502
502
  if (v.on) body.enabled = true;
503
503
  if (v.off) body.enabled = false;
504
504
  if (v.turns) body.maxTurns = Number(v.turns);
505
+ if (v.hours) body.trialHours = Number(v.hours);
505
506
  if (v["per-ip"]) body.perIpDay = Number(v["per-ip"]);
506
507
  if (v.welcome !== void 0) body.welcome = v.welcome;
507
508
  if (v.chips !== void 0) body.chips = v.chips.split("|").map((c) => c.trim()).filter(Boolean);
509
+ if (v.starter !== void 0) body.starter = v.starter || null;
508
510
  if (v.sponsor !== void 0) {
509
511
  if (v.sponsor !== "on" && v.sponsor !== "off") throw usage("--sponsor takes on or off.");
510
512
  body.sponsor = v.sponsor === "on";
@@ -514,10 +516,12 @@ async function agentsDemo(id, v) {
514
516
  d,
515
517
  () => [
516
518
  `${d.enabled ? lavender("\u25CF on") : dim("\u25CB off")} ${d.url ?? dim("(no link yet: --slug NAME)")}`,
517
- dim(`limits: ${d.maxTurns} messages per visitor \xB7 ${d.perIpDay} per IP per day`),
519
+ dim(`trial: ${d.trialHours} h from the first message \xB7 cap ${d.maxTurns} messages per visitor \xB7 ${d.perIpDay} per IP per day`),
518
520
  d.welcome ? `welcome: ${d.welcome}` : dim("welcome: (default greeting)"),
521
+ d.starter ? `starter: \u2728 ${d.starter}` : dim("starter: (none)"),
519
522
  d.chips.length ? `chips: ${d.chips.join(" | ")}` : dim("chips: (default)"),
520
- `tried ${d.stats.pruebas} \xB7 messages ${d.stats.mensajes} \xB7 kept ${d.stats.clones} (${d.stats.patrocinados} on your key)`
523
+ `tried ${d.stats.pruebas} \xB7 messages ${d.stats.mensajes} \xB7 kept ${d.stats.clones} (${d.stats.patrocinados} on your key)`,
524
+ ...d.lastError ? [red(`last failure ${d.lastError.at}: ${d.lastError.message ?? d.lastError.error}`)] : []
521
525
  ].join("\n")
522
526
  );
523
527
  }
@@ -843,7 +847,7 @@ async function call(path, v, init = {}) {
843
847
  "x-ghosty-ts": ts,
844
848
  "x-ghosty-sig": sig,
845
849
  "content-type": "application/json",
846
- "user-agent": `ghosty-cli/${"0.7.0"}`
850
+ "user-agent": `ghosty-cli/${"0.7.2"}`
847
851
  },
848
852
  body: method === "GET" ? void 0 : raw
849
853
  });
@@ -1027,7 +1031,7 @@ ${bold("Agents")}
1027
1031
  agents rm <id> Delete an agent (owner only)
1028
1032
  agents restart <id> Restart an ACP agent (needsRestart) so it loads new skills
1029
1033
  agents demo <id> Public demo link /p/<slug>: anyone tries it without an account, "Keep it" clones it to theirs
1030
- [--slug NAME] [--on | --off] [--turns N] [--per-ip N] [--welcome TEXT] [--chips "a|b|c"] [--sponsor on|off]
1034
+ [--slug NAME] [--on | --off] [--hours N] [--turns N] [--per-ip N] [--welcome TEXT] [--chips "a|b|c"] [--starter TEXT] [--sponsor on|off]
1031
1035
 
1032
1036
  ${bold("Configure an agent")}
1033
1037
  files ls|get|put|rm <id> [path] Files in the agent's machine [--file LOCAL] [--out LOCAL]
@@ -1107,9 +1111,11 @@ async function main() {
1107
1111
  on: { type: "boolean" },
1108
1112
  off: { type: "boolean" },
1109
1113
  turns: { type: "string" },
1114
+ hours: { type: "string" },
1110
1115
  "per-ip": { type: "string" },
1111
1116
  welcome: { type: "string" },
1112
1117
  chips: { type: "string" },
1118
+ starter: { type: "string" },
1113
1119
  sponsor: { type: "string" }
1114
1120
  }
1115
1121
  });
@@ -1117,7 +1123,7 @@ async function main() {
1117
1123
  const tokens = splitTokens(pos, v);
1118
1124
  globals.token = tokens.session;
1119
1125
  globals.profile = v.profile;
1120
- if (v.version) return out({ version: "0.7.0" }, () => "0.7.0");
1126
+ if (v.version) return out({ version: "0.7.2" }, () => "0.7.2");
1121
1127
  const [cmd, sub, a1, a2] = pos;
1122
1128
  if (cmd === "partner" && (v.help || !sub || sub === "help")) return out({ help: PARTNER_HELP }, () => PARTNER_HELP);
1123
1129
  if (!cmd || v.help || cmd === "help") return showHelp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghostystudio/cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
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": {