feat(web): project plan mode through host API
This commit is contained in:
@@ -44,6 +44,16 @@ export interface SessionSummary {
|
||||
cwd?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Plan collaboration state exposed to clients. `active` is the logged state
|
||||
* shaping the current request; `pending`, when present, is the user's
|
||||
* next-boundary selection.
|
||||
*/
|
||||
export interface PlanModeState {
|
||||
active: boolean
|
||||
pending?: boolean
|
||||
}
|
||||
|
||||
/** Session-domain unary methods (the map keys session.* of RpcMethodMap). */
|
||||
export interface SessionsApi {
|
||||
/** Lists persisted sessions (updatedAt descending). v1 returns everything; cursor is a reserved seat, unimplemented. */
|
||||
@@ -70,4 +80,18 @@ export interface SessionsApi {
|
||||
|
||||
/** Stops: clears both FIFOs + aborts the current step (1:1 with agent.cancel). */
|
||||
cancel(request: RpcRequest<{ sessionId: SessionId }>): Promise<RpcResponse<{ accepted: true }>>
|
||||
|
||||
/**
|
||||
* Reads plan collaboration state. `null` means the host did not compose the
|
||||
* optional plan-mode service; it is distinct from inactive state.
|
||||
*/
|
||||
planMode(request: RpcRequest<{ sessionId: SessionId }>): Promise<RpcResponse<PlanModeState | null>>
|
||||
|
||||
/**
|
||||
* Selects plan collaboration state for the next model-request boundary.
|
||||
* The returned state exposes the still-committed value and pending target;
|
||||
* `null` means plan mode is unavailable on this host.
|
||||
*/
|
||||
setPlanMode(request: RpcRequest<{ sessionId: SessionId; active: boolean }>):
|
||||
Promise<RpcResponse<PlanModeState | null>>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user