Repository navigation
Description
On-disk layout under ~/.openhands/canvas-extensions/installed/<name>/. Reuse InstallationMetadata/InstallationInfo (openhands-sdk/openhands/sdk/extensions/installation/) for .installed.json bookkeeping only — not InstallationManager.install()/.update() unmodified.
Two confirmed issues, with exact locations (verified by running the code against current main):
InstallationInfo.enableddefaults toTrue(info.py:22:enabled: bool = Field(default=True, ...)).InstallationManager.install()only overrides thisif existing is not None(manager.py:122-126) — i.e. only on a force-reinstall of an already-tracked name. A genuinely new install keeps the field default. Reproduced directly: a throwaway extension installed via the public API came backenabled=True.InstallationMetadata.discover_untracked()(metadata.py:197-241), the self-healing reconciliation that runs on everylist_installed(), builds new entries viaInstallationInfo.from_extension(extension, source="local", install_path=item)(metadata.py:238-239) with noenabled=override either — same default applies.- Already live behavior for Plugins:
install_plugin()(openhands/sdk/plugin/installed.py:57-80) calls.install()with no override at all. The test suite's own setup implicitly confirms this —tests/sdk/extensions/installation/test_installation_manager.py:172-182has to callmanager.disable(...)explicitly before testing that a force-reinstall preserves the disabled state, because a fresh install is known to land enabled. There's no test anywhere asserting a bare fresh install defaults to disabled.
Canvas Extensions must force enabled=False explicitly on every write path that can create a tracked entry — both fresh install and discovery. Neither install() nor InstallationInfo.from_extension() currently accepts an override for this, so it needs to be an explicit post-write correction, or a new keyword added upstream (which would then need auditing against every existing Plugins/Skills call site so their behavior doesn't silently change too).
Regression tests:
- Install without an explicit enable call → assert disabled.
- Attempt to smuggle
enabled: truein the install request body → assert it's ignored. - Manually place a valid extension directory in the install root (bypassing the API) → assert it comes back disabled on next list/get.
Blocked by: #4348
Activity