@pi-unipi/unipi 3.0.0-alpha.3 → 3.0.0-alpha.5

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 (161) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +4 -7
  3. package/package.json +21 -23
  4. package/packages/ask-user/package.json +2 -2
  5. package/packages/autocomplete/package.json +1 -1
  6. package/packages/autocomplete/src/constants.ts +25 -17
  7. package/packages/autocomplete/src/sorting.ts +8 -0
  8. package/packages/background-tasks/package.json +2 -2
  9. package/packages/btw/package.json +2 -2
  10. package/packages/compactor/README.md +59 -286
  11. package/packages/compactor/package.json +5 -9
  12. package/packages/compactor/skills/compactor/SKILL.md +13 -20
  13. package/packages/compactor/src/card.ts +95 -0
  14. package/packages/compactor/src/commands/index.ts +85 -124
  15. package/packages/compactor/src/compaction/compact-args.ts +5 -3
  16. package/packages/compactor/src/compaction/filter-noise.ts +1 -1
  17. package/packages/compactor/src/compaction/hooks.ts +533 -312
  18. package/packages/compactor/src/compaction/jev-prune.ts +114 -0
  19. package/packages/compactor/src/compaction/source.ts +159 -0
  20. package/packages/compactor/src/compaction/summarize.ts +704 -52
  21. package/packages/compactor/src/config/manager.ts +127 -127
  22. package/packages/compactor/src/config/schema.ts +32 -48
  23. package/packages/compactor/src/index.ts +40 -431
  24. package/packages/compactor/src/info-screen.ts +44 -190
  25. package/packages/compactor/src/session/recall-blocks.ts +1 -1
  26. package/packages/compactor/src/stats.ts +76 -0
  27. package/packages/compactor/src/tools/context-budget.ts +17 -34
  28. package/packages/compactor/src/tools/ctx-doctor.ts +45 -36
  29. package/packages/compactor/src/tools/register.ts +29 -269
  30. package/packages/compactor/src/types.ts +48 -186
  31. package/packages/core/compaction-context.ts +41 -0
  32. package/packages/core/constants.ts +11 -30
  33. package/packages/core/events.ts +0 -53
  34. package/packages/core/index.ts +3 -0
  35. package/packages/core/model-cache.ts +81 -7
  36. package/packages/core/package.json +2 -2
  37. package/packages/core/src/jev/chatter.ts +24 -0
  38. package/packages/core/src/jev/settings.ts +177 -14
  39. package/packages/core/src/package-colors.ts +2 -0
  40. package/packages/core/src/settings/catalog.ts +39 -15
  41. package/packages/core/src/settings/hub.ts +44 -10
  42. package/packages/core/src/settings/open.ts +49 -0
  43. package/packages/core/src/settings/schema.ts +8 -4
  44. package/packages/footer/README.md +4 -6
  45. package/packages/footer/package.json +3 -3
  46. package/packages/footer/src/help.ts +1 -1
  47. package/packages/footer/src/index.ts +33 -2
  48. package/packages/footer/src/presets.ts +3 -4
  49. package/packages/footer/src/rendering/icons.ts +0 -20
  50. package/packages/footer/src/segments/compactor.ts +52 -142
  51. package/packages/footer/src/segments/status-ext.ts +0 -1
  52. package/packages/fusion/package.json +3 -3
  53. package/packages/fusion/src/picker.ts +36 -12
  54. package/packages/info-screen/package.json +2 -2
  55. package/packages/input-shortcuts/package.json +2 -2
  56. package/packages/kanboard/package.json +7 -7
  57. package/packages/kanboard/src/runner.ts +31 -2
  58. package/packages/kanboard/src/settings.ts +3 -2
  59. package/packages/long-horizon/index.ts +6 -1
  60. package/packages/long-horizon/package.json +2 -2
  61. package/packages/long-horizon/src/compaction-brief.ts +35 -0
  62. package/packages/long-horizon/src/runtime.ts +6 -1
  63. package/packages/long-horizon/src/settings.ts +22 -37
  64. package/packages/mcp/package.json +2 -2
  65. package/packages/memory/index.ts +4 -0
  66. package/packages/memory/package.json +3 -3
  67. package/packages/notify/package.json +2 -2
  68. package/packages/skill-registry/README.md +55 -16
  69. package/packages/skill-registry/index.ts +223 -0
  70. package/packages/skill-registry/package.json +20 -4
  71. package/packages/skill-registry/src/editor.ts +208 -0
  72. package/packages/skill-registry/src/judge.ts +293 -0
  73. package/packages/skill-registry/src/registry.ts +98 -0
  74. package/packages/skill-registry/src/settings.ts +258 -0
  75. package/packages/skill-registry/src/vault.ts +80 -0
  76. package/packages/subagents/README.md +0 -1
  77. package/packages/subagents/package.json +2 -2
  78. package/packages/subagents/src/index.ts +0 -6
  79. package/packages/unipi/bundled.js +18699 -19679
  80. package/packages/unipi/index.ts +2 -7
  81. package/packages/updater/package.json +2 -2
  82. package/packages/utility/README.md +67 -69
  83. package/packages/utility/package.json +2 -2
  84. package/packages/utility/skills/image/SKILL.md +37 -0
  85. package/packages/utility/skills/utility/SKILL.md +17 -60
  86. package/packages/utility/src/answer/extract.ts +128 -0
  87. package/packages/utility/src/answer/index.ts +213 -0
  88. package/packages/utility/src/answer/reply.ts +133 -0
  89. package/packages/utility/src/answer/web.ts +167 -0
  90. package/packages/utility/src/attach/detect.ts +163 -0
  91. package/packages/utility/src/attach/index.ts +184 -0
  92. package/packages/utility/src/commands.ts +38 -147
  93. package/packages/utility/src/diagnostics/engine.ts +50 -5
  94. package/packages/utility/src/image/index.ts +33 -0
  95. package/packages/utility/src/image/models.ts +221 -0
  96. package/packages/{image/src → utility/src/image}/recognize.ts +2 -2
  97. package/packages/utility/src/image/settings.ts +178 -0
  98. package/packages/{image/src/image-source.ts → utility/src/image/source.ts} +1 -1
  99. package/packages/utility/src/image/tools.ts +168 -0
  100. package/packages/utility/src/image/transports.ts +186 -0
  101. package/packages/utility/src/index.ts +47 -389
  102. package/packages/utility/src/lifecycle/cleanup.ts +116 -311
  103. package/packages/utility/src/rename/gate.ts +102 -0
  104. package/packages/utility/src/rename/index.ts +191 -0
  105. package/packages/utility/src/rename/session.ts +170 -0
  106. package/packages/utility/src/render/parse.ts +156 -0
  107. package/packages/utility/src/render/pi-settings.ts +38 -0
  108. package/packages/utility/src/render/tools.ts +316 -0
  109. package/packages/utility/src/settings.ts +166 -233
  110. package/packages/utility/src/types.ts +1 -222
  111. package/packages/watchdog/index.ts +2 -3
  112. package/packages/watchdog/package.json +3 -3
  113. package/packages/watchdog/src/config.ts +3 -2
  114. package/packages/web-api/package.json +2 -2
  115. package/packages/workflow/package.json +2 -2
  116. package/packages/workflow/src/permission/decide.ts +1 -1
  117. package/packages/workflow/src/permission/index.ts +2 -2
  118. package/packages/workflow/src/permission/settings.ts +4 -1
  119. package/packages/compactor/skills/compactor-detail/SKILL.md +0 -116
  120. package/packages/compactor/skills/compactor-doctor/SKILL.md +0 -71
  121. package/packages/compactor/skills/compactor-stats/SKILL.md +0 -51
  122. package/packages/compactor/src/compaction/build-sections.ts +0 -76
  123. package/packages/compactor/src/compaction/extract/goals.ts +0 -36
  124. package/packages/compactor/src/compaction/extract/preferences.ts +0 -40
  125. package/packages/compactor/src/compaction/format.ts +0 -53
  126. package/packages/compactor/src/compaction/merge.ts +0 -143
  127. package/packages/compactor/src/config/presets.ts +0 -160
  128. package/packages/compactor/src/executor/executor.ts +0 -233
  129. package/packages/compactor/src/executor/runtime.ts +0 -115
  130. package/packages/compactor/src/security/evaluator.ts +0 -89
  131. package/packages/compactor/src/security/policy.ts +0 -96
  132. package/packages/compactor/src/security/scanner.ts +0 -65
  133. package/packages/compactor/src/session/auto-inject.ts +0 -60
  134. package/packages/compactor/src/session/db.ts +0 -325
  135. package/packages/compactor/src/session/extract.ts +0 -144
  136. package/packages/compactor/src/session/resume-inject.ts +0 -64
  137. package/packages/compactor/src/session/snapshot.ts +0 -327
  138. package/packages/compactor/src/tools/ctx-batch-execute.ts +0 -41
  139. package/packages/compactor/src/tools/ctx-execute-file.ts +0 -23
  140. package/packages/compactor/src/tools/ctx-execute.ts +0 -23
  141. package/packages/compactor/src/tools/ctx-stats.ts +0 -96
  142. package/packages/image/README.md +0 -99
  143. package/packages/image/package.json +0 -61
  144. package/packages/image/skills/image/SKILL.md +0 -76
  145. package/packages/image/src/generate.ts +0 -256
  146. package/packages/image/src/index.ts +0 -135
  147. package/packages/image/src/models.ts +0 -519
  148. package/packages/image/src/openai-images-api.ts +0 -282
  149. package/packages/image/src/register-providers.ts +0 -209
  150. package/packages/image/src/settings.ts +0 -173
  151. package/packages/image/src/tools.ts +0 -326
  152. package/packages/subagents/src/badge-session.ts +0 -46
  153. package/packages/subagents/src/badge.ts +0 -43
  154. package/packages/utility/src/analytics/collector.ts +0 -293
  155. package/packages/utility/src/info-screen.ts +0 -80
  156. package/packages/utility/src/lifecycle/process.ts +0 -162
  157. package/packages/utility/src/prefix-cache.ts +0 -263
  158. package/packages/utility/src/skill-discovery.ts +0 -542
  159. package/packages/utility/src/tools/env.ts +0 -113
  160. package/packages/utility/src/tui/name-badge-state.ts +0 -315
  161. package/packages/utility/src/tui/name-badge.ts +0 -109
package/CHANGELOG.md CHANGED
@@ -6,6 +6,70 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [3.0.0-alpha.5] — 2026-09-28
10
+
11
+ ### Breaking Changes
12
+
13
+ - **BREAKING: `@pi-unipi/image` removed.** Image generation, editing and recognition now live in `@pi-unipi/utility` (same `image` settings namespace, so existing configs keep working). **Migration path:** nothing to do with the umbrella package; if you installed `@pi-unipi/image` on its own, remove it and use `@pi-unipi/utility`.
14
+ - **BREAKING: utility slimmed.** Removed `/unipi:reload` (use pi's `/reload`), `/unipi:status`, `/unipi:env`, `/unipi:prefix-cache`, the agent tools `ctx_env` and `set_session_name`, the top name-badge bar, the analytics collector and the process-lifecycle signal handlers. **Migration path:** `/unipi:doctor` covers the health checks; sessions are named automatically (below) or with pi's `/name`. Old `badge.*` settings carry over to `rename.*`.
15
+ - **BREAKING: skill exposure moved** from `utility.skills` to the new `skills` namespace (`@pi-unipi/skill-registry`). Migrated automatically on first read.
16
+
17
+ ### Added
18
+
19
+ - `utility`: `/unipi:retry`, an alias of `/unipi:continue`.
20
+ - `utility`: **automatic session naming.** After each round, jev checks whether the round (your message plus what the agent did) established a subject and, for a named session, whether it moved to a different task; a throwaway session with a single `rename_session` tool writes the name. Greetings never rename; names set with `/name` are never overwritten; Herdr pane/tab sync kept.
21
+ - `utility`: **`/unipi:answer`** — answer the last reply without scrolling: `reply` (default: the reply scrolls above a fixed input box, like `/unipi:btw`), `questions` (one answer per question, Q/A template) or `web` (local form; over SSH it prints the `ssh -L` forward). A hint above the editor says when a reply asks questions.
22
+ - `utility`: **pasted images and files** become `[Image #N]` / `[File #N]` attachments with a chip row above the editor and inline previews in Kitty, Ghostty, iTerm2 and WezTerm; images are sent to the model as images.
23
+ - `utility`: **image tools** `image_generate`, `image_edit` (new) and `image_recognize`, with OpenRouter, fal and custom-endpoint routes, a key per provider, and model pickers filtered by input/output modality. Default model FLUX.2 [klein] 4B.
24
+ - `utility`: **response formatting** — Settings → Utility → Response formatting: `simple` (one line per tool), `regular` (pi's own) or `advanced` (highlighted commands incl. embedded heredoc/`-c` code, tinted syntax-highlighted diffs, test summaries, exit lines).
25
+ - `utility`: `/unipi:settings <search>` opens the hub filtered; typing `/settings` lists `/unipi:settings` first.
26
+ - `skill-registry`: now a real extension. **Skill settings…** grid (`/unipi:skills` → Skill settings…): per skill Enabled / Discoverable / Must show, per global or project scope, plus a skill vault at `~/.unipi/skill-vault` whose skills stay off until a scope turns them on (skill proxy, off by default).
27
+ - `core`: the shared model cache (`~/.unipi/config/models-cache.json`) records input/output modalities; the settings hub pickers and kanboard read it.
28
+
29
+ ### Changed
30
+
31
+ - `skill-registry`: skill judging keeps skills named in the request, lists hidden skills by name in the system prompt, waits for the first real request instead of freezing on a greeting, and caps generic workflow skills.
32
+ - `fusion`: `/unipi:model` lists only your preset lead/sidekick models; typing searches the whole catalogue (also inside the lead/sidekick dropdowns).
33
+ - `utility`: `/unipi:cleanup` only removes files on an explicit list, previews them and asks first; v2 memory backups can never be removed. `/unipi:doctor` checks the model cache, the Decision Model key and skill exposure.
34
+
35
+ ### Fixed
36
+
37
+ - `image`: generation failed for most users (only a pi-ai OpenRouter route with a key pi often couldn't see) and failures were reported to the agent as successes.
38
+ - `core`: capability-filtered model pickers hide entries with no declared input again.
39
+
40
+ ## [3.0.0-alpha.4] — 2026-09-28
41
+
42
+ ### Breaking Changes
43
+
44
+ - **BREAKING: compactor reworked.** Session continuity (the SQLite event log and the snapshot restored after compaction) is removed: it logged every session under one shared ID, so restored snapshots mixed projects and reached ~60k tokens. Also removed: the sandbox tools (`sandbox`, `sandbox_file`, `sandbox_batch`), the `compact` tool (it never compacted), the `compactor_stats`/`compactor_doctor` tools, presets, and the strategy modes that had no effect. **Migration path:** `/unipi:compact` and `/unipi:lossless-compact` still work but are deprecated. Use `/unipi:compact-vcc`, `/unipi:compact-jev` or `/unipi:compact-by-llm`. Old configs are translated: `overrideDefaultCompaction: false` becomes Method = model summary, and `autoCompaction.enabled` becomes When = at a percentage. `~/.unipi/db/compactor` is no longer used and can be deleted.
45
+
46
+ ### Added
47
+
48
+ - `compactor`: the lossless summary is rebuilt from the full session history on every compaction, so it can no longer grow from one compaction to the next (a real session went 15k → 236k → 248k characters). It puts the current state first: Active Work, Your Requests, Latest State, Decisions & Constraints, Files, Commits, Open Errors, Recent Transcript. Each section has a hard budget.
49
+ - Text that extensions inject with the user role (loop prompts, nudges, notifications) is recognised and left out of Your Requests; extension-sent messages are also marked when they are sent.
50
+ - `ask_user` answers are kept as "question → answer" decisions.
51
+ - Typed credentials are redacted.
52
+ - `compactor`: **lossless + jev** method (`/unipi:compact-jev`). jev, the Decision model, drops items that are no longer in force, such as finished one-off requests, reversed decisions and fixed errors, at per-kind confidence thresholds. If jev is unavailable, the plain lossless summary is used.
53
+ - `compactor`: the settings screen shows 5 main settings (Method, Pi's /compact, When, Percentage, Notifications); everything else is under **Advanced compaction**.
54
+ - `core`: `registerCompactionContext()`. long-horizon (goal, ralph) and kanboard register their live state, and every compaction summary leads with it.
55
+ - `scripts/compactor-eval.mts` replays the compactor at real compaction points of recorded sessions and shows what happened next, for review. `scripts/compactor-continue.mts` writes resumable A/B session files (old vs new compaction) for a blind "continue from here" test with `pi --fork … -nt -p`.
56
+ - **Decision Model settings** (`/unipi:settings → Decision Model`): the jev provider, model, base URL, key and timeout now live in one shared `decision-model` namespace instead of long-horizon's judge. Every module that uses it (long-horizon routing, permission auto mode, skill exposure, watchdog, kanboard strategy, compactor pruning) has a **Decision model** block that inherits the shared model by default or switches to a custom one; empty custom fields fall back to the shared value. Existing `long-horizon.judge.*` transport settings are migrated once.
57
+ - `compactor`: user corrections ("restore the background… I did not request this change") are kept as decisions.
58
+ - `compactor`: **Lessons** section: lessons the agent wrote down itself (memory notes, `# Confirmed: …` comments in its commands, diagnosis sentences), kept verbatim. **Project Knowledge** section: notes it wrote or read, repeated build/test/deploy commands, hosts. Decisions keep early standing rules ("always…", "never…") instead of only the most recent ones.
59
+ - `compactor`: jev asks short, local questions it can answer precisely: "durable lesson or one-off note?" and "does this later item replace that earlier one?" on items about the same subject. A reversal in the recent messages removes the stale lesson it replaces.
60
+ - `compactor`: **compaction card** in the transcript under Pi's `[compaction]` block: one line (`Compacted 7.9k → 2.2k tokens · lossless + jev · 1 stale dropped · at 3%`), ctrl+o for method, trigger, kept tail, sections and jev drops. Never sent to the model; replaces the compaction toasts.
61
+ - `footer`: the stats strip under the input shows `5 compactions · 47k→15k · just now` once the session has compacted. The five compactor segments are now one icon-free `compactions` segment.
62
+ - `compactor`: the info-screen Compactor tab shows the method and trigger settings, compactions by method, tokens before → after, and the last compaction.
63
+
64
+ ### Fixed
65
+
66
+ - `compactor`: the percentage trigger compacts at the `turn_end` boundary instead of calling `ctx.compact()`, which aborted the run and left goal, ralph and kanboard loops waiting. The "auto-continue" message is removed; Pi 0.87 continues after automatic compaction on its own, so it only added empty extra turns.
67
+ - `compactor`: stats come from the session's own compaction entries instead of a fixed "12% kept" guess (also in the footer segments).
68
+ - `compactor`: the kept tail is sized to the model's context window (recut above 40%, `keep:N` included) and the summary is capped at 8% of it, so compaction can no longer overflow small-context models.
69
+ - `compactor`: secrets are redacted before summary items are clipped (a clipped quote could leak a password).
70
+ - `compactor`: `/unipi:compact-doctor` no longer calls the jev method "model summary"; `/unipi:compact-stats` counts jev separately; a manual compaction with nothing to compact no longer repeats Pi's error.
71
+ - `kanboard` tests wrote a fake judge key (`"k"`) into the real `~/.unipi/config/long-horizon/config.json`, which silently disabled the jev judge. They now use project scope.
72
+
9
73
  ## [3.0.0-alpha.3] — 2026-09-27
10
74
 
11
75
  ### Breaking Changes
package/README.md CHANGED
@@ -21,7 +21,7 @@ pi install npm:@pi-unipi/unipi
21
21
 
22
22
  **[Memory](./packages/memory/README.md)** — Markdown files + [MemPalace](https://github.com/mempalace/mempalace) semantic search share a memory palace across pi, Devin, and zcode. Facts, preferences, and decisions persist across sessions; v2 data converts via `/unipi:memory migrate`.
23
23
 
24
- **[Compactor](./packages/compactor/README.md)** — Zero-LLM context engine. 6-stage pipeline hits 95%+ token reduction at zero API cost. Session continuity, percentage auto-compaction, session recall, and sandbox execution.
24
+ **[Compactor](./packages/compactor/README.md)** — Compaction that keeps work going. Lossless zero-LLM summaries (or Pi's model summary), rebuilt from the full session history, led by the live goal/ralph/kanboard state; the full history stays searchable with session recall.
25
25
 
26
26
  **[Prefix-cache architecture](./docs/prefix-cache-architecture.md)** — Append-only request discipline, explicit cache epochs, deterministic tools, privacy-safe diagnostics, provider limitations, and bounded cold-epoch output.
27
27
 
@@ -33,7 +33,6 @@ pi install npm:@pi-unipi/unipi
33
33
 
34
34
  **[Web API](./packages/web-api/README.md)** — Web search, page reading, content summarization. Defaults to [wigolo](https://github.com/KnockOutEZ/wigolo), a local-first engine with multi-engine search and on-device reranking — $0/query, no API key. Plus a smart-fetch engine with browser-grade TLS fingerprinting. Paid providers as fallbacks, and auto-selection falls through when a provider is unavailable.
35
35
 
36
- **[Image](./packages/image/README.md)** — Generate images from a text prompt and analyze existing ones. 34 image models, plus vision analysis on any model that accepts image input, with a customizable system prompt.
37
36
 
38
37
  **[MCP](./packages/mcp/README.md)** — Browse 7,800+ MCP servers, add them interactively. Tools from servers register automatically as Pi tools.
39
38
 
@@ -92,7 +91,7 @@ Coexists triggers enhance behavior when packages are installed together. Workflo
92
91
  | Kanboard | `/unipi:` | kanboard (board: capture, work runner, web UI) |
93
92
  | Long-Horizon | `/unipi:goal`, `/unipi:ralph`, `/unipi:swarm`, `/unipi:graph` | <prompt>, start, stop, status, resume, clear |
94
93
  | Memory | `/unipi:memory-` | process, search, consolidate, forget |
95
- | Compactor | `/unipi:` | lossless-compact, session-recall, compact-stats, compact-preset, compact-help |
94
+ | Compactor | `/unipi:` | compact-vcc, compact-by-llm, session-recall, compact-stats, compact-doctor, compact-help |
96
95
  | Notify | `/unipi:notify-` | settings, test, set-tg, set-ntfy |
97
96
  | MCP | `/unipi:mcp-` | add, settings, sync, status |
98
97
  | Web | `/unipi:web-` | settings, cache-clear |
@@ -116,14 +115,12 @@ Coexists triggers enhance behavior when packages are installed together. Workflo
116
115
  | `spawn_helper` / `get_helper_result` | subagents | Parallel agents |
117
116
  | `memory_store` / `memory_search` / `memory_delete` | memory | Memory CRUD |
118
117
  | `web_search` / `multi_web_content_read` / `web_llm_summarize` | web-api | Web research |
119
- | `image_generate` / `image_recognize` | image | Image generation and vision (recognize auto-hides while the session model has vision) |
118
+ | `image_generate` / `image_edit` / `image_recognize` | utility | Image generation, editing and vision (recognize hides while the session model has vision) |
120
119
  | `notify_user` | notify | Push notifications |
121
120
  | `sidekick` / `read_subagent` | fusion | Delegate to the persistent sidekick and collect its report |
122
121
  | `bg_run` / `bg_status` / `bg_logs` / `bg_kill` / `bg_delegate` / `bg_result` | background-tasks | Long-running commands and background delegate agents |
123
122
  | `ask_user` | ask-user | User input |
124
- | `compact` / `session_recall` / `sandbox` | compactor | Context management |
125
- | `ctx_env` | utility | Environment info |
126
- | `set_session_name` | utility | Session name for badge |
123
+ | `session_recall` / `context_budget` | compactor | Context management |
127
124
 
128
125
  ## Development
129
126
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/unipi",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.5",
4
4
  "description": "All-in-one extension suite for Pi coding agent",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -70,7 +70,6 @@
70
70
  "packages/notify/skills",
71
71
  "packages/kanboard/skills",
72
72
  "packages/updater/skills",
73
- "packages/image/skills",
74
73
  "packages/subagents/skills"
75
74
  ],
76
75
  "prompts": [
@@ -84,27 +83,26 @@
84
83
  "typebox": "^1.1.38"
85
84
  },
86
85
  "dependencies": {
87
- "@pi-unipi/ask-user": "3.0.0-alpha.3",
88
- "@pi-unipi/background-tasks": "3.0.0-alpha.3",
89
- "@pi-unipi/btw": "3.0.0-alpha.3",
90
- "@pi-unipi/command-enchantment": "3.0.0-alpha.3",
91
- "@pi-unipi/compactor": "3.0.0-alpha.3",
92
- "@pi-unipi/core": "3.0.0-alpha.3",
93
- "@pi-unipi/footer": "3.0.0-alpha.3",
94
- "@pi-unipi/image": "3.0.0-alpha.3",
95
- "@pi-unipi/fusion": "3.0.0-alpha.3",
96
- "@pi-unipi/info-screen": "3.0.0-alpha.3",
97
- "@pi-unipi/input-shortcuts": "3.0.0-alpha.3",
98
- "@pi-unipi/kanboard": "3.0.0-alpha.3",
99
- "@pi-unipi/mcp": "3.0.0-alpha.3",
100
- "@pi-unipi/memory": "3.0.0-alpha.3",
101
- "@pi-unipi/notify": "3.0.0-alpha.3",
102
- "@pi-unipi/skill-registry": "3.0.0-alpha.3",
103
- "@pi-unipi/subagents": "3.0.0-alpha.3",
104
- "@pi-unipi/updater": "3.0.0-alpha.3",
105
- "@pi-unipi/utility": "3.0.0-alpha.3",
106
- "@pi-unipi/web-api": "3.0.0-alpha.3",
107
- "@pi-unipi/workflow": "3.0.0-alpha.3"
86
+ "@pi-unipi/ask-user": "3.0.0-alpha.5",
87
+ "@pi-unipi/background-tasks": "3.0.0-alpha.5",
88
+ "@pi-unipi/btw": "3.0.0-alpha.5",
89
+ "@pi-unipi/command-enchantment": "3.0.0-alpha.5",
90
+ "@pi-unipi/compactor": "3.0.0-alpha.5",
91
+ "@pi-unipi/core": "3.0.0-alpha.5",
92
+ "@pi-unipi/footer": "3.0.0-alpha.5",
93
+ "@pi-unipi/fusion": "3.0.0-alpha.5",
94
+ "@pi-unipi/info-screen": "3.0.0-alpha.5",
95
+ "@pi-unipi/input-shortcuts": "3.0.0-alpha.5",
96
+ "@pi-unipi/kanboard": "3.0.0-alpha.5",
97
+ "@pi-unipi/mcp": "3.0.0-alpha.5",
98
+ "@pi-unipi/memory": "3.0.0-alpha.5",
99
+ "@pi-unipi/notify": "3.0.0-alpha.5",
100
+ "@pi-unipi/skill-registry": "3.0.0-alpha.5",
101
+ "@pi-unipi/subagents": "3.0.0-alpha.5",
102
+ "@pi-unipi/updater": "3.0.0-alpha.5",
103
+ "@pi-unipi/utility": "3.0.0-alpha.5",
104
+ "@pi-unipi/web-api": "3.0.0-alpha.5",
105
+ "@pi-unipi/workflow": "3.0.0-alpha.5"
108
106
  },
109
107
  "devDependencies": {
110
108
  "@earendil-works/pi-agent-core": "^0.87.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/ask-user",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.5",
4
4
  "description": "Structured user input tool for Pi coding agent — single-select, multi-select, freeform",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -40,7 +40,7 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
- "@pi-unipi/core": "3.0.0-alpha.3"
43
+ "@pi-unipi/core": "3.0.0-alpha.5"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@earendil-works/pi-coding-agent": "^0.87.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/command-enchantment",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.5",
4
4
  "description": "Enhanced TUI autocomplete for /unipi:* commands — colored, sorted, and grouped by package",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -19,6 +19,7 @@ export const PACKAGE_ORDER: string[] = [
19
19
  "btw",
20
20
  "mcp",
21
21
  "utility",
22
+ "skill-registry",
22
23
  "ask-user",
23
24
  "info",
24
25
  "web-api",
@@ -41,8 +42,6 @@ export const COMMAND_REGISTRY: Record<string, string> = {
41
42
  "unipi:plan": "workflow",
42
43
  "unipi:permission": "workflow",
43
44
 
44
- "unipi:prefix-cache": "utility",
45
-
46
45
  // long-horizon (4 commands)
47
46
  "unipi:goal": "long-horizon",
48
47
  "unipi:ralph": "long-horizon",
@@ -68,13 +67,15 @@ export const COMMAND_REGISTRY: Record<string, string> = {
68
67
  // mcp (5 commands)
69
68
  "unipi:mcp-status": "mcp",
70
69
 
71
- // utility (11 commands)
70
+ // utility
72
71
  "unipi:continue": "utility",
73
- "unipi:reload": "utility",
74
- "unipi:status": "utility",
72
+ "unipi:retry": "utility",
75
73
  "unipi:cleanup": "utility",
76
- "unipi:env": "utility",
77
74
  "unipi:doctor": "utility",
75
+ "unipi:answer": "utility",
76
+
77
+ // skill-registry
78
+ "unipi:skills": "skill-registry",
78
79
 
79
80
  // ask-user (1 command)
80
81
 
@@ -97,6 +98,9 @@ export const COMMAND_REGISTRY: Record<string, string> = {
97
98
  // web-api (2 commands)
98
99
 
99
100
  // compact (9 commands)
101
+ "unipi:compact-vcc": "compact",
102
+ "unipi:compact-jev": "compact",
103
+ "unipi:compact-by-llm": "compact",
100
104
  "unipi:lossless-compact": "compact",
101
105
  "unipi:compact": "compact",
102
106
  "unipi:session-recall": "compact",
@@ -131,7 +135,6 @@ export const COMMAND_REGISTRY: Record<string, string> = {
131
135
  export const COMMAND_DESCRIPTIONS: Record<string, string> = {
132
136
  "unipi:plan": "Plan mode — investigate read-only, then approve a plan",
133
137
  "unipi:permission": "Permission mode — ask · auto (jev-judged) · full",
134
- "unipi:prefix-cache": "Show privacy-safe provider prefix-cache diagnostics",
135
138
 
136
139
  "unipi:goal": "One objective until verifiably true · medium complexity · pareto cost/success",
137
140
  "unipi:ralph": "Checklist grind over iterations · enumerable chores · low cost, solid success",
@@ -153,12 +156,13 @@ export const COMMAND_DESCRIPTIONS: Record<string, string> = {
153
156
 
154
157
  "unipi:mcp-status": "Show MCP server status",
155
158
 
156
- "unipi:continue": "Continue the last conversation",
157
- "unipi:reload": "Reload extensions and settings",
158
- "unipi:status": "Show system status",
159
- "unipi:cleanup": "Clean up old sessions and cache",
160
- "unipi:env": "Show environment info",
161
- "unipi:doctor": "Run diagnostics",
159
+ "unipi:continue": "Continue from where the agent stopped (/unipi:retry)",
160
+ "unipi:retry": "Retry the last turn (alias of /unipi:continue)",
161
+ "unipi:cleanup": "Remove stale UniPi temp files and leftovers (preview first)",
162
+ "unipi:doctor": "Check UniPi's runtime: config, model cache, Decision Model, skills",
163
+ "unipi:answer": "Answer the last reply — fixed input under the scrollable reply, per question, or web form",
164
+ "unipi:skills": "Manage skills — on/off per project, listed or not, the skill vault",
165
+
162
166
  "unipi:kanboard": "Kanboard — capture tasks, run them, open the board",
163
167
  "unipi:kanboard-add": "Kanboard — capture a task into Backlog",
164
168
  "unipi:kanboard-do": "Kanboard — let the agent work the board for a turn",
@@ -169,12 +173,15 @@ export const COMMAND_DESCRIPTIONS: Record<string, string> = {
169
173
  "unipi:info": "Show system information",
170
174
 
171
175
 
172
- "unipi:lossless-compact": "Immediate zero-LLM compaction",
173
- "unipi:compact": "(DEPRECATED) Use /unipi:lossless-compact instead",
176
+ "unipi:compact-vcc": "Lossless compaction now — no model call (keep:N)",
177
+ "unipi:compact-jev": "Lossless compaction, pruned by jev of what is no longer in force",
178
+ "unipi:compact-by-llm": "Compact now with a model-written summary",
179
+ "unipi:lossless-compact": "(DEPRECATED) Use /unipi:compact-vcc instead",
180
+ "unipi:compact": "(DEPRECATED) Use /unipi:compact-vcc instead",
174
181
  "unipi:session-recall": "Search session history, including compacted-away messages",
175
182
  "unipi:compact-recall": "(DEPRECATED) Use /unipi:session-recall instead",
176
- "unipi:compact-stats": "Show compaction statistics",
177
- "unipi:compact-doctor": "Diagnose compaction issues",
183
+ "unipi:compact-stats": "Show this session's compaction savings",
184
+ "unipi:compact-doctor": "Check compaction settings",
178
185
  "unipi:compact-help": "Show compactor command help",
179
186
  "unipi:notify-event": "Toggle a notify event without the TUI: <event> <on|off>",
180
187
 
@@ -201,6 +208,7 @@ export const PACKAGE_LABELS: Record<string, string> = {
201
208
  btw: "btw",
202
209
  mcp: "mcp",
203
210
  utility: "utility",
211
+ "skill-registry": "skills",
204
212
  "ask-user": "ask-user",
205
213
  info: "info",
206
214
  "web-api": "web-api",
@@ -16,6 +16,12 @@ export interface TaggedItem {
16
16
 
17
17
  // ─── 4-tier priority ─────────────────────────────────────────────────
18
18
 
19
+ /**
20
+ * UniPi commands that supersede a same-named pi built-in: typing the bare
21
+ * name ranks the unipi command FIRST (`/settings` → `/unipi:settings`).
22
+ */
23
+ export const PREFERRED_OVER_BUILTIN = new Set(["settings"]);
24
+
19
25
  /**
20
26
  * Compute the match-quality tier for an autocomplete item.
21
27
  *
@@ -38,6 +44,8 @@ export function crossItemPriority(
38
44
 
39
45
  const q = query.toLowerCase();
40
46
 
47
+ // Tier -1: a unipi command that supersedes the same-named built-in
48
+ if (isUnipi && short === q && PREFERRED_OVER_BUILTIN.has(q)) return -1;
41
49
  // Tier 0: exact full-value match
42
50
  if (full === q) return 0;
43
51
  // Tier 1: unipi short-name exact match
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/background-tasks",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.5",
4
4
  "description": "Background tasks for UniPi — durable shell jobs and delegated background agents with a footer dock",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@earendil-works/pi-ai": "^0.87.1",
13
- "@pi-unipi/core": "3.0.0-alpha.3",
13
+ "@pi-unipi/core": "3.0.0-alpha.5",
14
14
  "turndown": "^7.2.4"
15
15
  },
16
16
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/btw",
3
- "version": "3.0.0-alpha.3",
3
+ "version": "3.0.0-alpha.5",
4
4
  "description": "A pi extension for parallel side conversations with /unipi:btw — part of the Unipi suite",
5
5
  "type": "module",
6
6
  "main": "extensions/btw.ts",
@@ -37,7 +37,7 @@
37
37
  "@earendil-works/pi-tui": "^0.87.1"
38
38
  },
39
39
  "dependencies": {
40
- "@pi-unipi/core": "3.0.0-alpha.3"
40
+ "@pi-unipi/core": "3.0.0-alpha.5"
41
41
  },
42
42
  "pi": {
43
43
  "extensions": [