Repository navigation
fix(pi-tree): load runtime bundle modules for pi >= 0.84.3 - #6
Merged
Merged
Conversation
pi 0.84.3 switched the CLI/RPC entrypoints to a bundled runtime, leaving the dist/modes modular files as a second, unused copy at CLI runtime. pi-tree patched that dead copy, so /tree patches silently never applied. Load internals via loadPiRuntimeModule (pi-extension-internals 0.1.2), which prefers the running bundle entrypoint chunks before the modular fallback, and bump the dependency accordingly.
npm lockfiles can shadow the hoisted @zigai/pi-extension-internals with an older nested copy (0.1.0) that lacks loadPiRuntimeModule, breaking the extension at import time. Inline the loader (from internals 0.1.2, MIT) so pi-tree is self-contained.
Owner
|
Thanks. I added a commit to keep the loader in the shared internals package. LGTM. |
zigai
pushed a commit
that referenced
this pull request
Oct 10, 2026
* Make goal lifecycle transitions terminal and idempotent. Enforce state-machine guards so completed goals cannot be reopened by pause/resume or duplicate complete writes, allow create_goal to replace completed goals, skip unchanged runtime/compaction snapshots, and throw from failed goal tools per pi contract. Closes #6 Co-authored-by: Cursor <cursoragent@cursor.com> * Align create_goal model guidance with create-after-complete semantics. Update tool prompts, failure copy, and tests so non-complete goals block duplicate create while completed goals can be replaced. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Pi's bundled CLI uses a different tree-selector class from the modular files under
dist/modes/. Patching the modular copy leaves the actual/treeUI without pi-tree's timestamps and preview behavior.Change
Load the tree selector and theme through
loadPiRuntimeModulefrom the published@zigai/pi-extension-internals@0.1.2package. Keep guarded runtime discovery in that shared package and remove the vendored loader from pi-tree.Update pi-tree's exact runtime dependency and regenerate the npm lockfile, removing its stale nested internals 0.1.0 entry. Add regression tests that compare the loaded constructor with the constructor used by a bundled or modular host; the bundled fixture also contains a separate modular class to reproduce the original failure.
Verification
npm run check: passed, including 71 test files / 363 tests and managed-install package loading. Pre-commit checks remain enabled.loadPiInternalModule, and passes with the runtime loader.npm install./treepresents timestamp prefixes and selected-message preview content; pressingPchangesPreview: OntoPreview: Off. Both recorded Termtrace scenarios pass.This change reuses the published shared loader as-is; broader changes to its fallback policy are separate shared-package work.