feat(mcp): books.start v2 and the agent's self-report (P5)
Agent reason: the first call of a session should say who is asking, what is
waiting and what to do, in under 8 KiB, from the same lists the viewer
draws. books.start now carries book.id and book.url (the book's path on the
server, never a path on a disk), you {principal, kind, scopes, client_id},
drafts {building, awaiting_evidence}, reconciliation {tracked,
never_reconciled, behind}, backup {last_at, through_seq, stale}, the
prompts, and needs_attention (the twelve most urgent items, problems first,
with every item counted by kind), beside next_steps now in the envelope's
shape (tool or prompt, why, required; attention problems are required). A
new book is told to run the onboard prompt first, then to record the
company's facts and set up the chart; an active one is offered a draft
entry. The tool carries _meta anthropic/alwaysLoad, so a client that defers
tools loads it up front. The size fit shortens attention items and waiting
drafts after the convention summaries and before the lists, as before.
agent {model, reasoning_effort, harness} is accepted and written to the
call's access record (the access log shows it as agent), self-reported and
never checked, and used for nothing else: not in the answer, not in any
decision. Who asked is the request's alone: it is cleared when the request
ends, so a later resource read on the same thread cannot see it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
This commit is contained in:
1 parent
996c5f40f4
commit
453abb62ea
7 files changed
+459
-25
No files matched your search
@@ -9,6 +9,20 @@
|
||||
use super::*;
|
||||
use crate::server::test_support::*;
|
||||
|
||||
/// Plan 4.2 (P5 step 2): `books.start` is loaded up front by clients that
|
||||
/// defer tools, and no other tool asks for that.
|
||||
#[test]
|
||||
fn books_start_is_always_loaded() {
|
||||
for tool in BooksServer::tool_router().list_all() {
|
||||
let always = tool
|
||||
.meta
|
||||
.as_ref()
|
||||
.and_then(|m| m.0.get("anthropic/alwaysLoad"))
|
||||
.and_then(serde_json::Value::as_bool);
|
||||
assert_eq!(always == Some(true), tool.name == "books.start", "{}", tool.name);
|
||||
}
|
||||
}
|
||||
|
||||
/// An upload's limit, 25 MiB exactly (plan 4.7); nothing comes inline
|
||||
/// (D-46).
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user