opencode-workflow-suite
v0.3.0
Published
OpenCode workflow plugin combining todo enforcement and notifier gating
Downloads
41
Maintainers
Readme
opencode-workflow-suite
OpenCode workflow plugin that combines:
- todo continuation enforcement on idle sessions
- notifier gating that waits for enforcer outcomes before signaling "ready"
- external repo preparation via
repo_ensure_local
Component docs
src/todo-enforcer/README.mdsrc/notifier/README.mdsrc/repo-local/README.mdsrc/workflow-core/README.md
Install
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-workflow-suite"]
}For local development:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-workflow-suite@file:/absolute/path/to/opencode-workflow-suite"]
}Exports
import {
createWorkflowSuitePlugin,
WorkflowSuitePlugin,
} from "opencode-workflow-suite";Configuration
import { createWorkflowSuitePlugin } from "opencode-workflow-suite";
export default createWorkflowSuitePlugin({
todoEnforcer: {
countdownMs: 1500,
continuationCooldownMs: 7000,
stopCommand: "/stop-continuation",
},
notifier: {
settleMs: 3500,
maxWaitMs: 10000,
command: {
enabled: true,
path: "/usr/bin/paplay",
args: ["/home/you/sounds/opencode-ready.ogg"],
},
},
});Notifier behavior
- waits
notifier.settleMsaftersession.idle - suppresses "ready" signal when enforcer continues work
- emits terminal-ready only when enforcer outcome is stable (
todo-completeor settle timeout) - can emit events for paused, enforcer-failure, permission, question, and error
Command placeholders:
{event}{message}{project}{reason}{sessionID}{sessionTitle}
Env override:
OPENCODE_WORKFLOW_SUITE_NOTIFY_COMMAND=/path/to/script-or-binary
Optional notifier controls:
quietHours(start/endinHH:MM) to suppress notifications during quiet windows
Focus-note:
- notifications are now delivered even when the current terminal/session is focused
suppressWhenFocusedandfocusCommanddo not suppress delivery
notifier: {
quietHours: {
enabled: true,
start: "22:00",
end: "08:00",
},
}Todo enforcer defaults
countdownMs:2000countdownGraceMs:500continuationCooldownMs:5000abortWindowMs:3000maxConsecutiveFailures:5
Debug tool
- Tool:
todo_enforcer_debug_ping - Writes:
<session-directory>/.opencode-workflow-suite-debug-pings.jsonl
Repo tool
- Tool:
repo_ensure_local - Purpose: clone/update external repositories into a deterministic local root and return
local_pathfor immediateRead/Glob/Grep/Bashusage
Arguments:
repo(required):https://host/owner/repo(.git),git@host:owner/repo.git(withallow_ssh=true),host/owner/repo, orowner/reporef(optional): branch/tag/SHA to checkout after clone/fetchdepth(optional): shallow clone depthupdate_mode(optional):ff-only(default),fetch-only,reset-cleanallow_ssh(optional): allow SSH-style remote inputauth_mode(optional):auto(default),https,ssh
Repo env vars:
OPENCODE_REPO_CLONE_ROOT(env-only absolute path override; default~/.opencode/repos)OPENCODE_REPO_ALLOW_SSH=trueOPENCODE_REPO_TELEMETRY_PATH
Development
bun install
bun run check
bun run check:full
bun run test:e2e
bun run test:e2e:npmE2E notes:
OPENCODE_CONFIG_CONTENTmerges with existing OpenCode config; for deterministic runs, the E2E harness isolates config viaXDG_CONFIG_HOMEOPENCODE_WORKFLOW_SUITE_E2E_NPM_SANDBOXcan override npm-mode sandbox path (must be absolute)
Releasing
bun run release:verifybun run release:patch|minor|major|beta:first|beta:next
See RELEASING.md for full workflow details.
Primary env vars are now:
OPENCODE_WORKFLOW_SUITE_STOP_COMMANDOPENCODE_WORKFLOW_SUITE_NOTIFY_COMMANDOPENCODE_WORKFLOW_SUITE_TELEMETRY_PATHOPENCODE_WORKFLOW_SUITE_TELEMETRY_CONTEXTOPENCODE_WORKFLOW_SUITE_TELEMETRYOPENCODE_WORKFLOW_SUITE_E2E_MAX_ATTEMPTSOPENCODE_WORKFLOW_SUITE_E2E_STRICTOPENCODE_WORKFLOW_SUITE_E2E_NPM_SANDBOX
Repo tool env vars:
OPENCODE_REPO_CLONE_ROOTOPENCODE_REPO_ALLOW_SSHOPENCODE_REPO_TELEMETRY_PATH
