> ## Documentation Index
> Fetch the complete documentation index at: https://docs.photon.codes/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use Stable documentation by default. Honor an explicit Beta request or a URL under /docs/beta/. If the requested version conflicts with the installed CLI package or API origin, clarify the target before writing integration code.
> Pages under /docs/beta/ document Beta; other product pages document Stable. Keep the CLI package, commands, API origin, and credentials within the selected version. State the documentation version in your answer.
> For MCP search, always pass version: Stable or version: Beta. Unfiltered search mixes both versions. For filesystem reads, keep Beta queries under /beta/ and exclude /beta/ from Stable queries; discover paths before reading them.
> The public docs base is https://photon.codes/docs. Convert MCP page paths to public URLs under that base, preserving /beta/ when present. Read https://photon.codes/docs/skill.md for version selection and https://photon.codes/docs/llms.txt for the version indexes.

# replySchema

> A wraps inner content with the message it replies to.

A `reply` wraps inner content with the message it replies to.

`space.send(reply(content, message))` is the canonical outbound API;
`message.reply(content)` is sugar that delegates here. Providers see
`reply` like any other content type and route to a threaded send.

Reply cannot wrap `reply`, `edit`, `reaction`, `group`, `typing`,
`rename`, `avatar`, `addMember`, `removeMember`, `leaveSpace`, `unsend`,
or `read` content.

```typescript
const replySchema: z.ZodObject<{ content: z.ZodCustom<{ markdown: string; type: "markdown" } | { addresses: { city: string; country: string; postalCode: string; region: string; street: string; type: "home" | "work" | "other" }[]; birthday: string; emails: { type: "home" | "work" | "other"; value: string }[]; name: { first: string; formatted: string; last: string; middle: string; prefix: string; suffix: string }; note: string; org: { department: string; name: string; title: string }; phones: { type: "mobile" | "home" | "work" | "other"; value: string }[]; photo: { mimeType: string; read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<...>, Buffer<...>>>> }; raw: unknown; type: "contact"; urls: string[]; user: { __platform: string; id: string } } | { raw: unknown; type: "custom" } | { text: string; type: "text" } | { id: string; mimeType: string; name: string; read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "attachment" } | { layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{ caption: z.ZodOptional<z.ZodString>; image: z.ZodOptional<z.ZodCustom<..., ...>>; imageSubtitle: z.ZodOptional<z.ZodString>; imageTitle: z.ZodOptional<z.ZodString>; subcaption: z.ZodOptional<z.ZodString>; summary: z.ZodOptional<z.ZodString>; trailingCaption: z.ZodOptional<z.ZodString>; trailingSubcaption: z.ZodOptional<z.ZodString> }, z.core.$strip>>>; live: boolean; type: "app"; url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>> } | { items: Message<string, User, Space<unknown>>[]; type: "group" } | { type: "richlink"; url: string } | { duration: number; id: string; mimeType: string; name: string; read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "voice" } | { options: { title: string }[]; title: string; type: "poll" } | { option: { title: string }; poll: { options: { title: string }[]; title: string; type: "poll" }; selected: boolean; title: string; type: "poll_option" } | { emoji: string; target: Message<string, User, Space<unknown>>; type: "reaction" } | { format: "markdown" | "plain"; stream: () => AsyncIterable<string>; type: "streamText" } | { content: { markdown: string; type: "markdown" } | { text: string; type: "text" } | { id: string; mimeType: string; name: string; read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<...>, Buffer<...>>>>; size: number; stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<...>, ReadableStream<...>>>>; type: "attachment" }; effect: string; type: "effect" } | { state: "start" | "stop"; type: "typing" } | { displayName: string; type: "rename" } | { action: { kind: "set"; mimeType: string; read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<...>, Buffer<...>>>> } | { kind: "clear" }; type: "avatar" } | { members: string[]; type: "addMember" } | { members: string[]; type: "removeMember" } | { type: "leaveSpace" }, { markdown: string; type: "markdown" } | { addresses: { city: string; country: string; postalCode: string; region: string; street: string; type: "home" | "work" | "other" }[]; birthday: string; emails: { type: "home" | "work" | "other"; value: string }[]; name: { first: string; formatted: string; last: string; middle: string; prefix: string; suffix: string }; note: string; org: { department: string; name: string; title: string }; phones: { type: "mobile" | "home" | "work" | "other"; value: string }[]; photo: { mimeType: string; read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<...>, Buffer<...>>>> }; raw: unknown; type: "contact"; urls: string[]; user: { __platform: string; id: string } } | { raw: unknown; type: "custom" } | { text: string; type: "text" } | { id: string; mimeType: string; name: string; read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "attachment" } | { layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{ caption: z.ZodOptional<z.ZodString>; image: z.ZodOptional<z.ZodCustom<..., ...>>; imageSubtitle: z.ZodOptional<z.ZodString>; imageTitle: z.ZodOptional<z.ZodString>; subcaption: z.ZodOptional<z.ZodString>; summary: z.ZodOptional<z.ZodString>; trailingCaption: z.ZodOptional<z.ZodString>; trailingSubcaption: z.ZodOptional<z.ZodString> }, z.core.$strip>>>; live: boolean; type: "app"; url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>> } | { items: Message<string, User, Space<unknown>>[]; type: "group" } | { type: "richlink"; url: string } | { duration: number; id: string; mimeType: string; name: string; read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>; size: number; stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>; type: "voice" } | { options: { title: string }[]; title: string; type: "poll" } | { option: { title: string }; poll: { options: { title: string }[]; title: string; type: "poll" }; selected: boolean; title: string; type: "poll_option" } | { emoji: string; target: Message<string, User, Space<unknown>>; type: "reaction" } | { format: "markdown" | "plain"; stream: () => AsyncIterable<string>; type: "streamText" } | { content: { markdown: string; type: "markdown" } | { text: string; type: "text" } | { id: string; mimeType: string; name: string; read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<...>, Buffer<...>>>>; size: number; stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<...>, ReadableStream<...>>>>; type: "attachment" }; effect: string; type: "effect" } | { state: "start" | "stop"; type: "typing" } | { displayName: string; type: "rename" } | { action: { kind: "set"; mimeType: string; read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<...>, Buffer<...>>>> } | { kind: "clear" }; type: "avatar" } | { members: string[]; type: "addMember" } | { members: string[]; type: "removeMember" } | { type: "leaveSpace" }>; target: z.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>; type: z.ZodLiteral<"reply"> }, z.core.$strip>
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.