Files
hapi/shared
fdea9432a6 fix(mcp): shrink duplicated peer identity prompt strings (#2326)
SESSION_ID_PREFIX_PARAM_DESCRIPTION and PEER_IDENTITY_UUID_RULE are
embedded verbatim into multiple MCP tool schemas, so each trimmed token
is paid N times per turn. Keep the load-bearing rules (prefer full UUID
from a citation; UUID is identity; never invent titles; rename is a
non-event) and drop scaffolding examples / Copy-reference restatement.

Verified before cutting: the soup-only "agentSessionId survives hub-row
churn" clause is not on upstream/main (durable resolve is still open in
tiann/hapi#2251); PEER_IDENTITY_UUID_RULE comes from rename-proof Parent
stamps (#1922 / #175) where agents invented titles after parent rename.

AI disclosure (CONTRIBUTING.md): drafted and verified by Composer
(Cursor) running as a HAPI peer agent from the MCP context-cost audit.

via HAPI (https://hapi.run)

Co-authored-by: HAPI <noreply@hapi.run>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-09 12:03:37 +08:00
..
2026-01-03 14:43:59 +08:00