Commit graph

226 commits

Author SHA1 Message Date
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
Snider
cb62378a2b fix(mcp/agentic_watch): default 30m → 60s + per-call cap at 30m
defaultWatchTimeout reduced to 60s; new maxWatchTimeout 30m caps any
per-call WatchInput.Timeout. resolveWatchTimeout() honours the request
value (in seconds), clamps above-cap, and treats <=0 as default.

Defends against connection-pool drain from idle long-poll subscribers
whether internal-only today or future external-facing.

Tests: default = 60s, 10s honoured, 10h clamps to 30m, 0 falls back.

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=1005
2026-04-25 18:32:21 +01:00
Snider
1e3a5996fa chore(mcp/brain/client): close stale-fixed Mantis #997 — already implemented
CircuitBreaker.lock at client.go:132 already protects the half-open
check-and-set sequence at client.go:443 (read halfOpenInFlight, transition
to true) atomically. Reset writes in recordSuccess/recordFailure/recordIgnored
are also mutex-held. The race window described in the ticket doesn't exist
at the current code shape.

No code change required.

Co-authored-by: Cladius <cladius@lthn.ai>
Closes tasks.lthn.sh/view.php?id=997
2026-04-25 18:23:48 +01:00
Snider
2acf186925 fix(mcp/brain/client): retryableStatus 408+429 + honour Retry-After
retryableStatus now treats 408 (Request Timeout) and 429 (Too Many
Requests) as retryable, matching the PHP-side equivalent. Retry loop
parses Retry-After from the response (seconds form OR HTTP-date),
clamps to 60s max, treats past dates as zero delay.

Tests cover: 408 retried, 429 retried, numeric Retry-After honoured,
past-date Retry-After produces zero sleep, long Retry-After capped.

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=996
2026-04-25 18:13:07 +01:00
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
Snider
8b48b33622 merge(mcp): reconcile origin AX-6 sweep + brainclient refactor with homelab migration + features
Parent SHAs:
  origin/dev: 4420670 feat(mcp/brain): OpenBrain T1+T2 — shared client + direct/brain-seed adoption (#175 #176)
  homelab/dev: 95f8ad3 docs(security): document accepted ollama CVEs + operator runbook

Resolution strategy (29 conflicts: 26 UU + 3 AA):
- Took origin's body for every conflicting file (AX-6-clean, uses core.* helpers
  not banned stdlib; preserves the brainclient.New() refactor that landed in
  origin commit 4420670 and lifted inline HTTP code into pkg/mcp/brain/client/).
- Sed-rewrote `dappco.re/go/core/X` → `dappco.re/go/X` import paths inline so
  origin's body uses the migrated paths that homelab's go.mod declares.
- go.mod auto-merged toward homelab's NEW dep paths (dappco.re/go/{ai,api,cli,
  io,log,process,rag,webview,ws} v0.8.0-alpha.1) — correct outcome.
- Homelab's standalone-new files (cmd/openbrain-mcp/, ipc.go, tools_metrics.go,
  tools_ws_client.go, tools_webview_embed.go, etc.) preserved via git's
  non-conflicting auto-merge.

Followups (filed separately):
- Stale `replace dappco.re/go/core/process => ../go-process` directive remains
  in go.mod — pre-existing, doesn't match any current dep, will catch in
  future cleanup pass.
- Local build verification deferred: workspace-level go-proxy half-migration
  + missing go-ws entry in ~/Code/go.work block `go build ./...` from
  succeeding host-side; this merge resolved by per-file inspection.

Co-authored-by: Codex <noreply@openai.com>
2026-04-25 16:08:35 +01:00
Snider
44206708f9 feat(mcp/brain): OpenBrain T1+T2 — shared client + direct/brain-seed adoption (#175 #176)
#175 (T1/5 — shared Go HTTP client):
- pkg/mcp/brain/client/client.go: shared client with retry, circuit breaker, org propagation
- 30s default HTTP client, retry on network/5xx only, no retry on 4xx
- Minimal circuit breaker for repeated failures
- pkg/mcp/brain/client/client_test.go: httptest coverage

#176 (T2/5 — direct subsystem + binaries adopt shared client):
- pkg/mcp/brain/direct.go: refactored to delegate through *client.Client
- pkg/mcp/brain/direct_test.go: tests updated to use brainclient.New
- cmd/brain-seed/main.go: uses /v1/brain/remember via shared client with -org

Verification: go test ./pkg/mcp/brain/client/... passed; go build cmd/brain-seed passed.

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=175
Closes tasks.lthn.sh/view.php?id=176
2026-04-25 15:42:11 +01:00
Snider
2910a0d588 feat(mcp): batch — org scoping + agentic_watch 30min default + progressToken helper
Codex 5.5 batch lane processed 5 open Mantis tickets. Sandbox blocked
in-lane commits; supervisor consolidated all implemented changes here.

Tickets implemented:
- #120 — Go brain subsystem org field added: brain tools/provider/direct path now scope by org per RFC §6 (drift from #107 PHP-side closed)
- #194 — agentic_watch default timeout corrected to 30 minutes per RFC §4.2
- #195 — new pkg/mcp/progress.go shared progress helper + wired dispatch/watch/process_run progress notifications per RFC §4.1

Tickets stale-fixed: #196 (MCP Portal discovery already implemented)
Tickets deferred: #197 (TransformerIn/Out — architecture pass)

Verification:
- go test ./pkg/mcp/brain passed
- go test ./pkg/mcp/agentic passed
- go test ./pkg/mcp -run 'TestProgress|TestToolsProcess_ProcessRun|TestProcess' passed
- Full ./pkg/mcp still fails one unrelated existing test (TestBridgeToAPI_Good_DescribableGroup expected 34, got 33 — predates this batch)

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=120
Closes tasks.lthn.sh/view.php?id=194
Closes tasks.lthn.sh/view.php?id=195
2026-04-25 14:11:08 +01:00
Snider
494e05ada4 test(mcp): rename tests + add Bad/Ugly variants per AX-10 (#199)
Renamed pkg/mcp/mcp_test.go tests to TestMcp_<Function>_<Good|Bad|Ugly>
convention. Added _Bad and _Ugly siblings for: New, supported languages,
language detection, medium file ops, fileExists, listDirectory,
resolveWorkspacePath.

Closes tasks.lthn.sh/view.php?id=199

Co-authored-by: Codex <noreply@openai.com>
2026-04-25 12:06:27 +01:00
Snider
b29b8b5685 fix(mcp): AX-6 sweep on pkg/mcp/authz.go + cmd/brain-seed/main.go
authz.go: removed errors/fmt/strings → coreerr.E + core.Sprintf + core.*
helpers. brain-seed/main.go: removed bytes/fmt/strings → core.NewBuffer +
core.Print/Println + core.* helpers.

Co-authored-by: Codex <noreply@openai.com>
2026-04-25 11:18:36 +01:00
Snider
53bd7478a7 fix(mcp): AX-6 sweep on pkg/mcp/tools_webview.go
Annotated bytes (retained for bytes.NewReader image.Decode boundary).
Replaced bytes.Buffer with core.NewBuffer, sync.Mutex with core.Mutex.

Co-authored-by: Codex <noreply@openai.com>
2026-04-25 10:29:02 +01:00
Snider
9fd2185a86 fix(mcp): AX-6 banned-import purge + annotations in pkg/mcp/transport_http.go
Removed strings, replaced strings.TrimSpace with core.Trim. Annotated
encoding/json (HTTP boundary marshaling), net (dial primitives), net/http
(HTTP transport) as AX-6 structural.

Co-authored-by: Codex <noreply@openai.com>
2026-04-25 10:24:17 +01:00
Snider
95f8ad387c docs(security): document accepted ollama CVEs + operator runbook
Closes Mantis #323.

All 9 CVEs filed in #323 (govulncheck against the github.com/ollama/ollama
indirect dep) are unfixed upstream as of 2026-04-25. We are on v0.18.1
indirect via go-rag; ollama upstream is at v0.21.2 (3 days old). Pin-bump
resolves none of them.

Documents:
- CVE-by-CVE reachability assessment in our call graph
- 7 server-side CVEs (GZIP DoS, OOB, divzero, nullderef, server DoS) →
  unreachable; we are a client, not a server
- 1 conditional (GO-2025-3824 token exposure) → watch flag, reachable IF we
  ever add auth tokens
- 1 operator-side (GO-2025-4251 missing auth) → operator runbook required

Operator runbook covers:
- Network-level isolation (localhost-only or private-network binding)
- Reverse-proxy + auth for shared deployments
- CI-side govulncheck filter scoped to just these 9 CVE IDs

Surface in use: 3 symbols only (api.NewClient, api.Client, api.EmbedRequest)
imported from one file (go-rag/ollama.go). Vendor-fork would be
over-engineering for this scope; pin-bump is unavailable.

Argus filed; athena reviewed + documented.

Co-Authored-By: Argus <argus@lthn.ai>
Co-Authored-By: Athena <athena@lthn.ai>
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-25 01:40:43 +01:00
Snider
b2ed228b3f feat(ax-10): bring mcp to v0.8.0-alpha.1 + CLI test scaffold
- Migrate go.mod direct + indirect deps from dappco.re/go/core/X (pre-migration paths) to dappco.re/go/X at v0.8.0-alpha.1
- Update all Go source imports across 49 files: dappco.re/go/core/{ai,api,cli,io,log,process,rag,webview,ws,i18n,inference} -> dappco.re/go/{ai,api,cli,io,log,process,rag,webview,ws,i18n,inference}
- Add tests/cli/mcp/Taskfile.yaml AX-10 scaffold (build / vet / test under default deps), per RFC-CORE-008-AGENT-EXPERIENCE.md §10
- mcp is library + 4 binaries (brain-seed, core-mcp, mcpcmd, openbrain-mcp); the build target validates all of them

Closes tasks.lthn.sh/view.php?id=198

Co-Authored-By: Athena <athena@lthn.ai>
2026-04-24 23:35:37 +01:00
Codex
903aba4695 feat(mcp): implement HandleIPCEvents ChannelPush path (RFC §5.1)
Added handleChannelPushIPC in new pkg/mcp/ipc.go with Core-style
validation (rejects empty channel). Wired through from
register.go's HandleIPCEvents switch — ChannelPush now routes to the
new handler. Added AX-10 Good/Bad/Ugly tests in pkg/mcp/ipc_test.go
covering forwarding, empty-channel error, nil data payload.

Pre-existing unrelated failure TestBridgeToAPI_Good_DescribableGroup
(expects 34 descriptions, gets 33) is out of this ticket's scope.

Closes tasks.lthn.sh/view.php?id=193

Co-authored-by: Codex <noreply@openai.com>
2026-04-24 21:41:40 +01:00
Codex
96fd169239 fix(mcp): rename tests to AX-10 TestFilename_Function_{Good,Bad,Ugly} (AX-10)
Refactored pkg/mcp/mcp_test.go to match AX-10 naming: every test
function now ends in _Good (happy path), _Bad (error path / expected
failure), or _Ugly (edge case). Added missing variants across covered
groups: New, GetSupportedLanguages, DetectLanguageFromPath, Medium,
FileExists, ListDirectory, ResolveWorkspacePath.

Closes tasks.lthn.sh/view.php?id=199

Co-authored-by: Codex <noreply@openai.com>
2026-04-24 21:31:46 +01:00
Codex
633f295244 fix(mcp): purge banned stdlib imports from pkg/mcp/mcp.go (AX-6)
Removed banned os import; replaced:
- default cwd lookup → core.Env("DIR_CWD")
- os.DirEntry / os.ErrNotExist → annotated io/fs usage
- cleaned comment examples so broad banned-name grep is also clean

Verification: `grep -nE '"(fmt|os|errors|strings|encoding/json)"' pkg/mcp/mcp.go` empty. go vet passes with module drift (pre-existing).

Closes tasks.lthn.sh/view.php?id=191

Co-authored-by: Codex <noreply@openai.com>
2026-04-24 21:27:42 +01:00
Codex
09f786fb80 fix(mcp): purge/annotate banned imports in pkg/mcp/notify.go (AX-6)
fmt, errors, strings, encoding/json swapped to core.* equivalents.
os retained with `// Note:` annotation — stdout stdio writer has no
core.Fs/core.Env equivalent at this layer.

Closes tasks.lthn.sh/view.php?id=192

Co-authored-by: Codex <noreply@openai.com>
2026-04-24 21:24:23 +01:00
Snider
f26ae14222 feat(mcp): add cmd/openbrain-mcp stdio wrapper for Claude Code
Thin Go wrapper mounting pkg/mcp/brain tools onto Service.ServeStdio().
Proxies to the PHP BrainService via --brain-url so any Claude Code
session gains OpenBrain recall/remember via `claude mcp add openbrain`.

Closes tasks.lthn.sh/view.php?id=76
Co-authored-by: Codex <noreply@openai.com>

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-23 15:22:13 +01:00
Snider
62c1949458 fix(mcp): rewrite mcpcmd for new core/cli Command API + correct bridge test
The mcpcmd package was using the removed Cobra-style cli.Command API
(Use/Short/Long/RunE/StringFlag/AddCommand). Rewrites it to the current
core.Command{Description, Action, Flags} path-routed pattern so the
core-mcp binary compiles again. Registers both "mcp" and "mcp/serve"
for parity with the existing OnStartup service-mode flow.

Fixes the bridge DescribableGroup test that expected len == svc.Tools()
but ToolBridge.Describe prepends the GET tool-listing entry, so the
correct expectation is len + 1.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 18:02:36 +01:00
Snider
e5caa8d32e feat(mcp): RFC §3 tools + §8 discovery alignment
New tools (RFC §3):
- webview_render / webview_update: embedded UI HTML + state broadcast
  via webview.render / webview.update channels with merge-or-replace
- ws_connect / ws_send / ws_close: outbound WebSocket client tools
  with stable ws-<hex> connection IDs
- process_run: blocking command executor returning ID/exit/output
- rag_search / rag_index: aliases for rag_query / rag_ingest per spec
- rag_retrieve: fetch chunks for a source, ordered by chunk index
- ide_dashboard_state / ide_dashboard_update: merge-or-replace state
  with activity feed entries and dashboard.state.updated broadcast
- agentic_issue_dispatch: spec-aligned name for agentic_dispatch_issue

Discovery (RFC §8.2):
- transport_http.go: /.well-known/mcp-servers.json advertises both
  core-agent and core-mcp with semantic use_when hints

Tool count: 25 → 33. Good/Bad/Ugly coverage added for every new tool.

Pre-existing cmd/mcpcmd Cobra-style build error flagged but untouched
— same cmd vs core.Command migration pattern seen in cmd/api and
cmd/build (which were migrated earlier this session).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 18:02:36 +01:00
Snider
982a3b4b00 fix(mcp): transport addr default + progress notifications + auth timing safety
- transport_http.go: addr "" now defaults to 127.0.0.1:9101 per RFC
- pkg/mcp/agentic/dispatch.go: emits NotifyProgress milestones during
  validation, workspace prep, queue/slot, spawn, start completion
- pkg/mcp/agentic/watch.go: emits NotifyProgress per watched workspace
  completion/failure with running totals
- pkg/mcp/authz.go: restore crypto/subtle for constant-time token
  comparison (timing-attack resistance)
- pkg/mcp/registry.go: related touch-up for the auth path

Spark-medium pass. Unused net/http import cleaned after verify.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 18:02:36 +01:00
Snider
91803e32df refactor: AX compliance sweep — replace banned stdlib imports with core primitives
Replaced fmt, strings, sort, os, io, sync, encoding/json, path/filepath,
errors, log, reflect with core.Sprintf, core.E, core.Contains, core.Trim,
core.Split, core.Join, core.JoinPath, slices.Sort, c.Fs(), c.Lock(),
core.JSONMarshal, core.ReadAll and other CoreGO v0.8.0 primitives.

Framework boundary exceptions preserved where stdlib types are required
by external interfaces (Gin, net/http, CGo, Wails, bubbletea).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 18:02:36 +01:00
Snider
65b686283f feat(mcp): export NotifySession for raw JSON-RPC notifications
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 18:02:36 +01:00
Snider
cbab302661 refactor(mcp): migrate stdlib imports to core/go primitives + upgrade go-sdk v1.5.0
- Replace fmt/errors/strings/path/filepath with core.Sprintf, core.E,
  core.Contains, core.Path etc. across 16 files
- Remove 'errors' import from bridge.go (core.Is/core.As)
- Remove 'fmt' from transport_tcp.go, ide.go (core.Print, inline interface)
- Remove 'strings' from notify.go, transport_http.go, tools_webview.go,
  process_notifications.go (core.Trim, core.HasPrefix, core.Lower etc.)
- Upgrade go-sdk from v1.4.1 to v1.5.0
- Keep encoding/json for json.NewDecoder/MarshalIndent (no core equivalent)
- Keep os/exec in agentic subsystem (needs go-process Action wiring)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 18:02:36 +01:00
Snider
91297d733d fix(mcp): rewrite mcpcmd for new core/cli Command API + correct bridge test
The mcpcmd package was using the removed Cobra-style cli.Command API
(Use/Short/Long/RunE/StringFlag/AddCommand). Rewrites it to the current
core.Command{Description, Action, Flags} path-routed pattern so the
core-mcp binary compiles again. Registers both "mcp" and "mcp/serve"
for parity with the existing OnStartup service-mode flow.

Fixes the bridge DescribableGroup test that expected len == svc.Tools()
but ToolBridge.Describe prepends the GET tool-listing entry, so the
correct expectation is len + 1.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 18:01:17 +01:00
Snider
ca07b6cd62 feat(mcp): RFC §3 tools + §8 discovery alignment
New tools (RFC §3):
- webview_render / webview_update: embedded UI HTML + state broadcast
  via webview.render / webview.update channels with merge-or-replace
- ws_connect / ws_send / ws_close: outbound WebSocket client tools
  with stable ws-<hex> connection IDs
- process_run: blocking command executor returning ID/exit/output
- rag_search / rag_index: aliases for rag_query / rag_ingest per spec
- rag_retrieve: fetch chunks for a source, ordered by chunk index
- ide_dashboard_state / ide_dashboard_update: merge-or-replace state
  with activity feed entries and dashboard.state.updated broadcast
- agentic_issue_dispatch: spec-aligned name for agentic_dispatch_issue

Discovery (RFC §8.2):
- transport_http.go: /.well-known/mcp-servers.json advertises both
  core-agent and core-mcp with semantic use_when hints

Tool count: 25 → 33. Good/Bad/Ugly coverage added for every new tool.

Pre-existing cmd/mcpcmd Cobra-style build error flagged but untouched
— same cmd vs core.Command migration pattern seen in cmd/api and
cmd/build (which were migrated earlier this session).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 15:55:15 +01:00
Snider
92727025e7 fix(mcp): transport addr default + progress notifications + auth timing safety
- transport_http.go: addr "" now defaults to 127.0.0.1:9101 per RFC
- pkg/mcp/agentic/dispatch.go: emits NotifyProgress milestones during
  validation, workspace prep, queue/slot, spawn, start completion
- pkg/mcp/agentic/watch.go: emits NotifyProgress per watched workspace
  completion/failure with running totals
- pkg/mcp/authz.go: restore crypto/subtle for constant-time token
  comparison (timing-attack resistance)
- pkg/mcp/registry.go: related touch-up for the auth path

Spark-medium pass. Unused net/http import cleaned after verify.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 14:37:52 +01:00
Snider
d8144fde09 refactor: AX compliance sweep — replace banned stdlib imports with core primitives
Replaced fmt, strings, sort, os, io, sync, encoding/json, path/filepath,
errors, log, reflect with core.Sprintf, core.E, core.Contains, core.Trim,
core.Split, core.Join, core.JoinPath, slices.Sort, c.Fs(), c.Lock(),
core.JSONMarshal, core.ReadAll and other CoreGO v0.8.0 primitives.

Framework boundary exceptions preserved where stdlib types are required
by external interfaces (Gin, net/http, CGo, Wails, bubbletea).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-13 09:32:00 +01:00
Snider
f9c5362151 feat(mcp): export NotifySession for raw JSON-RPC notifications
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-09 11:07:28 +01:00
Snider
8f3afaa42a refactor(mcp): migrate stdlib imports to core/go primitives + upgrade go-sdk v1.5.0
- Replace fmt/errors/strings/path/filepath with core.Sprintf, core.E,
  core.Contains, core.Path etc. across 16 files
- Remove 'errors' import from bridge.go (core.Is/core.As)
- Remove 'fmt' from transport_tcp.go, ide.go (core.Print, inline interface)
- Remove 'strings' from notify.go, transport_http.go, tools_webview.go,
  process_notifications.go (core.Trim, core.HasPrefix, core.Lower etc.)
- Upgrade go-sdk from v1.4.1 to v1.5.0
- Keep encoding/json for json.NewDecoder/MarshalIndent (no core equivalent)
- Keep os/exec in agentic subsystem (needs go-process Action wiring)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-08 22:03:52 +01:00
Snider
7fde0c1c21 refactor(mcp): migrate stdlib imports to core/go primitives + upgrade go-sdk v1.5.0
- Replace fmt/errors/strings/path/filepath with core.Sprintf, core.E,
  core.Contains, core.Path etc. across 16 files
- Remove 'errors' import from bridge.go (core.Is/core.As)
- Remove 'fmt' from transport_tcp.go, ide.go (core.Print, inline interface)
- Remove 'strings' from notify.go, transport_http.go, tools_webview.go,
  process_notifications.go (core.Trim, core.HasPrefix, core.Lower etc.)
- Upgrade go-sdk from v1.4.1 to v1.5.0
- Keep encoding/json for json.NewDecoder/MarshalIndent (no core equivalent)
- Keep os/exec in agentic subsystem (needs go-process Action wiring)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-08 22:00:20 +01:00
Snider
f8f137b465 fix(mcp): disable ListChanged to prevent premature stdio notifications
The go-sdk fires notifications/tools/list_changed and
notifications/resources/list_changed with 10ms delay after AddTool/AddResource.
Since all registration happens before server.Run(), these hit stdout
before the client sends initialize, breaking the MCP handshake.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-08 20:50:46 +01:00
Snider
429f1c2b6c Revert "perf(mcp): gate extended built-in tools behind CORE_MCP_FULL"
This reverts commit 9f7dd84d4a.
2026-04-08 20:47:34 +01:00
Snider
9f7dd84d4a perf(mcp): gate extended built-in tools behind CORE_MCP_FULL
Metrics, RAG, and webview tools only register when CORE_MCP_FULL=1.
Process and WS tools always register (used by factory).
Reduces default tool count by 15.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-08 19:17:32 +01:00
Snider
9bd3084da4 fix(mcp): bridge test body + process dep resolution
- Fix TestBridgeToAPI_Good_EndToEnd: POST with empty JSON body instead of nil
- Add local replace for go-process to resolve API drift with core v0.8.0

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-08 16:39:28 +01:00
Snider
20e4a381cf fix: migrate module paths from forge.lthn.ai to dappco.re
Update all import paths and version pins:
- forge.lthn.ai/core/go-* → dappco.re/go/core/*
- forge.lthn.ai/core/api → dappco.re/go/core/api
- forge.lthn.ai/core/cli → dappco.re/go/core/cli
- Updated: api v0.3.0, cli v0.5.2, ai v0.2.2, io v0.4.1, log v0.1.2
- Updated: process v0.5.0, rag v0.1.13, ws v0.4.0, webview v0.2.1
- Updated: i18n v0.2.3, inference v0.3.0, scm v0.6.1

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-07 12:59:22 +01:00
Snider
cd305904e5 fix: migrate module paths from forge.lthn.ai to dappco.re
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 16:21:14 +01:00
Virgil
0b63f9cd22 fix(mcp): harden tool handlers 2026-04-02 18:50:20 +00:00
Virgil
ab1aa0cad0 refactor(mcp): align REST bridge errors with AX 2026-04-02 18:46:08 +00:00
Virgil
c1d3db1ad3 fix(mcp): ensure CLI shutdown cleanup 2026-04-02 18:42:03 +00:00
Virgil
1b3d102684 refactor(agentic): canonicalize PR input DTO 2026-04-02 18:38:03 +00:00
Virgil
23063599df docs(mcp): clarify channel capability helpers 2026-04-02 18:34:15 +00:00
Virgil
476a699b96 fix(mcp): type REST bridge input errors 2026-04-02 18:29:51 +00:00
Virgil
0bd3f70e20 docs(mcp): align public API comments with AX conventions 2026-04-02 18:26:17 +00:00
Virgil
6e73fb6e8d fix(agentic): preserve issue labels on unlock 2026-04-02 18:23:35 +00:00
Virgil
cf0885389a feat(brain): emit complete bridge notifications 2026-04-02 18:20:25 +00:00
Virgil
6a5a177bec refactor(mcp): default CLI to sandboxed workspace 2026-04-02 18:16:46 +00:00
Virgil
8a1efa8f12 refactor(agentic): surface workspace persistence failures 2026-04-02 18:12:16 +00:00
Virgil
583abea788 refactor(agentic): write workspace files atomically 2026-04-02 18:07:53 +00:00