/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Whether the mounted memory store can be modified. */ export const Access = { ReadOnly: "read_only", ReadWrite: "read_write", } as const; /** * Whether the mounted memory store can be modified. */ export type Access = ClosedEnum; export type MemoryStoreMount = { /** * ID of the memory store to mount into the container. */ storeId: string; /** * Directory name for this store under /mnt/memory. */ label: string; /** * Whether the mounted memory store can be modified. */ access?: Access | undefined; /** * Optional short description of the store for agent context. */ description?: string | undefined; /** * Optional instructions for how the agent should use this mounted store. */ instructions?: string | undefined; }; /** @internal */ export const Access$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Access); /** @internal */ export const Access$outboundSchema: z.ZodNativeEnum = Access$inboundSchema; /** @internal */ export const MemoryStoreMount$inboundSchema: z.ZodType< MemoryStoreMount, z.ZodTypeDef, unknown > = z.object({ store_id: z.string(), label: z.string(), access: Access$inboundSchema.default("read_only"), description: z.string().optional(), instructions: z.string().optional(), }).transform((v) => { return remap$(v, { "store_id": "storeId", }); }); /** @internal */ export type MemoryStoreMount$Outbound = { store_id: string; label: string; access: string; description?: string | undefined; instructions?: string | undefined; }; /** @internal */ export const MemoryStoreMount$outboundSchema: z.ZodType< MemoryStoreMount$Outbound, z.ZodTypeDef, MemoryStoreMount > = z.object({ storeId: z.string(), label: z.string(), access: Access$outboundSchema.default("read_only"), description: z.string().optional(), instructions: z.string().optional(), }).transform((v) => { return remap$(v, { storeId: "store_id", }); }); export function memoryStoreMountToJSON( memoryStoreMount: MemoryStoreMount, ): string { return JSON.stringify( MemoryStoreMount$outboundSchema.parse(memoryStoreMount), ); } export function memoryStoreMountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MemoryStoreMount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MemoryStoreMount' from JSON`, ); }