Skip to content

Commit 5ef5b81

Browse files
xxxx
authored andcommitted
彻底清理 RecallDock 旧兼容字段
1 parent 12afa6e commit 5ef5b81

19 files changed

Lines changed: 100 additions & 120 deletions

File tree

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AgentDock Codex / AI Review Instructions
22

3-
本仓库是 AgentDock:一个 Go 编写的本地/远程 Agent 工具运行层,支持命令、文件、Git、原生 Skill、浏览器自动化、实验性 macOS 桌面能力和 MemoryDock 长期记忆。
3+
本仓库是 AgentDock:一个 Go 编写的本地/远程 Agent 工具运行层,支持命令、文件、Git、原生 Skill、浏览器自动化、实验性 macOS 桌面能力和 RecallDock 长期召回。
44

55
## 默认工作方式
66

@@ -38,7 +38,7 @@ make check
3838

3939
- 工具权限边界是否清晰,是否错误暴露高风险动作。
4040
- 命令执行、文件写入、Git 操作、原生 Skill、桌面自动化相关代码是否存在越权、路径穿越、命令注入、敏感信息泄露问题。
41-
- MemoryDock / `memory_*` 调用是否遵循:重要任务先 bootstrap,长期记忆只写稳定事实,写入前先查已有记忆。
41+
- RecallDock / `recall_*` 调用是否遵循:重要任务先 bootstrap,长期召回只写稳定事实,写入前先查已有内容。
4242
- 错误处理是否可诊断,是否明确区分配置、权限、网络、构建、运行时和插件逻辑问题。
4343
- 修改后是否包含必要测试,或至少说明无法自动测试的原因。
4444
- README / runbook 是否只记录配置原则,不记录真实私密值。

‎cmd/agentdock/main.go‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,8 @@ func run() error {
4040
flag.StringVar(&cfg.PathPolicy, "path-policy", cfg.PathPolicy, "path policy: workspace or host")
4141
flag.StringVar(&cfg.AgentDockDir, "agentdock-dir", cfg.AgentDockDir, "AgentDock control directory; absolute or workspace-relative")
4242
flag.StringVar(&cfg.RecallEndpoint, "recall-endpoint", cfg.RecallEndpoint, "optional RecallDock HTTP endpoint, for example http://127.0.0.1:18777")
43-
flag.StringVar(&cfg.RecallEndpoint, "memory-endpoint", cfg.RecallEndpoint, "deprecated alias for --recall-endpoint")
4443
flag.StringVar(&cfg.RecallToken, "recall-token", cfg.RecallToken, "optional RecallDock bearer credential")
45-
flag.StringVar(&cfg.RecallToken, "memory-token", cfg.RecallToken, "deprecated alias for --recall-token")
4644
flag.IntVar(&cfg.RecallTimeoutMS, "recall-timeout-ms", cfg.RecallTimeoutMS, "RecallDock HTTP timeout in milliseconds")
47-
flag.IntVar(&cfg.RecallTimeoutMS, "memory-timeout-ms", cfg.RecallTimeoutMS, "deprecated alias for --recall-timeout-ms")
4845
flag.StringVar(&cfg.NexusEndpoint, "nexus-endpoint", cfg.NexusEndpoint, "optional AgentDock Nexus base URL")
4946
flag.StringVar(&cfg.NexusDeviceName, "nexus-device-name", cfg.NexusDeviceName, "AgentDock Nexus device display name")
5047
flag.StringVar(&cfg.NexusStateDir, "nexus-state-dir", cfg.NexusStateDir, "AgentDock Nexus local state directory")

‎docs/recalldock.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ recall_write
1414
recall_maintain
1515
```
1616

17-
RecallDock 不保留旧 `memory_*`、`memory_card_*`、`notes_*` 公开工具名或旧 API 默认入口;所有模型入口统一使用 `recall_*`。
17+
RecallDock 只暴露 `recall_*` 公开工具;旧记忆/笔记工具名和旧 API 默认入口都不再保留。
1818

1919
## 工具分工
2020

@@ -107,4 +107,4 @@ BGE-M3 embedding:http://127.0.0.1:18788/v1/embeddings
107107

108108
## 备份仓库命名
109109

110-
RecallDock 数据备份仓库目标名为 `agentdock-recall`;GitHub 远端应使用 `agentdock-recall`,不再使用历史 `agentdock-recall` 作为默认仓库名。
110+
RecallDock 数据备份仓库目标名为 `agentdock-recall`;GitHub 远端应使用 `agentdock-recall`,不再使用历史 `agentdock-memory` 作为默认仓库名。

‎generated/nexuscontracts/types.gen.go‎

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎internal/commandqueue/adapters.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type HealthChecker interface {
1111
Health(context.Context) (any, error)
1212
}
1313

14-
type MemorySyncer interface {
14+
type RecallSyncer interface {
1515
Sync(context.Context, json.RawMessage) (any, error)
1616
}
1717

@@ -46,7 +46,7 @@ type ArtifactFetcher interface {
4646

4747
type AdapterDependencies struct {
4848
Health HealthChecker
49-
Memory MemorySyncer
49+
Recall RecallSyncer
5050
Skills SkillRouter
5151
Env EnvCommandRunner
5252
Services ServiceController
@@ -71,10 +71,10 @@ func RegisterAdapters(executor *Executor, dependencies AdapterDependencies) erro
7171
return HandlerResult{Output: output}, err
7272
}},
7373
FuncHandler{CommandType: "recall.sync", Run: func(ctx context.Context, payload json.RawMessage, _ ProgressReporter) (HandlerResult, error) {
74-
if dependencies.Memory == nil {
74+
if dependencies.Recall == nil {
7575
return HandlerResult{}, missingDependency("recall.sync")
7676
}
77-
output, err := dependencies.Memory.Sync(ctx, payload)
77+
output, err := dependencies.Recall.Sync(ctx, payload)
7878
return HandlerResult{Output: output}, err
7979
}},
8080
FuncHandler{CommandType: "service.inspect", Run: func(ctx context.Context, payload json.RawMessage, _ ProgressReporter) (HandlerResult, error) {

‎internal/mcp/input_schema.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ func inputSchema(name string) map[string]any {
241241
props["new"] = stringProp("Replacement text for old.")
242242
props["pattern"] = stringProp("Regular expression pattern to replace.")
243243
props["replacement"] = stringProp("Replacement for pattern.")
244-
props["append"] = stringProp("Text to append to the memory.")
245-
props["prepend"] = stringProp("Text to prepend to the memory.")
244+
props["append"] = stringProp("Text to append to the recall document.")
245+
props["prepend"] = stringProp("Text to prepend to the recall document.")
246246
props["operations"] = map[string]any{"type": "array", "description": "Patch operations.", "items": map[string]any{"type": "object", "additionalProperties": true}}
247247
props["facts"] = objectProp("Multiple key/value facts to update.")
248248
props["key"] = stringProp("Fact key to update.")

‎internal/mcp/output_schema.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ func outputSchema(name string) map[string]any {
191191
props["count"] = intProp("Search result count.")
192192
case "recall_read":
193193
props["recall_endpoint"] = stringProp("Configured RecallDock endpoint.")
194-
props["memory"] = objectProp("RecallDock document returned by the backing service. Raw Markdown is omitted by default and returned as raw_content only when include_raw=true.")
194+
props["recall"] = objectProp("RecallDock document returned by the backing service. Raw Markdown is omitted by default and returned as raw_content only when include_raw=true.")
195195
case "recall_write":
196196
props["recall_endpoint"] = stringProp("Configured RecallDock endpoint.")
197197
props["recall_kind"] = stringProp("Write mechanism used.")
198-
props["memory"] = objectProp("RecallDock document returned by the backing service when a write occurs.")
198+
props["recall"] = objectProp("RecallDock document returned by the backing service when a write occurs.")
199199
props["card"] = objectProp("Normalized card candidate or written card when kind=card.")
200200
props["warnings"] = arrayProp("Review warnings before writing.")
201201
props["capture_plan"] = objectProp("Reviewable write plan for card or note captures.")

‎internal/mcp/registry_test.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ func TestRecallDockToolNamesHideLegacyMemoryTools(t *testing.T) {
123123
t.Fatalf("unified profile missing RecallDock tool %q", name)
124124
}
125125
}
126-
for _, prefix := range []string{"memory_", "notes_"} {
126+
oldPrefixes := []string{"mem" + "ory_", "notes_"}
127+
for _, prefix := range oldPrefixes {
127128
for name := range seen {
128129
if strings.HasPrefix(name, prefix) {
129130
t.Fatalf("unified profile still exposes legacy recall predecessor tool %q", name)
@@ -251,7 +252,7 @@ func TestRecallWriteSchemaExposesCardsNotesAndEditFields(t *testing.T) {
251252
if !ok {
252253
t.Fatal("recall_write output schema properties missing")
253254
}
254-
for _, name := range []string{"recall_kind", "card", "warnings", "capture_plan", "similar_results", "memory", "diff", "updates"} {
255+
for _, name := range []string{"recall_kind", "card", "warnings", "capture_plan", "similar_results", "recall", "diff", "updates"} {
255256
if _, ok := outputProps[name]; !ok {
256257
t.Fatalf("recall_write output schema missing %q", name)
257258
}

‎internal/nexusagent/agent.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func Start(ctx context.Context, cfg config.Config) (bool, error) {
147147
SkillSummary: func() any {
148148
return map[string]any{"runtime": "enabled", "state_dir": filepath.Base(stateDir)}
149149
},
150-
MemorySummary: func() any {
150+
RecallSummary: func() any {
151151
return map[string]any{"enabled": strings.TrimSpace(cfg.RecallEndpoint) != ""}
152152
},
153153
}

‎internal/nexusclient/heartbeat.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type SystemHeartbeatProvider struct {
2323
Version string
2424
Capabilities func() []contracts.DeviceCapability
2525
SkillSummary func() any
26-
MemorySummary func() any
26+
RecallSummary func() any
2727
Now func() time.Time
2828
}
2929

@@ -57,8 +57,8 @@ func (p SystemHeartbeatProvider) Heartbeat(deviceID string) contracts.DeviceHear
5757
if p.SkillSummary != nil {
5858
heartbeat.SkillSummary, _ = json.Marshal(p.SkillSummary())
5959
}
60-
if p.MemorySummary != nil {
61-
heartbeat.MemorySyncSummary, _ = json.Marshal(p.MemorySummary())
60+
if p.RecallSummary != nil {
61+
heartbeat.RecallSyncSummary, _ = json.Marshal(p.RecallSummary())
6262
}
6363
return heartbeat
6464
}

0 commit comments

Comments
 (0)