@getpaseo/protocol 0.1.104-beta.2 → 0.1.104-beta.4

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.
package/dist/messages.js CHANGED
@@ -2,14 +2,15 @@ import { z } from "zod";
2
2
  import { TerminalActivitySchema } from "./terminal-activity.js";
3
3
  import { CLIENT_CAPS } from "./client-capabilities.js";
4
4
  import { AGENT_LIFECYCLE_STATUSES } from "./agent-lifecycle.js";
5
- import { MAX_EXPLICIT_AGENT_TITLE_CHARS } from "@getpaseo/protocol/agent-title-limits";
6
- import { AgentProviderSchema } from "@getpaseo/protocol/provider-manifest";
7
- import { normalizeAgentModelDefinition, TOOL_CALL_ICON_NAMES } from "./agent-types.js";
5
+ import { MAX_EXPLICIT_AGENT_TITLE_CHARS } from "./agent-title-limits.js";
6
+ import { AgentProviderSchema } from "./provider-manifest.js";
7
+ import { TOOL_CALL_ICON_NAMES } from "./agent-types.js";
8
8
  import { ChatCreateRequestSchema, ChatListRequestSchema, ChatInspectRequestSchema, ChatDeleteRequestSchema, ChatPostRequestSchema, ChatReadRequestSchema, ChatWaitRequestSchema, ChatCreateResponseSchema, ChatListResponseSchema, ChatInspectResponseSchema, ChatDeleteResponseSchema, ChatPostResponseSchema, ChatReadResponseSchema, ChatWaitResponseSchema, } from "./chat/rpc-schemas.js";
9
- import { ScheduleCreateRequestSchema, ScheduleListRequestSchema, ScheduleInspectRequestSchema, ScheduleLogsRequestSchema, SchedulePauseRequestSchema, ScheduleResumeRequestSchema, ScheduleDeleteRequestSchema, ScheduleRunOnceRequestSchema, ScheduleUpdateRequestSchema, ScheduleCreateResponseSchema, ScheduleListResponseSchema, ScheduleInspectResponseSchema, ScheduleLogsResponseSchema, SchedulePauseResponseSchema, ScheduleResumeResponseSchema, ScheduleDeleteResponseSchema, ScheduleRunOnceResponseSchema, ScheduleUpdateResponseSchema, } from "@getpaseo/protocol/schedule/rpc-schemas";
10
- import { LoopRunRequestSchema, LoopListRequestSchema, LoopInspectRequestSchema, LoopLogsRequestSchema, LoopStopRequestSchema, LoopRunResponseSchema, LoopListResponseSchema, LoopInspectResponseSchema, LoopLogsResponseSchema, LoopStopResponseSchema, } from "@getpaseo/protocol/loop/rpc-schemas";
9
+ import { ScheduleCreateRequestSchema, ScheduleListRequestSchema, ScheduleInspectRequestSchema, ScheduleLogsRequestSchema, SchedulePauseRequestSchema, ScheduleResumeRequestSchema, ScheduleDeleteRequestSchema, ScheduleRunOnceRequestSchema, ScheduleUpdateRequestSchema, ScheduleCreateResponseSchema, ScheduleListResponseSchema, ScheduleInspectResponseSchema, ScheduleLogsResponseSchema, SchedulePauseResponseSchema, ScheduleResumeResponseSchema, ScheduleDeleteResponseSchema, ScheduleRunOnceResponseSchema, ScheduleUpdateResponseSchema, } from "./schedule/rpc-schemas.js";
10
+ import { LoopRunRequestSchema, LoopListRequestSchema, LoopInspectRequestSchema, LoopLogsRequestSchema, LoopStopRequestSchema, LoopRunResponseSchema, LoopListResponseSchema, LoopInspectResponseSchema, LoopLogsResponseSchema, LoopStopResponseSchema, } from "./loop/rpc-schemas.js";
11
11
  import { BrowserAutomationExecuteRequestSchema, BrowserAutomationExecuteResponseSchema, } from "./browser-automation/rpc-schemas.js";
12
- import { PaseoConfigRawSchema, PaseoLifecycleCommandRawSchema, PaseoMetadataGenerationEntrySchema, PaseoMetadataGenerationSchema, PaseoScriptEntryRawSchema, PaseoWorktreeConfigRawSchema, PaseoConfigRevisionSchema, ProjectConfigRpcErrorSchema, } from "@getpaseo/protocol/paseo-config-schema";
12
+ import { BrowserAutomationHostCapabilitySchema } from "./browser-automation/capabilities.js";
13
+ import { PaseoConfigRawSchema, PaseoLifecycleCommandRawSchema, PaseoMetadataGenerationEntrySchema, PaseoMetadataGenerationSchema, PaseoScriptEntryRawSchema, PaseoWorktreeConfigRawSchema, PaseoConfigRevisionSchema, ProjectConfigRpcErrorSchema, } from "./paseo-config-schema.js";
13
14
  export { PaseoConfigRawSchema, PaseoLifecycleCommandRawSchema, PaseoMetadataGenerationEntrySchema, PaseoMetadataGenerationSchema, PaseoScriptEntryRawSchema, PaseoWorktreeConfigRawSchema, };
14
15
  // ---------------------------------------------------------------------------
15
16
  // Mutable daemon config schemas (shared between server store and client)
@@ -134,8 +135,7 @@ export const AgentFeatureSchema = z.discriminatedUnion("type", [
134
135
  AgentFeatureToggleSchema,
135
136
  AgentFeatureSelectSchema,
136
137
  ]);
137
- const AgentModelDefinitionSchema = z
138
- .object({
138
+ const AgentModelDefinitionSchema = z.object({
139
139
  provider: AgentProviderSchema,
140
140
  id: z.string(),
141
141
  label: z.string(),
@@ -145,8 +145,7 @@ const AgentModelDefinitionSchema = z
145
145
  contextWindowMaxTokens: z.number().optional(),
146
146
  thinkingOptions: z.array(AgentSelectOptionSchema).optional(),
147
147
  defaultThinkingOptionId: z.string().optional(),
148
- })
149
- .transform(normalizeAgentModelDefinition);
148
+ });
150
149
  export const ProviderSnapshotEntrySchema = z.object({
151
150
  provider: AgentProviderSchema,
152
151
  status: ProviderStatusSchema,
@@ -238,7 +237,7 @@ const AgentPermissionActionSchema = z.object({
238
237
  variant: z.enum(["primary", "secondary", "danger"]).optional(),
239
238
  intent: z.enum(["implement", "implement_resume", "dismiss"]).optional(),
240
239
  });
241
- export const AgentPermissionResponseSchema = z.union([
240
+ export const AgentPermissionResponseSchema = z.discriminatedUnion("behavior", [
242
241
  z.object({
243
242
  behavior: z.literal("allow"),
244
243
  selectedActionId: z.string().optional(),
@@ -411,12 +410,14 @@ const ToolCallCanceledPayloadSchema = ToolCallBasePayloadSchema.extend({
411
410
  status: z.literal("canceled"),
412
411
  error: z.null(),
413
412
  });
414
- const ToolCallTimelineItemPayloadSchema = z.union([
413
+ const ToolCallTimelineItemPayloadSchema = z.discriminatedUnion("status", [
415
414
  ToolCallRunningPayloadSchema,
416
415
  ToolCallCompletedPayloadSchema,
417
416
  ToolCallFailedPayloadSchema,
418
417
  ToolCallCanceledPayloadSchema,
419
418
  ]);
419
+ // zod-aot 0.20.4 miscompiles this as a nested discriminated union by omitting
420
+ // the inner tool_call branch from the generated outer dispatch.
420
421
  export const AgentTimelineItemPayloadSchema = z.union([
421
422
  z.object({
422
423
  type: z.literal("user_message"),
@@ -2684,7 +2685,9 @@ export const SetDaemonConfigResponseMessageSchema = z.object({
2684
2685
  });
2685
2686
  export const ReadProjectConfigResponseMessageSchema = z.object({
2686
2687
  type: z.literal("read_project_config_response"),
2687
- payload: z.discriminatedUnion("ok", [
2688
+ // zod-aot 0.2.0 miscompiles boolean discriminators as string options
2689
+ // (`"true"`/`"false"`), so keep this sequential until upstream fixes it.
2690
+ payload: z.union([
2688
2691
  z.object({
2689
2692
  requestId: z.string(),
2690
2693
  repoRoot: z.string(),
@@ -2702,7 +2705,9 @@ export const ReadProjectConfigResponseMessageSchema = z.object({
2702
2705
  });
2703
2706
  export const WriteProjectConfigResponseMessageSchema = z.object({
2704
2707
  type: z.literal("write_project_config_response"),
2705
- payload: z.discriminatedUnion("ok", [
2708
+ // zod-aot 0.2.0 miscompiles boolean discriminators as string options
2709
+ // (`"true"`/`"false"`), so keep this sequential until upstream fixes it.
2710
+ payload: z.union([
2706
2711
  z.object({
2707
2712
  requestId: z.string(),
2708
2713
  repoRoot: z.string(),
@@ -3789,7 +3794,7 @@ export const WSHelloMessageSchema = z.object({
3789
3794
  [CLIENT_CAPS.reasoningMergeEnum]: z.boolean().optional(),
3790
3795
  [CLIENT_CAPS.customModeIcons]: z.boolean().optional(),
3791
3796
  [CLIENT_CAPS.terminalReflowableSnapshot]: z.boolean().optional(),
3792
- [CLIENT_CAPS.desktopBrowserAutomation]: z.boolean().optional(),
3797
+ [CLIENT_CAPS.browserHost]: BrowserAutomationHostCapabilitySchema.optional(),
3793
3798
  })
3794
3799
  .passthrough()
3795
3800
  .optional(),
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { AgentProviderSchema } from "@getpaseo/protocol/provider-manifest";
2
+ import { AgentProviderSchema } from "../provider-manifest.js";
3
3
  export const ScheduleStatusSchema = z.enum(["active", "paused", "completed"]);
4
4
  export const ScheduleCadenceSchema = z.discriminatedUnion("type", [
5
5
  z.object({
@@ -1,4 +1,4 @@
1
- import { getPaseoToolLeafName, isPaseoToolName } from "@getpaseo/protocol/tool-name-normalization";
1
+ import { getPaseoToolLeafName, isPaseoToolName } from "./tool-name-normalization.js";
2
2
  import { stripCwdPrefix } from "./path-utils.js";
3
3
  function isRecord(value) {
4
4
  return typeof value === "object" && value !== null && !Array.isArray(value);