ghosty-acp 0.0.57 → 0.0.59

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghosty-acp",
3
- "version": "0.0.57",
3
+ "version": "0.0.59",
4
4
  "description": "Conecta tu editor a un agente ACP remoto. Puente entre entrada/salida estándar y WebSocket, sin dependencias.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: Needs Node 22+ (for npx @ghostystudio/cli) or curl, and network access to https://www.ghosty.studio
6
6
  metadata:
7
7
  author: ghosty-studio
8
- version: "1.66"
8
+ version: "1.74"
9
9
  ---
10
10
 
11
11
  # Configure a Ghosty Studio agent
@@ -47,6 +47,16 @@ reaches only that agent (no `agents ls`, no `chat`).
47
47
  Exit codes: `0` ok · `1` API error (read the message, don't retry blindly) · `2` usage error
48
48
  (check `--help`) · `3` not signed in.
49
49
 
50
+ ### From Claude or any MCP client: the account connector
51
+
52
+ To work with the user's agents from Claude, Claude Code or another MCP client (not to configure
53
+ them), the account exposes an OAuth MCP server at `https://www.ghosty.studio/mcp`:
54
+ `claude mcp add --transport http ghosty https://www.ghosty.studio/mcp` (or Claude → Settings →
55
+ Connectors → Add custom connector). The user approves the login once. Tools: `list_agents`,
56
+ `message_agent`, `get_agent_reply`, `list_conversations`, `read_conversation`, `crm_search_leads`,
57
+ `crm_read_lead`, `crm_reply_lead`, `crm_pause_lead`, `list_files`, `get_usage`, `whoami`. Docs:
58
+ https://www.ghosty.studio/docs/protocolos/conector-claude
59
+
50
60
  ### Fallback: raw HTTP
51
61
 
52
62
  If Node is not available, use curl with the agent token. Base URL:
@@ -89,13 +99,16 @@ legacy and always `true`.)
89
99
  | "which toolsets / connectors does it really have?" | `ghosty agents get <id> --fields toolsets,connectors --json` → effective `toolsets[]` and `connectors[]` with `connected`, `granted`, `effective` |
90
100
  | "turn off most of Ghosty's skills" | `ghosty skills house <id> --only a,b --dry-run`, then without `--dry-run` (`--enable`/`--disable` for a few) |
91
101
  | "one board per number / move these cards to another board" | `ghosty boards ls <workspace>`, `boards create <workspace> "<name>" --columns-from main`, `boards assign <agent-id> "<name>"`, `boards move-cards <workspace> --from main --to "<name>" --integration <formmy-id> --dry-run` then `--yes` after confirming; `boards rm <workspace> "<name>" --yes` deletes an empty one |
102
+ | "give X access to the workspace / board for a few days" (reviewer accounts) | `ghosty spaces members add <workspace> <email> --until 14d` (`--role admin` to let them invite), `ghosty boards access <workspace> <board> --add <email> --until 14d` (a whole-workspace board needs no list); `spaces members rm <workspace> <email> --yes` removes; `ghosty access why <email> <agent-id>` or `--workspace W --board B` explains why someone sees something |
92
103
  | "edit its (long) prompt" | `ghosty agents get <id> --prompt-out PROMPT.md`, edit the file, `ghosty agents set <id> --prompt-file PROMPT.md` |
93
104
  | "base its prompt on another agent's (a branch, a variant)" | write an overlay `{"edits":[{"what","find","replace","regex"?,"all"?}]}`, `ghosty agents set <id> --prompt-base <base-id> --prompt-overlay overlay.json --dry-run --out /tmp/p.md`, check, then without `--dry-run`. It regenerates when the base changes; its own prompt can't be edited while linked (`--prompt-base none` unlinks) |
94
105
  | "give it the CRM / sales tools" | `ghosty agents set <id> --toolsets +crm` (a plain list replaces; `-x` removes) |
95
106
  | "share it with / give access to <email>" | `ghosty agents share <id> <email> [--role editor\|admin]` (keeps ownership); `ghosty agents shares <id>` lists; `unshare` needs `--yes` |
96
107
  | "put it in my Teams workspace", "activate it in Teams as @x", "change its handle", "take it out of Teams", "make it @build / @plan / @check", "change who does the factory roles" | `ghosty agents teams ls <id>` (workspaces you administer: where it answers, with which @handle), `ghosty agents teams on <id> <workspace> [--handle x]` (on an active one it changes the handle; `@ghosty` is reserved), `ghosty agents teams on <id> <workspace> --factory plan,build,check` (makes it those Software Factory roles; `ls` shows the roles it holds), `ghosty agents teams off <id> <workspace>` (pauses it; keeps the @handle), `ghosty agents teams rm <id> <workspace> --yes` (removes it, frees the handle; the agent stays). In the UI: agent page → Channels → Ghosty Teams |
97
108
  | "turn off / on this skill" | `ghosty skills disable\|enable <id> <slug>` (its own or one of Ghosty's; `skills ls` shows `on`) |
98
- | "delete this agent" | confirm with the user first, then `ghosty agents rm <id>` (owner only; `409` names the workspace where it is active) |
109
+ | "something in Ghosty is broken and I can't fix it", "talk to Ghosty / support" | `ghosty support open --title "<short>" --body "<what, when, what was tried>"` — support answers BY EMAIL; replying to that email adds to the case. `ghosty support ls` / `show <id>` / `reply <id> --body …` to follow up. The case carries the account and agents' recent errors; never paste secrets |
110
+ | "archive / pause this agent for good", "I don't use this agent anymore" | prefer archiving over deleting: `ghosty agents archive <id>` (stops answering everywhere, hidden, nothing deleted; deleted automatically after 7 days). `ghosty agents restore <id>` brings it back as it was; `ghosty agents ls --archived` lists them |
111
+ | "delete this agent" | offer `archive` first (reversible for 7 days); if they still want it gone, confirm, then `ghosty agents rm <id>` (owner only; `409` names the workspace where it is active) |
99
112
  | "switch it to another engine" | `ghosty agents set <id> --engine <engine> [--model <model-id>] --dry-run` first (says what is forgotten and which machine is replaced; `ok:false` if it is busy), then the same without `--dry-run`. The model belongs to the NEW engine; each conversation keeps its history (gs passes it on its first turn) |
100
113
  | "change the model" | `ghosty agents get <id> --json` (lists `models`), then `ghosty agents set <id> --model <model-id>` (restarts by itself) |
101
114
  | "make it think more / less" | Ghosty · Lite: `ghosty agents set <id> --env GHOSTY_THINKING_EFFORT=off\|low\|medium\|high\|max`. Codex: `--env FLEET_EFFORT=none\|minimal\|low\|medium\|high\|xhigh\|max` |
@@ -108,7 +121,7 @@ legacy and always `true`.)
108
121
  | "test it as a WhatsApp customer / with a photo / with earlier context" | `ghosty try <id> "…" --waba --session <made-up phone> [--media FILE] [--history FILE --reset] --json` → `sent[]` (what it would send, tools included: `kind` text/voice/file/rich with `rich` ubicacion/cita/boton/contacto/reaccion; nothing leaves). A customer attachment exactly as Formmy delivers it: add `--as-formmy` → `media.copied` |
109
122
  | "show me this customer's chat on the board / did the attachment arrive?" | `ghosty cards ls <id> [--q name-or-phone] --json`, then `ghosty cards show <id> <folio\|phone> [--limit 50] --json` → `messages[]` with `role`, `content`, `mediaType`, `mediaCopied` |
110
123
  | "replay these real conversations" | `ghosty try <id> --replay sample.json --out ./replay [--max N]`; read `./replay/replay.json`; `--resume` if it was cut |
111
- | "is it configured right? / why does it answer badly?" | `ghosty agents doctor <id> --json` → `checks[]` with `level` (ok/warn/error) and a `fix` command each; exit 1 = something to fix |
124
+ | "is it configured right? / why does it answer badly?" | `ghosty agents doctor <id> --json` → `info` (model, effort, native subagents, answers /c, box for staff) and `checks[]` with `level` (ok/warn/error) and a `fix` command each; exit 1 = something to fix |
112
125
  | "did it forget the conversation? / did it start from scratch?" | `ghosty turns ls <id> --session <conversation> --json` → each turn's `sdk.resumed` (false + `freshReason` orphan/stale/replaced = it lost its memory; `new` = first turn). Claude agents only |
113
126
  | "try my public demo as a visitor / does it remember after a box change?" | `ghosty demos try <slug> "…"` (same thread across runs; `--new` for a new visitor); memory across boxes: second message with `--recycle-between --agent <id>`. It counts against the demo's caps |
114
127
  | "stop it / it keeps working in the background" | `ghosty turns cancel <id> <conversation-id> --json` → `detenido` + `background` (video jobs, subagents, wake-ups canceled: nothing more is delivered) |
@@ -136,6 +149,8 @@ legacy and always `true`.)
136
149
  | "remove these env variables" | `ghosty agents set <id> --unset-env K1,K2` |
137
150
  | "which models can it use? / is this model valid?" | `ghosty engines ls --models --json` → `engines[].models[]` (`id`, `multiplier`, `ownKeyOnly`); an invalid `--model` is rejected with the valid list |
138
151
  | "how much did this workspace use / which agent spends most / messages left without balance" | `ghosty usage --workspace <slug> --by agent,day --days 14 --json` → `rows`, `agents` (turns, failed, billable, noQuota); the unanswered ones: `ghosty turns ls --workspace <slug> --quota-hits --json` (owner or staff) |
152
+ | "how much does this agent cost / API equivalent / spend of /c vs Messenger" | `ghosty usage --agent <id> --by model,day,canal --cost --json` → `rows` (day, model, canal, tokens, `usd` at provider list price) and `totalUsd`; its turns per channel: `ghosty turns ls <id> --canal anon --json` |
153
+ | "who answers /c without an account / turn native subagents on for X" or "give this agent a bigger box" | staff only: `ghosty settings ls`, `ghosty settings set ANON_NATIVE_AGENT_ID <agent-id>` (`unset` = back to the default), `ghosty settings set NATIVE_SUBAGENT_AGENTS +<agent-id>`; box: `ghosty agents set <id> --box 4096:10` (MB:conversations, recycles its boxes) |
139
154
  | "give this agent its own token bag / make it one-time" | staff only: `ghosty bags ls <workspace>`, `ghosty bags create <workspace> "<bag>" --tokens 20M [--recurring off]`, `ghosty agents set <id> --bag "<bag>"`; change: `ghosty bags set <workspace> "<bag>" --tokens 30M` |
140
155
  | "renew / extend this workspace" or "rename its slug" | staff only: `ghosty spaces renew <workspace> --until YYYY-MM-DD --dry-run`, confirm, then `--yes`; `ghosty spaces rename <old> <new> --dry-run` first |
141
156
  | "make X the owner of this workspace / hand it over to the client" | staff only: `ghosty spaces transfer <workspace> --to <email> --keep-as admin --copy-keys --dry-run --json` → `keys.missing` (agents without a key stop answering) and `warnings`; confirm with the user, then without `--dry-run` plus `--yes`. Only the owner changes: agents, skills and history stay; documents, databases, boards and numbers its agents use move (`resources`); anything also used outside stays and shows in `warnings`. `--copy-keys` also copies the connectors (MercadoPago, Skydropx…) it lacks |
@@ -151,6 +166,7 @@ legacy and always `true`.)
151
166
  | "turn this tool off for customers / in WhatsApp" | `ghosty agents get <id> --fields tools --json` → `tools.canales` (what really runs per channel), then `ghosty agents set <id> --tool wa:<tool>=off` (no channel = everywhere). Team tools (identity, notes, full board, the owner's personal accounts) never run for customers and `=on` can't open them; a whole connector per channel: agent page → Connectors |
152
167
  | "put this face / avatar on the agent" | `ghosty agents set <id> --avatar <https-url or local png/jpg/webp>` → updates every Teams where it's active |
153
168
  | "remove this agent from the workspace" | irreversible (memory and files go too): confirm with the user, then `ghosty agents rm <id> --from-workspace --yes` (turns it off in every Teams, then deletes it) |
169
+ | "start its box now / warm it up before a demo" | `ghosty agents box <id> --start` (no turn spent; 503 = the space's boxes are full) |
154
170
  | "how many boxes / how much capacity does it have?" | `ghosty agents box <id> --json` → `capacity`; per workspace: `ghosty usage --boxes --workspace <slug> --json` |
155
171
  | "apply the new plan now" | `ghosty plan apply <workspace> --dry-run`, show the changes and monthly total, confirm, then without `--dry-run` (`--yes`) |
156
172
  | "copy its data from EasyBits" | `ghosty dbs import <id> <db> --from easybits:<db-id> --dry-run` first (needs `EASYBITS_API_KEY`), show the plan (and `gsOnly`: rows written in gs that replacing would delete — then use `--tables` or `--append`), then run without `--dry-run` (`--yes` if replacing rows) |
@@ -189,6 +205,7 @@ legacy and always `true`.)
189
205
  | "stop giving it this database" | `ghosty dbs revoke <id> <db>` (prints the `grant` that undoes it) |
190
206
  | "give an agent to each of MY customers (partner)" | not for a normal owner: see https://www.ghosty.studio/docs/cli/partners.md (`ghosty partner --help`). Issue a credential without printing it: `ghosty partner credentials create --label prod --out-env .env.partner`; debug tools: `ghosty partner try <org> "…" --verbose`; several agents per partner: `--agent <slug>` on `partner agent get|apply` and `partner try`; a business's WhatsApp number: `channels whatsapp link <partner-agent-id> … --partner-tenant <org> --partner-agent <slug>`; WhatsApp groups of a partner agent: `ghosty partner wa groups ls|link <jid> --tenant <org> --agent <slug>|create|unlink`; a business's WABA number registered by the partner in Formmy: `ghosty partner waba links create --tenant <org> --agent nik-public` (url + secret for Formmy) then `set <id> --integration <formmy-id> --on` |
191
207
  | "work in my client's account / workspace" | `ghosty login --device --profile <client>`: give the client the printed link and code to approve; then add `--profile <client>` to every command (`ghosty logout --profile <client>` revokes it) |
208
+ | "tell @plan / an agent in Teams to…", "post this in the room / thread" | `ghosty teams post <workspace>#<room>[/<thread-message-id>] "@plan …" [--wait]` → posted as the user (no thread = new thread, like «Pedir»), the mentioned agent answers; `--wait` prints its answer. Only for something the user asked to send |
192
209
  | "have it speak in this Teams room / thread at 9" | `ghosty schedule add <id> "…" --teams <workspace>#<room>[/<thread-message-id>] --at ISO \| --in 30m` → it answers there as if mentioned; `ghosty schedule ls\|rm <id> [sched-id] --teams <workspace>` |
193
210
  | "have it do X every day / at 9 / remind me" | `ghosty schedule add <id> "…" --at ISO \| --in 30m [--every 12h --until ISO] [--title T]`; each run notifies the user's phone, an answer of exactly `OK` stays silent. `ghosty schedule ls|rm <id>` |
194
211
 
@@ -210,7 +227,7 @@ Read `references/api.md` for exact request/response shapes before calling.
210
227
  - **Restart is not free**: it cuts a turn in progress. Batch changes, restart once at the end.
211
228
  - Files go to the agent's working directory; tell the user the agent can `ls` them. Max 10 MB each.
212
229
  - Never print the token back to the user or into logs.
213
- - **Destructive commands need `--yes`** when you run them (no terminal): `agents rm`, `files rm`, `skills rm`, `credentials rm`, `board archive`, `dbs import` over existing rows, `channels whatsapp enable`, `channels wa groups enable`, `channels whatsapp link|unlink|history`, `channels wa import`, `agents unshare`, `boards move-cards`, `cards reply`, `cards pending --reply`, `factory runs rename`. Confirm with the user BEFORE adding it; prefer `--dry-run` first where it exists.
230
+ - **Destructive commands need `--yes`** when you run them (no terminal): `agents rm`, `files rm`, `skills rm`, `credentials rm`, `board archive`, `dbs import` over existing rows, `channels whatsapp enable`, `channels wa groups enable`, `channels whatsapp link|unlink|history`, `channels wa import`, `agents unshare`, `boards move-cards`, `spaces members rm`, `cards reply`, `cards pending --reply`, `factory runs rename`. Confirm with the user BEFORE adding it; prefer `--dry-run` first where it exists.
214
231
 
215
232
  ## Verify
216
233
 
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: Needs curl or Node 18+, network access to https://www.ghosty.studio, and Chrome with the Ghosty extension signed in to ghosty.studio
6
6
  metadata:
7
7
  author: ghosty-studio
8
- version: "1.8"
8
+ version: "1.9"
9
9
  ---
10
10
 
11
11
  # Use the person's Chrome through Ghosty
@@ -106,6 +106,15 @@ OpenAPI: https://www.ghosty.studio/openapi.yaml (tag *Navegador*).
106
106
  HTTP `session` gets its own tab in the "Ghosty" group: several agents drive the same Chrome at once
107
107
  without stepping on each other, with no `tabId` needed. The first one uses the usual tab; the rest
108
108
  open theirs in the background without stealing the visible one.
109
+ - **Tabs don't pile up.** When a `browser-mcp` process exits its tab is freed at once and closed
110
+ after 2 minutes; an agent that never says goodbye (a /c conversation, an HTTP script) frees its tab
111
+ after 5 idle minutes and it closes after 30. The tab the user is looking at is never closed.
112
+ - **Several steps in one call: `batch`.** When you can predict two or more steps, send them together:
113
+ `batch {actions:[{name:"navigate",input:{url}}, {name:"type",input:{target:"input[name=q]",text:"…",submit:true}}, {name:"wait_for",input:{text:"…"}}, {name:"get_page_text",input:{}}]}`.
114
+ One round trip instead of four; only the last step returns a snapshot. Steps run in order and the
115
+ batch stops at the first error, pending confirmation, captcha/2FA, dialog, or when the page changed
116
+ and the next step uses an old ref — after `navigate` (or a click that changes page) target with a
117
+ selector or `text`, not a ref. Use `wait_for` as the check that a step worked. Max 20 steps, no nesting.
109
118
  - **Parallel tasks of the same agent: pass `tabId`.** `tabs {action:"new", url, background:true}`
110
119
  returns a `tabId`; pass it to every call of that task (say, YouTube and TikTok, or two subagents
111
120
  sharing one MCP process). Answers start with `[tab N]`.
@@ -124,7 +133,8 @@ OpenAPI: https://www.ghosty.studio/openapi.yaml (tag *Navegador*).
124
133
  hanging. A click that opens another tab says `↗ … [tabId N]`. For screen recordings, arm with
125
134
  `showMs` (≤ 3000) so the dialog stays visible a moment before it is answered.
126
135
  - `status` returns `build` (hash of the running code) and `capabilities`: check them after the user
127
- reloads the extension. `sessions` in `capabilities` = one tab per agent (older builds share one tab).
136
+ reloads the extension. `sessions` in `capabilities` = one tab per agent (older builds share one tab). `sessionEnd` = the tab
137
+ closes when the agent exits; `batch` = `batch` is available (older builds: call tools one by one).
128
138
  - **`type` clears the field first** (rich editors too); `clear: false` appends. If the field ended
129
139
  up different, the answer warns with ⚠️ — check it.
130
140
  - **Tag/chip fields** (YouTube, TikTok): `type` with `slowly: true` and comma-separated text; the