Defines Zod schemas and route contracts for ACP authentication challenges and run states. Use this when implementing agent control protocol authentication endpoints.
// Source: https://github.com/ThinkInAIXYZ/deepchat | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { z } from 'zod'
import { defineRouteContract } from '../common'
const AcpAuthMethodSchema = z.object({
id: z.string().min(1),
name: z.string().min(1),
description: z.string().optional(),
type: z.enum(['agent', 'terminal', 'unsupported'])
})
export const AcpAuthChallengeSchema = z.object({
id: z.string().min(1),
agentId: z.string().min(1),
agentName: z.string().min(1),
workdir: z.string().min(1),
methods: z.array(AcpAuthMethodSchema),
origin: z.enum(['draft_session', 'session_prepare', 'settings_probe']),
sessionId: z.string().min(1).optional()
})
exp
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key