@getpaseo/protocol 0.2.0-beta.1 → 0.2.0-beta.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.
package/dist/messages.js CHANGED
@@ -425,6 +425,7 @@ export const AgentTimelineItemPayloadSchema = z.union([
425
425
  type: z.literal("user_message"),
426
426
  text: z.string(),
427
427
  messageId: z.string().optional(),
428
+ clientMessageId: z.string().optional(),
428
429
  }),
429
430
  z.object({
430
431
  type: z.literal("assistant_message"),
@@ -789,7 +790,7 @@ function normalizeAgentAttachments(input) {
789
790
  const AgentAttachmentsSchema = z.unknown().transform(normalizeAgentAttachments).optional();
790
791
  export const ChangeRequestCheckoutSourceSchema = z.object({
791
792
  kind: z.literal("change_request"),
792
- forge: z.string().optional().default("github"),
793
+ forge: z.string().optional(),
793
794
  number: z.number().int().positive(),
794
795
  projectPath: z.string().optional(),
795
796
  });
@@ -923,6 +924,21 @@ export const DaemonGetPairingOfferRequestSchema = z.object({
923
924
  type: z.literal("daemon.get_pairing_offer.request"),
924
925
  requestId: z.string(),
925
926
  });
927
+ export const HubManagementDaemonConnectRequestSchema = z.object({
928
+ type: z.literal("hub.management.daemon.connect.request"),
929
+ requestId: z.string(),
930
+ hubUrl: z.string(),
931
+ token: z.string(),
932
+ });
933
+ export const HubManagementDaemonGetStatusRequestSchema = z.object({
934
+ type: z.literal("hub.management.daemon.get_status.request"),
935
+ requestId: z.string(),
936
+ });
937
+ export const HubManagementDaemonDisconnectRequestSchema = z.object({
938
+ type: z.literal("hub.management.daemon.disconnect.request"),
939
+ requestId: z.string(),
940
+ force: z.boolean().optional(),
941
+ });
926
942
  export const DiagnosticsRequestSchema = z.object({
927
943
  type: z.literal("diagnostics.request"),
928
944
  requestId: z.string(),
@@ -1005,6 +1021,9 @@ export const CreateAgentRequestMessageSchema = z.object({
1005
1021
  config: AgentSessionConfigSchema,
1006
1022
  env: z.record(z.string(), z.string()).optional(),
1007
1023
  workspaceId: z.string().optional(),
1024
+ // Optional caller context lets managed CLI invocations use the same daemon-owned
1025
+ // workspace and parentage policy as agent-scoped MCP creation.
1026
+ callerAgentId: z.string().optional(),
1008
1027
  worktreeName: z.string().optional(),
1009
1028
  initialPrompt: z.string().optional(),
1010
1029
  clientMessageId: z.string().optional(),
@@ -1122,6 +1141,11 @@ export const ProviderSubagentTimelineRequestMessageSchema = z.object({
1122
1141
  cursor: AgentTimelineCursorSchema.optional(),
1123
1142
  limit: z.number().int().nonnegative().optional(),
1124
1143
  });
1144
+ export const SetAgentTimelineSubscriptionRequestMessageSchema = z.object({
1145
+ type: z.literal("agent.timeline.set_subscription.request"),
1146
+ agentIds: z.array(z.string()),
1147
+ requestId: z.string(),
1148
+ });
1125
1149
  export const AgentForkContextRequestMessageSchema = z.object({
1126
1150
  type: z.literal("agent.fork_context.request"),
1127
1151
  agentId: z.string(),
@@ -1440,9 +1464,9 @@ const CheckoutCheckDetailsRequestPayloadSchema = z.object({
1440
1464
  checkRunId: z.number().int().positive().optional(),
1441
1465
  workflowRunId: z.number().int().positive().optional(),
1442
1466
  // Permanent forge-routing field, optional because only some forges need it:
1443
- // GitLab routes the check-details fetch to the change request's head pipeline
1444
- // by iid, so a fork/detached MR pipeline (which lives in the source project,
1445
- // not the checkout's target project) resolves correctly. GitHub ignores it.
1467
+ // GitLab routes check details to the MR's head pipeline; Gitea-family adapters
1468
+ // resolve the PR head SHA by number, including after merge/close. GitHub
1469
+ // ignores it.
1446
1470
  changeRequestNumber: z.number().int().positive().optional(),
1447
1471
  requestId: z.string(),
1448
1472
  });
@@ -1705,9 +1729,11 @@ export const WorkspaceCreateRequestSchema = z.object({
1705
1729
  cwd: z.string().optional(),
1706
1730
  projectId: z.string().optional(),
1707
1731
  action: z.enum(["branch-off", "checkout"]).optional(),
1708
- // Target branch name for checkout, or new branch name for branch-off.
1732
+ // Target branch for checkout, or base ref for branch-off.
1709
1733
  refName: z.string().min(1).optional(),
1710
1734
  baseBranch: z.string().optional(),
1735
+ // New branch name for branch-off. The worktree path may use a different slug.
1736
+ branchName: z.string().min(1).optional(),
1711
1737
  checkoutSource: ChangeRequestCheckoutSourceSchema.optional(),
1712
1738
  // COMPAT(githubPrNumber): added in v0.1.106, remove after 2026-12-28 once
1713
1739
  // clients send checkoutSource.
@@ -1763,6 +1789,7 @@ const FileExplorerFileSchema = z.object({
1763
1789
  mimeType: z.string().optional(),
1764
1790
  size: z.number(),
1765
1791
  modifiedAt: z.string(),
1792
+ revision: z.string().optional(),
1766
1793
  });
1767
1794
  const FileExplorerDirectorySchema = z.object({
1768
1795
  path: z.string(),
@@ -1776,6 +1803,48 @@ export const FileExplorerRequestSchema = z.object({
1776
1803
  requestId: z.string(),
1777
1804
  acceptBinary: z.boolean().optional(),
1778
1805
  });
1806
+ export const FileVersionSchema = z.discriminatedUnion("status", [
1807
+ z.object({
1808
+ status: z.literal("ready"),
1809
+ cwd: z.string(),
1810
+ path: z.string(),
1811
+ size: z.number().int().nonnegative(),
1812
+ modifiedAt: z.string(),
1813
+ revision: z.string().optional(),
1814
+ }),
1815
+ z.object({
1816
+ status: z.literal("missing"),
1817
+ cwd: z.string(),
1818
+ path: z.string(),
1819
+ }),
1820
+ z.object({
1821
+ status: z.literal("error"),
1822
+ cwd: z.string(),
1823
+ path: z.string(),
1824
+ error: z.string(),
1825
+ }),
1826
+ ]);
1827
+ export const FileSubscribeRequestSchema = z.object({
1828
+ type: z.literal("fs.file.subscribe.request"),
1829
+ cwd: z.string(),
1830
+ path: z.string(),
1831
+ subscriptionId: z.string(),
1832
+ requestId: z.string(),
1833
+ });
1834
+ export const FileUnsubscribeRequestSchema = z.object({
1835
+ type: z.literal("fs.file.unsubscribe.request"),
1836
+ subscriptionId: z.string(),
1837
+ requestId: z.string(),
1838
+ });
1839
+ export const FileWriteRequestSchema = z.object({
1840
+ type: z.literal("fs.file.write.request"),
1841
+ cwd: z.string(),
1842
+ path: z.string(),
1843
+ content: z.string(),
1844
+ expectedModifiedAt: z.string(),
1845
+ expectedRevision: z.string().optional(),
1846
+ requestId: z.string(),
1847
+ });
1779
1848
  export const ProjectIconRequestSchema = z.object({
1780
1849
  type: z.literal("project_icon_request"),
1781
1850
  cwd: z.string(),
@@ -1939,7 +2008,24 @@ export const CaptureTerminalRequestSchema = z.object({
1939
2008
  stripAnsi: z.boolean().default(true),
1940
2009
  requestId: z.string(),
1941
2010
  });
2011
+ export const HubExecutionAgentCreateRequestSchema = z.object({
2012
+ type: z.literal("hub.execution.agent.create.request"),
2013
+ requestId: z.string(),
2014
+ executionId: z.string(),
2015
+ provider: z.string(),
2016
+ cwd: z.string(),
2017
+ prompt: z.string(),
2018
+ workspaceId: z.string().optional(),
2019
+ model: z.string().optional(),
2020
+ modeId: z.string().optional(),
2021
+ thinkingOptionId: z.string().optional(),
2022
+ featureValues: z.record(z.string(), z.unknown()).optional(),
2023
+ env: z.record(z.string(), z.string()).optional(),
2024
+ worktree: CreateAgentWorktreeTargetSchema.optional(),
2025
+ autoArchive: z.boolean().optional(),
2026
+ });
1942
2027
  export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
2028
+ HubExecutionAgentCreateRequestSchema,
1943
2029
  BrowserAutomationExecuteResponseSchema,
1944
2030
  VoiceAudioChunkMessageSchema,
1945
2031
  AbortRequestMessageSchema,
@@ -1964,6 +2050,9 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
1964
2050
  WaitForFinishRequestSchema,
1965
2051
  DaemonGetStatusRequestSchema,
1966
2052
  DaemonGetPairingOfferRequestSchema,
2053
+ HubManagementDaemonConnectRequestSchema,
2054
+ HubManagementDaemonGetStatusRequestSchema,
2055
+ HubManagementDaemonDisconnectRequestSchema,
1967
2056
  DiagnosticsRequestSchema,
1968
2057
  GetDaemonConfigRequestMessageSchema,
1969
2058
  SetDaemonConfigRequestMessageSchema,
@@ -1992,6 +2081,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
1992
2081
  FetchAgentTimelineRequestMessageSchema,
1993
2082
  ProviderSubagentListRequestMessageSchema,
1994
2083
  ProviderSubagentTimelineRequestMessageSchema,
2084
+ SetAgentTimelineSubscriptionRequestMessageSchema,
1995
2085
  AgentForkContextRequestMessageSchema,
1996
2086
  SetAgentModeRequestMessageSchema,
1997
2087
  SetAgentModelRequestMessageSchema,
@@ -2044,6 +2134,9 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
2044
2134
  WorkspaceCreateRequestSchema,
2045
2135
  WorkspaceClearAttentionRequestSchema,
2046
2136
  FileExplorerRequestSchema,
2137
+ FileSubscribeRequestSchema,
2138
+ FileUnsubscribeRequestSchema,
2139
+ FileWriteRequestSchema,
2047
2140
  ProjectIconRequestSchema,
2048
2141
  FileDownloadTokenRequestSchema,
2049
2142
  FileUploadRequestSchema,
@@ -2258,6 +2351,8 @@ export const ServerInfoStatusPayloadSchema = z
2258
2351
  worktreeRestore: z.boolean().optional(),
2259
2352
  // COMPAT(workspaceRecovery): added in v0.1.105, remove after 2027-01-11 once daemon floor >= v0.1.105.
2260
2353
  workspaceRecovery: z.boolean().optional(),
2354
+ // COMPAT(workspaceFileEditing): added in v0.2.0, remove after 2027-01-18 once daemon floor >= v0.2.0.
2355
+ workspaceFileEditing: z.boolean().optional(),
2261
2356
  // COMPAT(providerUsageList): added in v0.1.98, drop the gate when daemon floor >= v0.1.98.
2262
2357
  providerUsageList: z.boolean().optional(),
2263
2358
  // COMPAT(agentDetach): added in v0.1.98, remove gate after 2026-12-19 once daemon floor >= v0.1.98.
@@ -2274,6 +2369,8 @@ export const ServerInfoStatusPayloadSchema = z
2274
2369
  providerSubagents: z.boolean().optional(),
2275
2370
  // COMPAT(workspacePinning): added in v0.1.107, remove gate after 2027-01-12.
2276
2371
  workspacePinning: z.boolean().optional(),
2372
+ // COMPAT(hubRelationship): added in v0.1.X, drop the gate when floor >= v0.1.X.
2373
+ hubRelationship: z.boolean().optional(),
2277
2374
  // COMPAT(projectGithubClone): added in v0.1.108, remove gate after 2027-01-15.
2278
2375
  projectGithubClone: z.boolean().optional(),
2279
2376
  // COMPAT(workspaceGithubRepositorySearch): added in v0.1.108, remove gate after 2027-01-15.
@@ -2290,6 +2387,10 @@ export const ServerInfoStatusPayloadSchema = z
2290
2387
  // Daemon advertises pluggable non-GitHub forge support (the forge registry);
2291
2388
  // the client gates non-GitHub setup UI on it.
2292
2389
  forgeProviders: z.boolean().optional(),
2390
+ // COMPAT(selectiveAgentTimeline): added in v0.1.106, remove after 2027-01-12.
2391
+ selectiveAgentTimeline: z.boolean().optional(),
2392
+ // COMPAT(stableProjectIdentity): added in v0.1.109, remove gate after 2027-01-15.
2393
+ stableProjectIdentity: z.boolean().optional(),
2293
2394
  })
2294
2395
  .optional(),
2295
2396
  })
@@ -2697,6 +2798,13 @@ export const WorkspaceUpdateMessageSchema = z.object({
2697
2798
  }),
2698
2799
  ]),
2699
2800
  });
2801
+ export const ProjectUpdateMessageSchema = z.object({
2802
+ type: z.literal("project.update"),
2803
+ payload: z.discriminatedUnion("kind", [
2804
+ z.object({ kind: z.literal("upsert"), project: WorkspaceProjectDescriptorPayloadSchema }),
2805
+ z.object({ kind: z.literal("remove"), projectId: z.string() }),
2806
+ ]),
2807
+ });
2700
2808
  export const ScriptStatusUpdateMessageSchema = z.object({
2701
2809
  type: z.literal("script_status_update"),
2702
2810
  payload: z.object({
@@ -2966,6 +3074,33 @@ export const ProviderSubagentUpdateMessageSchema = z.object({
2966
3074
  }),
2967
3075
  ]),
2968
3076
  });
3077
+ export const SetAgentTimelineSubscriptionResponseMessageSchema = z.object({
3078
+ type: z.literal("agent.timeline.set_subscription.response"),
3079
+ payload: z.object({
3080
+ agentIds: z.array(z.string()),
3081
+ requestId: z.string(),
3082
+ }),
3083
+ });
3084
+ export const AgentAttentionRequiredMessageSchema = z.object({
3085
+ type: z.literal("agent_attention_required"),
3086
+ payload: z.object({
3087
+ agentId: z.string(),
3088
+ reason: z.enum(["finished", "error", "permission"]),
3089
+ timestamp: z.string(),
3090
+ shouldNotify: z.boolean(),
3091
+ notification: z
3092
+ .object({
3093
+ title: z.string(),
3094
+ body: z.string(),
3095
+ data: z.object({
3096
+ serverId: z.string(),
3097
+ agentId: z.string(),
3098
+ reason: z.enum(["finished", "error", "permission"]),
3099
+ }),
3100
+ })
3101
+ .optional(),
3102
+ }),
3103
+ });
2969
3104
  export const AgentForkContextResponseMessageSchema = z.object({
2970
3105
  type: z.literal("agent.fork_context.response"),
2971
3106
  payload: z.object({
@@ -3078,6 +3213,37 @@ export const DaemonGetStatusResponseSchema = z.object({
3078
3213
  })
3079
3214
  .passthrough(),
3080
3215
  });
3216
+ export const HubRelationshipStatusSchema = z.object({
3217
+ state: z.enum([
3218
+ "not_connected",
3219
+ "connecting",
3220
+ "connected",
3221
+ "reconnecting",
3222
+ "disconnecting",
3223
+ "revoked",
3224
+ ]),
3225
+ daemonId: z.string().nullable(),
3226
+ hubOrigin: z.string().nullable(),
3227
+ scopes: z.array(z.string()),
3228
+ connectedAt: z.string().nullable(),
3229
+ lastError: z.string().nullable(),
3230
+ });
3231
+ export const HubManagementDaemonConnectResponseSchema = z.object({
3232
+ type: z.literal("hub.management.daemon.connect.response"),
3233
+ payload: z.object({ requestId: z.string(), status: HubRelationshipStatusSchema }),
3234
+ });
3235
+ export const HubManagementDaemonGetStatusResponseSchema = z.object({
3236
+ type: z.literal("hub.management.daemon.get_status.response"),
3237
+ payload: z.object({ requestId: z.string(), status: HubRelationshipStatusSchema }),
3238
+ });
3239
+ export const HubManagementDaemonDisconnectResponseSchema = z.object({
3240
+ type: z.literal("hub.management.daemon.disconnect.response"),
3241
+ payload: z.object({
3242
+ requestId: z.string(),
3243
+ status: HubRelationshipStatusSchema,
3244
+ warning: z.string().optional(),
3245
+ }),
3246
+ });
3081
3247
  export const DaemonGetPairingOfferResponseSchema = z.object({
3082
3248
  type: z.literal("daemon.get_pairing_offer.response"),
3083
3249
  payload: z
@@ -3857,6 +4023,45 @@ export const FileExplorerResponseSchema = z.object({
3857
4023
  requestId: z.string(),
3858
4024
  }),
3859
4025
  });
4026
+ export const FileSubscribeResponseSchema = z.object({
4027
+ type: z.literal("fs.file.subscribe.response"),
4028
+ payload: z.object({
4029
+ subscriptionId: z.string(),
4030
+ initial: FileVersionSchema,
4031
+ requestId: z.string(),
4032
+ }),
4033
+ });
4034
+ export const FileUnsubscribeResponseSchema = z.object({
4035
+ type: z.literal("fs.file.unsubscribe.response"),
4036
+ payload: z.object({
4037
+ subscriptionId: z.string(),
4038
+ requestId: z.string(),
4039
+ }),
4040
+ });
4041
+ export const FileWriteResultSchema = z.discriminatedUnion("status", [
4042
+ z.object({
4043
+ status: z.literal("written"),
4044
+ modifiedAt: z.string(),
4045
+ size: z.number(),
4046
+ revision: z.string().optional(),
4047
+ }),
4048
+ z.object({ status: z.literal("conflict"), version: FileVersionSchema }),
4049
+ z.object({ status: z.literal("error"), error: z.string() }),
4050
+ ]);
4051
+ export const FileWriteResponseSchema = z.object({
4052
+ type: z.literal("fs.file.write.response"),
4053
+ payload: z.object({
4054
+ result: FileWriteResultSchema,
4055
+ requestId: z.string(),
4056
+ }),
4057
+ });
4058
+ export const FileUpdateSchema = z.object({
4059
+ type: z.literal("fs.file.update"),
4060
+ payload: z.object({
4061
+ subscriptionId: z.string(),
4062
+ version: FileVersionSchema,
4063
+ }),
4064
+ });
3860
4065
  const ProjectIconSchema = z.object({
3861
4066
  data: z.string(),
3862
4067
  mimeType: z.string(),
@@ -4181,7 +4386,60 @@ export const DaemonUpdateProgressMessageSchema = z.object({
4181
4386
  phase: z.enum(["starting", "downloading", "installing", "complete"]),
4182
4387
  }),
4183
4388
  });
4389
+ export const HubExecutionAgentCreateResponseSchema = z.object({
4390
+ type: z.literal("hub.execution.agent.create.response"),
4391
+ payload: z.object({
4392
+ requestId: z.string(),
4393
+ executionId: z.string(),
4394
+ agentId: z.string().nullable(),
4395
+ agent: AgentSnapshotPayloadSchema.nullable(),
4396
+ success: z.boolean(),
4397
+ error: z.string().nullable(),
4398
+ }),
4399
+ });
4400
+ export const HubExecutionAgentUpdateSchema = z.object({
4401
+ type: z.literal("hub.execution.agent.update"),
4402
+ payload: z.object({
4403
+ executionId: z.string(),
4404
+ agentId: z.string(),
4405
+ agent: AgentSnapshotPayloadSchema,
4406
+ }),
4407
+ });
4408
+ export const HubExecutionAgentStreamSchema = z.object({
4409
+ type: z.literal("hub.execution.agent.stream"),
4410
+ payload: z.object({
4411
+ executionId: z.string(),
4412
+ agentId: z.string(),
4413
+ event: AgentStreamEventPayloadSchema,
4414
+ }),
4415
+ });
4416
+ export const HubExecutionOutboundMessageSchema = z.discriminatedUnion("type", [
4417
+ HubExecutionAgentCreateResponseSchema,
4418
+ HubExecutionAgentUpdateSchema,
4419
+ HubExecutionAgentStreamSchema,
4420
+ ]);
4421
+ export class HubMessageCorrelationError extends Error {
4422
+ constructor(messageType) {
4423
+ super(`Hub message ${messageType} has mismatched agent correlation`);
4424
+ this.name = "HubMessageCorrelationError";
4425
+ }
4426
+ }
4427
+ export function parseHubExecutionOutboundMessage(value) {
4428
+ const message = HubExecutionOutboundMessageSchema.parse(value);
4429
+ const payload = message.payload;
4430
+ if ("agent" in payload &&
4431
+ payload.agent !== null &&
4432
+ "agentId" in payload &&
4433
+ payload.agentId !== null &&
4434
+ payload.agent.id !== payload.agentId) {
4435
+ throw new HubMessageCorrelationError(message.type);
4436
+ }
4437
+ return message;
4438
+ }
4184
4439
  export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
4440
+ HubExecutionAgentCreateResponseSchema,
4441
+ HubExecutionAgentUpdateSchema,
4442
+ HubExecutionAgentStreamSchema,
4185
4443
  BrowserAutomationExecuteRequestSchema,
4186
4444
  ActivityLogMessageSchema,
4187
4445
  AssistantChunkMessageSchema,
@@ -4199,6 +4457,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
4199
4457
  ArtifactMessageSchema,
4200
4458
  AgentUpdateMessageSchema,
4201
4459
  WorkspaceUpdateMessageSchema,
4460
+ ProjectUpdateMessageSchema,
4202
4461
  ScriptStatusUpdateMessageSchema,
4203
4462
  WorkspaceSetupProgressMessageSchema,
4204
4463
  WorkspaceSetupStatusResponseMessageSchema,
@@ -4222,6 +4481,8 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
4222
4481
  ProviderSubagentListResponseMessageSchema,
4223
4482
  ProviderSubagentTimelineResponseMessageSchema,
4224
4483
  ProviderSubagentUpdateMessageSchema,
4484
+ SetAgentTimelineSubscriptionResponseMessageSchema,
4485
+ AgentAttentionRequiredMessageSchema,
4225
4486
  AgentForkContextResponseMessageSchema,
4226
4487
  CancelAgentResponseMessageSchema,
4227
4488
  ClearAgentAttentionResponseMessageSchema,
@@ -4231,6 +4492,9 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
4231
4492
  SetVoiceModeResponseMessageSchema,
4232
4493
  DaemonGetStatusResponseSchema,
4233
4494
  DaemonGetPairingOfferResponseSchema,
4495
+ HubManagementDaemonConnectResponseSchema,
4496
+ HubManagementDaemonGetStatusResponseSchema,
4497
+ HubManagementDaemonDisconnectResponseSchema,
4234
4498
  DiagnosticsResponseSchema,
4235
4499
  GetDaemonConfigResponseMessageSchema,
4236
4500
  SetDaemonConfigResponseMessageSchema,
@@ -4289,6 +4553,10 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
4289
4553
  PaseoWorktreeArchiveResponseSchema,
4290
4554
  CreatePaseoWorktreeResponseSchema,
4291
4555
  FileExplorerResponseSchema,
4556
+ FileSubscribeResponseSchema,
4557
+ FileUnsubscribeResponseSchema,
4558
+ FileWriteResponseSchema,
4559
+ FileUpdateSchema,
4292
4560
  ProjectIconResponseSchema,
4293
4561
  FileDownloadTokenResponseSchema,
4294
4562
  FileUploadResponseSchema,
@@ -4356,9 +4624,11 @@ export const WSHelloMessageSchema = z.object({
4356
4624
  voice: z.boolean().optional(),
4357
4625
  pushNotifications: z.boolean().optional(),
4358
4626
  [CLIENT_CAPS.reasoningMergeEnum]: z.boolean().optional(),
4627
+ [CLIENT_CAPS.selectiveAgentTimeline]: z.boolean().optional(),
4359
4628
  [CLIENT_CAPS.customModeIcons]: z.boolean().optional(),
4360
4629
  [CLIENT_CAPS.terminalReflowableSnapshot]: z.boolean().optional(),
4361
4630
  [CLIENT_CAPS.providerSubagents]: z.boolean().optional(),
4631
+ [CLIENT_CAPS.projectUpdates]: z.boolean().optional(),
4362
4632
  [CLIENT_CAPS.browserHost]: BrowserAutomationHostCapabilitySchema.optional(),
4363
4633
  })
4364
4634
  .passthrough()
@@ -1,4 +1,8 @@
1
1
  import { z } from "zod";
2
+ export declare const PaseoServicePortAllocationSchema: z.ZodObject<{
3
+ range: z.ZodOptional<z.ZodString>;
4
+ portScript: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strict>;
2
6
  export declare function normalizeLifecycleCommands(commands: unknown): string[];
3
7
  export declare const PaseoLifecycleCommandRawSchema: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
4
8
  export declare const PaseoScriptEntryRawSchema: z.ZodObject<{
@@ -10,6 +14,10 @@ export declare const PaseoWorktreeConfigRawSchema: z.ZodObject<{
10
14
  setup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
11
15
  teardown: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
12
16
  terminals: z.ZodOptional<z.ZodUnknown>;
17
+ servicePorts: z.ZodOptional<z.ZodObject<{
18
+ range: z.ZodOptional<z.ZodString>;
19
+ portScript: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strict>>;
13
21
  }, z.core.$loose>;
14
22
  export declare const PaseoMetadataGenerationEntrySchema: z.ZodCatch<z.ZodObject<{
15
23
  instructions: z.ZodOptional<z.ZodString>;
@@ -33,6 +41,10 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
33
41
  setup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
34
42
  teardown: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
35
43
  terminals: z.ZodOptional<z.ZodUnknown>;
44
+ servicePorts: z.ZodOptional<z.ZodObject<{
45
+ range: z.ZodOptional<z.ZodString>;
46
+ portScript: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strict>>;
36
48
  }, z.core.$loose>>;
37
49
  scripts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
38
50
  type: z.ZodOptional<z.ZodUnknown>;
@@ -56,6 +68,10 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
56
68
  }, z.core.$loose>;
57
69
  export declare const WorktreeConfigSchema: z.ZodCatch<z.ZodObject<{
58
70
  terminals: z.ZodOptional<z.ZodUnknown>;
71
+ servicePorts: z.ZodOptional<z.ZodObject<{
72
+ range: z.ZodOptional<z.ZodString>;
73
+ portScript: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$strict>>;
59
75
  setup: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<string[], unknown>>;
60
76
  teardown: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<string[], unknown>>;
61
77
  }, z.core.$loose>>;
@@ -67,6 +83,10 @@ export declare const ScriptEntrySchema: z.ZodCatch<z.ZodObject<{
67
83
  export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{
68
84
  worktree: z.ZodOptional<z.ZodCatch<z.ZodObject<{
69
85
  terminals: z.ZodOptional<z.ZodUnknown>;
86
+ servicePorts: z.ZodOptional<z.ZodObject<{
87
+ range: z.ZodOptional<z.ZodString>;
88
+ portScript: z.ZodOptional<z.ZodString>;
89
+ }, z.core.$strict>>;
70
90
  setup: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<string[], unknown>>;
71
91
  teardown: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<string[], unknown>>;
72
92
  }, z.core.$loose>>>;
@@ -110,6 +130,7 @@ export declare const ProjectConfigRpcErrorSchema: z.ZodDiscriminatedUnion<[z.Zod
110
130
  export type PaseoScriptEntryRaw = z.infer<typeof PaseoScriptEntryRawSchema>;
111
131
  export type PaseoMetadataGenerationEntry = z.infer<typeof PaseoMetadataGenerationEntrySchema>;
112
132
  export type PaseoMetadataGeneration = z.infer<typeof PaseoMetadataGenerationSchema>;
133
+ export type PaseoServicePortAllocation = z.infer<typeof PaseoServicePortAllocationSchema>;
113
134
  export type PaseoConfigRaw = z.infer<typeof PaseoConfigRawSchema>;
114
135
  export type PaseoConfig = z.infer<typeof PaseoConfigSchema>;
115
136
  export type PaseoConfigRevision = z.infer<typeof PaseoConfigRevisionSchema>;
@@ -1,4 +1,22 @@
1
1
  import { z } from "zod";
2
+ const TCP_PORT_RANGE_PATTERN = /^(\d{1,5})-(\d{1,5})$/;
3
+ export const PaseoServicePortAllocationSchema = z
4
+ .object({
5
+ range: z.string().trim().regex(TCP_PORT_RANGE_PATTERN).optional(),
6
+ portScript: z.string().trim().min(1).optional(),
7
+ })
8
+ .strict()
9
+ .refine((value) => value.range !== undefined || value.portScript !== undefined, "Expected range or portScript")
10
+ .refine((value) => {
11
+ if (!value.range)
12
+ return true;
13
+ const match = TCP_PORT_RANGE_PATTERN.exec(value.range);
14
+ if (!match)
15
+ return false;
16
+ const start = Number(match[1]);
17
+ const end = Number(match[2]);
18
+ return start >= 1 && end <= 65535 && start <= end;
19
+ }, "Expected an inclusive TCP port range from 1-65535");
2
20
  export function normalizeLifecycleCommands(commands) {
3
21
  if (typeof commands === "string") {
4
22
  return commands.trim().length > 0 ? [commands] : [];
@@ -23,6 +41,7 @@ export const PaseoWorktreeConfigRawSchema = z
23
41
  setup: PaseoLifecycleCommandRawSchema.optional(),
24
42
  teardown: PaseoLifecycleCommandRawSchema.optional(),
25
43
  terminals: z.unknown().optional(),
44
+ servicePorts: PaseoServicePortAllocationSchema.optional(),
26
45
  })
27
46
  .passthrough();
28
47
  export const PaseoMetadataGenerationEntrySchema = z
@@ -141,7 +141,7 @@ export const AGENT_PROVIDER_DEFINITIONS = [
141
141
  id: "claude",
142
142
  label: "Claude",
143
143
  description: "Anthropic's multi-tool assistant with MCP support, streaming, and deep reasoning",
144
- defaultModeId: "default",
144
+ defaultModeId: "auto",
145
145
  modes: CLAUDE_MODES,
146
146
  voice: {
147
147
  enabled: true,
@@ -153,7 +153,7 @@ export const AGENT_PROVIDER_DEFINITIONS = [
153
153
  id: "codex",
154
154
  label: "Codex",
155
155
  description: "OpenAI's Codex workspace agent with sandbox controls and optional network access",
156
- defaultModeId: "auto",
156
+ defaultModeId: "auto-review",
157
157
  modes: CODEX_MODES,
158
158
  voice: {
159
159
  enabled: true,
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Convert an exact rolling interval to an equivalent five-field cron cadence.
3
+ * Returns null when cron's calendar boundaries would change the interval.
4
+ */
5
+ export declare function everyMsToFiveFieldCron(everyMs: number): string | null;
6
+ //# sourceMappingURL=cadence.d.ts.map
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Convert an exact rolling interval to an equivalent five-field cron cadence.
3
+ * Returns null when cron's calendar boundaries would change the interval.
4
+ */
5
+ export function everyMsToFiveFieldCron(everyMs) {
6
+ const minutes = everyMs / 60000;
7
+ if (!Number.isInteger(minutes) || minutes <= 0) {
8
+ return null;
9
+ }
10
+ if (minutes < 60 && 60 % minutes === 0) {
11
+ return `*/${minutes} * * * *`;
12
+ }
13
+ if (minutes === 60) {
14
+ return "0 * * * *";
15
+ }
16
+ if (minutes % 60 !== 0) {
17
+ return null;
18
+ }
19
+ const hours = minutes / 60;
20
+ if (hours < 24 && 24 % hours === 0) {
21
+ return `0 */${hours} * * *`;
22
+ }
23
+ if (hours === 24) {
24
+ return "0 0 * * *";
25
+ }
26
+ return null;
27
+ }
28
+ //# sourceMappingURL=cadence.js.map