mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-10-03 07:43:58 +00:00
feat(shm): Cleaner 迁移到 SharedRef(§13.4)
- CleanerInvokeParams/Result 的 Text 改为 TextRef SharedRef - cleanerProxy: 写 text 到 arena,传 SharedRef,读结果 SharedRef - 插件侧 cleaner.invoke: 从 SharedRef 读 input,清洗后写回 arena 返回 TextRef - NewHost(): 分配空间含 arena(256KB)
This commit is contained in:
@ -213,14 +213,15 @@ type ToolInvokeResult struct {
|
||||
|
||||
// CleanerInvokeParams / CleanerInvokeResult:跨进程计算层清洗。
|
||||
// Scope 取 tool / input / output,Name 是工具名或通道名。
|
||||
// TextRef 指向共享内存 arena 中的实际文本数据。
|
||||
type CleanerInvokeParams struct {
|
||||
Scope string `json:"scope"`
|
||||
Name string `json:"name"`
|
||||
Text string `json:"text"`
|
||||
Scope string `json:"scope"`
|
||||
Name string `json:"name"`
|
||||
TextRef SharedRef `json:"text_ref"`
|
||||
}
|
||||
|
||||
type CleanerInvokeResult struct {
|
||||
Text string `json:"text"`
|
||||
TextRef SharedRef `json:"text_ref"`
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user