Commit Graph
18 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås f89d31aa9d core: Order OS checks Windows, macOS, Linux
The house order was not kept where these were first written.
2026-09-17 13:15:53 +02:00
Ole André Vadla Ravnås fa1416e3bc Spawn children without a console
Foundation calls CreateProcessW with CREATE_UNICODE_ENVIRONMENT and
nothing else, and offers no way to add to that. The app has no
console of its own, so every console child it started -- an
emulator, qemu-img, the agent CLI -- was given a fresh command
prompt to look at.

Spawn through ChildProcess instead, which asks for CREATE_NO_WINDOW
on Windows and is Process everywhere else.
2026-09-15 13:45:03 +02:00
necpition205 7411c3c9a4 Optimize mission context reads 2026-06-28 02:02:14 +02:00
Ole André Vadla Ravnås ffa1a21e8a core: Surface Claude subprocess retry status
Yield api_retry events as live notices so model overload is
visible instead of a silent spinner, and fall back to the
streamed error detail when claude exits with empty stderr.
2026-06-24 15:27:41 +02:00
Ole André Vadla Ravnås 8d6f91fe1e Plumb image attachments through to the LLM
Console widgets get an appendImage / respond.image API on the
agent. read_widget_state surfaces image entries as attachments
scaled to at most max_dimension pixels (default 1568) on the
longest edge. Anthropic nests image blocks inside tool_result;
OpenAI gets a synthetic follow-up user message. The host scales
via CoreImage on macOS and GdkPixbuf on GTK.
2026-05-22 12:15:53 +02:00
Ole André Vadla Ravnås 389c94d3cd core: Replace LLM capability bools with enum
LLMProviderCapabilities and LLMModelInfo each hold a
Set<LLMCapability> with a supports(_:) accessor. Adding a
capability is one enum case plus an entry in each
provider's supported set.
2026-05-11 21:32:24 +02:00
Ole André Vadla Ravnås 494de6495e Rework provider capabilities
Fetch models at runtime where supported (OpenAI, local
OpenAI-compatible). Static lists for Anthropic and Claude
Code; the OpenAI list was already drifting.

Add reasoningEffortOptions capability. Claude Code exposes
[auto, low, medium, high, xhigh, max] and routes the choice
to its --effort flag. LLMTurnRequest, Mission, the executor
and the mission schema all carry reasoningEffort end to end.

suggestedModels is now async/throws and takes apiKey and
baseURL so dynamic providers can authenticate and target a
caller-supplied endpoint.
2026-05-11 14:39:07 +02:00
Ole André Vadla Ravnås 719fb673ae agent: Drop redundant await on MCPServer.stop
MCPServer.stop is synchronous; awaiting it produced a
"no async operations occur within await" warning. Call it
directly in Engine.disableExternalMCPServer, and from
ClaudeCodeProvider's MCPServerHandle bounce through
MainActor.run since the actor itself is non-isolated.
2026-05-10 11:31:00 +02:00
Ole André Vadla Ravnås f005c84a08 agent: Label missions with an LLM-generated title
A new title column carries a short label generated in
parallel with mission start. Each LLMProviderDescriptor
declares a summarizationModelID so the pass runs on the
mission's own backend (Haiku for Anthropic and Claude
Code, gpt-5-mini for OpenAI, llama3.2:3b locally). The
instruction sits in the user message to dodge Claude
Code's prompt layering and asks for two to four punchy
words. Sidebar shows title or goal; header keeps the
full goal under the title.
2026-05-10 08:39:14 +02:00
Ole André Vadla Ravnås f788fa84dc agent: Use full assistant text from Claude Code
claude --include-partial-messages only streams deltas for
the model's final response, but assistant events arrive for
every intermediate message. Preferring streamedText dropped
the model's opening narration before any tool calls. Use
assistantText whenever it's non-empty so the persisted
turn carries the entire response.
2026-05-10 08:35:45 +02:00
Ole André Vadla Ravnås d8d360fc35 agent: Skip Claude Code subprocess on iOS
Foundation's Process is unavailable on iOS-family
platforms, so gate ClaudeCodeProvider behind macOS,
Linux, and Windows. The Engine register call is
gated to match.
2026-05-09 19:47:20 +02:00
Ole André Vadla Ravnås 5a174ac86f agent: Wire MCP through libsoup on non-Apple
- Engine and ClaudeCodeProvider gates now activate whenever
  Network or CSoup is importable, so the libsoup transport
  actually wires up at runtime on Linux/Windows.
- Drop OpaquePointer detours; libsoup's typed pointers and
  guint port/status arguments compile cleanly now.
- Replace the variadic soup_server_new(NULL) call with a tiny
  shim — Swift's Clang importer marks variadics unavailable.
2026-05-09 17:23:49 +02:00
Ole André Vadla Ravnås ec04180f15 agent: Don't block main actor on claude pipe
availableData is synchronous and froze the main actor while
claude initialized. That starved the MCPServer dispatch tasks
queued on the same actor, so claude saw a non-responsive MCP
endpoint and reported "tools haven't come online yet".
Reading via readabilityHandler -> AsyncStream keeps the actor
free to service MCP traffic.
2026-05-09 17:23:44 +02:00
Ole André Vadla Ravnås 46fecf01c6 agent: Gate MCP behind canImport(Network)
The Network-framework MCP server is Apple-only. Wrap the
listener, the Engine state and the ClaudeCodeProvider MCP
branch behind canImport(Network) so LumaCore still builds on
Linux/Windows. A libsoup-backed implementation lands next.

While here: echo the client's protocolVersion in initialize
and announce tools.listChanged so claude's MCP client accepts
the handshake.
2026-05-09 15:29:35 +02:00
Ole André Vadla Ravnås 6e76eb0bb5 agent: Help Claude Code subprocess find claude
App-bundle launches inherit a bare PATH; inject the usual
install dirs (~/.local/bin, /opt/homebrew/bin, etc.) into
the spawned environment so /usr/bin/env resolves claude.
LLMProviderError gains LocalizedError so failures stop
surfacing as "error 0".
2026-05-09 15:04:05 +02:00
Ole André Vadla Ravnås f0c3d1beaa agent: Require bearer auth on the MCP server
Per-instance 256-bit token, sent to claude via the headers
field of the MCP config. Anything else gets 401.
2026-05-09 15:04:05 +02:00
Ole André Vadla Ravnås 6485d7990f agent: Gate MCP act-tools on approval
Tool calls from Claude Code via MCP suspend on a checked
continuation when the spec is non-observe. Engine routes
approve/reject to the active MCPServer to resume execution
or send a refusal back to Claude Code.
2026-05-09 15:04:05 +02:00
Ole André Vadla Ravnås 4fc8aef4f2 agent: Plug Claude Code in via MCP
ClaudeCodeProvider subprocesses claude in --print mode with an
in-process HTTP MCP server on loopback exposing the tool catalog.
Tool calls persist as MissionAction rows so the Action Queue
stays populated.
2026-05-09 15:04:05 +02:00