refactor: move protocol and inject spawn environment - #88
Merged
Conversation
The getManager function was a thin wrapper around new ProcessManager() with a misleading name (implied a singleton but returned fresh instances). Delete it and its test; callers now construct ProcessManager directly.
…alidation Pi validates tool call arguments against the TypeBox schema before execute, so structural guards in notify/update tools were dead code. Extension bus payloads are produced and consumed in-process, so typed casts replace the remaining isRecord checks. The migration peek at dockDefaultState uses a plain property check with an explicit widening comment.
protocol/ is a Pi in-process event-bus contract (CHANNELS + reply callbacks), not part of the Pi-agnostic manager core, so it belongs with the extensions that produce and consume it. Nothing in src/ imported it; internal references to ../types now point back at src/types. Also make the child-process environment injectable in spawnCommand (default process.env), matching the existing getConfiguredShellPath pattern and removing the last hidden global in src/.
378-kaiabot
Bot
force-pushed
the
chore/code-tweaks
branch
from
August 17, 2026 11:45
aa45ba5 to
5fc84a8
Compare
378-kaiabot
Bot
force-pushed
the
chore/code-tweaks
branch
from
August 17, 2026 16:48
5fc84a8 to
aa45ba5
Compare
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.
Changes from chore/code-tweaks, opened against main.