store.getDraftThreadByRef(threadRef));
- const serverThread = useThread(threadRef, { waitForShell: draftThread !== null });
+ // Hidden drawers stay mounted (see MAX_HIDDEN_MOUNTED_TERMINAL_THREADS), so they read only
+ // the shell: a detail subscription would keep each hidden thread's history in memory. The
+ // active drawer shares ChatView's detail, which also covers archived threads (no shell).
+ const activeServerThread = useThread(active ? threadRef : null, {
+ waitForShell: draftThread !== null,
+ });
+ const serverThreadShell = useThreadShell(threadRef);
+ const serverThread = activeServerThread ?? serverThreadShell;
const projectRef = serverThread
? scopeProjectRef(serverThread.environmentId, serverThread.projectId)
: draftThread
@@ -7095,6 +7100,17 @@ export default function ChatView(props: ChatViewProps) {
if (!activePendingUserInput) {
return;
}
+ // The option replaces the custom answer. Anything typed there is the
+ // user's text, so it goes back to the thread draft instead of vanishing.
+ const displacedAnswer =
+ pendingUserInputAnswersByRequestId[activePendingUserInput.requestId]?.[questionId]
+ ?.customAnswer;
+ const currentPrompt =
+ useComposerDraftStore.getState().getComposerDraft(composerDraftTarget)?.prompt ?? "";
+ const nextPrompt = carryDisplacedCustomAnswerIntoPrompt(currentPrompt, displacedAnswer);
+ if (nextPrompt !== currentPrompt) {
+ setComposerDraftPrompt(composerDraftTarget, nextPrompt);
+ }
setPendingUserInputAnswersByRequestId((existing) => {
const question =
(activePendingProgress?.activeQuestion?.id === questionId
@@ -7120,7 +7136,14 @@ export default function ChatView(props: ChatViewProps) {
promptRef.current = "";
composerRef.current?.resetCursorState({ cursor: 0 });
},
- [activePendingProgress?.activeQuestion, activePendingUserInput, composerRef],
+ [
+ activePendingProgress?.activeQuestion,
+ activePendingUserInput,
+ composerDraftTarget,
+ composerRef,
+ pendingUserInputAnswersByRequestId,
+ setComposerDraftPrompt,
+ ],
);
const onChangeActivePendingUserInputCustomAnswer = useCallback(
diff --git a/apps/web/src/components/PullRequestThreadDialog.tsx b/apps/web/src/components/PullRequestThreadDialog.tsx
index 4004b4930c27..ddbd2876d4d2 100644
--- a/apps/web/src/components/PullRequestThreadDialog.tsx
+++ b/apps/web/src/components/PullRequestThreadDialog.tsx
@@ -222,9 +222,12 @@ export function PullRequestThreadDialog({
if (event.key !== "Enter") {
return;
}
+ if (event.nativeEvent.isComposing || event.keyCode === 229) {
+ return;
+ }
event.preventDefault();
if (!isResolving && !preparePullRequestThreadAction.isPending) {
- void handleConfirm("local");
+ void handleConfirm("worktree");
}
}}
/>
diff --git a/apps/web/src/components/chat/AssistantCitationChip.test.tsx b/apps/web/src/components/chat/AssistantCitationChip.test.tsx
new file mode 100644
index 000000000000..7d664f237983
--- /dev/null
+++ b/apps/web/src/components/chat/AssistantCitationChip.test.tsx
@@ -0,0 +1,156 @@
+import {
+ ASSISTANT_CITATION_MAX_COMMENT_LENGTH,
+ EnvironmentId,
+ MessageId,
+ ThreadId,
+} from "@t3tools/contracts";
+import { act, useState, type ReactNode } from "react";
+import { create, type ReactTestRenderer } from "react-test-renderer";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vite-plus/test";
+
+import type { AssistantCitationSourceAnchor } from "~/lib/assistantTextSelection";
+
+const mocks = vi.hoisted(() => ({ observeSource: vi.fn(), dispose: vi.fn() }));
+vi.mock("./AssistantCitationSource", () => ({
+ observeAssistantCitationCommentSource: mocks.observeSource,
+}));
+vi.mock("@tanstack/react-router", () => ({
+ useNavigate: () => vi.fn(),
+ Link: ({ children }: { children: ReactNode }) =>
{children},
+}));
+// Keep the real chip/editor lifecycle while replacing DOM positioning and floating layers.
+vi.mock("../ui/tooltip", () => ({
+ Tooltip: ({ children }: { children: ReactNode }) => <>{children}>,
+ TooltipTrigger: ({ render }: { render: ReactNode }) => render,
+ TooltipPopup: ({ children }: { children: ReactNode }) => <>{children}>,
+}));
+vi.mock("../ui/popover", () => ({
+ Popover: ({ children }: { children: ReactNode }) => <>{children}>,
+ PopoverTrigger: ({ children }: { children: ReactNode }) =>
,
+ PopoverPopup: ({ children }: { children: ReactNode }) => <>{children}>,
+}));
+vi.mock("../ui/button", () => ({
+ Button: (props: React.ComponentProps<"button">) =>
,
+}));
+
+import { PopoverPopup } from "../ui/popover";
+import { AssistantCitationChip } from "./AssistantCitationChip";
+
+const citation = {
+ version: 1 as const,
+ environmentId: EnvironmentId.make("environment"),
+ threadId: ThreadId.make("thread"),
+ messageId: MessageId.make("source"),
+ text: "hello",
+ start: 0,
+ end: 5,
+ prefix: "",
+ suffix: "",
+};
+// The observer owns DOM access; these identities let us check which anchor survives.
+const sourceAnchor = {
+ source: {},
+ range: {},
+ viewport: {},
+} as AssistantCitationSourceAnchor;
+
+let renderer: ReactTestRenderer;
+
+function mount(onSave = vi.fn(() => true)) {
+ function Composer() {
+ const [open, setOpen] = useState(true);
+ return (
+
+ );
+ }
+ act(() => {
+ renderer = create(
);
+ });
+ return onSave;
+}
+
+function typeComment(value: string) {
+ act(() => renderer.root.findByType("textarea").props.onChange({ currentTarget: { value } }));
+}
+
+function removeSource() {
+ const { onUnavailable } = mocks.observeSource.mock.lastCall![0];
+ act(() => onUnavailable());
+}
+
+function clickButton(label: string) {
+ act(() =>
+ renderer.root
+ .findAllByType("button")
+ .find((button) => button.props.children === label)!
+ .props.onClick(),
+ );
+}
+
+beforeEach(() => {
+ vi.stubGlobal("IS_REACT_ACT_ENVIRONMENT", true);
+ mocks.observeSource.mockReset().mockReturnValue(mocks.dispose);
+ mocks.dispose.mockClear();
+});
+
+afterEach(() => {
+ act(() => renderer?.unmount());
+ vi.unstubAllGlobals();
+});
+
+describe("citation comment source disappearance", () => {
+ it("preserves an over-length draft at the composer until it can be shortened and saved", () => {
+ const onSave = mount();
+ const draft = "x".repeat(ASSISTANT_CITATION_MAX_COMMENT_LENGTH + 1);
+ typeComment(draft);
+ removeSource();
+
+ expect(renderer.root.findByType("textarea").props.value).toBe(draft);
+ expect(renderer.root.findByType("textarea").props["aria-invalid"]).toBe(true);
+ expect(renderer.root.findByType(PopoverPopup).props.anchor).toBeUndefined();
+ expect(renderer.root.findByType(PopoverPopup).props.side).toBe("top");
+ expect(onSave).not.toHaveBeenCalled();
+ expect(mocks.dispose).toHaveBeenCalled();
+ expect(mocks.observeSource).toHaveBeenCalledTimes(1);
+
+ typeComment("shortened comment");
+ clickButton("Save");
+ expect(onSave).toHaveBeenCalledWith("shortened comment");
+ expect(renderer.root.findAllByType("textarea")).toHaveLength(0);
+ });
+
+ it("preserves a rejected save and allows a later retry", () => {
+ const onSave = mount(vi.fn(() => false));
+ typeComment("keep this draft");
+ removeSource();
+
+ expect(onSave).toHaveBeenCalledWith("keep this draft");
+ expect(renderer.root.findByType("textarea").props.value).toBe("keep this draft");
+ expect(renderer.root.findByType(PopoverPopup).props.anchor).toBeUndefined();
+ onSave.mockReturnValue(true);
+ clickButton("Save");
+ expect(onSave).toHaveBeenLastCalledWith("keep this draft");
+ expect(renderer.root.findAllByType("textarea")).toHaveLength(0);
+ });
+
+ it("still allows explicit cancellation after source disappearance", () => {
+ const onSave = mount(vi.fn(() => false));
+ typeComment("discard this draft");
+ removeSource();
+ onSave.mockClear();
+ clickButton("Cancel");
+ expect(onSave).not.toHaveBeenCalled();
+ expect(renderer.root.findAllByType("textarea")).toHaveLength(0);
+ });
+
+ it("saves and closes when the source disappears with a valid draft", () => {
+ const onSave = mount();
+ typeComment("saved comment");
+ removeSource();
+ expect(onSave).toHaveBeenCalledWith("saved comment");
+ expect(renderer.root.findAllByType("textarea")).toHaveLength(0);
+ });
+});
diff --git a/apps/web/src/components/chat/AssistantCitationChip.tsx b/apps/web/src/components/chat/AssistantCitationChip.tsx
index ccfd746666a4..ef68691c5aee 100644
--- a/apps/web/src/components/chat/AssistantCitationChip.tsx
+++ b/apps/web/src/components/chat/AssistantCitationChip.tsx
@@ -2,7 +2,13 @@ import type { AssistantCitation } from "@t3tools/contracts";
import { serializeAssistantCitation } from "@t3tools/shared/assistantCitations";
import { Link, useNavigate } from "@tanstack/react-router";
import { PencilIcon, QuoteIcon, XIcon } from "lucide-react";
-import { useEffect, useEffectEvent, useRef, type MouseEvent as ReactMouseEvent } from "react";
+import {
+ useEffect,
+ useEffectEvent,
+ useRef,
+ useState,
+ type MouseEvent as ReactMouseEvent,
+} from "react";
import {
findAssistantCitationSourceAnchor,
type AssistantCitationSourceAnchor,
@@ -22,6 +28,7 @@ import {
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
import { Popover, PopoverPopup, PopoverTrigger } from "../ui/popover";
import { AssistantCitationCommentEditor } from "./AssistantCitationCommentEditor";
+import { resolveAssistantCitationCommentDismissal } from "./assistantCitationCommentDismissal";
import { observeAssistantCitationCommentSource } from "./AssistantCitationSource";
import { composerFloatingLayerProps } from "./composerEventScope";
@@ -48,13 +55,35 @@ export function AssistantCitationChip({
}) {
const navigate = useNavigate();
const commentInputRef = useRef
(null);
+ const draftCommentRef = useRef(null);
+ const [unavailableSourceAnchor, setUnavailableSourceAnchor] =
+ useState(null);
const commentOpen = commentEditor?.open ?? false;
const sourceAnchor = commentEditor?.sourceAnchor;
+ const activeSourceAnchor = sourceAnchor === unavailableSourceAnchor ? undefined : sourceAnchor;
+ useEffect(() => {
+ if (!commentOpen) draftCommentRef.current = null;
+ }, [commentOpen]);
+ const settleDraftOnClose = (reason: string): boolean => {
+ const dismissal = resolveAssistantCitationCommentDismissal({
+ reason,
+ draft: draftCommentRef.current,
+ savedComment: citation.comment,
+ });
+ if (dismissal.kind === "commit") return commentEditor?.onSave(dismissal.comment) ?? true;
+ return dismissal.kind !== "keep-open";
+ };
const onSourceUnavailable = useEffectEvent(() => {
- if (sourceAnchor) commentEditor?.onOpenChange(false);
+ if (!sourceAnchor) return;
+ if (settleDraftOnClose("none")) {
+ commentEditor?.onOpenChange(false);
+ } else {
+ // Keep the draft mounted, positioned at the composer trigger instead of a detached range.
+ setUnavailableSourceAnchor(sourceAnchor);
+ }
});
useEffect(() => {
- if (!commentOpen) return;
+ if (!commentOpen || sourceAnchor === unavailableSourceAnchor) return;
const anchor = sourceAnchor ?? findAssistantCitationSourceAnchor(document, citation);
if (!anchor) return;
return observeAssistantCitationCommentSource({
@@ -62,15 +91,15 @@ export function AssistantCitationChip({
citation,
onUnavailable: onSourceUnavailable,
});
- }, [citation, commentOpen, sourceAnchor]);
+ }, [citation, commentOpen, sourceAnchor, unavailableSourceAnchor]);
// A multi-line selection's bounding box spans the full message width; anchor
// the bubble to the selection's last line, where the pointer released.
- const popupAnchor = sourceAnchor
+ const popupAnchor = activeSourceAnchor
? {
- contextElement: sourceAnchor.source,
+ contextElement: activeSourceAnchor.source,
getBoundingClientRect: () => {
- const rects = sourceAnchor.range.getClientRects();
- return rects.item(rects.length - 1) ?? sourceAnchor.range.getBoundingClientRect();
+ const rects = activeSourceAnchor.range.getClientRects();
+ return rects.item(rects.length - 1) ?? activeSourceAnchor.range.getBoundingClientRect();
},
}
: undefined;
@@ -129,7 +158,16 @@ export function AssistantCitationChip({
)}
{commentEditor ? (
-
+ {
+ if (!open && !settleDraftOnClose(eventDetails.reason)) {
+ eventDetails.cancel();
+ return;
+ }
+ commentEditor.onOpenChange(open);
+ }}
+ >
{
@@ -155,6 +193,9 @@ export function AssistantCitationChip({
key={serializeAssistantCitation(citation)}
citation={citation}
inputRef={commentInputRef}
+ onDraftChange={(comment) => {
+ draftCommentRef.current = comment;
+ }}
onSubmit={(comment) => {
if (!commentEditor.onSave(comment)) return false;
commentEditor.onOpenChange(false);
diff --git a/apps/web/src/components/chat/AssistantCitationCommentEditor.tsx b/apps/web/src/components/chat/AssistantCitationCommentEditor.tsx
index 4dc422210de0..d9fd60645618 100644
--- a/apps/web/src/components/chat/AssistantCitationCommentEditor.tsx
+++ b/apps/web/src/components/chat/AssistantCitationCommentEditor.tsx
@@ -9,12 +9,14 @@ export function AssistantCitationCommentEditor({
onSubmit,
onSubmitAndSend,
onCancel,
+ onDraftChange,
}: {
citation: AssistantCitation;
inputRef?: Ref;
onSubmit: (comment: string) => boolean;
onSubmitAndSend?: (comment: string) => boolean;
onCancel: () => void;
+ onDraftChange?: (comment: string) => void;
}) {
const [comment, setComment] = useState(citation.comment ?? "");
const commentTooLong = comment.length > ASSISTANT_CITATION_MAX_COMMENT_LENGTH;
@@ -51,7 +53,10 @@ export function AssistantCitationCommentEditor({
rows={2}
className="field-sizing-content block max-h-40 min-h-16 w-full resize-none bg-transparent px-1 py-1.5 text-base outline-none placeholder:text-muted-foreground sm:text-sm"
value={comment}
- onChange={(event) => setComment(event.currentTarget.value)}
+ onChange={(event) => {
+ setComment(event.currentTarget.value);
+ onDraftChange?.(event.currentTarget.value);
+ }}
onKeyDown={(event) => {
if (
event.key === "Enter" &&
diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx
index 53a5d493f2a9..8e19ee249cd0 100644
--- a/apps/web/src/components/chat/ChatComposer.tsx
+++ b/apps/web/src/components/chat/ChatComposer.tsx
@@ -40,6 +40,7 @@ import {
type ComposerSubmissionIntent,
type ComposerTrigger,
collapseExpandedComposerCursor,
+ composerStateAtPromptEnd,
composerSubmissionIntentForEnter,
detectComposerTrigger,
expandCollapsedComposerCursor,
@@ -2312,6 +2313,15 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
useEffect(() => {
const nextCustomAnswer = activePendingProgress?.customAnswer;
if (typeof nextCustomAnswer !== "string") {
+ // The question is gone and the editor shows the thread draft again. The
+ // ref still holds the last answer text, and Send reads the ref. Place
+ // the caret at the end so the next keystroke appends.
+ if (lastSyncedPendingInputRef.current !== null) {
+ promptRef.current = prompt;
+ const { cursor, trigger } = composerStateAtPromptEnd(prompt);
+ setComposerCursor(cursor);
+ setComposerTrigger(trigger);
+ }
lastSyncedPendingInputRef.current = null;
return;
}
@@ -2333,19 +2343,15 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
}
promptRef.current = nextCustomAnswer;
- const nextCursor = collapseExpandedComposerCursor(nextCustomAnswer, nextCustomAnswer.length);
- setComposerCursor(nextCursor);
- setComposerTrigger(
- detectComposerTrigger(
- nextCustomAnswer,
- expandCollapsedComposerCursor(nextCustomAnswer, nextCursor),
- ),
- );
+ const { cursor, trigger } = composerStateAtPromptEnd(nextCustomAnswer);
+ setComposerCursor(cursor);
+ setComposerTrigger(trigger);
setComposerHighlightedItemId(null);
}, [
activePendingProgress?.customAnswer,
activePendingProgress?.activeQuestion?.id,
activePendingUserInput?.requestId,
+ prompt,
promptRef,
]);
diff --git a/apps/web/src/components/chat/ComposerBannerStack.test.tsx b/apps/web/src/components/chat/ComposerBannerStack.test.tsx
new file mode 100644
index 000000000000..d2e9a649df10
--- /dev/null
+++ b/apps/web/src/components/chat/ComposerBannerStack.test.tsx
@@ -0,0 +1,103 @@
+import { cloneElement, type ReactElement, type ReactNode } from "react";
+import { act, create, type ReactTestRenderer } from "react-test-renderer";
+import { afterEach, expect, it, vi } from "vite-plus/test";
+
+import { ComposerBannerStack } from "./ComposerBannerStack";
+
+vi.mock("../ui/popover", () => ({
+ Popover: "popover",
+ PopoverTrigger: ({ render, children }: { render: ReactElement; children: ReactNode }) =>
+ cloneElement(render, {}, children),
+ PopoverPopup: "popup",
+}));
+vi.mock("../ui/button", () => ({ Button: "button" }));
+vi.mock("../ui/scroll-area", () => ({ ScrollArea: "div" }));
+
+let renderer: ReactTestRenderer;
+afterEach(async () => {
+ if (renderer) await act(() => renderer.unmount());
+ vi.unstubAllGlobals();
+});
+
+it("only offers notice details when the description cannot fit", async () => {
+ vi.stubGlobal("IS_REACT_ACT_ENVIRONMENT", true);
+ let resize = () => {};
+ let mutate = () => {};
+ vi.stubGlobal(
+ "MutationObserver",
+ class {
+ constructor(callback: () => void) {
+ mutate = callback;
+ }
+ observe() {}
+ disconnect() {}
+ },
+ );
+ vi.stubGlobal(
+ "ResizeObserver",
+ class {
+ constructor(callback: () => void) {
+ resize = callback;
+ }
+ observe() {}
+ disconnect() {}
+ },
+ );
+ let position = "static";
+ vi.stubGlobal("getComputedStyle", () => ({ position }));
+ let availableWidth = 200;
+ const nested = { clientWidth: 100, scrollWidth: 80 };
+ const text = {
+ querySelectorAll: () => [nested],
+ get clientWidth() {
+ return (
+ availableWidth -
+ (renderer?.root.findAllByProps({ "aria-label": "Show notice details" }).length ? 28 : 0)
+ );
+ },
+ scrollWidth: 80,
+ };
+ await act(() => {
+ renderer = create(
+ ,
+ {
+ createNodeMock: (element) =>
+ element.type === "span" ? text : element.type === "button" ? { offsetWidth: 24 } : null,
+ },
+ );
+ });
+ const details = () => renderer.root.findAllByProps({ "aria-label": "Show notice details" });
+ expect(details()).toHaveLength(0);
+ text.scrollWidth = 300;
+ await act(() => resize());
+ expect(details()).toHaveLength(1);
+ // It fits without the icon: the icon must not keep its own overflow alive.
+ availableWidth = 308;
+ await act(() => resize());
+ expect(details()).toHaveLength(0);
+ text.scrollWidth = 80;
+ await act(() => resize());
+ expect(details()).toHaveLength(0);
+ nested.scrollWidth = 500;
+ await act(() => mutate());
+ expect(details()).toHaveLength(1);
+ nested.scrollWidth = 80;
+ await act(() => mutate());
+ expect(details()).toHaveLength(0);
+ position = "absolute";
+ await act(() => resize());
+ expect(details()).toHaveLength(1);
+ position = "static";
+ await act(() => resize());
+ expect(details()).toHaveLength(0);
+});
diff --git a/apps/web/src/components/chat/ComposerBannerStack.tsx b/apps/web/src/components/chat/ComposerBannerStack.tsx
index fee545a4d1ba..55b3b8a43b61 100644
--- a/apps/web/src/components/chat/ComposerBannerStack.tsx
+++ b/apps/web/src/components/chat/ComposerBannerStack.tsx
@@ -240,6 +240,82 @@ export function ComposerBannerStack({ className, items }: ComposerBannerStackPro
);
}
+/** Keep full descriptions reachable only when their inline copy is clipped. */
+function NoticeDescription({ children, compact }: { children: ReactNode; compact?: boolean }) {
+ const descriptionRef = useRef(null);
+ const detailsRef = useRef(null);
+ const [showDetails, setShowDetails] = useState(false);
+
+ useLayoutEffect(() => {
+ const description = descriptionRef.current;
+ if (!description) return;
+ const measure = () => {
+ // Ignore the space taken by the details button itself so it cannot
+ // sustain its own overflow after the description would otherwise fit.
+ const recoveredWidth = detailsRef.current ? detailsRef.current.offsetWidth + 4 : 0;
+ const hidden = getComputedStyle(description).position === "absolute";
+ setShowDetails(
+ hidden ||
+ [description, ...description.querySelectorAll("*")].some(
+ (element) => element.scrollWidth > element.clientWidth + recoveredWidth,
+ ),
+ );
+ };
+ measure();
+ const observer = new ResizeObserver(measure);
+ observer.observe(description);
+ // A child can reveal new text without resizing its clipped box.
+ const mutations = new MutationObserver(measure);
+ mutations.observe(description, { childList: true, subtree: true, characterData: true });
+ return () => {
+ observer.disconnect();
+ mutations.disconnect();
+ };
+ }, []);
+
+ return (
+
+
+ {children}
+
+ {showDetails ? (
+
+
+ }
+ >
+
+
+
+
+ {children}
+
+
+
+ ) : null}
+
+ );
+}
+
function ComposerBannerStackAlert({
item,
attached,
@@ -282,35 +358,7 @@ function ComposerBannerStackAlert({
>
{item.title}
- {item.description ? (
- <>
-
- {item.description}
-
-
-
- }
- >
-
-
-
- {item.description}
-
-
- >
- ) : null}
+ {item.description ? {item.description} : null}
{item.actions || item.onDismiss ? (
diff --git a/apps/web/src/components/chat/DraftHeroHeadline.tsx b/apps/web/src/components/chat/DraftHeroHeadline.tsx
index fc32348853d3..a4e0a2bcd5ab 100644
--- a/apps/web/src/components/chat/DraftHeroHeadline.tsx
+++ b/apps/web/src/components/chat/DraftHeroHeadline.tsx
@@ -113,10 +113,11 @@ export function DraftHeroHeadline({
+ // The trigger's accessible name comes from its visible text (the
+ // project title) so the hero sentence reads naturally: an
+ // aria-label here would replace the title with an action phrase
+ // mid-sentence and baffle screen-reader users.
+
}
>
{activeProjectDisplayName ?? "Choose a project"}
@@ -203,8 +204,21 @@ export function DraftHeroHeadline({
);
+ // The composer hero is a sentence, so the heading's accessible name must be
+ // a complete sentence too. The project picker is a control rendered inline
+ // in the h1; without an explicit label its widget state bleeds into the
+ // announced phrase.
+ const headingLabel = hasResolvedProject
+ ? `What should we build in ${activeProjectDisplayName}?`
+ : canChooseProject
+ ? `${activeProjectDisplayName ?? "Choose a project"} to start`
+ : "Add a project to start";
+
return (
-
+
{hasResolvedProject ? (
<>What should we build in {projectSelector}?>
) : canChooseProject ? (
diff --git a/apps/web/src/components/chat/assistantCitationCommentDismissal.test.ts b/apps/web/src/components/chat/assistantCitationCommentDismissal.test.ts
new file mode 100644
index 000000000000..1f21677a5a82
--- /dev/null
+++ b/apps/web/src/components/chat/assistantCitationCommentDismissal.test.ts
@@ -0,0 +1,80 @@
+import { ASSISTANT_CITATION_MAX_COMMENT_LENGTH } from "@t3tools/contracts";
+import { describe, expect, it } from "vite-plus/test";
+
+import { resolveAssistantCitationCommentDismissal } from "./assistantCitationCommentDismissal";
+
+describe("resolveAssistantCitationCommentDismissal", () => {
+ it("commits typed text when the popover is dismissed by clicking away", () => {
+ expect(
+ resolveAssistantCitationCommentDismissal({
+ reason: "outside-press",
+ draft: "needs a retry",
+ savedComment: undefined,
+ }),
+ ).toEqual({ kind: "commit", comment: "needs a retry" });
+ });
+
+ it("commits an edited comment when focus leaves the popover", () => {
+ expect(
+ resolveAssistantCitationCommentDismissal({
+ reason: "focus-out",
+ draft: "second thought",
+ savedComment: "first thought",
+ }),
+ ).toEqual({ kind: "commit", comment: "second thought" });
+ });
+
+ it("closes without saving when nothing changed", () => {
+ expect(
+ resolveAssistantCitationCommentDismissal({
+ reason: "outside-press",
+ draft: null,
+ savedComment: "kept",
+ }),
+ ).toEqual({ kind: "close" });
+ expect(
+ resolveAssistantCitationCommentDismissal({
+ reason: "outside-press",
+ draft: " kept ",
+ savedComment: "kept",
+ }),
+ ).toEqual({ kind: "close" });
+ expect(
+ resolveAssistantCitationCommentDismissal({
+ reason: "outside-press",
+ draft: "kept",
+ savedComment: " kept ",
+ }),
+ ).toEqual({ kind: "close" });
+ });
+
+ it("clears a comment when the draft was emptied", () => {
+ expect(
+ resolveAssistantCitationCommentDismissal({
+ reason: "trigger-press",
+ draft: "",
+ savedComment: "old",
+ }),
+ ).toEqual({ kind: "commit", comment: "" });
+ });
+
+ it("keeps Escape as an explicit discard", () => {
+ expect(
+ resolveAssistantCitationCommentDismissal({
+ reason: "escape-key",
+ draft: "unsaved",
+ savedComment: undefined,
+ }),
+ ).toEqual({ kind: "close" });
+ });
+
+ it("keeps the popover open instead of dropping an over-length draft", () => {
+ expect(
+ resolveAssistantCitationCommentDismissal({
+ reason: "outside-press",
+ draft: "x".repeat(ASSISTANT_CITATION_MAX_COMMENT_LENGTH + 1),
+ savedComment: undefined,
+ }),
+ ).toEqual({ kind: "keep-open" });
+ });
+});
diff --git a/apps/web/src/components/chat/assistantCitationCommentDismissal.ts b/apps/web/src/components/chat/assistantCitationCommentDismissal.ts
new file mode 100644
index 000000000000..a6fe2ca3bcb6
--- /dev/null
+++ b/apps/web/src/components/chat/assistantCitationCommentDismissal.ts
@@ -0,0 +1,21 @@
+import { ASSISTANT_CITATION_MAX_COMMENT_LENGTH } from "@t3tools/contracts";
+
+export type AssistantCitationCommentDismissal =
+ | { kind: "commit"; comment: string }
+ | { kind: "close" }
+ | { kind: "keep-open" };
+
+export function resolveAssistantCitationCommentDismissal({
+ reason,
+ draft,
+ savedComment,
+}: {
+ reason: string;
+ draft: string | null;
+ savedComment: string | undefined;
+}): AssistantCitationCommentDismissal {
+ if (reason === "escape-key" || draft === null) return { kind: "close" };
+ if (draft.trim() === (savedComment ?? "").trim()) return { kind: "close" };
+ if (draft.length > ASSISTANT_CITATION_MAX_COMMENT_LENGTH) return { kind: "keep-open" };
+ return { kind: "commit", comment: draft };
+}
diff --git a/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx b/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx
index eb1562cea251..215f90e3471d 100644
--- a/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx
+++ b/apps/web/src/components/pullRequest/PullRequestCodeTab.tsx
@@ -19,6 +19,7 @@ import {
FolderTreeIcon,
MessageSquareIcon,
MessageSquareOffIcon,
+ PilcrowIcon,
Rows3Icon,
TextWrapIcon,
TriangleAlertIcon,
@@ -226,6 +227,7 @@ export function PullRequestCodeTab({
const diffLayout = settings.diffLayout;
const updateClientSettings = useUpdateClientSettings();
const [wordWrap, setWordWrap] = useState(settings.wordWrap);
+ const [ignoreWhitespace, setIgnoreWhitespace] = useState(settings.diffIgnoreWhitespace);
const [fileTreeOpen, setFileTreeOpen] = useLocalStorage(
PULL_REQUEST_FILE_TREE_STORAGE_KEY,
false,
@@ -390,16 +392,17 @@ export function PullRequestCodeTab({
loadedSlices.map((slice) => {
// The patch's own hash is part of the key: a refreshed page reuses its cursor, and a
// key of position alone would keep handing back the parse of the patch it replaced.
- const cacheKey = `pull-request:${scopeKey}:${resolvedTheme}:${slice.cursor ?? "first"}:${fnv1a32(slice.patch)}`;
+ const cacheKey = `pull-request:${scopeKey}:${resolvedTheme}:${ignoreWhitespace}:${slice.cursor ?? "first"}:${fnv1a32(slice.patch)}`;
const cached = parseCache.current.get(cacheKey);
if (cached) return cached;
const parsed = getRenderablePatch(slice.patch, cacheKey, {
compactPartialHunkOffsets: true,
+ ignoreWhitespace,
});
if (parsed) parseCache.current.set(cacheKey, parsed);
return parsed;
}),
- [loadedSlices, resolvedTheme, scopeKey],
+ [loadedSlices, resolvedTheme, scopeKey, ignoreWhitespace],
);
// Ordered within a slice rather than across them: ordering the accumulated set would let a late
// slice push a file the reader is part way through further down the page.
@@ -642,7 +645,13 @@ export function PullRequestCodeTab({
// that silently lost its first line on the other hosts would be worse than one line.
const path = resolveFileDiffPath(file);
const previousPath = resolveFileDiffPreviousPath(file);
- const position = resolveDiffReviewPosition(file, range.end, range.endSide ?? range.side);
+ const sourceFile = parsedSlices
+ .flatMap((slice) => (slice?.kind === "files" ? slice.sourceFiles : []))
+ .find((candidate) => resolveFileDiffPath(candidate) === path);
+ const side = range.endSide ?? range.side;
+ const position =
+ (sourceFile && resolveDiffReviewPosition(sourceFile, range.end, side)) ??
+ resolveDiffReviewPosition(file, range.end, side);
if (position === null) return;
setDraft({
fileKey: item.id,
@@ -652,7 +661,7 @@ export function PullRequestCodeTab({
range,
});
},
- [canCommentOnLines, files],
+ [canCommentOnLines, files, parsedSlices],
);
// Built here because the parsed diff only lives here, and built by the same function the
@@ -1009,11 +1018,6 @@ export function PullRequestCodeTab({
}
}, [commit, onSelectedCommitChange, selectedCommit]);
const scopeLabel = selectedCommit ? selectedCommit.messageHeadline : "All commits";
- /**
- * The same controls the thread diff panel carries, in the same order, minus the
- * ignore-whitespace toggle: that is `git diff -w` on the server, and no host's pull request
- * diff API offers it.
- */
const toolbar = (
@@ -1106,6 +1110,30 @@ export function PullRequestCodeTab({
+
+ {
+ setIgnoreWhitespace(Boolean(pressed));
+ setDraft(null);
+ setSelectedLines(null);
+ }}
+ />
+ }
+ >
+
+
+
+ {ignoreWhitespace ? "Show whitespace changes" : "Hide whitespace changes"}
+
+
{fileKeys.length > 0 ? (
{pendingDesktopServerExposureMode === "network-accessible"
- ? "T3 Code will restart to expose this environment over the network."
- : "T3 Code will restart and limit this environment back to this machine."}
+ ? "Let your other devices connect to T3 Code over the network. Pair devices to give them access. T3 Code will restart."
+ : "Devices connected over your local network will disconnect. Existing tunnels, such as T3 Connect or Tailscale HTTPS, keep working. T3 Code will restart."}
@@ -3255,27 +3255,23 @@ export function ConnectionsSettings() {
disabled={isUpdatingDesktopServerExposure}
render={}
>
- Cancel
+ Cancel
diff --git a/apps/web/src/composer-logic.test.ts b/apps/web/src/composer-logic.test.ts
index cbc1821b0da0..1ab4eae861bc 100644
--- a/apps/web/src/composer-logic.test.ts
+++ b/apps/web/src/composer-logic.test.ts
@@ -9,6 +9,7 @@ import { describe, expect, it } from "vite-plus/test";
import {
clampCollapsedComposerCursor,
collapseExpandedComposerCursor,
+ composerStateAtPromptEnd,
composerSubmissionIntentForEnter,
detectComposerTrigger,
expandCollapsedComposerCursor,
@@ -18,6 +19,7 @@ import {
replaceTextRange,
} from "./composer-logic";
import { INLINE_TERMINAL_CONTEXT_PLACEHOLDER } from "./lib/terminalContext";
+import { carryDisplacedCustomAnswerIntoPrompt } from "./pendingUserInput";
const citation: AssistantCitation = {
version: 1,
@@ -294,6 +296,34 @@ describe("expandCollapsedComposerCursor", () => {
});
});
+describe("composerStateAtPromptEnd", () => {
+ it("puts the caret at the end of a restored parked draft", () => {
+ const prompt = carryDisplacedCustomAnswerIntoPrompt("first half\n", "second half");
+
+ expect(composerStateAtPromptEnd(prompt)).toEqual({
+ cursor: prompt.length,
+ trigger: null,
+ });
+ });
+
+ it("collapses mention chips so the next keystroke lands after the draft", () => {
+ const prompt = carryDisplacedCustomAnswerIntoPrompt("", "see @AGENTS.md please");
+
+ expect(composerStateAtPromptEnd(prompt).cursor).toBe("see ".length + 1 + " please".length);
+ expect(composerStateAtPromptEnd(prompt).cursor).not.toBe(0);
+ expect(composerStateAtPromptEnd(prompt).cursor).not.toBe(prompt.length);
+ });
+
+ it("keeps a trailing mention trigger when the restored draft ends with @", () => {
+ const prompt = "look at @";
+
+ expect(composerStateAtPromptEnd(prompt)).toEqual({
+ cursor: prompt.length,
+ trigger: { kind: "path", query: "", rangeStart: "look at ".length, rangeEnd: prompt.length },
+ });
+ });
+});
+
describe("collapseExpandedComposerCursor", () => {
it("keeps cursor unchanged when no mention segment is present", () => {
expect(collapseExpandedComposerCursor("plain text", 5)).toBe(5);
diff --git a/apps/web/src/composer-logic.ts b/apps/web/src/composer-logic.ts
index 4a5b7022adc7..266c273b825c 100644
--- a/apps/web/src/composer-logic.ts
+++ b/apps/web/src/composer-logic.ts
@@ -261,6 +261,18 @@ export function detectComposerTrigger(text: string, cursorInput: number): Compos
};
}
+/** Caret and trigger after replacing composer text and continuing at the end. */
+export function composerStateAtPromptEnd(text: string): {
+ cursor: number;
+ trigger: ComposerTrigger | null;
+} {
+ const cursor = collapseExpandedComposerCursor(text, text.length);
+ return {
+ cursor,
+ trigger: detectComposerTrigger(text, expandCollapsedComposerCursor(text, cursor)),
+ };
+}
+
export function parseStandaloneComposerSlashCommand(
text: string,
): Exclude | null {
diff --git a/apps/web/src/connection/storage.test.ts b/apps/web/src/connection/storage.test.ts
index 6d503387bb64..497e92215638 100644
--- a/apps/web/src/connection/storage.test.ts
+++ b/apps/web/src/connection/storage.test.ts
@@ -74,4 +74,27 @@ describe("makeCatalogBackend", () => {
expect(setConnectionCatalog).toHaveBeenCalledWith("{}");
}),
);
+
+ it.effect("fails IndexedDB writes whose commit aborts", () =>
+ Effect.gen(function* () {
+ vi.stubGlobal("window", {});
+ const transaction = Object.assign(new EventTarget(), {
+ error: null as DOMException | null,
+ objectStore: () => ({
+ put: () => {
+ // A failed commit aborts the transaction without an "error" event.
+ queueMicrotask(() => {
+ transaction.error = new DOMException("Quota exceeded", "QuotaExceededError");
+ transaction.dispatchEvent(new Event("abort"));
+ });
+ },
+ }),
+ });
+ const backend = makeCatalogBackend({ transaction: () => transaction } as never);
+
+ const error = yield* backend.write("{}").pipe(Effect.flip);
+
+ expect(error.message).toContain("QuotaExceededError");
+ }),
+ );
});
diff --git a/apps/web/src/connection/storage.ts b/apps/web/src/connection/storage.ts
index 4ae476c1d11f..20db380ce595 100644
--- a/apps/web/src/connection/storage.ts
+++ b/apps/web/src/connection/storage.ts
@@ -6,6 +6,7 @@ import {
ConnectionTargetStore,
EMPTY_CONNECTION_CATALOG_DOCUMENT,
EnvironmentCacheStore,
+ encodeShellSnapshotForCache,
registerConnectionInCatalog,
removeCatalogValue,
removeConnectionFromCatalog,
@@ -79,7 +80,6 @@ const ConnectionCatalogDocumentJson = Schema.fromJsonString(ConnectionCatalogDoc
const decodeConnectionCatalogDocument = Schema.decodeUnknownEffect(ConnectionCatalogDocumentJson);
const encodeConnectionCatalogDocument = Schema.encodeEffect(ConnectionCatalogDocumentJson);
const decodeStoredShellSnapshot = Schema.decodeUnknownEffect(StoredShellSnapshotJson);
-const encodeStoredShellSnapshot = Schema.encodeEffect(StoredShellSnapshotJson);
const decodeStoredThreadSnapshot = Schema.decodeUnknownEffect(StoredThreadSnapshotJson);
const encodeStoredThreadSnapshot = Schema.encodeEffect(StoredThreadSnapshotJson);
const decodeStoredServerConfig = Schema.decodeUnknownEffect(StoredServerConfigJson);
@@ -174,7 +174,9 @@ function writeDatabaseValue(
) {
return Effect.callback((resume) => {
const transaction = database.transaction(storeName, "readwrite");
- transaction.addEventListener("error", () => {
+ // Every failed write fires "abort". A failed commit, such as
+ // QuotaExceededError, fires only "abort" and no "error".
+ transaction.addEventListener("abort", () => {
resume(
Effect.fail(catalogError("write", transaction.error ?? "Unknown IndexedDB write error")),
);
@@ -489,11 +491,17 @@ export const connectionStorageLayer = Layer.effectContext(
),
saveShell: (environmentId, snapshot) =>
Effect.gen(function* () {
- const encoded = yield* encodeStoredShellSnapshot({
- schemaVersion: SHELL_SNAPSHOT_CACHE_SCHEMA_VERSION,
- environmentId,
- snapshot,
- }).pipe(Effect.mapError((cause) => persistenceError("save-shell", cause)));
+ const encodedSnapshot = yield* encodeShellSnapshotForCache(snapshot);
+ const encoded = yield* Effect.try({
+ try: () =>
+ // @effect-diagnostics-next-line preferSchemaOverJson:off - the snapshot is already encoded.
+ JSON.stringify({
+ schemaVersion: SHELL_SNAPSHOT_CACHE_SCHEMA_VERSION,
+ environmentId,
+ snapshot: encodedSnapshot,
+ } satisfies typeof StoredShellSnapshot.Encoded),
+ catch: (cause) => persistenceError("save-shell", cause),
+ });
yield* writeDatabaseValue(database, SHELL_STORE_NAME, environmentId, encoded);
}).pipe(
Effect.mapError((cause) =>
diff --git a/apps/web/src/lib/diffRendering.test.ts b/apps/web/src/lib/diffRendering.test.ts
index 47a97069876e..e7ce0c550716 100644
--- a/apps/web/src/lib/diffRendering.test.ts
+++ b/apps/web/src/lib/diffRendering.test.ts
@@ -1,4 +1,6 @@
+import { hydratePartialDiff } from "@pierre/diffs";
import { describe, expect, it } from "vite-plus/test";
+import { resolveDiffReviewPosition } from "../reviewCommentContext";
import {
buildFileDiffContentVersion,
buildFileDiffIdentityKey,
@@ -32,6 +34,135 @@ describe("buildPatchCacheKey", () => {
});
describe("getRenderablePatch", () => {
+ it("hides indentation changes around inserted JSX without moving review lines", () => {
+ const patch = [
+ "diff --git a/item.tsx b/item.tsx",
+ "--- a/item.tsx",
+ "+++ b/item.tsx",
+ "@@ -40,5 +40,7 @@",
+ ' ',
+ "- ",
+ '- {name}
',
+ "- ",
+ "+ {showName && (",
+ "+ ",
+ '+ {name}
',
+ "+ ",
+ "+ )}",
+ " ",
+ "@@ -80 +82 @@",
+ "-const value = 1;",
+ "+const value = 2;",
+ ].join("\n");
+ const shown = getRenderablePatch(patch, "pr", { compactPartialHunkOffsets: true });
+ const hidden = getRenderablePatch(patch, "pr", {
+ compactPartialHunkOffsets: true,
+ ignoreWhitespace: true,
+ });
+ expect(shown?.kind).toBe("files");
+ expect(hidden?.kind).toBe("files");
+ if (shown?.kind !== "files" || hidden?.kind !== "files") return;
+ expect(getDiffLineStat(shown.files)).toEqual({ additions: 6, deletions: 4 });
+ expect(getDiffLineStat(hidden.files)).toEqual({ additions: 3, deletions: 1 });
+ const file = hidden.files[0]!;
+ expect(file.additionLines).toEqual(shown.files[0]!.additionLines);
+ expect(file.deletionLines).toEqual(shown.files[0]!.deletionLines);
+ expect(file.cacheKey).not.toBe(shown.files[0]!.cacheKey);
+ expect(resolveDiffReviewPosition(hidden.sourceFiles[0]!, 43, "additions")).toEqual({
+ kind: "added",
+ newLine: 43,
+ });
+ expect(resolveDiffReviewPosition(hidden.sourceFiles[0]!, 42, "deletions")).toEqual({
+ kind: "deleted",
+ oldLine: 42,
+ });
+ expect(file.hunks[0]?.hunkContent).toContainEqual({
+ type: "context",
+ lines: 3,
+ additionLineIndex: 2,
+ deletionLineIndex: 1,
+ });
+ expect(resolveDiffReviewPosition(file, 41, "additions")).toEqual({
+ kind: "added",
+ newLine: 41,
+ });
+ expect(resolveDiffReviewPosition(file, 43, "additions")).toEqual({
+ kind: "context",
+ oldLine: 42,
+ newLine: 43,
+ side: "right",
+ });
+ expect(resolveDiffReviewPosition(file, 42, "deletions")).toEqual({
+ kind: "context",
+ oldLine: 42,
+ newLine: 43,
+ side: "left",
+ });
+ expect(file.hunks[1]).toMatchObject({
+ additionStart: 82,
+ deletionStart: 80,
+ splitLineStart: 7,
+ unifiedLineStart: 7,
+ });
+ const prefix = "unchanged\n".repeat(39);
+ const gap = "unchanged\n".repeat(35);
+ const hydrated = hydratePartialDiff("clone", file, {
+ oldFile: {
+ name: file.name,
+ contents: prefix + file.deletionLines.slice(0, 5).join("") + gap + "const value = 1;\n",
+ },
+ newFile: {
+ name: file.name,
+ contents: prefix + file.additionLines.slice(0, 7).join("") + gap + "const value = 2;\n",
+ },
+ });
+ expect(getDiffLineStat([hydrated])).toEqual({ additions: 3, deletions: 1 });
+ expect(resolveDiffReviewPosition(hydrated, 43, "additions")).toEqual(
+ resolveDiffReviewPosition(file, 43, "additions"),
+ );
+ });
+
+ it.each([
+ [" const x = 1;\t", "\tconst x=1;", 0, 0],
+ ["const x = 1;", "const x = 2;", 1, 1],
+ ["const x = 1;", "const x = 1;\n", 1, 0],
+ ])("filters whitespace in %j to %j", (before, after, additions, deletions) => {
+ const patch = [
+ "diff --git a/example.ts b/example.ts",
+ "--- a/example.ts",
+ "+++ b/example.ts",
+ `@@ -1 +1,${after.split("\n").length} @@`,
+ `-${before}`,
+ ...after.split("\n").map((line) => `+${line}`),
+ "",
+ ].join("\n");
+ const filtered = getRenderablePatch(patch, "pr", { ignoreWhitespace: true });
+ expect(filtered?.kind).toBe("files");
+ if (filtered?.kind !== "files") return;
+ expect(getDiffLineStat(filtered.files)).toEqual({ additions, deletions });
+ });
+
+ it.each(["+", "-"])("keeps %s blank lines without a final newline", (sign) => {
+ const parsed = getRenderablePatch(
+ [
+ "diff --git a/blank.txt b/blank.txt",
+ "--- a/blank.txt",
+ "+++ b/blank.txt",
+ sign === "+" ? "@@ -0,0 +1 @@" : "@@ -1 +0,0 @@",
+ `${sign} `,
+ "\\ No newline at end of file",
+ ].join("\n"),
+ "pr",
+ { ignoreWhitespace: true },
+ );
+ expect(parsed?.kind).toBe("files");
+ if (parsed?.kind !== "files") return;
+ expect(getDiffLineStat(parsed.files)).toEqual({
+ additions: sign === "+" ? 1 : 0,
+ deletions: sign === "-" ? 1 : 0,
+ });
+ });
+
it("compacts partial hunk render offsets for virtualized review diffs", () => {
const patch = [
"diff --git a/example.ts b/example.ts",
diff --git a/apps/web/src/lib/diffRendering.ts b/apps/web/src/lib/diffRendering.ts
index 4708ae6685f2..a1b4467cf7e9 100644
--- a/apps/web/src/lib/diffRendering.ts
+++ b/apps/web/src/lib/diffRendering.ts
@@ -1,4 +1,5 @@
import { parsePatchFiles } from "@pierre/diffs/utils/parsePatchFiles";
+import { parseDiffFromFile } from "@pierre/diffs";
import type { FileDiffMetadata } from "@pierre/diffs/types";
export const DIFF_THEME_NAMES = {
@@ -45,6 +46,7 @@ export type RenderablePatch =
| {
kind: "files";
files: FileDiffMetadata[];
+ sourceFiles: FileDiffMetadata[];
}
| {
kind: "raw";
@@ -72,6 +74,7 @@ export function getDiffLineStat(files: ReadonlyArray): DiffLin
}
interface RenderablePatchOptions {
+ ignoreWhitespace?: boolean;
/**
* Pierre's partial-patch parser keeps hunk render starts in source-file
* coordinates. Its virtualizer iterates partial patches as compact rows, so
@@ -81,6 +84,59 @@ interface RenderablePatchOptions {
compactPartialHunkOffsets?: boolean;
}
+function hideWhitespaceChanges(file: FileDiffMetadata): FileDiffMetadata {
+ let splitDelta = 0;
+ let unifiedDelta = 0;
+ const hunks = file.hunks.map((hunk) => {
+ const oldContents = file.deletionLines
+ .slice(hunk.deletionLineIndex, hunk.deletionLineIndex + hunk.deletionCount)
+ .map((line) => `${line.replace(/\s/g, "")}\n`)
+ .join("");
+ const newContents = file.additionLines
+ .slice(hunk.additionLineIndex, hunk.additionLineIndex + hunk.additionCount)
+ .map((line) => `${line.replace(/\s/g, "")}\n`)
+ .join("");
+ const filtered = parseDiffFromFile(
+ { name: file.name, contents: oldContents },
+ { name: file.name, contents: newContents },
+ { context: Infinity },
+ ).hunks[0];
+ const next = {
+ ...hunk,
+ additionLines: filtered?.additionLines ?? 0,
+ deletionLines: filtered?.deletionLines ?? 0,
+ hunkContent: filtered
+ ? filtered.hunkContent.map((content) => ({
+ ...content,
+ additionLineIndex: content.additionLineIndex + hunk.additionLineIndex,
+ deletionLineIndex: content.deletionLineIndex + hunk.deletionLineIndex,
+ }))
+ : [
+ {
+ type: "context" as const,
+ lines: hunk.additionCount,
+ additionLineIndex: hunk.additionLineIndex,
+ deletionLineIndex: hunk.deletionLineIndex,
+ },
+ ],
+ splitLineStart: hunk.splitLineStart + splitDelta,
+ unifiedLineStart: hunk.unifiedLineStart + unifiedDelta,
+ splitLineCount: filtered?.splitLineCount ?? hunk.additionCount,
+ unifiedLineCount: filtered?.unifiedLineCount ?? hunk.additionCount,
+ };
+ splitDelta += next.splitLineCount - hunk.splitLineCount;
+ unifiedDelta += next.unifiedLineCount - hunk.unifiedLineCount;
+ return next;
+ });
+ return {
+ ...file,
+ hunks,
+ splitLineCount: file.splitLineCount + splitDelta,
+ unifiedLineCount: file.unifiedLineCount + unifiedDelta,
+ ...(file.cacheKey ? { cacheKey: `${file.cacheKey}:ignore-whitespace` } : {}),
+ };
+}
+
export function compactPartialHunkOffsets(file: FileDiffMetadata): FileDiffMetadata {
if (!file.isPartial) return file;
@@ -120,13 +176,13 @@ export function getRenderablePatch(
normalizedPatch,
buildPatchCacheKey(normalizedPatch, cacheScope),
);
- const files = parsedPatches.flatMap((parsedPatch) =>
- options.compactPartialHunkOffsets
- ? parsedPatch.files.map(compactPartialHunkOffsets)
- : parsedPatch.files,
- );
+ const sourceFiles = parsedPatches.flatMap((parsedPatch) => parsedPatch.files);
+ const files = sourceFiles.map((file) => {
+ const filtered = options.ignoreWhitespace ? hideWhitespaceChanges(file) : file;
+ return options.compactPartialHunkOffsets ? compactPartialHunkOffsets(filtered) : filtered;
+ });
if (files.length > 0) {
- return { kind: "files", files };
+ return { kind: "files", files, sourceFiles };
}
return {
diff --git a/apps/web/src/pendingUserInput.test.ts b/apps/web/src/pendingUserInput.test.ts
index 7ccc59ff1016..142c05997599 100644
--- a/apps/web/src/pendingUserInput.test.ts
+++ b/apps/web/src/pendingUserInput.test.ts
@@ -2,6 +2,7 @@ import { describe, expect, it } from "vite-plus/test";
import {
buildPendingUserInputAnswers,
+ carryDisplacedCustomAnswerIntoPrompt,
countAnsweredPendingUserInputQuestions,
derivePendingUserInputProgress,
resolvePendingUserInputAnswer,
@@ -302,3 +303,21 @@ describe("pending user input question progress", () => {
});
});
});
+describe("carryDisplacedCustomAnswerIntoPrompt", () => {
+ it("keeps the thread draft when nothing was typed into the answer", () => {
+ expect(carryDisplacedCustomAnswerIntoPrompt("draft", undefined)).toBe("draft");
+ expect(carryDisplacedCustomAnswerIntoPrompt("draft", " ")).toBe("draft");
+ });
+
+ it("moves the typed answer into an empty thread draft", () => {
+ expect(carryDisplacedCustomAnswerIntoPrompt("", "also rename the flag ")).toBe(
+ "also rename the flag",
+ );
+ });
+
+ it("appends the typed answer after an existing thread draft", () => {
+ expect(carryDisplacedCustomAnswerIntoPrompt("first half\n", "second half")).toBe(
+ "first half\n\nsecond half",
+ );
+ });
+});
diff --git a/apps/web/src/pendingUserInput.ts b/apps/web/src/pendingUserInput.ts
index a10e9d716c22..0747df76818d 100644
--- a/apps/web/src/pendingUserInput.ts
+++ b/apps/web/src/pendingUserInput.ts
@@ -72,6 +72,28 @@ export function setPendingUserInputCustomAnswer(
};
}
+const DISPLACED_ANSWER_SEPARATOR = "\n\n";
+
+/**
+ * Selecting an option replaces the custom answer, because a non-empty custom
+ * answer outranks selected options in `resolvePendingUserInputAnswer`. Text the
+ * user typed into the answer field must not vanish on that click: it moves back
+ * into the thread draft, after whatever was already waiting there.
+ */
+export function carryDisplacedCustomAnswerIntoPrompt(
+ prompt: string,
+ customAnswer: string | undefined,
+): string {
+ const displaced = customAnswer?.trim() ?? "";
+ if (displaced.length === 0) {
+ return prompt;
+ }
+ if (prompt.trim().length === 0) {
+ return displaced;
+ }
+ return `${prompt.trimEnd()}${DISPLACED_ANSWER_SEPARATOR}${displaced}`;
+}
+
export function togglePendingUserInputOptionSelection(
question: UserInputQuestion,
draft: PendingUserInputDraftAnswer | undefined,
diff --git a/apps/web/src/shortcutModifierState.test.ts b/apps/web/src/shortcutModifierState.test.ts
index 4ef4b3b6bf2d..20b63220072d 100644
--- a/apps/web/src/shortcutModifierState.test.ts
+++ b/apps/web/src/shortcutModifierState.test.ts
@@ -1,8 +1,13 @@
-import { describe, expect, it } from "vite-plus/test";
+// @vitest-environment jsdom
+
+import { act, createElement } from "react";
+import { createRoot, type Root } from "react-dom/client";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vite-plus/test";
import {
areShortcutModifierStatesEqual,
shortcutModifierStateAfterKeyboardEvent,
+ useShortcutModifierState,
type ShortcutModifierState,
} from "./shortcutModifierState";
@@ -13,6 +18,67 @@ const emptyState = (): ShortcutModifierState => ({
shiftKey: false,
});
+describe("useShortcutModifierState", () => {
+ let root: Root;
+ let container: HTMLDivElement;
+
+ beforeEach(() => {
+ vi.stubGlobal("IS_REACT_ACT_ENVIRONMENT", true);
+ container = document.createElement("div");
+ document.body.append(container);
+ root = createRoot(container);
+ });
+
+ afterEach(async () => {
+ await act(async () => root.unmount());
+ container.remove();
+ vi.unstubAllGlobals();
+ });
+
+ it.each(["keyup", "paste", "blur"] as const)(
+ "does not render for unchanged modifiers after %s resets the state",
+ async (reset) => {
+ const render = vi.fn();
+ function Consumer() {
+ render(useShortcutModifierState());
+ return null;
+ }
+ await act(async () => {
+ root.render(createElement(Consumer));
+ });
+ const press = async (type: "keydown" | "keyup", key: string, shiftKey = false) => {
+ await act(async () => {
+ window.dispatchEvent(new KeyboardEvent(type, { key, shiftKey }));
+ });
+ };
+
+ await press("keydown", "Shift", true);
+ expect(render).toHaveBeenLastCalledWith({ ...emptyState(), shiftKey: true });
+ if (reset === "keyup") {
+ await press("keyup", "Shift");
+ } else {
+ await act(async () => {
+ window.dispatchEvent(new Event(reset));
+ });
+ }
+ expect(render).toHaveBeenLastCalledWith(emptyState());
+ render.mockClear();
+
+ for (const key of "typing") {
+ await press("keydown", key);
+ await press("keyup", key);
+ }
+ await act(async () => {
+ window.dispatchEvent(new Event("paste"));
+ window.dispatchEvent(new Event("blur"));
+ });
+ expect(render).not.toHaveBeenCalled();
+ await press("keydown", "Shift", true);
+ expect(render).toHaveBeenCalledExactlyOnceWith({ ...emptyState(), shiftKey: true });
+ },
+ );
+});
+
function keyboardEventLike(type: "keydown" | "keyup", init: Partial): KeyboardEvent {
return {
type,
diff --git a/apps/web/src/shortcutModifierState.ts b/apps/web/src/shortcutModifierState.ts
index 3abeeaa3e8aa..15d6e0a1bcae 100644
--- a/apps/web/src/shortcutModifierState.ts
+++ b/apps/web/src/shortcutModifierState.ts
@@ -1,4 +1,4 @@
-import { useEffect, useState } from "react";
+import { useEffect, useRef, useState } from "react";
export interface ShortcutModifierState {
metaKey: boolean;
@@ -28,10 +28,18 @@ export function areShortcutModifierStatesEqual(
export function useShortcutModifierState(): ShortcutModifierState {
const [state, setState] = useState(EMPTY_SHORTCUT_MODIFIER_STATE);
+ const stateRef = useRef(EMPTY_SHORTCUT_MODIFIER_STATE);
useEffect(() => {
+ const updateState = (next: ShortcutModifierState) => {
+ // Even a no-op state dispatch can cost work in the sidebar's large tree.
+ // Ordinary typing must return before dispatching a React update.
+ if (areShortcutModifierStatesEqual(stateRef.current, next)) return;
+ stateRef.current = next;
+ setState(next);
+ };
const onKeyboardEvent = (event: KeyboardEvent) => {
- setState((current) => shortcutModifierStateAfterKeyboardEvent(current, event));
+ updateState(shortcutModifierStateAfterKeyboardEvent(stateRef.current, event));
};
// Dictation tools (Wispr Flow) paste with a synthetic ⌘V whose Meta keyup
// never reaches the page, so the tracked state stays "⌘ held" forever and
@@ -39,11 +47,7 @@ export function useShortcutModifierState(): ShortcutModifierState {
// treat it like a blur and reset. A physically held modifier re-registers
// on the next real key event.
const onResetEvent = () => {
- setState((current) =>
- areShortcutModifierStatesEqual(current, EMPTY_SHORTCUT_MODIFIER_STATE)
- ? current
- : EMPTY_SHORTCUT_MODIFIER_STATE,
- );
+ updateState(EMPTY_SHORTCUT_MODIFIER_STATE);
};
window.addEventListener("keydown", onKeyboardEvent, true);
diff --git a/docs/user/composer.md b/docs/user/composer.md
index ad6e6f5e4ffb..67303218d33a 100644
--- a/docs/user/composer.md
+++ b/docs/user/composer.md
@@ -10,7 +10,8 @@ composers.
You can attach images up to 10 MB. On servers that support file uploads, you can also
attach videos, text files, PDFs, ZIP archives, and other files. Each file can be up to the limit advertised
-by the server, capped at 50 MB. Each message can contain up to eight attachments in total. Files
+by the server, capped at 50 MB. Each message can contain up to 100 attachments in total. Images
+can total up to 80 MiB per message. Files
upload directly to the environment, where your agent can read, copy, or edit them by their file path.
Attachments upload as soon as you add them while connected to a server that supports uploads.
diff --git a/packages/client-runtime/src/codexFileCitations.ts b/packages/client-runtime/src/codexFileCitations.ts
index b5042f0806e6..d29996501ea6 100644
--- a/packages/client-runtime/src/codexFileCitations.ts
+++ b/packages/client-runtime/src/codexFileCitations.ts
@@ -44,6 +44,7 @@ function markdownLabel(value: string): string {
function markdownDestination(value: string): string {
return value
+ .replaceAll("\\", "%5C")
.replaceAll("<", "%3C")
.replaceAll(">", "%3E")
.replaceAll("\r", "%0D")
diff --git a/packages/client-runtime/src/codexMarkdownDirectives.test.ts b/packages/client-runtime/src/codexMarkdownDirectives.test.ts
index b2a22901eac2..efd5262d073c 100644
--- a/packages/client-runtime/src/codexMarkdownDirectives.test.ts
+++ b/packages/client-runtime/src/codexMarkdownDirectives.test.ts
@@ -8,6 +8,7 @@ import {
renderCodexFileCitationsAsMarkdown,
splitCodexArtifactTemplateMarkdown,
} from "./codexMarkdownDirectives.js";
+import { parseMarkdownFileLink } from "./markdownLinks.js";
interface TestNode {
readonly type: string;
@@ -89,6 +90,24 @@ describe("remarkCodexDirectives", () => {
});
});
+describe.each([
+ { name: "renderCodexDirectivesForCopy", render: renderCodexDirectivesForCopy },
+ { name: "renderCodexFileCitationsAsMarkdown", render: renderCodexFileCitationsAsMarkdown },
+])("$name file citation round trips", ({ render }) => {
+ it.each([
+ "C:\\Users\\test\\[draft]\\report.md",
+ "\\\\server\\share\\report.md",
+ "outputs/report.md",
+ "/tmp/report%5C.md",
+ ])("preserves the literal path and line: %s", (path) => {
+ const markdown = render(`:codex-file-citation{path="${path}" line_range_start="7"}`);
+ const link = parseOrdinaryMarkdown(markdown).children?.[0]?.children?.[0];
+
+ expect(link?.type).toBe("link");
+ expect(parseMarkdownFileLink(link?.url ?? "")).toEqual({ path, line: 7 });
+ });
+});
+
describe("native Markdown adapters", () => {
it("uses the same parser to render file citations as portable links", () => {
expect(renderCodexFileCitationsAsMarkdown(`Created ${FILE_CITATION}.`)).toBe(
diff --git a/packages/client-runtime/src/platform/persistence.test.ts b/packages/client-runtime/src/platform/persistence.test.ts
new file mode 100644
index 000000000000..3f779625373e
--- /dev/null
+++ b/packages/client-runtime/src/platform/persistence.test.ts
@@ -0,0 +1,46 @@
+import {
+ OrchestrationProjectShell,
+ OrchestrationShellSnapshot,
+ OrchestrationThreadShell,
+} from "@t3tools/contracts";
+import { describe, expect, it } from "@effect/vitest";
+import * as Arr from "effect/Array";
+import * as Effect from "effect/Effect";
+import * as Schema from "effect/Schema";
+import * as FastCheck from "effect/testing/FastCheck";
+
+import { encodeShellSnapshotForCache } from "./persistence.ts";
+
+// Generated values can hold untrimmed strings, which a decoded value never
+// has. One encode and decode gives a value a client can hold; values that
+// fail are dropped.
+const sampleDecoded = (schema: S) =>
+ Effect.gen(function* () {
+ const encode = Schema.encodeEffect(schema);
+ const decode = Schema.decodeEffect(schema);
+ const generated = FastCheck.sample(Schema.toArbitrary(schema), { numRuns: 1000 });
+ const decoded = yield* Effect.forEach(generated, (value) =>
+ encode(value).pipe(Effect.flatMap(decode), Effect.option),
+ );
+ return Arr.getSomes(decoded);
+ });
+const encodeSnapshot = Schema.encodeEffect(OrchestrationShellSnapshot);
+
+describe("encodeShellSnapshotForCache", () => {
+ it.effect("matches the Schema encoding of a generated snapshot", () =>
+ Effect.gen(function* () {
+ const threads = yield* sampleDecoded(OrchestrationThreadShell);
+ const projects = yield* sampleDecoded(OrchestrationProjectShell);
+ const snapshot: OrchestrationShellSnapshot = {
+ snapshotSequence: 1,
+ projects,
+ threads,
+ updatedAt: "2026-09-25T00:00:00.000Z",
+ };
+
+ expect(threads.length).toBeGreaterThan(0);
+ expect(projects.length).toBeGreaterThan(0);
+ expect(yield* encodeShellSnapshotForCache(snapshot)).toEqual(yield* encodeSnapshot(snapshot));
+ }),
+ );
+});
diff --git a/packages/client-runtime/src/platform/persistence.ts b/packages/client-runtime/src/platform/persistence.ts
index 14a322bcd303..77d1498af9eb 100644
--- a/packages/client-runtime/src/platform/persistence.ts
+++ b/packages/client-runtime/src/platform/persistence.ts
@@ -1,5 +1,6 @@
import {
type EnvironmentId,
+ OrchestrationProjectShell,
type OrchestrationShellSnapshot,
type OrchestrationThreadDetailSnapshot,
type ServerConfig,
@@ -122,6 +123,21 @@ export class EnvironmentCacheStore extends Context.Service<
}
>()("@t3tools/client-runtime/platform/persistence/EnvironmentCacheStore") {}
+const encodeProjectShells = Schema.encodeEffect(Schema.Array(OrchestrationProjectShell));
+
+/**
+ * Encodes a shell snapshot for `EnvironmentCacheStore.saveShell`. The result
+ * equals `Schema.encode(OrchestrationShellSnapshot)`, so the cache format does
+ * not change. Walking thousands of threads through Schema blocks the UI
+ * thread, and a decoded thread shell is already in its encoded form, so only
+ * the projects go through Schema: their icon has a real encode transform.
+ */
+export const encodeShellSnapshotForCache = (snapshot: OrchestrationShellSnapshot) =>
+ Effect.map(
+ encodeProjectShells(snapshot.projects),
+ (projects) => ({ ...snapshot, projects }) satisfies typeof OrchestrationShellSnapshot.Encoded,
+ );
+
export class EnvironmentOwnedDataCleanup extends Context.Reference<{
readonly clear: (environmentId: EnvironmentId) => Effect.Effect;
}>("@t3tools/client-runtime/platform/persistence/EnvironmentOwnedDataCleanup", {
diff --git a/packages/contracts/src/orchestration.ts b/packages/contracts/src/orchestration.ts
index 897df6666f90..4feff09e7c9c 100644
--- a/packages/contracts/src/orchestration.ts
+++ b/packages/contracts/src/orchestration.ts
@@ -157,8 +157,9 @@ export const ProviderUserInputAnswers = Schema.Record(Schema.String, Schema.Unkn
export type ProviderUserInputAnswers = typeof ProviderUserInputAnswers.Type;
export const PROVIDER_SEND_TURN_MAX_INPUT_CHARS = 120_000;
-export const PROVIDER_SEND_TURN_MAX_ATTACHMENTS = 8;
+export const PROVIDER_SEND_TURN_MAX_ATTACHMENTS = 100;
export const PROVIDER_SEND_TURN_MAX_IMAGE_BYTES = 10 * 1024 * 1024;
+const PROVIDER_SEND_TURN_MAX_TOTAL_IMAGE_BYTES = 80 * 1024 * 1024;
export const PROVIDER_SEND_TURN_MAX_FILE_BYTES = 50 * 1024 * 1024;
export const PROVIDER_SEND_TURN_SUPPORTED_IMAGE_MIME_TYPES = [
"image/gif",
@@ -246,6 +247,25 @@ export const ChatAttachment = Schema.Union([
ChatUnknownAttachment,
]);
export type ChatAttachment = typeof ChatAttachment.Type;
+
+export function getProviderAttachmentLimitError(
+ attachments: ReadonlyArray>,
+): string | undefined {
+ if (attachments.length > PROVIDER_SEND_TURN_MAX_ATTACHMENTS) {
+ return `You can attach up to ${PROVIDER_SEND_TURN_MAX_ATTACHMENTS} files per message.`;
+ }
+ const imageBytes = attachments.reduce(
+ (total, attachment) =>
+ total +
+ (attachment.type === "image" || isProviderSendTurnSupportedImageMimeType(attachment.mimeType)
+ ? attachment.sizeBytes
+ : 0),
+ 0,
+ );
+ if (imageBytes > PROVIDER_SEND_TURN_MAX_TOTAL_IMAGE_BYTES) {
+ return "Images can total up to 80 MiB per message. Use smaller images or send fewer at once.";
+ }
+}
const UploadChatAttachment = Schema.Union([UploadChatImageAttachment]);
export type UploadChatAttachment = typeof UploadChatAttachment.Type;
diff --git a/packages/contracts/src/provider.test.ts b/packages/contracts/src/provider.test.ts
index ba7ca63745b6..2c25977b7ed4 100644
--- a/packages/contracts/src/provider.test.ts
+++ b/packages/contracts/src/provider.test.ts
@@ -121,6 +121,57 @@ describe("ProviderSessionStartInput", () => {
});
describe("ProviderSendTurnInput", () => {
+ it("accepts 100 attachments and rejects 101", () => {
+ const attachments = Array.from({ length: 100 }, (_, index) => ({
+ type: "image",
+ id: `image-${index}`,
+ name: "image.png",
+ mimeType: "image/png",
+ sizeBytes: 1,
+ }));
+ expect(
+ decodeProviderSendTurnInput({ threadId: "thread-1", attachments }).attachments,
+ ).toHaveLength(100);
+ expect(() =>
+ decodeProviderSendTurnInput({
+ threadId: "thread-1",
+ attachments: [...attachments, attachments[0]],
+ }),
+ ).toThrow();
+ });
+
+ it.each(["image", "file"])(
+ "caps total image bytes for %s attachments without charging videos",
+ (type) => {
+ const image = {
+ type,
+ id: "image",
+ name: "image.png",
+ mimeType: "image/png",
+ sizeBytes: 10 * 1024 * 1024,
+ };
+ const video = {
+ type: "file",
+ id: "video",
+ name: "video.mp4",
+ mimeType: "video/mp4",
+ sizeBytes: 50 * 1024 * 1024,
+ };
+ expect(
+ decodeProviderSendTurnInput({
+ threadId: "thread-1",
+ attachments: [...Array.from({ length: 8 }, () => image), video],
+ }).attachments,
+ ).toHaveLength(9);
+ expect(() =>
+ decodeProviderSendTurnInput({
+ threadId: "thread-1",
+ attachments: [...Array.from({ length: 8 }, () => image), { ...image, sizeBytes: 1 }],
+ }),
+ ).toThrow(/80 MiB/);
+ },
+ );
+
it("accepts codex modelSelection", () => {
const parsed = decodeProviderSendTurnInput({
threadId: "thread-1",
diff --git a/packages/contracts/src/provider.ts b/packages/contracts/src/provider.ts
index 3f9570a30233..400538245a9d 100644
--- a/packages/contracts/src/provider.ts
+++ b/packages/contracts/src/provider.ts
@@ -10,8 +10,8 @@ import {
} from "./baseSchemas.ts";
import {
ChatAttachment,
+ getProviderAttachmentLimitError,
ModelSelection,
- PROVIDER_SEND_TURN_MAX_ATTACHMENTS,
PROVIDER_SEND_TURN_MAX_INPUT_CHARS,
ProviderApprovalDecision,
ProviderApprovalPolicy,
@@ -74,7 +74,9 @@ export const ProviderSendTurnInput = Schema.Struct({
TrimmedNonEmptyString.check(Schema.isMaxLength(PROVIDER_SEND_TURN_MAX_INPUT_CHARS)),
),
attachments: Schema.optional(
- Schema.Array(ChatAttachment).check(Schema.isMaxLength(PROVIDER_SEND_TURN_MAX_ATTACHMENTS)),
+ Schema.Array(ChatAttachment).check(
+ Schema.makeFilter((attachments) => getProviderAttachmentLimitError(attachments) ?? true),
+ ),
),
modelSelection: Schema.optional(ModelSelection),
interactionMode: Schema.optional(ProviderInteractionMode),
diff --git a/packages/effect-acp/src/errors.ts b/packages/effect-acp/src/errors.ts
index a3e6ffa65c2e..38a9e016d386 100644
--- a/packages/effect-acp/src/errors.ts
+++ b/packages/effect-acp/src/errors.ts
@@ -95,13 +95,15 @@ export class AcpProcessExitedError extends Schema.TaggedErrorClass 0 ? `${base}\n${excerpt}` : base;
}
}
diff --git a/packages/effect-codex-app-server/scripts/generate.ts b/packages/effect-codex-app-server/scripts/generate.ts
index 88a85f9eac59..55b20bd3cdc3 100644
--- a/packages/effect-codex-app-server/scripts/generate.ts
+++ b/packages/effect-codex-app-server/scripts/generate.ts
@@ -17,7 +17,7 @@ import {
} from "effect/unstable/http";
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
-const UPSTREAM_REF = "678157acaa819d5510adfe359abb5d0392cfe461";
+const UPSTREAM_REF = "687a119f0fcaace47e1f1abcc77cec6c813fd6da";
const USER_AGENT = "effect-codex-app-server-generator";
const GITHUB_API_BASE =
"https://api.github.com/repos/openai/codex/contents/codex-rs/app-server-protocol";
@@ -166,28 +166,8 @@ const Codex0150DefinitionSchemas: Record = {
type: "string",
enum: ["inProgress", "completed", "failed", "interrupted"],
},
- PlanType: {
- type: "string",
- enum: [
- "free",
- "go",
- "plus",
- "pro",
- "prolite",
- "team",
- "self_serve_business_prolite",
- "self_serve_business_usage_based",
- "business",
- "ent26",
- "enterprise_cbp_automation",
- "enterprise_cbp_usage_based",
- "enterprise",
- "edu",
- "edu_plus",
- "edu_pro",
- "unknown",
- ],
- },
+ // Unknown plan slugs are labels, not protocol failures (upstream #14304).
+ PlanType: { type: "string" },
SubAgentActivityKind: {
type: "string",
enum: ["started", "interacted", "interrupted", "completed"],
@@ -506,6 +486,9 @@ function resolveResponseTypeName(
generatedSchemaNames: ReadonlySet,
): string {
const overrides: Record = {
+ "account/gatewayOAuth/cancel": "GatewayOAuthCancelResponse",
+ "account/gatewayOAuth/login": "GatewayOAuthLoginResponse",
+ "account/gatewayOAuth/read": "GatewayOAuthReadResponse",
"account/logout": "LogoutAccountResponse",
"account/rateLimits/read": "GetAccountRateLimitsResponse",
"account/usage/read": "GetAccountTokenUsageResponse",
diff --git a/packages/effect-codex-app-server/src/_generated/meta.gen.ts b/packages/effect-codex-app-server/src/_generated/meta.gen.ts
index 24452e881f66..1c9d47e58523 100644
--- a/packages/effect-codex-app-server/src/_generated/meta.gen.ts
+++ b/packages/effect-codex-app-server/src/_generated/meta.gen.ts
@@ -1,5 +1,5 @@
// This file is generated by the effect-codex-app-server package. Do not edit manually.
-// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461
+// Upstream protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
import * as CodexSchema from "./schema.gen.ts";
@@ -16,14 +16,24 @@ export const CLIENT_REQUEST_METHODS = {
"thread/goal/get": "thread/goal/get",
"thread/goal/clear": "thread/goal/clear",
"thread/metadata/update": "thread/metadata/update",
+ "thread/attachment/add": "thread/attachment/add",
+ "thread/attachment/list": "thread/attachment/list",
+ "thread/attachment/remove": "thread/attachment/remove",
+ "thread/section/move": "thread/section/move",
"thread/unarchive": "thread/unarchive",
"thread/compact/start": "thread/compact/start",
"thread/shellCommand": "thread/shellCommand",
"thread/approveGuardianDeniedAction": "thread/approveGuardianDeniedAction",
- "thread/rollback": "thread/rollback",
+ "thread/revert": "thread/revert",
"thread/list": "thread/list",
+ "threadSection/list": "threadSection/list",
+ "threadSection/create": "threadSection/create",
+ "threadSection/update": "threadSection/update",
+ "threadSection/delete": "threadSection/delete",
"thread/loaded/list": "thread/loaded/list",
"thread/read": "thread/read",
+ "thread/turns/list": "thread/turns/list",
+ "thread/items/list": "thread/items/list",
"thread/inject_items": "thread/inject_items",
"skills/list": "skills/list",
"skills/extraRoots/set": "skills/extraRoots/set",
@@ -33,6 +43,7 @@ export const CLIENT_REQUEST_METHODS = {
"marketplace/upgrade": "marketplace/upgrade",
"plugin/list": "plugin/list",
"plugin/installed": "plugin/installed",
+ "plugin/reconcile": "plugin/reconcile",
"plugin/read": "plugin/read",
"plugin/skill/read": "plugin/skill/read",
"plugin/share/save": "plugin/share/save",
@@ -60,6 +71,9 @@ export const CLIENT_REQUEST_METHODS = {
"turn/interrupt": "turn/interrupt",
"review/start": "review/start",
"model/list": "model/list",
+ "account/gatewayOAuth/read": "account/gatewayOAuth/read",
+ "account/gatewayOAuth/login": "account/gatewayOAuth/login",
+ "account/gatewayOAuth/cancel": "account/gatewayOAuth/cancel",
"modelProvider/capabilities/read": "modelProvider/capabilities/read",
"experimentalFeature/list": "experimentalFeature/list",
"permissionProfile/list": "permissionProfile/list",
@@ -87,6 +101,7 @@ export const CLIENT_REQUEST_METHODS = {
"config/read": "config/read",
"externalAgentConfig/detect": "externalAgentConfig/detect",
"externalAgentConfig/import": "externalAgentConfig/import",
+ "externalAgentConfig/import/recordHistory": "externalAgentConfig/import/recordHistory",
"externalAgentConfig/import/readHistories": "externalAgentConfig/import/readHistories",
"config/value/write": "config/value/write",
"config/batchWrite": "config/batchWrite",
@@ -123,10 +138,15 @@ export const SERVER_NOTIFICATION_METHODS = {
"thread/deleted": "thread/deleted",
"thread/unarchived": "thread/unarchived",
"thread/closed": "thread/closed",
+ "thread/reverted": "thread/reverted",
"skills/changed": "skills/changed",
"thread/name/updated": "thread/name/updated",
+ "thread/attachment/updated": "thread/attachment/updated",
"thread/goal/updated": "thread/goal/updated",
"thread/goal/cleared": "thread/goal/cleared",
+ "thread/queue/changed": "thread/queue/changed",
+ "project/changed": "project/changed",
+ "thread/project/updated": "thread/project/updated",
"thread/environment/connected": "thread/environment/connected",
"thread/environment/disconnected": "thread/environment/disconnected",
"thread/settings/updated": "thread/settings/updated",
@@ -140,6 +160,7 @@ export const SERVER_NOTIFICATION_METHODS = {
"item/started": "item/started",
"item/autoApprovalReview/started": "item/autoApprovalReview/started",
"item/autoApprovalReview/completed": "item/autoApprovalReview/completed",
+ "autoApprovalReview/strictReviewRequired": "autoApprovalReview/strictReviewRequired",
"item/completed": "item/completed",
"rawResponseItem/completed": "rawResponseItem/completed",
"rawResponse/completed": "rawResponse/completed",
@@ -156,7 +177,9 @@ export const SERVER_NOTIFICATION_METHODS = {
"item/mcpToolCall/progress": "item/mcpToolCall/progress",
"mcpServer/oauthLogin/completed": "mcpServer/oauthLogin/completed",
"mcpServer/startupStatus/updated": "mcpServer/startupStatus/updated",
+ "mcpServer/event/stream/notification": "mcpServer/event/stream/notification",
"account/updated": "account/updated",
+ "account/gatewayOAuth/changed": "account/gatewayOAuth/changed",
"account/rateLimits/updated": "account/rateLimits/updated",
"app/list/updated": "app/list/updated",
"remoteControl/status/changed": "remoteControl/status/changed",
@@ -169,6 +192,8 @@ export const SERVER_NOTIFICATION_METHODS = {
"thread/compacted": "thread/compacted",
"model/rerouted": "model/rerouted",
"model/verification": "model/verification",
+ "modelProvider/authRecoveryStarted": "modelProvider/authRecoveryStarted",
+ "modelProvider/authRecoveryCompleted": "modelProvider/authRecoveryCompleted",
"turn/moderationMetadata": "turn/moderationMetadata",
"model/safetyBuffering/updated": "model/safetyBuffering/updated",
warning: "warning",
@@ -179,6 +204,9 @@ export const SERVER_NOTIFICATION_METHODS = {
"fuzzyFileSearch/sessionCompleted": "fuzzyFileSearch/sessionCompleted",
"thread/realtime/started": "thread/realtime/started",
"thread/realtime/itemAdded": "thread/realtime/itemAdded",
+ "thread/realtime/item/started": "thread/realtime/item/started",
+ "thread/realtime/item/transcript/delta": "thread/realtime/item/transcript/delta",
+ "thread/realtime/item/completed": "thread/realtime/item/completed",
"thread/realtime/transcript/delta": "thread/realtime/transcript/delta",
"thread/realtime/transcript/done": "thread/realtime/transcript/done",
"thread/realtime/outputAudio/delta": "thread/realtime/outputAudio/delta",
@@ -208,14 +236,24 @@ export interface ClientRequestParamsByMethod {
readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetParams;
readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams;
readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams;
+ readonly "thread/attachment/add": CodexSchema.V2ThreadAttachmentAddParams;
+ readonly "thread/attachment/list": CodexSchema.V2ThreadAttachmentListParams;
+ readonly "thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveParams;
+ readonly "thread/section/move": CodexSchema.V2ThreadSectionMoveParams;
readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveParams;
readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartParams;
readonly "thread/shellCommand": CodexSchema.V2ThreadShellCommandParams;
readonly "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams;
- readonly "thread/rollback": CodexSchema.V2ThreadRollbackParams;
+ readonly "thread/revert": CodexSchema.V2ThreadRevertParams;
readonly "thread/list": CodexSchema.V2ThreadListParams;
+ readonly "threadSection/list": CodexSchema.V2ThreadSectionListParams;
+ readonly "threadSection/create": CodexSchema.V2ThreadSectionCreateParams;
+ readonly "threadSection/update": CodexSchema.V2ThreadSectionUpdateParams;
+ readonly "threadSection/delete": CodexSchema.V2ThreadSectionDeleteParams;
readonly "thread/loaded/list": CodexSchema.V2ThreadLoadedListParams;
readonly "thread/read": CodexSchema.V2ThreadReadParams;
+ readonly "thread/turns/list": CodexSchema.V2ThreadTurnsListParams;
+ readonly "thread/items/list": CodexSchema.V2ThreadItemsListParams;
readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsParams;
readonly "skills/list": CodexSchema.V2SkillsListParams;
readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams;
@@ -225,6 +263,7 @@ export interface ClientRequestParamsByMethod {
readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams;
readonly "plugin/list": CodexSchema.V2PluginListParams;
readonly "plugin/installed": CodexSchema.V2PluginInstalledParams;
+ readonly "plugin/reconcile": CodexSchema.V2PluginReconcileParams;
readonly "plugin/read": CodexSchema.V2PluginReadParams;
readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadParams;
readonly "plugin/share/save": CodexSchema.V2PluginShareSaveParams;
@@ -252,6 +291,9 @@ export interface ClientRequestParamsByMethod {
readonly "turn/interrupt": CodexSchema.V2TurnInterruptParams;
readonly "review/start": CodexSchema.V2ReviewStartParams;
readonly "model/list": CodexSchema.V2ModelListParams;
+ readonly "account/gatewayOAuth/read": undefined;
+ readonly "account/gatewayOAuth/login": undefined;
+ readonly "account/gatewayOAuth/cancel": undefined;
readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams;
readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams;
readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListParams;
@@ -266,9 +308,9 @@ export interface ClientRequestParamsByMethod {
readonly "account/login/start": CodexSchema.V2LoginAccountParams;
readonly "account/login/cancel": CodexSchema.V2CancelLoginAccountParams;
readonly "account/logout": undefined;
- readonly "account/rateLimits/read": undefined;
+ readonly "account/rateLimits/read": CodexSchema.V2NullableGetAccountRateLimitsParams;
readonly "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams;
- readonly "account/usage/read": undefined;
+ readonly "account/usage/read": CodexSchema.V2NullableGetAccountTokenUsageParams;
readonly "account/workspaceMessages/read": undefined;
readonly "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams;
readonly "feedback/upload": CodexSchema.V2FeedbackUploadParams;
@@ -279,6 +321,7 @@ export interface ClientRequestParamsByMethod {
readonly "config/read": CodexSchema.V2ConfigReadParams;
readonly "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectParams;
readonly "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportParams;
+ readonly "externalAgentConfig/import/recordHistory": CodexSchema.V2ExternalAgentConfigImportHistoryRecordParams;
readonly "externalAgentConfig/import/readHistories": undefined;
readonly "config/value/write": CodexSchema.V2ConfigValueWriteParams;
readonly "config/batchWrite": CodexSchema.V2ConfigBatchWriteParams;
@@ -303,14 +346,24 @@ export interface ClientRequestResponsesByMethod {
readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse;
readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse;
readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse;
+ readonly "thread/attachment/add": CodexSchema.V2ThreadAttachmentAddResponse;
+ readonly "thread/attachment/list": CodexSchema.V2ThreadAttachmentListResponse;
+ readonly "thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveResponse;
+ readonly "thread/section/move": CodexSchema.V2ThreadSectionMoveResponse;
readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse;
readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartResponse;
readonly "thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse;
readonly "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse;
- readonly "thread/rollback": CodexSchema.V2ThreadRollbackResponse;
+ readonly "thread/revert": CodexSchema.V2ThreadRevertResponse;
readonly "thread/list": CodexSchema.V2ThreadListResponse;
+ readonly "threadSection/list": CodexSchema.V2ThreadSectionListResponse;
+ readonly "threadSection/create": CodexSchema.V2ThreadSectionCreateResponse;
+ readonly "threadSection/update": CodexSchema.V2ThreadSectionUpdateResponse;
+ readonly "threadSection/delete": CodexSchema.V2ThreadSectionDeleteResponse;
readonly "thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse;
readonly "thread/read": CodexSchema.V2ThreadReadResponse;
+ readonly "thread/turns/list": CodexSchema.V2ThreadTurnsListResponse;
+ readonly "thread/items/list": CodexSchema.V2ThreadItemsListResponse;
readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse;
readonly "skills/list": CodexSchema.V2SkillsListResponse;
readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse;
@@ -320,6 +373,7 @@ export interface ClientRequestResponsesByMethod {
readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse;
readonly "plugin/list": CodexSchema.V2PluginListResponse;
readonly "plugin/installed": CodexSchema.V2PluginInstalledResponse;
+ readonly "plugin/reconcile": CodexSchema.V2PluginReconcileResponse;
readonly "plugin/read": CodexSchema.V2PluginReadResponse;
readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse;
readonly "plugin/share/save": CodexSchema.V2PluginShareSaveResponse;
@@ -347,6 +401,9 @@ export interface ClientRequestResponsesByMethod {
readonly "turn/interrupt": CodexSchema.V2TurnInterruptResponse;
readonly "review/start": CodexSchema.V2ReviewStartResponse;
readonly "model/list": CodexSchema.V2ModelListResponse;
+ readonly "account/gatewayOAuth/read": CodexSchema.V2GatewayOAuthReadResponse;
+ readonly "account/gatewayOAuth/login": CodexSchema.V2GatewayOAuthLoginResponse;
+ readonly "account/gatewayOAuth/cancel": CodexSchema.V2GatewayOAuthCancelResponse;
readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse;
readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse;
readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListResponse;
@@ -374,6 +431,7 @@ export interface ClientRequestResponsesByMethod {
readonly "config/read": CodexSchema.V2ConfigReadResponse;
readonly "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectResponse;
readonly "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportResponse;
+ readonly "externalAgentConfig/import/recordHistory": CodexSchema.V2ExternalAgentConfigImportHistoryRecordResponse;
readonly "externalAgentConfig/import/readHistories": CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse;
readonly "config/value/write": CodexSchema.V2ConfigWriteResponse;
readonly "config/batchWrite": CodexSchema.V2ConfigWriteResponse;
@@ -423,10 +481,15 @@ export interface ServerNotificationParamsByMethod {
readonly "thread/deleted": CodexSchema.V2ThreadDeletedNotification;
readonly "thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification;
readonly "thread/closed": CodexSchema.V2ThreadClosedNotification;
+ readonly "thread/reverted": CodexSchema.V2ThreadRevertedNotification;
readonly "skills/changed": CodexSchema.V2SkillsChangedNotification;
readonly "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification;
+ readonly "thread/attachment/updated": CodexSchema.V2ThreadAttachmentUpdatedNotification;
readonly "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification;
readonly "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification;
+ readonly "thread/queue/changed": CodexSchema.V2ThreadQueueChangedNotification;
+ readonly "project/changed": CodexSchema.V2ProjectChangedNotification;
+ readonly "thread/project/updated": CodexSchema.V2ThreadProjectUpdatedNotification;
readonly "thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification;
readonly "thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification;
readonly "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification;
@@ -440,6 +503,7 @@ export interface ServerNotificationParamsByMethod {
readonly "item/started": CodexSchema.V2ItemStartedNotification;
readonly "item/autoApprovalReview/started": CodexSchema.V2ItemGuardianApprovalReviewStartedNotification;
readonly "item/autoApprovalReview/completed": CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification;
+ readonly "autoApprovalReview/strictReviewRequired": CodexSchema.V2StrictReviewRequiredNotification;
readonly "item/completed": CodexSchema.V2ItemCompletedNotification;
readonly "rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification;
readonly "rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification;
@@ -456,7 +520,9 @@ export interface ServerNotificationParamsByMethod {
readonly "item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification;
readonly "mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification;
readonly "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification;
+ readonly "mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification;
readonly "account/updated": CodexSchema.V2AccountUpdatedNotification;
+ readonly "account/gatewayOAuth/changed": CodexSchema.V2GatewayOAuthChangedNotification;
readonly "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification;
readonly "app/list/updated": CodexSchema.V2AppListUpdatedNotification;
readonly "remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification;
@@ -469,6 +535,8 @@ export interface ServerNotificationParamsByMethod {
readonly "thread/compacted": CodexSchema.V2ContextCompactedNotification;
readonly "model/rerouted": CodexSchema.V2ModelReroutedNotification;
readonly "model/verification": CodexSchema.V2ModelVerificationNotification;
+ readonly "modelProvider/authRecoveryStarted": CodexSchema.V2AuthRecoveryNotification;
+ readonly "modelProvider/authRecoveryCompleted": CodexSchema.V2AuthRecoveryNotification;
readonly "turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification;
readonly "model/safetyBuffering/updated": CodexSchema.V2ModelSafetyBufferingUpdatedNotification;
readonly warning: CodexSchema.V2WarningNotification;
@@ -479,6 +547,9 @@ export interface ServerNotificationParamsByMethod {
readonly "fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification;
readonly "thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification;
readonly "thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification;
+ readonly "thread/realtime/item/started": CodexSchema.V2ThreadRealtimeItemStartedNotification;
+ readonly "thread/realtime/item/transcript/delta": CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification;
+ readonly "thread/realtime/item/completed": CodexSchema.V2ThreadRealtimeItemCompletedNotification;
readonly "thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification;
readonly "thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification;
readonly "thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification;
@@ -503,14 +574,24 @@ export const CLIENT_REQUEST_PARAMS = {
"thread/goal/get": CodexSchema.V2ThreadGoalGetParams,
"thread/goal/clear": CodexSchema.V2ThreadGoalClearParams,
"thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams,
+ "thread/attachment/add": CodexSchema.V2ThreadAttachmentAddParams,
+ "thread/attachment/list": CodexSchema.V2ThreadAttachmentListParams,
+ "thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveParams,
+ "thread/section/move": CodexSchema.V2ThreadSectionMoveParams,
"thread/unarchive": CodexSchema.V2ThreadUnarchiveParams,
"thread/compact/start": CodexSchema.V2ThreadCompactStartParams,
"thread/shellCommand": CodexSchema.V2ThreadShellCommandParams,
"thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams,
- "thread/rollback": CodexSchema.V2ThreadRollbackParams,
+ "thread/revert": CodexSchema.V2ThreadRevertParams,
"thread/list": CodexSchema.V2ThreadListParams,
+ "threadSection/list": CodexSchema.V2ThreadSectionListParams,
+ "threadSection/create": CodexSchema.V2ThreadSectionCreateParams,
+ "threadSection/update": CodexSchema.V2ThreadSectionUpdateParams,
+ "threadSection/delete": CodexSchema.V2ThreadSectionDeleteParams,
"thread/loaded/list": CodexSchema.V2ThreadLoadedListParams,
"thread/read": CodexSchema.V2ThreadReadParams,
+ "thread/turns/list": CodexSchema.V2ThreadTurnsListParams,
+ "thread/items/list": CodexSchema.V2ThreadItemsListParams,
"thread/inject_items": CodexSchema.V2ThreadInjectItemsParams,
"skills/list": CodexSchema.V2SkillsListParams,
"skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams,
@@ -520,6 +601,7 @@ export const CLIENT_REQUEST_PARAMS = {
"marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams,
"plugin/list": CodexSchema.V2PluginListParams,
"plugin/installed": CodexSchema.V2PluginInstalledParams,
+ "plugin/reconcile": CodexSchema.V2PluginReconcileParams,
"plugin/read": CodexSchema.V2PluginReadParams,
"plugin/skill/read": CodexSchema.V2PluginSkillReadParams,
"plugin/share/save": CodexSchema.V2PluginShareSaveParams,
@@ -547,6 +629,9 @@ export const CLIENT_REQUEST_PARAMS = {
"turn/interrupt": CodexSchema.V2TurnInterruptParams,
"review/start": CodexSchema.V2ReviewStartParams,
"model/list": CodexSchema.V2ModelListParams,
+ "account/gatewayOAuth/read": undefined,
+ "account/gatewayOAuth/login": undefined,
+ "account/gatewayOAuth/cancel": undefined,
"modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams,
"experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams,
"permissionProfile/list": CodexSchema.V2PermissionProfileListParams,
@@ -561,9 +646,9 @@ export const CLIENT_REQUEST_PARAMS = {
"account/login/start": CodexSchema.V2LoginAccountParams,
"account/login/cancel": CodexSchema.V2CancelLoginAccountParams,
"account/logout": undefined,
- "account/rateLimits/read": undefined,
+ "account/rateLimits/read": CodexSchema.V2NullableGetAccountRateLimitsParams,
"account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams,
- "account/usage/read": undefined,
+ "account/usage/read": CodexSchema.V2NullableGetAccountTokenUsageParams,
"account/workspaceMessages/read": undefined,
"account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams,
"feedback/upload": CodexSchema.V2FeedbackUploadParams,
@@ -574,6 +659,8 @@ export const CLIENT_REQUEST_PARAMS = {
"config/read": CodexSchema.V2ConfigReadParams,
"externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectParams,
"externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportParams,
+ "externalAgentConfig/import/recordHistory":
+ CodexSchema.V2ExternalAgentConfigImportHistoryRecordParams,
"externalAgentConfig/import/readHistories": undefined,
"config/value/write": CodexSchema.V2ConfigValueWriteParams,
"config/batchWrite": CodexSchema.V2ConfigBatchWriteParams,
@@ -598,14 +685,24 @@ export const CLIENT_REQUEST_RESPONSES = {
"thread/goal/get": CodexSchema.V2ThreadGoalGetResponse,
"thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse,
"thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse,
+ "thread/attachment/add": CodexSchema.V2ThreadAttachmentAddResponse,
+ "thread/attachment/list": CodexSchema.V2ThreadAttachmentListResponse,
+ "thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveResponse,
+ "thread/section/move": CodexSchema.V2ThreadSectionMoveResponse,
"thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse,
"thread/compact/start": CodexSchema.V2ThreadCompactStartResponse,
"thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse,
"thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse,
- "thread/rollback": CodexSchema.V2ThreadRollbackResponse,
+ "thread/revert": CodexSchema.V2ThreadRevertResponse,
"thread/list": CodexSchema.V2ThreadListResponse,
+ "threadSection/list": CodexSchema.V2ThreadSectionListResponse,
+ "threadSection/create": CodexSchema.V2ThreadSectionCreateResponse,
+ "threadSection/update": CodexSchema.V2ThreadSectionUpdateResponse,
+ "threadSection/delete": CodexSchema.V2ThreadSectionDeleteResponse,
"thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse,
"thread/read": CodexSchema.V2ThreadReadResponse,
+ "thread/turns/list": CodexSchema.V2ThreadTurnsListResponse,
+ "thread/items/list": CodexSchema.V2ThreadItemsListResponse,
"thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse,
"skills/list": CodexSchema.V2SkillsListResponse,
"skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse,
@@ -615,6 +712,7 @@ export const CLIENT_REQUEST_RESPONSES = {
"marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse,
"plugin/list": CodexSchema.V2PluginListResponse,
"plugin/installed": CodexSchema.V2PluginInstalledResponse,
+ "plugin/reconcile": CodexSchema.V2PluginReconcileResponse,
"plugin/read": CodexSchema.V2PluginReadResponse,
"plugin/skill/read": CodexSchema.V2PluginSkillReadResponse,
"plugin/share/save": CodexSchema.V2PluginShareSaveResponse,
@@ -642,6 +740,9 @@ export const CLIENT_REQUEST_RESPONSES = {
"turn/interrupt": CodexSchema.V2TurnInterruptResponse,
"review/start": CodexSchema.V2ReviewStartResponse,
"model/list": CodexSchema.V2ModelListResponse,
+ "account/gatewayOAuth/read": CodexSchema.V2GatewayOAuthReadResponse,
+ "account/gatewayOAuth/login": CodexSchema.V2GatewayOAuthLoginResponse,
+ "account/gatewayOAuth/cancel": CodexSchema.V2GatewayOAuthCancelResponse,
"modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse,
"experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse,
"permissionProfile/list": CodexSchema.V2PermissionProfileListResponse,
@@ -669,6 +770,8 @@ export const CLIENT_REQUEST_RESPONSES = {
"config/read": CodexSchema.V2ConfigReadResponse,
"externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectResponse,
"externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportResponse,
+ "externalAgentConfig/import/recordHistory":
+ CodexSchema.V2ExternalAgentConfigImportHistoryRecordResponse,
"externalAgentConfig/import/readHistories":
CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse,
"config/value/write": CodexSchema.V2ConfigWriteResponse,
@@ -719,10 +822,15 @@ export const SERVER_NOTIFICATION_PARAMS = {
"thread/deleted": CodexSchema.V2ThreadDeletedNotification,
"thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification,
"thread/closed": CodexSchema.V2ThreadClosedNotification,
+ "thread/reverted": CodexSchema.V2ThreadRevertedNotification,
"skills/changed": CodexSchema.V2SkillsChangedNotification,
"thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification,
+ "thread/attachment/updated": CodexSchema.V2ThreadAttachmentUpdatedNotification,
"thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification,
"thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification,
+ "thread/queue/changed": CodexSchema.V2ThreadQueueChangedNotification,
+ "project/changed": CodexSchema.V2ProjectChangedNotification,
+ "thread/project/updated": CodexSchema.V2ThreadProjectUpdatedNotification,
"thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification,
"thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification,
"thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification,
@@ -737,6 +845,7 @@ export const SERVER_NOTIFICATION_PARAMS = {
"item/autoApprovalReview/started": CodexSchema.V2ItemGuardianApprovalReviewStartedNotification,
"item/autoApprovalReview/completed":
CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification,
+ "autoApprovalReview/strictReviewRequired": CodexSchema.V2StrictReviewRequiredNotification,
"item/completed": CodexSchema.V2ItemCompletedNotification,
"rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification,
"rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification,
@@ -753,7 +862,9 @@ export const SERVER_NOTIFICATION_PARAMS = {
"item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification,
"mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification,
"mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification,
+ "mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification,
"account/updated": CodexSchema.V2AccountUpdatedNotification,
+ "account/gatewayOAuth/changed": CodexSchema.V2GatewayOAuthChangedNotification,
"account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification,
"app/list/updated": CodexSchema.V2AppListUpdatedNotification,
"remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification,
@@ -768,6 +879,8 @@ export const SERVER_NOTIFICATION_PARAMS = {
"thread/compacted": CodexSchema.V2ContextCompactedNotification,
"model/rerouted": CodexSchema.V2ModelReroutedNotification,
"model/verification": CodexSchema.V2ModelVerificationNotification,
+ "modelProvider/authRecoveryStarted": CodexSchema.V2AuthRecoveryNotification,
+ "modelProvider/authRecoveryCompleted": CodexSchema.V2AuthRecoveryNotification,
"turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification,
"model/safetyBuffering/updated": CodexSchema.V2ModelSafetyBufferingUpdatedNotification,
warning: CodexSchema.V2WarningNotification,
@@ -778,6 +891,10 @@ export const SERVER_NOTIFICATION_PARAMS = {
"fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification,
"thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification,
"thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification,
+ "thread/realtime/item/started": CodexSchema.V2ThreadRealtimeItemStartedNotification,
+ "thread/realtime/item/transcript/delta":
+ CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification,
+ "thread/realtime/item/completed": CodexSchema.V2ThreadRealtimeItemCompletedNotification,
"thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification,
"thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification,
"thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification,
diff --git a/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts b/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts
index 8665ad6f436d..47474330d286 100644
--- a/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts
+++ b/packages/effect-codex-app-server/src/_generated/namespaces.gen.ts
@@ -1,5 +1,5 @@
// This file is generated by the effect-codex-app-server package. Do not edit manually.
-// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461
+// Upstream protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
import * as CodexSchema from "./schema.gen.ts";
@@ -20,6 +20,7 @@ export const v2 = {
AppsListResponse: CodexSchema.V2AppsListResponse,
AppsReadParams: CodexSchema.V2AppsReadParams,
AppsReadResponse: CodexSchema.V2AppsReadResponse,
+ AuthRecoveryNotification: CodexSchema.V2AuthRecoveryNotification,
CancelLoginAccountParams: CodexSchema.V2CancelLoginAccountParams,
CancelLoginAccountResponse: CodexSchema.V2CancelLoginAccountResponse,
CommandExecOutputDeltaNotification: CodexSchema.V2CommandExecOutputDeltaNotification,
@@ -56,6 +57,10 @@ export const v2 = {
CodexSchema.V2ExternalAgentConfigImportCompletedNotification,
ExternalAgentConfigImportHistoriesReadResponse:
CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse,
+ ExternalAgentConfigImportHistoryRecordParams:
+ CodexSchema.V2ExternalAgentConfigImportHistoryRecordParams,
+ ExternalAgentConfigImportHistoryRecordResponse:
+ CodexSchema.V2ExternalAgentConfigImportHistoryRecordResponse,
ExternalAgentConfigImportParams: CodexSchema.V2ExternalAgentConfigImportParams,
ExternalAgentConfigImportProgressNotification:
CodexSchema.V2ExternalAgentConfigImportProgressNotification,
@@ -83,6 +88,10 @@ export const v2 = {
FsWatchResponse: CodexSchema.V2FsWatchResponse,
FsWriteFileParams: CodexSchema.V2FsWriteFileParams,
FsWriteFileResponse: CodexSchema.V2FsWriteFileResponse,
+ GatewayOAuthCancelResponse: CodexSchema.V2GatewayOAuthCancelResponse,
+ GatewayOAuthChangedNotification: CodexSchema.V2GatewayOAuthChangedNotification,
+ GatewayOAuthLoginResponse: CodexSchema.V2GatewayOAuthLoginResponse,
+ GatewayOAuthReadResponse: CodexSchema.V2GatewayOAuthReadResponse,
GetAccountParams: CodexSchema.V2GetAccountParams,
GetAccountRateLimitsResponse: CodexSchema.V2GetAccountRateLimitsResponse,
GetAccountResponse: CodexSchema.V2GetAccountResponse,
@@ -112,6 +121,7 @@ export const v2 = {
MarketplaceUpgradeResponse: CodexSchema.V2MarketplaceUpgradeResponse,
McpResourceReadParams: CodexSchema.V2McpResourceReadParams,
McpResourceReadResponse: CodexSchema.V2McpResourceReadResponse,
+ McpServerEventStreamNotification: CodexSchema.V2McpServerEventStreamNotification,
McpServerOauthLoginCompletedNotification: CodexSchema.V2McpServerOauthLoginCompletedNotification,
McpServerOauthLoginParams: CodexSchema.V2McpServerOauthLoginParams,
McpServerOauthLoginResponse: CodexSchema.V2McpServerOauthLoginResponse,
@@ -127,6 +137,8 @@ export const v2 = {
ModelReroutedNotification: CodexSchema.V2ModelReroutedNotification,
ModelSafetyBufferingUpdatedNotification: CodexSchema.V2ModelSafetyBufferingUpdatedNotification,
ModelVerificationNotification: CodexSchema.V2ModelVerificationNotification,
+ NullableGetAccountRateLimitsParams: CodexSchema.V2NullableGetAccountRateLimitsParams,
+ NullableGetAccountTokenUsageParams: CodexSchema.V2NullableGetAccountTokenUsageParams,
PermissionProfileListParams: CodexSchema.V2PermissionProfileListParams,
PermissionProfileListResponse: CodexSchema.V2PermissionProfileListResponse,
PlanDeltaNotification: CodexSchema.V2PlanDeltaNotification,
@@ -138,6 +150,8 @@ export const v2 = {
PluginListResponse: CodexSchema.V2PluginListResponse,
PluginReadParams: CodexSchema.V2PluginReadParams,
PluginReadResponse: CodexSchema.V2PluginReadResponse,
+ PluginReconcileParams: CodexSchema.V2PluginReconcileParams,
+ PluginReconcileResponse: CodexSchema.V2PluginReconcileResponse,
PluginShareCheckoutParams: CodexSchema.V2PluginShareCheckoutParams,
PluginShareCheckoutResponse: CodexSchema.V2PluginShareCheckoutResponse,
PluginShareDeleteParams: CodexSchema.V2PluginShareDeleteParams,
@@ -154,6 +168,7 @@ export const v2 = {
PluginUninstallResponse: CodexSchema.V2PluginUninstallResponse,
ProcessExitedNotification: CodexSchema.V2ProcessExitedNotification,
ProcessOutputDeltaNotification: CodexSchema.V2ProcessOutputDeltaNotification,
+ ProjectChangedNotification: CodexSchema.V2ProjectChangedNotification,
RawResponseCompletedNotification: CodexSchema.V2RawResponseCompletedNotification,
RawResponseItemCompletedNotification: CodexSchema.V2RawResponseItemCompletedNotification,
ReasoningSummaryPartAddedNotification: CodexSchema.V2ReasoningSummaryPartAddedNotification,
@@ -172,6 +187,7 @@ export const v2 = {
SkillsExtraRootsSetResponse: CodexSchema.V2SkillsExtraRootsSetResponse,
SkillsListParams: CodexSchema.V2SkillsListParams,
SkillsListResponse: CodexSchema.V2SkillsListResponse,
+ StrictReviewRequiredNotification: CodexSchema.V2StrictReviewRequiredNotification,
TerminalInteractionNotification: CodexSchema.V2TerminalInteractionNotification,
ThreadApproveGuardianDeniedActionParams: CodexSchema.V2ThreadApproveGuardianDeniedActionParams,
ThreadApproveGuardianDeniedActionResponse:
@@ -179,6 +195,13 @@ export const v2 = {
ThreadArchivedNotification: CodexSchema.V2ThreadArchivedNotification,
ThreadArchiveParams: CodexSchema.V2ThreadArchiveParams,
ThreadArchiveResponse: CodexSchema.V2ThreadArchiveResponse,
+ ThreadAttachmentAddParams: CodexSchema.V2ThreadAttachmentAddParams,
+ ThreadAttachmentAddResponse: CodexSchema.V2ThreadAttachmentAddResponse,
+ ThreadAttachmentListParams: CodexSchema.V2ThreadAttachmentListParams,
+ ThreadAttachmentListResponse: CodexSchema.V2ThreadAttachmentListResponse,
+ ThreadAttachmentRemoveParams: CodexSchema.V2ThreadAttachmentRemoveParams,
+ ThreadAttachmentRemoveResponse: CodexSchema.V2ThreadAttachmentRemoveResponse,
+ ThreadAttachmentUpdatedNotification: CodexSchema.V2ThreadAttachmentUpdatedNotification,
ThreadClosedNotification: CodexSchema.V2ThreadClosedNotification,
ThreadCompactStartParams: CodexSchema.V2ThreadCompactStartParams,
ThreadCompactStartResponse: CodexSchema.V2ThreadCompactStartResponse,
@@ -197,6 +220,8 @@ export const v2 = {
ThreadGoalUpdatedNotification: CodexSchema.V2ThreadGoalUpdatedNotification,
ThreadInjectItemsParams: CodexSchema.V2ThreadInjectItemsParams,
ThreadInjectItemsResponse: CodexSchema.V2ThreadInjectItemsResponse,
+ ThreadItemsListParams: CodexSchema.V2ThreadItemsListParams,
+ ThreadItemsListResponse: CodexSchema.V2ThreadItemsListResponse,
ThreadListParams: CodexSchema.V2ThreadListParams,
ThreadListResponse: CodexSchema.V2ThreadListResponse,
ThreadLoadedListParams: CodexSchema.V2ThreadLoadedListParams,
@@ -204,11 +229,17 @@ export const v2 = {
ThreadMetadataUpdateParams: CodexSchema.V2ThreadMetadataUpdateParams,
ThreadMetadataUpdateResponse: CodexSchema.V2ThreadMetadataUpdateResponse,
ThreadNameUpdatedNotification: CodexSchema.V2ThreadNameUpdatedNotification,
+ ThreadProjectUpdatedNotification: CodexSchema.V2ThreadProjectUpdatedNotification,
+ ThreadQueueChangedNotification: CodexSchema.V2ThreadQueueChangedNotification,
ThreadReadParams: CodexSchema.V2ThreadReadParams,
ThreadReadResponse: CodexSchema.V2ThreadReadResponse,
ThreadRealtimeClosedNotification: CodexSchema.V2ThreadRealtimeClosedNotification,
ThreadRealtimeErrorNotification: CodexSchema.V2ThreadRealtimeErrorNotification,
ThreadRealtimeItemAddedNotification: CodexSchema.V2ThreadRealtimeItemAddedNotification,
+ ThreadRealtimeItemCompletedNotification: CodexSchema.V2ThreadRealtimeItemCompletedNotification,
+ ThreadRealtimeItemStartedNotification: CodexSchema.V2ThreadRealtimeItemStartedNotification,
+ ThreadRealtimeItemTranscriptDeltaNotification:
+ CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification,
ThreadRealtimeOutputAudioDeltaNotification:
CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification,
ThreadRealtimeSdpNotification: CodexSchema.V2ThreadRealtimeSdpNotification,
@@ -218,8 +249,19 @@ export const v2 = {
ThreadRealtimeTranscriptDoneNotification: CodexSchema.V2ThreadRealtimeTranscriptDoneNotification,
ThreadResumeParams: CodexSchema.V2ThreadResumeParams,
ThreadResumeResponse: CodexSchema.V2ThreadResumeResponse,
- ThreadRollbackParams: CodexSchema.V2ThreadRollbackParams,
- ThreadRollbackResponse: CodexSchema.V2ThreadRollbackResponse,
+ ThreadRevertedNotification: CodexSchema.V2ThreadRevertedNotification,
+ ThreadRevertParams: CodexSchema.V2ThreadRevertParams,
+ ThreadRevertResponse: CodexSchema.V2ThreadRevertResponse,
+ ThreadSectionCreateParams: CodexSchema.V2ThreadSectionCreateParams,
+ ThreadSectionCreateResponse: CodexSchema.V2ThreadSectionCreateResponse,
+ ThreadSectionDeleteParams: CodexSchema.V2ThreadSectionDeleteParams,
+ ThreadSectionDeleteResponse: CodexSchema.V2ThreadSectionDeleteResponse,
+ ThreadSectionListParams: CodexSchema.V2ThreadSectionListParams,
+ ThreadSectionListResponse: CodexSchema.V2ThreadSectionListResponse,
+ ThreadSectionMoveParams: CodexSchema.V2ThreadSectionMoveParams,
+ ThreadSectionMoveResponse: CodexSchema.V2ThreadSectionMoveResponse,
+ ThreadSectionUpdateParams: CodexSchema.V2ThreadSectionUpdateParams,
+ ThreadSectionUpdateResponse: CodexSchema.V2ThreadSectionUpdateResponse,
ThreadSetNameParams: CodexSchema.V2ThreadSetNameParams,
ThreadSetNameResponse: CodexSchema.V2ThreadSetNameResponse,
ThreadSettingsUpdatedNotification: CodexSchema.V2ThreadSettingsUpdatedNotification,
@@ -230,6 +272,8 @@ export const v2 = {
ThreadStartResponse: CodexSchema.V2ThreadStartResponse,
ThreadStatusChangedNotification: CodexSchema.V2ThreadStatusChangedNotification,
ThreadTokenUsageUpdatedNotification: CodexSchema.V2ThreadTokenUsageUpdatedNotification,
+ ThreadTurnsListParams: CodexSchema.V2ThreadTurnsListParams,
+ ThreadTurnsListResponse: CodexSchema.V2ThreadTurnsListResponse,
ThreadUnarchivedNotification: CodexSchema.V2ThreadUnarchivedNotification,
ThreadUnarchiveParams: CodexSchema.V2ThreadUnarchiveParams,
ThreadUnarchiveResponse: CodexSchema.V2ThreadUnarchiveResponse,
diff --git a/packages/effect-codex-app-server/src/_generated/schema.gen.ts b/packages/effect-codex-app-server/src/_generated/schema.gen.ts
index f4b186147705..38b46712257a 100644
--- a/packages/effect-codex-app-server/src/_generated/schema.gen.ts
+++ b/packages/effect-codex-app-server/src/_generated/schema.gen.ts
@@ -1,8 +1,13 @@
// This file is generated by the effect-codex-app-server package. Do not edit manually.
-// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461
+// Upstream protocol ref: 687a119f0fcaace47e1f1abcc77cec6c813fd6da
import * as Schema from "effect/Schema";
+export type ApplyPatchApprovalParams__ThreadId = string;
+export const ApplyPatchApprovalParams__ThreadId = Schema.String.annotate({
+ identifier: "ApplyPatchApprovalParams__ThreadId",
+});
+
export type ApplyPatchApprovalParams__FileChange =
| { readonly content: string; readonly type: "add" }
| { readonly content: string; readonly type: "delete" }
@@ -24,143 +29,97 @@ export const ApplyPatchApprovalParams__FileChange = Schema.Union(
}).annotate({ title: "UpdateFileChange" }),
],
{ mode: "oneOf" },
-);
-
-export type ApplyPatchApprovalParams__ThreadId = string;
-export const ApplyPatchApprovalParams__ThreadId = Schema.String;
+).annotate({ identifier: "ApplyPatchApprovalParams__FileChange" });
export type ApplyPatchApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
export const ApplyPatchApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
"allow",
"deny",
-]);
+]).annotate({ identifier: "ApplyPatchApprovalResponse__NetworkPolicyRuleAction" });
export type ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = "unauthorized";
-export const ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason =
- Schema.Literal("unauthorized");
-
-export type ClientRequest__AbsolutePathBuf = string;
-export const ClientRequest__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
-
-export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit";
-export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals(["credits", "usage_limit"]);
-
-export type ClientRequest__AdditionalContextKind = "untrusted" | "application";
-export const ClientRequest__AdditionalContextKind = Schema.Literals(["untrusted", "application"]);
-
-export type ClientRequest__AgentMessageInputContent =
- | { readonly text: string; readonly type: "input_text" }
- | { readonly encrypted_content: string; readonly type: "encrypted_content" };
-export const ClientRequest__AgentMessageInputContent = Schema.Union(
+export const ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = Schema.Union(
[
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("input_text").annotate({
- title: "InputTextAgentMessageInputContentType",
- }),
- }).annotate({ title: "InputTextAgentMessageInputContent" }),
- Schema.Struct({
- encrypted_content: Schema.String,
- type: Schema.Literal("encrypted_content").annotate({
- title: "EncryptedContentAgentMessageInputContentType",
- }),
- }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
+ Schema.Literal("unauthorized").annotate({
+ description: "Codex attempted a backend request and received `401 Unauthorized`.",
+ }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason" });
-export type ClientRequest__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
-export const ClientRequest__ApprovalsReviewer = Schema.Literals([
- "user",
- "auto_review",
- "guardian_subagent",
-]).annotate({
- description:
- "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
-});
+export type ClientRequest__RequestId = string | number;
+export const ClientRequest__RequestId = Schema.Union([
+ Schema.String,
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+]).annotate({ identifier: "ClientRequest__RequestId" });
-export type ClientRequest__AppsInstalledParams = {
- readonly forceRefresh?: boolean;
- readonly threadId?: string | null;
+export type ClientRequest__InitializeCapabilities = {
+ readonly experimentalApi?: boolean;
+ readonly explicitGatewayOauth?: boolean;
+ readonly extensions?: { readonly [x: string]: Schema.Json } | null;
+ readonly mcpServerOpenaiFormElicitation?: boolean;
+ readonly optOutNotificationMethods?: ReadonlyArray | null;
+ readonly requestAttestation?: boolean;
};
-export const ClientRequest__AppsInstalledParams = Schema.Struct({
- forceRefresh: Schema.optionalKey(
+export const ClientRequest__InitializeCapabilities = Schema.Struct({
+ experimentalApi: Schema.optionalKey(
Schema.Boolean.annotate({
- description:
- "When true and Apps are permitted, refresh and publish the hosted connector runtime tool snapshot first.",
+ description: "Opt into receiving experimental API methods and fields.",
+ default: false,
}),
),
- threadId: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional loaded thread id used to evaluate effective app configuration.",
- }),
- Schema.Null,
- ]),
+ explicitGatewayOauth: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.",
+ }),
),
-}).annotate({ description: "Read the committed installed connector runtime snapshot." });
-
-export type ClientRequest__AppsListParams = {
- readonly cursor?: string | null;
- readonly forceRefetch?: boolean;
- readonly limit?: number | null;
- readonly threadId?: string | null;
-};
-export const ClientRequest__AppsListParams = Schema.Struct({
- cursor: Schema.optionalKey(
+ extensions: Schema.optionalKey(
Schema.Union([
- Schema.String.annotate({
- description: "Opaque pagination cursor returned by a previous call.",
+ Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })).annotate({
+ description: "MCP extension settings declared by the app-server client.",
}),
Schema.Null,
]),
),
- forceRefetch: Schema.optionalKey(
+ mcpServerOpenaiFormElicitation: Schema.optionalKey(
Schema.Boolean.annotate({
- description: "When true, bypass app caches and fetch the latest data from sources.",
+ description:
+ "Legacy opt-in for the `openai/form` MCP extension.\n\nNew clients should declare `openai/form` in [`Self::extensions`].",
}),
),
- limit: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({
- description: "Optional page size; defaults to a reasonable server-side value.",
- format: "uint32",
- })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- threadId: Schema.optionalKey(
+ optOutNotificationMethods: Schema.optionalKey(
Schema.Union([
- Schema.String.annotate({
+ Schema.Array(Schema.String).annotate({
description:
- "Optional thread id used to evaluate app feature gating from that thread's config.",
+ "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
}),
Schema.Null,
]),
),
-}).annotate({ description: "EXPERIMENTAL - list available apps/connectors." });
-
-export type ClientRequest__AppsReadParams = {
- readonly appIds: ReadonlyArray;
- readonly includeTools?: boolean;
-};
-export const ClientRequest__AppsReadParams = Schema.Struct({
- appIds: Schema.Array(Schema.String).annotate({
- description:
- "App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while preserving their first-request order.",
- }),
- includeTools: Schema.optionalKey(
+ requestAttestation: Schema.optionalKey(
Schema.Boolean.annotate({
- description:
- "When true, include display-only public tool summaries in the returned metadata.",
+ description: "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
+ default: false,
}),
),
-}).annotate({ description: "EXPERIMENTAL - read metadata for specific apps/connectors." });
+}).annotate({
+ description: "Client-declared capabilities negotiated during initialize.",
+ identifier: "ClientRequest__InitializeCapabilities",
+});
+
+export type ClientRequest__ClientInfo = {
+ readonly name: string;
+ readonly title?: string | null;
+ readonly version: string;
+};
+export const ClientRequest__ClientInfo = Schema.Struct({
+ name: Schema.String,
+ title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ version: Schema.String,
+}).annotate({ identifier: "ClientRequest__ClientInfo" });
export type ClientRequest__AskForApproval =
| "untrusted"
@@ -189,182 +148,326 @@ export const ClientRequest__AskForApproval = Schema.Union(
}).annotate({ title: "GranularAskForApproval" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "ClientRequest__AskForApproval" });
-export type ClientRequest__CancelLoginAccountParams = { readonly loginId: string };
-export const ClientRequest__CancelLoginAccountParams = Schema.Struct({ loginId: Schema.String });
+export type ClientRequest__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
+export const ClientRequest__ApprovalsReviewer = Schema.Literals([
+ "user",
+ "auto_review",
+ "guardian_subagent",
+]).annotate({
+ description:
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ identifier: "ClientRequest__ApprovalsReviewer",
+});
-export type ClientRequest__ClientInfo = {
+export type ClientRequest__Personality = "none" | "friendly" | "pragmatic";
+export const ClientRequest__Personality = Schema.Literals([
+ "none",
+ "friendly",
+ "pragmatic",
+]).annotate({
+ description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
+ identifier: "ClientRequest__Personality",
+});
+
+export type ClientRequest__SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
+export const ClientRequest__SandboxMode = Schema.Literals([
+ "read-only",
+ "workspace-write",
+ "danger-full-access",
+]).annotate({ identifier: "ClientRequest__SandboxMode" });
+
+export type ClientRequest__ThreadStartSource = "startup" | "clear";
+export const ClientRequest__ThreadStartSource = Schema.Literals(["startup", "clear"]).annotate({
+ identifier: "ClientRequest__ThreadStartSource",
+});
+
+export type ClientRequest__ThreadSource = string;
+export const ClientRequest__ThreadSource = Schema.String.annotate({
+ identifier: "ClientRequest__ThreadSource",
+});
+
+export type ClientRequest__ThreadArchiveParams = { readonly threadId: string };
+export const ClientRequest__ThreadArchiveParams = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadArchiveParams" });
+
+export type ClientRequest__ThreadDeleteParams = { readonly threadId: string };
+export const ClientRequest__ThreadDeleteParams = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadDeleteParams" });
+
+export type ClientRequest__ThreadUnsubscribeParams = { readonly threadId: string };
+export const ClientRequest__ThreadUnsubscribeParams = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadUnsubscribeParams" });
+
+export type ClientRequest__ThreadSetNameParams = {
readonly name: string;
- readonly title?: string | null;
- readonly version: string;
+ readonly threadId: string;
};
-export const ClientRequest__ClientInfo = Schema.Struct({
+export const ClientRequest__ThreadSetNameParams = Schema.Struct({
name: Schema.String,
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- version: Schema.String,
-});
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadSetNameParams" });
-export type ClientRequest__CommandExecResizeParams = {
- readonly processId: string;
- readonly size: { readonly cols: number; readonly rows: number };
-};
-export const ClientRequest__CommandExecResizeParams = Schema.Struct({
- processId: Schema.String.annotate({
- description:
- "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
- }),
- size: Schema.Struct({
- cols: Schema.Number.annotate({
- description: "Terminal width in character cells.",
- format: "uint16",
- })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- rows: Schema.Number.annotate({
- description: "Terminal height in character cells.",
- format: "uint16",
- })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." }),
-}).annotate({ description: "Resize a running PTY-backed `command/exec` session." });
+export type ClientRequest__ThreadGoalStatus =
+ | "active"
+ | "paused"
+ | "blocked"
+ | "usageLimited"
+ | "budgetLimited"
+ | "complete";
+export const ClientRequest__ThreadGoalStatus = Schema.Literals([
+ "active",
+ "paused",
+ "blocked",
+ "usageLimited",
+ "budgetLimited",
+ "complete",
+]).annotate({ identifier: "ClientRequest__ThreadGoalStatus" });
-export type ClientRequest__CommandExecTerminalSize = {
- readonly cols: number;
- readonly rows: number;
-};
-export const ClientRequest__CommandExecTerminalSize = Schema.Struct({
- cols: Schema.Number.annotate({
- description: "Terminal width in character cells.",
- format: "uint16",
- })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- rows: Schema.Number.annotate({
- description: "Terminal height in character cells.",
- format: "uint16",
- })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
-}).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." });
+export type ClientRequest__ThreadGoalGetParams = { readonly threadId: string };
+export const ClientRequest__ThreadGoalGetParams = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadGoalGetParams" });
-export type ClientRequest__CommandExecTerminateParams = { readonly processId: string };
-export const ClientRequest__CommandExecTerminateParams = Schema.Struct({
- processId: Schema.String.annotate({
- description:
- "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
- }),
-}).annotate({ description: "Terminate a running `command/exec` session." });
+export type ClientRequest__ThreadGoalClearParams = { readonly threadId: string };
+export const ClientRequest__ThreadGoalClearParams = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadGoalClearParams" });
-export type ClientRequest__CommandExecWriteParams = {
- readonly closeStdin?: boolean;
- readonly deltaBase64?: string | null;
- readonly processId: string;
+export type ClientRequest__ThreadMetadataGitInfoUpdateParams = {
+ readonly branch?: string | null;
+ readonly originUrl?: string | null;
+ readonly sha?: string | null;
};
-export const ClientRequest__CommandExecWriteParams = Schema.Struct({
- closeStdin: Schema.optionalKey(
- Schema.Boolean.annotate({
- description: "Close stdin after writing `deltaBase64`, if present.",
- }),
+export const ClientRequest__ThreadMetadataGitInfoUpdateParams = Schema.Struct({
+ branch: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
+ }),
+ Schema.Null,
+ ]),
),
- deltaBase64: Schema.optionalKey(
+ originUrl: Schema.optionalKey(
Schema.Union([
- Schema.String.annotate({ description: "Optional base64-encoded stdin bytes to write." }),
+ Schema.String.annotate({
+ description:
+ "Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
+ }),
Schema.Null,
]),
),
- processId: Schema.String.annotate({
- description:
- "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
- }),
+ sha: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "ClientRequest__ThreadMetadataGitInfoUpdateParams" });
+
+export type ClientRequest__ThreadAttachmentAddParams = {
+ readonly attachmentType: string;
+ readonly identityKey: string;
+ readonly payload: Schema.Json;
+ readonly threadId: string;
+};
+export const ClientRequest__ThreadAttachmentAddParams = Schema.Struct({
+ attachmentType: Schema.String,
+ identityKey: Schema.String,
+ payload: Schema.Json.annotate({ expected: "JSON value" }),
+ threadId: Schema.String,
}).annotate({
- description: "Write stdin bytes to a running `command/exec` session, close stdin, or both.",
+ description: "Parameters for creating or locating an attachment on its owning thread.",
+ identifier: "ClientRequest__ThreadAttachmentAddParams",
});
-export type ClientRequest__CommandMigration = { readonly name: string };
-export const ClientRequest__CommandMigration = Schema.Struct({ name: Schema.String });
-
-export type ClientRequest__ConfigReadParams = {
- readonly cwd?: string | null;
- readonly includeLayers?: boolean;
+export type ClientRequest__ThreadAttachmentListParams = {
+ readonly cursor?: string | null;
+ readonly limit?: number | null;
+ readonly threadId: string;
};
-export const ClientRequest__ConfigReadParams = Schema.Struct({
- cwd: Schema.optionalKey(
+export const ClientRequest__ThreadAttachmentListParams = Schema.Struct({
+ cursor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ limit: Schema.optionalKey(
Schema.Union([
- Schema.String.annotate({
- description:
- "Optional working directory to resolve project config layers. If specified, return the effective config as seen from that directory (i.e., including any project layers between `cwd` and the project/repo root).",
- }),
+ Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
Schema.Null,
]),
),
- includeLayers: Schema.optionalKey(Schema.Boolean),
+ threadId: Schema.String,
+}).annotate({
+ description: "Parameters for listing attachments from one thread.",
+ identifier: "ClientRequest__ThreadAttachmentListParams",
});
-export type ClientRequest__ConsumeAccountRateLimitResetCreditParams = {
- readonly creditId?: string | null;
- readonly idempotencyKey: string;
+export type ClientRequest__ThreadAttachmentRemoveParams = {
+ readonly attachmentType: string;
+ readonly identityKey: string;
+ readonly threadId: string;
};
-export const ClientRequest__ConsumeAccountRateLimitResetCreditParams = Schema.Struct({
- creditId: Schema.optionalKey(
+export const ClientRequest__ThreadAttachmentRemoveParams = Schema.Struct({
+ attachmentType: Schema.String,
+ identityKey: Schema.String,
+ threadId: Schema.String,
+}).annotate({
+ description: "Parameters for deleting an attachment by its stable thread-local identity.",
+ identifier: "ClientRequest__ThreadAttachmentRemoveParams",
+});
+
+export type ClientRequest__ThreadSectionMoveParams = {
+ readonly beforeThreadId?: string | null;
+ readonly sectionId: string | null;
+ readonly threadId: string;
+};
+export const ClientRequest__ThreadSectionMoveParams = Schema.Struct({
+ beforeThreadId: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
- description:
- "Opaque reset-credit identifier to redeem. When omitted, the backend selects the next available credit.",
+ description: "Existing thread to insert before; omission or null appends to the section.",
}),
Schema.Null,
]),
),
- idempotencyKey: Schema.String.annotate({
- description:
- "Identifies one logical reset attempt. A UUID is recommended; reuse the same value when retrying that attempt.",
+ sectionId: Schema.Union([
+ Schema.String.annotate({
+ description: "Destination section, or `null` to remove the thread from its section.",
+ }),
+ Schema.Null,
+ ]),
+ threadId: Schema.String.annotate({
+ description: "Thread to move into, within, or out of a section.",
}),
+}).annotate({
+ description: "Parameters for moving a thread within a server-owned section ordering.",
+ identifier: "ClientRequest__ThreadSectionMoveParams",
});
-export type ClientRequest__ConversationTextRole = "user" | "developer" | "assistant";
-export const ClientRequest__ConversationTextRole = Schema.Literals([
- "user",
- "developer",
- "assistant",
-]);
+export type ClientRequest__ThreadUnarchiveParams = { readonly threadId: string };
+export const ClientRequest__ThreadUnarchiveParams = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadUnarchiveParams" });
-export type ClientRequest__DynamicToolNamespaceTool = {
- readonly deferLoading?: boolean;
- readonly description: string;
- readonly inputSchema: unknown;
- readonly name: string;
- readonly type: "function";
-};
-export const ClientRequest__DynamicToolNamespaceTool = Schema.Union(
- [
- Schema.Struct({
- deferLoading: Schema.optionalKey(Schema.Boolean),
- description: Schema.String,
- inputSchema: Schema.Unknown,
- name: Schema.String,
- type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolNamespaceToolType" }),
- }).annotate({ title: "FunctionDynamicToolNamespaceTool" }),
- ],
- { mode: "oneOf" },
-);
+export type ClientRequest__ThreadCompactStartParams = { readonly threadId: string };
+export const ClientRequest__ThreadCompactStartParams = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadCompactStartParams" });
-export type ClientRequest__ExperimentalFeatureEnablementSetParams = {
- readonly enablement: { readonly [x: string]: boolean };
+export type ClientRequest__ThreadShellCommandParams = {
+ readonly command: string;
+ readonly threadId: string;
+ readonly timeoutMs?: number | null;
};
-export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Struct({
- enablement: Schema.Record(Schema.String, Schema.Boolean).annotate({
+export const ClientRequest__ThreadShellCommandParams = Schema.Struct({
+ command: Schema.String.annotate({
description:
- "Process-wide runtime feature enablement keyed by canonical feature name.\n\nOnly named features are updated. Omitted features are left unchanged. Send an empty map for a no-op.",
+ "Shell command string evaluated by the thread's configured shell. Unlike `command/exec`, this intentionally preserves shell syntax such as pipes, redirects, and quoting. This runs unsandboxed with full access rather than inheriting the thread sandbox policy.",
+ }),
+ threadId: Schema.String,
+ timeoutMs: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({
+ description:
+ "Maximum execution time in milliseconds. Defaults to one hour when omitted or null. Must be non-negative; zero requests an immediate timeout, not unlimited execution. Does not affect the immediate RPC acknowledgement.",
+ format: "int64",
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "ClientRequest__ThreadShellCommandParams" });
+
+export type ClientRequest__ThreadApproveGuardianDeniedActionParams = {
+ readonly event: Schema.Json;
+ readonly threadId: string;
+};
+export const ClientRequest__ThreadApproveGuardianDeniedActionParams = Schema.Struct({
+ event: Schema.Json.annotate({
+ expected: "JSON value",
+ description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.",
+ }),
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadApproveGuardianDeniedActionParams" });
+
+export type ClientRequest__ThreadRevertParams = {
+ readonly beforeTurnId: string;
+ readonly threadId: string;
+};
+export const ClientRequest__ThreadRevertParams = Schema.Struct({
+ beforeTurnId: Schema.String.annotate({
+ description: "Turn excluded from the replacement history, together with every later turn.",
}),
+ threadId: Schema.String,
+}).annotate({
+ description:
+ "Replace a paginated thread's durable history with the prefix before one turn.\n\nThis only changes persisted conversation history. It does not revert local file changes.",
+ identifier: "ClientRequest__ThreadRevertParams",
});
-export type ClientRequest__ExperimentalFeatureListParams = {
+export type ClientRequest__ThreadListCwdFilter = string | ReadonlyArray;
+export const ClientRequest__ThreadListCwdFilter = Schema.Union([
+ Schema.String,
+ Schema.Array(Schema.String),
+]).annotate({ identifier: "ClientRequest__ThreadListCwdFilter" });
+
+export type ClientRequest__SortDirection = "asc" | "desc";
+export const ClientRequest__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
+ identifier: "ClientRequest__SortDirection",
+});
+
+export type ClientRequest__ThreadSortKey =
+ | "created_at"
+ | "updated_at"
+ | "recency_at"
+ | "section_position";
+export const ClientRequest__ThreadSortKey = Schema.Literals([
+ "created_at",
+ "updated_at",
+ "recency_at",
+ "section_position",
+]).annotate({ identifier: "ClientRequest__ThreadSortKey" });
+
+export type ClientRequest__ThreadSourceKind =
+ | "cli"
+ | "vscode"
+ | "exec"
+ | "appServer"
+ | "subAgent"
+ | "subAgentReview"
+ | "subAgentCompact"
+ | "subAgentThreadSpawn"
+ | "subAgentOther"
+ | "unknown";
+export const ClientRequest__ThreadSourceKind = Schema.Literals([
+ "cli",
+ "vscode",
+ "exec",
+ "appServer",
+ "subAgent",
+ "subAgentReview",
+ "subAgentCompact",
+ "subAgentThreadSpawn",
+ "subAgentOther",
+ "unknown",
+]).annotate({ identifier: "ClientRequest__ThreadSourceKind" });
+
+export type ClientRequest__ThreadSectionListParams = {
readonly cursor?: string | null;
readonly limit?: number | null;
- readonly threadId?: string | null;
};
-export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
+export const ClientRequest__ThreadSectionListParams = Schema.Struct({
cursor: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
@@ -376,253 +479,157 @@ export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
limit: Schema.optionalKey(
Schema.Union([
Schema.Number.annotate({
- description: "Optional page size; defaults to a reasonable server-side value.",
+ description: "Maximum number of sections to return.",
format: "uint32",
})
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- threadId: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Optional loaded thread id. Pass this when showing feature state for an existing thread so enablement is computed from that thread's refreshed config, including project-local config for the thread's cwd.",
- }),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
Schema.Null,
]),
),
+}).annotate({
+ description: "Parameters for listing independently persisted thread sections.",
+ identifier: "ClientRequest__ThreadSectionListParams",
});
-export type ClientRequest__ExternalAgentConfigDetectParams = {
- readonly cwds?: ReadonlyArray | null;
- readonly includeHome?: boolean;
- readonly migrationSource?: string | null;
- readonly source?: string | null;
+export type ClientRequest__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({
- cwds: Schema.optionalKey(
- Schema.Union([
- Schema.Array(Schema.String).annotate({
- description: "Zero or more working directories to include for repo-scoped detection.",
- }),
- Schema.Null,
- ]),
- ),
- includeHome: Schema.optionalKey(
- Schema.Boolean.annotate({
- description: "If true, include detection under the user's home directory.",
- }),
- ),
- migrationSource: Schema.optionalKey(
+export const ClientRequest__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "ClientRequest__ThreadSectionAppearance",
+});
+
+export type ClientRequest__ThreadSectionDeleteParams = { readonly sectionId: string };
+export const ClientRequest__ThreadSectionDeleteParams = Schema.Struct({
+ sectionId: Schema.String.annotate({
+ description: "The stable, server-generated identity of the section to delete.",
+ }),
+}).annotate({
+ description: "Parameters for deleting an independently persisted thread section.",
+ identifier: "ClientRequest__ThreadSectionDeleteParams",
+});
+
+export type ClientRequest__ThreadLoadedListParams = {
+ readonly cursor?: string | null;
+ readonly limit?: number | null;
+};
+export const ClientRequest__ThreadLoadedListParams = Schema.Struct({
+ cursor: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
- description:
- "Optional migration-source selector. Missing or unrecognized values use the default source.",
+ description: "Opaque pagination cursor returned by a previous call.",
}),
Schema.Null,
]),
),
- source: Schema.optionalKey(
+ limit: Schema.optionalKey(
Schema.Union([
- Schema.String.annotate({
- description:
- "Deprecated field retained for compatibility. This field is ignored; use `migrationSource` to select the migration source.",
- }),
+ Schema.Number.annotate({
+ description: "Optional page size; defaults to no limit.",
+ format: "uint32",
+ })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
Schema.Null,
]),
),
+}).annotate({ identifier: "ClientRequest__ThreadLoadedListParams" });
+
+export type ClientRequest__ThreadReadParams = {
+ readonly includeTurns?: boolean;
+ readonly threadId: string;
+};
+export const ClientRequest__ThreadReadParams = Schema.Struct({
+ includeTurns: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "When true, include turns and their items from rollout history. Full-history hydration is deprecated for paginated threads; prefer a metadata-only read and page with `thread/turns/list` and `thread/items/list`.",
+ }),
+ ),
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadReadParams" });
+
+export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full";
+export const ClientRequest__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ClientRequest__TurnItemsView" });
+
+export type ClientRequest__ThreadItemsListAnchor = {
+ readonly itemId: string;
+ readonly type: "item";
+};
+export const ClientRequest__ThreadItemsListAnchor = Schema.Union(
+ [
+ Schema.Struct({
+ itemId: Schema.String,
+ type: Schema.Literal("item").annotate({ title: "ItemThreadItemsListAnchorType" }),
+ }).annotate({ title: "ItemThreadItemsListAnchor" }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "An exclusive item position within the requested visible turn.",
+ identifier: "ClientRequest__ThreadItemsListAnchor",
});
-export type ClientRequest__ExternalAgentConfigMigrationItemType =
- | "AGENTS_MD"
- | "CONFIG"
- | "SKILLS"
- | "PLUGINS"
- | "MCP_SERVER_CONFIG"
- | "SUBAGENTS"
- | "HOOKS"
- | "COMMANDS"
- | "MEMORY"
- | "SESSIONS";
-export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([
- "AGENTS_MD",
- "CONFIG",
- "SKILLS",
- "PLUGINS",
- "MCP_SERVER_CONFIG",
- "SUBAGENTS",
- "HOOKS",
- "COMMANDS",
- "MEMORY",
- "SESSIONS",
-]);
-
-export type ClientRequest__FeedbackUploadParams = {
- readonly classification: string;
- readonly extraLogFiles?: ReadonlyArray | null;
- readonly includeLogs?: boolean;
- readonly reason?: string | null;
- readonly tags?: { readonly [x: string]: string } | null;
- readonly threadId?: string | null;
-};
-export const ClientRequest__FeedbackUploadParams = Schema.Struct({
- classification: Schema.String,
- extraLogFiles: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- includeLogs: Schema.optionalKey(Schema.Boolean),
- reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- tags: Schema.optionalKey(
- Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
- ),
- threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type ClientRequest__FsCopyParams = {
- readonly destinationPath: string;
- readonly recursive?: boolean;
- readonly sourcePath: string;
-};
-export const ClientRequest__FsCopyParams = Schema.Struct({
- destinationPath: Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
- }),
- recursive: Schema.optionalKey(
- Schema.Boolean.annotate({
- description: "Required for directory copies; ignored for file copies.",
- }),
- ),
- sourcePath: Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
- }),
-}).annotate({ description: "Copy a file or directory tree on the host filesystem." });
-
-export type ClientRequest__FsCreateDirectoryParams = {
- readonly path: string;
- readonly recursive?: boolean | null;
+export type ClientRequest__ThreadInjectItemsParams = {
+ readonly items: ReadonlyArray;
+ readonly threadId: string;
};
-export const ClientRequest__FsCreateDirectoryParams = Schema.Struct({
- path: Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
- }),
- recursive: Schema.optionalKey(
- Schema.Union([
- Schema.Boolean.annotate({
- description: "Whether parent directories should also be created. Defaults to `true`.",
- }),
- Schema.Null,
- ]),
- ),
-}).annotate({ description: "Create a directory on the host filesystem." });
-
-export type ClientRequest__FsGetMetadataParams = { readonly path: string };
-export const ClientRequest__FsGetMetadataParams = Schema.Struct({
- path: Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
- }),
-}).annotate({ description: "Request metadata for an absolute path." });
-
-export type ClientRequest__FsReadDirectoryParams = { readonly path: string };
-export const ClientRequest__FsReadDirectoryParams = Schema.Struct({
- path: Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
- }),
-}).annotate({ description: "List direct child names for a directory." });
-
-export type ClientRequest__FsReadFileParams = { readonly path: string };
-export const ClientRequest__FsReadFileParams = Schema.Struct({
- path: Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+export const ClientRequest__ThreadInjectItemsParams = Schema.Struct({
+ items: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
+ description: "Raw Responses API items to append to the thread's model-visible history.",
}),
-}).annotate({ description: "Read a file from the host filesystem." });
+ threadId: Schema.String,
+}).annotate({ identifier: "ClientRequest__ThreadInjectItemsParams" });
-export type ClientRequest__FsRemoveParams = {
- readonly force?: boolean | null;
- readonly path: string;
- readonly recursive?: boolean | null;
+export type ClientRequest__SkillsListParams = {
+ readonly cwds?: ReadonlyArray;
+ readonly forceReload?: boolean;
};
-export const ClientRequest__FsRemoveParams = Schema.Struct({
- force: Schema.optionalKey(
- Schema.Union([
- Schema.Boolean.annotate({
- description: "Whether missing paths should be ignored. Defaults to `true`.",
- }),
- Schema.Null,
- ]),
- ),
- path: Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
- }),
- recursive: Schema.optionalKey(
- Schema.Union([
- Schema.Boolean.annotate({
- description: "Whether directory removal should recurse. Defaults to `true`.",
- }),
- Schema.Null,
- ]),
+export const ClientRequest__SkillsListParams = Schema.Struct({
+ cwds: Schema.optionalKey(
+ Schema.Array(Schema.String).annotate({
+ description: "When empty, defaults to the current session working directory.",
+ }),
),
-}).annotate({ description: "Remove a file or directory tree from the host filesystem." });
-
-export type ClientRequest__FsUnwatchParams = { readonly watchId: string };
-export const ClientRequest__FsUnwatchParams = Schema.Struct({
- watchId: Schema.String.annotate({
- description: "Watch identifier previously provided to `fs/watch`.",
- }),
-}).annotate({ description: "Stop filesystem watch notifications for a prior `fs/watch`." });
-
-export type ClientRequest__FsWatchParams = { readonly path: string; readonly watchId: string };
-export const ClientRequest__FsWatchParams = Schema.Struct({
- path: Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
- }),
- watchId: Schema.String.annotate({
- description: "Connection-scoped watch identifier used for `fs/unwatch` and `fs/changed`.",
- }),
-}).annotate({ description: "Start filesystem watch notifications for an absolute path." });
-
-export type ClientRequest__FsWriteFileParams = {
- readonly dataBase64: string;
- readonly path: string;
-};
-export const ClientRequest__FsWriteFileParams = Schema.Struct({
- dataBase64: Schema.String.annotate({ description: "File contents encoded as base64." }),
- path: Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
- }),
-}).annotate({ description: "Write a file on the host filesystem." });
-
-export type ClientRequest__FuzzyFileSearchParams = {
- readonly cancellationToken?: string | null;
- readonly query: string;
- readonly roots: ReadonlyArray;
-};
-export const ClientRequest__FuzzyFileSearchParams = Schema.Struct({
- cancellationToken: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- query: Schema.String,
- roots: Schema.Array(Schema.String),
-});
-
-export type ClientRequest__GetAccountParams = { readonly refreshToken?: boolean };
-export const ClientRequest__GetAccountParams = Schema.Struct({
- refreshToken: Schema.optionalKey(
+ forceReload: Schema.optionalKey(
Schema.Boolean.annotate({
- description:
- "When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.",
+ description: "When true, bypass the skills cache and re-scan skills from disk.",
}),
),
-});
+}).annotate({ identifier: "ClientRequest__SkillsListParams" });
-export type ClientRequest__HookMigration = { readonly name: string };
-export const ClientRequest__HookMigration = Schema.Struct({ name: Schema.String });
+export type ClientRequest__AbsolutePathBuf = string;
+export const ClientRequest__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "ClientRequest__AbsolutePathBuf",
+});
export type ClientRequest__HooksListParams = { readonly cwds?: ReadonlyArray };
export const ClientRequest__HooksListParams = Schema.Struct({
@@ -631,99 +638,7 @@ export const ClientRequest__HooksListParams = Schema.Struct({
description: "When empty, defaults to the current session working directory.",
}),
),
-});
-
-export type ClientRequest__ImageDetail = "auto" | "low" | "high" | "original";
-export const ClientRequest__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
-
-export type ClientRequest__InitializeCapabilities = {
- readonly experimentalApi?: boolean;
- readonly mcpServerOpenaiFormElicitation?: boolean;
- readonly optOutNotificationMethods?: ReadonlyArray | null;
- readonly requestAttestation?: boolean;
-};
-export const ClientRequest__InitializeCapabilities = Schema.Struct({
- experimentalApi: Schema.optionalKey(
- Schema.Boolean.annotate({
- description: "Opt into receiving experimental API methods and fields.",
- default: false,
- }),
- ),
- mcpServerOpenaiFormElicitation: Schema.optionalKey(
- Schema.Boolean.annotate({
- description: "Allow downstream MCP servers to request OpenAI extended form elicitations.",
- }),
- ),
- optOutNotificationMethods: Schema.optionalKey(
- Schema.Union([
- Schema.Array(Schema.String).annotate({
- description:
- "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
- }),
- Schema.Null,
- ]),
- ),
- requestAttestation: Schema.optionalKey(
- Schema.Boolean.annotate({
- description: "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
- default: false,
- }),
- ),
-}).annotate({ description: "Client-declared capabilities negotiated during initialize." });
-
-export type ClientRequest__InternalChatMessageMetadataPassthrough = {
- readonly turn_id?: string | null;
-};
-export const ClientRequest__InternalChatMessageMetadataPassthrough = Schema.Struct({
- turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-}).annotate({
- description:
- "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
-});
-
-export type ClientRequest__LegacyAppPathString = string;
-export const ClientRequest__LegacyAppPathString = Schema.String;
-
-export type ClientRequest__LocalShellAction = {
- readonly command: ReadonlyArray;
- readonly env?: { readonly [x: string]: string } | null;
- readonly timeout_ms?: number | null;
- readonly type: "exec";
- readonly user?: string | null;
- readonly working_directory?: string | null;
-};
-export const ClientRequest__LocalShellAction = Schema.Union(
- [
- Schema.Struct({
- command: Schema.Array(Schema.String),
- env: Schema.optionalKey(
- Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
- ),
- timeout_ms: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint64" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
- user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "ExecLocalShellAction" }),
- ],
- { mode: "oneOf" },
-);
-
-export type ClientRequest__LocalShellStatus = "completed" | "in_progress" | "incomplete";
-export const ClientRequest__LocalShellStatus = Schema.Literals([
- "completed",
- "in_progress",
- "incomplete",
-]);
-
-export type ClientRequest__LoginAppBrand = "codex" | "chatgpt";
-export const ClientRequest__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]);
+}).annotate({ identifier: "ClientRequest__HooksListParams" });
export type ClientRequest__MarketplaceAddParams = {
readonly refName?: string | null;
@@ -734,87 +649,133 @@ export const ClientRequest__MarketplaceAddParams = Schema.Struct({
refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
source: Schema.String,
sparsePaths: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
-});
+}).annotate({ identifier: "ClientRequest__MarketplaceAddParams" });
export type ClientRequest__MarketplaceRemoveParams = { readonly marketplaceName: string };
export const ClientRequest__MarketplaceRemoveParams = Schema.Struct({
marketplaceName: Schema.String,
-});
+}).annotate({ identifier: "ClientRequest__MarketplaceRemoveParams" });
export type ClientRequest__MarketplaceUpgradeParams = { readonly marketplaceName?: string | null };
export const ClientRequest__MarketplaceUpgradeParams = Schema.Struct({
marketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "ClientRequest__MarketplaceUpgradeParams" });
-export type ClientRequest__McpResourceReadParams = {
- readonly server: string;
- readonly threadId?: string | null;
- readonly uri: string;
-};
-export const ClientRequest__McpResourceReadParams = Schema.Struct({
- server: Schema.String,
- threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- uri: Schema.String,
-});
+export type ClientRequest__PluginListMarketplaceKind =
+ | "local"
+ | "vertical"
+ | "workspace-directory"
+ | "shared-with-me"
+ | "created-by-me-remote";
+export const ClientRequest__PluginListMarketplaceKind = Schema.Literals([
+ "local",
+ "vertical",
+ "workspace-directory",
+ "shared-with-me",
+ "created-by-me-remote",
+]).annotate({ identifier: "ClientRequest__PluginListMarketplaceKind" });
-export type ClientRequest__McpServerMigration = { readonly name: string };
-export const ClientRequest__McpServerMigration = Schema.Struct({ name: Schema.String });
+export type ClientRequest__PluginReconcileParams = { readonly reason?: string | null };
+export const ClientRequest__PluginReconcileParams = Schema.Struct({
+ reason: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description: "Optional client-provided reason recorded with the reconciliation attempt.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "ClientRequest__PluginReconcileParams" });
-export type ClientRequest__McpServerOauthLoginParams = {
- readonly name: string;
- readonly scopes?: ReadonlyArray | null;
- readonly threadId?: string | null;
- readonly timeoutSecs?: number | null;
+export type ClientRequest__PluginSkillReadParams = {
+ readonly remoteMarketplaceName: string;
+ readonly remotePluginId: string;
+ readonly skillName: string;
};
-export const ClientRequest__McpServerOauthLoginParams = Schema.Struct({
- name: Schema.String,
- scopes: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- timeoutSecs: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
- ),
-});
+export const ClientRequest__PluginSkillReadParams = Schema.Struct({
+ remoteMarketplaceName: Schema.String,
+ remotePluginId: Schema.String,
+ skillName: Schema.String,
+}).annotate({ identifier: "ClientRequest__PluginSkillReadParams" });
-export type ClientRequest__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
-export const ClientRequest__McpServerStatusDetail = Schema.Literals(["full", "toolsAndAuthOnly"]);
+export type ClientRequest__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
+export const ClientRequest__PluginShareDiscoverability = Schema.Literals([
+ "LISTED",
+ "UNLISTED",
+ "PRIVATE",
+]).annotate({ identifier: "ClientRequest__PluginShareDiscoverability" });
-export type ClientRequest__McpServerToolCallParams = {
- readonly _meta?: unknown;
- readonly arguments?: unknown;
- readonly server: string;
- readonly threadId: string;
- readonly tool: string;
-};
-export const ClientRequest__McpServerToolCallParams = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- arguments: Schema.optionalKey(Schema.Unknown),
- server: Schema.String,
- threadId: Schema.String,
- tool: Schema.String,
+export type ClientRequest__PluginSharePrincipalType = "user" | "group" | "workspace";
+export const ClientRequest__PluginSharePrincipalType = Schema.Literals([
+ "user",
+ "group",
+ "workspace",
+]).annotate({ identifier: "ClientRequest__PluginSharePrincipalType" });
+
+export type ClientRequest__PluginShareTargetRole = "reader" | "editor";
+export const ClientRequest__PluginShareTargetRole = Schema.Literals(["reader", "editor"]).annotate({
+ identifier: "ClientRequest__PluginShareTargetRole",
});
-export type ClientRequest__MergeStrategy = "replace" | "upsert";
-export const ClientRequest__MergeStrategy = Schema.Literals(["replace", "upsert"]);
+export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE" | "LISTED";
+export const ClientRequest__PluginShareUpdateDiscoverability = Schema.Literals([
+ "UNLISTED",
+ "PRIVATE",
+ "LISTED",
+]).annotate({ identifier: "ClientRequest__PluginShareUpdateDiscoverability" });
-export type ClientRequest__MessagePhase = "commentary" | "final_answer";
-export const ClientRequest__MessagePhase = Schema.Literals(["commentary", "final_answer"]).annotate(
- {
- description:
- 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
- },
-);
+export type ClientRequest__PluginShareListParams = { readonly [x: string]: Schema.Json };
+export const ClientRequest__PluginShareListParams = Schema.Record(
+ Schema.String,
+ Schema.Json.annotate({ expected: "JSON value" }),
+).annotate({ identifier: "ClientRequest__PluginShareListParams" });
-export type ClientRequest__ModeKind = "plan" | "default";
-export const ClientRequest__ModeKind = Schema.Literals(["plan", "default"]).annotate({
- description: "Initial collaboration mode to use when the TUI starts.",
+export type ClientRequest__PluginShareCheckoutParams = { readonly remotePluginId: string };
+export const ClientRequest__PluginShareCheckoutParams = Schema.Struct({
+ remotePluginId: Schema.String,
+}).annotate({ identifier: "ClientRequest__PluginShareCheckoutParams" });
+
+export type ClientRequest__PluginShareDeleteParams = { readonly remotePluginId: string };
+export const ClientRequest__PluginShareDeleteParams = Schema.Struct({
+ remotePluginId: Schema.String,
+}).annotate({ identifier: "ClientRequest__PluginShareDeleteParams" });
+
+export type ClientRequest__AppsReadParams = {
+ readonly appIds: ReadonlyArray;
+ readonly includeTools?: boolean;
+ readonly threadId?: string | null;
+};
+export const ClientRequest__AppsReadParams = Schema.Struct({
+ appIds: Schema.Array(Schema.String).annotate({
+ description:
+ "App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while preserving their first-request order.",
+ }),
+ includeTools: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "When true, include display-only public tool summaries in the returned metadata.",
+ }),
+ ),
+ threadId: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description: "Optional loaded thread id used to evaluate effective app configuration.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({
+ description: "EXPERIMENTAL - read metadata for specific apps/connectors.",
+ identifier: "ClientRequest__AppsReadParams",
});
-export type ClientRequest__ModelListParams = {
+export type ClientRequest__AppsListParams = {
readonly cursor?: string | null;
- readonly includeHidden?: boolean | null;
+ readonly forceRefetch?: boolean;
readonly limit?: number | null;
+ readonly threadId?: string | null;
};
-export const ClientRequest__ModelListParams = Schema.Struct({
+export const ClientRequest__AppsListParams = Schema.Struct({
cursor: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
@@ -823,13 +784,10 @@ export const ClientRequest__ModelListParams = Schema.Struct({
Schema.Null,
]),
),
- includeHidden: Schema.optionalKey(
- Schema.Union([
- Schema.Boolean.annotate({
- description: "When true, include models that are hidden from the default picker list.",
- }),
- Schema.Null,
- ]),
+ forceRefetch: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description: "When true, bypass app caches and fetch the latest data from sources.",
+ }),
),
limit: Schema.optionalKey(
Schema.Union([
@@ -837,167 +795,104 @@ export const ClientRequest__ModelListParams = Schema.Struct({
description: "Optional page size; defaults to a reasonable server-side value.",
format: "uint32",
})
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
Schema.Null,
]),
),
-});
-
-export type ClientRequest__ModelProviderCapabilitiesReadParams = {};
-export const ClientRequest__ModelProviderCapabilitiesReadParams = Schema.Struct({});
-
-export type ClientRequest__PermissionProfileListParams = {
- readonly cursor?: string | null;
- readonly cwd?: string | null;
- readonly limit?: number | null;
-};
-export const ClientRequest__PermissionProfileListParams = Schema.Struct({
- cursor: Schema.optionalKey(
+ threadId: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
- description: "Opaque pagination cursor returned by a previous call.",
+ description:
+ "Optional thread id used to evaluate app feature gating from that thread's config.",
}),
Schema.Null,
]),
),
- cwd: Schema.optionalKey(
+}).annotate({
+ description: "EXPERIMENTAL - list available apps/connectors.",
+ identifier: "ClientRequest__AppsListParams",
+});
+
+export type ClientRequest__AppsInstalledParams = {
+ readonly forceRefresh?: boolean;
+ readonly threadId?: string | null;
+};
+export const ClientRequest__AppsInstalledParams = Schema.Struct({
+ forceRefresh: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "When true and Apps are permitted, refresh and publish the hosted connector runtime tool snapshot first.",
+ }),
+ ),
+ threadId: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
- description: "Optional working directory to resolve project config layers.",
+ description: "Optional loaded thread id used to evaluate effective app configuration.",
}),
Schema.Null,
]),
),
- limit: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({
- description: "Optional page size; defaults to the full result set.",
- format: "uint32",
- })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
+}).annotate({
+ description: "Read the committed installed connector runtime snapshot.",
+ identifier: "ClientRequest__AppsInstalledParams",
});
-export type ClientRequest__Personality = "none" | "friendly" | "pragmatic";
-export const ClientRequest__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
-
-export type ClientRequest__PluginListMarketplaceKind =
- | "local"
- | "vertical"
- | "workspace-directory"
- | "shared-with-me"
- | "created-by-me-remote";
-export const ClientRequest__PluginListMarketplaceKind = Schema.Literals([
- "local",
- "vertical",
- "workspace-directory",
- "shared-with-me",
- "created-by-me-remote",
-]);
-
-export type ClientRequest__PluginShareCheckoutParams = { readonly remotePluginId: string };
-export const ClientRequest__PluginShareCheckoutParams = Schema.Struct({
- remotePluginId: Schema.String,
+export type ClientRequest__FsUnwatchParams = { readonly watchId: string };
+export const ClientRequest__FsUnwatchParams = Schema.Struct({
+ watchId: Schema.String.annotate({
+ description: "Watch identifier previously provided to `fs/watch`.",
+ }),
+}).annotate({
+ description: "Stop filesystem watch notifications for a prior `fs/watch`.",
+ identifier: "ClientRequest__FsUnwatchParams",
});
-export type ClientRequest__PluginShareDeleteParams = { readonly remotePluginId: string };
-export const ClientRequest__PluginShareDeleteParams = Schema.Struct({
- remotePluginId: Schema.String,
-});
+export type ClientRequest__PluginUninstallParams = { readonly pluginId: string };
+export const ClientRequest__PluginUninstallParams = Schema.Struct({
+ pluginId: Schema.String,
+}).annotate({ identifier: "ClientRequest__PluginUninstallParams" });
-export type ClientRequest__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
-export const ClientRequest__PluginShareDiscoverability = Schema.Literals([
- "LISTED",
- "UNLISTED",
- "PRIVATE",
-]);
+export type ClientRequest__ReasoningEffort = string;
+export const ClientRequest__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "ClientRequest__ReasoningEffort",
+ }),
+);
-export type ClientRequest__PluginShareListParams = {};
-export const ClientRequest__PluginShareListParams = Schema.Struct({});
+export type ClientRequest__ByteRange = { readonly end: number; readonly start: number };
+export const ClientRequest__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "ClientRequest__ByteRange" });
-export type ClientRequest__PluginSharePrincipalType = "user" | "group" | "workspace";
-export const ClientRequest__PluginSharePrincipalType = Schema.Literals([
- "user",
- "group",
- "workspace",
-]);
+export type ClientRequest__ImageDetail = "auto" | "low" | "high" | "original";
+export const ClientRequest__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "ClientRequest__ImageDetail" });
-export type ClientRequest__PluginShareTargetRole = "reader" | "editor";
-export const ClientRequest__PluginShareTargetRole = Schema.Literals(["reader", "editor"]);
-
-export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE" | "LISTED";
-export const ClientRequest__PluginShareUpdateDiscoverability = Schema.Literals([
- "UNLISTED",
- "PRIVATE",
- "LISTED",
-]);
-
-export type ClientRequest__PluginSkillReadParams = {
- readonly remoteMarketplaceName: string;
- readonly remotePluginId: string;
- readonly skillName: string;
-};
-export const ClientRequest__PluginSkillReadParams = Schema.Struct({
- remoteMarketplaceName: Schema.String,
- remotePluginId: Schema.String,
- skillName: Schema.String,
-});
-
-export type ClientRequest__PluginUninstallParams = { readonly pluginId: string };
-export const ClientRequest__PluginUninstallParams = Schema.Struct({ pluginId: Schema.String });
-
-export type ClientRequest__PluginsMigration = {
- readonly marketplaceName: string;
- readonly pluginNames: ReadonlyArray;
-};
-export const ClientRequest__PluginsMigration = Schema.Struct({
- marketplaceName: Schema.String,
- pluginNames: Schema.Array(Schema.String),
-});
-
-export type ClientRequest__ReasoningEffort = string;
-export const ClientRequest__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
-
-export type ClientRequest__ReasoningItemContent =
- | { readonly text: string; readonly type: "reasoning_text" }
- | { readonly text: string; readonly type: "text" };
-export const ClientRequest__ReasoningItemContent = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("reasoning_text").annotate({
- title: "ReasoningTextReasoningItemContentType",
- }),
- }).annotate({ title: "ReasoningTextReasoningItemContent" }),
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("text").annotate({ title: "TextReasoningItemContentType" }),
- }).annotate({ title: "TextReasoningItemContent" }),
- ],
- { mode: "oneOf" },
-);
-
-export type ClientRequest__ReasoningItemReasoningSummary = {
- readonly text: string;
- readonly type: "summary_text";
-};
-export const ClientRequest__ReasoningItemReasoningSummary = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("summary_text").annotate({
- title: "SummaryTextReasoningItemReasoningSummaryType",
- }),
- }).annotate({ title: "SummaryTextReasoningItemReasoningSummary" }),
- ],
- { mode: "oneOf" },
-);
+export type ClientRequest__NetworkAccess = "restricted" | "enabled";
+export const ClientRequest__NetworkAccess = Schema.Literals(["restricted", "enabled"]).annotate({
+ identifier: "ClientRequest__NetworkAccess",
+});
export type ClientRequest__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
export const ClientRequest__ReasoningSummary = Schema.Union(
@@ -1009,56 +904,22 @@ export const ClientRequest__ReasoningSummary = Schema.Union(
).annotate({
description:
"A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
+ identifier: "ClientRequest__ReasoningSummary",
});
-export type ClientRequest__RequestId = string | number;
-export const ClientRequest__RequestId = Schema.Union([
- Schema.String,
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-]);
-
-export type ClientRequest__ResponsesApiWebSearchAction =
- | {
- readonly queries?: ReadonlyArray | null;
- readonly query?: string | null;
- readonly type: "search";
- }
- | { readonly type: "open_page"; readonly url?: string | null }
- | {
- readonly pattern?: string | null;
- readonly type: "find_in_page";
- readonly url?: string | null;
- }
- | { readonly type: "other" };
-export const ClientRequest__ResponsesApiWebSearchAction = Schema.Union(
- [
- Schema.Struct({
- queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchResponsesApiWebSearchActionType" }),
- }).annotate({ title: "SearchResponsesApiWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("open_page").annotate({
- title: "OpenPageResponsesApiWebSearchActionType",
- }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "OpenPageResponsesApiWebSearchAction" }),
- Schema.Struct({
- pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("find_in_page").annotate({
- title: "FindInPageResponsesApiWebSearchActionType",
- }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "FindInPageResponsesApiWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("other").annotate({ title: "OtherResponsesApiWebSearchActionType" }),
- }).annotate({ title: "OtherResponsesApiWebSearchAction" }),
- ],
- { mode: "oneOf" },
-);
+export type ClientRequest__TurnInterruptParams = {
+ readonly threadId: string;
+ readonly turnId: string;
+};
+export const ClientRequest__TurnInterruptParams = Schema.Struct({
+ threadId: Schema.String,
+ turnId: Schema.String,
+}).annotate({ identifier: "ClientRequest__TurnInterruptParams" });
export type ClientRequest__ReviewDelivery = "inline" | "detached";
-export const ClientRequest__ReviewDelivery = Schema.Literals(["inline", "detached"]);
+export const ClientRequest__ReviewDelivery = Schema.Literals(["inline", "detached"]).annotate({
+ identifier: "ClientRequest__ReviewDelivery",
+});
export type ClientRequest__ReviewTarget =
| { readonly type: "uncommittedChanges" }
@@ -1106,141 +967,61 @@ export const ClientRequest__ReviewTarget = Schema.Union(
}),
],
{ mode: "oneOf" },
-);
-
-export type ClientRequest__SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
-export const ClientRequest__SandboxMode = Schema.Literals([
- "read-only",
- "workspace-write",
- "danger-full-access",
-]);
-
-export type ClientRequest__SessionMigration = {
- readonly cwd: string;
- readonly path: string;
- readonly title?: string | null;
-};
-export const ClientRequest__SessionMigration = Schema.Struct({
- cwd: Schema.String,
- path: Schema.String,
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type ClientRequest__SkillMigration = { readonly name: string };
-export const ClientRequest__SkillMigration = Schema.Struct({ name: Schema.String });
-
-export type ClientRequest__SkillsListParams = {
- readonly cwds?: ReadonlyArray;
- readonly forceReload?: boolean;
-};
-export const ClientRequest__SkillsListParams = Schema.Struct({
- cwds: Schema.optionalKey(
- Schema.Array(Schema.String).annotate({
- description: "When empty, defaults to the current session working directory.",
- }),
- ),
- forceReload: Schema.optionalKey(
- Schema.Boolean.annotate({
- description: "When true, bypass the skills cache and re-scan skills from disk.",
- }),
- ),
-});
+).annotate({ identifier: "ClientRequest__ReviewTarget" });
-export type ClientRequest__SortDirection = "asc" | "desc";
-export const ClientRequest__SortDirection = Schema.Literals(["asc", "desc"]);
-
-export type ClientRequest__SubagentMigration = { readonly name: string };
-export const ClientRequest__SubagentMigration = Schema.Struct({ name: Schema.String });
-
-export type ClientRequest__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type ClientRequest__ModelListParams = {
+ readonly cursor?: string | null;
+ readonly includeHidden?: boolean | null;
+ readonly limit?: number | null;
};
-export const ClientRequest__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
+export const ClientRequest__ModelListParams = Schema.Struct({
+ cursor: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
+ description: "Opaque pagination cursor returned by a previous call.",
}),
Schema.Null,
]),
),
-});
-
-export type ClientRequest__ThreadApproveGuardianDeniedActionParams = {
- readonly event: unknown;
- readonly threadId: string;
-};
-export const ClientRequest__ThreadApproveGuardianDeniedActionParams = Schema.Struct({
- event: Schema.Unknown.annotate({
- description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.",
- }),
- threadId: Schema.String,
-});
-
-export type ClientRequest__ThreadArchiveParams = { readonly threadId: string };
-export const ClientRequest__ThreadArchiveParams = Schema.Struct({ threadId: Schema.String });
-
-export type ClientRequest__ThreadCompactStartParams = { readonly threadId: string };
-export const ClientRequest__ThreadCompactStartParams = Schema.Struct({ threadId: Schema.String });
-
-export type ClientRequest__ThreadDeleteParams = { readonly threadId: string };
-export const ClientRequest__ThreadDeleteParams = Schema.Struct({ threadId: Schema.String });
-
-export type ClientRequest__ThreadGoalClearParams = { readonly threadId: string };
-export const ClientRequest__ThreadGoalClearParams = Schema.Struct({ threadId: Schema.String });
-
-export type ClientRequest__ThreadGoalGetParams = { readonly threadId: string };
-export const ClientRequest__ThreadGoalGetParams = Schema.Struct({ threadId: Schema.String });
-
-export type ClientRequest__ThreadGoalStatus =
- | "active"
- | "paused"
- | "blocked"
- | "usageLimited"
- | "budgetLimited"
- | "complete";
-export const ClientRequest__ThreadGoalStatus = Schema.Literals([
- "active",
- "paused",
- "blocked",
- "usageLimited",
- "budgetLimited",
- "complete",
-]);
+ includeHidden: Schema.optionalKey(
+ Schema.Union([
+ Schema.Boolean.annotate({
+ description: "When true, include models that are hidden from the default picker list.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+ limit: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({
+ description: "Optional page size; defaults to a reasonable server-side value.",
+ format: "uint32",
+ })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "ClientRequest__ModelListParams" });
-export type ClientRequest__ThreadInjectItemsParams = {
- readonly items: ReadonlyArray;
- readonly threadId: string;
+export type ClientRequest__ModelProviderCapabilitiesReadParams = {
+ readonly [x: string]: Schema.Json;
};
-export const ClientRequest__ThreadInjectItemsParams = Schema.Struct({
- items: Schema.Array(Schema.Unknown).annotate({
- description: "Raw Responses API items to append to the thread's model-visible history.",
- }),
- threadId: Schema.String,
-});
-
-export type ClientRequest__ThreadListCwdFilter = string | ReadonlyArray;
-export const ClientRequest__ThreadListCwdFilter = Schema.Union([
+export const ClientRequest__ModelProviderCapabilitiesReadParams = Schema.Record(
Schema.String,
- Schema.Array(Schema.String),
-]);
+ Schema.Json.annotate({ expected: "JSON value" }),
+).annotate({ identifier: "ClientRequest__ModelProviderCapabilitiesReadParams" });
-export type ClientRequest__ThreadLoadedListParams = {
+export type ClientRequest__ExperimentalFeatureListParams = {
readonly cursor?: string | null;
readonly limit?: number | null;
+ readonly threadId?: string | null;
};
-export const ClientRequest__ThreadLoadedListParams = Schema.Struct({
+export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
cursor: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
@@ -1252,180 +1033,717 @@ export const ClientRequest__ThreadLoadedListParams = Schema.Struct({
limit: Schema.optionalKey(
Schema.Union([
Schema.Number.annotate({
- description: "Optional page size; defaults to no limit.",
+ description: "Optional page size; defaults to a reasonable server-side value.",
format: "uint32",
})
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
Schema.Null,
]),
),
-});
-
-export type ClientRequest__ThreadMetadataGitInfoUpdateParams = {
- readonly branch?: string | null;
- readonly originUrl?: string | null;
- readonly sha?: string | null;
-};
-export const ClientRequest__ThreadMetadataGitInfoUpdateParams = Schema.Struct({
- branch: Schema.optionalKey(
+ threadId: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
description:
- "Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
+ "Optional loaded thread id. Pass this when showing feature state for an existing thread so enablement is computed from that thread's refreshed config, including project-local config for the thread's cwd.",
}),
Schema.Null,
]),
),
- originUrl: Schema.optionalKey(
+}).annotate({ identifier: "ClientRequest__ExperimentalFeatureListParams" });
+
+export type ClientRequest__PermissionProfileListParams = {
+ readonly cursor?: string | null;
+ readonly cwd?: string | null;
+ readonly limit?: number | null;
+};
+export const ClientRequest__PermissionProfileListParams = Schema.Struct({
+ cursor: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
- description:
- "Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
+ description: "Opaque pagination cursor returned by a previous call.",
}),
Schema.Null,
]),
),
- sha: Schema.optionalKey(
+ cwd: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
- description:
- "Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
+ description: "Optional working directory to resolve project config layers.",
}),
Schema.Null,
]),
),
-});
-
-export type ClientRequest__ThreadReadParams = {
- readonly includeTurns?: boolean;
- readonly threadId: string;
-};
-export const ClientRequest__ThreadReadParams = Schema.Struct({
- includeTurns: Schema.optionalKey(
- Schema.Boolean.annotate({
- description: "When true, include turns and their items from rollout history.",
- }),
+ limit: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({
+ description: "Optional page size; defaults to the full result set.",
+ format: "uint32",
+ })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
),
- threadId: Schema.String,
-});
+}).annotate({ identifier: "ClientRequest__PermissionProfileListParams" });
-export type ClientRequest__ThreadRollbackParams = {
- readonly numTurns: number;
- readonly threadId: string;
+export type ClientRequest__ExperimentalFeatureEnablementSetParams = {
+ readonly enablement: { readonly [x: string]: boolean };
};
-export const ClientRequest__ThreadRollbackParams = Schema.Struct({
- numTurns: Schema.Number.annotate({
+export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Struct({
+ enablement: Schema.Record(Schema.String, Schema.Boolean).annotate({
description:
- "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.",
- format: "uint32",
- })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- threadId: Schema.String,
-}).annotate({ description: "DEPRECATED: `thread/rollback` will be removed soon." });
+ "Process-wide runtime feature enablement keyed by canonical feature name.\n\nOnly named features are updated. Omitted features are left unchanged. Send an empty map for a no-op.",
+ }),
+}).annotate({ identifier: "ClientRequest__ExperimentalFeatureEnablementSetParams" });
-export type ClientRequest__ThreadSetNameParams = {
- readonly name: string;
- readonly threadId: string;
+export type ClientRequest__McpServerOauthClientRegistration = "auto" | "cimd" | "dcr";
+export const ClientRequest__McpServerOauthClientRegistration = Schema.Literals([
+ "auto",
+ "cimd",
+ "dcr",
+]).annotate({ identifier: "ClientRequest__McpServerOauthClientRegistration" });
+
+export type ClientRequest__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
+export const ClientRequest__McpServerStatusDetail = Schema.Literals([
+ "full",
+ "toolsAndAuthOnly",
+]).annotate({ identifier: "ClientRequest__McpServerStatusDetail" });
+
+export type ClientRequest__McpResourceReadTarget = {
+ readonly connectorId: string;
+ readonly linkId: string | null;
};
-export const ClientRequest__ThreadSetNameParams = Schema.Struct({
- name: Schema.String,
- threadId: Schema.String,
-});
+export const ClientRequest__McpResourceReadTarget = Schema.Struct({
+ connectorId: Schema.String,
+ linkId: Schema.Union([
+ Schema.String.annotate({
+ description: "Null explicitly requests no-auth access, subject to the app's resource policy.",
+ }),
+ Schema.Null,
+ ]),
+}).annotate({ identifier: "ClientRequest__McpResourceReadTarget" });
-export type ClientRequest__ThreadShellCommandParams = {
- readonly command: string;
+export type ClientRequest__McpServerToolCallParams = {
+ readonly _meta?: Schema.Json;
+ readonly arguments?: Schema.Json;
+ readonly server: string;
readonly threadId: string;
+ readonly tool: string;
};
-export const ClientRequest__ThreadShellCommandParams = Schema.Struct({
- command: Schema.String.annotate({
- description:
- "Shell command string evaluated by the thread's configured shell. Unlike `command/exec`, this intentionally preserves shell syntax such as pipes, redirects, and quoting. This runs unsandboxed with full access rather than inheriting the thread sandbox policy.",
- }),
+export const ClientRequest__McpServerToolCallParams = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ arguments: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ server: Schema.String,
threadId: Schema.String,
+ tool: Schema.String,
+}).annotate({ identifier: "ClientRequest__McpServerToolCallParams" });
+
+export type ClientRequest__WindowsSandboxSetupMode = "elevated" | "unelevated";
+export const ClientRequest__WindowsSandboxSetupMode = Schema.Literals([
+ "elevated",
+ "unelevated",
+]).annotate({ identifier: "ClientRequest__WindowsSandboxSetupMode" });
+
+export type ClientRequest__LoginAppBrand = "codex" | "chatgpt";
+export const ClientRequest__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]).annotate({
+ identifier: "ClientRequest__LoginAppBrand",
});
-export type ClientRequest__ThreadSortKey = "created_at" | "updated_at" | "recency_at";
-export const ClientRequest__ThreadSortKey = Schema.Literals([
- "created_at",
- "updated_at",
- "recency_at",
-]);
+export type ClientRequest__CancelLoginAccountParams = { readonly loginId: string };
+export const ClientRequest__CancelLoginAccountParams = Schema.Struct({
+ loginId: Schema.String,
+}).annotate({ identifier: "ClientRequest__CancelLoginAccountParams" });
-export type ClientRequest__ThreadSource = string;
-export const ClientRequest__ThreadSource = Schema.String;
+export type ClientRequest__GetAccountRateLimitsParams = {
+ readonly excludeResetCreditDetails?: boolean;
+ readonly supportsLunaReserve?: boolean;
+};
+export const ClientRequest__GetAccountRateLimitsParams = Schema.Struct({
+ excludeResetCreditDetails: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "Skip the separate reset-credit detail lookup for background usage polls. The usage response still includes the available count; omitted/false preserves detailed reads.",
+ }),
+ ),
+ supportsLunaReserve: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "The client supports automatic Luna Reserve fallback. For eligible ChatGPT CLI users, allow the backend to record experiment exposure after ordinary usage is blocked.",
+ }),
+ ),
+}).annotate({
+ description:
+ "Usage-read capabilities of the requesting client, never inferred from its experiment arm.",
+ identifier: "ClientRequest__GetAccountRateLimitsParams",
+});
-export type ClientRequest__ThreadSourceKind =
- | "cli"
- | "vscode"
- | "exec"
- | "appServer"
- | "subAgent"
- | "subAgentReview"
- | "subAgentCompact"
- | "subAgentThreadSpawn"
- | "subAgentOther"
- | "unknown";
-export const ClientRequest__ThreadSourceKind = Schema.Literals([
- "cli",
- "vscode",
- "exec",
- "appServer",
- "subAgent",
- "subAgentReview",
- "subAgentCompact",
- "subAgentThreadSpawn",
- "subAgentOther",
- "unknown",
-]);
+export type ClientRequest__ConsumeAccountRateLimitResetCreditParams = {
+ readonly creditId?: string | null;
+ readonly idempotencyKey: string;
+};
+export const ClientRequest__ConsumeAccountRateLimitResetCreditParams = Schema.Struct({
+ creditId: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Opaque reset-credit identifier to redeem. When omitted, the backend selects the next available credit.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+ idempotencyKey: Schema.String.annotate({
+ description:
+ "Identifies one logical reset attempt. A UUID is recommended; reuse the same value when retrying that attempt.",
+ }),
+}).annotate({ identifier: "ClientRequest__ConsumeAccountRateLimitResetCreditParams" });
-export type ClientRequest__ThreadStartSource = "startup" | "clear";
-export const ClientRequest__ThreadStartSource = Schema.Literals(["startup", "clear"]);
+export type ClientRequest__GetAccountTokenUsageParams = { readonly threadId?: string | null };
+export const ClientRequest__GetAccountTokenUsageParams = Schema.Struct({
+ threadId: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "When present, read estimated usage for this thread instead of account-wide token activity.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "ClientRequest__GetAccountTokenUsageParams" });
-export type ClientRequest__ThreadUnarchiveParams = { readonly threadId: string };
-export const ClientRequest__ThreadUnarchiveParams = Schema.Struct({ threadId: Schema.String });
+export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit";
+export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals([
+ "credits",
+ "usage_limit",
+]).annotate({ identifier: "ClientRequest__AddCreditsNudgeCreditType" });
-export type ClientRequest__ThreadUnsubscribeParams = { readonly threadId: string };
-export const ClientRequest__ThreadUnsubscribeParams = Schema.Struct({ threadId: Schema.String });
+export type ClientRequest__FeedbackUploadParams = {
+ readonly classification: string;
+ readonly extraLogFiles?: ReadonlyArray | null;
+ readonly includeLogs?: boolean;
+ readonly reason?: string | null;
+ readonly tags?: { readonly [x: string]: string } | null;
+ readonly threadId?: string | null;
+};
+export const ClientRequest__FeedbackUploadParams = Schema.Struct({
+ classification: Schema.String,
+ extraLogFiles: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ includeLogs: Schema.optionalKey(Schema.Boolean),
+ reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ tags: Schema.optionalKey(
+ Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
+ ),
+ threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "ClientRequest__FeedbackUploadParams" });
-export type ClientRequest__TurnInterruptParams = {
- readonly threadId: string;
- readonly turnId: string;
+export type ClientRequest__CommandExecTerminalSize = {
+ readonly cols: number;
+ readonly rows: number;
};
-export const ClientRequest__TurnInterruptParams = Schema.Struct({
- threadId: Schema.String,
- turnId: Schema.String,
+export const ClientRequest__CommandExecTerminalSize = Schema.Struct({
+ cols: Schema.Number.annotate({
+ description: "Terminal width in character cells.",
+ format: "uint16",
+ })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ rows: Schema.Number.annotate({
+ description: "Terminal height in character cells.",
+ format: "uint16",
+ })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({
+ description: "PTY size in character cells for `command/exec` PTY sessions.",
+ identifier: "ClientRequest__CommandExecTerminalSize",
});
-export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full";
-export const ClientRequest__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]);
-
-export type ClientRequest__WindowsSandboxSetupMode = "elevated" | "unelevated";
-export const ClientRequest__WindowsSandboxSetupMode = Schema.Literals(["elevated", "unelevated"]);
+export type ClientRequest__CommandExecWriteParams = {
+ readonly closeStdin?: boolean;
+ readonly deltaBase64?: string | null;
+ readonly processId: string;
+};
+export const ClientRequest__CommandExecWriteParams = Schema.Struct({
+ closeStdin: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description: "Close stdin after writing `deltaBase64`, if present.",
+ }),
+ ),
+ deltaBase64: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({ description: "Optional base64-encoded stdin bytes to write." }),
+ Schema.Null,
+ ]),
+ ),
+ processId: Schema.String.annotate({
+ description:
+ "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
+ }),
+}).annotate({
+ description: "Write stdin bytes to a running `command/exec` session, close stdin, or both.",
+ identifier: "ClientRequest__CommandExecWriteParams",
+});
-export type CommandExecutionRequestApprovalParams__AbsolutePathBuf = string;
-export const CommandExecutionRequestApprovalParams__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+export type ClientRequest__CommandExecTerminateParams = { readonly processId: string };
+export const ClientRequest__CommandExecTerminateParams = Schema.Struct({
+ processId: Schema.String.annotate({
+ description:
+ "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
+ }),
+}).annotate({
+ description: "Terminate a running `command/exec` session.",
+ identifier: "ClientRequest__CommandExecTerminateParams",
});
-export type CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = {
- readonly enabled?: boolean | null;
+export type ClientRequest__ConfigReadParams = {
+ readonly cwd?: string | null;
+ readonly includeLayers?: boolean;
};
-export const CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
- enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
-});
+export const ClientRequest__ConfigReadParams = Schema.Struct({
+ cwd: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Optional working directory to resolve project config layers. If specified, return the effective config as seen from that directory (i.e., including any project layers between `cwd` and the project/repo root).",
+ }),
+ Schema.Null,
+ ]),
+ ),
+ includeLayers: Schema.optionalKey(Schema.Boolean),
+}).annotate({ identifier: "ClientRequest__ConfigReadParams" });
-export type CommandExecutionRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
-export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
- "read",
- "write",
- "deny",
-]);
+export type ClientRequest__ExternalAgentConfigDetectParams = {
+ readonly cwds?: ReadonlyArray | null;
+ readonly includeHome?: boolean;
+ readonly maxSessionAgeDays?: number | null;
+ readonly maxSessions?: number | null;
+ readonly migrationSource?: string | null;
+ readonly source?: string | null;
+};
+export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({
+ cwds: Schema.optionalKey(
+ Schema.Union([
+ Schema.Array(Schema.String).annotate({
+ description: "Zero or more working directories to include for repo-scoped detection.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+ includeHome: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description: "If true, include detection under the user's home directory.",
+ }),
+ ),
+ maxSessionAgeDays: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({
+ description:
+ "Maximum age in days for detected sessions. Missing values use the default limit.",
+ format: "uint32",
+ })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ maxSessions: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({
+ description: "Maximum number of sessions to detect. Missing values use the default limit.",
+ format: "uint32",
+ })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ migrationSource: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Optional migration-source selector. Missing or unrecognized values use the default source.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+ source: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Deprecated field retained for compatibility. This field is ignored; use `migrationSource` to select the migration source.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "ClientRequest__ExternalAgentConfigDetectParams" });
+
+export type ClientRequest__CommandMigration = { readonly name: string };
+export const ClientRequest__CommandMigration = Schema.Struct({ name: Schema.String }).annotate({
+ identifier: "ClientRequest__CommandMigration",
+});
+
+export type ClientRequest__HookMigration = { readonly name: string };
+export const ClientRequest__HookMigration = Schema.Struct({ name: Schema.String }).annotate({
+ identifier: "ClientRequest__HookMigration",
+});
+
+export type ClientRequest__McpServerMigration = { readonly name: string };
+export const ClientRequest__McpServerMigration = Schema.Struct({ name: Schema.String }).annotate({
+ identifier: "ClientRequest__McpServerMigration",
+});
+
+export type ClientRequest__PluginsMigration = {
+ readonly marketplaceName: string;
+ readonly pluginNames: ReadonlyArray;
+};
+export const ClientRequest__PluginsMigration = Schema.Struct({
+ marketplaceName: Schema.String,
+ pluginNames: Schema.Array(Schema.String),
+}).annotate({ identifier: "ClientRequest__PluginsMigration" });
+
+export type ClientRequest__SessionMigration = {
+ readonly cwd: string;
+ readonly path: string;
+ readonly title?: string | null;
+};
+export const ClientRequest__SessionMigration = Schema.Struct({
+ cwd: Schema.String,
+ path: Schema.String,
+ title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "ClientRequest__SessionMigration" });
+
+export type ClientRequest__SkillMigration = { readonly name: string };
+export const ClientRequest__SkillMigration = Schema.Struct({ name: Schema.String }).annotate({
+ identifier: "ClientRequest__SkillMigration",
+});
+
+export type ClientRequest__SubagentMigration = { readonly name: string };
+export const ClientRequest__SubagentMigration = Schema.Struct({ name: Schema.String }).annotate({
+ identifier: "ClientRequest__SubagentMigration",
+});
+
+export type ClientRequest__ExternalAgentConfigMigrationItemType =
+ | "AGENTS_MD"
+ | "CONFIG"
+ | "SKILLS"
+ | "PLUGINS"
+ | "MCP_SERVER_CONFIG"
+ | "SUBAGENTS"
+ | "HOOKS"
+ | "COMMANDS"
+ | "MEMORY"
+ | "SESSIONS";
+export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([
+ "AGENTS_MD",
+ "CONFIG",
+ "SKILLS",
+ "PLUGINS",
+ "MCP_SERVER_CONFIG",
+ "SUBAGENTS",
+ "HOOKS",
+ "COMMANDS",
+ "MEMORY",
+ "SESSIONS",
+]).annotate({ identifier: "ClientRequest__ExternalAgentConfigMigrationItemType" });
+
+export type ClientRequest__MergeStrategy = "replace" | "upsert";
+export const ClientRequest__MergeStrategy = Schema.Literals(["replace", "upsert"]).annotate({
+ identifier: "ClientRequest__MergeStrategy",
+});
+
+export type ClientRequest__GetAccountParams = { readonly refreshToken?: boolean };
+export const ClientRequest__GetAccountParams = Schema.Struct({
+ refreshToken: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.",
+ }),
+ ),
+}).annotate({ identifier: "ClientRequest__GetAccountParams" });
+
+export type ClientRequest__FuzzyFileSearchParams = {
+ readonly cancellationToken?: string | null;
+ readonly query: string;
+ readonly roots: ReadonlyArray;
+};
+export const ClientRequest__FuzzyFileSearchParams = Schema.Struct({
+ cancellationToken: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ query: Schema.String,
+ roots: Schema.Array(Schema.String),
+}).annotate({ identifier: "ClientRequest__FuzzyFileSearchParams" });
+
+export type ClientRequest__AdditionalContextKind = "untrusted" | "application";
+export const ClientRequest__AdditionalContextKind = Schema.Literals([
+ "untrusted",
+ "application",
+]).annotate({ identifier: "ClientRequest__AdditionalContextKind" });
+
+export type ClientRequest__ModeKind = "plan" | "default";
+export const ClientRequest__ModeKind = Schema.Literals(["plan", "default"]).annotate({
+ description: "Initial collaboration mode to use when the TUI starts.",
+ identifier: "ClientRequest__ModeKind",
+});
+
+export type ClientRequest__DynamicToolNamespaceTool = {
+ readonly deferLoading?: boolean;
+ readonly description: string;
+ readonly inputSchema: Schema.Json;
+ readonly name: string;
+ readonly type: "function";
+};
+export const ClientRequest__DynamicToolNamespaceTool = Schema.Union(
+ [
+ Schema.Struct({
+ deferLoading: Schema.optionalKey(Schema.Boolean),
+ description: Schema.String,
+ inputSchema: Schema.Json.annotate({ expected: "JSON value" }),
+ name: Schema.String,
+ type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolNamespaceToolType" }),
+ }).annotate({ title: "FunctionDynamicToolNamespaceTool" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ClientRequest__DynamicToolNamespaceTool" });
+
+export type ClientRequest__InternalChatMessageMetadataPassthrough = {
+ readonly turn_id?: string | null;
+};
+export const ClientRequest__InternalChatMessageMetadataPassthrough = Schema.Struct({
+ turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description:
+ "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
+ identifier: "ClientRequest__InternalChatMessageMetadataPassthrough",
+});
+
+export type ClientRequest__MessagePhase = "commentary" | "final_answer";
+export const ClientRequest__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description:
+ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "ClientRequest__MessagePhase",
+});
+
+export type ClientRequest__AgentMessageInputContent =
+ | { readonly text: string; readonly type: "input_text" }
+ | { readonly encrypted_content: string; readonly type: "encrypted_content" };
+export const ClientRequest__AgentMessageInputContent = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("input_text").annotate({
+ title: "InputTextAgentMessageInputContentType",
+ }),
+ }).annotate({ title: "InputTextAgentMessageInputContent" }),
+ Schema.Struct({
+ encrypted_content: Schema.String,
+ type: Schema.Literal("encrypted_content").annotate({
+ title: "EncryptedContentAgentMessageInputContentType",
+ }),
+ }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ClientRequest__AgentMessageInputContent" });
+
+export type ClientRequest__ReasoningItemContent =
+ | { readonly text: string; readonly type: "reasoning_text" }
+ | { readonly text: string; readonly type: "text" };
+export const ClientRequest__ReasoningItemContent = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("reasoning_text").annotate({
+ title: "ReasoningTextReasoningItemContentType",
+ }),
+ }).annotate({ title: "ReasoningTextReasoningItemContent" }),
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("text").annotate({ title: "TextReasoningItemContentType" }),
+ }).annotate({ title: "TextReasoningItemContent" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ClientRequest__ReasoningItemContent" });
+
+export type ClientRequest__ReasoningItemReasoningSummary = {
+ readonly text: string;
+ readonly type: "summary_text";
+};
+export const ClientRequest__ReasoningItemReasoningSummary = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("summary_text").annotate({
+ title: "SummaryTextReasoningItemReasoningSummaryType",
+ }),
+ }).annotate({ title: "SummaryTextReasoningItemReasoningSummary" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ClientRequest__ReasoningItemReasoningSummary" });
+
+export type ClientRequest__LocalShellAction = {
+ readonly command: ReadonlyArray;
+ readonly env?: { readonly [x: string]: string } | null;
+ readonly timeout_ms?: number | null;
+ readonly type: "exec";
+ readonly user?: string | null;
+ readonly working_directory?: string | null;
+};
+export const ClientRequest__LocalShellAction = Schema.Union(
+ [
+ Schema.Struct({
+ command: Schema.Array(Schema.String),
+ env: Schema.optionalKey(
+ Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
+ ),
+ timeout_ms: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "uint64" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
+ user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "ExecLocalShellAction" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ClientRequest__LocalShellAction" });
+
+export type ClientRequest__LocalShellStatus = "completed" | "in_progress" | "incomplete";
+export const ClientRequest__LocalShellStatus = Schema.Literals([
+ "completed",
+ "in_progress",
+ "incomplete",
+]).annotate({ identifier: "ClientRequest__LocalShellStatus" });
+
+export type ClientRequest__ResponsesApiWebSearchAction =
+ | {
+ readonly queries?: ReadonlyArray | null;
+ readonly query?: string | null;
+ readonly type: "search";
+ }
+ | { readonly type: "open_page"; readonly url?: string | null }
+ | {
+ readonly pattern?: string | null;
+ readonly type: "find_in_page";
+ readonly url?: string | null;
+ }
+ | { readonly type: "other" };
+export const ClientRequest__ResponsesApiWebSearchAction = Schema.Union(
+ [
+ Schema.Struct({
+ queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("search").annotate({ title: "SearchResponsesApiWebSearchActionType" }),
+ }).annotate({ title: "SearchResponsesApiWebSearchAction" }),
+ Schema.Struct({
+ type: Schema.Literal("open_page").annotate({
+ title: "OpenPageResponsesApiWebSearchActionType",
+ }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "OpenPageResponsesApiWebSearchAction" }),
+ Schema.Struct({
+ pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("find_in_page").annotate({
+ title: "FindInPageResponsesApiWebSearchActionType",
+ }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "FindInPageResponsesApiWebSearchAction" }),
+ Schema.Struct({
+ type: Schema.Literal("other").annotate({ title: "OtherResponsesApiWebSearchActionType" }),
+ }).annotate({ title: "OtherResponsesApiWebSearchAction" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ClientRequest__ResponsesApiWebSearchAction" });
+
+export type ClientRequest__CapabilityRootLocation = {
+ readonly environmentId: string;
+ readonly path: string;
+ readonly type: "environment";
+};
+export const ClientRequest__CapabilityRootLocation = Schema.Union(
+ [
+ Schema.Struct({
+ environmentId: Schema.String,
+ path: Schema.String.annotate({
+ description: "Absolute path for the root in the selected environment.",
+ }),
+ type: Schema.Literal("environment").annotate({
+ title: "EnvironmentCapabilityRootLocationType",
+ }),
+ }).annotate({
+ title: "EnvironmentCapabilityRootLocation",
+ description: "A path owned by an execution environment.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "Location used to resolve a selected capability root.",
+ identifier: "ClientRequest__CapabilityRootLocation",
+});
+
+export type ClientRequest__ConversationTextRole = "user" | "developer" | "assistant";
+export const ClientRequest__ConversationTextRole = Schema.Literals([
+ "user",
+ "developer",
+ "assistant",
+]).annotate({ identifier: "ClientRequest__ConversationTextRole" });
+
+export type ClientRequest__LegacyAppPathString = string;
+export const ClientRequest__LegacyAppPathString = Schema.String.annotate({
+ identifier: "ClientRequest__LegacyAppPathString",
+});
export type CommandExecutionRequestApprovalParams__LegacyAppPathString = string;
-export const CommandExecutionRequestApprovalParams__LegacyAppPathString = Schema.String;
+export const CommandExecutionRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
+ identifier: "CommandExecutionRequestApprovalParams__LegacyAppPathString",
+});
+
+export type CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind =
+ | "command"
+ | "writeStdin";
+export const CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind = Schema.Literals([
+ "command",
+ "writeStdin",
+]).annotate({
+ description: "Distinguishes a command approval from input sent to an existing terminal.",
+ identifier: "CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind",
+});
export type CommandExecutionRequestApprovalParams__NetworkApprovalProtocol =
| "http"
@@ -1437,19 +1755,33 @@ export const CommandExecutionRequestApprovalParams__NetworkApprovalProtocol = Sc
"https",
"socks5Tcp",
"socks5Udp",
-]);
+]).annotate({ identifier: "CommandExecutionRequestApprovalParams__NetworkApprovalProtocol" });
export type CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction = "allow" | "deny";
export const CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction = Schema.Literals([
"allow",
"deny",
-]);
+]).annotate({ identifier: "CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction" });
+
+export type CommandExecutionRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
+export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
+ "read",
+ "write",
+ "deny",
+]).annotate({ identifier: "CommandExecutionRequestApprovalParams__FileSystemAccessMode" });
+
+export type CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = {
+ readonly enabled?: boolean | null;
+};
+export const CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
+ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
+}).annotate({ identifier: "CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions" });
export type CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
export const CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
"allow",
"deny",
-]);
+]).annotate({ identifier: "CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction" });
export type DynamicToolCallResponse__DynamicToolCallOutputContentItem =
| { readonly text: string; readonly type: "inputText" }
@@ -1477,7 +1809,12 @@ export const DynamicToolCallResponse__DynamicToolCallOutputContentItem = Schema.
}).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "DynamicToolCallResponse__DynamicToolCallOutputContentItem" });
+
+export type ExecCommandApprovalParams__ThreadId = string;
+export const ExecCommandApprovalParams__ThreadId = Schema.String.annotate({
+ identifier: "ExecCommandApprovalParams__ThreadId",
+});
export type ExecCommandApprovalParams__ParsedCommand =
| { readonly cmd: string; readonly name: string; readonly path: string; readonly type: "read" }
@@ -1517,34 +1854,41 @@ export const ExecCommandApprovalParams__ParsedCommand = Schema.Union(
}).annotate({ title: "UnknownParsedCommand" }),
],
{ mode: "oneOf" },
-);
-
-export type ExecCommandApprovalParams__ThreadId = string;
-export const ExecCommandApprovalParams__ThreadId = Schema.String;
+).annotate({ identifier: "ExecCommandApprovalParams__ParsedCommand" });
export type ExecCommandApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
export const ExecCommandApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
"allow",
"deny",
-]);
+]).annotate({ identifier: "ExecCommandApprovalResponse__NetworkPolicyRuleAction" });
export type FileChangeRequestApprovalResponse__FileChangeApprovalDecision =
| "accept"
| "acceptForSession"
| "decline"
| "cancel";
-export const FileChangeRequestApprovalResponse__FileChangeApprovalDecision = Schema.Literals([
- "accept",
- "acceptForSession",
- "decline",
- "cancel",
-]);
+export const FileChangeRequestApprovalResponse__FileChangeApprovalDecision = Schema.Union(
+ [
+ Schema.Literal("accept").annotate({ description: "User approved the file changes." }),
+ Schema.Literal("acceptForSession").annotate({
+ description:
+ "User approved the file changes and future changes to the same files should run without prompting.",
+ }),
+ Schema.Literal("decline").annotate({
+ description: "User denied the file changes. The agent will continue the turn.",
+ }),
+ Schema.Literal("cancel").annotate({
+ description: "User denied the file changes. The turn will also be immediately interrupted.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "FileChangeRequestApprovalResponse__FileChangeApprovalDecision" });
export type FuzzyFileSearchResponse__FuzzyFileSearchMatchType = "file" | "directory";
export const FuzzyFileSearchResponse__FuzzyFileSearchMatchType = Schema.Literals([
"file",
"directory",
-]);
+]).annotate({ identifier: "FuzzyFileSearchResponse__FuzzyFileSearchMatchType" });
export type FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType =
| "file"
@@ -1552,50 +1896,36 @@ export type FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType
export const FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType = Schema.Literals([
"file",
"directory",
-]);
+]).annotate({ identifier: "FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType" });
export type JSONRPCError__JSONRPCErrorError = {
readonly code: number;
- readonly data?: unknown;
+ readonly data?: Schema.Json;
readonly message: string;
};
export const JSONRPCError__JSONRPCErrorError = Schema.Struct({
- code: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- data: Schema.optionalKey(Schema.Unknown),
+ code: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ data: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
message: Schema.String,
-});
+}).annotate({ identifier: "JSONRPCError__JSONRPCErrorError" });
export type JSONRPCError__RequestId = string | number;
export const JSONRPCError__RequestId = Schema.Union([
Schema.String,
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-]);
-
-export type JSONRPCMessage__JSONRPCErrorError = {
- readonly code: number;
- readonly data?: unknown;
- readonly message: string;
-};
-export const JSONRPCMessage__JSONRPCErrorError = Schema.Struct({
- code: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- data: Schema.optionalKey(Schema.Unknown),
- message: Schema.String,
-});
-
-export type JSONRPCMessage__JSONRPCNotification = {
- readonly method: string;
- readonly params?: unknown;
-};
-export const JSONRPCMessage__JSONRPCNotification = Schema.Struct({
- method: Schema.String,
- params: Schema.optionalKey(Schema.Unknown),
-}).annotate({ description: "A notification which does not expect a response." });
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+]).annotate({ identifier: "JSONRPCError__RequestId" });
export type JSONRPCMessage__RequestId = string | number;
export const JSONRPCMessage__RequestId = Schema.Union([
Schema.String,
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-]);
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+]).annotate({ identifier: "JSONRPCMessage__RequestId" });
export type JSONRPCMessage__W3cTraceContext = {
readonly traceparent?: string | null;
@@ -1604,13 +1934,40 @@ export type JSONRPCMessage__W3cTraceContext = {
export const JSONRPCMessage__W3cTraceContext = Schema.Struct({
traceparent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
tracestate: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "JSONRPCMessage__W3cTraceContext" });
+
+export type JSONRPCMessage__JSONRPCNotification = {
+ readonly method: string;
+ readonly params?: Schema.Json;
+};
+export const JSONRPCMessage__JSONRPCNotification = Schema.Struct({
+ method: Schema.String,
+ params: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({
+ description: "A notification which does not expect a response.",
+ identifier: "JSONRPCMessage__JSONRPCNotification",
});
+export type JSONRPCMessage__JSONRPCErrorError = {
+ readonly code: number;
+ readonly data?: Schema.Json;
+ readonly message: string;
+};
+export const JSONRPCMessage__JSONRPCErrorError = Schema.Struct({
+ code: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ data: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ message: Schema.String,
+}).annotate({ identifier: "JSONRPCMessage__JSONRPCErrorError" });
+
export type JSONRPCRequest__RequestId = string | number;
export const JSONRPCRequest__RequestId = Schema.Union([
Schema.String,
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-]);
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+]).annotate({ identifier: "JSONRPCRequest__RequestId" });
export type JSONRPCRequest__W3cTraceContext = {
readonly traceparent?: string | null;
@@ -1619,20 +1976,20 @@ export type JSONRPCRequest__W3cTraceContext = {
export const JSONRPCRequest__W3cTraceContext = Schema.Struct({
traceparent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
tracestate: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "JSONRPCRequest__W3cTraceContext" });
export type JSONRPCResponse__RequestId = string | number;
export const JSONRPCResponse__RequestId = Schema.Union([
Schema.String,
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-]);
-
-export type McpServerElicitationRequestParams__McpElicitationArrayType = "array";
-export const McpServerElicitationRequestParams__McpElicitationArrayType = Schema.Literal("array");
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+]).annotate({ identifier: "JSONRPCResponse__RequestId" });
-export type McpServerElicitationRequestParams__McpElicitationBooleanType = "boolean";
-export const McpServerElicitationRequestParams__McpElicitationBooleanType =
- Schema.Literal("boolean");
+export type McpServerElicitationRequestParams__McpElicitationStringType = "string";
+export const McpServerElicitationRequestParams__McpElicitationStringType = Schema.Literal(
+ "string",
+).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationStringType" });
export type McpServerElicitationRequestParams__McpElicitationConstOption = {
readonly const: string;
@@ -1641,16 +1998,12 @@ export type McpServerElicitationRequestParams__McpElicitationConstOption = {
export const McpServerElicitationRequestParams__McpElicitationConstOption = Schema.Struct({
const: Schema.String,
title: Schema.String,
-});
-
-export type McpServerElicitationRequestParams__McpElicitationNumberType = "number" | "integer";
-export const McpServerElicitationRequestParams__McpElicitationNumberType = Schema.Literals([
- "number",
- "integer",
-]);
+}).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationConstOption" });
-export type McpServerElicitationRequestParams__McpElicitationObjectType = "object";
-export const McpServerElicitationRequestParams__McpElicitationObjectType = Schema.Literal("object");
+export type McpServerElicitationRequestParams__McpElicitationArrayType = "array";
+export const McpServerElicitationRequestParams__McpElicitationArrayType = Schema.Literal(
+ "array",
+).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationArrayType" });
export type McpServerElicitationRequestParams__McpElicitationStringFormat =
| "email"
@@ -1662,10 +2015,23 @@ export const McpServerElicitationRequestParams__McpElicitationStringFormat = Sch
"uri",
"date",
"date-time",
-]);
+]).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationStringFormat" });
-export type McpServerElicitationRequestParams__McpElicitationStringType = "string";
-export const McpServerElicitationRequestParams__McpElicitationStringType = Schema.Literal("string");
+export type McpServerElicitationRequestParams__McpElicitationNumberType = "number" | "integer";
+export const McpServerElicitationRequestParams__McpElicitationNumberType = Schema.Literals([
+ "number",
+ "integer",
+]).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationNumberType" });
+
+export type McpServerElicitationRequestParams__McpElicitationBooleanType = "boolean";
+export const McpServerElicitationRequestParams__McpElicitationBooleanType = Schema.Literal(
+ "boolean",
+).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationBooleanType" });
+
+export type McpServerElicitationRequestParams__McpElicitationObjectType = "object";
+export const McpServerElicitationRequestParams__McpElicitationObjectType = Schema.Literal(
+ "object",
+).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationObjectType" });
export type McpServerElicitationRequestResponse__McpServerElicitationAction =
| "accept"
@@ -1675,256 +2041,231 @@ export const McpServerElicitationRequestResponse__McpServerElicitationAction = S
"accept",
"decline",
"cancel",
-]);
+]).annotate({ identifier: "McpServerElicitationRequestResponse__McpServerElicitationAction" });
-export type PermissionsRequestApprovalParams__AbsolutePathBuf = string;
-export const PermissionsRequestApprovalParams__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+export type PermissionsRequestApprovalParams__LegacyAppPathString = string;
+export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
+ identifier: "PermissionsRequestApprovalParams__LegacyAppPathString",
});
+export type PermissionsRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
+export const PermissionsRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
+ "read",
+ "write",
+ "deny",
+]).annotate({ identifier: "PermissionsRequestApprovalParams__FileSystemAccessMode" });
+
export type PermissionsRequestApprovalParams__AdditionalNetworkPermissions = {
readonly enabled?: boolean | null;
};
export const PermissionsRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
-});
+}).annotate({ identifier: "PermissionsRequestApprovalParams__AdditionalNetworkPermissions" });
-export type PermissionsRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
-export const PermissionsRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
+export type PermissionsRequestApprovalResponse__FileSystemAccessMode = "read" | "write" | "deny";
+export const PermissionsRequestApprovalResponse__FileSystemAccessMode = Schema.Literals([
"read",
"write",
"deny",
-]);
+]).annotate({ identifier: "PermissionsRequestApprovalResponse__FileSystemAccessMode" });
-export type PermissionsRequestApprovalParams__LegacyAppPathString = string;
-export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String;
+export type PermissionsRequestApprovalResponse__LegacyAppPathString = string;
+export const PermissionsRequestApprovalResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "PermissionsRequestApprovalResponse__LegacyAppPathString",
+});
export type PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = {
readonly enabled?: boolean | null;
};
export const PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = Schema.Struct({
enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
-});
+}).annotate({ identifier: "PermissionsRequestApprovalResponse__AdditionalNetworkPermissions" });
-export type PermissionsRequestApprovalResponse__FileSystemAccessMode = "read" | "write" | "deny";
-export const PermissionsRequestApprovalResponse__FileSystemAccessMode = Schema.Literals([
- "read",
- "write",
- "deny",
-]);
+export type PermissionsRequestApprovalResponse__PermissionGrantScope = "turn" | "session";
+export const PermissionsRequestApprovalResponse__PermissionGrantScope = Schema.Literals([
+ "turn",
+ "session",
+]).annotate({ identifier: "PermissionsRequestApprovalResponse__PermissionGrantScope" });
-export type PermissionsRequestApprovalResponse__LegacyAppPathString = string;
-export const PermissionsRequestApprovalResponse__LegacyAppPathString = Schema.String;
+export type ServerNotification__NonSteerableTurnKind = "review" | "compact";
+export const ServerNotification__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "ServerNotification__NonSteerableTurnKind" });
+
+export type ServerNotification__MisalignmentSteer = { readonly message: string };
+export const ServerNotification__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "ServerNotification__MisalignmentSteer" });
export type ServerNotification__AbsolutePathBuf = string;
export const ServerNotification__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "ServerNotification__AbsolutePathBuf",
});
-export type ServerNotification__AccountLoginCompletedNotification = {
- readonly error?: string | null;
- readonly loginId?: string | null;
- readonly success: boolean;
+export type ServerNotification__GitInfo = {
+ readonly branch?: string | null;
+ readonly originUrl?: string | null;
+ readonly sha?: string | null;
};
-export const ServerNotification__AccountLoginCompletedNotification = Schema.Struct({
- error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- loginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- success: Schema.Boolean,
-});
+export const ServerNotification__GitInfo = Schema.Struct({
+ branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "ServerNotification__GitInfo" });
-export type ServerNotification__ActivePermissionProfile = {
- readonly extends?: string | null;
- readonly id: string;
-};
-export const ServerNotification__ActivePermissionProfile = Schema.Struct({
- extends: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
- }),
- Schema.Null,
- ]),
- ),
- id: Schema.String.annotate({
- description:
- "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.",
- }),
-});
+export type ServerNotification__ThreadHistoryMode = "legacy" | "paginated";
+export const ServerNotification__ThreadHistoryMode = Schema.Literals([
+ "legacy",
+ "paginated",
+]).annotate({ identifier: "ServerNotification__ThreadHistoryMode" });
-export type ServerNotification__AdditionalNetworkPermissions = {
- readonly enabled?: boolean | null;
-};
-export const ServerNotification__AdditionalNetworkPermissions = Schema.Struct({
- enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
-});
+export type ServerNotification__ReasoningEffort = string;
+export const ServerNotification__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "ServerNotification__ReasoningEffort",
+ }),
+);
-export type ServerNotification__AgentMessageDeltaNotification = {
- readonly delta: string;
- readonly itemId: string;
- readonly threadId: string;
- readonly turnId: string;
+export type ServerNotification__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const ServerNotification__AgentMessageDeltaNotification = Schema.Struct({
- delta: Schema.String,
- itemId: Schema.String,
- threadId: Schema.String,
- turnId: Schema.String,
+export const ServerNotification__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "ServerNotification__ThreadSectionAppearance",
});
export type ServerNotification__AgentPath = string;
-export const ServerNotification__AgentPath = Schema.String;
+export const ServerNotification__AgentPath = Schema.String.annotate({
+ identifier: "ServerNotification__AgentPath",
+});
-export type ServerNotification__AppBranding = {
- readonly category?: string | null;
- readonly developer?: string | null;
- readonly isDiscoverableApp: boolean;
- readonly privacyPolicy?: string | null;
- readonly termsOfService?: string | null;
- readonly website?: string | null;
-};
-export const ServerNotification__AppBranding = Schema.Struct({
- category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- isDiscoverableApp: Schema.Boolean,
- privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-}).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." });
+export type ServerNotification__ThreadId = string;
+export const ServerNotification__ThreadId = Schema.String.annotate({
+ identifier: "ServerNotification__ThreadId",
+});
-export type ServerNotification__AppReview = { readonly status: string };
-export const ServerNotification__AppReview = Schema.Struct({ status: Schema.String });
+export type ServerNotification__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
+export const ServerNotification__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "ServerNotification__ThreadActiveFlag" });
-export type ServerNotification__AppScreenshot = {
- readonly fileId?: string | null;
- readonly url?: string | null;
- readonly userPrompt: string;
-};
-export const ServerNotification__AppScreenshot = Schema.Struct({
- fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- userPrompt: Schema.String,
+export type ServerNotification__ThreadSource = string;
+export const ServerNotification__ThreadSource = Schema.String.annotate({
+ identifier: "ServerNotification__ThreadSource",
});
-export type ServerNotification__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
-export const ServerNotification__ApprovalsReviewer = Schema.Literals([
- "user",
- "auto_review",
- "guardian_subagent",
-]).annotate({
- description:
- "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
-});
+export type ServerNotification__ByteRange = { readonly end: number; readonly start: number };
+export const ServerNotification__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "ServerNotification__ByteRange" });
-export type ServerNotification__AskForApproval =
- | "untrusted"
- | "on-request"
- | "never"
- | {
- readonly granular: {
- readonly mcp_elicitations: boolean;
- readonly request_permissions?: boolean;
- readonly rules: boolean;
- readonly sandbox_approval: boolean;
- readonly skill_approval?: boolean;
- };
- };
-export const ServerNotification__AskForApproval = Schema.Union(
- [
- Schema.Literals(["untrusted", "on-request", "never"]),
- Schema.Struct({
- granular: Schema.Struct({
- mcp_elicitations: Schema.Boolean,
- request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- rules: Schema.Boolean,
- sandbox_approval: Schema.Boolean,
- skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- }),
- }).annotate({ title: "GranularAskForApproval" }),
- ],
- { mode: "oneOf" },
-);
+export type ServerNotification__ImageDetail = "auto" | "low" | "high" | "original";
+export const ServerNotification__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "ServerNotification__ImageDetail" });
-export type ServerNotification__AuthMode =
- | "apikey"
- | "chatgpt"
- | "chatgptAuthTokens"
- | "headers"
- | "agentIdentity"
- | "personalAccessToken"
- | "bedrockApiKey";
-export const ServerNotification__AuthMode = Schema.Literals([
- "apikey",
- "chatgpt",
- "chatgptAuthTokens",
- "headers",
- "agentIdentity",
- "personalAccessToken",
- "bedrockApiKey",
-]).annotate({ description: "Authentication mode for OpenAI-backed providers." });
+export type ServerNotification__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
+};
+export const ServerNotification__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "ServerNotification__HookPromptFragment" });
-export type ServerNotification__AutoReviewDecisionSource = "agent";
-export const ServerNotification__AutoReviewDecisionSource = Schema.Literal("agent").annotate({
- description: "[UNSTABLE] Source that produced a terminal approval auto-review decision.",
+export type ServerNotification__AgentMessageDelivery = "async";
+export const ServerNotification__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "ServerNotification__AgentMessageDelivery",
});
-export type ServerNotification__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const ServerNotification__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
-
-export type ServerNotification__CommandExecOutputDeltaNotification = {
- readonly capReached: boolean;
- readonly deltaBase64: string;
- readonly processId: string;
- readonly stream: "stdout" | "stderr";
+export type ServerNotification__MemoryCitationEntry = {
+ readonly lineEnd: number;
+ readonly lineStart: number;
+ readonly note: string;
+ readonly path: string;
};
-export const ServerNotification__CommandExecOutputDeltaNotification = Schema.Struct({
- capReached: Schema.Boolean.annotate({
- description:
- "`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.",
- }),
- deltaBase64: Schema.String.annotate({ description: "Base64-encoded output bytes." }),
- processId: Schema.String.annotate({
- description:
- "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
- }),
- stream: Schema.Literals(["stdout", "stderr"]).annotate({
- description: "Stream label for `command/exec/outputDelta` notifications.",
- }),
-}).annotate({
+export const ServerNotification__MemoryCitationEntry = Schema.Struct({
+ lineEnd: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ lineStart: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ note: Schema.String,
+ path: Schema.String,
+}).annotate({ identifier: "ServerNotification__MemoryCitationEntry" });
+
+export type ServerNotification__MessagePhase = "commentary" | "final_answer";
+export const ServerNotification__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
- "Base64-encoded output chunk emitted for a streaming `command/exec` request.\n\nThese notifications are connection-scoped. If the originating connection closes, the server terminates the process.",
+ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "ServerNotification__MessagePhase",
});
-export type ServerNotification__CommandExecutionOutputDeltaNotification = {
- readonly delta: string;
- readonly itemId: string;
- readonly threadId: string;
- readonly turnId: string;
+export type ServerNotification__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
};
-export const ServerNotification__CommandExecutionOutputDeltaNotification = Schema.Struct({
- delta: Schema.String,
- itemId: Schema.String,
- threadId: Schema.String,
- turnId: Schema.String,
+export const ServerNotification__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "ServerNotification__AsyncUserInputQuestion" });
+
+export type ServerNotification__LegacyAppPathString = string;
+export const ServerNotification__LegacyAppPathString = Schema.String.annotate({
+ identifier: "ServerNotification__LegacyAppPathString",
});
+export type ServerNotification__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const ServerNotification__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "ServerNotification__CommandExecutionSource" });
+
export type ServerNotification__CommandExecutionStatus =
| "inProgress"
| "completed"
@@ -1935,43 +2276,83 @@ export const ServerNotification__CommandExecutionStatus = Schema.Literals([
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "ServerNotification__CommandExecutionStatus" });
-export type ServerNotification__ContextCompactedNotification = {
- readonly threadId: string;
- readonly turnId: string;
-};
-export const ServerNotification__ContextCompactedNotification = Schema.Struct({
- threadId: Schema.String,
- turnId: Schema.String,
-}).annotate({ description: "Deprecated: Use `ContextCompaction` item type instead." });
+export type ServerNotification__PatchChangeKind =
+ | { readonly type: "add" }
+ | { readonly type: "delete" }
+ | { readonly move_path?: string | null; readonly type: "update" };
+export const ServerNotification__PatchChangeKind = Schema.Union(
+ [
+ Schema.Struct({
+ type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
+ }).annotate({ title: "AddPatchChangeKind" }),
+ Schema.Struct({
+ type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
+ }).annotate({ title: "DeletePatchChangeKind" }),
+ Schema.Struct({
+ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
+ }).annotate({ title: "UpdatePatchChangeKind" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ServerNotification__PatchChangeKind" });
-export type ServerNotification__CreditsSnapshot = {
- readonly balance?: string | null;
- readonly hasCredits: boolean;
- readonly unlimited: boolean;
+export type ServerNotification__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const ServerNotification__PatchApplyStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "declined",
+]).annotate({ identifier: "ServerNotification__PatchApplyStatus" });
+
+export type ServerNotification__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
};
-export const ServerNotification__CreditsSnapshot = Schema.Struct({
- balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- hasCredits: Schema.Boolean,
- unlimited: Schema.Boolean,
-});
+export const ServerNotification__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "ServerNotification__McpToolCallAppContext" });
-export type ServerNotification__DeprecationNoticeNotification = {
- readonly details?: string | null;
- readonly summary: string;
+export type ServerNotification__McpToolCallError = { readonly message: string };
+export const ServerNotification__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "ServerNotification__McpToolCallError" });
+
+export type ServerNotification__McpAppDisplayMode = "inline" | "fullscreen";
+export const ServerNotification__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "ServerNotification__McpAppDisplayMode" });
+
+export type ServerNotification__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
};
-export const ServerNotification__DeprecationNoticeNotification = Schema.Struct({
- details: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional extra guidance, such as migration steps or rationale.",
- }),
- Schema.Null,
- ]),
- ),
- summary: Schema.String.annotate({ description: "Concise summary of what is deprecated." }),
-});
+export const ServerNotification__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "ServerNotification__McpToolCallResult" });
+
+export type ServerNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const ServerNotification__McpToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "ServerNotification__McpToolCallStatus" });
export type ServerNotification__DynamicToolCallOutputContentItem =
| { readonly text: string; readonly type: "inputText" }
@@ -1999,132 +2380,405 @@ export const ServerNotification__DynamicToolCallOutputContentItem = Schema.Union
}).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "ServerNotification__DynamicToolCallOutputContentItem" });
export type ServerNotification__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
export const ServerNotification__DynamicToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
-]);
+]).annotate({ identifier: "ServerNotification__DynamicToolCallStatus" });
-export type ServerNotification__EnvironmentConnectionNotification = {
- readonly environmentId: string;
- readonly threadId: string;
-};
-export const ServerNotification__EnvironmentConnectionNotification = Schema.Struct({
- environmentId: Schema.String,
- threadId: Schema.String,
-});
+export type ServerNotification__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const ServerNotification__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "ServerNotification__CollabAgentStatus" });
-export type ServerNotification__ExternalAgentConfigMigrationItemType =
- | "AGENTS_MD"
- | "CONFIG"
- | "SKILLS"
- | "PLUGINS"
- | "MCP_SERVER_CONFIG"
- | "SUBAGENTS"
- | "HOOKS"
- | "COMMANDS"
- | "MEMORY"
- | "SESSIONS";
-export const ServerNotification__ExternalAgentConfigMigrationItemType = Schema.Literals([
- "AGENTS_MD",
- "CONFIG",
- "SKILLS",
- "PLUGINS",
- "MCP_SERVER_CONFIG",
- "SUBAGENTS",
- "HOOKS",
- "COMMANDS",
- "MEMORY",
- "SESSIONS",
-]);
+export type ServerNotification__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "interrupted";
+export const ServerNotification__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "interrupted",
+]).annotate({ identifier: "ServerNotification__CollabAgentToolCallStatus" });
-export type ServerNotification__FileChangeOutputDeltaNotification = {
- readonly delta: string;
- readonly itemId: string;
- readonly threadId: string;
- readonly turnId: string;
-};
-export const ServerNotification__FileChangeOutputDeltaNotification = Schema.Struct({
- delta: Schema.String,
- itemId: Schema.String,
- threadId: Schema.String,
- turnId: Schema.String,
-}).annotate({
- description:
- "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.",
-});
+export type ServerNotification__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const ServerNotification__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "ServerNotification__CollabAgentTool" });
-export type ServerNotification__FileSystemAccessMode = "read" | "write" | "deny";
-export const ServerNotification__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]);
+export type ServerNotification__SubAgentActivityKind =
+ | "started"
+ | "interacted"
+ | "interrupted"
+ | "completed";
+export const ServerNotification__SubAgentActivityKind = Schema.Literals([
+ "started",
+ "interacted",
+ "interrupted",
+ "completed",
+]).annotate({ identifier: "ServerNotification__SubAgentActivityKind" });
-export type ServerNotification__FuzzyFileSearchMatchType = "file" | "directory";
-export const ServerNotification__FuzzyFileSearchMatchType = Schema.Literals(["file", "directory"]);
+export type ServerNotification__WebSearchAction =
+ | {
+ readonly queries?: ReadonlyArray | null;
+ readonly query?: string | null;
+ readonly type: "search";
+ }
+ | { readonly type: "openPage"; readonly url?: string | null }
+ | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
+ | { readonly type: "other" };
+export const ServerNotification__WebSearchAction = Schema.Union(
+ [
+ Schema.Struct({
+ queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
+ }).annotate({ title: "SearchWebSearchAction" }),
+ Schema.Struct({
+ type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "OpenPageWebSearchAction" }),
+ Schema.Struct({
+ pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "FindInPageWebSearchAction" }),
+ Schema.Struct({
+ type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
+ }).annotate({ title: "OtherWebSearchAction" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ServerNotification__WebSearchAction" });
-export type ServerNotification__FuzzyFileSearchSessionCompletedNotification = {
- readonly sessionId: string;
+export type ServerNotification__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
};
-export const ServerNotification__FuzzyFileSearchSessionCompletedNotification = Schema.Struct({
- sessionId: Schema.String,
-});
+export const ServerNotification__ImageGenerationFailure = Schema.Union(
+ [
+ Schema.Struct({
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
+ }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ServerNotification__ImageGenerationFailure" });
-export type ServerNotification__GitInfo = {
- readonly branch?: string | null;
- readonly originUrl?: string | null;
- readonly sha?: string | null;
-};
-export const ServerNotification__GitInfo = Schema.Struct({
- branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+export type ServerNotification__TurnItemsView = "notLoaded" | "summary" | "full";
+export const ServerNotification__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ServerNotification__TurnItemsView" });
-export type ServerNotification__GuardianApprovalReviewStatus =
- | "inProgress"
- | "approved"
- | "denied"
- | "timedOut"
- | "aborted";
-export const ServerNotification__GuardianApprovalReviewStatus = Schema.Literals([
+export type ServerNotification__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress";
+export const ServerNotification__TurnStatus = Schema.Literals([
+ "completed",
+ "interrupted",
+ "failed",
"inProgress",
- "approved",
- "denied",
- "timedOut",
- "aborted",
-]).annotate({ description: "[UNSTABLE] Lifecycle state for an approval auto-review." });
+]).annotate({ identifier: "ServerNotification__TurnStatus" });
-export type ServerNotification__GuardianCommandSource = "shell" | "unifiedExec";
-export const ServerNotification__GuardianCommandSource = Schema.Literals(["shell", "unifiedExec"]);
+export type ServerNotification__ThreadArchivedNotification = { readonly threadId: string };
+export const ServerNotification__ThreadArchivedNotification = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ThreadArchivedNotification" });
-export type ServerNotification__GuardianRiskLevel = "low" | "medium" | "high" | "critical";
-export const ServerNotification__GuardianRiskLevel = Schema.Literals([
- "low",
- "medium",
- "high",
- "critical",
-]).annotate({ description: "[UNSTABLE] Risk level assigned by approval auto-review." });
+export type ServerNotification__ThreadDeletedNotification = { readonly threadId: string };
+export const ServerNotification__ThreadDeletedNotification = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ThreadDeletedNotification" });
-export type ServerNotification__GuardianUserAuthorization = "unknown" | "low" | "medium" | "high";
-export const ServerNotification__GuardianUserAuthorization = Schema.Literals([
- "unknown",
- "low",
- "medium",
- "high",
-]).annotate({ description: "[UNSTABLE] Authorization level assigned by approval auto-review." });
+export type ServerNotification__ThreadUnarchivedNotification = { readonly threadId: string };
+export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ThreadUnarchivedNotification" });
-export type ServerNotification__GuardianWarningNotification = {
- readonly message: string;
+export type ServerNotification__ThreadClosedNotification = { readonly threadId: string };
+export const ServerNotification__ThreadClosedNotification = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ThreadClosedNotification" });
+
+export type ServerNotification__ThreadRevertedNotification = { readonly threadId: string };
+export const ServerNotification__ThreadRevertedNotification = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ThreadRevertedNotification" });
+
+export type ServerNotification__SkillsChangedNotification = { readonly [x: string]: Schema.Json };
+export const ServerNotification__SkillsChangedNotification = Schema.Record(
+ Schema.String,
+ Schema.Json.annotate({ expected: "JSON value" }),
+).annotate({
+ description:
+ "Notification emitted when watched local skill files change.\n\nTreat this as an invalidation signal and re-run `skills/list` with the client's current parameters when refreshed skill metadata is needed.",
+ identifier: "ServerNotification__SkillsChangedNotification",
+});
+
+export type ServerNotification__ThreadNameUpdatedNotification = {
readonly threadId: string;
+ readonly threadName?: string | null;
};
-export const ServerNotification__GuardianWarningNotification = Schema.Struct({
- message: Schema.String.annotate({
- description: "Concise guardian warning message for the user.",
+export const ServerNotification__ThreadNameUpdatedNotification = Schema.Struct({
+ threadId: Schema.String,
+ threadName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "ServerNotification__ThreadNameUpdatedNotification" });
+
+export type ServerNotification__ThreadAttachmentOperation = "created" | "deleted";
+export const ServerNotification__ThreadAttachmentOperation = Schema.Literals([
+ "created",
+ "deleted",
+]).annotate({
+ description: "The persisted attachment change represented by a notification.",
+ identifier: "ServerNotification__ThreadAttachmentOperation",
+});
+
+export type ServerNotification__ThreadGoalStatus =
+ | "active"
+ | "paused"
+ | "blocked"
+ | "usageLimited"
+ | "budgetLimited"
+ | "complete";
+export const ServerNotification__ThreadGoalStatus = Schema.Literals([
+ "active",
+ "paused",
+ "blocked",
+ "usageLimited",
+ "budgetLimited",
+ "complete",
+]).annotate({ identifier: "ServerNotification__ThreadGoalStatus" });
+
+export type ServerNotification__ThreadGoalClearedNotification = { readonly threadId: string };
+export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ThreadGoalClearedNotification" });
+
+export type ServerNotification__ThreadQueueChangedNotification = { readonly threadId: string };
+export const ServerNotification__ThreadQueueChangedNotification = Schema.Struct({
+ threadId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ThreadQueueChangedNotification" });
+
+export type ServerNotification__ProjectChangeType = "created" | "updated" | "deleted";
+export const ServerNotification__ProjectChangeType = Schema.Literals([
+ "created",
+ "updated",
+ "deleted",
+]).annotate({ identifier: "ServerNotification__ProjectChangeType" });
+
+export type ServerNotification__ThreadProjectUpdatedNotification = {
+ readonly projectId: string | null;
+ readonly threadId: string;
+};
+export const ServerNotification__ThreadProjectUpdatedNotification = Schema.Struct({
+ projectId: Schema.Union([Schema.String, Schema.Null]),
+ threadId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ThreadProjectUpdatedNotification" });
+
+export type ServerNotification__EnvironmentConnectionNotification = {
+ readonly environmentId: string;
+ readonly threadId: string;
+};
+export const ServerNotification__EnvironmentConnectionNotification = Schema.Struct({
+ environmentId: Schema.String,
+ threadId: Schema.String,
+}).annotate({ identifier: "ServerNotification__EnvironmentConnectionNotification" });
+
+export type ServerNotification__ActivePermissionProfile = {
+ readonly extends?: string | null;
+ readonly id: string;
+};
+export const ServerNotification__ActivePermissionProfile = Schema.Struct({
+ extends: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+ id: Schema.String.annotate({
+ description:
+ "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.",
}),
- threadId: Schema.String.annotate({ description: "Thread target for the guardian warning." }),
+}).annotate({ identifier: "ServerNotification__ActivePermissionProfile" });
+
+export type ServerNotification__AskForApproval =
+ | "untrusted"
+ | "on-request"
+ | "never"
+ | {
+ readonly granular: {
+ readonly mcp_elicitations: boolean;
+ readonly request_permissions?: boolean;
+ readonly rules: boolean;
+ readonly sandbox_approval: boolean;
+ readonly skill_approval?: boolean;
+ };
+ };
+export const ServerNotification__AskForApproval = Schema.Union(
+ [
+ Schema.Literals(["untrusted", "on-request", "never"]),
+ Schema.Struct({
+ granular: Schema.Struct({
+ mcp_elicitations: Schema.Boolean,
+ request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
+ rules: Schema.Boolean,
+ sandbox_approval: Schema.Boolean,
+ skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
+ }),
+ }).annotate({ title: "GranularAskForApproval" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ServerNotification__AskForApproval" });
+
+export type ServerNotification__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
+export const ServerNotification__ApprovalsReviewer = Schema.Literals([
+ "user",
+ "auto_review",
+ "guardian_subagent",
+]).annotate({
+ description:
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ identifier: "ServerNotification__ApprovalsReviewer",
+});
+
+export type ServerNotification__ModeKind = "plan" | "default";
+export const ServerNotification__ModeKind = Schema.Literals(["plan", "default"]).annotate({
+ description: "Initial collaboration mode to use when the TUI starts.",
+ identifier: "ServerNotification__ModeKind",
+});
+
+export type ServerNotification__Personality = "none" | "friendly" | "pragmatic";
+export const ServerNotification__Personality = Schema.Literals([
+ "none",
+ "friendly",
+ "pragmatic",
+]).annotate({
+ description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
+ identifier: "ServerNotification__Personality",
+});
+
+export type ServerNotification__NetworkAccess = "restricted" | "enabled";
+export const ServerNotification__NetworkAccess = Schema.Literals([
+ "restricted",
+ "enabled",
+]).annotate({ identifier: "ServerNotification__NetworkAccess" });
+
+export type ServerNotification__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
+export const ServerNotification__ReasoningSummary = Schema.Union(
+ [
+ Schema.Literals(["auto", "concise", "detailed"]),
+ Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description:
+ "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
+ identifier: "ServerNotification__ReasoningSummary",
});
+export type ServerNotification__TokenUsageBreakdown = {
+ readonly cacheWriteInputTokens?: number;
+ readonly cachedInputTokens: number;
+ readonly inputTokens: number;
+ readonly outputTokens: number;
+ readonly reasoningOutputTokens: number;
+ readonly totalTokens: number;
+};
+export const ServerNotification__TokenUsageBreakdown = Schema.Struct({
+ cacheWriteInputTokens: Schema.optionalKey(
+ Schema.Number.annotate({ default: 0, format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ ),
+ cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ inputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ outputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ totalTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+}).annotate({ identifier: "ServerNotification__TokenUsageBreakdown" });
+
+export type ServerNotification__HookOutputEntryKind =
+ | "warning"
+ | "stop"
+ | "feedback"
+ | "context"
+ | "error";
+export const ServerNotification__HookOutputEntryKind = Schema.Literals([
+ "warning",
+ "stop",
+ "feedback",
+ "context",
+ "error",
+]).annotate({ identifier: "ServerNotification__HookOutputEntryKind" });
+
export type ServerNotification__HookEventName =
| "preToolUse"
| "permissionRequest"
@@ -2136,7 +2790,8 @@ export type ServerNotification__HookEventName =
| "userPromptSubmit"
| "subagentStart"
| "subagentStop"
- | "stop";
+ | "stop"
+ | "interrupt";
export const ServerNotification__HookEventName = Schema.Literals([
"preToolUse",
"permissionRequest",
@@ -2149,37 +2804,53 @@ export const ServerNotification__HookEventName = Schema.Literals([
"subagentStart",
"subagentStop",
"stop",
-]);
+ "interrupt",
+]).annotate({ identifier: "ServerNotification__HookEventName" });
export type ServerNotification__HookExecutionMode = "sync" | "async";
-export const ServerNotification__HookExecutionMode = Schema.Literals(["sync", "async"]);
-
-export type ServerNotification__HookHandlerType = "command" | "prompt" | "agent";
-export const ServerNotification__HookHandlerType = Schema.Literals(["command", "prompt", "agent"]);
+export const ServerNotification__HookExecutionMode = Schema.Literals(["sync", "async"]).annotate({
+ identifier: "ServerNotification__HookExecutionMode",
+});
-export type ServerNotification__HookOutputEntryKind =
- | "warning"
- | "stop"
- | "feedback"
- | "context"
- | "error";
-export const ServerNotification__HookOutputEntryKind = Schema.Literals([
- "warning",
- "stop",
- "feedback",
- "context",
- "error",
-]);
+export type ServerNotification__HookHandlerType = "command" | "mcpTool" | "prompt" | "agent";
+export const ServerNotification__HookHandlerType = Schema.Literals([
+ "command",
+ "mcpTool",
+ "prompt",
+ "agent",
+]).annotate({ identifier: "ServerNotification__HookHandlerType" });
-export type ServerNotification__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
-};
-export const ServerNotification__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
+export type ServerNotification__HookScope = "thread" | "turn";
+export const ServerNotification__HookScope = Schema.Literals(["thread", "turn"]).annotate({
+ identifier: "ServerNotification__HookScope",
});
+export type ServerNotification__HookSource =
+ | "system"
+ | "user"
+ | "project"
+ | "mdm"
+ | "sessionFlags"
+ | "plugin"
+ | "cloudRequirements"
+ | "cloudManagedConfig"
+ | "legacyManagedConfigFile"
+ | "legacyManagedConfigMdm"
+ | "unknown";
+export const ServerNotification__HookSource = Schema.Literals([
+ "system",
+ "user",
+ "project",
+ "mdm",
+ "sessionFlags",
+ "plugin",
+ "cloudRequirements",
+ "cloudManagedConfig",
+ "legacyManagedConfigFile",
+ "legacyManagedConfigMdm",
+ "unknown",
+]).annotate({ identifier: "ServerNotification__HookSource" });
+
export type ServerNotification__HookRunStatus =
| "running"
| "completed"
@@ -2192,151 +2863,35 @@ export const ServerNotification__HookRunStatus = Schema.Literals([
"failed",
"blocked",
"stopped",
-]);
-
-export type ServerNotification__HookScope = "thread" | "turn";
-export const ServerNotification__HookScope = Schema.Literals(["thread", "turn"]);
-
-export type ServerNotification__ImageDetail = "auto" | "low" | "high" | "original";
-export const ServerNotification__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
-
-export type ServerNotification__LegacyAppPathString = string;
-export const ServerNotification__LegacyAppPathString = Schema.String;
-
-export type ServerNotification__McpServerOauthLoginCompletedNotification = {
- readonly error?: string | null;
- readonly name: string;
- readonly success: boolean;
- readonly threadId?: string | null;
-};
-export const ServerNotification__McpServerOauthLoginCompletedNotification = Schema.Struct({
- error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- name: Schema.String,
- success: Schema.Boolean,
- threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type ServerNotification__McpServerStartupFailureReason = "reauthenticationRequired";
-export const ServerNotification__McpServerStartupFailureReason = Schema.Literal(
- "reauthenticationRequired",
-);
-
-export type ServerNotification__McpServerStartupState =
- | "starting"
- | "ready"
- | "failed"
- | "cancelled";
-export const ServerNotification__McpServerStartupState = Schema.Literals([
- "starting",
- "ready",
- "failed",
- "cancelled",
-]);
-
-export type ServerNotification__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
-};
-export const ServerNotification__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type ServerNotification__McpToolCallError = { readonly message: string };
-export const ServerNotification__McpToolCallError = Schema.Struct({ message: Schema.String });
+]).annotate({ identifier: "ServerNotification__HookRunStatus" });
-export type ServerNotification__McpToolCallProgressNotification = {
- readonly itemId: string;
- readonly message: string;
+export type ServerNotification__TurnDiffUpdatedNotification = {
+ readonly diff: string;
readonly threadId: string;
readonly turnId: string;
};
-export const ServerNotification__McpToolCallProgressNotification = Schema.Struct({
- itemId: Schema.String,
- message: Schema.String,
+export const ServerNotification__TurnDiffUpdatedNotification = Schema.Struct({
+ diff: Schema.String,
threadId: Schema.String,
turnId: Schema.String,
+}).annotate({
+ description:
+ "Notification that the turn-level unified diff has changed. Contains the latest aggregated diff across all file changes in the turn.",
+ identifier: "ServerNotification__TurnDiffUpdatedNotification",
});
-export type ServerNotification__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const ServerNotification__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
-});
-
-export type ServerNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const ServerNotification__McpToolCallStatus = Schema.Literals([
+export type ServerNotification__TurnPlanStepStatus = "pending" | "inProgress" | "completed";
+export const ServerNotification__TurnPlanStepStatus = Schema.Literals([
+ "pending",
"inProgress",
"completed",
- "failed",
-]);
-
-export type ServerNotification__MemoryCitationEntry = {
- readonly lineEnd: number;
- readonly lineStart: number;
- readonly note: string;
- readonly path: string;
-};
-export const ServerNotification__MemoryCitationEntry = Schema.Struct({
- lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- note: Schema.String,
- path: Schema.String,
-});
-
-export type ServerNotification__MessagePhase = "commentary" | "final_answer";
-export const ServerNotification__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
- description:
- 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
-});
-
-export type ServerNotification__ModeKind = "plan" | "default";
-export const ServerNotification__ModeKind = Schema.Literals(["plan", "default"]).annotate({
- description: "Initial collaboration mode to use when the TUI starts.",
-});
-
-export type ServerNotification__ModelRerouteReason = "highRiskCyberActivity";
-export const ServerNotification__ModelRerouteReason = Schema.Literal("highRiskCyberActivity");
-
-export type ServerNotification__ModelSafetyBufferingUpdatedNotification = {
- readonly fasterModel?: string | null;
- readonly model: string;
- readonly reasons: ReadonlyArray;
- readonly showBufferingUi: boolean;
- readonly threadId: string;
- readonly turnId: string;
- readonly useCases: ReadonlyArray;
-};
-export const ServerNotification__ModelSafetyBufferingUpdatedNotification = Schema.Struct({
- fasterModel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- model: Schema.String,
- reasons: Schema.Array(Schema.String),
- showBufferingUi: Schema.Boolean,
- threadId: Schema.String,
- turnId: Schema.String,
- useCases: Schema.Array(Schema.String),
-});
+]).annotate({ identifier: "ServerNotification__TurnPlanStepStatus" });
-export type ServerNotification__ModelVerification = "trustedAccessForCyber";
-export const ServerNotification__ModelVerification = Schema.Literal("trustedAccessForCyber");
+export type ServerNotification__GuardianCommandSource = "shell" | "unifiedExec";
+export const ServerNotification__GuardianCommandSource = Schema.Literals([
+ "shell",
+ "unifiedExec",
+]).annotate({ identifier: "ServerNotification__GuardianCommandSource" });
export type ServerNotification__NetworkApprovalProtocol =
| "http"
@@ -2348,45 +2903,93 @@ export const ServerNotification__NetworkApprovalProtocol = Schema.Literals([
"https",
"socks5Tcp",
"socks5Udp",
-]);
+]).annotate({ identifier: "ServerNotification__NetworkApprovalProtocol" });
-export type ServerNotification__NonSteerableTurnKind = "review" | "compact";
-export const ServerNotification__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
+export type ServerNotification__FileSystemAccessMode = "read" | "write" | "deny";
+export const ServerNotification__FileSystemAccessMode = Schema.Literals([
+ "read",
+ "write",
+ "deny",
+]).annotate({ identifier: "ServerNotification__FileSystemAccessMode" });
-export type ServerNotification__PatchApplyStatus =
+export type ServerNotification__AdditionalNetworkPermissions = {
+ readonly enabled?: boolean | null;
+};
+export const ServerNotification__AdditionalNetworkPermissions = Schema.Struct({
+ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
+}).annotate({ identifier: "ServerNotification__AdditionalNetworkPermissions" });
+
+export type ServerNotification__GuardianRiskLevel = "low" | "medium" | "high" | "critical";
+export const ServerNotification__GuardianRiskLevel = Schema.Literals([
+ "low",
+ "medium",
+ "high",
+ "critical",
+]).annotate({
+ description: "[UNSTABLE] Risk level assigned by approval auto-review.",
+ identifier: "ServerNotification__GuardianRiskLevel",
+});
+
+export type ServerNotification__GuardianApprovalReviewStatus =
| "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const ServerNotification__PatchApplyStatus = Schema.Literals([
+ | "approved"
+ | "denied"
+ | "timedOut"
+ | "aborted";
+export const ServerNotification__GuardianApprovalReviewStatus = Schema.Literals([
"inProgress",
- "completed",
- "failed",
- "declined",
-]);
+ "approved",
+ "denied",
+ "timedOut",
+ "aborted",
+]).annotate({
+ description: "[UNSTABLE] Lifecycle state for an approval auto-review.",
+ identifier: "ServerNotification__GuardianApprovalReviewStatus",
+});
-export type ServerNotification__PatchChangeKind =
- | { readonly type: "add" }
- | { readonly type: "delete" }
- | { readonly move_path?: string | null; readonly type: "update" };
-export const ServerNotification__PatchChangeKind = Schema.Union(
- [
- Schema.Struct({
- type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
- }).annotate({ title: "AddPatchChangeKind" }),
- Schema.Struct({
- type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
- }).annotate({ title: "DeletePatchChangeKind" }),
- Schema.Struct({
- move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
- }).annotate({ title: "UpdatePatchChangeKind" }),
- ],
- { mode: "oneOf" },
-);
+export type ServerNotification__GuardianUserAuthorization = "unknown" | "low" | "medium" | "high";
+export const ServerNotification__GuardianUserAuthorization = Schema.Literals([
+ "unknown",
+ "low",
+ "medium",
+ "high",
+]).annotate({
+ description: "[UNSTABLE] Authorization level assigned by approval auto-review.",
+ identifier: "ServerNotification__GuardianUserAuthorization",
+});
-export type ServerNotification__Personality = "none" | "friendly" | "pragmatic";
-export const ServerNotification__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
+export type ServerNotification__AutoReviewDecisionSource = "agent";
+export const ServerNotification__AutoReviewDecisionSource = Schema.Literal("agent").annotate({
+ description: "[UNSTABLE] Source that produced a terminal approval auto-review decision.",
+ identifier: "ServerNotification__AutoReviewDecisionSource",
+});
+
+export type ServerNotification__StrictReviewRequiredNotification = {
+ readonly startedAtMs: number;
+ readonly threadId: string;
+ readonly turnId: string;
+};
+export const ServerNotification__StrictReviewRequiredNotification = Schema.Struct({
+ startedAtMs: Schema.Number.annotate({
+ description: "Unix timestamp (in milliseconds) when this review started.",
+ format: "int64",
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
+ threadId: Schema.String,
+ turnId: Schema.String,
+}).annotate({ identifier: "ServerNotification__StrictReviewRequiredNotification" });
+
+export type ServerNotification__AgentMessageDeltaNotification = {
+ readonly delta: string;
+ readonly itemId: string;
+ readonly threadId: string;
+ readonly turnId: string;
+};
+export const ServerNotification__AgentMessageDeltaNotification = Schema.Struct({
+ delta: Schema.String,
+ itemId: Schema.String,
+ threadId: Schema.String,
+ turnId: Schema.String,
+}).annotate({ identifier: "ServerNotification__AgentMessageDeltaNotification" });
export type ServerNotification__PlanDeltaNotification = {
readonly delta: string;
@@ -2402,45 +3005,36 @@ export const ServerNotification__PlanDeltaNotification = Schema.Struct({
}).annotate({
description:
"EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should not assume concatenated deltas match the completed plan item content.",
+ identifier: "ServerNotification__PlanDeltaNotification",
});
-export type ServerNotification__PlanType =
- | "free"
- | "go"
- | "plus"
- | "pro"
- | "prolite"
- | "team"
- | "self_serve_business_prolite"
- | "self_serve_business_usage_based"
- | "business"
- | "ent26"
- | "enterprise_cbp_automation"
- | "enterprise_cbp_usage_based"
- | "enterprise"
- | "edu"
- | "edu_plus"
- | "edu_pro"
- | "unknown";
-export const ServerNotification__PlanType = Schema.Literals([
- "free",
- "go",
- "plus",
- "pro",
- "prolite",
- "team",
- "self_serve_business_prolite",
- "self_serve_business_usage_based",
- "business",
- "ent26",
- "enterprise_cbp_automation",
- "enterprise_cbp_usage_based",
- "enterprise",
- "edu",
- "edu_plus",
- "edu_pro",
- "unknown",
-]);
+export type ServerNotification__CommandExecOutputStream = "stdout" | "stderr";
+export const ServerNotification__CommandExecOutputStream = Schema.Union(
+ [
+ Schema.Literal("stdout").annotate({
+ description: "stdout stream. PTY mode multiplexes terminal output here.",
+ }),
+ Schema.Literal("stderr").annotate({ description: "stderr stream." }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "Stream label for `command/exec/outputDelta` notifications.",
+ identifier: "ServerNotification__CommandExecOutputStream",
+});
+
+export type ServerNotification__ProcessOutputStream = "stdout" | "stderr";
+export const ServerNotification__ProcessOutputStream = Schema.Union(
+ [
+ Schema.Literal("stdout").annotate({
+ description: "stdout stream. PTY mode multiplexes terminal output here.",
+ }),
+ Schema.Literal("stderr").annotate({ description: "stderr stream." }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "Stream label for `process/outputDelta` notifications.",
+ identifier: "ServerNotification__ProcessOutputStream",
+});
export type ServerNotification__ProcessExitedNotification = {
readonly exitCode: number;
@@ -2452,7 +3046,7 @@ export type ServerNotification__ProcessExitedNotification = {
};
export const ServerNotification__ProcessExitedNotification = Schema.Struct({
exitCode: Schema.Number.annotate({ description: "Process exit code.", format: "int32" }).check(
- Schema.isInt(),
+ Schema.isInt().annotate({ expected: "an integer" }),
),
processHandle: Schema.String.annotate({
description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.",
@@ -2473,146 +3067,187 @@ export const ServerNotification__ProcessExitedNotification = Schema.Struct({
description:
"Whether stdout reached `outputBytesCap`.\n\nIn streaming mode, stdout is empty and cap state is also reported on the final stdout `process/outputDelta` notification.",
}),
-}).annotate({ description: "Final process exit notification for `process/spawn`." });
-
-export type ServerNotification__ProcessOutputDeltaNotification = {
- readonly capReached: boolean;
- readonly deltaBase64: string;
- readonly processHandle: string;
- readonly stream: "stdout" | "stderr";
-};
-export const ServerNotification__ProcessOutputDeltaNotification = Schema.Struct({
- capReached: Schema.Boolean.annotate({
- description:
- "True on the final streamed chunk for this stream when output was truncated by `outputBytesCap`.",
- }),
- deltaBase64: Schema.String.annotate({ description: "Base64-encoded output bytes." }),
- processHandle: Schema.String.annotate({
- description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.",
- }),
- stream: Schema.Literals(["stdout", "stderr"]).annotate({
- description: "Stream label for `process/outputDelta` notifications.",
- }),
}).annotate({
- description: "Base64-encoded output chunk emitted for a streaming `process/spawn` request.",
+ description: "Final process exit notification for `process/spawn`.",
+ identifier: "ServerNotification__ProcessExitedNotification",
});
-export type ServerNotification__RateLimitReachedType =
- | "rate_limit_reached"
- | "workspace_owner_credits_depleted"
- | "workspace_member_credits_depleted"
- | "workspace_owner_usage_limit_reached"
- | "workspace_member_usage_limit_reached";
-export const ServerNotification__RateLimitReachedType = Schema.Literals([
- "rate_limit_reached",
- "workspace_owner_credits_depleted",
- "workspace_member_credits_depleted",
- "workspace_owner_usage_limit_reached",
- "workspace_member_usage_limit_reached",
-]);
-
-export type ServerNotification__RateLimitWindow = {
- readonly resetsAt?: number | null;
- readonly usedPercent: number;
- readonly windowDurationMins?: number | null;
+export type ServerNotification__CommandExecutionOutputDeltaNotification = {
+ readonly delta: string;
+ readonly itemId: string;
+ readonly threadId: string;
+ readonly turnId: string;
};
-export const ServerNotification__RateLimitWindow = Schema.Struct({
- resetsAt: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
- ),
- usedPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
- windowDurationMins: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
- ),
-});
-
-export type ServerNotification__RealtimeConversationVersion = "v1" | "v2" | "v3";
-export const ServerNotification__RealtimeConversationVersion = Schema.Literals(["v1", "v2", "v3"]);
-
-export type ServerNotification__ReasoningEffort = string;
-export const ServerNotification__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
-
-export type ServerNotification__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
-export const ServerNotification__ReasoningSummary = Schema.Union(
- [
- Schema.Literals(["auto", "concise", "detailed"]),
- Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
- ],
- { mode: "oneOf" },
-).annotate({
- description:
- "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
-});
+export const ServerNotification__CommandExecutionOutputDeltaNotification = Schema.Struct({
+ delta: Schema.String,
+ itemId: Schema.String,
+ threadId: Schema.String,
+ turnId: Schema.String,
+}).annotate({ identifier: "ServerNotification__CommandExecutionOutputDeltaNotification" });
-export type ServerNotification__ReasoningSummaryPartAddedNotification = {
+export type ServerNotification__TerminalInteractionNotification = {
readonly itemId: string;
- readonly summaryIndex: number;
+ readonly processId: string;
+ readonly stdin: string;
readonly threadId: string;
readonly turnId: string;
};
-export const ServerNotification__ReasoningSummaryPartAddedNotification = Schema.Struct({
+export const ServerNotification__TerminalInteractionNotification = Schema.Struct({
itemId: Schema.String,
- summaryIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
+ processId: Schema.String,
+ stdin: Schema.String,
threadId: Schema.String,
turnId: Schema.String,
-});
+}).annotate({ identifier: "ServerNotification__TerminalInteractionNotification" });
-export type ServerNotification__ReasoningSummaryTextDeltaNotification = {
+export type ServerNotification__FileChangeOutputDeltaNotification = {
readonly delta: string;
readonly itemId: string;
- readonly summaryIndex: number;
readonly threadId: string;
readonly turnId: string;
};
-export const ServerNotification__ReasoningSummaryTextDeltaNotification = Schema.Struct({
+export const ServerNotification__FileChangeOutputDeltaNotification = Schema.Struct({
delta: Schema.String,
itemId: Schema.String,
- summaryIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
threadId: Schema.String,
turnId: Schema.String,
+}).annotate({
+ description:
+ "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.",
+ identifier: "ServerNotification__FileChangeOutputDeltaNotification",
});
-export type ServerNotification__ReasoningTextDeltaNotification = {
- readonly contentIndex: number;
- readonly delta: string;
+export type ServerNotification__RequestId = string | number;
+export const ServerNotification__RequestId = Schema.Union([
+ Schema.String,
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+]).annotate({ identifier: "ServerNotification__RequestId" });
+
+export type ServerNotification__McpToolCallProgressNotification = {
readonly itemId: string;
+ readonly message: string;
readonly threadId: string;
readonly turnId: string;
};
-export const ServerNotification__ReasoningTextDeltaNotification = Schema.Struct({
- contentIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- delta: Schema.String,
+export const ServerNotification__McpToolCallProgressNotification = Schema.Struct({
itemId: Schema.String,
+ message: Schema.String,
threadId: Schema.String,
turnId: Schema.String,
-});
+}).annotate({ identifier: "ServerNotification__McpToolCallProgressNotification" });
-export type ServerNotification__RemoteControlConnectionStatus =
- | "disabled"
- | "connecting"
- | "connected"
- | "errored";
-export const ServerNotification__RemoteControlConnectionStatus = Schema.Literals([
- "disabled",
- "connecting",
- "connected",
- "errored",
-]);
+export type ServerNotification__McpServerOauthLoginCompletedNotification = {
+ readonly error?: string | null;
+ readonly name: string;
+ readonly success: boolean;
+ readonly threadId?: string | null;
+};
+export const ServerNotification__McpServerOauthLoginCompletedNotification = Schema.Struct({
+ error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ name: Schema.String,
+ success: Schema.Boolean,
+ threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "ServerNotification__McpServerOauthLoginCompletedNotification" });
-export type ServerNotification__RequestId = string | number;
-export const ServerNotification__RequestId = Schema.Union([
- Schema.String,
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-]);
+export type ServerNotification__McpServerStartupFailureReason = "reauthenticationRequired";
+export const ServerNotification__McpServerStartupFailureReason = Schema.Literal(
+ "reauthenticationRequired",
+).annotate({ identifier: "ServerNotification__McpServerStartupFailureReason" });
-export type ServerNotification__SkillsChangedNotification = {};
-export const ServerNotification__SkillsChangedNotification = Schema.Struct({}).annotate({
- description:
- "Notification emitted when watched local skill files change.\n\nTreat this as an invalidation signal and re-run `skills/list` with the client's current parameters when refreshed skill metadata is needed.",
+export type ServerNotification__McpServerStartupState =
+ | "starting"
+ | "ready"
+ | "failed"
+ | "cancelled";
+export const ServerNotification__McpServerStartupState = Schema.Literals([
+ "starting",
+ "ready",
+ "failed",
+ "cancelled",
+]).annotate({ identifier: "ServerNotification__McpServerStartupState" });
+
+export type ServerNotification__McpServerEventNotification = {
+ readonly method: string;
+ readonly params: Schema.Json;
+};
+export const ServerNotification__McpServerEventNotification = Schema.Struct({
+ method: Schema.String,
+ params: Schema.Json.annotate({ expected: "JSON value" }),
+}).annotate({ identifier: "ServerNotification__McpServerEventNotification" });
+
+export type ServerNotification__AuthMode =
+ | "apikey"
+ | "chatgpt"
+ | "chatgptAuthTokens"
+ | "headers"
+ | "agentIdentity"
+ | "personalAccessToken"
+ | "bedrockApiKey"
+ | "bedrockAccessKeys";
+export const ServerNotification__AuthMode = Schema.Union(
+ [
+ Schema.Literal("apikey").annotate({
+ description: "OpenAI API key provided by the caller and stored by Codex.",
+ }),
+ Schema.Literal("chatgpt").annotate({
+ description: "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
+ }),
+ Schema.Literal("chatgptAuthTokens").annotate({
+ description:
+ "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.\n\nChatGPT auth tokens are supplied by an external host app and are only stored in memory. Token refresh must be handled by the external host app.",
+ }),
+ Schema.Literal("headers").annotate({
+ description: "Backend auth supplied as request headers.",
+ }),
+ Schema.Literal("agentIdentity").annotate({
+ description: "Programmatic Codex auth backed by a registered Agent Identity.",
+ }),
+ Schema.Literal("personalAccessToken").annotate({
+ description: "Programmatic Codex auth backed by a personal access token.",
+ }),
+ Schema.Literal("bedrockApiKey").annotate({
+ description: "Amazon Bedrock bearer token managed by Codex.",
+ }),
+ Schema.Literal("bedrockAccessKeys").annotate({
+ description: "Amazon Bedrock AWS access keys managed by Codex.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "Authentication mode for OpenAI-backed providers.",
+ identifier: "ServerNotification__AuthMode",
});
+export type ServerNotification__PlanType = string;
+export const ServerNotification__PlanType = Schema.String.annotate({
+ identifier: "ServerNotification__PlanType",
+});
+
+export type ServerNotification__GatewayOAuthStatus =
+ | "notReady"
+ | "started"
+ | "succeeded"
+ | "failed";
+export const ServerNotification__GatewayOAuthStatus = Schema.Literals([
+ "notReady",
+ "started",
+ "succeeded",
+ "failed",
+]).annotate({ identifier: "ServerNotification__GatewayOAuthStatus" });
+
+export type ServerNotification__CreditsSnapshot = {
+ readonly balance?: string | null;
+ readonly hasCredits: boolean;
+ readonly unlimited: boolean;
+};
+export const ServerNotification__CreditsSnapshot = Schema.Struct({
+ balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ hasCredits: Schema.Boolean,
+ unlimited: Schema.Boolean,
+}).annotate({ identifier: "ServerNotification__CreditsSnapshot" });
+
export type ServerNotification__SpendControlLimitSnapshot = {
readonly limit: string;
readonly remainingPercent: number;
@@ -2621,62 +3256,284 @@ export type ServerNotification__SpendControlLimitSnapshot = {
};
export const ServerNotification__SpendControlLimitSnapshot = Schema.Struct({
limit: Schema.String,
- remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
- resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
+ remainingPercent: Schema.Number.annotate({ format: "int32" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ resetsAt: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
used: Schema.String,
+}).annotate({ identifier: "ServerNotification__SpendControlLimitSnapshot" });
+
+export type ServerNotification__RateLimitWindow = {
+ readonly resetsAt?: number | null;
+ readonly usedPercent: number;
+ readonly windowDurationMins?: number | null;
+};
+export const ServerNotification__RateLimitWindow = Schema.Struct({
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ usedPercent: Schema.Number.annotate({ format: "int32" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ windowDurationMins: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "ServerNotification__RateLimitWindow" });
+
+export type ServerNotification__RateLimitReachedType =
+ | "rate_limit_reached"
+ | "workspace_owner_credits_depleted"
+ | "workspace_member_credits_depleted"
+ | "workspace_owner_usage_limit_reached"
+ | "workspace_member_usage_limit_reached";
+export const ServerNotification__RateLimitReachedType = Schema.Literals([
+ "rate_limit_reached",
+ "workspace_owner_credits_depleted",
+ "workspace_member_credits_depleted",
+ "workspace_owner_usage_limit_reached",
+ "workspace_member_usage_limit_reached",
+]).annotate({ identifier: "ServerNotification__RateLimitReachedType" });
+
+export type ServerNotification__AppReview = { readonly status: string };
+export const ServerNotification__AppReview = Schema.Struct({ status: Schema.String }).annotate({
+ identifier: "ServerNotification__AppReview",
});
-export type ServerNotification__SubAgentActivityKind =
- | "started"
- | "interacted"
- | "interrupted"
- | "completed";
-export const ServerNotification__SubAgentActivityKind = Schema.Literals([
- "started",
- "interacted",
- "interrupted",
- "completed",
-]);
+export type ServerNotification__AppScreenshot = {
+ readonly fileId?: string | null;
+ readonly url?: string | null;
+ readonly userPrompt: string;
+};
+export const ServerNotification__AppScreenshot = Schema.Struct({
+ fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ userPrompt: Schema.String,
+}).annotate({ identifier: "ServerNotification__AppScreenshot" });
-export type ServerNotification__TerminalInteractionNotification = {
+export type ServerNotification__AppBranding = {
+ readonly category?: string | null;
+ readonly developer?: string | null;
+ readonly isDiscoverableApp: boolean;
+ readonly privacyPolicy?: string | null;
+ readonly termsOfService?: string | null;
+ readonly website?: string | null;
+};
+export const ServerNotification__AppBranding = Schema.Struct({
+ category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ isDiscoverableApp: Schema.Boolean,
+ privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
+ identifier: "ServerNotification__AppBranding",
+});
+
+export type ServerNotification__RemoteControlConnectionStatus =
+ | "disabled"
+ | "connecting"
+ | "connected"
+ | "errored";
+export const ServerNotification__RemoteControlConnectionStatus = Schema.Literals([
+ "disabled",
+ "connecting",
+ "connected",
+ "errored",
+]).annotate({ identifier: "ServerNotification__RemoteControlConnectionStatus" });
+
+export type ServerNotification__ExternalAgentConfigMigrationItemType =
+ | "AGENTS_MD"
+ | "CONFIG"
+ | "SKILLS"
+ | "PLUGINS"
+ | "MCP_SERVER_CONFIG"
+ | "SUBAGENTS"
+ | "HOOKS"
+ | "COMMANDS"
+ | "MEMORY"
+ | "SESSIONS";
+export const ServerNotification__ExternalAgentConfigMigrationItemType = Schema.Literals([
+ "AGENTS_MD",
+ "CONFIG",
+ "SKILLS",
+ "PLUGINS",
+ "MCP_SERVER_CONFIG",
+ "SUBAGENTS",
+ "HOOKS",
+ "COMMANDS",
+ "MEMORY",
+ "SESSIONS",
+]).annotate({ identifier: "ServerNotification__ExternalAgentConfigMigrationItemType" });
+
+export type ServerNotification__ReasoningSummaryTextDeltaNotification = {
+ readonly delta: string;
readonly itemId: string;
- readonly processId: string;
- readonly stdin: string;
+ readonly summaryIndex: number;
readonly threadId: string;
readonly turnId: string;
};
-export const ServerNotification__TerminalInteractionNotification = Schema.Struct({
+export const ServerNotification__ReasoningSummaryTextDeltaNotification = Schema.Struct({
+ delta: Schema.String,
+ itemId: Schema.String,
+ summaryIndex: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ threadId: Schema.String,
+ turnId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ReasoningSummaryTextDeltaNotification" });
+
+export type ServerNotification__ReasoningSummaryPartAddedNotification = {
+ readonly itemId: string;
+ readonly summaryIndex: number;
+ readonly threadId: string;
+ readonly turnId: string;
+};
+export const ServerNotification__ReasoningSummaryPartAddedNotification = Schema.Struct({
+ itemId: Schema.String,
+ summaryIndex: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ threadId: Schema.String,
+ turnId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ReasoningSummaryPartAddedNotification" });
+
+export type ServerNotification__ReasoningTextDeltaNotification = {
+ readonly contentIndex: number;
+ readonly delta: string;
+ readonly itemId: string;
+ readonly threadId: string;
+ readonly turnId: string;
+};
+export const ServerNotification__ReasoningTextDeltaNotification = Schema.Struct({
+ contentIndex: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ delta: Schema.String,
itemId: Schema.String,
- processId: Schema.String,
- stdin: Schema.String,
threadId: Schema.String,
turnId: Schema.String,
+}).annotate({ identifier: "ServerNotification__ReasoningTextDeltaNotification" });
+
+export type ServerNotification__ContextCompactedNotification = {
+ readonly threadId: string;
+ readonly turnId: string;
+};
+export const ServerNotification__ContextCompactedNotification = Schema.Struct({
+ threadId: Schema.String,
+ turnId: Schema.String,
+}).annotate({
+ description: "Deprecated: Use `ContextCompaction` item type instead.",
+ identifier: "ServerNotification__ContextCompactedNotification",
});
-export type ServerNotification__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type ServerNotification__ModelRerouteReason = "highRiskCyberActivity";
+export const ServerNotification__ModelRerouteReason = Schema.Literal(
+ "highRiskCyberActivity",
+).annotate({ identifier: "ServerNotification__ModelRerouteReason" });
+
+export type ServerNotification__ModelVerification = "trustedAccessForCyber";
+export const ServerNotification__ModelVerification = Schema.Literal(
+ "trustedAccessForCyber",
+).annotate({ identifier: "ServerNotification__ModelVerification" });
+
+export type ServerNotification__AuthRecoveryNotification = {
+ readonly message: string;
+ readonly provider: string;
+ readonly threadId: string;
+ readonly turnId: string;
};
-export const ServerNotification__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
+export const ServerNotification__AuthRecoveryNotification = Schema.Struct({
+ message: Schema.String,
+ provider: Schema.String,
+ threadId: Schema.String,
+ turnId: Schema.String,
+}).annotate({ identifier: "ServerNotification__AuthRecoveryNotification" });
+
+export type ServerNotification__TurnModerationMetadataNotification = {
+ readonly metadata: Schema.Json;
+ readonly threadId: string;
+ readonly turnId: string;
+};
+export const ServerNotification__TurnModerationMetadataNotification = Schema.Struct({
+ metadata: Schema.Json.annotate({ expected: "JSON value" }),
+ threadId: Schema.String,
+ turnId: Schema.String,
+}).annotate({ identifier: "ServerNotification__TurnModerationMetadataNotification" });
+
+export type ServerNotification__ModelSafetyBufferingUpdatedNotification = {
+ readonly fasterModel?: string | null;
+ readonly model: string;
+ readonly reasons: ReadonlyArray;
+ readonly showBufferingUi: boolean;
+ readonly threadId: string;
+ readonly turnId: string;
+ readonly useCases: ReadonlyArray;
+};
+export const ServerNotification__ModelSafetyBufferingUpdatedNotification = Schema.Struct({
+ fasterModel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ model: Schema.String,
+ reasons: Schema.Array(Schema.String),
+ showBufferingUi: Schema.Boolean,
+ threadId: Schema.String,
+ turnId: Schema.String,
+ useCases: Schema.Array(Schema.String),
+}).annotate({ identifier: "ServerNotification__ModelSafetyBufferingUpdatedNotification" });
+
+export type ServerNotification__WarningNotification = {
+ readonly message: string;
+ readonly threadId?: string | null;
+};
+export const ServerNotification__WarningNotification = Schema.Struct({
+ message: Schema.String.annotate({ description: "Concise warning message for the user." }),
+ threadId: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description: "Optional thread target when the warning applies to a specific thread.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "ServerNotification__WarningNotification" });
+
+export type ServerNotification__GuardianWarningNotification = {
+ readonly message: string;
+ readonly threadId: string;
+};
+export const ServerNotification__GuardianWarningNotification = Schema.Struct({
+ message: Schema.String.annotate({
+ description: "Concise guardian warning message for the user.",
}),
- placeholder: Schema.optionalKey(
+ threadId: Schema.String.annotate({ description: "Thread target for the guardian warning." }),
+}).annotate({ identifier: "ServerNotification__GuardianWarningNotification" });
+
+export type ServerNotification__DeprecationNoticeNotification = {
+ readonly details?: string | null;
+ readonly summary: string;
+};
+export const ServerNotification__DeprecationNoticeNotification = Schema.Struct({
+ details: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
+ description: "Optional extra guidance, such as migration steps or rationale.",
}),
Schema.Null,
]),
),
-});
+ summary: Schema.String.annotate({ description: "Concise summary of what is deprecated." }),
+}).annotate({ identifier: "ServerNotification__DeprecationNoticeNotification" });
export type ServerNotification__TextPosition = { readonly column: number; readonly line: number };
export const ServerNotification__TextPosition = Schema.Struct({
@@ -2684,65 +3541,138 @@ export const ServerNotification__TextPosition = Schema.Struct({
description: "1-based column number (in Unicode scalar values).",
format: "uint",
})
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
line: Schema.Number.annotate({ description: "1-based line number.", format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
-});
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "ServerNotification__TextPosition" });
-export type ServerNotification__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
-export const ServerNotification__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
+export type ServerNotification__FuzzyFileSearchMatchType = "file" | "directory";
+export const ServerNotification__FuzzyFileSearchMatchType = Schema.Literals([
+ "file",
+ "directory",
+]).annotate({ identifier: "ServerNotification__FuzzyFileSearchMatchType" });
-export type ServerNotification__ThreadArchivedNotification = { readonly threadId: string };
-export const ServerNotification__ThreadArchivedNotification = Schema.Struct({
+export type ServerNotification__FuzzyFileSearchSessionCompletedNotification = {
+ readonly sessionId: string;
+};
+export const ServerNotification__FuzzyFileSearchSessionCompletedNotification = Schema.Struct({
+ sessionId: Schema.String,
+}).annotate({ identifier: "ServerNotification__FuzzyFileSearchSessionCompletedNotification" });
+
+export type ServerNotification__RealtimeConversationVersion = "v1" | "v2" | "v3";
+export const ServerNotification__RealtimeConversationVersion = Schema.Literals([
+ "v1",
+ "v2",
+ "v3",
+]).annotate({ identifier: "ServerNotification__RealtimeConversationVersion" });
+
+export type ServerNotification__ThreadRealtimeItemAddedNotification = {
+ readonly item: Schema.Json;
+ readonly threadId: string;
+};
+export const ServerNotification__ThreadRealtimeItemAddedNotification = Schema.Struct({
+ item: Schema.Json.annotate({ expected: "JSON value" }),
threadId: Schema.String,
+}).annotate({
+ description: "EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend.",
+ identifier: "ServerNotification__ThreadRealtimeItemAddedNotification",
});
-export type ServerNotification__ThreadClosedNotification = { readonly threadId: string };
-export const ServerNotification__ThreadClosedNotification = Schema.Struct({
- threadId: Schema.String,
+export type ServerNotification__ThreadRealtimeTranscriptRole = "user" | "assistant";
+export const ServerNotification__ThreadRealtimeTranscriptRole = Schema.Literals([
+ "user",
+ "assistant",
+]).annotate({ identifier: "ServerNotification__ThreadRealtimeTranscriptRole" });
+
+export type ServerNotification__ThreadRealtimeBemItemPresentation =
+ | { readonly type: "wholeItem" }
+ | { readonly type: "inlineMarkdown" }
+ | { readonly index: number; readonly type: "inlineVisualization" };
+export const ServerNotification__ThreadRealtimeBemItemPresentation = Schema.Union(
+ [
+ Schema.Struct({
+ type: Schema.Literal("wholeItem").annotate({
+ title: "WholeItemThreadRealtimeBemItemPresentationType",
+ }),
+ }).annotate({ title: "WholeItemThreadRealtimeBemItemPresentation" }),
+ Schema.Struct({
+ type: Schema.Literal("inlineMarkdown").annotate({
+ title: "InlineMarkdownThreadRealtimeBemItemPresentationType",
+ }),
+ }).annotate({ title: "InlineMarkdownThreadRealtimeBemItemPresentation" }),
+ Schema.Struct({
+ index: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ type: Schema.Literal("inlineVisualization").annotate({
+ title: "InlineVisualizationThreadRealtimeBemItemPresentationType",
+ }),
+ }).annotate({ title: "InlineVisualizationThreadRealtimeBemItemPresentation" }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "EXPERIMENTAL - how an existing agent item appears in a realtime conversation.",
+ identifier: "ServerNotification__ThreadRealtimeBemItemPresentation",
});
-export type ServerNotification__ThreadDeletedNotification = { readonly threadId: string };
-export const ServerNotification__ThreadDeletedNotification = Schema.Struct({
+export type ServerNotification__ThreadRealtimeSessionOutcome = "ended" | "failed";
+export const ServerNotification__ThreadRealtimeSessionOutcome = Schema.Literals([
+ "ended",
+ "failed",
+]).annotate({ identifier: "ServerNotification__ThreadRealtimeSessionOutcome" });
+
+export type ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification = {
+ readonly delta: string;
+ readonly itemId: string;
+ readonly threadId: string;
+};
+export const ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification = Schema.Struct({
+ delta: Schema.String,
+ itemId: Schema.String,
threadId: Schema.String,
+}).annotate({
+ description: "EXPERIMENTAL - text appended to an active realtime transcript item.",
+ identifier: "ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification",
});
-export type ServerNotification__ThreadGoalClearedNotification = { readonly threadId: string };
-export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({
+export type ServerNotification__ThreadRealtimeTranscriptDeltaNotification = {
+ readonly delta: string;
+ readonly role: string;
+ readonly threadId: string;
+};
+export const ServerNotification__ThreadRealtimeTranscriptDeltaNotification = Schema.Struct({
+ delta: Schema.String.annotate({ description: "Live transcript delta from the realtime event." }),
+ role: Schema.String,
threadId: Schema.String,
+}).annotate({
+ description:
+ "EXPERIMENTAL - flat transcript delta emitted whenever realtime transcript text changes.",
+ identifier: "ServerNotification__ThreadRealtimeTranscriptDeltaNotification",
});
-export type ServerNotification__ThreadGoalStatus =
- | "active"
- | "paused"
- | "blocked"
- | "usageLimited"
- | "budgetLimited"
- | "complete";
-export const ServerNotification__ThreadGoalStatus = Schema.Literals([
- "active",
- "paused",
- "blocked",
- "usageLimited",
- "budgetLimited",
- "complete",
-]);
-
-export type ServerNotification__ThreadId = string;
-export const ServerNotification__ThreadId = Schema.String;
-
-export type ServerNotification__ThreadNameUpdatedNotification = {
+export type ServerNotification__ThreadRealtimeTranscriptDoneNotification = {
+ readonly role: string;
+ readonly text: string;
readonly threadId: string;
- readonly threadName?: string | null;
};
-export const ServerNotification__ThreadNameUpdatedNotification = Schema.Struct({
+export const ServerNotification__ThreadRealtimeTranscriptDoneNotification = Schema.Struct({
+ role: Schema.String,
+ text: Schema.String.annotate({ description: "Final complete text for the transcript part." }),
threadId: Schema.String,
- threadName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description:
+ "EXPERIMENTAL - final transcript text emitted when realtime completes a transcript part.",
+ identifier: "ServerNotification__ThreadRealtimeTranscriptDoneNotification",
});
export type ServerNotification__ThreadRealtimeAudioChunk = {
@@ -2756,29 +3686,43 @@ export const ServerNotification__ThreadRealtimeAudioChunk = Schema.Struct({
data: Schema.String,
itemId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
numChannels: Schema.Number.annotate({ format: "uint16" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
sampleRate: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
samplesPerChannel: Schema.optionalKey(
Schema.Union([
Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
Schema.Null,
]),
),
-}).annotate({ description: "EXPERIMENTAL - thread realtime audio chunk." });
+}).annotate({
+ description: "EXPERIMENTAL - thread realtime audio chunk.",
+ identifier: "ServerNotification__ThreadRealtimeAudioChunk",
+});
-export type ServerNotification__ThreadRealtimeClosedNotification = {
- readonly reason?: string | null;
+export type ServerNotification__ThreadRealtimeSdpNotification = {
+ readonly sdp: string;
readonly threadId: string;
};
-export const ServerNotification__ThreadRealtimeClosedNotification = Schema.Struct({
- reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+export const ServerNotification__ThreadRealtimeSdpNotification = Schema.Struct({
+ sdp: Schema.String,
threadId: Schema.String,
-}).annotate({ description: "EXPERIMENTAL - emitted when thread realtime transport closes." });
+}).annotate({
+ description: "EXPERIMENTAL - emitted with the remote SDP for a WebRTC realtime session.",
+ identifier: "ServerNotification__ThreadRealtimeSdpNotification",
+});
export type ServerNotification__ThreadRealtimeErrorNotification = {
readonly message: string;
@@ -2787,179 +3731,23 @@ export type ServerNotification__ThreadRealtimeErrorNotification = {
export const ServerNotification__ThreadRealtimeErrorNotification = Schema.Struct({
message: Schema.String,
threadId: Schema.String,
-}).annotate({ description: "EXPERIMENTAL - emitted when thread realtime encounters an error." });
-
-export type ServerNotification__ThreadRealtimeItemAddedNotification = {
- readonly item: unknown;
- readonly threadId: string;
-};
-export const ServerNotification__ThreadRealtimeItemAddedNotification = Schema.Struct({
- item: Schema.Unknown,
- threadId: Schema.String,
}).annotate({
- description: "EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend.",
+ description: "EXPERIMENTAL - emitted when thread realtime encounters an error.",
+ identifier: "ServerNotification__ThreadRealtimeErrorNotification",
});
-export type ServerNotification__ThreadRealtimeSdpNotification = {
- readonly sdp: string;
+export type ServerNotification__ThreadRealtimeClosedNotification = {
+ readonly reason?: string | null;
readonly threadId: string;
};
-export const ServerNotification__ThreadRealtimeSdpNotification = Schema.Struct({
- sdp: Schema.String,
+export const ServerNotification__ThreadRealtimeClosedNotification = Schema.Struct({
+ reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
threadId: Schema.String,
}).annotate({
- description: "EXPERIMENTAL - emitted with the remote SDP for a WebRTC realtime session.",
-});
-
-export type ServerNotification__ThreadRealtimeTranscriptDeltaNotification = {
- readonly delta: string;
- readonly role: string;
- readonly threadId: string;
-};
-export const ServerNotification__ThreadRealtimeTranscriptDeltaNotification = Schema.Struct({
- delta: Schema.String.annotate({ description: "Live transcript delta from the realtime event." }),
- role: Schema.String,
- threadId: Schema.String,
-}).annotate({
- description:
- "EXPERIMENTAL - flat transcript delta emitted whenever realtime transcript text changes.",
-});
-
-export type ServerNotification__ThreadRealtimeTranscriptDoneNotification = {
- readonly role: string;
- readonly text: string;
- readonly threadId: string;
-};
-export const ServerNotification__ThreadRealtimeTranscriptDoneNotification = Schema.Struct({
- role: Schema.String,
- text: Schema.String.annotate({ description: "Final complete text for the transcript part." }),
- threadId: Schema.String,
-}).annotate({
- description:
- "EXPERIMENTAL - final transcript text emitted when realtime completes a transcript part.",
-});
-
-export type ServerNotification__ThreadSource = string;
-export const ServerNotification__ThreadSource = Schema.String;
-
-export type ServerNotification__ThreadUnarchivedNotification = { readonly threadId: string };
-export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({
- threadId: Schema.String,
-});
-
-export type ServerNotification__TokenUsageBreakdown = {
- readonly cacheWriteInputTokens?: number;
- readonly cachedInputTokens: number;
- readonly inputTokens: number;
- readonly outputTokens: number;
- readonly reasoningOutputTokens: number;
- readonly totalTokens: number;
-};
-export const ServerNotification__TokenUsageBreakdown = Schema.Struct({
- cacheWriteInputTokens: Schema.optionalKey(
- Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()),
- ),
- cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- totalTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-});
-
-export type ServerNotification__TurnDiffUpdatedNotification = {
- readonly diff: string;
- readonly threadId: string;
- readonly turnId: string;
-};
-export const ServerNotification__TurnDiffUpdatedNotification = Schema.Struct({
- diff: Schema.String,
- threadId: Schema.String,
- turnId: Schema.String,
-}).annotate({
- description:
- "Notification that the turn-level unified diff has changed. Contains the latest aggregated diff across all file changes in the turn.",
-});
-
-export type ServerNotification__TurnModerationMetadataNotification = {
- readonly metadata: unknown;
- readonly threadId: string;
- readonly turnId: string;
-};
-export const ServerNotification__TurnModerationMetadataNotification = Schema.Struct({
- metadata: Schema.Unknown,
- threadId: Schema.String,
- turnId: Schema.String,
-});
-
-export type ServerNotification__TurnPlanStepStatus = "pending" | "inProgress" | "completed";
-export const ServerNotification__TurnPlanStepStatus = Schema.Literals([
- "pending",
- "inProgress",
- "completed",
-]);
-
-export type ServerNotification__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress";
-export const ServerNotification__TurnStatus = Schema.Literals([
- "completed",
- "interrupted",
- "failed",
- "inProgress",
-]);
-
-export type ServerNotification__WarningNotification = {
- readonly message: string;
- readonly threadId?: string | null;
-};
-export const ServerNotification__WarningNotification = Schema.Struct({
- message: Schema.String.annotate({ description: "Concise warning message for the user." }),
- threadId: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional thread target when the warning applies to a specific thread.",
- }),
- Schema.Null,
- ]),
- ),
+ description: "EXPERIMENTAL - emitted when thread realtime transport closes.",
+ identifier: "ServerNotification__ThreadRealtimeClosedNotification",
});
-export type ServerNotification__WebSearchAction =
- | {
- readonly queries?: ReadonlyArray | null;
- readonly query?: string | null;
- readonly type: "search";
- }
- | { readonly type: "openPage"; readonly url?: string | null }
- | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
- | { readonly type: "other" };
-export const ServerNotification__WebSearchAction = Schema.Union(
- [
- Schema.Struct({
- queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
- }).annotate({ title: "SearchWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "OpenPageWebSearchAction" }),
- Schema.Struct({
- pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "FindInPageWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
- }).annotate({ title: "OtherWebSearchAction" }),
- ],
- { mode: "oneOf" },
-);
-
-export type ServerNotification__WindowsSandboxSetupMode = "elevated" | "unelevated";
-export const ServerNotification__WindowsSandboxSetupMode = Schema.Literals([
- "elevated",
- "unelevated",
-]);
-
export type ServerNotification__WindowsWorldWritableWarningNotification = {
readonly extraCount: number;
readonly failedScan: boolean;
@@ -2967,68 +3755,59 @@ export type ServerNotification__WindowsWorldWritableWarningNotification = {
};
export const ServerNotification__WindowsWorldWritableWarningNotification = Schema.Struct({
extraCount: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
failedScan: Schema.Boolean,
samplePaths: Schema.Array(Schema.String),
-});
+}).annotate({ identifier: "ServerNotification__WindowsWorldWritableWarningNotification" });
-export type ServerRequest__AbsolutePathBuf = string;
-export const ServerRequest__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
+export type ServerNotification__WindowsSandboxSetupMode = "elevated" | "unelevated";
+export const ServerNotification__WindowsSandboxSetupMode = Schema.Literals([
+ "elevated",
+ "unelevated",
+]).annotate({ identifier: "ServerNotification__WindowsSandboxSetupMode" });
-export type ServerRequest__AdditionalNetworkPermissions = { readonly enabled?: boolean | null };
-export const ServerRequest__AdditionalNetworkPermissions = Schema.Struct({
- enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
-});
+export type ServerNotification__DesktopOnboardingEntrypoint = "life_sciences";
+export const ServerNotification__DesktopOnboardingEntrypoint = Schema.Literal(
+ "life_sciences",
+).annotate({ identifier: "ServerNotification__DesktopOnboardingEntrypoint" });
-export type ServerRequest__AttestationGenerateParams = {};
-export const ServerRequest__AttestationGenerateParams = Schema.Struct({});
+export type ServerRequest__RequestId = string | number;
+export const ServerRequest__RequestId = Schema.Union([
+ Schema.String,
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+]).annotate({ identifier: "ServerRequest__RequestId" });
-export type ServerRequest__ChatgptAuthTokensRefreshReason = "unauthorized";
-export const ServerRequest__ChatgptAuthTokensRefreshReason = Schema.Literal("unauthorized");
+export type ServerRequest__LegacyAppPathString = string;
+export const ServerRequest__LegacyAppPathString = Schema.String.annotate({
+ identifier: "ServerRequest__LegacyAppPathString",
+});
-export type ServerRequest__DynamicToolCallParams = {
- readonly arguments: unknown;
- readonly callId: string;
- readonly namespace?: string | null;
- readonly threadId: string;
- readonly tool: string;
- readonly turnId: string;
-};
-export const ServerRequest__DynamicToolCallParams = Schema.Struct({
- arguments: Schema.Unknown,
- callId: Schema.String,
- namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- threadId: Schema.String,
- tool: Schema.String,
- turnId: Schema.String,
+export type ServerRequest__CommandExecutionApprovalKind = "command" | "writeStdin";
+export const ServerRequest__CommandExecutionApprovalKind = Schema.Literals([
+ "command",
+ "writeStdin",
+]).annotate({
+ description: "Distinguishes a command approval from input sent to an existing terminal.",
+ identifier: "ServerRequest__CommandExecutionApprovalKind",
});
-export type ServerRequest__FileChange =
- | { readonly content: string; readonly type: "add" }
- | { readonly content: string; readonly type: "delete" }
- | { readonly move_path?: string | null; readonly type: "update"; readonly unified_diff: string };
-export const ServerRequest__FileChange = Schema.Union(
- [
- Schema.Struct({
- content: Schema.String,
- type: Schema.Literal("add").annotate({ title: "AddFileChangeType" }),
- }).annotate({ title: "AddFileChange" }),
- Schema.Struct({
- content: Schema.String,
- type: Schema.Literal("delete").annotate({ title: "DeleteFileChangeType" }),
- }).annotate({ title: "DeleteFileChange" }),
- Schema.Struct({
- move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("update").annotate({ title: "UpdateFileChangeType" }),
- unified_diff: Schema.String,
- }).annotate({ title: "UpdateFileChange" }),
- ],
- { mode: "oneOf" },
-);
+export type ServerRequest__NetworkApprovalProtocol = "http" | "https" | "socks5Tcp" | "socks5Udp";
+export const ServerRequest__NetworkApprovalProtocol = Schema.Literals([
+ "http",
+ "https",
+ "socks5Tcp",
+ "socks5Udp",
+]).annotate({ identifier: "ServerRequest__NetworkApprovalProtocol" });
+
+export type ServerRequest__NetworkPolicyRuleAction = "allow" | "deny";
+export const ServerRequest__NetworkPolicyRuleAction = Schema.Literals(["allow", "deny"]).annotate({
+ identifier: "ServerRequest__NetworkPolicyRuleAction",
+});
export type ServerRequest__FileChangeRequestApprovalParams = {
readonly grantRoot?: string | null;
@@ -3060,22 +3839,27 @@ export const ServerRequest__FileChangeRequestApprovalParams = Schema.Struct({
startedAtMs: Schema.Number.annotate({
description: "Unix timestamp (in milliseconds) when this approval request started.",
format: "int64",
- }).check(Schema.isInt()),
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
threadId: Schema.String,
turnId: Schema.String,
-});
+}).annotate({ identifier: "ServerRequest__FileChangeRequestApprovalParams" });
-export type ServerRequest__FileSystemAccessMode = "read" | "write" | "deny";
-export const ServerRequest__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]);
-
-export type ServerRequest__LegacyAppPathString = string;
-export const ServerRequest__LegacyAppPathString = Schema.String;
-
-export type ServerRequest__McpElicitationArrayType = "array";
-export const ServerRequest__McpElicitationArrayType = Schema.Literal("array");
+export type ServerRequest__ToolRequestUserInputOption = {
+ readonly description: string;
+ readonly label: string;
+};
+export const ServerRequest__ToolRequestUserInputOption = Schema.Struct({
+ description: Schema.String,
+ label: Schema.String,
+}).annotate({
+ description: "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
+ identifier: "ServerRequest__ToolRequestUserInputOption",
+});
-export type ServerRequest__McpElicitationBooleanType = "boolean";
-export const ServerRequest__McpElicitationBooleanType = Schema.Literal("boolean");
+export type ServerRequest__McpElicitationStringType = "string";
+export const ServerRequest__McpElicitationStringType = Schema.Literal("string").annotate({
+ identifier: "ServerRequest__McpElicitationStringType",
+});
export type ServerRequest__McpElicitationConstOption = {
readonly const: string;
@@ -3084,13 +3868,12 @@ export type ServerRequest__McpElicitationConstOption = {
export const ServerRequest__McpElicitationConstOption = Schema.Struct({
const: Schema.String,
title: Schema.String,
-});
-
-export type ServerRequest__McpElicitationNumberType = "number" | "integer";
-export const ServerRequest__McpElicitationNumberType = Schema.Literals(["number", "integer"]);
+}).annotate({ identifier: "ServerRequest__McpElicitationConstOption" });
-export type ServerRequest__McpElicitationObjectType = "object";
-export const ServerRequest__McpElicitationObjectType = Schema.Literal("object");
+export type ServerRequest__McpElicitationArrayType = "array";
+export const ServerRequest__McpElicitationArrayType = Schema.Literal("array").annotate({
+ identifier: "ServerRequest__McpElicitationArrayType",
+});
export type ServerRequest__McpElicitationStringFormat = "email" | "uri" | "date" | "date-time";
export const ServerRequest__McpElicitationStringFormat = Schema.Literals([
@@ -3098,21 +3881,96 @@ export const ServerRequest__McpElicitationStringFormat = Schema.Literals([
"uri",
"date",
"date-time",
-]);
+]).annotate({ identifier: "ServerRequest__McpElicitationStringFormat" });
-export type ServerRequest__McpElicitationStringType = "string";
-export const ServerRequest__McpElicitationStringType = Schema.Literal("string");
+export type ServerRequest__McpElicitationNumberType = "number" | "integer";
+export const ServerRequest__McpElicitationNumberType = Schema.Literals([
+ "number",
+ "integer",
+]).annotate({ identifier: "ServerRequest__McpElicitationNumberType" });
-export type ServerRequest__NetworkApprovalProtocol = "http" | "https" | "socks5Tcp" | "socks5Udp";
-export const ServerRequest__NetworkApprovalProtocol = Schema.Literals([
- "http",
- "https",
- "socks5Tcp",
- "socks5Udp",
-]);
+export type ServerRequest__McpElicitationBooleanType = "boolean";
+export const ServerRequest__McpElicitationBooleanType = Schema.Literal("boolean").annotate({
+ identifier: "ServerRequest__McpElicitationBooleanType",
+});
-export type ServerRequest__NetworkPolicyRuleAction = "allow" | "deny";
-export const ServerRequest__NetworkPolicyRuleAction = Schema.Literals(["allow", "deny"]);
+export type ServerRequest__McpElicitationObjectType = "object";
+export const ServerRequest__McpElicitationObjectType = Schema.Literal("object").annotate({
+ identifier: "ServerRequest__McpElicitationObjectType",
+});
+
+export type ServerRequest__FileSystemAccessMode = "read" | "write" | "deny";
+export const ServerRequest__FileSystemAccessMode = Schema.Literals([
+ "read",
+ "write",
+ "deny",
+]).annotate({ identifier: "ServerRequest__FileSystemAccessMode" });
+
+export type ServerRequest__AdditionalNetworkPermissions = { readonly enabled?: boolean | null };
+export const ServerRequest__AdditionalNetworkPermissions = Schema.Struct({
+ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
+}).annotate({ identifier: "ServerRequest__AdditionalNetworkPermissions" });
+
+export type ServerRequest__DynamicToolCallParams = {
+ readonly arguments: Schema.Json;
+ readonly callId: string;
+ readonly namespace?: string | null;
+ readonly threadId: string;
+ readonly tool: string;
+ readonly turnId: string;
+};
+export const ServerRequest__DynamicToolCallParams = Schema.Struct({
+ arguments: Schema.Json.annotate({ expected: "JSON value" }),
+ callId: Schema.String,
+ namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ threadId: Schema.String,
+ tool: Schema.String,
+ turnId: Schema.String,
+}).annotate({ identifier: "ServerRequest__DynamicToolCallParams" });
+
+export type ServerRequest__ChatgptAuthTokensRefreshReason = "unauthorized";
+export const ServerRequest__ChatgptAuthTokensRefreshReason = Schema.Union(
+ [
+ Schema.Literal("unauthorized").annotate({
+ description: "Codex attempted a backend request and received `401 Unauthorized`.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ServerRequest__ChatgptAuthTokensRefreshReason" });
+
+export type ServerRequest__AttestationGenerateParams = { readonly [x: string]: Schema.Json };
+export const ServerRequest__AttestationGenerateParams = Schema.Record(
+ Schema.String,
+ Schema.Json.annotate({ expected: "JSON value" }),
+).annotate({ identifier: "ServerRequest__AttestationGenerateParams" });
+
+export type ServerRequest__ThreadId = string;
+export const ServerRequest__ThreadId = Schema.String.annotate({
+ identifier: "ServerRequest__ThreadId",
+});
+
+export type ServerRequest__FileChange =
+ | { readonly content: string; readonly type: "add" }
+ | { readonly content: string; readonly type: "delete" }
+ | { readonly move_path?: string | null; readonly type: "update"; readonly unified_diff: string };
+export const ServerRequest__FileChange = Schema.Union(
+ [
+ Schema.Struct({
+ content: Schema.String,
+ type: Schema.Literal("add").annotate({ title: "AddFileChangeType" }),
+ }).annotate({ title: "AddFileChange" }),
+ Schema.Struct({
+ content: Schema.String,
+ type: Schema.Literal("delete").annotate({ title: "DeleteFileChangeType" }),
+ }).annotate({ title: "DeleteFileChange" }),
+ Schema.Struct({
+ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("update").annotate({ title: "UpdateFileChangeType" }),
+ unified_diff: Schema.String,
+ }).annotate({ title: "UpdateFileChange" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "ServerRequest__FileChange" });
export type ServerRequest__ParsedCommand =
| { readonly cmd: string; readonly name: string; readonly path: string; readonly type: "read" }
@@ -3152,27 +4010,7 @@ export const ServerRequest__ParsedCommand = Schema.Union(
}).annotate({ title: "UnknownParsedCommand" }),
],
{ mode: "oneOf" },
-);
-
-export type ServerRequest__RequestId = string | number;
-export const ServerRequest__RequestId = Schema.Union([
- Schema.String,
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-]);
-
-export type ServerRequest__ThreadId = string;
-export const ServerRequest__ThreadId = Schema.String;
-
-export type ServerRequest__ToolRequestUserInputOption = {
- readonly description: string;
- readonly label: string;
-};
-export const ServerRequest__ToolRequestUserInputOption = Schema.Struct({
- description: Schema.String,
- label: Schema.String,
-}).annotate({
- description: "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
-});
+).annotate({ identifier: "ServerRequest__ParsedCommand" });
export type ToolRequestUserInputParams__ToolRequestUserInputOption = {
readonly description: string;
@@ -3183,6 +4021,7 @@ export const ToolRequestUserInputParams__ToolRequestUserInputOption = Schema.Str
label: Schema.String,
}).annotate({
description: "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
+ identifier: "ToolRequestUserInputParams__ToolRequestUserInputOption",
});
export type ToolRequestUserInputResponse__ToolRequestUserInputAnswer = {
@@ -3192,21 +4031,13 @@ export const ToolRequestUserInputResponse__ToolRequestUserInputAnswer = Schema.S
answers: Schema.Array(Schema.String),
}).annotate({
description: "EXPERIMENTAL. Captures a user's answer to a request_user_input question.",
-});
-
-export type V1InitializeParams__ClientInfo = {
- readonly name: string;
- readonly title?: string | null;
- readonly version: string;
-};
-export const V1InitializeParams__ClientInfo = Schema.Struct({
- name: Schema.String,
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- version: Schema.String,
+ identifier: "ToolRequestUserInputResponse__ToolRequestUserInputAnswer",
});
export type V1InitializeParams__InitializeCapabilities = {
readonly experimentalApi?: boolean;
+ readonly explicitGatewayOauth?: boolean;
+ readonly extensions?: { readonly [x: string]: Schema.Json } | null;
readonly mcpServerOpenaiFormElicitation?: boolean;
readonly optOutNotificationMethods?: ReadonlyArray | null;
readonly requestAttestation?: boolean;
@@ -3218,9 +4049,24 @@ export const V1InitializeParams__InitializeCapabilities = Schema.Struct({
default: false,
}),
),
+ explicitGatewayOauth: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.",
+ }),
+ ),
+ extensions: Schema.optionalKey(
+ Schema.Union([
+ Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })).annotate({
+ description: "MCP extension settings declared by the app-server client.",
+ }),
+ Schema.Null,
+ ]),
+ ),
mcpServerOpenaiFormElicitation: Schema.optionalKey(
Schema.Boolean.annotate({
- description: "Allow downstream MCP servers to request OpenAI extended form elicitations.",
+ description:
+ "Legacy opt-in for the `openai/form` MCP extension.\n\nNew clients should declare `openai/form` in [`Self::extensions`].",
}),
),
optOutNotificationMethods: Schema.optionalKey(
@@ -3238,7 +4084,33 @@ export const V1InitializeParams__InitializeCapabilities = Schema.Struct({
default: false,
}),
),
-}).annotate({ description: "Client-declared capabilities negotiated during initialize." });
+}).annotate({
+ description: "Client-declared capabilities negotiated during initialize.",
+ identifier: "V1InitializeParams__InitializeCapabilities",
+});
+
+export type V1InitializeParams__ClientInfo = {
+ readonly name: string;
+ readonly title?: string | null;
+ readonly version: string;
+};
+export const V1InitializeParams__ClientInfo = Schema.Struct({
+ name: Schema.String,
+ title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ version: Schema.String,
+}).annotate({ identifier: "V1InitializeParams__ClientInfo" });
+
+export type V1InitializeResponse__AbsolutePathBuf = string;
+export const V1InitializeResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V1InitializeResponse__AbsolutePathBuf",
+});
+
+export type V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint = "life_sciences";
+export const V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint = Schema.Literal(
+ "life_sciences",
+).annotate({ identifier: "V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint" });
export type V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = {
readonly balance?: string | null;
@@ -3249,45 +4121,56 @@ export const V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = Schema.St
balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
hasCredits: Schema.Boolean,
unlimited: Schema.Boolean,
+}).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__CreditsSnapshot" });
+
+export type V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = {
+ readonly limit: string;
+ readonly remainingPercent: number;
+ readonly resetsAt: number;
+ readonly used: string;
+};
+export const V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = Schema.Struct({
+ limit: Schema.String,
+ remainingPercent: Schema.Number.annotate({ format: "int32" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ resetsAt: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ used: Schema.String,
+}).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot" });
+
+export type V2AccountRateLimitsUpdatedNotification__PlanType = string;
+export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.String.annotate({
+ identifier: "V2AccountRateLimitsUpdatedNotification__PlanType",
});
-export type V2AccountRateLimitsUpdatedNotification__PlanType =
- | "free"
- | "go"
- | "plus"
- | "pro"
- | "prolite"
- | "team"
- | "self_serve_business_prolite"
- | "self_serve_business_usage_based"
- | "business"
- | "ent26"
- | "enterprise_cbp_automation"
- | "enterprise_cbp_usage_based"
- | "enterprise"
- | "edu"
- | "edu_plus"
- | "edu_pro"
- | "unknown";
-export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals([
- "free",
- "go",
- "plus",
- "pro",
- "prolite",
- "team",
- "self_serve_business_prolite",
- "self_serve_business_usage_based",
- "business",
- "ent26",
- "enterprise_cbp_automation",
- "enterprise_cbp_usage_based",
- "enterprise",
- "edu",
- "edu_plus",
- "edu_pro",
- "unknown",
-]);
+export type V2AccountRateLimitsUpdatedNotification__RateLimitWindow = {
+ readonly resetsAt?: number | null;
+ readonly usedPercent: number;
+ readonly windowDurationMins?: number | null;
+};
+export const V2AccountRateLimitsUpdatedNotification__RateLimitWindow = Schema.Struct({
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ usedPercent: Schema.Number.annotate({ format: "int32" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ windowDurationMins: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__RateLimitWindow" });
export type V2AccountRateLimitsUpdatedNotification__RateLimitReachedType =
| "rate_limit_reached"
@@ -3301,35 +4184,7 @@ export const V2AccountRateLimitsUpdatedNotification__RateLimitReachedType = Sche
"workspace_member_credits_depleted",
"workspace_owner_usage_limit_reached",
"workspace_member_usage_limit_reached",
-]);
-
-export type V2AccountRateLimitsUpdatedNotification__RateLimitWindow = {
- readonly resetsAt?: number | null;
- readonly usedPercent: number;
- readonly windowDurationMins?: number | null;
-};
-export const V2AccountRateLimitsUpdatedNotification__RateLimitWindow = Schema.Struct({
- resetsAt: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
- ),
- usedPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
- windowDurationMins: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
- ),
-});
-
-export type V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = {
- readonly limit: string;
- readonly remainingPercent: number;
- readonly resetsAt: number;
- readonly used: string;
-};
-export const V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = Schema.Struct({
- limit: Schema.String,
- remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
- resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- used: Schema.String,
-});
+]).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__RateLimitReachedType" });
export type V2AccountUpdatedNotification__AuthMode =
| "apikey"
@@ -3338,54 +4193,62 @@ export type V2AccountUpdatedNotification__AuthMode =
| "headers"
| "agentIdentity"
| "personalAccessToken"
- | "bedrockApiKey";
-export const V2AccountUpdatedNotification__AuthMode = Schema.Literals([
- "apikey",
- "chatgpt",
- "chatgptAuthTokens",
- "headers",
- "agentIdentity",
- "personalAccessToken",
- "bedrockApiKey",
-]).annotate({ description: "Authentication mode for OpenAI-backed providers." });
-
-export type V2AccountUpdatedNotification__PlanType =
- | "free"
- | "go"
- | "plus"
- | "pro"
- | "prolite"
- | "team"
- | "self_serve_business_prolite"
- | "self_serve_business_usage_based"
- | "business"
- | "ent26"
- | "enterprise_cbp_automation"
- | "enterprise_cbp_usage_based"
- | "enterprise"
- | "edu"
- | "edu_plus"
- | "edu_pro"
- | "unknown";
-export const V2AccountUpdatedNotification__PlanType = Schema.Literals([
- "free",
- "go",
- "plus",
- "pro",
- "prolite",
- "team",
- "self_serve_business_prolite",
- "self_serve_business_usage_based",
- "business",
- "ent26",
- "enterprise_cbp_automation",
- "enterprise_cbp_usage_based",
- "enterprise",
- "edu",
- "edu_plus",
- "edu_pro",
- "unknown",
-]);
+ | "bedrockApiKey"
+ | "bedrockAccessKeys";
+export const V2AccountUpdatedNotification__AuthMode = Schema.Union(
+ [
+ Schema.Literal("apikey").annotate({
+ description: "OpenAI API key provided by the caller and stored by Codex.",
+ }),
+ Schema.Literal("chatgpt").annotate({
+ description: "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
+ }),
+ Schema.Literal("chatgptAuthTokens").annotate({
+ description:
+ "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.\n\nChatGPT auth tokens are supplied by an external host app and are only stored in memory. Token refresh must be handled by the external host app.",
+ }),
+ Schema.Literal("headers").annotate({
+ description: "Backend auth supplied as request headers.",
+ }),
+ Schema.Literal("agentIdentity").annotate({
+ description: "Programmatic Codex auth backed by a registered Agent Identity.",
+ }),
+ Schema.Literal("personalAccessToken").annotate({
+ description: "Programmatic Codex auth backed by a personal access token.",
+ }),
+ Schema.Literal("bedrockApiKey").annotate({
+ description: "Amazon Bedrock bearer token managed by Codex.",
+ }),
+ Schema.Literal("bedrockAccessKeys").annotate({
+ description: "Amazon Bedrock AWS access keys managed by Codex.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "Authentication mode for OpenAI-backed providers.",
+ identifier: "V2AccountUpdatedNotification__AuthMode",
+});
+
+export type V2AccountUpdatedNotification__PlanType = string;
+export const V2AccountUpdatedNotification__PlanType = Schema.String.annotate({
+ identifier: "V2AccountUpdatedNotification__PlanType",
+});
+
+export type V2AppListUpdatedNotification__AppReview = { readonly status: string };
+export const V2AppListUpdatedNotification__AppReview = Schema.Struct({
+ status: Schema.String,
+}).annotate({ identifier: "V2AppListUpdatedNotification__AppReview" });
+
+export type V2AppListUpdatedNotification__AppScreenshot = {
+ readonly fileId?: string | null;
+ readonly url?: string | null;
+ readonly userPrompt: string;
+};
+export const V2AppListUpdatedNotification__AppScreenshot = Schema.Struct({
+ fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ userPrompt: Schema.String,
+}).annotate({ identifier: "V2AppListUpdatedNotification__AppScreenshot" });
export type V2AppListUpdatedNotification__AppBranding = {
readonly category?: string | null;
@@ -3402,20 +4265,9 @@ export const V2AppListUpdatedNotification__AppBranding = Schema.Struct({
privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-}).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." });
-
-export type V2AppListUpdatedNotification__AppReview = { readonly status: string };
-export const V2AppListUpdatedNotification__AppReview = Schema.Struct({ status: Schema.String });
-
-export type V2AppListUpdatedNotification__AppScreenshot = {
- readonly fileId?: string | null;
- readonly url?: string | null;
- readonly userPrompt: string;
-};
-export const V2AppListUpdatedNotification__AppScreenshot = Schema.Struct({
- fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- userPrompt: Schema.String,
+}).annotate({
+ description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
+ identifier: "V2AppListUpdatedNotification__AppBranding",
});
export type V2AppsInstalledResponse__InstalledApp = {
@@ -3443,7 +4295,26 @@ export const V2AppsInstalledResponse__InstalledApp = Schema.Struct({
Schema.Null,
]),
),
-}).annotate({ description: "Installed connector runtime state." });
+}).annotate({
+ description: "Installed connector runtime state.",
+ identifier: "V2AppsInstalledResponse__InstalledApp",
+});
+
+export type V2AppsListResponse__AppReview = { readonly status: string };
+export const V2AppsListResponse__AppReview = Schema.Struct({ status: Schema.String }).annotate({
+ identifier: "V2AppsListResponse__AppReview",
+});
+
+export type V2AppsListResponse__AppScreenshot = {
+ readonly fileId?: string | null;
+ readonly url?: string | null;
+ readonly userPrompt: string;
+};
+export const V2AppsListResponse__AppScreenshot = Schema.Struct({
+ fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ userPrompt: Schema.String,
+}).annotate({ identifier: "V2AppsListResponse__AppScreenshot" });
export type V2AppsListResponse__AppBranding = {
readonly category?: string | null;
@@ -3460,43 +4331,62 @@ export const V2AppsListResponse__AppBranding = Schema.Struct({
privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-}).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." });
-
-export type V2AppsListResponse__AppReview = { readonly status: string };
-export const V2AppsListResponse__AppReview = Schema.Struct({ status: Schema.String });
-
-export type V2AppsListResponse__AppScreenshot = {
- readonly fileId?: string | null;
- readonly url?: string | null;
- readonly userPrompt: string;
-};
-export const V2AppsListResponse__AppScreenshot = Schema.Struct({
- fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- userPrompt: Schema.String,
+}).annotate({
+ description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
+ identifier: "V2AppsListResponse__AppBranding",
});
export type V2AppsReadResponse__AppToolSummary = {
readonly description: string;
+ readonly disabledReason?: string | null;
+ readonly isEnabled?: boolean;
+ readonly isReadOnly?: boolean;
readonly name: string;
readonly title?: string | null;
};
export const V2AppsReadResponse__AppToolSummary = Schema.Struct({
description: Schema.String,
+ disabledReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ isEnabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })),
+ isReadOnly: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
name: Schema.String,
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-}).annotate({ description: "EXPERIMENTAL - metadata returned by app/read." });
+}).annotate({
+ description: "EXPERIMENTAL - metadata returned by app/read.",
+ identifier: "V2AppsReadResponse__AppToolSummary",
+});
export type V2CancelLoginAccountResponse__CancelLoginAccountStatus = "canceled" | "notFound";
export const V2CancelLoginAccountResponse__CancelLoginAccountStatus = Schema.Literals([
"canceled",
"notFound",
-]);
+]).annotate({ identifier: "V2CancelLoginAccountResponse__CancelLoginAccountStatus" });
-export type V2CommandExecParams__AbsolutePathBuf = string;
-export const V2CommandExecParams__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+export type V2CommandExecOutputDeltaNotification__CommandExecOutputStream = "stdout" | "stderr";
+export const V2CommandExecOutputDeltaNotification__CommandExecOutputStream = Schema.Union(
+ [
+ Schema.Literal("stdout").annotate({
+ description: "stdout stream. PTY mode multiplexes terminal output here.",
+ }),
+ Schema.Literal("stderr").annotate({ description: "stderr stream." }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "Stream label for `command/exec/outputDelta` notifications.",
+ identifier: "V2CommandExecOutputDeltaNotification__CommandExecOutputStream",
+});
+
+export type V2CommandExecParams__NetworkAccess = "restricted" | "enabled";
+export const V2CommandExecParams__NetworkAccess = Schema.Literals([
+ "restricted",
+ "enabled",
+]).annotate({ identifier: "V2CommandExecParams__NetworkAccess" });
+
+export type V2CommandExecParams__AbsolutePathBuf = string;
+export const V2CommandExecParams__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2CommandExecParams__AbsolutePathBuf",
});
export type V2CommandExecParams__CommandExecTerminalSize = {
@@ -3508,54 +4398,62 @@ export const V2CommandExecParams__CommandExecTerminalSize = Schema.Struct({
description: "Terminal width in character cells.",
format: "uint16",
})
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
rows: Schema.Number.annotate({
description: "Terminal height in character cells.",
format: "uint16",
})
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
-}).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." });
-
-export type V2ConfigBatchWriteParams__MergeStrategy = "replace" | "upsert";
-export const V2ConfigBatchWriteParams__MergeStrategy = Schema.Literals(["replace", "upsert"]);
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({
+ description: "PTY size in character cells for `command/exec` PTY sessions.",
+ identifier: "V2CommandExecParams__CommandExecTerminalSize",
+});
-export type V2ConfigReadResponse__AbsolutePathBuf = string;
-export const V2ConfigReadResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+export type V2CommandExecResizeParams__CommandExecTerminalSize = {
+ readonly cols: number;
+ readonly rows: number;
+};
+export const V2CommandExecResizeParams__CommandExecTerminalSize = Schema.Struct({
+ cols: Schema.Number.annotate({
+ description: "Terminal width in character cells.",
+ format: "uint16",
+ })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ rows: Schema.Number.annotate({
+ description: "Terminal height in character cells.",
+ format: "uint16",
+ })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({
+ description: "PTY size in character cells for `command/exec` PTY sessions.",
+ identifier: "V2CommandExecResizeParams__CommandExecTerminalSize",
});
-export type V2ConfigReadResponse__AnalyticsConfig = {
- readonly enabled?: boolean | null;
- readonly [x: string]: unknown;
+export type V2ConfigBatchWriteParams__MergeStrategy = "replace" | "upsert";
+export const V2ConfigBatchWriteParams__MergeStrategy = Schema.Literals([
+ "replace",
+ "upsert",
+]).annotate({ identifier: "V2ConfigBatchWriteParams__MergeStrategy" });
+
+export type V2ConfigReadResponse__AnalyticsConfig = { readonly enabled?: boolean | null } & {
+ readonly [x: string]: Schema.Json;
};
export const V2ConfigReadResponse__AnalyticsConfig = Schema.StructWithRest(
Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }),
- [Schema.Record(Schema.String, Schema.Unknown)],
-);
-
-export type V2ConfigReadResponse__AppToolApproval = "auto" | "prompt" | "writes" | "approve";
-export const V2ConfigReadResponse__AppToolApproval = Schema.Literals([
- "auto",
- "prompt",
- "writes",
- "approve",
-]);
-
-export type V2ConfigReadResponse__AppToolsConfig = {};
-export const V2ConfigReadResponse__AppToolsConfig = Schema.Struct({});
-
-export type V2ConfigReadResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
-export const V2ConfigReadResponse__ApprovalsReviewer = Schema.Literals([
- "user",
- "auto_review",
- "guardian_subagent",
-]).annotate({
- description:
- "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
-});
+ [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))],
+).annotate({ identifier: "V2ConfigReadResponse__AnalyticsConfig" });
export type V2ConfigReadResponse__AskForApproval =
| "untrusted"
@@ -3584,32 +4482,65 @@ export const V2ConfigReadResponse__AskForApproval = Schema.Union(
}).annotate({ title: "GranularAskForApproval" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ConfigReadResponse__AskForApproval" });
-export type V2ConfigReadResponse__AutoCompactTokenLimitScope = "total" | "body_after_prefix";
-export const V2ConfigReadResponse__AutoCompactTokenLimitScope = Schema.Literals([
- "total",
- "body_after_prefix",
+export type V2ConfigReadResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
+export const V2ConfigReadResponse__ApprovalsReviewer = Schema.Literals([
+ "user",
+ "auto_review",
+ "guardian_subagent",
]).annotate({
description:
- "Selects which part of the active context is charged against `model_auto_compact_token_limit`.",
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ identifier: "V2ConfigReadResponse__ApprovalsReviewer",
});
+export type V2ConfigReadResponse__AllowDenyRequirement = "allow" | "deny";
+export const V2ConfigReadResponse__AllowDenyRequirement = Schema.Literals([
+ "allow",
+ "deny",
+]).annotate({ identifier: "V2ConfigReadResponse__AllowDenyRequirement" });
+
export type V2ConfigReadResponse__ForcedChatgptWorkspaceIds = string | ReadonlyArray;
export const V2ConfigReadResponse__ForcedChatgptWorkspaceIds = Schema.Union([
Schema.String,
Schema.Array(Schema.String),
]).annotate({
description: "Backward-compatible API shape for ChatGPT workspace login restrictions.",
+ identifier: "V2ConfigReadResponse__ForcedChatgptWorkspaceIds",
});
export type V2ConfigReadResponse__ForcedLoginMethod = "chatgpt" | "api";
-export const V2ConfigReadResponse__ForcedLoginMethod = Schema.Literals(["chatgpt", "api"]);
+export const V2ConfigReadResponse__ForcedLoginMethod = Schema.Literals(["chatgpt", "api"]).annotate(
+ { identifier: "V2ConfigReadResponse__ForcedLoginMethod" },
+);
+
+export type V2ConfigReadResponse__AutoCompactTokenLimitScope = "total" | "body_after_prefix";
+export const V2ConfigReadResponse__AutoCompactTokenLimitScope = Schema.Union(
+ [
+ Schema.Literal("total").annotate({
+ description: "Count the full active context against the limit.",
+ }),
+ Schema.Literal("body_after_prefix").annotate({
+ description: "Count sampled output and later growth after the carried window prefix.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description:
+ "Selects which part of the active context is charged against `model_auto_compact_token_limit`.",
+ identifier: "V2ConfigReadResponse__AutoCompactTokenLimitScope",
+});
export type V2ConfigReadResponse__ReasoningEffort = string;
export const V2ConfigReadResponse__ReasoningEffort = Schema.String.annotate({
description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ConfigReadResponse__ReasoningEffort",
+ }),
+);
export type V2ConfigReadResponse__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
export const V2ConfigReadResponse__ReasoningSummary = Schema.Union(
@@ -3621,6 +4552,14 @@ export const V2ConfigReadResponse__ReasoningSummary = Schema.Union(
).annotate({
description:
"A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
+ identifier: "V2ConfigReadResponse__ReasoningSummary",
+});
+
+export type V2ConfigReadResponse__Verbosity = "low" | "medium" | "high";
+export const V2ConfigReadResponse__Verbosity = Schema.Literals(["low", "medium", "high"]).annotate({
+ description:
+ "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.",
+ identifier: "V2ConfigReadResponse__Verbosity",
});
export type V2ConfigReadResponse__SandboxMode =
@@ -3631,7 +4570,7 @@ export const V2ConfigReadResponse__SandboxMode = Schema.Literals([
"read-only",
"workspace-write",
"danger-full-access",
-]);
+]).annotate({ identifier: "V2ConfigReadResponse__SandboxMode" });
export type V2ConfigReadResponse__SandboxWorkspaceWrite = {
readonly exclude_slash_tmp?: boolean;
@@ -3644,20 +4583,14 @@ export const V2ConfigReadResponse__SandboxWorkspaceWrite = Schema.Struct({
exclude_tmpdir_env_var: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
network_access: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
writable_roots: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
-});
-
-export type V2ConfigReadResponse__Verbosity = "low" | "medium" | "high";
-export const V2ConfigReadResponse__Verbosity = Schema.Literals(["low", "medium", "high"]).annotate({
- description:
- "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.",
-});
+}).annotate({ identifier: "V2ConfigReadResponse__SandboxWorkspaceWrite" });
export type V2ConfigReadResponse__WebSearchContextSize = "low" | "medium" | "high";
export const V2ConfigReadResponse__WebSearchContextSize = Schema.Literals([
"low",
"medium",
"high",
-]);
+]).annotate({ identifier: "V2ConfigReadResponse__WebSearchContextSize" });
export type V2ConfigReadResponse__WebSearchLocation = {
readonly city?: string | null;
@@ -3670,7 +4603,7 @@ export const V2ConfigReadResponse__WebSearchLocation = Schema.Struct({
country: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
region: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
timezone: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ConfigReadResponse__WebSearchLocation" });
export type V2ConfigReadResponse__WebSearchMode = "disabled" | "cached" | "indexed" | "live";
export const V2ConfigReadResponse__WebSearchMode = Schema.Literals([
@@ -3678,7 +4611,56 @@ export const V2ConfigReadResponse__WebSearchMode = Schema.Literals([
"cached",
"indexed",
"live",
-]);
+]).annotate({ identifier: "V2ConfigReadResponse__WebSearchMode" });
+
+export type V2ConfigReadResponse__AbsolutePathBuf = string;
+export const V2ConfigReadResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ConfigReadResponse__AbsolutePathBuf",
+});
+
+export type V2ConfigReadResponse__AppToolApproval = "auto" | "prompt" | "writes" | "approve";
+export const V2ConfigReadResponse__AppToolApproval = Schema.Literals([
+ "auto",
+ "prompt",
+ "writes",
+ "approve",
+]).annotate({ identifier: "V2ConfigReadResponse__AppToolApproval" });
+
+export type V2ConfigReadResponse__AppLinksConfig = { readonly [x: string]: Schema.Json };
+export const V2ConfigReadResponse__AppLinksConfig = Schema.Record(
+ Schema.String,
+ Schema.Json.annotate({ expected: "JSON value" }),
+).annotate({
+ description: "Account settings for a single app.",
+ identifier: "V2ConfigReadResponse__AppLinksConfig",
+});
+
+export type V2ConfigReadResponse__ToolExposureSurface = "code_mode" | "deferred" | "direct";
+export const V2ConfigReadResponse__ToolExposureSurface = Schema.Union(
+ [
+ Schema.Literal("code_mode").annotate({
+ description: "Nested tools available to Code Mode scripts.",
+ }),
+ Schema.Literal("deferred").annotate({
+ description: "Tools discovered later through tool search.",
+ }),
+ Schema.Literal("direct").annotate({
+ description: "Tools present in the model's initial tool list.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "A model-facing surface on which a tool can be exposed.",
+ identifier: "V2ConfigReadResponse__ToolExposureSurface",
+});
+
+export type V2ConfigReadResponse__AppToolsConfig = { readonly [x: string]: Schema.Json };
+export const V2ConfigReadResponse__AppToolsConfig = Schema.Record(
+ Schema.String,
+ Schema.Json.annotate({ expected: "JSON value" }),
+).annotate({ identifier: "V2ConfigReadResponse__AppToolsConfig" });
export type V2ConfigRequirementsReadResponse__AskForApproval =
| "untrusted"
@@ -3707,17 +4689,119 @@ export const V2ConfigRequirementsReadResponse__AskForApproval = Schema.Union(
}).annotate({ title: "GranularAskForApproval" }),
],
{ mode: "oneOf" },
+).annotate({ identifier: "V2ConfigRequirementsReadResponse__AskForApproval" });
+
+export type V2ConfigRequirementsReadResponse__ForcedLoginMethod = "chatgpt" | "api";
+export const V2ConfigRequirementsReadResponse__ForcedLoginMethod = Schema.Literals([
+ "chatgpt",
+ "api",
+]).annotate({ identifier: "V2ConfigRequirementsReadResponse__ForcedLoginMethod" });
+
+export type V2ConfigRequirementsReadResponse__SandboxMode =
+ | "read-only"
+ | "workspace-write"
+ | "danger-full-access";
+export const V2ConfigRequirementsReadResponse__SandboxMode = Schema.Literals([
+ "read-only",
+ "workspace-write",
+ "danger-full-access",
+]).annotate({ identifier: "V2ConfigRequirementsReadResponse__SandboxMode" });
+
+export type V2ConfigRequirementsReadResponse__WebSearchMode =
+ | "disabled"
+ | "cached"
+ | "indexed"
+ | "live";
+export const V2ConfigRequirementsReadResponse__WebSearchMode = Schema.Literals([
+ "disabled",
+ "cached",
+ "indexed",
+ "live",
+]).annotate({ identifier: "V2ConfigRequirementsReadResponse__WebSearchMode" });
+
+export type V2ConfigRequirementsReadResponse__WindowsSandboxImplementation =
+ | "elevated"
+ | "unelevated"
+ | "mxc";
+export const V2ConfigRequirementsReadResponse__WindowsSandboxImplementation = Schema.Literals([
+ "elevated",
+ "unelevated",
+ "mxc",
+]).annotate({ identifier: "V2ConfigRequirementsReadResponse__WindowsSandboxImplementation" });
+
+export type V2ConfigRequirementsReadResponse__AutoReviewRequirements = {
+ readonly ignoreRules?: ReadonlyArray | null;
+ readonly requiredOnModels?: ReadonlyArray | null;
+};
+export const V2ConfigRequirementsReadResponse__AutoReviewRequirements = Schema.Struct({
+ ignoreRules: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ requiredOnModels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+}).annotate({ identifier: "V2ConfigRequirementsReadResponse__AutoReviewRequirements" });
+
+export type V2ConfigRequirementsReadResponse__AllowDenyRequirement = "allow" | "deny";
+export const V2ConfigRequirementsReadResponse__AllowDenyRequirement = Schema.Literals([
+ "allow",
+ "deny",
+]).annotate({ identifier: "V2ConfigRequirementsReadResponse__AllowDenyRequirement" });
+
+export type V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime = "turn" | "thread";
+export const V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime = Schema.Literals([
+ "turn",
+ "thread",
+]).annotate({ identifier: "V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime" });
+
+export type V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode =
+ | "file"
+ | "keyring"
+ | "auto"
+ | "ephemeral";
+export const V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode = Schema.Literals([
+ "file",
+ "keyring",
+ "auto",
+ "ephemeral",
+]).annotate({ identifier: "V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode" });
+
+export type V2ConfigRequirementsReadResponse__ResidencyRequirement = "us";
+export const V2ConfigRequirementsReadResponse__ResidencyRequirement = Schema.Literal("us").annotate(
+ { identifier: "V2ConfigRequirementsReadResponse__ResidencyRequirement" },
);
-export type V2ConfigRequirementsReadResponse__ComputerUseRequirements = {
- readonly allowLockedComputerUse?: boolean | null;
+export type V2ConfigRequirementsReadResponse__FeedbackRequirements = {
+ readonly enabled?: boolean | null;
};
-export const V2ConfigRequirementsReadResponse__ComputerUseRequirements = Schema.Struct({
- allowLockedComputerUse: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
-});
+export const V2ConfigRequirementsReadResponse__FeedbackRequirements = Schema.Struct({
+ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
+}).annotate({ identifier: "V2ConfigRequirementsReadResponse__FeedbackRequirements" });
+
+export type V2ConfigRequirementsReadResponse__InAppBrowserRequirements = {
+ readonly allowExternalBrowserSettingsImport?: boolean | null;
+};
+export const V2ConfigRequirementsReadResponse__InAppBrowserRequirements = Schema.Struct({
+ allowExternalBrowserSettingsImport: Schema.optionalKey(
+ Schema.Union([Schema.Boolean, Schema.Null]),
+ ),
+}).annotate({ identifier: "V2ConfigRequirementsReadResponse__InAppBrowserRequirements" });
+
+export type V2ConfigRequirementsReadResponse__ReasoningEffort = string;
+export const V2ConfigRequirementsReadResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ConfigRequirementsReadResponse__ReasoningEffort",
+ }),
+);
+
+export type V2ConfigRequirementsReadResponse__NetworkDomainPermission = "allow" | "deny";
+export const V2ConfigRequirementsReadResponse__NetworkDomainPermission = Schema.Literals([
+ "allow",
+ "deny",
+]).annotate({ identifier: "V2ConfigRequirementsReadResponse__NetworkDomainPermission" });
export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler =
| {
+ readonly additionalContextLimit?: number | null;
readonly async: boolean;
readonly command: string;
readonly commandWindows?: string | null;
@@ -3725,11 +4809,35 @@ export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler =
readonly timeoutSec?: number | null;
readonly type: "command";
}
+ | {
+ readonly input: { readonly [x: string]: Schema.Json };
+ readonly server: string;
+ readonly statusMessage?: string | null;
+ readonly timeoutSec?: number | null;
+ readonly tool: string;
+ readonly type: "mcp_tool";
+ }
| { readonly type: "prompt" }
| { readonly type: "agent" };
export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Union(
[
Schema.Struct({
+ additionalContextLimit: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({
+ description:
+ "Approximate token threshold for spilling this hook's `additionalContext` to disk. `null` uses 2,500 tokens; `0` disables spilling for this hook. The threshold is evaluated against the original context; a spilled preview also includes recovery metadata.",
+ format: "uint",
+ })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
+ ),
async: Schema.Boolean,
command: Schema.String,
commandWindows: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -3737,13 +4845,36 @@ export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Un
timeoutSec: Schema.optionalKey(
Schema.Union([
Schema.Number.annotate({ format: "uint64" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
Schema.Null,
]),
),
type: Schema.Literal("command").annotate({ title: "CommandConfiguredHookHandlerType" }),
}).annotate({ title: "CommandConfiguredHookHandler" }),
+ Schema.Struct({
+ input: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
+ server: Schema.String,
+ statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ timeoutSec: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "uint64" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ tool: Schema.String,
+ type: Schema.Literal("mcp_tool").annotate({ title: "McpToolConfiguredHookHandlerType" }),
+ }).annotate({ title: "McpToolConfiguredHookHandler" }),
Schema.Struct({
type: Schema.Literal("prompt").annotate({ title: "PromptConfiguredHookHandlerType" }),
}).annotate({ title: "PromptConfiguredHookHandler" }),
@@ -3752,58 +4883,19 @@ export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Un
}).annotate({ title: "AgentConfiguredHookHandler" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ConfigRequirementsReadResponse__NetworkDomainPermission = "allow" | "deny";
-export const V2ConfigRequirementsReadResponse__NetworkDomainPermission = Schema.Literals([
- "allow",
- "deny",
-]);
+).annotate({ identifier: "V2ConfigRequirementsReadResponse__ConfiguredHookHandler" });
export type V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = "allow" | "deny";
export const V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = Schema.Literals([
"allow",
"deny",
-]);
-
-export type V2ConfigRequirementsReadResponse__ReasoningEffort = string;
-export const V2ConfigRequirementsReadResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
-
-export type V2ConfigRequirementsReadResponse__ResidencyRequirement = "us";
-export const V2ConfigRequirementsReadResponse__ResidencyRequirement = Schema.Literal("us");
-
-export type V2ConfigRequirementsReadResponse__SandboxMode =
- | "read-only"
- | "workspace-write"
- | "danger-full-access";
-export const V2ConfigRequirementsReadResponse__SandboxMode = Schema.Literals([
- "read-only",
- "workspace-write",
- "danger-full-access",
-]);
-
-export type V2ConfigRequirementsReadResponse__WebSearchMode =
- | "disabled"
- | "cached"
- | "indexed"
- | "live";
-export const V2ConfigRequirementsReadResponse__WebSearchMode = Schema.Literals([
- "disabled",
- "cached",
- "indexed",
- "live",
-]);
-
-export type V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = "elevated" | "unelevated";
-export const V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = Schema.Literals([
- "elevated",
- "unelevated",
-]);
+]).annotate({ identifier: "V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission" });
export type V2ConfigValueWriteParams__MergeStrategy = "replace" | "upsert";
-export const V2ConfigValueWriteParams__MergeStrategy = Schema.Literals(["replace", "upsert"]);
+export const V2ConfigValueWriteParams__MergeStrategy = Schema.Literals([
+ "replace",
+ "upsert",
+]).annotate({ identifier: "V2ConfigValueWriteParams__MergeStrategy" });
export type V2ConfigWarningNotification__TextPosition = {
readonly column: number;
@@ -3814,21 +4906,28 @@ export const V2ConfigWarningNotification__TextPosition = Schema.Struct({
description: "1-based column number (in Unicode scalar values).",
format: "uint",
})
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
line: Schema.Number.annotate({ description: "1-based line number.", format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
-});
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ConfigWarningNotification__TextPosition" });
export type V2ConfigWriteResponse__AbsolutePathBuf = string;
export const V2ConfigWriteResponse__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ConfigWriteResponse__AbsolutePathBuf",
});
export type V2ConfigWriteResponse__WriteStatus = "ok" | "okOverridden";
-export const V2ConfigWriteResponse__WriteStatus = Schema.Literals(["ok", "okOverridden"]);
+export const V2ConfigWriteResponse__WriteStatus = Schema.Literals(["ok", "okOverridden"]).annotate({
+ identifier: "V2ConfigWriteResponse__WriteStatus",
+});
export type V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome =
| "reset"
@@ -3836,101 +4935,85 @@ export type V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimi
| "noCredit"
| "alreadyRedeemed";
export const V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome =
- Schema.Literals(["reset", "nothingToReset", "noCredit", "alreadyRedeemed"]);
-
-export type V2ErrorNotification__NonSteerableTurnKind = "review" | "compact";
-export const V2ErrorNotification__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
-
-export type V2ExperimentalFeatureListResponse__ExperimentalFeature = {
- readonly announcement?: string | null;
- readonly defaultEnabled: boolean;
- readonly description?: string | null;
- readonly displayName?: string | null;
- readonly enabled: boolean;
- readonly name: string;
- readonly stage: "beta" | "underDevelopment" | "stable" | "deprecated" | "removed";
-};
-export const V2ExperimentalFeatureListResponse__ExperimentalFeature = Schema.Struct({
- announcement: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Announcement copy shown to users when the feature is introduced. Null when this feature is not in beta.",
+ Schema.Union(
+ [
+ Schema.Literal("reset").annotate({
+ description: "A reset credit was consumed and the eligible rate-limit windows were reset.",
}),
- Schema.Null,
- ]),
- ),
- defaultEnabled: Schema.Boolean.annotate({
- description: "Whether this feature is enabled by default.",
- }),
- description: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Short summary describing what the feature does. Null when this feature is not in beta.",
+ Schema.Literal("nothingToReset").annotate({
+ description: "No current rate-limit window is eligible for a reset.",
}),
- Schema.Null,
- ]),
- ),
- displayName: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "User-facing display name shown in the experimental features UI. Null when this feature is not in beta.",
+ Schema.Literal("noCredit").annotate({
+ description: "The account has no earned reset credits available.",
}),
- Schema.Null,
- ]),
- ),
- enabled: Schema.Boolean.annotate({
- description: "Whether this feature is currently enabled in the loaded config.",
- }),
- name: Schema.String.annotate({
- description: "Stable key used in config.toml and CLI flag toggles.",
- }),
- stage: Schema.Literals(["beta", "underDevelopment", "stable", "deprecated", "removed"]).annotate({
- description: "Lifecycle stage of this feature flag.",
- }),
-});
+ Schema.Literal("alreadyRedeemed").annotate({
+ description: "The same idempotency key already completed a reset successfully.",
+ }),
+ ],
+ { mode: "oneOf" },
+ ).annotate({
+ identifier:
+ "V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome",
+ });
+
+export type V2ErrorNotification__NonSteerableTurnKind = "review" | "compact";
+export const V2ErrorNotification__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ErrorNotification__NonSteerableTurnKind" });
+
+export type V2ErrorNotification__MisalignmentSteer = { readonly message: string };
+export const V2ErrorNotification__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ErrorNotification__MisalignmentSteer" });
+
+export type V2ExperimentalFeatureListResponse__ExperimentalFeatureStage =
+ | "beta"
+ | "underDevelopment"
+ | "stable"
+ | "deprecated"
+ | "removed";
+export const V2ExperimentalFeatureListResponse__ExperimentalFeatureStage = Schema.Union(
+ [
+ Schema.Literal("beta").annotate({
+ description: "Feature is available for user testing and feedback.",
+ }),
+ Schema.Literal("underDevelopment").annotate({
+ description: "Feature is still being built and not ready for broad use.",
+ }),
+ Schema.Literal("stable").annotate({ description: "Feature is production-ready." }),
+ Schema.Literal("deprecated").annotate({
+ description: "Feature is deprecated and should be avoided.",
+ }),
+ Schema.Literal("removed").annotate({
+ description: "Feature flag is retained only for backwards compatibility.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ExperimentalFeatureListResponse__ExperimentalFeatureStage" });
+
+export type V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource =
+ | "remoteMcpServersConfig"
+ | "sessionToolUse";
+export const V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource =
+ Schema.Literals(["remoteMcpServersConfig", "sessionToolUse"]).annotate({
+ identifier: "V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource",
+ });
export type V2ExternalAgentConfigDetectResponse__CommandMigration = { readonly name: string };
export const V2ExternalAgentConfigDetectResponse__CommandMigration = Schema.Struct({
name: Schema.String,
-});
-
-export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType =
- | "AGENTS_MD"
- | "CONFIG"
- | "SKILLS"
- | "PLUGINS"
- | "MCP_SERVER_CONFIG"
- | "SUBAGENTS"
- | "HOOKS"
- | "COMMANDS"
- | "MEMORY"
- | "SESSIONS";
-export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType =
- Schema.Literals([
- "AGENTS_MD",
- "CONFIG",
- "SKILLS",
- "PLUGINS",
- "MCP_SERVER_CONFIG",
- "SUBAGENTS",
- "HOOKS",
- "COMMANDS",
- "MEMORY",
- "SESSIONS",
- ]);
+}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__CommandMigration" });
export type V2ExternalAgentConfigDetectResponse__HookMigration = { readonly name: string };
export const V2ExternalAgentConfigDetectResponse__HookMigration = Schema.Struct({
name: Schema.String,
-});
+}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__HookMigration" });
export type V2ExternalAgentConfigDetectResponse__McpServerMigration = { readonly name: string };
export const V2ExternalAgentConfigDetectResponse__McpServerMigration = Schema.Struct({
name: Schema.String,
-});
+}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__McpServerMigration" });
export type V2ExternalAgentConfigDetectResponse__PluginsMigration = {
readonly marketplaceName: string;
@@ -3939,7 +5022,7 @@ export type V2ExternalAgentConfigDetectResponse__PluginsMigration = {
export const V2ExternalAgentConfigDetectResponse__PluginsMigration = Schema.Struct({
marketplaceName: Schema.String,
pluginNames: Schema.Array(Schema.String),
-});
+}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__PluginsMigration" });
export type V2ExternalAgentConfigDetectResponse__SessionMigration = {
readonly cwd: string;
@@ -3950,19 +5033,19 @@ export const V2ExternalAgentConfigDetectResponse__SessionMigration = Schema.Stru
cwd: Schema.String,
path: Schema.String,
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__SessionMigration" });
export type V2ExternalAgentConfigDetectResponse__SkillMigration = { readonly name: string };
export const V2ExternalAgentConfigDetectResponse__SkillMigration = Schema.Struct({
name: Schema.String,
-});
+}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__SkillMigration" });
export type V2ExternalAgentConfigDetectResponse__SubagentMigration = { readonly name: string };
export const V2ExternalAgentConfigDetectResponse__SubagentMigration = Schema.Struct({
name: Schema.String,
-});
+}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__SubagentMigration" });
-export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType =
+export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType =
| "AGENTS_MD"
| "CONFIG"
| "SKILLS"
@@ -3973,7 +5056,7 @@ export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfi
| "COMMANDS"
| "MEMORY"
| "SESSIONS";
-export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType =
+export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType =
Schema.Literals([
"AGENTS_MD",
"CONFIG",
@@ -3985,9 +5068,11 @@ export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConf
"COMMANDS",
"MEMORY",
"SESSIONS",
- ]);
+ ]).annotate({
+ identifier: "V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType",
+ });
-export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType =
+export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType =
| "AGENTS_MD"
| "CONFIG"
| "SKILLS"
@@ -3998,7 +5083,7 @@ export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfi
| "COMMANDS"
| "MEMORY"
| "SESSIONS";
-export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType =
+export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType =
Schema.Literals([
"AGENTS_MD",
"CONFIG",
@@ -4010,19 +5095,48 @@ export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConf
"COMMANDS",
"MEMORY",
"SESSIONS",
- ]);
+ ]).annotate({
+ identifier:
+ "V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType",
+ });
export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource =
"remoteMcpServersConfig";
export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource =
- Schema.Literal("remoteMcpServersConfig");
+ Schema.Literal("remoteMcpServersConfig").annotate({
+ identifier:
+ "V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource",
+ });
-export type V2ExternalAgentConfigImportParams__CommandMigration = { readonly name: string };
-export const V2ExternalAgentConfigImportParams__CommandMigration = Schema.Struct({
- name: Schema.String,
-});
+export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType =
+ | "AGENTS_MD"
+ | "CONFIG"
+ | "SKILLS"
+ | "PLUGINS"
+ | "MCP_SERVER_CONFIG"
+ | "SUBAGENTS"
+ | "HOOKS"
+ | "COMMANDS"
+ | "MEMORY"
+ | "SESSIONS";
+export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType =
+ Schema.Literals([
+ "AGENTS_MD",
+ "CONFIG",
+ "SKILLS",
+ "PLUGINS",
+ "MCP_SERVER_CONFIG",
+ "SUBAGENTS",
+ "HOOKS",
+ "COMMANDS",
+ "MEMORY",
+ "SESSIONS",
+ ]).annotate({
+ identifier:
+ "V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType",
+ });
-export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType =
+export type V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType =
| "AGENTS_MD"
| "CONFIG"
| "SKILLS"
@@ -4033,7 +5147,7 @@ export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemT
| "COMMANDS"
| "MEMORY"
| "SESSIONS";
-export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType =
+export const V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType =
Schema.Literals([
"AGENTS_MD",
"CONFIG",
@@ -4045,17 +5159,25 @@ export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem
"COMMANDS",
"MEMORY",
"SESSIONS",
- ]);
+ ]).annotate({
+ identifier:
+ "V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType",
+ });
+
+export type V2ExternalAgentConfigImportParams__CommandMigration = { readonly name: string };
+export const V2ExternalAgentConfigImportParams__CommandMigration = Schema.Struct({
+ name: Schema.String,
+}).annotate({ identifier: "V2ExternalAgentConfigImportParams__CommandMigration" });
export type V2ExternalAgentConfigImportParams__HookMigration = { readonly name: string };
export const V2ExternalAgentConfigImportParams__HookMigration = Schema.Struct({
name: Schema.String,
-});
+}).annotate({ identifier: "V2ExternalAgentConfigImportParams__HookMigration" });
export type V2ExternalAgentConfigImportParams__McpServerMigration = { readonly name: string };
export const V2ExternalAgentConfigImportParams__McpServerMigration = Schema.Struct({
name: Schema.String,
-});
+}).annotate({ identifier: "V2ExternalAgentConfigImportParams__McpServerMigration" });
export type V2ExternalAgentConfigImportParams__PluginsMigration = {
readonly marketplaceName: string;
@@ -4064,7 +5186,7 @@ export type V2ExternalAgentConfigImportParams__PluginsMigration = {
export const V2ExternalAgentConfigImportParams__PluginsMigration = Schema.Struct({
marketplaceName: Schema.String,
pluginNames: Schema.Array(Schema.String),
-});
+}).annotate({ identifier: "V2ExternalAgentConfigImportParams__PluginsMigration" });
export type V2ExternalAgentConfigImportParams__SessionMigration = {
readonly cwd: string;
@@ -4075,17 +5197,44 @@ export const V2ExternalAgentConfigImportParams__SessionMigration = Schema.Struct
cwd: Schema.String,
path: Schema.String,
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ExternalAgentConfigImportParams__SessionMigration" });
export type V2ExternalAgentConfigImportParams__SkillMigration = { readonly name: string };
export const V2ExternalAgentConfigImportParams__SkillMigration = Schema.Struct({
name: Schema.String,
-});
+}).annotate({ identifier: "V2ExternalAgentConfigImportParams__SkillMigration" });
export type V2ExternalAgentConfigImportParams__SubagentMigration = { readonly name: string };
export const V2ExternalAgentConfigImportParams__SubagentMigration = Schema.Struct({
name: Schema.String,
-});
+}).annotate({ identifier: "V2ExternalAgentConfigImportParams__SubagentMigration" });
+
+export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType =
+ | "AGENTS_MD"
+ | "CONFIG"
+ | "SKILLS"
+ | "PLUGINS"
+ | "MCP_SERVER_CONFIG"
+ | "SUBAGENTS"
+ | "HOOKS"
+ | "COMMANDS"
+ | "MEMORY"
+ | "SESSIONS";
+export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType =
+ Schema.Literals([
+ "AGENTS_MD",
+ "CONFIG",
+ "SKILLS",
+ "PLUGINS",
+ "MCP_SERVER_CONFIG",
+ "SUBAGENTS",
+ "HOOKS",
+ "COMMANDS",
+ "MEMORY",
+ "SESSIONS",
+ ]).annotate({
+ identifier: "V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType",
+ });
export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType =
| "AGENTS_MD"
@@ -4110,7 +5259,10 @@ export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfi
"COMMANDS",
"MEMORY",
"SESSIONS",
- ]);
+ ]).annotate({
+ identifier:
+ "V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType",
+ });
export type V2FileChangePatchUpdatedNotification__PatchChangeKind =
| { readonly type: "add" }
@@ -4130,12 +5282,41 @@ export const V2FileChangePatchUpdatedNotification__PatchChangeKind = Schema.Unio
}).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2FileChangePatchUpdatedNotification__PatchChangeKind" });
export type V2FsChangedNotification__AbsolutePathBuf = string;
export const V2FsChangedNotification__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2FsChangedNotification__AbsolutePathBuf",
+});
+
+export type V2FsCopyParams__AbsolutePathBuf = string;
+export const V2FsCopyParams__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2FsCopyParams__AbsolutePathBuf",
+});
+
+export type V2FsCreateDirectoryParams__AbsolutePathBuf = string;
+export const V2FsCreateDirectoryParams__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2FsCreateDirectoryParams__AbsolutePathBuf",
+});
+
+export type V2FsGetMetadataParams__AbsolutePathBuf = string;
+export const V2FsGetMetadataParams__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2FsGetMetadataParams__AbsolutePathBuf",
+});
+
+export type V2FsReadDirectoryParams__AbsolutePathBuf = string;
+export const V2FsReadDirectoryParams__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2FsReadDirectoryParams__AbsolutePathBuf",
});
export type V2FsReadDirectoryResponse__FsReadDirectoryEntry = {
@@ -4153,88 +5334,120 @@ export const V2FsReadDirectoryResponse__FsReadDirectoryEntry = Schema.Struct({
isFile: Schema.Boolean.annotate({
description: "Whether this entry resolves to a regular file.",
}),
-}).annotate({ description: "A directory entry returned by `fs/readDirectory`." });
+}).annotate({
+ description: "A directory entry returned by `fs/readDirectory`.",
+ identifier: "V2FsReadDirectoryResponse__FsReadDirectoryEntry",
+});
-export type V2GetAccountRateLimitsResponse__CreditsSnapshot = {
- readonly balance?: string | null;
- readonly hasCredits: boolean;
- readonly unlimited: boolean;
-};
-export const V2GetAccountRateLimitsResponse__CreditsSnapshot = Schema.Struct({
- balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- hasCredits: Schema.Boolean,
- unlimited: Schema.Boolean,
+export type V2FsReadFileParams__AbsolutePathBuf = string;
+export const V2FsReadFileParams__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2FsReadFileParams__AbsolutePathBuf",
});
-export type V2GetAccountRateLimitsResponse__PlanType =
- | "free"
- | "go"
- | "plus"
- | "pro"
- | "prolite"
- | "team"
- | "self_serve_business_prolite"
- | "self_serve_business_usage_based"
- | "business"
- | "ent26"
- | "enterprise_cbp_automation"
- | "enterprise_cbp_usage_based"
- | "enterprise"
- | "edu"
- | "edu_plus"
- | "edu_pro"
- | "unknown";
-export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([
- "free",
- "go",
- "plus",
- "pro",
- "prolite",
- "team",
- "self_serve_business_prolite",
- "self_serve_business_usage_based",
- "business",
- "ent26",
- "enterprise_cbp_automation",
- "enterprise_cbp_usage_based",
- "enterprise",
- "edu",
- "edu_plus",
- "edu_pro",
- "unknown",
-]);
+export type V2FsRemoveParams__AbsolutePathBuf = string;
+export const V2FsRemoveParams__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2FsRemoveParams__AbsolutePathBuf",
+});
-export type V2GetAccountRateLimitsResponse__RateLimitReachedType =
- | "rate_limit_reached"
- | "workspace_owner_credits_depleted"
- | "workspace_member_credits_depleted"
- | "workspace_owner_usage_limit_reached"
- | "workspace_member_usage_limit_reached";
-export const V2GetAccountRateLimitsResponse__RateLimitReachedType = Schema.Literals([
- "rate_limit_reached",
- "workspace_owner_credits_depleted",
- "workspace_member_credits_depleted",
- "workspace_owner_usage_limit_reached",
- "workspace_member_usage_limit_reached",
-]);
+export type V2FsWatchParams__AbsolutePathBuf = string;
+export const V2FsWatchParams__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2FsWatchParams__AbsolutePathBuf",
+});
-export type V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus =
- | "available"
- | "redeeming"
- | "redeemed"
+export type V2FsWatchResponse__AbsolutePathBuf = string;
+export const V2FsWatchResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2FsWatchResponse__AbsolutePathBuf",
+});
+
+export type V2FsWriteFileParams__AbsolutePathBuf = string;
+export const V2FsWriteFileParams__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2FsWriteFileParams__AbsolutePathBuf",
+});
+
+export type V2GatewayOAuthChangedNotification__GatewayOAuthStatus =
+ | "notReady"
+ | "started"
+ | "succeeded"
+ | "failed";
+export const V2GatewayOAuthChangedNotification__GatewayOAuthStatus = Schema.Literals([
+ "notReady",
+ "started",
+ "succeeded",
+ "failed",
+]).annotate({ identifier: "V2GatewayOAuthChangedNotification__GatewayOAuthStatus" });
+
+export type V2GatewayOAuthReadResponse__GatewayOAuthStatus =
+ | "notReady"
+ | "started"
+ | "succeeded"
+ | "failed";
+export const V2GatewayOAuthReadResponse__GatewayOAuthStatus = Schema.Literals([
+ "notReady",
+ "started",
+ "succeeded",
+ "failed",
+]).annotate({ identifier: "V2GatewayOAuthReadResponse__GatewayOAuthStatus" });
+
+export type V2GetAccountRateLimitsResponse__RateLimitResetType = "codexRateLimits" | "unknown";
+export const V2GetAccountRateLimitsResponse__RateLimitResetType = Schema.Literals([
+ "codexRateLimits",
+ "unknown",
+]).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitResetType" });
+
+export type V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus =
+ | "available"
+ | "redeeming"
+ | "redeemed"
| "unknown";
export const V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus = Schema.Literals([
"available",
"redeeming",
"redeemed",
"unknown",
-]);
+]).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus" });
-export type V2GetAccountRateLimitsResponse__RateLimitResetType = "codexRateLimits" | "unknown";
-export const V2GetAccountRateLimitsResponse__RateLimitResetType = Schema.Literals([
- "codexRateLimits",
- "unknown",
-]);
+export type V2GetAccountRateLimitsResponse__CreditsSnapshot = {
+ readonly balance?: string | null;
+ readonly hasCredits: boolean;
+ readonly unlimited: boolean;
+};
+export const V2GetAccountRateLimitsResponse__CreditsSnapshot = Schema.Struct({
+ balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ hasCredits: Schema.Boolean,
+ unlimited: Schema.Boolean,
+}).annotate({ identifier: "V2GetAccountRateLimitsResponse__CreditsSnapshot" });
+
+export type V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = {
+ readonly limit: string;
+ readonly remainingPercent: number;
+ readonly resetsAt: number;
+ readonly used: string;
+};
+export const V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = Schema.Struct({
+ limit: Schema.String,
+ remainingPercent: Schema.Number.annotate({ format: "int32" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ resetsAt: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ used: Schema.String,
+}).annotate({ identifier: "V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot" });
+
+export type V2GetAccountRateLimitsResponse__PlanType = string;
+export const V2GetAccountRateLimitsResponse__PlanType = Schema.String.annotate({
+ identifier: "V2GetAccountRateLimitsResponse__PlanType",
+});
export type V2GetAccountRateLimitsResponse__RateLimitWindow = {
readonly resetsAt?: number | null;
@@ -4243,64 +5456,54 @@ export type V2GetAccountRateLimitsResponse__RateLimitWindow = {
};
export const V2GetAccountRateLimitsResponse__RateLimitWindow = Schema.Struct({
resetsAt: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ usedPercent: Schema.Number.annotate({ format: "int32" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
),
- usedPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
windowDurationMins: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
),
-});
+}).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitWindow" });
-export type V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = {
- readonly limit: string;
- readonly remainingPercent: number;
- readonly resetsAt: number;
- readonly used: string;
-};
-export const V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = Schema.Struct({
- limit: Schema.String,
- remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
- resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- used: Schema.String,
+export type V2GetAccountRateLimitsResponse__RateLimitReachedType =
+ | "rate_limit_reached"
+ | "workspace_owner_credits_depleted"
+ | "workspace_member_credits_depleted"
+ | "workspace_owner_usage_limit_reached"
+ | "workspace_member_usage_limit_reached";
+export const V2GetAccountRateLimitsResponse__RateLimitReachedType = Schema.Literals([
+ "rate_limit_reached",
+ "workspace_owner_credits_depleted",
+ "workspace_member_credits_depleted",
+ "workspace_owner_usage_limit_reached",
+ "workspace_member_usage_limit_reached",
+]).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitReachedType" });
+
+export type V2GetAccountResponse__PlanType = string;
+export const V2GetAccountResponse__PlanType = Schema.String.annotate({
+ identifier: "V2GetAccountResponse__PlanType",
});
-export type V2GetAccountResponse__PlanType =
- | "free"
- | "go"
- | "plus"
- | "pro"
- | "prolite"
- | "team"
- | "self_serve_business_prolite"
- | "self_serve_business_usage_based"
- | "business"
- | "ent26"
- | "enterprise_cbp_automation"
- | "enterprise_cbp_usage_based"
- | "enterprise"
- | "edu"
- | "edu_plus"
- | "edu_pro"
- | "unknown";
-export const V2GetAccountResponse__PlanType = Schema.Literals([
- "free",
- "go",
- "plus",
- "pro",
- "prolite",
- "team",
- "self_serve_business_prolite",
- "self_serve_business_usage_based",
- "business",
- "ent26",
- "enterprise_cbp_automation",
- "enterprise_cbp_usage_based",
- "enterprise",
- "edu",
- "edu_plus",
- "edu_pro",
- "unknown",
-]);
+export type V2GetAccountResponse__AccountRoutingOverride = "NO_CONSTRAINT" | "us" | "us_cr";
+export const V2GetAccountResponse__AccountRoutingOverride = Schema.Literals([
+ "NO_CONSTRAINT",
+ "us",
+ "us_cr",
+]).annotate({
+ description: "Backend routing policy. Wire values match the accounts/check contract.",
+ identifier: "V2GetAccountResponse__AccountRoutingOverride",
+});
export type V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = {
readonly startDate: string;
@@ -4308,8 +5511,10 @@ export type V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = {
};
export const V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = Schema.Struct({
startDate: Schema.String,
- tokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-});
+ tokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+}).annotate({ identifier: "V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket" });
export type V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = {
readonly currentStreakDays?: number | null;
@@ -4320,21 +5525,106 @@ export type V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = {
};
export const V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = Schema.Struct({
currentStreakDays: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
),
lifetimeTokens: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
),
longestRunningTurnSec: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
),
longestStreakDays: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
),
peakDailyTokens: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
),
-});
+}).annotate({ identifier: "V2GetAccountTokenUsageResponse__AccountTokenUsageSummary" });
+
+export type V2GetAccountTokenUsageResponse__ThreadUsageBreakdownGroup = {
+ readonly cachedInputTokens?: number | null;
+ readonly estimatedUsageCreditsMicros: number;
+ readonly inputTokens?: number | null;
+ readonly model?: string | null;
+ readonly netNewInputTokens?: number | null;
+ readonly outputTokens?: number | null;
+ readonly reasoningEffort?: string | null;
+ readonly speed?: string | null;
+ readonly totalTokens?: number | null;
+};
+export const V2GetAccountTokenUsageResponse__ThreadUsageBreakdownGroup = Schema.Struct({
+ cachedInputTokens: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ estimatedUsageCreditsMicros: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ inputTokens: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ netNewInputTokens: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ outputTokens: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ reasoningEffort: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ speed: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ totalTokens: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "V2GetAccountTokenUsageResponse__ThreadUsageBreakdownGroup" });
export type V2GetWorkspaceMessagesResponse__WorkspaceMessageType =
| "headline"
@@ -4344,13 +5634,21 @@ export const V2GetWorkspaceMessagesResponse__WorkspaceMessageType = Schema.Liter
"headline",
"announcement",
"unknown",
-]);
+]).annotate({ identifier: "V2GetWorkspaceMessagesResponse__WorkspaceMessageType" });
-export type V2HookCompletedNotification__AbsolutePathBuf = string;
-export const V2HookCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
+export type V2HookCompletedNotification__HookOutputEntryKind =
+ | "warning"
+ | "stop"
+ | "feedback"
+ | "context"
+ | "error";
+export const V2HookCompletedNotification__HookOutputEntryKind = Schema.Literals([
+ "warning",
+ "stop",
+ "feedback",
+ "context",
+ "error",
+]).annotate({ identifier: "V2HookCompletedNotification__HookOutputEntryKind" });
export type V2HookCompletedNotification__HookEventName =
| "preToolUse"
@@ -4363,7 +5661,8 @@ export type V2HookCompletedNotification__HookEventName =
| "userPromptSubmit"
| "subagentStart"
| "subagentStop"
- | "stop";
+ | "stop"
+ | "interrupt";
export const V2HookCompletedNotification__HookEventName = Schema.Literals([
"preToolUse",
"permissionRequest",
@@ -4376,31 +5675,64 @@ export const V2HookCompletedNotification__HookEventName = Schema.Literals([
"subagentStart",
"subagentStop",
"stop",
-]);
+ "interrupt",
+]).annotate({ identifier: "V2HookCompletedNotification__HookEventName" });
export type V2HookCompletedNotification__HookExecutionMode = "sync" | "async";
-export const V2HookCompletedNotification__HookExecutionMode = Schema.Literals(["sync", "async"]);
-
-export type V2HookCompletedNotification__HookHandlerType = "command" | "prompt" | "agent";
+export const V2HookCompletedNotification__HookExecutionMode = Schema.Literals([
+ "sync",
+ "async",
+]).annotate({ identifier: "V2HookCompletedNotification__HookExecutionMode" });
+
+export type V2HookCompletedNotification__HookHandlerType =
+ | "command"
+ | "mcpTool"
+ | "prompt"
+ | "agent";
export const V2HookCompletedNotification__HookHandlerType = Schema.Literals([
"command",
+ "mcpTool",
"prompt",
"agent",
-]);
+]).annotate({ identifier: "V2HookCompletedNotification__HookHandlerType" });
-export type V2HookCompletedNotification__HookOutputEntryKind =
- | "warning"
- | "stop"
- | "feedback"
- | "context"
- | "error";
-export const V2HookCompletedNotification__HookOutputEntryKind = Schema.Literals([
- "warning",
- "stop",
- "feedback",
- "context",
- "error",
-]);
+export type V2HookCompletedNotification__HookScope = "thread" | "turn";
+export const V2HookCompletedNotification__HookScope = Schema.Literals(["thread", "turn"]).annotate({
+ identifier: "V2HookCompletedNotification__HookScope",
+});
+
+export type V2HookCompletedNotification__HookSource =
+ | "system"
+ | "user"
+ | "project"
+ | "mdm"
+ | "sessionFlags"
+ | "plugin"
+ | "cloudRequirements"
+ | "cloudManagedConfig"
+ | "legacyManagedConfigFile"
+ | "legacyManagedConfigMdm"
+ | "unknown";
+export const V2HookCompletedNotification__HookSource = Schema.Literals([
+ "system",
+ "user",
+ "project",
+ "mdm",
+ "sessionFlags",
+ "plugin",
+ "cloudRequirements",
+ "cloudManagedConfig",
+ "legacyManagedConfigFile",
+ "legacyManagedConfigMdm",
+ "unknown",
+]).annotate({ identifier: "V2HookCompletedNotification__HookSource" });
+
+export type V2HookCompletedNotification__AbsolutePathBuf = string;
+export const V2HookCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2HookCompletedNotification__AbsolutePathBuf",
+});
export type V2HookCompletedNotification__HookRunStatus =
| "running"
@@ -4414,16 +5746,7 @@ export const V2HookCompletedNotification__HookRunStatus = Schema.Literals([
"failed",
"blocked",
"stopped",
-]);
-
-export type V2HookCompletedNotification__HookScope = "thread" | "turn";
-export const V2HookCompletedNotification__HookScope = Schema.Literals(["thread", "turn"]);
-
-export type V2HooksListResponse__AbsolutePathBuf = string;
-export const V2HooksListResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
+]).annotate({ identifier: "V2HookCompletedNotification__HookRunStatus" });
export type V2HooksListResponse__HookErrorInfo = {
readonly message: string;
@@ -4432,7 +5755,7 @@ export type V2HooksListResponse__HookErrorInfo = {
export const V2HooksListResponse__HookErrorInfo = Schema.Struct({
message: Schema.String,
path: Schema.String,
-});
+}).annotate({ identifier: "V2HooksListResponse__HookErrorInfo" });
export type V2HooksListResponse__HookEventName =
| "preToolUse"
@@ -4445,7 +5768,8 @@ export type V2HooksListResponse__HookEventName =
| "userPromptSubmit"
| "subagentStart"
| "subagentStop"
- | "stop";
+ | "stop"
+ | "interrupt";
export const V2HooksListResponse__HookEventName = Schema.Literals([
"preToolUse",
"permissionRequest",
@@ -4458,10 +5782,8 @@ export const V2HooksListResponse__HookEventName = Schema.Literals([
"subagentStart",
"subagentStop",
"stop",
-]);
-
-export type V2HooksListResponse__HookHandlerType = "command" | "prompt" | "agent";
-export const V2HooksListResponse__HookHandlerType = Schema.Literals(["command", "prompt", "agent"]);
+ "interrupt",
+]).annotate({ identifier: "V2HooksListResponse__HookEventName" });
export type V2HooksListResponse__HookSource =
| "system"
@@ -4487,7 +5809,14 @@ export const V2HooksListResponse__HookSource = Schema.Literals([
"legacyManagedConfigFile",
"legacyManagedConfigMdm",
"unknown",
-]);
+]).annotate({ identifier: "V2HooksListResponse__HookSource" });
+
+export type V2HooksListResponse__AbsolutePathBuf = string;
+export const V2HooksListResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2HooksListResponse__AbsolutePathBuf",
+});
export type V2HooksListResponse__HookTrustStatus = "managed" | "untrusted" | "trusted" | "modified";
export const V2HooksListResponse__HookTrustStatus = Schema.Literals([
@@ -4495,13 +5824,21 @@ export const V2HooksListResponse__HookTrustStatus = Schema.Literals([
"untrusted",
"trusted",
"modified",
-]);
+]).annotate({ identifier: "V2HooksListResponse__HookTrustStatus" });
-export type V2HookStartedNotification__AbsolutePathBuf = string;
-export const V2HookStartedNotification__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
+export type V2HookStartedNotification__HookOutputEntryKind =
+ | "warning"
+ | "stop"
+ | "feedback"
+ | "context"
+ | "error";
+export const V2HookStartedNotification__HookOutputEntryKind = Schema.Literals([
+ "warning",
+ "stop",
+ "feedback",
+ "context",
+ "error",
+]).annotate({ identifier: "V2HookStartedNotification__HookOutputEntryKind" });
export type V2HookStartedNotification__HookEventName =
| "preToolUse"
@@ -4514,7 +5851,8 @@ export type V2HookStartedNotification__HookEventName =
| "userPromptSubmit"
| "subagentStart"
| "subagentStop"
- | "stop";
+ | "stop"
+ | "interrupt";
export const V2HookStartedNotification__HookEventName = Schema.Literals([
"preToolUse",
"permissionRequest",
@@ -4527,31 +5865,60 @@ export const V2HookStartedNotification__HookEventName = Schema.Literals([
"subagentStart",
"subagentStop",
"stop",
-]);
+ "interrupt",
+]).annotate({ identifier: "V2HookStartedNotification__HookEventName" });
export type V2HookStartedNotification__HookExecutionMode = "sync" | "async";
-export const V2HookStartedNotification__HookExecutionMode = Schema.Literals(["sync", "async"]);
+export const V2HookStartedNotification__HookExecutionMode = Schema.Literals([
+ "sync",
+ "async",
+]).annotate({ identifier: "V2HookStartedNotification__HookExecutionMode" });
-export type V2HookStartedNotification__HookHandlerType = "command" | "prompt" | "agent";
+export type V2HookStartedNotification__HookHandlerType = "command" | "mcpTool" | "prompt" | "agent";
export const V2HookStartedNotification__HookHandlerType = Schema.Literals([
"command",
+ "mcpTool",
"prompt",
"agent",
-]);
+]).annotate({ identifier: "V2HookStartedNotification__HookHandlerType" });
-export type V2HookStartedNotification__HookOutputEntryKind =
- | "warning"
- | "stop"
- | "feedback"
- | "context"
- | "error";
-export const V2HookStartedNotification__HookOutputEntryKind = Schema.Literals([
- "warning",
- "stop",
- "feedback",
- "context",
- "error",
-]);
+export type V2HookStartedNotification__HookScope = "thread" | "turn";
+export const V2HookStartedNotification__HookScope = Schema.Literals(["thread", "turn"]).annotate({
+ identifier: "V2HookStartedNotification__HookScope",
+});
+
+export type V2HookStartedNotification__HookSource =
+ | "system"
+ | "user"
+ | "project"
+ | "mdm"
+ | "sessionFlags"
+ | "plugin"
+ | "cloudRequirements"
+ | "cloudManagedConfig"
+ | "legacyManagedConfigFile"
+ | "legacyManagedConfigMdm"
+ | "unknown";
+export const V2HookStartedNotification__HookSource = Schema.Literals([
+ "system",
+ "user",
+ "project",
+ "mdm",
+ "sessionFlags",
+ "plugin",
+ "cloudRequirements",
+ "cloudManagedConfig",
+ "legacyManagedConfigFile",
+ "legacyManagedConfigMdm",
+ "unknown",
+]).annotate({ identifier: "V2HookStartedNotification__HookSource" });
+
+export type V2HookStartedNotification__AbsolutePathBuf = string;
+export const V2HookStartedNotification__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2HookStartedNotification__AbsolutePathBuf",
+});
export type V2HookStartedNotification__HookRunStatus =
| "running"
@@ -4565,34 +5932,111 @@ export const V2HookStartedNotification__HookRunStatus = Schema.Literals([
"failed",
"blocked",
"stopped",
-]);
+]).annotate({ identifier: "V2HookStartedNotification__HookRunStatus" });
-export type V2HookStartedNotification__HookScope = "thread" | "turn";
-export const V2HookStartedNotification__HookScope = Schema.Literals(["thread", "turn"]);
+export type V2ItemCompletedNotification__ByteRange = {
+ readonly end: number;
+ readonly start: number;
+};
+export const V2ItemCompletedNotification__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ItemCompletedNotification__ByteRange" });
-export type V2ItemCompletedNotification__AbsolutePathBuf = string;
-export const V2ItemCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
+export type V2ItemCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ItemCompletedNotification__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ItemCompletedNotification__ImageDetail" });
+
+export type V2ItemCompletedNotification__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
+};
+export const V2ItemCompletedNotification__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ItemCompletedNotification__HookPromptFragment" });
+
+export type V2ItemCompletedNotification__AgentMessageDelivery = "async";
+export const V2ItemCompletedNotification__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ItemCompletedNotification__AgentMessageDelivery",
+});
+
+export type V2ItemCompletedNotification__MemoryCitationEntry = {
+ readonly lineEnd: number;
+ readonly lineStart: number;
+ readonly note: string;
+ readonly path: string;
+};
+export const V2ItemCompletedNotification__MemoryCitationEntry = Schema.Struct({
+ lineEnd: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ lineStart: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ note: Schema.String,
+ path: Schema.String,
+}).annotate({ identifier: "V2ItemCompletedNotification__MemoryCitationEntry" });
+
+export type V2ItemCompletedNotification__MessagePhase = "commentary" | "final_answer";
+export const V2ItemCompletedNotification__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ItemCompletedNotification__MessagePhase",
});
-export type V2ItemCompletedNotification__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ItemCompletedNotification__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
+export type V2ItemCompletedNotification__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ItemCompletedNotification__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ItemCompletedNotification__AsyncUserInputQuestion" });
+
+export type V2ItemCompletedNotification__LegacyAppPathString = string;
+export const V2ItemCompletedNotification__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ItemCompletedNotification__LegacyAppPathString",
+});
+
+export type V2ItemCompletedNotification__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ItemCompletedNotification__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ItemCompletedNotification__CommandExecutionSource" });
export type V2ItemCompletedNotification__CommandExecutionStatus =
| "inProgress"
@@ -4604,65 +6048,39 @@ export const V2ItemCompletedNotification__CommandExecutionStatus = Schema.Litera
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ItemCompletedNotification__CommandExecutionStatus" });
-export type V2ItemCompletedNotification__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ItemCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union(
+export type V2ItemCompletedNotification__PatchChangeKind =
+ | { readonly type: "add" }
+ | { readonly type: "delete" }
+ | { readonly move_path?: string | null; readonly type: "update" };
+export const V2ItemCompletedNotification__PatchChangeKind = Schema.Union(
[
Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
+ }).annotate({ title: "AddPatchChangeKind" }),
Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
+ }).annotate({ title: "DeletePatchChangeKind" }),
Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
+ }).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ItemCompletedNotification__PatchChangeKind" });
-export type V2ItemCompletedNotification__DynamicToolCallStatus =
+export type V2ItemCompletedNotification__PatchApplyStatus =
| "inProgress"
| "completed"
- | "failed";
-export const V2ItemCompletedNotification__DynamicToolCallStatus = Schema.Literals([
+ | "failed"
+ | "declined";
+export const V2ItemCompletedNotification__PatchApplyStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
-]);
-
-export type V2ItemCompletedNotification__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
-};
-export const V2ItemCompletedNotification__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
-});
-
-export type V2ItemCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ItemCompletedNotification__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
-
-export type V2ItemCompletedNotification__LegacyAppPathString = string;
-export const V2ItemCompletedNotification__LegacyAppPathString = Schema.String;
+ "declined",
+]).annotate({ identifier: "V2ItemCompletedNotification__PatchApplyStatus" });
export type V2ItemCompletedNotification__McpToolCallAppContext = {
readonly actionName?: string | null;
@@ -4677,93 +6095,136 @@ export const V2ItemCompletedNotification__McpToolCallAppContext = Schema.Struct(
connectorId: Schema.String,
linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ItemCompletedNotification__McpToolCallAppContext" });
export type V2ItemCompletedNotification__McpToolCallError = { readonly message: string };
export const V2ItemCompletedNotification__McpToolCallError = Schema.Struct({
message: Schema.String,
-});
+}).annotate({ identifier: "V2ItemCompletedNotification__McpToolCallError" });
+
+export type V2ItemCompletedNotification__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ItemCompletedNotification__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ItemCompletedNotification__McpAppDisplayMode" });
export type V2ItemCompletedNotification__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
};
export const V2ItemCompletedNotification__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
-});
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ItemCompletedNotification__McpToolCallResult" });
export type V2ItemCompletedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
export const V2ItemCompletedNotification__McpToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
-]);
-
-export type V2ItemCompletedNotification__MemoryCitationEntry = {
- readonly lineEnd: number;
- readonly lineStart: number;
- readonly note: string;
- readonly path: string;
-};
-export const V2ItemCompletedNotification__MemoryCitationEntry = Schema.Struct({
- lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- note: Schema.String,
- path: Schema.String,
-});
+]).annotate({ identifier: "V2ItemCompletedNotification__McpToolCallStatus" });
-export type V2ItemCompletedNotification__MessagePhase = "commentary" | "final_answer";
-export const V2ItemCompletedNotification__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
- description:
- 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
-});
+export type V2ItemCompletedNotification__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ItemCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ItemCompletedNotification__DynamicToolCallOutputContentItem" });
-export type V2ItemCompletedNotification__PatchApplyStatus =
+export type V2ItemCompletedNotification__DynamicToolCallStatus =
| "inProgress"
| "completed"
- | "failed"
- | "declined";
-export const V2ItemCompletedNotification__PatchApplyStatus = Schema.Literals([
+ | "failed";
+export const V2ItemCompletedNotification__DynamicToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
- "declined",
-]);
+]).annotate({ identifier: "V2ItemCompletedNotification__DynamicToolCallStatus" });
-export type V2ItemCompletedNotification__PatchChangeKind =
- | { readonly type: "add" }
- | { readonly type: "delete" }
- | { readonly move_path?: string | null; readonly type: "update" };
-export const V2ItemCompletedNotification__PatchChangeKind = Schema.Union(
- [
- Schema.Struct({
- type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
- }).annotate({ title: "AddPatchChangeKind" }),
- Schema.Struct({
- type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
- }).annotate({ title: "DeletePatchChangeKind" }),
- Schema.Struct({
- move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
- }).annotate({ title: "UpdatePatchChangeKind" }),
- ],
- { mode: "oneOf" },
-);
+export type V2ItemCompletedNotification__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ItemCompletedNotification__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ItemCompletedNotification__CollabAgentStatus" });
export type V2ItemCompletedNotification__ReasoningEffort = string;
export const V2ItemCompletedNotification__ReasoningEffort = Schema.String.annotate({
description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ItemCompletedNotification__ReasoningEffort",
+ }),
+);
+
+export type V2ItemCompletedNotification__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "interrupted";
+export const V2ItemCompletedNotification__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "interrupted",
+]).annotate({ identifier: "V2ItemCompletedNotification__CollabAgentToolCallStatus" });
+
+export type V2ItemCompletedNotification__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ItemCompletedNotification__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ItemCompletedNotification__CollabAgentTool" });
export type V2ItemCompletedNotification__SubAgentActivityKind =
| "started"
@@ -4775,32 +6236,7 @@ export const V2ItemCompletedNotification__SubAgentActivityKind = Schema.Literals
"interacted",
"interrupted",
"completed",
-]);
-
-export type V2ItemCompletedNotification__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
-};
-export const V2ItemCompletedNotification__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
+]).annotate({ identifier: "V2ItemCompletedNotification__SubAgentActivityKind" });
export type V2ItemCompletedNotification__WebSearchAction =
| {
@@ -4832,33 +6268,109 @@ export const V2ItemCompletedNotification__WebSearchAction = Schema.Union(
}).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ItemCompletedNotification__WebSearchAction" });
+
+export type V2ItemCompletedNotification__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
+};
+export const V2ItemCompletedNotification__ImageGenerationFailure = Schema.Union(
+ [
+ Schema.Struct({
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
+ }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ItemCompletedNotification__ImageGenerationFailure" });
+
+export type V2ItemCompletedNotification__AbsolutePathBuf = string;
+export const V2ItemCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ItemCompletedNotification__AbsolutePathBuf",
+});
+
+export type V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString = string;
+export const V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString =
+ Schema.String.annotate({
+ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString",
+ });
+
+export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource =
+ | "shell"
+ | "unifiedExec";
+export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource =
+ Schema.Literals(["shell", "unifiedExec"]).annotate({
+ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource",
+ });
export type V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf = string;
export const V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf =
Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf",
+ });
+
+export type V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol =
+ | "http"
+ | "https"
+ | "socks5Tcp"
+ | "socks5Udp";
+export const V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol =
+ Schema.Literals(["http", "https", "socks5Tcp", "socks5Udp"]).annotate({
+ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol",
+ });
+
+export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode =
+ | "read"
+ | "write"
+ | "deny";
+export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode =
+ Schema.Literals(["read", "write", "deny"]).annotate({
+ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode",
});
export type V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions = {
readonly enabled?: boolean | null;
};
export const V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions =
- Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) });
+ Schema.Struct({
+ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
+ }).annotate({
+ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions",
+ });
export type V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource = "agent";
export const V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource =
Schema.Literal("agent").annotate({
description: "[UNSTABLE] Source that produced a terminal approval auto-review decision.",
+ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource",
});
-export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode =
- | "read"
- | "write"
- | "deny";
-export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode =
- Schema.Literals(["read", "write", "deny"]);
+export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel =
+ | "low"
+ | "medium"
+ | "high"
+ | "critical";
+export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel = Schema.Literals(
+ ["low", "medium", "high", "critical"],
+).annotate({
+ description: "[UNSTABLE] Risk level assigned by approval auto-review.",
+ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel",
+});
export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus =
| "inProgress"
@@ -4869,23 +6381,9 @@ export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalR
export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus =
Schema.Literals(["inProgress", "approved", "denied", "timedOut", "aborted"]).annotate({
description: "[UNSTABLE] Lifecycle state for an approval auto-review.",
+ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus",
});
-export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource =
- | "shell"
- | "unifiedExec";
-export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource =
- Schema.Literals(["shell", "unifiedExec"]);
-
-export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel =
- | "low"
- | "medium"
- | "high"
- | "critical";
-export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel = Schema.Literals(
- ["low", "medium", "high", "critical"],
-).annotate({ description: "[UNSTABLE] Risk level assigned by approval auto-review." });
-
export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization =
| "unknown"
| "low"
@@ -4894,55 +6392,59 @@ export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAutho
export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization =
Schema.Literals(["unknown", "low", "medium", "high"]).annotate({
description: "[UNSTABLE] Authorization level assigned by approval auto-review.",
+ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization",
});
-export type V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString = string;
-export const V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString = Schema.String;
+export type V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString = string;
+export const V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString =
+ Schema.String.annotate({
+ identifier: "V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString",
+ });
-export type V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol =
- | "http"
- | "https"
- | "socks5Tcp"
- | "socks5Udp";
-export const V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol =
- Schema.Literals(["http", "https", "socks5Tcp", "socks5Udp"]);
+export type V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource =
+ | "shell"
+ | "unifiedExec";
+export const V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource =
+ Schema.Literals(["shell", "unifiedExec"]).annotate({
+ identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource",
+ });
export type V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf = string;
export const V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf =
Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf",
});
-export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions = {
- readonly enabled?: boolean | null;
-};
-export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions =
- Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) });
+export type V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol =
+ | "http"
+ | "https"
+ | "socks5Tcp"
+ | "socks5Udp";
+export const V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol =
+ Schema.Literals(["http", "https", "socks5Tcp", "socks5Udp"]).annotate({
+ identifier: "V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol",
+ });
export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode =
| "read"
| "write"
| "deny";
export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode =
- Schema.Literals(["read", "write", "deny"]);
-
-export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus =
- | "inProgress"
- | "approved"
- | "denied"
- | "timedOut"
- | "aborted";
-export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus =
- Schema.Literals(["inProgress", "approved", "denied", "timedOut", "aborted"]).annotate({
- description: "[UNSTABLE] Lifecycle state for an approval auto-review.",
+ Schema.Literals(["read", "write", "deny"]).annotate({
+ identifier: "V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode",
});
-export type V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource =
- | "shell"
- | "unifiedExec";
-export const V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource =
- Schema.Literals(["shell", "unifiedExec"]);
+export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions = {
+ readonly enabled?: boolean | null;
+};
+export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions =
+ Schema.Struct({
+ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
+ }).annotate({
+ identifier: "V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions",
+ });
export type V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel =
| "low"
@@ -4954,7 +6456,22 @@ export const V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel
"medium",
"high",
"critical",
-]).annotate({ description: "[UNSTABLE] Risk level assigned by approval auto-review." });
+]).annotate({
+ description: "[UNSTABLE] Risk level assigned by approval auto-review.",
+ identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel",
+});
+
+export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus =
+ | "inProgress"
+ | "approved"
+ | "denied"
+ | "timedOut"
+ | "aborted";
+export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus =
+ Schema.Literals(["inProgress", "approved", "denied", "timedOut", "aborted"]).annotate({
+ description: "[UNSTABLE] Lifecycle state for an approval auto-review.",
+ identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus",
+ });
export type V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization =
| "unknown"
@@ -4964,42 +6481,109 @@ export type V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthori
export const V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization =
Schema.Literals(["unknown", "low", "medium", "high"]).annotate({
description: "[UNSTABLE] Authorization level assigned by approval auto-review.",
+ identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization",
});
-export type V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString = string;
-export const V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString = Schema.String;
+export type V2ItemStartedNotification__ByteRange = { readonly end: number; readonly start: number };
+export const V2ItemStartedNotification__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ItemStartedNotification__ByteRange" });
-export type V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol =
- | "http"
- | "https"
- | "socks5Tcp"
- | "socks5Udp";
-export const V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol =
- Schema.Literals(["http", "https", "socks5Tcp", "socks5Udp"]);
+export type V2ItemStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ItemStartedNotification__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ItemStartedNotification__ImageDetail" });
-export type V2ItemStartedNotification__AbsolutePathBuf = string;
-export const V2ItemStartedNotification__AbsolutePathBuf = Schema.String.annotate({
+export type V2ItemStartedNotification__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
+};
+export const V2ItemStartedNotification__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ItemStartedNotification__HookPromptFragment" });
+
+export type V2ItemStartedNotification__AgentMessageDelivery = "async";
+export const V2ItemStartedNotification__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ItemStartedNotification__AgentMessageDelivery",
+});
+
+export type V2ItemStartedNotification__MemoryCitationEntry = {
+ readonly lineEnd: number;
+ readonly lineStart: number;
+ readonly note: string;
+ readonly path: string;
+};
+export const V2ItemStartedNotification__MemoryCitationEntry = Schema.Struct({
+ lineEnd: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ lineStart: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ note: Schema.String,
+ path: Schema.String,
+}).annotate({ identifier: "V2ItemStartedNotification__MemoryCitationEntry" });
+
+export type V2ItemStartedNotification__MessagePhase = "commentary" | "final_answer";
+export const V2ItemStartedNotification__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ItemStartedNotification__MessagePhase",
});
-export type V2ItemStartedNotification__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ItemStartedNotification__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
+export type V2ItemStartedNotification__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ItemStartedNotification__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ItemStartedNotification__AsyncUserInputQuestion" });
+
+export type V2ItemStartedNotification__LegacyAppPathString = string;
+export const V2ItemStartedNotification__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ItemStartedNotification__LegacyAppPathString",
+});
+
+export type V2ItemStartedNotification__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ItemStartedNotification__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ItemStartedNotification__CommandExecutionSource" });
export type V2ItemStartedNotification__CommandExecutionStatus =
| "inProgress"
@@ -5011,65 +6595,39 @@ export const V2ItemStartedNotification__CommandExecutionStatus = Schema.Literals
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ItemStartedNotification__CommandExecutionStatus" });
-export type V2ItemStartedNotification__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ItemStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
+export type V2ItemStartedNotification__PatchChangeKind =
+ | { readonly type: "add" }
+ | { readonly type: "delete" }
+ | { readonly move_path?: string | null; readonly type: "update" };
+export const V2ItemStartedNotification__PatchChangeKind = Schema.Union(
[
Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
+ }).annotate({ title: "AddPatchChangeKind" }),
Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
+ }).annotate({ title: "DeletePatchChangeKind" }),
Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
+ }).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ItemStartedNotification__PatchChangeKind" });
-export type V2ItemStartedNotification__DynamicToolCallStatus =
+export type V2ItemStartedNotification__PatchApplyStatus =
| "inProgress"
| "completed"
- | "failed";
-export const V2ItemStartedNotification__DynamicToolCallStatus = Schema.Literals([
+ | "failed"
+ | "declined";
+export const V2ItemStartedNotification__PatchApplyStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
-]);
-
-export type V2ItemStartedNotification__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
-};
-export const V2ItemStartedNotification__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
-});
-
-export type V2ItemStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ItemStartedNotification__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
-
-export type V2ItemStartedNotification__LegacyAppPathString = string;
-export const V2ItemStartedNotification__LegacyAppPathString = Schema.String;
+ "declined",
+]).annotate({ identifier: "V2ItemStartedNotification__PatchApplyStatus" });
export type V2ItemStartedNotification__McpToolCallAppContext = {
readonly actionName?: string | null;
@@ -5084,93 +6642,136 @@ export const V2ItemStartedNotification__McpToolCallAppContext = Schema.Struct({
connectorId: Schema.String,
linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ItemStartedNotification__McpToolCallAppContext" });
export type V2ItemStartedNotification__McpToolCallError = { readonly message: string };
export const V2ItemStartedNotification__McpToolCallError = Schema.Struct({
message: Schema.String,
-});
+}).annotate({ identifier: "V2ItemStartedNotification__McpToolCallError" });
+
+export type V2ItemStartedNotification__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ItemStartedNotification__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ItemStartedNotification__McpAppDisplayMode" });
export type V2ItemStartedNotification__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
};
export const V2ItemStartedNotification__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
-});
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ItemStartedNotification__McpToolCallResult" });
export type V2ItemStartedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
export const V2ItemStartedNotification__McpToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
-]);
-
-export type V2ItemStartedNotification__MemoryCitationEntry = {
- readonly lineEnd: number;
- readonly lineStart: number;
- readonly note: string;
- readonly path: string;
-};
-export const V2ItemStartedNotification__MemoryCitationEntry = Schema.Struct({
- lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- note: Schema.String,
- path: Schema.String,
-});
+]).annotate({ identifier: "V2ItemStartedNotification__McpToolCallStatus" });
-export type V2ItemStartedNotification__MessagePhase = "commentary" | "final_answer";
-export const V2ItemStartedNotification__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
- description:
- 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
-});
+export type V2ItemStartedNotification__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ItemStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ItemStartedNotification__DynamicToolCallOutputContentItem" });
-export type V2ItemStartedNotification__PatchApplyStatus =
+export type V2ItemStartedNotification__DynamicToolCallStatus =
| "inProgress"
| "completed"
- | "failed"
- | "declined";
-export const V2ItemStartedNotification__PatchApplyStatus = Schema.Literals([
+ | "failed";
+export const V2ItemStartedNotification__DynamicToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
- "declined",
-]);
+]).annotate({ identifier: "V2ItemStartedNotification__DynamicToolCallStatus" });
-export type V2ItemStartedNotification__PatchChangeKind =
- | { readonly type: "add" }
- | { readonly type: "delete" }
- | { readonly move_path?: string | null; readonly type: "update" };
-export const V2ItemStartedNotification__PatchChangeKind = Schema.Union(
- [
- Schema.Struct({
- type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
- }).annotate({ title: "AddPatchChangeKind" }),
- Schema.Struct({
- type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
- }).annotate({ title: "DeletePatchChangeKind" }),
- Schema.Struct({
- move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
- }).annotate({ title: "UpdatePatchChangeKind" }),
- ],
- { mode: "oneOf" },
-);
+export type V2ItemStartedNotification__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ItemStartedNotification__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ItemStartedNotification__CollabAgentStatus" });
export type V2ItemStartedNotification__ReasoningEffort = string;
export const V2ItemStartedNotification__ReasoningEffort = Schema.String.annotate({
description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ItemStartedNotification__ReasoningEffort",
+ }),
+);
+
+export type V2ItemStartedNotification__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "interrupted";
+export const V2ItemStartedNotification__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "interrupted",
+]).annotate({ identifier: "V2ItemStartedNotification__CollabAgentToolCallStatus" });
+
+export type V2ItemStartedNotification__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ItemStartedNotification__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ItemStartedNotification__CollabAgentTool" });
export type V2ItemStartedNotification__SubAgentActivityKind =
| "started"
@@ -5182,32 +6783,7 @@ export const V2ItemStartedNotification__SubAgentActivityKind = Schema.Literals([
"interacted",
"interrupted",
"completed",
-]);
-
-export type V2ItemStartedNotification__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
-};
-export const V2ItemStartedNotification__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
+]).annotate({ identifier: "V2ItemStartedNotification__SubAgentActivityKind" });
export type V2ItemStartedNotification__WebSearchAction =
| {
@@ -5239,48 +6815,85 @@ export const V2ItemStartedNotification__WebSearchAction = Schema.Union(
}).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ItemStartedNotification__WebSearchAction" });
+
+export type V2ItemStartedNotification__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
+};
+export const V2ItemStartedNotification__ImageGenerationFailure = Schema.Union(
+ [
+ Schema.Struct({
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
+ }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ItemStartedNotification__ImageGenerationFailure" });
+
+export type V2ItemStartedNotification__AbsolutePathBuf = string;
+export const V2ItemStartedNotification__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ItemStartedNotification__AbsolutePathBuf",
+});
export type V2ListMcpServerStatusParams__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
export const V2ListMcpServerStatusParams__McpServerStatusDetail = Schema.Literals([
"full",
"toolsAndAuthOnly",
-]);
+]).annotate({ identifier: "V2ListMcpServerStatusParams__McpServerStatusDetail" });
export type V2ListMcpServerStatusResponse__McpAuthStatus =
+ | "unknown"
| "unsupported"
| "notLoggedIn"
| "bearerToken"
| "oAuth";
export const V2ListMcpServerStatusResponse__McpAuthStatus = Schema.Literals([
+ "unknown",
"unsupported",
"notLoggedIn",
"bearerToken",
"oAuth",
-]);
+]).annotate({ identifier: "V2ListMcpServerStatusResponse__McpAuthStatus" });
-export type V2ListMcpServerStatusResponse__McpServerInfo = {
+export type V2ListMcpServerStatusResponse__ResourceTemplate = {
+ readonly annotations?: Schema.Json;
readonly description?: string | null;
- readonly icons?: ReadonlyArray | null;
+ readonly mimeType?: string | null;
readonly name: string;
readonly title?: string | null;
- readonly version: string;
- readonly websiteUrl?: string | null;
+ readonly uriTemplate: string;
};
-export const V2ListMcpServerStatusResponse__McpServerInfo = Schema.Struct({
+export const V2ListMcpServerStatusResponse__ResourceTemplate = Schema.Struct({
+ annotations: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- icons: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
+ mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
name: Schema.String,
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- version: Schema.String,
- websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-}).annotate({ description: "Presentation metadata advertised by an initialized MCP server." });
+ uriTemplate: Schema.String,
+}).annotate({
+ description: "A template description for resources available on the server.",
+ identifier: "V2ListMcpServerStatusResponse__ResourceTemplate",
+});
export type V2ListMcpServerStatusResponse__Resource = {
- readonly _meta?: unknown;
- readonly annotations?: unknown;
+ readonly _meta?: Schema.Json;
+ readonly annotations?: Schema.Json;
readonly description?: string | null;
- readonly icons?: ReadonlyArray | null;
+ readonly icons?: ReadonlyArray | null;
readonly mimeType?: string | null;
readonly name: string;
readonly size?: number | null;
@@ -5288,76 +6901,112 @@ export type V2ListMcpServerStatusResponse__Resource = {
readonly uri: string;
};
export const V2ListMcpServerStatusResponse__Resource = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- annotations: Schema.optionalKey(Schema.Unknown),
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ annotations: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- icons: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
+ icons: Schema.optionalKey(
+ Schema.Union([Schema.Array(Schema.Json.annotate({ expected: "JSON value" })), Schema.Null]),
+ ),
mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
name: Schema.String,
size: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
),
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
uri: Schema.String,
-}).annotate({ description: "A known resource that the server is capable of reading." });
+}).annotate({
+ description: "A known resource that the server is capable of reading.",
+ identifier: "V2ListMcpServerStatusResponse__Resource",
+});
-export type V2ListMcpServerStatusResponse__ResourceTemplate = {
- readonly annotations?: unknown;
+export type V2ListMcpServerStatusResponse__McpServerConnectionStatus =
+ | "notStarted"
+ | "starting"
+ | "connected"
+ | "authenticationRequired"
+ | "failed"
+ | "cancelled"
+ | "disabled";
+export const V2ListMcpServerStatusResponse__McpServerConnectionStatus = Schema.Literals([
+ "notStarted",
+ "starting",
+ "connected",
+ "authenticationRequired",
+ "failed",
+ "cancelled",
+ "disabled",
+]).annotate({ identifier: "V2ListMcpServerStatusResponse__McpServerConnectionStatus" });
+
+export type V2ListMcpServerStatusResponse__McpServerInfo = {
readonly description?: string | null;
- readonly mimeType?: string | null;
+ readonly icons?: ReadonlyArray | null;
readonly name: string;
readonly title?: string | null;
- readonly uriTemplate: string;
+ readonly version: string;
+ readonly websiteUrl?: string | null;
};
-export const V2ListMcpServerStatusResponse__ResourceTemplate = Schema.Struct({
- annotations: Schema.optionalKey(Schema.Unknown),
+export const V2ListMcpServerStatusResponse__McpServerInfo = Schema.Struct({
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icons: Schema.optionalKey(
+ Schema.Union([Schema.Array(Schema.Json.annotate({ expected: "JSON value" })), Schema.Null]),
+ ),
name: Schema.String,
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- uriTemplate: Schema.String,
-}).annotate({ description: "A template description for resources available on the server." });
+ version: Schema.String,
+ websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Presentation metadata advertised by an initialized MCP server.",
+ identifier: "V2ListMcpServerStatusResponse__McpServerInfo",
+});
export type V2ListMcpServerStatusResponse__Tool = {
- readonly _meta?: unknown;
- readonly annotations?: unknown;
+ readonly _meta?: Schema.Json;
+ readonly annotations?: Schema.Json;
readonly description?: string | null;
- readonly icons?: ReadonlyArray | null;
- readonly inputSchema: unknown;
+ readonly icons?: ReadonlyArray | null;
+ readonly inputSchema: Schema.Json;
readonly name: string;
- readonly outputSchema?: unknown;
+ readonly outputSchema?: Schema.Json;
readonly title?: string | null;
};
export const V2ListMcpServerStatusResponse__Tool = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- annotations: Schema.optionalKey(Schema.Unknown),
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ annotations: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- icons: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
- inputSchema: Schema.Unknown,
+ icons: Schema.optionalKey(
+ Schema.Union([Schema.Array(Schema.Json.annotate({ expected: "JSON value" })), Schema.Null]),
+ ),
+ inputSchema: Schema.Json.annotate({ expected: "JSON value" }),
name: Schema.String,
- outputSchema: Schema.optionalKey(Schema.Unknown),
+ outputSchema: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-}).annotate({ description: "Definition for a tool the client can call." });
+}).annotate({
+ description: "Definition for a tool the client can call.",
+ identifier: "V2ListMcpServerStatusResponse__Tool",
+});
export type V2LoginAccountParams__LoginAppBrand = "codex" | "chatgpt";
-export const V2LoginAccountParams__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]);
+export const V2LoginAccountParams__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]).annotate({
+ identifier: "V2LoginAccountParams__LoginAppBrand",
+});
export type V2MarketplaceAddResponse__AbsolutePathBuf = string;
export const V2MarketplaceAddResponse__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2MarketplaceAddResponse__AbsolutePathBuf",
});
export type V2MarketplaceRemoveResponse__AbsolutePathBuf = string;
export const V2MarketplaceRemoveResponse__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
-
-export type V2MarketplaceUpgradeResponse__AbsolutePathBuf = string;
-export const V2MarketplaceUpgradeResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2MarketplaceRemoveResponse__AbsolutePathBuf",
});
export type V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = {
@@ -5367,41 +7016,81 @@ export type V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = {
export const V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = Schema.Struct({
marketplaceName: Schema.String,
message: Schema.String,
+}).annotate({ identifier: "V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo" });
+
+export type V2MarketplaceUpgradeResponse__AbsolutePathBuf = string;
+export const V2MarketplaceUpgradeResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2MarketplaceUpgradeResponse__AbsolutePathBuf",
});
+export type V2McpResourceReadParams__McpResourceReadTarget = {
+ readonly connectorId: string;
+ readonly linkId: string | null;
+};
+export const V2McpResourceReadParams__McpResourceReadTarget = Schema.Struct({
+ connectorId: Schema.String,
+ linkId: Schema.Union([
+ Schema.String.annotate({
+ description: "Null explicitly requests no-auth access, subject to the app's resource policy.",
+ }),
+ Schema.Null,
+ ]),
+}).annotate({ identifier: "V2McpResourceReadParams__McpResourceReadTarget" });
+
export type V2McpResourceReadResponse__ResourceContent =
| {
- readonly _meta?: unknown;
+ readonly _meta?: Schema.Json;
readonly mimeType?: string | null;
readonly text: string;
readonly uri: string;
}
| {
- readonly _meta?: unknown;
+ readonly _meta?: Schema.Json;
readonly blob: string;
readonly mimeType?: string | null;
readonly uri: string;
};
export const V2McpResourceReadResponse__ResourceContent = Schema.Union([
Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
text: Schema.String,
uri: Schema.String.annotate({ description: "The URI of this resource." }),
}),
Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
blob: Schema.String,
mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
uri: Schema.String.annotate({ description: "The URI of this resource." }),
}),
-]).annotate({ description: "Contents returned when reading a resource from an MCP server." });
+]).annotate({
+ description: "Contents returned when reading a resource from an MCP server.",
+ identifier: "V2McpResourceReadResponse__ResourceContent",
+});
+
+export type V2McpServerEventStreamNotification__McpServerEventNotification = {
+ readonly method: string;
+ readonly params: Schema.Json;
+};
+export const V2McpServerEventStreamNotification__McpServerEventNotification = Schema.Struct({
+ method: Schema.String,
+ params: Schema.Json.annotate({ expected: "JSON value" }),
+}).annotate({ identifier: "V2McpServerEventStreamNotification__McpServerEventNotification" });
+
+export type V2McpServerOauthLoginParams__McpServerOauthClientRegistration = "auto" | "cimd" | "dcr";
+export const V2McpServerOauthLoginParams__McpServerOauthClientRegistration = Schema.Literals([
+ "auto",
+ "cimd",
+ "dcr",
+]).annotate({ identifier: "V2McpServerOauthLoginParams__McpServerOauthClientRegistration" });
export type V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason =
"reauthenticationRequired";
export const V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason = Schema.Literal(
"reauthenticationRequired",
-);
+).annotate({ identifier: "V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason" });
export type V2McpServerStatusUpdatedNotification__McpServerStartupState =
| "starting"
@@ -5413,17 +7102,56 @@ export const V2McpServerStatusUpdatedNotification__McpServerStartupState = Schem
"ready",
"failed",
"cancelled",
-]);
+]).annotate({ identifier: "V2McpServerStatusUpdatedNotification__McpServerStartupState" });
+
+export type V2ModelListResponse__ModelAvailabilityNux = { readonly message: string };
+export const V2ModelListResponse__ModelAvailabilityNux = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ModelListResponse__ModelAvailabilityNux" });
+
+export type V2ModelListResponse__CyberAccessProgram = "standard" | "daybreakBlue" | "daybreakRed";
+export const V2ModelListResponse__CyberAccessProgram = Schema.Literals([
+ "standard",
+ "daybreakBlue",
+ "daybreakRed",
+]).annotate({
+ description:
+ "Requested cyber treatment for a ChatGPT-authenticated Codex turn. Authorization and model-tier restrictions remain server-owned.",
+ identifier: "V2ModelListResponse__CyberAccessProgram",
+});
+
+export type V2ModelListResponse__ReasoningEffort = string;
+export const V2ModelListResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ModelListResponse__ReasoningEffort",
+ }),
+);
export type V2ModelListResponse__InputModality = "text" | "image" | "audio";
-export const V2ModelListResponse__InputModality = Schema.Literals([
- "text",
- "image",
- "audio",
-]).annotate({ description: "Canonical user-input modality tags advertised by a model." });
+export const V2ModelListResponse__InputModality = Schema.Union(
+ [
+ Schema.Literal("text").annotate({ description: "Plain text turns and tool payloads." }),
+ Schema.Literal("image").annotate({ description: "Image attachments included in user turns." }),
+ Schema.Literal("audio").annotate({ description: "Audio attachments included in user turns." }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "Canonical user-input modality tags advertised by a model.",
+ identifier: "V2ModelListResponse__InputModality",
+});
-export type V2ModelListResponse__ModelAvailabilityNux = { readonly message: string };
-export const V2ModelListResponse__ModelAvailabilityNux = Schema.Struct({ message: Schema.String });
+export type V2ModelListResponse__MultiAgentVersion = "disabled" | "v1" | "v2";
+export const V2ModelListResponse__MultiAgentVersion = Schema.Literals([
+ "disabled",
+ "v1",
+ "v2",
+]).annotate({
+ description: "Multi-agent runtime supported by a model.",
+ identifier: "V2ModelListResponse__MultiAgentVersion",
+});
export type V2ModelListResponse__ModelServiceTier = {
readonly description: string;
@@ -5434,33 +7162,79 @@ export const V2ModelListResponse__ModelServiceTier = Schema.Struct({
description: Schema.String,
id: Schema.String,
name: Schema.String,
-});
+}).annotate({ identifier: "V2ModelListResponse__ModelServiceTier" });
export type V2ModelListResponse__ModelUpgradeInfo = {
readonly migrationMarkdown?: string | null;
readonly model: string;
readonly modelLink?: string | null;
+ readonly retirementAt?: number | null;
readonly upgradeCopy?: string | null;
};
export const V2ModelListResponse__ModelUpgradeInfo = Schema.Struct({
migrationMarkdown: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
model: Schema.String,
modelLink: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ retirementAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({
+ description:
+ "Informational Unix timestamp for this upgrade's scheduled retirement, if known.",
+ format: "int64",
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
+ Schema.Null,
+ ]),
+ ),
upgradeCopy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2ModelListResponse__ReasoningEffort = string;
-export const V2ModelListResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+}).annotate({ identifier: "V2ModelListResponse__ModelUpgradeInfo" });
export type V2ModelReroutedNotification__ModelRerouteReason = "highRiskCyberActivity";
-export const V2ModelReroutedNotification__ModelRerouteReason =
- Schema.Literal("highRiskCyberActivity");
+export const V2ModelReroutedNotification__ModelRerouteReason = Schema.Literal(
+ "highRiskCyberActivity",
+).annotate({ identifier: "V2ModelReroutedNotification__ModelRerouteReason" });
export type V2ModelVerificationNotification__ModelVerification = "trustedAccessForCyber";
-export const V2ModelVerificationNotification__ModelVerification =
- Schema.Literal("trustedAccessForCyber");
+export const V2ModelVerificationNotification__ModelVerification = Schema.Literal(
+ "trustedAccessForCyber",
+).annotate({ identifier: "V2ModelVerificationNotification__ModelVerification" });
+
+export type V2NullableGetAccountRateLimitsParams__GetAccountRateLimitsParams = {
+ readonly excludeResetCreditDetails?: boolean;
+ readonly supportsLunaReserve?: boolean;
+};
+export const V2NullableGetAccountRateLimitsParams__GetAccountRateLimitsParams = Schema.Struct({
+ excludeResetCreditDetails: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "Skip the separate reset-credit detail lookup for background usage polls. The usage response still includes the available count; omitted/false preserves detailed reads.",
+ }),
+ ),
+ supportsLunaReserve: Schema.optionalKey(
+ Schema.Boolean.annotate({
+ description:
+ "The client supports automatic Luna Reserve fallback. For eligible ChatGPT CLI users, allow the backend to record experiment exposure after ordinary usage is blocked.",
+ }),
+ ),
+}).annotate({
+ description:
+ "Usage-read capabilities of the requesting client, never inferred from its experiment arm.",
+ identifier: "V2NullableGetAccountRateLimitsParams__GetAccountRateLimitsParams",
+});
+
+export type V2NullableGetAccountTokenUsageParams__GetAccountTokenUsageParams = {
+ readonly threadId?: string | null;
+};
+export const V2NullableGetAccountTokenUsageParams__GetAccountTokenUsageParams = Schema.Struct({
+ threadId: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "When present, read estimated usage for this thread instead of account-wide token activity.",
+ }),
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "V2NullableGetAccountTokenUsageParams__GetAccountTokenUsageParams" });
export type V2PermissionProfileListResponse__PermissionProfileSummary = {
readonly allowed: boolean;
@@ -5480,18 +7254,20 @@ export const V2PermissionProfileListResponse__PermissionProfileSummary = Schema.
]),
),
id: Schema.String.annotate({ description: "Available permission profile identifier." }),
-});
+}).annotate({ identifier: "V2PermissionProfileListResponse__PermissionProfileSummary" });
export type V2PluginInstalledParams__AbsolutePathBuf = string;
export const V2PluginInstalledParams__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2PluginInstalledParams__AbsolutePathBuf",
});
export type V2PluginInstalledResponse__AbsolutePathBuf = string;
export const V2PluginInstalledResponse__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2PluginInstalledResponse__AbsolutePathBuf",
});
export type V2PluginInstalledResponse__MarketplaceInterface = {
@@ -5499,13 +7275,37 @@ export type V2PluginInstalledResponse__MarketplaceInterface = {
};
export const V2PluginInstalledResponse__MarketplaceInterface = Schema.Struct({
displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2PluginInstalledResponse__MarketplaceInterface" });
export type V2PluginInstalledResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
export const V2PluginInstalledResponse__PluginAuthPolicy = Schema.Literals([
"ON_INSTALL",
"ON_USE",
-]);
+]).annotate({ identifier: "V2PluginInstalledResponse__PluginAuthPolicy" });
+
+export type V2PluginInstalledResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
+export const V2PluginInstalledResponse__PluginAvailability = Schema.Union(
+ [
+ Schema.Literal("DISABLED_BY_ADMIN"),
+ Schema.Literal("AVAILABLE").annotate({
+ description:
+ 'Plugin-service currently sends `"ENABLED"` for available remote plugins. Codex app-server exposes `"AVAILABLE"` in its API; the alias keeps decoding compatible with that upstream response.',
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2PluginInstalledResponse__PluginAvailability" });
+
+export type V2PluginInstalledResponse__PluginDisabledReason =
+ | "disabled_by_admin"
+ | "plan_not_eligible"
+ | "required_app_unavailable"
+ | "unknown";
+export const V2PluginInstalledResponse__PluginDisabledReason = Schema.Literals([
+ "disabled_by_admin",
+ "plan_not_eligible",
+ "required_app_unavailable",
+ "unknown",
+]).annotate({ identifier: "V2PluginInstalledResponse__PluginDisabledReason" });
export type V2PluginInstalledResponse__PluginInstallPolicy =
| "NOT_AVAILABLE"
@@ -5515,7 +7315,7 @@ export const V2PluginInstalledResponse__PluginInstallPolicy = Schema.Literals([
"NOT_AVAILABLE",
"AVAILABLE",
"INSTALLED_BY_DEFAULT",
-]);
+]).annotate({ identifier: "V2PluginInstalledResponse__PluginInstallPolicy" });
export type V2PluginInstalledResponse__PluginInstallPolicySource =
| "WORKSPACE_SETTING"
@@ -5523,7 +7323,7 @@ export type V2PluginInstalledResponse__PluginInstallPolicySource =
export const V2PluginInstalledResponse__PluginInstallPolicySource = Schema.Literals([
"WORKSPACE_SETTING",
"IMPLICIT_CANONICAL_APP",
-]);
+]).annotate({ identifier: "V2PluginInstalledResponse__PluginInstallPolicySource" });
export type V2PluginInstalledResponse__PluginShareDiscoverability =
| "LISTED"
@@ -5533,26 +7333,27 @@ export const V2PluginInstalledResponse__PluginShareDiscoverability = Schema.Lite
"LISTED",
"UNLISTED",
"PRIVATE",
-]);
-
-export type V2PluginInstalledResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
-export const V2PluginInstalledResponse__PluginSharePrincipalRole = Schema.Literals([
- "reader",
- "editor",
- "owner",
-]);
+]).annotate({ identifier: "V2PluginInstalledResponse__PluginShareDiscoverability" });
export type V2PluginInstalledResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
export const V2PluginInstalledResponse__PluginSharePrincipalType = Schema.Literals([
"user",
"group",
"workspace",
-]);
+]).annotate({ identifier: "V2PluginInstalledResponse__PluginSharePrincipalType" });
+
+export type V2PluginInstalledResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
+export const V2PluginInstalledResponse__PluginSharePrincipalRole = Schema.Literals([
+ "reader",
+ "editor",
+ "owner",
+]).annotate({ identifier: "V2PluginInstalledResponse__PluginSharePrincipalRole" });
export type V2PluginInstallParams__AbsolutePathBuf = string;
export const V2PluginInstallParams__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2PluginInstallParams__AbsolutePathBuf",
});
export type V2PluginInstallResponse__AppSummary = {
@@ -5568,15 +7369,22 @@ export const V2PluginInstallResponse__AppSummary = Schema.Struct({
id: Schema.String,
installUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
name: Schema.String,
-}).annotate({ description: "EXPERIMENTAL - app metadata summary for plugin responses." });
+}).annotate({
+ description: "EXPERIMENTAL - app metadata summary for plugin responses.",
+ identifier: "V2PluginInstallResponse__AppSummary",
+});
export type V2PluginInstallResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
-export const V2PluginInstallResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]);
+export const V2PluginInstallResponse__PluginAuthPolicy = Schema.Literals([
+ "ON_INSTALL",
+ "ON_USE",
+]).annotate({ identifier: "V2PluginInstallResponse__PluginAuthPolicy" });
export type V2PluginListParams__AbsolutePathBuf = string;
export const V2PluginListParams__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2PluginListParams__AbsolutePathBuf",
});
export type V2PluginListParams__PluginListMarketplaceKind =
@@ -5591,21 +7399,49 @@ export const V2PluginListParams__PluginListMarketplaceKind = Schema.Literals([
"workspace-directory",
"shared-with-me",
"created-by-me-remote",
-]);
+]).annotate({ identifier: "V2PluginListParams__PluginListMarketplaceKind" });
export type V2PluginListResponse__AbsolutePathBuf = string;
export const V2PluginListResponse__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2PluginListResponse__AbsolutePathBuf",
});
export type V2PluginListResponse__MarketplaceInterface = { readonly displayName?: string | null };
export const V2PluginListResponse__MarketplaceInterface = Schema.Struct({
displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2PluginListResponse__MarketplaceInterface" });
export type V2PluginListResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
-export const V2PluginListResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]);
+export const V2PluginListResponse__PluginAuthPolicy = Schema.Literals([
+ "ON_INSTALL",
+ "ON_USE",
+]).annotate({ identifier: "V2PluginListResponse__PluginAuthPolicy" });
+
+export type V2PluginListResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
+export const V2PluginListResponse__PluginAvailability = Schema.Union(
+ [
+ Schema.Literal("DISABLED_BY_ADMIN"),
+ Schema.Literal("AVAILABLE").annotate({
+ description:
+ 'Plugin-service currently sends `"ENABLED"` for available remote plugins. Codex app-server exposes `"AVAILABLE"` in its API; the alias keeps decoding compatible with that upstream response.',
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2PluginListResponse__PluginAvailability" });
+
+export type V2PluginListResponse__PluginDisabledReason =
+ | "disabled_by_admin"
+ | "plan_not_eligible"
+ | "required_app_unavailable"
+ | "unknown";
+export const V2PluginListResponse__PluginDisabledReason = Schema.Literals([
+ "disabled_by_admin",
+ "plan_not_eligible",
+ "required_app_unavailable",
+ "unknown",
+]).annotate({ identifier: "V2PluginListResponse__PluginDisabledReason" });
export type V2PluginListResponse__PluginInstallPolicy =
| "NOT_AVAILABLE"
@@ -5615,7 +7451,7 @@ export const V2PluginListResponse__PluginInstallPolicy = Schema.Literals([
"NOT_AVAILABLE",
"AVAILABLE",
"INSTALLED_BY_DEFAULT",
-]);
+]).annotate({ identifier: "V2PluginListResponse__PluginInstallPolicy" });
export type V2PluginListResponse__PluginInstallPolicySource =
| "WORKSPACE_SETTING"
@@ -5623,40 +7459,43 @@ export type V2PluginListResponse__PluginInstallPolicySource =
export const V2PluginListResponse__PluginInstallPolicySource = Schema.Literals([
"WORKSPACE_SETTING",
"IMPLICIT_CANONICAL_APP",
-]);
+]).annotate({ identifier: "V2PluginListResponse__PluginInstallPolicySource" });
export type V2PluginListResponse__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
export const V2PluginListResponse__PluginShareDiscoverability = Schema.Literals([
"LISTED",
"UNLISTED",
"PRIVATE",
-]);
-
-export type V2PluginListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
-export const V2PluginListResponse__PluginSharePrincipalRole = Schema.Literals([
- "reader",
- "editor",
- "owner",
-]);
+]).annotate({ identifier: "V2PluginListResponse__PluginShareDiscoverability" });
export type V2PluginListResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
export const V2PluginListResponse__PluginSharePrincipalType = Schema.Literals([
"user",
"group",
"workspace",
-]);
+]).annotate({ identifier: "V2PluginListResponse__PluginSharePrincipalType" });
+
+export type V2PluginListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
+export const V2PluginListResponse__PluginSharePrincipalRole = Schema.Literals([
+ "reader",
+ "editor",
+ "owner",
+]).annotate({ identifier: "V2PluginListResponse__PluginSharePrincipalRole" });
export type V2PluginReadParams__AbsolutePathBuf = string;
export const V2PluginReadParams__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2PluginReadParams__AbsolutePathBuf",
});
-export type V2PluginReadResponse__AbsolutePathBuf = string;
-export const V2PluginReadResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
+export type V2PluginReadResponse__AppTemplateUnavailableReason =
+ | "NOT_CONFIGURED_FOR_WORKSPACE"
+ | "NO_ACTIVE_WORKSPACE";
+export const V2PluginReadResponse__AppTemplateUnavailableReason = Schema.Literals([
+ "NOT_CONFIGURED_FOR_WORKSPACE",
+ "NO_ACTIVE_WORKSPACE",
+]).annotate({ identifier: "V2PluginReadResponse__AppTemplateUnavailableReason" });
export type V2PluginReadResponse__AppSummary = {
readonly category?: string | null;
@@ -5671,15 +7510,10 @@ export const V2PluginReadResponse__AppSummary = Schema.Struct({
id: Schema.String,
installUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
name: Schema.String,
-}).annotate({ description: "EXPERIMENTAL - app metadata summary for plugin responses." });
-
-export type V2PluginReadResponse__AppTemplateUnavailableReason =
- | "NOT_CONFIGURED_FOR_WORKSPACE"
- | "NO_ACTIVE_WORKSPACE";
-export const V2PluginReadResponse__AppTemplateUnavailableReason = Schema.Literals([
- "NOT_CONFIGURED_FOR_WORKSPACE",
- "NO_ACTIVE_WORKSPACE",
-]);
+}).annotate({
+ description: "EXPERIMENTAL - app metadata summary for plugin responses.",
+ identifier: "V2PluginReadResponse__AppSummary",
+});
export type V2PluginReadResponse__HookEventName =
| "preToolUse"
@@ -5692,7 +7526,8 @@ export type V2PluginReadResponse__HookEventName =
| "userPromptSubmit"
| "subagentStart"
| "subagentStop"
- | "stop";
+ | "stop"
+ | "interrupt";
export const V2PluginReadResponse__HookEventName = Schema.Literals([
"preToolUse",
"permissionRequest",
@@ -5705,10 +7540,63 @@ export const V2PluginReadResponse__HookEventName = Schema.Literals([
"subagentStart",
"subagentStop",
"stop",
-]);
+ "interrupt",
+]).annotate({ identifier: "V2PluginReadResponse__HookEventName" });
+
+export type V2PluginReadResponse__AbsolutePathBuf = string;
+export const V2PluginReadResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2PluginReadResponse__AbsolutePathBuf",
+});
+
+export type V2PluginReadResponse__ScheduledTaskWeekday =
+ | "MO"
+ | "TU"
+ | "WE"
+ | "TH"
+ | "FR"
+ | "SA"
+ | "SU";
+export const V2PluginReadResponse__ScheduledTaskWeekday = Schema.Literals([
+ "MO",
+ "TU",
+ "WE",
+ "TH",
+ "FR",
+ "SA",
+ "SU",
+]).annotate({ identifier: "V2PluginReadResponse__ScheduledTaskWeekday" });
export type V2PluginReadResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
-export const V2PluginReadResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]);
+export const V2PluginReadResponse__PluginAuthPolicy = Schema.Literals([
+ "ON_INSTALL",
+ "ON_USE",
+]).annotate({ identifier: "V2PluginReadResponse__PluginAuthPolicy" });
+
+export type V2PluginReadResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
+export const V2PluginReadResponse__PluginAvailability = Schema.Union(
+ [
+ Schema.Literal("DISABLED_BY_ADMIN"),
+ Schema.Literal("AVAILABLE").annotate({
+ description:
+ 'Plugin-service currently sends `"ENABLED"` for available remote plugins. Codex app-server exposes `"AVAILABLE"` in its API; the alias keeps decoding compatible with that upstream response.',
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2PluginReadResponse__PluginAvailability" });
+
+export type V2PluginReadResponse__PluginDisabledReason =
+ | "disabled_by_admin"
+ | "plan_not_eligible"
+ | "required_app_unavailable"
+ | "unknown";
+export const V2PluginReadResponse__PluginDisabledReason = Schema.Literals([
+ "disabled_by_admin",
+ "plan_not_eligible",
+ "required_app_unavailable",
+ "unknown",
+]).annotate({ identifier: "V2PluginReadResponse__PluginDisabledReason" });
export type V2PluginReadResponse__PluginInstallPolicy =
| "NOT_AVAILABLE"
@@ -5718,7 +7606,7 @@ export const V2PluginReadResponse__PluginInstallPolicy = Schema.Literals([
"NOT_AVAILABLE",
"AVAILABLE",
"INSTALLED_BY_DEFAULT",
-]);
+]).annotate({ identifier: "V2PluginReadResponse__PluginInstallPolicy" });
export type V2PluginReadResponse__PluginInstallPolicySource =
| "WORKSPACE_SETTING"
@@ -5726,64 +7614,96 @@ export type V2PluginReadResponse__PluginInstallPolicySource =
export const V2PluginReadResponse__PluginInstallPolicySource = Schema.Literals([
"WORKSPACE_SETTING",
"IMPLICIT_CANONICAL_APP",
-]);
+]).annotate({ identifier: "V2PluginReadResponse__PluginInstallPolicySource" });
export type V2PluginReadResponse__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
export const V2PluginReadResponse__PluginShareDiscoverability = Schema.Literals([
"LISTED",
"UNLISTED",
"PRIVATE",
-]);
-
-export type V2PluginReadResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
-export const V2PluginReadResponse__PluginSharePrincipalRole = Schema.Literals([
- "reader",
- "editor",
- "owner",
-]);
+]).annotate({ identifier: "V2PluginReadResponse__PluginShareDiscoverability" });
export type V2PluginReadResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
export const V2PluginReadResponse__PluginSharePrincipalType = Schema.Literals([
"user",
"group",
"workspace",
-]);
+]).annotate({ identifier: "V2PluginReadResponse__PluginSharePrincipalType" });
-export type V2PluginReadResponse__ScheduledTaskWeekday =
- | "MO"
- | "TU"
- | "WE"
- | "TH"
- | "FR"
- | "SA"
- | "SU";
-export const V2PluginReadResponse__ScheduledTaskWeekday = Schema.Literals([
- "MO",
- "TU",
- "WE",
- "TH",
- "FR",
- "SA",
- "SU",
-]);
+export type V2PluginReadResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
+export const V2PluginReadResponse__PluginSharePrincipalRole = Schema.Literals([
+ "reader",
+ "editor",
+ "owner",
+]).annotate({ identifier: "V2PluginReadResponse__PluginSharePrincipalRole" });
+
+export type V2PluginReconcileResponse__PluginReconcileChangedPlugin = {
+ readonly hasApps: boolean;
+ readonly hasHooks: boolean;
+ readonly hasMcps: boolean;
+ readonly hasSkills: boolean;
+ readonly id: string;
+};
+export const V2PluginReconcileResponse__PluginReconcileChangedPlugin = Schema.Struct({
+ hasApps: Schema.Boolean,
+ hasHooks: Schema.Boolean,
+ hasMcps: Schema.Boolean,
+ hasSkills: Schema.Boolean.annotate({
+ description:
+ "Whether either bundle declares skill roots; not a validated inventory of enabled skills.",
+ }),
+ id: Schema.String.annotate({
+ description: "Local plugin ID (`name@marketplace`), matching `PluginSummary.id`.",
+ }),
+}).annotate({
+ description:
+ "Runtime categories affected by this change, not just capabilities currently present. Flags describe declarations before runtime policy filtering. Updates OR the old and new bundle flags; enablement changes and cached reinstalls use the cached bundle; removals retain the old bundle's flags.",
+ identifier: "V2PluginReconcileResponse__PluginReconcileChangedPlugin",
+});
export type V2PluginShareCheckoutResponse__AbsolutePathBuf = string;
export const V2PluginShareCheckoutResponse__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2PluginShareCheckoutResponse__AbsolutePathBuf",
});
export type V2PluginShareListResponse__AbsolutePathBuf = string;
export const V2PluginShareListResponse__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2PluginShareListResponse__AbsolutePathBuf",
});
export type V2PluginShareListResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
export const V2PluginShareListResponse__PluginAuthPolicy = Schema.Literals([
"ON_INSTALL",
"ON_USE",
-]);
+]).annotate({ identifier: "V2PluginShareListResponse__PluginAuthPolicy" });
+
+export type V2PluginShareListResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
+export const V2PluginShareListResponse__PluginAvailability = Schema.Union(
+ [
+ Schema.Literal("DISABLED_BY_ADMIN"),
+ Schema.Literal("AVAILABLE").annotate({
+ description:
+ 'Plugin-service currently sends `"ENABLED"` for available remote plugins. Codex app-server exposes `"AVAILABLE"` in its API; the alias keeps decoding compatible with that upstream response.',
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2PluginShareListResponse__PluginAvailability" });
+
+export type V2PluginShareListResponse__PluginDisabledReason =
+ | "disabled_by_admin"
+ | "plan_not_eligible"
+ | "required_app_unavailable"
+ | "unknown";
+export const V2PluginShareListResponse__PluginDisabledReason = Schema.Literals([
+ "disabled_by_admin",
+ "plan_not_eligible",
+ "required_app_unavailable",
+ "unknown",
+]).annotate({ identifier: "V2PluginShareListResponse__PluginDisabledReason" });
export type V2PluginShareListResponse__PluginInstallPolicy =
| "NOT_AVAILABLE"
@@ -5793,7 +7713,7 @@ export const V2PluginShareListResponse__PluginInstallPolicy = Schema.Literals([
"NOT_AVAILABLE",
"AVAILABLE",
"INSTALLED_BY_DEFAULT",
-]);
+]).annotate({ identifier: "V2PluginShareListResponse__PluginInstallPolicy" });
export type V2PluginShareListResponse__PluginInstallPolicySource =
| "WORKSPACE_SETTING"
@@ -5801,7 +7721,7 @@ export type V2PluginShareListResponse__PluginInstallPolicySource =
export const V2PluginShareListResponse__PluginInstallPolicySource = Schema.Literals([
"WORKSPACE_SETTING",
"IMPLICIT_CANONICAL_APP",
-]);
+]).annotate({ identifier: "V2PluginShareListResponse__PluginInstallPolicySource" });
export type V2PluginShareListResponse__PluginShareDiscoverability =
| "LISTED"
@@ -5811,44 +7731,58 @@ export const V2PluginShareListResponse__PluginShareDiscoverability = Schema.Lite
"LISTED",
"UNLISTED",
"PRIVATE",
-]);
-
-export type V2PluginShareListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
-export const V2PluginShareListResponse__PluginSharePrincipalRole = Schema.Literals([
- "reader",
- "editor",
- "owner",
-]);
+]).annotate({ identifier: "V2PluginShareListResponse__PluginShareDiscoverability" });
export type V2PluginShareListResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
export const V2PluginShareListResponse__PluginSharePrincipalType = Schema.Literals([
"user",
"group",
"workspace",
-]);
+]).annotate({ identifier: "V2PluginShareListResponse__PluginSharePrincipalType" });
-export type V2PluginShareSaveParams__AbsolutePathBuf = string;
-export const V2PluginShareSaveParams__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
+export type V2PluginShareListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
+export const V2PluginShareListResponse__PluginSharePrincipalRole = Schema.Literals([
+ "reader",
+ "editor",
+ "owner",
+]).annotate({ identifier: "V2PluginShareListResponse__PluginSharePrincipalRole" });
export type V2PluginShareSaveParams__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
export const V2PluginShareSaveParams__PluginShareDiscoverability = Schema.Literals([
"LISTED",
"UNLISTED",
"PRIVATE",
-]);
+]).annotate({ identifier: "V2PluginShareSaveParams__PluginShareDiscoverability" });
+
+export type V2PluginShareSaveParams__AbsolutePathBuf = string;
+export const V2PluginShareSaveParams__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2PluginShareSaveParams__AbsolutePathBuf",
+});
export type V2PluginShareSaveParams__PluginSharePrincipalType = "user" | "group" | "workspace";
export const V2PluginShareSaveParams__PluginSharePrincipalType = Schema.Literals([
"user",
"group",
"workspace",
-]);
+]).annotate({ identifier: "V2PluginShareSaveParams__PluginSharePrincipalType" });
export type V2PluginShareSaveParams__PluginShareTargetRole = "reader" | "editor";
-export const V2PluginShareSaveParams__PluginShareTargetRole = Schema.Literals(["reader", "editor"]);
+export const V2PluginShareSaveParams__PluginShareTargetRole = Schema.Literals([
+ "reader",
+ "editor",
+]).annotate({ identifier: "V2PluginShareSaveParams__PluginShareTargetRole" });
+
+export type V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability =
+ | "UNLISTED"
+ | "PRIVATE"
+ | "LISTED";
+export const V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability = Schema.Literals([
+ "UNLISTED",
+ "PRIVATE",
+ "LISTED",
+]).annotate({ identifier: "V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability" });
export type V2PluginShareUpdateTargetsParams__PluginSharePrincipalType =
| "user"
@@ -5858,23 +7792,13 @@ export const V2PluginShareUpdateTargetsParams__PluginSharePrincipalType = Schema
"user",
"group",
"workspace",
-]);
+]).annotate({ identifier: "V2PluginShareUpdateTargetsParams__PluginSharePrincipalType" });
export type V2PluginShareUpdateTargetsParams__PluginShareTargetRole = "reader" | "editor";
export const V2PluginShareUpdateTargetsParams__PluginShareTargetRole = Schema.Literals([
"reader",
"editor",
-]);
-
-export type V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability =
- | "UNLISTED"
- | "PRIVATE"
- | "LISTED";
-export const V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability = Schema.Literals([
- "UNLISTED",
- "PRIVATE",
- "LISTED",
-]);
+]).annotate({ identifier: "V2PluginShareUpdateTargetsParams__PluginShareTargetRole" });
export type V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability =
| "LISTED"
@@ -5884,7 +7808,17 @@ export const V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability = Sc
"LISTED",
"UNLISTED",
"PRIVATE",
-]);
+]).annotate({ identifier: "V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability" });
+
+export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType =
+ | "user"
+ | "group"
+ | "workspace";
+export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = Schema.Literals([
+ "user",
+ "group",
+ "workspace",
+]).annotate({ identifier: "V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType" });
export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole =
| "reader"
@@ -5894,17 +7828,28 @@ export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole = Sche
"reader",
"editor",
"owner",
-]);
+]).annotate({ identifier: "V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole" });
-export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType =
- | "user"
- | "group"
- | "workspace";
-export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = Schema.Literals([
- "user",
- "group",
- "workspace",
-]);
+export type V2ProcessOutputDeltaNotification__ProcessOutputStream = "stdout" | "stderr";
+export const V2ProcessOutputDeltaNotification__ProcessOutputStream = Schema.Union(
+ [
+ Schema.Literal("stdout").annotate({
+ description: "stdout stream. PTY mode multiplexes terminal output here.",
+ }),
+ Schema.Literal("stderr").annotate({ description: "stderr stream." }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "Stream label for `process/outputDelta` notifications.",
+ identifier: "V2ProcessOutputDeltaNotification__ProcessOutputStream",
+});
+
+export type V2ProjectChangedNotification__ProjectChangeType = "created" | "updated" | "deleted";
+export const V2ProjectChangedNotification__ProjectChangeType = Schema.Literals([
+ "created",
+ "updated",
+ "deleted",
+]).annotate({ identifier: "V2ProjectChangedNotification__ProjectChangeType" });
export type V2RawResponseCompletedNotification__TokenUsageBreakdown = {
readonly cacheWriteInputTokens?: number;
@@ -5916,35 +7861,38 @@ export type V2RawResponseCompletedNotification__TokenUsageBreakdown = {
};
export const V2RawResponseCompletedNotification__TokenUsageBreakdown = Schema.Struct({
cacheWriteInputTokens: Schema.optionalKey(
- Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()),
+ Schema.Number.annotate({ default: 0, format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
),
- cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- totalTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-});
+ cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ inputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ outputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ totalTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+}).annotate({ identifier: "V2RawResponseCompletedNotification__TokenUsageBreakdown" });
-export type V2RawResponseItemCompletedNotification__AgentMessageInputContent =
- | { readonly text: string; readonly type: "input_text" }
- | { readonly encrypted_content: string; readonly type: "encrypted_content" };
-export const V2RawResponseItemCompletedNotification__AgentMessageInputContent = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("input_text").annotate({
- title: "InputTextAgentMessageInputContentType",
- }),
- }).annotate({ title: "InputTextAgentMessageInputContent" }),
- Schema.Struct({
- encrypted_content: Schema.String,
- type: Schema.Literal("encrypted_content").annotate({
- title: "EncryptedContentAgentMessageInputContentType",
- }),
- }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
- ],
- { mode: "oneOf" },
-);
+export type V2RawResponseCompletedNotification__ResponseUsageMetadata = {
+ readonly amount?: string | null;
+ readonly metadata?: Schema.Json;
+};
+export const V2RawResponseCompletedNotification__ResponseUsageMetadata = Schema.Struct({
+ amount: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ metadata: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({
+ description: "Usage metadata reported for one upstream response.",
+ identifier: "V2RawResponseCompletedNotification__ResponseUsageMetadata",
+});
export type V2RawResponseItemCompletedNotification__ImageDetail =
| "auto"
@@ -5956,7 +7904,7 @@ export const V2RawResponseItemCompletedNotification__ImageDetail = Schema.Litera
"low",
"high",
"original",
-]);
+]).annotate({ identifier: "V2RawResponseItemCompletedNotification__ImageDetail" });
export type V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough = {
readonly turn_id?: string | null;
@@ -5967,76 +7915,66 @@ export const V2RawResponseItemCompletedNotification__InternalChatMessageMetadata
}).annotate({
description:
"Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
+ identifier: "V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough",
});
-export type V2RawResponseItemCompletedNotification__LocalShellAction = {
- readonly command: ReadonlyArray;
- readonly env?: { readonly [x: string]: string } | null;
- readonly timeout_ms?: number | null;
- readonly type: "exec";
- readonly user?: string | null;
- readonly working_directory?: string | null;
-};
-export const V2RawResponseItemCompletedNotification__LocalShellAction = Schema.Union(
+export type V2RawResponseItemCompletedNotification__MessagePhase = "commentary" | "final_answer";
+export const V2RawResponseItemCompletedNotification__MessagePhase = Schema.Union(
[
- Schema.Struct({
- command: Schema.Array(Schema.String),
- env: Schema.optionalKey(
- Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
- ),
- timeout_ms: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint64" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
- user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "ExecLocalShellAction" }),
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
],
{ mode: "oneOf" },
-);
-
-export type V2RawResponseItemCompletedNotification__LocalShellStatus =
- | "completed"
- | "in_progress"
- | "incomplete";
-export const V2RawResponseItemCompletedNotification__LocalShellStatus = Schema.Literals([
- "completed",
- "in_progress",
- "incomplete",
-]);
-
-export type V2RawResponseItemCompletedNotification__MessagePhase = "commentary" | "final_answer";
-export const V2RawResponseItemCompletedNotification__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
+).annotate({
description:
'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2RawResponseItemCompletedNotification__MessagePhase",
});
-export type V2RawResponseItemCompletedNotification__ReasoningItemContent =
- | { readonly text: string; readonly type: "reasoning_text" }
- | { readonly text: string; readonly type: "text" };
-export const V2RawResponseItemCompletedNotification__ReasoningItemContent = Schema.Union(
+export type V2RawResponseItemCompletedNotification__AgentMessageInputContent =
+ | { readonly text: string; readonly type: "input_text" }
+ | { readonly encrypted_content: string; readonly type: "encrypted_content" };
+export const V2RawResponseItemCompletedNotification__AgentMessageInputContent = Schema.Union(
[
Schema.Struct({
text: Schema.String,
- type: Schema.Literal("reasoning_text").annotate({
- title: "ReasoningTextReasoningItemContentType",
+ type: Schema.Literal("input_text").annotate({
+ title: "InputTextAgentMessageInputContentType",
}),
- }).annotate({ title: "ReasoningTextReasoningItemContent" }),
+ }).annotate({ title: "InputTextAgentMessageInputContent" }),
+ Schema.Struct({
+ encrypted_content: Schema.String,
+ type: Schema.Literal("encrypted_content").annotate({
+ title: "EncryptedContentAgentMessageInputContentType",
+ }),
+ }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2RawResponseItemCompletedNotification__AgentMessageInputContent" });
+
+export type V2RawResponseItemCompletedNotification__ReasoningItemContent =
+ | { readonly text: string; readonly type: "reasoning_text" }
+ | { readonly text: string; readonly type: "text" };
+export const V2RawResponseItemCompletedNotification__ReasoningItemContent = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("reasoning_text").annotate({
+ title: "ReasoningTextReasoningItemContentType",
+ }),
+ }).annotate({ title: "ReasoningTextReasoningItemContent" }),
Schema.Struct({
text: Schema.String,
type: Schema.Literal("text").annotate({ title: "TextReasoningItemContentType" }),
}).annotate({ title: "TextReasoningItemContent" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2RawResponseItemCompletedNotification__ReasoningItemContent" });
export type V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary = {
readonly text: string;
@@ -6052,7 +7990,52 @@ export const V2RawResponseItemCompletedNotification__ReasoningItemReasoningSumma
}).annotate({ title: "SummaryTextReasoningItemReasoningSummary" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary" });
+
+export type V2RawResponseItemCompletedNotification__LocalShellAction = {
+ readonly command: ReadonlyArray;
+ readonly env?: { readonly [x: string]: string } | null;
+ readonly timeout_ms?: number | null;
+ readonly type: "exec";
+ readonly user?: string | null;
+ readonly working_directory?: string | null;
+};
+export const V2RawResponseItemCompletedNotification__LocalShellAction = Schema.Union(
+ [
+ Schema.Struct({
+ command: Schema.Array(Schema.String),
+ env: Schema.optionalKey(
+ Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
+ ),
+ timeout_ms: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "uint64" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
+ user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "ExecLocalShellAction" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2RawResponseItemCompletedNotification__LocalShellAction" });
+
+export type V2RawResponseItemCompletedNotification__LocalShellStatus =
+ | "completed"
+ | "in_progress"
+ | "incomplete";
+export const V2RawResponseItemCompletedNotification__LocalShellStatus = Schema.Literals([
+ "completed",
+ "in_progress",
+ "incomplete",
+]).annotate({ identifier: "V2RawResponseItemCompletedNotification__LocalShellStatus" });
export type V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction =
| {
@@ -6092,6 +8075,16 @@ export const V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction
}).annotate({ title: "OtherResponsesApiWebSearchAction" }),
],
{ mode: "oneOf" },
+).annotate({ identifier: "V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction" });
+
+export type V2RawResponseItemCompletedNotification__ReasoningEffort = string;
+export const V2RawResponseItemCompletedNotification__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2RawResponseItemCompletedNotification__ReasoningEffort",
+ }),
);
export type V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus =
@@ -6100,10 +8093,14 @@ export type V2RemoteControlStatusChangedNotification__RemoteControlConnectionSta
| "connected"
| "errored";
export const V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus =
- Schema.Literals(["disabled", "connecting", "connected", "errored"]);
+ Schema.Literals(["disabled", "connecting", "connected", "errored"]).annotate({
+ identifier: "V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus",
+ });
export type V2ReviewStartParams__ReviewDelivery = "inline" | "detached";
-export const V2ReviewStartParams__ReviewDelivery = Schema.Literals(["inline", "detached"]);
+export const V2ReviewStartParams__ReviewDelivery = Schema.Literals(["inline", "detached"]).annotate(
+ { identifier: "V2ReviewStartParams__ReviewDelivery" },
+);
export type V2ReviewStartParams__ReviewTarget =
| { readonly type: "uncommittedChanges" }
@@ -6151,87 +8148,32 @@ export const V2ReviewStartParams__ReviewTarget = Schema.Union(
}),
],
{ mode: "oneOf" },
-);
-
-export type V2ReviewStartResponse__AbsolutePathBuf = string;
-export const V2ReviewStartResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
-
-export type V2ReviewStartResponse__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ReviewStartResponse__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
-
-export type V2ReviewStartResponse__CommandExecutionStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2ReviewStartResponse__CommandExecutionStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
- "declined",
-]);
+).annotate({ identifier: "V2ReviewStartParams__ReviewTarget" });
-export type V2ReviewStartResponse__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ReviewStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
- ],
- { mode: "oneOf" },
-);
+export type V2ReviewStartResponse__NonSteerableTurnKind = "review" | "compact";
+export const V2ReviewStartResponse__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ReviewStartResponse__NonSteerableTurnKind" });
-export type V2ReviewStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ReviewStartResponse__DynamicToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ReviewStartResponse__MisalignmentSteer = { readonly message: string };
+export const V2ReviewStartResponse__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ReviewStartResponse__MisalignmentSteer" });
-export type V2ReviewStartResponse__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
-};
-export const V2ReviewStartResponse__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
-});
+export type V2ReviewStartResponse__ByteRange = { readonly end: number; readonly start: number };
+export const V2ReviewStartResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ReviewStartResponse__ByteRange" });
export type V2ReviewStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
export const V2ReviewStartResponse__ImageDetail = Schema.Literals([
@@ -6239,47 +8181,22 @@ export const V2ReviewStartResponse__ImageDetail = Schema.Literals([
"low",
"high",
"original",
-]);
-
-export type V2ReviewStartResponse__LegacyAppPathString = string;
-export const V2ReviewStartResponse__LegacyAppPathString = Schema.String;
+]).annotate({ identifier: "V2ReviewStartResponse__ImageDetail" });
-export type V2ReviewStartResponse__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
+export type V2ReviewStartResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
};
-export const V2ReviewStartResponse__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2ReviewStartResponse__McpToolCallError = { readonly message: string };
-export const V2ReviewStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
+export const V2ReviewStartResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ReviewStartResponse__HookPromptFragment" });
-export type V2ReviewStartResponse__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const V2ReviewStartResponse__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
+export type V2ReviewStartResponse__AgentMessageDelivery = "async";
+export const V2ReviewStartResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ReviewStartResponse__AgentMessageDelivery",
});
-export type V2ReviewStartResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ReviewStartResponse__McpToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
-
export type V2ReviewStartResponse__MemoryCitationEntry = {
readonly lineEnd: number;
readonly lineStart: number;
@@ -6288,38 +8205,74 @@ export type V2ReviewStartResponse__MemoryCitationEntry = {
};
export const V2ReviewStartResponse__MemoryCitationEntry = Schema.Struct({
lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
note: Schema.String,
path: Schema.String,
-});
+}).annotate({ identifier: "V2ReviewStartResponse__MemoryCitationEntry" });
export type V2ReviewStartResponse__MessagePhase = "commentary" | "final_answer";
-export const V2ReviewStartResponse__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
+export const V2ReviewStartResponse__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ReviewStartResponse__MessagePhase",
});
-export type V2ReviewStartResponse__NonSteerableTurnKind = "review" | "compact";
-export const V2ReviewStartResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
+export type V2ReviewStartResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ReviewStartResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ReviewStartResponse__AsyncUserInputQuestion" });
-export type V2ReviewStartResponse__PatchApplyStatus =
+export type V2ReviewStartResponse__LegacyAppPathString = string;
+export const V2ReviewStartResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ReviewStartResponse__LegacyAppPathString",
+});
+
+export type V2ReviewStartResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ReviewStartResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ReviewStartResponse__CommandExecutionSource" });
+
+export type V2ReviewStartResponse__CommandExecutionStatus =
| "inProgress"
| "completed"
| "failed"
| "declined";
-export const V2ReviewStartResponse__PatchApplyStatus = Schema.Literals([
+export const V2ReviewStartResponse__CommandExecutionStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ReviewStartResponse__CommandExecutionStatus" });
export type V2ReviewStartResponse__PatchChangeKind =
| { readonly type: "add" }
@@ -6339,12 +8292,160 @@ export const V2ReviewStartResponse__PatchChangeKind = Schema.Union(
}).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ReviewStartResponse__PatchChangeKind" });
+
+export type V2ReviewStartResponse__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ReviewStartResponse__PatchApplyStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ReviewStartResponse__PatchApplyStatus" });
+
+export type V2ReviewStartResponse__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
+};
+export const V2ReviewStartResponse__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ReviewStartResponse__McpToolCallAppContext" });
+
+export type V2ReviewStartResponse__McpToolCallError = { readonly message: string };
+export const V2ReviewStartResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ReviewStartResponse__McpToolCallError" });
+
+export type V2ReviewStartResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ReviewStartResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ReviewStartResponse__McpAppDisplayMode" });
+
+export type V2ReviewStartResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
+};
+export const V2ReviewStartResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ReviewStartResponse__McpToolCallResult" });
+
+export type V2ReviewStartResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ReviewStartResponse__McpToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ReviewStartResponse__McpToolCallStatus" });
+
+export type V2ReviewStartResponse__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ReviewStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ReviewStartResponse__DynamicToolCallOutputContentItem" });
+
+export type V2ReviewStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ReviewStartResponse__DynamicToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ReviewStartResponse__DynamicToolCallStatus" });
+
+export type V2ReviewStartResponse__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ReviewStartResponse__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ReviewStartResponse__CollabAgentStatus" });
export type V2ReviewStartResponse__ReasoningEffort = string;
export const V2ReviewStartResponse__ReasoningEffort = Schema.String.annotate({
description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ReviewStartResponse__ReasoningEffort",
+ }),
+);
+
+export type V2ReviewStartResponse__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "interrupted";
+export const V2ReviewStartResponse__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "interrupted",
+]).annotate({ identifier: "V2ReviewStartResponse__CollabAgentToolCallStatus" });
+
+export type V2ReviewStartResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ReviewStartResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ReviewStartResponse__CollabAgentTool" });
export type V2ReviewStartResponse__SubAgentActivityKind =
| "started"
@@ -6356,44 +8457,7 @@ export const V2ReviewStartResponse__SubAgentActivityKind = Schema.Literals([
"interacted",
"interrupted",
"completed",
-]);
-
-export type V2ReviewStartResponse__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
-};
-export const V2ReviewStartResponse__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
-
-export type V2ReviewStartResponse__TurnStatus =
- | "completed"
- | "interrupted"
- | "failed"
- | "inProgress";
-export const V2ReviewStartResponse__TurnStatus = Schema.Literals([
- "completed",
- "interrupted",
- "failed",
- "inProgress",
-]);
+]).annotate({ identifier: "V2ReviewStartResponse__SubAgentActivityKind" });
export type V2ReviewStartResponse__WebSearchAction =
| {
@@ -6425,13 +8489,74 @@ export const V2ReviewStartResponse__WebSearchAction = Schema.Union(
}).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ReviewStartResponse__WebSearchAction" });
+
+export type V2ReviewStartResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
+};
+export const V2ReviewStartResponse__ImageGenerationFailure = Schema.Union(
+ [
+ Schema.Struct({
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
+ }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ReviewStartResponse__ImageGenerationFailure" });
+
+export type V2ReviewStartResponse__AbsolutePathBuf = string;
+export const V2ReviewStartResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ReviewStartResponse__AbsolutePathBuf",
+});
+
+export type V2ReviewStartResponse__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ReviewStartResponse__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ReviewStartResponse__TurnItemsView" });
+
+export type V2ReviewStartResponse__TurnStatus =
+ | "completed"
+ | "interrupted"
+ | "failed"
+ | "inProgress";
+export const V2ReviewStartResponse__TurnStatus = Schema.Literals([
+ "completed",
+ "interrupted",
+ "failed",
+ "inProgress",
+]).annotate({ identifier: "V2ReviewStartResponse__TurnStatus" });
export type V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType = "credits" | "usage_limit";
export const V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType = Schema.Literals([
"credits",
"usage_limit",
-]);
+]).annotate({ identifier: "V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType" });
export type V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus =
| "sent"
@@ -6439,30 +8564,28 @@ export type V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus =
export const V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus = Schema.Literals([
"sent",
"cooldown_active",
-]);
+]).annotate({ identifier: "V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus" });
export type V2ServerRequestResolvedNotification__RequestId = string | number;
export const V2ServerRequestResolvedNotification__RequestId = Schema.Union([
Schema.String,
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-]);
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+]).annotate({ identifier: "V2ServerRequestResolvedNotification__RequestId" });
export type V2SkillsConfigWriteParams__AbsolutePathBuf = string;
export const V2SkillsConfigWriteParams__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2SkillsConfigWriteParams__AbsolutePathBuf",
});
export type V2SkillsExtraRootsSetParams__AbsolutePathBuf = string;
export const V2SkillsExtraRootsSetParams__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
-
-export type V2SkillsListResponse__AbsolutePathBuf = string;
-export const V2SkillsListResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2SkillsExtraRootsSetParams__AbsolutePathBuf",
});
export type V2SkillsListResponse__SkillErrorInfo = {
@@ -6472,15 +8595,7 @@ export type V2SkillsListResponse__SkillErrorInfo = {
export const V2SkillsListResponse__SkillErrorInfo = Schema.Struct({
message: Schema.String,
path: Schema.String,
-});
-
-export type V2SkillsListResponse__SkillScope = "user" | "repo" | "system" | "admin";
-export const V2SkillsListResponse__SkillScope = Schema.Literals([
- "user",
- "repo",
- "system",
- "admin",
-]);
+}).annotate({ identifier: "V2SkillsListResponse__SkillErrorInfo" });
export type V2SkillsListResponse__SkillToolDependency = {
readonly command?: string | null;
@@ -6497,16 +8612,81 @@ export const V2SkillsListResponse__SkillToolDependency = Schema.Struct({
type: Schema.String,
url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
value: Schema.String,
+}).annotate({ identifier: "V2SkillsListResponse__SkillToolDependency" });
+
+export type V2SkillsListResponse__AbsolutePathBuf = string;
+export const V2SkillsListResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2SkillsListResponse__AbsolutePathBuf",
});
-export type V2ThreadForkParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
-export const V2ThreadForkParams__ApprovalsReviewer = Schema.Literals([
+export type V2SkillsListResponse__SkillScope = "user" | "repo" | "system" | "admin";
+export const V2SkillsListResponse__SkillScope = Schema.Literals([
"user",
- "auto_review",
- "guardian_subagent",
+ "repo",
+ "system",
+ "admin",
+]).annotate({ identifier: "V2SkillsListResponse__SkillScope" });
+
+export type V2ThreadAttachmentAddResponse__ThreadAttachment = {
+ readonly attachmentType: string;
+ readonly createdAt: number;
+ readonly id: string;
+ readonly identityKey: string;
+ readonly payload: Schema.Json;
+};
+export const V2ThreadAttachmentAddResponse__ThreadAttachment = Schema.Struct({
+ attachmentType: Schema.String,
+ createdAt: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ id: Schema.String,
+ identityKey: Schema.String,
+ payload: Schema.Json.annotate({ expected: "JSON value" }),
+}).annotate({
+ description: "An independently persisted attachment associated with a thread.",
+ identifier: "V2ThreadAttachmentAddResponse__ThreadAttachment",
+});
+
+export type V2ThreadAttachmentAddResponse__ThreadAttachmentAddOutcome = "created" | "existing";
+export const V2ThreadAttachmentAddResponse__ThreadAttachmentAddOutcome = Schema.Literals([
+ "created",
+ "existing",
]).annotate({
- description:
- "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ description: "Result of attempting to associate an attachment with a thread.",
+ identifier: "V2ThreadAttachmentAddResponse__ThreadAttachmentAddOutcome",
+});
+
+export type V2ThreadAttachmentListResponse__ThreadAttachment = {
+ readonly attachmentType: string;
+ readonly createdAt: number;
+ readonly id: string;
+ readonly identityKey: string;
+ readonly payload: Schema.Json;
+};
+export const V2ThreadAttachmentListResponse__ThreadAttachment = Schema.Struct({
+ attachmentType: Schema.String,
+ createdAt: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ id: Schema.String,
+ identityKey: Schema.String,
+ payload: Schema.Json.annotate({ expected: "JSON value" }),
+}).annotate({
+ description: "An independently persisted attachment associated with a thread.",
+ identifier: "V2ThreadAttachmentListResponse__ThreadAttachment",
+});
+
+export type V2ThreadAttachmentUpdatedNotification__ThreadAttachmentOperation =
+ | "created"
+ | "deleted";
+export const V2ThreadAttachmentUpdatedNotification__ThreadAttachmentOperation = Schema.Literals([
+ "created",
+ "deleted",
+]).annotate({
+ description: "The persisted attachment change represented by a notification.",
+ identifier: "V2ThreadAttachmentUpdatedNotification__ThreadAttachmentOperation",
});
export type V2ThreadForkParams__AskForApproval =
@@ -6536,7 +8716,18 @@ export const V2ThreadForkParams__AskForApproval = Schema.Union(
}).annotate({ title: "GranularAskForApproval" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadForkParams__AskForApproval" });
+
+export type V2ThreadForkParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
+export const V2ThreadForkParams__ApprovalsReviewer = Schema.Literals([
+ "user",
+ "auto_review",
+ "guardian_subagent",
+]).annotate({
+ description:
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ identifier: "V2ThreadForkParams__ApprovalsReviewer",
+});
export type V2ThreadForkParams__SandboxMode =
| "read-only"
@@ -6546,20 +8737,13 @@ export const V2ThreadForkParams__SandboxMode = Schema.Literals([
"read-only",
"workspace-write",
"danger-full-access",
-]);
+]).annotate({ identifier: "V2ThreadForkParams__SandboxMode" });
export type V2ThreadForkParams__ThreadSource = string;
-export const V2ThreadForkParams__ThreadSource = Schema.String;
-
-export type V2ThreadForkResponse__AbsolutePathBuf = string;
-export const V2ThreadForkResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+export const V2ThreadForkParams__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadForkParams__ThreadSource",
});
-export type V2ThreadForkResponse__AgentPath = string;
-export const V2ThreadForkResponse__AgentPath = Schema.String;
-
export type V2ThreadForkResponse__AskForApproval =
| "untrusted"
| "on-request"
@@ -6587,72 +8771,46 @@ export const V2ThreadForkResponse__AskForApproval = Schema.Union(
}).annotate({ title: "GranularAskForApproval" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadForkResponse__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ThreadForkResponse__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
+).annotate({ identifier: "V2ThreadForkResponse__AskForApproval" });
-export type V2ThreadForkResponse__CommandExecutionStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2ThreadForkResponse__CommandExecutionStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
- "declined",
-]);
+export type V2ThreadForkResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
+export const V2ThreadForkResponse__ApprovalsReviewer = Schema.Literals([
+ "user",
+ "auto_review",
+ "guardian_subagent",
+]).annotate({
+ description:
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ identifier: "V2ThreadForkResponse__ApprovalsReviewer",
+});
-export type V2ThreadForkResponse__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ThreadForkResponse__DynamicToolCallOutputContentItem = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
- ],
- { mode: "oneOf" },
+export type V2ThreadForkResponse__AbsolutePathBuf = string;
+export const V2ThreadForkResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadForkResponse__AbsolutePathBuf",
+});
+
+export type V2ThreadForkResponse__LegacyAppPathString = string;
+export const V2ThreadForkResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadForkResponse__LegacyAppPathString",
+});
+
+export type V2ThreadForkResponse__ReasoningEffort = string;
+export const V2ThreadForkResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadForkResponse__ReasoningEffort",
+ }),
);
-export type V2ThreadForkResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadForkResponse__DynamicToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ThreadForkResponse__NetworkAccess = "restricted" | "enabled";
+export const V2ThreadForkResponse__NetworkAccess = Schema.Literals([
+ "restricted",
+ "enabled",
+]).annotate({ identifier: "V2ThreadForkResponse__NetworkAccess" });
export type V2ThreadForkResponse__GitInfo = {
readonly branch?: string | null;
@@ -6663,64 +8821,94 @@ export const V2ThreadForkResponse__GitInfo = Schema.Struct({
branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ThreadForkResponse__GitInfo" });
-export type V2ThreadForkResponse__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
+export type V2ThreadForkResponse__ThreadHistoryMode = "legacy" | "paginated";
+export const V2ThreadForkResponse__ThreadHistoryMode = Schema.Literals([
+ "legacy",
+ "paginated",
+]).annotate({ identifier: "V2ThreadForkResponse__ThreadHistoryMode" });
+
+export type V2ThreadForkResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const V2ThreadForkResponse__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
+export const V2ThreadForkResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadForkResponse__ThreadSectionAppearance",
+});
+
+export type V2ThreadForkResponse__AgentPath = string;
+export const V2ThreadForkResponse__AgentPath = Schema.String.annotate({
+ identifier: "V2ThreadForkResponse__AgentPath",
+});
+
+export type V2ThreadForkResponse__ThreadId = string;
+export const V2ThreadForkResponse__ThreadId = Schema.String.annotate({
+ identifier: "V2ThreadForkResponse__ThreadId",
+});
+
+export type V2ThreadForkResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
+export const V2ThreadForkResponse__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "V2ThreadForkResponse__ThreadActiveFlag" });
+
+export type V2ThreadForkResponse__ThreadSource = string;
+export const V2ThreadForkResponse__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadForkResponse__ThreadSource",
});
+export type V2ThreadForkResponse__NonSteerableTurnKind = "review" | "compact";
+export const V2ThreadForkResponse__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ThreadForkResponse__NonSteerableTurnKind" });
+
+export type V2ThreadForkResponse__MisalignmentSteer = { readonly message: string };
+export const V2ThreadForkResponse__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadForkResponse__MisalignmentSteer" });
+
+export type V2ThreadForkResponse__ByteRange = { readonly end: number; readonly start: number };
+export const V2ThreadForkResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadForkResponse__ByteRange" });
+
export type V2ThreadForkResponse__ImageDetail = "auto" | "low" | "high" | "original";
export const V2ThreadForkResponse__ImageDetail = Schema.Literals([
"auto",
"low",
"high",
"original",
-]);
+]).annotate({ identifier: "V2ThreadForkResponse__ImageDetail" });
-export type V2ThreadForkResponse__LegacyAppPathString = string;
-export const V2ThreadForkResponse__LegacyAppPathString = Schema.String;
-
-export type V2ThreadForkResponse__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
+export type V2ThreadForkResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
};
-export const V2ThreadForkResponse__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2ThreadForkResponse__McpToolCallError = { readonly message: string };
-export const V2ThreadForkResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
+export const V2ThreadForkResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadForkResponse__HookPromptFragment" });
-export type V2ThreadForkResponse__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const V2ThreadForkResponse__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
+export type V2ThreadForkResponse__AgentMessageDelivery = "async";
+export const V2ThreadForkResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ThreadForkResponse__AgentMessageDelivery",
});
-export type V2ThreadForkResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadForkResponse__McpToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
-
export type V2ThreadForkResponse__MemoryCitationEntry = {
readonly lineEnd: number;
readonly lineStart: number;
@@ -6729,38 +8917,69 @@ export type V2ThreadForkResponse__MemoryCitationEntry = {
};
export const V2ThreadForkResponse__MemoryCitationEntry = Schema.Struct({
lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
note: Schema.String,
path: Schema.String,
-});
+}).annotate({ identifier: "V2ThreadForkResponse__MemoryCitationEntry" });
export type V2ThreadForkResponse__MessagePhase = "commentary" | "final_answer";
-export const V2ThreadForkResponse__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
+export const V2ThreadForkResponse__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadForkResponse__MessagePhase",
});
-export type V2ThreadForkResponse__NonSteerableTurnKind = "review" | "compact";
-export const V2ThreadForkResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
+export type V2ThreadForkResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ThreadForkResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadForkResponse__AsyncUserInputQuestion" });
-export type V2ThreadForkResponse__PatchApplyStatus =
+export type V2ThreadForkResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadForkResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadForkResponse__CommandExecutionSource" });
+
+export type V2ThreadForkResponse__CommandExecutionStatus =
| "inProgress"
| "completed"
| "failed"
| "declined";
-export const V2ThreadForkResponse__PatchApplyStatus = Schema.Literals([
+export const V2ThreadForkResponse__CommandExecutionStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ThreadForkResponse__CommandExecutionStatus" });
export type V2ThreadForkResponse__PatchChangeKind =
| { readonly type: "add" }
@@ -6780,73 +8999,162 @@ export const V2ThreadForkResponse__PatchChangeKind = Schema.Union(
}).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadForkResponse__ReasoningEffort = string;
-export const V2ThreadForkResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+).annotate({ identifier: "V2ThreadForkResponse__PatchChangeKind" });
-export type V2ThreadForkResponse__SubAgentActivityKind =
- | "started"
- | "interacted"
- | "interrupted"
- | "completed";
-export const V2ThreadForkResponse__SubAgentActivityKind = Schema.Literals([
- "started",
- "interacted",
- "interrupted",
+export type V2ThreadForkResponse__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadForkResponse__PatchApplyStatus = Schema.Literals([
+ "inProgress",
"completed",
-]);
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadForkResponse__PatchApplyStatus" });
-export type V2ThreadForkResponse__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type V2ThreadForkResponse__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
};
-export const V2ThreadForkResponse__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
+export const V2ThreadForkResponse__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadForkResponse__McpToolCallAppContext" });
-export type V2ThreadForkResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
-export const V2ThreadForkResponse__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
+export type V2ThreadForkResponse__McpToolCallError = { readonly message: string };
+export const V2ThreadForkResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadForkResponse__McpToolCallError" });
-export type V2ThreadForkResponse__ThreadId = string;
-export const V2ThreadForkResponse__ThreadId = Schema.String;
+export type V2ThreadForkResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadForkResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadForkResponse__McpAppDisplayMode" });
-export type V2ThreadForkResponse__ThreadSource = string;
-export const V2ThreadForkResponse__ThreadSource = Schema.String;
+export type V2ThreadForkResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
+};
+export const V2ThreadForkResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadForkResponse__McpToolCallResult" });
-export type V2ThreadForkResponse__TurnStatus =
- | "completed"
+export type V2ThreadForkResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadForkResponse__McpToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadForkResponse__McpToolCallStatus" });
+
+export type V2ThreadForkResponse__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ThreadForkResponse__DynamicToolCallOutputContentItem = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadForkResponse__DynamicToolCallOutputContentItem" });
+
+export type V2ThreadForkResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadForkResponse__DynamicToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadForkResponse__DynamicToolCallStatus" });
+
+export type V2ThreadForkResponse__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
| "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ThreadForkResponse__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ThreadForkResponse__CollabAgentStatus" });
+
+export type V2ThreadForkResponse__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
| "failed"
- | "inProgress";
-export const V2ThreadForkResponse__TurnStatus = Schema.Literals([
+ | "interrupted";
+export const V2ThreadForkResponse__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
"completed",
- "interrupted",
"failed",
- "inProgress",
-]);
+ "interrupted",
+]).annotate({ identifier: "V2ThreadForkResponse__CollabAgentToolCallStatus" });
+
+export type V2ThreadForkResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadForkResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadForkResponse__CollabAgentTool" });
+
+export type V2ThreadForkResponse__SubAgentActivityKind =
+ | "started"
+ | "interacted"
+ | "interrupted"
+ | "completed";
+export const V2ThreadForkResponse__SubAgentActivityKind = Schema.Literals([
+ "started",
+ "interacted",
+ "interrupted",
+ "completed",
+]).annotate({ identifier: "V2ThreadForkResponse__SubAgentActivityKind" });
export type V2ThreadForkResponse__WebSearchAction =
| {
@@ -6878,7 +9186,61 @@ export const V2ThreadForkResponse__WebSearchAction = Schema.Union(
}).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadForkResponse__WebSearchAction" });
+
+export type V2ThreadForkResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
+};
+export const V2ThreadForkResponse__ImageGenerationFailure = Schema.Union(
+ [
+ Schema.Struct({
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
+ }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadForkResponse__ImageGenerationFailure" });
+
+export type V2ThreadForkResponse__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadForkResponse__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadForkResponse__TurnItemsView" });
+
+export type V2ThreadForkResponse__TurnStatus =
+ | "completed"
+ | "interrupted"
+ | "failed"
+ | "inProgress";
+export const V2ThreadForkResponse__TurnStatus = Schema.Literals([
+ "completed",
+ "interrupted",
+ "failed",
+ "inProgress",
+]).annotate({ identifier: "V2ThreadForkResponse__TurnStatus" });
export type V2ThreadGoalGetResponse__ThreadGoalStatus =
| "active"
@@ -6894,7 +9256,7 @@ export const V2ThreadGoalGetResponse__ThreadGoalStatus = Schema.Literals([
"usageLimited",
"budgetLimited",
"complete",
-]);
+]).annotate({ identifier: "V2ThreadGoalGetResponse__ThreadGoalStatus" });
export type V2ThreadGoalSetParams__ThreadGoalStatus =
| "active"
@@ -6910,7 +9272,7 @@ export const V2ThreadGoalSetParams__ThreadGoalStatus = Schema.Literals([
"usageLimited",
"budgetLimited",
"complete",
-]);
+]).annotate({ identifier: "V2ThreadGoalSetParams__ThreadGoalStatus" });
export type V2ThreadGoalSetResponse__ThreadGoalStatus =
| "active"
@@ -6926,7 +9288,7 @@ export const V2ThreadGoalSetResponse__ThreadGoalStatus = Schema.Literals([
"usageLimited",
"budgetLimited",
"complete",
-]);
+]).annotate({ identifier: "V2ThreadGoalSetResponse__ThreadGoalStatus" });
export type V2ThreadGoalUpdatedNotification__ThreadGoalStatus =
| "active"
@@ -6942,317 +9304,332 @@ export const V2ThreadGoalUpdatedNotification__ThreadGoalStatus = Schema.Literals
"usageLimited",
"budgetLimited",
"complete",
-]);
+]).annotate({ identifier: "V2ThreadGoalUpdatedNotification__ThreadGoalStatus" });
-export type V2ThreadListParams__SortDirection = "asc" | "desc";
-export const V2ThreadListParams__SortDirection = Schema.Literals(["asc", "desc"]);
+export type V2ThreadItemsListParams__ThreadItemsListAnchor = {
+ readonly itemId: string;
+ readonly type: "item";
+};
+export const V2ThreadItemsListParams__ThreadItemsListAnchor = Schema.Union(
+ [
+ Schema.Struct({
+ itemId: Schema.String,
+ type: Schema.Literal("item").annotate({ title: "ItemThreadItemsListAnchorType" }),
+ }).annotate({ title: "ItemThreadItemsListAnchor" }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description: "An exclusive item position within the requested visible turn.",
+ identifier: "V2ThreadItemsListParams__ThreadItemsListAnchor",
+});
-export type V2ThreadListParams__ThreadListCwdFilter = string | ReadonlyArray;
-export const V2ThreadListParams__ThreadListCwdFilter = Schema.Union([
- Schema.String,
- Schema.Array(Schema.String),
-]);
+export type V2ThreadItemsListParams__SortDirection = "asc" | "desc";
+export const V2ThreadItemsListParams__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
+ identifier: "V2ThreadItemsListParams__SortDirection",
+});
-export type V2ThreadListParams__ThreadSortKey = "created_at" | "updated_at" | "recency_at";
-export const V2ThreadListParams__ThreadSortKey = Schema.Literals([
- "created_at",
- "updated_at",
- "recency_at",
-]);
+export type V2ThreadItemsListResponse__ByteRange = { readonly end: number; readonly start: number };
+export const V2ThreadItemsListResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadItemsListResponse__ByteRange" });
-export type V2ThreadListParams__ThreadSourceKind =
- | "cli"
- | "vscode"
- | "exec"
- | "appServer"
- | "subAgent"
- | "subAgentReview"
- | "subAgentCompact"
- | "subAgentThreadSpawn"
- | "subAgentOther"
- | "unknown";
-export const V2ThreadListParams__ThreadSourceKind = Schema.Literals([
- "cli",
- "vscode",
- "exec",
- "appServer",
- "subAgent",
- "subAgentReview",
- "subAgentCompact",
- "subAgentThreadSpawn",
- "subAgentOther",
- "unknown",
-]);
+export type V2ThreadItemsListResponse__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadItemsListResponse__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ThreadItemsListResponse__ImageDetail" });
-export type V2ThreadListResponse__AbsolutePathBuf = string;
-export const V2ThreadListResponse__AbsolutePathBuf = Schema.String.annotate({
+export type V2ThreadItemsListResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
+};
+export const V2ThreadItemsListResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadItemsListResponse__HookPromptFragment" });
+
+export type V2ThreadItemsListResponse__AgentMessageDelivery = "async";
+export const V2ThreadItemsListResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ThreadItemsListResponse__AgentMessageDelivery",
+});
+
+export type V2ThreadItemsListResponse__MemoryCitationEntry = {
+ readonly lineEnd: number;
+ readonly lineStart: number;
+ readonly note: string;
+ readonly path: string;
+};
+export const V2ThreadItemsListResponse__MemoryCitationEntry = Schema.Struct({
+ lineEnd: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ lineStart: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ note: Schema.String,
+ path: Schema.String,
+}).annotate({ identifier: "V2ThreadItemsListResponse__MemoryCitationEntry" });
+
+export type V2ThreadItemsListResponse__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadItemsListResponse__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadItemsListResponse__MessagePhase",
});
-export type V2ThreadListResponse__AgentPath = string;
-export const V2ThreadListResponse__AgentPath = Schema.String;
+export type V2ThreadItemsListResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ThreadItemsListResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadItemsListResponse__AsyncUserInputQuestion" });
-export type V2ThreadListResponse__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ThreadListResponse__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
+export type V2ThreadItemsListResponse__LegacyAppPathString = string;
+export const V2ThreadItemsListResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadItemsListResponse__LegacyAppPathString",
+});
-export type V2ThreadListResponse__CommandExecutionStatus =
+export type V2ThreadItemsListResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadItemsListResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadItemsListResponse__CommandExecutionSource" });
+
+export type V2ThreadItemsListResponse__CommandExecutionStatus =
| "inProgress"
| "completed"
| "failed"
| "declined";
-export const V2ThreadListResponse__CommandExecutionStatus = Schema.Literals([
+export const V2ThreadItemsListResponse__CommandExecutionStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ThreadItemsListResponse__CommandExecutionStatus" });
-export type V2ThreadListResponse__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ThreadListResponse__DynamicToolCallOutputContentItem = Schema.Union(
+export type V2ThreadItemsListResponse__PatchChangeKind =
+ | { readonly type: "add" }
+ | { readonly type: "delete" }
+ | { readonly move_path?: string | null; readonly type: "update" };
+export const V2ThreadItemsListResponse__PatchChangeKind = Schema.Union(
[
Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
+ }).annotate({ title: "AddPatchChangeKind" }),
Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
+ }).annotate({ title: "DeletePatchChangeKind" }),
Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
+ }).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadItemsListResponse__PatchChangeKind" });
-export type V2ThreadListResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadListResponse__DynamicToolCallStatus = Schema.Literals([
+export type V2ThreadItemsListResponse__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadItemsListResponse__PatchApplyStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
-]);
-
-export type V2ThreadListResponse__GitInfo = {
- readonly branch?: string | null;
- readonly originUrl?: string | null;
- readonly sha?: string | null;
-};
-export const V2ThreadListResponse__GitInfo = Schema.Struct({
- branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2ThreadListResponse__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
-};
-export const V2ThreadListResponse__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
-});
-
-export type V2ThreadListResponse__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ThreadListResponse__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
-
-export type V2ThreadListResponse__LegacyAppPathString = string;
-export const V2ThreadListResponse__LegacyAppPathString = Schema.String;
+ "declined",
+]).annotate({ identifier: "V2ThreadItemsListResponse__PatchApplyStatus" });
-export type V2ThreadListResponse__McpToolCallAppContext = {
+export type V2ThreadItemsListResponse__McpToolCallAppContext = {
readonly actionName?: string | null;
readonly appName?: string | null;
readonly connectorId: string;
readonly linkId?: string | null;
readonly resourceUri?: string | null;
};
-export const V2ThreadListResponse__McpToolCallAppContext = Schema.Struct({
+export const V2ThreadItemsListResponse__McpToolCallAppContext = Schema.Struct({
actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
connectorId: Schema.String,
linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ThreadItemsListResponse__McpToolCallAppContext" });
-export type V2ThreadListResponse__McpToolCallError = { readonly message: string };
-export const V2ThreadListResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
+export type V2ThreadItemsListResponse__McpToolCallError = { readonly message: string };
+export const V2ThreadItemsListResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadItemsListResponse__McpToolCallError" });
+
+export type V2ThreadItemsListResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadItemsListResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadItemsListResponse__McpAppDisplayMode" });
+
+export type V2ThreadItemsListResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
+};
+export const V2ThreadItemsListResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadItemsListResponse__McpToolCallResult" });
+
+export type V2ThreadItemsListResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadItemsListResponse__McpToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadItemsListResponse__McpToolCallStatus" });
-export type V2ThreadListResponse__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const V2ThreadListResponse__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
-});
+export type V2ThreadItemsListResponse__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ThreadItemsListResponse__DynamicToolCallOutputContentItem = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadItemsListResponse__DynamicToolCallOutputContentItem" });
-export type V2ThreadListResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadListResponse__McpToolCallStatus = Schema.Literals([
+export type V2ThreadItemsListResponse__DynamicToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed";
+export const V2ThreadItemsListResponse__DynamicToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
-]);
-
-export type V2ThreadListResponse__MemoryCitationEntry = {
- readonly lineEnd: number;
- readonly lineStart: number;
- readonly note: string;
- readonly path: string;
-};
-export const V2ThreadListResponse__MemoryCitationEntry = Schema.Struct({
- lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- note: Schema.String,
- path: Schema.String,
-});
+]).annotate({ identifier: "V2ThreadItemsListResponse__DynamicToolCallStatus" });
-export type V2ThreadListResponse__MessagePhase = "commentary" | "final_answer";
-export const V2ThreadListResponse__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
- description:
- 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
-});
+export type V2ThreadItemsListResponse__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ThreadItemsListResponse__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ThreadItemsListResponse__CollabAgentStatus" });
-export type V2ThreadListResponse__NonSteerableTurnKind = "review" | "compact";
-export const V2ThreadListResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
+export type V2ThreadItemsListResponse__ReasoningEffort = string;
+export const V2ThreadItemsListResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadItemsListResponse__ReasoningEffort",
+ }),
+);
-export type V2ThreadListResponse__PatchApplyStatus =
+export type V2ThreadItemsListResponse__CollabAgentToolCallStatus =
| "inProgress"
| "completed"
| "failed"
- | "declined";
-export const V2ThreadListResponse__PatchApplyStatus = Schema.Literals([
+ | "interrupted";
+export const V2ThreadItemsListResponse__CollabAgentToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
- "declined",
-]);
-
-export type V2ThreadListResponse__PatchChangeKind =
- | { readonly type: "add" }
- | { readonly type: "delete" }
- | { readonly move_path?: string | null; readonly type: "update" };
-export const V2ThreadListResponse__PatchChangeKind = Schema.Union(
- [
- Schema.Struct({
- type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
- }).annotate({ title: "AddPatchChangeKind" }),
- Schema.Struct({
- type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
- }).annotate({ title: "DeletePatchChangeKind" }),
- Schema.Struct({
- move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
- }).annotate({ title: "UpdatePatchChangeKind" }),
- ],
- { mode: "oneOf" },
-);
+ "interrupted",
+]).annotate({ identifier: "V2ThreadItemsListResponse__CollabAgentToolCallStatus" });
-export type V2ThreadListResponse__ReasoningEffort = string;
-export const V2ThreadListResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+export type V2ThreadItemsListResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadItemsListResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadItemsListResponse__CollabAgentTool" });
-export type V2ThreadListResponse__SubAgentActivityKind =
+export type V2ThreadItemsListResponse__SubAgentActivityKind =
| "started"
| "interacted"
| "interrupted"
| "completed";
-export const V2ThreadListResponse__SubAgentActivityKind = Schema.Literals([
+export const V2ThreadItemsListResponse__SubAgentActivityKind = Schema.Literals([
"started",
"interacted",
"interrupted",
"completed",
-]);
-
-export type V2ThreadListResponse__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
-};
-export const V2ThreadListResponse__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
-
-export type V2ThreadListResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
-export const V2ThreadListResponse__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
-
-export type V2ThreadListResponse__ThreadId = string;
-export const V2ThreadListResponse__ThreadId = Schema.String;
-
-export type V2ThreadListResponse__ThreadSource = string;
-export const V2ThreadListResponse__ThreadSource = Schema.String;
-
-export type V2ThreadListResponse__TurnStatus =
- | "completed"
- | "interrupted"
- | "failed"
- | "inProgress";
-export const V2ThreadListResponse__TurnStatus = Schema.Literals([
- "completed",
- "interrupted",
- "failed",
- "inProgress",
-]);
+]).annotate({ identifier: "V2ThreadItemsListResponse__SubAgentActivityKind" });
-export type V2ThreadListResponse__WebSearchAction =
+export type V2ThreadItemsListResponse__WebSearchAction =
| {
readonly queries?: ReadonlyArray | null;
readonly query?: string | null;
@@ -7261,7 +9638,7 @@ export type V2ThreadListResponse__WebSearchAction =
| { readonly type: "openPage"; readonly url?: string | null }
| { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
| { readonly type: "other" };
-export const V2ThreadListResponse__WebSearchAction = Schema.Union(
+export const V2ThreadItemsListResponse__WebSearchAction = Schema.Union(
[
Schema.Struct({
queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
@@ -7282,241 +9659,283 @@ export const V2ThreadListResponse__WebSearchAction = Schema.Union(
}).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadItemsListResponse__WebSearchAction" });
-export type V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams = {
- readonly branch?: string | null;
- readonly originUrl?: string | null;
- readonly sha?: string | null;
+export type V2ThreadItemsListResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
};
-export const V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams = Schema.Struct({
- branch: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
- }),
- Schema.Null,
- ]),
- ),
- originUrl: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
- }),
- Schema.Null,
- ]),
- ),
- sha: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
+export const V2ThreadItemsListResponse__ImageGenerationFailure = Schema.Union(
+ [
+ Schema.Struct({
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
}),
- Schema.Null,
- ]),
- ),
-});
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadItemsListResponse__ImageGenerationFailure" });
-export type V2ThreadMetadataUpdateResponse__AbsolutePathBuf = string;
-export const V2ThreadMetadataUpdateResponse__AbsolutePathBuf = Schema.String.annotate({
+export type V2ThreadItemsListResponse__AbsolutePathBuf = string;
+export const V2ThreadItemsListResponse__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadItemsListResponse__AbsolutePathBuf",
});
-export type V2ThreadMetadataUpdateResponse__AgentPath = string;
-export const V2ThreadMetadataUpdateResponse__AgentPath = Schema.String;
+export type V2ThreadListParams__ThreadListCwdFilter = string | ReadonlyArray;
+export const V2ThreadListParams__ThreadListCwdFilter = Schema.Union([
+ Schema.String,
+ Schema.Array(Schema.String),
+]).annotate({ identifier: "V2ThreadListParams__ThreadListCwdFilter" });
-export type V2ThreadMetadataUpdateResponse__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ThreadMetadataUpdateResponse__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
+export type V2ThreadListParams__SortDirection = "asc" | "desc";
+export const V2ThreadListParams__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
+ identifier: "V2ThreadListParams__SortDirection",
+});
-export type V2ThreadMetadataUpdateResponse__CommandExecutionStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2ThreadMetadataUpdateResponse__CommandExecutionStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
- "declined",
-]);
+export type V2ThreadListParams__ThreadSortKey =
+ | "created_at"
+ | "updated_at"
+ | "recency_at"
+ | "section_position";
+export const V2ThreadListParams__ThreadSortKey = Schema.Literals([
+ "created_at",
+ "updated_at",
+ "recency_at",
+ "section_position",
+]).annotate({ identifier: "V2ThreadListParams__ThreadSortKey" });
-export type V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
- ],
- { mode: "oneOf" },
-);
+export type V2ThreadListParams__ThreadSourceKind =
+ | "cli"
+ | "vscode"
+ | "exec"
+ | "appServer"
+ | "subAgent"
+ | "subAgentReview"
+ | "subAgentCompact"
+ | "subAgentThreadSpawn"
+ | "subAgentOther"
+ | "unknown";
+export const V2ThreadListParams__ThreadSourceKind = Schema.Literals([
+ "cli",
+ "vscode",
+ "exec",
+ "appServer",
+ "subAgent",
+ "subAgentReview",
+ "subAgentCompact",
+ "subAgentThreadSpawn",
+ "subAgentOther",
+ "unknown",
+]).annotate({ identifier: "V2ThreadListParams__ThreadSourceKind" });
-export type V2ThreadMetadataUpdateResponse__DynamicToolCallStatus =
- | "inProgress"
- | "completed"
- | "failed";
-export const V2ThreadMetadataUpdateResponse__DynamicToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ThreadListResponse__AbsolutePathBuf = string;
+export const V2ThreadListResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadListResponse__AbsolutePathBuf",
+});
-export type V2ThreadMetadataUpdateResponse__GitInfo = {
+export type V2ThreadListResponse__GitInfo = {
readonly branch?: string | null;
readonly originUrl?: string | null;
readonly sha?: string | null;
};
-export const V2ThreadMetadataUpdateResponse__GitInfo = Schema.Struct({
+export const V2ThreadListResponse__GitInfo = Schema.Struct({
branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ThreadListResponse__GitInfo" });
-export type V2ThreadMetadataUpdateResponse__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
+export type V2ThreadListResponse__ThreadHistoryMode = "legacy" | "paginated";
+export const V2ThreadListResponse__ThreadHistoryMode = Schema.Literals([
+ "legacy",
+ "paginated",
+]).annotate({ identifier: "V2ThreadListResponse__ThreadHistoryMode" });
+
+export type V2ThreadListResponse__ReasoningEffort = string;
+export const V2ThreadListResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadListResponse__ReasoningEffort",
+ }),
+);
+
+export type V2ThreadListResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const V2ThreadMetadataUpdateResponse__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
+export const V2ThreadListResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadListResponse__ThreadSectionAppearance",
});
-export type V2ThreadMetadataUpdateResponse__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ThreadMetadataUpdateResponse__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
+export type V2ThreadListResponse__AgentPath = string;
+export const V2ThreadListResponse__AgentPath = Schema.String.annotate({
+ identifier: "V2ThreadListResponse__AgentPath",
+});
-export type V2ThreadMetadataUpdateResponse__LegacyAppPathString = string;
-export const V2ThreadMetadataUpdateResponse__LegacyAppPathString = Schema.String;
+export type V2ThreadListResponse__ThreadId = string;
+export const V2ThreadListResponse__ThreadId = Schema.String.annotate({
+ identifier: "V2ThreadListResponse__ThreadId",
+});
-export type V2ThreadMetadataUpdateResponse__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
-};
-export const V2ThreadMetadataUpdateResponse__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+export type V2ThreadListResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
+export const V2ThreadListResponse__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "V2ThreadListResponse__ThreadActiveFlag" });
+
+export type V2ThreadListResponse__ThreadSource = string;
+export const V2ThreadListResponse__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadListResponse__ThreadSource",
});
-export type V2ThreadMetadataUpdateResponse__McpToolCallError = { readonly message: string };
-export const V2ThreadMetadataUpdateResponse__McpToolCallError = Schema.Struct({
+export type V2ThreadListResponse__NonSteerableTurnKind = "review" | "compact";
+export const V2ThreadListResponse__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ThreadListResponse__NonSteerableTurnKind" });
+
+export type V2ThreadListResponse__MisalignmentSteer = { readonly message: string };
+export const V2ThreadListResponse__MisalignmentSteer = Schema.Struct({
message: Schema.String,
-});
+}).annotate({ identifier: "V2ThreadListResponse__MisalignmentSteer" });
-export type V2ThreadMetadataUpdateResponse__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
+export type V2ThreadListResponse__ByteRange = { readonly end: number; readonly start: number };
+export const V2ThreadListResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadListResponse__ByteRange" });
+
+export type V2ThreadListResponse__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadListResponse__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ThreadListResponse__ImageDetail" });
+
+export type V2ThreadListResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
};
-export const V2ThreadMetadataUpdateResponse__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
-});
+export const V2ThreadListResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadListResponse__HookPromptFragment" });
-export type V2ThreadMetadataUpdateResponse__McpToolCallStatus =
- | "inProgress"
- | "completed"
- | "failed";
-export const V2ThreadMetadataUpdateResponse__McpToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ThreadListResponse__AgentMessageDelivery = "async";
+export const V2ThreadListResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ThreadListResponse__AgentMessageDelivery",
+});
-export type V2ThreadMetadataUpdateResponse__MemoryCitationEntry = {
+export type V2ThreadListResponse__MemoryCitationEntry = {
readonly lineEnd: number;
readonly lineStart: number;
readonly note: string;
readonly path: string;
};
-export const V2ThreadMetadataUpdateResponse__MemoryCitationEntry = Schema.Struct({
+export const V2ThreadListResponse__MemoryCitationEntry = Schema.Struct({
lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
note: Schema.String,
path: Schema.String,
-});
+}).annotate({ identifier: "V2ThreadListResponse__MemoryCitationEntry" });
-export type V2ThreadMetadataUpdateResponse__MessagePhase = "commentary" | "final_answer";
-export const V2ThreadMetadataUpdateResponse__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
+export type V2ThreadListResponse__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadListResponse__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadListResponse__MessagePhase",
});
-export type V2ThreadMetadataUpdateResponse__NonSteerableTurnKind = "review" | "compact";
-export const V2ThreadMetadataUpdateResponse__NonSteerableTurnKind = Schema.Literals([
- "review",
- "compact",
-]);
+export type V2ThreadListResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ThreadListResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadListResponse__AsyncUserInputQuestion" });
-export type V2ThreadMetadataUpdateResponse__PatchApplyStatus =
+export type V2ThreadListResponse__LegacyAppPathString = string;
+export const V2ThreadListResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadListResponse__LegacyAppPathString",
+});
+
+export type V2ThreadListResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadListResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadListResponse__CommandExecutionSource" });
+
+export type V2ThreadListResponse__CommandExecutionStatus =
| "inProgress"
| "completed"
| "failed"
| "declined";
-export const V2ThreadMetadataUpdateResponse__PatchApplyStatus = Schema.Literals([
+export const V2ThreadListResponse__CommandExecutionStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ThreadListResponse__CommandExecutionStatus" });
-export type V2ThreadMetadataUpdateResponse__PatchChangeKind =
+export type V2ThreadListResponse__PatchChangeKind =
| { readonly type: "add" }
| { readonly type: "delete" }
| { readonly move_path?: string | null; readonly type: "update" };
-export const V2ThreadMetadataUpdateResponse__PatchChangeKind = Schema.Union(
+export const V2ThreadListResponse__PatchChangeKind = Schema.Union(
[
Schema.Struct({
type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
@@ -7530,77 +9949,164 @@ export const V2ThreadMetadataUpdateResponse__PatchChangeKind = Schema.Union(
}).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadMetadataUpdateResponse__ReasoningEffort = string;
-export const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+).annotate({ identifier: "V2ThreadListResponse__PatchChangeKind" });
-export type V2ThreadMetadataUpdateResponse__SubAgentActivityKind =
- | "started"
- | "interacted"
- | "interrupted"
- | "completed";
-export const V2ThreadMetadataUpdateResponse__SubAgentActivityKind = Schema.Literals([
- "started",
- "interacted",
- "interrupted",
+export type V2ThreadListResponse__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadListResponse__PatchApplyStatus = Schema.Literals([
+ "inProgress",
"completed",
-]);
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadListResponse__PatchApplyStatus" });
-export type V2ThreadMetadataUpdateResponse__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type V2ThreadListResponse__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
};
-export const V2ThreadMetadataUpdateResponse__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
+export const V2ThreadListResponse__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadListResponse__McpToolCallAppContext" });
-export type V2ThreadMetadataUpdateResponse__ThreadActiveFlag =
- | "waitingOnApproval"
- | "waitingOnUserInput";
-export const V2ThreadMetadataUpdateResponse__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
+export type V2ThreadListResponse__McpToolCallError = { readonly message: string };
+export const V2ThreadListResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadListResponse__McpToolCallError" });
-export type V2ThreadMetadataUpdateResponse__ThreadId = string;
-export const V2ThreadMetadataUpdateResponse__ThreadId = Schema.String;
+export type V2ThreadListResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadListResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadListResponse__McpAppDisplayMode" });
-export type V2ThreadMetadataUpdateResponse__ThreadSource = string;
-export const V2ThreadMetadataUpdateResponse__ThreadSource = Schema.String;
+export type V2ThreadListResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
+};
+export const V2ThreadListResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadListResponse__McpToolCallResult" });
-export type V2ThreadMetadataUpdateResponse__TurnStatus =
- | "completed"
+export type V2ThreadListResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadListResponse__McpToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadListResponse__McpToolCallStatus" });
+
+export type V2ThreadListResponse__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ThreadListResponse__DynamicToolCallOutputContentItem = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadListResponse__DynamicToolCallOutputContentItem" });
+
+export type V2ThreadListResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadListResponse__DynamicToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadListResponse__DynamicToolCallStatus" });
+
+export type V2ThreadListResponse__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
| "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ThreadListResponse__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ThreadListResponse__CollabAgentStatus" });
+
+export type V2ThreadListResponse__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
| "failed"
- | "inProgress";
-export const V2ThreadMetadataUpdateResponse__TurnStatus = Schema.Literals([
+ | "interrupted";
+export const V2ThreadListResponse__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
"completed",
- "interrupted",
"failed",
- "inProgress",
-]);
+ "interrupted",
+]).annotate({ identifier: "V2ThreadListResponse__CollabAgentToolCallStatus" });
-export type V2ThreadMetadataUpdateResponse__WebSearchAction =
+export type V2ThreadListResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadListResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadListResponse__CollabAgentTool" });
+
+export type V2ThreadListResponse__SubAgentActivityKind =
+ | "started"
+ | "interacted"
+ | "interrupted"
+ | "completed";
+export const V2ThreadListResponse__SubAgentActivityKind = Schema.Literals([
+ "started",
+ "interacted",
+ "interrupted",
+ "completed",
+]).annotate({ identifier: "V2ThreadListResponse__SubAgentActivityKind" });
+
+export type V2ThreadListResponse__WebSearchAction =
| {
readonly queries?: ReadonlyArray | null;
readonly query?: string | null;
@@ -7609,7 +10115,7 @@ export type V2ThreadMetadataUpdateResponse__WebSearchAction =
| { readonly type: "openPage"; readonly url?: string | null }
| { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
| { readonly type: "other" };
-export const V2ThreadMetadataUpdateResponse__WebSearchAction = Schema.Union(
+export const V2ThreadListResponse__WebSearchAction = Schema.Union(
[
Schema.Struct({
queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
@@ -7630,195 +10136,298 @@ export const V2ThreadMetadataUpdateResponse__WebSearchAction = Schema.Union(
}).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadListResponse__WebSearchAction" });
-export type V2ThreadReadResponse__AbsolutePathBuf = string;
-export const V2ThreadReadResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
-
-export type V2ThreadReadResponse__AgentPath = string;
-export const V2ThreadReadResponse__AgentPath = Schema.String;
+export type V2ThreadListResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
+};
+export const V2ThreadListResponse__ImageGenerationFailure = Schema.Union(
+ [
+ Schema.Struct({
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
+ }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadListResponse__ImageGenerationFailure" });
-export type V2ThreadReadResponse__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ThreadReadResponse__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
+export type V2ThreadListResponse__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadListResponse__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadListResponse__TurnItemsView" });
-export type V2ThreadReadResponse__CommandExecutionStatus =
- | "inProgress"
+export type V2ThreadListResponse__TurnStatus =
| "completed"
+ | "interrupted"
| "failed"
- | "declined";
-export const V2ThreadReadResponse__CommandExecutionStatus = Schema.Literals([
- "inProgress",
+ | "inProgress";
+export const V2ThreadListResponse__TurnStatus = Schema.Literals([
"completed",
+ "interrupted",
"failed",
- "declined",
-]);
+ "inProgress",
+]).annotate({ identifier: "V2ThreadListResponse__TurnStatus" });
-export type V2ThreadReadResponse__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ThreadReadResponse__DynamicToolCallOutputContentItem = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
+export type V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams = {
+ readonly branch?: string | null;
+ readonly originUrl?: string | null;
+ readonly sha?: string | null;
+};
+export const V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams = Schema.Struct({
+ branch: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
}),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
+ Schema.Null,
+ ]),
+ ),
+ originUrl: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
}),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
+ Schema.Null,
+ ]),
+ ),
+ sha: Schema.optionalKey(
+ Schema.Union([
+ Schema.String.annotate({
+ description:
+ "Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
}),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
- ],
- { mode: "oneOf" },
-);
+ Schema.Null,
+ ]),
+ ),
+}).annotate({ identifier: "V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams" });
-export type V2ThreadReadResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadReadResponse__DynamicToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ThreadMetadataUpdateResponse__AbsolutePathBuf = string;
+export const V2ThreadMetadataUpdateResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadMetadataUpdateResponse__AbsolutePathBuf",
+});
-export type V2ThreadReadResponse__GitInfo = {
+export type V2ThreadMetadataUpdateResponse__GitInfo = {
readonly branch?: string | null;
readonly originUrl?: string | null;
readonly sha?: string | null;
};
-export const V2ThreadReadResponse__GitInfo = Schema.Struct({
+export const V2ThreadMetadataUpdateResponse__GitInfo = Schema.Struct({
branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__GitInfo" });
-export type V2ThreadReadResponse__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
+export type V2ThreadMetadataUpdateResponse__ThreadHistoryMode = "legacy" | "paginated";
+export const V2ThreadMetadataUpdateResponse__ThreadHistoryMode = Schema.Literals([
+ "legacy",
+ "paginated",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ThreadHistoryMode" });
+
+export type V2ThreadMetadataUpdateResponse__ReasoningEffort = string;
+export const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadMetadataUpdateResponse__ReasoningEffort",
+ }),
+);
+
+export type V2ThreadMetadataUpdateResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const V2ThreadReadResponse__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
+export const V2ThreadMetadataUpdateResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadMetadataUpdateResponse__ThreadSectionAppearance",
});
-export type V2ThreadReadResponse__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ThreadReadResponse__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
+export type V2ThreadMetadataUpdateResponse__AgentPath = string;
+export const V2ThreadMetadataUpdateResponse__AgentPath = Schema.String.annotate({
+ identifier: "V2ThreadMetadataUpdateResponse__AgentPath",
+});
-export type V2ThreadReadResponse__LegacyAppPathString = string;
-export const V2ThreadReadResponse__LegacyAppPathString = Schema.String;
+export type V2ThreadMetadataUpdateResponse__ThreadId = string;
+export const V2ThreadMetadataUpdateResponse__ThreadId = Schema.String.annotate({
+ identifier: "V2ThreadMetadataUpdateResponse__ThreadId",
+});
-export type V2ThreadReadResponse__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
-};
-export const V2ThreadReadResponse__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+export type V2ThreadMetadataUpdateResponse__ThreadActiveFlag =
+ | "waitingOnApproval"
+ | "waitingOnUserInput";
+export const V2ThreadMetadataUpdateResponse__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ThreadActiveFlag" });
+
+export type V2ThreadMetadataUpdateResponse__ThreadSource = string;
+export const V2ThreadMetadataUpdateResponse__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadMetadataUpdateResponse__ThreadSource",
});
-export type V2ThreadReadResponse__McpToolCallError = { readonly message: string };
-export const V2ThreadReadResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
+export type V2ThreadMetadataUpdateResponse__NonSteerableTurnKind = "review" | "compact";
+export const V2ThreadMetadataUpdateResponse__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__NonSteerableTurnKind" });
-export type V2ThreadReadResponse__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
+export type V2ThreadMetadataUpdateResponse__MisalignmentSteer = { readonly message: string };
+export const V2ThreadMetadataUpdateResponse__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__MisalignmentSteer" });
+
+export type V2ThreadMetadataUpdateResponse__ByteRange = {
+ readonly end: number;
+ readonly start: number;
};
-export const V2ThreadReadResponse__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
-});
+export const V2ThreadMetadataUpdateResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ByteRange" });
-export type V2ThreadReadResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadReadResponse__McpToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ThreadMetadataUpdateResponse__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadMetadataUpdateResponse__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ImageDetail" });
-export type V2ThreadReadResponse__MemoryCitationEntry = {
+export type V2ThreadMetadataUpdateResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
+};
+export const V2ThreadMetadataUpdateResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__HookPromptFragment" });
+
+export type V2ThreadMetadataUpdateResponse__AgentMessageDelivery = "async";
+export const V2ThreadMetadataUpdateResponse__AgentMessageDelivery = Schema.Literal(
+ "async",
+).annotate({ identifier: "V2ThreadMetadataUpdateResponse__AgentMessageDelivery" });
+
+export type V2ThreadMetadataUpdateResponse__MemoryCitationEntry = {
readonly lineEnd: number;
readonly lineStart: number;
readonly note: string;
readonly path: string;
};
-export const V2ThreadReadResponse__MemoryCitationEntry = Schema.Struct({
+export const V2ThreadMetadataUpdateResponse__MemoryCitationEntry = Schema.Struct({
lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
note: Schema.String,
path: Schema.String,
-});
+}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__MemoryCitationEntry" });
-export type V2ThreadReadResponse__MessagePhase = "commentary" | "final_answer";
-export const V2ThreadReadResponse__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
+export type V2ThreadMetadataUpdateResponse__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadMetadataUpdateResponse__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadMetadataUpdateResponse__MessagePhase",
});
-export type V2ThreadReadResponse__NonSteerableTurnKind = "review" | "compact";
-export const V2ThreadReadResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
+export type V2ThreadMetadataUpdateResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ThreadMetadataUpdateResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__AsyncUserInputQuestion" });
-export type V2ThreadReadResponse__PatchApplyStatus =
+export type V2ThreadMetadataUpdateResponse__LegacyAppPathString = string;
+export const V2ThreadMetadataUpdateResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadMetadataUpdateResponse__LegacyAppPathString",
+});
+
+export type V2ThreadMetadataUpdateResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadMetadataUpdateResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CommandExecutionSource" });
+
+export type V2ThreadMetadataUpdateResponse__CommandExecutionStatus =
| "inProgress"
| "completed"
| "failed"
| "declined";
-export const V2ThreadReadResponse__PatchApplyStatus = Schema.Literals([
+export const V2ThreadMetadataUpdateResponse__CommandExecutionStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CommandExecutionStatus" });
-export type V2ThreadReadResponse__PatchChangeKind =
+export type V2ThreadMetadataUpdateResponse__PatchChangeKind =
| { readonly type: "add" }
| { readonly type: "delete" }
| { readonly move_path?: string | null; readonly type: "update" };
-export const V2ThreadReadResponse__PatchChangeKind = Schema.Union(
+export const V2ThreadMetadataUpdateResponse__PatchChangeKind = Schema.Union(
[
Schema.Struct({
type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
@@ -7832,580 +10441,451 @@ export const V2ThreadReadResponse__PatchChangeKind = Schema.Union(
}).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadReadResponse__ReasoningEffort = string;
-export const V2ThreadReadResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+).annotate({ identifier: "V2ThreadMetadataUpdateResponse__PatchChangeKind" });
-export type V2ThreadReadResponse__SubAgentActivityKind =
- | "started"
- | "interacted"
- | "interrupted"
- | "completed";
-export const V2ThreadReadResponse__SubAgentActivityKind = Schema.Literals([
- "started",
- "interacted",
- "interrupted",
+export type V2ThreadMetadataUpdateResponse__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadMetadataUpdateResponse__PatchApplyStatus = Schema.Literals([
+ "inProgress",
"completed",
-]);
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__PatchApplyStatus" });
-export type V2ThreadReadResponse__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type V2ThreadMetadataUpdateResponse__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
};
-export const V2ThreadReadResponse__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
+export const V2ThreadMetadataUpdateResponse__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpToolCallAppContext" });
-export type V2ThreadReadResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
-export const V2ThreadReadResponse__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
+export type V2ThreadMetadataUpdateResponse__McpToolCallError = { readonly message: string };
+export const V2ThreadMetadataUpdateResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpToolCallError" });
-export type V2ThreadReadResponse__ThreadId = string;
-export const V2ThreadReadResponse__ThreadId = Schema.String;
+export type V2ThreadMetadataUpdateResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadMetadataUpdateResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpAppDisplayMode" });
-export type V2ThreadReadResponse__ThreadSource = string;
-export const V2ThreadReadResponse__ThreadSource = Schema.String;
+export type V2ThreadMetadataUpdateResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
+};
+export const V2ThreadMetadataUpdateResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpToolCallResult" });
-export type V2ThreadReadResponse__TurnStatus =
+export type V2ThreadMetadataUpdateResponse__McpToolCallStatus =
+ | "inProgress"
| "completed"
- | "interrupted"
- | "failed"
- | "inProgress";
-export const V2ThreadReadResponse__TurnStatus = Schema.Literals([
+ | "failed";
+export const V2ThreadMetadataUpdateResponse__McpToolCallStatus = Schema.Literals([
+ "inProgress",
"completed",
- "interrupted",
"failed",
- "inProgress",
-]);
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpToolCallStatus" });
-export type V2ThreadReadResponse__WebSearchAction =
- | {
- readonly queries?: ReadonlyArray | null;
- readonly query?: string | null;
- readonly type: "search";
- }
- | { readonly type: "openPage"; readonly url?: string | null }
- | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
- | { readonly type: "other" };
-export const V2ThreadReadResponse__WebSearchAction = Schema.Union(
- [
- Schema.Struct({
- queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
- }).annotate({ title: "SearchWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "OpenPageWebSearchAction" }),
- Schema.Struct({
- pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "FindInPageWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
- }).annotate({ title: "OtherWebSearchAction" }),
- ],
- { mode: "oneOf" },
-);
-
-export type V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioChunk = {
- readonly data: string;
- readonly itemId?: string | null;
- readonly numChannels: number;
- readonly sampleRate: number;
- readonly samplesPerChannel?: number | null;
-};
-export const V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioChunk = Schema.Struct(
- {
- data: Schema.String,
- itemId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- numChannels: Schema.Number.annotate({ format: "uint16" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- sampleRate: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- samplesPerChannel: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- },
-).annotate({ description: "EXPERIMENTAL - thread realtime audio chunk." });
-
-export type V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = "v1" | "v2" | "v3";
-export const V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = Schema.Literals([
- "v1",
- "v2",
- "v3",
-]);
-
-export type V2ThreadResumeParams__AgentMessageInputContent =
- | { readonly text: string; readonly type: "input_text" }
- | { readonly encrypted_content: string; readonly type: "encrypted_content" };
-export const V2ThreadResumeParams__AgentMessageInputContent = Schema.Union(
+export type V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem = Schema.Union(
[
Schema.Struct({
text: Schema.String,
- type: Schema.Literal("input_text").annotate({
- title: "InputTextAgentMessageInputContentType",
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
}),
- }).annotate({ title: "InputTextAgentMessageInputContent" }),
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
Schema.Struct({
- encrypted_content: Schema.String,
- type: Schema.Literal("encrypted_content").annotate({
- title: "EncryptedContentAgentMessageInputContentType",
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
}),
- }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
- ],
- { mode: "oneOf" },
-);
-
-export type V2ThreadResumeParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
-export const V2ThreadResumeParams__ApprovalsReviewer = Schema.Literals([
- "user",
- "auto_review",
- "guardian_subagent",
-]).annotate({
- description:
- "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
-});
-
-export type V2ThreadResumeParams__AskForApproval =
- | "untrusted"
- | "on-request"
- | "never"
- | {
- readonly granular: {
- readonly mcp_elicitations: boolean;
- readonly request_permissions?: boolean;
- readonly rules: boolean;
- readonly sandbox_approval: boolean;
- readonly skill_approval?: boolean;
- };
- };
-export const V2ThreadResumeParams__AskForApproval = Schema.Union(
- [
- Schema.Literals(["untrusted", "on-request", "never"]),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
Schema.Struct({
- granular: Schema.Struct({
- mcp_elicitations: Schema.Boolean,
- request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- rules: Schema.Boolean,
- sandbox_approval: Schema.Boolean,
- skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
}),
- }).annotate({ title: "GranularAskForApproval" }),
- ],
- { mode: "oneOf" },
-);
-
-export type V2ThreadResumeParams__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ThreadResumeParams__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
-
-export type V2ThreadResumeParams__InternalChatMessageMetadataPassthrough = {
- readonly turn_id?: string | null;
-};
-export const V2ThreadResumeParams__InternalChatMessageMetadataPassthrough = Schema.Struct({
- turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-}).annotate({
- description:
- "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
-});
-
-export type V2ThreadResumeParams__LocalShellAction = {
- readonly command: ReadonlyArray;
- readonly env?: { readonly [x: string]: string } | null;
- readonly timeout_ms?: number | null;
- readonly type: "exec";
- readonly user?: string | null;
- readonly working_directory?: string | null;
-};
-export const V2ThreadResumeParams__LocalShellAction = Schema.Union(
- [
- Schema.Struct({
- command: Schema.Array(Schema.String),
- env: Schema.optionalKey(
- Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
- ),
- timeout_ms: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint64" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
- user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "ExecLocalShellAction" }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem" });
-export type V2ThreadResumeParams__LocalShellStatus = "completed" | "in_progress" | "incomplete";
-export const V2ThreadResumeParams__LocalShellStatus = Schema.Literals([
+export type V2ThreadMetadataUpdateResponse__DynamicToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed";
+export const V2ThreadMetadataUpdateResponse__DynamicToolCallStatus = Schema.Literals([
+ "inProgress",
"completed",
- "in_progress",
- "incomplete",
-]);
+ "failed",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__DynamicToolCallStatus" });
-export type V2ThreadResumeParams__MessagePhase = "commentary" | "final_answer";
-export const V2ThreadResumeParams__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
- description:
- 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
-});
+export type V2ThreadMetadataUpdateResponse__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ThreadMetadataUpdateResponse__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CollabAgentStatus" });
-export type V2ThreadResumeParams__Personality = "none" | "friendly" | "pragmatic";
-export const V2ThreadResumeParams__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
+export type V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "interrupted";
+export const V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "interrupted",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus" });
-export type V2ThreadResumeParams__ReasoningItemContent =
- | { readonly text: string; readonly type: "reasoning_text" }
- | { readonly text: string; readonly type: "text" };
-export const V2ThreadResumeParams__ReasoningItemContent = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("reasoning_text").annotate({
- title: "ReasoningTextReasoningItemContentType",
- }),
- }).annotate({ title: "ReasoningTextReasoningItemContent" }),
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("text").annotate({ title: "TextReasoningItemContentType" }),
- }).annotate({ title: "TextReasoningItemContent" }),
- ],
- { mode: "oneOf" },
-);
+export type V2ThreadMetadataUpdateResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadMetadataUpdateResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CollabAgentTool" });
-export type V2ThreadResumeParams__ReasoningItemReasoningSummary = {
- readonly text: string;
- readonly type: "summary_text";
-};
-export const V2ThreadResumeParams__ReasoningItemReasoningSummary = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("summary_text").annotate({
- title: "SummaryTextReasoningItemReasoningSummaryType",
- }),
- }).annotate({ title: "SummaryTextReasoningItemReasoningSummary" }),
- ],
- { mode: "oneOf" },
-);
+export type V2ThreadMetadataUpdateResponse__SubAgentActivityKind =
+ | "started"
+ | "interacted"
+ | "interrupted"
+ | "completed";
+export const V2ThreadMetadataUpdateResponse__SubAgentActivityKind = Schema.Literals([
+ "started",
+ "interacted",
+ "interrupted",
+ "completed",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__SubAgentActivityKind" });
-export type V2ThreadResumeParams__ResponsesApiWebSearchAction =
+export type V2ThreadMetadataUpdateResponse__WebSearchAction =
| {
readonly queries?: ReadonlyArray | null;
readonly query?: string | null;
readonly type: "search";
}
- | { readonly type: "open_page"; readonly url?: string | null }
- | {
- readonly pattern?: string | null;
- readonly type: "find_in_page";
- readonly url?: string | null;
- }
+ | { readonly type: "openPage"; readonly url?: string | null }
+ | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
| { readonly type: "other" };
-export const V2ThreadResumeParams__ResponsesApiWebSearchAction = Schema.Union(
+export const V2ThreadMetadataUpdateResponse__WebSearchAction = Schema.Union(
[
Schema.Struct({
queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchResponsesApiWebSearchActionType" }),
- }).annotate({ title: "SearchResponsesApiWebSearchAction" }),
+ type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
+ }).annotate({ title: "SearchWebSearchAction" }),
Schema.Struct({
- type: Schema.Literal("open_page").annotate({
- title: "OpenPageResponsesApiWebSearchActionType",
- }),
+ type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "OpenPageResponsesApiWebSearchAction" }),
+ }).annotate({ title: "OpenPageWebSearchAction" }),
Schema.Struct({
pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("find_in_page").annotate({
- title: "FindInPageResponsesApiWebSearchActionType",
- }),
+ type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "FindInPageResponsesApiWebSearchAction" }),
+ }).annotate({ title: "FindInPageWebSearchAction" }),
Schema.Struct({
- type: Schema.Literal("other").annotate({ title: "OtherResponsesApiWebSearchActionType" }),
- }).annotate({ title: "OtherResponsesApiWebSearchAction" }),
+ type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
+ }).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadResumeParams__SandboxMode =
- | "read-only"
- | "workspace-write"
- | "danger-full-access";
-export const V2ThreadResumeParams__SandboxMode = Schema.Literals([
- "read-only",
- "workspace-write",
- "danger-full-access",
-]);
-
-export type V2ThreadResumeParams__SortDirection = "asc" | "desc";
-export const V2ThreadResumeParams__SortDirection = Schema.Literals(["asc", "desc"]);
-
-export type V2ThreadResumeParams__TurnItemsView = "notLoaded" | "summary" | "full";
-export const V2ThreadResumeParams__TurnItemsView = Schema.Literals([
- "notLoaded",
- "summary",
- "full",
-]);
-
-export type V2ThreadResumeResponse__AbsolutePathBuf = string;
-export const V2ThreadResumeResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
-
-export type V2ThreadResumeResponse__AgentPath = string;
-export const V2ThreadResumeResponse__AgentPath = Schema.String;
+).annotate({ identifier: "V2ThreadMetadataUpdateResponse__WebSearchAction" });
-export type V2ThreadResumeResponse__AskForApproval =
- | "untrusted"
- | "on-request"
- | "never"
- | {
- readonly granular: {
- readonly mcp_elicitations: boolean;
- readonly request_permissions?: boolean;
- readonly rules: boolean;
- readonly sandbox_approval: boolean;
- readonly skill_approval?: boolean;
- };
- };
-export const V2ThreadResumeResponse__AskForApproval = Schema.Union(
+export type V2ThreadMetadataUpdateResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
+};
+export const V2ThreadMetadataUpdateResponse__ImageGenerationFailure = Schema.Union(
[
- Schema.Literals(["untrusted", "on-request", "never"]),
Schema.Struct({
- granular: Schema.Struct({
- mcp_elicitations: Schema.Boolean,
- request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- rules: Schema.Boolean,
- sandbox_approval: Schema.Boolean,
- skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
}),
- }).annotate({ title: "GranularAskForApproval" }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadResumeResponse__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ThreadResumeResponse__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
-
-export type V2ThreadResumeResponse__CommandExecutionStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2ThreadResumeResponse__CommandExecutionStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
- "declined",
-]);
+).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ImageGenerationFailure" });
-export type V2ThreadResumeResponse__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ThreadResumeResponse__DynamicToolCallOutputContentItem = Schema.Union(
+export type V2ThreadMetadataUpdateResponse__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadMetadataUpdateResponse__TurnItemsView = Schema.Union(
[
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadMetadataUpdateResponse__TurnItemsView" });
-export type V2ThreadResumeResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadResumeResponse__DynamicToolCallStatus = Schema.Literals([
- "inProgress",
+export type V2ThreadMetadataUpdateResponse__TurnStatus =
+ | "completed"
+ | "interrupted"
+ | "failed"
+ | "inProgress";
+export const V2ThreadMetadataUpdateResponse__TurnStatus = Schema.Literals([
"completed",
+ "interrupted",
"failed",
-]);
+ "inProgress",
+]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__TurnStatus" });
-export type V2ThreadResumeResponse__GitInfo = {
+export type V2ThreadReadResponse__AbsolutePathBuf = string;
+export const V2ThreadReadResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadReadResponse__AbsolutePathBuf",
+});
+
+export type V2ThreadReadResponse__GitInfo = {
readonly branch?: string | null;
readonly originUrl?: string | null;
readonly sha?: string | null;
};
-export const V2ThreadResumeResponse__GitInfo = Schema.Struct({
+export const V2ThreadReadResponse__GitInfo = Schema.Struct({
branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2ThreadResumeResponse__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
-};
-export const V2ThreadResumeResponse__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
-});
+}).annotate({ identifier: "V2ThreadReadResponse__GitInfo" });
-export type V2ThreadResumeResponse__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ThreadResumeResponse__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
+export type V2ThreadReadResponse__ThreadHistoryMode = "legacy" | "paginated";
+export const V2ThreadReadResponse__ThreadHistoryMode = Schema.Literals([
+ "legacy",
+ "paginated",
+]).annotate({ identifier: "V2ThreadReadResponse__ThreadHistoryMode" });
-export type V2ThreadResumeResponse__LegacyAppPathString = string;
-export const V2ThreadResumeResponse__LegacyAppPathString = Schema.String;
+export type V2ThreadReadResponse__ReasoningEffort = string;
+export const V2ThreadReadResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadReadResponse__ReasoningEffort",
+ }),
+);
-export type V2ThreadResumeResponse__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
+export type V2ThreadReadResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const V2ThreadResumeResponse__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+export const V2ThreadReadResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadReadResponse__ThreadSectionAppearance",
});
-export type V2ThreadResumeResponse__McpToolCallError = { readonly message: string };
-export const V2ThreadResumeResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
+export type V2ThreadReadResponse__AgentPath = string;
+export const V2ThreadReadResponse__AgentPath = Schema.String.annotate({
+ identifier: "V2ThreadReadResponse__AgentPath",
+});
-export type V2ThreadResumeResponse__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const V2ThreadResumeResponse__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
+export type V2ThreadReadResponse__ThreadId = string;
+export const V2ThreadReadResponse__ThreadId = Schema.String.annotate({
+ identifier: "V2ThreadReadResponse__ThreadId",
});
-export type V2ThreadResumeResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadResumeResponse__McpToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ThreadReadResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
+export const V2ThreadReadResponse__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "V2ThreadReadResponse__ThreadActiveFlag" });
-export type V2ThreadResumeResponse__MemoryCitationEntry = {
- readonly lineEnd: number;
- readonly lineStart: number;
- readonly note: string;
- readonly path: string;
-};
-export const V2ThreadResumeResponse__MemoryCitationEntry = Schema.Struct({
- lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- note: Schema.String,
- path: Schema.String,
+export type V2ThreadReadResponse__ThreadSource = string;
+export const V2ThreadReadResponse__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadReadResponse__ThreadSource",
});
-export type V2ThreadResumeResponse__MessagePhase = "commentary" | "final_answer";
-export const V2ThreadResumeResponse__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
- description:
- 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
-});
+export type V2ThreadReadResponse__NonSteerableTurnKind = "review" | "compact";
+export const V2ThreadReadResponse__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ThreadReadResponse__NonSteerableTurnKind" });
-export type V2ThreadResumeResponse__NonSteerableTurnKind = "review" | "compact";
-export const V2ThreadResumeResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
+export type V2ThreadReadResponse__MisalignmentSteer = { readonly message: string };
+export const V2ThreadReadResponse__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadReadResponse__MisalignmentSteer" });
-export type V2ThreadResumeResponse__PatchApplyStatus =
+export type V2ThreadReadResponse__ByteRange = { readonly end: number; readonly start: number };
+export const V2ThreadReadResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadReadResponse__ByteRange" });
+
+export type V2ThreadReadResponse__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadReadResponse__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ThreadReadResponse__ImageDetail" });
+
+export type V2ThreadReadResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
+};
+export const V2ThreadReadResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadReadResponse__HookPromptFragment" });
+
+export type V2ThreadReadResponse__AgentMessageDelivery = "async";
+export const V2ThreadReadResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ThreadReadResponse__AgentMessageDelivery",
+});
+
+export type V2ThreadReadResponse__MemoryCitationEntry = {
+ readonly lineEnd: number;
+ readonly lineStart: number;
+ readonly note: string;
+ readonly path: string;
+};
+export const V2ThreadReadResponse__MemoryCitationEntry = Schema.Struct({
+ lineEnd: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ lineStart: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ note: Schema.String,
+ path: Schema.String,
+}).annotate({ identifier: "V2ThreadReadResponse__MemoryCitationEntry" });
+
+export type V2ThreadReadResponse__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadReadResponse__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description:
+ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadReadResponse__MessagePhase",
+});
+
+export type V2ThreadReadResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ThreadReadResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadReadResponse__AsyncUserInputQuestion" });
+
+export type V2ThreadReadResponse__LegacyAppPathString = string;
+export const V2ThreadReadResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadReadResponse__LegacyAppPathString",
+});
+
+export type V2ThreadReadResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadReadResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadReadResponse__CommandExecutionSource" });
+
+export type V2ThreadReadResponse__CommandExecutionStatus =
| "inProgress"
| "completed"
| "failed"
| "declined";
-export const V2ThreadResumeResponse__PatchApplyStatus = Schema.Literals([
+export const V2ThreadReadResponse__CommandExecutionStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ThreadReadResponse__CommandExecutionStatus" });
-export type V2ThreadResumeResponse__PatchChangeKind =
+export type V2ThreadReadResponse__PatchChangeKind =
| { readonly type: "add" }
| { readonly type: "delete" }
| { readonly move_path?: string | null; readonly type: "update" };
-export const V2ThreadResumeResponse__PatchChangeKind = Schema.Union(
+export const V2ThreadReadResponse__PatchChangeKind = Schema.Union(
[
Schema.Struct({
type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
@@ -8419,150 +10899,69 @@ export const V2ThreadResumeResponse__PatchChangeKind = Schema.Union(
}).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadResumeResponse__ReasoningEffort = string;
-export const V2ThreadResumeResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
-
-export type V2ThreadResumeResponse__SubAgentActivityKind =
- | "started"
- | "interacted"
- | "interrupted"
- | "completed";
-export const V2ThreadResumeResponse__SubAgentActivityKind = Schema.Literals([
- "started",
- "interacted",
- "interrupted",
- "completed",
-]);
+).annotate({ identifier: "V2ThreadReadResponse__PatchChangeKind" });
-export type V2ThreadResumeResponse__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
-};
-export const V2ThreadResumeResponse__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
-
-export type V2ThreadResumeResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
-export const V2ThreadResumeResponse__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
-
-export type V2ThreadResumeResponse__ThreadId = string;
-export const V2ThreadResumeResponse__ThreadId = Schema.String;
-
-export type V2ThreadResumeResponse__ThreadSource = string;
-export const V2ThreadResumeResponse__ThreadSource = Schema.String;
-
-export type V2ThreadResumeResponse__TurnStatus =
+export type V2ThreadReadResponse__PatchApplyStatus =
+ | "inProgress"
| "completed"
- | "interrupted"
| "failed"
- | "inProgress";
-export const V2ThreadResumeResponse__TurnStatus = Schema.Literals([
+ | "declined";
+export const V2ThreadReadResponse__PatchApplyStatus = Schema.Literals([
+ "inProgress",
"completed",
- "interrupted",
"failed",
- "inProgress",
-]);
+ "declined",
+]).annotate({ identifier: "V2ThreadReadResponse__PatchApplyStatus" });
-export type V2ThreadResumeResponse__WebSearchAction =
- | {
- readonly queries?: ReadonlyArray | null;
- readonly query?: string | null;
- readonly type: "search";
- }
- | { readonly type: "openPage"; readonly url?: string | null }
- | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
- | { readonly type: "other" };
-export const V2ThreadResumeResponse__WebSearchAction = Schema.Union(
- [
- Schema.Struct({
- queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
- }).annotate({ title: "SearchWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "OpenPageWebSearchAction" }),
- Schema.Struct({
- pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "FindInPageWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
- }).annotate({ title: "OtherWebSearchAction" }),
- ],
- { mode: "oneOf" },
-);
+export type V2ThreadReadResponse__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
+};
+export const V2ThreadReadResponse__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadReadResponse__McpToolCallAppContext" });
-export type V2ThreadRollbackResponse__AbsolutePathBuf = string;
-export const V2ThreadRollbackResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
+export type V2ThreadReadResponse__McpToolCallError = { readonly message: string };
+export const V2ThreadReadResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadReadResponse__McpToolCallError" });
-export type V2ThreadRollbackResponse__AgentPath = string;
-export const V2ThreadRollbackResponse__AgentPath = Schema.String;
+export type V2ThreadReadResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadReadResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadReadResponse__McpAppDisplayMode" });
-export type V2ThreadRollbackResponse__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ThreadRollbackResponse__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
+export type V2ThreadReadResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
+};
+export const V2ThreadReadResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadReadResponse__McpToolCallResult" });
-export type V2ThreadRollbackResponse__CommandExecutionStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2ThreadRollbackResponse__CommandExecutionStatus = Schema.Literals([
+export type V2ThreadReadResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadReadResponse__McpToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
- "declined",
-]);
+]).annotate({ identifier: "V2ThreadReadResponse__McpToolCallStatus" });
-export type V2ThreadRollbackResponse__DynamicToolCallOutputContentItem =
+export type V2ThreadReadResponse__DynamicToolCallOutputContentItem =
| { readonly text: string; readonly type: "inputText" }
| { readonly imageUrl: string; readonly type: "inputImage" }
| { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = Schema.Union(
+export const V2ThreadReadResponse__DynamicToolCallOutputContentItem = Schema.Union(
[
Schema.Struct({
text: Schema.String,
@@ -8584,213 +10983,80 @@ export const V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = Schema
}).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadReadResponse__DynamicToolCallOutputContentItem" });
-export type V2ThreadRollbackResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadRollbackResponse__DynamicToolCallStatus = Schema.Literals([
+export type V2ThreadReadResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadReadResponse__DynamicToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
-]);
-
-export type V2ThreadRollbackResponse__GitInfo = {
- readonly branch?: string | null;
- readonly originUrl?: string | null;
- readonly sha?: string | null;
-};
-export const V2ThreadRollbackResponse__GitInfo = Schema.Struct({
- branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2ThreadRollbackResponse__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
-};
-export const V2ThreadRollbackResponse__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
-});
-
-export type V2ThreadRollbackResponse__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ThreadRollbackResponse__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
-
-export type V2ThreadRollbackResponse__LegacyAppPathString = string;
-export const V2ThreadRollbackResponse__LegacyAppPathString = Schema.String;
-
-export type V2ThreadRollbackResponse__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
-};
-export const V2ThreadRollbackResponse__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2ThreadRollbackResponse__McpToolCallError = { readonly message: string };
-export const V2ThreadRollbackResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
-
-export type V2ThreadRollbackResponse__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const V2ThreadRollbackResponse__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
-});
+]).annotate({ identifier: "V2ThreadReadResponse__DynamicToolCallStatus" });
-export type V2ThreadRollbackResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadRollbackResponse__McpToolCallStatus = Schema.Literals([
- "inProgress",
+export type V2ThreadReadResponse__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ThreadReadResponse__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
"completed",
- "failed",
-]);
-
-export type V2ThreadRollbackResponse__MemoryCitationEntry = {
- readonly lineEnd: number;
- readonly lineStart: number;
- readonly note: string;
- readonly path: string;
-};
-export const V2ThreadRollbackResponse__MemoryCitationEntry = Schema.Struct({
- lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- note: Schema.String,
- path: Schema.String,
-});
-
-export type V2ThreadRollbackResponse__MessagePhase = "commentary" | "final_answer";
-export const V2ThreadRollbackResponse__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
- description:
- 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
-});
-
-export type V2ThreadRollbackResponse__NonSteerableTurnKind = "review" | "compact";
-export const V2ThreadRollbackResponse__NonSteerableTurnKind = Schema.Literals([
- "review",
- "compact",
-]);
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ThreadReadResponse__CollabAgentStatus" });
-export type V2ThreadRollbackResponse__PatchApplyStatus =
+export type V2ThreadReadResponse__CollabAgentToolCallStatus =
| "inProgress"
| "completed"
| "failed"
- | "declined";
-export const V2ThreadRollbackResponse__PatchApplyStatus = Schema.Literals([
+ | "interrupted";
+export const V2ThreadReadResponse__CollabAgentToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
- "declined",
-]);
-
-export type V2ThreadRollbackResponse__PatchChangeKind =
- | { readonly type: "add" }
- | { readonly type: "delete" }
- | { readonly move_path?: string | null; readonly type: "update" };
-export const V2ThreadRollbackResponse__PatchChangeKind = Schema.Union(
- [
- Schema.Struct({
- type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
- }).annotate({ title: "AddPatchChangeKind" }),
- Schema.Struct({
- type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
- }).annotate({ title: "DeletePatchChangeKind" }),
- Schema.Struct({
- move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
- }).annotate({ title: "UpdatePatchChangeKind" }),
- ],
- { mode: "oneOf" },
-);
+ "interrupted",
+]).annotate({ identifier: "V2ThreadReadResponse__CollabAgentToolCallStatus" });
-export type V2ThreadRollbackResponse__ReasoningEffort = string;
-export const V2ThreadRollbackResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+export type V2ThreadReadResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadReadResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadReadResponse__CollabAgentTool" });
-export type V2ThreadRollbackResponse__SubAgentActivityKind =
+export type V2ThreadReadResponse__SubAgentActivityKind =
| "started"
| "interacted"
| "interrupted"
| "completed";
-export const V2ThreadRollbackResponse__SubAgentActivityKind = Schema.Literals([
+export const V2ThreadReadResponse__SubAgentActivityKind = Schema.Literals([
"started",
"interacted",
"interrupted",
"completed",
-]);
-
-export type V2ThreadRollbackResponse__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
-};
-export const V2ThreadRollbackResponse__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
-
-export type V2ThreadRollbackResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
-export const V2ThreadRollbackResponse__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
-
-export type V2ThreadRollbackResponse__ThreadId = string;
-export const V2ThreadRollbackResponse__ThreadId = Schema.String;
-
-export type V2ThreadRollbackResponse__ThreadSource = string;
-export const V2ThreadRollbackResponse__ThreadSource = Schema.String;
-
-export type V2ThreadRollbackResponse__TurnStatus =
- | "completed"
- | "interrupted"
- | "failed"
- | "inProgress";
-export const V2ThreadRollbackResponse__TurnStatus = Schema.Literals([
- "completed",
- "interrupted",
- "failed",
- "inProgress",
-]);
+]).annotate({ identifier: "V2ThreadReadResponse__SubAgentActivityKind" });
-export type V2ThreadRollbackResponse__WebSearchAction =
+export type V2ThreadReadResponse__WebSearchAction =
| {
readonly queries?: ReadonlyArray | null;
readonly query?: string | null;
@@ -8799,7 +11065,7 @@ export type V2ThreadRollbackResponse__WebSearchAction =
| { readonly type: "openPage"; readonly url?: string | null }
| { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
| { readonly type: "other" };
-export const V2ThreadRollbackResponse__WebSearchAction = Schema.Union(
+export const V2ThreadReadResponse__WebSearchAction = Schema.Union(
[
Schema.Struct({
queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
@@ -8820,431 +11086,484 @@ export const V2ThreadRollbackResponse__WebSearchAction = Schema.Union(
}).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = string;
-export const V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
+).annotate({ identifier: "V2ThreadReadResponse__WebSearchAction" });
-export type V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = {
- readonly extends?: string | null;
- readonly id: string;
+export type V2ThreadReadResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
};
-export const V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = Schema.Struct({
- extends: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
- }),
- Schema.Null,
- ]),
- ),
- id: Schema.String.annotate({
- description:
- "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.",
- }),
-});
-
-export type V2ThreadSettingsUpdatedNotification__ApprovalsReviewer =
- | "user"
- | "auto_review"
- | "guardian_subagent";
-export const V2ThreadSettingsUpdatedNotification__ApprovalsReviewer = Schema.Literals([
- "user",
- "auto_review",
- "guardian_subagent",
-]).annotate({
- description:
- "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
-});
-
-export type V2ThreadSettingsUpdatedNotification__AskForApproval =
- | "untrusted"
- | "on-request"
- | "never"
- | {
- readonly granular: {
- readonly mcp_elicitations: boolean;
- readonly request_permissions?: boolean;
- readonly rules: boolean;
- readonly sandbox_approval: boolean;
- readonly skill_approval?: boolean;
- };
- };
-export const V2ThreadSettingsUpdatedNotification__AskForApproval = Schema.Union(
+export const V2ThreadReadResponse__ImageGenerationFailure = Schema.Union(
[
- Schema.Literals(["untrusted", "on-request", "never"]),
Schema.Struct({
- granular: Schema.Struct({
- mcp_elicitations: Schema.Boolean,
- request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- rules: Schema.Boolean,
- sandbox_approval: Schema.Boolean,
- skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
}),
- }).annotate({ title: "GranularAskForApproval" }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadSettingsUpdatedNotification__ModeKind = "plan" | "default";
-export const V2ThreadSettingsUpdatedNotification__ModeKind = Schema.Literals([
- "plan",
- "default",
-]).annotate({ description: "Initial collaboration mode to use when the TUI starts." });
-
-export type V2ThreadSettingsUpdatedNotification__Personality = "none" | "friendly" | "pragmatic";
-export const V2ThreadSettingsUpdatedNotification__Personality = Schema.Literals([
- "none",
- "friendly",
- "pragmatic",
-]);
+).annotate({ identifier: "V2ThreadReadResponse__ImageGenerationFailure" });
-export type V2ThreadSettingsUpdatedNotification__ReasoningEffort = string;
-export const V2ThreadSettingsUpdatedNotification__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
-
-export type V2ThreadSettingsUpdatedNotification__ReasoningSummary =
- | "auto"
- | "concise"
- | "detailed"
- | "none";
-export const V2ThreadSettingsUpdatedNotification__ReasoningSummary = Schema.Union(
+export type V2ThreadReadResponse__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadReadResponse__TurnItemsView = Schema.Union(
[
- Schema.Literals(["auto", "concise", "detailed"]),
- Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
],
{ mode: "oneOf" },
-).annotate({
- description:
- "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
-});
-
-export type V2ThreadStartedNotification__AbsolutePathBuf = string;
-export const V2ThreadStartedNotification__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
-
-export type V2ThreadStartedNotification__AgentPath = string;
-export const V2ThreadStartedNotification__AgentPath = Schema.String;
-
-export type V2ThreadStartedNotification__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ThreadStartedNotification__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
+).annotate({ identifier: "V2ThreadReadResponse__TurnItemsView" });
-export type V2ThreadStartedNotification__CommandExecutionStatus =
- | "inProgress"
+export type V2ThreadReadResponse__TurnStatus =
| "completed"
+ | "interrupted"
| "failed"
- | "declined";
-export const V2ThreadStartedNotification__CommandExecutionStatus = Schema.Literals([
- "inProgress",
+ | "inProgress";
+export const V2ThreadReadResponse__TurnStatus = Schema.Literals([
"completed",
+ "interrupted",
"failed",
- "declined",
-]);
+ "inProgress",
+]).annotate({ identifier: "V2ThreadReadResponse__TurnStatus" });
-export type V2ThreadStartedNotification__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ThreadStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
- ],
- { mode: "oneOf" },
-);
+export type V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeTranscriptRole =
+ | "user"
+ | "assistant";
+export const V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeTranscriptRole =
+ Schema.Literals(["user", "assistant"]).annotate({
+ identifier: "V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeTranscriptRole",
+ });
-export type V2ThreadStartedNotification__DynamicToolCallStatus =
- | "inProgress"
- | "completed"
+export type V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeBemItemPresentation =
+ | { readonly type: "wholeItem" }
+ | { readonly type: "inlineMarkdown" }
+ | { readonly index: number; readonly type: "inlineVisualization" };
+export const V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeBemItemPresentation =
+ Schema.Union(
+ [
+ Schema.Struct({
+ type: Schema.Literal("wholeItem").annotate({
+ title: "WholeItemThreadRealtimeBemItemPresentationType",
+ }),
+ }).annotate({ title: "WholeItemThreadRealtimeBemItemPresentation" }),
+ Schema.Struct({
+ type: Schema.Literal("inlineMarkdown").annotate({
+ title: "InlineMarkdownThreadRealtimeBemItemPresentationType",
+ }),
+ }).annotate({ title: "InlineMarkdownThreadRealtimeBemItemPresentation" }),
+ Schema.Struct({
+ index: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ type: Schema.Literal("inlineVisualization").annotate({
+ title: "InlineVisualizationThreadRealtimeBemItemPresentationType",
+ }),
+ }).annotate({ title: "InlineVisualizationThreadRealtimeBemItemPresentation" }),
+ ],
+ { mode: "oneOf" },
+ ).annotate({
+ description: "EXPERIMENTAL - how an existing agent item appears in a realtime conversation.",
+ identifier: "V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeBemItemPresentation",
+ });
+
+export type V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeSessionOutcome =
+ | "ended"
| "failed";
-export const V2ThreadStartedNotification__DynamicToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export const V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeSessionOutcome =
+ Schema.Literals(["ended", "failed"]).annotate({
+ identifier: "V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeSessionOutcome",
+ });
-export type V2ThreadStartedNotification__GitInfo = {
- readonly branch?: string | null;
- readonly originUrl?: string | null;
- readonly sha?: string | null;
-};
-export const V2ThreadStartedNotification__GitInfo = Schema.Struct({
- branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+export type V2ThreadRealtimeItemStartedNotification__ThreadRealtimeTranscriptRole =
+ | "user"
+ | "assistant";
+export const V2ThreadRealtimeItemStartedNotification__ThreadRealtimeTranscriptRole =
+ Schema.Literals(["user", "assistant"]).annotate({
+ identifier: "V2ThreadRealtimeItemStartedNotification__ThreadRealtimeTranscriptRole",
+ });
-export type V2ThreadStartedNotification__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
+export type V2ThreadRealtimeItemStartedNotification__ThreadRealtimeBemItemPresentation =
+ | { readonly type: "wholeItem" }
+ | { readonly type: "inlineMarkdown" }
+ | { readonly index: number; readonly type: "inlineVisualization" };
+export const V2ThreadRealtimeItemStartedNotification__ThreadRealtimeBemItemPresentation =
+ Schema.Union(
+ [
+ Schema.Struct({
+ type: Schema.Literal("wholeItem").annotate({
+ title: "WholeItemThreadRealtimeBemItemPresentationType",
+ }),
+ }).annotate({ title: "WholeItemThreadRealtimeBemItemPresentation" }),
+ Schema.Struct({
+ type: Schema.Literal("inlineMarkdown").annotate({
+ title: "InlineMarkdownThreadRealtimeBemItemPresentationType",
+ }),
+ }).annotate({ title: "InlineMarkdownThreadRealtimeBemItemPresentation" }),
+ Schema.Struct({
+ index: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ type: Schema.Literal("inlineVisualization").annotate({
+ title: "InlineVisualizationThreadRealtimeBemItemPresentationType",
+ }),
+ }).annotate({ title: "InlineVisualizationThreadRealtimeBemItemPresentation" }),
+ ],
+ { mode: "oneOf" },
+ ).annotate({
+ description: "EXPERIMENTAL - how an existing agent item appears in a realtime conversation.",
+ identifier: "V2ThreadRealtimeItemStartedNotification__ThreadRealtimeBemItemPresentation",
+ });
+
+export type V2ThreadRealtimeItemStartedNotification__ThreadRealtimeSessionOutcome =
+ | "ended"
+ | "failed";
+export const V2ThreadRealtimeItemStartedNotification__ThreadRealtimeSessionOutcome =
+ Schema.Literals(["ended", "failed"]).annotate({
+ identifier: "V2ThreadRealtimeItemStartedNotification__ThreadRealtimeSessionOutcome",
+ });
+
+export type V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioChunk = {
+ readonly data: string;
+ readonly itemId?: string | null;
+ readonly numChannels: number;
+ readonly sampleRate: number;
+ readonly samplesPerChannel?: number | null;
};
-export const V2ThreadStartedNotification__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
+export const V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioChunk = Schema.Struct(
+ {
+ data: Schema.String,
+ itemId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ numChannels: Schema.Number.annotate({ format: "uint16" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ sampleRate: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ samplesPerChannel: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ },
+).annotate({
+ description: "EXPERIMENTAL - thread realtime audio chunk.",
+ identifier: "V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioChunk",
});
-export type V2ThreadStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ThreadStartedNotification__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
+export type V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = "v1" | "v2" | "v3";
+export const V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = Schema.Literals([
+ "v1",
+ "v2",
+ "v3",
+]).annotate({ identifier: "V2ThreadRealtimeStartedNotification__RealtimeConversationVersion" });
-export type V2ThreadStartedNotification__LegacyAppPathString = string;
-export const V2ThreadStartedNotification__LegacyAppPathString = Schema.String;
+export type V2ThreadResumeParams__AskForApproval =
+ | "untrusted"
+ | "on-request"
+ | "never"
+ | {
+ readonly granular: {
+ readonly mcp_elicitations: boolean;
+ readonly request_permissions?: boolean;
+ readonly rules: boolean;
+ readonly sandbox_approval: boolean;
+ readonly skill_approval?: boolean;
+ };
+ };
+export const V2ThreadResumeParams__AskForApproval = Schema.Union(
+ [
+ Schema.Literals(["untrusted", "on-request", "never"]),
+ Schema.Struct({
+ granular: Schema.Struct({
+ mcp_elicitations: Schema.Boolean,
+ request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
+ rules: Schema.Boolean,
+ sandbox_approval: Schema.Boolean,
+ skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
+ }),
+ }).annotate({ title: "GranularAskForApproval" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadResumeParams__AskForApproval" });
-export type V2ThreadStartedNotification__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
-};
-export const V2ThreadStartedNotification__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+export type V2ThreadResumeParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
+export const V2ThreadResumeParams__ApprovalsReviewer = Schema.Literals([
+ "user",
+ "auto_review",
+ "guardian_subagent",
+]).annotate({
+ description:
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ identifier: "V2ThreadResumeParams__ApprovalsReviewer",
});
-export type V2ThreadStartedNotification__McpToolCallError = { readonly message: string };
-export const V2ThreadStartedNotification__McpToolCallError = Schema.Struct({
- message: Schema.String,
+export type V2ThreadResumeParams__Personality = "none" | "friendly" | "pragmatic";
+export const V2ThreadResumeParams__Personality = Schema.Literals([
+ "none",
+ "friendly",
+ "pragmatic",
+]).annotate({
+ description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
+ identifier: "V2ThreadResumeParams__Personality",
});
-export type V2ThreadStartedNotification__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const V2ThreadStartedNotification__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
-});
+export type V2ThreadResumeParams__SandboxMode =
+ | "read-only"
+ | "workspace-write"
+ | "danger-full-access";
+export const V2ThreadResumeParams__SandboxMode = Schema.Literals([
+ "read-only",
+ "workspace-write",
+ "danger-full-access",
+]).annotate({ identifier: "V2ThreadResumeParams__SandboxMode" });
-export type V2ThreadStartedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadStartedNotification__McpToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ThreadResumeParams__ReasoningEffort = string;
+export const V2ThreadResumeParams__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadResumeParams__ReasoningEffort",
+ }),
+);
-export type V2ThreadStartedNotification__MemoryCitationEntry = {
- readonly lineEnd: number;
- readonly lineStart: number;
- readonly note: string;
- readonly path: string;
+export type V2ThreadResumeParams__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadResumeParams__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ThreadResumeParams__ImageDetail" });
+
+export type V2ThreadResumeParams__InternalChatMessageMetadataPassthrough = {
+ readonly turn_id?: string | null;
};
-export const V2ThreadStartedNotification__MemoryCitationEntry = Schema.Struct({
- lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- note: Schema.String,
- path: Schema.String,
+export const V2ThreadResumeParams__InternalChatMessageMetadataPassthrough = Schema.Struct({
+ turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description:
+ "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
+ identifier: "V2ThreadResumeParams__InternalChatMessageMetadataPassthrough",
});
-export type V2ThreadStartedNotification__MessagePhase = "commentary" | "final_answer";
-export const V2ThreadStartedNotification__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
+export type V2ThreadResumeParams__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadResumeParams__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadResumeParams__MessagePhase",
});
-export type V2ThreadStartedNotification__NonSteerableTurnKind = "review" | "compact";
-export const V2ThreadStartedNotification__NonSteerableTurnKind = Schema.Literals([
- "review",
- "compact",
-]);
-
-export type V2ThreadStartedNotification__PatchApplyStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2ThreadStartedNotification__PatchApplyStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
- "declined",
-]);
-
-export type V2ThreadStartedNotification__PatchChangeKind =
- | { readonly type: "add" }
- | { readonly type: "delete" }
- | { readonly move_path?: string | null; readonly type: "update" };
-export const V2ThreadStartedNotification__PatchChangeKind = Schema.Union(
+export type V2ThreadResumeParams__AgentMessageInputContent =
+ | { readonly text: string; readonly type: "input_text" }
+ | { readonly encrypted_content: string; readonly type: "encrypted_content" };
+export const V2ThreadResumeParams__AgentMessageInputContent = Schema.Union(
[
Schema.Struct({
- type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
- }).annotate({ title: "AddPatchChangeKind" }),
- Schema.Struct({
- type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
- }).annotate({ title: "DeletePatchChangeKind" }),
+ text: Schema.String,
+ type: Schema.Literal("input_text").annotate({
+ title: "InputTextAgentMessageInputContentType",
+ }),
+ }).annotate({ title: "InputTextAgentMessageInputContent" }),
Schema.Struct({
- move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
- }).annotate({ title: "UpdatePatchChangeKind" }),
+ encrypted_content: Schema.String,
+ type: Schema.Literal("encrypted_content").annotate({
+ title: "EncryptedContentAgentMessageInputContentType",
+ }),
+ }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadStartedNotification__ReasoningEffort = string;
-export const V2ThreadStartedNotification__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+).annotate({ identifier: "V2ThreadResumeParams__AgentMessageInputContent" });
-export type V2ThreadStartedNotification__SubAgentActivityKind =
- | "started"
- | "interacted"
- | "interrupted"
- | "completed";
-export const V2ThreadStartedNotification__SubAgentActivityKind = Schema.Literals([
- "started",
- "interacted",
- "interrupted",
- "completed",
-]);
+export type V2ThreadResumeParams__ReasoningItemContent =
+ | { readonly text: string; readonly type: "reasoning_text" }
+ | { readonly text: string; readonly type: "text" };
+export const V2ThreadResumeParams__ReasoningItemContent = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("reasoning_text").annotate({
+ title: "ReasoningTextReasoningItemContentType",
+ }),
+ }).annotate({ title: "ReasoningTextReasoningItemContent" }),
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("text").annotate({ title: "TextReasoningItemContentType" }),
+ }).annotate({ title: "TextReasoningItemContent" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadResumeParams__ReasoningItemContent" });
-export type V2ThreadStartedNotification__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type V2ThreadResumeParams__ReasoningItemReasoningSummary = {
+ readonly text: string;
+ readonly type: "summary_text";
};
-export const V2ThreadStartedNotification__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
+export const V2ThreadResumeParams__ReasoningItemReasoningSummary = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("summary_text").annotate({
+ title: "SummaryTextReasoningItemReasoningSummaryType",
}),
- Schema.Null,
- ]),
- ),
-});
-
-export type V2ThreadStartedNotification__ThreadActiveFlag =
- | "waitingOnApproval"
- | "waitingOnUserInput";
-export const V2ThreadStartedNotification__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
-
-export type V2ThreadStartedNotification__ThreadId = string;
-export const V2ThreadStartedNotification__ThreadId = Schema.String;
+ }).annotate({ title: "SummaryTextReasoningItemReasoningSummary" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadResumeParams__ReasoningItemReasoningSummary" });
-export type V2ThreadStartedNotification__ThreadSource = string;
-export const V2ThreadStartedNotification__ThreadSource = Schema.String;
+export type V2ThreadResumeParams__LocalShellAction = {
+ readonly command: ReadonlyArray;
+ readonly env?: { readonly [x: string]: string } | null;
+ readonly timeout_ms?: number | null;
+ readonly type: "exec";
+ readonly user?: string | null;
+ readonly working_directory?: string | null;
+};
+export const V2ThreadResumeParams__LocalShellAction = Schema.Union(
+ [
+ Schema.Struct({
+ command: Schema.Array(Schema.String),
+ env: Schema.optionalKey(
+ Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
+ ),
+ timeout_ms: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "uint64" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({
+ expected: "a value greater than or equal to 0",
+ }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
+ user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "ExecLocalShellAction" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadResumeParams__LocalShellAction" });
-export type V2ThreadStartedNotification__TurnStatus =
- | "completed"
- | "interrupted"
- | "failed"
- | "inProgress";
-export const V2ThreadStartedNotification__TurnStatus = Schema.Literals([
+export type V2ThreadResumeParams__LocalShellStatus = "completed" | "in_progress" | "incomplete";
+export const V2ThreadResumeParams__LocalShellStatus = Schema.Literals([
"completed",
- "interrupted",
- "failed",
- "inProgress",
-]);
+ "in_progress",
+ "incomplete",
+]).annotate({ identifier: "V2ThreadResumeParams__LocalShellStatus" });
-export type V2ThreadStartedNotification__WebSearchAction =
+export type V2ThreadResumeParams__ResponsesApiWebSearchAction =
| {
readonly queries?: ReadonlyArray | null;
readonly query?: string | null;
readonly type: "search";
}
- | { readonly type: "openPage"; readonly url?: string | null }
- | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
+ | { readonly type: "open_page"; readonly url?: string | null }
+ | {
+ readonly pattern?: string | null;
+ readonly type: "find_in_page";
+ readonly url?: string | null;
+ }
| { readonly type: "other" };
-export const V2ThreadStartedNotification__WebSearchAction = Schema.Union(
+export const V2ThreadResumeParams__ResponsesApiWebSearchAction = Schema.Union(
[
Schema.Struct({
queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
- }).annotate({ title: "SearchWebSearchAction" }),
+ type: Schema.Literal("search").annotate({ title: "SearchResponsesApiWebSearchActionType" }),
+ }).annotate({ title: "SearchResponsesApiWebSearchAction" }),
Schema.Struct({
- type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
+ type: Schema.Literal("open_page").annotate({
+ title: "OpenPageResponsesApiWebSearchActionType",
+ }),
url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "OpenPageWebSearchAction" }),
+ }).annotate({ title: "OpenPageResponsesApiWebSearchAction" }),
Schema.Struct({
pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
+ type: Schema.Literal("find_in_page").annotate({
+ title: "FindInPageResponsesApiWebSearchActionType",
+ }),
url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "FindInPageWebSearchAction" }),
+ }).annotate({ title: "FindInPageResponsesApiWebSearchAction" }),
Schema.Struct({
- type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
- }).annotate({ title: "OtherWebSearchAction" }),
+ type: Schema.Literal("other").annotate({ title: "OtherResponsesApiWebSearchActionType" }),
+ }).annotate({ title: "OtherResponsesApiWebSearchAction" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadResumeParams__ResponsesApiWebSearchAction" });
-export type V2ThreadStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
-export const V2ThreadStartParams__ApprovalsReviewer = Schema.Literals([
- "user",
- "auto_review",
- "guardian_subagent",
-]).annotate({
- description:
- "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+export type V2ThreadResumeParams__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadResumeParams__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadResumeParams__TurnItemsView" });
+
+export type V2ThreadResumeParams__SortDirection = "asc" | "desc";
+export const V2ThreadResumeParams__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
+ identifier: "V2ThreadResumeParams__SortDirection",
});
-export type V2ThreadStartParams__AskForApproval =
+export type V2ThreadResumeResponse__AskForApproval =
| "untrusted"
| "on-request"
| "never"
@@ -9257,7 +11576,7 @@ export type V2ThreadStartParams__AskForApproval =
readonly skill_approval?: boolean;
};
};
-export const V2ThreadStartParams__AskForApproval = Schema.Union(
+export const V2ThreadResumeResponse__AskForApproval = Schema.Union(
[
Schema.Literals(["untrusted", "on-request", "never"]),
Schema.Struct({
@@ -9271,266 +11590,230 @@ export const V2ThreadStartParams__AskForApproval = Schema.Union(
}).annotate({ title: "GranularAskForApproval" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadStartParams__DynamicToolNamespaceTool = {
- readonly deferLoading?: boolean;
- readonly description: string;
- readonly inputSchema: unknown;
- readonly name: string;
- readonly type: "function";
-};
-export const V2ThreadStartParams__DynamicToolNamespaceTool = Schema.Union(
- [
- Schema.Struct({
- deferLoading: Schema.optionalKey(Schema.Boolean),
- description: Schema.String,
- inputSchema: Schema.Unknown,
- name: Schema.String,
- type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolNamespaceToolType" }),
- }).annotate({ title: "FunctionDynamicToolNamespaceTool" }),
- ],
- { mode: "oneOf" },
-);
-
-export type V2ThreadStartParams__LegacyAppPathString = string;
-export const V2ThreadStartParams__LegacyAppPathString = Schema.String;
-
-export type V2ThreadStartParams__Personality = "none" | "friendly" | "pragmatic";
-export const V2ThreadStartParams__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
+).annotate({ identifier: "V2ThreadResumeResponse__AskForApproval" });
-export type V2ThreadStartParams__SandboxMode =
- | "read-only"
- | "workspace-write"
- | "danger-full-access";
-export const V2ThreadStartParams__SandboxMode = Schema.Literals([
- "read-only",
- "workspace-write",
- "danger-full-access",
-]);
+export type V2ThreadResumeResponse__ApprovalsReviewer =
+ | "user"
+ | "auto_review"
+ | "guardian_subagent";
+export const V2ThreadResumeResponse__ApprovalsReviewer = Schema.Literals([
+ "user",
+ "auto_review",
+ "guardian_subagent",
+]).annotate({
+ description:
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ identifier: "V2ThreadResumeResponse__ApprovalsReviewer",
+});
-export type V2ThreadStartParams__ThreadSource = string;
-export const V2ThreadStartParams__ThreadSource = Schema.String;
+export type V2ThreadResumeResponse__ModeKind = "plan" | "default";
+export const V2ThreadResumeResponse__ModeKind = Schema.Literals(["plan", "default"]).annotate({
+ description: "Initial collaboration mode to use when the TUI starts.",
+ identifier: "V2ThreadResumeResponse__ModeKind",
+});
-export type V2ThreadStartParams__ThreadStartSource = "startup" | "clear";
-export const V2ThreadStartParams__ThreadStartSource = Schema.Literals(["startup", "clear"]);
+export type V2ThreadResumeResponse__ReasoningEffort = string;
+export const V2ThreadResumeResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadResumeResponse__ReasoningEffort",
+ }),
+);
-export type V2ThreadStartResponse__AbsolutePathBuf = string;
-export const V2ThreadStartResponse__AbsolutePathBuf = Schema.String.annotate({
+export type V2ThreadResumeResponse__AbsolutePathBuf = string;
+export const V2ThreadResumeResponse__AbsolutePathBuf = Schema.String.annotate({
description:
"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadResumeResponse__AbsolutePathBuf",
});
-export type V2ThreadStartResponse__AgentPath = string;
-export const V2ThreadStartResponse__AgentPath = Schema.String;
-
-export type V2ThreadStartResponse__AskForApproval =
- | "untrusted"
- | "on-request"
- | "never"
- | {
- readonly granular: {
- readonly mcp_elicitations: boolean;
- readonly request_permissions?: boolean;
- readonly rules: boolean;
- readonly sandbox_approval: boolean;
- readonly skill_approval?: boolean;
- };
- };
-export const V2ThreadStartResponse__AskForApproval = Schema.Union(
- [
- Schema.Literals(["untrusted", "on-request", "never"]),
- Schema.Struct({
- granular: Schema.Struct({
- mcp_elicitations: Schema.Boolean,
- request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- rules: Schema.Boolean,
- sandbox_approval: Schema.Boolean,
- skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- }),
- }).annotate({ title: "GranularAskForApproval" }),
- ],
- { mode: "oneOf" },
-);
-
-export type V2ThreadStartResponse__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2ThreadStartResponse__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
-
-export type V2ThreadStartResponse__CommandExecutionStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2ThreadStartResponse__CommandExecutionStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
- "declined",
-]);
-
-export type V2ThreadStartResponse__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ThreadStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
- ],
- { mode: "oneOf" },
-);
+export type V2ThreadResumeResponse__LegacyAppPathString = string;
+export const V2ThreadResumeResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadResumeResponse__LegacyAppPathString",
+});
-export type V2ThreadStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadStartResponse__DynamicToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ThreadResumeResponse__NetworkAccess = "restricted" | "enabled";
+export const V2ThreadResumeResponse__NetworkAccess = Schema.Literals([
+ "restricted",
+ "enabled",
+]).annotate({ identifier: "V2ThreadResumeResponse__NetworkAccess" });
-export type V2ThreadStartResponse__GitInfo = {
+export type V2ThreadResumeResponse__GitInfo = {
readonly branch?: string | null;
readonly originUrl?: string | null;
readonly sha?: string | null;
};
-export const V2ThreadStartResponse__GitInfo = Schema.Struct({
+export const V2ThreadResumeResponse__GitInfo = Schema.Struct({
branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ThreadResumeResponse__GitInfo" });
-export type V2ThreadStartResponse__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
+export type V2ThreadResumeResponse__ThreadHistoryMode = "legacy" | "paginated";
+export const V2ThreadResumeResponse__ThreadHistoryMode = Schema.Literals([
+ "legacy",
+ "paginated",
+]).annotate({ identifier: "V2ThreadResumeResponse__ThreadHistoryMode" });
+
+export type V2ThreadResumeResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const V2ThreadStartResponse__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
+export const V2ThreadResumeResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadResumeResponse__ThreadSectionAppearance",
});
-export type V2ThreadStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ThreadStartResponse__ImageDetail = Schema.Literals([
+export type V2ThreadResumeResponse__AgentPath = string;
+export const V2ThreadResumeResponse__AgentPath = Schema.String.annotate({
+ identifier: "V2ThreadResumeResponse__AgentPath",
+});
+
+export type V2ThreadResumeResponse__ThreadId = string;
+export const V2ThreadResumeResponse__ThreadId = Schema.String.annotate({
+ identifier: "V2ThreadResumeResponse__ThreadId",
+});
+
+export type V2ThreadResumeResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
+export const V2ThreadResumeResponse__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "V2ThreadResumeResponse__ThreadActiveFlag" });
+
+export type V2ThreadResumeResponse__ThreadSource = string;
+export const V2ThreadResumeResponse__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadResumeResponse__ThreadSource",
+});
+
+export type V2ThreadResumeResponse__NonSteerableTurnKind = "review" | "compact";
+export const V2ThreadResumeResponse__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ThreadResumeResponse__NonSteerableTurnKind" });
+
+export type V2ThreadResumeResponse__MisalignmentSteer = { readonly message: string };
+export const V2ThreadResumeResponse__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadResumeResponse__MisalignmentSteer" });
+
+export type V2ThreadResumeResponse__ByteRange = { readonly end: number; readonly start: number };
+export const V2ThreadResumeResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadResumeResponse__ByteRange" });
+
+export type V2ThreadResumeResponse__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadResumeResponse__ImageDetail = Schema.Literals([
"auto",
"low",
"high",
"original",
-]);
-
-export type V2ThreadStartResponse__LegacyAppPathString = string;
-export const V2ThreadStartResponse__LegacyAppPathString = Schema.String;
+]).annotate({ identifier: "V2ThreadResumeResponse__ImageDetail" });
-export type V2ThreadStartResponse__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
+export type V2ThreadResumeResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
};
-export const V2ThreadStartResponse__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2ThreadStartResponse__McpToolCallError = { readonly message: string };
-export const V2ThreadStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
+export const V2ThreadResumeResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadResumeResponse__HookPromptFragment" });
-export type V2ThreadStartResponse__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const V2ThreadStartResponse__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
+export type V2ThreadResumeResponse__AgentMessageDelivery = "async";
+export const V2ThreadResumeResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ThreadResumeResponse__AgentMessageDelivery",
});
-export type V2ThreadStartResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadStartResponse__McpToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
-
-export type V2ThreadStartResponse__MemoryCitationEntry = {
+export type V2ThreadResumeResponse__MemoryCitationEntry = {
readonly lineEnd: number;
readonly lineStart: number;
readonly note: string;
readonly path: string;
};
-export const V2ThreadStartResponse__MemoryCitationEntry = Schema.Struct({
+export const V2ThreadResumeResponse__MemoryCitationEntry = Schema.Struct({
lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
note: Schema.String,
path: Schema.String,
-});
+}).annotate({ identifier: "V2ThreadResumeResponse__MemoryCitationEntry" });
-export type V2ThreadStartResponse__MessagePhase = "commentary" | "final_answer";
-export const V2ThreadStartResponse__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
+export type V2ThreadResumeResponse__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadResumeResponse__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadResumeResponse__MessagePhase",
});
-export type V2ThreadStartResponse__NonSteerableTurnKind = "review" | "compact";
-export const V2ThreadStartResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
+export type V2ThreadResumeResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ThreadResumeResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadResumeResponse__AsyncUserInputQuestion" });
-export type V2ThreadStartResponse__PatchApplyStatus =
+export type V2ThreadResumeResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadResumeResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadResumeResponse__CommandExecutionSource" });
+
+export type V2ThreadResumeResponse__CommandExecutionStatus =
| "inProgress"
| "completed"
| "failed"
| "declined";
-export const V2ThreadStartResponse__PatchApplyStatus = Schema.Literals([
+export const V2ThreadResumeResponse__CommandExecutionStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ThreadResumeResponse__CommandExecutionStatus" });
-export type V2ThreadStartResponse__PatchChangeKind =
+export type V2ThreadResumeResponse__PatchChangeKind =
| { readonly type: "add" }
| { readonly type: "delete" }
| { readonly move_path?: string | null; readonly type: "update" };
-export const V2ThreadStartResponse__PatchChangeKind = Schema.Union(
+export const V2ThreadResumeResponse__PatchChangeKind = Schema.Union(
[
Schema.Struct({
type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
@@ -9544,143 +11827,100 @@ export const V2ThreadStartResponse__PatchChangeKind = Schema.Union(
}).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadStartResponse__ReasoningEffort = string;
-export const V2ThreadStartResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+).annotate({ identifier: "V2ThreadResumeResponse__PatchChangeKind" });
-export type V2ThreadStartResponse__SubAgentActivityKind =
- | "started"
- | "interacted"
- | "interrupted"
- | "completed";
-export const V2ThreadStartResponse__SubAgentActivityKind = Schema.Literals([
- "started",
- "interacted",
- "interrupted",
+export type V2ThreadResumeResponse__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadResumeResponse__PatchApplyStatus = Schema.Literals([
+ "inProgress",
"completed",
-]);
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadResumeResponse__PatchApplyStatus" });
-export type V2ThreadStartResponse__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type V2ThreadResumeResponse__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
};
-export const V2ThreadStartResponse__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
+export const V2ThreadResumeResponse__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadResumeResponse__McpToolCallAppContext" });
-export type V2ThreadStartResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
-export const V2ThreadStartResponse__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
+export type V2ThreadResumeResponse__McpToolCallError = { readonly message: string };
+export const V2ThreadResumeResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadResumeResponse__McpToolCallError" });
-export type V2ThreadStartResponse__ThreadId = string;
-export const V2ThreadStartResponse__ThreadId = Schema.String;
+export type V2ThreadResumeResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadResumeResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadResumeResponse__McpAppDisplayMode" });
-export type V2ThreadStartResponse__ThreadSource = string;
-export const V2ThreadStartResponse__ThreadSource = Schema.String;
+export type V2ThreadResumeResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
+};
+export const V2ThreadResumeResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadResumeResponse__McpToolCallResult" });
-export type V2ThreadStartResponse__TurnStatus =
- | "completed"
- | "interrupted"
- | "failed"
- | "inProgress";
-export const V2ThreadStartResponse__TurnStatus = Schema.Literals([
+export type V2ThreadResumeResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadResumeResponse__McpToolCallStatus = Schema.Literals([
+ "inProgress",
"completed",
- "interrupted",
"failed",
- "inProgress",
-]);
+]).annotate({ identifier: "V2ThreadResumeResponse__McpToolCallStatus" });
-export type V2ThreadStartResponse__WebSearchAction =
- | {
- readonly queries?: ReadonlyArray | null;
- readonly query?: string | null;
- readonly type: "search";
- }
- | { readonly type: "openPage"; readonly url?: string | null }
- | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
- | { readonly type: "other" };
-export const V2ThreadStartResponse__WebSearchAction = Schema.Union(
+export type V2ThreadResumeResponse__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ThreadResumeResponse__DynamicToolCallOutputContentItem = Schema.Union(
[
Schema.Struct({
- queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
- }).annotate({ title: "SearchWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "OpenPageWebSearchAction" }),
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
Schema.Struct({
- pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "FindInPageWebSearchAction" }),
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
Schema.Struct({
- type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
- }).annotate({ title: "OtherWebSearchAction" }),
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadStatusChangedNotification__ThreadActiveFlag =
- | "waitingOnApproval"
- | "waitingOnUserInput";
-export const V2ThreadStatusChangedNotification__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
-
-export type V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = {
- readonly cacheWriteInputTokens?: number;
- readonly cachedInputTokens: number;
- readonly inputTokens: number;
- readonly outputTokens: number;
- readonly reasoningOutputTokens: number;
- readonly totalTokens: number;
-};
-export const V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = Schema.Struct({
- cacheWriteInputTokens: Schema.optionalKey(
- Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()),
- ),
- cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- totalTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-});
-
-export type V2ThreadUnarchiveResponse__AbsolutePathBuf = string;
-export const V2ThreadUnarchiveResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
+).annotate({ identifier: "V2ThreadResumeResponse__DynamicToolCallOutputContentItem" });
-export type V2ThreadUnarchiveResponse__AgentPath = string;
-export const V2ThreadUnarchiveResponse__AgentPath = Schema.String;
+export type V2ThreadResumeResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadResumeResponse__DynamicToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadResumeResponse__DynamicToolCallStatus" });
-export type V2ThreadUnarchiveResponse__CollabAgentStatus =
+export type V2ThreadResumeResponse__CollabAgentStatus =
| "pendingInit"
| "running"
| "interrupted"
@@ -9688,7 +11928,7 @@ export type V2ThreadUnarchiveResponse__CollabAgentStatus =
| "errored"
| "shutdown"
| "notFound";
-export const V2ThreadUnarchiveResponse__CollabAgentStatus = Schema.Literals([
+export const V2ThreadResumeResponse__CollabAgentStatus = Schema.Literals([
"pendingInit",
"running",
"interrupted",
@@ -9696,176 +11936,336 @@ export const V2ThreadUnarchiveResponse__CollabAgentStatus = Schema.Literals([
"errored",
"shutdown",
"notFound",
-]);
+]).annotate({ identifier: "V2ThreadResumeResponse__CollabAgentStatus" });
-export type V2ThreadUnarchiveResponse__CommandExecutionStatus =
+export type V2ThreadResumeResponse__CollabAgentToolCallStatus =
| "inProgress"
| "completed"
| "failed"
- | "declined";
-export const V2ThreadUnarchiveResponse__CommandExecutionStatus = Schema.Literals([
+ | "interrupted";
+export const V2ThreadResumeResponse__CollabAgentToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
- "declined",
-]);
+ "interrupted",
+]).annotate({ identifier: "V2ThreadResumeResponse__CollabAgentToolCallStatus" });
-export type V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = Schema.Union(
+export type V2ThreadResumeResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadResumeResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadResumeResponse__CollabAgentTool" });
+
+export type V2ThreadResumeResponse__SubAgentActivityKind =
+ | "started"
+ | "interacted"
+ | "interrupted"
+ | "completed";
+export const V2ThreadResumeResponse__SubAgentActivityKind = Schema.Literals([
+ "started",
+ "interacted",
+ "interrupted",
+ "completed",
+]).annotate({ identifier: "V2ThreadResumeResponse__SubAgentActivityKind" });
+
+export type V2ThreadResumeResponse__WebSearchAction =
+ | {
+ readonly queries?: ReadonlyArray | null;
+ readonly query?: string | null;
+ readonly type: "search";
+ }
+ | { readonly type: "openPage"; readonly url?: string | null }
+ | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
+ | { readonly type: "other" };
+export const V2ThreadResumeResponse__WebSearchAction = Schema.Union(
[
Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
+ }).annotate({ title: "SearchWebSearchAction" }),
Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "OpenPageWebSearchAction" }),
Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
+ pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "FindInPageWebSearchAction" }),
+ Schema.Struct({
+ type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
+ }).annotate({ title: "OtherWebSearchAction" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadResumeResponse__WebSearchAction" });
+
+export type V2ThreadResumeResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
+};
+export const V2ThreadResumeResponse__ImageGenerationFailure = Schema.Union(
+ [
+ Schema.Struct({
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
}),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadResumeResponse__ImageGenerationFailure" });
-export type V2ThreadUnarchiveResponse__DynamicToolCallStatus =
- | "inProgress"
+export type V2ThreadResumeResponse__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadResumeResponse__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadResumeResponse__TurnItemsView" });
+
+export type V2ThreadResumeResponse__TurnStatus =
| "completed"
- | "failed";
-export const V2ThreadUnarchiveResponse__DynamicToolCallStatus = Schema.Literals([
- "inProgress",
+ | "interrupted"
+ | "failed"
+ | "inProgress";
+export const V2ThreadResumeResponse__TurnStatus = Schema.Literals([
"completed",
+ "interrupted",
"failed",
-]);
+ "inProgress",
+]).annotate({ identifier: "V2ThreadResumeResponse__TurnStatus" });
-export type V2ThreadUnarchiveResponse__GitInfo = {
+export type V2ThreadRevertResponse__AbsolutePathBuf = string;
+export const V2ThreadRevertResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadRevertResponse__AbsolutePathBuf",
+});
+
+export type V2ThreadRevertResponse__GitInfo = {
readonly branch?: string | null;
readonly originUrl?: string | null;
readonly sha?: string | null;
};
-export const V2ThreadUnarchiveResponse__GitInfo = Schema.Struct({
+export const V2ThreadRevertResponse__GitInfo = Schema.Struct({
branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+}).annotate({ identifier: "V2ThreadRevertResponse__GitInfo" });
-export type V2ThreadUnarchiveResponse__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
-};
-export const V2ThreadUnarchiveResponse__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
-});
-
-export type V2ThreadUnarchiveResponse__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2ThreadUnarchiveResponse__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
+export type V2ThreadRevertResponse__ThreadHistoryMode = "legacy" | "paginated";
+export const V2ThreadRevertResponse__ThreadHistoryMode = Schema.Literals([
+ "legacy",
+ "paginated",
+]).annotate({ identifier: "V2ThreadRevertResponse__ThreadHistoryMode" });
-export type V2ThreadUnarchiveResponse__LegacyAppPathString = string;
-export const V2ThreadUnarchiveResponse__LegacyAppPathString = Schema.String;
+export type V2ThreadRevertResponse__ReasoningEffort = string;
+export const V2ThreadRevertResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadRevertResponse__ReasoningEffort",
+ }),
+);
-export type V2ThreadUnarchiveResponse__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
+export type V2ThreadRevertResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const V2ThreadUnarchiveResponse__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+export const V2ThreadRevertResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadRevertResponse__ThreadSectionAppearance",
});
-export type V2ThreadUnarchiveResponse__McpToolCallError = { readonly message: string };
-export const V2ThreadUnarchiveResponse__McpToolCallError = Schema.Struct({
- message: Schema.String,
+export type V2ThreadRevertResponse__AgentPath = string;
+export const V2ThreadRevertResponse__AgentPath = Schema.String.annotate({
+ identifier: "V2ThreadRevertResponse__AgentPath",
});
-export type V2ThreadUnarchiveResponse__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const V2ThreadUnarchiveResponse__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
+export type V2ThreadRevertResponse__ThreadId = string;
+export const V2ThreadRevertResponse__ThreadId = Schema.String.annotate({
+ identifier: "V2ThreadRevertResponse__ThreadId",
});
-export type V2ThreadUnarchiveResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2ThreadUnarchiveResponse__McpToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ThreadRevertResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
+export const V2ThreadRevertResponse__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "V2ThreadRevertResponse__ThreadActiveFlag" });
-export type V2ThreadUnarchiveResponse__MemoryCitationEntry = {
+export type V2ThreadRevertResponse__ThreadSource = string;
+export const V2ThreadRevertResponse__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadRevertResponse__ThreadSource",
+});
+
+export type V2ThreadRevertResponse__NonSteerableTurnKind = "review" | "compact";
+export const V2ThreadRevertResponse__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ThreadRevertResponse__NonSteerableTurnKind" });
+
+export type V2ThreadRevertResponse__MisalignmentSteer = { readonly message: string };
+export const V2ThreadRevertResponse__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadRevertResponse__MisalignmentSteer" });
+
+export type V2ThreadRevertResponse__ByteRange = { readonly end: number; readonly start: number };
+export const V2ThreadRevertResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadRevertResponse__ByteRange" });
+
+export type V2ThreadRevertResponse__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadRevertResponse__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ThreadRevertResponse__ImageDetail" });
+
+export type V2ThreadRevertResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
+};
+export const V2ThreadRevertResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadRevertResponse__HookPromptFragment" });
+
+export type V2ThreadRevertResponse__AgentMessageDelivery = "async";
+export const V2ThreadRevertResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ThreadRevertResponse__AgentMessageDelivery",
+});
+
+export type V2ThreadRevertResponse__MemoryCitationEntry = {
readonly lineEnd: number;
readonly lineStart: number;
readonly note: string;
readonly path: string;
};
-export const V2ThreadUnarchiveResponse__MemoryCitationEntry = Schema.Struct({
+export const V2ThreadRevertResponse__MemoryCitationEntry = Schema.Struct({
lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
note: Schema.String,
path: Schema.String,
-});
+}).annotate({ identifier: "V2ThreadRevertResponse__MemoryCitationEntry" });
-export type V2ThreadUnarchiveResponse__MessagePhase = "commentary" | "final_answer";
-export const V2ThreadUnarchiveResponse__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
+export type V2ThreadRevertResponse__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadRevertResponse__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadRevertResponse__MessagePhase",
});
-export type V2ThreadUnarchiveResponse__NonSteerableTurnKind = "review" | "compact";
-export const V2ThreadUnarchiveResponse__NonSteerableTurnKind = Schema.Literals([
- "review",
- "compact",
-]);
+export type V2ThreadRevertResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ThreadRevertResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadRevertResponse__AsyncUserInputQuestion" });
-export type V2ThreadUnarchiveResponse__PatchApplyStatus =
+export type V2ThreadRevertResponse__LegacyAppPathString = string;
+export const V2ThreadRevertResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadRevertResponse__LegacyAppPathString",
+});
+
+export type V2ThreadRevertResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadRevertResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadRevertResponse__CommandExecutionSource" });
+
+export type V2ThreadRevertResponse__CommandExecutionStatus =
| "inProgress"
| "completed"
| "failed"
| "declined";
-export const V2ThreadUnarchiveResponse__PatchApplyStatus = Schema.Literals([
+export const V2ThreadRevertResponse__CommandExecutionStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ThreadRevertResponse__CommandExecutionStatus" });
-export type V2ThreadUnarchiveResponse__PatchChangeKind =
+export type V2ThreadRevertResponse__PatchChangeKind =
| { readonly type: "add" }
| { readonly type: "delete" }
| { readonly move_path?: string | null; readonly type: "update" };
-export const V2ThreadUnarchiveResponse__PatchChangeKind = Schema.Union(
+export const V2ThreadRevertResponse__PatchChangeKind = Schema.Union(
[
Schema.Struct({
type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
@@ -9879,159 +12279,69 @@ export const V2ThreadUnarchiveResponse__PatchChangeKind = Schema.Union(
}).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
-
-export type V2ThreadUnarchiveResponse__ReasoningEffort = string;
-export const V2ThreadUnarchiveResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
-
-export type V2ThreadUnarchiveResponse__SubAgentActivityKind =
- | "started"
- | "interacted"
- | "interrupted"
- | "completed";
-export const V2ThreadUnarchiveResponse__SubAgentActivityKind = Schema.Literals([
- "started",
- "interacted",
- "interrupted",
- "completed",
-]);
-
-export type V2ThreadUnarchiveResponse__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
-};
-export const V2ThreadUnarchiveResponse__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
-
-export type V2ThreadUnarchiveResponse__ThreadActiveFlag =
- | "waitingOnApproval"
- | "waitingOnUserInput";
-export const V2ThreadUnarchiveResponse__ThreadActiveFlag = Schema.Literals([
- "waitingOnApproval",
- "waitingOnUserInput",
-]);
-
-export type V2ThreadUnarchiveResponse__ThreadId = string;
-export const V2ThreadUnarchiveResponse__ThreadId = Schema.String;
+).annotate({ identifier: "V2ThreadRevertResponse__PatchChangeKind" });
-export type V2ThreadUnarchiveResponse__ThreadSource = string;
-export const V2ThreadUnarchiveResponse__ThreadSource = Schema.String;
-
-export type V2ThreadUnarchiveResponse__TurnStatus =
+export type V2ThreadRevertResponse__PatchApplyStatus =
+ | "inProgress"
| "completed"
- | "interrupted"
| "failed"
- | "inProgress";
-export const V2ThreadUnarchiveResponse__TurnStatus = Schema.Literals([
+ | "declined";
+export const V2ThreadRevertResponse__PatchApplyStatus = Schema.Literals([
+ "inProgress",
"completed",
- "interrupted",
"failed",
- "inProgress",
-]);
-
-export type V2ThreadUnarchiveResponse__WebSearchAction =
- | {
- readonly queries?: ReadonlyArray | null;
- readonly query?: string | null;
- readonly type: "search";
- }
- | { readonly type: "openPage"; readonly url?: string | null }
- | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
- | { readonly type: "other" };
-export const V2ThreadUnarchiveResponse__WebSearchAction = Schema.Union(
- [
- Schema.Struct({
- queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
- }).annotate({ title: "SearchWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "OpenPageWebSearchAction" }),
- Schema.Struct({
- pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "FindInPageWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
- }).annotate({ title: "OtherWebSearchAction" }),
- ],
- { mode: "oneOf" },
-);
-
-export type V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus =
- | "notLoaded"
- | "notSubscribed"
- | "unsubscribed";
-export const V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus = Schema.Literals([
- "notLoaded",
- "notSubscribed",
- "unsubscribed",
-]);
-
-export type V2TurnCompletedNotification__AbsolutePathBuf = string;
-export const V2TurnCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
+ "declined",
+]).annotate({ identifier: "V2ThreadRevertResponse__PatchApplyStatus" });
-export type V2TurnCompletedNotification__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2TurnCompletedNotification__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
+export type V2ThreadRevertResponse__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
+};
+export const V2ThreadRevertResponse__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadRevertResponse__McpToolCallAppContext" });
-export type V2TurnCompletedNotification__CommandExecutionStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2TurnCompletedNotification__CommandExecutionStatus = Schema.Literals([
+export type V2ThreadRevertResponse__McpToolCallError = { readonly message: string };
+export const V2ThreadRevertResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadRevertResponse__McpToolCallError" });
+
+export type V2ThreadRevertResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadRevertResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadRevertResponse__McpAppDisplayMode" });
+
+export type V2ThreadRevertResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
+};
+export const V2ThreadRevertResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadRevertResponse__McpToolCallResult" });
+
+export type V2ThreadRevertResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadRevertResponse__McpToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
- "declined",
-]);
+]).annotate({ identifier: "V2ThreadRevertResponse__McpToolCallStatus" });
-export type V2TurnCompletedNotification__DynamicToolCallOutputContentItem =
+export type V2ThreadRevertResponse__DynamicToolCallOutputContentItem =
| { readonly text: string; readonly type: "inputText" }
| { readonly imageUrl: string; readonly type: "inputImage" }
| { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2TurnCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union(
+export const V2ThreadRevertResponse__DynamicToolCallOutputContentItem = Schema.Union(
[
Schema.Struct({
text: Schema.String,
@@ -10053,195 +12363,80 @@ export const V2TurnCompletedNotification__DynamicToolCallOutputContentItem = Sch
}).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadRevertResponse__DynamicToolCallOutputContentItem" });
-export type V2TurnCompletedNotification__DynamicToolCallStatus =
- | "inProgress"
- | "completed"
- | "failed";
-export const V2TurnCompletedNotification__DynamicToolCallStatus = Schema.Literals([
+export type V2ThreadRevertResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadRevertResponse__DynamicToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
-]);
-
-export type V2TurnCompletedNotification__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
-};
-export const V2TurnCompletedNotification__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
-});
-
-export type V2TurnCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2TurnCompletedNotification__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
-
-export type V2TurnCompletedNotification__LegacyAppPathString = string;
-export const V2TurnCompletedNotification__LegacyAppPathString = Schema.String;
-
-export type V2TurnCompletedNotification__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
-};
-export const V2TurnCompletedNotification__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2TurnCompletedNotification__McpToolCallError = { readonly message: string };
-export const V2TurnCompletedNotification__McpToolCallError = Schema.Struct({
- message: Schema.String,
-});
-
-export type V2TurnCompletedNotification__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const V2TurnCompletedNotification__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
-});
+]).annotate({ identifier: "V2ThreadRevertResponse__DynamicToolCallStatus" });
-export type V2TurnCompletedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2TurnCompletedNotification__McpToolCallStatus = Schema.Literals([
- "inProgress",
+export type V2ThreadRevertResponse__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ThreadRevertResponse__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
"completed",
- "failed",
-]);
-
-export type V2TurnCompletedNotification__MemoryCitationEntry = {
- readonly lineEnd: number;
- readonly lineStart: number;
- readonly note: string;
- readonly path: string;
-};
-export const V2TurnCompletedNotification__MemoryCitationEntry = Schema.Struct({
- lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- note: Schema.String,
- path: Schema.String,
-});
-
-export type V2TurnCompletedNotification__MessagePhase = "commentary" | "final_answer";
-export const V2TurnCompletedNotification__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
- description:
- 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
-});
-
-export type V2TurnCompletedNotification__NonSteerableTurnKind = "review" | "compact";
-export const V2TurnCompletedNotification__NonSteerableTurnKind = Schema.Literals([
- "review",
- "compact",
-]);
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ThreadRevertResponse__CollabAgentStatus" });
-export type V2TurnCompletedNotification__PatchApplyStatus =
+export type V2ThreadRevertResponse__CollabAgentToolCallStatus =
| "inProgress"
| "completed"
| "failed"
- | "declined";
-export const V2TurnCompletedNotification__PatchApplyStatus = Schema.Literals([
+ | "interrupted";
+export const V2ThreadRevertResponse__CollabAgentToolCallStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
- "declined",
-]);
-
-export type V2TurnCompletedNotification__PatchChangeKind =
- | { readonly type: "add" }
- | { readonly type: "delete" }
- | { readonly move_path?: string | null; readonly type: "update" };
-export const V2TurnCompletedNotification__PatchChangeKind = Schema.Union(
- [
- Schema.Struct({
- type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
- }).annotate({ title: "AddPatchChangeKind" }),
- Schema.Struct({
- type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
- }).annotate({ title: "DeletePatchChangeKind" }),
- Schema.Struct({
- move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
- }).annotate({ title: "UpdatePatchChangeKind" }),
- ],
- { mode: "oneOf" },
-);
+ "interrupted",
+]).annotate({ identifier: "V2ThreadRevertResponse__CollabAgentToolCallStatus" });
-export type V2TurnCompletedNotification__ReasoningEffort = string;
-export const V2TurnCompletedNotification__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+export type V2ThreadRevertResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadRevertResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadRevertResponse__CollabAgentTool" });
-export type V2TurnCompletedNotification__SubAgentActivityKind =
+export type V2ThreadRevertResponse__SubAgentActivityKind =
| "started"
| "interacted"
| "interrupted"
| "completed";
-export const V2TurnCompletedNotification__SubAgentActivityKind = Schema.Literals([
+export const V2ThreadRevertResponse__SubAgentActivityKind = Schema.Literals([
"started",
"interacted",
"interrupted",
"completed",
-]);
-
-export type V2TurnCompletedNotification__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
-};
-export const V2TurnCompletedNotification__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
-});
-
-export type V2TurnCompletedNotification__TurnStatus =
- | "completed"
- | "interrupted"
- | "failed"
- | "inProgress";
-export const V2TurnCompletedNotification__TurnStatus = Schema.Literals([
- "completed",
- "interrupted",
- "failed",
- "inProgress",
-]);
+]).annotate({ identifier: "V2ThreadRevertResponse__SubAgentActivityKind" });
-export type V2TurnCompletedNotification__WebSearchAction =
+export type V2ThreadRevertResponse__WebSearchAction =
| {
readonly queries?: ReadonlyArray | null;
readonly query?: string | null;
@@ -10250,7 +12445,7 @@ export type V2TurnCompletedNotification__WebSearchAction =
| { readonly type: "openPage"; readonly url?: string | null }
| { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
| { readonly type: "other" };
-export const V2TurnCompletedNotification__WebSearchAction = Schema.Union(
+export const V2ThreadRevertResponse__WebSearchAction = Schema.Union(
[
Schema.Struct({
queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
@@ -10271,323 +12466,143 @@ export const V2TurnCompletedNotification__WebSearchAction = Schema.Union(
}).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
-
-export type V2TurnPlanUpdatedNotification__TurnPlanStepStatus =
- | "pending"
- | "inProgress"
- | "completed";
-export const V2TurnPlanUpdatedNotification__TurnPlanStepStatus = Schema.Literals([
- "pending",
- "inProgress",
- "completed",
-]);
-
-export type V2TurnStartedNotification__AbsolutePathBuf = string;
-export const V2TurnStartedNotification__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
-
-export type V2TurnStartedNotification__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2TurnStartedNotification__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
-
-export type V2TurnStartedNotification__CommandExecutionStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2TurnStartedNotification__CommandExecutionStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
- "declined",
-]);
+).annotate({ identifier: "V2ThreadRevertResponse__WebSearchAction" });
-export type V2TurnStartedNotification__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2TurnStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
+export type V2ThreadRevertResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
+};
+export const V2ThreadRevertResponse__ImageGenerationFailure = Schema.Union(
[
Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
}),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadRevertResponse__ImageGenerationFailure" });
-export type V2TurnStartedNotification__DynamicToolCallStatus =
- | "inProgress"
+export type V2ThreadRevertResponse__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadRevertResponse__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadRevertResponse__TurnItemsView" });
+
+export type V2ThreadRevertResponse__TurnStatus =
| "completed"
- | "failed";
-export const V2TurnStartedNotification__DynamicToolCallStatus = Schema.Literals([
- "inProgress",
+ | "interrupted"
+ | "failed"
+ | "inProgress";
+export const V2ThreadRevertResponse__TurnStatus = Schema.Literals([
"completed",
+ "interrupted",
"failed",
-]);
+ "inProgress",
+]).annotate({ identifier: "V2ThreadRevertResponse__TurnStatus" });
-export type V2TurnStartedNotification__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
+export type V2ThreadSectionCreateParams__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const V2TurnStartedNotification__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
+export const V2ThreadSectionCreateParams__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadSectionCreateParams__ThreadSectionAppearance",
});
-export type V2TurnStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2TurnStartedNotification__ImageDetail = Schema.Literals([
- "auto",
- "low",
- "high",
- "original",
-]);
-
-export type V2TurnStartedNotification__LegacyAppPathString = string;
-export const V2TurnStartedNotification__LegacyAppPathString = Schema.String;
-
-export type V2TurnStartedNotification__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
+export type V2ThreadSectionCreateResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const V2TurnStartedNotification__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2TurnStartedNotification__McpToolCallError = { readonly message: string };
-export const V2TurnStartedNotification__McpToolCallError = Schema.Struct({
- message: Schema.String,
+export const V2ThreadSectionCreateResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadSectionCreateResponse__ThreadSectionAppearance",
});
-export type V2TurnStartedNotification__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
+export type V2ThreadSectionListResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const V2TurnStartedNotification__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
+export const V2ThreadSectionListResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadSectionListResponse__ThreadSectionAppearance",
});
-export type V2TurnStartedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2TurnStartedNotification__McpToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
-
-export type V2TurnStartedNotification__MemoryCitationEntry = {
- readonly lineEnd: number;
- readonly lineStart: number;
- readonly note: string;
- readonly path: string;
+export type V2ThreadSectionUpdateParams__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const V2TurnStartedNotification__MemoryCitationEntry = Schema.Struct({
- lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- note: Schema.String,
- path: Schema.String,
+export const V2ThreadSectionUpdateParams__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadSectionUpdateParams__ThreadSectionAppearance",
});
-export type V2TurnStartedNotification__MessagePhase = "commentary" | "final_answer";
-export const V2TurnStartedNotification__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
- description:
- 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+export type V2ThreadSectionUpdateResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
+};
+export const V2ThreadSectionUpdateResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadSectionUpdateResponse__ThreadSectionAppearance",
});
-export type V2TurnStartedNotification__NonSteerableTurnKind = "review" | "compact";
-export const V2TurnStartedNotification__NonSteerableTurnKind = Schema.Literals([
- "review",
- "compact",
-]);
-
-export type V2TurnStartedNotification__PatchApplyStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2TurnStartedNotification__PatchApplyStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
- "declined",
-]);
-
-export type V2TurnStartedNotification__PatchChangeKind =
- | { readonly type: "add" }
- | { readonly type: "delete" }
- | { readonly move_path?: string | null; readonly type: "update" };
-export const V2TurnStartedNotification__PatchChangeKind = Schema.Union(
- [
- Schema.Struct({
- type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
- }).annotate({ title: "AddPatchChangeKind" }),
- Schema.Struct({
- type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
- }).annotate({ title: "DeletePatchChangeKind" }),
- Schema.Struct({
- move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
- }).annotate({ title: "UpdatePatchChangeKind" }),
- ],
- { mode: "oneOf" },
-);
-
-export type V2TurnStartedNotification__ReasoningEffort = string;
-export const V2TurnStartedNotification__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
-
-export type V2TurnStartedNotification__SubAgentActivityKind =
- | "started"
- | "interacted"
- | "interrupted"
- | "completed";
-export const V2TurnStartedNotification__SubAgentActivityKind = Schema.Literals([
- "started",
- "interacted",
- "interrupted",
- "completed",
-]);
-
-export type V2TurnStartedNotification__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = {
+ readonly extends?: string | null;
+ readonly id: string;
};
-export const V2TurnStartedNotification__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
+export const V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = Schema.Struct({
+ extends: Schema.optionalKey(
Schema.Union([
Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
+ description:
+ "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
}),
Schema.Null,
]),
),
-});
-
-export type V2TurnStartedNotification__TurnStatus =
- | "completed"
- | "interrupted"
- | "failed"
- | "inProgress";
-export const V2TurnStartedNotification__TurnStatus = Schema.Literals([
- "completed",
- "interrupted",
- "failed",
- "inProgress",
-]);
-
-export type V2TurnStartedNotification__WebSearchAction =
- | {
- readonly queries?: ReadonlyArray | null;
- readonly query?: string | null;
- readonly type: "search";
- }
- | { readonly type: "openPage"; readonly url?: string | null }
- | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
- | { readonly type: "other" };
-export const V2TurnStartedNotification__WebSearchAction = Schema.Union(
- [
- Schema.Struct({
- queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
- }).annotate({ title: "SearchWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "OpenPageWebSearchAction" }),
- Schema.Struct({
- pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- }).annotate({ title: "FindInPageWebSearchAction" }),
- Schema.Struct({
- type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
- }).annotate({ title: "OtherWebSearchAction" }),
- ],
- { mode: "oneOf" },
-);
-
-export type V2TurnStartParams__AbsolutePathBuf = string;
-export const V2TurnStartParams__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
-
-export type V2TurnStartParams__AdditionalContextKind = "untrusted" | "application";
-export const V2TurnStartParams__AdditionalContextKind = Schema.Literals([
- "untrusted",
- "application",
-]);
-
-export type V2TurnStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
-export const V2TurnStartParams__ApprovalsReviewer = Schema.Literals([
- "user",
- "auto_review",
- "guardian_subagent",
-]).annotate({
- description:
- "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
-});
+ id: Schema.String.annotate({
+ description:
+ "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.",
+ }),
+}).annotate({ identifier: "V2ThreadSettingsUpdatedNotification__ActivePermissionProfile" });
-export type V2TurnStartParams__AskForApproval =
+export type V2ThreadSettingsUpdatedNotification__AskForApproval =
| "untrusted"
| "on-request"
| "never"
@@ -10600,7 +12615,7 @@ export type V2TurnStartParams__AskForApproval =
readonly skill_approval?: boolean;
};
};
-export const V2TurnStartParams__AskForApproval = Schema.Union(
+export const V2ThreadSettingsUpdatedNotification__AskForApproval = Schema.Union(
[
Schema.Literals(["untrusted", "on-request", "never"]),
Schema.Struct({
@@ -10614,29 +12629,70 @@ export const V2TurnStartParams__AskForApproval = Schema.Union(
}).annotate({ title: "GranularAskForApproval" }),
],
{ mode: "oneOf" },
-);
-
-export type V2TurnStartParams__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2TurnStartParams__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
+).annotate({ identifier: "V2ThreadSettingsUpdatedNotification__AskForApproval" });
-export type V2TurnStartParams__LegacyAppPathString = string;
-export const V2TurnStartParams__LegacyAppPathString = Schema.String;
+export type V2ThreadSettingsUpdatedNotification__ApprovalsReviewer =
+ | "user"
+ | "auto_review"
+ | "guardian_subagent";
+export const V2ThreadSettingsUpdatedNotification__ApprovalsReviewer = Schema.Literals([
+ "user",
+ "auto_review",
+ "guardian_subagent",
+]).annotate({
+ description:
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ identifier: "V2ThreadSettingsUpdatedNotification__ApprovalsReviewer",
+});
-export type V2TurnStartParams__ModeKind = "plan" | "default";
-export const V2TurnStartParams__ModeKind = Schema.Literals(["plan", "default"]).annotate({
+export type V2ThreadSettingsUpdatedNotification__ModeKind = "plan" | "default";
+export const V2ThreadSettingsUpdatedNotification__ModeKind = Schema.Literals([
+ "plan",
+ "default",
+]).annotate({
description: "Initial collaboration mode to use when the TUI starts.",
+ identifier: "V2ThreadSettingsUpdatedNotification__ModeKind",
});
-export type V2TurnStartParams__Personality = "none" | "friendly" | "pragmatic";
-export const V2TurnStartParams__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
-
-export type V2TurnStartParams__ReasoningEffort = string;
-export const V2TurnStartParams__ReasoningEffort = Schema.String.annotate({
+export type V2ThreadSettingsUpdatedNotification__ReasoningEffort = string;
+export const V2ThreadSettingsUpdatedNotification__ReasoningEffort = Schema.String.annotate({
description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadSettingsUpdatedNotification__ReasoningEffort",
+ }),
+);
-export type V2TurnStartParams__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
-export const V2TurnStartParams__ReasoningSummary = Schema.Union(
+export type V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = string;
+export const V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadSettingsUpdatedNotification__AbsolutePathBuf",
+});
+
+export type V2ThreadSettingsUpdatedNotification__Personality = "none" | "friendly" | "pragmatic";
+export const V2ThreadSettingsUpdatedNotification__Personality = Schema.Literals([
+ "none",
+ "friendly",
+ "pragmatic",
+]).annotate({
+ description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
+ identifier: "V2ThreadSettingsUpdatedNotification__Personality",
+});
+
+export type V2ThreadSettingsUpdatedNotification__NetworkAccess = "restricted" | "enabled";
+export const V2ThreadSettingsUpdatedNotification__NetworkAccess = Schema.Literals([
+ "restricted",
+ "enabled",
+]).annotate({ identifier: "V2ThreadSettingsUpdatedNotification__NetworkAccess" });
+
+export type V2ThreadSettingsUpdatedNotification__ReasoningSummary =
+ | "auto"
+ | "concise"
+ | "detailed"
+ | "none";
+export const V2ThreadSettingsUpdatedNotification__ReasoningSummary = Schema.Union(
[
Schema.Literals(["auto", "concise", "detailed"]),
Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
@@ -10645,206 +12701,210 @@ export const V2TurnStartParams__ReasoningSummary = Schema.Union(
).annotate({
description:
"A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
+ identifier: "V2ThreadSettingsUpdatedNotification__ReasoningSummary",
});
-export type V2TurnStartParams__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type V2ThreadStartedNotification__AbsolutePathBuf = string;
+export const V2ThreadStartedNotification__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadStartedNotification__AbsolutePathBuf",
+});
+
+export type V2ThreadStartedNotification__GitInfo = {
+ readonly branch?: string | null;
+ readonly originUrl?: string | null;
+ readonly sha?: string | null;
};
-export const V2TurnStartParams__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
+export const V2ThreadStartedNotification__GitInfo = Schema.Struct({
+ branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadStartedNotification__GitInfo" });
+
+export type V2ThreadStartedNotification__ThreadHistoryMode = "legacy" | "paginated";
+export const V2ThreadStartedNotification__ThreadHistoryMode = Schema.Literals([
+ "legacy",
+ "paginated",
+]).annotate({ identifier: "V2ThreadStartedNotification__ThreadHistoryMode" });
+
+export type V2ThreadStartedNotification__ReasoningEffort = string;
+export const V2ThreadStartedNotification__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadStartedNotification__ReasoningEffort",
}),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
- }),
- Schema.Null,
- ]),
- ),
+);
+
+export type V2ThreadStartedNotification__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
+};
+export const V2ThreadStartedNotification__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadStartedNotification__ThreadSectionAppearance",
});
-export type V2TurnStartResponse__AbsolutePathBuf = string;
-export const V2TurnStartResponse__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+export type V2ThreadStartedNotification__AgentPath = string;
+export const V2ThreadStartedNotification__AgentPath = Schema.String.annotate({
+ identifier: "V2ThreadStartedNotification__AgentPath",
});
-export type V2TurnStartResponse__CollabAgentStatus =
- | "pendingInit"
- | "running"
- | "interrupted"
- | "completed"
- | "errored"
- | "shutdown"
- | "notFound";
-export const V2TurnStartResponse__CollabAgentStatus = Schema.Literals([
- "pendingInit",
- "running",
- "interrupted",
- "completed",
- "errored",
- "shutdown",
- "notFound",
-]);
+export type V2ThreadStartedNotification__ThreadId = string;
+export const V2ThreadStartedNotification__ThreadId = Schema.String.annotate({
+ identifier: "V2ThreadStartedNotification__ThreadId",
+});
-export type V2TurnStartResponse__CommandExecutionStatus =
- | "inProgress"
- | "completed"
- | "failed"
- | "declined";
-export const V2TurnStartResponse__CommandExecutionStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
- "declined",
-]);
+export type V2ThreadStartedNotification__ThreadActiveFlag =
+ | "waitingOnApproval"
+ | "waitingOnUserInput";
+export const V2ThreadStartedNotification__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "V2ThreadStartedNotification__ThreadActiveFlag" });
-export type V2TurnStartResponse__DynamicToolCallOutputContentItem =
- | { readonly text: string; readonly type: "inputText" }
- | { readonly imageUrl: string; readonly type: "inputImage" }
- | { readonly audioUrl: string; readonly type: "inputAudio" };
-export const V2TurnStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
- [
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("inputText").annotate({
- title: "InputTextDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- imageUrl: Schema.String,
- type: Schema.Literal("inputImage").annotate({
- title: "InputImageDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
- Schema.Struct({
- audioUrl: Schema.String,
- type: Schema.Literal("inputAudio").annotate({
- title: "InputAudioDynamicToolCallOutputContentItemType",
- }),
- }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
- ],
- { mode: "oneOf" },
-);
+export type V2ThreadStartedNotification__ThreadSource = string;
+export const V2ThreadStartedNotification__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadStartedNotification__ThreadSource",
+});
-export type V2TurnStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2TurnStartResponse__DynamicToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
+export type V2ThreadStartedNotification__NonSteerableTurnKind = "review" | "compact";
+export const V2ThreadStartedNotification__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ThreadStartedNotification__NonSteerableTurnKind" });
-export type V2TurnStartResponse__HookPromptFragment = {
- readonly hookRunId: string;
- readonly text: string;
+export type V2ThreadStartedNotification__MisalignmentSteer = { readonly message: string };
+export const V2ThreadStartedNotification__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadStartedNotification__MisalignmentSteer" });
+
+export type V2ThreadStartedNotification__ByteRange = {
+ readonly end: number;
+ readonly start: number;
};
-export const V2TurnStartResponse__HookPromptFragment = Schema.Struct({
- hookRunId: Schema.String,
- text: Schema.String,
-});
+export const V2ThreadStartedNotification__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadStartedNotification__ByteRange" });
-export type V2TurnStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2TurnStartResponse__ImageDetail = Schema.Literals([
+export type V2ThreadStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadStartedNotification__ImageDetail = Schema.Literals([
"auto",
"low",
"high",
"original",
-]);
+]).annotate({ identifier: "V2ThreadStartedNotification__ImageDetail" });
-export type V2TurnStartResponse__LegacyAppPathString = string;
-export const V2TurnStartResponse__LegacyAppPathString = Schema.String;
-
-export type V2TurnStartResponse__McpToolCallAppContext = {
- readonly actionName?: string | null;
- readonly appName?: string | null;
- readonly connectorId: string;
- readonly linkId?: string | null;
- readonly resourceUri?: string | null;
+export type V2ThreadStartedNotification__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
};
-export const V2TurnStartResponse__McpToolCallAppContext = Schema.Struct({
- actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- connectorId: Schema.String,
- linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
-
-export type V2TurnStartResponse__McpToolCallError = { readonly message: string };
-export const V2TurnStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
+export const V2ThreadStartedNotification__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadStartedNotification__HookPromptFragment" });
-export type V2TurnStartResponse__McpToolCallResult = {
- readonly _meta?: unknown;
- readonly content: ReadonlyArray;
- readonly structuredContent?: unknown;
-};
-export const V2TurnStartResponse__McpToolCallResult = Schema.Struct({
- _meta: Schema.optionalKey(Schema.Unknown),
- content: Schema.Array(Schema.Unknown),
- structuredContent: Schema.optionalKey(Schema.Unknown),
+export type V2ThreadStartedNotification__AgentMessageDelivery = "async";
+export const V2ThreadStartedNotification__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ThreadStartedNotification__AgentMessageDelivery",
});
-export type V2TurnStartResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
-export const V2TurnStartResponse__McpToolCallStatus = Schema.Literals([
- "inProgress",
- "completed",
- "failed",
-]);
-
-export type V2TurnStartResponse__MemoryCitationEntry = {
+export type V2ThreadStartedNotification__MemoryCitationEntry = {
readonly lineEnd: number;
readonly lineStart: number;
readonly note: string;
readonly path: string;
};
-export const V2TurnStartResponse__MemoryCitationEntry = Schema.Struct({
+export const V2ThreadStartedNotification__MemoryCitationEntry = Schema.Struct({
lineEnd: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
lineStart: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
note: Schema.String,
path: Schema.String,
-});
+}).annotate({ identifier: "V2ThreadStartedNotification__MemoryCitationEntry" });
-export type V2TurnStartResponse__MessagePhase = "commentary" | "final_answer";
-export const V2TurnStartResponse__MessagePhase = Schema.Literals([
- "commentary",
- "final_answer",
-]).annotate({
+export type V2ThreadStartedNotification__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadStartedNotification__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadStartedNotification__MessagePhase",
});
-export type V2TurnStartResponse__NonSteerableTurnKind = "review" | "compact";
-export const V2TurnStartResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
+export type V2ThreadStartedNotification__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
+};
+export const V2ThreadStartedNotification__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadStartedNotification__AsyncUserInputQuestion" });
-export type V2TurnStartResponse__PatchApplyStatus =
+export type V2ThreadStartedNotification__LegacyAppPathString = string;
+export const V2ThreadStartedNotification__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadStartedNotification__LegacyAppPathString",
+});
+
+export type V2ThreadStartedNotification__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadStartedNotification__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadStartedNotification__CommandExecutionSource" });
+
+export type V2ThreadStartedNotification__CommandExecutionStatus =
| "inProgress"
| "completed"
| "failed"
| "declined";
-export const V2TurnStartResponse__PatchApplyStatus = Schema.Literals([
+export const V2ThreadStartedNotification__CommandExecutionStatus = Schema.Literals([
"inProgress",
"completed",
"failed",
"declined",
-]);
+]).annotate({ identifier: "V2ThreadStartedNotification__CommandExecutionStatus" });
-export type V2TurnStartResponse__PatchChangeKind =
+export type V2ThreadStartedNotification__PatchChangeKind =
| { readonly type: "add" }
| { readonly type: "delete" }
| { readonly move_path?: string | null; readonly type: "update" };
-export const V2TurnStartResponse__PatchChangeKind = Schema.Union(
+export const V2ThreadStartedNotification__PatchChangeKind = Schema.Union(
[
Schema.Struct({
type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
@@ -10858,59 +12918,167 @@ export const V2TurnStartResponse__PatchChangeKind = Schema.Union(
}).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
-
-export type V2TurnStartResponse__ReasoningEffort = string;
-export const V2TurnStartResponse__ReasoningEffort = Schema.String.annotate({
- description: "A non-empty reasoning effort value advertised by the model.",
-}).check(Schema.isMinLength(1));
+).annotate({ identifier: "V2ThreadStartedNotification__PatchChangeKind" });
-export type V2TurnStartResponse__SubAgentActivityKind =
- | "started"
- | "interacted"
- | "interrupted"
- | "completed";
-export const V2TurnStartResponse__SubAgentActivityKind = Schema.Literals([
- "started",
- "interacted",
- "interrupted",
+export type V2ThreadStartedNotification__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadStartedNotification__PatchApplyStatus = Schema.Literals([
+ "inProgress",
"completed",
-]);
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadStartedNotification__PatchApplyStatus" });
-export type V2TurnStartResponse__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type V2ThreadStartedNotification__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
};
-export const V2TurnStartResponse__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
+export const V2ThreadStartedNotification__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadStartedNotification__McpToolCallAppContext" });
+
+export type V2ThreadStartedNotification__McpToolCallError = { readonly message: string };
+export const V2ThreadStartedNotification__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadStartedNotification__McpToolCallError" });
+
+export type V2ThreadStartedNotification__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadStartedNotification__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadStartedNotification__McpAppDisplayMode" });
+
+export type V2ThreadStartedNotification__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
+};
+export const V2ThreadStartedNotification__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadStartedNotification__McpToolCallResult" });
+
+export type V2ThreadStartedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadStartedNotification__McpToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadStartedNotification__McpToolCallStatus" });
+
+export type V2ThreadStartedNotification__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ThreadStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
}),
- Schema.Null,
- ]),
- ),
-});
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadStartedNotification__DynamicToolCallOutputContentItem" });
-export type V2TurnStartResponse__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress";
-export const V2TurnStartResponse__TurnStatus = Schema.Literals([
+export type V2ThreadStartedNotification__DynamicToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed";
+export const V2ThreadStartedNotification__DynamicToolCallStatus = Schema.Literals([
+ "inProgress",
"completed",
- "interrupted",
"failed",
+]).annotate({ identifier: "V2ThreadStartedNotification__DynamicToolCallStatus" });
+
+export type V2ThreadStartedNotification__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ThreadStartedNotification__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ThreadStartedNotification__CollabAgentStatus" });
+
+export type V2ThreadStartedNotification__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "interrupted";
+export const V2ThreadStartedNotification__CollabAgentToolCallStatus = Schema.Literals([
"inProgress",
-]);
+ "completed",
+ "failed",
+ "interrupted",
+]).annotate({ identifier: "V2ThreadStartedNotification__CollabAgentToolCallStatus" });
-export type V2TurnStartResponse__WebSearchAction =
+export type V2ThreadStartedNotification__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadStartedNotification__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadStartedNotification__CollabAgentTool" });
+
+export type V2ThreadStartedNotification__SubAgentActivityKind =
+ | "started"
+ | "interacted"
+ | "interrupted"
+ | "completed";
+export const V2ThreadStartedNotification__SubAgentActivityKind = Schema.Literals([
+ "started",
+ "interacted",
+ "interrupted",
+ "completed",
+]).annotate({ identifier: "V2ThreadStartedNotification__SubAgentActivityKind" });
+
+export type V2ThreadStartedNotification__WebSearchAction =
| {
readonly queries?: ReadonlyArray | null;
readonly query?: string | null;
@@ -10919,7 +13087,7 @@ export type V2TurnStartResponse__WebSearchAction =
| { readonly type: "openPage"; readonly url?: string | null }
| { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
| { readonly type: "other" };
-export const V2TurnStartResponse__WebSearchAction = Schema.Union(
+export const V2ThreadStartedNotification__WebSearchAction = Schema.Union(
[
Schema.Struct({
queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
@@ -10940,4638 +13108,3776 @@ export const V2TurnStartResponse__WebSearchAction = Schema.Union(
}).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
-
-export type V2TurnSteerParams__AdditionalContextKind = "untrusted" | "application";
-export const V2TurnSteerParams__AdditionalContextKind = Schema.Literals([
- "untrusted",
- "application",
-]);
+).annotate({ identifier: "V2ThreadStartedNotification__WebSearchAction" });
-export type V2TurnSteerParams__ImageDetail = "auto" | "low" | "high" | "original";
-export const V2TurnSteerParams__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
-
-export type V2TurnSteerParams__TextElement = {
- readonly byteRange: { readonly end: number; readonly start: number };
- readonly placeholder?: string | null;
+export type V2ThreadStartedNotification__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
};
-export const V2TurnSteerParams__TextElement = Schema.Struct({
- byteRange: Schema.Struct({
- end: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- start: Schema.Number.annotate({ format: "uint" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- }).annotate({
- description: "Byte range in the parent `text` buffer that this element occupies.",
- }),
- placeholder: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional human-readable placeholder for the element, displayed in the UI.",
+export const V2ThreadStartedNotification__ImageGenerationFailure = Schema.Union(
+ [
+ Schema.Struct({
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
}),
- Schema.Null,
- ]),
- ),
-});
-
-export type V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness =
- | "ready"
- | "notConfigured"
- | "updateRequired";
-export const V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness = Schema.Literals([
- "ready",
- "notConfigured",
- "updateRequired",
-]);
-
-export type V2WindowsSandboxSetupCompletedNotification__WindowsSandboxSetupMode =
- | "elevated"
- | "unelevated";
-export const V2WindowsSandboxSetupCompletedNotification__WindowsSandboxSetupMode = Schema.Literals([
- "elevated",
- "unelevated",
-]);
-
-export type V2WindowsSandboxSetupStartParams__AbsolutePathBuf = string;
-export const V2WindowsSandboxSetupStartParams__AbsolutePathBuf = Schema.String.annotate({
- description:
- "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
-});
-
-export type V2WindowsSandboxSetupStartParams__WindowsSandboxSetupMode = "elevated" | "unelevated";
-export const V2WindowsSandboxSetupStartParams__WindowsSandboxSetupMode = Schema.Literals([
- "elevated",
- "unelevated",
-]);
-
-export type ApplyPatchApprovalResponse__NetworkPolicyAmendment = {
- readonly action: ApplyPatchApprovalResponse__NetworkPolicyRuleAction;
- readonly host: string;
-};
-export const ApplyPatchApprovalResponse__NetworkPolicyAmendment = Schema.Struct({
- action: ApplyPatchApprovalResponse__NetworkPolicyRuleAction,
- host: Schema.String,
-});
-
-export type ClientRequest__PluginInstallParams = {
- readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null;
- readonly pluginName: string;
- readonly remoteMarketplaceName?: string | null;
-};
-export const ClientRequest__PluginInstallParams = Schema.Struct({
- marketplacePath: Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])),
- pluginName: Schema.String,
- remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadStartedNotification__ImageGenerationFailure" });
-export type ClientRequest__PluginInstalledParams = {
- readonly cwds?: ReadonlyArray | null;
- readonly installSuggestionPluginNames?: ReadonlyArray | null;
-};
-export const ClientRequest__PluginInstalledParams = Schema.Struct({
- cwds: Schema.optionalKey(
- Schema.Union([
- Schema.Array(ClientRequest__AbsolutePathBuf).annotate({
- description: "Optional working directories used to discover repo marketplaces.",
- }),
- Schema.Null,
- ]),
- ),
- installSuggestionPluginNames: Schema.optionalKey(
- Schema.Union([
- Schema.Array(Schema.String).annotate({
- description:
- "Additional uninstalled plugin names that should be returned when present locally. This is used by mention surfaces that intentionally expose install entrypoints.",
- }),
- Schema.Null,
- ]),
- ),
-});
+export type V2ThreadStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadStartedNotification__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadStartedNotification__TurnItemsView" });
-export type ClientRequest__PluginReadParams = {
- readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null;
- readonly pluginName: string;
- readonly remoteMarketplaceName?: string | null;
-};
-export const ClientRequest__PluginReadParams = Schema.Struct({
- marketplacePath: Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])),
- pluginName: Schema.String,
- remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+export type V2ThreadStartedNotification__TurnStatus =
+ | "completed"
+ | "interrupted"
+ | "failed"
+ | "inProgress";
+export const V2ThreadStartedNotification__TurnStatus = Schema.Literals([
+ "completed",
+ "interrupted",
+ "failed",
+ "inProgress",
+]).annotate({ identifier: "V2ThreadStartedNotification__TurnStatus" });
-export type ClientRequest__SandboxPolicy =
- | { readonly type: "dangerFullAccess" }
- | { readonly networkAccess?: boolean; readonly type: "readOnly" }
- | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
+export type V2ThreadStartParams__AskForApproval =
+ | "untrusted"
+ | "on-request"
+ | "never"
| {
- readonly excludeSlashTmp?: boolean;
- readonly excludeTmpdirEnvVar?: boolean;
- readonly networkAccess?: boolean;
- readonly type: "workspaceWrite";
- readonly writableRoots?: ReadonlyArray;
+ readonly granular: {
+ readonly mcp_elicitations: boolean;
+ readonly request_permissions?: boolean;
+ readonly rules: boolean;
+ readonly sandbox_approval: boolean;
+ readonly skill_approval?: boolean;
+ };
};
-export const ClientRequest__SandboxPolicy = Schema.Union(
+export const V2ThreadStartParams__AskForApproval = Schema.Union(
[
+ Schema.Literals(["untrusted", "on-request", "never"]),
Schema.Struct({
- type: Schema.Literal("dangerFullAccess").annotate({
- title: "DangerFullAccessSandboxPolicyType",
- }),
- }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
- Schema.Struct({
- networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
- }).annotate({ title: "ReadOnlySandboxPolicy" }),
- Schema.Struct({
- networkAccess: Schema.optionalKey(
- Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
- ),
- type: Schema.Literal("externalSandbox").annotate({
- title: "ExternalSandboxSandboxPolicyType",
+ granular: Schema.Struct({
+ mcp_elicitations: Schema.Boolean,
+ request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
+ rules: Schema.Boolean,
+ sandbox_approval: Schema.Boolean,
+ skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
}),
- }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
- Schema.Struct({
- excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
- writableRoots: Schema.optionalKey(
- Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }),
- ),
- }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
+ }).annotate({ title: "GranularAskForApproval" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadStartParams__AskForApproval" });
-export type ClientRequest__SkillsConfigWriteParams = {
- readonly enabled: boolean;
- readonly name?: string | null;
- readonly path?: ClientRequest__AbsolutePathBuf | null;
-};
-export const ClientRequest__SkillsConfigWriteParams = Schema.Struct({
- enabled: Schema.Boolean,
- name: Schema.optionalKey(
- Schema.Union([Schema.String.annotate({ description: "Name-based selector." }), Schema.Null]),
- ),
- path: Schema.optionalKey(
- Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null]).annotate({
- description: "Path-based selector.",
- }),
- ),
+export type V2ThreadStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
+export const V2ThreadStartParams__ApprovalsReviewer = Schema.Literals([
+ "user",
+ "auto_review",
+ "guardian_subagent",
+]).annotate({
+ description:
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ identifier: "V2ThreadStartParams__ApprovalsReviewer",
});
-export type ClientRequest__SkillsExtraRootsSetParams = {
- readonly extraRoots: ReadonlyArray;
-};
-export const ClientRequest__SkillsExtraRootsSetParams = Schema.Struct({
- extraRoots: Schema.Array(ClientRequest__AbsolutePathBuf),
+export type V2ThreadStartParams__Personality = "none" | "friendly" | "pragmatic";
+export const V2ThreadStartParams__Personality = Schema.Literals([
+ "none",
+ "friendly",
+ "pragmatic",
+]).annotate({
+ description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
+ identifier: "V2ThreadStartParams__Personality",
});
-export type ClientRequest__SendAddCreditsNudgeEmailParams = {
- readonly creditType: ClientRequest__AddCreditsNudgeCreditType;
-};
-export const ClientRequest__SendAddCreditsNudgeEmailParams = Schema.Struct({
- creditType: ClientRequest__AddCreditsNudgeCreditType,
+export type V2ThreadStartParams__SandboxMode =
+ | "read-only"
+ | "workspace-write"
+ | "danger-full-access";
+export const V2ThreadStartParams__SandboxMode = Schema.Literals([
+ "read-only",
+ "workspace-write",
+ "danger-full-access",
+]).annotate({ identifier: "V2ThreadStartParams__SandboxMode" });
+
+export type V2ThreadStartParams__ThreadStartSource = "startup" | "clear";
+export const V2ThreadStartParams__ThreadStartSource = Schema.Literals([
+ "startup",
+ "clear",
+]).annotate({ identifier: "V2ThreadStartParams__ThreadStartSource" });
+
+export type V2ThreadStartParams__ThreadSource = string;
+export const V2ThreadStartParams__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadStartParams__ThreadSource",
});
-export type ClientRequest__ContentItem =
- | { readonly text: string; readonly type: "input_text" }
- | {
- readonly detail?: ClientRequest__ImageDetail | null;
- readonly image_url: string;
- readonly type: "input_image";
- }
- | { readonly audio_url: string; readonly type: "input_audio" }
- | { readonly text: string; readonly type: "output_text" };
-export const ClientRequest__ContentItem = Schema.Union(
+export type V2ThreadStartParams__DynamicToolNamespaceTool = {
+ readonly deferLoading?: boolean;
+ readonly description: string;
+ readonly inputSchema: Schema.Json;
+ readonly name: string;
+ readonly type: "function";
+};
+export const V2ThreadStartParams__DynamicToolNamespaceTool = Schema.Union(
[
Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("input_text").annotate({ title: "InputTextContentItemType" }),
- }).annotate({ title: "InputTextContentItem" }),
- Schema.Struct({
- detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
- image_url: Schema.String,
- type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }),
- }).annotate({ title: "InputImageContentItem" }),
- Schema.Struct({
- audio_url: Schema.String,
- type: Schema.Literal("input_audio").annotate({ title: "InputAudioContentItemType" }),
- }).annotate({ title: "InputAudioContentItem" }),
- Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }),
- }).annotate({ title: "OutputTextContentItem" }),
+ deferLoading: Schema.optionalKey(Schema.Boolean),
+ description: Schema.String,
+ inputSchema: Schema.Json.annotate({ expected: "JSON value" }),
+ name: Schema.String,
+ type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolNamespaceToolType" }),
+ }).annotate({ title: "FunctionDynamicToolNamespaceTool" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadStartParams__DynamicToolNamespaceTool" });
-export type ClientRequest__FunctionCallOutputContentItem =
- | { readonly text: string; readonly type: "input_text" }
- | {
- readonly detail?: ClientRequest__ImageDetail | null;
- readonly image_url: string;
- readonly type: "input_image";
- }
- | { readonly audio_url: string; readonly type: "input_audio" }
- | { readonly encrypted_content: string; readonly type: "encrypted_content" };
-export const ClientRequest__FunctionCallOutputContentItem = Schema.Union(
+export type V2ThreadStartParams__CapabilityRootLocation = {
+ readonly environmentId: string;
+ readonly path: string;
+ readonly type: "environment";
+};
+export const V2ThreadStartParams__CapabilityRootLocation = Schema.Union(
[
Schema.Struct({
- text: Schema.String,
- type: Schema.Literal("input_text").annotate({
- title: "InputTextFunctionCallOutputContentItemType",
- }),
- }).annotate({ title: "InputTextFunctionCallOutputContentItem" }),
- Schema.Struct({
- detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
- image_url: Schema.String,
- type: Schema.Literal("input_image").annotate({
- title: "InputImageFunctionCallOutputContentItemType",
- }),
- }).annotate({ title: "InputImageFunctionCallOutputContentItem" }),
- Schema.Struct({
- audio_url: Schema.String,
- type: Schema.Literal("input_audio").annotate({
- title: "InputAudioFunctionCallOutputContentItemType",
+ environmentId: Schema.String,
+ path: Schema.String.annotate({
+ description: "Absolute path for the root in the selected environment.",
}),
- }).annotate({ title: "InputAudioFunctionCallOutputContentItem" }),
- Schema.Struct({
- encrypted_content: Schema.String,
- type: Schema.Literal("encrypted_content").annotate({
- title: "EncryptedContentFunctionCallOutputContentItemType",
+ type: Schema.Literal("environment").annotate({
+ title: "EnvironmentCapabilityRootLocationType",
}),
- }).annotate({ title: "EncryptedContentFunctionCallOutputContentItem" }),
+ }).annotate({
+ title: "EnvironmentCapabilityRootLocation",
+ description: "A path owned by an execution environment.",
+ }),
],
{ mode: "oneOf" },
).annotate({
- description:
- "Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.",
+ description: "Location used to resolve a selected capability root.",
+ identifier: "V2ThreadStartParams__CapabilityRootLocation",
});
-export type ClientRequest__InitializeParams = {
- readonly capabilities?: ClientRequest__InitializeCapabilities | null;
- readonly clientInfo: ClientRequest__ClientInfo;
-};
-export const ClientRequest__InitializeParams = Schema.Struct({
- capabilities: Schema.optionalKey(
- Schema.Union([ClientRequest__InitializeCapabilities, Schema.Null]),
- ),
- clientInfo: ClientRequest__ClientInfo,
+export type V2ThreadStartParams__LegacyAppPathString = string;
+export const V2ThreadStartParams__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadStartParams__LegacyAppPathString",
});
-export type ClientRequest__LoginAccountParams =
- | { readonly apiKey: string; readonly type: "apiKey" }
- | {
- readonly appBrand?: ClientRequest__LoginAppBrand | null;
- readonly codexStreamlinedLogin?: boolean;
- readonly type: "chatgpt";
- readonly useHostedLoginSuccessPage?: boolean;
- }
- | { readonly type: "chatgptDeviceCode" }
+export type V2ThreadStartResponse__AskForApproval =
+ | "untrusted"
+ | "on-request"
+ | "never"
| {
- readonly accessToken: string;
- readonly chatgptAccountId: string;
- readonly chatgptPlanType?: string | null;
- readonly type: "chatgptAuthTokens";
- }
- | { readonly apiKey: string; readonly region: string; readonly type: "amazonBedrock" };
-export const ClientRequest__LoginAccountParams = Schema.Union(
+ readonly granular: {
+ readonly mcp_elicitations: boolean;
+ readonly request_permissions?: boolean;
+ readonly rules: boolean;
+ readonly sandbox_approval: boolean;
+ readonly skill_approval?: boolean;
+ };
+ };
+export const V2ThreadStartResponse__AskForApproval = Schema.Union(
[
+ Schema.Literals(["untrusted", "on-request", "never"]),
Schema.Struct({
- apiKey: Schema.String,
- type: Schema.Literal("apiKey").annotate({ title: "ApiKeyLoginAccountParamsType" }),
- }).annotate({ title: "ApiKeyLoginAccountParams" }),
- Schema.Struct({
- appBrand: Schema.optionalKey(Schema.Union([ClientRequest__LoginAppBrand, Schema.Null])),
- codexStreamlinedLogin: Schema.optionalKey(Schema.Boolean),
- type: Schema.Literal("chatgpt").annotate({ title: "ChatgptLoginAccountParamsType" }),
- useHostedLoginSuccessPage: Schema.optionalKey(Schema.Boolean),
- }).annotate({ title: "ChatgptLoginAccountParams" }),
- Schema.Struct({
- type: Schema.Literal("chatgptDeviceCode").annotate({
- title: "ChatgptDeviceCodeLoginAccountParamsType",
- }),
- }).annotate({ title: "ChatgptDeviceCodeLoginAccountParams" }),
- Schema.Struct({
- accessToken: Schema.String.annotate({
- description:
- "Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.",
- }),
- chatgptAccountId: Schema.String.annotate({
- description: "Workspace/account identifier supplied by the client.",
- }),
- chatgptPlanType: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Optional plan type supplied by the client.\n\nWhen `null`, Codex attempts to derive the plan type from access-token claims. If unavailable, the plan defaults to `unknown`.",
- }),
- Schema.Null,
- ]),
- ),
- type: Schema.Literal("chatgptAuthTokens").annotate({
- title: "ChatgptAuthTokensLoginAccountParamsType",
- }),
- }).annotate({
- title: "ChatgptAuthTokensLoginAccountParams",
- description:
- "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE. The access token must contain the same scopes that Codex-managed ChatGPT auth tokens have.",
- }),
- Schema.Struct({
- apiKey: Schema.String,
- region: Schema.String,
- type: Schema.Literal("amazonBedrock").annotate({
- title: "AmazonBedrockLoginAccountParamsType",
+ granular: Schema.Struct({
+ mcp_elicitations: Schema.Boolean,
+ request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
+ rules: Schema.Boolean,
+ sandbox_approval: Schema.Boolean,
+ skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
}),
- }).annotate({
- title: "AmazonBedrockLoginAccountParams",
- description: "[UNSTABLE] Managed Amazon Bedrock login is experimental.",
- }),
+ }).annotate({ title: "GranularAskForApproval" }),
],
{ mode: "oneOf" },
+).annotate({ identifier: "V2ThreadStartResponse__AskForApproval" });
+
+export type V2ThreadStartResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
+export const V2ThreadStartResponse__ApprovalsReviewer = Schema.Literals([
+ "user",
+ "auto_review",
+ "guardian_subagent",
+]).annotate({
+ description:
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
+ identifier: "V2ThreadStartResponse__ApprovalsReviewer",
+});
+
+export type V2ThreadStartResponse__AbsolutePathBuf = string;
+export const V2ThreadStartResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadStartResponse__AbsolutePathBuf",
+});
+
+export type V2ThreadStartResponse__LegacyAppPathString = string;
+export const V2ThreadStartResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadStartResponse__LegacyAppPathString",
+});
+
+export type V2ThreadStartResponse__ReasoningEffort = string;
+export const V2ThreadStartResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadStartResponse__ReasoningEffort",
+ }),
);
-export type ClientRequest__ListMcpServerStatusParams = {
- readonly cursor?: string | null;
- readonly detail?: ClientRequest__McpServerStatusDetail | null;
- readonly limit?: number | null;
- readonly threadId?: string | null;
+export type V2ThreadStartResponse__NetworkAccess = "restricted" | "enabled";
+export const V2ThreadStartResponse__NetworkAccess = Schema.Literals([
+ "restricted",
+ "enabled",
+]).annotate({ identifier: "V2ThreadStartResponse__NetworkAccess" });
+
+export type V2ThreadStartResponse__GitInfo = {
+ readonly branch?: string | null;
+ readonly originUrl?: string | null;
+ readonly sha?: string | null;
};
-export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({
- cursor: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Opaque pagination cursor returned by a previous call.",
- }),
- Schema.Null,
- ]),
- ),
- detail: Schema.optionalKey(
- Schema.Union([ClientRequest__McpServerStatusDetail, Schema.Null]).annotate({
- description:
- "Controls how much MCP inventory data to fetch for each server. Defaults to `Full` when omitted.",
- }),
- ),
- limit: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({
- description: "Optional page size; defaults to a server-defined value.",
- format: "uint32",
- })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+export const V2ThreadStartResponse__GitInfo = Schema.Struct({
+ branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadStartResponse__GitInfo" });
-export type ClientRequest__ConfigEdit = {
- readonly keyPath: string;
- readonly mergeStrategy: ClientRequest__MergeStrategy;
- readonly value: unknown;
+export type V2ThreadStartResponse__ThreadHistoryMode = "legacy" | "paginated";
+export const V2ThreadStartResponse__ThreadHistoryMode = Schema.Literals([
+ "legacy",
+ "paginated",
+]).annotate({ identifier: "V2ThreadStartResponse__ThreadHistoryMode" });
+
+export type V2ThreadStartResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const ClientRequest__ConfigEdit = Schema.Struct({
- keyPath: Schema.String,
- mergeStrategy: ClientRequest__MergeStrategy,
- value: Schema.Unknown,
+export const V2ThreadStartResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadStartResponse__ThreadSectionAppearance",
});
-export type ClientRequest__ConfigValueWriteParams = {
- readonly expectedVersion?: string | null;
- readonly filePath?: string | null;
- readonly keyPath: string;
- readonly mergeStrategy: ClientRequest__MergeStrategy;
- readonly value: unknown;
-};
-export const ClientRequest__ConfigValueWriteParams = Schema.Struct({
- expectedVersion: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- filePath: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Path to the config file to write; defaults to the user's `config.toml` when omitted.",
- }),
- Schema.Null,
- ]),
- ),
- keyPath: Schema.String,
- mergeStrategy: ClientRequest__MergeStrategy,
- value: Schema.Unknown,
+export type V2ThreadStartResponse__AgentPath = string;
+export const V2ThreadStartResponse__AgentPath = Schema.String.annotate({
+ identifier: "V2ThreadStartResponse__AgentPath",
});
-export type ClientRequest__PluginListParams = {
- readonly cwds?: ReadonlyArray | null;
- readonly marketplaceKinds?: ReadonlyArray | null;
-};
-export const ClientRequest__PluginListParams = Schema.Struct({
- cwds: Schema.optionalKey(
- Schema.Union([
- Schema.Array(ClientRequest__AbsolutePathBuf).annotate({
- description:
- "Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.",
- }),
- Schema.Null,
- ]),
- ),
- marketplaceKinds: Schema.optionalKey(
- Schema.Union([
- Schema.Array(ClientRequest__PluginListMarketplaceKind).annotate({
- description:
- "Optional marketplace kind filter. When omitted, only local marketplaces are queried, plus the default remote catalog when enabled by feature flag.",
- }),
- Schema.Null,
- ]),
- ),
+export type V2ThreadStartResponse__ThreadId = string;
+export const V2ThreadStartResponse__ThreadId = Schema.String.annotate({
+ identifier: "V2ThreadStartResponse__ThreadId",
});
-export type ClientRequest__PluginShareTarget = {
- readonly principalId: string;
- readonly principalType: ClientRequest__PluginSharePrincipalType;
- readonly role: ClientRequest__PluginShareTargetRole;
-};
-export const ClientRequest__PluginShareTarget = Schema.Struct({
- principalId: Schema.String,
- principalType: ClientRequest__PluginSharePrincipalType,
- role: ClientRequest__PluginShareTargetRole,
+export type V2ThreadStartResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
+export const V2ThreadStartResponse__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "V2ThreadStartResponse__ThreadActiveFlag" });
+
+export type V2ThreadStartResponse__ThreadSource = string;
+export const V2ThreadStartResponse__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadStartResponse__ThreadSource",
});
-export type ClientRequest__Settings = {
- readonly developer_instructions?: string | null;
- readonly model: string;
- readonly reasoning_effort?: ClientRequest__ReasoningEffort | null;
-};
-export const ClientRequest__Settings = Schema.Struct({
- developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- model: Schema.String,
- reasoning_effort: Schema.optionalKey(Schema.Union([ClientRequest__ReasoningEffort, Schema.Null])),
-}).annotate({ description: "Settings for a collaboration mode." });
+export type V2ThreadStartResponse__NonSteerableTurnKind = "review" | "compact";
+export const V2ThreadStartResponse__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ThreadStartResponse__NonSteerableTurnKind" });
-export type ClientRequest__ReviewStartParams = {
- readonly delivery?: ClientRequest__ReviewDelivery | null;
- readonly target: ClientRequest__ReviewTarget;
- readonly threadId: string;
+export type V2ThreadStartResponse__MisalignmentSteer = { readonly message: string };
+export const V2ThreadStartResponse__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadStartResponse__MisalignmentSteer" });
+
+export type V2ThreadStartResponse__ByteRange = { readonly end: number; readonly start: number };
+export const V2ThreadStartResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadStartResponse__ByteRange" });
+
+export type V2ThreadStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadStartResponse__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ThreadStartResponse__ImageDetail" });
+
+export type V2ThreadStartResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
};
-export const ClientRequest__ReviewStartParams = Schema.Struct({
- delivery: Schema.optionalKey(
- Schema.Union([ClientRequest__ReviewDelivery, Schema.Null]).annotate({
- description:
- "Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`).",
- }),
- ),
- target: ClientRequest__ReviewTarget,
- threadId: Schema.String,
+export const V2ThreadStartResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadStartResponse__HookPromptFragment" });
+
+export type V2ThreadStartResponse__AgentMessageDelivery = "async";
+export const V2ThreadStartResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ThreadStartResponse__AgentMessageDelivery",
});
-export type ClientRequest__ThreadResumeParams = {
- readonly approvalPolicy?: ClientRequest__AskForApproval | null;
- readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
- readonly baseInstructions?: string | null;
- readonly config?: { readonly [x: string]: unknown } | null;
- readonly cwd?: string | null;
- readonly developerInstructions?: string | null;
- readonly model?: string | null;
- readonly modelProvider?: string | null;
- readonly personality?: ClientRequest__Personality | null;
- readonly sandbox?: ClientRequest__SandboxMode | null;
- readonly serviceTier?: string | null;
- readonly threadId: string;
+export type V2ThreadStartResponse__MemoryCitationEntry = {
+ readonly lineEnd: number;
+ readonly lineStart: number;
+ readonly note: string;
+ readonly path: string;
};
-export const ClientRequest__ThreadResumeParams = Schema.Struct({
- approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])),
- approvalsReviewer: Schema.optionalKey(
- Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
+export const V2ThreadStartResponse__MemoryCitationEntry = Schema.Struct({
+ lineEnd: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ lineStart: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ note: Schema.String,
+ path: Schema.String,
+}).annotate({ identifier: "V2ThreadStartResponse__MemoryCitationEntry" });
+
+export type V2ThreadStartResponse__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadStartResponse__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
description:
- "Override where approval requests are routed for review on this thread and subsequent turns.",
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
}),
- ),
- baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- config: Schema.optionalKey(
- Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
- ),
- cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- model: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Configuration overrides for the resumed thread, if any.",
- }),
- Schema.Null,
- ]),
- ),
- modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- personality: Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])),
- sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])),
- serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- threadId: Schema.String,
-}).annotate({
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
description:
- "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nFor non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.\n\nIf thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
+ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadStartResponse__MessagePhase",
});
-export type ClientRequest__MigrationDetails = {
- readonly commands?: ReadonlyArray;
- readonly hooks?: ReadonlyArray;
- readonly mcpServers?: ReadonlyArray;
- readonly memory?: ReadonlyArray;
- readonly plugins?: ReadonlyArray;
- readonly sessions?: ReadonlyArray;
- readonly skills?: ReadonlyArray;
- readonly subagents?: ReadonlyArray;
+export type V2ThreadStartResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
};
-export const ClientRequest__MigrationDetails = Schema.Struct({
- commands: Schema.optionalKey(
- Schema.Array(ClientRequest__CommandMigration).annotate({ default: [] }),
- ),
- hooks: Schema.optionalKey(Schema.Array(ClientRequest__HookMigration).annotate({ default: [] })),
- mcpServers: Schema.optionalKey(
- Schema.Array(ClientRequest__McpServerMigration).annotate({ default: [] }),
- ),
- memory: Schema.optionalKey(Schema.Array(Schema.String)),
- plugins: Schema.optionalKey(
- Schema.Array(ClientRequest__PluginsMigration).annotate({ default: [] }),
- ),
- sessions: Schema.optionalKey(
- Schema.Array(ClientRequest__SessionMigration).annotate({ default: [] }),
- ),
- skills: Schema.optionalKey(Schema.Array(ClientRequest__SkillMigration).annotate({ default: [] })),
- subagents: Schema.optionalKey(
- Schema.Array(ClientRequest__SubagentMigration).annotate({ default: [] }),
- ),
-});
+export const V2ThreadStartResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadStartResponse__AsyncUserInputQuestion" });
-export type ClientRequest__UserInput =
- | {
- readonly text: string;
- readonly text_elements?: ReadonlyArray;
- readonly type: "text";
- }
- | {
- readonly detail?: ClientRequest__ImageDetail | null;
- readonly type: "image";
- readonly url: string;
- }
- | {
- readonly detail?: ClientRequest__ImageDetail | null;
- readonly path: string;
- readonly type: "localImage";
- }
- | { readonly type: "audio"; readonly url: string }
- | { readonly path: string; readonly type: "localAudio" }
- | { readonly name: string; readonly path: string; readonly type: "skill" }
- | { readonly name: string; readonly path: string; readonly type: "mention" };
-export const ClientRequest__UserInput = Schema.Union(
+export type V2ThreadStartResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadStartResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadStartResponse__CommandExecutionSource" });
+
+export type V2ThreadStartResponse__CommandExecutionStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadStartResponse__CommandExecutionStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadStartResponse__CommandExecutionStatus" });
+
+export type V2ThreadStartResponse__PatchChangeKind =
+ | { readonly type: "add" }
+ | { readonly type: "delete" }
+ | { readonly move_path?: string | null; readonly type: "update" };
+export const V2ThreadStartResponse__PatchChangeKind = Schema.Union(
[
Schema.Struct({
- text: Schema.String,
- text_elements: Schema.optionalKey(
- Schema.Array(ClientRequest__TextElement).annotate({
- description: "UI-defined spans within `text` used to render or persist special elements.",
- default: [],
- }),
- ),
- type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
- }).annotate({ title: "TextUserInput" }),
- Schema.Struct({
- detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
- type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
- url: Schema.String,
- }).annotate({ title: "ImageUserInput" }),
- Schema.Struct({
- detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
- path: Schema.String,
- type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
- }).annotate({ title: "LocalImageUserInput" }),
- Schema.Struct({
- type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
- url: Schema.String,
- }).annotate({ title: "AudioUserInput" }),
- Schema.Struct({
- path: Schema.String,
- type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
- }).annotate({ title: "LocalAudioUserInput" }),
+ type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
+ }).annotate({ title: "AddPatchChangeKind" }),
Schema.Struct({
- name: Schema.String,
- path: Schema.String,
- type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
- }).annotate({ title: "SkillUserInput" }),
+ type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
+ }).annotate({ title: "DeletePatchChangeKind" }),
Schema.Struct({
- name: Schema.String,
- path: Schema.String,
- type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
- }).annotate({ title: "MentionUserInput" }),
+ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
+ }).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadStartResponse__PatchChangeKind" });
-export type ClientRequest__ThreadGoalSetParams = {
- readonly objective?: string | null;
- readonly status?: ClientRequest__ThreadGoalStatus | null;
- readonly threadId: string;
- readonly tokenBudget?: number | null;
-};
-export const ClientRequest__ThreadGoalSetParams = Schema.Struct({
- objective: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- status: Schema.optionalKey(Schema.Union([ClientRequest__ThreadGoalStatus, Schema.Null])),
- threadId: Schema.String,
- tokenBudget: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
- ),
-});
+export type V2ThreadStartResponse__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadStartResponse__PatchApplyStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadStartResponse__PatchApplyStatus" });
-export type ClientRequest__ThreadMetadataUpdateParams = {
- readonly gitInfo?: ClientRequest__ThreadMetadataGitInfoUpdateParams | null;
- readonly threadId: string;
+export type V2ThreadStartResponse__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
};
-export const ClientRequest__ThreadMetadataUpdateParams = Schema.Struct({
- gitInfo: Schema.optionalKey(
- Schema.Union([ClientRequest__ThreadMetadataGitInfoUpdateParams, Schema.Null]).annotate({
- description:
- "Patch the stored Git metadata for this thread. Omit a field to leave it unchanged, set it to `null` to clear it, or provide a string to replace the stored value.",
- }),
- ),
- threadId: Schema.String,
-});
+export const V2ThreadStartResponse__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadStartResponse__McpToolCallAppContext" });
-export type ClientRequest__ThreadForkParams = {
- readonly approvalPolicy?: ClientRequest__AskForApproval | null;
- readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
- readonly baseInstructions?: string | null;
- readonly config?: { readonly [x: string]: unknown } | null;
- readonly cwd?: string | null;
- readonly developerInstructions?: string | null;
- readonly ephemeral?: boolean;
- readonly lastTurnId?: string | null;
- readonly model?: string | null;
- readonly modelProvider?: string | null;
- readonly sandbox?: ClientRequest__SandboxMode | null;
- readonly serviceTier?: string | null;
- readonly threadId: string;
- readonly threadSource?: ClientRequest__ThreadSource | null;
+export type V2ThreadStartResponse__McpToolCallError = { readonly message: string };
+export const V2ThreadStartResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadStartResponse__McpToolCallError" });
+
+export type V2ThreadStartResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadStartResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadStartResponse__McpAppDisplayMode" });
+
+export type V2ThreadStartResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
};
-export const ClientRequest__ThreadForkParams = Schema.Struct({
- approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])),
- approvalsReviewer: Schema.optionalKey(
- Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
- description:
- "Override where approval requests are routed for review on this thread and subsequent turns.",
- }),
- ),
- baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- config: Schema.optionalKey(
- Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
- ),
- cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- ephemeral: Schema.optionalKey(Schema.Boolean),
- lastTurnId: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Optional last turn id to fork through, inclusive.\n\nWhen specified, turns after `last_turn_id` are omitted from the fork. The referenced turn cannot be in progress.",
- }),
- Schema.Null,
- ]),
- ),
- model: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Configuration overrides for the forked thread, if any.",
+export const V2ThreadStartResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadStartResponse__McpToolCallResult" });
+
+export type V2ThreadStartResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadStartResponse__McpToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadStartResponse__McpToolCallStatus" });
+
+export type V2ThreadStartResponse__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ThreadStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
}),
- Schema.Null,
- ]),
- ),
- modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])),
- serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- threadId: Schema.String,
- threadSource: Schema.optionalKey(
- Schema.Union([ClientRequest__ThreadSource, Schema.Null]).annotate({
- description:
- "Optional client-supplied analytics source classification for this forked thread.",
- }),
- ),
-}).annotate({
- description:
- "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
-});
-
-export type ClientRequest__ThreadListParams = {
- readonly archived?: boolean | null;
- readonly cursor?: string | null;
- readonly cwd?: ClientRequest__ThreadListCwdFilter | null;
- readonly limit?: number | null;
- readonly modelProviders?: ReadonlyArray | null;
- readonly searchTerm?: string | null;
- readonly sortDirection?: ClientRequest__SortDirection | null;
- readonly sortKey?: ClientRequest__ThreadSortKey | null;
- readonly sourceKinds?: ReadonlyArray | null;
- readonly useStateDbOnly?: boolean;
-};
-export const ClientRequest__ThreadListParams = Schema.Struct({
- archived: Schema.optionalKey(
- Schema.Union([
- Schema.Boolean.annotate({
- description:
- "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.",
- }),
- Schema.Null,
- ]),
- ),
- cursor: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Opaque pagination cursor returned by a previous call.",
- }),
- Schema.Null,
- ]),
- ),
- cwd: Schema.optionalKey(
- Schema.Union([ClientRequest__ThreadListCwdFilter, Schema.Null]).annotate({
- description:
- "Optional cwd filter or filters; when set, only threads whose session cwd exactly matches one of these paths are returned.",
- }),
- ),
- limit: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({
- description: "Optional page size; defaults to a reasonable server-side value.",
- format: "uint32",
- })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- modelProviders: Schema.optionalKey(
- Schema.Union([
- Schema.Array(Schema.String).annotate({
- description:
- "Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.",
- }),
- Schema.Null,
- ]),
- ),
- searchTerm: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional substring filter for the extracted thread title.",
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
}),
- Schema.Null,
- ]),
- ),
- sortDirection: Schema.optionalKey(
- Schema.Union([ClientRequest__SortDirection, Schema.Null]).annotate({
- description: "Optional sort direction; defaults to descending (newest first).",
- }),
- ),
- sortKey: Schema.optionalKey(
- Schema.Union([ClientRequest__ThreadSortKey, Schema.Null]).annotate({
- description: "Optional sort key; defaults to created_at.",
- }),
- ),
- sourceKinds: Schema.optionalKey(
- Schema.Union([
- Schema.Array(ClientRequest__ThreadSourceKind).annotate({
- description:
- "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.",
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
}),
- Schema.Null,
- ]),
- ),
- useStateDbOnly: Schema.optionalKey(
- Schema.Boolean.annotate({
- description:
- "If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.",
- }),
- ),
-});
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadStartResponse__DynamicToolCallOutputContentItem" });
-export type ClientRequest__ThreadStartParams = {
- readonly approvalPolicy?: ClientRequest__AskForApproval | null;
- readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
- readonly baseInstructions?: string | null;
- readonly config?: { readonly [x: string]: unknown } | null;
- readonly cwd?: string | null;
- readonly developerInstructions?: string | null;
- readonly ephemeral?: boolean | null;
- readonly model?: string | null;
- readonly modelProvider?: string | null;
- readonly personality?: ClientRequest__Personality | null;
- readonly sandbox?: ClientRequest__SandboxMode | null;
- readonly serviceName?: string | null;
- readonly serviceTier?: string | null;
- readonly sessionStartSource?: ClientRequest__ThreadStartSource | null;
- readonly threadSource?: ClientRequest__ThreadSource | null;
-};
-export const ClientRequest__ThreadStartParams = Schema.Struct({
- approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])),
- approvalsReviewer: Schema.optionalKey(
- Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
- description:
- "Override where approval requests are routed for review on this thread and subsequent turns.",
- }),
- ),
- baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- config: Schema.optionalKey(
- Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
- ),
- cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- ephemeral: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
- model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- personality: Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])),
- sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])),
- serviceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- sessionStartSource: Schema.optionalKey(
- Schema.Union([ClientRequest__ThreadStartSource, Schema.Null]),
- ),
- threadSource: Schema.optionalKey(
- Schema.Union([ClientRequest__ThreadSource, Schema.Null]).annotate({
- description: "Optional client-supplied analytics source classification for this thread.",
- }),
- ),
-});
+export type V2ThreadStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadStartResponse__DynamicToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadStartResponse__DynamicToolCallStatus" });
-export type ClientRequest__WindowsSandboxSetupStartParams = {
- readonly cwd?: ClientRequest__AbsolutePathBuf | null;
- readonly mode: ClientRequest__WindowsSandboxSetupMode;
-};
-export const ClientRequest__WindowsSandboxSetupStartParams = Schema.Struct({
- cwd: Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])),
- mode: ClientRequest__WindowsSandboxSetupMode,
-});
+export type V2ThreadStartResponse__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ThreadStartResponse__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ThreadStartResponse__CollabAgentStatus" });
-export type CommandExecutionRequestApprovalParams__CommandAction =
- | {
- readonly command: string;
- readonly name: string;
- readonly path: CommandExecutionRequestApprovalParams__AbsolutePathBuf;
- readonly type: "read";
- }
- | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
+export type V2ThreadStartResponse__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "interrupted";
+export const V2ThreadStartResponse__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "interrupted",
+]).annotate({ identifier: "V2ThreadStartResponse__CollabAgentToolCallStatus" });
+
+export type V2ThreadStartResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadStartResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadStartResponse__CollabAgentTool" });
+
+export type V2ThreadStartResponse__SubAgentActivityKind =
+ | "started"
+ | "interacted"
+ | "interrupted"
+ | "completed";
+export const V2ThreadStartResponse__SubAgentActivityKind = Schema.Literals([
+ "started",
+ "interacted",
+ "interrupted",
+ "completed",
+]).annotate({ identifier: "V2ThreadStartResponse__SubAgentActivityKind" });
+
+export type V2ThreadStartResponse__WebSearchAction =
| {
- readonly command: string;
- readonly path?: string | null;
+ readonly queries?: ReadonlyArray | null;
readonly query?: string | null;
readonly type: "search";
}
- | { readonly command: string; readonly type: "unknown" };
-export const CommandExecutionRequestApprovalParams__CommandAction = Schema.Union(
+ | { readonly type: "openPage"; readonly url?: string | null }
+ | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
+ | { readonly type: "other" };
+export const V2ThreadStartResponse__WebSearchAction = Schema.Union(
[
Schema.Struct({
- command: Schema.String,
- name: Schema.String,
- path: CommandExecutionRequestApprovalParams__AbsolutePathBuf,
- type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
- }).annotate({ title: "ReadCommandAction" }),
+ queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
+ }).annotate({ title: "SearchWebSearchAction" }),
Schema.Struct({
- command: Schema.String,
- path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
- }).annotate({ title: "ListFilesCommandAction" }),
+ type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "OpenPageWebSearchAction" }),
Schema.Struct({
- command: Schema.String,
- path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
- }).annotate({ title: "SearchCommandAction" }),
+ pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "FindInPageWebSearchAction" }),
Schema.Struct({
- command: Schema.String,
- type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
- }).annotate({ title: "UnknownCommandAction" }),
+ type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
+ }).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadStartResponse__WebSearchAction" });
-export type CommandExecutionRequestApprovalParams__FileSystemSpecialPath =
- | { readonly kind: "root" }
- | { readonly kind: "minimal" }
- | {
- readonly kind: "project_roots";
- readonly subpath?: CommandExecutionRequestApprovalParams__LegacyAppPathString | null;
- }
- | { readonly kind: "tmpdir" }
- | { readonly kind: "slash_tmp" }
- | {
- readonly kind: "unknown";
- readonly path: string;
- readonly subpath?: CommandExecutionRequestApprovalParams__LegacyAppPathString | null;
- };
-export const CommandExecutionRequestApprovalParams__FileSystemSpecialPath = Schema.Union(
+export type V2ThreadStartResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
+};
+export const V2ThreadStartResponse__ImageGenerationFailure = Schema.Union(
[
- Schema.Struct({ kind: Schema.Literal("root") }).annotate({
- title: "RootFileSystemSpecialPath",
- }),
- Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({
- title: "MinimalFileSystemSpecialPath",
- }),
Schema.Struct({
- kind: Schema.Literal("project_roots"),
- subpath: Schema.optionalKey(
- Schema.Union([CommandExecutionRequestApprovalParams__LegacyAppPathString, Schema.Null]),
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
),
- }).annotate({ title: "KindFileSystemSpecialPath" }),
- Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({
- title: "TmpdirFileSystemSpecialPath",
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
+ }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadStartResponse__ImageGenerationFailure" });
+
+export type V2ThreadStartResponse__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadStartResponse__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
}),
- Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({
- title: "SlashTmpFileSystemSpecialPath",
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
}),
- Schema.Struct({
- kind: Schema.Literal("unknown"),
- path: Schema.String,
- subpath: Schema.optionalKey(
- Schema.Union([CommandExecutionRequestApprovalParams__LegacyAppPathString, Schema.Null]),
- ),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
}),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadStartResponse__TurnItemsView" });
-export type CommandExecutionRequestApprovalParams__NetworkApprovalContext = {
- readonly host: string;
- readonly protocol: CommandExecutionRequestApprovalParams__NetworkApprovalProtocol;
-};
-export const CommandExecutionRequestApprovalParams__NetworkApprovalContext = Schema.Struct({
- host: Schema.String,
- protocol: CommandExecutionRequestApprovalParams__NetworkApprovalProtocol,
-});
+export type V2ThreadStartResponse__TurnStatus =
+ | "completed"
+ | "interrupted"
+ | "failed"
+ | "inProgress";
+export const V2ThreadStartResponse__TurnStatus = Schema.Literals([
+ "completed",
+ "interrupted",
+ "failed",
+ "inProgress",
+]).annotate({ identifier: "V2ThreadStartResponse__TurnStatus" });
-export type CommandExecutionRequestApprovalParams__NetworkPolicyAmendment = {
- readonly action: CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction;
- readonly host: string;
-};
-export const CommandExecutionRequestApprovalParams__NetworkPolicyAmendment = Schema.Struct({
- action: CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction,
- host: Schema.String,
-});
+export type V2ThreadStatusChangedNotification__ThreadActiveFlag =
+ | "waitingOnApproval"
+ | "waitingOnUserInput";
+export const V2ThreadStatusChangedNotification__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "V2ThreadStatusChangedNotification__ThreadActiveFlag" });
-export type CommandExecutionRequestApprovalResponse__NetworkPolicyAmendment = {
- readonly action: CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction;
- readonly host: string;
+export type V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = {
+ readonly cacheWriteInputTokens?: number;
+ readonly cachedInputTokens: number;
+ readonly inputTokens: number;
+ readonly outputTokens: number;
+ readonly reasoningOutputTokens: number;
+ readonly totalTokens: number;
};
-export const CommandExecutionRequestApprovalResponse__NetworkPolicyAmendment = Schema.Struct({
- action: CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction,
- host: Schema.String,
+export const V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = Schema.Struct({
+ cacheWriteInputTokens: Schema.optionalKey(
+ Schema.Number.annotate({ default: 0, format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ ),
+ cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ inputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ outputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ totalTokens: Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+}).annotate({ identifier: "V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown" });
+
+export type V2ThreadTurnsListParams__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadTurnsListParams__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadTurnsListParams__TurnItemsView" });
+
+export type V2ThreadTurnsListParams__SortDirection = "asc" | "desc";
+export const V2ThreadTurnsListParams__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
+ identifier: "V2ThreadTurnsListParams__SortDirection",
});
-export type ExecCommandApprovalResponse__NetworkPolicyAmendment = {
- readonly action: ExecCommandApprovalResponse__NetworkPolicyRuleAction;
- readonly host: string;
+export type V2ThreadTurnsListResponse__NonSteerableTurnKind = "review" | "compact";
+export const V2ThreadTurnsListResponse__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__NonSteerableTurnKind" });
+
+export type V2ThreadTurnsListResponse__MisalignmentSteer = { readonly message: string };
+export const V2ThreadTurnsListResponse__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadTurnsListResponse__MisalignmentSteer" });
+
+export type V2ThreadTurnsListResponse__ByteRange = { readonly end: number; readonly start: number };
+export const V2ThreadTurnsListResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadTurnsListResponse__ByteRange" });
+
+export type V2ThreadTurnsListResponse__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadTurnsListResponse__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__ImageDetail" });
+
+export type V2ThreadTurnsListResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
};
-export const ExecCommandApprovalResponse__NetworkPolicyAmendment = Schema.Struct({
- action: ExecCommandApprovalResponse__NetworkPolicyRuleAction,
- host: Schema.String,
+export const V2ThreadTurnsListResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadTurnsListResponse__HookPromptFragment" });
+
+export type V2ThreadTurnsListResponse__AgentMessageDelivery = "async";
+export const V2ThreadTurnsListResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ThreadTurnsListResponse__AgentMessageDelivery",
});
-export type FuzzyFileSearchResponse__FuzzyFileSearchResult = {
- readonly file_name: string;
- readonly indices?: ReadonlyArray | null;
- readonly match_type: FuzzyFileSearchResponse__FuzzyFileSearchMatchType;
+export type V2ThreadTurnsListResponse__MemoryCitationEntry = {
+ readonly lineEnd: number;
+ readonly lineStart: number;
+ readonly note: string;
readonly path: string;
- readonly root: string;
- readonly score: number;
};
-export const FuzzyFileSearchResponse__FuzzyFileSearchResult = Schema.Struct({
- file_name: Schema.String,
- indices: Schema.optionalKey(
- Schema.Union([
- Schema.Array(
- Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- ),
- Schema.Null,
- ]),
- ),
- match_type: FuzzyFileSearchResponse__FuzzyFileSearchMatchType,
+export const V2ThreadTurnsListResponse__MemoryCitationEntry = Schema.Struct({
+ lineEnd: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ lineStart: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ note: Schema.String,
path: Schema.String,
- root: Schema.String,
- score: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
-}).annotate({ description: "Superset of [`codex_file_search::FileMatch`]" });
+}).annotate({ identifier: "V2ThreadTurnsListResponse__MemoryCitationEntry" });
-export type FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchResult = {
- readonly file_name: string;
- readonly indices?: ReadonlyArray | null;
- readonly match_type: FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType;
- readonly path: string;
- readonly root: string;
- readonly score: number;
-};
-export const FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchResult = Schema.Struct({
- file_name: Schema.String,
- indices: Schema.optionalKey(
- Schema.Union([
- Schema.Array(
- Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- ),
- Schema.Null,
- ]),
- ),
- match_type: FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType,
- path: Schema.String,
- root: Schema.String,
- score: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
-}).annotate({ description: "Superset of [`codex_file_search::FileMatch`]" });
+export type V2ThreadTurnsListResponse__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadTurnsListResponse__MessagePhase = Schema.Union(
+ [
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({
+ description:
+ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadTurnsListResponse__MessagePhase",
+});
-export type JSONRPCMessage__JSONRPCError = {
- readonly error: JSONRPCMessage__JSONRPCErrorError;
- readonly id: JSONRPCMessage__RequestId;
+export type V2ThreadTurnsListResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
};
-export const JSONRPCMessage__JSONRPCError = Schema.Struct({
- error: JSONRPCMessage__JSONRPCErrorError,
- id: JSONRPCMessage__RequestId,
-}).annotate({ description: "A response to a request that indicates an error occurred." });
+export const V2ThreadTurnsListResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadTurnsListResponse__AsyncUserInputQuestion" });
-export type JSONRPCMessage__JSONRPCResponse = {
- readonly id: JSONRPCMessage__RequestId;
- readonly result: unknown;
-};
-export const JSONRPCMessage__JSONRPCResponse = Schema.Struct({
- id: JSONRPCMessage__RequestId,
- result: Schema.Unknown,
-}).annotate({ description: "A successful (non-error) response to a request." });
+export type V2ThreadTurnsListResponse__LegacyAppPathString = string;
+export const V2ThreadTurnsListResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadTurnsListResponse__LegacyAppPathString",
+});
-export type JSONRPCMessage__JSONRPCRequest = {
- readonly id: JSONRPCMessage__RequestId;
- readonly method: string;
- readonly params?: unknown;
- readonly trace?: JSONRPCMessage__W3cTraceContext | null;
-};
-export const JSONRPCMessage__JSONRPCRequest = Schema.Struct({
- id: JSONRPCMessage__RequestId,
- method: Schema.String,
- params: Schema.optionalKey(Schema.Unknown),
- trace: Schema.optionalKey(
- Schema.Union([JSONRPCMessage__W3cTraceContext, Schema.Null]).annotate({
- description: "Optional W3C Trace Context for distributed tracing.",
- }),
- ),
-}).annotate({ description: "A request that expects a response." });
+export type V2ThreadTurnsListResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadTurnsListResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__CommandExecutionSource" });
-export type McpServerElicitationRequestParams__McpElicitationBooleanSchema = {
- readonly default?: boolean | null;
- readonly description?: string | null;
- readonly title?: string | null;
- readonly type: McpServerElicitationRequestParams__McpElicitationBooleanType;
-};
-export const McpServerElicitationRequestParams__McpElicitationBooleanSchema = Schema.Struct({
- default: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: McpServerElicitationRequestParams__McpElicitationBooleanType,
-});
-
-export type McpServerElicitationRequestParams__McpElicitationTitledEnumItems = {
- readonly anyOf: ReadonlyArray;
-};
-export const McpServerElicitationRequestParams__McpElicitationTitledEnumItems = Schema.Struct({
- anyOf: Schema.Array(McpServerElicitationRequestParams__McpElicitationConstOption),
-});
-
-export type McpServerElicitationRequestParams__McpElicitationNumberSchema = {
- readonly default?: number | null;
- readonly description?: string | null;
- readonly maximum?: number | null;
- readonly minimum?: number | null;
- readonly title?: string | null;
- readonly type: McpServerElicitationRequestParams__McpElicitationNumberType;
-};
-export const McpServerElicitationRequestParams__McpElicitationNumberSchema = Schema.Struct({
- default: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
- Schema.Null,
- ]),
- ),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- maximum: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
- Schema.Null,
- ]),
- ),
- minimum: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
- Schema.Null,
- ]),
- ),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: McpServerElicitationRequestParams__McpElicitationNumberType,
-});
-
-export type McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSchema = {
- readonly default?: string | null;
- readonly description?: string | null;
- readonly enum: ReadonlyArray;
- readonly enumNames?: ReadonlyArray | null;
- readonly title?: string | null;
- readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
-};
-export const McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSchema =
- Schema.Struct({
- default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- enum: Schema.Array(Schema.String),
- enumNames: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: McpServerElicitationRequestParams__McpElicitationStringType,
- });
-
-export type McpServerElicitationRequestParams__McpElicitationStringSchema = {
- readonly default?: string | null;
- readonly description?: string | null;
- readonly format?: McpServerElicitationRequestParams__McpElicitationStringFormat | null;
- readonly maxLength?: number | null;
- readonly minLength?: number | null;
- readonly title?: string | null;
- readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
-};
-export const McpServerElicitationRequestParams__McpElicitationStringSchema = Schema.Struct({
- default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- format: Schema.optionalKey(
- Schema.Union([McpServerElicitationRequestParams__McpElicitationStringFormat, Schema.Null]),
- ),
- maxLength: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- minLength: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: McpServerElicitationRequestParams__McpElicitationStringType,
-});
-
-export type McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema = {
- readonly default?: string | null;
- readonly description?: string | null;
- readonly oneOf: ReadonlyArray;
- readonly title?: string | null;
- readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
-};
-export const McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema =
- Schema.Struct({
- default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- oneOf: Schema.Array(McpServerElicitationRequestParams__McpElicitationConstOption),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: McpServerElicitationRequestParams__McpElicitationStringType,
- });
-
-export type McpServerElicitationRequestParams__McpElicitationUntitledEnumItems = {
- readonly enum: ReadonlyArray;
- readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
-};
-export const McpServerElicitationRequestParams__McpElicitationUntitledEnumItems = Schema.Struct({
- enum: Schema.Array(Schema.String),
- type: McpServerElicitationRequestParams__McpElicitationStringType,
-});
-
-export type McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema = {
- readonly default?: string | null;
- readonly description?: string | null;
- readonly enum: ReadonlyArray;
- readonly title?: string | null;
- readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
-};
-export const McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema =
- Schema.Struct({
- default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- enum: Schema.Array(Schema.String),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: McpServerElicitationRequestParams__McpElicitationStringType,
- });
+export type V2ThreadTurnsListResponse__CommandExecutionStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadTurnsListResponse__CommandExecutionStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__CommandExecutionStatus" });
-export type PermissionsRequestApprovalParams__FileSystemSpecialPath =
- | { readonly kind: "root" }
- | { readonly kind: "minimal" }
- | {
- readonly kind: "project_roots";
- readonly subpath?: PermissionsRequestApprovalParams__LegacyAppPathString | null;
- }
- | { readonly kind: "tmpdir" }
- | { readonly kind: "slash_tmp" }
- | {
- readonly kind: "unknown";
- readonly path: string;
- readonly subpath?: PermissionsRequestApprovalParams__LegacyAppPathString | null;
- };
-export const PermissionsRequestApprovalParams__FileSystemSpecialPath = Schema.Union(
+export type V2ThreadTurnsListResponse__PatchChangeKind =
+ | { readonly type: "add" }
+ | { readonly type: "delete" }
+ | { readonly move_path?: string | null; readonly type: "update" };
+export const V2ThreadTurnsListResponse__PatchChangeKind = Schema.Union(
[
- Schema.Struct({ kind: Schema.Literal("root") }).annotate({
- title: "RootFileSystemSpecialPath",
- }),
- Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({
- title: "MinimalFileSystemSpecialPath",
- }),
Schema.Struct({
- kind: Schema.Literal("project_roots"),
- subpath: Schema.optionalKey(
- Schema.Union([PermissionsRequestApprovalParams__LegacyAppPathString, Schema.Null]),
- ),
- }).annotate({ title: "KindFileSystemSpecialPath" }),
- Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({
- title: "TmpdirFileSystemSpecialPath",
- }),
- Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({
- title: "SlashTmpFileSystemSpecialPath",
- }),
+ type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
+ }).annotate({ title: "AddPatchChangeKind" }),
Schema.Struct({
- kind: Schema.Literal("unknown"),
- path: Schema.String,
- subpath: Schema.optionalKey(
- Schema.Union([PermissionsRequestApprovalParams__LegacyAppPathString, Schema.Null]),
- ),
- }),
+ type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
+ }).annotate({ title: "DeletePatchChangeKind" }),
+ Schema.Struct({
+ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
+ }).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadTurnsListResponse__PatchChangeKind" });
-export type PermissionsRequestApprovalResponse__FileSystemSpecialPath =
- | { readonly kind: "root" }
- | { readonly kind: "minimal" }
- | {
- readonly kind: "project_roots";
- readonly subpath?: PermissionsRequestApprovalResponse__LegacyAppPathString | null;
- }
- | { readonly kind: "tmpdir" }
- | { readonly kind: "slash_tmp" }
- | {
- readonly kind: "unknown";
- readonly path: string;
- readonly subpath?: PermissionsRequestApprovalResponse__LegacyAppPathString | null;
- };
-export const PermissionsRequestApprovalResponse__FileSystemSpecialPath = Schema.Union(
+export type V2ThreadTurnsListResponse__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadTurnsListResponse__PatchApplyStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__PatchApplyStatus" });
+
+export type V2ThreadTurnsListResponse__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
+};
+export const V2ThreadTurnsListResponse__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadTurnsListResponse__McpToolCallAppContext" });
+
+export type V2ThreadTurnsListResponse__McpToolCallError = { readonly message: string };
+export const V2ThreadTurnsListResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadTurnsListResponse__McpToolCallError" });
+
+export type V2ThreadTurnsListResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadTurnsListResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__McpAppDisplayMode" });
+
+export type V2ThreadTurnsListResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
+};
+export const V2ThreadTurnsListResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadTurnsListResponse__McpToolCallResult" });
+
+export type V2ThreadTurnsListResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadTurnsListResponse__McpToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__McpToolCallStatus" });
+
+export type V2ThreadTurnsListResponse__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ThreadTurnsListResponse__DynamicToolCallOutputContentItem = Schema.Union(
[
- Schema.Struct({ kind: Schema.Literal("root") }).annotate({
- title: "RootFileSystemSpecialPath",
- }),
- Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({
- title: "MinimalFileSystemSpecialPath",
- }),
Schema.Struct({
- kind: Schema.Literal("project_roots"),
- subpath: Schema.optionalKey(
- Schema.Union([PermissionsRequestApprovalResponse__LegacyAppPathString, Schema.Null]),
- ),
- }).annotate({ title: "KindFileSystemSpecialPath" }),
- Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({
- title: "TmpdirFileSystemSpecialPath",
- }),
- Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({
- title: "SlashTmpFileSystemSpecialPath",
- }),
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
Schema.Struct({
- kind: Schema.Literal("unknown"),
- path: Schema.String,
- subpath: Schema.optionalKey(
- Schema.Union([PermissionsRequestApprovalResponse__LegacyAppPathString, Schema.Null]),
- ),
- }),
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
],
{ mode: "oneOf" },
+).annotate({ identifier: "V2ThreadTurnsListResponse__DynamicToolCallOutputContentItem" });
+
+export type V2ThreadTurnsListResponse__DynamicToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed";
+export const V2ThreadTurnsListResponse__DynamicToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__DynamicToolCallStatus" });
+
+export type V2ThreadTurnsListResponse__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ThreadTurnsListResponse__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__CollabAgentStatus" });
+
+export type V2ThreadTurnsListResponse__ReasoningEffort = string;
+export const V2ThreadTurnsListResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadTurnsListResponse__ReasoningEffort",
+ }),
);
-export type ServerNotification__CommandAction =
- | {
- readonly command: string;
- readonly name: string;
- readonly path: ServerNotification__AbsolutePathBuf;
- readonly type: "read";
- }
- | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
+export type V2ThreadTurnsListResponse__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "interrupted";
+export const V2ThreadTurnsListResponse__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "interrupted",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__CollabAgentToolCallStatus" });
+
+export type V2ThreadTurnsListResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadTurnsListResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__CollabAgentTool" });
+
+export type V2ThreadTurnsListResponse__SubAgentActivityKind =
+ | "started"
+ | "interacted"
+ | "interrupted"
+ | "completed";
+export const V2ThreadTurnsListResponse__SubAgentActivityKind = Schema.Literals([
+ "started",
+ "interacted",
+ "interrupted",
+ "completed",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__SubAgentActivityKind" });
+
+export type V2ThreadTurnsListResponse__WebSearchAction =
| {
- readonly command: string;
- readonly path?: string | null;
+ readonly queries?: ReadonlyArray | null;
readonly query?: string | null;
readonly type: "search";
}
- | { readonly command: string; readonly type: "unknown" };
-export const ServerNotification__CommandAction = Schema.Union(
+ | { readonly type: "openPage"; readonly url?: string | null }
+ | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
+ | { readonly type: "other" };
+export const V2ThreadTurnsListResponse__WebSearchAction = Schema.Union(
[
Schema.Struct({
- command: Schema.String,
- name: Schema.String,
- path: ServerNotification__AbsolutePathBuf,
- type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
- }).annotate({ title: "ReadCommandAction" }),
+ queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
+ }).annotate({ title: "SearchWebSearchAction" }),
Schema.Struct({
- command: Schema.String,
- path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
- }).annotate({ title: "ListFilesCommandAction" }),
+ type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "OpenPageWebSearchAction" }),
Schema.Struct({
- command: Schema.String,
- path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
- }).annotate({ title: "SearchCommandAction" }),
+ pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "FindInPageWebSearchAction" }),
Schema.Struct({
- command: Schema.String,
- type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
- }).annotate({ title: "UnknownCommandAction" }),
+ type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
+ }).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadTurnsListResponse__WebSearchAction" });
-export type ServerNotification__FsChangedNotification = {
- readonly changedPaths: ReadonlyArray;
- readonly watchId: string;
+export type V2ThreadTurnsListResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
};
-export const ServerNotification__FsChangedNotification = Schema.Struct({
- changedPaths: Schema.Array(ServerNotification__AbsolutePathBuf).annotate({
- description: "File or directory paths associated with this event.",
- }),
- watchId: Schema.String.annotate({
- description: "Watch identifier previously provided to `fs/watch`.",
- }),
-}).annotate({ description: "Filesystem watch notification emitted for `fs/watch` subscribers." });
-
-export type ServerNotification__SandboxPolicy =
- | { readonly type: "dangerFullAccess" }
- | { readonly networkAccess?: boolean; readonly type: "readOnly" }
- | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
- | {
- readonly excludeSlashTmp?: boolean;
- readonly excludeTmpdirEnvVar?: boolean;
- readonly networkAccess?: boolean;
- readonly type: "workspaceWrite";
- readonly writableRoots?: ReadonlyArray;
- };
-export const ServerNotification__SandboxPolicy = Schema.Union(
+export const V2ThreadTurnsListResponse__ImageGenerationFailure = Schema.Union(
[
Schema.Struct({
- type: Schema.Literal("dangerFullAccess").annotate({
- title: "DangerFullAccessSandboxPolicyType",
- }),
- }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
- Schema.Struct({
- networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
- }).annotate({ title: "ReadOnlySandboxPolicy" }),
- Schema.Struct({
- networkAccess: Schema.optionalKey(
- Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
),
- type: Schema.Literal("externalSandbox").annotate({
- title: "ExternalSandboxSandboxPolicyType",
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
}),
- }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
- Schema.Struct({
- excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
- writableRoots: Schema.optionalKey(
- Schema.Array(ServerNotification__AbsolutePathBuf).annotate({ default: [] }),
- ),
- }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadTurnsListResponse__ImageGenerationFailure" });
-export type ServerNotification__AppMetadata = {
- readonly categories?: ReadonlyArray | null;
- readonly developer?: string | null;
- readonly firstPartyRequiresInstall?: boolean | null;
- readonly firstPartyType?: string | null;
- readonly review?: ServerNotification__AppReview | null;
- readonly screenshots?: ReadonlyArray | null;
- readonly seoDescription?: string | null;
- readonly showInComposerWhenUnlinked?: boolean | null;
- readonly subCategories?: ReadonlyArray | null;
- readonly version?: string | null;
- readonly versionId?: string | null;
- readonly versionNotes?: string | null;
-};
-export const ServerNotification__AppMetadata = Schema.Struct({
- categories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- firstPartyRequiresInstall: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
- firstPartyType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- review: Schema.optionalKey(Schema.Union([ServerNotification__AppReview, Schema.Null])),
- screenshots: Schema.optionalKey(
- Schema.Union([Schema.Array(ServerNotification__AppScreenshot), Schema.Null]),
- ),
- seoDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- showInComposerWhenUnlinked: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
- subCategories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- version: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- versionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- versionNotes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+export type V2ThreadTurnsListResponse__AbsolutePathBuf = string;
+export const V2ThreadTurnsListResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadTurnsListResponse__AbsolutePathBuf",
});
-export type ServerNotification__CollabAgentState = {
- readonly message?: string | null;
- readonly status: ServerNotification__CollabAgentStatus;
-};
-export const ServerNotification__CollabAgentState = Schema.Struct({
- message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- status: ServerNotification__CollabAgentStatus,
-});
+export type V2ThreadTurnsListResponse__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadTurnsListResponse__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadTurnsListResponse__TurnItemsView" });
-export type ServerNotification__ExternalAgentConfigImportItemTypeFailure = {
- readonly cwd?: string | null;
- readonly errorType?: string | null;
- readonly failureStage: string;
- readonly itemType: ServerNotification__ExternalAgentConfigMigrationItemType;
- readonly message: string;
- readonly source?: string | null;
- readonly subErrorType?: string | null;
-};
-export const ServerNotification__ExternalAgentConfigImportItemTypeFailure = Schema.Struct({
- cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- errorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- failureStage: Schema.String,
- itemType: ServerNotification__ExternalAgentConfigMigrationItemType,
- message: Schema.String,
- source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+export type V2ThreadTurnsListResponse__TurnStatus =
+ | "completed"
+ | "interrupted"
+ | "failed"
+ | "inProgress";
+export const V2ThreadTurnsListResponse__TurnStatus = Schema.Literals([
+ "completed",
+ "interrupted",
+ "failed",
+ "inProgress",
+]).annotate({ identifier: "V2ThreadTurnsListResponse__TurnStatus" });
+
+export type V2ThreadUnarchiveResponse__AbsolutePathBuf = string;
+export const V2ThreadUnarchiveResponse__AbsolutePathBuf = Schema.String.annotate({
+ description:
+ "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
+ identifier: "V2ThreadUnarchiveResponse__AbsolutePathBuf",
});
-export type ServerNotification__ExternalAgentConfigImportItemTypeSuccess = {
- readonly cwd?: string | null;
- readonly itemType: ServerNotification__ExternalAgentConfigMigrationItemType;
- readonly source?: string | null;
- readonly target?: string | null;
+export type V2ThreadUnarchiveResponse__GitInfo = {
+ readonly branch?: string | null;
+ readonly originUrl?: string | null;
+ readonly sha?: string | null;
};
-export const ServerNotification__ExternalAgentConfigImportItemTypeSuccess = Schema.Struct({
- cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- itemType: ServerNotification__ExternalAgentConfigMigrationItemType,
- source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+export const V2ThreadUnarchiveResponse__GitInfo = Schema.Struct({
+ branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadUnarchiveResponse__GitInfo" });
-export type ServerNotification__FuzzyFileSearchResult = {
- readonly file_name: string;
- readonly indices?: ReadonlyArray | null;
- readonly match_type: ServerNotification__FuzzyFileSearchMatchType;
- readonly path: string;
- readonly root: string;
- readonly score: number;
-};
-export const ServerNotification__FuzzyFileSearchResult = Schema.Struct({
- file_name: Schema.String,
- indices: Schema.optionalKey(
- Schema.Union([
- Schema.Array(
- Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- ),
- Schema.Null,
- ]),
- ),
- match_type: ServerNotification__FuzzyFileSearchMatchType,
- path: Schema.String,
- root: Schema.String,
- score: Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
-}).annotate({ description: "Superset of [`codex_file_search::FileMatch`]" });
+export type V2ThreadUnarchiveResponse__ThreadHistoryMode = "legacy" | "paginated";
+export const V2ThreadUnarchiveResponse__ThreadHistoryMode = Schema.Literals([
+ "legacy",
+ "paginated",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__ThreadHistoryMode" });
-export type ServerNotification__GuardianApprovalReview = {
- readonly rationale?: string | null;
- readonly riskLevel?: ServerNotification__GuardianRiskLevel | null;
- readonly status: ServerNotification__GuardianApprovalReviewStatus;
- readonly userAuthorization?: ServerNotification__GuardianUserAuthorization | null;
+export type V2ThreadUnarchiveResponse__ReasoningEffort = string;
+export const V2ThreadUnarchiveResponse__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2ThreadUnarchiveResponse__ReasoningEffort",
+ }),
+);
+
+export type V2ThreadUnarchiveResponse__ThreadSectionAppearance = {
+ readonly color?: string | null;
+ readonly icon?: string | null;
};
-export const ServerNotification__GuardianApprovalReview = Schema.Struct({
- rationale: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- riskLevel: Schema.optionalKey(Schema.Union([ServerNotification__GuardianRiskLevel, Schema.Null])),
- status: ServerNotification__GuardianApprovalReviewStatus,
- userAuthorization: Schema.optionalKey(
- Schema.Union([ServerNotification__GuardianUserAuthorization, Schema.Null]),
- ),
+export const V2ThreadUnarchiveResponse__ThreadSectionAppearance = Schema.Struct({
+ color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
}).annotate({
- description:
- "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.",
+ description: "Extensible visual presentation for a custom thread section.",
+ identifier: "V2ThreadUnarchiveResponse__ThreadSectionAppearance",
});
-export type ServerNotification__HookOutputEntry = {
- readonly kind: ServerNotification__HookOutputEntryKind;
- readonly text: string;
-};
-export const ServerNotification__HookOutputEntry = Schema.Struct({
- kind: ServerNotification__HookOutputEntryKind,
- text: Schema.String,
+export type V2ThreadUnarchiveResponse__AgentPath = string;
+export const V2ThreadUnarchiveResponse__AgentPath = Schema.String.annotate({
+ identifier: "V2ThreadUnarchiveResponse__AgentPath",
});
-export type ServerNotification__FileSystemSpecialPath =
- | { readonly kind: "root" }
- | { readonly kind: "minimal" }
- | {
- readonly kind: "project_roots";
- readonly subpath?: ServerNotification__LegacyAppPathString | null;
- }
- | { readonly kind: "tmpdir" }
- | { readonly kind: "slash_tmp" }
- | {
- readonly kind: "unknown";
- readonly path: string;
- readonly subpath?: ServerNotification__LegacyAppPathString | null;
- };
-export const ServerNotification__FileSystemSpecialPath = Schema.Union(
- [
- Schema.Struct({ kind: Schema.Literal("root") }).annotate({
- title: "RootFileSystemSpecialPath",
- }),
- Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({
- title: "MinimalFileSystemSpecialPath",
- }),
- Schema.Struct({
- kind: Schema.Literal("project_roots"),
- subpath: Schema.optionalKey(
- Schema.Union([ServerNotification__LegacyAppPathString, Schema.Null]),
- ),
- }).annotate({ title: "KindFileSystemSpecialPath" }),
- Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({
- title: "TmpdirFileSystemSpecialPath",
- }),
- Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({
- title: "SlashTmpFileSystemSpecialPath",
- }),
- Schema.Struct({
- kind: Schema.Literal("unknown"),
- path: Schema.String,
- subpath: Schema.optionalKey(
- Schema.Union([ServerNotification__LegacyAppPathString, Schema.Null]),
- ),
- }),
- ],
- { mode: "oneOf" },
-);
-
-export type ServerNotification__McpServerStatusUpdatedNotification = {
- readonly error?: string | null;
- readonly failureReason?: ServerNotification__McpServerStartupFailureReason | null;
- readonly name: string;
- readonly status: ServerNotification__McpServerStartupState;
- readonly threadId?: string | null;
-};
-export const ServerNotification__McpServerStatusUpdatedNotification = Schema.Struct({
- error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- failureReason: Schema.optionalKey(
- Schema.Union([ServerNotification__McpServerStartupFailureReason, Schema.Null]),
- ),
- name: Schema.String,
- status: ServerNotification__McpServerStartupState,
- threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+export type V2ThreadUnarchiveResponse__ThreadId = string;
+export const V2ThreadUnarchiveResponse__ThreadId = Schema.String.annotate({
+ identifier: "V2ThreadUnarchiveResponse__ThreadId",
});
-export type ServerNotification__MemoryCitation = {
- readonly entries: ReadonlyArray;
- readonly threadIds: ReadonlyArray;
-};
-export const ServerNotification__MemoryCitation = Schema.Struct({
- entries: Schema.Array(ServerNotification__MemoryCitationEntry),
- threadIds: Schema.Array(Schema.String),
+export type V2ThreadUnarchiveResponse__ThreadActiveFlag =
+ | "waitingOnApproval"
+ | "waitingOnUserInput";
+export const V2ThreadUnarchiveResponse__ThreadActiveFlag = Schema.Literals([
+ "waitingOnApproval",
+ "waitingOnUserInput",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__ThreadActiveFlag" });
+
+export type V2ThreadUnarchiveResponse__ThreadSource = string;
+export const V2ThreadUnarchiveResponse__ThreadSource = Schema.String.annotate({
+ identifier: "V2ThreadUnarchiveResponse__ThreadSource",
});
-export type ServerNotification__ModelReroutedNotification = {
- readonly fromModel: string;
- readonly reason: ServerNotification__ModelRerouteReason;
- readonly threadId: string;
- readonly toModel: string;
- readonly turnId: string;
+export type V2ThreadUnarchiveResponse__NonSteerableTurnKind = "review" | "compact";
+export const V2ThreadUnarchiveResponse__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__NonSteerableTurnKind" });
+
+export type V2ThreadUnarchiveResponse__MisalignmentSteer = { readonly message: string };
+export const V2ThreadUnarchiveResponse__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadUnarchiveResponse__MisalignmentSteer" });
+
+export type V2ThreadUnarchiveResponse__ByteRange = { readonly end: number; readonly start: number };
+export const V2ThreadUnarchiveResponse__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2ThreadUnarchiveResponse__ByteRange" });
+
+export type V2ThreadUnarchiveResponse__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2ThreadUnarchiveResponse__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__ImageDetail" });
+
+export type V2ThreadUnarchiveResponse__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
};
-export const ServerNotification__ModelReroutedNotification = Schema.Struct({
- fromModel: Schema.String,
- reason: ServerNotification__ModelRerouteReason,
- threadId: Schema.String,
- toModel: Schema.String,
- turnId: Schema.String,
+export const V2ThreadUnarchiveResponse__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2ThreadUnarchiveResponse__HookPromptFragment" });
+
+export type V2ThreadUnarchiveResponse__AgentMessageDelivery = "async";
+export const V2ThreadUnarchiveResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2ThreadUnarchiveResponse__AgentMessageDelivery",
});
-export type ServerNotification__ModelVerificationNotification = {
- readonly threadId: string;
- readonly turnId: string;
- readonly verifications: ReadonlyArray;
+export type V2ThreadUnarchiveResponse__MemoryCitationEntry = {
+ readonly lineEnd: number;
+ readonly lineStart: number;
+ readonly note: string;
+ readonly path: string;
};
-export const ServerNotification__ModelVerificationNotification = Schema.Struct({
- threadId: Schema.String,
- turnId: Schema.String,
- verifications: Schema.Array(ServerNotification__ModelVerification),
-});
+export const V2ThreadUnarchiveResponse__MemoryCitationEntry = Schema.Struct({
+ lineEnd: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ lineStart: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ note: Schema.String,
+ path: Schema.String,
+}).annotate({ identifier: "V2ThreadUnarchiveResponse__MemoryCitationEntry" });
-export type ServerNotification__CodexErrorInfo =
- | "contextWindowExceeded"
- | "sessionBudgetExceeded"
- | "usageLimitExceeded"
- | "serverOverloaded"
- | "cyberPolicy"
- | "internalServerError"
- | "unauthorized"
- | "badRequest"
- | "threadRollbackFailed"
- | "sandboxError"
- | "other"
- | { readonly httpConnectionFailed: { readonly httpStatusCode?: number | null } }
- | { readonly responseStreamConnectionFailed: { readonly httpStatusCode?: number | null } }
- | { readonly responseStreamDisconnected: { readonly httpStatusCode?: number | null } }
- | { readonly responseTooManyFailedAttempts: { readonly httpStatusCode?: number | null } }
- | {
- readonly activeTurnNotSteerable: {
- readonly turnKind: ServerNotification__NonSteerableTurnKind;
- };
- };
-export const ServerNotification__CodexErrorInfo = Schema.Union(
+export type V2ThreadUnarchiveResponse__MessagePhase = "commentary" | "final_answer";
+export const V2ThreadUnarchiveResponse__MessagePhase = Schema.Union(
[
- Schema.Literals([
- "contextWindowExceeded",
- "sessionBudgetExceeded",
- "usageLimitExceeded",
- "serverOverloaded",
- "cyberPolicy",
- "internalServerError",
- "unauthorized",
- "badRequest",
- "threadRollbackFailed",
- "sandboxError",
- "other",
- ]),
- Schema.Struct({
- httpConnectionFailed: Schema.Struct({
- httpStatusCode: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint16" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- }),
- }).annotate({ title: "HttpConnectionFailedCodexErrorInfo" }),
- Schema.Struct({
- responseStreamConnectionFailed: Schema.Struct({
- httpStatusCode: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint16" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- }),
- }).annotate({
- title: "ResponseStreamConnectionFailedCodexErrorInfo",
- description: "Failed to connect to the response SSE stream.",
- }),
- Schema.Struct({
- responseStreamDisconnected: Schema.Struct({
- httpStatusCode: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint16" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- }),
- }).annotate({
- title: "ResponseStreamDisconnectedCodexErrorInfo",
+ Schema.Literal("commentary").annotate({
description:
- "The response SSE stream disconnected in the middle of a turn before completion.",
- }),
- Schema.Struct({
- responseTooManyFailedAttempts: Schema.Struct({
- httpStatusCode: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint16" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- }),
- }).annotate({
- title: "ResponseTooManyFailedAttemptsCodexErrorInfo",
- description: "Reached the retry limit for responses.",
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
}),
- Schema.Struct({
- activeTurnNotSteerable: Schema.Struct({ turnKind: ServerNotification__NonSteerableTurnKind }),
- }).annotate({
- title: "ActiveTurnNotSteerableCodexErrorInfo",
- description:
- "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.",
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
}),
],
{ mode: "oneOf" },
).annotate({
description:
- "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.",
+ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2ThreadUnarchiveResponse__MessagePhase",
});
-export type ServerNotification__FileUpdateChange = {
- readonly diff: string;
- readonly kind: ServerNotification__PatchChangeKind;
- readonly path: string;
+export type V2ThreadUnarchiveResponse__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
};
-export const ServerNotification__FileUpdateChange = Schema.Struct({
- diff: Schema.String,
- kind: ServerNotification__PatchChangeKind,
- path: Schema.String,
-});
+export const V2ThreadUnarchiveResponse__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2ThreadUnarchiveResponse__AsyncUserInputQuestion" });
-export type ServerNotification__AccountUpdatedNotification = {
- readonly authMode?: ServerNotification__AuthMode | null;
- readonly planType?: ServerNotification__PlanType | null;
-};
-export const ServerNotification__AccountUpdatedNotification = Schema.Struct({
- authMode: Schema.optionalKey(Schema.Union([ServerNotification__AuthMode, Schema.Null])),
- planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])),
+export type V2ThreadUnarchiveResponse__LegacyAppPathString = string;
+export const V2ThreadUnarchiveResponse__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2ThreadUnarchiveResponse__LegacyAppPathString",
});
-export type ServerNotification__ThreadRealtimeStartedNotification = {
- readonly realtimeSessionId?: string | null;
- readonly threadId: string;
- readonly version: ServerNotification__RealtimeConversationVersion;
-};
-export const ServerNotification__ThreadRealtimeStartedNotification = Schema.Struct({
- realtimeSessionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- threadId: Schema.String,
- version: ServerNotification__RealtimeConversationVersion,
-}).annotate({ description: "EXPERIMENTAL - emitted when thread realtime startup is accepted." });
+export type V2ThreadUnarchiveResponse__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2ThreadUnarchiveResponse__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__CommandExecutionSource" });
-export type ServerNotification__Settings = {
- readonly developer_instructions?: string | null;
- readonly model: string;
- readonly reasoning_effort?: ServerNotification__ReasoningEffort | null;
-};
-export const ServerNotification__Settings = Schema.Struct({
- developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- model: Schema.String,
- reasoning_effort: Schema.optionalKey(
- Schema.Union([ServerNotification__ReasoningEffort, Schema.Null]),
- ),
-}).annotate({ description: "Settings for a collaboration mode." });
+export type V2ThreadUnarchiveResponse__CommandExecutionStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadUnarchiveResponse__CommandExecutionStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__CommandExecutionStatus" });
-export type ServerNotification__RemoteControlStatusChangedNotification = {
- readonly environmentId?: string | null;
- readonly installationId: string;
- readonly serverName: string;
- readonly status: ServerNotification__RemoteControlConnectionStatus;
-};
-export const ServerNotification__RemoteControlStatusChangedNotification = Schema.Struct({
- environmentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- installationId: Schema.String,
- serverName: Schema.String,
- status: ServerNotification__RemoteControlConnectionStatus,
-}).annotate({
- description: "Current remote-control connection status and remote identity exposed to clients.",
-});
+export type V2ThreadUnarchiveResponse__PatchChangeKind =
+ | { readonly type: "add" }
+ | { readonly type: "delete" }
+ | { readonly move_path?: string | null; readonly type: "update" };
+export const V2ThreadUnarchiveResponse__PatchChangeKind = Schema.Union(
+ [
+ Schema.Struct({
+ type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
+ }).annotate({ title: "AddPatchChangeKind" }),
+ Schema.Struct({
+ type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
+ }).annotate({ title: "DeletePatchChangeKind" }),
+ Schema.Struct({
+ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
+ }).annotate({ title: "UpdatePatchChangeKind" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadUnarchiveResponse__PatchChangeKind" });
-export type ServerNotification__ServerRequestResolvedNotification = {
- readonly requestId: ServerNotification__RequestId;
- readonly threadId: string;
+export type V2ThreadUnarchiveResponse__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2ThreadUnarchiveResponse__PatchApplyStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__PatchApplyStatus" });
+
+export type V2ThreadUnarchiveResponse__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
};
-export const ServerNotification__ServerRequestResolvedNotification = Schema.Struct({
- requestId: ServerNotification__RequestId,
- threadId: Schema.String,
-});
+export const V2ThreadUnarchiveResponse__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallAppContext" });
-export type ServerNotification__RateLimitSnapshot = {
- readonly credits?: ServerNotification__CreditsSnapshot | null;
- readonly individualLimit?: ServerNotification__SpendControlLimitSnapshot | null;
- readonly limitId?: string | null;
- readonly limitName?: string | null;
- readonly planType?: ServerNotification__PlanType | null;
- readonly primary?: ServerNotification__RateLimitWindow | null;
- readonly rateLimitReachedType?: ServerNotification__RateLimitReachedType | null;
- readonly secondary?: ServerNotification__RateLimitWindow | null;
- readonly spendControlReached?: boolean | null;
+export type V2ThreadUnarchiveResponse__McpToolCallError = { readonly message: string };
+export const V2ThreadUnarchiveResponse__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallError" });
+
+export type V2ThreadUnarchiveResponse__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2ThreadUnarchiveResponse__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__McpAppDisplayMode" });
+
+export type V2ThreadUnarchiveResponse__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
};
-export const ServerNotification__RateLimitSnapshot = Schema.Struct({
- credits: Schema.optionalKey(Schema.Union([ServerNotification__CreditsSnapshot, Schema.Null])),
- individualLimit: Schema.optionalKey(
- Schema.Union([ServerNotification__SpendControlLimitSnapshot, Schema.Null]),
- ),
- limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])),
- primary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])),
- rateLimitReachedType: Schema.optionalKey(
- Schema.Union([ServerNotification__RateLimitReachedType, Schema.Null]),
- ),
- secondary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])),
- spendControlReached: Schema.optionalKey(
- Schema.Union([
- Schema.Boolean.annotate({
- description:
- "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.",
- }),
- Schema.Null,
- ]),
- ),
-});
+export const V2ThreadUnarchiveResponse__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallResult" });
-export type ServerNotification__UserInput =
- | {
- readonly text: string;
- readonly text_elements?: ReadonlyArray;
- readonly type: "text";
- }
- | {
- readonly detail?: ServerNotification__ImageDetail | null;
- readonly type: "image";
- readonly url: string;
- }
- | {
- readonly detail?: ServerNotification__ImageDetail | null;
- readonly path: string;
- readonly type: "localImage";
- }
- | { readonly type: "audio"; readonly url: string }
- | { readonly path: string; readonly type: "localAudio" }
- | { readonly name: string; readonly path: string; readonly type: "skill" }
- | { readonly name: string; readonly path: string; readonly type: "mention" };
-export const ServerNotification__UserInput = Schema.Union(
+export type V2ThreadUnarchiveResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2ThreadUnarchiveResponse__McpToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallStatus" });
+
+export type V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = Schema.Union(
[
Schema.Struct({
text: Schema.String,
- text_elements: Schema.optionalKey(
- Schema.Array(ServerNotification__TextElement).annotate({
- description: "UI-defined spans within `text` used to render or persist special elements.",
- default: [],
- }),
- ),
- type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
- }).annotate({ title: "TextUserInput" }),
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
Schema.Struct({
- detail: Schema.optionalKey(Schema.Union([ServerNotification__ImageDetail, Schema.Null])),
- type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
- url: Schema.String,
- }).annotate({ title: "ImageUserInput" }),
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
Schema.Struct({
- detail: Schema.optionalKey(Schema.Union([ServerNotification__ImageDetail, Schema.Null])),
- path: Schema.String,
- type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
- }).annotate({ title: "LocalImageUserInput" }),
- Schema.Struct({
- type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
- url: Schema.String,
- }).annotate({ title: "AudioUserInput" }),
- Schema.Struct({
- path: Schema.String,
- type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
- }).annotate({ title: "LocalAudioUserInput" }),
- Schema.Struct({
- name: Schema.String,
- path: Schema.String,
- type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
- }).annotate({ title: "SkillUserInput" }),
- Schema.Struct({
- name: Schema.String,
- path: Schema.String,
- type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
- }).annotate({ title: "MentionUserInput" }),
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem" });
-export type ServerNotification__TextRange = {
- readonly end: ServerNotification__TextPosition;
- readonly start: ServerNotification__TextPosition;
-};
-export const ServerNotification__TextRange = Schema.Struct({
- end: ServerNotification__TextPosition,
- start: ServerNotification__TextPosition,
-});
+export type V2ThreadUnarchiveResponse__DynamicToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed";
+export const V2ThreadUnarchiveResponse__DynamicToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__DynamicToolCallStatus" });
-export type ServerNotification__ThreadStatus =
- | { readonly type: "notLoaded" }
- | { readonly type: "idle" }
- | { readonly type: "systemError" }
+export type V2ThreadUnarchiveResponse__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2ThreadUnarchiveResponse__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__CollabAgentStatus" });
+
+export type V2ThreadUnarchiveResponse__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "interrupted";
+export const V2ThreadUnarchiveResponse__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "interrupted",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__CollabAgentToolCallStatus" });
+
+export type V2ThreadUnarchiveResponse__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2ThreadUnarchiveResponse__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__CollabAgentTool" });
+
+export type V2ThreadUnarchiveResponse__SubAgentActivityKind =
+ | "started"
+ | "interacted"
+ | "interrupted"
+ | "completed";
+export const V2ThreadUnarchiveResponse__SubAgentActivityKind = Schema.Literals([
+ "started",
+ "interacted",
+ "interrupted",
+ "completed",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__SubAgentActivityKind" });
+
+export type V2ThreadUnarchiveResponse__WebSearchAction =
| {
- readonly activeFlags: ReadonlyArray;
- readonly type: "active";
- };
-export const ServerNotification__ThreadStatus = Schema.Union(
+ readonly queries?: ReadonlyArray | null;
+ readonly query?: string | null;
+ readonly type: "search";
+ }
+ | { readonly type: "openPage"; readonly url?: string | null }
+ | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
+ | { readonly type: "other" };
+export const V2ThreadUnarchiveResponse__WebSearchAction = Schema.Union(
[
Schema.Struct({
- type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
- }).annotate({ title: "NotLoadedThreadStatus" }),
+ queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
+ }).annotate({ title: "SearchWebSearchAction" }),
Schema.Struct({
- type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
- }).annotate({ title: "IdleThreadStatus" }),
+ type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "OpenPageWebSearchAction" }),
Schema.Struct({
- type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
- }).annotate({ title: "SystemErrorThreadStatus" }),
+ pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ }).annotate({ title: "FindInPageWebSearchAction" }),
Schema.Struct({
- activeFlags: Schema.Array(ServerNotification__ThreadActiveFlag),
- type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
- }).annotate({ title: "ActiveThreadStatus" }),
+ type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
+ }).annotate({ title: "OtherWebSearchAction" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadUnarchiveResponse__WebSearchAction" });
-export type ServerNotification__ThreadGoal = {
- readonly createdAt: number;
- readonly objective: string;
- readonly status: ServerNotification__ThreadGoalStatus;
- readonly threadId: string;
- readonly timeUsedSeconds: number;
- readonly tokenBudget?: number | null;
- readonly tokensUsed: number;
- readonly updatedAt: number;
+export type V2ThreadUnarchiveResponse__ImageGenerationFailure = {
+ readonly limitId: string;
+ readonly resetsAt?: number | null;
+ readonly type: "usageLimitExceeded";
};
-export const ServerNotification__ThreadGoal = Schema.Struct({
- createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- objective: Schema.String,
- status: ServerNotification__ThreadGoalStatus,
- threadId: Schema.String,
- timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- tokenBudget: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
- ),
- tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
- updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
-});
-
-export type ServerNotification__SubAgentSource =
- | "review"
- | "compact"
- | "memory_consolidation"
- | {
- readonly thread_spawn: {
- readonly agent_nickname?: string | null;
- readonly agent_path?: ServerNotification__AgentPath | null;
- readonly agent_role?: string | null;
- readonly depth: number;
- readonly parent_thread_id: ServerNotification__ThreadId;
- };
- }
- | { readonly other: string };
-export const ServerNotification__SubAgentSource = Schema.Union(
+export const V2ThreadUnarchiveResponse__ImageGenerationFailure = Schema.Union(
[
- Schema.Literals(["review", "compact", "memory_consolidation"]),
Schema.Struct({
- thread_spawn: Schema.Struct({
- agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- agent_path: Schema.optionalKey(Schema.Union([ServerNotification__AgentPath, Schema.Null])),
- agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
- parent_thread_id: ServerNotification__ThreadId,
+ limitId: Schema.String,
+ resetsAt: Schema.optionalKey(
+ Schema.Union([
+ Schema.Number.annotate({ format: "int64" }).check(
+ Schema.isInt().annotate({ expected: "an integer" }),
+ ),
+ Schema.Null,
+ ]),
+ ),
+ type: Schema.Literal("usageLimitExceeded").annotate({
+ title: "UsageLimitExceededImageGenerationFailureType",
}),
- }).annotate({ title: "ThreadSpawnSubAgentSource" }),
- Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
+ }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2ThreadUnarchiveResponse__ImageGenerationFailure" });
-export type ServerNotification__ThreadRealtimeOutputAudioDeltaNotification = {
- readonly audio: ServerNotification__ThreadRealtimeAudioChunk;
- readonly threadId: string;
-};
-export const ServerNotification__ThreadRealtimeOutputAudioDeltaNotification = Schema.Struct({
- audio: ServerNotification__ThreadRealtimeAudioChunk,
- threadId: Schema.String,
-}).annotate({ description: "EXPERIMENTAL - streamed output audio emitted by thread realtime." });
+export type V2ThreadUnarchiveResponse__TurnItemsView = "notLoaded" | "summary" | "full";
+export const V2ThreadUnarchiveResponse__TurnItemsView = Schema.Union(
+ [
+ Schema.Literal("notLoaded").annotate({
+ description: "`items` was not loaded for this turn. The field is intentionally empty.",
+ }),
+ Schema.Literal("summary").annotate({
+ description: "`items` contains only a display summary for this turn.",
+ }),
+ Schema.Literal("full").annotate({
+ description:
+ "`items` contains every ThreadItem available from persisted app-server history for this turn.",
+ }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2ThreadUnarchiveResponse__TurnItemsView" });
-export type ServerNotification__ThreadTokenUsage = {
- readonly last: ServerNotification__TokenUsageBreakdown;
- readonly modelContextWindow?: number | null;
- readonly total: ServerNotification__TokenUsageBreakdown;
+export type V2ThreadUnarchiveResponse__TurnStatus =
+ | "completed"
+ | "interrupted"
+ | "failed"
+ | "inProgress";
+export const V2ThreadUnarchiveResponse__TurnStatus = Schema.Literals([
+ "completed",
+ "interrupted",
+ "failed",
+ "inProgress",
+]).annotate({ identifier: "V2ThreadUnarchiveResponse__TurnStatus" });
+
+export type V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus =
+ | "notLoaded"
+ | "notSubscribed"
+ | "unsubscribed";
+export const V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus = Schema.Literals([
+ "notLoaded",
+ "notSubscribed",
+ "unsubscribed",
+]).annotate({ identifier: "V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus" });
+
+export type V2TurnCompletedNotification__NonSteerableTurnKind = "review" | "compact";
+export const V2TurnCompletedNotification__NonSteerableTurnKind = Schema.Literals([
+ "review",
+ "compact",
+]).annotate({ identifier: "V2TurnCompletedNotification__NonSteerableTurnKind" });
+
+export type V2TurnCompletedNotification__MisalignmentSteer = { readonly message: string };
+export const V2TurnCompletedNotification__MisalignmentSteer = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2TurnCompletedNotification__MisalignmentSteer" });
+
+export type V2TurnCompletedNotification__ByteRange = {
+ readonly end: number;
+ readonly start: number;
};
-export const ServerNotification__ThreadTokenUsage = Schema.Struct({
- last: ServerNotification__TokenUsageBreakdown,
- modelContextWindow: Schema.optionalKey(
- Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
- ),
- total: ServerNotification__TokenUsageBreakdown,
-});
+export const V2TurnCompletedNotification__ByteRange = Schema.Struct({
+ end: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ start: Schema.Number.annotate({ format: "uint" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+}).annotate({ identifier: "V2TurnCompletedNotification__ByteRange" });
-export type ServerNotification__TurnPlanStep = {
- readonly status: ServerNotification__TurnPlanStepStatus;
- readonly step: string;
+export type V2TurnCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
+export const V2TurnCompletedNotification__ImageDetail = Schema.Literals([
+ "auto",
+ "low",
+ "high",
+ "original",
+]).annotate({ identifier: "V2TurnCompletedNotification__ImageDetail" });
+
+export type V2TurnCompletedNotification__HookPromptFragment = {
+ readonly hookRunId: string;
+ readonly text: string;
};
-export const ServerNotification__TurnPlanStep = Schema.Struct({
- status: ServerNotification__TurnPlanStepStatus,
- step: Schema.String,
+export const V2TurnCompletedNotification__HookPromptFragment = Schema.Struct({
+ hookRunId: Schema.String,
+ text: Schema.String,
+}).annotate({ identifier: "V2TurnCompletedNotification__HookPromptFragment" });
+
+export type V2TurnCompletedNotification__AgentMessageDelivery = "async";
+export const V2TurnCompletedNotification__AgentMessageDelivery = Schema.Literal("async").annotate({
+ identifier: "V2TurnCompletedNotification__AgentMessageDelivery",
});
-export type ServerNotification__WindowsSandboxSetupCompletedNotification = {
- readonly error?: string | null;
- readonly mode: ServerNotification__WindowsSandboxSetupMode;
- readonly success: boolean;
+export type V2TurnCompletedNotification__MemoryCitationEntry = {
+ readonly lineEnd: number;
+ readonly lineStart: number;
+ readonly note: string;
+ readonly path: string;
};
-export const ServerNotification__WindowsSandboxSetupCompletedNotification = Schema.Struct({
- error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- mode: ServerNotification__WindowsSandboxSetupMode,
- success: Schema.Boolean,
-});
+export const V2TurnCompletedNotification__MemoryCitationEntry = Schema.Struct({
+ lineEnd: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ lineStart: Schema.Number.annotate({ format: "uint32" })
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
+ .check(
+ Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
+ ),
+ note: Schema.String,
+ path: Schema.String,
+}).annotate({ identifier: "V2TurnCompletedNotification__MemoryCitationEntry" });
-export type ServerRequest__CommandAction =
- | {
- readonly command: string;
- readonly name: string;
- readonly path: ServerRequest__AbsolutePathBuf;
- readonly type: "read";
- }
- | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
- | {
- readonly command: string;
- readonly path?: string | null;
- readonly query?: string | null;
- readonly type: "search";
- }
- | { readonly command: string; readonly type: "unknown" };
-export const ServerRequest__CommandAction = Schema.Union(
+export type V2TurnCompletedNotification__MessagePhase = "commentary" | "final_answer";
+export const V2TurnCompletedNotification__MessagePhase = Schema.Union(
[
- Schema.Struct({
- command: Schema.String,
- name: Schema.String,
- path: ServerRequest__AbsolutePathBuf,
- type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
- }).annotate({ title: "ReadCommandAction" }),
- Schema.Struct({
- command: Schema.String,
- path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
- }).annotate({ title: "ListFilesCommandAction" }),
- Schema.Struct({
- command: Schema.String,
- path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
- }).annotate({ title: "SearchCommandAction" }),
- Schema.Struct({
- command: Schema.String,
- type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
- }).annotate({ title: "UnknownCommandAction" }),
+ Schema.Literal("commentary").annotate({
+ description:
+ "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
+ }),
+ Schema.Literal("final_answer").annotate({
+ description: "The assistant's terminal answer text for the current turn.",
+ }),
],
{ mode: "oneOf" },
-);
+).annotate({
+ description:
+ 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
+ identifier: "V2TurnCompletedNotification__MessagePhase",
+});
-export type ServerRequest__ChatgptAuthTokensRefreshParams = {
- readonly previousAccountId?: string | null;
- readonly reason: ServerRequest__ChatgptAuthTokensRefreshReason;
+export type V2TurnCompletedNotification__AsyncUserInputQuestion = {
+ readonly options?: ReadonlyArray | null;
+ readonly title: string;
};
-export const ServerRequest__ChatgptAuthTokensRefreshParams = Schema.Struct({
- previousAccountId: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "Workspace/account identifier that Codex was previously using.\n\nClients that manage multiple accounts/workspaces can use this as a hint to refresh the token for the correct workspace.\n\nThis may be `null` when the prior auth state did not include a workspace identifier (`chatgpt_account_id`).",
- }),
- Schema.Null,
- ]),
- ),
- reason: ServerRequest__ChatgptAuthTokensRefreshReason,
+export const V2TurnCompletedNotification__AsyncUserInputQuestion = Schema.Struct({
+ options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
+ title: Schema.String,
+}).annotate({ identifier: "V2TurnCompletedNotification__AsyncUserInputQuestion" });
+
+export type V2TurnCompletedNotification__LegacyAppPathString = string;
+export const V2TurnCompletedNotification__LegacyAppPathString = Schema.String.annotate({
+ identifier: "V2TurnCompletedNotification__LegacyAppPathString",
});
-export type ServerRequest__FileSystemSpecialPath =
- | { readonly kind: "root" }
- | { readonly kind: "minimal" }
- | { readonly kind: "project_roots"; readonly subpath?: ServerRequest__LegacyAppPathString | null }
- | { readonly kind: "tmpdir" }
- | { readonly kind: "slash_tmp" }
- | {
- readonly kind: "unknown";
- readonly path: string;
- readonly subpath?: ServerRequest__LegacyAppPathString | null;
- };
-export const ServerRequest__FileSystemSpecialPath = Schema.Union(
+export type V2TurnCompletedNotification__CommandExecutionSource =
+ | "agent"
+ | "userShell"
+ | "unifiedExecStartup"
+ | "unifiedExecInteraction";
+export const V2TurnCompletedNotification__CommandExecutionSource = Schema.Literals([
+ "agent",
+ "userShell",
+ "unifiedExecStartup",
+ "unifiedExecInteraction",
+]).annotate({ identifier: "V2TurnCompletedNotification__CommandExecutionSource" });
+
+export type V2TurnCompletedNotification__CommandExecutionStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2TurnCompletedNotification__CommandExecutionStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2TurnCompletedNotification__CommandExecutionStatus" });
+
+export type V2TurnCompletedNotification__PatchChangeKind =
+ | { readonly type: "add" }
+ | { readonly type: "delete" }
+ | { readonly move_path?: string | null; readonly type: "update" };
+export const V2TurnCompletedNotification__PatchChangeKind = Schema.Union(
[
- Schema.Struct({ kind: Schema.Literal("root") }).annotate({
- title: "RootFileSystemSpecialPath",
- }),
- Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({
- title: "MinimalFileSystemSpecialPath",
- }),
Schema.Struct({
- kind: Schema.Literal("project_roots"),
- subpath: Schema.optionalKey(Schema.Union([ServerRequest__LegacyAppPathString, Schema.Null])),
- }).annotate({ title: "KindFileSystemSpecialPath" }),
- Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({
- title: "TmpdirFileSystemSpecialPath",
- }),
- Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({
- title: "SlashTmpFileSystemSpecialPath",
- }),
+ type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
+ }).annotate({ title: "AddPatchChangeKind" }),
Schema.Struct({
- kind: Schema.Literal("unknown"),
- path: Schema.String,
- subpath: Schema.optionalKey(Schema.Union([ServerRequest__LegacyAppPathString, Schema.Null])),
- }),
+ type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
+ }).annotate({ title: "DeletePatchChangeKind" }),
+ Schema.Struct({
+ move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
+ }).annotate({ title: "UpdatePatchChangeKind" }),
],
{ mode: "oneOf" },
-);
+).annotate({ identifier: "V2TurnCompletedNotification__PatchChangeKind" });
-export type ServerRequest__McpElicitationBooleanSchema = {
- readonly default?: boolean | null;
- readonly description?: string | null;
- readonly title?: string | null;
- readonly type: ServerRequest__McpElicitationBooleanType;
-};
-export const ServerRequest__McpElicitationBooleanSchema = Schema.Struct({
- default: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: ServerRequest__McpElicitationBooleanType,
-});
+export type V2TurnCompletedNotification__PatchApplyStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "declined";
+export const V2TurnCompletedNotification__PatchApplyStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "declined",
+]).annotate({ identifier: "V2TurnCompletedNotification__PatchApplyStatus" });
-export type ServerRequest__McpElicitationTitledEnumItems = {
- readonly anyOf: ReadonlyArray;
+export type V2TurnCompletedNotification__McpToolCallAppContext = {
+ readonly actionName?: string | null;
+ readonly appName?: string | null;
+ readonly connectorId: string;
+ readonly linkId?: string | null;
+ readonly resourceUri?: string | null;
};
-export const ServerRequest__McpElicitationTitledEnumItems = Schema.Struct({
- anyOf: Schema.Array(ServerRequest__McpElicitationConstOption),
-});
+export const V2TurnCompletedNotification__McpToolCallAppContext = Schema.Struct({
+ actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ connectorId: Schema.String,
+ linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+ resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
+}).annotate({ identifier: "V2TurnCompletedNotification__McpToolCallAppContext" });
-export type ServerRequest__McpElicitationNumberSchema = {
- readonly default?: number | null;
- readonly description?: string | null;
- readonly maximum?: number | null;
- readonly minimum?: number | null;
- readonly title?: string | null;
- readonly type: ServerRequest__McpElicitationNumberType;
-};
-export const ServerRequest__McpElicitationNumberSchema = Schema.Struct({
- default: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
- Schema.Null,
- ]),
- ),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- maximum: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
- Schema.Null,
- ]),
- ),
- minimum: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
- Schema.Null,
- ]),
- ),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: ServerRequest__McpElicitationNumberType,
-});
+export type V2TurnCompletedNotification__McpToolCallError = { readonly message: string };
+export const V2TurnCompletedNotification__McpToolCallError = Schema.Struct({
+ message: Schema.String,
+}).annotate({ identifier: "V2TurnCompletedNotification__McpToolCallError" });
-export type ServerRequest__McpElicitationLegacyTitledEnumSchema = {
- readonly default?: string | null;
- readonly description?: string | null;
- readonly enum: ReadonlyArray;
- readonly enumNames?: ReadonlyArray | null;
- readonly title?: string | null;
- readonly type: ServerRequest__McpElicitationStringType;
+export type V2TurnCompletedNotification__McpAppDisplayMode = "inline" | "fullscreen";
+export const V2TurnCompletedNotification__McpAppDisplayMode = Schema.Literals([
+ "inline",
+ "fullscreen",
+]).annotate({ identifier: "V2TurnCompletedNotification__McpAppDisplayMode" });
+
+export type V2TurnCompletedNotification__McpToolCallResult = {
+ readonly _meta?: Schema.Json;
+ readonly content: ReadonlyArray;
+ readonly structuredContent?: Schema.Json;
};
-export const ServerRequest__McpElicitationLegacyTitledEnumSchema = Schema.Struct({
- default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- enum: Schema.Array(Schema.String),
- enumNames: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: ServerRequest__McpElicitationStringType,
-});
+export const V2TurnCompletedNotification__McpToolCallResult = Schema.Struct({
+ _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+ content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
+ structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
+}).annotate({ identifier: "V2TurnCompletedNotification__McpToolCallResult" });
-export type ServerRequest__McpElicitationStringSchema = {
- readonly default?: string | null;
- readonly description?: string | null;
- readonly format?: ServerRequest__McpElicitationStringFormat | null;
- readonly maxLength?: number | null;
- readonly minLength?: number | null;
- readonly title?: string | null;
- readonly type: ServerRequest__McpElicitationStringType;
-};
-export const ServerRequest__McpElicitationStringSchema = Schema.Struct({
- default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- format: Schema.optionalKey(
- Schema.Union([ServerRequest__McpElicitationStringFormat, Schema.Null]),
- ),
- maxLength: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- minLength: Schema.optionalKey(
- Schema.Union([
- Schema.Number.annotate({ format: "uint32" })
- .check(Schema.isInt())
- .check(Schema.isGreaterThanOrEqualTo(0)),
- Schema.Null,
- ]),
- ),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: ServerRequest__McpElicitationStringType,
-});
-
-export type ServerRequest__McpElicitationTitledSingleSelectEnumSchema = {
- readonly default?: string | null;
- readonly description?: string | null;
- readonly oneOf: ReadonlyArray;
- readonly title?: string | null;
- readonly type: ServerRequest__McpElicitationStringType;
-};
-export const ServerRequest__McpElicitationTitledSingleSelectEnumSchema = Schema.Struct({
- default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- oneOf: Schema.Array(ServerRequest__McpElicitationConstOption),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: ServerRequest__McpElicitationStringType,
-});
-
-export type ServerRequest__McpElicitationUntitledEnumItems = {
- readonly enum: ReadonlyArray;
- readonly type: ServerRequest__McpElicitationStringType;
-};
-export const ServerRequest__McpElicitationUntitledEnumItems = Schema.Struct({
- enum: Schema.Array(Schema.String),
- type: ServerRequest__McpElicitationStringType,
-});
-
-export type ServerRequest__McpElicitationUntitledSingleSelectEnumSchema = {
- readonly default?: string | null;
- readonly description?: string | null;
- readonly enum: ReadonlyArray;
- readonly title?: string | null;
- readonly type: ServerRequest__McpElicitationStringType;
-};
-export const ServerRequest__McpElicitationUntitledSingleSelectEnumSchema = Schema.Struct({
- default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- enum: Schema.Array(Schema.String),
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- type: ServerRequest__McpElicitationStringType,
-});
-
-export type ServerRequest__NetworkApprovalContext = {
- readonly host: string;
- readonly protocol: ServerRequest__NetworkApprovalProtocol;
-};
-export const ServerRequest__NetworkApprovalContext = Schema.Struct({
- host: Schema.String,
- protocol: ServerRequest__NetworkApprovalProtocol,
-});
-
-export type ServerRequest__NetworkPolicyAmendment = {
- readonly action: ServerRequest__NetworkPolicyRuleAction;
- readonly host: string;
-};
-export const ServerRequest__NetworkPolicyAmendment = Schema.Struct({
- action: ServerRequest__NetworkPolicyRuleAction,
- host: Schema.String,
-});
+export type V2TurnCompletedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
+export const V2TurnCompletedNotification__McpToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2TurnCompletedNotification__McpToolCallStatus" });
-export type ServerRequest__ApplyPatchApprovalParams = {
- readonly callId: string;
- readonly conversationId: ServerRequest__ThreadId;
- readonly fileChanges: { readonly [x: string]: ServerRequest__FileChange };
- readonly grantRoot?: string | null;
- readonly reason?: string | null;
-};
-export const ServerRequest__ApplyPatchApprovalParams = Schema.Struct({
- callId: Schema.String.annotate({
- description:
- "Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent] and [codex_protocol::protocol::PatchApplyEndEvent].",
- }),
- conversationId: ServerRequest__ThreadId,
- fileChanges: Schema.Record(Schema.String, ServerRequest__FileChange),
- grantRoot: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description:
- "When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).",
+export type V2TurnCompletedNotification__DynamicToolCallOutputContentItem =
+ | { readonly text: string; readonly type: "inputText" }
+ | { readonly imageUrl: string; readonly type: "inputImage" }
+ | { readonly audioUrl: string; readonly type: "inputAudio" };
+export const V2TurnCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union(
+ [
+ Schema.Struct({
+ text: Schema.String,
+ type: Schema.Literal("inputText").annotate({
+ title: "InputTextDynamicToolCallOutputContentItemType",
}),
- Schema.Null,
- ]),
- ),
- reason: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({
- description: "Optional explanatory reason (e.g. request for extra write access).",
+ }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ imageUrl: Schema.String,
+ type: Schema.Literal("inputImage").annotate({
+ title: "InputImageDynamicToolCallOutputContentItemType",
}),
- Schema.Null,
- ]),
- ),
-});
-
-export type ServerRequest__ExecCommandApprovalParams = {
- readonly approvalId?: string | null;
- readonly callId: string;
- readonly command: ReadonlyArray;
- readonly conversationId: ServerRequest__ThreadId;
- readonly cwd: string;
- readonly parsedCmd: ReadonlyArray;
- readonly reason?: string | null;
-};
-export const ServerRequest__ExecCommandApprovalParams = Schema.Struct({
- approvalId: Schema.optionalKey(
- Schema.Union([
- Schema.String.annotate({ description: "Identifier for this specific approval callback." }),
- Schema.Null,
- ]),
- ),
- callId: Schema.String.annotate({
- description:
- "Use to correlate this with [codex_protocol::protocol::ExecCommandBeginEvent] and [codex_protocol::protocol::ExecCommandEndEvent].",
- }),
- command: Schema.Array(Schema.String),
- conversationId: ServerRequest__ThreadId,
- cwd: Schema.String,
- parsedCmd: Schema.Array(ServerRequest__ParsedCommand),
- reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+ }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
+ Schema.Struct({
+ audioUrl: Schema.String,
+ type: Schema.Literal("inputAudio").annotate({
+ title: "InputAudioDynamicToolCallOutputContentItemType",
+ }),
+ }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
+ ],
+ { mode: "oneOf" },
+).annotate({ identifier: "V2TurnCompletedNotification__DynamicToolCallOutputContentItem" });
-export type ServerRequest__ToolRequestUserInputQuestion = {
- readonly header: string;
- readonly id: string;
- readonly isOther?: boolean;
- readonly isSecret?: boolean;
- readonly options?: ReadonlyArray | null;
- readonly question: string;
-};
-export const ServerRequest__ToolRequestUserInputQuestion = Schema.Struct({
- header: Schema.String,
- id: Schema.String,
- isOther: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- isSecret: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- options: Schema.optionalKey(
- Schema.Union([Schema.Array(ServerRequest__ToolRequestUserInputOption), Schema.Null]),
- ),
- question: Schema.String,
-}).annotate({
- description: "EXPERIMENTAL. Represents one request_user_input question and its required options.",
-});
+export type V2TurnCompletedNotification__DynamicToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed";
+export const V2TurnCompletedNotification__DynamicToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+]).annotate({ identifier: "V2TurnCompletedNotification__DynamicToolCallStatus" });
-export type ToolRequestUserInputParams__ToolRequestUserInputQuestion = {
- readonly header: string;
- readonly id: string;
- readonly isOther?: boolean;
- readonly isSecret?: boolean;
- readonly options?: ReadonlyArray | null;
- readonly question: string;
-};
-export const ToolRequestUserInputParams__ToolRequestUserInputQuestion = Schema.Struct({
- header: Schema.String,
- id: Schema.String,
- isOther: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- isSecret: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
- options: Schema.optionalKey(
- Schema.Union([
- Schema.Array(ToolRequestUserInputParams__ToolRequestUserInputOption),
- Schema.Null,
- ]),
- ),
- question: Schema.String,
-}).annotate({
- description: "EXPERIMENTAL. Represents one request_user_input question and its required options.",
-});
+export type V2TurnCompletedNotification__CollabAgentStatus =
+ | "pendingInit"
+ | "running"
+ | "interrupted"
+ | "completed"
+ | "errored"
+ | "shutdown"
+ | "notFound";
+export const V2TurnCompletedNotification__CollabAgentStatus = Schema.Literals([
+ "pendingInit",
+ "running",
+ "interrupted",
+ "completed",
+ "errored",
+ "shutdown",
+ "notFound",
+]).annotate({ identifier: "V2TurnCompletedNotification__CollabAgentStatus" });
-export type V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = {
- readonly credits?: V2AccountRateLimitsUpdatedNotification__CreditsSnapshot | null;
- readonly individualLimit?: V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot | null;
- readonly limitId?: string | null;
- readonly limitName?: string | null;
- readonly planType?: V2AccountRateLimitsUpdatedNotification__PlanType | null;
- readonly primary?: V2AccountRateLimitsUpdatedNotification__RateLimitWindow | null;
- readonly rateLimitReachedType?: V2AccountRateLimitsUpdatedNotification__RateLimitReachedType | null;
- readonly secondary?: V2AccountRateLimitsUpdatedNotification__RateLimitWindow | null;
- readonly spendControlReached?: boolean | null;
-};
-export const V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = Schema.Struct({
- credits: Schema.optionalKey(
- Schema.Union([V2AccountRateLimitsUpdatedNotification__CreditsSnapshot, Schema.Null]),
- ),
- individualLimit: Schema.optionalKey(
- Schema.Union([V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot, Schema.Null]),
- ),
- limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- planType: Schema.optionalKey(
- Schema.Union([V2AccountRateLimitsUpdatedNotification__PlanType, Schema.Null]),
- ),
- primary: Schema.optionalKey(
- Schema.Union([V2AccountRateLimitsUpdatedNotification__RateLimitWindow, Schema.Null]),
- ),
- rateLimitReachedType: Schema.optionalKey(
- Schema.Union([V2AccountRateLimitsUpdatedNotification__RateLimitReachedType, Schema.Null]),
- ),
- secondary: Schema.optionalKey(
- Schema.Union([V2AccountRateLimitsUpdatedNotification__RateLimitWindow, Schema.Null]),
- ),
- spendControlReached: Schema.optionalKey(
- Schema.Union([
- Schema.Boolean.annotate({
- description:
- "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.",
- }),
- Schema.Null,
- ]),
- ),
-});
+export type V2TurnCompletedNotification__ReasoningEffort = string;
+export const V2TurnCompletedNotification__ReasoningEffort = Schema.String.annotate({
+ description: "A non-empty reasoning effort value advertised by the model.",
+}).check(
+ Schema.isMinLength(1).annotate({
+ expected: "a value with a length of at least 1",
+ identifier: "V2TurnCompletedNotification__ReasoningEffort",
+ }),
+);
-export type V2AppListUpdatedNotification__AppMetadata = {
- readonly categories?: ReadonlyArray | null;
- readonly developer?: string | null;
- readonly firstPartyRequiresInstall?: boolean | null;
- readonly firstPartyType?: string | null;
- readonly review?: V2AppListUpdatedNotification__AppReview | null;
- readonly screenshots?: ReadonlyArray | null;
- readonly seoDescription?: string | null;
- readonly showInComposerWhenUnlinked?: boolean | null;
- readonly subCategories?: ReadonlyArray | null;
- readonly version?: string | null;
- readonly versionId?: string | null;
- readonly versionNotes?: string | null;
-};
-export const V2AppListUpdatedNotification__AppMetadata = Schema.Struct({
- categories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- firstPartyRequiresInstall: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
- firstPartyType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- review: Schema.optionalKey(Schema.Union([V2AppListUpdatedNotification__AppReview, Schema.Null])),
- screenshots: Schema.optionalKey(
- Schema.Union([Schema.Array(V2AppListUpdatedNotification__AppScreenshot), Schema.Null]),
- ),
- seoDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- showInComposerWhenUnlinked: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
- subCategories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- version: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- versionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- versionNotes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+export type V2TurnCompletedNotification__CollabAgentToolCallStatus =
+ | "inProgress"
+ | "completed"
+ | "failed"
+ | "interrupted";
+export const V2TurnCompletedNotification__CollabAgentToolCallStatus = Schema.Literals([
+ "inProgress",
+ "completed",
+ "failed",
+ "interrupted",
+]).annotate({ identifier: "V2TurnCompletedNotification__CollabAgentToolCallStatus" });
-export type V2AppsListResponse__AppMetadata = {
- readonly categories?: ReadonlyArray | null;
- readonly developer?: string | null;
- readonly firstPartyRequiresInstall?: boolean | null;
- readonly firstPartyType?: string | null;
- readonly review?: V2AppsListResponse__AppReview | null;
- readonly screenshots?: ReadonlyArray | null;
- readonly seoDescription?: string | null;
- readonly showInComposerWhenUnlinked?: boolean | null;
- readonly subCategories?: ReadonlyArray | null;
- readonly version?: string | null;
- readonly versionId?: string | null;
- readonly versionNotes?: string | null;
-};
-export const V2AppsListResponse__AppMetadata = Schema.Struct({
- categories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- firstPartyRequiresInstall: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
- firstPartyType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- review: Schema.optionalKey(Schema.Union([V2AppsListResponse__AppReview, Schema.Null])),
- screenshots: Schema.optionalKey(
- Schema.Union([Schema.Array(V2AppsListResponse__AppScreenshot), Schema.Null]),
- ),
- seoDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- showInComposerWhenUnlinked: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
- subCategories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
- version: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- versionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- versionNotes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
-});
+export type V2TurnCompletedNotification__CollabAgentTool =
+ | "spawnAgent"
+ | "sendInput"
+ | "resumeAgent"
+ | "wait"
+ | "closeAgent"
+ | "sendMessage"
+ | "followupTask"
+ | "interruptAgent"
+ | "listAgents";
+export const V2TurnCompletedNotification__CollabAgentTool = Schema.Literals([
+ "spawnAgent",
+ "sendInput",
+ "resumeAgent",
+ "wait",
+ "closeAgent",
+ "sendMessage",
+ "followupTask",
+ "interruptAgent",
+ "listAgents",
+]).annotate({ identifier: "V2TurnCompletedNotification__CollabAgentTool" });
-export type V2AppsReadResponse__ConnectorMetadata = {
- readonly description?: string | null;
- readonly iconUrl?: string | null;
- readonly id: string;
- readonly name: string;
- readonly toolSummaries?: ReadonlyArray | null;
-};
-export const V2AppsReadResponse__ConnectorMetadata = Schema.Struct({
- description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- iconUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
- id: Schema.String,
- name: Schema.String,
- toolSummaries: Schema.optionalKey(
- Schema.Union([Schema.Array(V2AppsReadResponse__AppToolSummary), Schema.Null]),
- ),
-}).annotate({ description: "EXPERIMENTAL - metadata returned by app/read." });
+export type V2TurnCompletedNotification__SubAgentActivityKind =
+ | "started"
+ | "interacted"
+ | "interrupted"
+ | "completed";
+export const V2TurnCompletedNotification__SubAgentActivityKind = Schema.Literals([
+ "started",
+ "interacted",
+ "interrupted",
+ "completed",
+]).annotate({ identifier: "V2TurnCompletedNotification__SubAgentActivityKind" });
-export type V2CommandExecParams__SandboxPolicy =
- | { readonly type: "dangerFullAccess" }
- | { readonly networkAccess?: boolean; readonly type: "readOnly" }
- | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
+export type V2TurnCompletedNotification__WebSearchAction =
| {
- readonly excludeSlashTmp?: boolean;
- readonly excludeTmpdirEnvVar?: boolean;
- readonly networkAccess?: boolean;
- readonly type: "workspaceWrite";
- readonly writableRoots?: ReadonlyArray;
- };
-export const V2CommandExecParams__SandboxPolicy = Schema.Union(
+ readonly queries?: ReadonlyArray