Replace hand-written message/content types in @multica/sdk with
`import type` from @mariozechner/pi-ai and @mariozechner/pi-agent-core.
This ensures compile-time correctness and eliminates type drift between
backend and frontend (e.g. "tool_use" vs "toolCall", "tool_result" vs
"toolResult").
- stream.ts: re-export TextContent, ThinkingContent, ToolCall,
ImageContent from pi-ai; use AgentEvent from pi-agent-core
- rpc.ts: AgentMessageItem = pi-ai Message (no more manual mirroring)
- connection-store.ts: use SDK types instead of inline hand-written ones
- ContentBlock now includes ImageContent to match backend reality
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 @multica/store and zustand to desktop dependencies. Replace
placeholder chat page with the shared Chat component. Add Toaster
for toast notifications and remove padding on the chat route.
Change Chat root from h-dvh to h-full for container adaptability.
Add showHeader prop to Chat; desktop passes showHeader={false}
since it has its own layout header.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Chat component no longer depends on next-themes, making it safe to use
in the desktop app. Theme toggle is now a fixed button in the web layout.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Merge auth-profiles feature from main into runner.ts
- Merge closeCallbacks feature from main into async-agent.ts
- Regenerate pnpm-lock.yaml with new dependencies
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add react-router-dom for client-side routing
- Add qrcode.react for QR code generation
- Update vite.config.ts with path aliases
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Unify locking strategy across the project by using a custom synchronous
file lock (exclusive-create based, with PID stale detection) instead of
the proper-lockfile dependency, matching the pattern in session-write-lock.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add proper-lockfile for concurrent-safe store updates with fallback
- Add "format" to AuthProfileFailureReason
- Two-level round-robin sort: credential type priority (OAuth > API key), then lastUsed
- Filter out profiles with missing/invalid credentials from candidates
- Add preferredProfile option to resolveAuthProfileOrder
- Export coerceStore and ensureAuthStoreFile for testing
- Add store.test.ts with coerceStore, load/save round-trip, corruption handling
- Update order.test.ts mocks for resolver and registry dependencies
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove template boilerplate (sample SVGs, test IPC message, comments),
add react-router-dom v7 with createHashRouter, scaffold home and chat
pages using @multica/ui components, and add READMEs for desktop, ui,
and store packages documenting import conventions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move gatewayUrl into gateway store state with setGatewayUrl action
- layout.tsx uses useGatewayStore.getState().setGatewayUrl() directly
- Remove @multica/fetch from store and web package.json dependencies
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sync latest code from src/shared/gateway-sdk/ into packages/sdk/,
update all backend imports to use @multica/sdk, and remove the
duplicate src/shared/gateway-sdk/ directory.
- Translate Chinese comments to English in SDK source
- Fix package.json exports with default condition
- Add @multica/sdk as workspace dependency for backend
- Update imports in gateway, test-client, and hub
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move setConfig() after imports in layout.tsx
- Add gateway disconnect cleanup in hub-init useEffect
- Replace silent catches with toast error notifications in hub store
- Optimize chat selectors with useMemo and useCallback/getState()
- Remove unused getMessagesByAgent from messages store
- Add clipboard try/catch with error toast
- Add skeleton loading states for hub sidebar and chat header
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create gateway store in @multica/store (WS connection independent of components)
- Gateway auto-connects when hub is ready, messages handled internally
- Move scroll-fade hook to @multica/ui/hooks
- Move Chat component to @multica/ui/components
- Add setConfig() call in web layout for URL injection
- Delete all web-local hooks, components, and lib/config
- Web app is now a pure shell: layout.tsx + page.tsx
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move useDeviceId from apps/web to packages/store/src/device-id.ts
- Update imports in chat.tsx and use-gateway.ts to use @multica/store
- Add uuid dependency to @multica/store
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create @multica/fetch package for HTTP client and URL config
- Migrate hub store and hub-init hook to @multica/store
- Move HubSidebar component to @multica/ui for web/desktop reuse
- Update web app imports to use shared packages
- Remove counter store example and its component-example usage
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds gateway and console URL configuration in app/lib/config.ts,
centralizing endpoint URLs with env var overrides.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move device ID logic from @multica/store (Zustand persist) into a
simple useDeviceId hook in the web app. SSR returns empty string,
client reads/writes localStorage directly — no hydration mismatch,
no suppressHydrationWarning needed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use CSS mask-image gradients to hint at scrollable overflow in the chat
area. Adds useScrollFade hook that dynamically applies top/bottom fade
based on scroll position via scroll events and ResizeObserver.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
`pnpm dev` now starts gateway (3000), console (4000) and web (3001)
in parallel with colored labels.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add next-themes integration with a ThemeProvider wrapper and a
ThemeToggle dropdown (Light / Dark / System) in the sidebar footer.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add CodeBlock, Markdown, StreamingMarkdown components with
Shiki syntax highlighting, GFM support, and linkify utility.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add esbuild-based build script to bundle CLI tools into standalone
binaries that can be run directly with node. The built binaries
externalize dependencies to keep bundle size small and avoid
bundling issues with native modules.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Vitest and @vitest/coverage-v8 for unit testing. Configure
test scripts and add coverage directory to gitignore.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create packages/store with @multica/store package
- Add zustand to pnpm catalog for version consistency
- Add counter store as cross-platform state example
- Integrate counter into ComponentExample for verification
- Add tsconfig path mappings for web and desktop
- Add @multica/store to Next.js transpilePackages
- Add @multica/store dependency to packages/ui
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add @multica/ui workspace dependency with @tailwindcss/vite plugin
for CSS processing. Import globals.css for theme and replace template
UI with shared Button component. Remove unused template CSS files.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add catalog section to pnpm-workspace.yaml for react, react-dom,
@types/react, @types/react-dom, @types/node, and typescript.
Update all package.json files to use catalog: protocol.
Upgrade desktop from React 18 to 19. Rename to @multica/desktop.
Add dev:desktop script to root.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add initial Electron desktop app using vite-plugin-electron template
with React and TypeScript.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore(deps): add yaml package for skill parsing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(agent): add skills system
Implement a skills system inspired by moltbot's approach:
- Skills are markdown files (SKILL.md) with YAML frontmatter
- Multi-source loading with precedence: bundled < user < workspace
- Eligibility filtering based on platform, binaries, and env vars
- Skills are automatically included in agent system prompt
- New AgentOptions: enableSkills, skillsBaseDir, extraSkillDirs
Includes two bundled skills:
- commit: Git commit helper with conventional commit guidelines
- code-review: Code review checklist and best practices
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor(skills): use profile-based skills instead of workspace
Change skill loading from workspace-based (.skills/) to profile-based:
- Skills now load from ~/.super-multica/agent-profiles/<profileId>/skills/
- Remove workspace and user skill sources
- Simplify to only bundled and profile sources
- Profile skills have higher precedence than bundled
This is more appropriate for non-coding agents where skills are
associated with agent identity rather than working directory.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* chore(deps): add web tools dependencies
Add undici, @mozilla/readability, linkedom, and turndown for
web fetching and HTML content extraction capabilities.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(agent): add web_fetch and web_search tools
Port network tools from moltbot with the following features:
web_fetch:
- Fetch and extract readable content from URLs
- Dual extraction mode: readability (smart) or turndown (full page)
- SSRF protection (blocks private IPs, localhost)
- Response caching with TTL
- Redirect handling
web_search:
- Brave Search API for traditional results
- Perplexity API for AI-synthesized answers
- Region/language settings
- Freshness filtering (Brave only)
- Auto-detects provider from available API keys
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(agent): register web_fetch and web_search tools
Add web tools to the agent's tool registry.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Add a glob tool that allows agents to find files matching glob patterns.
Features:
- Supports standard glob patterns (e.g., **/*.ts, src/**/*.{js,jsx})
- Results sorted by modification time (most recent first)
- Configurable result limit and ignore patterns
- Default ignores for node_modules, .git, dist, etc.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add pnpm workspace and Turborepo configuration
- Extract Gateway SDK to packages/sdk as independent package
- Add Next.js + shadcn Web client in apps/web
- Update root package.json with turbo scripts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement Hub that auto-connects to Gateway, manages agents via REST API,
and routes WebSocket messages to agents by payload.agentId with echo responses
sent back to the original sender.
- Add Hub with GatewayClient auto-connect, agent CRUD, and message routing
- Add Console (NestJS) with REST API and static pages (management + demo client)
- Switch Gateway registration from explicit event to query-based on connect
- Remove deprecated types (RegisterPayload, metadata, SendMessagePayload)
- Add @nestjs/serve-static for serving console UI
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Dockerfile and build script for Gateway containerization
- Add USAGE.md documenting SDK usage for Client/Agent implementations
- Move socket.io-client to production dependencies (required by SDK)
- Remove redundant timestamp field from RoutedMessage (UUID v7 contains timestamp)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>