Files
opencode-manager/shared/src/schemas/ssh.ts
T
Chris Scott 7341dce1ef Add skip SSH host key verification and fix self-hosted server support (#121)
* Add SSH host key verification with automatic trust and SCP-style URL support

* Fix TypeScript errors for SSH host key schema and test mocks
2026-02-11 22:58:13 -05:00

30 lines
762 B
TypeScript

import { z } from 'zod'
export const SSHHostKeyRequestSchema = z.object({
id: z.string(),
host: z.string(),
ip: z.string(),
keyType: z.string(),
fingerprint: z.string(),
timestamp: z.number(),
isKeyChanged: z.boolean()
})
export const SSHHostKeyResponseSchema = z.object({
requestId: z.string(),
response: z.enum(['accept', 'reject'])
})
export const TrustedSSHHostSchema = z.object({
id: z.number(),
host: z.string(),
key_type: z.string(),
fingerprint: z.string(),
created_at: z.number(),
updated_at: z.number()
})
export type SSHHostKeyRequest = z.infer<typeof SSHHostKeyRequestSchema>
export type SSHHostKeyResponse = z.infer<typeof SSHHostKeyResponseSchema>
export type TrustedSSHHost = z.infer<typeof TrustedSSHHostSchema>