/* Generated by @deepseek-ai/dsh-typert-generator from the Host 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_REMOTE = {
  package: '@deepseek-ai/dsh-api-session-controller',
  descriptors: [
    {
      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},
    },
  ],
}

export default TYPERT_REMOTE
