Conversation
…onfiguration (step 1 & 2) - Added `workspaceResolver.ts` to handle workspace resolution for agent commands. - Introduced types for agent command configuration, workspaces, and profiles in `types.ts`. - Enhanced `env.ts` to parse agent command configuration from TOML, including validation for workspaces and profiles. - Updated `env.test.ts` with tests for agent command configuration parsing and validation. - Created a roadmap document for the new Discord `/agent` command feature, outlining goals, user experience, and implementation steps. - Modified `sniptail.worker.toml` to include configuration options for the agent command, such as enabling the command, setting default workspace and profile, and defining interaction timeout and output debounce settings.
…nagement in Discord bot (step 4: Discord /agent Command Skeleton)
…storage implementation of step 5 (Bot-to-Worker Session Events) and step 6 (Worker OpenCode Prompt Runner) - Added a new SQLite table for agent sessions to track their state and metadata. - Implemented functions to create, load, and update agent sessions in the registry. - Integrated agent session handling into the worker event system, allowing for session start, message handling, and interaction resolution. - Enhanced OpenCode prompt runner to manage agent sessions, including session ID updates and status changes. - Added tests for agent session functionality to ensure reliability and correctness.
…grate with assistant message handling (step 7: Debounced Discord Output)
…p Active Prompt) - Added `buildDiscordAgentStopComponents` and related functions to create stop buttons for agent sessions in Discord. - Integrated agent stop handling in the Discord command handler to respond to stop button interactions. - Created `activeOpenCodeRuntimes` module to manage active OpenCode session references. - Implemented `stopAgentPrompt` function to handle stopping OpenCode sessions and updating session statuses. - Added tests for stopping agent prompts and handling session states. - Updated OpenCode session management to support aborting sessions and notifying users.
…ling in Discord bot
- Introduced `editDiscordMessage` and `fetchDiscordMessage` functions to handle message editing and retrieval in Discord. - Added types for message editing and fetching options. feat: implement pending OpenCode permission handling (step 9: Permission Interaction Bridge) - Created `PendingOpenCodePermission` type and related functions to manage pending permissions for OpenCode sessions. - Enhanced active OpenCode runtime management to include pending permissions. test: add tests for debounced agent output and OpenCode permission resolution - Added tests to ensure proper flushing of buffered output and handling of permission requests in OpenCode sessions. feat: resolve OpenCode interaction events - Implemented `resolveAgentInteraction` function to handle agent interaction resolutions for OpenCode permissions. - Integrated permission request handling with Discord bot events. feat: enhance Discord components for agent permissions - Added functions to build and parse custom IDs for agent permission buttons in Discord. - Updated tests to cover new permission button functionalities. fix: update OpenCode permission reply handling - Refactored `replyOpenCodePermission` to include workspace and message options. - Improved error handling for permission replies. chore: update bot event types for permission requests and updates - Added new event types for agent permission requests and updates to the bot event payload map. Co-authored-by: Copilot <copilot@github.com>
… Question Interaction Bridge) - Added support for OpenCode question requests in the agent command. - Introduced new functions for replying to and rejecting OpenCode questions. - Updated the event handling to publish question requests and updates to Discord. - Enhanced the test suite to cover new question request scenarios and interactions. - Modified existing types and components to accommodate question handling logic.
…ep 11: Follow-Up Messages In Thread) - Add `handleAgentFollowUpButton` function to manage follow-up actions (queue and steer) for agent sessions. - Create tests for follow-up button interactions to ensure correct event handling and authorization. - Introduce new components for follow-up actions in Discord, including buttons for queuing and steering messages. - Update existing event handling to support follow-up messages and integrate with the OpenCode prompt system. - Enhance worker event types to include a mode for follow-up actions (run, queue, steer). - Refactor related components and tests to accommodate the new follow-up functionality.
…ssage posting logic
…ment and state tracking, to show only one permission at once and wait before showing other permissions after clicking always allow
…ing unnecessary functions and consolidating logic
…lback and improve event streaming logic to leverage 'message.part.updated' events
… management and timeout logic Co-authored-by: Copilot <copilot@github.com>
…ance command handling for workspace and profile selections (step 12: Sticky Defaults)
…t and interaction handling - Added Copilot agent integration with customizable model and reasoning effort settings. - Refactored agent command profiles to include optional fields for model, model provider, and reasoning effort. - Updated tests to validate new Copilot profile configurations and interactions. - Enhanced OpenCode agent options to support model and variant configurations. - Improved error handling and logging for unsupported interactions and prompts.
- Introduced `idleTimeoutMs` configuration for Copilot across various components, including agent commands, tests, and configuration files. - Updated tests to reflect the new idle timeout functionality and ensure proper handling of permission and user input requests. - Refactored interaction handling to utilize the new timeout settings, enhancing the responsiveness and reliability of Copilot interactions. - Improved Discord component handling to provide fallback options for question headers.
…t and runtime handling
- Implemented Codex agent integration in the interactive agent registry. - Created codexInteractionState for managing active Codex runtimes. - Developed codexInteractiveAgent with functions for running, steering, and stopping Codex prompts. - Enhanced stopAgentPrompt tests to include Codex scenarios. - Updated configuration to accept Codex profiles with validation for model and reasoning effort. - Modified core types to support Codex runtime and agent profiles. - Adjusted bot event types to include Codex provider.
…tachment processing
fix: add dotenv dependency to package/core (not sure how it could work before without it)
…arify entry points
## Summary What does this change do? Why? it adds a new agent command (discord and slack support so far) ## Type of change Select the best fit (you can delete the ones that don’t apply): - [ ] 🐛 Bug fix - [x] ✨ Enhancement / new feature - [ ] 📚 Documentation change - [ ] 🧰 Refactor / maintenance (no behavior change) - [ ] 🚨 Breaking change ## Release impact (labels) Maintainers use PR labels to drive versioning and GitHub release notes. Please suggest **exactly one** release-impact label for this PR: - [ ] `release:patch` — bug fix or internal change, no user-visible impact - [x] `release:minor` — new feature or backward-compatible behavior change - [ ] `release:major` — breaking change (config, CLI, behavior, data formats) - [ ] `release:none` — docs/CI/refactor; no release impact > Maintainers will apply/adjust the final `release:*` label during review. ## Checklist - [x] I targeted the `staging` branch (unless a maintainer asked otherwise). - [x] I ran relevant checks/tests locally (or explained why I couldn’t). - [x] I updated docs/config examples if behavior changed. - [x] I added/updated tests where it makes sense.
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.
Automated promotion PR from
stagingtomaincreated by Sniptail run actionpromote-staging-to-main.