Commit graph

326 commits

Author SHA1 Message Date
Jiayuan Zhang
81e64e9fce Add workspace management and isolated worktree environments 2026-03-23 18:12:11 +08:00
Jiayuan Zhang
1e61c1974c feat(server): implement full REST API with JWT auth and real-time WebSocket
- Add HTTP handlers for issues, comments, agents, workspaces, inbox, members, and activity
- Implement JWT authentication middleware with Bearer token validation
- Add sqlc queries for all entities (CRUD operations)
- Extract router into reusable NewRouter() for testability
- Expand SDK with full API client methods (CRUD for all resources)
- Add updateWorkspace to SDK, add Member type to shared types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 11:50:03 +08:00
Jiayuan Zhang
9bd1c14d9d feat(web): Linear-inspired sidebar with floating panel layout
- Add canvas background color for the base layer
- Sidebar blends into canvas, no border separator
- Content area rendered as floating white panel with rounded corners
  and shadow, offset from edges to reveal canvas underneath
- Simplify sidebar nav to: Inbox, Agents, Issues, Knowledge Base
- Add workspace switcher header with MulticaIcon

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:06:04 +08:00
Jiayuan Zhang
ea7f5371f7 fix(ui): add missing tw-animate-css and shadcn dependencies
These packages are imported in globals.css but were not listed in
package.json, causing CSS build failures on fresh installs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:05:56 +08:00
Jiayuan Zhang
d4f5c5b16f
feat: pivot to AI-native task management platform (#232)
Replace the agent framework codebase with a new monorepo structure
for an AI-native Linear-like product where agents are first-class citizens.

New architecture:
- server/ — Go backend (Chi + gorilla/websocket + sqlc)
  - API server with REST routes for issues, agents, inbox, workspaces
  - WebSocket hub for real-time updates
  - Local daemon entry point for agent runtime connection
  - PostgreSQL migration with 13 tables (issue, agent, inbox, etc.)
  - WebSocket protocol types for server<->daemon communication
- apps/web/ — Next.js 16 frontend
  - Dashboard layout with sidebar navigation
  - Route skeleton: inbox, issues, agents, board, settings
- packages/ui/ — Preserved shadcn/ui design system (26+ components)
- packages/types/ — Full API contract types (Issue, Agent, Workspace, Inbox, Events)
- packages/sdk/ — REST ApiClient + WebSocket WSClient
- packages/store/ — Zustand stores (issue, agent, inbox, auth)
- packages/hooks/ — React hooks (useIssues, useAgents, useInbox, useRealtime)
- packages/utils/ — Shared utilities

Removed: apps/cli, apps/desktop, apps/mobile, apps/gateway,
packages/core, skills/, and all agent-framework code.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 17:55:49 +08:00
yushen
a93949511b fix(data): remove broken finance actions (get_price_snapshot, get_prices, get_financial_metrics_snapshot)
These three Financial Datasets API endpoints return 404 Not Found.
Remove their action definitions, handlers, schema docs, and skill
references. Skills now use get_financial_metrics or web_search as
alternatives.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:03:10 +08:00
Bohan Jiang
ef13d0768e
Merge pull request #230 from multica-ai/fix/strip-aborted-toolcalls-from-repair
fix(agent): strip toolCalls from aborted/error assistant messages
2026-02-26 17:35:30 +08:00
Jiang Bohan
033ff87861 fix(agent): strip toolCalls from aborted/error assistant messages in transcript repair
When a streaming request is aborted mid-toolCall, the session persists an
assistant message with stopReason "aborted" containing partial toolCall blocks.
Our sanitizeToolUseResultPairing then inserts synthetic toolResults for these
toolCalls. However, pi-ai's transformMessages drops the entire aborted assistant
message downstream, leaving orphaned toolResults that reference non-existent
tool_use_ids — causing persistent 400 errors that block all subsequent
conversations in the session.

Fix: in repairToolCallInputs, strip toolCall blocks from assistant messages
with stopReason "aborted" or "error" before the result-pairing sanitizer runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 17:33:58 +08:00
Naiyuan Qing
d96bdb0126 fix(ui): prevent empty div flicker between tool transitions
The text wrapper div was rendering when `isStreaming` was true but
`text` was empty, causing a brief empty flex container to appear
between tool executions. Changed condition from `(text || isStreaming)`
to `text` only, so the div only renders when there's actual content.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 16:18:29 +08:00
Jiang Bohan
bfab8d97b2 fix(agent): auto-recover from persistent 400 format errors by reloading session
When the LLM API returns a 400 "tool_call_id is not found" error, the corrupted
in-memory message state persists, blocking all subsequent messages until restart.
This adds a recovery handler that reloads sanitized messages from disk and retries,
similar to the existing context overflow recovery pattern.

Also adds `default` export condition to core package.json to fix tsx watch
resolution for subpath exports (gateway startup failure).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:19:39 +08:00
Jiayuan Zhang
7387216482
Merge pull request #224 from multica-ai/codex/fix-multi-session-chat-sync
fix(chat): stabilize multi-session sync and tool flow
2026-02-17 16:05:53 +08:00
Jiayuan Zhang
06c5792bf5 fix(chat): stabilize multi-session sync and tool flow 2026-02-17 15:59:25 +08:00
Jiayuan Zhang
0f5bd5fff1 refactor(agent): remove legacy memory subsystem 2026-02-17 15:33:39 +08:00
Jiayuan Zhang
642b674f33 fix(ci): resolve runner parse break and desktop lint warning 2026-02-17 09:50:28 +08:00
Jiayuan Zhang
5af7aa7840 refactor(core-hub): remove legacy agent RPC and fallback routing 2026-02-17 09:41:37 +08:00
Jiayuan Zhang
e622b8c6ba refactor(core-sdk): enforce conversation-only client protocol 2026-02-17 09:41:37 +08:00
Jiayuan Zhang
e1eaa73e04 fix(agent): infer run-log tool errors from payload 2026-02-17 09:41:37 +08:00
Jiayuan Zhang
9d1ac0049f refactor(protocol): standardize sessionId alias across conversation flows 2026-02-17 09:40:28 +08:00
Jiayuan Zhang
6969790c25 refactor(protocol): deprecate legacy agentId conversation fallback 2026-02-17 09:40:28 +08:00
Jiayuan Zhang
4de89943f2 refactor(session): add agent/conversation hierarchical storage 2026-02-17 09:40:28 +08:00
Jiayuan Zhang
a0bb88e7b7 refactor(hub): enforce conversation-scoped device authorization 2026-02-17 09:39:25 +08:00
Jiayuan Zhang
3123506657 refactor(channels): persist route bindings across restarts 2026-02-17 09:39:25 +08:00
Jiayuan Zhang
dee70ea659 refactor(channels): bind route keys to isolated conversations 2026-02-17 09:39:25 +08:00
Jiayuan Zhang
b7b3d323b8 refactor(hub): decouple agent and conversation runtime model 2026-02-17 09:39:25 +08:00
Jiayuan Zhang
6a778e38e7 test(hub): cover conversation rpc handlers 2026-02-17 09:39:25 +08:00
Jiayuan Zhang
5ccf7bd798 fix(hooks): persist verified main conversation identity 2026-02-17 09:39:25 +08:00
Jiayuan Zhang
3c8569151a refactor(hub): add conversation-first rpc aliases 2026-02-17 09:39:25 +08:00
Jiayuan Zhang
754e604a40 refactor(protocol): add conversationId compatibility across hub/client 2026-02-17 09:39:24 +08:00
Jiayuan Zhang
f4bd5b7bbc
Merge pull request #220 from multica-ai/codex/delegate-progress-timer
feat(desktop): show delegate sub-task progress and running timers
2026-02-17 03:34:52 +08:00
Jiayuan Zhang
d45605283e feat(desktop): show delegate sub-task progress and timers 2026-02-17 03:27:17 +08:00
Jiayuan Zhang
e28ecb9a91
Merge pull request #216 from multica-ai/codex/meta-skill-installer-e2e-skills-benchmark
feat(skills): add ClawHub meta installer and agent-driven E2E benchmark
2026-02-17 02:45:45 +08:00
Jiayuan Zhang
39fde8e4b0
Merge pull request #218 from multica-ai/codex/web-fetch-evidence-coverage
fix(agent): enforce web search fetch evidence coverage
2026-02-17 02:45:12 +08:00
Jiayuan Zhang
4b7f0afb50 fix(agent): guard workaround and local skill mutation commands 2026-02-17 02:37:29 +08:00
Jiayuan Zhang
6fd4819280 fix(agent): surface installed skill ids in prompt 2026-02-17 02:37:29 +08:00
Jiayuan Zhang
7eb18f47fc fix(agent): enforce capability-gap skill recovery guidance 2026-02-17 02:37:29 +08:00
Jiayuan Zhang
850d55336a fix(agent): enforce sufficient search-fetch evidence 2026-02-17 02:08:15 +08:00
Jiayuan Zhang
b5b65c6bae fix(agent): enforce cross-turn web fetch evidence 2026-02-17 01:48:53 +08:00
Jiayuan Zhang
6e71598c2c
Merge pull request #215 from multica-ai/codex/docs-prune-and-regenerate-core-docs
docs: prune stale docs and regenerate prioritized core docs
2026-02-17 01:26:21 +08:00
Jiayuan Zhang
fc8a813120
Merge pull request #214 from multica-ai/codex/chat-context-window-indicator
feat(chat): add context window usage indicator
2026-02-17 00:55:09 +08:00
Jiayuan Zhang
ce6291e9eb fix(agent): enforce web_fetch after successful web_search 2026-02-17 00:49:57 +08:00
Jiayuan Zhang
ecb0cd392e chore(docs): remove non-e2e documentation 2026-02-17 00:46:36 +08:00
Jiayuan Zhang
ec8b62cef1 feat(chat): add context window usage indicator 2026-02-17 00:38:17 +08:00
Jiayuan Zhang
909efb5dab refactor(core): remove legacy subagent registry subsystem 2026-02-17 00:07:15 +08:00
Jiayuan Zhang
43198d9dcc feat(core): add rpc to generate channel welcome messages 2026-02-16 12:24:24 +08:00
Jiayuan Zhang
357bf326e0 fix(data): propagate errors so is_error is set correctly in run-log
Previously the data tool caught all errors and returned them as normal
tool results with error info in the JSON content. This meant pi-agent-core
never saw an exception and always set isError=false in the run-log, even
for rate limit errors (errCode 9001) and other API failures.

Now errors propagate to pi-agent-core which sets isError=true and formats
the error message for the LLM automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 03:39:11 +08:00
Jiayuan Zhang
9c8be30d3d fix(test): increase timeout for summary fallback artifact extraction test
UC4 test times out in CI (5s default) because generateSummary's API
provider layer takes longer to fail on slow CI runners. Increase to 15s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 01:10:18 +08:00
Jiayuan Zhang
aada2916f4 fix(agent): clear timeout timer in delegate tool to prevent unhandled rejection
The setTimeout in runSubagentTask was never cleared when childAgent.run()
completed before the timeout. The dangling timer would later reject an
unobserved promise, causing an unhandled promise rejection crash in Node.js
v15+. Capture the timer and clear it in a .finally() block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 01:09:21 +08:00
Jiayuan Zhang
f60551195a chore(agent): remove old sessions_spawn/sessions_list tools and update references
Delete sessions-spawn.ts, sessions-list.ts and their tests. Update CLI
to remove waitForSubagents polling workaround (delegate is synchronous).
Update UI, desktop IPC, SWE-bench, and system prompt tests to use the
new delegate tool name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 01:09:21 +08:00
Jiayuan Zhang
d3ef8ecc31 feat(agent): replace sessions_spawn with synchronous delegate tool
Replace the async sessions_spawn/sessions_list sub-agent system with a
single synchronous `delegate` tool. The new tool runs tasks in parallel
via Promise.all with per-task timeout, returning combined results directly
in the tool response. This eliminates the need for registry, announce queue,
persistence, and Hub involvement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 01:09:21 +08:00
Jiayuan Zhang
94ae88ed8b
Merge pull request #208 from multica-ai/forrestchang/compaction-audit
Context window: 4-phase compaction improvements
2026-02-16 00:01:58 +08:00