/* 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 _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2$schema = z.literal("continuable")
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_result$schema = z.object({
  'accepted': z.literal(true).readonly(),
})
const _deepseek_ai_dsh_subagent_subagents_list_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_subagent_subagents_list_result$schema = z.object({
  'entries': z.array(z.union([z.intersection(z.object({
  'kind': z.literal("child").readonly(),
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'activity': z.union([z.literal("running"), z.literal("inactive")]).readonly(),
  'hasChildren': z.boolean().readonly(),
}), z.object({
  'mode': z.literal("one-shot").readonly(),
  'label': z.string().readonly().optional(),
})), z.intersection(z.object({
  'kind': z.literal("child").readonly(),
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'activity': z.union([z.literal("running"), z.literal("inactive")]).readonly(),
  'hasChildren': z.boolean().readonly(),
}), z.object({
  'mode': z.literal("continuable").readonly(),
  'label': z.string().readonly(),
})), z.object({
  'kind': z.literal("diagnostic").readonly(),
  'id': z.intersection(z.string(), z.unknown()).readonly(),
  'reason': z.union([z.literal("corrupt"), z.literal("unsupported"), z.literal("unavailable")]).readonly(),
})])).readonly(),
  'parentAvailable': z.boolean().readonly(),
})
const _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0$schema = z.object({
  'requestId': z.intersection(z.string(), z.unknown()).readonly(),
  'parentSessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'childSessionId': z.intersection(z.string(), z.unknown()).readonly(),
  'mode': z.literal("continuable").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(),
  'clientTimeZone': z.string().readonly().optional(),
})
const _deepseek_ai_dsh_subagent_subagents_prompt_result$schema = z.object({
  'messageId': z.intersection(z.string(), z.unknown()).readonly(),
})

export const TYPERT_REMOTE = {
  package: '@deepseek-ai/dsh-subagent',
  descriptors: [
    {
      id: '@deepseek-ai/dsh-subagent#subagents/interruptByParent',
      service: 'subagents',
      namespace: 'subagents',
      method: 'interruptByParent',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'childSessionId',
          wire: 'childSessionId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
            schema: _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0$schema,
          },
        },
        {
          name: 'parentSessionId',
          wire: 'parentSessionId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
            schema: _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1$schema,
          },
        },
        {
          name: 'mode',
          wire: 'mode',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-subagent#subagents/interruptByParent:mode',
            schema: _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentInterruptReceipt',
        schema: _deepseek_ai_dsh_subagent_subagents_interruptByParent_result$schema,
      },
      sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":479,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-subagent#subagents/list',
      service: 'subagents',
      namespace: 'subagents',
      method: 'list',
      implementation: 'remoteExportList',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'parentSessionId',
          wire: 'parentSessionId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
            schema: _deepseek_ai_dsh_subagent_subagents_list_parameter_0$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentCatalog',
        schema: _deepseek_ai_dsh_subagent_subagents_list_result$schema,
      },
      sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":406,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-subagent#subagents/prompt',
      service: 'subagents',
      namespace: 'subagents',
      method: 'prompt',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'request',
          wire: 'request',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentPromptRequest',
            schema: _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentPromptReceipt',
        schema: _deepseek_ai_dsh_subagent_subagents_prompt_result$schema,
      },
      sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":430,"column":9},
    },
  ],
}

export default TYPERT_REMOTE
