Commit graph

159 commits

Author SHA1 Message Date
Virgil
ffcd05ea1f chore(mcp): restore SPDX headers in public Go files
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 14:48:46 +00:00
Virgil
555f9ec614 refactor(mcp): expose channel callback subsystem contract
Make the func-based channel wiring contract explicit instead of relying on an anonymous interface inside New(). This keeps the extension point discoverable and aligned with the repository's AX-style API clarity.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 14:43:06 +00:00
Virgil
94cf1c0ba7 fix(mcp): harden notification metadata and logging
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 14:36:33 +00:00
Virgil
fa9a5eed28 refactor(mcp): add typed channel capability helper
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 14:30:04 +00:00
Virgil
af3cf3c8e3 docs(mcp): add usage examples to remaining public DTOs
Align the IDE bridge and brain subsystem public types with the repo's AX-style comment convention by adding concrete usage examples for bridge messages, DTOs, and helper callbacks.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 14:17:47 +00:00
Virgil
2a4e8b7ba3 fix(mcp): snapshot exposed service slices
Return copies from service accessors and ignore nil subsystems during construction to keep the MCP service API stable and AX-friendly.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 14:10:53 +00:00
Virgil
aae824a4d0 docs(mcp): align notification API docs with AX conventions
Reorder subsystem notification wiring so channel callbacks are available before tool registration, and add usage-example comments to the public notification DTOs and helpers.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 14:06:21 +00:00
Virgil
072a36cb73 test(mcp): cover multi-session notification fanout 2026-04-02 13:57:33 +00:00
Virgil
8b7e0c40a6 fix(mcp): harden session notification dispatch 2026-04-02 13:54:12 +00:00
Virgil
8bc44d83a4 fix(mcp): expose channel capability helpers
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 13:49:35 +00:00
Virgil
d9d452b941 refactor(mcp): share notifier contract in brain subsystem
Remove the duplicate brain-local notifier interface and use the shared pkg/mcp Notifier type directly. Also align stale test comments with the current Options constructor API.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 13:44:59 +00:00
Virgil
12346208cc fix(mcp): wire notifier before subsystem registration
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 13:40:22 +00:00
Virgil
cd60d9030c fix(mcp): normalize tcp defaults and notification context
Make notification broadcasting tolerant of a nil context and make TCP transport fall back to DefaultTCPAddr when no address is supplied.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 13:19:24 +00:00
Virgil
a0caa6918c fix(mcp): make notifications nil-safe
Guard the notification broadcast helpers against nil Service and nil server values so they degrade to no-ops instead of panicking. Add coverage for zero-value and nil-server use.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 13:13:04 +00:00
Virgil
d498b2981a docs(mcp): add usage examples to constructors
Core MCP already implements the RFC-shape functionality; this pass tightens the AX surface by adding usage-example comments to public constructors and config helpers.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 13:06:28 +00:00
Virgil
41f83b52f6 refactor(mcp): align service descriptions with runtime behavior
Update stale MCP service and CLI descriptions so they match the current runtime shape, and log the actual bound TCP address when listening on an ephemeral port.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 13:01:41 +00:00
Virgil
8e77c5e58d feat(mcp): auto-select unix socket transport
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 12:56:30 +00:00
Virgil
e09f3518e0 feat(mcp): enrich process notifications with runtime context
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 12:51:27 +00:00
Virgil
ad6ccd09bb feat(mcp): honor webview screenshot format
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 12:46:03 +00:00
Virgil
c7b317402b fix(mcp): align brain list notifications and cleanup test runtime
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 12:41:37 +00:00
Virgil
91e41615d1 feat(mcp): implement HTTP resource reads
Add support for plans://, sessions://, and content:// resources via the MCP API controller instead of returning 501 for every request.\n\nCo-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 12:30:07 +00:00
Virgil
981ad9f7da feat(mcp): fan out bridge observers for brain recall
Allow the IDE bridge to register multiple observers so the IDE and brain subsystems can both react to inbound Laravel messages. Brain recall notifications now fire from the bridge callback with the real result count instead of the request path, and the brain provider follows the same async notification flow.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 12:22:13 +00:00
Virgil
e138af6635 feat(agentic): add watch, mirror, and review queue tools
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 12:16:17 +00:00
Virgil
e40b05c900 feat(mcp): emit test result channel notifications
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 12:09:41 +00:00
Virgil
f62c9c924d fix(mcp): close TCP sessions on handler exit
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 12:03:20 +00:00
Virgil
ca9d879b21 feat(mcp): forward process output notifications
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 11:59:05 +00:00
Virgil
2df8866404 feat(mcp): forward process lifecycle actions to channel notifications
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 11:53:44 +00:00
Virgil
d57f9d4039 refactor(mcp): remove empty runtime options DTO
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 11:46:09 +00:00
Virgil
dcd3187aed feat(agentic): add plan status alias and safer reads
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 11:36:20 +00:00
Virgil
dd33bfb691 refactor(mcp): centralize notification channel names
Keep channel emitters, provider metadata, and capability advertising in sync by sharing the same constants across the MCP subsystems.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 11:28:49 +00:00
Virgil
d5a76bf2c7 feat(agentic): emit harvest completion notifications
Tighten MCP session notification dispatch and add coverage for harvest.complete payloads.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 11:21:02 +00:00
Virgil
ed4efcbd55 feat(ide): emit build start lifecycle notifications
Advertise and emit build.start when a bridged build enters a running state, alongside the existing complete/fail lifecycle events.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 11:14:17 +00:00
Virgil
dd48cc16f8 feat(ide): emit build lifecycle notifications
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 11:09:55 +00:00
Virgil
dd01f366f2 feat(agentic): add plan checkpoint tool
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 11:05:37 +00:00
Virgil
e62f4ab654 fix(mcp): resolve workspace paths for tools
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 11:01:11 +00:00
Virgil
45d439926f feat(ide): add local build and dashboard state
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:54:31 +00:00
Virgil
b96b05ab0b fix(mcp): stabilise file existence checks
Use Stat() for file_exists and sort directory listings for deterministic output.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:48:34 +00:00
Virgil
599d0b6298 feat(brain): add direct list support
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:43:54 +00:00
Virgil
b82d399349 refactor(mcp): centralize channel capability names
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:40:40 +00:00
Virgil
0516e51db8 feat(agentic): emit workspace lifecycle notifications
Wire the agentic subsystem into the shared MCP notifier so workspace
completion, blocked, and status transitions are broadcast to clients.
Also keep resumed workspaces from leaving stale running state after the
process exits.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:35:58 +00:00
Virgil
bf3ef9f595 fix(mcp): broadcast notifications without log gating
Use the underlying MCP notification path for session broadcasts so fresh sessions receive notifications without requiring a prior log-level handshake.

Add a regression test that verifies broadcast delivery on a connected session.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:31:39 +00:00
Virgil
a34115266c fix(mcp): return local IDE state without bridge
Headless IDE sessions now keep working for chat history, session listing, session creation, plan status, dashboard activity, dashboard metrics, and build lookups. The Laravel bridge is still used when available, but it is no longer a hard dependency for the local cache-backed tools.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:25:29 +00:00
Virgil
76d351d8a4 feat(mcp): persist IDE session state locally
Generate real session IDs and retain chat/activity/session state in the IDE subsystem so session_create, chat_history, session_list, and dashboard tools return useful local data before the backend responds.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:19:29 +00:00
Virgil
c3a449e678 fix(mcp): add session notification helper
Use the Core context for forwarded IPC channel events and expose a session-level notification helper that the broadcast path reuses. This keeps the notification API more symmetric and avoids dropping context during IPC forwarding.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:12:35 +00:00
Virgil
a541c95dc8 feat(mcp): align language catalog with detector
Expose all languages already recognized by lang_detect in lang_list, and keep the two paths synchronized through a shared catalog.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:09:04 +00:00
Virgil
116df41200 feat(mcp): honor graceful process stop and webview wait timeout
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 10:05:07 +00:00
Virgil
53fffbd96a feat(agentic): add issue dispatch tools
Implement agentic_dispatch_issue and agentic_pr for Forge issue-driven workflows, and track issue-specific branch metadata in agent workspaces.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 07:58:29 +00:00
Virgil
faf9490e7f feat(mcp): wire optional core services in Register
Auto-discovers process.Service and ws.Hub instances already registered in Core so the MCP service factory exposes the matching tool groups without extra manual wiring.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 07:53:06 +00:00
Virgil
aa1146807e fix(mcp): emit claude/channel notifications directly
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 07:47:38 +00:00
Virgil
27107cd75e fix(mcp): enforce REST bridge body limit
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 07:39:19 +00:00