pi-extensions 0.1.13 → 0.1.15

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thomas Mustier
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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmustier/pi-agent-guidance",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Loads provider-specific context files (CLAUDE.md, CODEX.md, GEMINI.md) based on current model.",
5
5
  "license": "MIT",
6
6
  "author": "Thomas Mustier",
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.4 - 2026-01-26
4
+ - Fix Tetris pieces locking automatically after landing.
5
+
3
6
  ## 0.1.2 - 2026-01-26
4
7
  - Add demo video to README.
5
8
 
package/arcade/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thomas Mustier
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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmustier/pi-arcade",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Arcade minigames for the Pi coding agent.",
5
5
  "license": "MIT",
6
6
  "author": "Thomas Mustier",
package/arcade/tetris.ts CHANGED
@@ -8,6 +8,7 @@ import { matchesKey, truncateToWidth, visibleWidth } from "@mariozechner/pi-tui"
8
8
  const BOARD_WIDTH = 10;
9
9
  const BOARD_HEIGHT = 20;
10
10
  const TICK_MS = 50;
11
+ const LOCK_DELAY_TICKS = 10; // 0.5s at 50ms per tick
11
12
  const CELL_WIDTH = 2;
12
13
  const PREVIEW_COUNT = 3;
13
14
 
@@ -236,16 +237,24 @@ class TetrisComponent {
236
237
 
237
238
  this.state.tickCounter++;
238
239
  const dropSpeed = getDropSpeed(this.state.level);
240
+ const canFall = isValidPosition(this.state.board, { ...this.state.current, row: this.state.current.row + 1 });
241
+
242
+ if (!canFall) {
243
+ this.state.lockDelay++;
244
+ if (this.state.lockDelay >= LOCK_DELAY_TICKS) {
245
+ this.lockPiece();
246
+ this.version++;
247
+ this.tui.requestRender();
248
+ return;
249
+ }
250
+ } else {
251
+ this.state.lockDelay = 0;
252
+ }
239
253
 
240
254
  if (this.state.tickCounter >= dropSpeed) {
241
255
  this.state.tickCounter = 0;
242
- if (!this.tryMove(1, 0)) {
243
- this.state.lockDelay++;
244
- if (this.state.lockDelay >= 10) {
245
- this.lockPiece();
246
- }
247
- } else {
248
- this.state.lockDelay = 0;
256
+ if (canFall) {
257
+ this.tryMove(1, 0);
249
258
  }
250
259
  }
251
260
 
@@ -257,6 +266,7 @@ class TetrisComponent {
257
266
  const newPiece = { ...this.state.current, row: this.state.current.row + dr, col: this.state.current.col + dc };
258
267
  if (isValidPosition(this.state.board, newPiece)) {
259
268
  this.state.current = newPiece;
269
+ this.state.lockDelay = 0;
260
270
  return true;
261
271
  }
262
272
  return false;
@@ -446,7 +456,6 @@ class TetrisComponent {
446
456
  else if (matchesKey(data, "down") || data === "s" || data === "S" || data === "j" || data === "J") {
447
457
  if (this.tryMove(1, 0)) {
448
458
  this.state.score += 1;
449
- this.state.lockDelay = 0;
450
459
  }
451
460
  }
452
461
  // Rotate clockwise
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thomas Mustier
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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmustier/pi-code-actions",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Pick code blocks or inline snippets from recent assistant messages to copy or insert.",
5
5
  "license": "MIT",
6
6
  "author": "Thomas Mustier",
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this extension will be documented in this file.
4
4
 
5
+ ## [0.1.11] - 2026-01-26
6
+
7
+ ### Changed
8
+ - Require `bat`, `delta`, and `glow` before opening `/files`
9
+ - Add a postinstall reminder for required system tools
10
+ - Document install commands next to the Pi install steps
11
+
5
12
  ## [0.1.10] - 2026-01-26
6
13
 
7
14
  ### Fixed
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thomas Mustier
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.
@@ -2,7 +2,9 @@
2
2
 
3
3
  In-terminal file browser and diff viewer widget for Pi. Navigate files, view diffs, select code, and send comments to the agent without leaving the terminal and without interrupting your agent.
4
4
 
5
- ![Demo](demo.svg)
5
+ <video controls autoplay loop muted playsinline>
6
+ <source src="demo.mp4" type="video/mp4" />
7
+ </video>
6
8
 
7
9
  ## Install
8
10
 
@@ -12,6 +14,16 @@ In-terminal file browser and diff viewer widget for Pi. Navigate files, view dif
12
14
  pi install npm:@tmustier/pi-files-widget
13
15
  ```
14
16
 
17
+ Required deps (needed for /files):
18
+
19
+ ```bash
20
+ # macOS (Homebrew)
21
+ brew install bat git-delta glow
22
+
23
+ # Ubuntu/Debian
24
+ sudo apt-get install -y bat git-delta glow
25
+ ```
26
+
15
27
  ```bash
16
28
  pi install git:github.com/tmustier/pi-extensions
17
29
  ```
@@ -57,17 +69,13 @@ Then reference it in your settings:
57
69
  }
58
70
  ```
59
71
 
60
- ## Dependencies (recommended)
61
-
62
- ```bash
63
- brew install bat git-delta glow
64
- ```
72
+ ## Dependencies (required)
65
73
 
66
74
  - `bat`: syntax highlighting
67
75
  - `delta`: formatted diffs
68
76
  - `glow`: markdown rendering
69
77
 
70
- If any are missing, the extension will notify you at session start and gracefully fall back to plain rendering.
78
+ The `/files` browser requires these tools and will refuse to open until they are installed.
71
79
 
72
80
  ## Commands
73
81
 
Binary file
@@ -17,10 +17,18 @@ import { hasCommand } from "./utils";
17
17
  export default function editorExtension(pi: ExtensionAPI): void {
18
18
  const cwd = process.cwd();
19
19
  const agentModifiedFiles = new Set<string>();
20
+ const requiredDeps = ["bat", "delta", "glow"] as const;
21
+ const getMissingDeps = () => requiredDeps.filter((dep) => !hasCommand(dep));
20
22
 
21
23
  pi.registerCommand("files", {
22
24
  description: "Open file browser",
23
25
  handler: async (_args, ctx) => {
26
+ const missing = getMissingDeps();
27
+ if (missing.length > 0) {
28
+ ctx.ui.notify(`files-widget requires ${missing.join(", ")}. Install: brew install bat git-delta glow`, "error");
29
+ return;
30
+ }
31
+
24
32
  await ctx.ui.custom<void>((tui, theme, _kb, done) => {
25
33
  let pollInterval: ReturnType<typeof setInterval> | null = null;
26
34
 
@@ -122,13 +130,9 @@ export default function editorExtension(pi: ExtensionAPI): void {
122
130
  });
123
131
 
124
132
  pi.on("session_start", async (_event, ctx) => {
125
- const missing: string[] = [];
126
- if (!hasCommand("bat")) missing.push("bat");
127
- if (!hasCommand("delta")) missing.push("delta");
128
- if (!hasCommand("glow")) missing.push("glow");
129
-
133
+ const missing = getMissingDeps();
130
134
  if (missing.length > 0) {
131
- ctx.ui.notify(`Editor: install ${missing.join(", ")} for better experience`, "info");
135
+ ctx.ui.notify(`files-widget requires ${missing.join(", ")}. Install: brew install bat git-delta glow`, "error");
132
136
  }
133
137
 
134
138
  agentModifiedFiles.clear();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmustier/pi-files-widget",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "In-terminal file browser and viewer for Pi.",
5
5
  "license": "MIT",
6
6
  "author": "Thomas Mustier",
@@ -18,6 +18,9 @@
18
18
  "@mariozechner/pi-coding-agent": "^0.50.0",
19
19
  "@mariozechner/pi-tui": "^0.50.0"
20
20
  },
21
+ "scripts": {
22
+ "postinstall": "node -e \"console.log('pi-files-widget: required deps: bat, delta, glow. Install with: brew install bat git-delta glow')\""
23
+ },
21
24
  "pi": {
22
25
  "extensions": [
23
26
  "index.ts"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-extensions",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "pi-package"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thomas Mustier
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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmustier/pi-ralph-wiggum",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Long-running agent loops for iterative development in Pi.",
5
5
  "license": "MIT",
6
6
  "author": "Thomas Mustier",
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thomas Mustier
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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmustier/pi-raw-paste",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "One-shot raw paste support for Pi (/paste).",
5
5
  "license": "MIT",
6
6
  "author": "Thomas Mustier",
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thomas Mustier
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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmustier/pi-tab-status",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Terminal tab status indicators for Pi sessions.",
5
5
  "license": "MIT",
6
6
  "author": "Thomas Mustier",
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thomas Mustier
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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmustier/pi-usage-extension",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Usage statistics dashboard for Pi sessions.",
5
5
  "license": "MIT",
6
6
  "author": "Thomas Mustier",