mcp/pkg
Snider e73deea84b fix(mcp/brain/tools): cap org field at 128 runes (parity with PHP)
brainRemember, brainRecall, and brainList now validate the org field
against a 128-rune length cap before forwarding to the upstream Brain
service. Matches PHP-side maxLength=128 in BrainService — closes the
Go→PHP drift Cerberus #1006 flagged. coreerr.E typed error returned
on violation.

Note: Codex preflight checked project, agent_id, type — PHP schema
only exposes maxLength for org, so caps weren't added for the other
fields. If those need bounds, file separate tickets.

Tests cover: empty org accepted, "core" accepted, exactly 128 runes
accepted (boundary), 129 rejected on remember/recall/list.

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=1006
2026-04-25 18:50:06 +01:00
..
mcp fix(mcp/brain/tools): cap org field at 128 runes (parity with PHP) 2026-04-25 18:50:06 +01:00