Files
HomeAgent/.gitignore
HomeAgent Agent 162f33f81e feat(lua): Lua 插件桥全量对齐 SDK 1.3.0(媒体/注入标志位/优先级/事件/通道注销)
内核 Lua 桥(internal/plugin/lua_plugin.go)此前停在 v0.8.0 时代能力面,
1.1/1.2/1.3 新增能力只在 Go 侧存在,而 PLUGIN_DEV.md 宣称『能力完全对齐』。
本补丁把 Lua 侧补齐到与公开 SDK 1.3.0 对齐:

- 1.1 媒体:memory.commit 支持 sentence_text/media_digests;
  doc.insert_with_media + attachments;text_memory.append attachments;
  set_tool_blocks / inject_input_media(_sync) / inject_interrupt_media。
- 1.2 注入语义:inject_input_sync(_opts)、六个 *_opts 变体
  (no_memory/context_policy/cleaner_name/priority);
  ToolDef/ChannelDef 解析 context_policy。
- 1.3 优先级与动态通道:priority 常量透传;unregister_output_channel。
- StageContext 暴露 reasoning_content/context_msgs/token_usage/memory/extra/errors。
- 新增 sdk.events.subscribe 与 sdk.plugin_mgr.*。
- sdk.lua mock 同步(单一事实源在 SDK 仓 sdk/lua/sdk.lua,内核副本由
  third_party/homeagent-sdk/scripts/sync-lua-sdk.sh 同步)。

契约测试(lua_surface_test.go):
- 守住内核内嵌 mock 与 SDK 仓事实源一致;
- 守住 mock 承诺的每个函数都有运行时 RawSetString 绑定;
- 覆盖 opts/media/attachments 解析与 context_policy 透传。

文档:中英 PLUGIN_DEV.md 的 Lua API 表补齐并改为『对齐至 SDK 1.3.0』。
2026-09-13 19:56:32 +08:00

69 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/homed
/waiter
*.exe
*.log
*.test
build/
*.so
*.db
data/
.tmp-plugins/
.go/
.local/
*.hmap
dev/
login.json
# GUI
cmd/gui/node_modules/
cmd/gui/dist/
.gopath/
# SDK 工具链 — 核心仓不追踪
#
# 外部插件与工具链维护在独立 SDK 仓(决策 sdk_repo_only
# 本仓经 go.mod 的 replace => ./third_party/homeagent-sdk 引用。
# example/ 下已跟踪的 20 个文件plg.json + plugin.go早于本规则
# 靠「已跟踪文件不受 .gitignore 影响」保留——这是有意的,不要「修」。
third_party/homeagent-sdk/bin/
third_party/homeagent-sdk/tools/
third_party/homeagent-sdk/package/
third_party/homeagent-sdk/scripts/
third_party/homeagent-sdk/.gitignore
third_party/homeagent-sdk/README*
third_party/homeagent-sdk/example/
.codegraph/
# codegraph 本地索引配置(含嵌套 SDK 仓放行,仅本地生效)
codegraph.json
# 运行时产物(不提交)
#
# ⚠️ 这些必须带前导斜杠。不带斜杠的模式(如 `memory/`)会匹配**任意层级**的
# 同名目录,把 internal/memory/、internal/knowledge/、deploy/scripts/ 一起吞掉
# ——24 + 3 + 1 个已跟踪源码文件曾因此落在 ignore 规则下,只靠「已跟踪
# 文件不受 .gitignore 影响」这条 git 规则兜着,新增文件会默默不入库。
/adapters/
/knowledge/
/memory/
# 注:/scripts/ **不**忽略。它是作者维护的工具目录(模型导出、侧车、部署校验),
# 不是运行期产物deploy/systemd/embed-sidecar.service 直接引用
# scripts/embed_sidecar.py忽略它会让那份 unit 在别人的机器上指向不存在的文件。
# 只忽略其中的缓存。
/scripts/__pycache__/
__pycache__/
terminal_locked_log.txt
dist/
.pi-glla/
.omo/
.pi/
# HarmonyOS 构建工具链缓存HVIGOR_USER_HOME / ohpm 生成,非源码)
.hvigor-home/
.npm-cache/
.ohpm/