| Field | Value |
|---|---|
| Repo | assagman/agentsbox |
| PR | #4 |
| Title | fix(pi): install extension as symlinked directory |
| URL | #4 |
| Generated at | 2026-01-24T21:10:00Z |
| Category | Count |
|---|---|
| Unresolved threads (initial) | 13 |
| Resolved as INVALID | 4 |
| VALID (planned work) | 9 |
| UNCLEAR (needs user input) | 0 |
Goal: address each VALID thread with code changes + tests, then reply/resolve those threads in the PR.
- Thread: #4 (comment)
- Files:
test/unit/cli-setup-pi.test.ts:47
- What reviewer claims:
- Tests still assume old behavior (file symlink to
pi.js) instead of directory symlink todist/pi-extension.
- Tests still assume old behavior (file symlink to
- Work items:
- Update assertions to expect:
~/.pi/agent/extensions/agentsbox(NOT.js)- symlink target contains
dist/pi-extension(NOTdist/pi.js)
- Keep existing skill symlink assertion (
~/.pi/agent/skills/agentsbox).
- Update assertions to expect:
- Acceptance criteria:
-
bun testpasses.
-
- Thread: #4 (comment)
- Files:
test/unit/cli-setup-pi.test.ts:45
- Work items:
- Replace
~/.pi/agent/extensions/agentsbox.jsexpectation with~/.pi/agent/extensions/agentsbox.
- Replace
- Acceptance criteria:
- Test matches
src/cli.tsplanSetupPi()output.
- Test matches
- Thread: #4 (comment)
- Files:
test/unit/cli-setup-pi.test.ts:47
- Work items:
- Replace
dist/pi.jsexpectation withdist/pi-extension.
- Replace
- Acceptance criteria:
- Test matches
src/cli.tsplanSetupPi()(symlink fromdist/pi-extension).
- Test matches
4) Update cli-setup-pi test (second test case): extension path should be agentsbox not agentsbox.js (Copilot)
- Thread: #4 (comment)
- Files:
test/unit/cli-setup-pi.test.ts:82
- Work items:
- Replace
~/.pi/agent/extensions/agentsbox.jsexpectation with~/.pi/agent/extensions/agentsbox.
- Replace
- Acceptance criteria:
-
--dry-run prints plan even when dist is missingstill passes.
-
5) Update cli-setup-pi test (second test case): target should mention dist/pi-extension not dist/pi.js (Copilot)
- Thread: #4 (comment)
- Files:
test/unit/cli-setup-pi.test.ts:83
- Work items:
- Replace
dist/pi.jsexpectation withdist/pi-extension.
- Replace
- Acceptance criteria:
- Test matches updated CLI plan output.
- Thread: #4 (comment)
- Files:
package.json:23
- What reviewer claims:
- Build script is long; move pi-extension creation logic out.
- Work items:
- Add a small build helper script, e.g.
scripts/prepare-pi-extension.mjs. - Update
package.jsonbuildto:- run
bun build ... - then run the helper script.
- run
- Add a small build helper script, e.g.
- Acceptance criteria:
-
bun run buildproducesdist/pi-extension/package.jsonanddist/pi-extension/index.js.
-
- Thread: #4 (comment)
- Files:
package.json:23
- What reviewer claims:
mkdir -p,ln -sf, andecho >are not Windows-friendly.
- Work items (recommended approach):
- In the helper script, avoid shell utilities entirely.
- Avoid symlinks if possible (Windows symlink perms): write a real JS file instead of
ln -sf:dist/pi-extension/index.jscontent:export { default } from "../pi.js";.
- Create
dist/pi-extension/package.jsonviafs.writeFile.
- Acceptance criteria:
-
bun run buildruns under Windows shells without requiring POSIX utilities.
-
- Thread: #4 (comment)
- Files:
package.json:23
- What reviewer claims:
&&chain +ln -sfcan leave inconsistent state.
- Work items:
- Ensure helper script throws on failure and exits non-zero.
- Make helper script idempotent (re-create files safely).
- Acceptance criteria:
- Any failure in pi-extension preparation makes
bun run buildfail.
- Any failure in pi-extension preparation makes
- Thread: #4 (comment)
- Files:
package.json:23
- Work items:
- Same as items (6)-(8): move logic to helper script and remove POSIX shell dependency.
- Acceptance criteria:
- No
mkdir -p/ln -sf/echoinpackage.jsonscripts.
- No
- Thread: #4 (comment)
- Reply used:
- Already updated test/unit/cli-symlink-broken.test.ts to match new directory symlink behavior (piDest=~/.pi/agent/extensions/agentsbox) and no longer rely on agentsbox.js. This thread is now outdated.
- Rationale:
- Test was already updated in this PR diff.
- Thread: #4 (comment)
- Reply used:
- Already updated cli-symlink-broken test to use ~/.pi/agent/extensions/agentsbox (directory symlink) instead of agentsbox.js. Resolving as outdated.
- Rationale:
- Covered by existing changes in
test/unit/cli-symlink-broken.test.ts.
- Covered by existing changes in
- Thread: #4 (comment)
- Reply used:
- This expectation is already updated: the test now asserts the symlink points to dist/pi-extension (directory), not dist/pi.js (file). Marking this outdated thread resolved.
- Rationale:
- Covered by existing changes in
test/unit/cli-symlink-broken.test.ts.
- Covered by existing changes in
- Thread: #4 (comment)
- Reply used:
- Comment text has been updated to reflect current behavior (dangling symlink at agentsbox -> dist/pi-extension). Resolving this outdated thread.
- Rationale:
- Comment already updated in diff.
None.
- Fix
test/unit/cli-setup-pi.test.tsexpectations for:~/.pi/agent/extensions/agentsboxanddist/pi-extension.
- Replace POSIX
buildscript tail with a Node/Bun helper script that writes files (no symlinks). - Run
bun testand re-check PR threads, then reply+resolve each remaining VALID thread.