Skip to content

HttpEventsRequestSchema

View as Markdown
const HttpEventsRequestSchema: ZodObject<{
ack: ZodOptional<ZodNumber>;
busy: ZodBoolean;
linkId: ZodString;
msgs: ZodArray<ZodObject<{
id: ZodString;
msg: ZodDiscriminatedUnion<[ZodObject<{
agentVersion: ZodString;
machine: ZodObject<..., ...>;
protocol: ZodNumber;
t: ZodLiteral<...>;
transport: ZodEnum<...>;
}, $strip>, ZodDiscriminatedUnion<[ZodObject<..., ...>, ZodObject<..., ...>], "ok">, ZodObject<{
events: ZodArray<...>;
sessionId: ZodString;
t: ZodLiteral<...>;
}, $strip>], "t"> & ZodType<
| {
data: unknown;
id: string;
ok: true;
t: "result";
}
| {
error: {
code: | ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...;
details?: ... | ...;
hint?: ... | ...;
message: string;
requestId?: ... | ...;
retryable: boolean;
};
id: string;
ok: false;
t: "result";
}
| {
events: UncageEvent[];
sessionId: string;
t: "events";
}
| {
args: unknown;
id: string;
runId: string;
sessionId: string;
t: "tool_call";
tool: string;
}
| {
data: string;
id: string;
last: boolean;
path: string;
seq: number;
t: "file_chunk";
}
| {
files: object[];
id: string;
skipped?: ...[];
t: "file_done";
},
| {
agentVersion: string;
machine: {
name: string;
os: string;
runtimes: ...[];
};
protocol: number;
t: "hello";
transport: "ws" | "http";
}
| {
data: unknown;
id: string;
ok: true;
t: "result";
}
| {
error: {
code: | ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...
| ...;
details?: ... | ...;
hint?: ... | ...;
message: string;
requestId?: ... | ...;
retryable: boolean;
};
id: string;
ok: false;
t: "result";
}
| {
events: unknown[];
sessionId: string;
t: "events";
}
| {
args: unknown;
id: string;
runId: string;
sessionId: string;
t: "tool_call";
tool: string;
}
| {
data: string;
id: string;
last: boolean;
path: string;
seq: number;
t: "file_chunk";
}
| {
files: object[];
id: string;
skipped?: ...[];
t: "file_done";
}
| {
at: number;
t: "pong";
}, $ZodTypeInternals<
| {
data: unknown;
id: string;
ok: true;
t: "result";
}
| {
error: {
code: ...;
details?: ...;
hint?: ...;
message: ...;
requestId?: ...;
retryable: ...;
};
id: string;
ok: false;
t: "result";
}
| {
events: ...[];
sessionId: string;
t: "events";
}
| {
args: unknown;
id: string;
runId: string;
sessionId: string;
t: "tool_call";
tool: string;
}
| {
data: string;
id: string;
last: boolean;
path: string;
seq: number;
t: "file_chunk";
}
| {
files: ...[];
id: string;
skipped?: ... | ...;
t: "file_done";
},
| {
agentVersion: string;
machine: {
name: ...;
os: ...;
runtimes: ...;
};
protocol: number;
t: "hello";
transport: ... | ...;
}
| {
data: unknown;
id: string;
ok: true;
t: "result";
}
| {
error: {
code: ...;
details?: ...;
hint?: ...;
message: ...;
requestId?: ...;
retryable: ...;
};
id: string;
ok: false;
t: "result";
}
| {
events: ...[];
sessionId: string;
t: "events";
}
| {
args: unknown;
id: string;
runId: string;
sessionId: string;
t: "tool_call";
tool: string;
}
| {
data: string;
id: string;
last: boolean;
path: string;
seq: number;
t: "file_chunk";
}
| {
files: ...[];
id: string;
skipped?: ... | ...;
t: "file_done";
}
| {
at: number;
t: "pong";
}>>;
}, $strip>>;
}, $strip>;

Defined in: transport.ts:46