DF8500: Built-in Command Requires Host Capability
Message
Built-in command "
{id}" requires a host capability that this host does not implement.
Cause
A hub built-in command (e.g. hub:open-path) was invoked, but the host implementation passed to createHubContext did not implement the matching capability. The hub exposes these built-ins uniformly across framework kits — but the underlying capability is host-specific (e.g. openPath needs a launch-editor binding the host can call).
Fix
Implement the matching capability on the DevframeHost returned to createHubContext. For hub:open-path, implement host.openPath(filepath, line?, column?):
ts
import type { HubHostCapabilities } from '@devframes/hub/node'
import type { DevframeHost } from 'devframe/types'
import { launchEditor } from 'devframe/utils/launch-editor'
const host: DevframeHost & HubHostCapabilities = {
// … existing DevframeHost methods …
async openPath(filepath, line, column) {
const target = line ? `${filepath}:${line}${column ? `:${column}` : ''}` : filepath
launchEditor(target)
return true
},
}See the Hub guide for the full capability surface.
Source
packages/hub/src/node/hub-builtins.ts—registerHubBuiltins()registershub:open-path, whose handler throws this whencontext.host.openPathis undefined.