@ghostystudio/cli 0.43.0 → 0.44.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.
- package/README.md +5 -0
- package/dist/index.js +182 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -86,6 +86,7 @@ ghosty agents doctor --user EMAIL [agent] [--turns 8] · usage --images [--plan
|
|
|
86
86
|
ghosty novedades ls|create|set|test|send|rm [--title] [--body] [--image FILE] [--link] [--to] [--publish] [--at]
|
|
87
87
|
ghosty sites ls [--house] · sites publish <file.html|folder> [--title] [--slug S] [--site <slug|id>] · sites slug <slug|id> <new-slug> # house sites on EasyBits
|
|
88
88
|
ghosty credentials ls|set|rm [provider] [--from-env VAR] # never as an argument
|
|
89
|
+
ghosty connectors ls|connect|disconnect [id] [--q TEXT] [--from-env VAR] [--no-open] # Shopify, Stripe, monday…
|
|
89
90
|
ghosty docs
|
|
90
91
|
|
|
91
92
|
ghosty partner ls|enable|credentials|agent|tenants|audit|try # one agent for each of YOUR customers: ghosty partner --help
|
|
@@ -101,6 +102,10 @@ Every command has its own help with examples: `ghosty <command> --help` or `ghos
|
|
|
101
102
|
|
|
102
103
|
Exit codes: `0` ok · `1` API error · `2` usage error · `3` not signed in.
|
|
103
104
|
|
|
105
|
+
### Changes in 0.44.0
|
|
106
|
+
|
|
107
|
+
- New `connectors ls|connect|disconnect`: the connectors of your account (Shopify, Stripe, monday, Mercado Libre…), the same as `/app/connectors`. `connect` opens the browser for OAuth (`--no-open` prints the URL) or asks for the key fields (hidden, `--from-env VAR` or stdin). Then `agents set <id> --connect <connector>` gives it to an agent.
|
|
108
|
+
|
|
104
109
|
### Changes in 0.42.0
|
|
105
110
|
|
|
106
111
|
- `agents teams off` now **pauses** the agent in that workspace (it keeps its `@handle`; `on` resumes it). `agents teams rm <id> <workspace> [--yes]` removes it and frees the handle. `ls` shows `paused` and the workspaces where it was activated by someone else (read-only). Without `--handle`, `on` reuses the handle it already has in your other workspaces.
|
package/dist/index.js
CHANGED
|
@@ -8422,7 +8422,7 @@ async function postLong(path, body, timeoutMs = 9e5) {
|
|
|
8422
8422
|
const req = httpsRequest(`${base}${path}`, {
|
|
8423
8423
|
method: "POST",
|
|
8424
8424
|
timeout: timeoutMs,
|
|
8425
|
-
headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.
|
|
8425
|
+
headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.44.0"}`, "content-type": "application/json", "content-length": Buffer.byteLength(data) }
|
|
8426
8426
|
}, (res) => {
|
|
8427
8427
|
let buf = "";
|
|
8428
8428
|
res.on("data", (c) => buf += c);
|
|
@@ -8464,7 +8464,7 @@ async function request(path, opts = {}, retried = false) {
|
|
|
8464
8464
|
method: opts.method ?? (opts.body !== void 0 || opts.raw !== void 0 ? "POST" : "GET"),
|
|
8465
8465
|
headers: {
|
|
8466
8466
|
authorization: `Bearer ${token}`,
|
|
8467
|
-
"user-agent": `ghosty-cli/${"0.
|
|
8467
|
+
"user-agent": `ghosty-cli/${"0.44.0"}`,
|
|
8468
8468
|
"accept-language": lang(),
|
|
8469
8469
|
...opts.body !== void 0 ? { "content-type": "application/json" } : {},
|
|
8470
8470
|
...opts.headers
|
|
@@ -9725,7 +9725,7 @@ async function call(path, v, init = {}) {
|
|
|
9725
9725
|
"x-ghosty-ts": ts,
|
|
9726
9726
|
"x-ghosty-sig": sig,
|
|
9727
9727
|
"content-type": "application/json",
|
|
9728
|
-
"user-agent": `ghosty-cli/${"0.
|
|
9728
|
+
"user-agent": `ghosty-cli/${"0.44.0"}`
|
|
9729
9729
|
},
|
|
9730
9730
|
body: method === "GET" ? void 0 : raw
|
|
9731
9731
|
});
|
|
@@ -10557,6 +10557,143 @@ async function credentialsCmd2(sub, provider, v) {
|
|
|
10557
10557
|
}
|
|
10558
10558
|
}
|
|
10559
10559
|
|
|
10560
|
+
// src/commands/connectors.ts
|
|
10561
|
+
async function hiddenPrompt2(label) {
|
|
10562
|
+
process.stderr.write(label);
|
|
10563
|
+
const stdin = process.stdin;
|
|
10564
|
+
stdin.setRawMode(true);
|
|
10565
|
+
stdin.resume();
|
|
10566
|
+
stdin.setEncoding("utf8");
|
|
10567
|
+
return new Promise((resolve3, reject) => {
|
|
10568
|
+
let value = "";
|
|
10569
|
+
const onData = (chunk) => {
|
|
10570
|
+
for (const ch of chunk) {
|
|
10571
|
+
if (ch === "\r" || ch === "\n") {
|
|
10572
|
+
stdin.setRawMode(false);
|
|
10573
|
+
stdin.pause();
|
|
10574
|
+
stdin.off("data", onData);
|
|
10575
|
+
process.stderr.write("\n");
|
|
10576
|
+
return resolve3(value);
|
|
10577
|
+
}
|
|
10578
|
+
if (ch === "") {
|
|
10579
|
+
stdin.setRawMode(false);
|
|
10580
|
+
process.stderr.write("\n");
|
|
10581
|
+
return reject(usage(t("Cancelled.", "Cancelado.")));
|
|
10582
|
+
}
|
|
10583
|
+
if (ch === "\x7F") value = value.slice(0, -1);
|
|
10584
|
+
else value += ch;
|
|
10585
|
+
}
|
|
10586
|
+
};
|
|
10587
|
+
stdin.on("data", onData);
|
|
10588
|
+
});
|
|
10589
|
+
}
|
|
10590
|
+
async function visiblePrompt(label) {
|
|
10591
|
+
const { createInterface: createInterface3 } = await import("node:readline/promises");
|
|
10592
|
+
const rl = createInterface3({ input: process.stdin, output: process.stderr });
|
|
10593
|
+
try {
|
|
10594
|
+
return (await rl.question(label)).trim();
|
|
10595
|
+
} finally {
|
|
10596
|
+
rl.close();
|
|
10597
|
+
}
|
|
10598
|
+
}
|
|
10599
|
+
function kindOf(c) {
|
|
10600
|
+
if (c.kind === "credential") return t("key", "llave");
|
|
10601
|
+
if (c.store === "teams") return "OAuth (Teams)";
|
|
10602
|
+
return "OAuth";
|
|
10603
|
+
}
|
|
10604
|
+
async function catalog() {
|
|
10605
|
+
return (await api("/api/v2/me/connectors")).connectors;
|
|
10606
|
+
}
|
|
10607
|
+
async function find(id) {
|
|
10608
|
+
const all = await catalog();
|
|
10609
|
+
const q = id.toLowerCase();
|
|
10610
|
+
const c = all.find((x) => x.id === q) ?? all.find((x) => x.nombre.toLowerCase() === q);
|
|
10611
|
+
if (!c) throw usage(t(`Unknown connector: ${id}.`, `Conector desconocido: ${id}.`), t("List them with: ghosty connectors ls", "L\xEDstalos con: ghosty connectors ls"));
|
|
10612
|
+
return c;
|
|
10613
|
+
}
|
|
10614
|
+
async function readValues(c, fromEnv) {
|
|
10615
|
+
const fields = c.credential?.fields ?? [];
|
|
10616
|
+
const secrets = fields.filter((f) => f.secret !== false);
|
|
10617
|
+
const values = {};
|
|
10618
|
+
if (fromEnv || !process.stdin.isTTY) {
|
|
10619
|
+
if (fields.length !== 1) {
|
|
10620
|
+
throw usage(
|
|
10621
|
+
t(`${c.nombre} asks for ${fields.length} fields: run it in a terminal to answer them.`, `${c.nombre} pide ${fields.length} campos: c\xF3rrelo en una terminal para contestarlos.`),
|
|
10622
|
+
fields.map((f) => `${f.key}: ${f.label}`).join(" \xB7 ")
|
|
10623
|
+
);
|
|
10624
|
+
}
|
|
10625
|
+
if (fromEnv) {
|
|
10626
|
+
const v = process.env[fromEnv];
|
|
10627
|
+
if (!v) throw usage(t(`$${fromEnv} is empty or not set.`, `$${fromEnv} est\xE1 vac\xEDa o no existe.`));
|
|
10628
|
+
values[fields[0].key] = v.trim();
|
|
10629
|
+
} else {
|
|
10630
|
+
const parts = [];
|
|
10631
|
+
for await (const ch of process.stdin) parts.push(ch);
|
|
10632
|
+
values[fields[0].key] = Buffer.concat(parts).toString("utf8").trim();
|
|
10633
|
+
}
|
|
10634
|
+
return values;
|
|
10635
|
+
}
|
|
10636
|
+
if (!canPrompt()) throw usage(t("Nothing to save.", "No hay nada que guardar."), t("Use --from-env VAR or pipe the key.", "Usa --from-env VAR o pasa la llave por tuber\xEDa."));
|
|
10637
|
+
if (c.credential?.help) info(dim(c.credential.help + (c.credential.helpUrl ? ` ${c.credential.helpUrl}` : "")));
|
|
10638
|
+
for (const f of fields) {
|
|
10639
|
+
const label = `${f.label}${f.placeholder ? dim(` (${f.placeholder})`) : ""}: `;
|
|
10640
|
+
values[f.key] = secrets.includes(f) ? (await hiddenPrompt2(label)).trim() : await visiblePrompt(label);
|
|
10641
|
+
}
|
|
10642
|
+
return values;
|
|
10643
|
+
}
|
|
10644
|
+
async function connectorsCmd(sub, id, v) {
|
|
10645
|
+
switch (sub ?? "ls") {
|
|
10646
|
+
case "ls":
|
|
10647
|
+
case "list": {
|
|
10648
|
+
let all = await catalog();
|
|
10649
|
+
if (v.q) {
|
|
10650
|
+
const q = v.q.toLowerCase();
|
|
10651
|
+
all = all.filter((c) => `${c.id} ${c.nombre} ${c.descripcion}`.toLowerCase().includes(q));
|
|
10652
|
+
}
|
|
10653
|
+
const rows = all.map((c) => ({
|
|
10654
|
+
id: c.id,
|
|
10655
|
+
name: c.nombre,
|
|
10656
|
+
status: c.conectado ? t("connected", "conectado") : c.disponible ? t("available", "disponible") : t("soon", "muy pronto"),
|
|
10657
|
+
kind: kindOf(c)
|
|
10658
|
+
}));
|
|
10659
|
+
return out(all, () => table(rows, ["id", "name", "status", "kind"]));
|
|
10660
|
+
}
|
|
10661
|
+
case "connect": {
|
|
10662
|
+
if (!id) throw usage(t("Missing connector.", "Falta el conector."), t("Example: ghosty connectors connect shopify (ghosty connectors ls lists them)", "Ejemplo: ghosty connectors connect shopify (ghosty connectors ls los lista)"));
|
|
10663
|
+
const c = await find(id);
|
|
10664
|
+
if (!c.disponible) throw usage(t(`${c.nombre} isn't available yet.`, `${c.nombre} todav\xEDa no est\xE1 disponible.`));
|
|
10665
|
+
if (c.kind === "credential" && c.credential) {
|
|
10666
|
+
const values = await readValues(c, v["from-env"]);
|
|
10667
|
+
if (Object.values(values).some((x) => !x)) throw usage(t("Empty field: nothing saved.", "Campo vac\xEDo: no se guard\xF3 nada."));
|
|
10668
|
+
const r2 = await api(`/api/v2/me/connectors/${encodeURIComponent(c.id)}/credentials`, { method: "POST", body: { values } });
|
|
10669
|
+
return out(r2, () => `${lavender("\u2713")} ${c.nombre} ${t("connected", "conectado")}${r2.account ? dim(` (${r2.account})`) : ""}. ${dim(t("Give it to an agent: ghosty agents set <id> --connect " + c.id, "D\xE1selo a un agente: ghosty agents set <id> --connect " + c.id))}`);
|
|
10670
|
+
}
|
|
10671
|
+
const r = await api(`/api/v2/me/connectors/${encodeURIComponent(c.id)}/start?from=connectors`, { method: "POST" });
|
|
10672
|
+
if (!v["no-open"]) await openUrl(r.url);
|
|
10673
|
+
return out(
|
|
10674
|
+
r,
|
|
10675
|
+
() => [
|
|
10676
|
+
`${lavender("\u2192")} ${t(`Finish connecting ${c.nombre} in your browser:`, `Termina de conectar ${c.nombre} en tu navegador:`)}`,
|
|
10677
|
+
` ${r.url}`,
|
|
10678
|
+
dim(t("Then check it with: ghosty connectors ls --q " + c.id, "Luego rev\xEDsalo con: ghosty connectors ls --q " + c.id))
|
|
10679
|
+
].join("\n")
|
|
10680
|
+
);
|
|
10681
|
+
}
|
|
10682
|
+
case "disconnect":
|
|
10683
|
+
case "rm": {
|
|
10684
|
+
if (!id) throw usage(t("Missing connector.", "Falta el conector."), t("Example", "Ejemplo") + ": ghosty connectors disconnect shopify");
|
|
10685
|
+
const c = await find(id);
|
|
10686
|
+
if (!c.conectado) throw usage(t(`${c.nombre} isn't connected.`, `${c.nombre} no est\xE1 conectado.`));
|
|
10687
|
+
await confirm(t(`Disconnect ${c.nombre}? Your agents stop using it.`, `\xBFDesconectar ${c.nombre}? Tus agentes dejar\xE1n de usarlo.`), { yes: v.yes, retry: `ghosty connectors disconnect ${c.id}` });
|
|
10688
|
+
const r = await api(`/api/v2/me/connectors/${encodeURIComponent(c.id)}`, { method: "DELETE" });
|
|
10689
|
+
return out(r, () => `${lavender("\u2713")} ${c.nombre} ${t("disconnected.", "desconectado.")}${r.aviso ? `
|
|
10690
|
+
${dim(r.aviso)}` : ""}`);
|
|
10691
|
+
}
|
|
10692
|
+
default:
|
|
10693
|
+
throw usage(t(`Unknown connectors subcommand: ${sub}.`, `Subcomando de connectors desconocido: ${sub}.`), t("Try", "Prueba") + ": ghosty connectors ls | connect | disconnect (ghosty connectors --help)");
|
|
10694
|
+
}
|
|
10695
|
+
}
|
|
10696
|
+
|
|
10560
10697
|
// src/commands/channels.ts
|
|
10561
10698
|
import { readFile as readFile8 } from "node:fs/promises";
|
|
10562
10699
|
|
|
@@ -10596,7 +10733,7 @@ async function readMultiFileAuth(dir) {
|
|
|
10596
10733
|
// src/commands/channels.ts
|
|
10597
10734
|
var enc7 = encodeURIComponent;
|
|
10598
10735
|
var digits = (s) => s.replace(/\D/g, "");
|
|
10599
|
-
function
|
|
10736
|
+
function find2(nums, ref) {
|
|
10600
10737
|
const d = digits(ref);
|
|
10601
10738
|
const hit = nums.find((n) => n.id === ref) ?? nums.find((n) => n.label.toLowerCase() === ref.toLowerCase()) ?? (d.length >= 6 ? nums.find((n) => digits(n.label).endsWith(d)) : void 0);
|
|
10602
10739
|
if (!hit) throw usage(t(`No WhatsApp number "${ref}" for this agent.`, `Este agente no tiene el n\xFAmero de WhatsApp "${ref}".`), nums.length ? `${t("Available", "Disponibles")}: ${nums.map((n) => n.label).join(", ")}` : t("Pair a number first in the web (the agent's Channels page).", "Primero parea un n\xFAmero en la web (p\xE1gina Canales del agente)."));
|
|
@@ -10626,7 +10763,7 @@ async function channelsCmd(kind, sub, id, ref, v) {
|
|
|
10626
10763
|
}
|
|
10627
10764
|
if (sub !== "enable" && sub !== "disable") throw usage(t(`Unknown subcommand: ${sub}.`, `Subcomando desconocido: ${sub}.`), t("Try", "Prueba") + ": ghosty channels whatsapp ls | enable | disable | integrations | link | unlink | history \xB7 ghosty channels wa import | status | pause | groups");
|
|
10628
10765
|
if (!ref) throw usage(t("Missing number.", "Falta el n\xFAmero."), t("Example", "Ejemplo") + `: ghosty channels whatsapp ${sub} ${id} +52 55 1234 5678`);
|
|
10629
|
-
const n =
|
|
10766
|
+
const n = find2(cur.numbers, ref);
|
|
10630
10767
|
const on = sub === "enable";
|
|
10631
10768
|
if (on === n.mine) return out({ changed: 0, number: n.label, answers: on }, () => dim(t(`Nothing to do: ${n.label} is already ${on ? "answered by this agent" : "not answered by it"}.`, `Nada que hacer: ${n.label} ya ${on ? "lo contesta este agente" : "no lo contesta este agente"}.`)));
|
|
10632
10769
|
const plan = on ? `+ ${n.label}: ${t(`this agent starts answering its customers${n.takenByOther ? " (takes it from the agent answering today)" : ""}`, `este agente empieza a contestarles a sus clientes${n.takenByOther ? " (se lo quita al agente que contesta hoy)" : ""}`)}` : `- ${n.label}: ${t("this agent stops answering (messages are still logged)", "este agente deja de contestar (los mensajes se siguen registrando)")}`;
|
|
@@ -11215,6 +11352,17 @@ var HELPS_ES = {
|
|
|
11215
11352
|
],
|
|
11216
11353
|
notes: ["La llave nunca se acepta como argumento: se quedar\xEDa en el historial de tu shell y en `ps`."]
|
|
11217
11354
|
},
|
|
11355
|
+
connectors: {
|
|
11356
|
+
summary: "Los conectores de tu cuenta (los mismos de /app/connectors y la app): listar, conectar y desconectar.",
|
|
11357
|
+
replace: [["# opens the browser: type your store and approve", "# abre el navegador: escribe tu tienda y autoriza"], ["# then give it to an agent", "# luego d\xE1selo a un agente"]],
|
|
11358
|
+
flags: [
|
|
11359
|
+
["--q TEXT", "ls: filtra por id, nombre o descripci\xF3n"],
|
|
11360
|
+
["--from-env VAR", "connect: los de llave con UN campo la leen de esta variable de entorno"],
|
|
11361
|
+
["--no-open", "connect: imprime la URL sin abrir el navegador (SSH, agentes)"],
|
|
11362
|
+
["--yes", "disconnect: se salta la confirmaci\xF3n"]
|
|
11363
|
+
],
|
|
11364
|
+
notes: ["Los de OAuth terminan en el navegador; los de llave se verifican antes de guardarse. Las llaves nunca se aceptan como argumento."]
|
|
11365
|
+
},
|
|
11218
11366
|
channels: {
|
|
11219
11367
|
summary: "Qu\xE9 n\xFAmeros de WhatsApp Business contesta un agente, y qu\xE9 grupos de su WhatsApp personal (y como qui\xE9n). Los n\xFAmeros se emparejan en la web.",
|
|
11220
11368
|
replace: [['"Name"', '"Nombre"']],
|
|
@@ -11416,7 +11564,7 @@ var HELPS_ES = {
|
|
|
11416
11564
|
notes: ["create sigue las reglas de la web: queda a tu nombre, nace como prueba de 30 d\xEDas, tu correo debe estar confirmado y tu plan topa cu\xE1ntos tienes. Sigue: ghosty partner enable <slug>.", "Con suscripci\xF3n de Stripe renew se niega: la fecha la mueve la factura pagada.", "rename cambia s\xF3lo el slug (id y namespace se quedan, as\xED que tablero, Stripe y WhatsApp siguen funcionando); las ligas viejas <slug>.sales dejan de servir.", "transfer se lleva los agentes con el espacio y recicla sus cajas (el due\xF1o va horneado en la caja); sin --copy-keys la simulaci\xF3n dice qu\xE9 llaves le faltan al nuevo \u2014 esos agentes dejar\xEDan de contestar."]
|
|
11417
11565
|
}
|
|
11418
11566
|
};
|
|
11419
|
-
var HELP_ALIASES = { creds: "credentials", board: "cards", conversations: "chat", workspaces: "spaces" };
|
|
11567
|
+
var HELP_ALIASES = { creds: "credentials", conectores: "connectors", board: "cards", conversations: "chat", workspaces: "spaces" };
|
|
11420
11568
|
|
|
11421
11569
|
// src/help.ts
|
|
11422
11570
|
var DOCS = "https://www.ghosty.studio/docs/cli";
|
|
@@ -11735,6 +11883,25 @@ HELPS.credentials = {
|
|
|
11735
11883
|
learn: `${REF}#credenciales`
|
|
11736
11884
|
};
|
|
11737
11885
|
HELPS.creds = HELPS.credentials;
|
|
11886
|
+
HELPS.connectors = {
|
|
11887
|
+
summary: "Your account's connectors (the same as /app/connectors and the app): list, connect and disconnect.",
|
|
11888
|
+
usage: ["ghosty connectors ls [--q TEXT]", "ghosty connectors connect <id> [--from-env VAR | < stdin] [--no-open]", "ghosty connectors disconnect <id> [--yes]"],
|
|
11889
|
+
flags: [
|
|
11890
|
+
["--q TEXT", "ls: filter by id, name or description"],
|
|
11891
|
+
["--from-env VAR", "connect: key connectors with ONE field read it from this environment variable"],
|
|
11892
|
+
["--no-open", "connect: print the URL without opening the browser (SSH, agents)"],
|
|
11893
|
+
["--yes", "disconnect: skip the confirmation"]
|
|
11894
|
+
],
|
|
11895
|
+
examples: [
|
|
11896
|
+
"ghosty connectors ls --q shop",
|
|
11897
|
+
"ghosty connectors connect shopify # opens the browser: type your store and approve",
|
|
11898
|
+
"ghosty connectors connect stripe --from-env STRIPE_SECRET_KEY",
|
|
11899
|
+
"ghosty agents set <agent> --connect shopify # then give it to an agent"
|
|
11900
|
+
],
|
|
11901
|
+
notes: ["OAuth connectors finish in the browser; key connectors are verified before saving. Keys are never accepted as arguments."],
|
|
11902
|
+
learn: `${REF}#conectores`
|
|
11903
|
+
};
|
|
11904
|
+
HELPS.conectores = HELPS.connectors;
|
|
11738
11905
|
HELPS.channels = {
|
|
11739
11906
|
summary: "Which WhatsApp Business numbers an agent answers, and which groups of its personal WhatsApp (and as whom). Pair numbers in the web.",
|
|
11740
11907
|
usage: [
|
|
@@ -13171,6 +13338,7 @@ ${bold("Your account")}
|
|
|
13171
13338
|
me files ls|get|upload|rm Files in your account [--q TEXT] [--kind image|video|audio|document|other] [--cursor C] \xB7 get <id> [--out FILE]
|
|
13172
13339
|
me memories ls|add|edit|rm What your agents remember about you (personal chats only) add "text" \xB7 edit <id> "text" \xB7 rm <id>
|
|
13173
13340
|
credentials ls|set|rm [provider] Provider keys in your vault (hidden prompt, stdin or --from-env VAR; never as an argument)
|
|
13341
|
+
connectors ls|connect|disconnect [id] Your connectors (Shopify, Stripe, monday\u2026): connect opens the browser or asks for the key
|
|
13174
13342
|
docs [topic] Open the docs
|
|
13175
13343
|
|
|
13176
13344
|
${bold("Global options")}
|
|
@@ -13310,6 +13478,7 @@ ${bold("Tu cuenta")}
|
|
|
13310
13478
|
me files ls|get|upload|rm Archivos de tu cuenta [--q TEXTO] [--kind image|video|audio|document|other] [--cursor C] \xB7 get <id> [--out ARCHIVO]
|
|
13311
13479
|
me memories ls|add|edit|rm Lo que tus agentes recuerdan de ti (s\xF3lo chats personales) add "texto" \xB7 edit <id> "texto" \xB7 rm <id>
|
|
13312
13480
|
credentials ls|set|rm [proveedor] Llaves de proveedor en tu b\xF3veda (prompt oculto, stdin o --from-env VAR; nunca como argumento)
|
|
13481
|
+
connectors ls|connect|disconnect [id] Tus conectores (Shopify, Stripe, monday\u2026): connect abre el navegador o pide la llave
|
|
13313
13482
|
docs [tema] Abre la documentaci\xF3n
|
|
13314
13483
|
|
|
13315
13484
|
${bold("Opciones globales")}
|
|
@@ -13325,7 +13494,7 @@ ${bold("Opciones globales")}
|
|
|
13325
13494
|
${bold("C\xF3digos de salida")} 0 bien \xB7 1 error de la API \xB7 2 uso incorrecto \xB7 3 sin sesi\xF3n
|
|
13326
13495
|
${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.")}
|
|
13327
13496
|
${dim("Documentaci\xF3n: https://www.ghosty.studio/docs/cli")}`;
|
|
13328
|
-
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", "browser", "docs", "help"];
|
|
13497
|
+
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", "connectors", "browser", "docs", "help"];
|
|
13329
13498
|
var AGENTS_SUBS = ["ls", "create", "get", "set", "export", "doctor", "docs", "share", "unshare", "shares", "teams", "rm", "restart", "demo", "box"];
|
|
13330
13499
|
function unknown(what, input, known, helpCmd) {
|
|
13331
13500
|
const s = suggest(input, known);
|
|
@@ -13455,6 +13624,7 @@ async function main() {
|
|
|
13455
13624
|
create: { type: "boolean" },
|
|
13456
13625
|
prune: { type: "boolean" },
|
|
13457
13626
|
q: { type: "string" },
|
|
13627
|
+
"no-open": { type: "boolean" },
|
|
13458
13628
|
"prompt-out": { type: "string" },
|
|
13459
13629
|
toolsets: { type: "string" },
|
|
13460
13630
|
"prompt-base": { type: "string" },
|
|
@@ -13551,7 +13721,7 @@ async function main() {
|
|
|
13551
13721
|
const tokens = splitTokens(pos, v);
|
|
13552
13722
|
globals.token = tokens.session;
|
|
13553
13723
|
globals.profile = v.profile;
|
|
13554
|
-
if (v.version) return out({ version: "0.
|
|
13724
|
+
if (v.version) return out({ version: "0.44.0" }, () => "0.44.0");
|
|
13555
13725
|
for (const n of normalizeArgs(pos, v)) if (!globals.json) info(dim(n));
|
|
13556
13726
|
const context = (await readConfig()).workspace;
|
|
13557
13727
|
if (!explicitToken()?.startsWith("gat_")) {
|
|
@@ -13654,6 +13824,9 @@ async function main() {
|
|
|
13654
13824
|
case "credentials":
|
|
13655
13825
|
case "creds":
|
|
13656
13826
|
return credentialsCmd2(sub, a1, v);
|
|
13827
|
+
case "connectors":
|
|
13828
|
+
case "conectores":
|
|
13829
|
+
return connectorsCmd(sub, a1, v);
|
|
13657
13830
|
case "try":
|
|
13658
13831
|
return tryTurn(sub, a1, v);
|
|
13659
13832
|
case "chat":
|
|
@@ -13706,7 +13879,7 @@ async function main() {
|
|
|
13706
13879
|
throw unknown(cmd, cmd, COMMANDS, "ghosty --help");
|
|
13707
13880
|
}
|
|
13708
13881
|
}
|
|
13709
|
-
var notice = updateNotice("0.
|
|
13882
|
+
var notice = updateNotice("0.44.0").catch(() => null);
|
|
13710
13883
|
main().then(
|
|
13711
13884
|
async () => {
|
|
13712
13885
|
const n = await notice;
|
package/package.json
CHANGED