/* 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 _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_getClientCode_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_getClientCode_parameter_1$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_getClientCode_parameter_2$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_getClientCode_result$schema = z.object({
  'code': z.string(),
  'name': z.string(),
  'pluginId': z.intersection(z.string(), z.unknown()),
  'packageId': z.intersection(z.string(), z.unknown()),
  'pluginRunId': z.intersection(z.string(), z.unknown()),
})
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_inventory_result$schema = z.array(z.object({
  'pluginId': z.intersection(z.string(), z.unknown()),
  'agentId': z.intersection(z.string(), z.unknown()),
  'packages': z.array(z.object({
  'packageId': z.intersection(z.string(), z.unknown()),
  'name': z.string(),
  'purpose': z.string(),
  'hasHostHalf': z.boolean(),
  'hasClientHalf': z.boolean(),
})),
  'currentPackageId': z.intersection(z.string(), z.unknown()).optional(),
  'nextPackageId': z.intersection(z.string(), z.unknown()).optional(),
  'activeRun': z.object({
  'pluginRunId': z.intersection(z.string(), z.unknown()),
  'packageId': z.intersection(z.string(), z.unknown()),
}).optional(),
  'latestRun': z.object({
  'pluginRunId': z.intersection(z.string(), z.unknown()),
  'packageId': z.intersection(z.string(), z.unknown()),
  'mode': z.union([z.literal("run"), z.literal("update")]),
  'status': z.union([z.literal("rejected"), z.literal("awaiting-approval"), z.literal("running"), z.literal("cancelled"), z.literal("starting-host"), z.literal("client-pending"), z.literal("waiting"), z.literal("failed"), z.literal("stopped")]),
  'approvalRequestId': z.intersection(z.string(), z.unknown()).optional(),
  'requiresApproval': z.boolean().optional(),
  'host': z.object({
  'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("failed"), z.literal("stopped"), z.literal("absent"), z.literal("pending")]),
  'waitingFor': z.array(z.string()),
  'error': z.string().optional(),
}),
  'client': z.object({
  'status': z.union([z.literal("running"), z.literal("waiting"), z.literal("failed"), z.literal("stopped"), z.literal("absent"), z.literal("pending")]),
  'waitingFor': z.array(z.string()),
  'error': z.string().optional(),
}),
  'error': z.object({
  'phase': z.union([z.literal("approval"), z.literal("host-load"), z.literal("host-apply"), z.literal("client-load"), z.literal("client-apply"), z.literal("client-render")]),
  'message': z.string(),
  'stack': z.string().optional(),
  'pluginId': z.intersection(z.string(), z.unknown()),
  'packageId': z.intersection(z.string(), z.unknown()),
  'pluginRunId': z.intersection(z.string(), z.unknown()),
}).optional(),
}).optional(),
}))
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_parameter_1$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_parameter_2$schema = z.string()
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_parameter_3$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))])
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_result$schema = z.union([z.object({
  'ok': z.literal(true),
  '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))]),
}), z.intersection(z.object({
  'ok': z.literal(false),
  'code': z.union([z.literal("plugin-not-running"), z.literal("stale-run"), z.literal("method-not-found"), z.literal("handler-error")]),
}), z.object({
  'message': z.string(),
  'stack': z.string().optional(),
}))])
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_parameter_1$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_parameter_2$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_parameter_3$schema = z.object({
  'message': z.string(),
  'stack': z.string().optional(),
})
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_result$schema = z.literal(null)
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_parameter_1$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_parameter_2$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_parameter_3$schema = z.object({
  'slot': z.string(),
  'message': z.string(),
  'stack': z.string().optional(),
  'abdicated': z.boolean(),
})
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_result$schema = z.literal(null)
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveInspectQuery_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveInspectQuery_parameter_1$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveInspectQuery_parameter_2$schema = z.union([z.object({
  'ok': z.literal(true),
  '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))]),
}), z.object({
  'ok': z.literal(false),
  'reason': z.union([z.literal("cancelled"), z.literal("provider-missing"), z.literal("method-missing"), z.literal("invalid-input"), z.literal("provider-error")]),
  'message': z.string(),
})])
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveInspectQuery_result$schema = z.object({
  'accepted': z.boolean(),
})
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveRequestRun_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveRequestRun_parameter_1$schema = z.union([z.object({
  'ok': z.literal(true),
  'pluginRunId': z.intersection(z.string(), z.unknown()),
  'waitingFor': z.array(z.string()).optional(),
}), z.object({
  'ok': z.literal(false),
  'reason': z.union([z.literal("rejected"), z.literal("host-half-failed"), z.literal("client-half-failed")]),
  'pluginRunId': z.intersection(z.string(), z.unknown()).optional(),
  'startedHere': z.boolean().optional(),
  'message': z.string().optional(),
  'stack': z.string().optional(),
})])
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveRequestRun_result$schema = z.object({
  'accepted': z.boolean(),
})
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_1$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_2$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_3$schema = z.union([z.literal("run"), z.literal("update")])
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_4$schema = z.union([z.literal(null), z.intersection(z.string(), z.unknown())])
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_5$schema = z.boolean()
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_result$schema = z.union([z.object({
  'ok': z.literal(true),
  'pluginId': z.intersection(z.string(), z.unknown()),
  'packageId': z.intersection(z.string(), z.unknown()),
  'pluginRunId': z.intersection(z.string(), z.unknown()),
  'waitingFor': z.array(z.string()),
  'startedHere': z.boolean(),
}), z.intersection(z.object({
  'ok': z.literal(false),
}), z.object({
  'message': z.string(),
  'stack': z.string().optional(),
}))])
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_parameter_1$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_parameter_2$schema = z.union([z.object({
  'ok': z.literal(true),
  'pluginRunId': z.intersection(z.string(), z.unknown()),
  'waitingFor': z.array(z.string()).optional(),
}), z.object({
  'ok': z.literal(false),
  'reason': z.union([z.literal("rejected"), z.literal("host-half-failed"), z.literal("client-half-failed")]),
  'pluginRunId': z.intersection(z.string(), z.unknown()).optional(),
  'startedHere': z.boolean().optional(),
  'message': z.string().optional(),
  'stack': z.string().optional(),
})])
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_result$schema = z.union([z.object({
  'ok': z.literal(true),
  'status': z.union([z.literal("awaiting-approval"), z.literal("starting"), z.literal("running")]),
  'pluginId': z.intersection(z.string(), z.unknown()),
  'packageId': z.intersection(z.string(), z.unknown()),
  'pluginRunId': z.intersection(z.string(), z.unknown()),
  'waitingFor': z.array(z.string()),
  'clientWaitingFor': z.array(z.string()).optional(),
  'currentPackageId': z.intersection(z.string(), z.unknown()).optional(),
  'nextPackageId': z.intersection(z.string(), z.unknown()).optional(),
  'mode': z.union([z.literal("run"), z.literal("update")]),
}), z.object({
  'ok': z.literal(false),
  'reason': z.union([z.literal("plugin-missing"), z.literal("rejected"), z.literal("host-half-failed"), z.literal("client-half-failed"), z.literal("package-missing"), z.literal("invalid-mode"), z.literal("transition-in-flight"), z.literal("cancelled"), z.literal("not-running")]),
  'message': z.string(),
  'stack': z.string().optional(),
})])
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_stopFromPanel_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_stopFromPanel_parameter_1$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_stopFromPanel_result$schema = z.union([z.object({
  'ok': z.literal(true),
}), z.object({
  'ok': z.literal(false),
  'reason': z.union([z.literal("plugin-missing"), z.literal("not-running")]),
  'message': z.string(),
})])
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_syncInspectManifest_parameter_0$schema = z.array(z.object({
  'id': z.string(),
  'description': z.string(),
  'methods': z.array(z.object({
  'name': z.string(),
  'description': z.string(),
  'inputSchema': 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))]),
  'outputSchema': 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 _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_syncInspectManifest_result$schema = z.literal(null)
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_undefineFromPanel_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_undefineFromPanel_parameter_1$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_undefineFromPanel_result$schema = z.union([z.object({
  'ok': z.literal(true),
  'wasRunning': z.boolean(),
}), z.object({
  'ok': z.literal(false),
  'reason': z.literal("plugin-missing"),
  'message': z.string(),
})])

export const TYPERT = {
  package: '@deepseek-ai/dsh-cordis-host-runner',
  face: 'host',
  schemas: [
  ],
  invocations: [
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/getClientCode',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'getClientCode',
      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_cordis_host_runner_dynamicCordisRunner_getClientCode_parameter_0$schema,
          },
        },
        {
          name: 'pluginId',
          wire: 'pluginId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_getClientCode_parameter_1$schema,
          },
        },
        {
          name: 'pluginRunId',
          wire: 'pluginRunId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginRunId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_getClientCode_parameter_2$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisClientSource',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_getClientCode_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":384,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/inventory',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'inventory',
      invocation: { kind: 'direct' },
      parameters: [
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/inventory:result',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_inventory_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":525,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/invoke',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'invoke',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'pluginId',
          wire: 'pluginId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_parameter_0$schema,
          },
        },
        {
          name: 'pluginRunId',
          wire: 'pluginRunId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginRunId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_parameter_1$schema,
          },
        },
        {
          name: 'method',
          wire: 'method',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/invoke:method',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_parameter_2$schema,
          },
        },
        {
          name: 'args',
          wire: 'args',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-session/types#JsonValue',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_parameter_3$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisInvokeResult',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":741,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportClientGuardFailure',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'reportClientGuardFailure',
      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_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_parameter_0$schema,
          },
        },
        {
          name: 'pluginId',
          wire: 'pluginId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_parameter_1$schema,
          },
        },
        {
          name: 'pluginRunId',
          wire: 'pluginRunId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginRunId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_parameter_2$schema,
          },
        },
        {
          name: 'failure',
          wire: 'failure',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisErrorDetails',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_parameter_3$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportClientGuardFailure:result',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":718,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportRenderFailure',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'reportRenderFailure',
      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_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_parameter_0$schema,
          },
        },
        {
          name: 'pluginId',
          wire: 'pluginId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_parameter_1$schema,
          },
        },
        {
          name: 'pluginRunId',
          wire: 'pluginRunId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginRunId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_parameter_2$schema,
          },
        },
        {
          name: 'failure',
          wire: 'failure',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisRenderFailure',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_parameter_3$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportRenderFailure:result',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":684,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/resolveInspectQuery',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'resolveInspectQuery',
      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_cordis_host_runner_dynamicCordisRunner_resolveInspectQuery_parameter_0$schema,
          },
        },
        {
          name: 'requestId',
          wire: 'requestId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisInspectRequestId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveInspectQuery_parameter_1$schema,
          },
        },
        {
          name: 'resolution',
          wire: 'resolution',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisInspectQueryResolution',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveInspectQuery_parameter_2$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisInspectResolveAck',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveInspectQuery_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":511,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/resolveRequestRun',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'resolveRequestRun',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'requestId',
          wire: 'requestId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#ApprovalRequestId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveRequestRun_parameter_0$schema,
          },
        },
        {
          name: 'resolution',
          wire: 'resolution',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisRunResolution',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveRequestRun_parameter_1$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisResolveAck',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveRequestRun_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":413,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/runHostHalf',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'runHostHalf',
      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_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_0$schema,
          },
        },
        {
          name: 'pluginId',
          wire: 'pluginId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_1$schema,
          },
        },
        {
          name: 'packageId',
          wire: 'packageId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPackageId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_2$schema,
          },
        },
        {
          name: 'mode',
          wire: 'mode',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicRunMode',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_3$schema,
          },
        },
        {
          name: 'requestId',
          wire: 'requestId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/runHostHalf:requestId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_4$schema,
          },
        },
        {
          name: 'approveFutureVersions',
          wire: 'approveFutureVersions',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/runHostHalf:approveFutureVersions',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_parameter_5$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisHostHalfResult',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":325,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/settleUserRun',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'settleUserRun',
      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_cordis_host_runner_dynamicCordisRunner_settleUserRun_parameter_0$schema,
          },
        },
        {
          name: 'pluginId',
          wire: 'pluginId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_parameter_1$schema,
          },
        },
        {
          name: 'resolution',
          wire: 'resolution',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisRunResolution',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_parameter_2$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisRunResponse',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":438,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/stopFromPanel',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'stopFromPanel',
      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_cordis_host_runner_dynamicCordisRunner_stopFromPanel_parameter_0$schema,
          },
        },
        {
          name: 'pluginId',
          wire: 'pluginId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_stopFromPanel_parameter_1$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisStopResponse',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_stopFromPanel_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":480,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/syncInspectManifest',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'syncInspectManifest',
      invocation: { kind: 'direct' },
      parameters: [
        {
          name: 'providers',
          wire: 'providers',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/syncInspectManifest:providers',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_syncInspectManifest_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/syncInspectManifest:result',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_syncInspectManifest_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":498,"column":3},
    },
    {
      id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/undefineFromPanel',
      service: 'dynamicCordisRunner',
      namespace: 'dynamicCordisRunner',
      method: 'undefineFromPanel',
      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_cordis_host_runner_dynamicCordisRunner_undefineFromPanel_parameter_0$schema,
          },
        },
        {
          name: 'pluginId',
          wire: 'pluginId',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisDynamicPluginId',
            schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_undefineFromPanel_parameter_1$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisUndefineReceipt',
        schema: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_undefineFromPanel_result$schema,
      },
      sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":227,"column":9},
    },
  ],
  model: {
    "services": [
      {
        "description": "Registry and cross-page router behind the two model-facing inspect tools.",
        "summary": "Registry and cross-page router behind the two model-facing inspect tools.",
        "tags": [],
        "jsDoc": "/** Registry and cross-page router behind the two model-facing inspect tools. */",
        "key": "cordisInspect",
        "exportName": "CordisInspectRegistryService",
        "members": [
          {
            "kind": "method",
            "name": "register",
            "signature": "register(registration: HostCordisInspectProviderRegistration): () => void",
            "summary": "Register one Host provider.",
            "jsDoc": "/**\n * Register one Host provider.\n * @param registration - manifest and local query handler.\n * @returns idempotent disposer.\n */"
          },
          {
            "kind": "method",
            "name": "syncClientManifest",
            "signature": "syncClientManifest(providers: readonly CordisInspectProviderManifest[]): void",
            "summary": "Replace the mirrored Client provider directory.",
            "jsDoc": "/**\n * Replace the mirrored Client provider directory.\n * @param providers - complete Client manifest snapshot.\n */"
          },
          {
            "kind": "method",
            "name": "list",
            "signature": "list(): CordisInspectProviderView[]",
            "summary": "Return the complete known Host and Client provider directory.",
            "jsDoc": "/**\n * Return the complete known Host and Client provider directory.\n * @returns Host providers followed by the Client providers.\n */"
          },
          {
            "kind": "method",
            "name": "query",
            "signature": "async query( platform: CordisInspectPlatform, providerId: string, methodName: string, input: JsonValue | undefined, agent: Agent, signal: AbortSignal, ): Promise<JsonValue>",
            "summary": "Execute one provider query on its owning platform.",
            "jsDoc": "/**\n * Execute one provider query on its owning platform.\n * @param platform - Host or Client runtime.\n * @param providerId - provider selected from {@link list}.\n * @param methodName - declared method name.\n * @param input - optional lossless JSON input.\n * @param agent - requesting Agent and scope.\n * @param signal - tool-call cancellation.\n * @returns provider JSON data.\n */"
          },
          {
            "kind": "method",
            "name": "resolveClientQuery",
            "signature": "resolveClientQuery( agent: Agent, requestId: CordisInspectRequestId, resolution: CordisInspectQueryResolution, ): CordisInspectResolveAck",
            "summary": "Accept the first valid Client response for a pending query.",
            "jsDoc": "/**\n * Accept the first valid Client response for a pending query.\n * @param agent - Agent whose Session owns the query.\n * @param requestId - Pending Client query identity.\n * @param resolution - Client provider result or failure.\n * @returns whether this response settled the still-pending query.\n */"
          }
        ],
        "types": [
          {
            "name": "Agent",
            "declaration": "export interface Agent {\n    readonly id: SessionId;\n    readonly options: AgentOptions;\n    readonly session: Session;\n    readonly inbox: Inbox;\n    readonly status: AgentStatus;\n    readonly ctx: Context;\n    cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n    whenIdle(): Promise<void>;\n    runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n    send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n    followup(message: UserMessage): void;\n    steer(message: UserMessage): void;\n    inject(message: UserMessage): void;\n}"
          },
          {
            "name": "AgentCancelCause",
            "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
          },
          {
            "name": "AgentOptions",
            "declaration": "export interface AgentOptions {\n    provider?: string;\n    model?: string;\n    maxTokens?: number;\n}"
          },
          {
            "name": "AgentStatus",
            "declaration": "export type AgentStatus = 'idle' | 'running';"
          },
          {
            "name": "ApprovalOutcome",
            "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
          },
          {
            "name": "ApprovalPolicy",
            "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
          },
          {
            "name": "ApprovalRequestId",
            "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
          },
          {
            "name": "AssistantMessage",
            "declaration": "export interface AssistantMessage extends Message {\n    readonly role: 'assistant';\n    readonly source: ModelMessageSource;\n}"
          },
          {
            "name": "AssistantProvenance",
            "declaration": "export interface AssistantProvenance {\n    provider: string;\n    model: string;\n    replayState?: unknown;\n}"
          },
          {
            "name": "AttachmentId",
            "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
          },
          {
            "name": "Branded",
            "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
          },
          {
            "name": "CallId",
            "declaration": "export type CallId = Branded<'CallId'>;"
          },
          {
            "name": "CancelOptions",
            "declaration": "export interface CancelOptions {\n    keepInbox?: boolean | undefined;\n}"
          },
          {
            "name": "CodeDispatchEventData",
            "declaration": "export interface CodeDispatchEventData extends CodeDispatchStartEventData {\n    isError: boolean;\n    content: ContentBlock[];\n}"
          },
          {
            "name": "CodeDispatchStartEventData",
            "declaration": "export interface CodeDispatchStartEventData {\n    rootCallId: CallId;\n    parentCallId: CallId;\n    subCallId: CallId;\n    name: string;\n    arguments: unknown;\n}"
          },
          {
            "name": "CommandId",
            "declaration": "export type CommandId = Branded<'CommandId'>;"
          },
          {
            "name": "CommandSource",
            "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
          },
          {
            "name": "CommandSourceMap",
            "declaration": "export interface CommandSourceMap {\n    user: { kind: 'user'; };\n}"
          },
          {
            "name": "ContentBlock",
            "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
          },
          {
            "name": "ContentBlockMap",
            "declaration": "export interface ContentBlockMap {\n    text: TextBlock;\n    reasoning: ReasoningBlock;\n    image: ImageBlock;\n    'tool-call': ToolCallBlock;\n    'tool-result': ToolResultBlock;\n}"
          },
          {
            "name": "ContentBlockType",
            "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
          },
          {
            "name": "ContextFormed",
            "declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
          },
          {
            "name": "ContextSnapshotSection",
            "declaration": "export interface ContextSnapshotSection {\n    readonly name: string;\n    readonly text: string;\n}"
          },
          {
            "name": "CordisInspectMethodManifest",
            "declaration": "export interface CordisInspectMethodManifest {\n    name: string;\n    description: string;\n    inputSchema: JsonValue;\n    outputSchema: JsonValue;\n}"
          },
          {
            "name": "CordisInspectPlatform",
            "declaration": "export type CordisInspectPlatform = 'host' | 'client';"
          },
          {
            "name": "CordisInspectProviderManifest",
            "declaration": "export interface CordisInspectProviderManifest {\n    id: string;\n    description: string;\n    methods: readonly CordisInspectMethodManifest[];\n}"
          },
          {
            "name": "CordisInspectProviderView",
            "declaration": "export interface CordisInspectProviderView extends CordisInspectProviderManifest {\n    platform: CordisInspectPlatform;\n}"
          },
          {
            "name": "CordisInspectQueryResolution",
            "declaration": "export type CordisInspectQueryResolution = { ok: true; data: JsonValue; } | { ok: false; reason: 'provider-missing' | 'method-missing' | 'invalid-input' | 'provider-error' | 'cancelled'; message: string; };"
          },
          {
            "name": "CordisInspectRequestId",
            "declaration": "export type CordisInspectRequestId = Branded<'CordisInspectRequestId'>;"
          },
          {
            "name": "CordisInspectResolveAck",
            "declaration": "export interface CordisInspectResolveAck {\n    accepted: boolean;\n}"
          },
          {
            "name": "EpochHeader",
            "declaration": "export interface EpochHeader {\n    config: LlmCallConfig;\n    adapterDefaults?: LlmCallConfigAdapterDefaults;\n    system?: string;\n    tools?: ToolSchema[];\n}"
          },
          {
            "name": "FinishReason",
            "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
          },
          {
            "name": "FinishReasonMap",
            "declaration": "export interface FinishReasonMap {\n    stop: { kind: 'stop'; };\n    'tool-calls': { kind: 'tool-calls'; };\n    'max-tokens': { kind: 'max-tokens'; };\n    aborted: { kind: 'aborted'; failure: LlmFailure; };\n    error: { kind: 'error'; failure: LlmFailure; };\n}"
          },
          {
            "name": "GoalBlockReason",
            "declaration": "export interface GoalBlockReason {\n    readonly code: string;\n    readonly message: string;\n}"
          },
          {
            "name": "GoalChangeMeta",
            "declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
          },
          {
            "name": "GoalClearChangeMeta",
            "declaration": "export interface GoalClearChangeMeta {\n    readonly kind: 'goal/change';\n    readonly version: 1;\n    readonly operation: 'clear';\n    readonly cleared: GoalRef;\n    readonly clearedAt: number;\n}"
          },
          {
            "name": "GoalId",
            "declaration": "export type GoalId = Branded<'GoalId'>;"
          },
          {
            "name": "GoalMessageSource",
            "declaration": "export interface GoalMessageSource {\n    readonly kind: 'goal';\n    readonly goalId: GoalId;\n    readonly revision: number;\n    readonly round: number;\n}"
          },
          {
            "name": "GoalOperation",
            "declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
          },
          {
            "name": "GoalPhase",
            "declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
          },
          {
            "name": "GoalRef",
            "declaration": "export interface GoalRef {\n    readonly id: GoalId;\n    readonly revision: number;\n}"
          },
          {
            "name": "GoalSnapshot",
            "declaration": "export interface GoalSnapshot extends GoalRef {\n    readonly objective: string;\n    readonly phase: GoalPhase;\n    readonly blockedReason?: GoalBlockReason;\n    readonly maxGoalRounds: number;\n}"
          },
          {
            "name": "GoalSnapshotChangeMeta",
            "declaration": "export interface GoalSnapshotChangeMeta {\n    readonly kind: 'goal/change';\n    readonly version: 1;\n    readonly operation: Exclude<GoalOperation, 'clear'>;\n    readonly goal: GoalSnapshot;\n    readonly roundsStarted: number;\n    readonly createdAt: number;\n    readonly updatedAt: number;\n}"
          },
          {
            "name": "HostCordisInspectProviderRegistration",
            "declaration": "export interface HostCordisInspectProviderRegistration {\n    manifest: CordisInspectProviderManifest;\n    query(method: string, input: JsonValue | undefined, context: HostCordisInspectQueryContext): Promise<JsonValue>;\n}"
          },
          {
            "name": "HostCordisInspectQueryContext",
            "declaration": "export interface HostCordisInspectQueryContext {\n    signal: AbortSignal;\n    agent: Agent;\n}"
          },
          {
            "name": "ImageAttachmentRef",
            "declaration": "export interface ImageAttachmentRef {\n    attachmentId: AttachmentId;\n    mediaType: ImageMediaType;\n    bytes: number;\n    width: number;\n    height: number;\n    name?: string;\n}"
          },
          {
            "name": "ImageBlock",
            "declaration": "export interface ImageBlock {\n    type: 'image';\n    attachment: ImageAttachmentRef;\n}"
          },
          {
            "name": "ImageMediaType",
            "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
          },
          {
            "name": "Inbox",
            "declaration": "export class Inbox {\n    get nextTurn(): readonly UserMessage[];\n    get nextStep(): readonly UserMessage[];\n    get hasPending(): boolean;\n    clear(): void;\n    claim(target: InboxTarget, turn: number): UserMessage[];\n    append(target: InboxTarget, message: UserMessage): void;\n    prepend(target: InboxTarget, message: UserMessage): void;\n    replace(messageId: MessageId, newMessage: UserMessage): boolean;\n    remove(messageId: MessageId): boolean;\n    splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
          },
          {
            "name": "InboxTarget",
            "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
          },
          {
            "name": "JsonValue",
            "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
          },
          {
            "name": "LlmCallConfig",
            "declaration": "export interface LlmCallConfig {\n    provider: string;\n    model: string;\n    reasoningEffort?: ReasoningEffortId;\n    temperature?: number;\n    maxTokens?: number;\n    stop?: string[];\n}"
          },
          {
            "name": "LlmCallConfigAdapterDefaults",
            "declaration": "export interface LlmCallConfigAdapterDefaults {\n    reasoningEffort?: true;\n    maxTokens?: true;\n}"
          },
          {
            "name": "LlmFailure",
            "declaration": "export interface LlmFailure {\n    readonly message: string;\n    readonly code: string;\n    readonly status?: number;\n    readonly providerRetryAfterMs?: number;\n    readonly requestId?: ProviderRequestId;\n}"
          },
          {
            "name": "Message",
            "declaration": "export interface Message {\n    readonly id: MessageId;\n    readonly role: 'system' | 'user' | 'assistant';\n    readonly content: ContentBlock[];\n    readonly source: MessageSource;\n}"
          },
          {
            "name": "MessageId",
            "declaration": "export type MessageId = Branded<'MessageId'>;"
          },
          {
            "name": "MessageSource",
            "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
          },
          {
            "name": "MessageSourceMap",
            "declaration": "export interface MessageSourceMap {\n    user: { kind: 'user'; };\n    plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n    model: ModelMessageSource;\n    tool: ToolMessageSource;\n    goal: GoalMessageSource;\n}"
          },
          {
            "name": "ModelMessageSource",
            "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n    kind: 'model';\n}"
          },
          {
            "name": "ProviderRequestId",
            "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
          },
          {
            "name": "ReasoningBlock",
            "declaration": "export interface ReasoningBlock {\n    type: 'reasoning';\n    text: string;\n}"
          },
          {
            "name": "ReasoningEffortId",
            "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
          },
          {
            "name": "RequestContext",
            "declaration": "export interface RequestContext {\n    provider: string;\n    model: string;\n    contextWindow?: number;\n}"
          },
          {
            "name": "RequestHeaderReason",
            "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change';"
          },
          {
            "name": "Session",
            "declaration": "export class Session {\n    get surface(): SessionSurface;\n    readonly header: SessionHeader;\n    get id(): SessionId;\n    readonly firstLiveSeq: number;\n    get events(): readonly SessionEvent[];\n    get seq(): number;\n    append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent] : []): SessionEvent<T>;\n    requestHeader(): EpochHeader | undefined;\n    requestContext(): RequestContext | undefined;\n    deriveMessages(): Message[];\n    deriveEventMessage(event: SessionEvent): Message | null;\n}"
          },
          {
            "name": "SessionEvent",
            "declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: number; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? { sourceEventSeqs?: number[]; surfaceOp?: SurfaceOp; } : object) }[T];"
          },
          {
            "name": "SessionEventMap",
            "declaration": "export interface SessionEventMap {\n    'turn/start': { turn: number; };\n    'turn/end': { turn: number; reason: TurnEndReason; };\n    'step/start': { turn: number; step: number; };\n    'step/end': { turn: number; step: number; };\n    'user/message': UserMessage;\n    'assistant/chunk': { turn: number; step: number; chunk: StreamChunk; };\n    'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; };\n    'tool/call': { turn: number; step: number; callId: CallId; name: string; arguments: string; };\n    'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; }; meta?: JsonValue; };\n    'todo/write': { todos: TodoItem[]; };\n    'request/header': { header: EpochHeader; reason: RequestHeaderReason; };\n    'request/context': RequestContext;\n    'session/end-seed': Record<string, never>;\n    'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n    'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n    'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: number; };\n    'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: CallId; reason?: string; };\n    'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n    'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n    'tool/code-dispatch-start': CodeDispatchStartEventData;\n    'tool/code-dispatch': CodeDispatchEventData;\n    'goal/change': GoalChangeMeta;\n}"
          },
          {
            "name": "SessionEventType",
            "declaration": "export type SessionEventType = keyof SessionEventMap;"
          },
          {
            "name": "SessionHeader",
            "declaration": "export interface SessionHeader {\n    readonly version: number;\n    readonly id: SessionId;\n    readonly createdAt: number;\n    readonly cwd?: string;\n    readonly parentSession?: SessionId;\n    readonly seedLength?: number;\n    readonly origin?: 'subagent';\n    readonly delegationDepth?: number;\n    readonly agentPreset?: string;\n}"
          },
          {
            "name": "SessionId",
            "declaration": "export type SessionId = Branded<'SessionId'>;"
          },
          {
            "name": "SessionSurface",
            "declaration": "export interface SessionSurface {\n    readonly nodes: readonly number[];\n    readonly replaceGeneration: number;\n}"
          },
          {
            "name": "StreamChunk",
            "declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: CallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: unknown; };"
          },
          {
            "name": "SurfaceEventType",
            "declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
          },
          {
            "name": "SurfaceIntent",
            "declaration": "export interface SurfaceIntent {\n    surfaceOp: SurfaceOp;\n    sourceEventSeqs?: number[];\n}"
          },
          {
            "name": "SurfaceOp",
            "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start: number; end: number; };"
          },
          {
            "name": "TextBlock",
            "declaration": "export interface TextBlock {\n    type: 'text';\n    text: string;\n}"
          },
          {
            "name": "TodoItem",
            "declaration": "export interface TodoItem {\n    content: string;\n    status: 'pending' | 'in_progress' | 'completed';\n}"
          },
          {
            "name": "TokenUsage",
            "declaration": "export interface TokenUsage {\n    inputTokens: number;\n    outputTokens: number;\n    cacheReadTokens?: number;\n    cacheWriteTokens?: number;\n    reasoningTokens?: number;\n}"
          },
          {
            "name": "ToolCallBlock",
            "declaration": "export interface ToolCallBlock {\n    type: 'tool-call';\n    id: CallId;\n    name: string;\n    arguments: string;\n}"
          },
          {
            "name": "ToolMessageSource",
            "declaration": "export interface ToolMessageSource {\n    kind: 'tool';\n    callId: CallId;\n}"
          },
          {
            "name": "ToolResultBlock",
            "declaration": "export interface ToolResultBlock {\n    type: 'tool-result';\n    toolCallId: CallId;\n    content: ContentBlock[];\n    isError?: boolean;\n}"
          },
          {
            "name": "ToolResultMessage",
            "declaration": "export interface ToolResultMessage extends Message {\n    readonly role: 'user';\n    readonly content: [ToolResultBlock];\n    readonly source: ToolMessageSource;\n}"
          },
          {
            "name": "ToolSchema",
            "declaration": "export interface ToolSchema {\n    name: string;\n    description: string;\n    parameters: Record<string, unknown>;\n}"
          },
          {
            "name": "TurnEndCancelCause",
            "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
          },
          {
            "name": "TurnEndReason",
            "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
          },
          {
            "name": "TurnEndReasonMap",
            "declaration": "export interface TurnEndReasonMap {\n    completed: { kind: 'completed'; };\n    aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n    blocked: { kind: 'blocked'; };\n    error: { kind: 'error'; error: LlmFailure; };\n    'max-tokens': { kind: 'max-tokens'; };\n    interrupted: { kind: 'interrupted'; };\n}"
          },
          {
            "name": "UserMessage",
            "declaration": "export interface UserMessage extends Message {\n    readonly role: 'user';\n}"
          }
        ]
      },
      {
        "description": "Dynamic Plugin registry and Host-half lifecycle.",
        "summary": "Dynamic Plugin registry and Host-half lifecycle.",
        "tags": [],
        "jsDoc": "/** Dynamic Plugin registry and Host-half lifecycle. */",
        "key": "dynamicCordisRunner",
        "exportName": "DynamicCordisRunnerService",
        "members": [
          {
            "kind": "method",
            "name": "define",
            "signature": "define(request: DynamicCordisDefineRequest): DynamicCordisDefineReceipt",
            "summary": "Define a new Plugin's first Package or append a Package to an existing Plugin.",
            "jsDoc": "/**\n * Define a new Plugin's first Package or append a Package to an existing Plugin.\n * @param request - Session ownership, Plugin selection, metadata, and source code.\n * @returns Host-minted Plugin and Package identities with declared-half metadata.\n */"
          },
          {
            "kind": "method",
            "name": "undefine",
            "signature": "async undefine(agent: Agent, pluginId: CordisDynamicPluginId): Promise<DynamicCordisUndefineReceipt>",
            "summary": "Remove a Plugin, its active run, and all immutable Packages.",
            "jsDoc": "/**\n * Remove a Plugin, its active run, and all immutable Packages.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - Stable Plugin identity to remove.\n * @returns Whether removal succeeded and whether it stopped an active run.\n */"
          },
          {
            "kind": "method",
            "name": "undefineFromPanel",
            "signature": "@Remote('undefineFromPanel') async undefineFromPanel(agent: Agent, pluginId: CordisDynamicPluginId): Promise<DynamicCordisUndefineReceipt>",
            "summary": "Remove a Plugin from the user panel and queue the resulting state change for the model's next step.",
            "jsDoc": "/**\n * Remove a Plugin from the user panel and queue the resulting state change for the model's next step.\n * @param agent - Agent whose Session owns the Plugin and receives the context.\n * @param pluginId - Stable Plugin identity to remove.\n * @returns Whether removal succeeded and whether it stopped an active run.\n */"
          },
          {
            "kind": "method",
            "name": "run",
            "signature": "async run( agent: Agent, pluginId: CordisDynamicPluginId, packageId: CordisDynamicPackageId, mode: CordisDynamicRunMode, signal?: AbortSignal, ): Promise<DynamicCordisRunResponse>",
            "summary": "Start or update one Package for a model tool call.",
            "jsDoc": "/**\n * Start or update one Package for a model tool call. An unauthorized Client\n * Package waits for approval; Plugin-wide authorization covers later versions.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - Stable Plugin identity to activate.\n * @param packageId - Immutable Package version to activate.\n * @param mode - Whether to run the current version or switch versions.\n * @param signal - Tool-call cancellation signal while the activation request is being created.\n * @returns The successful activation identity or an actionable refusal.\n */"
          },
          {
            "kind": "method",
            "name": "runHostHalf",
            "signature": "@Remote('runHostHalf') async runHostHalf( agent: Agent, pluginId: CordisDynamicPluginId, packageId: CordisDynamicPackageId, mode: CordisDynamicRunMode, requestId: ApprovalRequestId | null, approveFutureVersions: boolean, ): Promise<DynamicCordisHostHalfResult>",
            "summary": "Start Host code for an approved request or a direct panel gesture.",
            "jsDoc": "/**\n * Start Host code for an approved request or a direct panel gesture.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - Stable Plugin identity to activate.\n * @param packageId - Immutable Package version to activate.\n * @param mode - Whether to run the current version or switch versions.\n * @param requestId - Model-driven request identity, or null for a direct user gesture.\n * @param approveFutureVersions - Whether this approval covers later Packages of the same Plugin.\n * @returns The exact Host activation or a failure message.\n */"
          },
          {
            "kind": "method",
            "name": "getClientCode",
            "signature": "@Remote('getClientCode') getClientCode( agent: Agent, pluginId: CordisDynamicPluginId, pluginRunId: CordisDynamicPluginRunId, ): DynamicCordisClientSource",
            "summary": "Fetch Client code for the exact active run.",
            "jsDoc": "/**\n * Fetch Client code for the exact active run.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - Stable Plugin identity to read.\n * @param pluginRunId - Exact active run authorized to receive source.\n * @returns Client source and its Plugin, Package, and run identities.\n */"
          },
          {
            "kind": "method",
            "name": "resolveRequestRun",
            "signature": "@Remote('resolveRequestRun') async resolveRequestRun( requestId: ApprovalRequestId, resolution: DynamicCordisRunResolution, ): Promise<DynamicCordisResolveAck>",
            "summary": "Resolve one model-driven Client activation request.",
            "jsDoc": "/**\n * Resolve one model-driven Client activation request.\n * @param requestId - Request identity to settle once.\n * @param resolution - Browser refusal or exact Client activation result.\n * @returns Whether the still-pending request accepted this resolution.\n */"
          },
          {
            "kind": "method",
            "name": "settleUserRun",
            "signature": "@Remote('settleUserRun') async settleUserRun( agent: Agent, pluginId: CordisDynamicPluginId, resolution: DynamicCordisRunResolution, ): Promise<DynamicCordisRunResponse>",
            "summary": "Settle a direct panel run after this page loaded or failed its Client half.",
            "jsDoc": "/**\n * Settle a direct panel run after this page loaded or failed its Client half.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - Stable Plugin identity being settled.\n * @param resolution - Exact Client activation result from the acting page.\n * @returns The committed activation or its failure.\n */"
          },
          {
            "kind": "method",
            "name": "stop",
            "signature": "async stop(agent: Agent, pluginId: CordisDynamicPluginId): Promise<DynamicCordisStopResponse>",
            "summary": "Stop the active run while retaining every Package version.",
            "jsDoc": "/**\n * Stop the active run while retaining every Package version.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - Stable Plugin identity to stop.\n * @returns Success or the reason no run was stopped.\n */"
          },
          {
            "kind": "method",
            "name": "stopFromPanel",
            "signature": "@Remote('stopFromPanel') async stopFromPanel(agent: Agent, pluginId: CordisDynamicPluginId): Promise<DynamicCordisStopResponse>",
            "summary": "Stop a Plugin from the user panel and queue the resulting state change for the model's next step.",
            "jsDoc": "/**\n * Stop a Plugin from the user panel and queue the resulting state change for the model's next step.\n * @param agent - Agent whose Session owns the Plugin and receives the context.\n * @param pluginId - Stable Plugin identity to stop.\n * @returns Success or the reason no run was stopped.\n */"
          },
          {
            "kind": "method",
            "name": "syncInspectManifest",
            "signature": "@Remote('syncInspectManifest') syncInspectManifest(providers: readonly CordisInspectProviderManifest[]): null",
            "summary": "Replace the Host mirror of the Client inspect provider directory.",
            "jsDoc": "/**\n * Replace the Host mirror of the Client inspect provider directory.\n * @param providers - complete Client provider manifest.\n * @returns null after accepting the manifest.\n */"
          },
          {
            "kind": "method",
            "name": "resolveInspectQuery",
            "signature": "@Remote('resolveInspectQuery') resolveInspectQuery( agent: Agent, requestId: CordisInspectRequestId, resolution: CordisInspectQueryResolution, ): CordisInspectResolveAck",
            "summary": "Claim one pending Client inspect query with its live result.",
            "jsDoc": "/**\n * Claim one pending Client inspect query with its live result.\n * @param agent - Session that owns the query.\n * @param requestId - exact pending query identity.\n * @param resolution - provider result or structured refusal.\n * @returns whether this answer won the query.\n */"
          },
          {
            "kind": "method",
            "name": "inventory",
            "signature": "@Remote('inventory') inventory(): DynamicCordisInventoryRow[]",
            "summary": "Frame-wide inventory, grouped as one row per stable Plugin.",
            "jsDoc": "/**\n * Frame-wide inventory, grouped as one row per stable Plugin.\n * @returns Source-free metadata for every process-local Plugin.\n */"
          },
          {
            "kind": "method",
            "name": "snapshot",
            "signature": "snapshot(agent: Agent): DynamicCordisSnapshotRow[]",
            "summary": "Read one Session's Host-rich state for inspection and result rendering.",
            "jsDoc": "/**\n * Read one Session's Host-rich state for inspection and result rendering.\n * @param agent - Agent whose Session selects visible Plugins.\n * @returns Plugin versions, active runs, Host fibers, and render failures.\n */"
          },
          {
            "kind": "method",
            "name": "reference",
            "signature": "reference(agent: Agent, pluginId: CordisDynamicPluginId): DynamicCordisReference | undefined",
            "summary": "Read source-free context for an explicit `@pluginId` user gesture.",
            "jsDoc": "/**\n * Read source-free context for an explicit `@pluginId` user gesture.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - Stable Plugin identity referenced by the user.\n * @returns The preferred modification base, or undefined when unavailable.\n */"
          },
          {
            "kind": "method",
            "name": "listPlugins",
            "signature": "listPlugins(agent: Agent): DynamicCordisPluginInspection[]",
            "summary": "List source-free Plugin summaries owned by one Session.",
            "jsDoc": "/**\n * List source-free Plugin summaries owned by one Session.\n * @param agent - Agent whose Session selects visible Plugins.\n * @returns one summary per Plugin in creation order.\n */"
          },
          {
            "kind": "method",
            "name": "inspectPlugin",
            "signature": "inspectPlugin(agent: Agent, pluginId: CordisDynamicPluginId): DynamicCordisPluginInspection",
            "summary": "Inspect one Plugin without returning Package source.",
            "jsDoc": "/**\n * Inspect one Plugin without returning Package source.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - stable Plugin identity.\n * @returns version pointers, latest run, and all Package summaries.\n */"
          },
          {
            "kind": "method",
            "name": "inspectPackage",
            "signature": "inspectPackage( agent: Agent, pluginId: CordisDynamicPluginId, packageId: CordisDynamicPackageId, ): DynamicCordisPackageInspection",
            "summary": "Read one exact immutable Package and its Host and Client source.",
            "jsDoc": "/**\n * Read one exact immutable Package and its Host and Client source.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - Stable Plugin identity that owns the Package.\n * @param packageId - Exact immutable Package identity to inspect.\n * @returns Package metadata, source, and the Plugin's lifecycle pointers.\n */"
          },
          {
            "kind": "method",
            "name": "reportRenderFailure",
            "signature": "@Remote('reportRenderFailure') async reportRenderFailure( agent: Agent, pluginId: CordisDynamicPluginId, pluginRunId: CordisDynamicPluginRunId, failure: DynamicCordisRenderFailure, ): Promise<null>",
            "summary": "Record a post-load render failure for the exact active run.",
            "jsDoc": "/**\n * Record a post-load render failure for the exact active run.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - Stable Plugin identity that rendered.\n * @param pluginRunId - Exact active run that produced the failure.\n * @param failure - Slot, message, and entry-retirement result.\n * @returns Null after recording or ignoring a stale report.\n */"
          },
          {
            "kind": "method",
            "name": "reportClientGuardFailure",
            "signature": "@Remote('reportClientGuardFailure') async reportClientGuardFailure( agent: Agent, pluginId: CordisDynamicPluginId, pluginRunId: CordisDynamicPluginRunId, failure: CordisErrorDetails, ): Promise<null>",
            "summary": "Report a Client guard rejection that happened after the Package completed activation.",
            "jsDoc": "/**\n * Report a Client guard rejection that happened after the Package completed activation.\n * @param agent - Agent whose Session must own the Plugin.\n * @param pluginId - Stable Plugin identity whose Client code was rejected.\n * @param pluginRunId - Exact active run that produced the rejection.\n * @param failure - Original guard message and stack.\n * @returns Null after reporting or ignoring a stale/startup failure.\n */"
          },
          {
            "kind": "method",
            "name": "invoke",
            "signature": "@Remote('invoke') async invoke( pluginId: CordisDynamicPluginId, pluginRunId: CordisDynamicPluginRunId, method: string, args: JsonValue, ): Promise<DynamicCordisInvokeResult>",
            "summary": "Invoke an active Host method while rejecting stale Client runs.",
            "jsDoc": "/**\n * Invoke an active Host method while rejecting stale Client runs.\n * @param pluginId - Stable Plugin identity that owns the method.\n * @param pluginRunId - Exact active run authorizing the call.\n * @param method - Registered Host handler name.\n * @param args - JSON argument delivered to the handler.\n * @returns The JSON result or a typed invocation failure.\n */"
          }
        ],
        "types": [
          {
            "name": "Agent",
            "declaration": "export interface Agent {\n    readonly id: SessionId;\n    readonly options: AgentOptions;\n    readonly session: Session;\n    readonly inbox: Inbox;\n    readonly status: AgentStatus;\n    readonly ctx: Context;\n    cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n    whenIdle(): Promise<void>;\n    runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n    send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n    followup(message: UserMessage): void;\n    steer(message: UserMessage): void;\n    inject(message: UserMessage): void;\n}"
          },
          {
            "name": "AgentCancelCause",
            "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
          },
          {
            "name": "AgentOptions",
            "declaration": "export interface AgentOptions {\n    provider?: string;\n    model?: string;\n    maxTokens?: number;\n}"
          },
          {
            "name": "AgentStatus",
            "declaration": "export type AgentStatus = 'idle' | 'running';"
          },
          {
            "name": "ApprovalOutcome",
            "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
          },
          {
            "name": "ApprovalPolicy",
            "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
          },
          {
            "name": "ApprovalRequestId",
            "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
          },
          {
            "name": "ApprovalRequestId",
            "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
          },
          {
            "name": "AssistantMessage",
            "declaration": "export interface AssistantMessage extends Message {\n    readonly role: 'assistant';\n    readonly source: ModelMessageSource;\n}"
          },
          {
            "name": "AssistantProvenance",
            "declaration": "export interface AssistantProvenance {\n    provider: string;\n    model: string;\n    replayState?: unknown;\n}"
          },
          {
            "name": "AttachmentId",
            "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
          },
          {
            "name": "Branded",
            "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
          },
          {
            "name": "CallId",
            "declaration": "export type CallId = Branded<'CallId'>;"
          },
          {
            "name": "CancelOptions",
            "declaration": "export interface CancelOptions {\n    keepInbox?: boolean | undefined;\n}"
          },
          {
            "name": "CodeDispatchEventData",
            "declaration": "export interface CodeDispatchEventData extends CodeDispatchStartEventData {\n    isError: boolean;\n    content: ContentBlock[];\n}"
          },
          {
            "name": "CodeDispatchStartEventData",
            "declaration": "export interface CodeDispatchStartEventData {\n    rootCallId: CallId;\n    parentCallId: CallId;\n    subCallId: CallId;\n    name: string;\n    arguments: unknown;\n}"
          },
          {
            "name": "CommandId",
            "declaration": "export type CommandId = Branded<'CommandId'>;"
          },
          {
            "name": "CommandSource",
            "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
          },
          {
            "name": "CommandSourceMap",
            "declaration": "export interface CommandSourceMap {\n    user: { kind: 'user'; };\n}"
          },
          {
            "name": "ContentBlock",
            "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
          },
          {
            "name": "ContentBlockMap",
            "declaration": "export interface ContentBlockMap {\n    text: TextBlock;\n    reasoning: ReasoningBlock;\n    image: ImageBlock;\n    'tool-call': ToolCallBlock;\n    'tool-result': ToolResultBlock;\n}"
          },
          {
            "name": "ContentBlockType",
            "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
          },
          {
            "name": "ContextFormed",
            "declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
          },
          {
            "name": "ContextSnapshotSection",
            "declaration": "export interface ContextSnapshotSection {\n    readonly name: string;\n    readonly text: string;\n}"
          },
          {
            "name": "CordisDynamicPackageId",
            "declaration": "export type CordisDynamicPackageId = Branded<'CordisDynamicPackageId'>;"
          },
          {
            "name": "CordisDynamicPluginId",
            "declaration": "export type CordisDynamicPluginId = Branded<'CordisDynamicPluginId'>;"
          },
          {
            "name": "CordisDynamicPluginRunId",
            "declaration": "export type CordisDynamicPluginRunId = Branded<'CordisDynamicPluginRunId'>;"
          },
          {
            "name": "CordisDynamicRunMode",
            "declaration": "export type CordisDynamicRunMode = 'run' | 'update';"
          },
          {
            "name": "CordisErrorDetails",
            "declaration": "export interface CordisErrorDetails {\n    message: string;\n    stack?: string;\n}"
          },
          {
            "name": "CordisHalfState",
            "declaration": "export interface CordisHalfState {\n    status: 'absent' | 'pending' | 'stopped' | 'running' | 'waiting' | 'failed';\n    waitingFor: readonly string[];\n    error?: string;\n}"
          },
          {
            "name": "CordisInspectMethodManifest",
            "declaration": "export interface CordisInspectMethodManifest {\n    name: string;\n    description: string;\n    inputSchema: JsonValue;\n    outputSchema: JsonValue;\n}"
          },
          {
            "name": "CordisInspectProviderManifest",
            "declaration": "export interface CordisInspectProviderManifest {\n    id: string;\n    description: string;\n    methods: readonly CordisInspectMethodManifest[];\n}"
          },
          {
            "name": "CordisInspectQueryResolution",
            "declaration": "export type CordisInspectQueryResolution = { ok: true; data: JsonValue; } | { ok: false; reason: 'provider-missing' | 'method-missing' | 'invalid-input' | 'provider-error' | 'cancelled'; message: string; };"
          },
          {
            "name": "CordisInspectRequestId",
            "declaration": "export type CordisInspectRequestId = Branded<'CordisInspectRequestId'>;"
          },
          {
            "name": "CordisInspectResolveAck",
            "declaration": "export interface CordisInspectResolveAck {\n    accepted: boolean;\n}"
          },
          {
            "name": "CordisRunDiagnostic",
            "declaration": "export interface CordisRunDiagnostic {\n    phase: 'approval' | 'host-load' | 'host-apply' | 'client-load' | 'client-apply' | 'client-render';\n    message: string;\n    stack?: string;\n    pluginId: CordisDynamicPluginId;\n    packageId: CordisDynamicPackageId;\n    pluginRunId: CordisDynamicPluginRunId;\n}"
          },
          {
            "name": "CordisRunStatus",
            "declaration": "export type CordisRunStatus = 'awaiting-approval' | 'starting-host' | 'client-pending' | 'running' | 'waiting' | 'rejected' | 'failed' | 'cancelled' | 'stopped';"
          },
          {
            "name": "DynamicCordisClientSource",
            "declaration": "export interface DynamicCordisClientSource {\n    code: string;\n    name: string;\n    pluginId: CordisDynamicPluginId;\n    packageId: CordisDynamicPackageId;\n    pluginRunId: CordisDynamicPluginRunId;\n}"
          },
          {
            "name": "DynamicCordisDefineReceipt",
            "declaration": "export interface DynamicCordisDefineReceipt {\n    pluginId: CordisDynamicPluginId;\n    packageId: CordisDynamicPackageId;\n    name: string;\n    purpose: string;\n    hasHostHalf: boolean;\n    hasClientHalf: boolean;\n}"
          },
          {
            "name": "DynamicCordisDefineRequest",
            "declaration": "export interface DynamicCordisDefineRequest {\n    sessionId: SessionId;\n    plugin: { kind: 'new'; idPrefix: string; } | { kind: 'existing'; pluginId: CordisDynamicPluginId; };\n    name: string;\n    purpose: string;\n    code: { host?: string; client?: string; };\n}"
          },
          {
            "name": "DynamicCordisHostHalfResult",
            "declaration": "export type DynamicCordisHostHalfResult = { ok: true; pluginId: CordisDynamicPluginId; packageId: CordisDynamicPackageId; pluginRunId: CordisDynamicPluginRunId; waitingFor: readonly string[]; startedHere: boolean; } | ({ ok: false; } & CordisErrorDetails);"
          },
          {
            "name": "DynamicCordisInventoryPackage",
            "declaration": "export interface DynamicCordisInventoryPackage {\n    packageId: CordisDynamicPackageId;\n    name: string;\n    purpose: string;\n    hasHostHalf: boolean;\n    hasClientHalf: boolean;\n}"
          },
          {
            "name": "DynamicCordisInventoryRow",
            "declaration": "export interface DynamicCordisInventoryRow {\n    pluginId: CordisDynamicPluginId;\n    agentId: SessionId;\n    packages: readonly DynamicCordisInventoryPackage[];\n    currentPackageId?: CordisDynamicPackageId;\n    nextPackageId?: CordisDynamicPackageId;\n    activeRun?: { pluginRunId: CordisDynamicPluginRunId; packageId: CordisDynamicPackageId; };\n    latestRun?: DynamicCordisRunAttempt;\n}"
          },
          {
            "name": "DynamicCordisInvokeResult",
            "declaration": "export type DynamicCordisInvokeResult = { ok: true; value: JsonValue; } | ({ ok: false; code: 'plugin-not-running' | 'stale-run' | 'method-not-found' | 'handler-error'; } & CordisErrorDetails);"
          },
          {
            "name": "DynamicCordisPackageInspection",
            "declaration": "export interface DynamicCordisPackageInspection extends DynamicCordisReference {\n    code: { host?: string; client?: string; };\n}"
          },
          {
            "name": "DynamicCordisPluginInspection",
            "declaration": "export interface DynamicCordisPluginInspection extends DynamicCordisReference {\n    packages: Array<{ packageId: CordisDynamicPackageId; name: string; purpose: string; hasHostHalf: boolean; hasClientHalf: boolean; }>;\n}"
          },
          {
            "name": "DynamicCordisReference",
            "declaration": "export interface DynamicCordisReference {\n    pluginId: CordisDynamicPluginId;\n    packageId: CordisDynamicPackageId;\n    name: string;\n    purpose: string;\n    currentPackageId?: CordisDynamicPackageId;\n    nextPackageId?: CordisDynamicPackageId;\n    activeRun?: { pluginRunId: CordisDynamicPluginRunId; packageId: CordisDynamicPackageId; };\n    latestRun?: DynamicCordisRunAttempt;\n}"
          },
          {
            "name": "DynamicCordisRenderFailure",
            "declaration": "export interface DynamicCordisRenderFailure {\n    slot: string;\n    message: string;\n    stack?: string;\n    abdicated: boolean;\n}"
          },
          {
            "name": "DynamicCordisResolveAck",
            "declaration": "export interface DynamicCordisResolveAck {\n    accepted: boolean;\n}"
          },
          {
            "name": "DynamicCordisRunAttempt",
            "declaration": "export interface DynamicCordisRunAttempt {\n    pluginRunId: CordisDynamicPluginRunId;\n    packageId: CordisDynamicPackageId;\n    mode: CordisDynamicRunMode;\n    status: CordisRunStatus;\n    approvalRequestId?: ApprovalRequestId;\n    requiresApproval?: boolean;\n    host: CordisHalfState;\n    client: CordisHalfState;\n    error?: CordisRunDiagnostic;\n}"
          },
          {
            "name": "DynamicCordisRunResolution",
            "declaration": "export type DynamicCordisRunResolution = { ok: true; pluginRunId: CordisDynamicPluginRunId; waitingFor?: readonly string[]; } | { ok: false; reason: 'rejected' | 'host-half-failed' | 'client-half-failed'; pluginRunId?: CordisDynamicPluginRunId; startedHere?: boolean; message?: string; stack?: string; };"
          },
          {
            "name": "DynamicCordisRunResponse",
            "declaration": "export type DynamicCordisRunResponse = { ok: true; status: 'awaiting-approval' | 'starting' | 'running'; pluginId: CordisDynamicPluginId; packageId: CordisDynamicPackageId; pluginRunId: CordisDynamicPluginRunId; waitingFor: readonly string[]; clientWaitingFor?: readonly string[]; currentPackageId?: CordisDynamicPackageId; nextPackageId?: CordisDynamicPackageId; mode: CordisDynamicRunMode; } | { ok: false; reason: 'plugin-missing' | 'package-missing' | 'invalid-mode' | 'transition-in-flight' | 'host-half-failed' | 'client-half-failed' | 'rejected' | 'cancelled' | 'not-running'; message: string; stack?: string; };"
          },
          {
            "name": "DynamicCordisSnapshotRow",
            "declaration": "export interface DynamicCordisSnapshotRow {\n    pluginId: CordisDynamicPluginId;\n    currentPackageId?: CordisDynamicPackageId;\n    nextPackageId?: CordisDynamicPackageId;\n    packages: Array<{ packageId: CordisDynamicPackageId; name: string; purpose: string; hasHostHalf: boolean; hasClientHalf: boolean; }>;\n    activeRun?: { pluginRunId: CordisDynamicPluginRunId; packageId: CordisDynamicPackageId; fiber?: Fiber; handlers: string[]; renderFailure?: DynamicCordisRenderFailure; };\n    latestRun?: DynamicCordisRunAttempt;\n}"
          },
          {
            "name": "DynamicCordisStopResponse",
            "declaration": "export type DynamicCordisStopResponse = { ok: true; } | { ok: false; reason: 'plugin-missing' | 'not-running'; message: string; };"
          },
          {
            "name": "DynamicCordisUndefineReceipt",
            "declaration": "export type DynamicCordisUndefineReceipt = { ok: true; wasRunning: boolean; } | { ok: false; reason: 'plugin-missing'; message: string; };"
          },
          {
            "name": "EpochHeader",
            "declaration": "export interface EpochHeader {\n    config: LlmCallConfig;\n    adapterDefaults?: LlmCallConfigAdapterDefaults;\n    system?: string;\n    tools?: ToolSchema[];\n}"
          },
          {
            "name": "FinishReason",
            "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
          },
          {
            "name": "FinishReasonMap",
            "declaration": "export interface FinishReasonMap {\n    stop: { kind: 'stop'; };\n    'tool-calls': { kind: 'tool-calls'; };\n    'max-tokens': { kind: 'max-tokens'; };\n    aborted: { kind: 'aborted'; failure: LlmFailure; };\n    error: { kind: 'error'; failure: LlmFailure; };\n}"
          },
          {
            "name": "GoalBlockReason",
            "declaration": "export interface GoalBlockReason {\n    readonly code: string;\n    readonly message: string;\n}"
          },
          {
            "name": "GoalChangeMeta",
            "declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
          },
          {
            "name": "GoalClearChangeMeta",
            "declaration": "export interface GoalClearChangeMeta {\n    readonly kind: 'goal/change';\n    readonly version: 1;\n    readonly operation: 'clear';\n    readonly cleared: GoalRef;\n    readonly clearedAt: number;\n}"
          },
          {
            "name": "GoalId",
            "declaration": "export type GoalId = Branded<'GoalId'>;"
          },
          {
            "name": "GoalMessageSource",
            "declaration": "export interface GoalMessageSource {\n    readonly kind: 'goal';\n    readonly goalId: GoalId;\n    readonly revision: number;\n    readonly round: number;\n}"
          },
          {
            "name": "GoalOperation",
            "declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
          },
          {
            "name": "GoalPhase",
            "declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
          },
          {
            "name": "GoalRef",
            "declaration": "export interface GoalRef {\n    readonly id: GoalId;\n    readonly revision: number;\n}"
          },
          {
            "name": "GoalSnapshot",
            "declaration": "export interface GoalSnapshot extends GoalRef {\n    readonly objective: string;\n    readonly phase: GoalPhase;\n    readonly blockedReason?: GoalBlockReason;\n    readonly maxGoalRounds: number;\n}"
          },
          {
            "name": "GoalSnapshotChangeMeta",
            "declaration": "export interface GoalSnapshotChangeMeta {\n    readonly kind: 'goal/change';\n    readonly version: 1;\n    readonly operation: Exclude<GoalOperation, 'clear'>;\n    readonly goal: GoalSnapshot;\n    readonly roundsStarted: number;\n    readonly createdAt: number;\n    readonly updatedAt: number;\n}"
          },
          {
            "name": "ImageAttachmentRef",
            "declaration": "export interface ImageAttachmentRef {\n    attachmentId: AttachmentId;\n    mediaType: ImageMediaType;\n    bytes: number;\n    width: number;\n    height: number;\n    name?: string;\n}"
          },
          {
            "name": "ImageBlock",
            "declaration": "export interface ImageBlock {\n    type: 'image';\n    attachment: ImageAttachmentRef;\n}"
          },
          {
            "name": "ImageMediaType",
            "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
          },
          {
            "name": "Inbox",
            "declaration": "export class Inbox {\n    get nextTurn(): readonly UserMessage[];\n    get nextStep(): readonly UserMessage[];\n    get hasPending(): boolean;\n    clear(): void;\n    claim(target: InboxTarget, turn: number): UserMessage[];\n    append(target: InboxTarget, message: UserMessage): void;\n    prepend(target: InboxTarget, message: UserMessage): void;\n    replace(messageId: MessageId, newMessage: UserMessage): boolean;\n    remove(messageId: MessageId): boolean;\n    splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
          },
          {
            "name": "InboxTarget",
            "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
          },
          {
            "name": "JsonValue",
            "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
          },
          {
            "name": "LlmCallConfig",
            "declaration": "export interface LlmCallConfig {\n    provider: string;\n    model: string;\n    reasoningEffort?: ReasoningEffortId;\n    temperature?: number;\n    maxTokens?: number;\n    stop?: string[];\n}"
          },
          {
            "name": "LlmCallConfigAdapterDefaults",
            "declaration": "export interface LlmCallConfigAdapterDefaults {\n    reasoningEffort?: true;\n    maxTokens?: true;\n}"
          },
          {
            "name": "LlmFailure",
            "declaration": "export interface LlmFailure {\n    readonly message: string;\n    readonly code: string;\n    readonly status?: number;\n    readonly providerRetryAfterMs?: number;\n    readonly requestId?: ProviderRequestId;\n}"
          },
          {
            "name": "Message",
            "declaration": "export interface Message {\n    readonly id: MessageId;\n    readonly role: 'system' | 'user' | 'assistant';\n    readonly content: ContentBlock[];\n    readonly source: MessageSource;\n}"
          },
          {
            "name": "MessageId",
            "declaration": "export type MessageId = Branded<'MessageId'>;"
          },
          {
            "name": "MessageSource",
            "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
          },
          {
            "name": "MessageSourceMap",
            "declaration": "export interface MessageSourceMap {\n    user: { kind: 'user'; };\n    plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n    model: ModelMessageSource;\n    tool: ToolMessageSource;\n    goal: GoalMessageSource;\n}"
          },
          {
            "name": "ModelMessageSource",
            "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n    kind: 'model';\n}"
          },
          {
            "name": "ProviderRequestId",
            "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
          },
          {
            "name": "ReasoningBlock",
            "declaration": "export interface ReasoningBlock {\n    type: 'reasoning';\n    text: string;\n}"
          },
          {
            "name": "ReasoningEffortId",
            "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
          },
          {
            "name": "RequestContext",
            "declaration": "export interface RequestContext {\n    provider: string;\n    model: string;\n    contextWindow?: number;\n}"
          },
          {
            "name": "RequestHeaderReason",
            "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change';"
          },
          {
            "name": "Session",
            "declaration": "export class Session {\n    get surface(): SessionSurface;\n    readonly header: SessionHeader;\n    get id(): SessionId;\n    readonly firstLiveSeq: number;\n    get events(): readonly SessionEvent[];\n    get seq(): number;\n    append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent] : []): SessionEvent<T>;\n    requestHeader(): EpochHeader | undefined;\n    requestContext(): RequestContext | undefined;\n    deriveMessages(): Message[];\n    deriveEventMessage(event: SessionEvent): Message | null;\n}"
          },
          {
            "name": "SessionEvent",
            "declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: number; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? { sourceEventSeqs?: number[]; surfaceOp?: SurfaceOp; } : object) }[T];"
          },
          {
            "name": "SessionEventMap",
            "declaration": "export interface SessionEventMap {\n    'turn/start': { turn: number; };\n    'turn/end': { turn: number; reason: TurnEndReason; };\n    'step/start': { turn: number; step: number; };\n    'step/end': { turn: number; step: number; };\n    'user/message': UserMessage;\n    'assistant/chunk': { turn: number; step: number; chunk: StreamChunk; };\n    'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; };\n    'tool/call': { turn: number; step: number; callId: CallId; name: string; arguments: string; };\n    'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; }; meta?: JsonValue; };\n    'todo/write': { todos: TodoItem[]; };\n    'request/header': { header: EpochHeader; reason: RequestHeaderReason; };\n    'request/context': RequestContext;\n    'session/end-seed': Record<string, never>;\n    'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n    'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n    'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: number; };\n    'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: CallId; reason?: string; };\n    'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n    'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n    'tool/code-dispatch-start': CodeDispatchStartEventData;\n    'tool/code-dispatch': CodeDispatchEventData;\n    'goal/change': GoalChangeMeta;\n}"
          },
          {
            "name": "SessionEventType",
            "declaration": "export type SessionEventType = keyof SessionEventMap;"
          },
          {
            "name": "SessionHeader",
            "declaration": "export interface SessionHeader {\n    readonly version: number;\n    readonly id: SessionId;\n    readonly createdAt: number;\n    readonly cwd?: string;\n    readonly parentSession?: SessionId;\n    readonly seedLength?: number;\n    readonly origin?: 'subagent';\n    readonly delegationDepth?: number;\n    readonly agentPreset?: string;\n}"
          },
          {
            "name": "SessionId",
            "declaration": "export type SessionId = Branded<'SessionId'>;"
          },
          {
            "name": "SessionSurface",
            "declaration": "export interface SessionSurface {\n    readonly nodes: readonly number[];\n    readonly replaceGeneration: number;\n}"
          },
          {
            "name": "StreamChunk",
            "declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: CallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: unknown; };"
          },
          {
            "name": "SurfaceEventType",
            "declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
          },
          {
            "name": "SurfaceIntent",
            "declaration": "export interface SurfaceIntent {\n    surfaceOp: SurfaceOp;\n    sourceEventSeqs?: number[];\n}"
          },
          {
            "name": "SurfaceOp",
            "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start: number; end: number; };"
          },
          {
            "name": "TextBlock",
            "declaration": "export interface TextBlock {\n    type: 'text';\n    text: string;\n}"
          },
          {
            "name": "TodoItem",
            "declaration": "export interface TodoItem {\n    content: string;\n    status: 'pending' | 'in_progress' | 'completed';\n}"
          },
          {
            "name": "TokenUsage",
            "declaration": "export interface TokenUsage {\n    inputTokens: number;\n    outputTokens: number;\n    cacheReadTokens?: number;\n    cacheWriteTokens?: number;\n    reasoningTokens?: number;\n}"
          },
          {
            "name": "ToolCallBlock",
            "declaration": "export interface ToolCallBlock {\n    type: 'tool-call';\n    id: CallId;\n    name: string;\n    arguments: string;\n}"
          },
          {
            "name": "ToolMessageSource",
            "declaration": "export interface ToolMessageSource {\n    kind: 'tool';\n    callId: CallId;\n}"
          },
          {
            "name": "ToolResultBlock",
            "declaration": "export interface ToolResultBlock {\n    type: 'tool-result';\n    toolCallId: CallId;\n    content: ContentBlock[];\n    isError?: boolean;\n}"
          },
          {
            "name": "ToolResultMessage",
            "declaration": "export interface ToolResultMessage extends Message {\n    readonly role: 'user';\n    readonly content: [ToolResultBlock];\n    readonly source: ToolMessageSource;\n}"
          },
          {
            "name": "ToolSchema",
            "declaration": "export interface ToolSchema {\n    name: string;\n    description: string;\n    parameters: Record<string, unknown>;\n}"
          },
          {
            "name": "TurnEndCancelCause",
            "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
          },
          {
            "name": "TurnEndReason",
            "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
          },
          {
            "name": "TurnEndReasonMap",
            "declaration": "export interface TurnEndReasonMap {\n    completed: { kind: 'completed'; };\n    aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n    blocked: { kind: 'blocked'; };\n    error: { kind: 'error'; error: LlmFailure; };\n    'max-tokens': { kind: 'max-tokens'; };\n    interrupted: { kind: 'interrupted'; };\n}"
          },
          {
            "name": "UserMessage",
            "declaration": "export interface UserMessage extends Message {\n    readonly role: 'user';\n}"
          }
        ]
      }
    ],
    "events": [
      {
        "description": "One exact Plugin/Package activation is now live in the Host.",
        "summary": "One exact Plugin/Package activation is now live in the Host.",
        "tags": [
          {
            "name": "param",
            "argument": "pkg",
            "comment": "- stable plugin, immutable package, run identity, and label.",
            "text": "@param pkg - stable plugin, immutable package, run identity, and label.\n     *"
          },
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit"
          }
        ],
        "jsDoc": "/**\n * One exact Plugin/Package activation is now live in the Host.\n * @param pkg - stable plugin, immutable package, run identity, and label.\n * @mode emit\n */",
        "name": "cordis/dynamic-package",
        "mode": "emit",
        "signature": "'cordis/dynamic-package'(pkg: DynamicCordisPackage): void"
      },
      {
        "description": "One exact activation was withdrawn.",
        "summary": "One exact activation was withdrawn.",
        "tags": [
          {
            "name": "param",
            "argument": "retracted",
            "comment": "- plugin, package, and run identity.",
            "text": "@param retracted - plugin, package, and run identity.\n     *"
          },
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit"
          }
        ],
        "jsDoc": "/**\n * One exact activation was withdrawn.\n * @param retracted - plugin, package, and run identity.\n * @mode emit\n */",
        "name": "cordis/dynamic-retract",
        "mode": "emit",
        "signature": "'cordis/dynamic-retract'(retracted: DynamicCordisRetracted): void"
      },
      {
        "description": "Request a live read-only query from the Client inspect registry.",
        "summary": "Request a live read-only query from the Client inspect registry.",
        "tags": [
          {
            "name": "param",
            "argument": "request",
            "comment": "- correlation, Session, provider, method, and JSON input.",
            "text": "@param request - correlation, Session, provider, method, and JSON input.\n     *"
          },
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit"
          }
        ],
        "jsDoc": "/**\n * Request a live read-only query from the Client inspect registry.\n * @param request - correlation, Session, provider, method, and JSON input.\n * @mode emit\n */",
        "name": "cordis/inspect-query",
        "mode": "emit",
        "signature": "'cordis/inspect-query'(request: CordisInspectQueryRequest): void"
      },
      {
        "description": "Notify every Client that an inspect query has settled or been cancelled.",
        "summary": "Notify every Client that an inspect query has settled or been cancelled.",
        "tags": [
          {
            "name": "param",
            "argument": "resolved",
            "comment": "- exact query identity that is no longer answerable.",
            "text": "@param resolved - exact query identity that is no longer answerable.\n     *"
          },
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit"
          }
        ],
        "jsDoc": "/**\n * Notify every Client that an inspect query has settled or been cancelled.\n * @param resolved - exact query identity that is no longer answerable.\n * @mode emit\n */",
        "name": "cordis/inspect-query-resolved",
        "mode": "emit",
        "signature": "'cordis/inspect-query-resolved'(resolved: CordisInspectQueryResolved): void"
      },
      {
        "description": "A Client-bearing activation needs a browser page, and may require a user decision.",
        "summary": "A Client-bearing activation needs a browser page, and may require a user decision.",
        "tags": [
          {
            "name": "param",
            "argument": "request",
            "comment": "- correlation identity, owner, target version, mode, and approval requirement.",
            "text": "@param request - correlation identity, owner, target version, mode, and approval requirement.\n     *"
          },
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit"
          }
        ],
        "jsDoc": "/**\n * A Client-bearing activation needs a browser page, and may require a user decision.\n * @param request - correlation identity, owner, target version, mode, and approval requirement.\n * @mode emit\n */",
        "name": "cordis/request-run",
        "mode": "emit",
        "signature": "'cordis/request-run'(request: DynamicCordisRunRequest): void"
      },
      {
        "description": "A pending Client activation request left the answerable state.",
        "summary": "A pending Client activation request left the answerable state.",
        "tags": [
          {
            "name": "param",
            "argument": "resolved",
            "comment": "- request identity and outcome.",
            "text": "@param resolved - request identity and outcome.\n     *"
          },
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit"
          }
        ],
        "jsDoc": "/**\n * A pending Client activation request left the answerable state.\n * @param resolved - request identity and outcome.\n * @mode emit\n */",
        "name": "cordis/request-run-resolved",
        "mode": "emit",
        "signature": "'cordis/request-run-resolved'(resolved: DynamicCordisRequestResolved): void"
      }
    ],
    "objects": []
  },
}
