mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-29 14:03:17 +00:00
feat(lua plugin): align Lua plugin bridge with C ABI surface, accept table args in sdk.memory.recall
- Lua 桥接层补齐 register_def/no_memory/cleaner/own_tools/output+input channels/register_api/set_auto_restart 等 v0.8.0 能力,与 C ABI 插件面一致 - sdk.memory.recall 兼容表参数(多 key 批量 recall),修复 Lua 插件传表报 bad argument - 新增 TestLuaAlignedAPIs 覆盖对齐后的 API 面(含 recall 数组回归断言) - sdk.lua 同步子表 mock(memory/doc/knowledge/text_memory/llm/social/settings) - 更新 PLUGIN_DEV.md 中英文示例插件参考表
This commit is contained in:
@ -650,6 +650,17 @@ func go_core_dispatch(methodID C.int, ctx unsafe.Pointer, s1, s2, s3 *C.char, i1
|
||||
setResult(result, string(b))
|
||||
}
|
||||
return 0
|
||||
|
||||
case 46: // CORE_REGISTER_INPUT_CH
|
||||
chDef := sdk.ChannelDef{}
|
||||
if a2 != "" {
|
||||
var def sdk.ChannelDef
|
||||
if err := json.Unmarshal([]byte(a2), &def); err == nil {
|
||||
chDef = def
|
||||
}
|
||||
}
|
||||
s.RegisterInputChannel(a1, chDef)
|
||||
return 0
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -55,4 +55,5 @@ const (
|
||||
CoreSettingsDefs = meta.CoreSettingsDefs
|
||||
CoreSettingsDump = meta.CoreSettingsDump
|
||||
CoreSettingsPlugins = meta.CoreSettingsPlugins
|
||||
CoreRegisterInputCh = meta.CoreRegisterInputCh
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user