feat(workspace): add lifecycle hooks for runtime prerequisites#430
Open
christso wants to merge 2 commits into
Open
feat(workspace): add lifecycle hooks for runtime prerequisites#430christso wants to merge 2 commits into
christso wants to merge 2 commits into
Conversation
Add a declarative lifecycleHooks.preSync mechanism that lets a workspace run shell scripts before plugin artifacts are synced. This is an escape hatch for runtime prerequisites (e.g., agent-tui, bd) that AllAgents cannot sync as agent artifacts. - Schema: LifecycleScriptSchema supports string shorthand and object form with name/optional fields - Runner: execute scripts in order, stop on required failure, continue past optional failure, provide ALLAGENTS_WORKSPACE/ALLAGENTS_CONFIG_DIR - Integration: run preSync hooks before plugin validation in syncWorkspace - CLI: show script results in sync output, support dry-run and JSON mode - Tests: 29 unit/integration tests covering parsing, execution, dry-run, failure, ordering, optional scripts, env vars, and full sync flow - Docs: configuration reference section and example workspace
Deploying allagents with
|
| Latest commit: |
4c85aec
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://451207f6.allagents.pages.dev |
| Branch Preview URL: | https://feat-workspace-lifecycle-scr.allagents.pages.dev |
…sed test imports - Include lifecycleResults in syncWorkspace's early return when no clients are configured, so lifecycle hook output isn't silently dropped - Remove unused chmod and mkdir imports from lifecycle-scripts test
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
lifecycleHooks.preSyncto workspace config, allowing declarative shell scripts to run before plugin syncALLAGENTS_WORKSPACEandALLAGENTS_CONFIG_DIRenv varsMotivation
Closes all-9qx. Plugins like the Codex plugin stack require runtime prerequisites (
agent-tui,bd) that AllAgents cannot sync as agent artifacts. This escape hatch lets workspaces declare idempotent install/update scripts.Changes
LifecycleScriptSchemaandLifecycleHooksSchemainworkspace-config.tssrc/core/lifecycle-scripts.ts- execute scripts in order, capture output, handle failuressyncWorkspaceruns preSync hooks before plugin validationexamples/workspaces/lifecycle-hooks/E2E Steps
Notes
bun run test:integrationis unavailable (notests/integration/directory on this branch).allagents/