/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
import { z } from 'zod'

const ContentBlockRemoteCodec$schema = z.union([z.object({
  'type': z.literal("text"),
  'text': z.string(),
}), z.object({
  'type': z.literal("image"),
  'attachment': z.object({
  'attachmentId': z.intersection(z.string(), z.unknown()),
  'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
  'bytes': z.number(),
  'width': z.number(),
  'height': z.number(),
  'name': z.string().optional(),
  'originalDimensions': z.object({
  'width': z.number(),
  'height': z.number(),
}).optional(),
}),
}), z.object({
  'type': z.literal("reasoning"),
  'text': z.string(),
}), z.object({
  'type': z.literal("tool-call"),
  'id': z.intersection(z.string(), z.unknown()),
  'name': z.string(),
  'arguments': z.string(),
}), z.object({
  'type': z.literal("tool-result"),
  'toolCallId': z.intersection(z.string(), z.unknown()),
  'content': z.array(z.lazy(() => ContentBlockRemoteCodec$schema)),
  'isError': z.boolean().optional(),
})])
const JsonValueRemoteCodec$schema = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema))])
const JsonValueRemoteCodec$schema2 = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema2)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema2))])
const JsonValueRemoteCodec$schema3 = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))])
const JsonValueRemoteCodec$schema4 = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))])
const _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1$schema = z.string()
const _deepseek_ai_dsh_api_session_controller_fileReferences_list_result$schema = z.array(z.object({
  'path': z.string(),
  'kind': z.union([z.literal("file"), z.literal("directory")]),
}))
const _deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0$schema = z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'attachmentId': z.intersection(z.string(), z.unknown()).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema = z.object({
  'attachment': z.object({
  'attachmentId': z.intersection(z.string(), z.unknown()),
  'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
  'bytes': z.number(),
  'width': z.number(),
  'height': z.number(),
  'name': z.string().optional(),
  'originalDimensions': z.object({
  'width': z.number(),
  'height': z.number(),
}).optional(),
}).readonly(),
  'data': z.string().readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0$schema = z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema = z.object({
  'accepted': z.literal(true).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_canOpenWorkspacePath_result$schema = z.boolean()
const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = z.union([z.object({
  'type': z.literal("baseline").readonly(),
  'value': z.object({
  'queues': z.record(z.intersection(z.string(), z.unknown()), z.array(z.object({
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'placement': z.union([z.literal("queued"), z.literal("steering"), z.literal("context")]).readonly(),
  'rpcId': z.intersection(z.string(), z.unknown()).readonly().optional(),
  'message': z.object({
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'content': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))])).readonly(),
}).readonly(),
}))).readonly().readonly(),
  'jobs': z.record(z.intersection(z.string(), z.unknown()), z.array(z.object({
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'kind': z.string().readonly(),
  'label': z.string().readonly(),
  'status': z.union([z.literal("completed"), z.literal("running"), z.literal("stopping"), z.literal("killed"), z.literal("failed")]).readonly(),
  'detail': z.string().readonly().optional(),
  'startedAt': z.number().readonly(),
  'finishedAt': z.number().readonly().optional(),
}))).readonly().readonly(),
  'projections': z.record(z.intersection(z.string(), z.unknown()), z.object({
  'asOfSeq': z.number().readonly(),
  'values': z.intersection(z.object({
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
  'title': z.union([z.literal(null), z.string()]).optional(),
  'todos': z.union([z.literal(null), z.array(z.object({
  'content': z.string(),
  'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed")]),
}))]).optional(),
  'sessionListMetadata': z.object({
  'blank': z.boolean().readonly(),
  'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
}).optional(),
  'imageLimits': z.object({
  'maxImageBytes': z.number(),
  'maxImagesPerMessage': z.number(),
  'maxMessageImageBytes': z.number(),
  'maxImagePixels': z.number(),
  'maxImageDimension': z.number(),
  'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
}).optional(),
  'modelSelection': z.object({
  'lastUsed': z.union([z.literal(null), z.object({
  'provider': z.string().readonly(),
  'model': z.string().readonly(),
  'reasoningEffort': z.string().readonly().optional(),
})]).readonly(),
  'next': z.union([z.literal(null), z.object({
  'provider': z.string().readonly(),
  'model': z.string().readonly(),
  'reasoningEffort': z.string().readonly().optional(),
})]).readonly(),
}).optional(),
  'subagentTiming': z.object({
  'settledMs': z.number(),
  'active': z.object({
  'since': z.number(),
  'through': z.number(),
}).optional(),
}).optional(),
  'subagent': z.union([z.literal(null), z.object({
  'mode': z.literal("one-shot"),
  'label': z.string().optional(),
  'seq': z.number(),
}), z.object({
  'mode': z.literal("continuable"),
  'label': z.string(),
  'seq': z.number(),
})]).optional(),
  'goal': z.union([z.literal(null), z.object({
  'goal': z.object({
  'objective': z.string().readonly(),
  'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
  'blockedReason': z.object({
  'code': z.string().readonly(),
  'message': z.string().readonly(),
}).readonly().optional(),
  'maxGoalRounds': z.number().readonly(),
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'revision': z.number().readonly(),
}).readonly(),
  'roundsStarted': z.number().readonly(),
  'createdAt': z.number().readonly(),
  'updatedAt': z.number().readonly(),
})]).optional(),
}), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))])).readonly()).readonly(),
})).readonly().readonly(),
}).readonly(),
}), z.object({
  'type': z.literal("queue").readonly(),
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'items': z.array(z.object({
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'placement': z.union([z.literal("queued"), z.literal("steering"), z.literal("context")]).readonly(),
  'rpcId': z.intersection(z.string(), z.unknown()).readonly().optional(),
  'message': z.object({
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'content': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))])).readonly(),
}).readonly(),
})).readonly(),
}), z.object({
  'type': z.literal("jobs").readonly(),
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'jobs': z.array(z.object({
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'kind': z.string().readonly(),
  'label': z.string().readonly(),
  'status': z.union([z.literal("completed"), z.literal("running"), z.literal("stopping"), z.literal("killed"), z.literal("failed")]).readonly(),
  'detail': z.string().readonly().optional(),
  'startedAt': z.number().readonly(),
  'finishedAt': z.number().readonly().optional(),
})).readonly(),
}), z.intersection(z.object({
  'type': z.literal("projection").readonly(),
}), z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'key': z.string().readonly(),
  'value': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))]).readonly(),
  'seq': z.number().readonly(),
}))])
const _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema = z.object({
  'workspaceId': z.intersection(z.string(), z.unknown()).readonly().optional(),
  'cwd': z.string().readonly().optional(),
  'sessionId': z.intersection(z.string(), z.unknown()).readonly().optional(),
  'agentPreset': z.string().readonly().optional(),
})
const _deepseek_ai_dsh_api_session_controller_session_create_result$schema = z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'agentPreset': z.string().readonly().optional(),
})
const _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0$schema = z.object({
  'address': z.union([z.object({
  'kind': z.literal("session").readonly(),
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
}), z.object({
  'kind': z.literal("subagent").readonly(),
  'parentSessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'childSessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'mode': z.union([z.literal("one-shot"), z.literal("continuable")]).readonly(),
})]).readonly(),
  'maxMessages': z.number().readonly().optional(),
})
const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = z.union([z.object({
  'type': z.literal("event").readonly(),
  'event': z.object({
  'type': z.string().readonly(),
  'seq': z.number().readonly(),
  'time': z.number().readonly(),
  'data': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly(),
  'sourceEventSeqs': z.array(z.number()).readonly().optional(),
  'surfaceOp': z.union([z.literal("append"), z.object({
  'op': z.literal("replace"),
  'start': z.number(),
  'end': z.number(),
})]).readonly().optional(),
}).readonly(),
}), z.object({
  'type': z.literal("snapshot").readonly(),
  'header': z.object({
  'version': z.number().readonly(),
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'createdAt': z.number().readonly(),
  'cwd': z.string().readonly().optional(),
  'parentSession': z.intersection(z.string(), z.unknown()).readonly().optional(),
  'seedLength': z.number().readonly().optional(),
  'origin': z.literal("subagent").readonly().optional(),
  'delegationDepth': z.number().readonly().optional(),
  'agentPreset': z.string().readonly().optional(),
}).readonly(),
  'cursor': z.number().readonly(),
  'records': z.array(z.union([z.object({
  'type': z.literal("event").readonly(),
  'event': z.object({
  'type': z.string().readonly(),
  'seq': z.number().readonly(),
  'time': z.number().readonly(),
  'data': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly(),
  'sourceEventSeqs': z.array(z.number()).readonly().optional(),
  'surfaceOp': z.union([z.literal("append"), z.object({
  'op': z.literal("replace"),
  'start': z.number(),
  'end': z.number(),
})]).readonly().optional(),
}).readonly(),
}), z.object({
  'type': z.literal("chunks").readonly(),
  'event': z.union([z.object({
  'type': z.literal("chunkrow/text-chunks").readonly(),
  'seq': z.number().readonly(),
  'time': z.number().readonly(),
  'data': z.object({
  'texts': z.array(z.string()),
  'turn': z.number(),
  'step': z.number(),
  'index': z.number(),
  'dt': z.array(z.number()),
}).readonly(),
}), z.object({
  'type': z.literal("chunkrow/reasoning-chunks").readonly(),
  'seq': z.number().readonly(),
  'time': z.number().readonly(),
  'data': z.object({
  'texts': z.array(z.string()),
  'turn': z.number(),
  'step': z.number(),
  'index': z.number(),
  'dt': z.array(z.number()),
}).readonly(),
}), z.object({
  'type': z.literal("chunkrow/tool-call-chunks").readonly(),
  'seq': z.number().readonly(),
  'time': z.number().readonly(),
  'data': z.object({
  'id': z.intersection(z.string(), z.unknown()),
  'name': z.string().optional(),
  'args': z.array(z.string()),
  'turn': z.number(),
  'step': z.number(),
  'index': z.number(),
  'dt': z.array(z.number()),
}).readonly(),
})]).readonly(),
})])).readonly(),
  'hasMore': z.boolean().readonly(),
  'projections': z.object({
  'asOfSeq': z.number().readonly(),
  'values': z.intersection(z.object({
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
  'title': z.union([z.literal(null), z.string()]).optional(),
  'todos': z.union([z.literal(null), z.array(z.object({
  'content': z.string(),
  'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed")]),
}))]).optional(),
  'sessionListMetadata': z.object({
  'blank': z.boolean().readonly(),
  'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
}).optional(),
  'imageLimits': z.object({
  'maxImageBytes': z.number(),
  'maxImagesPerMessage': z.number(),
  'maxMessageImageBytes': z.number(),
  'maxImagePixels': z.number(),
  'maxImageDimension': z.number(),
  'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
}).optional(),
  'modelSelection': z.object({
  'lastUsed': z.union([z.literal(null), z.object({
  'provider': z.string().readonly(),
  'model': z.string().readonly(),
  'reasoningEffort': z.string().readonly().optional(),
})]).readonly(),
  'next': z.union([z.literal(null), z.object({
  'provider': z.string().readonly(),
  'model': z.string().readonly(),
  'reasoningEffort': z.string().readonly().optional(),
})]).readonly(),
}).optional(),
  'subagentTiming': z.object({
  'settledMs': z.number(),
  'active': z.object({
  'since': z.number(),
  'through': z.number(),
}).optional(),
}).optional(),
  'subagent': z.union([z.literal(null), z.object({
  'mode': z.literal("one-shot"),
  'label': z.string().optional(),
  'seq': z.number(),
}), z.object({
  'mode': z.literal("continuable"),
  'label': z.string(),
  'seq': z.number(),
})]).optional(),
  'goal': z.union([z.literal(null), z.object({
  'goal': z.object({
  'objective': z.string().readonly(),
  'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
  'blockedReason': z.object({
  'code': z.string().readonly(),
  'message': z.string().readonly(),
}).readonly().optional(),
  'maxGoalRounds': z.number().readonly(),
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'revision': z.number().readonly(),
}).readonly(),
  'roundsStarted': z.number().readonly(),
  'createdAt': z.number().readonly(),
  'updatedAt': z.number().readonly(),
})]).optional(),
}), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))])).readonly()).readonly(),
}).readonly(),
})])
const _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema = z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'atSeq': z.number().readonly().optional(),
})
const _deepseek_ai_dsh_api_session_controller_session_fork_result$schema = z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_list_parameter_0$schema = z.object({
  'cursor': z.string().readonly().optional(),
})
const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = z.object({
  'items': z.array(z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'updatedAt': z.number().readonly(),
  'running': z.boolean().readonly(),
  'blank': z.boolean().readonly(),
  'parentSessionId': z.intersection(z.string(), z.unknown()).readonly().optional(),
  'origin': z.literal("subagent").readonly().optional(),
  'cwd': z.string().readonly().optional(),
  'projections': z.object({
  'asOfSeq': z.number().readonly(),
  'values': z.intersection(z.object({
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
  'title': z.union([z.literal(null), z.string()]).optional(),
  'todos': z.union([z.literal(null), z.array(z.object({
  'content': z.string(),
  'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed")]),
}))]).optional(),
  'sessionListMetadata': z.object({
  'blank': z.boolean().readonly(),
  'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
}).optional(),
  'imageLimits': z.object({
  'maxImageBytes': z.number(),
  'maxImagesPerMessage': z.number(),
  'maxMessageImageBytes': z.number(),
  'maxImagePixels': z.number(),
  'maxImageDimension': z.number(),
  'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
}).optional(),
  'modelSelection': z.object({
  'lastUsed': z.union([z.literal(null), z.object({
  'provider': z.string().readonly(),
  'model': z.string().readonly(),
  'reasoningEffort': z.string().readonly().optional(),
})]).readonly(),
  'next': z.union([z.literal(null), z.object({
  'provider': z.string().readonly(),
  'model': z.string().readonly(),
  'reasoningEffort': z.string().readonly().optional(),
})]).readonly(),
}).optional(),
  'subagentTiming': z.object({
  'settledMs': z.number(),
  'active': z.object({
  'since': z.number(),
  'through': z.number(),
}).optional(),
}).optional(),
  'subagent': z.union([z.literal(null), z.object({
  'mode': z.literal("one-shot"),
  'label': z.string().optional(),
  'seq': z.number(),
}), z.object({
  'mode': z.literal("continuable"),
  'label': z.string(),
  'seq': z.number(),
})]).optional(),
  'goal': z.union([z.literal(null), z.object({
  'goal': z.object({
  'objective': z.string().readonly(),
  'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
  'blockedReason': z.object({
  'code': z.string().readonly(),
  'message': z.string().readonly(),
}).readonly().optional(),
  'maxGoalRounds': z.number().readonly(),
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'revision': z.number().readonly(),
}).readonly(),
  'roundsStarted': z.number().readonly(),
  'createdAt': z.number().readonly(),
  'updatedAt': z.number().readonly(),
})]).optional(),
}), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema))])).readonly()).readonly(),
}).readonly().optional(),
})).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema = z.object({
  'default': z.object({
  'provider': z.string().readonly(),
  'model': z.string().readonly(),
  'reasoningEffort': z.string().readonly().optional(),
}).readonly(),
  'routableProviders': z.array(z.string()).readonly(),
  'groups': z.array(z.object({
  'id': z.string().readonly(),
  'name': z.string().readonly(),
  'models': z.array(z.object({
  'id': z.string().readonly(),
  'name': z.string().readonly(),
  'description': z.string().readonly().optional(),
  'reasoning': z.object({
  'efforts': z.array(z.object({
  'id': z.string().readonly(),
  'name': z.string().readonly(),
  'description': z.string().readonly().optional(),
})).readonly(),
  'defaultEffort': z.string().readonly().optional(),
}).readonly().optional(),
})).readonly(),
})).readonly(),
  'failures': z.array(z.object({
  'id': z.string().readonly(),
  'name': z.string().readonly(),
  'message': z.string().readonly(),
})).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema = z.object({
  'path': z.string().readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema = z.object({
  'opened': z.literal(true).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_page_parameter_0$schema = z.object({
  'address': z.union([z.object({
  'kind': z.literal("session").readonly(),
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
}), z.object({
  'kind': z.literal("subagent").readonly(),
  'parentSessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'childSessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'mode': z.union([z.literal("one-shot"), z.literal("continuable")]).readonly(),
})]).readonly(),
  'throughSeq': z.number().readonly(),
  'beforeSeq': z.number().readonly().optional(),
  'maxMessages': z.number().readonly().optional(),
})
const _deepseek_ai_dsh_api_session_controller_session_page_result$schema = z.object({
  'records': z.array(z.union([z.object({
  'type': z.literal("event").readonly(),
  'event': z.object({
  'type': z.string().readonly(),
  'seq': z.number().readonly(),
  'time': z.number().readonly(),
  'data': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema2)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema2))]).readonly(),
  'sourceEventSeqs': z.array(z.number()).readonly().optional(),
  'surfaceOp': z.union([z.literal("append"), z.object({
  'op': z.literal("replace"),
  'start': z.number(),
  'end': z.number(),
})]).readonly().optional(),
}).readonly(),
}), z.object({
  'type': z.literal("chunks").readonly(),
  'event': z.union([z.object({
  'type': z.literal("chunkrow/text-chunks").readonly(),
  'seq': z.number().readonly(),
  'time': z.number().readonly(),
  'data': z.object({
  'texts': z.array(z.string()),
  'turn': z.number(),
  'step': z.number(),
  'index': z.number(),
  'dt': z.array(z.number()),
}).readonly(),
}), z.object({
  'type': z.literal("chunkrow/reasoning-chunks").readonly(),
  'seq': z.number().readonly(),
  'time': z.number().readonly(),
  'data': z.object({
  'texts': z.array(z.string()),
  'turn': z.number(),
  'step': z.number(),
  'index': z.number(),
  'dt': z.array(z.number()),
}).readonly(),
}), z.object({
  'type': z.literal("chunkrow/tool-call-chunks").readonly(),
  'seq': z.number().readonly(),
  'time': z.number().readonly(),
  'data': z.object({
  'id': z.intersection(z.string(), z.unknown()),
  'name': z.string().optional(),
  'args': z.array(z.string()),
  'turn': z.number(),
  'step': z.number(),
  'index': z.number(),
  'dt': z.array(z.number()),
}).readonly(),
})]).readonly(),
})])).readonly(),
  'hasMore': z.boolean().readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema = z.object({
  'requestId': z.intersection(z.string(), z.unknown()).readonly(),
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'mode': z.union([z.literal("queue"), z.literal("steer")]).readonly(),
  'content': z.array(z.union([z.object({
  'type': z.literal("text").readonly(),
  'text': z.string().readonly(),
}), z.object({
  'type': z.literal("image").readonly(),
  'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]).readonly(),
  'data': z.string().readonly(),
  'name': z.string().readonly().optional(),
})])).readonly(),
  'clientTimeZone': z.string().readonly().optional(),
})
const _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema = z.object({
  'accepted': z.literal(true).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_rename_parameter_0$schema = z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'title': z.string().readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_rename_result$schema = z.object({
  'title': z.string().readonly(),
  'seq': z.number().readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_search_parameter_0$schema = z.object({
  'query': z.string().readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_search_result$schema = z.object({
  'items': z.array(z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'snippet': z.string().readonly(),
})).readonly(),
  'hasMore': z.boolean().readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0$schema = z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'provider': z.string().readonly(),
  'model': z.string().readonly(),
  'reasoningEffort': z.string().readonly().optional(),
})
const _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema = z.object({
  'selected': z.object({
  'provider': z.string().readonly(),
  'model': z.string().readonly(),
  'reasoningEffort': z.string().readonly().optional(),
}).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0$schema = z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'itemId': z.intersection(z.string(), z.unknown()).readonly(),
  'action': z.union([z.object({
  'kind': z.literal("edit").readonly(),
  'content': z.array(z.union([z.object({
  'type': z.literal("text"),
  'text': z.string(),
}), z.object({
  'type': z.literal("image"),
  'attachment': z.object({
  'attachmentId': z.intersection(z.string(), z.unknown()),
  'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
  'bytes': z.number(),
  'width': z.number(),
  'height': z.number(),
  'name': z.string().optional(),
  'originalDimensions': z.object({
  'width': z.number(),
  'height': z.number(),
}).optional(),
}),
}), z.object({
  'type': z.literal("reasoning"),
  'text': z.string(),
}), z.object({
  'type': z.literal("tool-call"),
  'id': z.intersection(z.string(), z.unknown()),
  'name': z.string(),
  'arguments': z.string(),
}), z.object({
  'type': z.literal("tool-result"),
  'toolCallId': z.intersection(z.string(), z.unknown()),
  'content': z.array(z.lazy(() => ContentBlockRemoteCodec$schema)),
  'isError': z.boolean().optional(),
})])).readonly(),
}), z.object({
  'kind': z.literal("remove").readonly(),
}), z.object({
  'kind': z.literal("steer").readonly(),
})]).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema = z.object({
  'accepted': z.literal(true).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema = z.object({
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
})
const _deepseek_ai_dsh_api_session_controller_skills_list_result$schema = z.object({
  'skills': z.array(z.object({
  'name': z.string().readonly(),
  'description': z.string().readonly(),
  'whenToUse': z.string().readonly().optional(),
  'modelInvocable': z.boolean().readonly(),
})).readonly(),
})

export const TYPERT = {
  package: '@deepseek-ai/dsh-api-session-controller',
  face: 'host',
  schemas: [
  ],
  invocations: [
    {
      id: '@deepseek-ai/dsh-api-session-controller#fileReferences/list',
      service: 'sessionFileReferences',
      namespace: 'fileReferences',
      method: 'list',
      invocation: { kind: 'direct' },
      scope: {
        context: 'agent',
        wire: 'agentId',
      },
      parameters: [
        {
          name: 'agent',
          wire: 'agentId',
          source: 'lookup',
          lookup: 'agent',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
            schema: _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema,
          },
        },
        {
          name: 'query',
          wire: 'query',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller#fileReferences/list:query',
            schema: _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller#fileReferences/list:result',
        schema: _deepseek_ai_dsh_api_session_controller_fileReferences_list_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/file-references.ts","line":33,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/attachment',
      service: 'sessionController',
      namespace: 'session',
      method: 'attachment',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":337,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/cancel',
      service: 'sessionController',
      namespace: 'session',
      method: 'cancel',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":357,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath',
      service: 'sessionController',
      namespace: 'session',
      method: 'canOpenWorkspacePath',
      invocation: { kind: 'direct' },
      parameters: [
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath:result',
        schema: _deepseek_ai_dsh_api_session_controller_session_canOpenWorkspacePath_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":258,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/control',
      service: 'sessionController',
      namespace: 'session',
      method: 'control',
      mode: 'stream',
      invocation: { kind: 'direct' },
      parameters: [
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionControlFrame',
        schema: _deepseek_ai_dsh_api_session_controller_session_control_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":389,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/create',
      service: 'sessionController',
      namespace: 'session',
      method: 'create',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_create_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":230,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/follow',
      service: 'sessionController',
      namespace: 'session',
      method: 'follow',
      mode: 'stream',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowFrame',
        schema: _deepseek_ai_dsh_api_session_controller_session_follow_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":379,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/fork',
      service: 'sessionController',
      namespace: 'session',
      method: 'fork',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_fork_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":315,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/list',
      service: 'sessionController',
      namespace: 'session',
      method: 'list',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: '_request',
          wire: '_request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_list_parameter_0$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_list_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":209,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/modelCatalog',
      service: 'sessionController',
      namespace: 'session',
      method: 'modelCatalog',
      invocation: { kind: 'direct' },
      parameters: [
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#ModelCatalog',
        schema: _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":249,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/openWorkspacePath',
      service: 'sessionController',
      namespace: 'session',
      method: 'openWorkspacePath',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":270,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/page',
      service: 'sessionController',
      namespace: 'session',
      method: 'page',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPageRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_page_parameter_0$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPage',
        schema: _deepseek_ai_dsh_api_session_controller_session_page_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":368,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/prompt',
      service: 'sessionController',
      namespace: 'session',
      method: 'prompt',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":326,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/rename',
      service: 'sessionController',
      namespace: 'session',
      method: 'rename',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_rename_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_rename_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":305,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/search',
      service: 'sessionController',
      namespace: 'session',
      method: 'search',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_search_parameter_0$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_search_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":220,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/selectModel',
      service: 'sessionController',
      namespace: 'session',
      method: 'selectModel',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":240,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#session/updateQueue',
      service: 'sessionController',
      namespace: 'session',
      method: 'updateQueue',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueRequest',
            schema: _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueValue',
        schema: _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":347,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-session-controller#skills/list',
      service: 'sessionSkillCatalog',
      namespace: 'skills',
      method: 'list',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SkillListRequest',
            schema: _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SkillListValue',
        schema: _deepseek_ai_dsh_api_session_controller_skills_list_result$schema,
      },
      sourceLocation: {"file":"packages/api/session-controller/src/skill-catalog.ts","line":36,"column":9},
    },
  ],
  model: {
    "services": [
      {
        "description": "Host service backing the generated `ctx.remote.session` namespace.",
        "summary": "Host service backing the generated `ctx.remote.session` namespace.",
        "tags": [],
        "jsDoc": "/** Host service backing the generated `ctx.remote.session` namespace. */",
        "key": "sessionController",
        "exportName": "SessionController",
        "members": [
          {
            "kind": "method",
            "name": "resolveAgent",
            "signature": "resolveAgent(sessionId: SessionId): Promise<ApiSessionAgentResult>",
            "summary": "Resolve or resume one ordinary Session for another Host API domain.",
            "jsDoc": "/**\n * Resolve or resume one ordinary Session for another Host API domain.\n * @param sessionId - Session identity whose Agent owns the operation.\n * @returns the live Agent or the stable Session-domain failure.\n */"
          },
          {
            "kind": "method",
            "name": "inspect",
            "signature": "inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<{ meta: SessionHeader; events: SessionEvent[] }>",
            "summary": "Inspect one attached or persisted Session without activating its Agent.",
            "jsDoc": "/**\n * Inspect one attached or persisted Session without activating its Agent.\n * @param sessionId - durable Session identity.\n * @param signal - optional caller cancellation for persistence reads.\n * @returns the current attached state or persisted header and event prefix.\n */"
          },
          {
            "kind": "method",
            "name": "list",
            "signature": "@Remote('list') async list(_request: SessionListRequest, signal: AbortSignal): Promise<SessionListValue>",
            "summary": "Read all visible Session rows without resuming an Agent.",
            "jsDoc": "/**\n * Read all visible Session rows without resuming an Agent.\n * @param _request - reserved empty list request.\n * @param signal - cancellation for persistence reads.\n * @returns visible Session summaries ordered by activity.\n */"
          },
          {
            "kind": "method",
            "name": "search",
            "signature": "@Remote('search') search(request: SessionSearchRequest, signal: AbortSignal): Promise<SessionSearchValue>",
            "summary": "Search visible Session content without resuming an Agent.",
            "jsDoc": "/**\n * Search visible Session content without resuming an Agent.\n * @param request - literal message-content query.\n * @param signal - cancellation for list and search reads.\n * @returns authorized bounded Session search results.\n */"
          },
          {
            "kind": "method",
            "name": "create",
            "signature": "@Remote('create') create(request: SessionCreateRequest): Promise<SessionCreateValue>",
            "summary": "Create or idempotently adopt one ordinary Session.",
            "jsDoc": "/**\n * Create or idempotently adopt one ordinary Session.\n * @param request - requested identity, location, and Agent preset.\n * @returns the Session identity and resolved preset when configured.\n */"
          },
          {
            "kind": "method",
            "name": "selectModel",
            "signature": "@Remote('selectModel') selectModel(request: SessionSelectModelRequest): Promise<SessionSelectModelValue>",
            "summary": "Select one Session-local model after explicitly resuming the Session.",
            "jsDoc": "/**\n * Select one Session-local model after explicitly resuming the Session.\n * @param request - Session identity and requested model selection.\n * @returns the normalized selection installed for the Session.\n */"
          },
          {
            "kind": "method",
            "name": "modelCatalog",
            "signature": "@Remote('modelCatalog') modelCatalog(): Promise<ModelCatalog>",
            "summary": "Describe every currently routable model for Host-generation selectors.",
            "jsDoc": "/**\n * Describe every currently routable model for Host-generation selectors.\n * @returns provider-grouped models, the deployment default, and isolated provider failures.\n */"
          },
          {
            "kind": "method",
            "name": "canOpenWorkspacePath",
            "signature": "@Remote canOpenWorkspacePath(): boolean",
            "summary": "Report whether this deployment can hand a Session workspace path to a native desktop.",
            "jsDoc": "/**\n * Report whether this deployment can hand a Session workspace path to a native desktop.\n * @returns true when the matching open operation is available.\n */"
          },
          {
            "kind": "method",
            "name": "openWorkspacePath",
            "signature": "@Remote('openWorkspacePath') async openWorkspacePath( request: SessionOpenWorkspacePathRequest, signal: AbortSignal, ): Promise<SessionOpenWorkspacePathValue>",
            "summary": "Open one path prepared by a Session-aware caller on the Host desktop.",
            "jsDoc": "/**\n * Open one path prepared by a Session-aware caller on the Host desktop.\n * @param request - path after best-effort Session workspace resolution.\n * @param signal - caller lifetime; abort terminates the native command.\n * @returns confirmation after the native opener accepts the path.\n * @throws TypertRemoteFailure when the request is invalid, cancelled, or the opener fails.\n */"
          },
          {
            "kind": "method",
            "name": "rename",
            "signature": "@Remote('rename') rename(request: SessionRenameRequest): Promise<SessionRenameValue>",
            "summary": "Rename one Session after explicitly resuming it.",
            "jsDoc": "/**\n * Rename one Session after explicitly resuming it.\n * @param request - Session identity and proposed title.\n * @returns the accepted title and durable event sequence.\n */"
          },
          {
            "kind": "method",
            "name": "fork",
            "signature": "@Remote('fork') fork(request: SessionForkRequest): Promise<SessionForkValue>",
            "summary": "Fork one cold-readable completed-turn prefix into a new Session.",
            "jsDoc": "/**\n * Fork one cold-readable completed-turn prefix into a new Session.\n * @param request - source Session and optional event anchor.\n * @returns the new Session identity.\n */"
          },
          {
            "kind": "method",
            "name": "prompt",
            "signature": "@Remote('prompt') prompt(request: SessionPromptRequest, signal: AbortSignal): Promise<SessionPromptValue>",
            "summary": "Admit one prompt after explicitly resuming its Session.",
            "jsDoc": "/**\n * Admit one prompt after explicitly resuming its Session.\n * @param request - Session identity, prompt content, source metadata, and delivery mode.\n * @param signal - caller cancellation before prompt admission begins.\n * @returns acknowledgement that the Agent accepted the prompt.\n */"
          },
          {
            "kind": "method",
            "name": "attachment",
            "signature": "@Remote('attachment') attachment(request: SessionAttachmentRequest): Promise<SessionAttachmentValue>",
            "summary": "Read one image proven reachable from the addressed Session log.",
            "jsDoc": "/**\n * Read one image proven reachable from the addressed Session log.\n * @param request - Session and attachment identities used for authorization.\n * @returns the durable attachment reference and base64-encoded bytes.\n */"
          },
          {
            "kind": "method",
            "name": "updateQueue",
            "signature": "@Remote('updateQueue') updateQueue(request: SessionUpdateQueueRequest): SessionUpdateQueueValue",
            "summary": "Mutate one still-pending queue occurrence on a live Agent.",
            "jsDoc": "/**\n * Mutate one still-pending queue occurrence on a live Agent.\n * @param request - Session, queue item, and requested mutation.\n * @returns acknowledgement that the queue mutation was applied.\n */"
          },
          {
            "kind": "method",
            "name": "cancel",
            "signature": "@Remote('cancel') cancel(request: SessionCancelRequest): SessionCancelValue",
            "summary": "Cancel one active Agent turn without dropping its pending inbox.",
            "jsDoc": "/**\n * Cancel one active Agent turn without dropping its pending inbox.\n * @param request - Session whose active Agent turn is cancelled.\n * @returns acknowledgement that cancellation was requested.\n */"
          },
          {
            "kind": "method",
            "name": "page",
            "signature": "@Remote('page') page(request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>",
            "summary": "Read one cold-safe, message-aligned Session history page.",
            "jsDoc": "/**\n * Read one cold-safe, message-aligned Session history page.\n * @param request - durable address, backward cursor, and page budget.\n * @param signal - cancellation for persistence reads.\n * @returns one chronological page.\n */"
          },
          {
            "kind": "method",
            "name": "follow",
            "signature": "@Remote({ mode: 'stream' }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>",
            "summary": "Follow one Session log from its opening or resume cursor.",
            "jsDoc": "/**\n * Follow one Session log from its opening or resume cursor.\n * @param request - durable address and last committed sequence already held by the caller.\n * @param signal - cancellation owned by the Remote stream carrier.\n * @returns a complete opening snapshot followed by gap-free event frames.\n */"
          },
          {
            "kind": "method",
            "name": "control",
            "signature": "@Remote({ mode: 'stream' }) control(signal: AbortSignal): AsyncIterable<SessionControlFrame>",
            "summary": "Stream a complete live-control baseline followed by replacement frames.",
            "jsDoc": "/**\n * Stream a complete live-control baseline followed by replacement frames.\n * @param signal - cancellation owned by the Remote stream carrier.\n * @returns one complete baseline followed by live replacement frames.\n */"
          }
        ],
        "types": [
          {
            "name": "Agent",
            "declaration": "export interface Agent {\n    readonly id: SessionId;\n    readonly options: AgentOptions;\n    readonly session: Session;\n    readonly inbox: Inbox;\n    readonly status: AgentStatus;\n    readonly ctx: Context;\n    cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n    whenIdle(): Promise<void>;\n    runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n    send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n    followup(message: UserMessage): void;\n    steer(message: UserMessage): void;\n    inject(message: UserMessage): void;\n}"
          },
          {
            "name": "AgentCancelCause",
            "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
          },
          {
            "name": "AgentOptions",
            "declaration": "export interface AgentOptions {\n    provider?: string;\n    model?: string;\n    reasoningEffort?: ReasoningEffortId;\n    maxTokens?: number;\n    subagentDepth?: number;\n}"
          },
          {
            "name": "AgentStatus",
            "declaration": "export type AgentStatus = 'idle' | 'running';"
          },
          {
            "name": "ApiSessionAgentError",
            "declaration": "export type ApiSessionAgentError = Extract<SessionError, { readonly code: 'session-not-found' | 'agent-busy' | 'internal'; }>;"
          },
          {
            "name": "ApiSessionAgentResult",
            "declaration": "export type ApiSessionAgentResult = { readonly agent: Agent; } | { readonly error: ApiSessionAgentError; };"
          },
          {
            "name": "ApprovalOutcome",
            "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
          },
          {
            "name": "ApprovalPolicy",
            "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
          },
          {
            "name": "ApprovalRequestId",
            "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
          },
          {
            "name": "AssistantMessage",
            "declaration": "export interface AssistantMessage extends Message {\n    readonly role: 'assistant';\n    readonly source: ModelMessageSource;\n}"
          },
          {
            "name": "AssistantProvenance",
            "declaration": "export interface AssistantProvenance {\n    provider: string;\n    model: string;\n    replayState?: unknown;\n}"
          },
          {
            "name": "AttachmentId",
            "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
          },
          {
            "name": "Branded",
            "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
          },
          {
            "name": "CancelOptions",
            "declaration": "export interface CancelOptions {\n    keepInbox?: boolean | undefined;\n}"
          },
          {
            "name": "ChunkRow",
            "declaration": "export type ChunkRow = { type: 'text-chunks'; seq0: number; time0: number; data: TextRunData; } | { type: 'reasoning-chunks'; seq0: number; time0: number; data: TextRunData; } | { type: 'tool-call-chunks'; seq0: number; time0: number; data: ToolCallRunData; };"
          },
          {
            "name": "ChunkRowEvent",
            "declaration": "export type ChunkRowEvent = { [Kind in ChunkRow['type']]: { readonly type: `chunkrow/${Kind}`; readonly seq: number; readonly time: number; readonly data: Extract<ChunkRow, { readonly type: Kind; }>['data']; } }[ChunkRow['type']];"
          },
          {
            "name": "CommandId",
            "declaration": "export type CommandId = Branded<'CommandId'>;"
          },
          {
            "name": "CommandSource",
            "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
          },
          {
            "name": "CommandSourceMap",
            "declaration": "export interface CommandSourceMap {\n    user: { kind: 'user'; };\n}"
          },
          {
            "name": "CompactionId",
            "declaration": "export type CompactionId = Branded<'CompactionId'>;"
          },
          {
            "name": "ContentBlock",
            "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
          },
          {
            "name": "ContentBlockMap",
            "declaration": "export interface ContentBlockMap {\n    text: TextBlock;\n    reasoning: ReasoningBlock;\n    image: ImageBlock;\n    'tool-call': ToolCallBlock;\n    'tool-result': ToolResultBlock;\n}"
          },
          {
            "name": "ContentBlockType",
            "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
          },
          {
            "name": "ContextFormed",
            "declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
          },
          {
            "name": "ContextSnapshotSection",
            "declaration": "export interface ContextSnapshotSection {\n    readonly name: string;\n    readonly text: string;\n}"
          },
          {
            "name": "ContinuableSubagentDescriptorData",
            "declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n    readonly mode: 'continuable';\n    readonly label: string;\n    readonly agentProvider?: string;\n    readonly agentModel?: string;\n    readonly agentReasoningEffort?: ReasoningEffortId;\n    readonly persona?: string;\n    readonly toolFilter?: ToolRestriction;\n}"
          },
          {
            "name": "CoordinatorMessageSource",
            "declaration": "export interface CoordinatorMessageSource {\n    readonly kind: 'coordinator';\n    readonly form: 'relay';\n    readonly senderSessionId: SessionId;\n}"
          },
          {
            "name": "EpochHeader",
            "declaration": "export interface EpochHeader {\n    config: LlmCallConfig;\n    adapterDefaults?: LlmCallConfigAdapterDefaults;\n    system?: string;\n    tools?: ToolSchema[];\n}"
          },
          {
            "name": "FinishReason",
            "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
          },
          {
            "name": "FinishReasonMap",
            "declaration": "export interface FinishReasonMap {\n    stop: { kind: 'stop'; };\n    'tool-calls': { kind: 'tool-calls'; };\n    'max-tokens': { kind: 'max-tokens'; };\n    aborted: { kind: 'aborted'; failure: LlmFailure; };\n    error: { kind: 'error'; failure: LlmFailure; };\n}"
          },
          {
            "name": "GoalBlockReason",
            "declaration": "export interface GoalBlockReason {\n    readonly code: string;\n    readonly message: string;\n}"
          },
          {
            "name": "GoalChangeMeta",
            "declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
          },
          {
            "name": "GoalClearChangeMeta",
            "declaration": "export interface GoalClearChangeMeta {\n    readonly kind: 'goal/change';\n    readonly version: 1;\n    readonly operation: 'clear';\n    readonly cleared: GoalRef;\n    readonly clearedAt: number;\n}"
          },
          {
            "name": "GoalId",
            "declaration": "export type GoalId = Branded<'GoalId'>;"
          },
          {
            "name": "GoalMessageSource",
            "declaration": "export interface GoalMessageSource {\n    readonly kind: 'goal';\n    readonly goalId: GoalId;\n    readonly revision: number;\n    readonly round: number;\n}"
          },
          {
            "name": "GoalOperation",
            "declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
          },
          {
            "name": "GoalPhase",
            "declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
          },
          {
            "name": "GoalProjection",
            "declaration": "export interface GoalProjection {\n    readonly goal: GoalSnapshot;\n    readonly roundsStarted: number;\n    readonly createdAt: number;\n    readonly updatedAt: number;\n}"
          },
          {
            "name": "GoalRef",
            "declaration": "export interface GoalRef {\n    readonly id: GoalId;\n    readonly revision: number;\n}"
          },
          {
            "name": "GoalSnapshot",
            "declaration": "export interface GoalSnapshot extends GoalRef {\n    readonly objective: string;\n    readonly phase: GoalPhase;\n    readonly blockedReason?: GoalBlockReason;\n    readonly maxGoalRounds: number;\n}"
          },
          {
            "name": "GoalSnapshotChangeMeta",
            "declaration": "export interface GoalSnapshotChangeMeta {\n    readonly kind: 'goal/change';\n    readonly version: 1;\n    readonly operation: Exclude<GoalOperation, 'clear'>;\n    readonly goal: GoalSnapshot;\n    readonly roundsStarted: number;\n    readonly createdAt: number;\n    readonly updatedAt: number;\n}"
          },
          {
            "name": "ImageAttachmentLimits",
            "declaration": "export interface ImageAttachmentLimits {\n    maxImageBytes: number;\n    maxImagesPerMessage: number;\n    maxMessageImageBytes: number;\n    maxImagePixels: number;\n    maxImageDimension: number;\n    mediaTypes: readonly ImageMediaType[];\n}"
          },
          {
            "name": "ImageAttachmentRef",
            "declaration": "export interface ImageAttachmentRef {\n    attachmentId: AttachmentId;\n    mediaType: ImageMediaType;\n    bytes: number;\n    width: number;\n    height: number;\n    name?: string;\n    originalDimensions?: { width: number; height: number; };\n}"
          },
          {
            "name": "ImageBlock",
            "declaration": "export interface ImageBlock {\n    type: 'image';\n    attachment: ImageAttachmentRef;\n}"
          },
          {
            "name": "ImageMediaType",
            "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
          },
          {
            "name": "Inbox",
            "declaration": "export class Inbox {\n    get nextTurn(): readonly UserMessage[];\n    get nextStep(): readonly UserMessage[];\n    get hasPending(): boolean;\n    clear(): void;\n    claim(target: InboxTarget, turn: number): UserMessage[];\n    append(target: InboxTarget, message: UserMessage): void;\n    prepend(target: InboxTarget, message: UserMessage): void;\n    replace(messageId: MessageId, newMessage: UserMessage): boolean;\n    remove(messageId: MessageId): boolean;\n    splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
          },
          {
            "name": "InboxTarget",
            "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
          },
          {
            "name": "JobId",
            "declaration": "export type JobId = Branded<'JobId'>;"
          },
          {
            "name": "JsonValue",
            "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
          },
          {
            "name": "LlmCallConfig",
            "declaration": "export interface LlmCallConfig {\n    provider: string;\n    model: string;\n    reasoningEffort?: ReasoningEffortId;\n    temperature?: number;\n    maxTokens?: number;\n    stop?: string[];\n}"
          },
          {
            "name": "LlmCallConfigAdapterDefaults",
            "declaration": "export interface LlmCallConfigAdapterDefaults {\n    reasoningEffort?: true;\n    maxTokens?: true;\n}"
          },
          {
            "name": "LlmFailure",
            "declaration": "export interface LlmFailure {\n    readonly message: string;\n    readonly code: string;\n    readonly status?: number;\n    readonly providerRetryAfterMs?: number;\n    readonly requestId?: ProviderRequestId;\n}"
          },
          {
            "name": "Message",
            "declaration": "export interface Message {\n    readonly id: MessageId;\n    readonly role: 'system' | 'user' | 'assistant';\n    readonly content: ContentBlock[];\n    readonly source: MessageSource;\n}"
          },
          {
            "name": "MessageId",
            "declaration": "export type MessageId = Branded<'MessageId'>;"
          },
          {
            "name": "MessageSource",
            "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
          },
          {
            "name": "MessageSourceMap",
            "declaration": "export interface MessageSourceMap {\n    user: { kind: 'user'; };\n    plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n    model: ModelMessageSource;\n    tool: ToolMessageSource;\n    'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n    coordinator: CoordinatorMessageSource;\n    'subagent-report': SubagentReportMessageSource;\n    'subagent-settled': SubagentSettledMessageSource;\n    'skill-invocation': SkillInvocationSource;\n    'team-message': TeamMessageSource;\n    goal: GoalMessageSource;\n    'session-reference': SessionReferenceSource;\n}"
          },
          {
            "name": "ModelCatalog",
            "declaration": "export interface ModelCatalog {\n    readonly default: ModelSelection;\n    readonly routableProviders: readonly string[];\n    readonly groups: readonly ModelProviderGroup[];\n    readonly failures: readonly ModelCatalogFailure[];\n}"
          },
          {
            "name": "ModelCatalogFailure",
            "declaration": "export interface ModelCatalogFailure {\n    readonly id: string;\n    readonly name: string;\n    readonly message: string;\n}"
          },
          {
            "name": "ModelCatalogModel",
            "declaration": "export interface ModelCatalogModel {\n    readonly id: string;\n    readonly name: string;\n    readonly description?: string;\n    readonly reasoning?: ModelReasoning;\n}"
          },
          {
            "name": "ModelMessageSource",
            "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n    kind: 'model';\n}"
          },
          {
            "name": "ModelProviderGroup",
            "declaration": "export interface ModelProviderGroup {\n    readonly id: string;\n    readonly name: string;\n    readonly models: readonly ModelCatalogModel[];\n}"
          },
          {
            "name": "ModelReasoning",
            "declaration": "export interface ModelReasoning {\n    readonly efforts: readonly ModelReasoningEffort[];\n    readonly defaultEffort?: string;\n}"
          },
          {
            "name": "ModelReasoningEffort",
            "declaration": "export interface ModelReasoningEffort {\n    readonly id: string;\n    readonly name: string;\n    readonly description?: string;\n}"
          },
          {
            "name": "ModelSelection",
            "declaration": "export interface ModelSelection {\n    readonly provider: string;\n    readonly model: string;\n    readonly reasoningEffort?: string;\n}"
          },
          {
            "name": "ModelSelectionProjection",
            "declaration": "export interface ModelSelectionProjection {\n    readonly lastUsed: ModelSelection | null;\n    readonly next: ModelSelection | null;\n}"
          },
          {
            "name": "OneShotSubagentDescriptorData",
            "declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n    readonly mode: 'one-shot';\n    readonly label?: string;\n}"
          },
          {
            "name": "PromptContentPart",
            "declaration": "export type PromptContentPart = { readonly type: 'text'; readonly text: string; } | { readonly type: 'image'; readonly mediaType: ImageMediaType; readonly data: string; readonly name?: string; };"
          },
          {
            "name": "ProviderRequestId",
            "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
          },
          {
            "name": "PtcDispatchEventData",
            "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n    isError: boolean;\n    content: ContentBlock[];\n}"
          },
          {
            "name": "PtcDispatchStartEventData",
            "declaration": "export interface PtcDispatchStartEventData {\n    rootCallId: ToolCallId;\n    parentCallId: ToolCallId;\n    subCallId: ToolCallId;\n    name: string;\n    arguments: unknown;\n}"
          },
          {
            "name": "QueueAction",
            "declaration": "export type QueueAction = { readonly kind: 'edit'; readonly content: readonly ContentBlock[]; } | { readonly kind: 'remove'; } | { readonly kind: 'steer'; };"
          },
          {
            "name": "ReasoningBlock",
            "declaration": "export interface ReasoningBlock {\n    type: 'reasoning';\n    text: string;\n}"
          },
          {
            "name": "ReasoningEffortId",
            "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
          },
          {
            "name": "ReplayEnvelope",
            "declaration": "export interface ReplayEnvelope {\n    response: unknown;\n    blocks?: readonly unknown[];\n}"
          },
          {
            "name": "RequestContext",
            "declaration": "export interface RequestContext {\n    provider: string;\n    model: string;\n    contextWindow?: number;\n}"
          },
          {
            "name": "RequestHeaderReason",
            "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
          },
          {
            "name": "RunDataBase",
            "declaration": "export interface RunDataBase {\n    turn: number;\n    step: number;\n    index: number;\n    dt: number[];\n}"
          },
          {
            "name": "SandboxMode",
            "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
          },
          {
            "name": "Session",
            "declaration": "export class Session {\n    get surface(): SessionSurface;\n    readonly header: SessionHeader;\n    get id(): SessionId;\n    readonly firstLiveSeq: number;\n    get events(): readonly SessionEvent[];\n    get seq(): number;\n    append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent] : []): SessionEvent<T>;\n    requestHeader(): EpochHeader | undefined;\n    requestContext(): RequestContext | undefined;\n    deriveMessages(): Message[];\n    deriveEventMessage(event: SessionEvent): Message | null;\n}"
          },
          {
            "name": "SessionAddress",
            "declaration": "export type SessionAddress = { readonly kind: 'session'; readonly sessionId: SessionId; } | { readonly kind: 'subagent'; readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly mode: 'one-shot' | 'continuable'; };"
          },
          {
            "name": "SessionAttachmentRequest",
            "declaration": "export interface SessionAttachmentRequest {\n    readonly sessionId: SessionId;\n    readonly attachmentId: AttachmentIdType;\n}"
          },
          {
            "name": "SessionAttachmentValue",
            "declaration": "export interface SessionAttachmentValue {\n    readonly attachment: ImageAttachmentRef;\n    readonly data: string;\n}"
          },
          {
            "name": "SessionCancelRequest",
            "declaration": "export interface SessionCancelRequest {\n    readonly sessionId: SessionId;\n}"
          },
          {
            "name": "SessionCancelValue",
            "declaration": "export interface SessionCancelValue {\n    readonly accepted: true;\n}"
          },
          {
            "name": "SessionChunkRun",
            "declaration": "export interface SessionChunkRun {\n    readonly type: 'chunks';\n    readonly event: ChunkRowEvent;\n}"
          },
          {
            "name": "SessionControlBaseline",
            "declaration": "export interface SessionControlBaseline {\n    readonly queues: Readonly<Record<SessionId, readonly SessionQueuedItem[]>>;\n    readonly jobs: Readonly<Record<SessionId, readonly SessionJob[]>>;\n    readonly projections: Readonly<Record<SessionId, SessionProjectionBaseline>>;\n}"
          },
          {
            "name": "SessionControlFrame",
            "declaration": "export type SessionControlFrame = { readonly type: 'baseline'; readonly value: SessionControlBaseline; } | { readonly type: 'queue'; readonly sessionId: SessionId; readonly items: readonly SessionQueuedItem[]; } | { readonly type: 'jobs'; readonly sessionId: SessionId; readonly jobs: readonly SessionJob[]; } | ({ readonly type: 'projection'; } & SessionProjectionUpdate);"
          },
          {
            "name": "SessionCreateRequest",
            "declaration": "export interface SessionCreateRequest {\n    readonly workspaceId?: WorkspaceId;\n    readonly cwd?: string;\n    readonly sessionId?: SessionId;\n    readonly agentPreset?: string;\n}"
          },
          {
            "name": "SessionCreateValue",
            "declaration": "export interface SessionCreateValue {\n    readonly sessionId: SessionId;\n    readonly agentPreset?: string;\n}"
          },
          {
            "name": "SessionError",
            "declaration": "export type SessionError = { [Code in keyof SessionErrorDetailsMap]: { readonly code: Code; readonly message: string; readonly details: SessionErrorDetailsMap[Code]; } }[keyof SessionErrorDetailsMap];"
          },
          {
            "name": "SessionErrorDetailsMap",
            "declaration": "export interface SessionErrorDetailsMap {\n    'bad-request': Record<never, never>;\n    cancelled: Record<never, never>;\n    'session-not-found': { readonly sessionId: SessionId; };\n    'model-unavailable': { readonly provider: string; readonly model: string; };\n    'session-conflict': { readonly sessionId: SessionId; readonly requestedCwd: string; readonly existingCwd?: string; };\n    'invalid-time-zone': { readonly value: string; };\n    'workspace-attach-failed': { readonly sessionId: SessionId; readonly workspaceId: string; };\n    'workspace-not-found': { readonly workspaceId: string; };\n    'agent-preset-conflict': { readonly sessionId: SessionId; readonly requestedPreset: string; readonly existingPreset?: string; };\n    'agent-preset-not-found': { readonly agentPreset: string; readonly available: readonly string[]; };\n    'agent-preset-invalid': { readonly agentPreset: string; readonly reason: string; };\n    'agent-busy': { readonly reason: string; };\n    'attachment-error': { readonly reason: string; };\n    'queue-item-not-found': { readonly itemId: MessageId; };\n    'steer-unavailable': { readonly itemId: MessageId; };\n    'title-invalid': { readonly sessionId: SessionId; };\n    'fork-unavailable': { readonly sessionId: SessionId; };\n    'subagent-not-found': { readonly parentSessionId: SessionId; readonly childSessionId: SessionId; };\n    'subagent-catalog-diagnostic': { readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly reason: 'corrupt' | 'unsupported' | 'unavailable'; };\n    'subagent-unauthorized': { readonly childSessionId: SessionId; };\n    internal: Record<never, never>;\n}"
          },
          {
            "name": "SessionEvent",
            "declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: number; time: number; data: SessionEventMap[K]; } & (K extends SurfaceEventType ? { sourceEventSeqs?: number[]; surfaceOp?: SurfaceOp; } : object) }[T];"
          },
          {
            "name": "SessionEventEntry",
            "declaration": "export interface SessionEventEntry {\n    readonly type: 'event';\n    readonly event: SessionWireEvent;\n}"
          },
          {
            "name": "SessionEventMap",
            "declaration": "export interface SessionEventMap {\n    'turn/start': { turn: number; };\n    'turn/end': { turn: number; reason: TurnEndReason; };\n    'step/start': { turn: number; step: number; };\n    'step/end': { turn: number; step: number; };\n    'user/message': UserMessage;\n    'assistant/chunk': { turn: number; step: number; chunk: StreamChunk; };\n    'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; interrupted?: true; };\n    'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n    'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; }; meta?: JsonValue; };\n    'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n    'request/context': RequestContext;\n    'session/end-seed': Record<string, never>;\n    'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n    'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n    'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n    'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n    'tool/code-dispatch-start': PtcDispatchStartEventData;\n    'tool/code-dispatch': PtcDispatchEventData;\n    'agent-preset/selected': { agentPreset: string; };\n    'session/title': SessionTitleEventData;\n    'todo/write': { todos: TodoItem[]; };\n    'model/selection': ModelSelection;\n    'subagent/descriptor': SubagentDescriptorData;\n    'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n    'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n    'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: number; };\n    'team/member': { version: 1; teamId: TeamId; member: TeamMemberSnapshot; };\n    'team/task': { version: 1; teamId: TeamId; task: TeamTaskSnapshot; };\n    'team/message/queued': { version: 1; teamId: TeamId; message: TeamMessageSnapshot; };\n    'team/message/delivered': { version: 1; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n    'goal/change': GoalChangeMeta;\n    'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n    'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: number; end: number; }; shadowedSeqs: number[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n    'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n    'compaction/prune': { shadowedRange: { start: number; end: number; }; shadowedSeqs: number[]; shadowedTokenCount: number; };\n}"
          },
          {
            "name": "SessionEventType",
            "declaration": "export type SessionEventType = keyof SessionEventMap;"
          },
          {
            "name": "SessionFollowFrame",
            "declaration": "export type SessionFollowFrame = { readonly type: 'snapshot'; readonly header: SessionHeader; readonly cursor: number; readonly records: readonly SessionHistoryRecord[]; readonly hasMore: boolean; readonly projections: SessionProjectionBaseline; } | SessionEventEntry;"
          },
          {
            "name": "SessionFollowRequest",
            "declaration": "export interface SessionFollowRequest {\n    readonly address: SessionAddress;\n    readonly maxMessages?: number;\n}"
          },
          {
            "name": "SessionForkRequest",
            "declaration": "export interface SessionForkRequest {\n    readonly sessionId: SessionId;\n    readonly atSeq?: number;\n}"
          },
          {
            "name": "SessionForkValue",
            "declaration": "export interface SessionForkValue {\n    readonly sessionId: SessionId;\n}"
          },
          {
            "name": "SessionHeader",
            "declaration": "export interface SessionHeader {\n    readonly version: number;\n    readonly id: SessionId;\n    readonly createdAt: number;\n    readonly cwd?: string;\n    readonly parentSession?: SessionId;\n    readonly seedLength?: number;\n    readonly origin?: 'subagent';\n    readonly delegationDepth?: number;\n    readonly agentPreset?: string;\n}"
          },
          {
            "name": "SessionHistoryRecord",
            "declaration": "export type SessionHistoryRecord = SessionEventEntry | SessionChunkRun;"
          },
          {
            "name": "SessionId",
            "declaration": "export type SessionId = Branded<'SessionId'>;"
          },
          {
            "name": "SessionJob",
            "declaration": "export interface SessionJob {\n    readonly id: JobId;\n    readonly kind: string;\n    readonly label: string;\n    readonly status: 'running' | 'stopping' | 'completed' | 'killed' | 'failed';\n    readonly detail?: string;\n    readonly startedAt: number;\n    readonly finishedAt?: number;\n}"
          },
          {
            "name": "SessionListMetadata",
            "declaration": "export interface SessionListMetadata {\n    readonly blank: boolean;\n    readonly lastPromptAt: number | null;\n}"
          },
          {
            "name": "SessionListRequest",
            "declaration": "export interface SessionListRequest {\n    readonly cursor?: string;\n}"
          },
          {
            "name": "SessionListValue",
            "declaration": "export interface SessionListValue {\n    readonly items: readonly SessionSummary[];\n}"
          },
          {
            "name": "SessionOpenWorkspacePathRequest",
            "declaration": "export interface SessionOpenWorkspacePathRequest {\n    readonly path: string;\n}"
          },
          {
            "name": "SessionOpenWorkspacePathValue",
            "declaration": "export interface SessionOpenWorkspacePathValue {\n    readonly opened: true;\n}"
          },
          {
            "name": "SessionPage",
            "declaration": "export interface SessionPage {\n    readonly records: readonly SessionHistoryRecord[];\n    readonly hasMore: boolean;\n}"
          },
          {
            "name": "SessionPageRequest",
            "declaration": "export interface SessionPageRequest {\n    readonly address: SessionAddress;\n    readonly throughSeq: number;\n    readonly beforeSeq?: number;\n    readonly maxMessages?: number;\n}"
          },
          {
            "name": "SessionProjectionBaseline",
            "declaration": "export interface SessionProjectionBaseline {\n    readonly asOfSeq: number;\n    readonly values: SessionProjectionValues;\n}"
          },
          {
            "name": "SessionProjectionHints",
            "declaration": "export interface SessionProjectionHints {\n    readonly asOfSeq: number;\n    readonly values: SessionProjectionValues;\n}"
          },
          {
            "name": "SessionProjectionMap",
            "declaration": "export interface SessionProjectionMap {\n    agentPreset: string | null;\n    title: string | null;\n    todos: TodoItem[] | null;\n    sessionListMetadata: SessionListMetadata;\n    imageLimits: ImageAttachmentLimits;\n    modelSelection: ModelSelectionProjection;\n    subagentTiming: SubagentTimingProjection;\n    subagent: SubagentIdentityProjection | null;\n    goal: GoalProjection | null;\n}"
          },
          {
            "name": "SessionProjectionUpdate",
            "declaration": "export interface SessionProjectionUpdate {\n    readonly sessionId: SessionId;\n    readonly key: string;\n    readonly value: JsonValue;\n    readonly seq: number;\n}"
          },
          {
            "name": "SessionProjectionValue",
            "declaration": "export type SessionProjectionValue = JsonValue;"
          },
          {
            "name": "SessionProjectionValues",
            "declaration": "export type SessionProjectionValues = Partial<SessionProjectionMap> & Readonly<Record<string, SessionProjectionValue>>;"
          },
          {
            "name": "SessionPromptRequest",
            "declaration": "export interface SessionPromptRequest {\n    readonly requestId: SessionRequestId;\n    readonly sessionId: SessionId;\n    readonly mode: 'queue' | 'steer';\n    readonly content: readonly PromptContentPart[];\n    readonly clientTimeZone?: string;\n}"
          },
          {
            "name": "SessionPromptValue",
            "declaration": "export interface SessionPromptValue {\n    readonly accepted: true;\n}"
          },
          {
            "name": "SessionQueuedItem",
            "declaration": "export interface SessionQueuedItem {\n    readonly id: MessageId;\n    readonly placement: 'queued' | 'steering' | 'context';\n    readonly rpcId?: SessionRequestId;\n    readonly message: { readonly id: MessageId; readonly content: readonly JsonValue[]; };\n}"
          },
          {
            "name": "SessionReferenceSource",
            "declaration": "export interface SessionReferenceSource {\n    kind: 'session-reference';\n    form: 'recall';\n    version: 1;\n    references: { sessionId: string; label: string; capturedThroughSeq: number | null; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
          },
          {
            "name": "SessionRenameRequest",
            "declaration": "export interface SessionRenameRequest {\n    readonly sessionId: SessionId;\n    readonly title: string;\n}"
          },
          {
            "name": "SessionRenameValue",
            "declaration": "export interface SessionRenameValue {\n    readonly title: string;\n    readonly seq: number;\n}"
          },
          {
            "name": "SessionRequestId",
            "declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
          },
          {
            "name": "SessionSearchItem",
            "declaration": "export interface SessionSearchItem {\n    readonly sessionId: SessionId;\n    readonly snippet: string;\n}"
          },
          {
            "name": "SessionSearchRequest",
            "declaration": "export interface SessionSearchRequest {\n    readonly query: string;\n}"
          },
          {
            "name": "SessionSearchValue",
            "declaration": "export interface SessionSearchValue {\n    readonly items: readonly SessionSearchItem[];\n    readonly hasMore: boolean;\n}"
          },
          {
            "name": "SessionSelectModelRequest",
            "declaration": "export interface SessionSelectModelRequest extends ModelSelection {\n    readonly sessionId: SessionId;\n}"
          },
          {
            "name": "SessionSelectModelValue",
            "declaration": "export interface SessionSelectModelValue {\n    readonly selected: ModelSelection;\n}"
          },
          {
            "name": "SessionSummary",
            "declaration": "export interface SessionSummary {\n    readonly sessionId: SessionId;\n    readonly updatedAt: number;\n    readonly running: boolean;\n    readonly blank: boolean;\n    readonly parentSessionId?: SessionId;\n    readonly origin?: 'subagent';\n    readonly cwd?: string;\n    readonly projections?: SessionProjectionHints;\n}"
          },
          {
            "name": "SessionSurface",
            "declaration": "export interface SessionSurface {\n    readonly nodes: readonly number[];\n    readonly replaceGeneration: number;\n}"
          },
          {
            "name": "SessionTitleEventData",
            "declaration": "export interface SessionTitleEventData {\n    readonly title: string;\n    readonly messageSeqs: number[];\n    readonly source: SessionTitleSource;\n}"
          },
          {
            "name": "SessionTitleModelProvenance",
            "declaration": "export interface SessionTitleModelProvenance {\n    readonly provider: string;\n    readonly model: string;\n}"
          },
          {
            "name": "SessionTitleProviderId",
            "declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
          },
          {
            "name": "SessionTitleSource",
            "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
          },
          {
            "name": "SessionUpdateQueueRequest",
            "declaration": "export interface SessionUpdateQueueRequest {\n    readonly sessionId: SessionId;\n    readonly itemId: MessageId;\n    readonly action: QueueAction;\n}"
          },
          {
            "name": "SessionUpdateQueueValue",
            "declaration": "export interface SessionUpdateQueueValue {\n    readonly accepted: true;\n}"
          },
          {
            "name": "SessionWireEvent",
            "declaration": "export interface SessionWireEvent {\n    readonly type: string;\n    readonly seq: number;\n    readonly time: number;\n    readonly data: JsonValue;\n    readonly sourceEventSeqs?: number[];\n    readonly surfaceOp?: SurfaceOp;\n}"
          },
          {
            "name": "SkillInvocationSource",
            "declaration": "export interface SkillInvocationSource {\n    readonly kind: 'skill-invocation';\n    readonly name: string;\n    readonly form: 'instructions';\n}"
          },
          {
            "name": "StreamChunk",
            "declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: ToolCallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: ReplayEnvelope; };"
          },
          {
            "name": "SubagentDescriptorBase",
            "declaration": "export interface SubagentDescriptorBase {\n    readonly version: number;\n    readonly mode: 'one-shot' | 'continuable';\n    readonly provider: string;\n}"
          },
          {
            "name": "SubagentDescriptorData",
            "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
          },
          {
            "name": "SubagentIdentityProjection",
            "declaration": "export type SubagentIdentityProjection = { mode: 'one-shot'; label?: string; seq: number; } | { mode: 'continuable'; label: string; seq: number; };"
          },
          {
            "name": "SubagentReportMessageSource",
            "declaration": "export interface SubagentReportMessageSource {\n    readonly kind: 'subagent-report';\n    readonly form: 'relay';\n    readonly senderSessionId: SessionId;\n}"
          },
          {
            "name": "SubagentSettledMessageSource",
            "declaration": "export interface SubagentSettledMessageSource {\n    readonly kind: 'subagent-settled';\n    readonly form: 'notice';\n    readonly summary: string;\n    readonly senderSessionId: SessionId;\n}"
          },
          {
            "name": "SubagentTimingProjection",
            "declaration": "export interface SubagentTimingProjection {\n    settledMs: number;\n    active?: { since: number; through: number; };\n}"
          },
          {
            "name": "SurfaceEventType",
            "declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
          },
          {
            "name": "SurfaceIntent",
            "declaration": "export interface SurfaceIntent {\n    surfaceOp: SurfaceOp;\n    sourceEventSeqs?: number[];\n}"
          },
          {
            "name": "SurfaceOp",
            "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start: number; end: number; };"
          },
          {
            "name": "TeamId",
            "declaration": "export type TeamId = Branded<'TeamId'>;"
          },
          {
            "name": "TeamMemberPhase",
            "declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
          },
          {
            "name": "TeamMemberSnapshot",
            "declaration": "export interface TeamMemberSnapshot {\n    readonly id: SessionId;\n    readonly name: string;\n    readonly description: string;\n    readonly provider: string;\n    readonly context: 'fresh' | 'fork';\n    readonly phase: TeamMemberPhase;\n    readonly error?: string;\n}"
          },
          {
            "name": "TeamMessageId",
            "declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
          },
          {
            "name": "TeamMessageSnapshot",
            "declaration": "export interface TeamMessageSnapshot {\n    readonly id: TeamMessageId;\n    readonly senderId: SessionId;\n    readonly senderName: string;\n    readonly targetId: SessionId;\n    readonly delivery: 'quiet' | 'wakeup';\n    readonly content: ContentBlock[];\n}"
          },
          {
            "name": "TeamMessageSource",
            "declaration": "export interface TeamMessageSource {\n    readonly kind: 'team-message';\n    readonly teamId: TeamId;\n    readonly messageId: TeamMessageId;\n    readonly senderId: SessionId;\n    readonly senderName: string;\n}"
          },
          {
            "name": "TeamTaskId",
            "declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
          },
          {
            "name": "TeamTaskSnapshot",
            "declaration": "export interface TeamTaskSnapshot {\n    readonly id: TeamTaskId;\n    readonly revision: number;\n    readonly subject: string;\n    readonly description: string;\n    readonly status: TeamTaskStatus;\n    readonly ownerId?: SessionId;\n    readonly blockedBy: TeamTaskId[];\n    readonly writeScopes: string[];\n}"
          },
          {
            "name": "TeamTaskStatus",
            "declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
          },
          {
            "name": "TextBlock",
            "declaration": "export interface TextBlock {\n    type: 'text';\n    text: string;\n}"
          },
          {
            "name": "TextRunData",
            "declaration": "export interface TextRunData extends RunDataBase {\n    texts: string[];\n}"
          },
          {
            "name": "TodoItem",
            "declaration": "export interface TodoItem {\n    content: string;\n    status: 'pending' | 'in_progress' | 'completed';\n}"
          },
          {
            "name": "TokenUsage",
            "declaration": "export interface TokenUsage {\n    inputTokens: number;\n    outputTokens: number;\n    totalTokens?: number;\n    cacheReadTokens?: number;\n    cacheWriteTokens?: number;\n    reasoningTokens?: number;\n}"
          },
          {
            "name": "ToolCallBlock",
            "declaration": "export interface ToolCallBlock {\n    type: 'tool-call';\n    id: ToolCallId;\n    name: string;\n    arguments: string;\n}"
          },
          {
            "name": "ToolCallId",
            "declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
          },
          {
            "name": "ToolCallRunData",
            "declaration": "export interface ToolCallRunData extends RunDataBase {\n    id: ToolCallId;\n    name?: string;\n    args: string[];\n}"
          },
          {
            "name": "ToolMessageSource",
            "declaration": "export interface ToolMessageSource {\n    kind: 'tool';\n    callId: ToolCallId;\n}"
          },
          {
            "name": "ToolRestriction",
            "declaration": "export interface ToolRestriction {\n    readonly allow?: readonly string[];\n    readonly deny?: readonly string[];\n}"
          },
          {
            "name": "ToolResultBlock",
            "declaration": "export interface ToolResultBlock {\n    type: 'tool-result';\n    toolCallId: ToolCallId;\n    content: ContentBlock[];\n    isError?: boolean;\n}"
          },
          {
            "name": "ToolResultMessage",
            "declaration": "export interface ToolResultMessage extends Message {\n    readonly role: 'user';\n    readonly content: [ToolResultBlock];\n    readonly source: ToolMessageSource;\n}"
          },
          {
            "name": "ToolSchema",
            "declaration": "export interface ToolSchema {\n    name: string;\n    description: string;\n    parameters: Record<string, unknown>;\n}"
          },
          {
            "name": "TurnEndCancelCause",
            "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
          },
          {
            "name": "TurnEndReason",
            "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
          },
          {
            "name": "TurnEndReasonMap",
            "declaration": "export interface TurnEndReasonMap {\n    completed: { kind: 'completed'; };\n    aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n    blocked: { kind: 'blocked'; };\n    error: { kind: 'error'; error: LlmFailure; };\n    'max-tokens': { kind: 'max-tokens'; };\n    interrupted: { kind: 'interrupted'; };\n}"
          },
          {
            "name": "UserMessage",
            "declaration": "export interface UserMessage extends Message {\n    readonly role: 'user';\n}"
          },
          {
            "name": "WorkspaceId",
            "declaration": "export type WorkspaceId = Branded<'WorkspaceId'>;"
          }
        ]
      },
      {
        "description": "Host Remote adapter over the composed file-reference provider.",
        "summary": "Host Remote adapter over the composed file-reference provider.",
        "tags": [],
        "jsDoc": "/** Host Remote adapter over the composed file-reference provider. */",
        "key": "sessionFileReferences",
        "exportName": "SessionFileReferences",
        "members": [
          {
            "kind": "method",
            "name": "list",
            "signature": "@Remote list( agent: Agent, query: string, signal: AbortSignal, ): Promise<FileReferenceCandidate[]>",
            "summary": "List file and directory candidates for one Agent's working directory.",
            "jsDoc": "/**\n * List file and directory candidates for one Agent's working directory.\n * @param agent - target Agent resolved from the Session identity on the wire.\n * @param query - path text following `@` or `@\"`.\n * @param signal - caller cancellation.\n * @returns deterministic path-only candidates from the composed provider.\n */"
          }
        ],
        "types": [
          {
            "name": "Agent",
            "declaration": "export interface Agent {\n    readonly id: SessionId;\n    readonly options: AgentOptions;\n    readonly session: Session;\n    readonly inbox: Inbox;\n    readonly status: AgentStatus;\n    readonly ctx: Context;\n    cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n    whenIdle(): Promise<void>;\n    runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n    send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n    followup(message: UserMessage): void;\n    steer(message: UserMessage): void;\n    inject(message: UserMessage): void;\n}"
          },
          {
            "name": "AgentCancelCause",
            "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
          },
          {
            "name": "AgentOptions",
            "declaration": "export interface AgentOptions {\n    provider?: string;\n    model?: string;\n    reasoningEffort?: ReasoningEffortId;\n    maxTokens?: number;\n    subagentDepth?: number;\n}"
          },
          {
            "name": "AgentStatus",
            "declaration": "export type AgentStatus = 'idle' | 'running';"
          },
          {
            "name": "ApprovalOutcome",
            "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
          },
          {
            "name": "ApprovalPolicy",
            "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
          },
          {
            "name": "ApprovalRequestId",
            "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
          },
          {
            "name": "AssistantMessage",
            "declaration": "export interface AssistantMessage extends Message {\n    readonly role: 'assistant';\n    readonly source: ModelMessageSource;\n}"
          },
          {
            "name": "AssistantProvenance",
            "declaration": "export interface AssistantProvenance {\n    provider: string;\n    model: string;\n    replayState?: unknown;\n}"
          },
          {
            "name": "AttachmentId",
            "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
          },
          {
            "name": "Branded",
            "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
          },
          {
            "name": "CancelOptions",
            "declaration": "export interface CancelOptions {\n    keepInbox?: boolean | undefined;\n}"
          },
          {
            "name": "CommandId",
            "declaration": "export type CommandId = Branded<'CommandId'>;"
          },
          {
            "name": "CommandSource",
            "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
          },
          {
            "name": "CommandSourceMap",
            "declaration": "export interface CommandSourceMap {\n    user: { kind: 'user'; };\n}"
          },
          {
            "name": "CompactionId",
            "declaration": "export type CompactionId = Branded<'CompactionId'>;"
          },
          {
            "name": "ContentBlock",
            "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
          },
          {
            "name": "ContentBlockMap",
            "declaration": "export interface ContentBlockMap {\n    text: TextBlock;\n    reasoning: ReasoningBlock;\n    image: ImageBlock;\n    'tool-call': ToolCallBlock;\n    'tool-result': ToolResultBlock;\n}"
          },
          {
            "name": "ContentBlockType",
            "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
          },
          {
            "name": "ContextFormed",
            "declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
          },
          {
            "name": "ContextSnapshotSection",
            "declaration": "export interface ContextSnapshotSection {\n    readonly name: string;\n    readonly text: string;\n}"
          },
          {
            "name": "ContinuableSubagentDescriptorData",
            "declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n    readonly mode: 'continuable';\n    readonly label: string;\n    readonly agentProvider?: string;\n    readonly agentModel?: string;\n    readonly agentReasoningEffort?: ReasoningEffortId;\n    readonly persona?: string;\n    readonly toolFilter?: ToolRestriction;\n}"
          },
          {
            "name": "CoordinatorMessageSource",
            "declaration": "export interface CoordinatorMessageSource {\n    readonly kind: 'coordinator';\n    readonly form: 'relay';\n    readonly senderSessionId: SessionId;\n}"
          },
          {
            "name": "EpochHeader",
            "declaration": "export interface EpochHeader {\n    config: LlmCallConfig;\n    adapterDefaults?: LlmCallConfigAdapterDefaults;\n    system?: string;\n    tools?: ToolSchema[];\n}"
          },
          {
            "name": "FileReferenceCandidate",
            "declaration": "export interface FileReferenceCandidate {\n    path: string;\n    kind: 'file' | 'directory';\n}"
          },
          {
            "name": "FinishReason",
            "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
          },
          {
            "name": "FinishReasonMap",
            "declaration": "export interface FinishReasonMap {\n    stop: { kind: 'stop'; };\n    'tool-calls': { kind: 'tool-calls'; };\n    'max-tokens': { kind: 'max-tokens'; };\n    aborted: { kind: 'aborted'; failure: LlmFailure; };\n    error: { kind: 'error'; failure: LlmFailure; };\n}"
          },
          {
            "name": "GoalBlockReason",
            "declaration": "export interface GoalBlockReason {\n    readonly code: string;\n    readonly message: string;\n}"
          },
          {
            "name": "GoalChangeMeta",
            "declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
          },
          {
            "name": "GoalClearChangeMeta",
            "declaration": "export interface GoalClearChangeMeta {\n    readonly kind: 'goal/change';\n    readonly version: 1;\n    readonly operation: 'clear';\n    readonly cleared: GoalRef;\n    readonly clearedAt: number;\n}"
          },
          {
            "name": "GoalId",
            "declaration": "export type GoalId = Branded<'GoalId'>;"
          },
          {
            "name": "GoalMessageSource",
            "declaration": "export interface GoalMessageSource {\n    readonly kind: 'goal';\n    readonly goalId: GoalId;\n    readonly revision: number;\n    readonly round: number;\n}"
          },
          {
            "name": "GoalOperation",
            "declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
          },
          {
            "name": "GoalPhase",
            "declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
          },
          {
            "name": "GoalRef",
            "declaration": "export interface GoalRef {\n    readonly id: GoalId;\n    readonly revision: number;\n}"
          },
          {
            "name": "GoalSnapshot",
            "declaration": "export interface GoalSnapshot extends GoalRef {\n    readonly objective: string;\n    readonly phase: GoalPhase;\n    readonly blockedReason?: GoalBlockReason;\n    readonly maxGoalRounds: number;\n}"
          },
          {
            "name": "GoalSnapshotChangeMeta",
            "declaration": "export interface GoalSnapshotChangeMeta {\n    readonly kind: 'goal/change';\n    readonly version: 1;\n    readonly operation: Exclude<GoalOperation, 'clear'>;\n    readonly goal: GoalSnapshot;\n    readonly roundsStarted: number;\n    readonly createdAt: number;\n    readonly updatedAt: number;\n}"
          },
          {
            "name": "ImageAttachmentRef",
            "declaration": "export interface ImageAttachmentRef {\n    attachmentId: AttachmentId;\n    mediaType: ImageMediaType;\n    bytes: number;\n    width: number;\n    height: number;\n    name?: string;\n    originalDimensions?: { width: number; height: number; };\n}"
          },
          {
            "name": "ImageBlock",
            "declaration": "export interface ImageBlock {\n    type: 'image';\n    attachment: ImageAttachmentRef;\n}"
          },
          {
            "name": "ImageMediaType",
            "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
          },
          {
            "name": "Inbox",
            "declaration": "export class Inbox {\n    get nextTurn(): readonly UserMessage[];\n    get nextStep(): readonly UserMessage[];\n    get hasPending(): boolean;\n    clear(): void;\n    claim(target: InboxTarget, turn: number): UserMessage[];\n    append(target: InboxTarget, message: UserMessage): void;\n    prepend(target: InboxTarget, message: UserMessage): void;\n    replace(messageId: MessageId, newMessage: UserMessage): boolean;\n    remove(messageId: MessageId): boolean;\n    splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
          },
          {
            "name": "InboxTarget",
            "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
          },
          {
            "name": "JsonValue",
            "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
          },
          {
            "name": "LlmCallConfig",
            "declaration": "export interface LlmCallConfig {\n    provider: string;\n    model: string;\n    reasoningEffort?: ReasoningEffortId;\n    temperature?: number;\n    maxTokens?: number;\n    stop?: string[];\n}"
          },
          {
            "name": "LlmCallConfigAdapterDefaults",
            "declaration": "export interface LlmCallConfigAdapterDefaults {\n    reasoningEffort?: true;\n    maxTokens?: true;\n}"
          },
          {
            "name": "LlmFailure",
            "declaration": "export interface LlmFailure {\n    readonly message: string;\n    readonly code: string;\n    readonly status?: number;\n    readonly providerRetryAfterMs?: number;\n    readonly requestId?: ProviderRequestId;\n}"
          },
          {
            "name": "Message",
            "declaration": "export interface Message {\n    readonly id: MessageId;\n    readonly role: 'system' | 'user' | 'assistant';\n    readonly content: ContentBlock[];\n    readonly source: MessageSource;\n}"
          },
          {
            "name": "MessageId",
            "declaration": "export type MessageId = Branded<'MessageId'>;"
          },
          {
            "name": "MessageSource",
            "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
          },
          {
            "name": "MessageSourceMap",
            "declaration": "export interface MessageSourceMap {\n    user: { kind: 'user'; };\n    plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n    model: ModelMessageSource;\n    tool: ToolMessageSource;\n    'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n    coordinator: CoordinatorMessageSource;\n    'subagent-report': SubagentReportMessageSource;\n    'subagent-settled': SubagentSettledMessageSource;\n    'skill-invocation': SkillInvocationSource;\n    'team-message': TeamMessageSource;\n    goal: GoalMessageSource;\n    'session-reference': SessionReferenceSource;\n}"
          },
          {
            "name": "ModelMessageSource",
            "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n    kind: 'model';\n}"
          },
          {
            "name": "ModelSelection",
            "declaration": "export interface ModelSelection {\n    readonly provider: string;\n    readonly model: string;\n    readonly reasoningEffort?: string;\n}"
          },
          {
            "name": "OneShotSubagentDescriptorData",
            "declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n    readonly mode: 'one-shot';\n    readonly label?: string;\n}"
          },
          {
            "name": "ProviderRequestId",
            "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
          },
          {
            "name": "PtcDispatchEventData",
            "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n    isError: boolean;\n    content: ContentBlock[];\n}"
          },
          {
            "name": "PtcDispatchStartEventData",
            "declaration": "export interface PtcDispatchStartEventData {\n    rootCallId: ToolCallId;\n    parentCallId: ToolCallId;\n    subCallId: ToolCallId;\n    name: string;\n    arguments: unknown;\n}"
          },
          {
            "name": "ReasoningBlock",
            "declaration": "export interface ReasoningBlock {\n    type: 'reasoning';\n    text: string;\n}"
          },
          {
            "name": "ReasoningEffortId",
            "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
          },
          {
            "name": "ReplayEnvelope",
            "declaration": "export interface ReplayEnvelope {\n    response: unknown;\n    blocks?: readonly unknown[];\n}"
          },
          {
            "name": "RequestContext",
            "declaration": "export interface RequestContext {\n    provider: string;\n    model: string;\n    contextWindow?: number;\n}"
          },
          {
            "name": "RequestHeaderReason",
            "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
          },
          {
            "name": "SandboxMode",
            "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
          },
          {
            "name": "Session",
            "declaration": "export class Session {\n    get surface(): SessionSurface;\n    readonly header: SessionHeader;\n    get id(): SessionId;\n    readonly firstLiveSeq: number;\n    get events(): readonly SessionEvent[];\n    get seq(): number;\n    append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent] : []): SessionEvent<T>;\n    requestHeader(): EpochHeader | undefined;\n    requestContext(): RequestContext | undefined;\n    deriveMessages(): Message[];\n    deriveEventMessage(event: SessionEvent): Message | null;\n}"
          },
          {
            "name": "SessionEvent",
            "declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: number; time: number; data: SessionEventMap[K]; } & (K extends SurfaceEventType ? { sourceEventSeqs?: number[]; surfaceOp?: SurfaceOp; } : object) }[T];"
          },
          {
            "name": "SessionEventMap",
            "declaration": "export interface SessionEventMap {\n    'turn/start': { turn: number; };\n    'turn/end': { turn: number; reason: TurnEndReason; };\n    'step/start': { turn: number; step: number; };\n    'step/end': { turn: number; step: number; };\n    'user/message': UserMessage;\n    'assistant/chunk': { turn: number; step: number; chunk: StreamChunk; };\n    'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; interrupted?: true; };\n    'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n    'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; }; meta?: JsonValue; };\n    'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n    'request/context': RequestContext;\n    'session/end-seed': Record<string, never>;\n    'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n    'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n    'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n    'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n    'tool/code-dispatch-start': PtcDispatchStartEventData;\n    'tool/code-dispatch': PtcDispatchEventData;\n    'agent-preset/selected': { agentPreset: string; };\n    'session/title': SessionTitleEventData;\n    'todo/write': { todos: TodoItem[]; };\n    'model/selection': ModelSelection;\n    'subagent/descriptor': SubagentDescriptorData;\n    'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n    'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n    'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: number; };\n    'team/member': { version: 1; teamId: TeamId; member: TeamMemberSnapshot; };\n    'team/task': { version: 1; teamId: TeamId; task: TeamTaskSnapshot; };\n    'team/message/queued': { version: 1; teamId: TeamId; message: TeamMessageSnapshot; };\n    'team/message/delivered': { version: 1; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n    'goal/change': GoalChangeMeta;\n    'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n    'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: number; end: number; }; shadowedSeqs: number[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n    'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n    'compaction/prune': { shadowedRange: { start: number; end: number; }; shadowedSeqs: number[]; shadowedTokenCount: number; };\n}"
          },
          {
            "name": "SessionEventType",
            "declaration": "export type SessionEventType = keyof SessionEventMap;"
          },
          {
            "name": "SessionHeader",
            "declaration": "export interface SessionHeader {\n    readonly version: number;\n    readonly id: SessionId;\n    readonly createdAt: number;\n    readonly cwd?: string;\n    readonly parentSession?: SessionId;\n    readonly seedLength?: number;\n    readonly origin?: 'subagent';\n    readonly delegationDepth?: number;\n    readonly agentPreset?: string;\n}"
          },
          {
            "name": "SessionId",
            "declaration": "export type SessionId = Branded<'SessionId'>;"
          },
          {
            "name": "SessionReferenceSource",
            "declaration": "export interface SessionReferenceSource {\n    kind: 'session-reference';\n    form: 'recall';\n    version: 1;\n    references: { sessionId: string; label: string; capturedThroughSeq: number | null; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
          },
          {
            "name": "SessionRequestId",
            "declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
          },
          {
            "name": "SessionSurface",
            "declaration": "export interface SessionSurface {\n    readonly nodes: readonly number[];\n    readonly replaceGeneration: number;\n}"
          },
          {
            "name": "SessionTitleEventData",
            "declaration": "export interface SessionTitleEventData {\n    readonly title: string;\n    readonly messageSeqs: number[];\n    readonly source: SessionTitleSource;\n}"
          },
          {
            "name": "SessionTitleModelProvenance",
            "declaration": "export interface SessionTitleModelProvenance {\n    readonly provider: string;\n    readonly model: string;\n}"
          },
          {
            "name": "SessionTitleProviderId",
            "declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
          },
          {
            "name": "SessionTitleSource",
            "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
          },
          {
            "name": "SkillInvocationSource",
            "declaration": "export interface SkillInvocationSource {\n    readonly kind: 'skill-invocation';\n    readonly name: string;\n    readonly form: 'instructions';\n}"
          },
          {
            "name": "StreamChunk",
            "declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: ToolCallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: ReplayEnvelope; };"
          },
          {
            "name": "SubagentDescriptorBase",
            "declaration": "export interface SubagentDescriptorBase {\n    readonly version: number;\n    readonly mode: 'one-shot' | 'continuable';\n    readonly provider: string;\n}"
          },
          {
            "name": "SubagentDescriptorData",
            "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
          },
          {
            "name": "SubagentReportMessageSource",
            "declaration": "export interface SubagentReportMessageSource {\n    readonly kind: 'subagent-report';\n    readonly form: 'relay';\n    readonly senderSessionId: SessionId;\n}"
          },
          {
            "name": "SubagentSettledMessageSource",
            "declaration": "export interface SubagentSettledMessageSource {\n    readonly kind: 'subagent-settled';\n    readonly form: 'notice';\n    readonly summary: string;\n    readonly senderSessionId: SessionId;\n}"
          },
          {
            "name": "SurfaceEventType",
            "declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
          },
          {
            "name": "SurfaceIntent",
            "declaration": "export interface SurfaceIntent {\n    surfaceOp: SurfaceOp;\n    sourceEventSeqs?: number[];\n}"
          },
          {
            "name": "SurfaceOp",
            "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start: number; end: number; };"
          },
          {
            "name": "TeamId",
            "declaration": "export type TeamId = Branded<'TeamId'>;"
          },
          {
            "name": "TeamMemberPhase",
            "declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
          },
          {
            "name": "TeamMemberSnapshot",
            "declaration": "export interface TeamMemberSnapshot {\n    readonly id: SessionId;\n    readonly name: string;\n    readonly description: string;\n    readonly provider: string;\n    readonly context: 'fresh' | 'fork';\n    readonly phase: TeamMemberPhase;\n    readonly error?: string;\n}"
          },
          {
            "name": "TeamMessageId",
            "declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
          },
          {
            "name": "TeamMessageSnapshot",
            "declaration": "export interface TeamMessageSnapshot {\n    readonly id: TeamMessageId;\n    readonly senderId: SessionId;\n    readonly senderName: string;\n    readonly targetId: SessionId;\n    readonly delivery: 'quiet' | 'wakeup';\n    readonly content: ContentBlock[];\n}"
          },
          {
            "name": "TeamMessageSource",
            "declaration": "export interface TeamMessageSource {\n    readonly kind: 'team-message';\n    readonly teamId: TeamId;\n    readonly messageId: TeamMessageId;\n    readonly senderId: SessionId;\n    readonly senderName: string;\n}"
          },
          {
            "name": "TeamTaskId",
            "declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
          },
          {
            "name": "TeamTaskSnapshot",
            "declaration": "export interface TeamTaskSnapshot {\n    readonly id: TeamTaskId;\n    readonly revision: number;\n    readonly subject: string;\n    readonly description: string;\n    readonly status: TeamTaskStatus;\n    readonly ownerId?: SessionId;\n    readonly blockedBy: TeamTaskId[];\n    readonly writeScopes: string[];\n}"
          },
          {
            "name": "TeamTaskStatus",
            "declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
          },
          {
            "name": "TextBlock",
            "declaration": "export interface TextBlock {\n    type: 'text';\n    text: string;\n}"
          },
          {
            "name": "TodoItem",
            "declaration": "export interface TodoItem {\n    content: string;\n    status: 'pending' | 'in_progress' | 'completed';\n}"
          },
          {
            "name": "TokenUsage",
            "declaration": "export interface TokenUsage {\n    inputTokens: number;\n    outputTokens: number;\n    totalTokens?: number;\n    cacheReadTokens?: number;\n    cacheWriteTokens?: number;\n    reasoningTokens?: number;\n}"
          },
          {
            "name": "ToolCallBlock",
            "declaration": "export interface ToolCallBlock {\n    type: 'tool-call';\n    id: ToolCallId;\n    name: string;\n    arguments: string;\n}"
          },
          {
            "name": "ToolCallId",
            "declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
          },
          {
            "name": "ToolMessageSource",
            "declaration": "export interface ToolMessageSource {\n    kind: 'tool';\n    callId: ToolCallId;\n}"
          },
          {
            "name": "ToolRestriction",
            "declaration": "export interface ToolRestriction {\n    readonly allow?: readonly string[];\n    readonly deny?: readonly string[];\n}"
          },
          {
            "name": "ToolResultBlock",
            "declaration": "export interface ToolResultBlock {\n    type: 'tool-result';\n    toolCallId: ToolCallId;\n    content: ContentBlock[];\n    isError?: boolean;\n}"
          },
          {
            "name": "ToolResultMessage",
            "declaration": "export interface ToolResultMessage extends Message {\n    readonly role: 'user';\n    readonly content: [ToolResultBlock];\n    readonly source: ToolMessageSource;\n}"
          },
          {
            "name": "ToolSchema",
            "declaration": "export interface ToolSchema {\n    name: string;\n    description: string;\n    parameters: Record<string, unknown>;\n}"
          },
          {
            "name": "TurnEndCancelCause",
            "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
          },
          {
            "name": "TurnEndReason",
            "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
          },
          {
            "name": "TurnEndReasonMap",
            "declaration": "export interface TurnEndReasonMap {\n    completed: { kind: 'completed'; };\n    aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n    blocked: { kind: 'blocked'; };\n    error: { kind: 'error'; error: LlmFailure; };\n    'max-tokens': { kind: 'max-tokens'; };\n    interrupted: { kind: 'interrupted'; };\n}"
          },
          {
            "name": "UserMessage",
            "declaration": "export interface UserMessage extends Message {\n    readonly role: 'user';\n}"
          }
        ]
      },
      {
        "description": "Host service backing `ctx.remote.skills` without activating a cold Agent.",
        "summary": "Host service backing `ctx.remote.skills` without activating a cold Agent.",
        "tags": [],
        "jsDoc": "/** Host service backing `ctx.remote.skills` without activating a cold Agent. */",
        "key": "sessionSkillCatalog",
        "exportName": "SessionSkillCatalog",
        "members": [
          {
            "kind": "method",
            "name": "list",
            "signature": "@Remote async list(request: SkillListRequest, signal: AbortSignal): Promise<SkillListValue>",
            "summary": "List the user-invocable skills visible to one Session composition.",
            "jsDoc": "/**\n * List the user-invocable skills visible to one Session composition.\n * @param request - Session identity whose cwd and preset select the catalog view.\n * @param signal - caller lifetime carried by the Remote transport; admitted catalog reads retain their existing completion semantics.\n * @returns user-invocable skill metadata without loading skill bodies.\n * @throws TypertRemoteFailure when the Session cannot be inspected or no registry can serve it.\n */"
          }
        ],
        "types": [
          {
            "name": "Branded",
            "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
          },
          {
            "name": "SessionId",
            "declaration": "export type SessionId = Branded<'SessionId'>;"
          },
          {
            "name": "SkillEntry",
            "declaration": "export interface SkillEntry {\n    readonly name: string;\n    readonly description: string;\n    readonly whenToUse?: string;\n    readonly modelInvocable: boolean;\n}"
          },
          {
            "name": "SkillListRequest",
            "declaration": "export interface SkillListRequest {\n    readonly sessionId: SessionId;\n}"
          },
          {
            "name": "SkillListValue",
            "declaration": "export interface SkillListValue {\n    readonly skills: readonly SkillEntry[];\n}"
          }
        ]
      }
    ],
    "events": [
      {
        "description": "One user-authored durable message advanced Session list activity.",
        "summary": "One user-authored durable message advanced Session list activity.",
        "tags": [
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit\n     *"
          },
          {
            "name": "param",
            "argument": "sessionId",
            "comment": "- addressed Session identity.",
            "text": "@param sessionId - addressed Session identity.\n     *"
          },
          {
            "name": "param",
            "argument": "updatedAt",
            "comment": "- durable message time used for list ordering.",
            "text": "@param updatedAt - durable message time used for list ordering."
          }
        ],
        "jsDoc": "/**\n * One user-authored durable message advanced Session list activity.\n * @mode emit\n * @param sessionId - addressed Session identity.\n * @param updatedAt - durable message time used for list ordering.\n */",
        "name": "api-session/activity",
        "mode": "emit",
        "signature": "'api-session/activity'(sessionId: SessionId, updatedAt: number): void"
      },
      {
        "description": "A Session became visible to Session list consumers.",
        "summary": "A Session became visible to Session list consumers.",
        "tags": [
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit\n     *"
          },
          {
            "name": "param",
            "argument": "summary",
            "comment": "- initial list row for the Session.",
            "text": "@param summary - initial list row for the Session."
          }
        ],
        "jsDoc": "/**\n * A Session became visible to Session list consumers.\n * @mode emit\n * @param summary - initial list row for the Session.\n */",
        "name": "api-session/added",
        "mode": "emit",
        "signature": "'api-session/added'(summary: SessionSummary): void"
      },
      {
        "description": "One Agent failed outside a durable turn position.",
        "summary": "One Agent failed outside a durable turn position.",
        "tags": [
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit\n     *"
          },
          {
            "name": "param",
            "argument": "sessionId",
            "comment": "- Agent and Session identity.",
            "text": "@param sessionId - Agent and Session identity.\n     *"
          },
          {
            "name": "param",
            "argument": "message",
            "comment": "- user-safe failure chain.",
            "text": "@param message - user-safe failure chain."
          }
        ],
        "jsDoc": "/**\n * One Agent failed outside a durable turn position.\n * @mode emit\n * @param sessionId - Agent and Session identity.\n * @param message - user-safe failure chain.\n */",
        "name": "api-session/error",
        "mode": "emit",
        "signature": "'api-session/error'(sessionId: SessionId, message: string): void"
      },
      {
        "description": "A Session left the live Host registry.",
        "summary": "A Session left the live Host registry.",
        "tags": [
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit\n     *"
          },
          {
            "name": "param",
            "argument": "sessionId",
            "comment": "- removed Session identity.",
            "text": "@param sessionId - removed Session identity."
          }
        ],
        "jsDoc": "/**\n * A Session left the live Host registry.\n * @mode emit\n * @param sessionId - removed Session identity.\n */",
        "name": "api-session/removed",
        "mode": "emit",
        "signature": "'api-session/removed'(sessionId: SessionId): void"
      },
      {
        "description": "One Agent changed running state.",
        "summary": "One Agent changed running state.",
        "tags": [
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit\n     *"
          },
          {
            "name": "param",
            "argument": "sessionId",
            "comment": "- Agent and Session identity.",
            "text": "@param sessionId - Agent and Session identity.\n     *"
          },
          {
            "name": "param",
            "argument": "running",
            "comment": "- whether the Agent is running.",
            "text": "@param running - whether the Agent is running."
          }
        ],
        "jsDoc": "/**\n * One Agent changed running state.\n * @mode emit\n * @param sessionId - Agent and Session identity.\n * @param running - whether the Agent is running.\n */",
        "name": "api-session/status",
        "mode": "emit",
        "signature": "'api-session/status'(sessionId: SessionId, running: boolean): void"
      }
    ],
    "objects": []
  },
}
