@aemonge-dev/pi-stardeck 0.0.0-stage → 0.5.0
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.
- package/LICENSE +21 -0
- package/README.md +239 -2
- package/demo/pi-stardeck.tape +59 -0
- package/docs/architecture.md +103 -0
- package/docs/assets/pi-stardeck.gif +0 -0
- package/docs/development.md +128 -0
- package/licenses/README.md +17 -0
- package/licenses/pi-fancy-footer-LICENSE +21 -0
- package/licenses/pi-vim-LICENSE +21 -0
- package/package.json +81 -4
- package/packages/pi-fancy-footer-full-palette/LICENSE +21 -0
- package/packages/pi-fancy-footer-full-palette/LOCAL-CHANGES.md +41 -0
- package/packages/pi-fancy-footer-full-palette/README.md +468 -0
- package/packages/pi-fancy-footer-full-palette/package.json +52 -0
- package/packages/pi-fancy-footer-full-palette/src/api.ts +204 -0
- package/packages/pi-fancy-footer-full-palette/src/config-editor.ts +634 -0
- package/packages/pi-fancy-footer-full-palette/src/config.ts +852 -0
- package/packages/pi-fancy-footer-full-palette/src/data-widgets.ts +259 -0
- package/packages/pi-fancy-footer-full-palette/src/git.ts +130 -0
- package/packages/pi-fancy-footer-full-palette/src/index.ts +479 -0
- package/packages/pi-fancy-footer-full-palette/src/layout.ts +309 -0
- package/packages/pi-fancy-footer-full-palette/src/provider-status.ts +1466 -0
- package/packages/pi-fancy-footer-full-palette/src/render.ts +1061 -0
- package/packages/pi-fancy-footer-full-palette/src/shared.ts +903 -0
- package/packages/pi-stardeck/README.md +219 -0
- package/packages/pi-stardeck/index.ts +691 -0
- package/packages/pi-stardeck/package.json +32 -0
- package/packages/pi-stardeck/src/activity-age.ts +184 -0
- package/packages/pi-stardeck/src/capabilities.ts +105 -0
- package/packages/pi-stardeck/src/deck.ts +807 -0
- package/packages/pi-stardeck/src/gauge.ts +1323 -0
- package/packages/pi-stardeck/src/git-refresh.ts +5 -0
- package/packages/pi-stardeck/src/process-resources.ts +428 -0
- package/packages/pi-stardeck/src/title-state.ts +195 -0
- package/packages/pi-stardeck/src/title.ts +443 -0
- package/packages/pi-vim-top-border/LICENSE +21 -0
- package/packages/pi-vim-top-border/LOCAL-CHANGES.md +71 -0
- package/packages/pi-vim-top-border/README.md +577 -0
- package/packages/pi-vim-top-border/clipboard-mirror.ts +451 -0
- package/packages/pi-vim-top-border/clipboard-policy.ts +23 -0
- package/packages/pi-vim-top-border/cursor-shape.ts +131 -0
- package/packages/pi-vim-top-border/index.ts +4195 -0
- package/packages/pi-vim-top-border/input-keys.ts +49 -0
- package/packages/pi-vim-top-border/mode-change-command.ts +120 -0
- package/packages/pi-vim-top-border/mode-colors.ts +97 -0
- package/packages/pi-vim-top-border/mode-label.ts +62 -0
- package/packages/pi-vim-top-border/motions.ts +297 -0
- package/packages/pi-vim-top-border/package.json +47 -0
- package/packages/pi-vim-top-border/prompt-external-editor.ts +152 -0
- package/packages/pi-vim-top-border/prompt-rail.ts +334 -0
- package/packages/pi-vim-top-border/prompt-status.ts +131 -0
- package/packages/pi-vim-top-border/settings.ts +287 -0
- package/packages/pi-vim-top-border/text-objects.ts +389 -0
- package/packages/pi-vim-top-border/types.ts +51 -0
- package/packages/pi-vim-top-border/visual.ts +65 -0
- package/packages/pi-vim-top-border/word-boundary-cache.ts +196 -0
- package/packages/status/README.md +398 -0
- package/packages/status/index.ts +1717 -0
- package/packages/status/package.json +33 -0
- package/packages/status/src/active-work.ts +235 -0
- package/packages/status/src/config.ts +218 -0
- package/packages/status/src/diagnostics.ts +238 -0
- package/packages/status/src/goal-block.ts +377 -0
- package/packages/status/src/goal.ts +170 -0
- package/packages/status/src/ledger.ts +101 -0
- package/packages/status/src/openspec.ts +394 -0
- package/packages/status/src/orchestration.ts +237 -0
- package/packages/status/src/publisher.ts +1294 -0
- package/packages/status/src/reducer.ts +190 -0
- package/packages/status/src/runtime-runs.ts +267 -0
- package/packages/status/src/state.ts +178 -0
- package/packages/status/src/title-activity.ts +224 -0
- package/packages/status/src/title-state.ts +218 -0
- package/packages/status/src/turn-cost.ts +63 -0
- package/packages/status/src/types.ts +228 -0
- package/src/deck-surface.ts +46 -0
- package/src/health.ts +228 -0
- package/src/index.ts +28 -0
- package/src/pi-status.ts +334 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Andres Monge <andres@aemonge.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,240 @@
|
|
|
1
|
-
#
|
|
1
|
+
# pi-stardeck
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A Vim- and tmux-inspired command deck for
|
|
4
|
+
[Pi](https://pi.dev): lifecycle context, external-Neovim prompt
|
|
5
|
+
composition, Vim command handling, and responsive operational telemetry in one package.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
> [!IMPORTANT]
|
|
10
|
+
> The best experience is **Pi in regular mode inside `nvim +terminal`**, with a blocking
|
|
11
|
+
> Neovim bridge configured as Pi's `externalEditor`. Pi fullscreen reserves a three-row
|
|
12
|
+
> editor slot and is not the target layout.
|
|
13
|
+
|
|
14
|
+
## The cockpit
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
Header Deck ◀── bounded lifecycle, work, project, model, and resource context
|
|
18
|
+
│
|
|
19
|
+
└── bottom separator ◀── live Vim Normal / Visual / EX / Insert feedback
|
|
20
|
+
|
|
21
|
+
zero-row Vim command surface ── Insert transition ──▶ Neovim prompt.md
|
|
22
|
+
◀── :x + auto-submit ───┘
|
|
23
|
+
|
|
24
|
+
responsive Footer ◀── model, quota, context, cost, Git, and capability telemetry
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The package composes four bounded modules in dependency-safe order:
|
|
28
|
+
|
|
29
|
+
- **Fancy Footer** — responsive model, quota, context, cost, Git, and resource telemetry;
|
|
30
|
+
- **Status provider** — lifecycle, OpenSpec, Session Work, and diagnostic state;
|
|
31
|
+
- **Header Deck** — current activity, focus, project state, and compact telemetry.
|
|
32
|
+
Companion extensions surface as leading telemetry icons:
|
|
33
|
+
|
|
34
|
+
| Chip | Extension | Meaning |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `[↻ ▤]` recall + records | `engram` | persistent memory store |
|
|
37
|
+
| `⌬` benzene | `graphify` | knowledge graph |
|
|
38
|
+
| `⛨` shield | `appa` / `pi-openappa` | tool-call guard |
|
|
39
|
+
|
|
40
|
+
Cyan means healthy, orange means warn, error, or not reporting.
|
|
41
|
+
|
|
42
|
+
Optional Git, OpenSpec, Devbox, tmux, Neovim, provider-quota, and Nerd Font capabilities
|
|
43
|
+
fail soft when absent. Pi core remains the API authority.
|
|
44
|
+
|
|
45
|
+
## Recommended setup
|
|
46
|
+
|
|
47
|
+
### Requirements
|
|
48
|
+
|
|
49
|
+
- Node.js 24 or newer;
|
|
50
|
+
- a current Pi installation;
|
|
51
|
+
- Neovim for the recommended workflow;
|
|
52
|
+
- one blocking `externalEditor` executable that accepts the temporary Markdown file as
|
|
53
|
+
its only argument, opens it in the enclosing Neovim instance, and exits when that
|
|
54
|
+
buffer closes.
|
|
55
|
+
|
|
56
|
+
The bridge is deliberately not shipped: connecting to a private Neovim server is
|
|
57
|
+
machine-specific and belongs in your trusted user configuration.
|
|
58
|
+
|
|
59
|
+
Configure the bridge through Pi's global `~/.pi/agent/settings.json` or `/settings`:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"externalEditor": "/absolute/path/to/your/blocking-nvim-bridge"
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The current adapter invokes that setting as one executable without a shell. Put arguments
|
|
68
|
+
inside your bridge script rather than appending shell text to `externalEditor`.
|
|
69
|
+
|
|
70
|
+
Start Neovim, open a terminal, and run Pi in regular mode:
|
|
71
|
+
|
|
72
|
+
```vim
|
|
73
|
+
:terminal
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pi --tui-mode regular
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Optional Ctrl-E mapping
|
|
81
|
+
|
|
82
|
+
Current Pi defaults `app.editor.external` to Ctrl-G. The validated cockpit uses Ctrl-E;
|
|
83
|
+
this remains your user-owned Pi configuration:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"app.editor.external": "ctrl+e"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Place that in `~/.pi/agent/keybindings.json`, then run `/reload`. The package never edits
|
|
92
|
+
Pi or Neovim configuration automatically.
|
|
93
|
+
|
|
94
|
+
## Prompt workflow
|
|
95
|
+
|
|
96
|
+
The consolidated surface starts in Normal and renders zero native prompt rows.
|
|
97
|
+
|
|
98
|
+
1. Press `i`, `a`, `I`, `A`, `o`, `O`, `s`, `S`, `C`, a supported change command, or
|
|
99
|
+
Pi's configured external-editor shortcut.
|
|
100
|
+
2. The Header Deck shows Insert while Neovim owns the handoff.
|
|
101
|
+
3. Compose in the temporary `prompt.md` buffer.
|
|
102
|
+
4. Use `:x` or `:wq` after writing to return and submit exactly once.
|
|
103
|
+
|
|
104
|
+
Submission follows the last explicit write—not a content comparison:
|
|
105
|
+
|
|
106
|
+
- edited `:x` or `:wq` submits;
|
|
107
|
+
- unchanged `:x` that performs no write submits nothing;
|
|
108
|
+
- `:q!` without a write submits nothing;
|
|
109
|
+
- `:w`, further unsaved edits, then `:q!` submits the last saved bytes;
|
|
110
|
+
- failed, inactive, and duplicate handoffs never submit.
|
|
111
|
+
|
|
112
|
+
Normal, Visual, and EX commands still operate on the hidden draft. Ordinary terminal
|
|
113
|
+
scrollback navigation and text selection belong to the enclosing Neovim terminal buffer.
|
|
114
|
+
Restoring outer Neovim's terminal Insert state after the prompt closes also remains
|
|
115
|
+
Neovim configuration.
|
|
116
|
+
|
|
117
|
+
## Health check
|
|
118
|
+
|
|
119
|
+
Run the read-only health report directly:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
/stardeck-health
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Or through the exact Pi EX-command bridge from Normal mode:
|
|
126
|
+
|
|
127
|
+
```vim
|
|
128
|
+
:stardeck-health
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The bounded report classifies package registration, interactive TUI, external-editor
|
|
132
|
+
readiness, recommended Neovim topology, and optional local capabilities as `PASS`,
|
|
133
|
+
`WARN`, or `INFO`. It does not execute the configured editor or expose commands,
|
|
134
|
+
settings, endpoints, environment values, credentials, or absolute paths.
|
|
135
|
+
|
|
136
|
+
## Installation
|
|
137
|
+
|
|
138
|
+
The package is MIT-licensed and published as `@aemonge-dev/pi-stardeck`.
|
|
139
|
+
Review extensions before installation because Pi packages execute with user
|
|
140
|
+
permissions. The command below works from any directory; it does not require
|
|
141
|
+
cloning this repository.
|
|
142
|
+
|
|
143
|
+
### From npm
|
|
144
|
+
|
|
145
|
+
Install the cockpit extension through Pi:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
pi install npm:@aemonge-dev/pi-stardeck
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Do not load this package alongside the four legacy component package entries.
|
|
152
|
+
Inspect `pi list`, then remove or disable duplicates as one reviewed user
|
|
153
|
+
action. `npm link` is not Pi's package-registration mechanism.
|
|
154
|
+
|
|
155
|
+
### Publish runbook (maintainer)
|
|
156
|
+
|
|
157
|
+
Publishing is a maintainer action with maintainer credentials, never part of
|
|
158
|
+
automated checks. From the repository root:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
npm install --package-lock-only
|
|
162
|
+
npm publish --access public
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The scoped package name requires `--access public`; the lockfile refresh
|
|
166
|
+
keeps `npm ci` reproducible after an identity change.
|
|
167
|
+
|
|
168
|
+
### Local path (development)
|
|
169
|
+
|
|
170
|
+
From the repository root:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npm ci
|
|
174
|
+
npm run check
|
|
175
|
+
pi install "$(pwd -P)"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Pinned private Git source
|
|
179
|
+
|
|
180
|
+
After the repository has an authorized remote, install an immutable tag or
|
|
181
|
+
commit:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
pi install git:<host>/<owner>/pi-stardeck@<tag-or-commit>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
A pinned ref does not move during ordinary package updates.
|
|
188
|
+
|
|
189
|
+
### Rollback
|
|
190
|
+
|
|
191
|
+
Keep the previous source/ref before changing installation. To remove the npm
|
|
192
|
+
installation:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
pi remove npm:@aemonge-dev/pi-stardeck
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
For local-path installations, pass the absolute path to `pi remove` instead.
|
|
199
|
+
Restore the previous package entries only after confirming this package has
|
|
200
|
+
been removed; never keep both cockpit registrations active.
|
|
201
|
+
|
|
202
|
+
## Reproducible VHS demo
|
|
203
|
+
|
|
204
|
+
The checked-in tape simulates a fresh machine: the published package
|
|
205
|
+
installs into an isolated throwaway `HOME` with a user-local npm prefix, and
|
|
206
|
+
a clean offline Pi session runs the `/stardeck-health` report through Pi
|
|
207
|
+
Vim's Normal-mode EX bridge. No provider,
|
|
208
|
+
session, credential, or private editor bridge is involved. From the
|
|
209
|
+
repository root, run:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
vhs demo/pi-stardeck.tape
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
It writes `docs/assets/pi-stardeck.gif` using VHS's explicit Gruvbox
|
|
216
|
+
Light terminal theme and a compact frame that keeps the cockpit prominent.
|
|
217
|
+
Review the entire recording for private paths, notifications, or terminal
|
|
218
|
+
history before committing it. The single reviewed GIF is the project's
|
|
219
|
+
explicit demo-asset exception; ordinary screenshots and private runtime
|
|
220
|
+
captures remain excluded.
|
|
221
|
+
|
|
222
|
+
## Development
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
npm run check:package
|
|
226
|
+
npm run check:package:load
|
|
227
|
+
npm run check
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
The package gate constrains shipped paths, creates real tarballs only under temporary
|
|
231
|
+
ignored directories, extracts them, and loads them through credential-free offline Pi.
|
|
232
|
+
It never initializes another Git/Rustory repository or mutates Pi settings.
|
|
233
|
+
|
|
234
|
+
See:
|
|
235
|
+
|
|
236
|
+
- [`docs/architecture.md`](docs/architecture.md) — package and privacy boundaries;
|
|
237
|
+
- [`docs/development.md`](docs/development.md) — focused checks and local development;
|
|
238
|
+
- [`licenses/README.md`](licenses/README.md) — upstream licenses and provenance;
|
|
239
|
+
- [`packages/pi-vim-top-border/README.md`](packages/pi-vim-top-border/README.md) — complete
|
|
240
|
+
Vim command reference.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Run from the pi-stardeck repository root.
|
|
2
|
+
# Requires Pi, npm, and VHS; the recording installs the published package
|
|
3
|
+
# into an isolated throwaway HOME, so it never touches real settings,
|
|
4
|
+
# sessions, providers, or the private editor bridge.
|
|
5
|
+
|
|
6
|
+
Output docs/assets/pi-stardeck.gif
|
|
7
|
+
|
|
8
|
+
Set Shell "bash"
|
|
9
|
+
Set Theme "Gruvbox Light"
|
|
10
|
+
Set Width 1400
|
|
11
|
+
Set Height 520
|
|
12
|
+
Set Padding 20
|
|
13
|
+
Set FontSize 24
|
|
14
|
+
Set TypingSpeed 35ms
|
|
15
|
+
Set Framerate 30
|
|
16
|
+
Set PlaybackSpeed 1
|
|
17
|
+
|
|
18
|
+
# Simulate a fresh machine: everything installs into a fixed throwaway HOME
|
|
19
|
+
# under /tmp with a user-local npm prefix. The path is wiped at the start of
|
|
20
|
+
# every run, so failed renders never accumulate. The real npm download cache
|
|
21
|
+
# stays attached so the recording does not stall on a cold cache. Keep setup
|
|
22
|
+
# out of the recording.
|
|
23
|
+
Hide
|
|
24
|
+
Type "export DEMO_HOME=/tmp/pi-stardeck-demo && rm -rf $DEMO_HOME && mkdir -p $DEMO_HOME && export NPM_CACHE_KEEP=$HOME/.npm && export HOME=$DEMO_HOME && export NPM_CONFIG_PREFIX=$HOME/.npm-global && export npm_config_cache=$NPM_CACHE_KEEP && export PATH=$NPM_CONFIG_PREFIX/bin:$PATH && clear"
|
|
25
|
+
Enter
|
|
26
|
+
Wait
|
|
27
|
+
Show
|
|
28
|
+
|
|
29
|
+
# Install the cockpit through Pi's package manager.
|
|
30
|
+
# Long work sleeps hidden; the visible Wait commands then match instantly
|
|
31
|
+
# against output that is already on screen — nothing races the recording.
|
|
32
|
+
Type "pi install npm:@aemonge-dev/pi-stardeck"
|
|
33
|
+
Enter
|
|
34
|
+
Hide
|
|
35
|
+
Sleep 15s
|
|
36
|
+
Show
|
|
37
|
+
Wait+Screen@30s /Installed npm:@aemonge-dev\/pi-stardeck/
|
|
38
|
+
Sleep 1s
|
|
39
|
+
|
|
40
|
+
# Launch a clean cockpit session from the fresh install.
|
|
41
|
+
Type "clear && pi --offline --no-session --no-context-files --tui-mode regular"
|
|
42
|
+
Enter
|
|
43
|
+
Hide
|
|
44
|
+
Sleep 12s
|
|
45
|
+
Show
|
|
46
|
+
Wait+Screen@60s /waiting/
|
|
47
|
+
Sleep 4s
|
|
48
|
+
|
|
49
|
+
# Exercise a real ephemeral title change without creating a session.
|
|
50
|
+
Type ":name Public cockpit demo"
|
|
51
|
+
Enter
|
|
52
|
+
Wait+Screen /Public cockpit demo/
|
|
53
|
+
Sleep 3s
|
|
54
|
+
|
|
55
|
+
# Dispatch the credential-free health report through Pi Vim's Normal-mode EX bridge.
|
|
56
|
+
Type ":stardeck-health"
|
|
57
|
+
Enter
|
|
58
|
+
Wait+Screen /pi-stardeck health/
|
|
59
|
+
Sleep 5s
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
## Current imported composition
|
|
4
|
+
|
|
5
|
+
The baseline is one Pi package identity with four existing extension factories:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
root package manifest
|
|
9
|
+
├── Fancy Footer telemetry provider
|
|
10
|
+
├── status and focus producer
|
|
11
|
+
├── Header Deck and telemetry producer
|
|
12
|
+
└── focused zero-row Vim command surface and external-editor consumer
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The manifest lists exact entrypoints rather than flattening approximately 36,000 lines
|
|
16
|
+
into one file. Pi loads the package as one source; the modules continue to coordinate
|
|
17
|
+
through the event protocols that already isolate them.
|
|
18
|
+
|
|
19
|
+
Startup order is intentional:
|
|
20
|
+
|
|
21
|
+
1. Fancy Footer subscribes to widget snapshots.
|
|
22
|
+
2. Status registers focus tools and publishes lifecycle/work snapshots.
|
|
23
|
+
3. Context Header consumes status and supplies the Header Deck renderer.
|
|
24
|
+
4. Pi Vim installs the focused editor component, renders that deck with its live mode,
|
|
25
|
+
and routes composition through the external-editor adapter.
|
|
26
|
+
|
|
27
|
+
Taskflow remains a separate optional Pi package. Its bounded runtime events are consumed
|
|
28
|
+
when present; it is not a dependency of this package.
|
|
29
|
+
|
|
30
|
+
## Stable protocol seams
|
|
31
|
+
|
|
32
|
+
The imported modules currently coordinate through:
|
|
33
|
+
|
|
34
|
+
- `pi-fancy-footer:widget` — complete protocol-1 widget snapshots;
|
|
35
|
+
- `pi-fancy-footer:ready` — consumer readiness and producer republish;
|
|
36
|
+
- `galactica-status:header` — bounded lifecycle, selection, suggestion, and active-run
|
|
37
|
+
snapshots;
|
|
38
|
+
- `galactica-status:prompt-row` — prompt-rail telemetry;
|
|
39
|
+
- `pi-vim:mode-change` — bounded editor mode events;
|
|
40
|
+
- `pi-mcp-adapter/status/v1` — optional MCP availability.
|
|
41
|
+
|
|
42
|
+
These channels are compatibility boundaries. Consolidation may centralize their types
|
|
43
|
+
but must not silently change semantics or permit sensitive payloads. Selection is an
|
|
44
|
+
additive protocol-1 projection of explicit OpenSpec, Goal, or Session Work state;
|
|
45
|
+
suggestion is controlled vocabulary rather than generated prose. Active-run telemetry
|
|
46
|
+
contains only bounded child and subagent counts derived from Pi lifecycle events. It
|
|
47
|
+
never carries prompts, names, process identities, arguments, or child output. The deck
|
|
48
|
+
renders these as a fixed operational row above a bounded full-width selection canvas.
|
|
49
|
+
Its presentation keeps live runtime and the bold lifecycle anchor blue, uses regular
|
|
50
|
+
blue for explicit selection, and keeps ordinary activity neutral. Recovery activity and
|
|
51
|
+
its direction return to blue together; other ordinary direction remains green.
|
|
52
|
+
Incomplete progress stays neutral and right-aligned, while yellow/red remain reserved
|
|
53
|
+
for attention and blocked states.
|
|
54
|
+
|
|
55
|
+
## Target module shape
|
|
56
|
+
|
|
57
|
+
The consolidation Plan should evolve toward bounded ownership such as:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
src/
|
|
61
|
+
├── index.ts # composition root only
|
|
62
|
+
├── editor/ # modes, motions, operators, clipboard
|
|
63
|
+
├── external-editor/ # Pi action adapter, not private bridge logic
|
|
64
|
+
├── header/ # lifecycle and focus rendering
|
|
65
|
+
├── footer/ # responsive renderer and provider state
|
|
66
|
+
├── deck-surface/ # Header Deck renderer and live mode context
|
|
67
|
+
├── status/ # normalized project/runtime state
|
|
68
|
+
├── adapters/ # optional OpenSpec, Taskflow, Devbox, MCP
|
|
69
|
+
├── config/ # namespace, presets, legacy compatibility
|
|
70
|
+
└── compatibility/ # feature-detected Pi API boundaries
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This is a direction, not permission to move files. Each confirmed Task should preserve a
|
|
74
|
+
runnable boundary and keep the imported trees available for comparison until their role
|
|
75
|
+
is deliberately retired.
|
|
76
|
+
|
|
77
|
+
## External editor boundary
|
|
78
|
+
|
|
79
|
+
The consolidated package selects Pi Vim's explicit `external-editor-only` surface. The
|
|
80
|
+
focused `ModalEditor` remains the input and hidden-draft authority, but in regular Pi
|
|
81
|
+
mode its render path returns only the Header Deck: no prompt text, editor frame, cursor,
|
|
82
|
+
or autocomplete rows. Pi's fullscreen layout reserves a core three-row editor slot, so
|
|
83
|
+
fullscreen may retain blank space and is not the target workflow.
|
|
84
|
+
|
|
85
|
+
The existing `PromptExternalEditor` adapter remains the single handoff used by direct
|
|
86
|
+
Ctrl-E and automatic Insert-producing commands. It resolves the already configured
|
|
87
|
+
external editor and owns the private temporary prompt file; this package does not alter
|
|
88
|
+
Neovim configuration or duplicate the private Neovim bridge. A centralized
|
|
89
|
+
`setMode('insert')` interception keeps the external-only surface's command state in
|
|
90
|
+
Normal, queues one request, and flushes it after the current command finishes mutating
|
|
91
|
+
cursor and draft text. While the handoff is active, the live deck rail resolves visually
|
|
92
|
+
to Insert without recursively changing command state.
|
|
93
|
+
|
|
94
|
+
Before launch, the adapter assigns the temporary file a known modification-time
|
|
95
|
+
sentinel. A successful exit whose file metadata moved away from that sentinel proves an
|
|
96
|
+
explicit write, including a same-content write. The returned saved bytes then submit
|
|
97
|
+
exactly once through the editor's ordinary Enter path. An unwritten exit, failed launch,
|
|
98
|
+
inactive controller, or duplicate request returns to Normal feedback without sending.
|
|
99
|
+
If a user writes, keeps editing, then exits without saving again, the last written bytes
|
|
100
|
+
are the honest submission boundary. Normal, Visual, and EX dispatch continue through the
|
|
101
|
+
focused custom editor, while previously unsupported Vim commands remain unsupported.
|
|
102
|
+
Restoring the enclosing Neovim terminal's `startinsert` mode remains Neovim configuration
|
|
103
|
+
and is intentionally outside this package.
|
|
Binary file
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
## Standalone boundary
|
|
4
|
+
|
|
5
|
+
Work from the standalone repository and confirm its current integrity:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
cd /home/aemonge/projects/pi-stardeck
|
|
9
|
+
pwd -P
|
|
10
|
+
git status --short
|
|
11
|
+
npm run check:baseline
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The exact import is preserved at Git commit `9d7bb84` and in
|
|
15
|
+
`baseline/imported-source.sha256`. Current intentional package files are tracked by
|
|
16
|
+
`baseline/source.sha256`; update that manifest only inside a confirmed Task after focused
|
|
17
|
+
checks pass.
|
|
18
|
+
|
|
19
|
+
## Dependencies
|
|
20
|
+
|
|
21
|
+
The root package is the only dependency-install boundary. Pi provides the four runtime
|
|
22
|
+
peers used by the extensions:
|
|
23
|
+
|
|
24
|
+
- `@earendil-works/pi-ai`;
|
|
25
|
+
- `@earendil-works/pi-coding-agent`;
|
|
26
|
+
- `@earendil-works/pi-tui`;
|
|
27
|
+
- `typebox`.
|
|
28
|
+
|
|
29
|
+
Development uses one root `package-lock.json`; workspace-local lockfiles and
|
|
30
|
+
`node_modules` are not part of the project. After the cache has been populated, reproduce
|
|
31
|
+
the exact tree without network access:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm ci --offline --ignore-scripts --no-audit --no-fund
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Do not weaken peer contracts, copy Pi's installation tree, or commit generated
|
|
38
|
+
dependencies.
|
|
39
|
+
|
|
40
|
+
## Verification
|
|
41
|
+
|
|
42
|
+
Nearest focused commands remain available:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run test:status
|
|
46
|
+
npm run test:stardeck
|
|
47
|
+
npm run test:footer
|
|
48
|
+
npm run test:vim
|
|
49
|
+
npm run test:components
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The complete deterministic gate is:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm run check
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
It verifies current and imported integrity, the packed-file allowlist, a real temporary
|
|
59
|
+
artifact extraction and credential-free offline Pi load, formatting, Biome and ESLint,
|
|
60
|
+
strict TypeScript, repository tooling tests, every component suite, and schema-aware
|
|
61
|
+
OpenSpec planning state. The package checks are also available independently:
|
|
62
|
+
|
|
63
|
+
````bash
|
|
64
|
+
npm run check:package
|
|
65
|
+
npm run check:package:load
|
|
66
|
+
``` Formatter writes are separate and explicit:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm run format
|
|
70
|
+
npm run format:check
|
|
71
|
+
````
|
|
72
|
+
|
|
73
|
+
`npm run check:openspec` treats `skip_specs: true` only as a planning-schema contract for
|
|
74
|
+
completed `ramona-idea` and `ramona-plan` artifacts. Every other change is delegated to
|
|
75
|
+
upstream strict OpenSpec validation.
|
|
76
|
+
|
|
77
|
+
## Isolated Pi loading
|
|
78
|
+
|
|
79
|
+
The normal Pi settings may still load the original Galactica packages. Avoid duplicate
|
|
80
|
+
commands, event listeners and editor registration by disabling normal discovery during a
|
|
81
|
+
probe:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pi --offline --no-extensions -e "$(pwd -P)" --list-models
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Use a bounded interactive session only when its manual checks are declared. Do not make
|
|
88
|
+
provider requests merely to prove package loading.
|
|
89
|
+
|
|
90
|
+
After parity validation and exact `ALLOW PI CONFIG` authority, install the local package
|
|
91
|
+
with:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pi install "$(pwd -P)"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Then remove or disable the four legacy package entries as one reviewed migration. Do not
|
|
98
|
+
use `npm link`; Pi local paths are already linked without copying.
|
|
99
|
+
|
|
100
|
+
## Packaging
|
|
101
|
+
|
|
102
|
+
`npm run check:package` wraps `npm pack --dry-run --json --ignore-scripts` and rejects
|
|
103
|
+
planning records, tests, baselines, agent instructions, development configuration,
|
|
104
|
+
private settings, and credentials. `npm run check:package:load` creates the actual
|
|
105
|
+
artifact only in a temporary directory, extracts it, and invokes that package through Pi
|
|
106
|
+
with a fresh HOME, no session, no discovered extensions, no credential environment, and
|
|
107
|
+
o network.
|
|
108
|
+
|
|
109
|
+
The private package is not authorized for npm publication or remote Git push. Optional
|
|
110
|
+
capabilities remain fixture-covered without initializing an auxiliary Git or Rustory
|
|
111
|
+
repository.
|
|
112
|
+
|
|
113
|
+
## VHS demonstration
|
|
114
|
+
|
|
115
|
+
The demo source is `demo/pi-stardeck.tape`. VHS is intentionally not a project
|
|
116
|
+
runtime or development dependency. The public header-led recording hides routine
|
|
117
|
+
startup, runs Pi directly, and does not require the private Neovim bridge:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
vhs demo/pi-stardeck.tape
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The tape uses offline, sessionless Pi, applies an ephemeral public title, and dispatches
|
|
124
|
+
`:stardeck-health` through Pi Vim's Normal-mode EX bridge rather than sending a provider
|
|
125
|
+
prompt. It pins VHS's Gruvbox Light terminal theme, uses compact header-led framing, and
|
|
126
|
+
waits for stable screen text instead of relying only on launch timing. Human must review
|
|
127
|
+
`docs/assets/pi-stardeck.gif` for private runtime content before its final
|
|
128
|
+
Task-boundary commit.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Licenses and provenance
|
|
2
|
+
|
|
3
|
+
`pi-stardeck` is private and currently marked `UNLICENSED` as a whole. Imported
|
|
4
|
+
third-party-derived components retain their own licenses:
|
|
5
|
+
|
|
6
|
+
- `pi-vim-LICENSE` covers the imported `pi-vim-top-border` descendant;
|
|
7
|
+
- `pi-fancy-footer-LICENSE` covers the imported Fancy Footer fork.
|
|
8
|
+
|
|
9
|
+
The same license text remains beside each imported source. Local modifications are
|
|
10
|
+
recorded in:
|
|
11
|
+
|
|
12
|
+
- `packages/pi-vim-top-border/LOCAL-CHANGES.md`;
|
|
13
|
+
- `packages/pi-fancy-footer-full-palette/LOCAL-CHANGES.md`.
|
|
14
|
+
|
|
15
|
+
Do not remove or replace these notices when consolidating or packing the source. A
|
|
16
|
+
future public release requires an explicit project-level licensing decision in addition
|
|
17
|
+
to retaining upstream attribution.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matthias Vallentin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lajarre
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|