User Story
As a user, I want to use the OpenCode CLI through this module, so that I can:
- Run OpenCode tasks from PowerShell scripts
- Use named sessions with OpenCode
- Have a consistent experience across all agent CLIs
Acceptance Criteria
Core Command
Session Management
Module Exports
Documentation
Example Usage
# One-shot task
Invoke-OpenCodeTask -Prompt "summarize this repository"
# Named session
Invoke-OpenCodeTask -Prompt "read the repo" -SessionName "opencode1"
Invoke-OpenCodeTask -Prompt "continue" -SessionName "opencode1"
# List sessions
Get-OpenCodeSession
Implementation Notes
- Follow existing pattern from
Invoke-QwenTask / Invoke-GeminiTask
- OpenCode CLI likely uses similar headless/JSON output模式
- Check OpenCode CLI documentation for:
- Command name (
opencode?)
- JSON output flag
- Session/resume flags
- Approval/sandbox flags
Tasks
User Story
As a user, I want to use the OpenCode CLI through this module, so that I can:
Acceptance Criteria
Core Command
Invoke-OpenCodeTaskcmdlet added-Prompt(mandatory, string)-Directory/-Path-SessionName/-Session-AllowDangerous(default:$true)-Json(default:$true)-Model-AddDirSession Management
Get-OpenCodeSession- List or get sessionsRemove-OpenCodeSession- Remove a sessionClear-OpenCodeSessions- Clear all sessions%LOCALAPPDATA%\Eigenverft.Manifested.Agent\sessions\named-opencode-sessions.jsonModule Exports
FunctionsToExportin.psd1FileListin.psd1Documentation
Example Usage
Implementation Notes
Invoke-QwenTask/Invoke-GeminiTaskopencode?)Tasks
Eigenverft.Manifested.Agent.InvokeOpenCodeTask.ps1