ypi 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +14 -8
- package/package.json +1 -1
- package/rlm_query +7 -0
- package/ypi +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
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.2.1] - 2026-02-13
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- Skip bundled `hashline.ts` extension when the global install (`~/.pi/agent/extensions/hashline.ts`) exists, fixing "Tool read/edit conflicts" error
|
|
10
|
+
|
|
6
11
|
## [0.2.0] - 2026-02-12
|
|
7
12
|
|
|
8
13
|
### Added
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# ypi
|
|
2
2
|
|
|
3
|
+
[](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
|
-
|
|
44
|
-
|
|
45
|
+
# npm (global)
|
|
46
|
+
npm install -g ypi
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
# or run without installing
|
|
49
|
+
npx ypi "What does this repo do?"
|
|
50
|
+
bunx ypi "What does this repo do?"
|
|
47
51
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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) →
|
|
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>`.
|
package/package.json
CHANGED
package/rlm_query
CHANGED
|
@@ -253,6 +253,13 @@ else
|
|
|
253
253
|
CMD_ARGS+=(--no-session)
|
|
254
254
|
fi
|
|
255
255
|
|
|
256
|
+
# Hashline edit extension — pass through to children if available
|
|
257
|
+
# Skip if already loaded globally (e.g. ~/.pi/agent/extensions/hashline.ts)
|
|
258
|
+
GLOBAL_HASHLINE="${HOME}/.pi/agent/extensions/hashline.ts"
|
|
259
|
+
if [ "${RLM_HASHLINE:-1}" != "0" ] && [ -f "$SCRIPT_DIR/extensions/hashline.ts" ] && [ ! -f "$GLOBAL_HASHLINE" ]; then
|
|
260
|
+
CMD_ARGS+=(-e "$SCRIPT_DIR/extensions/hashline.ts")
|
|
261
|
+
fi
|
|
262
|
+
|
|
256
263
|
# Build combined system prompt with rlm_query source embedded
|
|
257
264
|
COMBINED_PROMPT=""
|
|
258
265
|
if [ -n "$SYSTEM_PROMPT_FILE" ] && [ -f "$SYSTEM_PROMPT_FILE" ]; then
|
package/ypi
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
# RLM_CHILD_EXTENSIONS — override extensions for depth > 0 (default: same as parent)
|
|
24
24
|
# RLM_BUDGET — max dollar spend for entire recursive tree (default: none)
|
|
25
25
|
# RLM_JSON — set to "0" to disable JSON mode / cost tracking (default: 1)
|
|
26
|
+
# RLM_HASHLINE — set to "0" to disable hashline edit extension (default: 1)
|
|
26
27
|
# PI_TRACE_FILE — path to trace log for all calls with timing (default: none)
|
|
27
28
|
|
|
28
29
|
set -euo pipefail
|
|
@@ -82,5 +83,13 @@ cat >> "$COMBINED_PROMPT" << 'EOF'
|
|
|
82
83
|
```
|
|
83
84
|
EOF
|
|
84
85
|
|
|
86
|
+
# Hashline edit extension — line-addressed edits with content hashes
|
|
87
|
+
# Skip if already loaded globally (e.g. ~/.pi/agent/extensions/hashline.ts)
|
|
88
|
+
HASHLINE_ARGS=()
|
|
89
|
+
GLOBAL_HASHLINE="${HOME}/.pi/agent/extensions/hashline.ts"
|
|
90
|
+
if [ "${RLM_HASHLINE:-1}" != "0" ] && [ -f "$SCRIPT_DIR/extensions/hashline.ts" ] && [ ! -f "$GLOBAL_HASHLINE" ]; then
|
|
91
|
+
HASHLINE_ARGS=(-e "$SCRIPT_DIR/extensions/hashline.ts")
|
|
92
|
+
fi
|
|
93
|
+
|
|
85
94
|
# Launch Pi with the combined system prompt, passing all args through
|
|
86
|
-
exec pi --system-prompt "$COMBINED_PROMPT" "$@"
|
|
95
|
+
exec pi --system-prompt "$COMBINED_PROMPT" "${HASHLINE_ARGS[@]}" "$@"
|