pi-ui-extend 1.0.42 → 1.0.45

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 (233) hide show
  1. package/README.md +41 -12
  2. package/dist/app/app.d.ts +10 -0
  3. package/dist/app/app.js +132 -8
  4. package/dist/app/cli/install.js +2 -2
  5. package/dist/app/commands/command-controller.d.ts +4 -0
  6. package/dist/app/commands/command-controller.js +11 -0
  7. package/dist/app/commands/command-git-actions.d.ts +25 -0
  8. package/dist/app/commands/command-git-actions.js +381 -0
  9. package/dist/app/commands/command-host.d.ts +3 -0
  10. package/dist/app/commands/command-host.js +5 -2
  11. package/dist/app/commands/command-model-actions.d.ts +1 -0
  12. package/dist/app/commands/command-model-actions.js +51 -34
  13. package/dist/app/commands/command-navigation-actions.d.ts +1 -0
  14. package/dist/app/commands/command-navigation-actions.js +16 -3
  15. package/dist/app/commands/command-registry.d.ts +2 -0
  16. package/dist/app/commands/command-registry.js +14 -0
  17. package/dist/app/commands/reload-context-inventory.js +12 -1
  18. package/dist/app/input/autocomplete-controller.js +61 -34
  19. package/dist/app/input/input-action-controller.d.ts +2 -0
  20. package/dist/app/input/input-action-controller.js +8 -1
  21. package/dist/app/input/input-controller.d.ts +2 -1
  22. package/dist/app/input/input-controller.js +7 -2
  23. package/dist/app/input/prompt-enhancer-controller.js +53 -35
  24. package/dist/app/input/voice-controller.d.ts +41 -45
  25. package/dist/app/input/voice-controller.js +351 -419
  26. package/dist/app/model/model-usage-controller.js +17 -7
  27. package/dist/app/model/model-usage-status.d.ts +4 -1
  28. package/dist/app/model/model-usage-status.js +270 -46
  29. package/dist/app/popup/menu-items-controller.d.ts +13 -3
  30. package/dist/app/popup/menu-items-controller.js +37 -21
  31. package/dist/app/popup/popup-action-controller.d.ts +12 -2
  32. package/dist/app/popup/popup-action-controller.js +77 -24
  33. package/dist/app/popup/popup-menu-controller.d.ts +36 -14
  34. package/dist/app/popup/popup-menu-controller.js +239 -69
  35. package/dist/app/rendering/dcp-stats.d.ts +9 -4
  36. package/dist/app/rendering/dcp-stats.js +40 -425
  37. package/dist/app/rendering/popup-menu-renderer.d.ts +3 -5
  38. package/dist/app/rendering/popup-menu-renderer.js +42 -37
  39. package/dist/app/rendering/render-controller.js +23 -2
  40. package/dist/app/rendering/status-line-renderer.d.ts +5 -0
  41. package/dist/app/rendering/status-line-renderer.js +41 -5
  42. package/dist/app/rendering/tab-line-renderer.js +26 -20
  43. package/dist/app/runtime.d.ts +12 -1
  44. package/dist/app/runtime.js +120 -12
  45. package/dist/app/screen/mouse-controller.d.ts +2 -0
  46. package/dist/app/screen/mouse-controller.js +17 -7
  47. package/dist/app/screen/status-controller.d.ts +4 -0
  48. package/dist/app/screen/status-controller.js +5 -0
  49. package/dist/app/session/lazy-session-manager.js +34 -0
  50. package/dist/app/session/session-event-controller.d.ts +1 -0
  51. package/dist/app/session/session-event-controller.js +10 -1
  52. package/dist/app/session/session-history.d.ts +1 -0
  53. package/dist/app/session/session-history.js +12 -1
  54. package/dist/app/session/session-lifecycle-controller.d.ts +6 -1
  55. package/dist/app/session/session-lifecycle-controller.js +10 -1
  56. package/dist/app/session/tabs-controller.d.ts +25 -1
  57. package/dist/app/session/tabs-controller.js +442 -153
  58. package/dist/app/subagents/subagents-widget-controller.d.ts +1 -0
  59. package/dist/app/subagents/subagents-widget-controller.js +6 -0
  60. package/dist/app/types.d.ts +11 -1
  61. package/dist/app/workspace/workspace-actions-controller.js +10 -2
  62. package/dist/app/workspace/workspace-undo.d.ts +1 -0
  63. package/dist/app/workspace/workspace-undo.js +1 -0
  64. package/dist/bundled-extensions/question/index.js +9 -1
  65. package/dist/bundled-extensions/question/remote.d.ts +4 -0
  66. package/dist/bundled-extensions/question/remote.js +33 -0
  67. package/dist/bundled-extensions/telegram-connector/bot.d.ts +43 -0
  68. package/dist/bundled-extensions/telegram-connector/bot.js +166 -0
  69. package/dist/bundled-extensions/telegram-connector/config.d.ts +8 -0
  70. package/dist/bundled-extensions/telegram-connector/config.js +87 -0
  71. package/dist/bundled-extensions/telegram-connector/coordinator.d.ts +66 -0
  72. package/dist/bundled-extensions/telegram-connector/coordinator.js +413 -0
  73. package/dist/bundled-extensions/telegram-connector/index.d.ts +3 -0
  74. package/dist/bundled-extensions/telegram-connector/index.js +195 -0
  75. package/dist/bundled-extensions/terminal-bell/index.d.ts +0 -8
  76. package/dist/bundled-extensions/terminal-bell/index.js +0 -76
  77. package/dist/bundled-extensions/workspace-undo/index.d.ts +26 -0
  78. package/dist/bundled-extensions/workspace-undo/index.js +191 -0
  79. package/dist/config.d.ts +21 -2
  80. package/dist/config.js +159 -32
  81. package/dist/default-pix-config.js +20 -10
  82. package/dist/schemas/pi-tools-suite-schema.d.ts +8 -4
  83. package/dist/schemas/pi-tools-suite-schema.js +11 -5
  84. package/dist/schemas/pix-schema.d.ts +12 -2
  85. package/dist/schemas/pix-schema.js +37 -9
  86. package/dist/schemas/tasks-schema.js +1 -1
  87. package/docs/concurrency.md +3 -1
  88. package/docs/desktop-mvp.md +10 -5
  89. package/docs/desktop-task-manager.md +81 -28
  90. package/docs/release.md +30 -6
  91. package/external/pi-tools-suite/README.md +165 -39
  92. package/external/pi-tools-suite/docs/session-recovery.md +7 -0
  93. package/external/pi-tools-suite/docs/subagent-model-pools.md +12 -5
  94. package/external/pi-tools-suite/docs/ui-qa-subagent.md +440 -0
  95. package/external/pi-tools-suite/package.json +6 -1
  96. package/external/pi-tools-suite/src/antigravity-auth/auth-store.ts +2 -1
  97. package/external/pi-tools-suite/src/antigravity-auth/constants.ts +9 -3
  98. package/external/pi-tools-suite/src/antigravity-auth/headers.ts +41 -3
  99. package/external/pi-tools-suite/src/antigravity-auth/models.ts +94 -21
  100. package/external/pi-tools-suite/src/antigravity-auth/oauth.ts +5 -17
  101. package/external/pi-tools-suite/src/antigravity-auth/payload.ts +72 -7
  102. package/external/pi-tools-suite/src/antigravity-auth/stream.ts +13 -1
  103. package/external/pi-tools-suite/src/async-subagents/agents/implement.md +1 -1
  104. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/backends/browser.mjs +346 -0
  105. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/backends/desktop.mjs +1038 -0
  106. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/backends/tui.mjs +759 -0
  107. package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/scripts/browser-qa-runner.mjs +32 -23
  108. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/chrome-devtools/chrome-devtools-provider.mjs +895 -0
  109. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/linux/linux-atspi.py +494 -0
  110. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/macos/macos-accessibility.swift +1085 -0
  111. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/native-terminal/bridge-client.mjs +50 -0
  112. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/native-terminal/native-terminal-host.mjs +501 -0
  113. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/windows/windows-uia.ps1 +454 -0
  114. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser-auth.md +114 -0
  115. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser-chrome-devtools.md +91 -0
  116. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser-playwright.md +145 -0
  117. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser.md +82 -0
  118. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop-linux.md +26 -0
  119. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop-macos.md +29 -0
  120. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop-windows.md +23 -0
  121. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop.md +54 -0
  122. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/tui-native-terminal.md +59 -0
  123. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/tui-pty.md +37 -0
  124. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/tui.md +60 -0
  125. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/scripts/ui-qa-runner.mjs +535 -0
  126. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa.md +75 -0
  127. package/external/pi-tools-suite/src/async-subagents/commands.ts +1 -1
  128. package/external/pi-tools-suite/src/async-subagents/core/agent-strategy.ts +1 -1
  129. package/external/pi-tools-suite/src/async-subagents/core/agents-dir.ts +0 -2
  130. package/external/pi-tools-suite/src/async-subagents/core/browser-qa.ts +16 -2
  131. package/external/pi-tools-suite/src/async-subagents/core/config.ts +40 -17
  132. package/external/pi-tools-suite/src/async-subagents/core/model-selection.ts +2 -1
  133. package/external/pi-tools-suite/src/async-subagents/core/registry.ts +158 -33
  134. package/external/pi-tools-suite/src/async-subagents/core/routing.ts +7 -4
  135. package/external/pi-tools-suite/src/async-subagents/core/spawn.ts +34 -24
  136. package/external/pi-tools-suite/src/async-subagents/core/ultrawork-auto.ts +51 -45
  137. package/external/pi-tools-suite/src/async-subagents/lib.ts +9 -1
  138. package/external/pi-tools-suite/src/async-subagents/tools/spawn.ts +0 -1
  139. package/external/pi-tools-suite/src/async-subagents/tools/subagents.ts +2 -2
  140. package/external/pi-tools-suite/src/coding-discipline/index.ts +90 -59
  141. package/external/pi-tools-suite/src/config.ts +14 -0
  142. package/external/pi-tools-suite/src/context-gateway/accounting-log.ts +282 -0
  143. package/external/pi-tools-suite/src/context-gateway/config.ts +66 -1
  144. package/external/pi-tools-suite/src/context-gateway/efficiency.ts +414 -0
  145. package/external/pi-tools-suite/src/context-gateway/enforcement.ts +123 -3
  146. package/external/pi-tools-suite/src/context-gateway/index.ts +137 -4
  147. package/external/pi-tools-suite/src/context-gateway/storeless-capabilities.ts +5 -5
  148. package/external/pi-tools-suite/src/context-gateway/telemetry.ts +2 -2
  149. package/external/pi-tools-suite/src/context-gateway/types.ts +8 -1
  150. package/external/pi-tools-suite/src/dcp/auto-compress-budget.ts +39 -4
  151. package/external/pi-tools-suite/src/dcp/auto-compress.ts +41 -14
  152. package/external/pi-tools-suite/src/dcp/commands.ts +14 -156
  153. package/external/pi-tools-suite/src/dcp/compress-tool.ts +8 -2
  154. package/external/pi-tools-suite/src/dcp/compression-progress.ts +22 -0
  155. package/external/pi-tools-suite/src/dcp/config.ts +58 -4
  156. package/external/pi-tools-suite/src/dcp/conversation-index.ts +36 -9
  157. package/external/pi-tools-suite/src/dcp/diagnostics.ts +41 -0
  158. package/external/pi-tools-suite/src/dcp/fresh-tool-results.ts +38 -0
  159. package/external/pi-tools-suite/src/dcp/index.ts +338 -66
  160. package/external/pi-tools-suite/src/dcp/journal.ts +126 -4
  161. package/external/pi-tools-suite/src/dcp/progress-controller.ts +2 -1
  162. package/external/pi-tools-suite/src/dcp/pruner-candidates.ts +92 -2
  163. package/external/pi-tools-suite/src/dcp/pruner-nudge.ts +36 -33
  164. package/external/pi-tools-suite/src/dcp/pruner.ts +1 -0
  165. package/external/pi-tools-suite/src/dcp/routine-pressure.ts +86 -0
  166. package/external/pi-tools-suite/src/dcp/state.ts +9 -0
  167. package/external/pi-tools-suite/src/dcp/statistics.d.ts +8 -0
  168. package/external/pi-tools-suite/src/dcp/statistics.js +156 -0
  169. package/external/pi-tools-suite/src/default-pi-tools-suite-config.ts +68 -16
  170. package/external/pi-tools-suite/src/lib/project.ts +36 -1
  171. package/external/pi-tools-suite/src/model-tools/index.ts +10 -7
  172. package/external/pi-tools-suite/src/repo-discovery/index.ts +304 -4
  173. package/external/pi-tools-suite/src/resource-registry/index.ts +282 -21
  174. package/external/pi-tools-suite/src/session-recovery/index.ts +17 -0
  175. package/external/pi-tools-suite/src/todo/index.ts +21 -0
  176. package/external/pi-tools-suite/src/todo/todo.ts +19 -1
  177. package/external/pi-tools-suite/src/tool-descriptions.ts +44 -15
  178. package/package.json +7 -8
  179. package/schemas/pi-tools-suite.json +44 -12
  180. package/schemas/pix.json +109 -15
  181. package/schemas/tasks.json +1 -2
  182. package/skills/simplify/SKILL.md +33 -5
  183. package/external/pi-tools-suite/docs/browser-qa-subagent.md +0 -196
  184. package/external/pi-tools-suite/src/async-subagents/agents/browser-qa.md +0 -598
  185. package/skills/playwright-cli/SKILL.md +0 -420
  186. package/skills/playwright-cli/references/element-attributes.md +0 -23
  187. package/skills/playwright-cli/references/playwright-tests.md +0 -50
  188. package/skills/playwright-cli/references/request-mocking.md +0 -87
  189. package/skills/playwright-cli/references/running-code.md +0 -241
  190. package/skills/playwright-cli/references/session-management.md +0 -273
  191. package/skills/playwright-cli/references/spec-driven-testing.md +0 -311
  192. package/skills/playwright-cli/references/storage-state.md +0 -290
  193. package/skills/playwright-cli/references/test-generation.md +0 -142
  194. package/skills/playwright-cli/references/tracing.md +0 -154
  195. package/skills/playwright-cli/references/video-recording.md +0 -147
  196. package/skills/spec-wiki/SKILL.md +0 -55
  197. package/skills/spec-wiki/evals/evals.json +0 -132
  198. package/skills/spec-wiki/evals/files/bootstrap/architecture/rfc-007.md +0 -14
  199. package/skills/spec-wiki/evals/files/bootstrap/docs/how-to-pay.md +0 -4
  200. package/skills/spec-wiki/evals/files/bootstrap/docs/overview.md +0 -9
  201. package/skills/spec-wiki/evals/files/bootstrap/requirements/payment-behavior.md +0 -17
  202. package/skills/spec-wiki/evals/files/bootstrap/src/payments.ts +0 -12
  203. package/skills/spec-wiki/evals/files/bootstrap/tests/payments.test.ts +0 -11
  204. package/skills/spec-wiki/evals/files/focused/src/session.ts +0 -5
  205. package/skills/spec-wiki/evals/files/focused/tests/session.test.ts +0 -17
  206. package/skills/spec-wiki/evals/files/maintenance/low-signal/incoming/capture.txt +0 -2
  207. package/skills/spec-wiki/evals/files/maintenance/low-signal/src/capture.ts +0 -3
  208. package/skills/spec-wiki/evals/files/maintenance/move/docs/old-job-contract.md +0 -18
  209. package/skills/spec-wiki/evals/files/maintenance/move/src/job.ts +0 -5
  210. package/skills/spec-wiki/evals/files/maintenance/new-relation/docs/session-refresh.md +0 -24
  211. package/skills/spec-wiki/evals/files/maintenance/new-relation/incoming/refresh-worker.ts +0 -7
  212. package/skills/spec-wiki/evals/files/maintenance/new-relation/src/session.ts +0 -7
  213. package/skills/spec-wiki/evals/files/maintenance/no-impact/docs/auth-contract.md +0 -17
  214. package/skills/spec-wiki/evals/files/maintenance/no-impact/incoming/telemetry-format.ts +0 -3
  215. package/skills/spec-wiki/evals/files/maintenance/no-impact/src/auth.ts +0 -3
  216. package/skills/spec-wiki/evals/files/query/docs/how-to-run-jobs.md +0 -4
  217. package/skills/spec-wiki/evals/files/query/docs/spec-overview.md +0 -9
  218. package/skills/spec-wiki/evals/files/query/features/jobs/cancellation-contract.md +0 -15
  219. package/skills/spec-wiki/evals/files/query/features/jobs/retry-spec.md +0 -6
  220. package/skills/spec-wiki/evals/maintenance_regression.py +0 -311
  221. package/skills/spec-wiki/evals/retrieval-eval.md +0 -37
  222. package/skills/spec-wiki/evals/retrieval-evals.json +0 -37
  223. package/skills/spec-wiki/evals/trigger-evals.json +0 -94
  224. package/skills/spec-wiki/references/bootstrap.md +0 -100
  225. package/skills/spec-wiki/references/focused-spec.md +0 -117
  226. package/skills/spec-wiki/references/index-schema.md +0 -330
  227. package/skills/spec-wiki/references/maintenance.md +0 -134
  228. package/skills/spec-wiki/references/query.md +0 -74
  229. package/skills/spec-wiki/scripts/spec_wiki.py +0 -2076
  230. /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/examples/qa-auth.example.jsonc +0 -0
  231. /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/examples/qa-flow.example.jsonc +0 -0
  232. /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/vendor/fflate.LICENSE +0 -0
  233. /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/vendor/fflate.mjs +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-ui-extend",
3
- "version": "1.0.42",
3
+ "version": "1.0.45",
4
4
  "description": "Pix: a workspace-first terminal UI for Pi with tabs, readable tool activity, voice input, and bundled agent tools.",
5
5
  "private": false,
6
6
  "repository": {
@@ -63,6 +63,8 @@
63
63
  "test": "mise exec node@24.16.0 -- npm run test:inner",
64
64
  "test:inner": "node --import tsx --test \"tests/**/*.test.ts\"",
65
65
  "test:tools-suite": "npm --prefix external/pi-tools-suite test",
66
+ "test:dcp-session-sim": "npm --prefix external/pi-tools-suite run test:dcp-session-sim",
67
+ "test:dcp-reminder-e2e": "npm --prefix external/pi-tools-suite run test:dcp-reminder-e2e",
66
68
  "build:acp": "npm --prefix acp run build",
67
69
  "check:acp": "npm --prefix acp run check",
68
70
  "dev:desktop": "npm --prefix desktop run dev",
@@ -78,6 +80,7 @@
78
80
  "prepack": "npm run generate-schemas --silent",
79
81
  "pack:dry-run": "npm pack --dry-run",
80
82
  "smoke-test": "mise exec node@24.16.0 -- bash scripts/smoke-test-package.sh",
83
+ "smoke-test:cli": "mise exec node@24.16.0 -- node scripts/smoke-test-package-cli.mjs",
81
84
  "release:check": "npm run check && npm run build:pix && npm run pack:dry-run",
82
85
  "publish-npm": "bash scripts/publish.sh",
83
86
  "generate-schemas": "tsx scripts/generate-schemas.ts",
@@ -86,10 +89,13 @@
86
89
  "prepublishOnly": "npm run check && npm run build:pix && npm run generate-schemas"
87
90
  },
88
91
  "dependencies": {
92
+ "@cortexkit/antigravity-auth-core": "2.2.1",
89
93
  "@earendil-works/pi-ai": "0.85.1",
90
94
  "@earendil-works/pi-coding-agent": "0.85.1",
91
95
  "@earendil-works/pi-tui": "0.85.1",
96
+ "@lydell/node-pty": "1.1.0",
92
97
  "@mariozechner/clipboard": "^0.3.9",
98
+ "@xterm/headless": "^6.0.0",
93
99
  "grok-mermaid": "0.2.2",
94
100
  "jsonc-parser": "3.3.1",
95
101
  "typebox": "1.1.38",
@@ -105,13 +111,6 @@
105
111
  "engines": {
106
112
  "node": ">=22.19.0 <25"
107
113
  },
108
- "overrides": {
109
- "get-uv-event-loop-napi-h": "1.0.6",
110
- "node-addon-api": "8.8.0"
111
- },
112
- "optionalDependencies": {
113
- "vosk": "0.3.39"
114
- },
115
114
  "keywords": [
116
115
  "pi",
117
116
  "pix",
@@ -88,29 +88,47 @@
88
88
  ],
89
89
  "description": "Vision-capable provider/model used by GLM's lookup tool; unset or null disables lookup."
90
90
  },
91
+ "lookupFallbackModels": {
92
+ "type": "array",
93
+ "items": {
94
+ "type": "string"
95
+ },
96
+ "description": "Ordered lookup model fallbacks tried after lookupModel."
97
+ },
91
98
  "terminalBell": {
92
99
  "type": "object",
93
100
  "properties": {
94
101
  "sound": {
95
102
  "type": "boolean",
96
103
  "description": "Play terminal bell sound on completion/error."
104
+ }
105
+ },
106
+ "description": "Terminal bell configuration."
107
+ },
108
+ "telegramConnector": {
109
+ "type": "object",
110
+ "properties": {
111
+ "enabled": {
112
+ "type": "boolean",
113
+ "description": "Enable the Telegram task connector. Defaults to enabled when botToken and chatId are present."
97
114
  },
98
- "telegram": {
99
- "type": "object",
100
- "properties": {
101
- "botToken": {
102
- "type": "string",
103
- "description": "Telegram bot token (from @BotFather) used to send completion/error/question notifications."
115
+ "botToken": {
116
+ "type": "string",
117
+ "description": "Telegram Bot API token from @BotFather."
118
+ },
119
+ "chatId": {
120
+ "anyOf": [
121
+ {
122
+ "type": "string"
104
123
  },
105
- "chatId": {
106
- "type": "string",
107
- "description": "Telegram chat id that receives the notifications. Message @userinfobot to look yours up."
124
+ {
125
+ "type": "integer"
108
126
  }
109
- },
110
- "description": "Forward terminal-bell notifications to a Telegram chat. Independent of the bundled desktop sound gate."
127
+ ],
128
+ "description": "Private Telegram chat id allowed to control Pix."
111
129
  }
112
130
  },
113
- "description": "Terminal bell configuration."
131
+ "description": "Receive completion/question notifications and send follow-up or new-session tasks from Telegram."
114
132
  },
115
133
  "commentChecker": {
116
134
  "type": "object",
@@ -419,6 +437,13 @@
419
437
  },
420
438
  "description": "Ordered model refs used by auto-compress and explicit compress when summary is omitted; empty uses the deterministic extractive summary."
421
439
  },
440
+ "summarizerFallbackModels": {
441
+ "type": "array",
442
+ "items": {
443
+ "type": "string"
444
+ },
445
+ "description": "Ordered fallback model refs tried after summarizerModel."
446
+ },
422
447
  "timeoutMs": {
423
448
  "type": "number",
424
449
  "description": "Per-summarizer deadline in milliseconds for automatic and explicit generated summaries.",
@@ -782,6 +807,13 @@
782
807
  },
783
808
  "description": "Ordered model refs used by auto-compress and explicit compress when summary is omitted; empty uses the deterministic extractive summary."
784
809
  },
810
+ "summarizerFallbackModels": {
811
+ "type": "array",
812
+ "items": {
813
+ "type": "string"
814
+ },
815
+ "description": "Ordered fallback model refs tried after summarizerModel."
816
+ },
785
817
  "timeoutMs": {
786
818
  "type": "number",
787
819
  "description": "Per-summarizer deadline in milliseconds for automatic and explicit generated summaries.",
package/schemas/pix.json CHANGED
@@ -21,6 +21,14 @@
21
21
  "type": "string",
22
22
  "description": "Provider/model identifier, e.g. 'openai-codex/gpt-5.4'."
23
23
  },
24
+ "fallbackModels": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string",
28
+ "description": "Fallback provider/model identifier."
29
+ },
30
+ "description": "Ordered default-model fallbacks tried after modelRef."
31
+ },
24
32
  "thinking": {
25
33
  "anyOf": [
26
34
  {
@@ -57,6 +65,52 @@
57
65
  },
58
66
  "description": "Default model selection for new sessions."
59
67
  },
68
+ "visibleModels": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "string",
72
+ "description": "Provider/model identifier shown in Pix model pickers."
73
+ },
74
+ "description": "User-level whitelist shared by Pix TUI and Desktop model pickers. Omit to show every available model."
75
+ },
76
+ "thinkingByModel": {
77
+ "type": "object",
78
+ "patternProperties": {
79
+ "^.*$": {
80
+ "anyOf": [
81
+ {
82
+ "type": "string",
83
+ "const": "off"
84
+ },
85
+ {
86
+ "type": "string",
87
+ "const": "minimal"
88
+ },
89
+ {
90
+ "type": "string",
91
+ "const": "low"
92
+ },
93
+ {
94
+ "type": "string",
95
+ "const": "medium"
96
+ },
97
+ {
98
+ "type": "string",
99
+ "const": "high"
100
+ },
101
+ {
102
+ "type": "string",
103
+ "const": "xhigh"
104
+ },
105
+ {
106
+ "type": "string",
107
+ "const": "max"
108
+ }
109
+ ]
110
+ }
111
+ },
112
+ "description": "User-level last-applied thinking level per provider/model, shared by Pix TUI and Desktop model pickers."
113
+ },
60
114
  "toolRenderer": {
61
115
  "type": "object",
62
116
  "properties": {
@@ -168,6 +222,14 @@
168
222
  "modelRef": {
169
223
  "type": "string",
170
224
  "description": "Model used for prompt enhancement."
225
+ },
226
+ "fallbackModels": {
227
+ "type": "array",
228
+ "items": {
229
+ "type": "string",
230
+ "description": "Fallback provider/model identifier."
231
+ },
232
+ "description": "Ordered prompt-enhancer fallbacks tried after modelRef."
171
233
  }
172
234
  },
173
235
  "description": "Prompt enhancer configuration."
@@ -179,6 +241,14 @@
179
241
  "type": "string",
180
242
  "description": "Model for inline autocomplete. Empty string disables LLM autocomplete."
181
243
  },
244
+ "fallbackModels": {
245
+ "type": "array",
246
+ "items": {
247
+ "type": "string",
248
+ "description": "Fallback provider/model identifier."
249
+ },
250
+ "description": "Ordered autocomplete fallbacks tried after modelRef."
251
+ },
182
252
  "debounceMs": {
183
253
  "type": "number",
184
254
  "description": "Delay after typing before requesting completion.",
@@ -273,41 +343,51 @@
273
343
  "dictation": {
274
344
  "type": "object",
275
345
  "properties": {
346
+ "apiKey": {
347
+ "type": "string",
348
+ "description": "Deepgram API key used by terminal and desktop voice input. Store it in the user config (~/.config/pi/pix.jsonc); project-level .pi/pix.jsonc does not override this secret."
349
+ },
276
350
  "language": {
277
351
  "type": "string",
278
352
  "description": "Selected language code, e.g. 'en' or 'ru'."
279
353
  },
354
+ "model": {
355
+ "type": "string",
356
+ "description": "Deepgram speech-to-text model. Defaults to 'nova-3'."
357
+ },
280
358
  "languages": {
281
359
  "type": "object",
282
360
  "patternProperties": {
283
361
  "^.*$": {
284
362
  "type": "object",
285
363
  "required": [
286
- "dirName",
287
- "url",
288
364
  "label"
289
365
  ],
290
366
  "properties": {
291
- "dirName": {
367
+ "label": {
292
368
  "type": "string",
293
- "description": "Vosk model directory name."
369
+ "description": "Human-readable language label."
294
370
  },
295
- "url": {
371
+ "deepgramLanguage": {
296
372
  "type": "string",
297
- "description": "Download URL for the Vosk model zip."
373
+ "description": "Deepgram language code. Defaults to the language map key."
298
374
  },
299
- "label": {
375
+ "dirName": {
300
376
  "type": "string",
301
- "description": "Human-readable language label."
377
+ "description": "Deprecated legacy Vosk model directory name; ignored by Deepgram dictation."
378
+ },
379
+ "url": {
380
+ "type": "string",
381
+ "description": "Deprecated legacy Vosk model URL; ignored by Deepgram dictation."
302
382
  }
303
383
  },
304
- "description": "Vosk voice dictation model definition."
384
+ "description": "Deepgram voice dictation language definition."
305
385
  }
306
386
  },
307
- "description": "Available language models keyed by language code."
387
+ "description": "Available dictation languages keyed by local language code."
308
388
  }
309
389
  },
310
- "description": "Voice dictation (Vosk) configuration."
390
+ "description": "Voice dictation (Deepgram) configuration. Uses dictation.apiKey from the user pix config, with DEEPGRAM_API_KEY as a compatibility fallback."
311
391
  },
312
392
  "desktop": {
313
393
  "type": "object",
@@ -321,17 +401,31 @@
321
401
  "properties": {
322
402
  "reviewModelRef": {
323
403
  "type": "string",
324
- "description": "Model reference used by Pix Desktop for LLM review of Git diffs, optionally with a :thinking suffix."
404
+ "description": "Model reference used by Pix Desktop and TUI for LLM review of Git diffs, optionally with a :thinking suffix."
405
+ },
406
+ "reviewFallbackModels": {
407
+ "type": "array",
408
+ "items": {
409
+ "type": "string"
410
+ },
411
+ "description": "Ordered fallback model references used for Git diff review."
325
412
  },
326
413
  "commitMessageModelRef": {
327
414
  "type": "string",
328
- "description": "Model reference used by Pix Desktop to generate Git commit messages, optionally with a :thinking suffix."
415
+ "description": "Model reference used by Pix Desktop and TUI to generate Git commit messages, optionally with a :thinking suffix."
416
+ },
417
+ "commitMessageFallbackModels": {
418
+ "type": "array",
419
+ "items": {
420
+ "type": "string"
421
+ },
422
+ "description": "Ordered fallback model references used for Git commit-message generation."
329
423
  }
330
424
  },
331
- "description": "Pix Desktop Git/Source Control LLM preferences."
425
+ "description": "Pix Git/Source Control LLM preferences shared by Desktop and TUI."
332
426
  }
333
427
  },
334
- "description": "Pix Desktop-specific preferences."
428
+ "description": "Pix Desktop preferences; the nested git model settings are also consumed by TUI Git helpers for compatibility."
335
429
  }
336
430
  },
337
431
  "$id": "https://unpkg.com/pi-ui-extend/schemas/pix.json",
@@ -36,9 +36,8 @@
36
36
  },
37
37
  "title": {
38
38
  "type": "string",
39
- "minLength": 1,
40
39
  "maxLength": 200,
41
- "description": "Short task title."
40
+ "description": "Short task title. May be empty when the task has description content."
42
41
  },
43
42
  "description": {
44
43
  "type": "string",
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: simplify
3
- description: Simplify and refine recently modified code for clarity and consistency. Use after writing code to improve readability without changing functionality.
3
+ description: >-
4
+ Simplify and refine recently modified code for clarity, cohesion, and
5
+ consistency. Use after writing code, especially when files/functions are
6
+ growing, responsibilities are blurring, or a change adds structural
7
+ complexity. Preserve behavior.
4
8
  ---
5
9
 
6
10
  You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying project-specific best practices to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. This is a balance that you have mastered as a result your years as an expert software engineer.
@@ -9,7 +13,8 @@ You will analyze recently modified code and apply refinements that:
9
13
 
10
14
  1. **Preserve Functionality**: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
11
15
 
12
- 2. **Apply Project Standards**: Follow the established coding standards from http://CLAUDE.md including:
16
+ 2. **Apply Project Standards**: Follow `AGENTS.md`, any nearer scoped project
17
+ instructions, and the surrounding code conventions. In particular:
13
18
 
14
19
  - Use ES modules with proper import sorting and extensions
15
20
  - Prefer `function` keyword over arrow functions
@@ -18,7 +23,25 @@ You will analyze recently modified code and apply refinements that:
18
23
  - Use proper error handling patterns (avoid try/catch when possible)
19
24
  - Maintain consistent naming conventions
20
25
 
21
- 3. **Enhance Clarity**: Simplify code structure by:
26
+ 3. **Control File and Module Growth**: Do not let touched hand-written files
27
+ become dumping grounds for new behavior.
28
+
29
+ - Treat file size as a review signal, not a line-count game. Around 500 lines,
30
+ actively look for a cohesive extraction before adding substantial new
31
+ behavior. Around 800+ lines, do not keep adding substantial behavior unless
32
+ the file is intentionally declarative/generated or a clear composition root.
33
+ - Split by ownership and responsibility: move a complete concern, state machine,
34
+ service, policy, adapter, or component into a module with a clear API.
35
+ - Do not "fix" size by creating pass-through wrappers, arbitrary `part1`/`part2`
36
+ files, or fragments that increase navigation cost without reducing
37
+ responsibility.
38
+ - Prefer keeping state, I/O, rendering, and policy in distinct owners when they
39
+ can change independently.
40
+ - If a touched file is already oversized, avoid making it worse even when a full
41
+ cleanup is outside scope; extract the part directly related to the current
42
+ change when that produces a clean boundary.
43
+
44
+ 4. **Enhance Clarity**: Simplify code structure by:
22
45
 
23
46
  - Reducing unnecessary complexity and nesting
24
47
  - Eliminating redundant code and abstractions
@@ -28,7 +51,7 @@ You will analyze recently modified code and apply refinements that:
28
51
  - IMPORTANT: Avoid nested ternary operators - prefer switch statements or if/else chains for multiple conditions
29
52
  - Choose clarity over brevity - explicit code is often better than overly compact code
30
53
 
31
- 4. **Maintain Balance**: Avoid over-simplification that could:
54
+ 5. **Maintain Balance**: Avoid over-simplification that could:
32
55
 
33
56
  - Reduce code clarity or maintainability
34
57
  - Create overly clever solutions that are hard to understand
@@ -36,8 +59,13 @@ You will analyze recently modified code and apply refinements that:
36
59
  - Remove helpful abstractions that improve code organization
37
60
  - Prioritize "fewer lines" over readability (e.g., nested ternaries, dense one-liners)
38
61
  - Make the code harder to debug or extend
62
+ - Remove cancellation, generation/request guards, ownership checks, mutexes, or
63
+ other concurrency protections merely because they look redundant. For
64
+ async/reactive code, prove equivalent ordering and lifecycle semantics before
65
+ simplifying them.
39
66
 
40
- 5. **Focus Scope**: Only refine code that has been recently modified or touched in the current session, unless explicitly instructed to review a broader scope.
67
+ 6. **Focus Scope**: Only refine code that has been recently modified or touched
68
+ in the current session, unless explicitly instructed to review a broader scope.
41
69
 
42
70
  Your refinement process:
43
71
 
@@ -1,196 +0,0 @@
1
- # Browser QA sub-agent specification
2
-
3
- ## Type
4
-
5
- As-is
6
-
7
- ## Lifecycle
8
-
9
- Active implemented contract.
10
-
11
- ## Goal
12
-
13
- Provide a cheap, fast `browser-qa` async-subagent that reproduces browser bugs
14
- and proves fixes with deterministic assertions plus screenshot, video, and trace
15
- evidence. Its ranked `models` list prefers `zai/glm-5.3-flash`, then
16
- `openai-codex/gpt-5.6-luna`, filtered by the active preset's model pool and
17
- confirmed runtime image support.
18
-
19
- ## Inline agent workflow and skill isolation
20
-
21
- - All operating instructions, flow contracts, scenario-design guidance, and
22
- auth-scaffolding rules live in `src/async-subagents/agents/browser-qa.md`.
23
- Its body becomes the QA child's `promptAppend` through the shared agent
24
- loader. Parent and router catalogs include only its short `description`.
25
- - Runner code, vendor dependencies/licenses, and optional JSONC examples live
26
- under `src/async-subagents/agents/browser-qa/`; none is a discoverable skill.
27
- - Sub-agent processes disable normal extension discovery, then always load the
28
- suite's model-tools extension. They load the Antigravity provider extension
29
- only when an Antigravity model is explicitly selected.
30
- - A type profile may declare `isolatedSkills`. Spawning that profile adds
31
- `--no-skills` followed by one explicit `--skill` per configured path.
32
- - `browser-qa` always disables normal skill discovery and filters skill flags
33
- out of `extraArgs`, even without configured skills. It no longer injects a
34
- mandatory QA skill. Explicitly configured skills are optional additions.
35
- - The launcher sets `PI_BROWSER_QA_RUNNER` to the absolute installed runner path,
36
- replacing inherited values, and strips it from ordinary child environments.
37
- QA invokes `node "$PI_BROWSER_QA_RUNNER"` without guessing paths from cwd.
38
- - Model-only profile overrides inherit the workflow. An explicit profile
39
- `promptAppend` replaces the body like any other agent profile; it is not an
40
- immutable security boundary. Runtime protections remain in the runner.
41
-
42
- ## Authentication contract
43
-
44
- - Public browser QA requires no auth profile and does not create or require
45
- `.pi/qa_auth.jsonc`. Its explicit base URL supplies the one exact allowed
46
- origin, and the runner still blocks every other HTTP(S)/WebSocket origin.
47
- - Auth profiles live in project-local `.pi/qa_auth.jsonc` and are selected by
48
- explicit id. The file must be a real project-local file with mode `0600` on
49
- POSIX. Profile listings expose only `id`, description, and traits.
50
- - Listing profiles when the file is absent returns an empty list without side
51
- effects. When authenticated QA explicitly requests credentials and that file
52
- is absent, the runner creates a private empty template and returns
53
- `provide_credentials`.
54
- The sub-agent must explicitly ask the user to fill the reported file and
55
- rerun QA; it must not read or edit the credential values itself.
56
- - Every profile requires one or more exact `allowedOrigins`. Secret-bearing auth
57
- is applied only to those origins; all other HTTP(S)/WebSocket traffic and
58
- service workers are blocked during QA.
59
- - Supported auth types are `form`, `cookie`, `localStorage`, `sessionStorage`,
60
- `bearer`, and existing Playwright `storageState`.
61
- - The bundled runner reads secrets internally. Credentials must never be copied
62
- into prompts, generated QA flows, shell arguments, transcripts, reports,
63
- or QA evidence.
64
- - Generated browser state is private cache under `.pi/qa-auth-state`. Ephemeral
65
- flows, evidence, and result manifests are written under the owning agent's
66
- `.pi/subagents/<run>/<agent-id>/browser-qa/` workspace. Multiple profiles use
67
- separate browser contexts/evidence directories, and normal sub-agent shutdown
68
- or cleanup removes the whole workspace with its run.
69
- - Missing, rejected, or expired explicitly selected auth returns a
70
- machine-readable update-required status naming only the profile id, config
71
- file, and redacted reason. The parent asks the user to update the file and
72
- reruns; there is no `/qa-auth` command.
73
-
74
- ## QA execution contract
75
-
76
- - A model-authored QA flow is declarative JSONC, not executable JavaScript. The
77
- trusted runner implements a bounded set of navigation, interaction,
78
- assertion, screenshot, and auth-rejection actions and never gives the flow a
79
- Playwright context or credential values.
80
- - Target discovery is a bounded preflight, not an open-ended research task. The
81
- sub-agent invokes the runner within 45 seconds or returns `BLOCKED`; it does
82
- not spend the full launcher budget reading source or probing prerequisites.
83
- - The launcher injects `PI_SUBAGENT_AGENT_DIR`, pre-creates a private
84
- `browser-qa/flows/` workspace, and clears stale browser QA files when an agent
85
- id is reused. The runner validates the directory's project/type metadata and
86
- refuses flows outside it; the model cannot select a shared evidence root.
87
- - The runner owns browser lifecycle, origin checks, auth application, tracing,
88
- screenshots, video finalization, and redacted result output. Before retaining
89
- a trace it removes network/non-image resource entries, redacts configured and
90
- runtime storage credentials, and verifies those values are absent.
91
- - After every navigation or visible interaction, the runner waits for DOM
92
- readiness, completion of requests started by the action, and disappearance of
93
- common visible busy/spinner/skeleton markers. It requires a 500 ms stable
94
- interval before the next action so recordings remain readable; a page that
95
- stays busy through the flow timeout fails closed instead of being tested as a
96
- loading shell. App-specific readiness still requires an explicit declarative
97
- wait/assertion in the authored flow.
98
- - Before any page is created, the runner installs a context-wide, isolated
99
- interaction visualizer. Recorded clicks/double-clicks show a transient cursor
100
- and pulse. Native drag/drop is replayed for 450 ms with a large orange cursor,
101
- progressively drawn high-contrast path, and green drop marker. It also covers
102
- same-origin frames, declared popups, and form-auth submission. The layer is
103
- accessibility-hidden, pointer-transparent, never cancels application events,
104
- and its bounded animations clear within the post-action stable interval.
105
- - Success and post-launch failure results include typed artifact groups. Every
106
- item has an absolute filesystem path and a `file:` URI; the sub-agent must
107
- present each item as a clickable Markdown link instead of reporting only the
108
- evidence directory.
109
- - Success requires deterministic assertions. Visual inspection supplements,
110
- but never replaces, explicit expected-state checks.
111
- - Auth rejection discovered by a QA flow is reported through the
112
- `authRejectedIf` action so the parent gets an update-required status.
113
-
114
- ## Reliability and shutdown contract
115
-
116
- - The built-in `browser-qa` profile has a 300-second wall-clock budget unless
117
- the caller explicitly supplies a task or spawn timeout. This bounds model
118
- stalls as well as browser work.
119
- - The trusted runner has its own bounded lifecycle. Browser launch, context
120
- setup, auth, flow execution, evidence finalization, and browser shutdown must
121
- not wait forever; a timeout reports the last started stage without exposing
122
- flow contents or credentials.
123
- - Trace sanitization runs in a memory-limited worker that can be terminated at
124
- the cleanup deadline; synchronous archive work cannot defeat the watchdog.
125
- - The launcher always writes a small sanitized `progress.jsonl` journal in the
126
- agent directory. It records lifecycle/RPC event types and tool names, but not
127
- prompts, tool arguments, tool results, model text, or secrets. The browser
128
- runner writes similarly sanitized stage entries under its private workspace.
129
- - On POSIX, newly launched agents own a process group. Settled, timed-out, and
130
- explicitly stopped agents signal that group rather than only the Pi process;
131
- timeout/settled shutdown escalates to `SIGKILL` after its grace period. On
132
- Windows the existing recursive `taskkill /T /F` behavior remains in force.
133
- - Process-tree cleanup is scoped to a launcher-created process-group marker so
134
- an old or externally-created PID is never treated as an owned process group.
135
- User browser sessions outside that group must not be signalled.
136
- - Playwright can launch Chromium in its own POSIX process group. On runner
137
- failure the runner snapshots and kills only its own descendants before it
138
- exits, covering that detached browser tree without touching a user's browser.
139
-
140
- ## Related files
141
-
142
- - `external/pi-tools-suite/src/async-subagents/agents/browser-qa.md`
143
- - `external/pi-tools-suite/src/async-subagents/core/browser-qa.ts`
144
- - `external/pi-tools-suite/src/async-subagents/core/spawn.ts`
145
- - `external/pi-tools-suite/src/async-subagents/agents/browser-qa/scripts/browser-qa-runner.mjs`
146
- - `external/pi-tools-suite/test/async-subagents/core.test.ts`
147
- - `external/pi-tools-suite/test/async-subagents/browser-qa-runner.test.ts`
148
- - `external/pi-tools-suite/test/async-subagents/browser-qa-runner.e2e.test.ts`
149
- - `external/pi-tools-suite/test/async-subagents/selection-e2e.test.ts`
150
-
151
- ## Acceptance criteria
152
-
153
- 1. `browser-qa` resolves to the intended model/fallback and its inline Markdown
154
- workflow, and its isolated child process can register the configured
155
- model provider.
156
- 2. Default QA spawn args contain `--no-skills` but no `--skill`. The child
157
- receives the full workflow in its initial prompt and can invoke the bundled
158
- runner through `PI_BROWSER_QA_RUNNER` from an unrelated project directory.
159
- Optional configured skills still load; ordinary profiles retain existing
160
- skill discovery behavior and do not receive QA-only environment paths.
161
- 3. Auth profile listing and all error output are redacted; model-authored input
162
- cannot execute code in the credential-bearing process.
163
- 4. Runner tests cover public execution without an auth file, explicit profile
164
- selection, all auth modes, fail-closed origins, path/mode hardening, private
165
- empty-template creation only on an explicit auth request, non-executable
166
- flows, and successful redacted evidence creation.
167
- 5. Browser QA flows/evidence live only inside the owning sub-agent directory;
168
- deleting the run removes them while persistent auth config/state remains.
169
- 6. Runner tests prove that network activity and visible loading indicators are
170
- awaited, persistent loading fails the flow, visible actions retain a stable
171
- 500 ms video interval, and context-wide click/drag video visualization is
172
- installed with bounded click pacing.
173
- 7. Completed test runs report clickable screenshot, video, and trace links
174
- whenever those artifacts exist.
175
- 8. Timeout tests identify the last browser stage, launcher progress remains
176
- available when full RPC logging is disabled, and process-tree tests prove a
177
- descendant is terminated without signalling unrelated processes.
178
- 9. Suite tests/typecheck, host checks, and suite sync pass.
179
-
180
- ## Real-browser regression test
181
-
182
- The repository includes a local mock-page E2E that launches real Chromium and
183
- asserts PNG screenshots, WebM video, sanitized trace output, and absolute
184
- path/`file:` URI metadata:
185
-
186
- ```bash
187
- npx playwright install chromium
188
- npm run test:browser-qa-e2e
189
- ```
190
-
191
- Normal suite tests keep this case skipped; the Publish workflow runs it on
192
- Linux after installing Chromium. The runner writes into a temporary simulated
193
- sub-agent directory. For manual inspection only, explicit E2E runs copy the
194
- latest artifacts to `.pi/qa-runs/browser-qa-e2e/latest/` and print clickable
195
- links; this test-only published copy is not the runtime storage contract. Set
196
- `BROWSER_QA_KEEP_EVIDENCE=0` to skip that copy.