repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

pi: remove dev tooling (moved to pi-ext repo)

fb50f666ac5587a5af39a8c1bd1b802d5d7fb232

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

scripts/, drivers/, justfile, agent/AGENTS.md, agent/llmiterate
state, and pi/.gitignore now live in github.com/bugabinga/pi-ext.
Dotfiles/pi keeps runtime config only: auth, settings, keybindings,
models, remember, agent/git skill stub.

Changed files (14)

pi/.gitignore

Deleted
deleted file mode 100644
1 -# Local env files
2 -.env
3 -.env.*
4 -!.env.example
6 -# Local package/research caches
7 -node_modules/
8 -**/node_modules/
9 -research/
10 -.tmp/
11 -.demo/

pi/agent/AGENTS.md

Deleted
deleted file mode 100644
1 -SIMPLICITY!
2 -MINIMALSM!
3 -BRUTALISM!
5 -DEATH TO LEGACY/COMPAT/HEDGING!
6 -DEATH TO EDGE CASES! FOUND SOME? TELL ME.
8 -BENCH HARNESS LAW:
9 -- Prompts MUST be fair and profile-neutral.
10 -- Never add task instructions that name, require, forbid, or steer toward/away from an extension/tool under test.
11 -- Do not ban normal baseline strategies just to force extension usage.
12 -- If an extension needs evaluation, design neutral workloads where its natural behavior can help.
13 -- Extension-specific forcing belongs only in explicit debug experiments, not benchmark prompts.

pi/agent/llmiterate/1f19107742728ff867bbfbb138fdea3b7ab8ef4c487fa519ebc811980ff7b27d/state.json

Deleted
deleted file mode 100644
1 -{
2 - "version": 1,
3 - "processed": {
4 - ".local/share/Trash/files/umu/steamrt3/sniper_platform_3.0.20260316.216289/files/lib/python3.9/cmd.py:49:7f386ff9": {
5 - "file": ".local/share/Trash/files/umu/steamrt3/sniper_platform_3.0.20260316.216289/files/lib/python3.9/cmd.py",
6 - "startLine": 49,
7 - "endLine": 49,
8 - "promptHash": "7f386ff9",
9 - "promptPreview": "= '(Cmd) '",
10 - "queuedAt": 1778114437171
11 - },
12 - ".local/share/Trash/files/screenpipe/apps/screenpipe-app-tauri/node_modules/parse5/dist/cjs/common/html.d.ts:14:4171ffea": {
13 - "file": ".local/share/Trash/files/screenpipe/apps/screenpipe-app-tauri/node_modules/parse5/dist/cjs/common/html.d.ts",
14 - "startLine": 14,
15 - "endLine": 14,
16 - "promptHash": "4171ffea",
17 - "promptPreview": "= \"prompt\",",
18 - "queuedAt": 1778114439869
19 - },
20 - ".local/share/Trash/files/screenpipe/apps/screenpipe-app-tauri/node_modules/parse5/dist/common/html.d.ts:14:4171ffea": {
21 - "file": ".local/share/Trash/files/screenpipe/apps/screenpipe-app-tauri/node_modules/parse5/dist/common/html.d.ts",
22 - "startLine": 14,
23 - "endLine": 14,
24 - "promptHash": "4171ffea",
25 - "promptPreview": "= \"prompt\",",
26 - "queuedAt": 1778114439874
27 - },
28 - ".local/share/Trash/files/git/github.com/tanvesh01/pierre-diffs/node_modules/@google/genai/dist/node/node.d.ts:9636:b4eaa0aa": {
29 - "file": ".local/share/Trash/files/git/github.com/tanvesh01/pierre-diffs/node_modules/@google/genai/dist/node/node.d.ts",
30 - "startLine": 9636,
31 - "endLine": 9636,
32 - "promptHash": "b4eaa0aa",
33 - "promptPreview": "= \"PROMPT\",",
34 - "queuedAt": 1778114450479
35 - },
36 - ".local/share/Trash/files/git/github.com/tanvesh01/pierre-diffs/node_modules/@google/genai/dist/vertex_internal/index.d.ts:6293:b4eaa0aa": {
37 - "file": ".local/share/Trash/files/git/github.com/tanvesh01/pierre-diffs/node_modules/@google/genai/dist/vertex_internal/index.d.ts",
38 - "startLine": 6293,
39 - "endLine": 6293,
40 - "promptHash": "b4eaa0aa",
41 - "promptPreview": "= \"PROMPT\",",
42 - "queuedAt": 1778114450483
43 - },
44 - ".local/share/Trash/files/git/github.com/tanvesh01/pierre-diffs/node_modules/@google/genai/dist/web/web.d.ts:9629:b4eaa0aa": {
45 - "file": ".local/share/Trash/files/git/github.com/tanvesh01/pierre-diffs/node_modules/@google/genai/dist/web/web.d.ts",
46 - "startLine": 9629,
47 - "endLine": 9629,
48 - "promptHash": "b4eaa0aa",
49 - "promptPreview": "= \"PROMPT\",",
50 - "queuedAt": 1778114450487
51 - },
52 - ".local/share/Trash/files/git/github.com/tanvesh01/pierre-diffs/node_modules/@google/genai/dist/genai.d.ts:9624:b4eaa0aa": {
53 - "file": ".local/share/Trash/files/git/github.com/tanvesh01/pierre-diffs/node_modules/@google/genai/dist/genai.d.ts",
54 - "startLine": 9624,
55 - "endLine": 9624,
56 - "promptHash": "b4eaa0aa",
57 - "promptPreview": "= \"PROMPT\",",
58 - "queuedAt": 1778114450490
59 - },
60 - ".local/share/Trash/files/node_modules/@google/genai/dist/node/node.d.ts:9759:b4eaa0aa": {
61 - "file": ".local/share/Trash/files/node_modules/@google/genai/dist/node/node.d.ts",
62 - "startLine": 9759,
63 - "endLine": 9759,
64 - "promptHash": "b4eaa0aa",
65 - "promptPreview": "= \"PROMPT\",",
66 - "queuedAt": 1778114452193
67 - },
68 - ".local/share/Trash/files/node_modules/@google/genai/dist/vertex_internal/index.d.ts:6346:b4eaa0aa": {
69 - "file": ".local/share/Trash/files/node_modules/@google/genai/dist/vertex_internal/index.d.ts",
70 - "startLine": 6346,
71 - "endLine": 6346,
72 - "promptHash": "b4eaa0aa",
73 - "promptPreview": "= \"PROMPT\",",
74 - "queuedAt": 1778114452196
75 - },
76 - ".local/share/Trash/files/node_modules/@google/genai/dist/web/web.d.ts:9752:b4eaa0aa": {
77 - "file": ".local/share/Trash/files/node_modules/@google/genai/dist/web/web.d.ts",
78 - "startLine": 9752,
79 - "endLine": 9752,
80 - "promptHash": "b4eaa0aa",
81 - "promptPreview": "= \"PROMPT\",",
82 - "queuedAt": 1778114452200
83 - },
84 - ".local/share/Trash/files/node_modules/@google/genai/dist/genai.d.ts:9747:b4eaa0aa": {
85 - "file": ".local/share/Trash/files/node_modules/@google/genai/dist/genai.d.ts",
86 - "startLine": 9747,
87 - "endLine": 9747,
88 - "promptHash": "b4eaa0aa",
89 - "promptPreview": "= \"PROMPT\",",
90 - "queuedAt": 1778114452204
91 - },
92 - ".local/share/Trash/files/npm/lib/node_modules/@sting8k/pi-vcc/node_modules/@google/genai/dist/node/node.d.ts:9807:b4eaa0aa": {
93 - "file": ".local/share/Trash/files/npm/lib/node_modules/@sting8k/pi-vcc/node_modules/@google/genai/dist/node/node.d.ts",
94 - "startLine": 9807,
95 - "endLine": 9807,
96 - "promptHash": "b4eaa0aa",
97 - "promptPreview": "= \"PROMPT\",",
98 - "queuedAt": 1778114453107
99 - },
100 - ".local/share/Trash/files/npm/lib/node_modules/@sting8k/pi-vcc/node_modules/@google/genai/dist/vertex_internal/index.d.ts:6384:b4eaa0aa": {
101 - "file": ".local/share/Trash/files/npm/lib/node_modules/@sting8k/pi-vcc/node_modules/@google/genai/dist/vertex_internal/index.d.ts",
102 - "startLine": 6384,
103 - "endLine": 6384,
104 - "promptHash": "b4eaa0aa",
105 - "promptPreview": "= \"PROMPT\",",
106 - "queuedAt": 1778114453111
107 - },
108 - ".local/share/Trash/files/npm/lib/node_modules/@sting8k/pi-vcc/node_modules/@google/genai/dist/web/web.d.ts:9800:b4eaa0aa": {
109 - "file": ".local/share/Trash/files/npm/lib/node_modules/@sting8k/pi-vcc/node_modules/@google/genai/dist/web/web.d.ts",
110 - "startLine": 9800,
111 - "endLine": 9800,
112 - "promptHash": "b4eaa0aa",
113 - "promptPreview": "= \"PROMPT\",",
114 - "queuedAt": 1778114453114
115 - },
116 - ".local/share/Trash/files/npm/lib/node_modules/@sting8k/pi-vcc/node_modules/@google/genai/dist/genai.d.ts:9795:b4eaa0aa": {
117 - "file": ".local/share/Trash/files/npm/lib/node_modules/@sting8k/pi-vcc/node_modules/@google/genai/dist/genai.d.ts",
118 - "startLine": 9795,
119 - "endLine": 9795,
120 - "promptHash": "b4eaa0aa",
121 - "promptPreview": "= \"PROMPT\",",
122 - "queuedAt": 1778114453118
123 - },
124 - ".local/share/Trash/files/npm/lib/node_modules/@marcfargas/pi-test-harness/node_modules/@google/genai/dist/node/node.d.ts:9807:b4eaa0aa": {
125 - "file": ".local/share/Trash/files/npm/lib/node_modules/@marcfargas/pi-test-harness/node_modules/@google/genai/dist/node/node.d.ts",
126 - "startLine": 9807,
127 - "endLine": 9807,
128 - "promptHash": "b4eaa0aa",
129 - "promptPreview": "= \"PROMPT\",",
130 - "queuedAt": 1778114454550
131 - },
132 - ".local/share/Trash/files/npm/lib/node_modules/@marcfargas/pi-test-harness/node_modules/@google/genai/dist/vertex_internal/index.d.ts:6384:b4eaa0aa": {
133 - "file": ".local/share/Trash/files/npm/lib/node_modules/@marcfargas/pi-test-harness/node_modules/@google/genai/dist/vertex_internal/index.d.ts",
134 - "startLine": 6384,
135 - "endLine": 6384,
136 - "promptHash": "b4eaa0aa",
137 - "promptPreview": "= \"PROMPT\",",
138 - "queuedAt": 1778114454554
139 - },
140 - ".local/share/Trash/files/npm/lib/node_modules/@marcfargas/pi-test-harness/node_modules/@google/genai/dist/web/web.d.ts:9800:b4eaa0aa": {
141 - "file": ".local/share/Trash/files/npm/lib/node_modules/@marcfargas/pi-test-harness/node_modules/@google/genai/dist/web/web.d.ts",
142 - "startLine": 9800,
143 - "endLine": 9800,
144 - "promptHash": "b4eaa0aa",
145 - "promptPreview": "= \"PROMPT\",",
146 - "queuedAt": 1778114454558
147 - },
148 - ".local/share/Trash/files/npm/lib/node_modules/@marcfargas/pi-test-harness/node_modules/@google/genai/dist/genai.d.ts:9795:b4eaa0aa": {
149 - "file": ".local/share/Trash/files/npm/lib/node_modules/@marcfargas/pi-test-harness/node_modules/@google/genai/dist/genai.d.ts",
150 - "startLine": 9795,
151 - "endLine": 9795,
152 - "promptHash": "b4eaa0aa",
153 - "promptPreview": "= \"PROMPT\",",
154 - "queuedAt": 1778114454561
155 - },
156 - ".local/share/Trash/files/npm/lib/node_modules/pi-model-cycler/node_modules/@google/genai/dist/node/node.d.ts:9807:b4eaa0aa": {
157 - "file": ".local/share/Trash/files/npm/lib/node_modules/pi-model-cycler/node_modules/@google/genai/dist/node/node.d.ts",
158 - "startLine": 9807,
159 - "endLine": 9807,
160 - "promptHash": "b4eaa0aa",
161 - "promptPreview": "= \"PROMPT\",",
162 - "queuedAt": 1778114455705
163 - },
164 - ".local/share/Trash/files/npm/lib/node_modules/pi-model-cycler/node_modules/@google/genai/dist/vertex_internal/index.d.ts:6384:b4eaa0aa": {
165 - "file": ".local/share/Trash/files/npm/lib/node_modules/pi-model-cycler/node_modules/@google/genai/dist/vertex_internal/index.d.ts",
166 - "startLine": 6384,
167 - "endLine": 6384,
168 - "promptHash": "b4eaa0aa",
169 - "promptPreview": "= \"PROMPT\",",
170 - "queuedAt": 1778114455708
171 - },
172 - ".local/share/Trash/files/npm/lib/node_modules/pi-model-cycler/node_modules/@google/genai/dist/web/web.d.ts:9800:b4eaa0aa": {
173 - "file": ".local/share/Trash/files/npm/lib/node_modules/pi-model-cycler/node_modules/@google/genai/dist/web/web.d.ts",
174 - "startLine": 9800,
175 - "endLine": 9800,
176 - "promptHash": "b4eaa0aa",
177 - "promptPreview": "= \"PROMPT\",",
178 - "queuedAt": 1778114455712
179 - },
180 - ".local/share/Trash/files/npm/lib/node_modules/pi-model-cycler/node_modules/@google/genai/dist/genai.d.ts:9795:b4eaa0aa": {
181 - "file": ".local/share/Trash/files/npm/lib/node_modules/pi-model-cycler/node_modules/@google/genai/dist/genai.d.ts",
182 - "startLine": 9795,
183 - "endLine": 9795,
184 - "promptHash": "b4eaa0aa",
185 - "promptPreview": "= \"PROMPT\",",
186 - "queuedAt": 1778114455716
187 - },
188 - ".local/share/Trash/files/.bun/install/cache/@tarquinen/opencode-dcp@3.1.5@@@1/README.md:220:9e329f6e": {
189 - "file": ".local/share/Trash/files/.bun/install/cache/@tarquinen/opencode-dcp@3.1.5@@@1/README.md",
190 - "startLine": 220,
191 - "endLine": 220,
192 - "promptHash": "9e329f6e",
193 - "promptPreview": "providers cache prompts based on exact prefix matching. When DCP prunes content, it changes messages, which invalidates…",
194 - "queuedAt": 1778114459075
195 - },
196 - ".local/share/Trash/files/.bun/install/cache/@tarquinen/opencode-dcp@3.1.6@@@1/README.md:215:9e329f6e": {
197 - "file": ".local/share/Trash/files/.bun/install/cache/@tarquinen/opencode-dcp@3.1.6@@@1/README.md",
198 - "startLine": 215,
199 - "endLine": 215,
200 - "promptHash": "9e329f6e",
201 - "promptPreview": "providers cache prompts based on exact prefix matching. When DCP prunes content, it changes messages, which invalidates…",
202 - "queuedAt": 1778114459090
203 - },
204 - ".local/share/Trash/files/.bun/install/cache/@tarquinen/opencode-dcp@3.1.7@@@1/README.md:215:9e329f6e": {
205 - "file": ".local/share/Trash/files/.bun/install/cache/@tarquinen/opencode-dcp@3.1.7@@@1/README.md",
206 - "startLine": 215,
207 - "endLine": 215,
208 - "promptHash": "9e329f6e",
209 - "promptPreview": "providers cache prompts based on exact prefix matching. When DCP prunes content, it changes messages, which invalidates…",
210 - "queuedAt": 1778114459111
211 - },
212 - ".local/share/Trash/files/.bun/install/cache/@tarquinen/opencode-dcp@3.1.8@@@1/README.md:215:9e329f6e": {
213 - "file": ".local/share/Trash/files/.bun/install/cache/@tarquinen/opencode-dcp@3.1.8@@@1/README.md",
214 - "startLine": 215,
215 - "endLine": 215,
216 - "promptHash": "9e329f6e",
217 - "promptPreview": "providers cache prompts based on exact prefix matching. When DCP prunes content, it changes messages, which invalidates…",
218 - "queuedAt": 1778114459127
219 - },
220 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.49.0@@@1/dist/node/node.d.ts:9643:b4eaa0aa": {
221 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.49.0@@@1/dist/node/node.d.ts",
222 - "startLine": 9643,
223 - "endLine": 9643,
224 - "promptHash": "b4eaa0aa",
225 - "promptPreview": "= \"PROMPT\",",
226 - "queuedAt": 1778114461347
227 - },
228 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.49.0@@@1/dist/vertex_internal/index.d.ts:6293:b4eaa0aa": {
229 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.49.0@@@1/dist/vertex_internal/index.d.ts",
230 - "startLine": 6293,
231 - "endLine": 6293,
232 - "promptHash": "b4eaa0aa",
233 - "promptPreview": "= \"PROMPT\",",
234 - "queuedAt": 1778114461351
235 - },
236 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.49.0@@@1/dist/web/web.d.ts:9636:b4eaa0aa": {
237 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.49.0@@@1/dist/web/web.d.ts",
238 - "startLine": 9636,
239 - "endLine": 9636,
240 - "promptHash": "b4eaa0aa",
241 - "promptPreview": "= \"PROMPT\",",
242 - "queuedAt": 1778114461355
243 - },
244 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.49.0@@@1/dist/genai.d.ts:9631:b4eaa0aa": {
245 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.49.0@@@1/dist/genai.d.ts",
246 - "startLine": 9631,
247 - "endLine": 9631,
248 - "promptHash": "b4eaa0aa",
249 - "promptPreview": "= \"PROMPT\",",
250 - "queuedAt": 1778114461358
251 - },
252 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.50.1@@@1/dist/node/node.d.ts:9759:b4eaa0aa": {
253 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.50.1@@@1/dist/node/node.d.ts",
254 - "startLine": 9759,
255 - "endLine": 9759,
256 - "promptHash": "b4eaa0aa",
257 - "promptPreview": "= \"PROMPT\",",
258 - "queuedAt": 1778114461362
259 - },
260 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.50.1@@@1/dist/vertex_internal/index.d.ts:6346:b4eaa0aa": {
261 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.50.1@@@1/dist/vertex_internal/index.d.ts",
262 - "startLine": 6346,
263 - "endLine": 6346,
264 - "promptHash": "b4eaa0aa",
265 - "promptPreview": "= \"PROMPT\",",
266 - "queuedAt": 1778114461366
267 - },
268 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.50.1@@@1/dist/web/web.d.ts:9752:b4eaa0aa": {
269 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.50.1@@@1/dist/web/web.d.ts",
270 - "startLine": 9752,
271 - "endLine": 9752,
272 - "promptHash": "b4eaa0aa",
273 - "promptPreview": "= \"PROMPT\",",
274 - "queuedAt": 1778114461370
275 - },
276 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.50.1@@@1/dist/genai.d.ts:9747:b4eaa0aa": {
277 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.50.1@@@1/dist/genai.d.ts",
278 - "startLine": 9747,
279 - "endLine": 9747,
280 - "promptHash": "b4eaa0aa",
281 - "promptPreview": "= \"PROMPT\",",
282 - "queuedAt": 1778114461374
283 - },
284 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.51.0@@@1/dist/node/node.d.ts:9807:b4eaa0aa": {
285 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.51.0@@@1/dist/node/node.d.ts",
286 - "startLine": 9807,
287 - "endLine": 9807,
288 - "promptHash": "b4eaa0aa",
289 - "promptPreview": "= \"PROMPT\",",
290 - "queuedAt": 1778114461378
291 - },
292 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.51.0@@@1/dist/vertex_internal/index.d.ts:6384:b4eaa0aa": {
293 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.51.0@@@1/dist/vertex_internal/index.d.ts",
294 - "startLine": 6384,
295 - "endLine": 6384,
296 - "promptHash": "b4eaa0aa",
297 - "promptPreview": "= \"PROMPT\",",
298 - "queuedAt": 1778114461381
299 - },
300 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.51.0@@@1/dist/web/web.d.ts:9800:b4eaa0aa": {
301 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.51.0@@@1/dist/web/web.d.ts",
302 - "startLine": 9800,
303 - "endLine": 9800,
304 - "promptHash": "b4eaa0aa",
305 - "promptPreview": "= \"PROMPT\",",
306 - "queuedAt": 1778114461385
307 - },
308 - ".local/share/Trash/files/.bun/install/cache/@google/genai@1.51.0@@@1/dist/genai.d.ts:9795:b4eaa0aa": {
309 - "file": ".local/share/Trash/files/.bun/install/cache/@google/genai@1.51.0@@@1/dist/genai.d.ts",
310 - "startLine": 9795,
311 - "endLine": 9795,
312 - "promptHash": "b4eaa0aa",
313 - "promptPreview": "= \"PROMPT\",",
314 - "queuedAt": 1778114461388
315 - },
316 - ".local/share/Trash/files/.bun/install/global/node_modules/@google/genai/dist/node/node.d.ts:9807:b4eaa0aa": {
317 - "file": ".local/share/Trash/files/.bun/install/global/node_modules/@google/genai/dist/node/node.d.ts",
318 - "startLine": 9807,
319 - "endLine": 9807,
320 - "promptHash": "b4eaa0aa",
321 - "promptPreview": "= \"PROMPT\",",
322 - "queuedAt": 1778114462875
323 - },
324 - ".local/share/Trash/files/.bun/install/global/node_modules/@google/genai/dist/vertex_internal/index.d.ts:6384:b4eaa0aa": {
325 - "file": ".local/share/Trash/files/.bun/install/global/node_modules/@google/genai/dist/vertex_internal/index.d.ts",
326 - "startLine": 6384,
327 - "endLine": 6384,
328 - "promptHash": "b4eaa0aa",
329 - "promptPreview": "= \"PROMPT\",",
330 - "queuedAt": 1778114462878
331 - },
332 - ".local/share/Trash/files/.bun/install/global/node_modules/@google/genai/dist/web/web.d.ts:9800:b4eaa0aa": {
333 - "file": ".local/share/Trash/files/.bun/install/global/node_modules/@google/genai/dist/web/web.d.ts",
334 - "startLine": 9800,
335 - "endLine": 9800,
336 - "promptHash": "b4eaa0aa",
337 - "promptPreview": "= \"PROMPT\",",
338 - "queuedAt": 1778114462883
339 - },
340 - ".local/share/Trash/files/.bun/install/global/node_modules/@google/genai/dist/genai.d.ts:9795:b4eaa0aa": {
341 - "file": ".local/share/Trash/files/.bun/install/global/node_modules/@google/genai/dist/genai.d.ts",
342 - "startLine": 9795,
343 - "endLine": 9795,
344 - "promptHash": "b4eaa0aa",
345 - "promptPreview": "= \"PROMPT\",",
346 - "queuedAt": 1778114462886
347 - },
348 - ".local/share/Trash/files/aliou-1777642027.631093/pi-processes/node_modules/@google/genai/dist/node/node.d.ts:9807:b4eaa0aa": {
349 - "file": ".local/share/Trash/files/aliou-1777642027.631093/pi-processes/node_modules/@google/genai/dist/node/node.d.ts",
350 - "startLine": 9807,
351 - "endLine": 9807,
352 - "promptHash": "b4eaa0aa",
353 - "promptPreview": "= \"PROMPT\",",
354 - "queuedAt": 1778114463589
355 - },
356 - ".local/share/Trash/files/aliou-1777642027.631093/pi-processes/node_modules/@google/genai/dist/vertex_internal/index.d.ts:6384:b4eaa0aa": {
357 - "file": ".local/share/Trash/files/aliou-1777642027.631093/pi-processes/node_modules/@google/genai/dist/vertex_internal/index.d.ts",
358 - "startLine": 6384,
359 - "endLine": 6384,
360 - "promptHash": "b4eaa0aa",
361 - "promptPreview": "= \"PROMPT\",",
362 - "queuedAt": 1778114463592
363 - },
364 - ".local/share/Trash/files/aliou-1777642027.631093/pi-processes/node_modules/@google/genai/dist/web/web.d.ts:9800:b4eaa0aa": {
365 - "file": ".local/share/Trash/files/aliou-1777642027.631093/pi-processes/node_modules/@google/genai/dist/web/web.d.ts",
366 - "startLine": 9800,
367 - "endLine": 9800,
368 - "promptHash": "b4eaa0aa",
369 - "promptPreview": "= \"PROMPT\",",
370 - "queuedAt": 1778114463596
371 - },
372 - ".local/share/Trash/files/aliou-1777642027.631093/pi-processes/node_modules/@google/genai/dist/genai.d.ts:9795:b4eaa0aa": {
373 - "file": ".local/share/Trash/files/aliou-1777642027.631093/pi-processes/node_modules/@google/genai/dist/genai.d.ts",
374 - "startLine": 9795,
375 - "endLine": 9795,
376 - "promptHash": "b4eaa0aa",
377 - "promptPreview": "= \"PROMPT\",",
378 - "queuedAt": 1778114463599
379 - },
380 - ".local/share/Trash/files/baflow-1777642027.777905/pi-model-cycler/node_modules/@google/genai/dist/node/node.d.ts:9807:b4eaa0aa": {
381 - "file": ".local/share/Trash/files/baflow-1777642027.777905/pi-model-cycler/node_modules/@google/genai/dist/node/node.d.ts",
382 - "startLine": 9807,
383 - "endLine": 9807,
384 - "promptHash": "b4eaa0aa",
385 - "promptPreview": "= \"PROMPT\",",
386 - "queuedAt": 1778114464845
387 - },
388 - ".local/share/Trash/files/baflow-1777642027.777905/pi-model-cycler/node_modules/@google/genai/dist/vertex_internal/index.d.ts:6384:b4eaa0aa": {
389 - "file": ".local/share/Trash/files/baflow-1777642027.777905/pi-model-cycler/node_modules/@google/genai/dist/vertex_internal/index.d.ts",
390 - "startLine": 6384,
391 - "endLine": 6384,
392 - "promptHash": "b4eaa0aa",
393 - "promptPreview": "= \"PROMPT\",",
394 - "queuedAt": 1778114464849
395 - },
396 - ".local/share/Trash/files/baflow-1777642027.777905/pi-model-cycler/node_modules/@google/genai/dist/web/web.d.ts:9800:b4eaa0aa": {
397 - "file": ".local/share/Trash/files/baflow-1777642027.777905/pi-model-cycler/node_modules/@google/genai/dist/web/web.d.ts",
398 - "startLine": 9800,
399 - "endLine": 9800,
400 - "promptHash": "b4eaa0aa",
401 - "promptPreview": "= \"PROMPT\",",
402 - "queuedAt": 1778114464853
403 - },
404 - ".local/share/Trash/files/baflow-1777642027.777905/pi-model-cycler/node_modules/@google/genai/dist/genai.d.ts:9795:b4eaa0aa": {
405 - "file": ".local/share/Trash/files/baflow-1777642027.777905/pi-model-cycler/node_modules/@google/genai/dist/genai.d.ts",
406 - "startLine": 9795,
407 - "endLine": 9795,
408 - "promptHash": "b4eaa0aa",
409 - "promptPreview": "= \"PROMPT\",",
410 - "queuedAt": 1778114464857
411 - }
412 - }

pi/agent/settings.json

Modified
2 - "lastChangelogVersion": "0.75.5",
2 + "lastChangelogVersion": "0.76.0",
3 3 "theme": "terminal",
4 4 "enabledModels": [
5 5 "openai-codex/gpt-5.5",

pi/drivers/advisor_suite.py

Deleted
deleted file mode 100644
1 -title = "Advisor suite"
3 -extensions = [
4 - "angel",
5 - "devil",
6 - "ghost",
7 - "neko",
8 - "terse",
9 -]
11 -targets = [
12 - "angel",
13 - "devil",
14 - "ghost",
15 - "neko",
16 - "terse",
17 -]
19 -cols = 100
20 -rows = 28
21 -cwd = "agent/extensions/lucifiber"
23 -steps = [
24 - ("wait", 5000),
25 - ("command", "/neko status", 3000),
26 - ("command", "/neko on", 4000),
27 - ("command", "/angel-policy", 3000),
28 - ("command", "/devil Publish every extension to npm today, no review needed.", 18000),
29 - ("prompt", "Give a terse safety review of publishing many npm packages at once.", 16000),
30 - ("wait", 6000),
31 -]

pi/drivers/footer_suite.py

Deleted
deleted file mode 100644
1 -title = "Footer suite"
3 -extensions = [
4 - "footer",
5 - "context-size",
6 - "cost",
7 - "git-status",
8 - "runtime",
9 - "quota",
10 -]
12 -targets = [
13 - "footer",
14 - "context-size",
15 - "cost",
16 - "git-status",
17 - "runtime",
18 - "quota",
19 -]
21 -cols = 100
22 -rows = 28
23 -cwd = "agent/extensions/lucifiber"
25 -steps = [
26 - ("wait", 5000),
27 - ("command", "/quota", 6000),
28 - ("prompt", "In one short sentence, say what this directory contains.", 16000),
29 - ("command", "/footer", 4000),
30 - ("command", "/footer", 6000),
31 - ("prompt", "Now answer with exactly three words: footer status dashboard.", 14000),
32 - ("wait", 6000),
33 -]

pi/drivers/lucifiber_suite.py

Deleted
deleted file mode 100644
1 -title = "Lucifiber bundle"
3 -extensions = [
4 - "lucifiber",
5 - "footer",
6 - "context-size",
7 - "cost",
8 - "git-status",
9 - "runtime",
10 - "quota",
11 -]
13 -targets = [
14 - "lucifiber",
15 -]
17 -cols = 100
18 -rows = 28
19 -cwd = "agent/extensions/lucifiber"
21 -steps = [
22 - ("wait", 5000),
23 - ("command", "/quota", 6000),
24 - ("prompt", "In one terse sentence, describe the Lucifiber Pi bundle in this directory.", 16000),
25 - ("command", "/footer", 4000),
26 - ("command", "/footer", 6000),
27 - ("wait", 6000),
28 -]

pi/drivers/prune_suite.py

Deleted
deleted file mode 100644
1 -title = "Prune recall"
3 -extensions = [
4 - "prune",
5 -]
7 -targets = [
8 - "prune",
9 -]
11 -cols = 100
12 -rows = 28
13 -cwd = "agent/extensions/prune"
15 -steps = [
16 - ("wait", 5000),
17 - ("prompt", "Remember this phrase for the demo: lossless compaction keeps recall searchable.", 12000),
18 - ("command", "/prune-recall compaction all", 5000),
19 - ("command", "/prune demo focus", 8000),
20 - ("wait", 6000),
21 -]

pi/drivers/shell_suite.py

Deleted
deleted file mode 100644
1 -title = "Shell suite"
3 -extensions = [
4 - "inline",
5 - "nu-bang",
6 - "ssh-tools",
7 - "terminal-notifier",
8 - "terminal-signals",
9 -]
11 -targets = [
12 - "inline",
13 - "nu-bang",
14 - "ssh-tools",
15 - "terminal-notifier",
16 - "terminal-signals",
17 -]
19 -cols = 100
20 -rows = 28
21 -cwd = "agent/extensions/lucifiber"
23 -steps = [
24 - ("wait", 5000),
25 - ("command", "/ssh status", 3000),
26 - ("prompt", "Explain what this inline shell value means: !{printf lucifiber-demo}", 14000),
27 - ("command", "!date now | format date '%Y-%m-%d'", 5000),
28 - ("prompt", "Answer with exactly three words: terminal signals ready.", 12000),
29 - ("wait", 6000),
30 -]

pi/drivers/tools_suite.py

Deleted
deleted file mode 100644
1 -title = "Tools suite"
3 -extensions = [
4 - "builtin-tools",
5 - "ctx",
6 - "git-safe",
7 - "web",
8 -]
10 -targets = [
11 - "builtin-tools",
12 - "ctx",
13 - "git-safe",
14 - "web",
15 -]
17 -cols = 100
18 -rows = 28
19 -cwd = "agent/extensions/lucifiber"
21 -steps = [
22 - ("wait", 5000),
23 - ("command", "/builtin-tools", 4000),
24 - ("prompt", "Use web_fetch to fetch https://example.com and summarize the page in one sentence.", 16000),
25 - ("prompt", "Use ctx to run a tiny Python count of files in this directory.", 14000),
26 - ("prompt", "Call git_clone_safe for https://github.com/octocat/Hello-World into /tmp/pi-demo-hello-world, then report success briefly.", 18000),
27 - ("wait", 6000),
28 -]

pi/drivers/workflow_suite.py

Deleted
deleted file mode 100644
1 -title = "Workflow suite"
3 -extensions = [
4 - "cwd",
5 - "diff-review",
6 - "llmiterate",
7 - "pulse",
8 - "q",
9 - "session-rename",
10 - "prompt-autopsy",
11 - "usage",
12 -]
14 -targets = [
15 - "cwd",
16 - "diff-review",
17 - "llmiterate",
18 - "pulse",
19 - "q",
20 - "session-rename",
21 - "prompt-autopsy",
22 - "usage",
23 -]
25 -cols = 100
26 -rows = 28
27 -cwd = "agent/extensions/lucifiber"
29 -steps = [
30 - ("wait", 5000),
31 - ("command", "/session-rename release demo", 3000),
32 - ("command", "/cwd", 3000),
33 - ("command", "/llmiterate status", 4000),
34 - ("command", "/pulse help", 6000),
35 - ("prompt", "Ask me two crisp follow-up questions about npm release automation.", 14000),
36 - ("command", "/q", 6000),
37 - ("command", "/diff-review-cancel", 3000),
38 - ("command", "/usage", 7000),
39 - ("send", "q", 1000),
40 - ("wait", 5000),
41 -]

pi/justfile

Deleted
deleted file mode 100644
1 -_default:
2 - python3 scripts/extensions.py list
4 -check ext="":
5 - python3 scripts/extensions.py check {{ ext }}
7 -test ext="":
8 - python3 scripts/extensions.py test {{ ext }}
10 -changelog ext:
11 - python3 scripts/extensions.py changelog {{ ext }}
13 -publish ext flags="":
14 - python3 scripts/extensions.py publish {{ ext }} {{ flags }}
16 -demo name:
17 - python3 scripts/demo.py {{ name }}
19 -fmt:
20 - just --fmt

pi/scripts/demo.py

Deleted
deleted file mode 100755
1 -#!/usr/bin/env python3
2 -"""Record interactive Pi extension demos."""
4 -from __future__ import annotations
6 -import argparse
7 -import importlib.util
8 -import shutil
9 -import subprocess
10 -import sys
11 -import time
12 -from dataclasses import dataclass
13 -from pathlib import Path
14 -from types import ModuleType
16 -try:
17 - import pexpect
18 -except ImportError as e:
19 - raise SystemExit("missing Python package: pexpect") from e
21 -ROOT = Path(__file__).resolve().parents[1]
22 -DRIVERS = ROOT / "drivers"
23 -EXTENSIONS = ROOT / "agent" / "extensions"
24 -OUT = ROOT / ".demo"
26 -CAST_IDLE_LIMIT = "4.0"
27 -AGG_ARGS = [
28 - "--theme", "asciinema",
29 - "--text-font-family", "JetBrains Mono",
30 - "--font-size", "14",
31 - "--line-height", "1.25",
32 - "--idle-time-limit", "4.0",
33 - "--last-frame-duration", "5",
34 - "--fps-cap", "24",
38 -@dataclass(frozen=True)
39 -class Driver:
40 - name: str
41 - title: str
42 - extensions: list[str]
43 - targets: list[str]
44 - cols: int
45 - rows: int
46 - cwd: Path
47 - steps: list[tuple]
50 -def load_module(name: str) -> ModuleType:
51 - path = DRIVERS / f"{name}.py"
52 - if not path.exists():
53 - raise SystemExit(f"driver not found: {path}")
54 - spec = importlib.util.spec_from_file_location(f"driver_{name}", path)
55 - if spec is None or spec.loader is None:
56 - raise SystemExit(f"cannot load driver: {path}")
57 - module = importlib.util.module_from_spec(spec)
58 - spec.loader.exec_module(module)
59 - return module
62 -def str_list(module: ModuleType, attr: str) -> list[str]:
63 - value = getattr(module, attr, None)
64 - if not isinstance(value, list) or not all(isinstance(x, str) and x for x in value):
65 - raise SystemExit(f"driver {module.__name__}: {attr} must be non-empty string list")
66 - return value
69 -def load_driver(name: str) -> Driver:
70 - module = load_module(name)
71 - title = getattr(module, "title", name.replace("_", " ").title())
72 - if not isinstance(title, str) or not title:
73 - raise SystemExit("title must be string")
75 - cols = getattr(module, "cols", 100)
76 - rows = getattr(module, "rows", 28)
77 - if not isinstance(cols, int) or not isinstance(rows, int) or cols < 40 or rows < 12:
78 - raise SystemExit("cols/rows must be reasonable ints")
80 - cwd_raw = getattr(module, "cwd", ".")
81 - if not isinstance(cwd_raw, str):
82 - raise SystemExit("cwd must be string")
83 - cwd = (ROOT / cwd_raw).resolve()
84 - if not cwd.is_dir():
85 - raise SystemExit(f"cwd missing: {cwd}")
87 - steps = getattr(module, "steps", None)
88 - if not isinstance(steps, list):
89 - raise SystemExit("steps must be list")
90 - for step in steps:
91 - validate_step(step)
93 - driver = Driver(
94 - name=name,
95 - title=title,
96 - extensions=str_list(module, "extensions"),
97 - targets=str_list(module, "targets"),
98 - cols=cols,
99 - rows=rows,
100 - cwd=cwd,
101 - steps=steps,
102 - )
103 - validate_driver(driver)
104 - return driver
107 -def validate_step(step: object) -> None:
108 - if not isinstance(step, tuple) or not step:
109 - raise SystemExit(f"invalid step: {step!r}")
110 - op = step[0]
111 - if op not in {"wait", "type", "send", "command", "prompt", "ctrl", "quit"}:
112 - raise SystemExit(f"unknown step op: {op!r}")
113 - if op == "wait" and not (len(step) == 2 and isinstance(step[1], int)):
114 - raise SystemExit(f"wait step must be ('wait', ms): {step!r}")
115 - if op in {"type", "send"} and not (len(step) in {2, 3} and isinstance(step[1], str)):
116 - raise SystemExit(f"{op} step must include text: {step!r}")
117 - if op in {"command", "prompt"} and not (len(step) in {2, 3} and isinstance(step[1], str)):
118 - raise SystemExit(f"{op} step must include text: {step!r}")
119 - if op == "ctrl" and not (len(step) == 2 and isinstance(step[1], str) and len(step[1]) == 1):
120 - raise SystemExit(f"ctrl step must be ('ctrl', key): {step!r}")
121 - if op == "quit" and len(step) != 1:
122 - raise SystemExit(f"quit step takes no args: {step!r}")
125 -def validate_driver(driver: Driver) -> None:
126 - for name in driver.extensions:
127 - if not (EXTENSIONS / name / "index.ts").exists():
128 - raise SystemExit(f"extension missing index.ts: {name}")
129 - for name in driver.targets:
130 - ext = EXTENSIONS / name
131 - if not ext.is_dir():
132 - raise SystemExit(f"target extension missing: {name}")
133 - if not (ext / "README.md").exists():
134 - raise SystemExit(f"target README missing: {ext / 'README.md'}")
137 -def pi_command(driver: Driver) -> str:
138 - parts = [
139 - "pi",
140 - "--no-session",
141 - "--no-context-files",
142 - "--no-skills",
143 - "--no-prompt-templates",
144 - "--no-extensions",
145 - ]
146 - for name in driver.extensions:
147 - parts.extend(["-e", str(EXTENSIONS / name)])
148 - return " ".join(shlex_quote(part) for part in parts)
151 -def shlex_quote(value: str) -> str:
152 - import shlex
153 - return shlex.quote(value)
156 -def pump(child: pexpect.spawn, seconds: float) -> None:
157 - end = time.time() + seconds
158 - while time.time() < end and child.isalive():
159 - try:
160 - data = child.read_nonblocking(size=8192, timeout=0.03)
161 - if data:
162 - sys.stdout.write(data)
163 - sys.stdout.flush()
164 - except pexpect.TIMEOUT:
165 - pass
166 - except pexpect.EOF:
167 - break
170 -def type_text(child: pexpect.spawn, text: str, delay: float) -> None:
171 - for ch in text:
172 - child.send(ch)
173 - pump(child, delay)
176 -def run_step(child: pexpect.spawn, step: tuple) -> bool:
177 - op = step[0]
178 - if op == "wait":
179 - pump(child, step[1] / 1000)
180 - elif op == "type":
181 - delay = (step[2] if len(step) > 2 else 55) / 1000
182 - type_text(child, step[1], delay)
183 - elif op == "send":
184 - child.send(step[1])
185 - pump(child, (step[2] if len(step) > 2 else 500) / 1000)
186 - elif op == "command":
187 - type_text(child, step[1], 0.055)
188 - pump(child, 0.35)
189 - child.send("\r")
190 - pump(child, (step[2] if len(step) > 2 else 1000) / 1000)
191 - elif op == "prompt":
192 - type_text(child, step[1], 0.035)
193 - pump(child, 0.45)
194 - child.send("\r")
195 - pump(child, (step[2] if len(step) > 2 else 12000) / 1000)
196 - elif op == "ctrl":
197 - child.sendcontrol(step[1])
198 - pump(child, 0.5)
199 - elif op == "quit":
200 - return True
201 - return False
204 -def drive(driver: Driver) -> int:
205 - child = pexpect.spawn(
206 - pi_command(driver),
207 - cwd=str(driver.cwd),
208 - encoding="utf-8",
209 - timeout=90,
210 - dimensions=(driver.rows, driver.cols),
211 - )
212 - try:
213 - for step in driver.steps:
214 - if run_step(child, step):
215 - break
216 - finally:
217 - try:
218 - child.sendcontrol("c")
219 - pump(child, 1.0)
220 - except Exception:
221 - pass
222 - child.terminate(force=True)
223 - return 0
226 -def ensure_tools() -> None:
227 - missing = [tool for tool in ["asciinema", "agg"] if not shutil.which(tool)]
228 - if missing:
229 - raise SystemExit(f"missing tool(s): {', '.join(missing)}")
232 -def record(driver: Driver) -> tuple[Path, Path, Path]:
233 - ensure_tools()
234 - OUT.mkdir(exist_ok=True)
235 - cast = OUT / f"{driver.name}.cast"
236 - gif = OUT / f"{driver.name}.gif"
237 - txt = OUT / f"{driver.name}.txt"
239 - cmd = [
240 - "asciinema", "rec",
241 - "--headless",
242 - "--overwrite",
243 - "--capture-input",
244 - "--window-size", f"{driver.cols}x{driver.rows}",
245 - "-i", CAST_IDLE_LIMIT,
246 - "-c", f"python3 {shlex_quote(str(Path(__file__).resolve()))} --drive {shlex_quote(driver.name)}",
247 - str(cast),
248 - ]
249 - subprocess.run(cmd, cwd=ROOT, check=True)
251 - subprocess.run([
252 - "agg",
253 - "--cols", str(driver.cols),
254 - "--rows", str(driver.rows),
255 - *AGG_ARGS,
256 - str(cast),
257 - str(gif),
258 - ], cwd=ROOT, check=True)
260 - subprocess.run([
261 - "asciinema", "convert", "-f", "txt", str(cast), str(txt), "--overwrite",
262 - ], cwd=ROOT, check=True, stdout=subprocess.DEVNULL)
264 - return cast, gif, txt
267 -def readme_block(driver: Driver) -> str:
268 - return (
269 - f"<!-- demo:{driver.name}:start -->\n"
270 - f"![{driver.title}](assets/{driver.name}.gif)\n"
271 - f"<!-- demo:{driver.name}:end -->"
272 - )
275 -def update_readme(readme: Path, driver: Driver) -> None:
276 - text = readme.read_text()
277 - start = f"<!-- demo:{driver.name}:start -->"
278 - end = f"<!-- demo:{driver.name}:end -->"
279 - block = readme_block(driver)
281 - if start in text and end in text:
282 - before, rest = text.split(start, 1)
283 - _, after = rest.split(end, 1)
284 - readme.write_text(before + block + after)
285 - return
287 - addition = f"\n\n## Demo\n\n{block}\n"
288 - readme.write_text(text.rstrip() + addition)
291 -def install_assets(driver: Driver, gif: Path) -> None:
292 - for name in driver.targets:
293 - ext = EXTENSIONS / name
294 - assets = ext / "assets"
295 - assets.mkdir(exist_ok=True)
296 - shutil.copy2(gif, assets / f"{driver.name}.gif")
297 - update_readme(ext / "README.md", driver)
298 - print(f"OK asset {name}/assets/{driver.name}.gif")
301 -def main() -> int:
302 - parser = argparse.ArgumentParser()
303 - parser.add_argument("name", nargs="?")
304 - parser.add_argument("--drive", dest="drive_name")
305 - parser.add_argument("--no-install", action="store_true")
306 - args = parser.parse_args()
308 - if args.drive_name:
309 - return drive(load_driver(args.drive_name))
310 - if not args.name:
311 - raise SystemExit("usage: scripts/demo.py <driver>")
313 - driver = load_driver(args.name)
314 - cast, gif, txt = record(driver)
315 - print(f"OK cast {cast}")
316 - print(f"OK gif {gif}")
317 - print(f"OK txt {txt}")
318 - if not args.no_install:
319 - install_assets(driver, gif)
320 - return 0
323 -if __name__ == "__main__":
324 - raise SystemExit(main())

pi/scripts/extensions.py

Deleted
deleted file mode 100755
1 -#!/usr/bin/env python3
2 -"""Pi extension workspace checks."""
4 -from __future__ import annotations
6 -import argparse
7 -import importlib.util
8 -import json
9 -import re
10 -import shutil
11 -import subprocess
12 -import sys
13 -import tempfile
14 -from pathlib import Path
15 -from types import ModuleType
17 -ROOT = Path(__file__).resolve().parents[1]
18 -EXT_ROOT = ROOT / "agent" / "extensions"
19 -DRIVER_ROOT = ROOT / "drivers"
20 -PI_PEERS = {
21 - "@earendil-works/pi-ai",
22 - "@earendil-works/pi-agent-core",
23 - "@earendil-works/pi-coding-agent",
24 - "@earendil-works/pi-tui",
25 - "typebox",
27 -HARNESS = "@marcfargas/pi-test-harness"
28 -IMPORT_RE = re.compile(r"(?:import|export)\s+(?:[^'\"]+?\s+from\s+)?['\"]([^'\"]+)['\"]|import\(['\"]([^'\"]+)['\"]\)")
29 -SECRET_RE = re.compile(r"(api[_-]?key|secret|token|password)\s*[:=]\s*['\"][^'\"]{12,}", re.I)
30 -RELEASE_IGNORED_SUBJECTS = ("update extension release changelogs",)
31 -OSC_RE = re.compile(r"\x1b\][^\x07]*(?:\x07|\x1b\\)")
32 -ANSI_RE = re.compile(r"\x1b\[[0-?]*[ -/]*[@-~]")
33 -CHANGELOG_STYLE = """Voice:
34 -- terse, technical, human
35 -- brutal minimalism: no marketing, no excitement, no filler
36 -- concrete nouns/verbs; name actual commands, tools, hooks, files, API
37 -- no corporate adjectives: enhanced, improved, streamlined, robust, seamless, powerful, comprehensive, leverage
38 -- no vague "various fixes"
39 -- write like a maintainer note, not an ad
40 -- short fragments beat full sentences
42 -Hard format:
43 -## {version}
45 -- bullet
46 -- bullet
48 -Hard limits:
49 -- 3-5 bullets total
50 -- max 100 chars per bullet; rewrite until every bullet fits
51 -- each bullet must start with a verb, command name, or concrete noun
52 -- combine details; do not enumerate implementation internals separately
53 -- omit internal function names unless they are the change users maintain
54 -"""
57 -def pkg_name(spec: str) -> str:
58 - if spec.startswith("@"):
59 - parts = spec.split("/")
60 - return "/".join(parts[:2])
61 - return spec.split("/")[0]
64 -def read_pkg(ext: Path) -> dict:
65 - return json.loads((ext / "package.json").read_text())
68 -def ext_dirs(selected: list[str]) -> list[Path]:
69 - dirs = sorted(p.parent for p in EXT_ROOT.glob("*/package.json"))
70 - if not selected:
71 - return dirs
73 - wanted = set(selected)
74 - result = []
75 - for ext in dirs:
76 - pkg = read_pkg(ext)
77 - if ext.name in wanted or pkg.get("name") in wanted:
78 - result.append(ext)
80 - found = {ext.name for ext in result} | {read_pkg(ext).get("name") for ext in result}
81 - missing = wanted - found
82 - if missing:
83 - raise SystemExit(f"unknown extension(s): {', '.join(sorted(missing))}")
84 - return result
87 -def ts_files(ext: Path) -> list[Path]:
88 - return sorted(p for p in ext.rglob("*.ts") if "node_modules" not in p.parts)
91 -def import_specs(ext: Path) -> set[str]:
92 - specs: set[str] = set()
93 - for file in ts_files(ext):
94 - for match in IMPORT_RE.finditer(file.read_text(errors="ignore")):
95 - spec = match.group(1) or match.group(2)
96 - if spec:
97 - specs.add(spec)
98 - return specs
101 -def err(errors: list[str], ext: Path, msg: str) -> None:
102 - errors.append(f"{ext.name}: {msg}")
105 -def static_check(ext: Path) -> list[str]:
106 - errors: list[str] = []
107 - try:
108 - pkg = read_pkg(ext)
109 - except Exception as e:
110 - return [f"{ext.name}: invalid package.json: {e}"]
112 - expected = f"@bugabinga/pi-ext-{ext.name}"
113 - if pkg.get("name") != expected:
114 - err(errors, ext, f"package name must be {expected!r}")
115 - if pkg.get("type") != "module":
116 - err(errors, ext, "package.json type must be 'module'")
117 - if pkg.get("main") != "index.ts":
118 - err(errors, ext, "package.json main must be 'index.ts'")
119 - if not (ext / "index.ts").exists():
120 - err(errors, ext, "missing index.ts")
121 - if pkg.get("license") != "MIT":
122 - err(errors, ext, "package license must be MIT")
123 - if not (ext / "README.md").exists():
124 - err(errors, ext, "missing README.md")
126 - deps = pkg.get("dependencies", {}) or {}
127 - peers = pkg.get("peerDependencies", {}) or {}
128 - dev = pkg.get("devDependencies", {}) or {}
129 - scripts = pkg.get("scripts", {}) or {}
131 - if dev.get(HARNESS) is None:
132 - err(errors, ext, f"missing devDependency {HARNESS}")
133 - if scripts.get("test:harness") != "bun test ./__tests__/harness.test.ts":
134 - err(errors, ext, "missing script test:harness='bun test ./__tests__/harness.test.ts'")
135 - if not (ext / "__tests__" / "harness.test.ts").exists():
136 - err(errors, ext, "missing __tests__/harness.test.ts")
138 - for dep in deps:
139 - if dep in PI_PEERS:
140 - err(errors, ext, f"Pi package {dep} belongs in peerDependencies, not dependencies")
141 - if dep.startswith("@bugabinga/pi-ext-"):
142 - err(errors, ext, f"must not depend on sibling extension {dep}")
143 - for dep in peers:
144 - if dep.startswith("@bugabinga/pi-ext-"):
145 - err(errors, ext, f"must not peer-depend on sibling extension {dep}")
147 - specs = import_specs(ext)
148 - packages = {
149 - pkg_name(s)
150 - for s in specs
151 - if not (s.startswith(".") or s.startswith("/") or s.startswith("node:") or s.startswith("bun:"))
152 - }
154 - for spec in specs:
155 - if spec.startswith("@bugabinga/pi-ext-"):
156 - err(errors, ext, f"must not import sibling extension {spec}")
158 - for file in ts_files(ext):
159 - text = file.read_text(errors="ignore")
160 - for match in IMPORT_RE.finditer(text):
161 - spec = match.group(1) or match.group(2)
162 - if not spec or not spec.startswith("../"):
163 - continue
164 - resolved = (file.parent / spec).resolve()
165 - try:
166 - resolved.relative_to(ext.resolve())
167 - except ValueError:
168 - err(errors, ext, f"cross-extension relative import {spec} in {file.relative_to(ext)}")
169 - if SECRET_RE.search(text):
170 - err(errors, ext, f"possible secret in {file.relative_to(ext)}")
172 - for dep in sorted(packages & PI_PEERS):
173 - if dep not in peers:
174 - err(errors, ext, f"imported {dep} but missing peerDependency")
175 - for dep in sorted(packages - PI_PEERS):
176 - if dep not in deps and dep not in peers and dep not in dev:
177 - err(errors, ext, f"imported external package {dep} but package.json does not declare it")
179 - return errors
182 -def external_deps(pkg: dict) -> list[str]:
183 - deps = set()
184 - for key in ("dependencies", "peerDependencies", "devDependencies"):
185 - deps.update((pkg.get(key) or {}).keys())
186 - return sorted(deps)
189 -def build(ext: Path, out_root: Path) -> None:
190 - pkg = read_pkg(ext)
191 - cmd = ["bun", "build", "index.ts", "--target", "bun", "--outdir", str(out_root / ext.name)]
192 - for dep in external_deps(pkg):
193 - cmd.extend(["--external", dep])
194 - subprocess.run(cmd, cwd=ext, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
197 -def run_harness(ext: Path) -> None:
198 - subprocess.run(
199 - ["bun", "test", "./__tests__/harness.test.ts"],
200 - cwd=ext,
201 - check=True,
202 - stdout=subprocess.PIPE,
203 - stderr=subprocess.PIPE,
204 - text=True,
205 - )
208 -def cmd_list(selected: list[str]) -> int:
209 - for ext in ext_dirs(selected):
210 - print(f"{ext.name}\t{read_pkg(ext).get('name')}")
211 - return 0
214 -def git(*args: str, check: bool = True, capture: bool = False) -> subprocess.CompletedProcess[str]:
215 - return subprocess.run(
216 - ["git", *args],
217 - cwd=ROOT,
218 - check=check,
219 - text=True,
220 - stdout=subprocess.PIPE if capture else None,
221 - stderr=subprocess.PIPE if capture else None,
222 - )
225 -def git_dirty(paths: list[Path]) -> bool:
226 - rels = [str(p.relative_to(ROOT)) for p in paths]
227 - proc = git("status", "--porcelain", "--", *rels, check=True, capture=True)
228 - return bool(proc.stdout.strip())
231 -def git_changes(ext: Path, since: str | None) -> list[str]:
232 - cmd = ["log", "--format=%h %s"]
233 - if since:
234 - cmd.append(f"{since}..HEAD")
235 - cmd.extend(["--", str(ext.relative_to(ROOT))])
236 - proc = git(*cmd, capture=True)
237 - lines = [line.strip() for line in proc.stdout.splitlines() if line.strip()]
238 - return [line for line in lines if not any(line.endswith(subject) for subject in RELEASE_IGNORED_SUBJECTS)]
241 -def latest_release_tag(pkg_name: str) -> str | None:
242 - proc = git("tag", "--list", f"{pkg_name}@*", "--sort=-creatordate", capture=True)
243 - tags = [line.strip() for line in proc.stdout.splitlines() if line.strip()]
244 - return tags[0] if tags else None
247 -def strip_terminal_noise(text: str) -> str:
248 - return ANSI_RE.sub("", OSC_RE.sub("", text)).strip()
251 -def changelog_prompt(ext: Path) -> str:
252 - pkg = read_pkg(ext)
253 - version = pkg.get("version", "0.0.0")
254 - tag = latest_release_tag(pkg["name"])
255 - commits = git_changes(ext, tag)
256 - commit_text = "\n".join(f"- {line}" for line in commits) or "- no commits since previous tag"
257 - rel = ext.relative_to(ROOT)
258 - return f"""You are writing one changelog section for one Pi extension.
260 -Output markdown only. No preamble. No code fence.
262 -{CHANGELOG_STYLE.format(version=version)}
264 -Task:
265 -Extension: {ext.name}
266 -Package: {pkg["name"]}
267 -Path: {rel}
268 -Version: {version}
269 -Previous tag: {tag or "none"}
271 -Inspect source/readme/tests/changelog under the path. Do not edit files.
272 -Use tools if useful. You are in an ephemeral Pi session with normal tools/extensions loaded.
274 -Git commits touching this extension:
275 -{commit_text}
276 -"""
279 -def generate_changelog_entry(ext: Path, model: str | None = None) -> str:
280 - cmd = ["pi", "--no-session", "-p"]
281 - if model:
282 - cmd.extend(["--model", model])
283 - cmd.append(changelog_prompt(ext))
284 - proc = subprocess.run(cmd, cwd=ROOT, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
285 - if proc.returncode != 0:
286 - if proc.stderr:
287 - print(proc.stderr, file=sys.stderr)
288 - raise subprocess.CalledProcessError(proc.returncode, proc.args, proc.stdout, proc.stderr)
289 - out = strip_terminal_noise(proc.stdout)
290 - if not out.startswith("## "):
291 - raise RuntimeError(f"bad changelog output for {ext.name}: {out[:200]!r}")
292 - return out.rstrip() + "\n"
295 -def update_changelog(ext: Path, model: str | None = None) -> str:
296 - pkg = read_pkg(ext)
297 - path = ext / "CHANGELOG.md"
298 - entry = generate_changelog_entry(ext, model)
299 - heading = f"## {pkg.get('version', '0.0.0')}"
300 - if not path.exists():
301 - path.write_text(f"# Changelog\n\n{entry}")
302 - print(f"OK changelog {ext.name}")
303 - return entry
305 - text = path.read_text()
306 - if heading in text:
307 - lines = text.splitlines(keepends=True)
308 - start = next(i for i, line in enumerate(lines) if line.startswith(heading))
309 - end = next((i for i in range(start + 1, len(lines)) if lines[i].startswith("## ")), len(lines))
310 - path.write_text("".join(lines[:start]) + entry + "\n" + "".join(lines[end:]).lstrip("\n"))
311 - elif text.startswith("# Changelog"):
312 - _, rest = text.split("\n", 1)
313 - path.write_text("# Changelog\n\n" + entry + "\n" + rest.lstrip("\n"))
314 - else:
315 - path.write_text(f"# Changelog\n\n{entry}\n{text}")
316 - print(f"OK changelog {ext.name}")
317 - return entry
320 -def load_driver(path: Path) -> ModuleType:
321 - spec = importlib.util.spec_from_file_location(f"driver_{path.stem}", path)
322 - if spec is None or spec.loader is None:
323 - raise SystemExit(f"cannot load driver: {path}")
324 - module = importlib.util.module_from_spec(spec)
325 - spec.loader.exec_module(module)
326 - return module
329 -def drivers_for(exts: list[Path]) -> list[tuple[str, list[str]]]:
330 - selected = {ext.name for ext in exts}
331 - drivers: list[tuple[str, list[str]]] = []
332 - for path in sorted(DRIVER_ROOT.glob("*.py")):
333 - if path.name.startswith("__"):
334 - continue
335 - module = load_driver(path)
336 - targets = getattr(module, "targets", [])
337 - if isinstance(targets, list) and selected.intersection(targets):
338 - drivers.append((path.stem, [t for t in targets if isinstance(t, str)]))
339 - return drivers
342 -def update_demos(exts: list[Path]) -> list[Path]:
343 - drivers = drivers_for(exts)
344 - if not drivers:
345 - print("OK demo none")
346 - return []
347 - touched: set[Path] = set()
348 - for driver, targets in drivers:
349 - subprocess.run(["python3", "scripts/demo.py", driver], cwd=ROOT, check=True)
350 - touched.update(EXT_ROOT / target for target in targets)
351 - print(f"OK demo {driver}")
352 - return sorted(path for path in touched if path.exists())
355 -def tag_name(ext: Path) -> str:
356 - pkg = read_pkg(ext)
357 - return f"{pkg['name']}@{pkg.get('version', '0.0.0')}"
360 -def create_tags(exts: list[Path]) -> list[str]:
361 - tags: list[str] = []
362 - for ext in exts:
363 - tag = tag_name(ext)
364 - exists = git("rev-parse", "--verify", "--quiet", f"refs/tags/{tag}", check=False).returncode == 0
365 - if exists:
366 - print(f"OK tag {tag} exists")
367 - else:
368 - git("tag", tag)
369 - print(f"OK tag {tag}")
370 - tags.append(tag)
371 - return tags
374 -def commit_release(selected: list[Path], paths_to_add: list[Path]) -> None:
375 - paths = sorted({str(path.relative_to(ROOT)) for path in paths_to_add})
376 - git("add", *paths)
377 - if git("diff", "--cached", "--quiet", "--", *paths, check=False).returncode == 0:
378 - print("OK commit none")
379 - return
380 - names = ", ".join(ext.name for ext in selected)
381 - git("commit", "-m", f"release(pi-ext): {names}", "--", *paths)
382 - print(f"OK commit {names}")
385 -def push_release(tags: list[str]) -> None:
386 - git("push")
387 - if tags:
388 - git("push", "origin", *tags)
389 - print("OK push")
392 -def check_static(dirs: list[Path]) -> int:
393 - errors: list[str] = []
394 - for ext in dirs:
395 - errors.extend(static_check(ext))
396 - if errors:
397 - for e in errors:
398 - print(f"ERROR {e}", file=sys.stderr)
399 - return 1
400 - print(f"OK static {len(dirs)} extension package(s)")
401 - return 0
404 -def check_build(dirs: list[Path]) -> int:
405 - if not shutil.which("bun"):
406 - print("ERROR bun not found", file=sys.stderr)
407 - return 1
409 - with tempfile.TemporaryDirectory(prefix="pi-ext-build-") as tmp:
410 - out_root = Path(tmp)
411 - for ext in dirs:
412 - try:
413 - build(ext, out_root)
414 - print(f"OK build {ext.name}")
415 - except subprocess.CalledProcessError as e:
416 - print(f"ERROR build {ext.name}", file=sys.stderr)
417 - if e.stdout:
418 - print(e.stdout, file=sys.stderr)
419 - if e.stderr:
420 - print(e.stderr, file=sys.stderr)
421 - return e.returncode or 1
422 - print(f"OK build {len(dirs)} extension package(s)")
423 - return 0
426 -def cmd_test(selected: list[str]) -> int:
427 - dirs = ext_dirs(selected)
428 - if not shutil.which("bun"):
429 - print("ERROR bun not found", file=sys.stderr)
430 - return 1
431 - for ext in dirs:
432 - try:
433 - run_harness(ext)
434 - print(f"OK harness {ext.name}")
435 - except subprocess.CalledProcessError as e:
436 - print(f"ERROR harness {ext.name}", file=sys.stderr)
437 - if e.stdout:
438 - print(e.stdout, file=sys.stderr)
439 - if e.stderr:
440 - print(e.stderr, file=sys.stderr)
441 - return e.returncode or 1
442 - print(f"OK harness {len(dirs)} extension package(s)")
443 - return 0
446 -def cmd_check(selected: list[str]) -> int:
447 - dirs = ext_dirs(selected)
448 - static = check_static(dirs)
449 - if static != 0:
450 - return static
451 - built = check_build(dirs)
452 - if built != 0:
453 - return built
454 - return cmd_test(selected)
457 -def cmd_changelog(selected: list[str], model: str | None, write: bool) -> int:
458 - dirs = ext_dirs(selected)
459 - for ext in dirs:
460 - if write:
461 - entry = update_changelog(ext, model)
462 - else:
463 - entry = generate_changelog_entry(ext, model)
464 - print(entry.rstrip())
465 - return 0
468 -def cmd_publish(selected: list[str], *, dry_run: bool, model: str | None, skip_demo: bool) -> int:
469 - if not selected:
470 - print("ERROR publish requires at least one extension", file=sys.stderr)
471 - return 1
473 - dirs = ext_dirs(selected)
474 - checked = cmd_check(selected)
475 - if checked != 0:
476 - return checked
478 - if dry_run:
479 - demos = drivers_for(dirs)
480 - print("DRY RUN publish")
481 - print("demos: " + (", ".join(name for name, _targets in demos) if demos else "none"))
482 - for ext in dirs:
483 - print(generate_changelog_entry(ext, model).rstrip())
484 - print("skip commit/tag/push")
485 - return 0
487 - demo_paths = [] if skip_demo else update_demos(dirs)
488 - for ext in dirs:
489 - update_changelog(ext, model)
491 - commit_release(dirs, dirs + demo_paths)
492 - tags = create_tags(dirs)
493 - push_release(tags)
494 - return 0
497 -def main() -> int:
498 - parser = argparse.ArgumentParser()
499 - sub = parser.add_subparsers(dest="command", required=True)
500 - list_p = sub.add_parser("list")
501 - list_p.add_argument("extensions", nargs="*")
502 - check_p = sub.add_parser("check")
503 - check_p.add_argument("extensions", nargs="*")
504 - test_p = sub.add_parser("test")
505 - test_p.add_argument("extensions", nargs="*")
506 - changelog_p = sub.add_parser("changelog")
507 - changelog_p.add_argument("extensions", nargs="+")
508 - changelog_p.add_argument("--model")
509 - changelog_p.add_argument("--write", action="store_true")
510 - publish_p = sub.add_parser("publish")
511 - publish_p.add_argument("extensions", nargs="+")
512 - publish_p.add_argument("--dry-run", action="store_true")
513 - publish_p.add_argument("--model")
514 - publish_p.add_argument("--skip-demo", action="store_true")
515 - args = parser.parse_args()
517 - if args.command == "list":
518 - return cmd_list(args.extensions)
519 - if args.command == "check":
520 - return cmd_check(args.extensions)
521 - if args.command == "test":
522 - return cmd_test(args.extensions)
523 - if args.command == "changelog":
524 - return cmd_changelog(args.extensions, args.model, args.write)
525 - if args.command == "publish":
526 - return cmd_publish(args.extensions, dry_run=args.dry_run, model=args.model, skip_demo=args.skip_demo)
527 - raise AssertionError(args.command)
530 -if __name__ == "__main__":
531 - raise SystemExit(main())