Skip to content

Bug: TypeError in observal scan due to missing arguments in DiscoveredHook (OpenCode adapter) #1416

Description

@dexterhere-2k

Bug Report: observal scan Crashes with TypeError on OpenCode Plugin Discovery


Duplicate Check

  • This issue is not a duplicate

Steps to Reproduce

  1. Install an OpenCode plugin or ensure ~/.config/opencode/plugins/ contains at least one .ts / .js file.
  2. Run the following command:
    observal scan
  3. The CLI crashes with a TypeError instead of completing the scan.

Expected Behaviour

observal scan should successfully parse the OpenCode plugins directory and report all discovered hooks — without crashing.


Actual Behaviour

The command crashes immediately with:

TypeError: DiscoveredHook.__init__() missing 3 required positional arguments:
  'handler_type', 'handler_config', and 'description'

Root cause: DiscoveredHook is instantiated without its required positional arguments in:

observal_cli/ide/opencode.py

Investigation Notes

The bug is isolated to the OpenCode adapter. The following adapters correctly pass all required arguments to DiscoveredHook and are unaffected:

Adapter file Status
claude_code.py ✅ Correct
copilot_cli.py ✅ Correct
kiro.py ✅ Correct
antigravity.py ✅ Correct
opencode.py Missing handler_type, handler_config, description

Support Bundle

observal-support-20260610-192015.tar.gz


Additional Context

A local fix has already been developed on a separate branch. The fix updates the DiscoveredHook instantiation in opencode.py to include the three missing fields: handler_type, handler_config, and description.

A Pull Request is ready to open as soon as this issue is triaged.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions