@vitos-pizza/vitos-pizza 0.3.1 → 0.4.1

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 (37) hide show
  1. package/AGENTS.md +2 -2
  2. package/CHANGELOG.md +42 -11
  3. package/README.md +31 -4
  4. package/assets/architecture.png +0 -0
  5. package/assets/architecture.svg +97 -0
  6. package/package.json +22 -12
  7. package/packages/agent-mode/package.json +3 -3
  8. package/packages/agent-mode/src/plan-instructions.ts +19 -7
  9. package/packages/hypa/extensions/index.ts +16 -0
  10. package/packages/hypa/package.json +23 -0
  11. package/packages/hypa/scripts/smoke.mjs +50 -0
  12. package/packages/hypa/src/config.ts +37 -0
  13. package/packages/hypa/src/seed.ts +22 -0
  14. package/packages/hypa/tsconfig.json +13 -0
  15. package/packages/keybindings/package.json +1 -1
  16. package/packages/permission-system/package.json +2 -2
  17. package/packages/permission-system/presets/default.json +8 -0
  18. package/packages/permission-system/presets/plan.json +6 -0
  19. package/packages/permission-system/presets/yolo.json +1 -0
  20. package/packages/question/extensions/index.ts +54 -21
  21. package/packages/question/package.json +1 -1
  22. package/packages/question/src/forwarding/file-watcher.ts +41 -11
  23. package/packages/question/src/forwarding/forwarder.ts +61 -27
  24. package/packages/question/src/question-ui.ts +773 -78
  25. package/packages/question/src/register-tool.ts +351 -40
  26. package/packages/question/src/types.ts +79 -7
  27. package/packages/session-title/package.json +3 -3
  28. package/packages/settings-preset/package.json +1 -1
  29. package/packages/subagents/agents/planner.md +3 -2
  30. package/packages/subagents/agents/scout.md +2 -1
  31. package/packages/subagents/agents/worker.md +3 -2
  32. package/packages/subagents/package.json +1 -1
  33. package/packages/todoist/package.json +1 -1
  34. package/packages/ui-enhancements/package.json +1 -1
  35. package/packages/ui-enhancements/src/chrome/resize-recovery.ts +71 -14
  36. package/packages/websearch/package.json +1 -1
  37. package/scripts/sync-pi-manifest.mjs +18 -12
package/AGENTS.md CHANGED
@@ -7,7 +7,7 @@ Inspired by Vito's Pizzeria from Garfield — one brand, one install.
7
7
  ## Structure
8
8
 
9
9
  - **Repo root** — The distribution. `package.json` is the pi-package manifest.
10
- - **`packages/<module>/`** — Built-in modules (e.g. `@vitos-pizza/agent-mode`, `@vitos-pizza/question`, `@vitos-pizza/session-title`, `@vitos-pizza/permission-system`, `@vitos-pizza/subagents`, `@vitos-pizza/keybindings`). Not installed separately by users.
10
+ - **`packages/<module>/`** — Built-in modules (e.g. `@vitos-pizza/agent-mode`, `@vitos-pizza/hypa`, `@vitos-pizza/question`, `@vitos-pizza/session-title`, `@vitos-pizza/permission-system`, `@vitos-pizza/subagents`, `@vitos-pizza/keybindings`). Not installed separately by users.
11
11
  - **`scripts/sync-pi-manifest.mjs`** — Scans `packages/*`, merges `piBundled` npm packages, and updates root `dependencies` + `pi` manifest. Honors `pi.requires` for extension load order.
12
12
 
13
13
  ## Bundled third-party Pi packages
@@ -18,7 +18,7 @@ Declare npm pi packages in root `package.json`:
18
18
  - `bundledDependencies` — include in the distribution tarball
19
19
  - `piBundled` — list read by `sync-pi-manifest.mjs` to merge `node_modules/<pkg>/` paths into the root `pi` manifest
20
20
 
21
- Extension load order: topological sort of `pi.requires`, with `LOCAL_ORDER` tie-break. Default: `permission-system` → `settings-preset` → `question` → `ui-enhancements` → `subagents` → `websearch` → `session-title` → `keybindings` → `agent-mode` → `todoist`. (`agent-mode` requires `keybindings` so shortcut actions register after the keybindings listener is ready.)
21
+ Extension load order: topological sort of `pi.requires`, with `LOCAL_ORDER` tie-break. Default: `permission-system` → `settings-preset` → `hypa` → `question` → `ui-enhancements` → `subagents` → `websearch` → `session-title` → `keybindings` → `agent-mode` → `todoist`. (`agent-mode` requires `keybindings` so shortcut actions register after the keybindings listener is ready.) `piBundled` packages (e.g. `@hypabolic/pi-hypa`) load before local modules.
22
22
 
23
23
  ## Agent mode
24
24
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,39 @@
2
2
 
3
3
  All notable changes to vitos-pizza are documented here.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ## [0.4.1] - 2026-07-12
8
+
9
+ ### Added
10
+
11
+ - **Multi-select questions** — `question` tool `selectType: "multi"` (Space toggle, Enter submit)
12
+ - **Multi-question tabs** — `questions: [...]` for tabbed prompts (Tab/←→ switch; per-tab single or multi)
13
+
14
+ ### Changed
15
+
16
+ - **Subagent hypa-only reads** — scout / planner / worker drop builtin `read`/`grep`/`find`/`ls`; exploration uses `hypa_*` only (`bash`/`edit`/`write` unchanged)
17
+ - Plan mode footer: **Worth considering** (gaps/adjacent capabilities) replaces **Next** (no mode-switch verbs)
18
+ - Subagent question forwarding: subprocess children use **file channel only** (skip in-process RPC)
19
+
20
+ ### Fixed
21
+
22
+ - **Subagent question false cancel** — child no-UI RPC no longer replies `cancelled`; parent TUI receives forwarded prompts
23
+ - **Resize recovery** — after Windows/Cursor reports `columns`/`rows` as 0 (or the border TUI is not ready yet), retry invalidate+full redraw for up to 1s so the UI recovers when size settles without another resize event
24
+
25
+ ## [0.4.0] - 2026-07-11
26
+
27
+ ### Added
28
+
29
+ - **Hypa context compression** — bundles `@hypabolic/pi-hypa` (additive mode; MCP proxy off); `@vitos-pizza/hypa` seeds `~/.hypa-pi/config.json`
30
+ - Plan mode / scout / planner / worker: `hypa_read` / `hypa_grep` / `hypa_find` / `hypa_ls` allowlisted alongside builtins
31
+ - `scripts/sync-pi-manifest.mjs` reads root `piBundled` and merges third-party Pi package extensions
32
+ - README **Architecture** capability map (`assets/architecture.svg` / `.png`)
33
+
34
+ ### Acknowledgments
35
+
36
+ - [Hypa](https://github.com/Hypabolic/Hypa) / `@hypabolic/pi-hypa` (FSL-1.1-ALv2) — shell output compression and `hypa_*` tools
37
+
5
38
  ## [0.3.1] - 2026-07-11
6
39
 
7
40
  ### Changed
@@ -35,7 +68,7 @@ All notable changes to vitos-pizza are documented here.
35
68
 
36
69
  - **`@vitos-pizza/todoist`** — in-memory task list with TUI widget, `/todo` command, and LLM tools (`todo_add` / `todo_update` / `todo_complete` / `todo_delete`)
37
70
  - Terminal **resize recovery** in ui-enhancements — debounce + full redraw after resize (fixes blank/corrupt TUI on Windows)
38
- - Plan-mode **Next** footer guidance and optional scout (skip recon when context is enough; parallel scouts for independent areas)
71
+ - Plan-mode **Worth considering** footer (gaps/adjacent capabilities; not next-steps) and optional scout (skip recon when context is enough; parallel scouts for independent areas)
39
72
 
40
73
  ### Changed
41
74
 
@@ -55,15 +88,13 @@ All notable changes to vitos-pizza are documented here.
55
88
  - Pi distribution layout: repo root as single install entry
56
89
  - `scripts/sync-pi-manifest.mjs` module assembler
57
90
  - Original logo at `assets/logo.svg`
91
+ - Built-in modules: agent-mode, question, session-title, permission-system, subagents, keybindings, ui-enhancements, websearch
92
+ - Agent modes: `agent` / `plan` / `execute` with `/mode` and cycle shortcuts
93
+ - Structured `question` tool with subagent parent-session forwarding
94
+ - Session auto-title from first meaningful user message
58
95
 
59
- ### Removed
60
-
61
- - Nested `packages/xin-pi` aggregator
62
- - `@xin-pi/core`, template scaffold, postinstall symlink hack
63
-
64
- ### Publishing
96
+ ### Acknowledgments
65
97
 
66
- - GitHub Actions publishes `@vitos-pizza/vitos-pizza` via **npm Trusted Publishing (OIDC)** — no long-lived `NPM_TOKEN`
67
- - Workflow: `.github/workflows/publish.yml` (triggers on `v*` tags / `workflow_dispatch`)
68
- - `scripts/prepare-publish.mjs` rewrites `file:` workspace deps for the npm tarball
69
- - First package version must be published once manually (or as a stub) before Trusted Publisher can be configured on npmjs.com
98
+ - [Pi](https://pi.dev/) / [@earendil-works/pi-coding-agent](https://www.npmjs.com/package/@earendil-works/pi-coding-agent)
99
+ - [@gotgenes/pi-permission-system](https://www.npmjs.com/package/@gotgenes/pi-permission-system)
100
+ - Pi official `question` and subagent examples
package/README.md CHANGED
@@ -12,6 +12,26 @@
12
12
 
13
13
  Inspired by [Vito's Pizzeria](https://garfield.fandom.com/wiki/Vito_Cappelletti) from Garfield — Garfield's favorite pizza place.
14
14
 
15
+ ## Architecture
16
+
17
+ ![vitos-pizza architecture](./assets/architecture.png)
18
+
19
+ Typical flow: **plan** → optional **scout** → **planner** → confirm → **execute** / **worker**. Shell output is compressed via Hypa bash rewrite; scout/planner/worker explore with `hypa_*` only (main session may still use builtin reads).
20
+
21
+ | Capability | Module | What you get |
22
+ |------------|--------|--------------|
23
+ | Modes | `@vitos-pizza/agent-mode` | `agent` / `plan` / `execute` — `/mode`, Ctrl+. / Alt+M |
24
+ | Permissions | `@vitos-pizza/permission-system` | allow / ask / deny presets per mode |
25
+ | Context compression | `@hypabolic/pi-hypa` + `@vitos-pizza/hypa` | bash rewrite, `hypa_*` tools, `/hypa` (MCP proxy off) |
26
+ | Subagents | `@vitos-pizza/subagents` | scout · planner · worker (+ title internally) |
27
+ | Structured questions | `@vitos-pizza/question` | `question` tool |
28
+ | Web | `@vitos-pizza/websearch` | `web_search` / `web_read` |
29
+ | Tasks | `@vitos-pizza/todoist` | `/todo` + LLM tools |
30
+ | Session titles | `@vitos-pizza/session-title` | auto-name after first turn |
31
+ | TUI | `@vitos-pizza/ui-enhancements` | border status, execute prompt chrome |
32
+ | Shortcuts | `@vitos-pizza/keybindings` | centralized `vitos-shortcuts.json` |
33
+ | Defaults | `@vitos-pizza/settings-preset` | seed Pi settings on first session |
34
+
15
35
  ## Prerequisites
16
36
 
17
37
  - Node.js >= 22.19.0
@@ -21,14 +41,16 @@ Inspired by [Vito's Pizzeria](https://garfield.fandom.com/wiki/Vito_Cappelletti)
21
41
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent
22
42
  ```
23
43
 
44
+ Context compression uses bundled [Hypa](https://github.com/Hypabolic/Hypa) (`@hypabolic/pi-hypa`). The matching platform binary comes from npm optionalDependencies (Linux / macOS / Windows, x64 / arm64). Use `/hypa` in a session for diagnostics. MCP proxy stays **off** (this distribution does not use MCP).
45
+
24
46
  ## Install
25
47
 
26
48
  ```bash
27
49
  # npm (recommended)
28
- pi install npm:@vitos-pizza/vitos-pizza@0.3.1
50
+ pi install npm:@vitos-pizza/vitos-pizza@0.4.0
29
51
 
30
52
  # git (pinned tag)
31
- pi install git:github.com/xin2017338/vitos-pizza@v0.3.1
53
+ pi install git:github.com/xin2017338/vitos-pizza@v0.4.0
32
54
  ```
33
55
 
34
56
  From source:
@@ -58,12 +80,16 @@ After install, start `pi`. Sessions are auto-titled from the first meaningful us
58
80
  ```
59
81
  vitos-pizza/ # Pi distribution (install this)
60
82
  ├── assets/logo.svg
83
+ ├── assets/architecture.svg # editable capability map source
84
+ ├── assets/architecture.png # README preview (rendered from SVG)
61
85
  ├── package.json # distro manifest + pi-package entry
62
86
  ├── AGENTS.md
63
87
  └── packages/ # built-in modules (not installed separately)
64
- ├── ui-enhancements/ # @vitos-pizza/ui-enhancements — TUI display optimizations
88
+ ├── ui-enhancements/ # @vitos-pizza/ui-enhancements — TUI display optimizations
65
89
  ├── agent-mode/ # @vitos-pizza/agent-mode — agent / plan / execute mode switching
66
90
  ├── permission-system/ # @vitos-pizza/permission-system — allow/ask/deny gates
91
+ ├── settings-preset/ # @vitos-pizza/settings-preset — seed default Pi settings
92
+ ├── hypa/ # @vitos-pizza/hypa — Hypa defaults (additive, no MCP proxy)
67
93
  ├── question/ # @vitos-pizza/question — structured ask-user question tool
68
94
  ├── session-title/ # @vitos-pizza/session-title — auto session naming
69
95
  ├── subagents/ # @vitos-pizza/subagents — scout/planner/worker delegation
@@ -72,7 +98,7 @@ vitos-pizza/ # Pi distribution (install this)
72
98
  └── keybindings/ # @vitos-pizza/keybindings — centralized shortcut bindings
73
99
  ```
74
100
 
75
- Built-in modules are wired via `scripts/sync-pi-manifest.mjs` (supports `pi.requires` load order).
101
+ Built-in modules are wired via `scripts/sync-pi-manifest.mjs` (supports `pi.requires` load order). Third-party Pi packages listed in root `piBundled` (currently `@hypabolic/pi-hypa`) are merged into the same manifest.
76
102
 
77
103
  | Path | Role |
78
104
  |------|------|
@@ -221,6 +247,7 @@ vitos-pizza builds on the Pi ecosystem and several open-source projects. We are
221
247
  | [Claude Code TodoWrite / Task tools](https://code.claude.com/docs/en/agent-sdk/todo-tracking.md) | `@vitos-pizza/todoist` | Complete = status done; delete only when no longer relevant (cancelled / mistaken) |
222
248
  | [@capyup/pi-basic-tools todo](https://www.npmjs.com/package/@capyup/pi-basic-tools) | `@vitos-pizza/todoist` | completed vs deleted prompt boundary for task-list tools |
223
249
  | [pi-package-template](https://github.com/S1M0N38/pi-package-template) | Repo layout | Pi package monorepo conventions |
250
+ | [Hypa](https://github.com/Hypabolic/Hypa) (`@hypabolic/pi-hypa`) | `@vitos-pizza/hypa` + distro bundle | Additive bash rewrite / `hypa_*` tools; MCP proxy off (FSL-1.1-ALv2) |
224
251
 
225
252
  ### Runtime & tooling libraries
226
253
 
Binary file
@@ -0,0 +1,97 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 620" role="img" aria-labelledby="title desc">
2
+ <title id="title">vitos-pizza architecture</title>
3
+ <desc id="desc">Pi coding agent with Vito's Pizzeria capability modules and bundled Hypa</desc>
4
+
5
+ <defs>
6
+ <linearGradient id="piBar" x1="0" y1="0" x2="1" y2="0">
7
+ <stop offset="0%" stop-color="#1e293b"/>
8
+ <stop offset="100%" stop-color="#334155"/>
9
+ </linearGradient>
10
+ <linearGradient id="accent" x1="0" y1="0" x2="1" y2="1">
11
+ <stop offset="0%" stop-color="#f4a442"/>
12
+ <stop offset="100%" stop-color="#d97706"/>
13
+ </linearGradient>
14
+ <filter id="shadow" x="-2%" y="-2%" width="104%" height="108%">
15
+ <feDropShadow dx="0" dy="1" stdDeviation="1.5" flood-color="#0f172a" flood-opacity="0.12"/>
16
+ </filter>
17
+ </defs>
18
+
19
+ <rect width="960" height="620" fill="#f8fafc" rx="12"/>
20
+
21
+ <text x="32" y="36" font-family="ui-sans-serif, system-ui, sans-serif" font-size="18" font-weight="700" fill="#0f172a">vitos-pizza</text>
22
+ <text x="140" y="36" font-family="ui-sans-serif, system-ui, sans-serif" font-size="13" fill="#64748b">Pi distribution / capability map</text>
23
+
24
+ <rect x="32" y="56" width="896" height="56" rx="10" fill="url(#piBar)" filter="url(#shadow)"/>
25
+ <text x="480" y="82" text-anchor="middle" font-family="ui-sans-serif, system-ui, sans-serif" font-size="15" font-weight="600" fill="#f8fafc">Pi coding agent</text>
26
+ <text x="480" y="100" text-anchor="middle" font-family="ui-sans-serif, system-ui, sans-serif" font-size="11" fill="#cbd5e1">runtime / tools / sessions / compaction</text>
27
+
28
+ <line x1="480" y1="112" x2="480" y2="136" stroke="#94a3b8" stroke-width="2"/>
29
+ <polygon points="480,142 474,132 486,132" fill="#94a3b8"/>
30
+
31
+ <rect x="32" y="148" width="896" height="150" rx="10" fill="#fff7ed" stroke="#fed7aa" stroke-width="1.5"/>
32
+ <text x="48" y="172" font-family="ui-sans-serif, system-ui, sans-serif" font-size="12" font-weight="700" fill="#c2410c">Workflow &amp; safety</text>
33
+
34
+ <g font-family="ui-sans-serif, system-ui, sans-serif">
35
+ <rect x="48" y="186" width="200" height="88" rx="8" fill="#ffffff" stroke="#e2e8f0" filter="url(#shadow)"/>
36
+ <text x="148" y="214" text-anchor="middle" font-size="13" font-weight="700" fill="#0f172a">Modes</text>
37
+ <text x="148" y="234" text-anchor="middle" font-size="11" fill="#64748b">agent / plan / execute</text>
38
+ <text x="148" y="252" text-anchor="middle" font-size="10" fill="#94a3b8">agent-mode</text>
39
+
40
+ <rect x="268" y="186" width="200" height="88" rx="8" fill="#ffffff" stroke="#e2e8f0" filter="url(#shadow)"/>
41
+ <text x="368" y="214" text-anchor="middle" font-size="13" font-weight="700" fill="#0f172a">Permissions</text>
42
+ <text x="368" y="234" text-anchor="middle" font-size="11" fill="#64748b">allow / ask / deny</text>
43
+ <text x="368" y="252" text-anchor="middle" font-size="10" fill="#94a3b8">permission-system</text>
44
+
45
+ <rect x="488" y="186" width="200" height="88" rx="8" fill="#ffffff" stroke="#e2e8f0" filter="url(#shadow)"/>
46
+ <text x="588" y="214" text-anchor="middle" font-size="13" font-weight="700" fill="#0f172a">Subagents</text>
47
+ <text x="588" y="234" text-anchor="middle" font-size="11" fill="#64748b">scout / planner / worker</text>
48
+ <text x="588" y="252" text-anchor="middle" font-size="10" fill="#94a3b8">subagents</text>
49
+
50
+ <rect x="708" y="186" width="200" height="88" rx="8" fill="#ffffff" stroke="#e2e8f0" filter="url(#shadow)"/>
51
+ <text x="808" y="214" text-anchor="middle" font-size="13" font-weight="700" fill="#0f172a">Question</text>
52
+ <text x="808" y="234" text-anchor="middle" font-size="11" fill="#64748b">structured ask-user</text>
53
+ <text x="808" y="252" text-anchor="middle" font-size="10" fill="#94a3b8">question</text>
54
+ </g>
55
+
56
+ <rect x="32" y="314" width="896" height="150" rx="10" fill="#eff6ff" stroke="#bfdbfe" stroke-width="1.5"/>
57
+ <text x="48" y="338" font-family="ui-sans-serif, system-ui, sans-serif" font-size="12" font-weight="700" fill="#1d4ed8">Context &amp; tools</text>
58
+
59
+ <g font-family="ui-sans-serif, system-ui, sans-serif">
60
+ <rect x="48" y="352" width="200" height="88" rx="8" fill="#ffffff" stroke="#fdba74" stroke-width="1.5" filter="url(#shadow)"/>
61
+ <rect x="48" y="352" width="6" height="88" rx="3" fill="url(#accent)"/>
62
+ <text x="148" y="380" text-anchor="middle" font-size="13" font-weight="700" fill="#0f172a">Hypa compress</text>
63
+ <text x="148" y="400" text-anchor="middle" font-size="11" fill="#64748b">bash rewrite / hypa_*</text>
64
+ <text x="148" y="418" text-anchor="middle" font-size="10" fill="#94a3b8">pi-hypa + hypa glue</text>
65
+
66
+ <rect x="268" y="352" width="200" height="88" rx="8" fill="#ffffff" stroke="#e2e8f0" filter="url(#shadow)"/>
67
+ <text x="368" y="380" text-anchor="middle" font-size="13" font-weight="700" fill="#0f172a">Web search</text>
68
+ <text x="368" y="400" text-anchor="middle" font-size="11" fill="#64748b">web_search / web_read</text>
69
+ <text x="368" y="418" text-anchor="middle" font-size="10" fill="#94a3b8">websearch</text>
70
+
71
+ <rect x="488" y="352" width="200" height="88" rx="8" fill="#ffffff" stroke="#e2e8f0" filter="url(#shadow)"/>
72
+ <text x="588" y="380" text-anchor="middle" font-size="13" font-weight="700" fill="#0f172a">Todo list</text>
73
+ <text x="588" y="400" text-anchor="middle" font-size="11" fill="#64748b">/todo + LLM tools</text>
74
+ <text x="588" y="418" text-anchor="middle" font-size="10" fill="#94a3b8">todoist</text>
75
+
76
+ <rect x="708" y="352" width="200" height="88" rx="8" fill="#ffffff" stroke="#e2e8f0" filter="url(#shadow)"/>
77
+ <text x="808" y="380" text-anchor="middle" font-size="13" font-weight="700" fill="#0f172a">Session title</text>
78
+ <text x="808" y="400" text-anchor="middle" font-size="11" fill="#64748b">auto-name after turn 1</text>
79
+ <text x="808" y="418" text-anchor="middle" font-size="10" fill="#94a3b8">session-title</text>
80
+ </g>
81
+
82
+ <rect x="32" y="480" width="896" height="72" rx="10" fill="#f1f5f9" stroke="#e2e8f0" stroke-width="1.5"/>
83
+ <text x="48" y="504" font-family="ui-sans-serif, system-ui, sans-serif" font-size="12" font-weight="700" fill="#475569">UX &amp; defaults</text>
84
+
85
+ <g font-family="ui-sans-serif, system-ui, sans-serif" font-size="12" fill="#0f172a">
86
+ <rect x="48" y="516" width="280" height="24" rx="6" fill="#ffffff" stroke="#e2e8f0"/>
87
+ <text x="188" y="532" text-anchor="middle">UI enhancements / TUI chrome</text>
88
+
89
+ <rect x="340" y="516" width="280" height="24" rx="6" fill="#ffffff" stroke="#e2e8f0"/>
90
+ <text x="480" y="532" text-anchor="middle">Keybindings / Ctrl+. / Alt+M</text>
91
+
92
+ <rect x="632" y="516" width="280" height="24" rx="6" fill="#ffffff" stroke="#e2e8f0"/>
93
+ <text x="772" y="532" text-anchor="middle">Settings preset / first-run seed</text>
94
+ </g>
95
+
96
+ <text x="480" y="590" text-anchor="middle" font-family="ui-sans-serif, system-ui, sans-serif" font-size="11" fill="#64748b">piBundled = @hypabolic/pi-hypa | local modules = @vitos-pizza/*</text>
97
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitos-pizza/vitos-pizza",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Vito's Pizzeria — a Pi distribution (Garfield-approved)",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -37,33 +37,43 @@
37
37
  "typescript": "^5.8.0"
38
38
  },
39
39
  "dependencies": {
40
+ "@hypabolic/pi-hypa": "^0.1.10",
40
41
  "typebox": "^1.1.38",
41
- "@vitos-pizza/agent-mode": "0.3.1",
42
- "@vitos-pizza/keybindings": "0.3.1",
43
- "@vitos-pizza/permission-system": "0.3.1",
44
- "@vitos-pizza/question": "0.3.1",
45
- "@vitos-pizza/session-title": "0.3.1",
46
- "@vitos-pizza/settings-preset": "0.3.1",
47
- "@vitos-pizza/subagents": "0.3.1",
48
- "@vitos-pizza/todoist": "0.3.1",
49
- "@vitos-pizza/ui-enhancements": "0.3.1",
50
- "@vitos-pizza/websearch": "0.3.1"
42
+ "@vitos-pizza/agent-mode": "0.4.1",
43
+ "@vitos-pizza/hypa": "0.4.1",
44
+ "@vitos-pizza/keybindings": "0.4.1",
45
+ "@vitos-pizza/permission-system": "0.4.1",
46
+ "@vitos-pizza/question": "0.4.1",
47
+ "@vitos-pizza/session-title": "0.4.1",
48
+ "@vitos-pizza/settings-preset": "0.4.1",
49
+ "@vitos-pizza/subagents": "0.4.1",
50
+ "@vitos-pizza/todoist": "0.4.1",
51
+ "@vitos-pizza/ui-enhancements": "0.4.1",
52
+ "@vitos-pizza/websearch": "0.4.1"
51
53
  },
52
54
  "bundledDependencies": [
55
+ "@hypabolic/pi-hypa",
53
56
  "@vitos-pizza/agent-mode",
57
+ "@vitos-pizza/hypa",
54
58
  "@vitos-pizza/keybindings",
55
59
  "@vitos-pizza/permission-system",
56
60
  "@vitos-pizza/question",
57
61
  "@vitos-pizza/session-title",
62
+ "@vitos-pizza/settings-preset",
58
63
  "@vitos-pizza/subagents",
64
+ "@vitos-pizza/todoist",
59
65
  "@vitos-pizza/ui-enhancements",
60
66
  "@vitos-pizza/websearch"
61
67
  ],
62
- "piBundled": [],
68
+ "piBundled": [
69
+ "@hypabolic/pi-hypa"
70
+ ],
63
71
  "pi": {
64
72
  "extensions": [
73
+ "node_modules/@hypabolic/pi-hypa/extensions",
65
74
  "node_modules/@vitos-pizza/permission-system/extensions",
66
75
  "node_modules/@vitos-pizza/settings-preset/extensions",
76
+ "node_modules/@vitos-pizza/hypa/extensions",
67
77
  "node_modules/@vitos-pizza/question/extensions",
68
78
  "node_modules/@vitos-pizza/ui-enhancements/extensions",
69
79
  "node_modules/@vitos-pizza/subagents/extensions",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitos-pizza/agent-mode",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Centralized agent / plan / execute mode switching for Vito's Pizzeria",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -13,8 +13,8 @@
13
13
  "lint:fix": "biome check --write ."
14
14
  },
15
15
  "dependencies": {
16
- "@vitos-pizza/keybindings": "0.3.1",
17
- "@vitos-pizza/permission-system": "0.3.1"
16
+ "@vitos-pizza/keybindings": "0.4.1",
17
+ "@vitos-pizza/permission-system": "0.4.1"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@earendil-works/pi-coding-agent": "*"
@@ -3,6 +3,10 @@ export const PLAN_MODE_TOOLS = [
3
3
  "grep",
4
4
  "find",
5
5
  "ls",
6
+ "hypa_read",
7
+ "hypa_grep",
8
+ "hypa_find",
9
+ "hypa_ls",
6
10
  "question",
7
11
  "subagent",
8
12
  "wait",
@@ -23,26 +27,34 @@ This supersedes conflicting skill or prior guidance about implementing code or c
23
27
  - Prefer \`question\` for mutually exclusive choices (2–5 options); skip when context is enough. Available to main, scout, and planner.
24
28
 
25
29
  **Exploration**
26
- - Scout is optional — only for unfamiliar or multi-file recon. Parallel scouts via \`subagent({ tasks: [...] })\` for independent areas, then planner. Light lookups: use read/grep/find/ls yourself.
30
+ - Scout is optional — only for unfamiliar or multi-file recon. Parallel scouts via \`subagent({ tasks: [...] })\` for independent areas, then planner.
31
+ - Scout/planner use \`hypa_read\` / \`hypa_grep\` / \`hypa_find\` / \`hypa_ls\` only. Main session: prefer hypa_*; fall back to read/grep/find/ls if needed.
27
32
  - Web tools only for current external facts outside the repo.
28
33
 
29
34
  **Delegation**
30
35
  - Enough context → \`subagent({ agent: "planner", task })\`
31
36
  - Need recon → \`subagent({ chain: [scout, planner] })\`
32
37
 
33
- **Optional Next footer** (2–3 one-line reply verbs) when the next step is not obvious:
38
+ **Optional open-questions footer** (2–4 one-line prompts) only when the plan may miss scope or adjacent capabilities the user has not clarified. Soft guidance — not next-steps, not mode-switching:
34
39
 
35
40
  \`\`\`
36
- **Next**
37
- - Confirm \`/mode execute\` (or Ctrl+. / Alt+M)
38
- - Say what to change if scope is off
39
- \`\`\``;
41
+ **Worth considering**
42
+ - <gap or adjacent capability the user may not have decided yet>?
43
+ - <in/out of scope this round>?
44
+ \`\`\`
45
+
46
+ Rules:
47
+ - Ask about omissions, edge cases, related features, or "do you also need X?"
48
+ - Do NOT list mode-switching or how-to-proceed verbs (e.g. \`/mode execute\`, Ctrl+.)
49
+ - Do NOT restate the plan as todos
50
+ - Prefer \`question\` for mutually exclusive choices; use this footer for soft, optional prompts
51
+ - Skip the footer when scope is already clear`;
40
52
 
41
53
  export const PLAN_MODE_MESSAGE = `[PLAN MODE ACTIVE]
42
54
 
43
55
  Read-only planning. No write/edit/bash/worker.
44
56
  Clarify with \`question\` when needed. Scout only if recon is required; otherwise planner.
45
- Return the plan and wait; optionally a short **Next** footer.`;
57
+ Prefer hypa_* read tools when available. Return the plan and wait; optionally a short **Worth considering** footer for gaps/adjacent capabilities.`;
46
58
 
47
59
  export const PLAN_MODE_ENDED_MESSAGE = `[PLAN MODE ENDED]
48
60
 
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @vitos-pizza/hypa — seed Hypa Pi defaults (additive, MCP proxy off).
3
+ */
4
+
5
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
6
+ import { seedHypaPiConfigIfMissing } from "../src/seed.ts";
7
+
8
+ export default function (pi: ExtensionAPI) {
9
+ let seeded = false;
10
+
11
+ pi.on("session_start", async (_event, _ctx) => {
12
+ if (seeded) return;
13
+ seeded = true;
14
+ seedHypaPiConfigIfMissing();
15
+ });
16
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@vitos-pizza/hypa",
3
+ "version": "0.4.1",
4
+ "description": "Vito's Pizzeria Hypa defaults — additive mode, MCP proxy off, config seed",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "private": true,
8
+ "scripts": {
9
+ "test": "vitest run",
10
+ "test:watch": "vitest",
11
+ "smoke": "node scripts/smoke.mjs",
12
+ "typecheck": "tsc --noEmit",
13
+ "lint": "biome check .",
14
+ "lint:fix": "biome check --write ."
15
+ },
16
+ "peerDependencies": {
17
+ "@earendil-works/pi-coding-agent": "*"
18
+ },
19
+ "devDependencies": {
20
+ "@earendil-works/pi-coding-agent": "*",
21
+ "vitest": "^3.2.4"
22
+ }
23
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Smoke: resolve platform Hypa binary and run --version.
3
+ * Exit 0 = ok; 2 = binary missing (skip on unsupported install).
4
+ */
5
+ import { existsSync } from "node:fs";
6
+ import { createRequire } from "node:module";
7
+ import { dirname, join } from "node:path";
8
+ import { spawnSync } from "node:child_process";
9
+ import { fileURLToPath } from "node:url";
10
+
11
+ const root = join(dirname(fileURLToPath(import.meta.url)), "../../..");
12
+ const require = createRequire(join(root, "package.json"));
13
+
14
+ function resolveHypaBin() {
15
+ const platformKey = `${process.platform}-${process.arch}`;
16
+ const map = {
17
+ "win32-x64": "@hypabolic/hypa-win32-x64",
18
+ "win32-arm64": "@hypabolic/hypa-win32-arm64",
19
+ "linux-x64": "@hypabolic/hypa-linux-x64",
20
+ "linux-arm64": "@hypabolic/hypa-linux-arm64",
21
+ "darwin-x64": "@hypabolic/hypa-darwin-x64",
22
+ "darwin-arm64": "@hypabolic/hypa-darwin-arm64",
23
+ };
24
+ const pkgName = map[platformKey];
25
+ if (!pkgName) {
26
+ console.error(`Unsupported platform: ${platformKey}`);
27
+ process.exit(2);
28
+ }
29
+ try {
30
+ const pkgJson = require.resolve(`${pkgName}/package.json`);
31
+ const binName = process.platform === "win32" ? "hypa.exe" : "hypa";
32
+ const binPath = join(dirname(pkgJson), "bin", binName);
33
+ if (!existsSync(binPath)) {
34
+ console.error(`Binary missing: ${binPath}`);
35
+ process.exit(2);
36
+ }
37
+ return binPath;
38
+ } catch (err) {
39
+ console.error(`Could not resolve ${pkgName}:`, err);
40
+ process.exit(2);
41
+ }
42
+ }
43
+
44
+ const bin = resolveHypaBin();
45
+ const result = spawnSync(bin, ["--version"], { encoding: "utf8" });
46
+ if (result.status !== 0) {
47
+ console.error(result.stderr || result.stdout || "hypa --version failed");
48
+ process.exit(result.status ?? 1);
49
+ }
50
+ console.log(`hypa smoke ok: ${result.stdout.trim() || bin}`);
@@ -0,0 +1,37 @@
1
+ import { homedir } from "node:os";
2
+ import { join } from "node:path";
3
+
4
+ /** Default Hypa Pi extension config for Vito's Pizzeria (additive, no MCP). */
5
+ export const DEFAULT_HYPA_PI_CONFIG = {
6
+ mode: "additive",
7
+ mcpProxyEnabled: false,
8
+ } as const;
9
+
10
+ export type HypaPiConfig = {
11
+ mode: string;
12
+ mcpProxyEnabled: boolean;
13
+ [key: string]: unknown;
14
+ };
15
+
16
+ /**
17
+ * Resolve config path the same way @hypabolic/pi-hypa documents:
18
+ * HYPA_PI_CONFIG, or ~/.hypa-pi/config.json. Empty / "none" means skip seeding.
19
+ */
20
+ export function resolveHypaPiConfigPath(
21
+ env: NodeJS.ProcessEnv = process.env,
22
+ home: string = homedir(),
23
+ ): string | null {
24
+ const raw = env.HYPA_PI_CONFIG;
25
+ if (raw !== undefined) {
26
+ const trimmed = raw.trim();
27
+ if (trimmed === "" || trimmed.toLowerCase() === "none") {
28
+ return null;
29
+ }
30
+ return trimmed;
31
+ }
32
+ return join(home, ".hypa-pi", "config.json");
33
+ }
34
+
35
+ export function formatDefaultHypaPiConfig(): string {
36
+ return `${JSON.stringify(DEFAULT_HYPA_PI_CONFIG, null, "\t")}\n`;
37
+ }
@@ -0,0 +1,22 @@
1
+ import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
+ import { dirname } from "node:path";
3
+ import {
4
+ formatDefaultHypaPiConfig,
5
+ resolveHypaPiConfigPath,
6
+ } from "./config.ts";
7
+
8
+ /**
9
+ * Seed ~/.hypa-pi/config.json when missing. Never overwrites an existing file.
10
+ * @returns true if a new file was written
11
+ */
12
+ export function seedHypaPiConfigIfMissing(
13
+ env: NodeJS.ProcessEnv = process.env,
14
+ ): boolean {
15
+ const path = resolveHypaPiConfigPath(env);
16
+ if (!path) return false;
17
+ if (existsSync(path)) return false;
18
+
19
+ mkdirSync(dirname(path), { recursive: true });
20
+ writeFileSync(path, formatDefaultHypaPiConfig(), "utf8");
21
+ return true;
22
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "allowImportingTsExtensions": true,
5
+ "types": ["node"]
6
+ },
7
+ "include": [
8
+ "extensions/**/*.ts",
9
+ "src/**/*.ts",
10
+ "tests/**/*.ts"
11
+ ],
12
+ "exclude": ["node_modules"]
13
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitos-pizza/keybindings",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Centralized keyboard shortcut registry for Vito's Pizzeria Pi distribution",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitos-pizza/permission-system",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Permission enforcement for Vito's Pizzeria Pi distribution",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "lint:fix": "biome check --write ."
19
19
  },
20
20
  "dependencies": {
21
- "@vitos-pizza/keybindings": "0.3.1",
21
+ "@vitos-pizza/keybindings": "0.4.1",
22
22
  "tree-sitter-bash": "^0.25.1",
23
23
  "web-tree-sitter": "^0.25.10",
24
24
  "zod": "^3.25.76"
@@ -5,6 +5,12 @@
5
5
  "grep": "allow",
6
6
  "find": "allow",
7
7
  "ls": "allow",
8
+ "hypa_read": "allow",
9
+ "hypa_grep": "allow",
10
+ "hypa_find": "allow",
11
+ "hypa_ls": "allow",
12
+ "hypa_shell": "ask",
13
+ "hypa_mcp_proxy": "deny",
8
14
  "web_search": "ask",
9
15
  "web_read": "ask",
10
16
  "path": {
@@ -28,6 +34,8 @@
28
34
  "npm test *": "allow",
29
35
  "npm run typecheck": "allow",
30
36
  "npm run lint": "allow",
37
+ "hypa *": "ask",
38
+ "hypa -c *": "ask",
31
39
  "rm -rf *": "deny",
32
40
  "sudo *": "ask"
33
41
  },