/* Generated by @deepseek-ai/dsh-typert-generator from 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 = {
  package: '@deepseek-ai/dsh-api-settings-controller',
  face: 'host',
  schemas: [
  ],
  invocations: [
    {
      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},
    },
  ],
  model: {
    "services": [
      {
        "description": "Host service backing the generated `ctx.remote.credentials` namespace. It carries every wire obligation the credential seam itself does not: the batch fan-out bound, the field-by-field view projection, the reference-grammar guard, and the refusal mapping. Secret values cross in one direction only — no method here returns one.",
        "summary": "Host service backing the generated `ctx.remote.credentials` namespace.",
        "tags": [],
        "jsDoc": "/**\n * Host service backing the generated `ctx.remote.credentials` namespace. It\n * carries every wire obligation the credential seam itself does not: the batch\n * fan-out bound, the field-by-field view projection, the reference-grammar\n * guard, and the refusal mapping. Secret values cross in one direction only —\n * no method here returns one.\n */",
        "key": "credentialsController",
        "exportName": "CredentialsController",
        "members": [
          {
            "kind": "method",
            "name": "describe",
            "signature": "@Remote async describe(refs: string[]): Promise<Record<string, CredentialInfo>>",
            "summary": "Describe several references for one configuration surface.",
            "jsDoc": "/**\n * Describe several references for one configuration surface. Batched because\n * a settings page describes every reference its rows name at once, and one\n * round trip keeps those rows from settling separately.\n * @param refs - reference names, at most {@link MAX_DESCRIBE_REFS}; a name outside the grammar rejects the whole call as `bad-request`.\n * @returns one view per requested name, keyed by that name.\n * @throws TypertRemoteFailure when the request is invalid or no credential provider is mounted.\n */"
          },
          {
            "kind": "method",
            "name": "set",
            "signature": "@Remote async set(ref: string, value: string): Promise<void>",
            "summary": "Store one value from a configuration surface.",
            "jsDoc": "/**\n * Store one value from a configuration surface. The value crosses the wire in\n * this direction only: no read path returns it.\n * @param ref - reference name to store under.\n * @param value - the non-empty secret value.\n * @throws TypertRemoteFailure when the request is invalid, no provider is mounted, or the provider refuses the write.\n */"
          },
          {
            "kind": "method",
            "name": "unset",
            "signature": "@Remote async unset(ref: string): Promise<void>",
            "summary": "Remove one reference from a configuration surface.",
            "jsDoc": "/**\n * Remove one reference from a configuration surface.\n * @param ref - reference name to remove.\n * @throws TypertRemoteFailure when the request is invalid, no provider is mounted, or the provider refuses the write.\n */"
          }
        ],
        "types": [
          {
            "name": "CredentialInfo",
            "declaration": "export interface CredentialInfo {\n    configured: boolean;\n    source?: string;\n    writable: boolean;\n}"
          }
        ]
      },
      {
        "description": "Host service backing the generated `ctx.remote.settings` namespace. Every remote read uses `redactSecrets: true`, so a `role('secret')` field cannot ride a response. Writes expose the settings service's merge, replacement, and path-addressed operations, and classify every provider refusal as `settings-conflict` or `settings-rejected` with the service's message.",
        "summary": "Host service backing the generated `ctx.remote.settings` namespace.",
        "tags": [],
        "jsDoc": "/**\n * Host service backing the generated `ctx.remote.settings` namespace. Every\n * remote read uses `redactSecrets: true`, so a `role('secret')` field cannot\n * ride a response. Writes expose the settings service's merge, replacement,\n * and path-addressed operations, and classify every provider refusal as\n * `settings-conflict` or `settings-rejected` with the service's message.\n */",
        "key": "settingsController",
        "exportName": "SettingsController",
        "members": [
          {
            "kind": "method",
            "name": "describe",
            "signature": "@Remote describe(): SettingsDescribeValue",
            "summary": "Describe every registered namespace for a configuration page: redacted layered values plus the serialized schema the page renders its form from.",
            "jsDoc": "/**\n * Describe every registered namespace for a configuration page: redacted\n * layered values plus the serialized schema the page renders its form from.\n * @returns provider writability, local-document presence, and one view per namespace.\n * @throws TypertRemoteFailure when no settings provider is mounted.\n */"
          },
          {
            "kind": "method",
            "name": "canOpenAgentPresetDirectory",
            "signature": "@Remote canOpenAgentPresetDirectory(): boolean",
            "summary": "Report whether this deployment can open an authored Agent preset directory natively.",
            "jsDoc": "/**\n * Report whether this deployment can open an authored Agent preset directory natively.\n * @returns true when the matching open operation is available.\n */"
          },
          {
            "kind": "method",
            "name": "update",
            "signature": "@Remote update( ns: string, patch: Record<string, JsonValue>, expectedRevision: number | undefined, ): Promise<SettingsNamespaceView>",
            "summary": "Merge a patch into one namespace's stored user section.",
            "jsDoc": "/**\n * Merge a patch into one namespace's stored user section.\n * @param ns - namespace key to write.\n * @param patch - fields to merge into the user section.\n * @param expectedRevision - revision the caller read; `undefined` writes unconditionally.\n * @returns the namespace's redacted view after the write.\n * @throws TypertRemoteFailure when the request is invalid, no provider is mounted, or the provider refuses the write.\n */"
          },
          {
            "kind": "method",
            "name": "replace",
            "signature": "@Remote replace( ns: string, section: Record<string, JsonValue>, expectedRevision: number | undefined, ): Promise<SettingsNamespaceView>",
            "summary": "Replace one namespace's stored user section wholesale.",
            "jsDoc": "/**\n * Replace one namespace's stored user section wholesale.\n * @param ns - namespace key to write.\n * @param section - complete replacement user section.\n * @param expectedRevision - revision the caller read; `undefined` writes unconditionally.\n * @returns the namespace's redacted view after the write.\n * @throws TypertRemoteFailure when the request is invalid, no provider is mounted, or the provider refuses the write.\n */"
          },
          {
            "kind": "method",
            "name": "mutate",
            "signature": "@Remote async mutate( ns: string, ops: SettingsPathOpView[], expectedRevision: number | undefined, ): Promise<SettingsNamespaceView>",
            "summary": "Apply path-addressed edits to one namespace's user section, resolved against the section as stored rather than against whatever the caller last read, then answer with that namespace's new redacted view.",
            "jsDoc": "/**\n * Apply path-addressed edits to one namespace's user section, resolved against\n * the section as stored rather than against whatever the caller last read,\n * then answer with that namespace's new redacted view.\n * @param ns - namespace key to write.\n * @param ops - the edits to apply, in order.\n * @param expectedRevision - revision the caller read; `undefined` writes unconditionally.\n * @returns the namespace's redacted view after the write.\n * @throws TypertRemoteFailure when the request is invalid, no provider is mounted, or the provider refuses the write.\n */"
          },
          {
            "kind": "method",
            "name": "openSettingsDocument",
            "signature": "@Remote async openSettingsDocument(signal: AbortSignal): Promise<SettingsDocumentOpenValue>",
            "summary": "Materialize the provider-owned settings document and open it in a native text editor.",
            "jsDoc": "/**\n * Materialize the provider-owned settings document and open it in a native text editor.\n * @param signal - caller lifetime; abort terminates preparation or the native command.\n * @returns confirmation after the native opener accepts the document.\n * @throws TypertRemoteFailure when no document exists, preparation fails, or opening fails.\n */"
          },
          {
            "kind": "method",
            "name": "openAgentPresetDirectory",
            "signature": "@Remote async openAgentPresetDirectory( agentPreset: string, signal: AbortSignal, ): Promise<AgentPresetDirectoryOpenValue>",
            "summary": "Open one user-authored Agent preset directory or return its path when no native opener exists.",
            "jsDoc": "/**\n * Open one user-authored Agent preset directory or return its path when no native opener exists.\n * @param agentPreset - preset id resolved against Host-owned roots.\n * @param signal - caller lifetime; abort terminates the native command.\n * @returns an opened confirmation or the resolved directory for text display.\n * @throws TypertRemoteFailure when the preset is missing, read-only, invalid, or cannot be opened.\n */"
          }
        ],
        "types": [
          {
            "name": "AgentPresetDirectoryOpenValue",
            "declaration": "export type AgentPresetDirectoryOpenValue = { readonly opened: true; } | { readonly opened: false; readonly path: string; };"
          },
          {
            "name": "JsonValue",
            "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
          },
          {
            "name": "SettingsDescribeValue",
            "declaration": "export interface SettingsDescribeValue {\n    writable: boolean;\n    hasDocument: boolean;\n    namespaces: SettingsNamespaceView[];\n}"
          },
          {
            "name": "SettingsDocumentOpenValue",
            "declaration": "export interface SettingsDocumentOpenValue {\n    readonly opened: true;\n}"
          },
          {
            "name": "SettingsNamespaceView",
            "declaration": "export interface SettingsNamespaceView {\n    ns: string;\n    schema: JsonValue;\n    value: JsonValue;\n    base?: JsonValue;\n    user?: JsonValue;\n    applies: 'live' | 'restart';\n    secrets: SettingsSecretView[];\n    revision: number;\n}"
          },
          {
            "name": "SettingsPathOpView",
            "declaration": "export type SettingsPathOpView = { op: 'set'; path: string[]; value: JsonValue; } | { op: 'unset'; path: string[]; };"
          },
          {
            "name": "SettingsSecretView",
            "declaration": "export interface SettingsSecretView {\n    path: string[];\n    set: boolean;\n}"
          }
        ]
      }
    ],
    "events": [],
    "objects": []
  },
}
