ypi 0.2.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to ypi are documented here.
4
4
  Format based on [Keep a Changelog](https://keepachangelog.com/).
5
5
 
6
+ ## [0.3.0] - 2026-02-13
7
+
8
+ ### Added
9
+ - **ypi status extension** (`extensions/ypi.ts`): shows `ypi ∞ depth 0/3` in footer status bar and sets terminal title to "ypi" — visual indicator that this is recursive Pi, not vanilla
10
+ - **CI workflows**: GitHub Actions for push/PR testing and upstream Pi compatibility checks every 6 hours
11
+ - **`scripts/check-upstream`**: local script to test ypi against latest Pi version — no GitHub required
12
+ - **`tests/test_extensions.sh`**: verifies `.ts` extensions load cleanly with installed Pi
13
+ - **`.pi-version`**: tracks last known-good Pi version for compatibility monitoring
14
+ - `make test-extensions` and `make check-upstream` targets
15
+
16
+ ### Changed
17
+ - Removed hardcoded hashline extension from `ypi` launcher — user's own Pi extensions (installed at `~/.pi/agent/extensions/`) are discovered automatically by Pi
18
+ - Removed `RLM_HASHLINE` environment variable (no longer needed)
19
+
20
+ ## [0.2.1] - 2026-02-13
21
+
22
+ ### Fixed
23
+ - Skip bundled `hashline.ts` extension when the global install (`~/.pi/agent/extensions/hashline.ts`) exists, fixing "Tool read/edit conflicts" error
24
+
6
25
  ## [0.2.0] - 2026-02-12
7
26
 
8
27
  ### Added
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # ypi
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/ypi?style=flat-square)](https://www.npmjs.com/package/ypi)
4
+
3
5
  **ypi** — a recursive coding agent built on [Pi](https://github.com/badlogic/pi-mono).
4
6
 
5
7
  Named after the [Y combinator](https://en.wikipedia.org/wiki/Fixed-point_combinator#Y_combinator) from lambda calculus — the fixed-point combinator that enables recursion. `ypi` is Pi that can call itself. (`rpi` already has another connotation.)
@@ -40,15 +42,19 @@ Pi already has a bash REPL. We add one function — `rlm_query` — and a system
40
42
  ### Install
41
43
 
42
44
  ```bash
43
- curl -fsSL https://raw.githubusercontent.com/rawwerks/ypi/master/install.sh | bash
44
- ```
45
+ # npm (global)
46
+ npm install -g ypi
45
47
 
46
- Or manually:
48
+ # or run without installing
49
+ npx ypi "What does this repo do?"
50
+ bunx ypi "What does this repo do?"
47
51
 
48
- ```bash
49
- git clone https://github.com/rawwerks/ypi.git
50
- cd ypi
51
- git submodule update --init --depth 1 # pulls pi-mono
52
+ # or curl
53
+ curl -fsSL https://raw.githubusercontent.com/rawwerks/ypi/master/install.sh | bash
54
+
55
+ # or manual
56
+ git clone https://github.com/rawwerks/ypi.git && cd ypi
57
+ git submodule update --init --depth 1
52
58
  export PATH="$PWD:$PATH"
53
59
  ```
54
60
 
@@ -80,7 +86,7 @@ ypi --provider anthropic --model claude-sonnet-4-5-20250929 "What does this code
80
86
  ```
81
87
  Depth 0 (root) → full Pi with bash + rlm_query
82
88
  Depth 1 (child) → full Pi with bash + rlm_query, own jj workspace
83
- Depth 2 (leaf) → plain LM call, no tools (RLM_MAX_DEPTH reached)
89
+ Depth 2 (leaf) → full Pi with bash, but no rlm_query (max depth)
84
90
  ```
85
91
 
86
92
  **File isolation with jj:** Each recursive child gets its own [jj workspace](https://martinvonz.github.io/jj/latest/working-copy/). The parent's working copy is untouched. Review child work with `jj diff -r <change-id>`, absorb with `jj squash --from <change-id>`.
@@ -0,0 +1,39 @@
1
+ /**
2
+ * ypi Status Extension
3
+ *
4
+ * Shows that this is ypi (recursive Pi), not vanilla Pi.
5
+ * Displays recursion depth info in the footer status bar
6
+ * and sets the terminal title to "ypi".
7
+ *
8
+ * Reads configuration from environment variables set by the ypi launcher:
9
+ * RLM_DEPTH — current recursion depth (default: 0)
10
+ * RLM_MAX_DEPTH — maximum recursion depth (default: 3)
11
+ */
12
+
13
+ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
14
+
15
+ export default function (pi: ExtensionAPI) {
16
+ const depth = parseInt(process.env.RLM_DEPTH || "0", 10);
17
+ const maxDepth = parseInt(process.env.RLM_MAX_DEPTH || "3", 10);
18
+
19
+ pi.on("session_start", async (_event, ctx) => {
20
+ const theme = ctx.ui.theme;
21
+
22
+ // Footer status: ypi with depth info
23
+ const label = theme.fg("accent", "ypi");
24
+ const depthInfo = theme.fg("dim", ` ∞ depth ${depth}/${maxDepth}`);
25
+ ctx.ui.setStatus("ypi", label + depthInfo);
26
+
27
+ // Terminal tab/window title
28
+ ctx.ui.setTitle("ypi");
29
+ });
30
+
31
+ // Update on session switch (new session resets UI)
32
+ pi.on("session_switch", async (_event, ctx) => {
33
+ const theme = ctx.ui.theme;
34
+ const label = theme.fg("accent", "ypi");
35
+ const depthInfo = theme.fg("dim", ` ∞ depth ${depth}/${maxDepth}`);
36
+ ctx.ui.setStatus("ypi", label + depthInfo);
37
+ ctx.ui.setTitle("ypi");
38
+ });
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ypi",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "ypi — a recursive coding agent. Pi that can call itself via rlm_query.",
5
5
  "license": "MIT",
6
6
  "author": "Raymond Weitekamp",
@@ -37,7 +37,8 @@
37
37
  "install.sh",
38
38
  "README.md",
39
39
  "LICENSE",
40
- "CHANGELOG.md"
40
+ "CHANGELOG.md",
41
+ "extensions/ypi.ts"
41
42
  ],
42
43
  "dependencies": {
43
44
  "@mariozechner/pi-coding-agent": "*"
package/ypi CHANGED
@@ -82,5 +82,12 @@ cat >> "$COMBINED_PROMPT" << 'EOF'
82
82
  ```
83
83
  EOF
84
84
 
85
+ # ypi status extension - shows recursive mode indicator in footer
86
+ YPI_EXT_ARGS=()
87
+ if [ -f "$SCRIPT_DIR/extensions/ypi.ts" ]; then
88
+ YPI_EXT_ARGS=(-e "$SCRIPT_DIR/extensions/ypi.ts")
89
+ fi
90
+
85
91
  # Launch Pi with the combined system prompt, passing all args through
86
- exec pi --system-prompt "$COMBINED_PROMPT" "$@"
92
+ # User's own extensions (hashline, etc.) are discovered automatically by Pi.
93
+ exec pi --system-prompt "$COMBINED_PROMPT" "${YPI_EXT_ARGS[@]}" "$@"