Commit graph

825 commits

Author SHA1 Message Date
Jiayuan Zhang
01b89ed488 feat(channels): add message source prefix, sendFile, and channel info
Prepend [ChannelName · private/group] prefix to debounced messages so
the LLM knows the message source. Add sendFile() for outbound media
routing and listChannelInfos() for system prompt channel awareness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 01:37:22 +08:00
Jiayuan Zhang
a29366d7cf feat(agent): add send_file tool for channel file sending
New send_file tool with TypeBox schema, auto-detect media type from
file extension, and file validation. Wired through AgentOptions and
resolveTools with conditional registration when callback is provided.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 01:37:15 +08:00
Jiayuan Zhang
6e96fd1306 feat(channels): add outbound media types and sendMedia to channel adapter
Add OutboundMedia interface and OutboundMediaType to the channel type
system. Implement sendMedia in the Telegram plugin using grammy's
InputFile API with HTML caption formatting and plain-text fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 01:37:08 +08:00
Jiayuan Zhang
ade7f2b056
feat(agent): add search-then-fetch guidance to web tools system prompt (#150)
Guide the LLM to evaluate snippet quality after web_search and
follow up with web_fetch on the most relevant URLs when deeper
content is needed for accurate answers.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:50:13 +08:00
Bohan Jiang
a986456e72
Merge pull request #148 from multica-ai/refactor/workspace-documents
refactor(agent): move workspace to ~/Documents/Multica
2026-02-12 23:08:57 +08:00
Bohan Jiang
d385915f95
Merge pull request #149 from multica-ai/feat/default-agent-name-multica
feat(profile): default new agent name to "Multica"
2026-02-12 23:08:33 +08:00
Jiang Bohan
02b480dc47 feat(profile): default new agent name to "Multica" instead of "Assistant"
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 19:48:40 +08:00
Naiyuan Qing
9a22ed1171
Merge pull request #147 from multica-ai/docs/desktop-env-example
docs(desktop): improve .env.example with accurate configuration guide
2026-02-12 19:06:15 +08:00
Naiyuan Qing
ad06679e69 fix: simplify - just say pnpm dev works directly
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 19:04:44 +08:00
Jiang Bohan
cb2dfd246f refactor(agent): move workspace to ~/Documents/Multica
Hidden directory ~/.super-multica is not user-friendly for a working
directory. Move default workspace base to ~/Documents/Multica so
users can easily find agent-created files in Finder.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 19:04:20 +08:00
Naiyuan Qing
8704e37faa fix: clarify dev gateway is hardcoded in root package.json
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 19:03:26 +08:00
Naiyuan Qing
c0b248e8f9 fix: remove hardcoded URLs, reference config files instead
URLs may change - point to package.json and .env.production as sources of truth.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 19:02:13 +08:00
Naiyuan Qing
816c883f30 docs(desktop): improve .env.example with accurate configuration guide
- Clarify that local dev needs no .env (GATEWAY_URL set in package.json)
- Document GATEWAY_URL override for local gateway testing
- Add detailed explanation of both URLs (Gateway vs API Server)
- List dev/prod values for each environment variable

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 19:00:04 +08:00
Naiyuan Qing
71433fc4ed
Merge pull request #146 from multica-ai/feat/message-source-tracking
feat(core): add message source tracking and persistence
2026-02-12 18:51:23 +08:00
Naiyuan Qing
8199dde1b6 feat(core): add message source tracking and persistence
- Add MessageSource type to track where user messages originate (local, gateway, channel)
- Broadcast inbound messages from all channels to local Desktop UI via Hub.onInboundMessage()
- Persist source field in JSONL session storage so it survives page refresh
- Display source icon (Monitor/Smartphone/Send) with tooltip for non-local user messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 18:45:15 +08:00
Naiyuan Qing
e901bec227
Merge pull request #145 from multica-ai/NevilleQingNY/fix-core-dist-missing
feat(desktop): default dev gateway URL with GATEWAY_URL override
2026-02-12 18:44:48 +08:00
Naiyuan Qing
c95b74ffc9 feat(desktop): default dev gateway URL and support GATEWAY_URL env override
`pnpm dev` now connects to dev gateway by default. Support runtime
GATEWAY_URL env var to override, so no per-worktree .env setup needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:39:46 +08:00
Bohan Jiang
0f4d579cb7
Merge pull request #144 from multica-ai/feat/agent-workspace
feat(agent): add default workspace directory per profile
2026-02-12 18:39:02 +08:00
Jiang Bohan
18ab2da8c4 test(agent): add workspace resolution and initialization tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:08:04 +08:00
Jiang Bohan
ca0b4624fd feat(agent): add default workspace directory per profile
Each agent profile now gets a dedicated workspace directory
(~/.super-multica/workspace/{profileId}) used as the default CWD
for tool operations. Supports override via MULTICA_WORKSPACE_DIR
env var or config.json workspaceDir field. The workspace path is
injected into system prompt and runtime info.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:07:59 +08:00
Bohan Jiang
ade5e5a17c
Merge pull request #143 from multica-ai/Bohan-J/subagent-timeout
feat(subagent): increase default timeout to 30 min
2026-02-12 18:02:29 +08:00
Jiayuan Zhang
7bb0438270
Merge pull request #142 from multica-ai/forrestchang/office-skills
feat(skills): add office suite skills (docx, pdf, pptx, xlsx)
2026-02-12 17:59:28 +08:00
Jiang Bohan
5b0cbd4d7d feat(subagent): increase default timeout from 10 min to 30 min
A subagent that times out loses all its work, so a generous default
reduces wasted compute. Update the constant, tool description, system
prompt guidelines, and documentation to reflect the new 1800s default.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:54:53 +08:00
Jiayuan Zhang
28957ba835 feat(skills): add Excel spreadsheet (xlsx) skill
Add xlsx skill with openpyxl/pandas workflows, formula-first approach, LibreOffice recalculation, financial model color coding standards, and formula verification checklist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:54:17 +08:00
Jiayuan Zhang
1c51932119 feat(skills): add PowerPoint presentation (pptx) skill
Add pptx skill with template-based editing workflow, PptxGenJS creation from scratch, slide thumbnails, design guidelines, and visual QA process.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:54:16 +08:00
Jiayuan Zhang
7999d8fc99 feat(skills): add PDF processing skill
Add pdf skill with text/table extraction, merge/split, form filling (fillable and non-fillable), PDF creation with reportlab, and command-line tools integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:54:16 +08:00
Jiayuan Zhang
2774c0f61f feat(skills): add Word document (docx) skill
Add docx skill with document creation via docx-js, XML editing workflow (unpack/edit/pack), tracked changes, comments, and LibreOffice integration for PDF conversion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:54:16 +08:00
Naiyuan Qing
fd098c04eb Merge remote-tracking branch 'origin/main' into feat/dashboard 2026-02-12 17:38:49 +08:00
Jiayuan Zhang
143d779376
Merge pull request #140 from multica-ai/forrestchang/earnings-analysis-skill
feat(skills): earnings analysis for financial statement assessment
2026-02-12 17:34:16 +08:00
Bohan Jiang
28c83af0d3
Merge pull request #141 from multica-ai/fix/writeinternal-retry
fix(agent): retry writeInternal once on transient LLM errors
2026-02-12 17:31:03 +08:00
LinYushen
8bc36a9cc9
Merge pull request #136 from multica-ai/fix/agent-compaction
fix(agent): prevent context window overflow with 3-layer compaction defense
2026-02-12 17:23:12 +08:00
Jiayuan Zhang
845bcea77d fix(skills): enforce mandatory web search in earnings analysis
Agent was skipping all web searches because instructions used optional
language ("if...", "after reviewing..."). Changed key searches from
conditional to mandatory (MUST/REQUIRED), added a checkpoint after
Step 1b, and rewrote Web Search Guidelines as "Requirements" with a
minimum of 3 mandatory searches per analysis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:21:51 +08:00
Jiang Bohan
d627fb4ff4 fix(agent): retry writeInternal once on transient LLM errors
When writeInternal fails with a transient error (e.g. undici
"terminated", connection reset, 502/503), wait 5 seconds and retry
once. This prevents continuation tasks from silently failing when
the LLM streaming connection is interrupted mid-generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:19:52 +08:00
Bohan Jiang
b0f3e1e38a
Merge pull request #139 from multica-ai/feat/subagent-group-next
feat(subagent): add group/next continuation for multi-agent workflows
2026-02-12 17:17:46 +08:00
Jiang Bohan
6b9e5d5f40 refactor(subagent): improve system prompt with anti-hallucination and group guidance
Rewrite Sub-Agents section: add explicit anti-hallucination rules (never
fabricate completion status), make group/next the recommended pattern for
multi-agent tasks, remove sessions_list polling restrictions, add usage
examples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:11:38 +08:00
Jiang Bohan
48185c3e77 feat(subagent): add groupId/next params to spawn and group display to list
sessions_spawn now accepts groupId and next parameters. First spawn with
next auto-creates a group; subsequent spawns join via groupId. sessions_list
groups runs by groupId with completion progress display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:11:31 +08:00
Jiang Bohan
f46c00e902 feat(subagent): update announce flow for group continuation
When all runs in a group complete, deliver combined findings plus the
`next` continuation prompt to the parent agent via writeInternal. The
parent can then act on the collected data (summarize, write files, etc).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:11:25 +08:00
Jiang Bohan
12fb12b895 feat(subagent): add SubagentGroup type and registry support
Add SubagentGroup for "collect all, then act" workflows where multiple
subagents complete before a continuation task runs. Groups are persisted
alongside run records and support a `next` continuation prompt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:11:20 +08:00
Jiayuan Zhang
f021063a3e feat(skills): add web search integration to earnings analysis
Add targeted web search guidance at key analysis steps: earnings call
highlights, industry context, anomaly explanation (margin shifts, debt
changes, CapEx spikes), quality-of-earnings validation, and earnings
call transcript supplementation. Includes guardrails to keep searches
targeted (3-6 total) and source-quality hierarchy.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 17:05:30 +08:00
Naiyuan Qing
901f5ba804 docs: add dashboard design plan
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 17:04:07 +08:00
Jiayuan Zhang
c251d94c8a
Merge pull request #137 from multica-ai/codex/remove-finance-api-key-requirement
chore(skills): remove finance API key requirement
2026-02-12 16:55:59 +08:00
Jiayuan Zhang
bef8692e75 feat(skills): add earnings analysis skill for financial statement assessment
Adds a new bundled skill for analyzing company financial statements with
a structured 9-step framework including Buffett competitive advantage
scoring, quality of earnings assessment, and SEC filing qualitative
analysis. Includes reference files for sector benchmarks and scoring
criteria.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 16:53:21 +08:00
Naiyuan Qing
bad4d05c15
Merge pull request #138 from multica-ai/refactor/desktop-page-restructure
refactor(desktop): restructure pages and add dev reset scripts
2026-02-12 16:45:07 +08:00
Naiyuan Qing
274651754c fix(desktop): remove unused saving state in profile page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 16:29:26 +08:00
Naiyuan Qing
8efc4ae5aa refactor(desktop): improve clients page and QR code component architecture
- Refactor QR code component with extracted hooks (useQRToken, useCountdown, useCopyToClipboard)
- Extract reusable sub-components (QRCodeFrame, ExpiryTimer, CopyLinkButton)
- Extract QRCodeCard and DevicesCard components in clients page
- Add GatewayStatus indicator for connection state
- Minor styling fix for empty device list state

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 16:27:15 +08:00
Naiyuan Qing
304c6a9bc6 fix(desktop): wait for channel status to settle before returning
The listStates IPC handler now waits for any "starting" status to
settle (max 3.5s) before returning, ensuring the UI always gets the
final status (running/error) instead of the transient "starting" state.

Also fixes unused variable lint warning in profile page.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 16:25:48 +08:00
yushen
8f4e894370 feat(ui): show in-chat system message when context compaction occurs
Add CompactionItem component that renders a subtle inline notification
in the chat stream when the agent compacts its context window. Extends
Message type with "system" role and handles compaction_end events in
useChat's handleStream.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 16:10:19 +08:00
Naiyuan Qing
07c05b145c feat(desktop): add dev reset scripts for fresh install testing
- Add `dev:desktop:reset` to delete ~/.super-multica directory
- Add `dev:desktop:fresh` to reset and start app in one command

Enables testing the complete onboarding flow as a new user.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:56:50 +08:00
Naiyuan Qing
bc9b7d6fc5 refactor(desktop): restructure pages and consolidate UI components
- Rename channels.tsx to clients.tsx
- Remove standalone skills.tsx and tools.tsx pages
- Add agent/ directory for agent-related pages
- Update layout and navigation structure
- Add tabs component to ui package
- Update fonts and global styles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 15:49:52 +08:00
Jiayuan Zhang
b280d6fa52 chore(skills): bump finance skill versions to 1.1.1 2026-02-12 15:15:53 +08:00