pi-ui-extend 1.0.41 → 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 (236) hide show
  1. package/README.md +50 -13
  2. package/dist/app/app.d.ts +13 -0
  3. package/dist/app/app.js +158 -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 +4 -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 +57 -35
  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 +15 -1
  17. package/dist/app/commands/command-session-actions.js +9 -3
  18. package/dist/app/commands/reload-context-inventory.d.ts +11 -0
  19. package/dist/app/commands/reload-context-inventory.js +70 -0
  20. package/dist/app/extensions/extension-actions-controller.d.ts +1 -0
  21. package/dist/app/extensions/extension-actions-controller.js +6 -0
  22. package/dist/app/extensions/subagent-catalog-state.d.ts +9 -0
  23. package/dist/app/extensions/subagent-catalog-state.js +23 -0
  24. package/dist/app/input/autocomplete-controller.js +61 -34
  25. package/dist/app/input/input-action-controller.d.ts +2 -0
  26. package/dist/app/input/input-action-controller.js +8 -1
  27. package/dist/app/input/input-controller.d.ts +2 -1
  28. package/dist/app/input/input-controller.js +7 -2
  29. package/dist/app/input/prompt-enhancer-controller.js +53 -35
  30. package/dist/app/input/voice-controller.d.ts +41 -45
  31. package/dist/app/input/voice-controller.js +351 -419
  32. package/dist/app/model/model-usage-controller.js +17 -7
  33. package/dist/app/model/model-usage-status.d.ts +4 -1
  34. package/dist/app/model/model-usage-status.js +270 -46
  35. package/dist/app/popup/menu-items-controller.d.ts +13 -3
  36. package/dist/app/popup/menu-items-controller.js +37 -21
  37. package/dist/app/popup/popup-action-controller.d.ts +12 -2
  38. package/dist/app/popup/popup-action-controller.js +77 -24
  39. package/dist/app/popup/popup-menu-controller.d.ts +36 -14
  40. package/dist/app/popup/popup-menu-controller.js +239 -69
  41. package/dist/app/rendering/dcp-stats.d.ts +9 -4
  42. package/dist/app/rendering/dcp-stats.js +40 -425
  43. package/dist/app/rendering/editor-panels.js +10 -4
  44. package/dist/app/rendering/popup-menu-renderer.d.ts +3 -5
  45. package/dist/app/rendering/popup-menu-renderer.js +42 -37
  46. package/dist/app/rendering/render-controller.js +23 -2
  47. package/dist/app/rendering/status-line-renderer.d.ts +5 -0
  48. package/dist/app/rendering/status-line-renderer.js +41 -5
  49. package/dist/app/rendering/tab-line-renderer.js +26 -20
  50. package/dist/app/runtime.d.ts +12 -1
  51. package/dist/app/runtime.js +120 -12
  52. package/dist/app/screen/mouse-controller.d.ts +2 -0
  53. package/dist/app/screen/mouse-controller.js +17 -7
  54. package/dist/app/screen/status-controller.d.ts +4 -0
  55. package/dist/app/screen/status-controller.js +5 -0
  56. package/dist/app/session/lazy-session-manager.js +34 -0
  57. package/dist/app/session/session-event-controller.d.ts +1 -0
  58. package/dist/app/session/session-event-controller.js +10 -1
  59. package/dist/app/session/session-history.d.ts +1 -0
  60. package/dist/app/session/session-history.js +12 -1
  61. package/dist/app/session/session-lifecycle-controller.d.ts +7 -1
  62. package/dist/app/session/session-lifecycle-controller.js +16 -1
  63. package/dist/app/session/tabs-controller.d.ts +26 -1
  64. package/dist/app/session/tabs-controller.js +454 -147
  65. package/dist/app/subagents/subagents-files.js +60 -1
  66. package/dist/app/subagents/subagents-model.d.ts +1 -0
  67. package/dist/app/subagents/subagents-model.js +18 -2
  68. package/dist/app/subagents/subagents-widget-controller.d.ts +1 -0
  69. package/dist/app/subagents/subagents-widget-controller.js +6 -0
  70. package/dist/app/types.d.ts +16 -1
  71. package/dist/app/workspace/workspace-actions-controller.js +10 -2
  72. package/dist/app/workspace/workspace-undo.d.ts +1 -0
  73. package/dist/app/workspace/workspace-undo.js +1 -0
  74. package/dist/bundled-extensions/question/index.js +9 -1
  75. package/dist/bundled-extensions/question/remote.d.ts +4 -0
  76. package/dist/bundled-extensions/question/remote.js +33 -0
  77. package/dist/bundled-extensions/telegram-connector/bot.d.ts +43 -0
  78. package/dist/bundled-extensions/telegram-connector/bot.js +166 -0
  79. package/dist/bundled-extensions/telegram-connector/config.d.ts +8 -0
  80. package/dist/bundled-extensions/telegram-connector/config.js +87 -0
  81. package/dist/bundled-extensions/telegram-connector/coordinator.d.ts +66 -0
  82. package/dist/bundled-extensions/telegram-connector/coordinator.js +413 -0
  83. package/dist/bundled-extensions/telegram-connector/index.d.ts +3 -0
  84. package/dist/bundled-extensions/telegram-connector/index.js +195 -0
  85. package/dist/bundled-extensions/terminal-bell/index.d.ts +0 -8
  86. package/dist/bundled-extensions/terminal-bell/index.js +0 -76
  87. package/dist/bundled-extensions/workspace-undo/index.d.ts +26 -0
  88. package/dist/bundled-extensions/workspace-undo/index.js +191 -0
  89. package/dist/config.d.ts +21 -2
  90. package/dist/config.js +159 -32
  91. package/dist/default-pix-config.js +25 -5
  92. package/dist/schemas/index.d.ts +1 -0
  93. package/dist/schemas/index.js +1 -0
  94. package/dist/schemas/pi-tools-suite-schema.d.ts +88 -62
  95. package/dist/schemas/pi-tools-suite-schema.js +54 -83
  96. package/dist/schemas/pix-schema.d.ts +19 -2
  97. package/dist/schemas/pix-schema.js +47 -5
  98. package/dist/schemas/tasks-schema.d.ts +18 -0
  99. package/dist/schemas/tasks-schema.js +41 -0
  100. package/docs/concurrency.md +9 -1
  101. package/docs/desktop-mvp.md +22 -6
  102. package/docs/desktop-task-manager.md +148 -84
  103. package/docs/release.md +30 -6
  104. package/external/pi-tools-suite/README.md +197 -84
  105. package/external/pi-tools-suite/docs/evals.md +1 -1
  106. package/external/pi-tools-suite/docs/session-recovery.md +47 -14
  107. package/external/pi-tools-suite/docs/subagent-model-pools.md +48 -30
  108. package/external/pi-tools-suite/docs/ui-qa-subagent.md +440 -0
  109. package/external/pi-tools-suite/package.json +6 -1
  110. package/external/pi-tools-suite/src/antigravity-auth/auth-store.ts +2 -1
  111. package/external/pi-tools-suite/src/antigravity-auth/constants.ts +9 -3
  112. package/external/pi-tools-suite/src/antigravity-auth/headers.ts +41 -3
  113. package/external/pi-tools-suite/src/antigravity-auth/models.ts +94 -21
  114. package/external/pi-tools-suite/src/antigravity-auth/oauth.ts +5 -17
  115. package/external/pi-tools-suite/src/antigravity-auth/payload.ts +72 -7
  116. package/external/pi-tools-suite/src/antigravity-auth/stream.ts +13 -1
  117. package/external/pi-tools-suite/src/async-subagents/agents/frontier-review.md +23 -0
  118. package/external/pi-tools-suite/src/async-subagents/agents/implement.md +1 -1
  119. package/external/pi-tools-suite/src/async-subagents/agents/presets.jsonc +16 -0
  120. package/external/pi-tools-suite/src/async-subagents/agents/research.md +5 -3
  121. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/backends/browser.mjs +346 -0
  122. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/backends/desktop.mjs +1038 -0
  123. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/backends/tui.mjs +759 -0
  124. package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/scripts/browser-qa-runner.mjs +32 -23
  125. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/chrome-devtools/chrome-devtools-provider.mjs +895 -0
  126. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/linux/linux-atspi.py +494 -0
  127. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/macos/macos-accessibility.swift +1085 -0
  128. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/native-terminal/bridge-client.mjs +50 -0
  129. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/native-terminal/native-terminal-host.mjs +501 -0
  130. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/drivers/windows/windows-uia.ps1 +454 -0
  131. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser-auth.md +114 -0
  132. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser-chrome-devtools.md +91 -0
  133. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser-playwright.md +145 -0
  134. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/browser.md +82 -0
  135. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop-linux.md +26 -0
  136. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop-macos.md +29 -0
  137. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop-windows.md +23 -0
  138. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/desktop.md +54 -0
  139. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/tui-native-terminal.md +59 -0
  140. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/tui-pty.md +37 -0
  141. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/guides/tui.md +60 -0
  142. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa/scripts/ui-qa-runner.mjs +535 -0
  143. package/external/pi-tools-suite/src/async-subagents/agents/ui-qa.md +75 -0
  144. package/external/pi-tools-suite/src/async-subagents/commands.ts +15 -71
  145. package/external/pi-tools-suite/src/async-subagents/core/activity.ts +33 -0
  146. package/external/pi-tools-suite/src/async-subagents/core/agent-catalog.ts +5 -4
  147. package/external/pi-tools-suite/src/async-subagents/core/agent-strategy.ts +1 -1
  148. package/external/pi-tools-suite/src/async-subagents/core/agents-dir.ts +8 -5
  149. package/external/pi-tools-suite/src/async-subagents/core/browser-qa.ts +16 -2
  150. package/external/pi-tools-suite/src/async-subagents/core/config.ts +160 -327
  151. package/external/pi-tools-suite/src/async-subagents/core/model-selection.ts +2 -1
  152. package/external/pi-tools-suite/src/async-subagents/core/registry.ts +158 -33
  153. package/external/pi-tools-suite/src/async-subagents/core/routing.ts +21 -5
  154. package/external/pi-tools-suite/src/async-subagents/core/spawn.ts +40 -26
  155. package/external/pi-tools-suite/src/async-subagents/core/state.ts +40 -0
  156. package/external/pi-tools-suite/src/async-subagents/core/types.ts +7 -0
  157. package/external/pi-tools-suite/src/async-subagents/core/ultrawork-auto.ts +51 -45
  158. package/external/pi-tools-suite/src/async-subagents/index.ts +69 -5
  159. package/external/pi-tools-suite/src/async-subagents/lib.ts +16 -9
  160. package/external/pi-tools-suite/src/async-subagents/tools/spawn.ts +8 -5
  161. package/external/pi-tools-suite/src/async-subagents/tools/subagents.ts +5 -4
  162. package/external/pi-tools-suite/src/async-subagents/types.ts +1 -0
  163. package/external/pi-tools-suite/src/coding-discipline/index.ts +90 -59
  164. package/external/pi-tools-suite/src/config.ts +55 -1
  165. package/external/pi-tools-suite/src/context-gateway/accounting-log.ts +282 -0
  166. package/external/pi-tools-suite/src/context-gateway/config.ts +77 -3
  167. package/external/pi-tools-suite/src/context-gateway/efficiency.ts +414 -0
  168. package/external/pi-tools-suite/src/context-gateway/enforcement.ts +222 -0
  169. package/external/pi-tools-suite/src/context-gateway/index.ts +206 -19
  170. package/external/pi-tools-suite/src/context-gateway/storeless-capabilities.ts +7 -7
  171. package/external/pi-tools-suite/src/context-gateway/telemetry.ts +101 -28
  172. package/external/pi-tools-suite/src/context-gateway/types.ts +16 -3
  173. package/external/pi-tools-suite/src/context-inventory.ts +99 -0
  174. package/external/pi-tools-suite/src/dcp/auto-compress-budget.ts +39 -4
  175. package/external/pi-tools-suite/src/dcp/auto-compress.ts +128 -49
  176. package/external/pi-tools-suite/src/dcp/commands.ts +32 -156
  177. package/external/pi-tools-suite/src/dcp/compress-tool.ts +177 -46
  178. package/external/pi-tools-suite/src/dcp/compression-blocks.ts +6 -58
  179. package/external/pi-tools-suite/src/dcp/compression-preview.ts +9 -0
  180. package/external/pi-tools-suite/src/dcp/compression-progress.ts +22 -0
  181. package/external/pi-tools-suite/src/dcp/config.ts +114 -17
  182. package/external/pi-tools-suite/src/dcp/conversation-index.ts +36 -9
  183. package/external/pi-tools-suite/src/dcp/diagnostics.ts +41 -0
  184. package/external/pi-tools-suite/src/dcp/fresh-tool-results.ts +38 -0
  185. package/external/pi-tools-suite/src/dcp/index.ts +338 -66
  186. package/external/pi-tools-suite/src/dcp/journal.ts +126 -4
  187. package/external/pi-tools-suite/src/dcp/progress-controller.ts +2 -1
  188. package/external/pi-tools-suite/src/dcp/prompts.ts +83 -192
  189. package/external/pi-tools-suite/src/dcp/protected-continuity.ts +175 -0
  190. package/external/pi-tools-suite/src/dcp/pruner-candidates.ts +93 -3
  191. package/external/pi-tools-suite/src/dcp/pruner-message-ids.ts +6 -10
  192. package/external/pi-tools-suite/src/dcp/pruner-nudge.ts +36 -33
  193. package/external/pi-tools-suite/src/dcp/pruner-tools.ts +6 -3
  194. package/external/pi-tools-suite/src/dcp/pruner.ts +1 -0
  195. package/external/pi-tools-suite/src/dcp/routine-pressure.ts +86 -0
  196. package/external/pi-tools-suite/src/dcp/state.ts +9 -0
  197. package/external/pi-tools-suite/src/dcp/statistics.d.ts +8 -0
  198. package/external/pi-tools-suite/src/dcp/statistics.js +156 -0
  199. package/external/pi-tools-suite/src/default-pi-tools-suite-config.ts +78 -22
  200. package/external/pi-tools-suite/src/index.ts +7 -1
  201. package/external/pi-tools-suite/src/lib/project.ts +36 -1
  202. package/external/pi-tools-suite/src/model-tools/index.ts +10 -7
  203. package/external/pi-tools-suite/src/repo-discovery/index.ts +304 -4
  204. package/external/pi-tools-suite/src/resource-registry/index.ts +2551 -0
  205. package/external/pi-tools-suite/src/session-recovery/index.ts +17 -0
  206. package/external/pi-tools-suite/src/shell-command-policy.ts +219 -0
  207. package/external/pi-tools-suite/src/todo/index.ts +21 -0
  208. package/external/pi-tools-suite/src/todo/todo.ts +19 -1
  209. package/external/pi-tools-suite/src/tool-descriptions.ts +47 -19
  210. package/package.json +10 -9
  211. package/schemas/pi-tools-suite.json +466 -287
  212. package/schemas/pix.json +129 -11
  213. package/schemas/tasks.json +131 -0
  214. package/skills/simplify/SKILL.md +33 -5
  215. package/docs/desktop-markdown-media.md +0 -77
  216. package/external/pi-tools-suite/docs/browser-qa-subagent.md +0 -177
  217. package/external/pi-tools-suite/docs/dcp-emergency-current-turn.md +0 -102
  218. package/external/pi-tools-suite/src/async-subagents/agents/browser-qa.md +0 -598
  219. package/external/pi-tools-suite/src/async-subagents/async-subagents.sample.jsonc +0 -54
  220. package/external/pi-tools-suite/src/skill-installer/index.ts +0 -333
  221. package/skills/playwright-cli/SKILL.md +0 -420
  222. package/skills/playwright-cli/references/element-attributes.md +0 -23
  223. package/skills/playwright-cli/references/playwright-tests.md +0 -50
  224. package/skills/playwright-cli/references/request-mocking.md +0 -87
  225. package/skills/playwright-cli/references/running-code.md +0 -241
  226. package/skills/playwright-cli/references/session-management.md +0 -273
  227. package/skills/playwright-cli/references/spec-driven-testing.md +0 -311
  228. package/skills/playwright-cli/references/storage-state.md +0 -290
  229. package/skills/playwright-cli/references/test-generation.md +0 -142
  230. package/skills/playwright-cli/references/tracing.md +0 -154
  231. package/skills/playwright-cli/references/video-recording.md +0 -147
  232. package/skills/spec-lite/SKILL.md +0 -140
  233. /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/examples/qa-auth.example.jsonc +0 -0
  234. /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/examples/qa-flow.example.jsonc +0 -0
  235. /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/vendor/fflate.LICENSE +0 -0
  236. /package/external/pi-tools-suite/src/async-subagents/agents/{browser-qa → ui-qa/browser}/vendor/fflate.mjs +0 -0
@@ -2,123 +2,187 @@
2
2
 
3
3
  ## Type
4
4
 
5
- Change
5
+ As-is
6
+
7
+ ## Lifecycle
8
+
9
+ Active current contract.
6
10
 
7
11
  ## Goal
8
12
 
9
- Add a project-scoped task list to Pix Desktop in a persistent left sidebar and
10
- allow a saved task to start work immediately in a new session tab.
13
+ Provide a project-scoped task list in Pix Desktop and let a saved task start or
14
+ reopen work in a Desktop session without conflating project tasks with the
15
+ agent's session-local todo list.
11
16
 
12
17
  ## Scope
13
18
 
14
- - A collapsible, resizable left sidebar with `Tasks` and `Project` tabs.
15
- - A compact task list with create, edit, delete, filtering, and manual status
16
- changes.
17
- - Task type (`bug`, `feature`, `improvement`), status (`backlog`, `todo`,
18
- `in-progress`, `done`), and priority (`low`, `medium`, `high`, `urgent`).
19
- - Project-local persistence in `.pi/tasks.json` with a versioned schema.
20
- - Starting a task in a new ACP session, automatically sending a generated
21
- prompt, marking the task in progress, and storing the new session id.
22
- - Opening an already-linked session instead of creating a duplicate.
19
+ - A collapsible, resizable left activity sidebar whose project-scoped views
20
+ include `Tasks` and `Project` alongside other workspace views.
21
+ - Create, edit, delete, manual status changes, drag reordering, and moving tasks
22
+ between type groups.
23
+ - Create an untitled task directly from the normal message composer through its
24
+ overflow menu, carrying the current draft text and attachments without
25
+ sending a prompt.
26
+ - Task type (`bug`, `feature`, `improvement`) and status (`backlog`, `todo`,
27
+ `in-progress`, `done`).
28
+ - Persisted priority (`low`, `medium`, `high`, `urgent`). New tasks currently
29
+ receive `medium`; priority is not exposed by the current task editor or rows.
30
+ - Project-local persistence in `.pi/tasks.jsonc` with a versioned schema.
31
+ - Starting an unlinked task in a new ACP session and reopening an already-linked
32
+ session instead of creating a duplicate.
33
+ - Task descriptions can contain attachment markers; those attachments are
34
+ resolved when the task prompt is built.
23
35
 
24
36
  ## Non-goals
25
37
 
26
- - Kanban, drag and drop, subtasks, dependencies, assignees, due dates,
27
- comments, or task history.
38
+ - Kanban columns, subtasks, dependencies, assignees, due dates, comments, or
39
+ task history.
40
+ - Task filtering controls in the current sidebar UI.
41
+ - Editing or displaying priority in the current sidebar UI.
28
42
  - Automatic transition to `done` when an agent turn finishes.
29
- - Synchronizing the project task file with the agent's session-local todo list.
43
+ - Synchronizing `.pi/tasks.jsonc` with the agent's session-local todo list.
30
44
  - Concurrent multi-window file merging.
31
45
 
32
46
  ## Behavior
33
47
 
34
- 1. The sidebar is visible below the title/session chrome, starts on `Tasks`,
35
- remembers its width and collapsed state locally, and preserves the main
36
- session workspace at narrow window sizes.
37
- 2. Task rows show a title, type, status, priority, and actions. Status and
38
- priority are communicated by a Lucide icon, text, and color so meaning never
39
- depends on color alone. `done` is green, `in-progress` is yellow, and idle
40
- states are neutral; all colors support light and dark themes.
41
- 3. Creating or editing validates a non-empty title. A description is optional.
42
- 4. Filters affect only the visible list and do not modify persisted ordering.
43
- 5. A missing `.pi/tasks.json` is treated as an empty version-1 document.
44
- 6. Starting an unlinked task creates and selects a new ACP session, persists
45
- its id and `in-progress` status, appends the generated user prompt to the
46
- transcript, and sends it immediately.
47
- 7. Starting a linked task loads that session. A missing/stale linked session is
48
- reported as a recoverable error and does not silently create another one.
49
- 8. Task completion remains manual.
48
+ 1. On first use the sidebar starts on `Tasks`; afterward it restores the last
49
+ active sidebar view. It remembers its width/collapsed state locally and keeps
50
+ a compact activity rail available while collapsed.
51
+ 2. Tasks are grouped by type. Dragging a task reorders it; dropping it into a
52
+ different group also changes its type and updates `updatedAt`.
53
+ 3. Task rows show the title when present. Untitled tasks use the first line of
54
+ description as their display label, or `Untitled task` when they contain only
55
+ attachments. Rows also show status, session/run action, edit, and delete
56
+ controls. Status uses icon, text, and color rather than color alone.
57
+ 4. Manual creation through the task editor still requires a non-empty title.
58
+ Tasks start with status `todo` and priority `medium`, and may include
59
+ description text and attachments. Newly selected/pasted task attachments are
60
+ persisted into `.pi/task-attachments` so the task owns its files. Existing
61
+ untitled composer-captured tasks may be edited without inventing a title as
62
+ long as description content or attachments remain.
63
+ 5. Editing changes title, description, and type. Status is changed separately.
64
+ Existing persisted priority is preserved.
65
+ 6. `.pi/tasks.jsonc` is authoritative. Missing `.pi`/task storage produces an
66
+ empty version-1 document. JSONC comments and trailing commas are accepted.
67
+ 7. Only `.pi/tasks.jsonc` is recognized as task storage. Other sibling task
68
+ files are ignored; Pix does not import, migrate, delete, or interpret them.
69
+ 8. Starting an unlinked task creates/selects a new ACP session, persists its
70
+ session id, changes any non-`done` task to `in-progress`, preserves `done`,
71
+ appends the generated task prompt, and sends it immediately.
72
+ 9. Starting a linked task opens that session. A stale/missing linked session is
73
+ a recoverable error and does not silently create another session.
74
+ 10. Task completion remains manual.
75
+ 11. The normal message composer's vertical-ellipsis menu exposes `Create task`
76
+ whenever the current draft has text, attachments, or active voice input.
77
+ Voice input is finalized first. The resulting task has an empty persisted
78
+ title, type `feature`, status `todo`, priority `medium`, and stores the
79
+ composer text plus attachment markers in its description. The prompt is not
80
+ sent to the agent. Composer attachments are persisted into
81
+ `.pi/task-attachments` before those markers are written; path-backed files
82
+ are copied there and pathless images are materialized from their bytes.
83
+ 12. After composer task persistence succeeds, Pix expands/selects the Tasks
84
+ sidebar view, scrolls the newly created task into view, highlights it, and
85
+ clears the composer only if the draft is still the exact draft that was
86
+ captured for task creation. A failed save or edits made while the save is in
87
+ flight preserve the composer.
88
+ 13. After a task-document write succeeds, Pix prunes regular files from
89
+ `.pi/task-attachments` that are no longer referenced by any remaining task.
90
+ Shared attachments stay on disk until the last task reference is removed.
91
+ 14. Every successful task-document write also marks the Registry `tasks` project
92
+ artifact dirty for background synchronization. Rapid task mutations are
93
+ debounced/coalesced; a failed local write never enters the remote sync queue.
94
+ If the Registry session is busy, the dirty task state remains pending until
95
+ an idle sync window is available.
50
96
 
51
97
  ## Contracts
52
98
 
53
- - Project file: `.pi/tasks.json` containing `{ version: 1, tasks: [...] }`.
54
- - Every task has a unique id, title, type, status, priority, `createdAt`, and
55
- `updatedAt`; description and `sessionId` may be omitted.
56
- - Tauri exposes narrow read/write commands for this one file. Workspace paths
57
- are validated and `.pi` symlinks may not escape the workspace.
58
- - The webview sends a complete validated document on each mutation. Writes use
59
- a same-directory temporary file and replacement to avoid partial JSON.
99
+ - Project file: `.pi/tasks.jsonc`.
100
+ - Document shape: optional `$schema`, `version: 1`, and `tasks`.
101
+ - Each task has a unique id, string title, type, status, priority, `createdAt`,
102
+ and `updatedAt`; description and `sessionId` are optional. The title may be an
103
+ empty string only when description content is present.
104
+ - Unknown fields, duplicate ids, unsupported enum values, completely empty task
105
+ content, malformed timestamps, unsupported versions, and oversized documents
106
+ are rejected.
107
+ - The Tauri backend confines task paths to the active workspace, rejects escape
108
+ through `.pi` symlinks, and caps the document at 1 MB.
109
+ - Writes validate the complete document, write a same-directory temporary file,
110
+ and replace the target to avoid partial JSONC files.
60
111
 
61
112
  ## Invariants
62
113
 
63
- - The task document version must be supported before it is displayed or saved.
64
- - Duplicate ids, unknown enum values, empty titles, and malformed timestamps
65
- are rejected.
66
- - A task is linked to at most one session in this MVP.
67
- - Starting a task is disabled while another prompt/session operation is active.
68
- - A failed save does not leave the UI claiming a task state that was not
69
- persisted.
114
+ - Failed validation never replaces the task file.
115
+ - Failed persistence restores the previous in-memory task document.
116
+ - Composer task creation never clears a newer draft that changed while task
117
+ persistence was in flight.
118
+ - Task attachments are persisted through the same task-description marker
119
+ format used by the task editor, and newly attached files are owned by the
120
+ project's `.pi/task-attachments` storage so running the task restores them
121
+ without depending on the expiring chat cache or original source path.
122
+ - Attachment cleanup runs only after the replacement `tasks.jsonc` has been
123
+ committed successfully. Cleanup is reference-based across the complete task
124
+ document and never deletes paths outside `.pi/task-attachments`.
125
+ - Create/edit/delete/status/reorder/session-link task mutations all flow through
126
+ the same save method, so they share the same background Registry scheduling
127
+ semantics.
128
+ - A task is linked to at most one session.
129
+ - Running/reordering/editing is disabled while conflicting task/session work is
130
+ active.
131
+ - Dragging between groups changes only ordering/type; other task fields survive.
70
132
 
71
133
  ## Edge cases
72
134
 
73
- - Switching workspaces discards the previous workspace's in-memory task view
74
- and loads the new project file.
75
- - Empty and missing files have distinct behavior: missing means no tasks;
76
- malformed or empty JSON is an error.
77
- - Save, session creation, and prompt failures remain visible and retryable.
78
- - Collapsing the sidebar keeps its tab rail available; choosing a tab expands
79
- it.
135
+ - Switching workspaces discards the previous in-memory task view and loads the
136
+ new project's task document.
137
+ - Missing storage means no tasks; malformed or empty `.pi/tasks.jsonc` is an error.
138
+ - Unsupported sibling task files do not participate in task loading.
139
+ - Save, session creation, attachment preparation, and prompt failures remain
140
+ visible and retryable.
80
141
 
81
142
  ## Related files
82
143
 
83
- - `desktop/src/App.svelte`
84
- - `desktop/src/components/`
85
- - `desktop/src/lib/`
86
- - `desktop/src/styles.css`
144
+ - `desktop/src/app/project-actions.svelte.ts`
145
+ - `desktop/src/app/desktop-project-action-services.ts`
146
+ - `desktop/src/components/PromptComposerActionsMenu.svelte`
147
+ - `desktop/src/components/WorkspaceSidebar.svelte`
148
+ - `desktop/src/components/workspace-sidebar-layout-controller.svelte.ts`
149
+ - `desktop/src/components/workspace-sidebar-task-drag-controller.svelte.ts`
150
+ - `desktop/src/components/WorkspaceSidebarTasksPanel.svelte`
151
+ - `desktop/src/components/WorkspaceSidebarTaskEditor.svelte`
152
+ - `desktop/src/lib/attachments.ts`
153
+ - `desktop/src/lib/attachments.test.ts`
154
+ - `desktop/src/lib/project-tasks.ts`
155
+ - `desktop/src/lib/project-tasks.test.ts`
87
156
  - `desktop/src-tauri/src/lib.rs`
157
+ - `src/schemas/tasks-schema.ts`
88
158
 
89
159
  ## Verification
90
160
 
91
- - Unit tests for task parsing, validation, filtering, prompt generation, and
92
- sidebar preference parsing.
93
- - Rust tests for missing/read/write/malformed files and workspace escape.
94
- - `npm --prefix desktop test`
95
- - `npm --prefix desktop run check`
96
- - `npm --prefix desktop run build:web`
97
- - `cargo test --manifest-path desktop/src-tauri/Cargo.toml`
161
+ - `desktop/src/lib/project-tasks.test.ts` covers untitled composer task creation,
162
+ parsing, prompt generation, and drag/reorder semantics.
163
+ - `desktop/src/lib/attachments.test.ts` covers data-URL decoding used when a
164
+ pathless composer image is persisted into project task storage.
165
+ - Rust tests in `desktop/src-tauri/src/lib.rs` cover missing/read/write/malformed
166
+ JSONC, validation, workspace confinement, and ignoring unsupported task files.
167
+ - Run `npm --prefix desktop test`, `npm --prefix desktop run check`, and
168
+ `cargo test --manifest-path desktop/src-tauri/Cargo.toml`.
98
169
 
99
170
  ## Risks / unknowns
100
171
 
101
- - Whole-document writes assume one active desktop writer per project.
102
- - A linked session may later be removed outside Pix Desktop; the first version
103
- reports this rather than automatically unlinking it.
104
- - Windows replacement semantics may require a fallback around replacing an
105
- existing task file while retaining best-effort crash safety.
172
+ - Whole-document writes assume one active writer per project; multi-window merge
173
+ semantics remain out of scope.
174
+ - A linked session can be removed outside Pix Desktop and remains linked until
175
+ the user repairs or edits the task.
176
+ - Priority remains part of the persisted schema although the current UI does not
177
+ expose priority editing.
106
178
 
107
179
  ## Evidence
108
180
 
109
- - Confirmed by code: desktop session creation/loading and prompt submission are
110
- orchestrated in `desktop/src/App.svelte` through `AcpClient`.
111
- - Confirmed by code: Tauri already validates workspace-contained project file
112
- reads in `desktop/src-tauri/src/lib.rs`.
113
- - Confirmed by tests: session tab ordering and ACP request behavior have focused
114
- Vitest coverage under `desktop/src/lib/`.
115
- - Confirmed by docs: `DESIGN.md` specifies a compact persistent sidebar,
116
- semantic theme roles, Lucide icons, and non-color status cues.
117
- - Implemented: `.pi/tasks.json` now has an explicit version-1 contract and
118
- rejects unsupported versions rather than guessing a migration.
119
- - Verified by tests: all 82 desktop Vitest tests and all 8 Rust tests pass;
120
- Svelte/TypeScript checks report no errors or warnings.
121
- - Verified visually: browser QA covered clean preference state, resize/collapse,
122
- tabs, filters, and semantic colors in light/dark themes.
123
- - Verified natively: actual Tauri UI/backend CRUD, Run, persisted linkage,
124
- Open session without duplication, and delete cleanup all passed.
181
+ - Confirmed by code: `desktop/src/app/project-actions.svelte.ts`,
182
+ `desktop/src/app/desktop-project-action-services.ts`, the extracted composer/
183
+ sidebar task surfaces, and `desktop/src/lib/project-tasks.ts` implement the
184
+ current task lifecycle and composer capture action.
185
+ - Confirmed by code: `desktop/src-tauri/src/lib.rs` owns JSONC persistence,
186
+ validation, confinement, atomic replacement, and ignores unsupported sibling
187
+ task-storage formats.
188
+ - Confirmed by tests: project-task unit tests and Tauri task persistence tests.
package/docs/release.md CHANGED
@@ -13,15 +13,39 @@ npm run smoke-test
13
13
  `release:check` runs type checking, the test suite, a production build, and `npm pack --dry-run`.
14
14
  `smoke-test` packs the real tarball, installs it into an isolated temp directory, checks the bundled files, and runs non-interactive `pix` commands from the installed package.
15
15
 
16
- ## Publish a new npm version
16
+ ## CI regression guardrails
17
17
 
18
- Pix uses the same release style as `indexer-cli`: a local command bumps the version, smoke-tests the tarball, then pushes the release commit and tag. GitHub Actions publishes the tag to npm using the `NPM_TOKEN` repository secret.
18
+ The normative CI invariants are recorded in [`specs/ci-release.md`](../specs/ci-release.md). This section is the operational checklist for release work.
19
19
 
20
- One-time setup:
20
+ The GitHub Actions release workflow has two different responsibilities and they should stay separate:
21
21
 
22
- ```bash
23
- gh secret set NPM_TOKEN
24
- ```
22
+ - `build-and-test` runs on Ubuntu, macOS, and Windows. This is the cross-platform correctness gate: type checks, unit/integration tests, platform-specific host checks, and the Pix build belong here.
23
+ - Package smoke tests validate the artifact a user actually installs. Run the full payload/tarball smoke test on Ubuntu, and a smaller pack/install/CLI sanity check on Windows. A separate macOS package smoke job is unnecessary unless packaging gains macOS-specific behavior.
24
+
25
+ Keep CI tests deterministic across runner speed and operating systems:
26
+
27
+ - Assert explicit byte/count/state thresholds instead of assuming a background producer will do enough work within a short wall-clock interval. For example, a truncation test should write a fixed amount greater than the limit rather than write repeatedly for 300 ms and assume the runner will exceed the limit.
28
+ - Use timers only when timeout behavior itself is the contract. Do not use elapsed time as a proxy for produced output, process progress, or cleanup completion.
29
+ - When a test needs asynchronous process teardown, wait for an observable owned-process condition rather than relying on a short sleep.
30
+ - Run configuration-sensitive suite checks with an isolated `HOME` when reproducing CI locally. User-level Pix/pi-tools-suite config can intentionally change DCP and other opt-in behavior and must not be mistaken for a CI regression.
31
+
32
+ Windows process tests have additional invariants:
33
+
34
+ - `@lydell/node-pty` on Windows does not support POSIX signal arguments to `kill`; terminate an owned Windows PTY with signal-less `kill()` and release its ConPTY resources.
35
+ - Browser/process cleanup must stay ownership-scoped. When a PowerShell helper discovers descendants, it must not select or terminate itself; kill owned child roots recursively and verify cleanup before returning.
36
+ - Treat CRLF/LF differences as presentation differences unless line endings are the behavior under test.
37
+
38
+ Package smoke assertions should check stable package contracts. If a bundled guide title, required payload path, CLI entry point, or other intentionally asserted artifact changes, update the corresponding smoke assertion in the same change. Do not remove the smoke test merely because ordinary source tests are green: source tests do not prove that `npm pack` contains an installable, runnable artifact.
39
+
40
+ Current implementation:
41
+
42
+ - `.github/workflows/publish.yml` owns the CI matrix and release gates.
43
+ - `scripts/smoke-test-package.sh` is the full packed-artifact/payload smoke test.
44
+ - `scripts/smoke-test-package-cli.mjs` is the cross-platform pack/install/CLI sanity check used on Windows.
45
+
46
+ ## Publish a new npm version
47
+
48
+ Pix uses the same release style as `indexer-cli`: a local command bumps the version, smoke-tests the tarball, then pushes the release commit and tag. GitHub Actions publishes the tag to npm using npm trusted publishing (GitHub OIDC), so the publish job does not require a long-lived `NPM_TOKEN` secret.
25
49
 
26
50
  Release commands:
27
51