agents: add manifest-driven subagent packages and lifecycle tooling#194
Merged
benvinegar merged 5 commits intomainfrom Mar 2, 2026
Merged
agents: add manifest-driven subagent packages and lifecycle tooling#194benvinegar merged 5 commits intomainfrom
benvinegar merged 5 commits intomainfrom
Conversation
Greptile SummaryIntroduces a manifest-driven subagent package system that makes subagents plug-and-play with declarative lifecycle management. The PR migrates sentry-agent to the new format and adds CLI tooling for install/enable/autostart/start/stop/reconcile operations. Key changes:
Architecture benefits:
The implementation is well-structured with proper validation, path traversal protection, and thorough testing. One minor style issue with shell quoting consistency noted. Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
Start([Subagent Reconcile]) --> Discover[Discover packages from ~/.pi/agent/subagents]
Discover --> ReadState[Read state from subagents-state.json]
ReadState --> Loop{For each package}
Loop --> CheckFlags{installed && enabled && autostart?}
CheckFlags -->|No| Skip[Skip package]
CheckFlags -->|Yes| CheckRunning{Session running?}
CheckRunning -->|Yes| Skip
CheckRunning -->|No| ResolveModel[Resolve model from profile]
ResolveModel --> ValidatePaths[Validate cwd & skill_path]
ValidatePaths --> SpawnTmux[Spawn tmux session with pi agent]
SpawnTmux --> WaitAlias[Poll for ready_alias]
WaitAlias --> CheckSocket{Socket exists & alive?}
CheckSocket -->|Yes, within timeout| Success[✓ Started]
CheckSocket -->|No, timeout exceeded| Timeout[⚠️ Readiness timeout]
Skip --> Loop
Success --> Loop
Timeout --> Loop
Loop -->|Done| End([Report: started/skipped/errors])
Last reviewed commit: 347902f |
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.
Summary
pi/subagents/*subagent_managesubagent_utilbaudbot subagents/bin/subagents.sh)Why
Tests
npm run lint:shellnpm run test:shellnpm run test:jsnpm testAdditional verification
list,autostart-on,reconcile,status,stop)