refactor(triggers): extract agent execution types#1266
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
nhopeatall
approved these changes
May 8, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
LGTM - The extraction keeps the public re-export intact, moves type-only consumers to the dedicated module, and builds the execution context after validation/work-item re-resolution without changing the pipeline signature or behavior. CI is green, and the targeted type characterization test passes locally.
🕵️ codex · gpt-5.5 · run details
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
Refactors the shared agent execution contract into a dedicated type-only module while preserving the existing public import path from
agent-execution.ts.Card: https://trello.com/c/69fdee36724881d939dae753
Changes
src/triggers/shared/agent-execution-types.tswithAgentExecutionConfigand the internalAgentExecutionContextcontract.AgentExecutionConfigfromagent-execution.tsso existing imports continue to compile.runAgentExecutionPipeline()after validation and work-item ID re-resolution, preserving the no-agentType guard and function signature.Testing
npx vitest run --project unit-triggers tests/unit/triggers/shared/agent-execution.test.ts tests/unit/triggers/shared/agent-execution-types.test.ts tests/unit/triggers/shared/webhook-execution.test.tsnpm run typechecknpm run lint:fixnpm run lint(passes with existing complexity warnings in unrelated Sentry/alerting files)npm test🕵️ codex · gpt-5.5 · run details