@ghostystudio/cli 0.40.0 → 0.41.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 +9 -0
- package/dist/index.js +52 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ ghosty apply <file|dir> [--agent X] [--create] [--prune] [--dry-run] # make an
|
|
|
30
30
|
ghosty agents set <id> [--name] [--engine] [--model] [--prompt | --prompt-file FILE] [--env K=V,…] [--connect ID,…] [--disconnect ID,…] [--toolsets +crm]
|
|
31
31
|
ghosty agents set <id> --prompt-base <base-id> --prompt-overlay overlay.json [--dry-run] # prompt = another agent's + edits, kept in sync
|
|
32
32
|
ghosty agents share|unshare <id> <email> [--role editor|admin] # share without handing it over · agents shares <id> lists them
|
|
33
|
+
ghosty agents teams ls|on|off <id> [workspace] [--handle x] # which Teams workspaces it answers in, and its @handle there
|
|
33
34
|
ghosty agents rm <id> [--from-workspace] [--yes] # --from-workspace: turn it off in Teams first
|
|
34
35
|
ghosty agents set <id> [--tool wa:tool=off,…] [--bag NAME|none] [--avatar URL|FILE]
|
|
35
36
|
ghosty agents restart <id>
|
|
@@ -100,6 +101,14 @@ Every command has its own help with examples: `ghosty <command> --help` or `ghos
|
|
|
100
101
|
|
|
101
102
|
Exit codes: `0` ok · `1` API error · `2` usage error · `3` not signed in.
|
|
102
103
|
|
|
104
|
+
### Changes in 0.41.1
|
|
105
|
+
|
|
106
|
+
- `agents teams`: the agent can be given by name (0.41.0 read `ls`/`on`/`off` as the agent).
|
|
107
|
+
|
|
108
|
+
### Changes in 0.41.0
|
|
109
|
+
|
|
110
|
+
- `agents teams ls <id>`: the Teams workspaces you administer, with the `@handle` it answers with in each (or the suggested one). `agents teams on <id> <workspace> [--handle x]` turns it on there, or changes its handle if it was already on; `agents teams off <id> <workspace>` turns it off (the agent stays). Same rules as the agent page (Channels → Ghosty Teams): `@ghosty` is reserved, a taken handle is rejected.
|
|
111
|
+
|
|
103
112
|
### Changes in 0.40.0
|
|
104
113
|
|
|
105
114
|
- `sites ls [--house]`: the sites your agents published (or, staff, Ghosty's house sites). `sites publish <file.html|folder> [--title] [--slug S] [--site <slug|id>]` (staff) publishes a house site on EasyBits — no owner, no expiry, no banner; `--site` updates one. `sites slug <slug|id> <new-slug>` (staff) changes a site's slug. Slug errors come with a code: `slug_invalid`, `slug_taken`, `slug_unsupported` (EasyBits doesn't accept a slug yet; nothing changes, exit 1).
|
package/dist/index.js
CHANGED
|
@@ -7458,9 +7458,18 @@ var SERVER_MESSAGES = [
|
|
|
7458
7458
|
["s\xF3lo el due\xF1o da acceso a sus conectores", "only the owner grants access to their connectors"],
|
|
7459
7459
|
["s\xF3lo el due\xF1o del agente maneja su demo", "only the agent's owner manages its demo"],
|
|
7460
7460
|
["s\xF3lo el due\xF1o puede borrar el agente", "only the owner can delete the agent"],
|
|
7461
|
-
["Ese agente est\xE1 activo en {}. Qu\xEDtalo de ah\xED (Ajustes \u2192 Agentes) antes de borrarlo.", "That agent is active in {}. Remove it from there (Settings \u2192 Agents) before deleting it."],
|
|
7462
7461
|
["Ese espacio no es tuyo.", "That workspace isn't yours."],
|
|
7463
7462
|
["@{} ya est\xE1 ocupado por otro agente en este espacio: dale un handle propio", "@{} is already taken by another agent in this workspace: give it its own handle"],
|
|
7463
|
+
// — Activar en equipos de Teams (`agents teams`)
|
|
7464
|
+
["@{} ya est\xE1 ocupado en {}", "@{} is already taken in {}"],
|
|
7465
|
+
["@{} est\xE1 reservado", "@{} is reserved"],
|
|
7466
|
+
["los @handle {} a {}5 ya est\xE1n ocupados en {}", "handles @{} to @{}5 are already taken in {}"],
|
|
7467
|
+
["no administras el equipo {}", "you don't administer the workspace {}"],
|
|
7468
|
+
["no pude leer el equipo {}; int\xE9ntalo en un momento", "couldn't read the workspace {}; try again in a moment"],
|
|
7469
|
+
["s\xF3lo el due\xF1o del agente lo activa en sus equipos", "only the agent's owner turns it on in their workspaces"],
|
|
7470
|
+
["s\xF3lo el due\xF1o del agente o staff lo activan en Teams", "only the agent's owner or staff turn it on in Teams"],
|
|
7471
|
+
["falta workspace (el slug del equipo)", "missing workspace (the workspace slug)"],
|
|
7472
|
+
["Ese agente est\xE1 activo en {}. Ap\xE1galo ah\xED (Canales \u2192 Ghosty Teams) antes de borrarlo.", "That agent is active in {}. Turn it off there (Channels \u2192 Ghosty Teams) before deleting it."],
|
|
7464
7473
|
["sin cupo para otro agente ahora", "no room for another agent right now"],
|
|
7465
7474
|
["Tu plan incluye 1 agente.", "Your plan includes 1 agent."],
|
|
7466
7475
|
["Tu plan incluye {} agentes.", "Your plan includes {} agents."],
|
|
@@ -8413,7 +8422,7 @@ async function postLong(path, body, timeoutMs = 9e5) {
|
|
|
8413
8422
|
const req = httpsRequest(`${base}${path}`, {
|
|
8414
8423
|
method: "POST",
|
|
8415
8424
|
timeout: timeoutMs,
|
|
8416
|
-
headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.
|
|
8425
|
+
headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.41.1"}`, "content-type": "application/json", "content-length": Buffer.byteLength(data) }
|
|
8417
8426
|
}, (res) => {
|
|
8418
8427
|
let buf = "";
|
|
8419
8428
|
res.on("data", (c) => buf += c);
|
|
@@ -8455,7 +8464,7 @@ async function request(path, opts = {}, retried = false) {
|
|
|
8455
8464
|
method: opts.method ?? (opts.body !== void 0 || opts.raw !== void 0 ? "POST" : "GET"),
|
|
8456
8465
|
headers: {
|
|
8457
8466
|
authorization: `Bearer ${token}`,
|
|
8458
|
-
"user-agent": `ghosty-cli/${"0.
|
|
8467
|
+
"user-agent": `ghosty-cli/${"0.41.1"}`,
|
|
8459
8468
|
"accept-language": lang(),
|
|
8460
8469
|
...opts.body !== void 0 ? { "content-type": "application/json" } : {},
|
|
8461
8470
|
...opts.headers
|
|
@@ -8900,6 +8909,27 @@ ${rows.length ? table(rows, ["email", "role", "accepted"]) : dim(t("Not shared w
|
|
|
8900
8909
|
const r = await api(agentPath(id, "/shares"), { method: "POST", body: { email, ...v.role ? { role: v.role } : {} } });
|
|
8901
8910
|
out(r, () => `${lavender("\u2713")} ${r.already ? t(`Already shared with ${r.email}`, `Ya estaba compartido con ${r.email}`) : t(`Shared with ${r.email}; they got an email`, `Compartido con ${r.email}; le lleg\xF3 un correo`)} ${dim(`(${r.role})`)}.`);
|
|
8902
8911
|
}
|
|
8912
|
+
async function agentsTeams(sub, id, ws, v) {
|
|
8913
|
+
const ex = "ghosty agents teams ls <agent-id> \xB7 on <agent-id> <workspace> [--handle x] \xB7 off <agent-id> <workspace>";
|
|
8914
|
+
if (sub !== "ls" && sub !== "on" && sub !== "off") throw usage(t("Use ls, on or off.", "Usa ls, on u off."), ex);
|
|
8915
|
+
id = need(id, "agent id", ex);
|
|
8916
|
+
if (sub === "ls") {
|
|
8917
|
+
const r2 = await api(agentPath(id, "/teams"));
|
|
8918
|
+
const rows = r2.teams.map((x) => ({
|
|
8919
|
+
workspace: x.slug,
|
|
8920
|
+
handle: x.active ? `@${x.handle}` : dim(`(@${x.suggested})`),
|
|
8921
|
+
state: !x.confirmed ? t("unconfirmed", "sin confirmar") : x.active ? t("on", "prendido") : t("off", "apagado")
|
|
8922
|
+
}));
|
|
8923
|
+
return out(r2, () => rows.length ? table(rows, ["workspace", "handle", "state"]) : dim(t("You don't administer any Teams workspace yet.", "A\xFAn no administras ning\xFAn equipo de Teams.")));
|
|
8924
|
+
}
|
|
8925
|
+
const workspace = need(ws ?? v.workspace, "workspace", ex);
|
|
8926
|
+
if (sub === "off") {
|
|
8927
|
+
const r2 = await api(agentPath(id, `/teams?workspace=${encodeURIComponent(workspace)}`), { method: "DELETE", body: { workspace } });
|
|
8928
|
+
return out(r2, () => `${lavender("\u2713")} ${r2.wasActive ? t(`It no longer answers in ${workspace}.`, `Ya no contesta en ${workspace}.`) : t(`It wasn't active in ${workspace}.`, `No estaba activo en ${workspace}.`)}`);
|
|
8929
|
+
}
|
|
8930
|
+
const r = await api(agentPath(id, "/teams"), { method: "POST", body: { workspace, ...v.handle ? { handle: v.handle } : {} } });
|
|
8931
|
+
out(r, () => `${lavender("\u2713")} ${r.changed ? t(`Answers in ${workspace} as @${r.handle}.`, `Contesta en ${workspace} como @${r.handle}.`) : t(`Already answering in ${workspace} as @${r.handle}.`, `Ya contestaba en ${workspace} como @${r.handle}.`)}`);
|
|
8932
|
+
}
|
|
8903
8933
|
async function agentsRestart(id) {
|
|
8904
8934
|
id = need(id, "agent id", "ghosty agents restart <agent-id>");
|
|
8905
8935
|
out(await api(agentPath(id, "/restart"), { method: "POST", body: {} }), () => `${lavender("\u2713")} ${t("Restarting \u2014 the next turn uses the new config.", "Reiniciando: el siguiente turno usa la config nueva.")}`);
|
|
@@ -9641,7 +9671,7 @@ async function call(path, v, init = {}) {
|
|
|
9641
9671
|
"x-ghosty-ts": ts,
|
|
9642
9672
|
"x-ghosty-sig": sig,
|
|
9643
9673
|
"content-type": "application/json",
|
|
9644
|
-
"user-agent": `ghosty-cli/${"0.
|
|
9674
|
+
"user-agent": `ghosty-cli/${"0.41.1"}`
|
|
9645
9675
|
},
|
|
9646
9676
|
body: method === "GET" ? void 0 : raw
|
|
9647
9677
|
});
|
|
@@ -10949,7 +10979,10 @@ var HELPS_ES = {
|
|
|
10949
10979
|
["# the agent as a file; see ghosty apply --help", "# el agente como archivo; ver ghosty apply --help"],
|
|
10950
10980
|
["# your account: merge copies with the same content", "# tu cuenta: une las copias con el mismo contenido"],
|
|
10951
10981
|
["# staff: their agents, latest turns, plan and boxes", "# staff: sus agentes, \xFAltimos turnos, plan y cajas"],
|
|
10952
|
-
["# what it really has: effective toolsets, connectors connected + granted", "# lo que de verdad tiene: toolsets efectivos, conectores conectados + concedidos"]
|
|
10982
|
+
["# what it really has: effective toolsets, connectors connected + granted", "# lo que de verdad tiene: toolsets efectivos, conectores conectados + concedidos"],
|
|
10983
|
+
["# Teams workspaces you administer: where it answers and with which @handle", "# los equipos de Teams que administras: d\xF3nde contesta y con qu\xE9 @handle"],
|
|
10984
|
+
["# turn it on there (or change its @handle)", "# lo prende ah\xED (o le cambia el @handle)"],
|
|
10985
|
+
["# turn it off there; the agent stays", "# lo apaga ah\xED; el agente sigue"]
|
|
10953
10986
|
],
|
|
10954
10987
|
flags: [
|
|
10955
10988
|
["--fields a,b", "get: regresa s\xF3lo estos campos"],
|
|
@@ -10976,6 +11009,7 @@ var HELPS_ES = {
|
|
|
10976
11009
|
["--grant read|write|no", "docs add: acceso de este agente (default read; no = s\xF3lo subirlo a la cuenta)"],
|
|
10977
11010
|
["--note TEXT", "docs replace/restore: por qu\xE9 cambi\xF3 (sale en docs history)"],
|
|
10978
11011
|
["--role R", "share: editor (lo configura y lo usa) o admin (adem\xE1s lo comparte); repetirlo sobre un correo ya compartido cambia el rol"],
|
|
11012
|
+
["--handle NAME", "teams on: su @handle en ese equipo (default: sacado de su nombre, con sufijo si est\xE1 ocupado; @ghosty est\xE1 reservado). Sobre un equipo donde ya est\xE1, le cambia el handle"],
|
|
10979
11013
|
["--yes", "rm: se salta la confirmaci\xF3n (obligatorio sin terminal)"],
|
|
10980
11014
|
["--slug NAME", "demo: nombre de la liga; se le agrega un c\xF3digo de 6 caracteres (/p/NAME-CODE)"],
|
|
10981
11015
|
["--expires DATE|no", 'demo: caducidad fija en la hora de tu m\xE1quina ("2026-10-15T20:00"); no = nunca'],
|
|
@@ -11349,6 +11383,9 @@ var HELPS = {
|
|
|
11349
11383
|
"ghosty agents share <agent-id> <email> [--role editor|admin]",
|
|
11350
11384
|
"ghosty agents unshare <agent-id> <email> [--yes]",
|
|
11351
11385
|
"ghosty agents shares <agent-id>",
|
|
11386
|
+
"ghosty agents teams ls <agent-id> # Teams workspaces you administer: where it answers and with which @handle",
|
|
11387
|
+
"ghosty agents teams on <agent-id> <workspace> [--handle NAME] # turn it on there (or change its @handle)",
|
|
11388
|
+
"ghosty agents teams off <agent-id> <workspace> # turn it off there; the agent stays",
|
|
11352
11389
|
"ghosty agents restart <agent-id>",
|
|
11353
11390
|
"ghosty agents box <agent-id> [--check PATH]\u2026 [--contains PATH=TEXT]\u2026 [--recycle]",
|
|
11354
11391
|
"ghosty agents demo enable|disable <agent-id>",
|
|
@@ -11380,6 +11417,7 @@ var HELPS = {
|
|
|
11380
11417
|
["--grant read|write|no", "docs add: access for this agent (default read; no = only upload to the account)"],
|
|
11381
11418
|
["--note TEXT", "docs replace/restore: why it changed (shown in docs history)"],
|
|
11382
11419
|
["--role R", "share: editor (configures and uses it) or admin (also shares it); again on a shared email changes the role"],
|
|
11420
|
+
["--handle NAME", "teams on: its @handle in that workspace (default: from its name, with a suffix if taken; @ghosty is reserved). On an active workspace it changes the handle"],
|
|
11383
11421
|
["--yes", "rm: skip the confirmation (required without a terminal)"],
|
|
11384
11422
|
["--slug NAME", "demo: link name; a 6-char code is appended (/p/NAME-CODE)"],
|
|
11385
11423
|
["--expires DATE|no", `demo: fixed expiry in your machine's time ("2026-10-15T20:00"); no = never`],
|
|
@@ -11416,6 +11454,7 @@ var HELPS = {
|
|
|
11416
11454
|
"ghosty agents create --name Pia --engine claude --workspace ventas --channels teams=off",
|
|
11417
11455
|
"ghosty agents set <id> --toolsets +crm",
|
|
11418
11456
|
"ghosty agents share <id> ana@empresa.com --role admin",
|
|
11457
|
+
"ghosty agents teams on <id> abogados --handle licenciado",
|
|
11419
11458
|
"ghosty agents get <id> --prompt-out PROMPT.md",
|
|
11420
11459
|
"ghosty agents get <id> --fields toolsets,connectors # what it really has: effective toolsets, connectors connected + granted",
|
|
11421
11460
|
"ghosty agents create --name tania-mkt --like <pia-id> --board new --no-notify --dry-run",
|
|
@@ -12011,7 +12050,7 @@ function agentArgIndex(pos) {
|
|
|
12011
12050
|
const [cmd, sub] = pos;
|
|
12012
12051
|
switch (cmd) {
|
|
12013
12052
|
case "agents":
|
|
12014
|
-
if (sub === "docs" || sub === "documents") return 3;
|
|
12053
|
+
if (sub === "docs" || sub === "documents" || sub === "teams") return 3;
|
|
12015
12054
|
return sub && !["ls", "list", "create", "new"].includes(sub) ? 2 : null;
|
|
12016
12055
|
case "files":
|
|
12017
12056
|
case "skills":
|
|
@@ -12990,6 +13029,7 @@ ${bold("Agents")}
|
|
|
12990
13029
|
agents docs replace <id> <doc> New version (keeps name and access) --url URL | --file PATH [--note]
|
|
12991
13030
|
agents docs history|restore <id> <doc> [n] Its versions; restore n as a new version
|
|
12992
13031
|
agents share|unshare <id> <email> Share it without handing it over [--role editor|admin] \xB7 agents shares <id> lists them
|
|
13032
|
+
agents teams ls|on|off <id> [ws] Which Teams workspaces it answers in, and its @handle there [--handle x]
|
|
12993
13033
|
agents rm <id> Delete an agent (owner only; asks you to type its name, or --yes) [--from-workspace: turn it off in Teams first]
|
|
12994
13034
|
agents restart <id> Restart an ACP agent (needsRestart) so it loads new skills
|
|
12995
13035
|
agents box <id> The machine serving it: is it on the new image? [--check PATH]\u2026 [--contains PATH=TEXT]\u2026 [--recycle [--reenv] [--force]]
|
|
@@ -13125,6 +13165,7 @@ ${bold("Agentes")}
|
|
|
13125
13165
|
agents docs replace <id> <doc> Versi\xF3n nueva (conserva nombre y accesos) --url URL | --file RUTA [--note]
|
|
13126
13166
|
agents docs history|restore <id> <doc> [n] Sus versiones; restaura la n como versi\xF3n nueva
|
|
13127
13167
|
agents share|unshare <id> <correo> Comp\xE1rtelo sin cederlo [--role editor|admin] \xB7 agents shares <id> los lista
|
|
13168
|
+
agents teams ls|on|off <id> [equipo] En qu\xE9 equipos de Teams contesta y con qu\xE9 @handle [--handle x]
|
|
13128
13169
|
agents rm <id> Borra un agente (s\xF3lo el due\xF1o; te pide escribir su nombre, o --yes) [--from-workspace: antes lo desactiva en Teams]
|
|
13129
13170
|
agents restart <id> Reinicia un agente ACP (needsRestart) para que cargue skills nuevas
|
|
13130
13171
|
agents box <id> La m\xE1quina que lo atiende: \xBFya trae la imagen nueva? [--check RUTA]\u2026 [--contains RUTA=TEXTO]\u2026 [--recycle [--reenv] [--force]]
|
|
@@ -13212,7 +13253,7 @@ ${bold("C\xF3digos de salida")} 0 bien \xB7 1 error de la API \xB7 2 uso incorr
|
|
|
13212
13253
|
${dim("Nota: `ghosty` puede chocar con otro binario en tu PATH (p. ej. la TUI de Ghosty). Rev\xEDsalo con `which -a ghosty`; corre `npx @ghostystudio/cli` para ir a la segura.")}
|
|
13213
13254
|
${dim("Documentaci\xF3n: https://www.ghosty.studio/docs/cli")}`;
|
|
13214
13255
|
var COMMANDS = ["login", "logout", "whoami", "usage", "use", "apply", "plan", "engines", "bags", "spaces", "workspaces", "demos", "sites", "push", "novedades", "completion", "cards", "agents", "files", "skills", "mcp", "dbs", "turns", "try", "chat", "conversations", "schedule", "partner", "me", "channels", "board", "boards", "credentials", "docs", "help"];
|
|
13215
|
-
var AGENTS_SUBS = ["ls", "create", "get", "set", "export", "doctor", "docs", "share", "unshare", "shares", "rm", "restart", "demo", "box"];
|
|
13256
|
+
var AGENTS_SUBS = ["ls", "create", "get", "set", "export", "doctor", "docs", "share", "unshare", "shares", "teams", "rm", "restart", "demo", "box"];
|
|
13216
13257
|
function unknown(what, input, known, helpCmd) {
|
|
13217
13258
|
const s = suggest(input, known);
|
|
13218
13259
|
return usage(t(`Unknown command: ${what}.`, `Comando desconocido: ${what}.`), s ? t(`Did you mean "${s}"? Run: ${helpCmd}`, `\xBFQuisiste decir "${s}"? Corre: ${helpCmd}`) : t(`Run: ${helpCmd}`, `Corre: ${helpCmd}`));
|
|
@@ -13364,6 +13405,7 @@ async function main() {
|
|
|
13364
13405
|
before: { type: "string" },
|
|
13365
13406
|
recycle: { type: "boolean" },
|
|
13366
13407
|
role: { type: "string" },
|
|
13408
|
+
handle: { type: "string" },
|
|
13367
13409
|
wake: { type: "string" },
|
|
13368
13410
|
text: { type: "string" },
|
|
13369
13411
|
sender: { type: "string" },
|
|
@@ -13436,7 +13478,7 @@ async function main() {
|
|
|
13436
13478
|
const tokens = splitTokens(pos, v);
|
|
13437
13479
|
globals.token = tokens.session;
|
|
13438
13480
|
globals.profile = v.profile;
|
|
13439
|
-
if (v.version) return out({ version: "0.
|
|
13481
|
+
if (v.version) return out({ version: "0.41.1" }, () => "0.41.1");
|
|
13440
13482
|
for (const n of normalizeArgs(pos, v)) if (!globals.json) info(dim(n));
|
|
13441
13483
|
const context = (await readConfig()).workspace;
|
|
13442
13484
|
if (!explicitToken()?.startsWith("gat_")) {
|
|
@@ -13495,6 +13537,7 @@ async function main() {
|
|
|
13495
13537
|
}
|
|
13496
13538
|
if (sub === "get") return agentsGet(a1, v.fields, v["prompt-out"]);
|
|
13497
13539
|
if (sub === "share" || sub === "unshare" || sub === "shares") return agentsShare(sub, a1, a2, v);
|
|
13540
|
+
if (sub === "teams") return agentsTeams(a1, a2, pos[4], v);
|
|
13498
13541
|
if (sub === "set") return agentsSet(a1, v);
|
|
13499
13542
|
if (sub === "rm" || sub === "delete") return agentsRm(a1, v);
|
|
13500
13543
|
if (sub === "doctor" && v.user) return userDoctor(v.user, a1, v);
|
|
@@ -13588,7 +13631,7 @@ async function main() {
|
|
|
13588
13631
|
throw unknown(cmd, cmd, COMMANDS, "ghosty --help");
|
|
13589
13632
|
}
|
|
13590
13633
|
}
|
|
13591
|
-
var notice = updateNotice("0.
|
|
13634
|
+
var notice = updateNotice("0.41.1").catch(() => null);
|
|
13592
13635
|
main().then(
|
|
13593
13636
|
async () => {
|
|
13594
13637
|
const n = await notice;
|
package/package.json
CHANGED