Commit graph

14 commits

Author SHA1 Message Date
Jiayuan Zhang
c5db9bf232 refactor(agent): make finance web usage dynamic 2026-02-11 18:48:31 +08:00
Jiayuan Zhang
64d8427ca7 fix(agent): enforce data-web evidence fusion 2026-02-11 18:30:20 +08:00
Jiayuan Zhang
d80e97648c fix(core): read data tool API key from credentials.json5
Use credentialManager.getToolConfig("data") as the primary source for
the Financial Datasets API key, with FINANCIAL_DATASETS_API_KEY env var
as fallback. Also add data tool entry to the credentials template.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:45:46 +08:00
Jiayuan Zhang
d47594d7b2 feat(core): add unified data tool with finance domain support
Introduces a `data` tool that provides structured access to the Financial
Datasets API (financialdatasets.ai). Supports 18 finance actions covering
stock prices, financial statements, key metrics, SEC filings, analyst
estimates, insider trades, news, and crypto data.

Designed as a stable interface — the backend can be swapped from direct
API calls to a Multica Data Service without changing the tool schema.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:43:58 +08:00
Jiayuan Zhang
afe51d325d fix(core): rebuild system prompt after provider switch
setProvider() updated the resolved provider and model but did not
rebuild the system prompt, so the runtime info line still showed the
old provider/model (e.g. claude-code/claude-opus-4-6) after switching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 00:12:08 +08:00
Jiayuan Zhang
c24ac8a098 fix(core): fix OpenRouter model resolution and add fallback for custom models
Registry model IDs used hyphens (claude-sonnet-4-5) but pi-ai expects
dots (claude-sonnet-4.5). Also adds a fallback model config for OpenRouter
models not in pi-ai's registry, since OpenRouter supports thousands of models.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:40:31 +08:00
Jiayuan Zhang
d7ccbf066e feat(core): add testProvider method to AsyncAgent
Queued through the serialization queue to safely switch provider,
send a minimal test prompt, and restore the previous provider.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:02:39 +08:00
Bohan Jiang
98b8126c89
Merge pull request #120 from multica-ai/feat/subagent-concurrency-queue
feat(subagent): add concurrency queue and default timeout
2026-02-10 20:04:16 +08:00
Jiang Bohan
d78f8480bf chore(agent): remove debug invalid tool-call injection 2026-02-10 19:53:33 +08:00
Jiang Bohan
db25f8f44a chore(agent): add debug hook to inject invalid tool call id 2026-02-10 19:43:49 +08:00
Jiang Bohan
e2d4803f8b fix(agent): sanitize invalid tool call ids in context 2026-02-10 19:33:44 +08:00
Jiang Bohan
683dfa759b feat(subagent): integrate command queue and configurable timeout
Wire registry and sessions_spawn through the lane-based queue so
sub-agents respect max concurrency. Add resolveSubagentTimeoutMs()
with defaults (10 min), 0 = no timeout, and safe clamping.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 19:27:26 +08:00
Jiang Bohan
240fdd1286 feat(subagent): add lane-based command queue with concurrency control
Introduces a command queue system adapted from OpenClaw to prevent
unbounded sub-agent spawning. Default max concurrency: 10.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 19:27:19 +08:00
Naiyuan Qing
6ef58a0cab refactor: restructure to monorepo architecture
- Move core agent engine to packages/core/
- Add packages/types/ for shared TypeScript types
- Add packages/utils/ for utility functions
- Add apps/cli/ for command-line interface
- Add apps/gateway/ for NestJS WebSocket gateway
- Add apps/server/ for REST API server
- Restructure desktop app (electron/ → src/main/, src/preload/)
- Update pnpm workspace configuration
- Remove legacy src/ directory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 18:00:23 +08:00