Problem:
api.command TUI plugin shim so older plugins do not fail during initializationIn packages/plugin/src/tui.ts, remove:
TuiCommandTuiCommandApiTuiPluginApi.commandKeep api.keymap as the only TUI command registration and execution surface.
Delete packages/kirincode/src/cli/cmd/tui/plugin/command-shim.ts.
In packages/kirincode/src/cli/cmd/tui/plugin/api.tsx, remove:
createCommandShim importcommand: createCommandShim(...) field from createTuiApi(...)In packages/kirincode/src/cli/cmd/tui/plugin/runtime.ts, remove:
createCommandShim importcommand: createCommandShim(...) field from pluginApi(...)Plugin authors should replace old calls with keymap calls:
api.keymap.registerLayer({
commands: [
{
name: "plugin.command",
title: "Plugin Command",
namespace: "palette",
slashName: "plugin",
run() {
api.ui.dialog.clear()
},
},
],
bindings: [{ key: "ctrl+shift+p", cmd: "plugin.command" }],
})
Direct replacements:
api.command.register(cb) -> api.keymap.registerLayer({ commands, bindings })api.command.trigger(name) -> api.keymap.dispatchCommand(name)api.command.show() -> api.keymap.dispatchCommand("command.palette.show")onSelect(dialog) -> use api.ui.dialog from the plugin API closureAfter removal, run from package directories:
bun typecheck in packages/pluginbun typecheck in packages/opencodepackages/opencode if runtime plugin API wiring changed