Commit graph

11 commits

Author SHA1 Message Date
yushen
eb4ce85602 refactor(hub): rename Device ID to Hub ID in console layer
Rename the business-layer concept from "Device ID" to "Hub ID" for
better user comprehension. The underlying network transport layer
still uses deviceId — Hub ID is passed as the deviceId value.

- Rename device.ts → hub-identity.ts, getDeviceId → getHubId
- Storage file: ~/.super-multica/device-id → ~/.super-multica/hub-id
- Hub property: deviceId → hubId
- API response field: deviceId → hubId
- Console UI label: "Device ID" → "Hub ID"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:02:00 +08:00
yushen
c6d0476679 feat(hub): persist agent list to disk for restart recovery
Store agent records in ~/.super-multica/agents/agents.json.
Hub restores agents on startup and updates the file on create/delete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:56:19 +08:00
yushen
36e9acb35f refactor(shared): extract DATA_DIR constant to shared/paths.ts
Replace hardcoded ~/.super-multica paths across agent and hub modules
with a single DATA_DIR constant exported from shared.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:49:35 +08:00
yushen
49540e63e7 refactor(hub): replace mock Agent with AsyncAgent
Hub now uses AsyncAgent from src/agent/ instead of its own Agent
implementation. Deleted hub/agent.ts and hub/channel.ts as they
are no longer needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:58:21 +08:00
LinYushen
1bf2b47fca
Merge pull request #24 from multica-ai/ldnvnbl/hub-gateway-config
Add gateway URL configuration to Hub Console
2026-01-30 11:01:39 +08:00
yushen
6deac2f76a Add gateway URL configuration to Hub Console
Allow changing the gateway connection URL at runtime via a new
PUT /hub/gateway endpoint and a corresponding input form in the
console UI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:01:06 +08:00
Jiayuan
3a435aac8a
docs: translate comments from Chinese to English (#15)
Translate all comments, JSDoc strings, and documentation text from Chinese to English across 19 files for improved accessibility and consistency with the broader developer community.

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-30 04:01:14 +08:00
Jiayuan
49122e252b feat(agent): add session persistence and compaction 2026-01-30 01:29:21 +08:00
Jiayuan
5fdae53687 refactor(agent): split runner, tools, output, types 2026-01-30 01:12:48 +08:00
Jiayuan
8c2b6563d2 feat(agent): add pi-agent core integration and test CLI 2026-01-30 01:04:39 +08:00
yushen
dcca9333ab Add Hub Console with agent management and message routing
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>
2026-01-29 16:14:29 +08:00