@iseoane/agent-depot 0.5.1 → 0.5.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/CHANGELOG.md CHANGED
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.2] - 2026-10-11
11
+
12
+ ### Added
13
+
14
+ - `agent-depot self update [--yes]` checks npm and updates only a verified npm global installation after explicit confirmation. Other installation methods receive manual guidance; downgrades are refused.
15
+ - A Pi Package containing the `/agents` panel, with a versioned snapshot-provider contract, measured telemetry, active-first newest-first ordering and stable selection. Migrating from the former pstack panel requires the coordinated adapter described in `docs/pi-agents-panel.md`.
16
+ - Manual npm trusted publishing through GitHub Actions OIDC, with version, source commit and tarball integrity checks, without stored npm tokens.
17
+
18
+ ### Changed
19
+
20
+ - Agent instructions use focused context pointers and a disclosed workflow guide. English and Spanish usage docs describe current Package ownership, TUI controls and delegated-command safety limits.
21
+
22
+ ### Fixed
23
+
24
+ - `doctor-md-agents` analyzes Pi correction history and reports missing or unsupported sources explicitly. `doctor-md-skill` follows the active Pi session branch rather than scoring abandoned branches.
25
+ - Installed Pi Packages with local changes display the version declared at verified Git HEAD, qualified as HEAD-only evidence. Local modifications still prevent update assessment and never become persisted verified installation evidence.
26
+ - TUI tests wait for a complete resized frame and unmount views before deleting their temporary state, avoiding CI teardown races.
27
+
10
28
  ## [0.5.1] - 2026-10-07
11
29
 
12
30
  ### Changed
package/README.es.md CHANGED
@@ -24,7 +24,7 @@ Qué hace:
24
24
  App recipes escritas por el usuario que deben aprobarse antes de ejecutarse.
25
25
  - **Packages**: instala, actualiza y desinstala bundles nativos del Host (paquetes de
26
26
  Pi y plugins de Claude Code) delegando el ciclo de vida en la CLI de cada Host y
27
- leyendo la versión instalada de los propios archivos de estado del Host. Un bundle
27
+ leyendo evidencia de instalación y versión propiedad del Host. Un bundle
28
28
  reserva sus Skills solo mientras lo hayas seleccionado o un Host demuestre que está
29
29
  instalado, así que los Skills de un bundle no seleccionado siguen siendo instalables
30
30
  por separado.
@@ -32,8 +32,13 @@ Qué hace:
32
32
  de Packages globales de usuario a un archivo portable e impórtalos, solo añadiendo,
33
33
  en otra máquina.
34
34
 
35
- Agent Depot nunca sobrescribe ni elimina contenido sin una previsualización y una
36
- confirmación, y rechaza rutas y enlaces inseguros.
35
+ Agent Depot previsualiza y confirma los cambios del sistema de archivos que
36
+ gestiona. Esta garantía no cubre los efectos de comandos delegados. Los métodos de
37
+ Skill proporcionados por el usuario, las App recipes aprobadas y los comandos de
38
+ Host aprobados para Packages se ejecutan como procesos hijos. Agent Depot no puede
39
+ previsualizar por completo ni revertir los efectos que queden fuera de sus propios
40
+ cambios gestionados. Agent Depot rechaza rutas y enlaces inseguros en sus
41
+ operaciones gestionadas del sistema de archivos.
37
42
 
38
43
  Requiere Node.js >= 24 (Active LTS). La [TUI interactiva](#tui-interactiva)
39
44
  necesita un terminal interactivo.
@@ -68,13 +73,23 @@ npx @iseoane/agent-depot@latest tui
68
73
  pnpm dlx @iseoane/agent-depot@latest tui
69
74
  ```
70
75
 
71
- Una instalación global se actualiza con el gestor de paquetes que la instaló:
76
+ Comprueba y actualiza una instalación global de npm con Agent Depot:
72
77
 
73
78
  ```sh
74
- npm install --global @iseoane/agent-depot@latest
75
- pnpm add --global @iseoane/agent-depot@latest
79
+ agent-depot self update
80
+ agent-depot self update --yes
76
81
  ```
77
82
 
83
+ El primer comando consulta el registro público de npm y previsualiza una versión más
84
+ reciente sin actualizar. El segundo repite la comprobación, previsualiza el destino
85
+ exacto y lo instala. Agent Depot solo admite este flujo si la ruta del paquete cargado
86
+ coincide con el directorio global que informa npm. Para las demás instalaciones,
87
+ incluidas las de pnpm, npx, locales de proyecto, mediante enlace o de procedencia
88
+ desconocida, muestra instrucciones manuales. La actualización invoca npm sin shell,
89
+ desactiva los scripts del paquete y no solicita privilegios elevados ni cambia la
90
+ configuración de npm. Si npm falla durante la instalación, el paquete global puede
91
+ quedar actualizado solo en parte; Agent Depot no puede revertir los cambios de npm.
92
+
78
93
  Un Agent Depot en ejecución nunca degrada los Skills integrados: un Skill instalado
79
94
  por un Agent Depot más reciente se notifica como no actualizable (actualiza primero
80
95
  Agent Depot).
@@ -94,10 +109,10 @@ agent-depot source remove git:<source-id> --yes
94
109
  agent-depot source remove git:<source-id> --skill <id|path> --yes
95
110
  agent-depot source migrate git:<old-source-id> git:<new-source-id> --skill <path> --yes
96
111
  agent-depot discover builtin:agent-depot git:<source-id>
97
- agent-depot install --scope project --source builtin:agent-depot --skill architecture --host pi --version latest --portable-v1 --yes
98
- agent-depot install --scope user-global --source builtin:agent-depot --skill architecture --host pi --version latest --portable-v1 --yes
112
+ agent-depot install --scope project --source builtin:agent-depot --skill agent-depot-apprecipe --host pi --version latest --portable-v1 --yes
113
+ agent-depot install --scope user-global --source builtin:agent-depot --skill agent-depot-apprecipe --host pi --version latest --portable-v1 --yes
99
114
  # Only for an explicitly reviewed, untracked real-directory conflict:
100
- agent-depot install --scope project --source builtin:agent-depot --skill architecture --host pi --version latest --portable-v1 --overwrite --yes
115
+ agent-depot install --scope project --source builtin:agent-depot --skill agent-depot-apprecipe --host pi --version latest --portable-v1 --overwrite --yes
101
116
  agent-depot install --scope project --manifest --portable-v1 --yes
102
117
  agent-depot update check --scope project
103
118
  agent-depot update apply --scope project --all --yes
@@ -251,7 +266,7 @@ actualizable. Solo para `--scope user-global`, la comprobación también informa
251
266
  directorios de Skill reales `Unmanaged` encontrados en ubicaciones absolutas exactas
252
267
  bajo las raíces globales de usuario admitidas. Estos no son candidatos a
253
268
  actualización, no se incluyen en los recuentos de estado de los gestionados y nunca
254
- se buscan a través de una Source. Las comprobaciones de proyecto no inventarían ni
269
+ se buscan a través de una Source. Las comprobaciones de proyecto no examinan ni
255
270
  informan de directorios no gestionados.
256
271
 
257
272
  Las entradas globales omitidas o inseguras se muestran por separado con
@@ -328,7 +343,7 @@ un único objeto de método JSON estricto, por ejemplo:
328
343
 
329
344
  ```sh
330
345
  agent-depot install --scope user-global --source builtin:agent-depot \
331
- --skill architecture --host pi --version latest \
346
+ --skill agent-depot-apprecipe --host pi --version latest \
332
347
  --method '{"kind":"command","argv":["node","scripts/install.mjs"],"cwd":"tools"}' \
333
348
  --portable-v1 --yes
334
349
  ```
@@ -391,7 +406,7 @@ directorio real sin registrar cuyo contenido difiere, el reemplazo requiere tant
391
406
 
392
407
  ```sh
393
408
  agent-depot install --scope project --source builtin:agent-depot \
394
- --skill architecture --host pi --version latest --portable-v1 --overwrite --yes
409
+ --skill agent-depot-apprecipe --host pi --version latest --portable-v1 --overwrite --yes
395
410
  ```
396
411
 
397
412
  La previsualización es explícita sobre esta distinción: sin `--yes` no se modifica
@@ -491,15 +506,17 @@ agent-depot tui
491
506
 
492
507
  La TUI es un front end de [Ink](https://github.com/vadimdemedes/ink) (React para
493
508
  terminales) sobre las mismas operaciones que la CLI. Necesita Node.js >= 24 y un
494
- terminal interactivo; en caso contrario, `tui` falla con un error. Cambia de vista
495
- con `1`-`5` y sal con `q` (no mientras haya un aviso abierto). Toda lista se
496
- desplaza cuando es más alta que el terminal. `j`/`k` o las flechas mueven la
497
- selección.
509
+ terminal interactivo; en caso contrario, `tui` falla con un error. Usa la pantalla
510
+ alternativa del terminal y vuelve a la pantalla anterior al salir. Se adapta al
511
+ redimensionado del terminal. Cambia de vista con `1`-`5` y sal con `q` (no mientras
512
+ haya un aviso abierto). Las listas se desplazan cuando superan la altura del
513
+ terminal. En Sources, Catalog, Installations y Updates, `j`/`k` o las flechas mueven
514
+ una fila; `PageUp` y `PageDown` avanzan una página visible.
498
515
 
499
516
  | Vista | Propósito |
500
517
  | --- | --- |
501
518
  | 1 Sources | Sources de Git (sus skills y Packages) y recetas App del usuario en una sola lista, con tipos `skills`/`app` y acciones contextuales. |
502
- | 2 Catalog | Skills que se pueden instalar: los que aún no están instalados, como Source y luego Skills. Cada Source muestra además un grupo Packages, y los Skills que posee un bundle se marcan y se atenúan. |
519
+ | 2 Catalog | Skills y Packages disponibles, agrupados por Source. Los Packages que el Host confirma como instalados se ocultan; los que solo están seleccionados siguen visibles. Un Skill propiedad de un Package activo conserva el contraste normal y muestra una insignia breve; no se puede marcar ni instalar por separado. Sitúa el cursor encima para ver el motivo. |
503
520
  | 3 Installations | Lo que hay en disco: instalaciones gestionadas (globales de usuario y de proyecto), selecciones de Packages y skills globales de usuario no gestionados. |
504
521
  | 4 Updates | Skills y Packages gestionados con una versión más reciente disponible, para el ámbito global de usuario y de proyecto. |
505
522
  | 5 Import/Export | Transferir las elecciones portables de Sources globales de usuario, las selecciones de Skills, las App recipes y las selecciones de Packages. |
@@ -510,9 +527,9 @@ confirmar):
510
527
  | Vista | Teclas |
511
528
  | --- | --- |
512
529
  | Sources | `j`/`k` recorren Sources de Git y recetas App, sin cambiar de sección con Tab. `Enter` abre el Catálogo de una Source de Git (sus skills y Packages) o previsualiza/aprueba una receta. `n` añade una Source de Git reutilizable o guía la creación de recetas; `r` refresca Sources o recarga el estado de recetas; `d` elimina. `space`/`a` solo marcan Sources de Git. |
513
- | Catalog | `Enter`/flechas expandir y contraer, `space` marcar, `a` marcar todos los listados, `i` instalar las Skills marcadas (o el skill resaltado) o previsualizar el bundle de Package resaltado, `/` filtrar, `s` alternar entre una Source o todas (cuando se abre desde una Source) |
530
+ | Catalog | `Enter`/flechas expandir y contraer, `space` alternar el Skill disponible resaltado, `a` alternar todos los Skills disponibles de la Source resaltada que coincidan con el filtro actual, `i` instalar los Skills marcados que coincidan con el filtro o el Skill disponible resaltado, o previsualizar el Package resaltado, `/` filtrar, `s` alternar una Source o todas (si se abrió desde una Source). Las marcas de otras Sources se conservan. |
514
531
  | Installations | `Enter`/flechas expandir y contraer, `u` desinstalar (todos los Hosts o los Hosts elegidos) o eliminar un skill no gestionado, `h` o `i` añadir Hosts a una instalación, `A` o `Enter` adoptar un skill no gestionado, `space` marca una hoja y `a` marca todas las hojas visibles: con marcas, `u` y `h` actúan sobre todas ellas con una única previsualización combinada y una única confirmación (las instalaciones de proyecto se omiten con un motivo). En una fila de Package: `i` previsualiza el plan de instalación congelado y lo ejecuta, aprobando antes el recibo si falta; `Enter` solo aprueba la declaración de instalación; `U` actualiza, `u` desinstala, `f` olvida el registro de selección. Las filas de Package no se pueden marcar para acciones por lotes. |
515
- | Updates | `space` marcar, `a` marcar todo, `t`/`p`/`g` mostrar todo, proyecto o global de usuario, `Enter` previsualizar las marcas, `r` comprobar de nuevo, las flechas pliegan la línea "cannot assess". Un Package marcado se une al lote y se aprueba antes de ejecutar su actualización. |
532
+ | Updates | `space` marcar, `a` marcar todo, `t`/`p`/`g` mostrar todo, proyecto o global de usuario, `Enter` previsualizar las marcas, `r` comprobar de nuevo, las flechas pliegan el grupo "cannot be checked". Sus filas son informativas y no se pueden marcar para actualizar. Un Package marcado se une al lote y se aprueba antes de ejecutar su actualización. |
516
533
  | Import/Export | `e` exportar, `i` importar; introduce una ruta de archivo, `space` alterna opciones, `a` alterna todas, `Enter` previsualiza, `y` aplica; `j`/`k` desplazan las previsualizaciones y los resultados |
517
534
 
518
535
  Al eliminar una receta App se comprueban su comando de versión aprobado y su
@@ -659,8 +676,8 @@ agent-depot app teardown example --host pi --yes
659
676
  ```
660
677
 
661
678
  Cada paso previsualiza su texto argv/manual, el ejecutable resuelto, el directorio de
662
- trabajo (el personal del usuario) y el entorno. El recurso manual solo se produce
663
- cuando un proceso no puede lanzarse, nunca tras una salida con código distinto de
679
+ trabajo (el directorio personal del usuario) y el entorno. Las instrucciones
680
+ manuales solo se ofrecen cuando un proceso no puede iniciarse, nunca tras una salida con código distinto de
664
681
  cero (que se notifica con stdout/stderr). Ejecuta tú mismo las instrucciones manuales
665
682
  mostradas y después certifica la finalización sin volver a ejecutar el argv:
666
683
 
@@ -738,10 +755,12 @@ nunca cambian el seguimiento de Apps instaladas.
738
755
  ## Packages
739
756
 
740
757
  Un Package es un bundle nativo del Host descubierto dentro de una Source registrada:
741
- un paquete de Pi (un `package.json` con una clave `pi`, o los directorios
742
- convencionales `extensions/`, `skills/`, `prompts/` y `themes/`) o un plugin de Claude
743
- Code (un `.claude-plugin/plugin.json` vinculado por un
744
- `.claude-plugin/marketplace.json` dentro del repositorio). Un mismo repositorio puede
758
+ un paquete de Pi (un `package.json` con una clave `pi`, la palabra clave
759
+ `pi-package` o un directorio convencional específico de Pi, como `extensions/` o
760
+ `prompts/`) o un plugin de Claude Code (un `.claude-plugin/plugin.json` vinculado
761
+ por un `.claude-plugin/marketplace.json` dentro del repositorio). Los directorios
762
+ `skills/` y `themes/` también son convencionales en Claude Code, por lo que un
763
+ repositorio que solo contiene Skills compartidos no se identifica como paquete de Pi. Un mismo repositorio puede
745
764
  ser ambas cosas, como `pstack-claude`. V1 solo admite los Hosts Pi y Claude Code; el
746
765
  empaquetado de Codex y OpenCode, los paquetes de Pi procedentes de npm y los Packages
747
766
  de ámbito de proyecto quedan aplazados.
@@ -749,10 +768,26 @@ de ámbito de proyecto quedan aplazados.
749
768
  Agent Depot no copia el contenido de un bundle. Lee el manifiesto del bundle en un
750
769
  inventario de componentes tipado, deriva los comandos propios del Host a partir de esa
751
770
  declaración, los ejecuta mediante el ejecutor de comandos sin shell tras la aprobación
752
- y lee la versión instalada de los archivos de estado del Host. El Host posee lo que
753
- está instalado. Agent Depot posee el registro de selección y el recibo de lo que
754
- delegó. Los Skills propios de un bundle nunca se ofrecen para adopción ni se instalan
755
- por segunda vez, porque el Host posee sus archivos y ubicaciones.
771
+ y lee el estado instalado de archivos propiedad del Host. Agent Depot lee esos
772
+ archivos y nunca los escribe. Para Pi, el ajuste `packages` de
773
+ `~/.pi/agent/settings.json` identifica un paquete configurado. Agent Depot verifica
774
+ después el checkout bajo `$PI_CODING_AGENT_DIR/git` (o `~/.pi/agent/git` si la
775
+ variable no está definida): la raíz del checkout, `origin`, el commit `HEAD` y el
776
+ `package.json` de ese commit. Si no puede verificar la raíz, el origen o `HEAD`, el
777
+ paquete sigue instalado, pero su versión no está disponible. Si los cambios locales
778
+ hacen que el checkout esté modificado, Agent Depot muestra la versión de `HEAD`, pero
779
+ no usa el commit para evaluar actualizaciones. Installations y `package inspect`
780
+ indican `(HEAD; local changes)` en la etiqueta. Tanto los cambios en archivos
781
+ controlados como los archivos sin seguimiento cuentan; Agent Depot no ignora archivos
782
+ de bloqueo ni otros archivos locales. La versión del manifiesto sirve para mostrar
783
+ información, pero no demuestra que el checkout coincida con la Source seleccionada.
784
+ La evaluación de actualizaciones compara el commit de un checkout limpio con el
785
+ commit disponible de la Source mediante la ascendencia en el historial en caché.
786
+ Para Claude, Agent Depot lee los archivos de estado de plugins y marketplaces. El
787
+ Host posee lo que está instalado. Agent Depot posee el registro de selección y el
788
+ recibo de lo que delegó. Mientras un Package está seleccionado o confirmado como instalado, sus
789
+ Skills declarados no pueden adoptarse ni instalarse por separado. Un descriptor
790
+ descubierto, por sí solo, no reserva sus Skills.
756
791
 
757
792
  ### Añadir una Source y descubrir sus bundles
758
793
 
@@ -834,8 +869,12 @@ evidencia de versión que Agent Depot registró. La evidencia en vivo procede de
834
869
  `~/.pi/agent/settings.json` y `~/.claude/plugins/installed_plugins.json`, que Agent
835
870
  Depot lee y nunca escribe. Un archivo de Host ausente es una vista vacía. Un archivo
836
871
  desviado o ilegible deja la búsqueda afectada en `unknown` y nunca lanza una
837
- excepción. Un paquete git de Pi sin versión se informa como `unknown`, nunca como
838
- `current`.
872
+ excepción. Un paquete Git de Pi cuyo manifiesto no declara versión aún puede tener evidencia
873
+ de commit verificada. Si Agent Depot verifica la identidad del checkout, pero detecta
874
+ cambios locales, puede mostrar la versión del manifiesto de `HEAD`, pero no comparar
875
+ el checkout para buscar actualizaciones. Si no puede verificar la raíz, el origen o
876
+ `HEAD`, la versión instalada no está disponible. En ambos casos, el estado de
877
+ actualización es `cannot assess`, no `current`.
839
878
 
840
879
  Una actualización registra una versión nueva solo cuando el estado del Host cambió de
841
880
  una forma que Agent Depot puede verificar, es decir, cuando las dos observaciones
@@ -863,8 +902,14 @@ comando del Host y deja la instalación del Host tal cual.
863
902
  de pin admitida por Claude.
864
903
  - Un plugin de Claude sin vinculación a un marketplace dentro del repositorio se
865
904
  informa pero no es instalable.
866
- - Agent Depot no lee la salida en prosa de la CLI del Host, incluido `pi list`. La
867
- evidencia instalada procede solo de los archivos de estado del Host.
905
+ - Agent Depot no usa la salida en prosa de la CLI del Host, incluido `pi list`, como
906
+ evidencia del estado instalado. Para Pi, combina el ajuste de solo lectura con
907
+ evidencia del checkout verificado. Para Claude, lee los archivos de estado del Host.
908
+ Nunca escribe esos archivos.
909
+
910
+ ## Panel de agentes de Pi
911
+
912
+ Agent Depot también incluye una extensión de Pi con el panel `/agents`. Muestra estado, actividad y consumo medido desde un proveedor conectado, con los agentes en ejecución primero y los más nuevos antes que los antiguos. Es un Package, no un Skill ni una App. Instalarlo junto a pstack requiere el adaptador coordinado de snapshots para evitar dos comandos `/agents`; sin proveedor, informa de que no hay datos disponibles. Consulta los [detalles de instalación y del proveedor](docs/pi-agents-panel.md).
868
913
 
869
914
  ## Exportar un Profile global de usuario
870
915
 
package/README.md CHANGED
@@ -23,15 +23,19 @@ What it does:
23
23
  user-written App recipes that must be approved before they run.
24
24
  - **Packages**: install, update and uninstall host-native bundles (Pi packages and
25
25
  Claude Code plugins) by delegating the lifecycle to each Host's own CLI and
26
- reading the installed version from the Host's own state files. A bundle reserves
26
+ reading Host-owned installation and version evidence. A bundle reserves
27
27
  its Skills only while you have selected it or a Host proves it installed, so an
28
28
  unselected bundle's Skills stay installable on their own.
29
29
  - **Profiles**: export your user-global Sources, Skill selections, App recipes and
30
30
  Package selections to a portable file and import them, add-only, on another
31
31
  machine.
32
32
 
33
- Agent Depot never overwrites or deletes content without a preview and confirmation,
34
- and refuses unsafe paths and links.
33
+ Agent Depot previews and confirms the filesystem changes it manages. This
34
+ guarantee does not cover side effects from delegated commands. User-provided Skill
35
+ methods, approved App recipes, and approved Package Host commands run as child
36
+ processes. Agent Depot cannot fully preview or roll back their effects outside its
37
+ managed changes. Agent Depot rejects unsafe paths and links in its managed
38
+ filesystem operations.
35
39
 
36
40
  Requires Node.js >= 24 (Active LTS). The [interactive TUI](#interactive-tui)
37
41
  needs an interactive terminal.
@@ -66,13 +70,22 @@ npx @iseoane/agent-depot@latest tui
66
70
  pnpm dlx @iseoane/agent-depot@latest tui
67
71
  ```
68
72
 
69
- A global install is updated with the package manager that installed it:
73
+ Check and update an npm global installation with Agent Depot:
70
74
 
71
75
  ```sh
72
- npm install --global @iseoane/agent-depot@latest
73
- pnpm add --global @iseoane/agent-depot@latest
76
+ agent-depot self update
77
+ agent-depot self update --yes
74
78
  ```
75
79
 
80
+ The first command checks the public npm registry and previews a newer version without
81
+ updating. The second repeats the check, previews its exact target, and applies it.
82
+ Agent Depot supports this flow only when its loaded package directory matches the
83
+ global directory reported by npm. It prints manual guidance for other installations,
84
+ including pnpm, npx, project-local, linked, and unknown installations. The update uses
85
+ npm without a shell, disables package lifecycle scripts, and never requests elevated
86
+ privileges or changes npm configuration. If npm fails during installation, the global
87
+ package may be left partially updated; Agent Depot cannot roll back npm's changes.
88
+
76
89
  A running Agent Depot never downgrades built-in Skills: a Skill installed by a newer
77
90
  Agent Depot is reported as not updatable (update Agent Depot first).
78
91
 
@@ -91,10 +104,10 @@ agent-depot source remove git:<source-id> --yes
91
104
  agent-depot source remove git:<source-id> --skill <id|path> --yes
92
105
  agent-depot source migrate git:<old-source-id> git:<new-source-id> --skill <path> --yes
93
106
  agent-depot discover builtin:agent-depot git:<source-id>
94
- agent-depot install --scope project --source builtin:agent-depot --skill architecture --host pi --version latest --portable-v1 --yes
95
- agent-depot install --scope user-global --source builtin:agent-depot --skill architecture --host pi --version latest --portable-v1 --yes
107
+ agent-depot install --scope project --source builtin:agent-depot --skill agent-depot-apprecipe --host pi --version latest --portable-v1 --yes
108
+ agent-depot install --scope user-global --source builtin:agent-depot --skill agent-depot-apprecipe --host pi --version latest --portable-v1 --yes
96
109
  # Only for an explicitly reviewed, untracked real-directory conflict:
97
- agent-depot install --scope project --source builtin:agent-depot --skill architecture --host pi --version latest --portable-v1 --overwrite --yes
110
+ agent-depot install --scope project --source builtin:agent-depot --skill agent-depot-apprecipe --host pi --version latest --portable-v1 --overwrite --yes
98
111
  agent-depot install --scope project --manifest --portable-v1 --yes
99
112
  agent-depot update check --scope project
100
113
  agent-depot update apply --scope project --all --yes
@@ -299,7 +312,7 @@ method object, for example:
299
312
 
300
313
  ```sh
301
314
  agent-depot install --scope user-global --source builtin:agent-depot \
302
- --skill architecture --host pi --version latest \
315
+ --skill agent-depot-apprecipe --host pi --version latest \
303
316
  --method '{"kind":"command","argv":["node","scripts/install.mjs"],"cwd":"tools"}' \
304
317
  --portable-v1 --yes
305
318
  ```
@@ -358,7 +371,7 @@ requires both `--overwrite` and `--yes`:
358
371
 
359
372
  ```sh
360
373
  agent-depot install --scope project --source builtin:agent-depot \
361
- --skill architecture --host pi --version latest --portable-v1 --overwrite --yes
374
+ --skill agent-depot-apprecipe --host pi --version latest --portable-v1 --overwrite --yes
362
375
  ```
363
376
 
364
377
  The preview is explicit about this distinction: without `--yes`, zero files or
@@ -446,14 +459,17 @@ agent-depot tui
446
459
 
447
460
  The TUI is an [Ink](https://github.com/vadimdemedes/ink) (React for terminals)
448
461
  front end over the same operations as the CLI. It needs Node.js >= 24 and an
449
- interactive terminal; otherwise `tui` fails with an error. Switch views with
450
- `1`-`5`, quit with `q` (not while a prompt is open). Every list scrolls when it is
451
- taller than the terminal. `j`/`k` or the arrow keys move.
462
+ interactive terminal; otherwise `tui` fails with an error. It uses the terminal's
463
+ alternate screen and returns to the previous screen when you quit. It adjusts to
464
+ terminal resizing. Switch views with `1`-`5`, quit with `q` (not while a prompt is
465
+ open). Lists scroll when they are taller than the terminal. In Sources, Catalog,
466
+ Installations, and Updates, `j`/`k` or the arrows move one row; `PageUp` and
467
+ `PageDown` move by one visible page.
452
468
 
453
469
  | View | Purpose |
454
470
  | --- | --- |
455
471
  | 1 Sources | Git Sources (their skills and Packages) and user-owned App recipes in one list, with `skills`/`app` kinds and contextual actions. |
456
- | 2 Catalog | Skills that can be installed: those not installed yet, as Source, then Skills. Each Source also shows a Packages group, and the Skills a bundle owns are marked and dimmed. |
472
+ | 2 Catalog | Available Skills and Packages, grouped by Source. Host-confirmed installed Packages are hidden; selected-only Packages remain visible. An active Package-owned Skill stays at normal contrast with a compact owner badge; it cannot be marked or installed separately. Move the cursor to it to see why. |
457
473
  | 3 Installations | What is on disk: managed installations (user-global and project), Package selections and unmanaged user-global skills. |
458
474
  | 4 Updates | Managed skills and Packages with a newer version available, for user-global and project scope. |
459
475
  | 5 Import/Export | Transfer portable user-global Source choices, Skill selections, App recipes and Package selections. |
@@ -463,9 +479,9 @@ Keys per view (prompts also accept `Esc` to cancel and `y`/`n` to confirm):
463
479
  | View | Keys |
464
480
  | --- | --- |
465
481
  | Sources | `j`/`k` move through Git Sources and App recipes (no Tab section switch). `Enter` opens the Catalog for a Git Source (its skills and Packages) or previews/approves an App recipe. `n` adds a reusable Git Source or guides recipe authoring; `r` refreshes Sources or reloads recipe status; `d` removes. `space`/`a` mark Git Sources only. |
466
- | Catalog | `Enter`/arrows expand and collapse, `space` mark, `a` mark all listed, `i` install the marked Skills (or the highlighted skill) or preview the highlighted Package bundle, `/` filter, `s` toggle one Source or all (when opened from a Source) |
482
+ | Catalog | `Enter`/arrows expand and collapse, `space` toggle the highlighted loose Skill, `a` toggle all loose Skills in the highlighted Source that match the current filter, `i` install marked Skills that match the filter or the highlighted loose Skill, or preview the highlighted Package, `/` filter, `s` toggle one Source or all (when opened from a Source). Marks in other Sources remain unchanged. |
467
483
  | Installations | `Enter`/arrows expand and collapse, `u` uninstall (all Hosts or chosen Hosts) or remove an unmanaged skill, `h` or `i` add Hosts to an installation, `A` or `Enter` adopt an unmanaged skill, `space` marks a leaf and `a` marks all visible leaves: with marks, `u` and `h` act on all of them with one combined preview and one confirmation (project installations are skipped with a reason). On a Package row: `i` previews the frozen install plan and runs it, approving the receipt first when it is missing, `Enter` approves the install declaration only, `U` update, `u` uninstall, `f` forget the selection record. Package rows are not markable for bulk actions. |
468
- | Updates | `space` mark, `a` mark all, `t`/`p`/`g` show all, project or user-global, `Enter` preview the marks, `r` check again, arrows fold the "cannot assess" line. A marked Package joins the batch and is approved before its update runs. |
484
+ | Updates | `space` mark, `a` mark all, `t`/`p`/`g` show all, project or user-global, `Enter` preview the marks, `r` check again, arrows fold the "cannot be checked" group. Rows in that group are informational and cannot be marked for an update. A marked Package joins the batch and is approved before its update runs. |
469
485
  | Import/Export | `e` export, `i` import; enter a file path, `space` toggle choices, `a` toggle all, `Enter` preview, `y` apply; `j`/`k` scroll previews and results |
470
486
 
471
487
  Removing an App recipe checks its approved version command and tracked state.
@@ -682,11 +698,25 @@ deferred.
682
698
 
683
699
  Agent Depot does not copy a bundle's contents. It reads the bundle manifest into a
684
700
  typed component inventory, derives the Host's own commands from that declaration,
685
- runs them through the no-shell command runner after approval, and reads the
686
- installed version back from the Host's state files. The Host owns what is
687
- installed. Agent Depot owns the selection record and the receipt for what it
688
- delegated. A bundle's own Skills are never offered for adoption or installed a
689
- second time, because the Host owns their files and locations.
701
+ runs them through the no-shell command runner after approval, and reads installed
702
+ state from Host-owned files. Agent Depot reads those files and never writes them.
703
+ For Pi, the `packages` setting in `~/.pi/agent/settings.json` identifies a
704
+ configured package. Agent Depot then verifies the checkout under
705
+ `$PI_CODING_AGENT_DIR/git` (or `~/.pi/agent/git` when unset): the checkout root,
706
+ `origin`, `HEAD` commit, and `package.json` at that commit. If the root, origin, or
707
+ `HEAD` cannot be verified, the package remains installed but its version is
708
+ unavailable. If local changes make the checkout dirty, Agent Depot still displays
709
+ the version from `HEAD` but withholds the commit, so Updates reports `cannot assess`.
710
+ Installations and `package inspect` mark that label as `(HEAD; local changes)`.
711
+ Tracked and untracked changes both count; Agent Depot does not ignore lockfiles or
712
+ other local files. A manifest version is display evidence, not proof that the
713
+ checkout matches the selected Source. Update assessment compares a clean checkout's
714
+ commit with the available Source commit using ancestry in the cached Source history.
715
+ For Claude, Agent Depot reads the plugin and marketplace state files. The Host owns
716
+ what is installed. Agent Depot owns the selection record and the receipt for what it
717
+ delegated. While a Package is selected or confirmed
718
+ installed, its declared Skills cannot be adopted or installed separately. A
719
+ discovered descriptor alone does not reserve its Skills.
690
720
 
691
721
  ### Add a Source and discover its bundles
692
722
 
@@ -767,7 +797,12 @@ evidence Agent Depot recorded. Live evidence comes from
767
797
  `~/.pi/agent/settings.json` and `~/.claude/plugins/installed_plugins.json`, which
768
798
  Agent Depot reads and never writes. A missing Host file is an empty view. A
769
799
  drifted or undecodable file leaves the affected lookup `unknown` and never throws.
770
- An unversioned Pi git package is reported as `unknown`, never as `current`.
800
+ A Pi git package with no version in its manifest can still have verified commit
801
+ evidence. If Agent Depot verifies the checkout identity but finds local changes, it
802
+ can display the manifest version from `HEAD` but cannot use that checkout for update
803
+ comparison. If it cannot verify the checkout root, origin, or `HEAD`, the installed
804
+ version is unavailable. In either case, the update status is `cannot assess`, not
805
+ `current`.
771
806
 
772
807
  An update records a new version only when the Host state changed in a way Agent
773
808
  Depot can verify, meaning the two observations agree on a version or a
@@ -793,8 +828,14 @@ and leaves the Host install as it is.
793
828
  fixed pin for a Pi selection, until a supported Claude pin form is verified.
794
829
  - A Claude plugin with no in-repo marketplace binding is reported but not
795
830
  installable.
796
- - Agent Depot does not read Host CLI prose output, including `pi list`. Installed
797
- evidence comes from the Host state files only.
831
+ - Agent Depot does not use Host CLI prose output, including `pi list`, as
832
+ installed-state evidence. For Pi, it combines the read-only settings entry with
833
+ verified checkout evidence. For Claude, it reads Host state files. Agent Depot
834
+ never writes those Host files.
835
+
836
+ ## Pi agents panel
837
+
838
+ Agent Depot also contains a Pi extension with an `/agents` panel. It displays agent status, activity and measured usage from a connected provider, placing running agents first and newer agents before older ones. This is a Package, not a Skill or App. Installing it alongside pstack requires the coordinated snapshot adapter to avoid duplicate `/agents` commands; without a provider, it reports unavailable data. See [installation and provider details](docs/pi-agents-panel.md).
798
839
 
799
840
  ## Export a user-global Profile
800
841
 
package/dist/src/cli.js CHANGED
@@ -20,6 +20,7 @@ import { executeHostAddition, executeHostRemoval, planHostAddition, planHostRemo
20
20
  import { executeSkillRemoval, inspectSkillRemovals, planSkillRemoval, describeSkillRemoval, recheckSkillRemoval, removeSkillFiles, removeSkillsAndRecords, selectUserGlobalSkills, SkillSelectionError, userGlobalRemovalOptions, } from "./skill-removal.js";
21
21
  import { defaultProjectSkillTreeAccess, executeOrRejectMethod, executeSingleInstall, externalMethodFailure, isValidFixedVersion, findSource, installOne, outputInstallationResult, outputInstallPreview, outputSingleInstallPreview, planSingleInstall, refreshResolvedSource, rejectInstallationCollision, resolveSelection, rollbackTransactions, } from "./skill-install.js";
22
22
  import { CliUsageError } from "./usage-error.js";
23
+ import { createSelfUpdateOperations } from "./self-update.js";
23
24
  import { selectionWithInstallation } from "./skill-update.js";
24
25
  import { applyConfirmedUpdates, describeUpdatePreview, findPathConfirmationProblem, loadUpdates, previewUpdateCandidates } from "./update-flow.js";
25
26
  import { assertNoOverlappingUserGlobalSkillRemovals, inspectUserGlobalSkillRemoval, scanUserGlobalSkillInventory, } from "./user-global-skill-inventory.js";
@@ -36,6 +37,7 @@ const USAGE = [
36
37
  " agent-depot update check --scope <project|user-global> [--package <selection>...]",
37
38
  " agent-depot update apply --scope <project|user-global> (--all | --skill <id|path>... | --app <name>... | --package <selection>...) [--yes] [--confirm-path <relative-path>...]",
38
39
  " Apps and Packages run after Skills; --all --scope project skips Apps and Packages.",
40
+ " agent-depot self update [--yes] (npm global installations only; otherwise prints manual guidance)",
39
41
  " agent-depot skill remove <id|path>... [--yes]",
40
42
  " agent-depot skill remove <id|path> --host <host>... [--yes]",
41
43
  " agent-depot skill host add <id|path> --host <host>... [--yes] [--confirm-additional-host]",
@@ -96,6 +98,11 @@ const COMMANDS = new Map([
96
98
  return 0;
97
99
  }],
98
100
  ["update", (values, { operations, dependencies, output }) => runUpdate(values, operations, dependencies, output)],
101
+ ["self", async (values, { dependencies, output }) => {
102
+ if (values[0] !== "update")
103
+ throw new CliUsageError("Usage: agent-depot self update [--yes]");
104
+ return runSelfUpdate(values.slice(1), dependencies, output);
105
+ }],
99
106
  ["skill", async (values, { operations, dependencies, output }) => {
100
107
  if (values[0] === "remove") {
101
108
  await runSkillRemoval(values.slice(1), operations, dependencies, output);
@@ -698,6 +705,54 @@ async function runUninstall(argv, operations, dependencies, output) {
698
705
  }
699
706
  outputUninstallSummary(options, selectedInstallations.length, output);
700
707
  }
708
+ function selfUpdateOperationsFor(dependencies) {
709
+ if (dependencies.selfUpdateOperations !== undefined)
710
+ return dependencies.selfUpdateOperations;
711
+ if (AGENT_DEPOT_PACKAGE_NAME === undefined || AGENT_DEPOT_PACKAGE_VERSION === undefined) {
712
+ throw new Error("Unable to determine the Agent Depot package name and version");
713
+ }
714
+ return createSelfUpdateOperations({
715
+ packageName: AGENT_DEPOT_PACKAGE_NAME,
716
+ packageVersion: AGENT_DEPOT_PACKAGE_VERSION,
717
+ packageRoot: path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../.."),
718
+ });
719
+ }
720
+ async function runSelfUpdate(argv, dependencies, output) {
721
+ if (argv.length > 1 || (argv.length === 1 && argv[0] !== "--yes")) {
722
+ throw new CliUsageError("Usage: agent-depot self update [--yes]");
723
+ }
724
+ const confirmed = argv[0] === "--yes";
725
+ const selfUpdate = selfUpdateOperationsFor(dependencies);
726
+ const status = await selfUpdate.check();
727
+ switch (status.kind) {
728
+ case "unsupported":
729
+ output(`Self-update is unavailable: ${status.reason}`);
730
+ output("For a persistent global installation, use the package manager that installed it:");
731
+ output(` npm install --global ${AGENT_DEPOT_PACKAGE_NAME ?? "@iseoane/agent-depot"}@latest`);
732
+ output(` pnpm add --global ${AGENT_DEPOT_PACKAGE_NAME ?? "@iseoane/agent-depot"}@latest`);
733
+ output("For a one-off run, use:");
734
+ output(` npx ${AGENT_DEPOT_PACKAGE_NAME ?? "@iseoane/agent-depot"}@latest tui`);
735
+ return 0;
736
+ case "current":
737
+ output(`Agent Depot ${status.current} is current`);
738
+ return 0;
739
+ case "ahead":
740
+ output(`Agent Depot ${status.current} is newer than npm's latest ${status.latest}; refusing to downgrade`);
741
+ return 0;
742
+ case "available":
743
+ output(`Preview: update Agent Depot from ${status.current} to ${status.latest}`);
744
+ output(` command: npm install --global --no-audit --no-fund --no-update-notifier --logs-max=0 --ignore-scripts --registry=https://registry.npmjs.org/ ${AGENT_DEPOT_PACKAGE_NAME ?? "@iseoane/agent-depot"}@${status.latest}`);
745
+ output(" npm package scripts will not run; no elevated privileges will be requested");
746
+ requireConfirmation(confirmed, "Self-update not confirmed; rerun with --yes after reviewing the preview");
747
+ await selfUpdate.apply(status.latest);
748
+ output(`Updated Agent Depot to ${status.latest}; restart the CLI to use the new version`);
749
+ return 0;
750
+ default: {
751
+ const _exhaustive = status;
752
+ return _exhaustive;
753
+ }
754
+ }
755
+ }
701
756
  async function runUpdate(argv, operations, dependencies, output) {
702
757
  const options = parseUpdateOptions(argv);
703
758
  const apps = dependencies.appOperations ?? createAppOperations({ homeDirectory: dependencies.homeDirectory });
@@ -383,7 +383,8 @@ function describeEvidence(evidence) {
383
383
  switch (evidence.kind) {
384
384
  case "installed": {
385
385
  if (evidence.version !== undefined) {
386
- return `installed ${evidence.version}`;
386
+ const qualifier = evidence.reason === undefined ? "" : " (HEAD; local changes)";
387
+ return `installed ${evidence.version}${qualifier}`;
387
388
  }
388
389
  if (evidence.commit !== undefined) {
389
390
  return `installed commit ${evidence.commit}`;
@@ -581,7 +581,7 @@ function pinContradiction(selection, observed) {
581
581
  * cannot be attested leaves the field absent.
582
582
  */
583
583
  function verifiedEvidence(observed, available) {
584
- if (observed.kind !== "installed") {
584
+ if (observed.kind !== "installed" || observed.reason !== undefined) {
585
585
  return undefined;
586
586
  }
587
587
  if (observed.commit !== undefined) {
@@ -138,7 +138,7 @@ function findPiInstalled(section, selection) {
138
138
  return unknownEvidence("Pi project-scoped and subdirectory package checkouts are not supported for version evidence");
139
139
  }
140
140
  if (match.checkoutIssue !== undefined) {
141
- return installedEvidence(undefined, undefined, match.checkoutIssue);
141
+ return installedEvidence(match.checkoutVersion, undefined, match.checkoutIssue);
142
142
  }
143
143
  if (match.checkoutCommit === undefined) {
144
144
  return installedEvidence(undefined, undefined, `Pi reports this Package installed, but its checkout could not be verified. Version and update assessment are unavailable; inspect the configured checkout before updating.`);
@@ -254,13 +254,17 @@ async function readPiCheckoutEvidence(checkoutPath, sourceIdentity) {
254
254
  }
255
255
  if (!/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/iu.test(commit))
256
256
  return unavailable("the Pi checkout HEAD is not a full Git commit");
257
- if (status !== "")
258
- return unavailable("the Pi Git checkout has local modifications");
259
257
  const packageJson = JSON.parse(manifest);
260
- if (!isRecord(packageJson) || typeof packageJson.version !== "string" || packageJson.version.trim() === "") {
261
- return { commit: commit.toLowerCase() };
258
+ const version = isRecord(packageJson) && typeof packageJson.version === "string" && packageJson.version.trim() !== ""
259
+ ? packageJson.version
260
+ : undefined;
261
+ if (status !== "") {
262
+ return {
263
+ ...(version === undefined ? {} : { version }),
264
+ issue: `Pi reports this Package installed, but the Pi Git checkout has local modifications. Update assessment is unavailable; inspect the checkout before updating.`,
265
+ };
262
266
  }
263
- return { commit: commit.toLowerCase(), version: packageJson.version };
267
+ return { commit: commit.toLowerCase(), ...(version === undefined ? {} : { version }) };
264
268
  }
265
269
  catch (error) {
266
270
  const message = error instanceof Error ? error.message : "";