@getpaseo/protocol 0.1.97-beta.3 → 0.1.97

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
@@ -96,7 +96,7 @@ const AgentSelectOptionSchema = z.object({
96
96
  label: z.string(),
97
97
  description: z.string().optional(),
98
98
  isDefault: z.boolean().optional(),
99
- metadata: z.record(z.unknown()).optional(),
99
+ metadata: z.record(z.string(), z.unknown()).optional(),
100
100
  });
101
101
  export const AgentFeatureToggleSchema = z.object({
102
102
  type: z.literal("toggle"),
@@ -128,7 +128,7 @@ const AgentModelDefinitionSchema = z
128
128
  label: z.string(),
129
129
  description: z.string().optional(),
130
130
  isDefault: z.boolean().optional(),
131
- metadata: z.record(z.unknown()).optional(),
131
+ metadata: z.record(z.string(), z.unknown()).optional(),
132
132
  thinkingOptions: z.array(AgentSelectOptionSchema).optional(),
133
133
  defaultThinkingOptionId: z.string().optional(),
134
134
  })
@@ -174,19 +174,19 @@ const McpStdioServerConfigSchema = z.object({
174
174
  type: z.literal("stdio"),
175
175
  command: z.string(),
176
176
  args: z.array(z.string()).optional(),
177
- env: z.record(z.string()).optional(),
177
+ env: z.record(z.string(), z.string()).optional(),
178
178
  alwaysLoad: z.boolean().optional(),
179
179
  });
180
180
  const McpHttpServerConfigSchema = z.object({
181
181
  type: z.literal("http"),
182
182
  url: z.string(),
183
- headers: z.record(z.string()).optional(),
183
+ headers: z.record(z.string(), z.string()).optional(),
184
184
  alwaysLoad: z.boolean().optional(),
185
185
  });
186
186
  const McpSseServerConfigSchema = z.object({
187
187
  type: z.literal("sse"),
188
188
  url: z.string(),
189
- headers: z.record(z.string()).optional(),
189
+ headers: z.record(z.string(), z.string()).optional(),
190
190
  alwaysLoad: z.boolean().optional(),
191
191
  });
192
192
  const McpServerConfigSchema = z.discriminatedUnion("type", [
@@ -200,7 +200,7 @@ const AgentSessionConfigSchema = z.object({
200
200
  modeId: z.string().optional(),
201
201
  model: z.string().optional(),
202
202
  thinkingOptionId: z.string().optional(),
203
- featureValues: z.record(z.unknown()).optional(),
203
+ featureValues: z.record(z.string(), z.unknown()).optional(),
204
204
  title: z.string().trim().min(1).max(MAX_EXPLICIT_AGENT_TITLE_CHARS).optional().nullable(),
205
205
  approvalPolicy: z.string().optional(),
206
206
  sandboxMode: z.string().optional(),
@@ -208,15 +208,15 @@ const AgentSessionConfigSchema = z.object({
208
208
  webSearch: z.boolean().optional(),
209
209
  extra: z
210
210
  .object({
211
- codex: z.record(z.unknown()).optional(),
212
- claude: z.record(z.unknown()).optional(),
211
+ codex: z.record(z.string(), z.unknown()).optional(),
212
+ claude: z.record(z.string(), z.unknown()).optional(),
213
213
  })
214
214
  .partial()
215
215
  .optional(),
216
216
  systemPrompt: z.string().optional(),
217
- mcpServers: z.record(McpServerConfigSchema).optional(),
217
+ mcpServers: z.record(z.string(), McpServerConfigSchema).optional(),
218
218
  });
219
- const AgentPermissionUpdateSchema = z.record(z.unknown());
219
+ const AgentPermissionUpdateSchema = z.record(z.string(), z.unknown());
220
220
  const AgentPermissionActionSchema = z.object({
221
221
  id: z.string(),
222
222
  label: z.string(),
@@ -228,7 +228,7 @@ export const AgentPermissionResponseSchema = z.union([
228
228
  z.object({
229
229
  behavior: z.literal("allow"),
230
230
  selectedActionId: z.string().optional(),
231
- updatedInput: z.record(z.unknown()).optional(),
231
+ updatedInput: z.record(z.string(), z.unknown()).optional(),
232
232
  updatedPermissions: z.array(AgentPermissionUpdateSchema).optional(),
233
233
  }),
234
234
  z.object({
@@ -245,11 +245,11 @@ export const AgentPermissionRequestPayloadSchema = z.object({
245
245
  kind: z.enum(["tool", "plan", "question", "mode", "other"]),
246
246
  title: z.string().optional(),
247
247
  description: z.string().optional(),
248
- input: z.record(z.unknown()).optional(),
248
+ input: z.record(z.string(), z.unknown()).optional(),
249
249
  detail: z.lazy(() => ToolCallDetailPayloadSchema).optional(),
250
250
  suggestions: z.array(AgentPermissionUpdateSchema).optional(),
251
251
  actions: z.array(AgentPermissionActionSchema).optional(),
252
- metadata: z.record(z.unknown()).optional(),
252
+ metadata: z.record(z.string(), z.unknown()).optional(),
253
253
  });
254
254
  const UnknownValueSchema = z.union([
255
255
  z.null(),
@@ -591,7 +591,7 @@ export const AudioPlayedMessageSchema = z.object({
591
591
  id: z.string(),
592
592
  });
593
593
  const AgentDirectoryFilterSchema = z.object({
594
- labels: z.record(z.string()).optional(),
594
+ labels: z.record(z.string(), z.string()).optional(),
595
595
  projectKeys: z.array(z.string()).optional(),
596
596
  statuses: z.array(AgentStatusSchema).optional(),
597
597
  includeArchived: z.boolean().optional(),
@@ -618,7 +618,7 @@ export const UpdateAgentRequestMessageSchema = z.object({
618
618
  type: z.literal("update_agent_request"),
619
619
  agentId: z.string(),
620
620
  name: z.string().optional(),
621
- labels: z.record(z.string()).optional(),
621
+ labels: z.record(z.string(), z.string()).optional(),
622
622
  requestId: z.string(),
623
623
  });
624
624
  export const ProjectRenameRequestSchema = z.object({
@@ -628,6 +628,11 @@ export const ProjectRenameRequestSchema = z.object({
628
628
  customName: z.string().nullable(),
629
629
  requestId: z.string(),
630
630
  });
631
+ export const ProjectRemoveRequestSchema = z.object({
632
+ type: z.literal("project.remove.request"),
633
+ projectId: z.string(),
634
+ requestId: z.string(),
635
+ });
631
636
  export const WorkspaceTitleSetRequestSchema = z.object({
632
637
  type: z.literal("workspace.title.set.request"),
633
638
  workspaceId: z.string(),
@@ -922,18 +927,18 @@ export const CreateAgentWorktreeTargetSchema = z.discriminatedUnion("mode", [
922
927
  export const CreateAgentRequestMessageSchema = z.object({
923
928
  type: z.literal("create_agent_request"),
924
929
  config: AgentSessionConfigSchema,
925
- env: z.record(z.string()).optional(),
930
+ env: z.record(z.string(), z.string()).optional(),
926
931
  workspaceId: z.string().optional(),
927
932
  worktreeName: z.string().optional(),
928
933
  initialPrompt: z.string().optional(),
929
934
  clientMessageId: z.string().optional(),
930
- outputSchema: z.record(z.unknown()).optional(),
935
+ outputSchema: z.record(z.string(), z.unknown()).optional(),
931
936
  images: z.array(ImageAttachmentSchema).optional(),
932
937
  attachments: AgentAttachmentsSchema,
933
938
  git: GitSetupOptionsSchema.optional(),
934
939
  worktree: CreateAgentWorktreeTargetSchema.optional(),
935
940
  autoArchive: z.boolean().optional(),
936
- labels: z.record(z.string()).default({}),
941
+ labels: z.record(z.string(), z.string()).default({}),
937
942
  requestId: z.string(),
938
943
  });
939
944
  export const ListProviderModelsRequestMessageSchema = z.object({
@@ -981,7 +986,7 @@ export const ImportAgentRequestMessageSchema = z.object({
981
986
  sessionId: z.string().optional(),
982
987
  providerHandleId: z.string().optional(),
983
988
  cwd: z.string().optional(),
984
- labels: z.record(z.string()).optional(),
989
+ labels: z.record(z.string(), z.string()).optional(),
985
990
  requestId: z.string(),
986
991
  });
987
992
  export const RefreshAgentRequestMessageSchema = z.object({
@@ -1097,6 +1102,17 @@ export const ProjectRenameResponseSchema = z.object({
1097
1102
  type: z.literal("project.rename.response"),
1098
1103
  payload: ProjectRenameResponsePayloadSchema,
1099
1104
  });
1105
+ export const ProjectRemoveResponsePayloadSchema = z.object({
1106
+ requestId: z.string(),
1107
+ projectId: z.string(),
1108
+ accepted: z.boolean(),
1109
+ removedWorkspaceIds: z.array(z.string()).default([]),
1110
+ error: z.string().nullable(),
1111
+ });
1112
+ export const ProjectRemoveResponseSchema = z.object({
1113
+ type: z.literal("project.remove.response"),
1114
+ payload: ProjectRemoveResponsePayloadSchema,
1115
+ });
1100
1116
  export const WorkspaceTitleSetResponsePayloadSchema = z.object({
1101
1117
  requestId: z.string(),
1102
1118
  workspaceId: z.string(),
@@ -1527,7 +1543,7 @@ const ListCommandsDraftConfigSchema = z.object({
1527
1543
  modeId: z.string().optional(),
1528
1544
  model: z.string().optional(),
1529
1545
  thinkingOptionId: z.string().optional(),
1530
- featureValues: z.record(z.unknown()).optional(),
1546
+ featureValues: z.record(z.string(), z.unknown()).optional(),
1531
1547
  });
1532
1548
  export const ListProviderFeaturesRequestMessageSchema = z.object({
1533
1549
  type: z.literal("list_provider_features_request"),
@@ -1649,6 +1665,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
1649
1665
  CloseItemsRequestMessageSchema,
1650
1666
  UpdateAgentRequestMessageSchema,
1651
1667
  ProjectRenameRequestSchema,
1668
+ ProjectRemoveRequestSchema,
1652
1669
  WorkspaceTitleSetRequestSchema,
1653
1670
  SetVoiceModeMessageSchema,
1654
1671
  SendAgentMessageRequestSchema,
@@ -1768,7 +1785,7 @@ export const ActivityLogPayloadSchema = z.object({
1768
1785
  timestamp: z.coerce.date(),
1769
1786
  type: z.enum(["transcript", "assistant", "tool_call", "tool_result", "error", "system"]),
1770
1787
  content: z.string(),
1771
- metadata: z.record(z.unknown()).optional(),
1788
+ metadata: z.record(z.string(), z.unknown()).optional(),
1772
1789
  });
1773
1790
  export const ActivityLogMessageSchema = z.object({
1774
1791
  type: z.literal("activity_log"),
@@ -1898,7 +1915,7 @@ export const ServerInfoStatusPayloadSchema = z
1898
1915
  serverId: z.string().trim().min(1),
1899
1916
  hostname: ServerInfoHostnameSchema.optional(),
1900
1917
  version: ServerInfoVersionSchema.optional(),
1901
- capabilities: ServerCapabilitiesFromUnknownSchema,
1918
+ capabilities: ServerCapabilitiesFromUnknownSchema.optional(),
1902
1919
  // COMPAT(providersSnapshot): added in v0.1.48, remove gating when all clients use snapshot
1903
1920
  features: z
1904
1921
  .object({
@@ -1916,6 +1933,10 @@ export const ServerInfoStatusPayloadSchema = z
1916
1933
  checkoutRefresh: z.boolean().optional(),
1917
1934
  // COMPAT(workspaceMultiplicity): added in v0.1.97, drop the gate when floor >= v0.1.97
1918
1935
  workspaceMultiplicity: z.boolean().optional(),
1936
+ // COMPAT(projectRemove): added in v0.1.97, drop the gate when floor >= v0.1.97.
1937
+ projectRemove: z.boolean().optional(),
1938
+ // COMPAT(worktreeRestore): added in v0.1.97, drop the gate when floor >= v0.1.97
1939
+ worktreeRestore: z.boolean().optional(),
1919
1940
  })
1920
1941
  .optional(),
1921
1942
  })
@@ -2067,6 +2088,7 @@ export const ProjectCheckoutLitePayloadSchema = z.union([
2067
2088
  export const ProjectPlacementPayloadSchema = z.object({
2068
2089
  projectKey: z.string(),
2069
2090
  projectName: z.string(),
2091
+ workspaceName: z.string().nullable().optional(),
2070
2092
  checkout: ProjectCheckoutLitePayloadSchema,
2071
2093
  });
2072
2094
  export const WorkspaceScriptLifecycleSchema = z.enum(["running", "stopped"]);
@@ -2309,6 +2331,9 @@ export const WorkspaceUpdateMessageSchema = z.object({
2309
2331
  // daemons omit it; old clients ignore it and surface the empty project on
2310
2332
  // their next workspace fetch instead.
2311
2333
  emptyProject: WorkspaceProjectDescriptorPayloadSchema.optional(),
2334
+ // Project removal is represented on the existing workspace update channel
2335
+ // so old clients can still parse the message and ignore the extra field.
2336
+ removedProjectId: z.string().optional(),
2312
2337
  }),
2313
2338
  ]),
2314
2339
  });
@@ -3024,7 +3049,7 @@ export const PullRequestTimelineResponseSchema = z.object({
3024
3049
  githubFeaturesEnabled: z.boolean().optional().default(true),
3025
3050
  })
3026
3051
  .optional()
3027
- .default({}),
3052
+ .prefault({}),
3028
3053
  });
3029
3054
  export const CheckoutSwitchBranchResponseSchema = z.object({
3030
3055
  type: z.literal("checkout_switch_branch_response"),
@@ -3485,6 +3510,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
3485
3510
  AgentRewindResponseMessageSchema,
3486
3511
  UpdateAgentResponseMessageSchema,
3487
3512
  ProjectRenameResponseSchema,
3513
+ ProjectRemoveResponseSchema,
3488
3514
  WorkspaceTitleSetResponseSchema,
3489
3515
  WaitForFinishResponseMessageSchema,
3490
3516
  AgentPermissionRequestMessageSchema,