Repository navigation
feat(opencode): workflow-session integration (Phase B) - #14
Merged
Merged
Conversation
…hase 4) Add two new modules to the OC Kit workflow system: 1. session-bridge.ts — Connects the workflow engine to OpenCode's session system. Workflows can be triggered from within sessions, their runs tracked per-session, and results fed back into session history. Provides triggerWorkflow() and triggerAndReport() with typed error handling. 2. permission-scope.ts — Controls which tools and agents are available during each workflow step, based on kit-level defaults and per-step overrides. Provides resolveStepPermissions(), isToolAllowed(), isAgentAllowed(), and filter helpers. Both modules follow the project's Effect Schema conventions and include comprehensive unit tests.
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: |
Fix type errors in session-bridge.ts and permission-scope.ts: 1. permission-scope.ts: Rewrite to use actual KitSkill.permissions type (Record<string, "allow"|"deny">) instead of non-existent fields. Use step.skill instead of step.run. 2. session-bridge.ts: Use "CREATED" instead of "PENDING" for initial state. Fix RECOVERED check to use recovered boolean flag. 3. Tests: Update to use correct types (skill instead of run, proper KitSkill structure).
1. Add missing isAgentAllowed and filterAllowedAgents functions to permission-scope.ts 2. Remove name field from skill fixtures in tests (not in KitSkill type) 3. Remove name field from workflow fixture (not in Workflow type)
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.
Add session-bridge.ts and permission-scope.ts for workflow-session integration and per-step permission scoping.