Files
deepseek-harness/packages/host/apiproxy/src/api/host.ts
2026-07-27 03:50:22 -07:00

32 lines
1.2 KiB
TypeScript

/**
* host domain contract. No protocol version: client and host ship
* together; introduce protocolVersion only when an independently released client appears.
*/
import type { RpcRequest, RpcResponse } from './rpc.ts'
/** Host-level unary methods. */
export interface HostApi {
/**
* One-shot host snapshot. Empty payload uses the literal `{}` (extend in place when fields arrive).
* version = the host app's (apps/cli) package.json version; cwd = the host process working
* directory (root for session persistence and tool execution); provider/model = the defaults
* applied when a new agent doesn't specify them explicitly, absent when the host configures
* no explicit default (the adapter falls back internally);
* attachedSessions = count of currently attached sessions (those with a live agent).
*/
describe(request: RpcRequest<{}>): Promise<RpcResponse<{
version: string
cwd: string
provider?: string
model?: string
attachedSessions: number
}>>
/** Open the operating system's single-directory picker; cancellation returns null. */
pickDirectory(
request: RpcRequest<{}>,
signal: AbortSignal,
): Promise<RpcResponse<{ path: string | null }>>
}