@ghostystudio/cli 0.7.1 → 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.
- package/dist/index.js +10 -5
- 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.
|
|
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,8 +516,9 @@ 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(`
|
|
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
523
|
`tried ${d.stats.pruebas} \xB7 messages ${d.stats.mensajes} \xB7 kept ${d.stats.clones} (${d.stats.patrocinados} on your key)`,
|
|
521
524
|
...d.lastError ? [red(`last failure ${d.lastError.at}: ${d.lastError.message ?? d.lastError.error}`)] : []
|
|
@@ -844,7 +847,7 @@ async function call(path, v, init = {}) {
|
|
|
844
847
|
"x-ghosty-ts": ts,
|
|
845
848
|
"x-ghosty-sig": sig,
|
|
846
849
|
"content-type": "application/json",
|
|
847
|
-
"user-agent": `ghosty-cli/${"0.7.
|
|
850
|
+
"user-agent": `ghosty-cli/${"0.7.2"}`
|
|
848
851
|
},
|
|
849
852
|
body: method === "GET" ? void 0 : raw
|
|
850
853
|
});
|
|
@@ -1028,7 +1031,7 @@ ${bold("Agents")}
|
|
|
1028
1031
|
agents rm <id> Delete an agent (owner only)
|
|
1029
1032
|
agents restart <id> Restart an ACP agent (needsRestart) so it loads new skills
|
|
1030
1033
|
agents demo <id> Public demo link /p/<slug>: anyone tries it without an account, "Keep it" clones it to theirs
|
|
1031
|
-
[--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]
|
|
1032
1035
|
|
|
1033
1036
|
${bold("Configure an agent")}
|
|
1034
1037
|
files ls|get|put|rm <id> [path] Files in the agent's machine [--file LOCAL] [--out LOCAL]
|
|
@@ -1108,9 +1111,11 @@ async function main() {
|
|
|
1108
1111
|
on: { type: "boolean" },
|
|
1109
1112
|
off: { type: "boolean" },
|
|
1110
1113
|
turns: { type: "string" },
|
|
1114
|
+
hours: { type: "string" },
|
|
1111
1115
|
"per-ip": { type: "string" },
|
|
1112
1116
|
welcome: { type: "string" },
|
|
1113
1117
|
chips: { type: "string" },
|
|
1118
|
+
starter: { type: "string" },
|
|
1114
1119
|
sponsor: { type: "string" }
|
|
1115
1120
|
}
|
|
1116
1121
|
});
|
|
@@ -1118,7 +1123,7 @@ async function main() {
|
|
|
1118
1123
|
const tokens = splitTokens(pos, v);
|
|
1119
1124
|
globals.token = tokens.session;
|
|
1120
1125
|
globals.profile = v.profile;
|
|
1121
|
-
if (v.version) return out({ version: "0.7.
|
|
1126
|
+
if (v.version) return out({ version: "0.7.2" }, () => "0.7.2");
|
|
1122
1127
|
const [cmd, sub, a1, a2] = pos;
|
|
1123
1128
|
if (cmd === "partner" && (v.help || !sub || sub === "help")) return out({ help: PARTNER_HELP }, () => PARTNER_HELP);
|
|
1124
1129
|
if (!cmd || v.help || cmd === "help") return showHelp();
|
package/package.json
CHANGED