mcp/pkg/mcp
Snider e2bc724bb4 fix(mcp/brain/client): enforce 0600 on ~/.claude/brain.key
Refuse to load brain.key when its mode is more permissive than 0600 —
NewFromEnvironment carries the config error into Call() so callers
get a clear "brain.key has insecure permissions, expected 0600"
rather than a silent credential leak. Read path stats first; does not
auto-chmod (would mask the misconfiguration).

Write path uses coreio.Local.WriteMode and follows up with explicit
os.Chmod 0600, correcting any pre-existing 0644 file on next write.

Tests: write overwrites 0644 → 0600; read of 0644 fixture errors and
leaves the mode untouched.

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=998
2026-04-25 17:58:13 +01:00
..
agentic merge(mcp): reconcile origin AX-6 sweep + brainclient refactor with homelab migration + features 2026-04-25 16:08:35 +01:00
brain fix(mcp/brain/client): enforce 0600 on ~/.claude/brain.key 2026-04-25 17:58:13 +01:00
ide feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
authz.go merge(mcp): reconcile origin AX-6 sweep + brainclient refactor with homelab migration + features 2026-04-25 16:08:35 +01:00
bridge.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
bridge_test.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
integration_test.go refactor(mcp): Options{} struct + notification broadcasting + claude/channel 2026-03-21 13:51:14 +00:00
ipc.go feat(mcp): implement HandleIPCEvents ChannelPush path (RFC §5.1) 2026-04-24 21:41:40 +01:00
ipc_test.go feat(mcp): implement HandleIPCEvents ChannelPush path (RFC §5.1) 2026-04-24 21:41:40 +01:00
iter_test.go refactor(mcp): remove unused registry iterator helper 2026-04-02 07:29:59 +00:00
mcp.go merge(mcp): reconcile origin AX-6 sweep + brainclient refactor with homelab migration + features 2026-04-25 16:08:35 +01:00
mcp_test.go test(mcp): rename tests + add Bad/Ugly variants per AX-10 (#199) 2026-04-25 12:06:27 +01:00
notify.go fix(mcp): purge/annotate banned imports in pkg/mcp/notify.go (AX-6) 2026-04-24 21:24:23 +01:00
notify_test.go docs(mcp): clarify channel capability helpers 2026-04-02 18:34:15 +00:00
process_notifications.go refactor: AX compliance sweep — replace banned stdlib imports with core primitives 2026-04-14 18:02:36 +01:00
progress.go feat(mcp): batch — org scoping + agentic_watch 30min default + progressToken helper 2026-04-25 14:11:08 +01:00
progress_test.go feat(mcp): batch — org scoping + agentic_watch 30min default + progressToken helper 2026-04-25 14:11:08 +01:00
register.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
register_test.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
registry.go fix(mcp): transport addr default + progress notifications + auth timing safety 2026-04-14 18:02:36 +01:00
registry_test.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
subsystem.go refactor(mcp): record subsystem tools centrally 2026-04-02 17:11:16 +00:00
subsystem_test.go refactor(mcp): record subsystem tools centrally 2026-04-02 17:11:16 +00:00
tools_metrics.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
tools_metrics_test.go refactor(mcp): Options{} struct + notification broadcasting + claude/channel 2026-03-21 13:51:14 +00:00
tools_process.go merge(mcp): reconcile origin AX-6 sweep + brainclient refactor with homelab migration + features 2026-04-25 16:08:35 +01:00
tools_process_ci_test.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
tools_process_test.go feat(mcp): RFC §3 tools + §8 discovery alignment 2026-04-14 18:02:36 +01:00
tools_rag.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
tools_rag_ci_test.go refactor(mcp): Options{} struct + notification broadcasting + claude/channel 2026-03-21 13:51:14 +00:00
tools_rag_test.go feat(mcp): RFC §3 tools + §8 discovery alignment 2026-04-14 18:02:36 +01:00
tools_webview.go merge(mcp): reconcile origin AX-6 sweep + brainclient refactor with homelab migration + features 2026-04-25 16:08:35 +01:00
tools_webview_embed.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
tools_webview_embed_test.go feat(mcp): RFC §3 tools + §8 discovery alignment 2026-04-14 18:02:36 +01:00
tools_webview_test.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
tools_ws.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
tools_ws_client.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
tools_ws_client_test.go feat(mcp): RFC §3 tools + §8 discovery alignment 2026-04-14 18:02:36 +01:00
tools_ws_test.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
transport_e2e_test.go fix(mcp): resolve codex review findings — spelling, imports, tests, assertions 2026-03-22 02:14:33 +00:00
transport_http.go merge(mcp): reconcile origin AX-6 sweep + brainclient refactor with homelab migration + features 2026-04-25 16:08:35 +01:00
transport_http_test.go fix(mcp): allow unauthenticated HTTP transport when token is unset 2026-04-02 07:35:35 +00:00
transport_stdio.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
transport_tcp.go refactor(mcp): migrate stdlib imports to core/go primitives + upgrade go-sdk v1.5.0 2026-04-08 22:03:52 +01:00
transport_tcp_test.go fix(mcp): normalize tcp defaults and notification context 2026-04-02 13:19:24 +00:00
transport_unix.go feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold 2026-04-24 23:35:37 +01:00
transport_unix_test.go feat(mcp): auto-select unix socket transport 2026-04-02 12:56:30 +00:00