`CommandService.list` and `execute` carry the wire contract directly through `@Remote`, and the Client assembly mounts the generated commands contribution. The legacy API Proxy route, its schemas, the map rows, the generated client methods and the fixture's command domain are removed, so the catalog and the admission call have one owner again. `Session.command()` keeps a result-shaped public face for parity with the prompt, cancel and attachment neighbours it sits beside, and reads the generated namespace through one `SessionRemotes` parameter. The Session cluster declares that face against the owning business package rather than the generated contribution: the Host compiler aggregate builds this package, and it runs before any contribution is emitted. Migrated calls lose the `title-invalid` class of protocol-only error codes and report `internal`; no production caller branched on them.
55 lines
2.7 KiB
TypeScript
55 lines
2.7 KiB
TypeScript
// Central contract re-export point: every contract import inside
|
|
// web-runtime goes through this single file.
|
|
// Types and runtime protocol helpers/bounds come from the apiproxy api/ layer
|
|
// (zero Node deps, browser-safe); AbstractApiClient is the client boundary.
|
|
// NEVER import the package root: it drags bootHost/cordis into the browser bundle.
|
|
// The ./api and ./client subpath exports are the browser-safe channels.
|
|
|
|
export type {
|
|
ApiProxy, SessionsApi, SessionSearchItem, SessionSummary, PromptContentPart, HostApi, EventsApi, MuxFrame, HostFrame,
|
|
ApprovalResponsePayload, QuestionResponsePayload, HistoryEntry, ToolEventView,
|
|
DirectoryEntry, DirectoryListing,
|
|
ResponseValue, WorkspaceApi, WorkspaceId, WorkspaceView,
|
|
SkillsApi, SkillEntry,
|
|
ModelCatalogFailure, ModelCatalogModel, ModelProviderGroup, ModelReasoning,
|
|
ModelReasoningEffort, ModelSelection, QueueAction, QueuedInboxItem, SessionModels,
|
|
GoalsApi, GoalRef,
|
|
SettingsApi, SettingsNamespaceView, SettingsPathOpView, SettingsSecretView,
|
|
CredentialsApi, CredentialView, ConfigurableProviderView, DiscoveredModelView, LlmApi,
|
|
SubagentsApi, SubagentAddress, SubagentCatalog, SubagentListEntry, SubagentPromptReceipt,
|
|
TaskView,
|
|
} from '@deepseek-ai/dsh-host-apiproxy/api'
|
|
export type { ToolCallView, ToolResultView } from '@deepseek-ai/dsh-tools/presentation'
|
|
export type {
|
|
RpcRequest, RpcResponse, RpcResult, RpcError, RpcErrorCode,
|
|
ClientRequest, ServerResponse, ServerRequest, ClientResponse, RpcMessage, RpcReceipt,
|
|
} from '@deepseek-ai/dsh-host-apiproxy/api'
|
|
// transportError lives in the apiproxy api layer (beside RpcResult, its
|
|
// subject); re-exported here so connection consumers keep one contract
|
|
// entry point.
|
|
export {
|
|
RpcId,
|
|
SESSION_SEARCH_RESULT_LIMIT,
|
|
transportError,
|
|
} from '@deepseek-ai/dsh-host-apiproxy/api'
|
|
export { AbstractApiClient } from '@deepseek-ai/dsh-host-apiproxy/client'
|
|
export type { IApiClient } from '@deepseek-ai/dsh-host-apiproxy/client'
|
|
export type { SessionId, SessionEvent } from '@deepseek-ai/dsh-session/types'
|
|
export type { MessageId } from '@deepseek-ai/dsh-llm/brand'
|
|
export type { ContentBlock, StreamChunk } from '@deepseek-ai/dsh-llm/types'
|
|
|
|
/** Successful value returned by the connection-generation host handshake. */
|
|
export type HostDescription = import('@deepseek-ai/dsh-host-apiproxy/api').ResponseValue<'host.describe'>
|
|
|
|
import type { RpcResponse, RpcResult } from '@deepseek-ai/dsh-host-apiproxy/api'
|
|
|
|
/**
|
|
* Unwrap a unary response: RpcResponse<T> -> RpcResult<T> (business code only
|
|
* cares about the result slot).
|
|
* @param response - the unary response.
|
|
* @returns its result slot.
|
|
*/
|
|
export function resultOf<T>(response: RpcResponse<T>): RpcResult<T> {
|
|
return response.result
|
|
}
|