Skip to content

feat(automations): add OpenCode host adapter and dependency-free TS plugin (#250) - #300

Open
Sanjai-Gopal wants to merge 5 commits into
secfoo-com:mainfrom
Sanjai-Gopal:feat/automations-opencode-250
Open

Sanjai-Gopal wants to merge 5 commits into
secfoo-com:mainfrom
Sanjai-Gopal:feat/automations-opencode-250

Conversation

@Sanjai-Gopal

Copy link
Copy Markdown
Contributor

Fixes #250

Depends on #291.

Summary

  • Add src/secfoo/automations/hosts/opencode.py (execute.before, execute.after, session.idle, session.created) and ctx.session.prompt / ctx.session.synthetic action directives.
  • Generate dependency-free .opencode/plugins/secfoo.ts / ~/.config/opencode/plugins/secfoo.ts (spawnSync with shell: false, SECFOO_AUTOMATION_DEPTH / SECFOO_HOOK_ACTIVE recursion guard) and single-file disable_recipe.
  • Add docs/OPENCODE_AUTOMATIONS.md, fixtures, and tests/test_automations/test_opencode_automations.py.

Verified

  • pytest tests/test_automations/ tests/test_docs_consistency.py -v (30 passed)
  • ruff check . & bandit -r src/secfoo -c .bandit -ll -q

@Sanjai-Gopal
Sanjai-Gopal requested a review from vsn411 as a code owner December 6, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automations for OpenCode: a thin TS plugin that calls secfoo hook

1 participant