The system prompt is made once per session (start, compaction, model switch), kept in session_meta and resent byte for byte; it holds no date. What changes mid-session -- the date, a mode the person chose, a plan or memory or instruction file they edited, a personality, MCP instructions that arrived later -- is a <session-note> on the next user message, stored with it. The tool list is fixed for the session: plan_submit is always offered and answers unavailable outside plan mode, the wrap-up keeps the tools and runs no call, a withdrawn tool stays listed and answers its refusal; the first request waits up to mcp_wait_ms for MCP servers. Compaction asks for its summary as the next turn of the same conversation. Cached input tokens are parsed (incl. llama.cpp timings), stored per request and shown in /context. Spec: context.md §7/§10, loop.json context.note (+ plan_ended, plan_own, personal, empty, mcp_wait_ms), modes.json plan.refused, compact.md without the transcript heading. Conformance area prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
36 files changed
+1533
-169
No files matched your search
@@ -82,8 +82,8 @@ test("memory is the server's; notes, knowledge and skills stay this machine's",
|
||||
// The entries for the prompt: read from the resource as the session started.
|
||||
for (let i = 0; i < 50 && !lembas.calls.some((c) => c.uri); i++) await Bun.sleep(10)
|
||||
expect(lembas.calls.find((c) => c.uri)).toEqual({ auth: "Bearer lmb_lib", uri: "lembas://memory" })
|
||||
for (let i = 0; i < 50 && !app.engine.o.system("manual", app.engine.model).includes("Prefers tabs."); i++) await Bun.sleep(10)
|
||||
expect(app.engine.o.system("manual", app.engine.model)).toContain("MEMORY (the account's)\nPrefers tabs.")
|
||||
for (let i = 0; i < 50 && !app.engine.compose("manual").includes("Prefers tabs."); i++) await Bun.sleep(10)
|
||||
expect(app.engine.compose("manual")).toContain("MEMORY (the account's)\nPrefers tabs.")
|
||||
await app.close()
|
||||
})
|
||||
|
||||
@@ -106,7 +106,7 @@ test("a session the client opened sends its id on every memory call and on the r
|
||||
for (let i = 0; i < 50 && !lembas.calls.some((c) => c.uri && c.meta); i++) await Bun.sleep(10)
|
||||
expect(lembas.calls.find((c) => c.uri && c.meta)).toEqual({ auth: "Bearer lmb_lib", uri: "lembas://memory", meta: { scope: app.engine.sessionId } })
|
||||
// Knowledge is this machine's: nothing the server holds is named to the model.
|
||||
expect(app.engine.o.system("manual", app.engine.model)).not.toContain("Knowledge searches here cover only")
|
||||
expect(app.engine.compose("manual")).not.toContain("Knowledge searches here cover only")
|
||||
})
|
||||
|
||||
test("without a login it says so and keeps this machine's memory", () => {
|
||||
|
||||
Reference in new issue
Block a user