Only memory comes from the server's /mcp; notes, knowledge and skills stay local

Harness spec 3.0.0 (acp.md *Memory*): memory records are the server's for the
device as for a chat; everything else in the library is the device's own.

- `library: lembas` (the default when the login's token has the `memory`
  scope, or the older `library`) adds the server's /mcp with its `memory`
  tool alone, in place of this machine's memory tool; notes_*, knowledge_*
  and skill_* are always this machine's. No prompts, resources or
  instructions are taken from it.
- The memory in the prompt is the server's: the resource lembas://memory,
  read as a session starts (McpManager.readResource) and kept for it — put in
  while nothing has been sent, so the prompt never changes under a session.
- A session the client opened (session/new, or opened from the store) sends
  its id as `_meta.lembas.scope` on every memory call and on the resource
  read (App.setScope); a session of the device's own sends none.
- An instance's `library` context (its knowledge bases) is no longer read:
  the knowledge block names this machine's bases only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Opus 5.5 committed 2026-10-27 21:07:37 +00:00
1 parent 6d5a25cdad
commit a73adc01f0
10 files changed
+134 -93

No files matched your search

+4 -3
View File
@@ -332,7 +332,7 @@ test("show (spec 3.0.0): offered only to a client that shows files; the file goe
expect(fake.requests[2].tools.map((t: any) => t.function.name)).not.toContain("show")
})
test("the context reaches the prompt: the instance's instructions, its personalization, the library's scope, prototypes", async () => {
test("the context reaches the prompt: the instance's instructions, its personalization, prototypes; not its knowledge bases", async () => {
fake = fakeProvider([{ chunks: [delta({ content: "one" })] }, { chunks: [delta({ content: "two" })] }, { chunks: [delta({ content: "three" })] }])
config(fake.url, "personality: concise\ninstructions: local words\n")
const root = project()
@@ -356,8 +356,9 @@ test("the context reaches the prompt: the instance's instructions, its personali
expect(system()).toContain("prototype-chat")
expect(system()).toContain("The page may load nothing from the network.")
expect(system()).toContain("It is saved as a file you can open, and the LLeMbas web UI renders it live.")
// The library's scope is named only where its tools are offered (none here: no local base, no
// instance library) — nothing unfilled reaches the model either way.
// The instance's knowledge bases are not the device's (spec 3.0.0): an older client's `library`
// names nothing to the model — nothing unfilled reaches it either.
expect(system()).not.toContain("Manuals")
expect(system()).not.toContain("{{")
// A later prompt replaces the context: personalization back to the device's, nothing from the instance.
await c.request("session/prompt", { sessionId: s.sessionId, prompt: [{ type: "text", text: "again" }], _meta: { lembas: { turnId: "T2", system_prompt: "", personalization: null, prototypes: { offered: false, sources: "" } } } })