Normalize the MCP constructor workspace defaulting to use the actual working directory, and replace the IDE subsystem's functional options with a Config DTO so the codebase stays aligned with AX-style configuration objects.
Co-Authored-By: Virgil <virgil@lethean.io>
ServeStdio never set stdioMode=true, so ChannelSend always returned
early. Also switched from StdioTransport to IOTransport with a shared
lockedWriter that both the SDK and ChannelSend write through.
This fixes channel notifications not arriving in Claude Code sessions.
Co-Authored-By: Virgil <virgil@lethean.io>
ChannelSend was writing to os.Stdout directly while the SDK's
StdioTransport also writes to os.Stdout — causing interleaved
JSON-RPC messages. Now both use a shared lockedWriter via IOTransport.
Co-Authored-By: Virgil <virgil@lethean.io>
Services can now push channel events to Claude Code by sending a
ChannelPush message via Core IPC. The MCP service catches it in
HandleIPCEvents and calls ChannelSend to the stdio transport.
- ChannelPush{Channel, Data} message type in subsystem.go
- HandleIPCEvents on Service catches ChannelPush → ChannelSend
- Enables runner→mcp→Claude Code notification pipeline
Co-Authored-By: Virgil <virgil@lethean.io>
Resolves build failures from using Core primitives (JSONMarshalString,
JSONUnmarshal, ReadAll, ServiceRuntime, etc.) that didn't exist in v0.4.7.
Co-Authored-By: Virgil <virgil@lethean.io>
Error classification uses string match on unmarshal errors instead of
stdlib json.SyntaxError/UnmarshalTypeError type assertions. No exceptions.
Co-Authored-By: Virgil <virgil@lethean.io>
encoding/json stays for SyntaxError/UnmarshalTypeError type assertions.
net/http stays — transport boundary.
Co-Authored-By: Virgil <virgil@lethean.io>
MCP Service now embeds *core.ServiceRuntime[McpOptions] like all v0.8.0
services. OnStartup uses s.Core() instead of casting coreRef.
Co-Authored-By: Virgil <virgil@lethean.io>
Was returning error — Core didn't recognise it as Startable so mcp/serve
commands were never registered. One-line fix per method.
Co-Authored-By: Virgil <virgil@lethean.io>
Service stores Core ref, registers transport commands during lifecycle.
Commands use Service methods directly — no external wiring.
Co-Authored-By: Virgil <virgil@lethean.io>
MCP SDK doesn't support nested struct slices in schema generation.
Pipeline orchestration will be handled at a higher level.
Co-Authored-By: Virgil <virgil@lethean.io>
DispatchInput now accepts Pipeline []PipelineStep for follow-up steps.
On agent completion, the next step auto-dispatches with {{.Findings}}
replaced by the previous agent's output. Enables:
dispatch(review) → auto(fix with findings) → auto(verify)
WorkspaceStatus stores NextSteps for the completion handler.
Co-Authored-By: Virgil <virgil@lethean.io>
Reference files are now embedded in core-agent's workspace template
(pkg/lib/workspace/default/.core/reference/). No hardcoded paths needed.
Co-Authored-By: Virgil <virgil@lethean.io>
prepWorkspace now copies RFC-025-AGENT-EXPERIENCE.md and all Core .go
files into .core/reference/ in every dispatched workspace. Agents can
read the AX conventions and Core API without network access.
Co-Authored-By: Virgil <virgil@lethean.io>
writeStatus("running") was after cmd.Start(), so rapid sequential
dispatches all saw 0 running. Now writes status immediately after
the concurrency check passes, before spawning. Updates with PID
after start. Reverts to "failed" if spawn fails.
Co-Authored-By: Virgil <virgil@lethean.io>
- UK English in transport_e2e_test.go comments and error strings
- Replace fmt.Printf with coreerr.Error/Warn in brain-seed for errors/skips
- Alias stdlib io as goio in transport_tcp, brain/direct, agentic/prep, bridge, brain-seed
- Add var _ Notifier = (*Service)(nil) compile-time assertion
- Add TestRegisterProcessTools_Bad_NilService for nil-service error path
- Add webview handler tests beyond nil-guard (disconnect success, validation paths)
- Guard tools_process_ci_test.go with //go:build ci (pre-existing build failure)
- Document circular-import exception in EXCEPTIONS.md
Co-Authored-By: Virgil <virgil@lethean.io>
listWorkspaceDirs() now recurses one level into subdirectories
(e.g. workspace/core/go-io-123/) so countRunningByAgent and
agentic_status find workspaces regardless of directory structure.
Co-Authored-By: Virgil <virgil@lethean.io>
The hardcoded host-uk/core path doesn't exist on the homelab,
causing countRunningByAgent to always return 0 (no concurrency limiting)
and agentic_status to miss workspaces.
Co-Authored-By: Virgil <virgil@lethean.io>
ChannelSend now writes raw JSON-RPC notifications with method
notifications/claude/channel directly to stdout, bypassing the
SDK's Log() method which uses notifications/message/log.
The official Go SDK doesn't expose a way to send custom
notification methods, so we write the JSON-RPC notification
directly to the stdio transport. This is the format Claude Code
channels expect for --channels to surface events in session.
Co-Authored-By: Virgil <virgil@lethean.io>
Port 9101 conflicts with running core-agent serve. OS-assigned
port avoids the conflict and still tests the 0.0.0.0 warning.
Co-Authored-By: Virgil <virgil@lethean.io>
Backend clamps 0 to 1, returning only one memory. Default to 50
for a sensible batch when callers omit the limit field.
Co-Authored-By: Virgil <virgil@lethean.io>
DirectSubsystem pushes brain.recall.complete and brain.remember.complete
events via OnChannel callback. Avoids circular import by using func-based
wiring instead of interface-based SubsystemWithNotifier.
New() auto-detects subsystems with OnChannel() and wires them to
ChannelSend via closure.
Co-Authored-By: Virgil <virgil@lethean.io>
process.start on successful spawn, process.exit on stop/kill.
Events include process ID, PID, command, and signal type.
Co-Authored-By: Virgil <virgil@lethean.io>
Connections now register on the shared server via Server.Connect()
instead of creating per-connection servers. All sessions (stdio,
HTTP, TCP, Unix) are now visible to Sessions() and notification
broadcasting.
Co-Authored-By: Virgil <virgil@lethean.io>
CLAUDE.md reflects new Options{} constructor, notification
broadcasting, and channel events. CI runs tests with Codecov.
Co-Authored-By: Virgil <virgil@lethean.io>
5-phase plan covering:
- Options{} struct replacing functional options (breaking)
- SendNotificationToAllClients + claude/channel capability
- Usage-example comments on all public types
- Notifier interface for subsystem event broadcasting
- Consumer migration guide for agent/ide modules
Evaluated mark3labs/mcp-go vs official SDK; recommends staying on
official SDK with Server.Sessions() wrapper for notifications.
Co-Authored-By: Virgil <virgil@lethean.io>