@roilab/crm-cli 0.16.0 → 0.16.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/CHANGELOG.md CHANGED
@@ -6,6 +6,24 @@ Todos los cambios notables se documentan aquí. El formato sigue
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.16.1] — 2026-06-29
10
+
11
+ ### Docs
12
+
13
+ - `SURFACE.txt` puesto al día con la superficie real: añadidos `marketplace`
14
+ (compare/domain/providers/import/scrape), `task delete`, `task awaiting-reply`,
15
+ `task board {list,add,remove}`, `comment update`, `skill {init,push,remove,
16
+ review {list,approve,reject}}`, `rank {inspect,reconcile}`, y flags que
17
+ faltaban (`--description-file`, `--body-file`, `ga4 --dimensions/--metrics`,
18
+ `task list --review-pending/--review-acked`, global `--as-agent`/`--styled`).
19
+
20
+ ### Internal
21
+
22
+ - Nuevo guardrail `__tests__/surface-parity.test.mjs`: deriva el árbol real de
23
+ `crm commands` y falla si SURFACE.txt omite un comando/flag o documenta uno
24
+ inexistente — impide que la doc vuelva a derivar. `smoke.test.mjs` ahora
25
+ también deriva su lista del catálogo en vez de un array a mano.
26
+
9
27
  ## [0.16.0] — 2026-06-20
10
28
 
11
29
  ### Added
package/SURFACE.txt CHANGED
@@ -19,7 +19,9 @@ CMD crm auth list
19
19
  CMD crm auth switch <name>
20
20
  CMD crm auth logout [name]
21
21
 
22
- CMD crm task list --status <status> --domain <id> --board <id> --column <id> --assignee <id> --tag <id> --limit <n>
22
+ CMD crm task list --status <status> --domain <id> --board <id> --column <id> --assignee <id> --tag <id> --review-pending --review-acked --limit <n>
23
+ # --review-pending / --review-acked filtran la cola de revisión (agente pendiente
24
+ # de aceptar vs ya aceptada por staff).
23
25
  # --board filtra al tablero primario; --column a una columna kanban. Combínalos
24
26
  # para leer una sola swimlane (p. ej. el backlog "To Do" de un board de redactores).
25
27
  CMD crm task get <id>
@@ -29,6 +31,9 @@ CMD crm task get <id>
29
31
  CMD crm task related <id>
30
32
  # task related groups: referenced (already linked via #), sameDomain, sharedTags.
31
33
  CMD crm task search <query> --limit <n>
34
+ # task awaiting-reply — cola de tareas con un comentario de cliente aún sin
35
+ # respuesta del equipo (--client la acota a un cliente).
36
+ CMD crm task awaiting-reply --client <id>
32
37
  # task preflight — OBLIGATORIO antes de `task create`. Bundle de 1 round-trip:
33
38
  # similarTasks (FTS + Jaccard) · recall si --url · recentChanges en el dominio
34
39
  # · urlScopedTasks · recentBacklinks · openTaskCounts del dominio · hints[].
@@ -45,8 +50,12 @@ CMD crm task preflight --title <title> --url <url> --domain <id> --limit <n> --s
45
50
  # el CLI avisa en stderr a partir de 2 MB y rechaza localmente >10 MB antes de
46
51
  # tocar la red. En `task update` la lista es REEMPLAZO (los adjuntos antiguos
47
52
  # se borran salvo que también los pases); usa `--clear-files` para vaciar.
48
- CMD crm task create --title <title> --description <text> --domain <id> --board <id> --status <status> --assignee <id...> --collaborator <id...> --tag <id...> --start <date> --due <date> --completion-strategy <all|any|manual> --client-visible --no-review --file <path...>
49
- CMD crm task update <id> --title <title> --status <status> --domain <id> --board <id> --column <id> --assignee <id...> --collaborator <id...> --tag <id...> --start <date> --due <date> --completion-strategy <all|any|manual> --client-visible --no-client-visible --file <path...> --clear-files
53
+ # `--description-file <path>` lee el cuerpo de un fichero (markdown / code fences
54
+ # seguros, evita la substitución de shell con backticks). Gana a `--description`.
55
+ CMD crm task create --title <title> --description <text> --description-file <path> --domain <id> --board <id> --status <status> --assignee <id...> --collaborator <id...> --tag <id...> --start <date> --due <date> --completion-strategy <all|any|manual> --client-visible --no-review --file <path...>
56
+ CMD crm task update <id> --title <title> --description <text> --description-file <path> --status <status> --domain <id> --board <id> --column <id> --assignee <id...> --collaborator <id...> --tag <id...> --start <date> --due <date> --completion-strategy <all|any|manual> --client-visible --no-client-visible --file <path...> --clear-files
57
+ # task delete — destructivo, owner/admin. Borra la tarea (desadjunta timeEntries).
58
+ CMD crm task delete <id>
50
59
  # Tableros kanban — `board columns <boardId>` lista las columnas (ordenadas) con
51
60
  # su autoAssignUserId / autoMoveOnAssign. Flujo redactores: `board columns` para
52
61
  # resolver la columna de cada redactor → `task update <id> --column <colId>`
@@ -66,11 +75,20 @@ CMD crm task complete-with-evidence <task-id> --asset <kind:id> --comment <id>
66
75
  CMD crm task attach list <taskId>
67
76
  CMD crm task attach add <taskId> --file <path...>
68
77
  CMD crm task attach remove <taskId> <attachmentId>
78
+ # task board — multi-home (Asana-style). Una tarea vive en un board primario
79
+ # (`task update --board`) pero puede aparecer también en boards secundarios.
80
+ # `list` muestra los homes; `add`/`remove` gestionan los secundarios.
81
+ CMD crm task board list <taskId>
82
+ CMD crm task board add <taskId> <boardId>
83
+ CMD crm task board remove <taskId> <boardId>
69
84
 
70
85
  CMD crm comment list <taskId>
71
- # `--body` opcional si pasas `--file`. `--file <path>` repetible para varios
86
+ # `--body` opcional si pasas `--file`. `--body-file <path>` lee el cuerpo de un
87
+ # fichero (markdown / code fences seguros). `--file <path>` repetible para varios
72
88
  # adjuntos (máx 10 MB cada uno; aviso a partir de 2 MB).
73
- CMD crm comment create --task <id> --body <text> --kind <note|agent_log|decision> --file <path...>
89
+ CMD crm comment create --task <id> --body <text> --body-file <path> --kind <note|agent_log|decision> --file <path...>
90
+ # comment update — edita el cuerpo de un comentario propio (--id obligatorio).
91
+ CMD crm comment update --id <commentId> --body <text> --body-file <path>
74
92
 
75
93
  # Chat — conversaciones ancladas a workspace/cliente/dominio + DMs y grupos.
76
94
  # Per-cliente las salas Interna y Compartida se auto-crean. Para chats libres
@@ -87,7 +105,7 @@ CMD crm chat thread --workspace --client <id> --shared
87
105
  CMD crm chat send <threadId> --body <text> --file <path...> --kind <message|agent_log> --parent <messageId>
88
106
  CMD crm chat reply <messageId> --thread <id> --body <text> --file <path...> --kind <message|agent_log>
89
107
  CMD crm chat react <messageId> --emoji <👍|✅|👀|🙏|❤️|❓|🔥|🚀>
90
- CMD crm chat dm --member <id> --title <name> --client <id>
108
+ CMD crm chat dm --member <id...> --title <name> --client <id>
91
109
  CMD crm chat mark-read <threadId> --message <id>
92
110
 
93
111
  CMD crm client list
@@ -211,7 +229,7 @@ CMD crm integration sync --property <id>
211
229
  # Operators (GA4 adds): batch (inListFilter; value is newline-separated)
212
230
  # ads query is read-only GAQL; cost is returned in micros (÷1e6 for currency).
213
231
  CMD crm gsc query --property <id> --account <id> --site-url <url> --start <date> --end <date> --dimension <date|page|query|country|device> --filters <expr> --cursor <n>
214
- CMD crm ga4 query --property <id> --account <id> --ga4-property <num> --start <date> --end <date> --filters <expr>
232
+ CMD crm ga4 query --property <id> --account <id> --ga4-property <num> --start <date> --end <date> --filters <expr> --dimensions <list> --metrics <list>
215
233
  CMD crm bing query --property <id> --account <id> --site-url <url> --start <date> --end <date>
216
234
  CMD crm ads query --property <id> --account <id> --customer-id <id> --start <date> --end <date>
217
235
  CMD crm ads whoami --account <id> # diagnóstico OAuth: scopes concedidos + ¿'adwords'? + MCC/dev-token
@@ -225,6 +243,8 @@ CMD crm ads import # dispara ingesta fresca de Google Ads (diaria + campañas)
225
243
  # Agency skills — librería de playbooks para Claude Code. `pull` escribe en
226
244
  # `.claude/skills/<slug>/SKILL.md` + recursos; el manifest se guarda en
227
245
  # `.claude/skills/.crm-manifest.json` para que `update` detecte desactualizados.
246
+ # `init` copia los tool-skills que vienen en el bundle del CLI (sin login).
247
+ CMD crm skill init --dry-run --force --preserve
228
248
  CMD crm skill list --category <name> --status <draft|published|archived> --tag <id> --q <text>
229
249
  CMD crm skill show <slug> --revision <id>
230
250
  CMD crm skill revisions <slug>
@@ -233,12 +253,23 @@ CMD crm skill revision <id>
233
253
  CMD crm skill create --slug <slug> --name <name> --description <text> --category <local-seo|google-ads|technical-seo|content|link-building|crm-ops|workflow|general> --kind <playbook|workflow|tool|reference> --tag <id...> --visibility <workspace|staff_only> --body <md> --frontmatter <yaml>
234
254
  # skill set patches metadata only; body edits go through `crm skill push`.
235
255
  CMD crm skill set <slug> --name <name> --description <text> --category <name> --kind <kind> --tag <id...> --visibility <workspace|staff_only>
256
+ # skill push — sube el cuerpo editado a Convex (draft). `--submit` lo manda al
257
+ # inbox de revisión (member/agent); `--publish` publica directo (owner/admin);
258
+ # `--force` ignora drift; `--force-overwrite-draft` pisa un draft pendiente ajeno.
259
+ CMD crm skill push <slug> --note <text> --publish --submit --force --force-overwrite-draft --dry-run
236
260
  CMD crm skill archive <slug>
237
261
  CMD crm skill restore <slug>
238
- CMD crm skill pull <slug> --revision <id> --dry-run
262
+ # skill remove — borra el mirror local (`--purge` también quita la entrada del manifest).
263
+ CMD crm skill remove <slug> --purge
264
+ CMD crm skill pull <slug> --revision <id> --dry-run --preserve --force
239
265
  CMD crm skill pull --all --category <name> --tag <id>
240
- CMD crm skill update --dry-run
266
+ CMD crm skill update --dry-run --preserve --prune-archived
241
267
  CMD crm skill diff <slug>
268
+ # skill review — inbox de aprobación (owner/admin). `list` muestra revisiones
269
+ # sugeridas pendientes; `approve`/`reject` resuelven una por id.
270
+ CMD crm skill review list
271
+ CMD crm skill review approve <id>
272
+ CMD crm skill review reject <id> --reason <text>
242
273
 
243
274
  # Documentos de trabajo de cliente — procesos en markdown editables por IA.
244
275
  # Anclados a un cliente; internos por defecto, opt-in a cliente con `share`.
@@ -276,6 +307,11 @@ CMD crm time usage <id>
276
307
  # rank goal — unlink the task first.
277
308
  CMD crm rank list --domain <id> --country <iso2> --device <mobile|desktop> --state <pending_sync|active|orphan|archived> --unranked --canibalised --search <text> --limit <n>
278
309
  CMD crm rank get <id>
310
+ # rank inspect — diagnóstico GRATIS de una keyword (0 unidades Ahrefs): por qué no
311
+ # tiene snapshot / posición. rank reconcile — chequeo de drift gratis que marca
312
+ # keywords huérfanas (dry-run por defecto).
313
+ CMD crm rank inspect <id>
314
+ CMD crm rank reconcile --domain <id> --dry-run
279
315
  CMD crm rank add --domain <id> --country <iso2> --device <mobile|desktop> --tag <name...> --text <raw>|--file <path>|--stdin
280
316
  CMD crm rank tag [ids...] --add <tag...> --remove <tag...> --replace <tag...> --stdin --ids-from-file <path>
281
317
  CMD crm rank archive [ids...] --stdin --ids-from-file <path>
@@ -308,6 +344,16 @@ CMD crm report snapshot <id>
308
344
  CMD crm report approve <id> --note <text>
309
345
  CMD crm report reject <id> --reason <text>
310
346
 
347
+ # Marketplace — comparador cross-provider de precios de backlinks (Phase 35).
348
+ # `compare` consulta el catálogo global con filtros; `domain <domain>` agrupa
349
+ # las ofertas de un dominio; `providers` lista los proveedores; `import` carga
350
+ # ofertas manualmente (--file/--stdin); `scrape` dispara el worker hosted.
351
+ CMD crm marketplace compare --search <text> --provider <id> --country <iso2> --min-dr <n> --max-price <eur> --in-stock
352
+ CMD crm marketplace domain <domain>
353
+ CMD crm marketplace providers
354
+ CMD crm marketplace import --provider <id> --file <path> --stdin
355
+ CMD crm marketplace scrape --provider <id>
356
+
311
357
  # Dump the full CLI surface as JSON so agents can introspect without help-text
312
358
  # parsing. `{ data: { tree, flat } }` — `flat` is the linear command list.
313
359
  CMD crm commands
@@ -320,6 +366,7 @@ FLAG --quiet only `data`, no envelope
320
366
  FLAG --ids-only one id per line
321
367
  FLAG --count single integer
322
368
  FLAG --markdown human-readable preview
369
+ FLAG --styled alias of --markdown (reserved for colored output)
323
370
  FLAG --jq <expr> tiny jq (.a, .a.b, .a[], .a[].b)
324
371
  FLAG --profile <name> named credentials profile
325
372
  FLAG --workspace <id> workspace override
@@ -330,3 +377,4 @@ FLAG --idempotency-key stable retry key (autogenerated on writes if omitted)
330
377
  FLAG --wait-for-approval block until a human decides (shadow-mode writes only)
331
378
  FLAG --timeout <dur> timeout for --wait-for-approval, e.g. 30s, 5m, 2h (default 30m)
332
379
  FLAG --shadow force this write to land as a pending proposal for human review (one-way: agents cannot downgrade to autonomous)
380
+ FLAG --as-agent stamp this invocation as an AI agent (actorType:agent, AGENT badge). Auto-detected under Claude Code / Codex.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roilab/crm-cli",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "CLI for humans and AI agents to drive the ROILab SEO+CRM platform. Always-JSON envelope, numeric exit codes, idempotent writes, device-flow auth.",
5
5
  "type": "module",
6
6
  "bin": {