refactor(sdk): unify gateway-sdk into @multica/sdk package

Sync latest code from src/shared/gateway-sdk/ into packages/sdk/,
update all backend imports to use @multica/sdk, and remove the
duplicate src/shared/gateway-sdk/ directory.

- Translate Chinese comments to English in SDK source
- Fix package.json exports with default condition
- Add @multica/sdk as workspace dependency for backend
- Update imports in gateway, test-client, and hub

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Naiyuan Qing 2026-02-02 13:43:52 +08:00
parent f4500ad148
commit 3d7b13555f
17 changed files with 42 additions and 1108 deletions

View file

@ -1,8 +1,7 @@
import type { HubOptions } from "./types.js";
import type { ConnectionState } from "../shared/gateway-sdk/types.js";
import { GatewayClient, type ConnectionState } from "@multica/sdk";
import { AsyncAgent } from "../agent/async-agent.js";
import { getHubId } from "./hub-identity.js";
import { GatewayClient } from "../shared/gateway-sdk/client.js";
import { loadAgentRecords, addAgentRecord, removeAgentRecord } from "./agent-store.js";
export class Hub {