- Add useProvider hook for provider state management
- Add ApiKeyDialog for configuring API key providers
- Add OAuthDialog for importing OAuth credentials from CLI tools
- Update home page with provider dropdown selector
- Support switching providers mid-conversation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add provider.ts with handlers for list, current, set, saveApiKey, importOAuth
- Import OAuth credentials from CLI tools (Claude Code, Codex)
- Register provider handlers in IPC index
- Expose provider API in preload.ts with TypeScript types
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add getProviderInfo() and setProvider() methods to Agent class
- Expose provider methods via AsyncAgent
- Add setLlmProviderOAuthToken() for storing OAuth credentials
- Extend ProviderConfig type with OAuth fields (oauthToken, oauthRefreshToken, oauthExpiresAt)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove unused AgentEvent import from hub.ts
- Change @typescript-eslint/no-unused-vars to warn instead of error
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add getMessages() to Agent and AsyncAgent for retrieving session history
- Fix type annotations in hub.ts for AgentMessage handling
- Remove duplicate type export in preload.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the dual-mode chat architecture showing how IPC and Gateway
paths share the same UI components, Store, and Agent layer.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Chat page now supports two modes:
- Local: Direct IPC to agent in same Electron process
- Remote: WebSocket via Gateway to external Hub
Both modes reuse the same UI components and useMessagesStore.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add IPC handlers for direct local agent communication:
- localChat:subscribe - Subscribe to agent events
- localChat:unsubscribe - Unsubscribe from events
- localChat:send - Send message to local agent
- localChat:getHistory - Get message history
This enables chat without Gateway connection.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add AsyncAgent.subscribe() that allows multiple subscribers to receive
the same agent events, enabling local IPC chat to coexist with other
event consumers.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Read reasoningMode from profile config and storedMeta when not
explicitly set via options (matching thinkingLevel pattern)
- Skip extractThinking() call when reasoningMode is "off"
- Clean up redundant ?? undefined casts in CLI entry points
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Wire reasoningMode through Agent runner, CLI output, and all CLI
entry points (run, interactive, non-interactive). In stream mode,
thinking content is printed to stderr in real-time. In on mode,
thinking is shown after message completion. Default is stream.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update StreamMessageEvent content type to include thinking blocks.
Add extractThinkingFromEvent() helper and export it, enabling clients
to access reasoning content from streamed agent responses.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ReasoningMode type (off/on/stream) to AgentOptions and related
config types. Add extractThinking() for extracting thinking content
blocks from LLM responses, mirroring the existing extractText() pattern.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- reloadSystemPrompt() now updates both agent and session prompt
- reloadSystemPrompt() uses buildSkillsPrompt() consistently (not buildModelSkillsPrompt)
- Extract rebuildSystemPrompt() to eliminate duplicated builder logic
- Preserve original tool name casing in tooling summary (matching OpenClaw)
- Fix report line count to use actual newline count
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ProfileManager.buildSystemPrompt() now delegates to the structured builder.
Runner assembles prompt after tool resolution with safety, tooling summary,
and runtime info. Subagent prompts use minimal mode with safety constitution.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Structured, mode-aware system prompt builder inspired by OpenClaw.
Supports three modes (full/minimal/none), safety constitution,
conditional tool sections, runtime info, and prompt telemetry.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add browser-based QR scanning as an alternative to paste mode in the
ConnectPrompt component. Mobile users can scan the Desktop QR code
directly instead of manually copying connection codes.
- Add qr-scanner dependency (WebWorker-based decoding, BarcodeDetector support)
- Create use-qr-scanner hook wrapping camera lifecycle and cleanup
- Create QrScannerView component with viewfinder overlay
- ConnectPrompt auto-detects mobile (touch + narrow viewport) and defaults to scan mode
- Lazy-load scanner component for zero initial bundle impact
- Graceful fallback to paste mode on permission denial or no camera
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add IPC handlers for profile:getStyle and profile:setStyle
- Add style dropdown with 6 preset options in agent settings UI
- Display style descriptions to help users choose
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add AgentStyle type with 6 preset options (professional, friendly, etc.)
- Add getStyle/setStyle methods to ProfileManager
- Update soul.md template to include style section
- Add reloadSystemPrompt support for style changes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename storage path from ~/.super-multica/devices/ to
~/.super-multica/client-devices/ for clarity
- Change JSON format from bare array to { version, devices[] }
dict for future extensibility
- Auto-migrate legacy array format on load
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Radix UI version in this project doesn't support asChild on
AlertDialogDescription. Use inline spans with block display instead.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The import was redundant since it's already re-exported directly.
Fixes eslint no-unused-vars error in CI.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Merge remote main branch, keeping both device verification (ws-auth-handshake)
and agent settings/profile features from main.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 60s timeout to pending device confirms to prevent Promise leaks
when client disconnects before user responds
- Add offDeviceConfirmRequest to preload and clean up IPC listener on
component unmount to prevent duplicate listener accumulation
- Extract duplicated parseUserAgent into shared lib/parse-user-agent.ts
- Clean up expired tokens in DeviceStore.registerToken to prevent
memory accumulation from unscanned QR codes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When an unverified device sends a non-RPC message, reply with an
"error" action containing UNAUTHORIZED code so the client knows
verification is required.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add DeviceList component on home page showing verified devices with
parsed User-Agent info (browser, OS) and relative time. Add useDevices
hook with listDevices/revokeDevice IPC. Update DeviceConfirmDialog to
show human-readable device info (e.g. "Chrome on macOS") instead of
raw device ID.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extend DeviceEntry with optional DeviceMeta field. Verify handler
extracts meta from params and passes it through to onConfirmDevice
callback and deviceStore.allowDevice for persistence.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Auto-collect navigator.userAgent, platform, and language in the SDK
verify RPC payload. Add DeviceMeta type. Hub receives this metadata
for display in the Desktop UI device list and confirmation dialog.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add DeviceConfirmDialog component that shows an AlertDialog when a new
device requests connection, letting the user Allow or Reject. Wire up
Electron IPC for token registration and device confirmation flow between
main process and renderer. Register QR code tokens with Hub on generate
and refresh.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add DeviceStore for managing one-time tokens and persistent device
whitelist. Create async verify RPC handler that validates tokens and
awaits Desktop user confirmation for first-time connections. Whitelisted
devices (reconnections) pass through instantly. Add message guard to
reject unverified device traffic.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Embed transparent verification logic in GatewayClient that automatically
sends an RPC "verify" request to the Hub after REGISTERED event. Adds
hubId, token, and verifyTimeout options. Upper-layer callers see no change
— "registered" state means both gateway registration and Hub verification
are complete. Failures surface via onError callback.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add reloadSystemPrompt call after profile updates
- Add error handling and logging for Hub initialization
- Clean up debug logs from agent IPC handlers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add getSoulContent/updateSoulContent to ProfileManager
- Create soul.md with agent name when updating profile name
- Add reloadSystemPrompt() method to Agent and AsyncAgent
- Include soul.md content in system prompt build
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add UI for editing agent name and user preferences:
- AgentSettingsDialog component with name input and user.md textarea
- Agent Settings section on Home page with Edit button
- Auto-reload agent info when settings are saved
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add IPC handlers for profile management:
- profile:get - Get profile name and user content
- profile:updateName - Update agent display name
- profile:updateUser - Update user.md content
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add methods to ProfileManager, Agent, and AsyncAgent for:
- Getting/setting agent display name (stored in config.json)
- Getting/setting user.md content
This enables the desktop app to manage agent settings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>