Preflight
Request origin
Observed need in a real workflow.
Problem or unmet outcome
The Pi host installer currently supports only a project-local extension target:
loopx slash-commands --install --surface pi --pi-project <project>
This writes:
<project>/.pi/extensions/loopx-goal.ts
<project>/.pi/extensions/pi-goal-loop-runtime.mjs
Pi also has a user-global extension discovery location, ~/.pi/agent/extensions/, which is the normal target when an extension should be available in every Pi project. LoopX has no managed install option for that scope today.
As a result, a user asking to "install LoopX for Pi" can reasonably expect a global Pi extension but receive a project-local installation instead. The manual workaround is to copy the adapter and runtime into ~/.pi/agent/extensions/loopx/, but that copy is outside LoopX's upgrade, ownership-marker, readback, and uninstall lifecycle.
Use case
- Install or update LoopX.
- Enable the LoopX Pi adapter once for the current user.
- Start Pi in different trusted projects.
- Use
/loopx without installing duplicate adapter files into every repository.
- Upgrade or uninstall LoopX-managed global adapter files through the same CLI lifecycle.
Project bindings can continue to live under each current project's .loopx/pi/; only the Pi extension code needs user-global discovery.
Proposed outcome
Add an explicit user-global Pi installation scope while preserving the current project-local behavior for compatibility. The exact CLI spelling is open, for example:
loopx slash-commands --install --surface pi --pi-scope user
loopx slash-commands --uninstall --surface pi --pi-scope user
Observable behavior:
- The user-global install writes a Pi-discoverable directory entry such as
~/.pi/agent/extensions/loopx/index.ts plus the sibling runtime module.
- The project install remains available through
--pi-project and keeps its existing behavior.
- Install and upgrade replace only files carrying the LoopX managed marker.
- Uninstall preserves modified or user-owned same-name files and fails closed, matching the current project installer policy.
- Dry-run output identifies the selected scope and exact target paths.
loopx doctor or an equivalent readback reports whether the Pi adapter is absent, project-local, user-global, stale, or current.
- Documentation distinguishes user-global extension code from project-local
.loopx/pi/ binding state and notes the required Pi /reload or restart.
LoopX area
Host or runtime integration; build, packaging, and installer lifecycle.
Alternatives considered
- Keep installing separately into every project's
.pi/extensions/. This works but duplicates managed code and does not match a user-global installation request.
- Manually copy the release files into
~/.pi/agent/extensions/loopx/. This loads successfully, but later loopx update does not refresh the copy and LoopX cannot safely uninstall or diagnose it.
- Register a fixed release-snapshot path in Pi settings. This becomes stale when the active LoopX release pointer changes.
Scope and non-goals
In scope:
- Managed user-global Pi adapter install, dry-run, upgrade/readback, and uninstall.
- Clear scope selection and documentation.
- Preservation of the current project-local install path.
Out of scope:
- Moving project goal bindings or runtime state out of
.loopx/pi/.
- Granting repository, network, credential, or external-system authority.
- Changing quota, continuation, or terminal-state semantics.
Contribution
Preflight
Request origin
Observed need in a real workflow.
Problem or unmet outcome
The Pi host installer currently supports only a project-local extension target:
This writes:
Pi also has a user-global extension discovery location,
~/.pi/agent/extensions/, which is the normal target when an extension should be available in every Pi project. LoopX has no managed install option for that scope today.As a result, a user asking to "install LoopX for Pi" can reasonably expect a global Pi extension but receive a project-local installation instead. The manual workaround is to copy the adapter and runtime into
~/.pi/agent/extensions/loopx/, but that copy is outside LoopX's upgrade, ownership-marker, readback, and uninstall lifecycle.Use case
/loopxwithout installing duplicate adapter files into every repository.Project bindings can continue to live under each current project's
.loopx/pi/; only the Pi extension code needs user-global discovery.Proposed outcome
Add an explicit user-global Pi installation scope while preserving the current project-local behavior for compatibility. The exact CLI spelling is open, for example:
Observable behavior:
~/.pi/agent/extensions/loopx/index.tsplus the sibling runtime module.--pi-projectand keeps its existing behavior.loopx doctoror an equivalent readback reports whether the Pi adapter is absent, project-local, user-global, stale, or current..loopx/pi/binding state and notes the required Pi/reloador restart.LoopX area
Host or runtime integration; build, packaging, and installer lifecycle.
Alternatives considered
.pi/extensions/. This works but duplicates managed code and does not match a user-global installation request.~/.pi/agent/extensions/loopx/. This loads successfully, but laterloopx updatedoes not refresh the copy and LoopX cannot safely uninstall or diagnose it.Scope and non-goals
In scope:
Out of scope:
.loopx/pi/.Contribution