multica/packages/store
Naiyuan Qing ef4e57ffdd refactor(sdk): unify message types with pi-ai source of truth
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>
2026-02-04 17:13:01 +08:00
..
src refactor(sdk): unify message types with pi-ai source of truth 2026-02-04 17:13:01 +08:00
package.json refactor(store): consolidate 3 stores into ConnectionStore + MessagesStore 2026-02-04 10:12:45 +08:00
README.md feat(desktop): initialize electron app with routing and cleanup 2026-02-03 14:17:31 +08:00
tsconfig.json feat(store): add shared Zustand store package with counter example 2026-01-30 11:34:09 +08:00

@multica/store

Zustand state management for Multica apps.

Usage

// From barrel
import { useHubStore, useMessagesStore, useGatewayStore } from '@multica/store'

// Per-file subpath import
import { useGatewayStore } from '@multica/store/gateway'
import { useHubStore } from '@multica/store/hub'
import { useMessagesStore } from '@multica/store/messages'
import { useHubInit } from '@multica/store/hub-init'
import { useDeviceId } from '@multica/store/device-id'