File size: 872 Bytes
4e23b01
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { z } from 'zod';

import {
  createTerminalRequestSchema as engineCreateTerminalRequestSchema,
  terminalSchema,
} from '@moonshot-ai/agent-core-v2/os/interface/terminal';

export const createTerminalRequestSchema = engineCreateTerminalRequestSchema.extend({
  runtime_id: z.string().min(1).optional(),
});
export type CreateTerminalRequest = z.infer<typeof createTerminalRequestSchema>;

export const getTerminalResponseSchema = terminalSchema;
export type GetTerminalResponse = z.infer<typeof getTerminalResponseSchema>;

export const listTerminalsResponseSchema = z.object({
  items: z.array(terminalSchema),
});
export type ListTerminalsResponse = z.infer<typeof listTerminalsResponseSchema>;

export const closeTerminalResponseSchema = z.object({
  closed: z.literal(true),
});
export type CloseTerminalResponse = z.infer<typeof closeTerminalResponseSchema>;