@abelxiaoxing/cadence 2.0.35 → 2.0.37

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.
Files changed (40) hide show
  1. package/README.de.md +4 -4
  2. package/README.es.md +4 -4
  3. package/README.fr.md +4 -4
  4. package/README.ja.md +3 -4
  5. package/README.ko.md +4 -4
  6. package/README.md +4 -4
  7. package/README.pt-BR.md +4 -4
  8. package/README.ru.md +5 -4
  9. package/README.zh-CN.md +4 -4
  10. package/THIRD_PARTY_NOTICES.md +9 -1
  11. package/docs/conversation-mode.md +21 -2
  12. package/docs/reuse-and-distribution.md +1 -1
  13. package/docs/service-management.md +35 -9
  14. package/package.json +18 -18
  15. package/src/abort-scope.ts +47 -0
  16. package/src/agent-browser/labeled-rule.ts +74 -0
  17. package/src/agent-browser/session-navigator.ts +187 -0
  18. package/src/agent-browser/source.ts +170 -0
  19. package/src/agent-browser/transcript-content.ts +442 -0
  20. package/src/agent-browser/transcript-pane.ts +324 -0
  21. package/src/agent-panel-model.ts +4 -248
  22. package/src/agent-panel.ts +138 -432
  23. package/src/coordinator-tools.mjs +42 -14
  24. package/src/image-content.mjs +7 -28
  25. package/src/native-build.ts +1 -1
  26. package/src/research-scan.mjs +393 -0
  27. package/src/research-tools.mjs +406 -342
  28. package/src/sdk-worker.mjs +40 -55
  29. package/src/service/contracts/core.ts +0 -1
  30. package/src/service/contracts/workbench.ts +10 -16
  31. package/src/service-cli.mjs +328 -106
  32. package/src/service-host.mjs +545 -404
  33. package/src/service-http-client.ts +55 -50
  34. package/src/worker-public.mjs +1 -2
  35. package/src/worker-toolkit.mjs +110 -0
  36. package/src/worker-workspace.d.mts +13 -0
  37. package/src/worker-workspace.mjs +48 -0
  38. package/web/dist/assets/cadence.css +1 -1
  39. package/web/dist/assets/cadence.js +17 -17
  40. package/web/dist/manifest.json +7 -7
package/README.de.md CHANGED
@@ -90,7 +90,7 @@ Ihre tatsächlichen Ergebnisse bleiben von der automatischen Agent-Prüfung getr
90
90
  ```sh
91
91
  cadence server status
92
92
  cadence server restart # nach einem Upgrade oder einer .env / models.json-Änderung
93
- cadence server upgrade # npm-Globalinstallation: laden, installieren, neu starten
93
+ cadence server upgrade
94
94
  cadence server stop # bleibt registriert und startet beim nächsten Boot oder Login erneut
95
95
  cadence server uninstall # vor npm uninstall -g ausführen
96
96
  ```
@@ -103,16 +103,16 @@ Linux-Root- und benannte Dienste, entfernter HTTPS-Zugang und Wiederherstellung
103
103
  ## Entwicklung
104
104
 
105
105
  Pi kann auch ein lokales Checkout oder ein gepacktes Tarball laden: Füge seinen absoluten oder relativen Pfad zu Pís `packages` hinzu, oder versuche `pi -e ./cadence`.
106
- Cadence erzwingt keinen Pi-Versionsbereich; Entwicklungs-Pins und getestete Laufzeiten sind keine universellen Kompatibilitätsversprechen.
106
+ Cadence benötigt Pi 1.5.0 oder einen kompatiblen 1.x-Host; Entwicklungs-Pins und getestete Laufzeiten sind keine universellen Kompatibilitätsversprechen.
107
107
 
108
108
  ```sh
109
109
  bun install
110
110
  bun run verify
111
- CADENCE_BROWSER_PATH=/absolute/existing/chromium bun run verify:full
112
111
  ```
113
112
 
114
113
  Engineering-Anleitungen sind unter [engineering/](engineering/) nach Bereich aufgeteilt; der Projektindex in [AGENTS.md](AGENTS.md) sagt, welche Datei welchen Code abdeckt.
115
- `verify` benötigt außerdem einen offiziellen Node-Build und ein privates temporäres Verzeichnis; `verify:full` ergänzt die langsamen Tests und Browserszenarien, die ein vorhandenes Chromium brauchen; siehe [Verifikation](engineering/verification.md).
114
+ `verify` ist die einzige Prüfung für Entwicklung und Releases: nur schnelle Checks, ohne Browser.
115
+ Erforderlich sind ein offizieller Node-Build und ein privates temporäres Verzeichnis; siehe [Verifikation](engineering/verification.md).
116
116
 
117
117
  ## Lizenz
118
118
 
package/README.es.md CHANGED
@@ -90,7 +90,7 @@ Sus resultados reales se mantienen separados de la revisión automática del age
90
90
  ```sh
91
91
  cadence server status
92
92
  cadence server restart # después de una actualización o un cambio de .env / models.json
93
- cadence server upgrade # instalación global de npm: descargar, instalar y reiniciar
93
+ cadence server upgrade
94
94
  cadence server stop # permanece registrado y vuelve a iniciar en el próximo arranque o inicio de sesión
95
95
  cadence server uninstall # ejecutar antes de npm uninstall -g
96
96
  ```
@@ -103,16 +103,16 @@ Los servicios raíz de Linux y con nombre, el acceso HTTPS remoto y la recuperac
103
103
  ## Desarrollo
104
104
 
105
105
  Pi también puede cargar un checkout local o un tarball empaquetado: añade su ruta absoluta o relativa a `packages` de Pi, o prueba `pi -e ./cadence`.
106
- Cadence no impone un rango de versiones de Pi; los pines de desarrollo y los tiempos de ejecución probados no son promesas de compatibilidad universales.
106
+ Cadence requiere Pi 1.5.0 o un host 1.x compatible; los pines de desarrollo y los tiempos de ejecución probados no son promesas de compatibilidad universales.
107
107
 
108
108
  ```sh
109
109
  bun install
110
110
  bun run verify
111
- CADENCE_BROWSER_PATH=/absolute/existing/chromium bun run verify:full
112
111
  ```
113
112
 
114
113
  La guía de ingeniería se divide por área bajo [engineering/](engineering/); el índice del proyecto en [AGENTS.md](AGENTS.md) indica qué archivo cubre qué código.
115
- `verify` también necesita un build oficial de Node y un directorio temporal privado; `verify:full` añade las pruebas lentas y los escenarios de navegador, que necesitan un Chromium existente; ver [verificación](engineering/verification.md).
114
+ `verify` es la única verificación para desarrollo y publicación: solo comprobaciones rápidas, sin navegador.
115
+ Requiere un build oficial de Node y un directorio temporal privado; ver [verificación](engineering/verification.md).
116
116
 
117
117
  ## Licencia
118
118
 
package/README.fr.md CHANGED
@@ -90,7 +90,7 @@ Leurs résultats restent distincts de la revue automatique par un Agent.
90
90
  ```sh
91
91
  cadence server status
92
92
  cadence server restart # après une mise à niveau ou un changement de .env / models.json
93
- cadence server upgrade # installation npm globale : télécharger, installer, redémarrer
93
+ cadence server upgrade
94
94
  cadence server stop # reste enregistré et redémarre au prochain boot ou connexion
95
95
  cadence server uninstall # à exécuter avant npm uninstall -g
96
96
  ```
@@ -103,16 +103,16 @@ Les services racine Linux et nommés, l'accès HTTPS distant et la récupératio
103
103
  ## Développement
104
104
 
105
105
  Pi peut aussi charger un checkout local ou une archive tarball packagée : ajoutez son chemin absolu ou relatif aux `packages` de Pi, ou essayez `pi -e ./cadence`.
106
- Cadence n'impose pas de plage de versions de Pi ; les versions figées de développement et les temps d'exécution testés ne sont pas des promesses de compatibilité universelles.
106
+ Cadence nécessite Pi 1.5.0 ou un hôte 1.x compatible ; les versions figées de développement et les temps d'exécution testés ne sont pas des promesses de compatibilité universelles.
107
107
 
108
108
  ```sh
109
109
  bun install
110
110
  bun run verify
111
- CADENCE_BROWSER_PATH=/absolute/existing/chromium bun run verify:full
112
111
  ```
113
112
 
114
113
  Les conseils d'ingénierie sont répartis par domaine sous [engineering/](engineering/) ; l'index du projet dans [AGENTS.md](AGENTS.md) indique quel fichier couvre quel code.
115
- `verify` nécessite aussi un build Node officiel et un répertoire temporaire privé ; `verify:full` ajoute les tests lents et les scénarios navigateur, qui nécessitent un Chromium existant ; voir [vérification](engineering/verification.md).
114
+ `verify` est la seule validation pour le développement et les publications : uniquement des vérifications rapides, sans navigateur.
115
+ Elle nécessite un build Node officiel et un répertoire temporaire privé ; voir [vérification](engineering/verification.md).
116
116
 
117
117
  ## Licence
118
118
 
package/README.ja.md CHANGED
@@ -105,7 +105,7 @@ WebUI のフォルダピッカーも同じ方法でプロジェクトを開く
105
105
  ```sh
106
106
  cadence server status
107
107
  cadence server restart # アップグレードや .env / models.json の変更後
108
- cadence server upgrade # npm グローバルインストール: 取得、インストール、再起動
108
+ cadence server upgrade
109
109
  cadence server stop # 登録は保持され、次の起動またはログイン時に再び起動する
110
110
  cadence server uninstall # npm uninstall -g の前に実行
111
111
  ```
@@ -121,19 +121,18 @@ Linux ルートおよび名前付きサービス、リモート HTTPS アクセ
121
121
 
122
122
  Pi はローカル checkout やパックされた tarball も読み込める。
123
123
  その絶対または相対パスを Pi の `packages` に追加するか、`pi -e ./cadence` を試す。
124
- Cadence は Pi のバージョン範囲を強制しない。
124
+ Cadence には Pi 1.5.0 または互換性のある 1.x ホストが必要。
125
125
  開発用のピンとテスト済みのランタイムは、普遍的な互換性の約束ではない。
126
126
 
127
127
  ```sh
128
128
  bun install
129
129
  bun run verify
130
- CADENCE_BROWSER_PATH=/absolute/existing/chromium bun run verify:full
131
130
  ```
132
131
 
133
132
  エンジニアリングのガイダンスは [engineering/](engineering/) 下に領域ごとに分割されている。
134
133
  [AGENTS.md](AGENTS.md) のプロジェクト索引がどのファイルがどのコードをカバーするかを示す。
135
134
  `verify` には公式 Node ビルドとプライベートな一時ディレクトリが必要。
136
- 低速テストとブラウザシナリオを加える `verify:full` には既存の Chromium も必要。
135
+ `verify` は開発とリリース共通の唯一の検証コマンドで、高速なチェックのみを実行し、ブラウザは不要。
137
136
  [検証](engineering/verification.md)を参照。
138
137
 
139
138
  ## ライセンス
package/README.ko.md CHANGED
@@ -102,7 +102,7 @@ WebUI 폴더 선택기도 같은 방법으로 프로젝트를 엽니다.
102
102
  ```sh
103
103
  cadence server status
104
104
  cadence server restart # 업그레이드나 .env / models.json 변경 후
105
- cadence server upgrade # npm 전역 설치: 받기, 설치, 재시작
105
+ cadence server upgrade
106
106
  cadence server stop # 등록은 유지되고 다음 부팅 또는 로그인 시 다시 시작
107
107
  cadence server uninstall # npm uninstall -g 전에 실행
108
108
  ```
@@ -118,18 +118,18 @@ Linux 루트 및 이름 지정 서비스, 원격 HTTPS 액세스, 복구에는 [
118
118
 
119
119
  Pi는 로컬 체크아웃이나 패킹된 tarball도 로드할 수 있습니다.
120
120
  그 절대 또는 상대 경로를 Pi의 `packages`에 추가하거나, `pi -e ./cadence`를 시도하세요.
121
- Cadence는 Pi 버전 범위를 강제하지 않습니다.
121
+ Cadence는 Pi 1.5.0 또는 호환되는 1.x 호스트가 필요합니다.
122
122
  개발 고정 버전과 테스트된 런타임은 보편적인 호환성 약속이 아닙니다.
123
123
 
124
124
  ```sh
125
125
  bun install
126
126
  bun run verify
127
- CADENCE_BROWSER_PATH=/absolute/existing/chromium bun run verify:full
128
127
  ```
129
128
 
130
129
  엔지니어링 지침은 [engineering/](engineering/) 아래 영역별로 나뉘어 있습니다.
131
130
  [AGENTS.md](AGENTS.md)의 프로젝트 인덱스가 어느 파일이 어느 코드를 다루는지 설명합니다.
132
- `verify`에는 공식 Node 빌드와 개인 임시 디렉터리가 필요하고, 느린 테스트와 브라우저 시나리오를 더하는 `verify:full`에는 기존 Chromium도 필요합니다.
131
+ `verify`는 개발과 릴리스에 사용하는 유일한 검증 명령으로, 빠른 검사만 실행하며 브라우저가 필요하지 않습니다.
132
+ 공식 Node 빌드와 개인 임시 디렉터리가 필요합니다.
133
133
  [검증](engineering/verification.md)을 참조하세요.
134
134
 
135
135
  ## 라이선스
package/README.md CHANGED
@@ -92,7 +92,7 @@ Their actual outcomes remain separate from automatic Agent review.
92
92
  ```sh
93
93
  cadence server status
94
94
  cadence server restart # after an upgrade or a .env / models.json change
95
- cadence server upgrade # npm global install: fetch, install and restart
95
+ cadence server upgrade # detected Pi/npm/Bun install: fetch, install and restart
96
96
  cadence server stop # stays registered and starts again at the next boot or login
97
97
  cadence server uninstall # run before npm uninstall -g
98
98
  cadence doctor # what is left over or recently recovered; --fix for the rest
@@ -108,16 +108,16 @@ Linux root and named services, remote HTTPS access and automatic recovery are co
108
108
  ## Development
109
109
 
110
110
  Pi can also load a local checkout or packed tarball: add its absolute or relative path to Pi's `packages`, or try `pi -e ./cadence`.
111
- Cadence does not impose a Pi version range; development pins and tested runtimes are not universal compatibility promises.
111
+ Cadence requires Pi 1.5.0 or a compatible 1.x host; development pins and tested runtimes are not universal compatibility promises.
112
112
 
113
113
  ```sh
114
114
  bun install
115
115
  bun run verify
116
- CADENCE_BROWSER_PATH=/absolute/existing/chromium bun run verify:full
117
116
  ```
118
117
 
119
118
  Engineering guidance is split by area under [engineering/](engineering/); the project index in [AGENTS.md](AGENTS.md) says which file covers which code.
120
- `verify` also needs an official Node build and a private temporary directory; `verify:full` adds the slow tests and browser scenarios, which need an existing Chromium; see [verification](engineering/verification.md).
119
+ `verify` is the single development and release gate: fast checks only, with no browser requirement.
120
+ It needs an official Node build and a private temporary directory; see [verification](engineering/verification.md).
121
121
 
122
122
  ## License
123
123
 
package/README.pt-BR.md CHANGED
@@ -90,7 +90,7 @@ Os resultados reais permanecem separados da revisão automática do agente.
90
90
  ```sh
91
91
  cadence server status
92
92
  cadence server restart # após um upgrade ou uma alteração de .env / models.json
93
- cadence server upgrade # instalação global do npm: baixar, instalar e reiniciar
93
+ cadence server upgrade
94
94
  cadence server stop # permanece registrado e inicia de novo no próximo boot ou login
95
95
  cadence server uninstall # executar antes de npm uninstall -g
96
96
  ```
@@ -103,16 +103,16 @@ Serviços root e nomeados do Linux, acesso HTTPS remoto e recuperação estão c
103
103
  ## Desenvolvimento
104
104
 
105
105
  O Pi também pode carregar um checkout local ou um tarball empacotado: adicione seu caminho absoluto ou relativo aos `packages` do Pi, ou experimente `pi -e ./cadence`.
106
- O Cadence não impõe uma faixa de versões do Pi; fixações de desenvolvimento e tempos de execução testados não são promessas universais de compatibilidade.
106
+ O Cadence requer Pi 1.5.0 ou um host 1.x compatível; fixações de desenvolvimento e tempos de execução testados não são promessas universais de compatibilidade.
107
107
 
108
108
  ```sh
109
109
  bun install
110
110
  bun run verify
111
- CADENCE_BROWSER_PATH=/absolute/existing/chromium bun run verify:full
112
111
  ```
113
112
 
114
113
  As orientações de engenharia são divididas por área sob [engineering/](engineering/); o índice do projeto em [AGENTS.md](AGENTS.md) diz qual arquivo cobre qual código.
115
- `verify` também precisa de um build oficial do Node e de um diretório temporário privado; `verify:full` acrescenta os testes lentos e os cenários de navegador, que precisam de um Chromium existente; veja [verificação](engineering/verification.md).
114
+ `verify` é a única verificação para desenvolvimento e publicação: apenas verificações rápidas, sem navegador.
115
+ Exige um build oficial do Node e um diretório temporário privado; veja [verificação](engineering/verification.md).
116
116
 
117
117
  ## Licença
118
118
 
package/README.ru.md CHANGED
@@ -90,7 +90,7 @@ cadence project open /absolute/new-project --create
90
90
  ```sh
91
91
  cadence server status
92
92
  cadence server restart # после обновления или изменения .env / models.json
93
- cadence server upgrade # глобальная установка npm: загрузить, установить, перезапустить
93
+ cadence server upgrade
94
94
  cadence server stop # остаётся зарегистрированной и снова запускается при следующей загрузке или входе
95
95
  cadence server uninstall # выполнить перед npm uninstall -g
96
96
  ```
@@ -103,17 +103,18 @@ Uninstall удаляет только определение службы; пр
103
103
  ## Разработка
104
104
 
105
105
  Pi также может загрузить локальный checkout или упакованный tarball: добавьте его абсолютный или относительный путь в `packages` Pi, или попробуйте `pi -e ./cadence`.
106
- Cadence не налагает диапазон версий Pi; фиксированные версии разработки и протестированные среды выполнения не являются универсальными обещаниями совместимости.
106
+ Cadence требует Pi 1.5.0 или совместимый хост 1.x; фиксированные версии разработки и протестированные среды выполнения не являются универсальными обещаниями совместимости.
107
107
 
108
108
  ```sh
109
109
  bun install
110
110
  bun run verify
111
- CADENCE_BROWSER_PATH=/absolute/existing/chromium bun run verify:full
112
111
  ```
113
112
 
114
113
  Инженерные указания разделены по областям в [engineering/](engineering/).
115
114
  Индекс проекта в [AGENTS.md](AGENTS.md) указывает, какой файл покрывает какой код.
116
- `verify` также требует официальной сборки Node и приватного временного каталога; `verify:full` добавляет медленные тесты и браузерные сценарии, которым нужен существующий Chromium, подробности — в [верификация](engineering/verification.md).
115
+ `verify` — единственная проверка для разработки и публикации: только быстрые проверки, без браузера.
116
+ Нужны официальная сборка Node и приватный временный каталог; см.
117
+ [проверки](engineering/verification.md).
117
118
 
118
119
  ## Лицензия
119
120
 
package/README.zh-CN.md CHANGED
@@ -90,7 +90,7 @@ cadence project open /absolute/new-project --create
90
90
  ```sh
91
91
  cadence server status
92
92
  cadence server restart # 升级或修改 .env / models.json 之后
93
- cadence server upgrade # npm 全局安装:下载、安装并重启
93
+ cadence server upgrade # 识别 Pi/npm/Bun 安装:下载、安装并重启
94
94
  cadence server stop # 保持注册状态,并在下次启动或登录时再次启动
95
95
  cadence server uninstall # 在 npm uninstall -g 之前运行
96
96
  ```
@@ -103,16 +103,16 @@ Linux root 与命名服务、远程 HTTPS 访问和恢复见[服务管理](docs/
103
103
  ## 开发
104
104
 
105
105
  Pi 也可以加载本地 checkout 或打包的 tarball:把其绝对或相对路径加到 Pi 的 `packages`,或试试 `pi -e ./cadence`。
106
- Cadence 不指定 Pi 版本范围;开发用的固定版本和已测试运行时不是通用的兼容性承诺。
106
+ Cadence 要求 Pi 1.5.0 或兼容的 1.x 宿主;开发用的固定版本和已测试运行时不是通用的兼容性承诺。
107
107
 
108
108
  ```sh
109
109
  bun install
110
110
  bun run verify
111
- CADENCE_BROWSER_PATH=/absolute/existing/chromium bun run verify:full
112
111
  ```
113
112
 
114
113
  工程指导按领域拆分在 [engineering/](engineering/) 下;[AGENTS.md](AGENTS.md) 中的项目索引说明了哪个文件覆盖哪部分代码。
115
- `verify` 还需要官方 Node 构建和私有临时目录;`verify:full` 另外运行慢速测试和浏览器场景,需要已有的 Chromium;见[验证](engineering/verification.md)。
114
+ `verify` 是开发和发布共用的唯一验证入口:只运行快速检查,不需要浏览器。
115
+ 需要官方 Node 构建和私有临时目录;见[验证](engineering/verification.md)。
116
116
 
117
117
  ## 许可证
118
118
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  This package adapts narrow lifecycle evidence from the reviewed reference repository `gotgenes/pi-packages` (MIT), commit `a1ee2255b81cb540f88d233112e868ca91fe7846`, package `packages/pi-subagents`.
4
4
  Only FIFO settlement, cancellation cleanup, legal state transitions, and born-complete session disposal invariants informed this implementation.
5
- The adapted invariants are re-expressed in this package's own code and tests; no reference code is shipped verbatim.
5
+ The adapted invariants are re-expressed in this package's own code and tests; that historical adaptation shipped no reference code verbatim.
6
6
 
7
7
  The complete MIT license text of the referenced package is bundled at `licenses/pi-subagents-MIT.txt`.
8
8
 
@@ -11,6 +11,14 @@ The complete MIT license text of the referenced package is bundled at `licenses/
11
11
  | FIFO settlement of queued work | gotgenes/pi-packages @ a1ee2255 | packages/pi-subagents (state/queue semantics) |
12
12
  | Cancellation cleanup and born-complete disposal | gotgenes/pi-packages @ a1ee2255 | packages/pi-subagents (session lifecycle) |
13
13
 
14
+ ## Native agent session browser
15
+
16
+ `src/agent-browser/session-navigator.ts`, `transcript-pane.ts`, `transcript-content.ts` and `labeled-rule.ts` adapt the readonly session browser from `gotgenes/pi-packages`, commit `52854c12d590142e61a4f6a6947be9084035300d`, `packages/pi-subagents/src/ui/{session-navigator,transcript-content,labeled-rule}.ts` (MIT).
17
+ The browser's transcript pane, per-message renderer, incremental content cache, paging/follow behavior and labeled chrome are reused code, not merely UI inspiration.
18
+ Cadence replaces upstream agent/file sourcing with its existing readonly event feed and supplies a live Pi list with stable selection and per-agent reading positions.
19
+ No upstream executor, manager, steering, stopping or persisted-run reader is included.
20
+ `provenance/agent-browser-reuse.json` records exact source hashes, local paths and adaptations; the complete upstream MIT license is preserved in `licenses/pi-subagents-MIT.txt`.
21
+
14
22
  ## Bundled browser dependencies, icons and fonts
15
23
 
16
24
  `licenses/bundled-web.txt` preserves the full actual emitted dependency notices, including React/DOM/scheduler, react-icons and Feather, unified/Markdown/HTML utilities, highlight.js, KaTeX and vis-timeline's embedded vendor versions.
@@ -32,11 +32,30 @@ Opening a different conversation does not enable Cadence there.
32
32
  Restore never replays a command or automatically resumes an interrupted queue.
33
33
  When an observation reply is lost, ask for status; do not infer that the action was absent.
34
34
 
35
+ ## Resume a sent conversation on another device
36
+
37
+ Open the same authenticated workbench on the other device with the **complete conversation link**: `/app?project=<project-key>#chat=<session-id>`.
38
+ The project and chat identities in that link select the same server-held conversation even with empty or blocked browser storage.
39
+ Its sent history, Cadence mode, working directory, model preference and linked work come from the service, not from the first device's pending-send display.
40
+ A link grants neither access nor plan approval: authenticate normally and make any new execution confirmation explicitly.
41
+ Without that complete link, the other browser is not promised an automatic return to the first browser's last conversation.
42
+
43
+ Opening the link only observes; browsing never prepares or starts the project's execution service.
44
+ Only an explicit **Send** may prepare it on demand.
45
+ Leaving, closing or disconnecting a viewer does not cancel accepted work; reconnecting does not resend a message, resume an interrupted queue or inherit approval.
46
+ A stale or unavailable observation keeps readable history but cannot establish that work stopped; distinguish connection freshness from the workflow's last observed status.
47
+
48
+ Unsent text and images are not synchronized across devices.
49
+ Text drafts are local to that browser session when storage is available; images remain local to the tab.
50
+ A preparation failure keeps the local draft and explains whether preparation was never dispatched, is unconfirmed, or was confirmed before a later wait failed.
51
+ An uncertain final Send keeps its original command identity for observation only: do not send it again merely because its reply was lost.
52
+
35
53
  ## Images in the WebUI
36
54
 
37
55
  Use **Add images**, paste a screenshot, or drop image files onto the composer.
38
56
  Preview and remove images before Send; a message can contain images without text.
39
- PNG, JPEG and WebP are supported; the composer shows the current count and size limits.
57
+ PNG, JPEG and WebP are supported.
58
+ Cadence imposes no image count or size limit; available browser/host memory and the selected model provider still constrain what can be sent.
40
59
  Choose a model whose catalog supports image input.
41
60
  An incompatible model refuses the message rather than dropping its images.
42
61
  Ordinary and Cadence conversations use the same image input.
@@ -47,7 +66,7 @@ Only Send uploads them, bound to that exact conversation, branch, model and mess
47
66
  Unsent pictures are not saved in browser storage and disappear on refresh; the text draft remains.
48
67
  After Pi records a sent image, it appears in the conversation history and remains viewable after refresh (including retained reads when the project owner is stopped).
49
68
  Click a history thumbnail to open it at full size.
50
- Unsupported or over-limit media from existing Pi sessions remains omitted; unavailable images show a notice without changing their session files.
69
+ Unsupported media from existing Pi sessions remains omitted; unavailable images show a notice without changing their session files.
51
70
  Images are private conversation content, not public download links.
52
71
  Text redaction does not sanitize words or secrets inside pixels: inspect screenshots before sending them to a model.
53
72
 
@@ -14,7 +14,7 @@ Provisioned official notice bodies were reused locally; builds never download li
14
14
  ## Runtime/package closure
15
15
 
16
16
  Only the native extension's explicit import closure, maintained SDK worker/shared JS capture modules, generated management/host/operator executables, Agents, independent skills/configuration, documentation, notices and complete built assets ship.
17
- Service/worker execution uses ordinary Node with exact production `undici` and `ws` and the Pi SDK (`pi-coding-agent`, `pi-ai`) from exact 0.84.3 optional dependencies, because Pi's installer omits peers; no source-tree or TypeScript fallback, SDK bundle or consumer compilation.
17
+ Service/worker execution uses ordinary Node with exact production `undici` and `ws` and the Pi SDK (`pi-coding-agent`, `pi-ai`) from the exact optional dependency versions in `package.json`, because Pi's installer omits peers; no source-tree or TypeScript fallback, SDK bundle or consumer compilation.
18
18
  Pi's package installer omits peers and aliases only its own packages and Typebox, so every other runtime import reachable from `src/index.ts` must be a production dependency; otherwise Pi fails to load the extension at startup.
19
19
  The retired shell-local controller is not a shipped competing executor.
20
20
 
@@ -107,7 +107,7 @@ A successful manager start request is not owner readiness: an unready owner repo
107
107
  Status also retains the manager's `active`/`activating`/`failed` observation separately.
108
108
  A definition whose project directory was removed gets a readable refusal (exit78, so the unit does not restart in a loop); `cadence server install` switches it to the workbench.
109
109
  `restart` rewrites an existing definition with the current Node and package paths, keeping its workspace and the user's disable choices, and starts it; run it after an npm upgrade, a Node change or a `models.json` edit.
110
- The `upgrade` command (Linux) installs the latest version, or exactly `--to VERSION`, with npm and restarts; see [Restart and upgrade from the WebUI](#restart-and-upgrade-from-the-webui) for its steps.
110
+ The `upgrade` command (Linux) installs the latest version, or exactly `--to VERSION`, with the detected installation's package manager and restarts; see [Restart and upgrade from the WebUI](#restart-and-upgrade-from-the-webui) for its steps.
111
111
  Commands that change the service (`install`, `restart`, `stop`, `uninstall`, `upgrade`) refuse with `inside-service` when they run inside the service they would stop, for example from a tool of its own agent: stopping a systemd unit ends every process in it, so the command would die before it started the service again.
112
112
  Use the WebUI or a terminal outside the service instead.
113
113
  `stop` joins the workbench's accepted Send preparations and associated exact-epoch project owners, then closes the entry; unrelated project owners stay independent.
@@ -123,7 +123,7 @@ The generated registration stays for the next boot or login.
123
123
  Because npm runs no uninstall script, uninstall the service before `npm uninstall -g`; a left-behind definition fails to start once its CLI path disappears.
124
124
  A definition Cadence did not generate is left unchanged (`foreign`), and `status` reports `absent` when none is registered.
125
125
 
126
- Pi's installer omits peers, so the standalone owner and workers load the Pi SDK (`pi-coding-agent`, `pi-ai`) from exact 0.84.3 optional dependencies.
126
+ Pi's installer omits peers, so the standalone owner and workers load the Pi SDK (`pi-coding-agent`, `pi-ai`) from the exact optional dependency versions in `package.json`.
127
127
  Package files may be hard links into the package manager's store (Bun's default install); Cadence binds their exact content, not their link count.
128
128
  Missing or unusable Pi sources refuse before an owner registers; an owner that cannot load the SDK refuses at stage `pi-runtime` and exits.
129
129
  The no-project workbench starts without either an SDK runtime or Pi authentication; missing sources are reported only when a project is explicitly opened.
@@ -137,7 +137,7 @@ A machine without a supported user service manager and `CADENCE_AUTOSTART=0` kee
137
137
  ### Restart and upgrade from the WebUI
138
138
 
139
139
  On Linux the workbench has a **Cadence service** dialog: the server button on the entry page, or **More → Cadence service** in a project.
140
- It shows the running version and its systemd unit, asks npm for the latest version only when you press **Check for updates**, and offers **Restart service** and **Upgrade to VERSION**.
140
+ It shows the running version and its systemd unit, shows its installation method, asks that package manager for the latest version only when you press **Check for updates**, and offers **Restart service** and **Upgrade to VERSION**.
141
141
  The confirmation names the running workflows and conversations the restart stops; they stop through the orderly Stop, never by a signal.
142
142
  If work starts or ends before you confirm, the request is refused as stale and the dialog reads the service again.
143
143
 
@@ -145,17 +145,43 @@ The request runs outside the service, in a transient unit `cadence.maintenance.s
145
145
  It runs the same `cadence server restart` or `cadence server upgrade`, then records its outcome; the page waits for that record and offers to reload.
146
146
  If it reports nothing, see `journalctl --user -u cadence.maintenance.service` (without `--user` for a system service) and `cadence server status`.
147
147
 
148
- An upgrade fetches the exact release while the service still runs, so an unreachable registry changes nothing.
149
- Then it stops the service, installs the release with `npm install --global` and starts the new copy's own `server restart`.
150
- A new version that does not become ready is replaced by the previous version again from npm's cache.
151
- The npm calls use npm's own configuration (`~/.npmrc` registry, proxy and prefix).
152
- Only a copy that `npm root --global` names, and that the service account can write, upgrades itself; the dialog says when another installation (Pi's own copy, a checkout, Bun, a root-owned prefix) has to be upgraded the way it was installed, followed by `cadence server restart`.
148
+ An upgrade fetches the exact release and previous version while the service still runs, so an unreachable registry changes nothing.
149
+ Then it stops the service, installs the release in the **same prefix with the same package manager** and starts the new copy's own `server restart`.
150
+ A failed/partial installation is replaced by the prefetched previous version, using that same manager.
151
+ After a new copy has attempted startup but has not confirmed readiness, its own orderly Stop must succeed before rollback can replace its files; an unconfirmed Stop leaves that copy untouched for diagnosis.
152
+ Readiness requires both a successful restart command exit and an alive-owner result; printed JSON alone cannot make a failed command successful.
153
+ Prefetch is not a transactional or fully offline dependency installation: a later install or rollback may still fail, and the recorded outcome keeps that failure.
154
+ No Pi settings, credentials or profiles are copied or rewritten.
155
+
156
+ Supported installations:
157
+
158
+ | Installed with | Update route |
159
+ | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
160
+ | `pi install npm:@abelxiaoxing/cadence` | The selected Pi agent directory's `npm` prefix, using npm with `--legacy-peer-deps` |
161
+ | The same Pi command with `npmCommand: ["bun"]` | That same prefix, using Bun with `--omit=peer` |
162
+ | `npm install -g @abelxiaoxing/cadence` | npm's actual global prefix |
163
+ | `bun add -g @abelxiaoxing/cadence` | Bun's actual global directory, including a custom user `bunfig.toml` location |
164
+ | `npm install @abelxiaoxing/cadence` or `bun add @abelxiaoxing/cadence` | The local prefix, when its manifest directly declares Cadence and its lockfile identifies one manager |
165
+
166
+ Bun's directory listing alone is not proof of a Bun installation: its prefix must have an unambiguous Bun lockfile.
167
+ Local npm prefixes also recognize `npm-shrinkwrap.json`.
168
+ Pi's default and custom `PI_CODING_AGENT_DIR` are supported; its string and object package declarations and resource filters stay unchanged.
169
+ A versioned Pi declaration (including `@latest`) is pinned: change it explicitly in Pi before using self-upgrade.
170
+ A Pi-managed prefix from another agent or a temporary Pi install is never treated as an ordinary local dependency to bypass that declaration.
171
+ Custom Pi `npmCommand` wrappers, project-local/temporary Pi installs, source checkouts, linked/isolated-store copies, mixed lockfiles, and prefixes the service account cannot write require a terminal update using the original installation method, followed by that copy's `server restart`.
172
+ Bun uses a fresh private staging directory with install scripts disabled to warm its cache; it removes only that staging directory.
173
+ Bun prefixes with their own `.npmrc` or `bunfig.toml` also require a terminal update: Cadence will not copy those potentially credential-bearing files into staging or silently fetch from another registry.
174
+ The managers read their account's own configuration (`~/.npmrc`, Bun's user `bunfig.toml` and npm's prefix-local configuration); npm/Bun binaries must be available on the service's saved PATH.
175
+ Every npm query, fetch and install explicitly selects the same prefix and global/local scope, overriding an inherited `global=true`.
176
+ A pinned, unwritable or unidentified installation reports that update information is unavailable rather than silently consulting another manager's registry.
177
+ Newly generated definitions retain absolute `XDG_CONFIG_HOME`, `BUN_INSTALL`, `BUN_INSTALL_GLOBAL_DIR`, `BUN_INSTALL_BIN`, and npm prefix/userconfig environment paths when explicitly supplied; registry tokens are never baked into the unit.
178
+ If an older service definition lacks those locations, restart it once from a terminal with the correct environment before using WebUI updates.
153
179
  A workbench that was not started by its systemd service, and services on macOS and Windows, show the version only; restart and upgrade them in a terminal.
154
180
 
155
181
  ### One copy for Pi and the service
156
182
 
157
183
  After `npm install -g`, `pi install "$(npm root -g)/@abelxiaoxing/cadence"` records that path and loads it in place, so an npm upgrade updates the service and native `/cadence` together.
158
- Pi's own package install (`pi install npm:@abelxiaoxing/cadence`) also loads the native client, but its copy puts no `cadence` on `PATH`; if you want the optional boot service, register it with `node ~/.pi/agent/npm/node_modules/@abelxiaoxing/cadence/src/service-cli.mjs server install`.
184
+ Pi's own package install (`pi install npm:@abelxiaoxing/cadence`) also loads the native client and supports the WebUI update route above, but its copy puts no `cadence` on `PATH`; if you want the optional boot service, register it with `node ~/.pi/agent/npm/node_modules/@abelxiaoxing/cadence/src/service-cli.mjs server install`.
159
185
  Keep one copy: two copies drift apart on upgrade, and a native client refuses an owner whose service contract differs from its own.
160
186
  A unit registered by an earlier version's Pi install hook keeps running; `cadence server restart` from the copy you keep rewrites it, and `pi update` no longer restarts it.
161
187
  Opening the private link once leaves an HttpOnly cookie in that browser; the address without the token only explains how to get the link.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abelxiaoxing/cadence",
3
- "version": "2.0.35",
3
+ "version": "2.0.37",
4
4
  "description": "Conversation-driven Pi workspace: persistent native and WebUI workflows, explicit plan approval, checks and local delivery.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,6 +17,7 @@
17
17
  "skills",
18
18
  "config",
19
19
  "agents",
20
+ "src/abort-scope.ts",
20
21
  "src/agent-panel-cadence.ts",
21
22
  "src/agent-panel-model.ts",
22
23
  "src/agent-panel.ts",
@@ -54,6 +55,10 @@
54
55
  "src/worker-redaction.mjs",
55
56
  "src/worker-tools.mjs",
56
57
  "src/research-tools.mjs",
58
+ "src/research-scan.mjs",
59
+ "src/worker-toolkit.mjs",
60
+ "src/worker-workspace.mjs",
61
+ "src/worker-workspace.d.mts",
57
62
  "web/dist",
58
63
  "docs",
59
64
  "README.md",
@@ -82,7 +87,8 @@
82
87
  "src/workspace.ts",
83
88
  "src/data-shapes.ts",
84
89
  "src/service/checkout-lock.ts",
85
- "src/service/liveness.ts"
90
+ "src/service/liveness.ts",
91
+ "src/agent-browser"
86
92
  ],
87
93
  "pi": {
88
94
  "extensions": [
@@ -96,13 +102,10 @@
96
102
  "pack:check": "node scripts/pack-check.mjs",
97
103
  "traceability:check": "node scripts/traceability-check.mjs",
98
104
  "verify": "node scripts/verify.mjs",
99
- "verify:full": "node scripts/verify.mjs --full",
100
105
  "check": "node scripts/check-syntax.mjs && bun scripts/build-operator.mjs --check && bun scripts/build-service.mjs --check && tsc --noEmit --incremental --tsBuildInfoFile .cache/tsc/root.tsbuildinfo",
101
106
  "lint": "biome check . && rumdl check .",
102
- "test": "vitest run",
103
- "test:unit": "vitest run --tags-filter=!slow",
104
- "test:slow": "vitest run --tags-filter=slow",
105
- "test:target": "vitest run",
107
+ "test": "vitest run --tags-filter=!slow",
108
+ "test:target": "vitest run --tags-filter=!slow",
106
109
  "check:agents": "node scripts/check-agents.mjs",
107
110
  "doctor": "node src/operator-cli.mjs doctor",
108
111
  "runs": "node src/operator-cli.mjs runs",
@@ -112,21 +115,19 @@
112
115
  "test:web": "vitest run --config web/vitest.config.ts",
113
116
  "build:web": "node scripts/build-web.mjs",
114
117
  "build:web:check": "node scripts/build-web.mjs --check",
115
- "test:web:assets-browser": "bun run test:browser",
116
118
  "build:check": "bun scripts/build-operator.mjs --check && bun scripts/build-service.mjs --check && bun run build:web:check",
117
- "test:service": "vitest run --config test/service.config.ts",
118
- "test:browser": "vitest run --config web/browser.config.ts",
119
+ "test:service": "vitest run --config test/service.config.ts --tags-filter=!slow",
119
120
  "check:notices": "node scripts/audit-notices.mjs"
120
121
  },
121
122
  "peerDependencies": {
122
- "@earendil-works/pi-coding-agent": "*",
123
- "@earendil-works/pi-tui": "*",
123
+ "@earendil-works/pi-coding-agent": "^1.5.0",
124
+ "@earendil-works/pi-tui": "^1.5.0",
124
125
  "typebox": "*",
125
- "@earendil-works/pi-ai": "*"
126
+ "@earendil-works/pi-ai": "^1.5.0"
126
127
  },
127
128
  "devDependencies": {
128
129
  "@biomejs/biome": "^2.4.16",
129
- "@earendil-works/pi-tui": "0.84.3",
130
+ "@earendil-works/pi-tui": "1.5.0",
130
131
  "@types/node": "^22.15.3",
131
132
  "rumdl": "^0.2.10",
132
133
  "typescript": "^6.0.3",
@@ -154,8 +155,7 @@
154
155
  "mdast-util-math": "3.0.0",
155
156
  "vis-timeline": "8.5.4",
156
157
  "vite": "8.3.0",
157
- "@vitejs/plugin-react": "6.1.1",
158
- "playwright-core": "1.63.0"
158
+ "@vitejs/plugin-react": "6.1.1"
159
159
  },
160
160
  "repository": {
161
161
  "type": "git",
@@ -170,8 +170,8 @@
170
170
  "ws": "8.21.3"
171
171
  },
172
172
  "optionalDependencies": {
173
- "@earendil-works/pi-ai": "0.84.3",
174
- "@earendil-works/pi-coding-agent": "0.84.3"
173
+ "@earendil-works/pi-ai": "1.5.0",
174
+ "@earendil-works/pi-coding-agent": "1.5.0"
175
175
  },
176
176
  "bin": {
177
177
  "cadence": "./src/service-cli.mjs",
@@ -0,0 +1,47 @@
1
+ /** A local wait's cancellation lifetime, not ownership of the operation it
2
+ * observes. No static AbortSignal APIs or global polyfill are required. */
3
+ export function abortScope(
4
+ sources: readonly (AbortSignal | undefined)[] = [],
5
+ timeoutMs?: number,
6
+ ): { signal: AbortSignal; dispose(): void } {
7
+ if (
8
+ timeoutMs !== undefined &&
9
+ (!Number.isFinite(timeoutMs) || timeoutMs < 0 || timeoutMs > 2_147_483_647)
10
+ )
11
+ throw new RangeError("invalid abort timeout");
12
+ const controller = new AbortController();
13
+ const listeners = new Map<AbortSignal, () => void>();
14
+ let timer: ReturnType<typeof setTimeout> | undefined;
15
+ let disposed = false;
16
+ const dispose = () => {
17
+ if (disposed) return;
18
+ disposed = true;
19
+ clearTimeout(timer);
20
+ for (const [source, listener] of listeners)
21
+ source.removeEventListener("abort", listener);
22
+ listeners.clear();
23
+ };
24
+ const abort = (reason: unknown) => {
25
+ if (disposed) return;
26
+ dispose();
27
+ controller.abort(reason);
28
+ };
29
+ for (const source of sources) {
30
+ if (!source || listeners.has(source)) continue;
31
+ if (source.aborted) {
32
+ abort(source.reason);
33
+ break;
34
+ }
35
+ const listener = () => abort(source.reason);
36
+ listeners.set(source, listener);
37
+ source.addEventListener("abort", listener, { once: true });
38
+ }
39
+ if (!disposed && timeoutMs !== undefined)
40
+ timer = setTimeout(
41
+ () => abort(new DOMException("The wait timed out", "TimeoutError")),
42
+ timeoutMs,
43
+ );
44
+ // Disposal only releases listeners/timers. It never aborts a source, sends
45
+ // Cancel, or changes the admitted work's lifetime.
46
+ return { signal: controller.signal, dispose };
47
+ }