@otto-code/protocol 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ export declare const WSPingMessageSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"ping">;
4
+ }, z.core.$strip>;
5
+ export declare const WSPongMessageSchema: z.ZodObject<{
6
+ type: z.ZodLiteral<"pong">;
7
+ }, z.core.$strip>;
8
+ export declare const WSHelloMessageSchema: z.ZodObject<{
9
+ type: z.ZodLiteral<"hello">;
10
+ clientId: z.ZodString;
11
+ clientType: z.ZodEnum<{
12
+ mobile: "mobile";
13
+ browser: "browser";
14
+ cli: "cli";
15
+ mcp: "mcp";
16
+ }>;
17
+ protocolVersion: z.ZodNumber;
18
+ appVersion: z.ZodOptional<z.ZodString>;
19
+ capabilities: z.ZodOptional<z.ZodObject<{
20
+ voice: z.ZodOptional<z.ZodBoolean>;
21
+ pushNotifications: z.ZodOptional<z.ZodBoolean>;
22
+ reasoning_merge_enum: z.ZodOptional<z.ZodBoolean>;
23
+ selective_agent_timeline: z.ZodOptional<z.ZodBoolean>;
24
+ custom_mode_icons: z.ZodOptional<z.ZodBoolean>;
25
+ terminal_reflowable_snapshot: z.ZodOptional<z.ZodBoolean>;
26
+ provider_subagents: z.ZodOptional<z.ZodBoolean>;
27
+ project_updates: z.ZodOptional<z.ZodBoolean>;
28
+ compact_provider_snapshots: z.ZodOptional<z.ZodBoolean>;
29
+ browser_host: z.ZodOptional<z.ZodObject<{
30
+ supportedCommands: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("type" | "fill" | "list_tabs" | "new_tab" | "snapshot" | "click" | "wait" | "keypress" | "navigate" | "back" | "forward" | "reload" | "screenshot" | "upload" | "select" | "hover" | "drag" | "logs" | "evaluate" | "inspect" | "network" | "scroll" | "resize" | "close_tab" | "focus_tab" | "page_text" | "set_color_scheme" | "screenshot_element")[], string[]>>;
31
+ hostKind: z.ZodDefault<z.ZodString>;
32
+ }, z.core.$loose>>;
33
+ }, z.core.$loose>>;
34
+ }, z.core.$strip>;
35
+ export declare const WSRecordingStateMessageSchema: z.ZodObject<{
36
+ type: z.ZodLiteral<"recording_state">;
37
+ isRecording: z.ZodBoolean;
38
+ }, z.core.$strip>;
39
+ //# sourceMappingURL=websocket-control.d.ts.map
@@ -0,0 +1,36 @@
1
+ import { z } from "zod";
2
+ import { CLIENT_CAPS } from "./client-capabilities.js";
3
+ import { BrowserAutomationHostCapabilitySchema } from "./browser-automation/capabilities.js";
4
+ export const WSPingMessageSchema = z.object({
5
+ type: z.literal("ping"),
6
+ });
7
+ export const WSPongMessageSchema = z.object({
8
+ type: z.literal("pong"),
9
+ });
10
+ export const WSHelloMessageSchema = z.object({
11
+ type: z.literal("hello"),
12
+ clientId: z.string().min(1),
13
+ clientType: z.enum(["mobile", "browser", "cli", "mcp"]),
14
+ protocolVersion: z.number().int(),
15
+ appVersion: z.string().optional(),
16
+ capabilities: z
17
+ .object({
18
+ voice: z.boolean().optional(),
19
+ pushNotifications: z.boolean().optional(),
20
+ [CLIENT_CAPS.reasoningMergeEnum]: z.boolean().optional(),
21
+ [CLIENT_CAPS.selectiveAgentTimeline]: z.boolean().optional(),
22
+ [CLIENT_CAPS.customModeIcons]: z.boolean().optional(),
23
+ [CLIENT_CAPS.terminalReflowableSnapshot]: z.boolean().optional(),
24
+ [CLIENT_CAPS.providerSubagents]: z.boolean().optional(),
25
+ [CLIENT_CAPS.projectUpdates]: z.boolean().optional(),
26
+ [CLIENT_CAPS.compactProviderSnapshots]: z.boolean().optional(),
27
+ [CLIENT_CAPS.browserHost]: BrowserAutomationHostCapabilitySchema.optional(),
28
+ })
29
+ .passthrough()
30
+ .optional(),
31
+ });
32
+ export const WSRecordingStateMessageSchema = z.object({
33
+ type: z.literal("recording_state"),
34
+ isRecording: z.boolean(),
35
+ });
36
+ //# sourceMappingURL=websocket-control.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otto-code/protocol",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Otto shared protocol schemas and wire types",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "files": [