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

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 JsonValueRemoteCodec$schema5 = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5))])
const JsonValueRemoteCodec$schema6 = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema6)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema6))])
const JsonValueRemoteCodec$schema7 = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema7)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema7))])
const _deepseek_ai_dsh_api_settings_controller_credentials_describe_parameter_0$schema = z.array(z.string())
const _deepseek_ai_dsh_api_settings_controller_credentials_describe_result$schema = z.record(z.string(), z.object({
  'configured': z.boolean(),
  'source': z.string().optional(),
  'writable': z.boolean(),
}))
const _deepseek_ai_dsh_api_settings_controller_credentials_set_parameter_0$schema = z.string()
const _deepseek_ai_dsh_api_settings_controller_credentials_set_parameter_1$schema = z.string()
const _deepseek_ai_dsh_api_settings_controller_credentials_set_result$schema = z.void()
const _deepseek_ai_dsh_api_settings_controller_credentials_unset_parameter_0$schema = z.string()
const _deepseek_ai_dsh_api_settings_controller_credentials_unset_result$schema = z.void()
const _deepseek_ai_dsh_api_settings_controller_settings_canOpenAgentPresetDirectory_result$schema = z.boolean()
const _deepseek_ai_dsh_api_settings_controller_settings_describe_result$schema = z.object({
  'writable': z.boolean(),
  'hasDocument': z.boolean(),
  'namespaces': z.array(z.object({
  'ns': z.string(),
  '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))]),
  'value': 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))]),
  'base': 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))]).optional(),
  'user': 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))]).optional(),
  'applies': z.union([z.literal("live"), z.literal("restart")]),
  'secrets': z.array(z.object({
  'path': z.array(z.string()),
  'set': z.boolean(),
})),
  'revision': z.number(),
})),
})
const _deepseek_ai_dsh_api_settings_controller_settings_mutate_parameter_0$schema = z.string()
const _deepseek_ai_dsh_api_settings_controller_settings_mutate_parameter_1$schema = z.array(z.union([z.object({
  'op': z.literal("set"),
  'path': z.array(z.string()),
  'value': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema6)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema6))]),
}), z.object({
  'op': z.literal("unset"),
  'path': z.array(z.string()),
})]))
const _deepseek_ai_dsh_api_settings_controller_settings_mutate_parameter_2$schema = z.union([z.undefined(), z.number()])
const _deepseek_ai_dsh_api_settings_controller_settings_mutate_result$schema = z.object({
  'ns': z.string(),
  'schema': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema7)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema7))]),
  'value': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema7)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema7))]),
  'base': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema7)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema7))]).optional(),
  'user': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema7)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema7))]).optional(),
  'applies': z.union([z.literal("live"), z.literal("restart")]),
  'secrets': z.array(z.object({
  'path': z.array(z.string()),
  'set': z.boolean(),
})),
  'revision': z.number(),
})
const _deepseek_ai_dsh_api_settings_controller_settings_openAgentPresetDirectory_parameter_0$schema = z.string()
const _deepseek_ai_dsh_api_settings_controller_settings_openAgentPresetDirectory_result$schema = z.union([z.object({
  'opened': z.literal(true).readonly(),
}), z.object({
  'opened': z.literal(false).readonly(),
  'path': z.string().readonly(),
})])
const _deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema = z.object({
  'opened': z.literal(true).readonly(),
})
const _deepseek_ai_dsh_api_settings_controller_settings_replace_parameter_0$schema = z.string()
const _deepseek_ai_dsh_api_settings_controller_settings_replace_parameter_1$schema = 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))]))
const _deepseek_ai_dsh_api_settings_controller_settings_replace_parameter_2$schema = z.union([z.undefined(), z.number()])
const _deepseek_ai_dsh_api_settings_controller_settings_replace_result$schema = z.object({
  'ns': z.string(),
  'schema': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5))]),
  'value': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5))]),
  'base': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5))]).optional(),
  'user': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5))]).optional(),
  'applies': z.union([z.literal("live"), z.literal("restart")]),
  'secrets': z.array(z.object({
  'path': z.array(z.string()),
  'set': z.boolean(),
})),
  'revision': z.number(),
})
const _deepseek_ai_dsh_api_settings_controller_settings_update_parameter_0$schema = z.string()
const _deepseek_ai_dsh_api_settings_controller_settings_update_parameter_1$schema = z.record(z.string(), 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 _deepseek_ai_dsh_api_settings_controller_settings_update_parameter_2$schema = z.union([z.undefined(), z.number()])
const _deepseek_ai_dsh_api_settings_controller_settings_update_result$schema = z.object({
  'ns': z.string(),
  'schema': 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))]),
  'value': 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))]),
  'base': 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))]).optional(),
  'user': 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))]).optional(),
  'applies': z.union([z.literal("live"), z.literal("restart")]),
  'secrets': z.array(z.object({
  'path': z.array(z.string()),
  'set': z.boolean(),
})),
  'revision': z.number(),
})

export const TYPERT_REMOTE = {
  package: '@deepseek-ai/dsh-api-settings-controller',
  descriptors: [
    {
      id: '@deepseek-ai/dsh-api-settings-controller#credentials/describe',
      service: 'credentialsController',
      namespace: 'credentials',
      method: 'describe',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'refs',
          wire: 'refs',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#credentials/describe:refs',
            schema: _deepseek_ai_dsh_api_settings_controller_credentials_describe_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-settings-controller#credentials/describe:result',
        schema: _deepseek_ai_dsh_api_settings_controller_credentials_describe_result$schema,
      },
      sourceLocation: {"file":"packages/api/settings-controller/src/credentials.ts","line":86,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-api-settings-controller#credentials/set',
      service: 'credentialsController',
      namespace: 'credentials',
      method: 'set',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'ref',
          wire: 'ref',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#credentials/set:ref',
            schema: _deepseek_ai_dsh_api_settings_controller_credentials_set_parameter_0$schema,
          },
        },
        {
          name: 'value',
          wire: 'value',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#credentials/set:value',
            schema: _deepseek_ai_dsh_api_settings_controller_credentials_set_parameter_1$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-settings-controller#credentials/set:result',
        schema: _deepseek_ai_dsh_api_settings_controller_credentials_set_result$schema,
      },
      sourceLocation: {"file":"packages/api/settings-controller/src/credentials.ts","line":103,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-api-settings-controller#credentials/unset',
      service: 'credentialsController',
      namespace: 'credentials',
      method: 'unset',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'ref',
          wire: 'ref',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#credentials/unset:ref',
            schema: _deepseek_ai_dsh_api_settings_controller_credentials_unset_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-settings-controller#credentials/unset:result',
        schema: _deepseek_ai_dsh_api_settings_controller_credentials_unset_result$schema,
      },
      sourceLocation: {"file":"packages/api/settings-controller/src/credentials.ts","line":116,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-api-settings-controller#settings/canOpenAgentPresetDirectory',
      service: 'settingsController',
      namespace: 'settings',
      method: 'canOpenAgentPresetDirectory',
      invocation: { kind: 'direct' },
      parameters: [
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/canOpenAgentPresetDirectory:result',
        schema: _deepseek_ai_dsh_api_settings_controller_settings_canOpenAgentPresetDirectory_result$schema,
      },
      sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":136,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-settings-controller#settings/describe',
      service: 'settingsController',
      namespace: 'settings',
      method: 'describe',
      invocation: { kind: 'direct' },
      parameters: [
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-settings/types#SettingsDescribeValue',
        schema: _deepseek_ai_dsh_api_settings_controller_settings_describe_result$schema,
      },
      sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":122,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-settings-controller#settings/mutate',
      service: 'settingsController',
      namespace: 'settings',
      method: 'mutate',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'ns',
          wire: 'ns',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/mutate:ns',
            schema: _deepseek_ai_dsh_api_settings_controller_settings_mutate_parameter_0$schema,
          },
        },
        {
          name: 'ops',
          wire: 'ops',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/mutate:ops',
            schema: _deepseek_ai_dsh_api_settings_controller_settings_mutate_parameter_1$schema,
          },
        },
        {
          name: 'expectedRevision',
          wire: 'expectedRevision',
          source: 'json',
          acceptsUndefined: true,
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/mutate:expectedRevision',
            schema: _deepseek_ai_dsh_api_settings_controller_settings_mutate_parameter_2$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-settings/types#SettingsNamespaceView',
        schema: _deepseek_ai_dsh_api_settings_controller_settings_mutate_result$schema,
      },
      sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":185,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-api-settings-controller#settings/openAgentPresetDirectory',
      service: 'settingsController',
      namespace: 'settings',
      method: 'openAgentPresetDirectory',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'agentPreset',
          wire: 'agentPreset',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/openAgentPresetDirectory:agentPreset',
            schema: _deepseek_ai_dsh_api_settings_controller_settings_openAgentPresetDirectory_parameter_0$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-settings-controller/types#AgentPresetDirectoryOpenValue',
        schema: _deepseek_ai_dsh_api_settings_controller_settings_openAgentPresetDirectory_result$schema,
      },
      sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":231,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-api-settings-controller#settings/openSettingsDocument',
      service: 'settingsController',
      namespace: 'settings',
      method: 'openSettingsDocument',
      invocation: { kind: 'direct' },
      parameters: [
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-api-settings-controller/types#SettingsDocumentOpenValue',
        schema: _deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema,
      },
      sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":200,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-api-settings-controller#settings/replace',
      service: 'settingsController',
      namespace: 'settings',
      method: 'replace',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'ns',
          wire: 'ns',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/replace:ns',
            schema: _deepseek_ai_dsh_api_settings_controller_settings_replace_parameter_0$schema,
          },
        },
        {
          name: 'section',
          wire: 'section',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/replace:section',
            schema: _deepseek_ai_dsh_api_settings_controller_settings_replace_parameter_1$schema,
          },
        },
        {
          name: 'expectedRevision',
          wire: 'expectedRevision',
          source: 'json',
          acceptsUndefined: true,
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/replace:expectedRevision',
            schema: _deepseek_ai_dsh_api_settings_controller_settings_replace_parameter_2$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-settings/types#SettingsNamespaceView',
        schema: _deepseek_ai_dsh_api_settings_controller_settings_replace_result$schema,
      },
      sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":166,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-api-settings-controller#settings/update',
      service: 'settingsController',
      namespace: 'settings',
      method: 'update',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'ns',
          wire: 'ns',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/update:ns',
            schema: _deepseek_ai_dsh_api_settings_controller_settings_update_parameter_0$schema,
          },
        },
        {
          name: 'patch',
          wire: 'patch',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/update:patch',
            schema: _deepseek_ai_dsh_api_settings_controller_settings_update_parameter_1$schema,
          },
        },
        {
          name: 'expectedRevision',
          wire: 'expectedRevision',
          source: 'json',
          acceptsUndefined: true,
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/update:expectedRevision',
            schema: _deepseek_ai_dsh_api_settings_controller_settings_update_parameter_2$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-settings/types#SettingsNamespaceView',
        schema: _deepseek_ai_dsh_api_settings_controller_settings_update_result$schema,
      },
      sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":149,"column":3},
    },
  ],
}

export default TYPERT_REMOTE
