@getpaseo/protocol 0.2.0-beta.1 → 0.2.0-beta.3
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/agent-attention-notification.d.ts +2 -0
- package/dist/agent-attention-notification.js +1 -0
- package/dist/agent-deep-link.d.ts +8 -0
- package/dist/agent-deep-link.js +49 -0
- package/dist/agent-types.d.ts +1 -0
- package/dist/binary-frames/file-transfer.d.ts +1 -0
- package/dist/binary-frames/file-transfer.js +1 -0
- package/dist/client-capabilities.d.ts +2 -0
- package/dist/client-capabilities.js +6 -0
- package/dist/generated/validation/ws-outbound.aot.js +40191 -30651
- package/dist/messages.d.ts +2243 -22
- package/dist/messages.js +277 -5
- package/dist/paseo-config-schema.d.ts +21 -0
- package/dist/paseo-config-schema.js +19 -0
- package/dist/provider-manifest.js +9 -2
- package/dist/schedule/cadence.d.ts +6 -0
- package/dist/schedule/cadence.js +28 -0
- package/dist/validation/ws-outbound-schema-metadata.d.ts +412 -2
- package/package.json +1 -1
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"),
|
|
@@ -509,6 +510,7 @@ export const AgentStreamEventPayloadSchema = z.discriminatedUnion("type", [
|
|
|
509
510
|
body: z.string(),
|
|
510
511
|
data: z.object({
|
|
511
512
|
serverId: z.string(),
|
|
513
|
+
workspaceId: z.string().optional(),
|
|
512
514
|
agentId: z.string(),
|
|
513
515
|
reason: z.enum(["finished", "error", "permission"]),
|
|
514
516
|
}),
|
|
@@ -789,7 +791,7 @@ function normalizeAgentAttachments(input) {
|
|
|
789
791
|
const AgentAttachmentsSchema = z.unknown().transform(normalizeAgentAttachments).optional();
|
|
790
792
|
export const ChangeRequestCheckoutSourceSchema = z.object({
|
|
791
793
|
kind: z.literal("change_request"),
|
|
792
|
-
forge: z.string().optional()
|
|
794
|
+
forge: z.string().optional(),
|
|
793
795
|
number: z.number().int().positive(),
|
|
794
796
|
projectPath: z.string().optional(),
|
|
795
797
|
});
|
|
@@ -923,6 +925,21 @@ export const DaemonGetPairingOfferRequestSchema = z.object({
|
|
|
923
925
|
type: z.literal("daemon.get_pairing_offer.request"),
|
|
924
926
|
requestId: z.string(),
|
|
925
927
|
});
|
|
928
|
+
export const HubManagementDaemonConnectRequestSchema = z.object({
|
|
929
|
+
type: z.literal("hub.management.daemon.connect.request"),
|
|
930
|
+
requestId: z.string(),
|
|
931
|
+
hubUrl: z.string(),
|
|
932
|
+
token: z.string(),
|
|
933
|
+
});
|
|
934
|
+
export const HubManagementDaemonGetStatusRequestSchema = z.object({
|
|
935
|
+
type: z.literal("hub.management.daemon.get_status.request"),
|
|
936
|
+
requestId: z.string(),
|
|
937
|
+
});
|
|
938
|
+
export const HubManagementDaemonDisconnectRequestSchema = z.object({
|
|
939
|
+
type: z.literal("hub.management.daemon.disconnect.request"),
|
|
940
|
+
requestId: z.string(),
|
|
941
|
+
force: z.boolean().optional(),
|
|
942
|
+
});
|
|
926
943
|
export const DiagnosticsRequestSchema = z.object({
|
|
927
944
|
type: z.literal("diagnostics.request"),
|
|
928
945
|
requestId: z.string(),
|
|
@@ -1005,6 +1022,9 @@ export const CreateAgentRequestMessageSchema = z.object({
|
|
|
1005
1022
|
config: AgentSessionConfigSchema,
|
|
1006
1023
|
env: z.record(z.string(), z.string()).optional(),
|
|
1007
1024
|
workspaceId: z.string().optional(),
|
|
1025
|
+
// Optional caller context lets managed CLI invocations use the same daemon-owned
|
|
1026
|
+
// workspace and parentage policy as agent-scoped MCP creation.
|
|
1027
|
+
callerAgentId: z.string().optional(),
|
|
1008
1028
|
worktreeName: z.string().optional(),
|
|
1009
1029
|
initialPrompt: z.string().optional(),
|
|
1010
1030
|
clientMessageId: z.string().optional(),
|
|
@@ -1122,6 +1142,11 @@ export const ProviderSubagentTimelineRequestMessageSchema = z.object({
|
|
|
1122
1142
|
cursor: AgentTimelineCursorSchema.optional(),
|
|
1123
1143
|
limit: z.number().int().nonnegative().optional(),
|
|
1124
1144
|
});
|
|
1145
|
+
export const SetAgentTimelineSubscriptionRequestMessageSchema = z.object({
|
|
1146
|
+
type: z.literal("agent.timeline.set_subscription.request"),
|
|
1147
|
+
agentIds: z.array(z.string()),
|
|
1148
|
+
requestId: z.string(),
|
|
1149
|
+
});
|
|
1125
1150
|
export const AgentForkContextRequestMessageSchema = z.object({
|
|
1126
1151
|
type: z.literal("agent.fork_context.request"),
|
|
1127
1152
|
agentId: z.string(),
|
|
@@ -1440,9 +1465,9 @@ const CheckoutCheckDetailsRequestPayloadSchema = z.object({
|
|
|
1440
1465
|
checkRunId: z.number().int().positive().optional(),
|
|
1441
1466
|
workflowRunId: z.number().int().positive().optional(),
|
|
1442
1467
|
// Permanent forge-routing field, optional because only some forges need it:
|
|
1443
|
-
// GitLab routes
|
|
1444
|
-
//
|
|
1445
|
-
//
|
|
1468
|
+
// GitLab routes check details to the MR's head pipeline; Gitea-family adapters
|
|
1469
|
+
// resolve the PR head SHA by number, including after merge/close. GitHub
|
|
1470
|
+
// ignores it.
|
|
1446
1471
|
changeRequestNumber: z.number().int().positive().optional(),
|
|
1447
1472
|
requestId: z.string(),
|
|
1448
1473
|
});
|
|
@@ -1705,9 +1730,11 @@ export const WorkspaceCreateRequestSchema = z.object({
|
|
|
1705
1730
|
cwd: z.string().optional(),
|
|
1706
1731
|
projectId: z.string().optional(),
|
|
1707
1732
|
action: z.enum(["branch-off", "checkout"]).optional(),
|
|
1708
|
-
// Target branch
|
|
1733
|
+
// Target branch for checkout, or base ref for branch-off.
|
|
1709
1734
|
refName: z.string().min(1).optional(),
|
|
1710
1735
|
baseBranch: z.string().optional(),
|
|
1736
|
+
// New branch name for branch-off. The worktree path may use a different slug.
|
|
1737
|
+
branchName: z.string().min(1).optional(),
|
|
1711
1738
|
checkoutSource: ChangeRequestCheckoutSourceSchema.optional(),
|
|
1712
1739
|
// COMPAT(githubPrNumber): added in v0.1.106, remove after 2026-12-28 once
|
|
1713
1740
|
// clients send checkoutSource.
|
|
@@ -1763,6 +1790,7 @@ const FileExplorerFileSchema = z.object({
|
|
|
1763
1790
|
mimeType: z.string().optional(),
|
|
1764
1791
|
size: z.number(),
|
|
1765
1792
|
modifiedAt: z.string(),
|
|
1793
|
+
revision: z.string().optional(),
|
|
1766
1794
|
});
|
|
1767
1795
|
const FileExplorerDirectorySchema = z.object({
|
|
1768
1796
|
path: z.string(),
|
|
@@ -1776,6 +1804,48 @@ export const FileExplorerRequestSchema = z.object({
|
|
|
1776
1804
|
requestId: z.string(),
|
|
1777
1805
|
acceptBinary: z.boolean().optional(),
|
|
1778
1806
|
});
|
|
1807
|
+
export const FileVersionSchema = z.discriminatedUnion("status", [
|
|
1808
|
+
z.object({
|
|
1809
|
+
status: z.literal("ready"),
|
|
1810
|
+
cwd: z.string(),
|
|
1811
|
+
path: z.string(),
|
|
1812
|
+
size: z.number().int().nonnegative(),
|
|
1813
|
+
modifiedAt: z.string(),
|
|
1814
|
+
revision: z.string().optional(),
|
|
1815
|
+
}),
|
|
1816
|
+
z.object({
|
|
1817
|
+
status: z.literal("missing"),
|
|
1818
|
+
cwd: z.string(),
|
|
1819
|
+
path: z.string(),
|
|
1820
|
+
}),
|
|
1821
|
+
z.object({
|
|
1822
|
+
status: z.literal("error"),
|
|
1823
|
+
cwd: z.string(),
|
|
1824
|
+
path: z.string(),
|
|
1825
|
+
error: z.string(),
|
|
1826
|
+
}),
|
|
1827
|
+
]);
|
|
1828
|
+
export const FileSubscribeRequestSchema = z.object({
|
|
1829
|
+
type: z.literal("fs.file.subscribe.request"),
|
|
1830
|
+
cwd: z.string(),
|
|
1831
|
+
path: z.string(),
|
|
1832
|
+
subscriptionId: z.string(),
|
|
1833
|
+
requestId: z.string(),
|
|
1834
|
+
});
|
|
1835
|
+
export const FileUnsubscribeRequestSchema = z.object({
|
|
1836
|
+
type: z.literal("fs.file.unsubscribe.request"),
|
|
1837
|
+
subscriptionId: z.string(),
|
|
1838
|
+
requestId: z.string(),
|
|
1839
|
+
});
|
|
1840
|
+
export const FileWriteRequestSchema = z.object({
|
|
1841
|
+
type: z.literal("fs.file.write.request"),
|
|
1842
|
+
cwd: z.string(),
|
|
1843
|
+
path: z.string(),
|
|
1844
|
+
content: z.string(),
|
|
1845
|
+
expectedModifiedAt: z.string(),
|
|
1846
|
+
expectedRevision: z.string().optional(),
|
|
1847
|
+
requestId: z.string(),
|
|
1848
|
+
});
|
|
1779
1849
|
export const ProjectIconRequestSchema = z.object({
|
|
1780
1850
|
type: z.literal("project_icon_request"),
|
|
1781
1851
|
cwd: z.string(),
|
|
@@ -1939,7 +2009,24 @@ export const CaptureTerminalRequestSchema = z.object({
|
|
|
1939
2009
|
stripAnsi: z.boolean().default(true),
|
|
1940
2010
|
requestId: z.string(),
|
|
1941
2011
|
});
|
|
2012
|
+
export const HubExecutionAgentCreateRequestSchema = z.object({
|
|
2013
|
+
type: z.literal("hub.execution.agent.create.request"),
|
|
2014
|
+
requestId: z.string(),
|
|
2015
|
+
executionId: z.string(),
|
|
2016
|
+
provider: z.string(),
|
|
2017
|
+
cwd: z.string(),
|
|
2018
|
+
prompt: z.string(),
|
|
2019
|
+
workspaceId: z.string().optional(),
|
|
2020
|
+
model: z.string().optional(),
|
|
2021
|
+
modeId: z.string().optional(),
|
|
2022
|
+
thinkingOptionId: z.string().optional(),
|
|
2023
|
+
featureValues: z.record(z.string(), z.unknown()).optional(),
|
|
2024
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
2025
|
+
worktree: CreateAgentWorktreeTargetSchema.optional(),
|
|
2026
|
+
autoArchive: z.boolean().optional(),
|
|
2027
|
+
});
|
|
1942
2028
|
export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
2029
|
+
HubExecutionAgentCreateRequestSchema,
|
|
1943
2030
|
BrowserAutomationExecuteResponseSchema,
|
|
1944
2031
|
VoiceAudioChunkMessageSchema,
|
|
1945
2032
|
AbortRequestMessageSchema,
|
|
@@ -1964,6 +2051,9 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
1964
2051
|
WaitForFinishRequestSchema,
|
|
1965
2052
|
DaemonGetStatusRequestSchema,
|
|
1966
2053
|
DaemonGetPairingOfferRequestSchema,
|
|
2054
|
+
HubManagementDaemonConnectRequestSchema,
|
|
2055
|
+
HubManagementDaemonGetStatusRequestSchema,
|
|
2056
|
+
HubManagementDaemonDisconnectRequestSchema,
|
|
1967
2057
|
DiagnosticsRequestSchema,
|
|
1968
2058
|
GetDaemonConfigRequestMessageSchema,
|
|
1969
2059
|
SetDaemonConfigRequestMessageSchema,
|
|
@@ -1992,6 +2082,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
1992
2082
|
FetchAgentTimelineRequestMessageSchema,
|
|
1993
2083
|
ProviderSubagentListRequestMessageSchema,
|
|
1994
2084
|
ProviderSubagentTimelineRequestMessageSchema,
|
|
2085
|
+
SetAgentTimelineSubscriptionRequestMessageSchema,
|
|
1995
2086
|
AgentForkContextRequestMessageSchema,
|
|
1996
2087
|
SetAgentModeRequestMessageSchema,
|
|
1997
2088
|
SetAgentModelRequestMessageSchema,
|
|
@@ -2044,6 +2135,9 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2044
2135
|
WorkspaceCreateRequestSchema,
|
|
2045
2136
|
WorkspaceClearAttentionRequestSchema,
|
|
2046
2137
|
FileExplorerRequestSchema,
|
|
2138
|
+
FileSubscribeRequestSchema,
|
|
2139
|
+
FileUnsubscribeRequestSchema,
|
|
2140
|
+
FileWriteRequestSchema,
|
|
2047
2141
|
ProjectIconRequestSchema,
|
|
2048
2142
|
FileDownloadTokenRequestSchema,
|
|
2049
2143
|
FileUploadRequestSchema,
|
|
@@ -2258,6 +2352,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
2258
2352
|
worktreeRestore: z.boolean().optional(),
|
|
2259
2353
|
// COMPAT(workspaceRecovery): added in v0.1.105, remove after 2027-01-11 once daemon floor >= v0.1.105.
|
|
2260
2354
|
workspaceRecovery: z.boolean().optional(),
|
|
2355
|
+
// COMPAT(workspaceFileEditing): added in v0.2.0, remove after 2027-01-18 once daemon floor >= v0.2.0.
|
|
2356
|
+
workspaceFileEditing: z.boolean().optional(),
|
|
2261
2357
|
// COMPAT(providerUsageList): added in v0.1.98, drop the gate when daemon floor >= v0.1.98.
|
|
2262
2358
|
providerUsageList: z.boolean().optional(),
|
|
2263
2359
|
// COMPAT(agentDetach): added in v0.1.98, remove gate after 2026-12-19 once daemon floor >= v0.1.98.
|
|
@@ -2274,6 +2370,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
2274
2370
|
providerSubagents: z.boolean().optional(),
|
|
2275
2371
|
// COMPAT(workspacePinning): added in v0.1.107, remove gate after 2027-01-12.
|
|
2276
2372
|
workspacePinning: z.boolean().optional(),
|
|
2373
|
+
// COMPAT(hubRelationship): added in v0.1.X, drop the gate when floor >= v0.1.X.
|
|
2374
|
+
hubRelationship: z.boolean().optional(),
|
|
2277
2375
|
// COMPAT(projectGithubClone): added in v0.1.108, remove gate after 2027-01-15.
|
|
2278
2376
|
projectGithubClone: z.boolean().optional(),
|
|
2279
2377
|
// COMPAT(workspaceGithubRepositorySearch): added in v0.1.108, remove gate after 2027-01-15.
|
|
@@ -2290,6 +2388,10 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
2290
2388
|
// Daemon advertises pluggable non-GitHub forge support (the forge registry);
|
|
2291
2389
|
// the client gates non-GitHub setup UI on it.
|
|
2292
2390
|
forgeProviders: z.boolean().optional(),
|
|
2391
|
+
// COMPAT(selectiveAgentTimeline): added in v0.1.106, remove after 2027-01-12.
|
|
2392
|
+
selectiveAgentTimeline: z.boolean().optional(),
|
|
2393
|
+
// COMPAT(stableProjectIdentity): added in v0.1.109, remove gate after 2027-01-15.
|
|
2394
|
+
stableProjectIdentity: z.boolean().optional(),
|
|
2293
2395
|
})
|
|
2294
2396
|
.optional(),
|
|
2295
2397
|
})
|
|
@@ -2697,6 +2799,13 @@ export const WorkspaceUpdateMessageSchema = z.object({
|
|
|
2697
2799
|
}),
|
|
2698
2800
|
]),
|
|
2699
2801
|
});
|
|
2802
|
+
export const ProjectUpdateMessageSchema = z.object({
|
|
2803
|
+
type: z.literal("project.update"),
|
|
2804
|
+
payload: z.discriminatedUnion("kind", [
|
|
2805
|
+
z.object({ kind: z.literal("upsert"), project: WorkspaceProjectDescriptorPayloadSchema }),
|
|
2806
|
+
z.object({ kind: z.literal("remove"), projectId: z.string() }),
|
|
2807
|
+
]),
|
|
2808
|
+
});
|
|
2700
2809
|
export const ScriptStatusUpdateMessageSchema = z.object({
|
|
2701
2810
|
type: z.literal("script_status_update"),
|
|
2702
2811
|
payload: z.object({
|
|
@@ -2966,6 +3075,34 @@ export const ProviderSubagentUpdateMessageSchema = z.object({
|
|
|
2966
3075
|
}),
|
|
2967
3076
|
]),
|
|
2968
3077
|
});
|
|
3078
|
+
export const SetAgentTimelineSubscriptionResponseMessageSchema = z.object({
|
|
3079
|
+
type: z.literal("agent.timeline.set_subscription.response"),
|
|
3080
|
+
payload: z.object({
|
|
3081
|
+
agentIds: z.array(z.string()),
|
|
3082
|
+
requestId: z.string(),
|
|
3083
|
+
}),
|
|
3084
|
+
});
|
|
3085
|
+
export const AgentAttentionRequiredMessageSchema = z.object({
|
|
3086
|
+
type: z.literal("agent_attention_required"),
|
|
3087
|
+
payload: z.object({
|
|
3088
|
+
agentId: z.string(),
|
|
3089
|
+
reason: z.enum(["finished", "error", "permission"]),
|
|
3090
|
+
timestamp: z.string(),
|
|
3091
|
+
shouldNotify: z.boolean(),
|
|
3092
|
+
notification: z
|
|
3093
|
+
.object({
|
|
3094
|
+
title: z.string(),
|
|
3095
|
+
body: z.string(),
|
|
3096
|
+
data: z.object({
|
|
3097
|
+
serverId: z.string(),
|
|
3098
|
+
workspaceId: z.string().optional(),
|
|
3099
|
+
agentId: z.string(),
|
|
3100
|
+
reason: z.enum(["finished", "error", "permission"]),
|
|
3101
|
+
}),
|
|
3102
|
+
})
|
|
3103
|
+
.optional(),
|
|
3104
|
+
}),
|
|
3105
|
+
});
|
|
2969
3106
|
export const AgentForkContextResponseMessageSchema = z.object({
|
|
2970
3107
|
type: z.literal("agent.fork_context.response"),
|
|
2971
3108
|
payload: z.object({
|
|
@@ -3078,6 +3215,37 @@ export const DaemonGetStatusResponseSchema = z.object({
|
|
|
3078
3215
|
})
|
|
3079
3216
|
.passthrough(),
|
|
3080
3217
|
});
|
|
3218
|
+
export const HubRelationshipStatusSchema = z.object({
|
|
3219
|
+
state: z.enum([
|
|
3220
|
+
"not_connected",
|
|
3221
|
+
"connecting",
|
|
3222
|
+
"connected",
|
|
3223
|
+
"reconnecting",
|
|
3224
|
+
"disconnecting",
|
|
3225
|
+
"revoked",
|
|
3226
|
+
]),
|
|
3227
|
+
daemonId: z.string().nullable(),
|
|
3228
|
+
hubOrigin: z.string().nullable(),
|
|
3229
|
+
scopes: z.array(z.string()),
|
|
3230
|
+
connectedAt: z.string().nullable(),
|
|
3231
|
+
lastError: z.string().nullable(),
|
|
3232
|
+
});
|
|
3233
|
+
export const HubManagementDaemonConnectResponseSchema = z.object({
|
|
3234
|
+
type: z.literal("hub.management.daemon.connect.response"),
|
|
3235
|
+
payload: z.object({ requestId: z.string(), status: HubRelationshipStatusSchema }),
|
|
3236
|
+
});
|
|
3237
|
+
export const HubManagementDaemonGetStatusResponseSchema = z.object({
|
|
3238
|
+
type: z.literal("hub.management.daemon.get_status.response"),
|
|
3239
|
+
payload: z.object({ requestId: z.string(), status: HubRelationshipStatusSchema }),
|
|
3240
|
+
});
|
|
3241
|
+
export const HubManagementDaemonDisconnectResponseSchema = z.object({
|
|
3242
|
+
type: z.literal("hub.management.daemon.disconnect.response"),
|
|
3243
|
+
payload: z.object({
|
|
3244
|
+
requestId: z.string(),
|
|
3245
|
+
status: HubRelationshipStatusSchema,
|
|
3246
|
+
warning: z.string().optional(),
|
|
3247
|
+
}),
|
|
3248
|
+
});
|
|
3081
3249
|
export const DaemonGetPairingOfferResponseSchema = z.object({
|
|
3082
3250
|
type: z.literal("daemon.get_pairing_offer.response"),
|
|
3083
3251
|
payload: z
|
|
@@ -3857,6 +4025,45 @@ export const FileExplorerResponseSchema = z.object({
|
|
|
3857
4025
|
requestId: z.string(),
|
|
3858
4026
|
}),
|
|
3859
4027
|
});
|
|
4028
|
+
export const FileSubscribeResponseSchema = z.object({
|
|
4029
|
+
type: z.literal("fs.file.subscribe.response"),
|
|
4030
|
+
payload: z.object({
|
|
4031
|
+
subscriptionId: z.string(),
|
|
4032
|
+
initial: FileVersionSchema,
|
|
4033
|
+
requestId: z.string(),
|
|
4034
|
+
}),
|
|
4035
|
+
});
|
|
4036
|
+
export const FileUnsubscribeResponseSchema = z.object({
|
|
4037
|
+
type: z.literal("fs.file.unsubscribe.response"),
|
|
4038
|
+
payload: z.object({
|
|
4039
|
+
subscriptionId: z.string(),
|
|
4040
|
+
requestId: z.string(),
|
|
4041
|
+
}),
|
|
4042
|
+
});
|
|
4043
|
+
export const FileWriteResultSchema = z.discriminatedUnion("status", [
|
|
4044
|
+
z.object({
|
|
4045
|
+
status: z.literal("written"),
|
|
4046
|
+
modifiedAt: z.string(),
|
|
4047
|
+
size: z.number(),
|
|
4048
|
+
revision: z.string().optional(),
|
|
4049
|
+
}),
|
|
4050
|
+
z.object({ status: z.literal("conflict"), version: FileVersionSchema }),
|
|
4051
|
+
z.object({ status: z.literal("error"), error: z.string() }),
|
|
4052
|
+
]);
|
|
4053
|
+
export const FileWriteResponseSchema = z.object({
|
|
4054
|
+
type: z.literal("fs.file.write.response"),
|
|
4055
|
+
payload: z.object({
|
|
4056
|
+
result: FileWriteResultSchema,
|
|
4057
|
+
requestId: z.string(),
|
|
4058
|
+
}),
|
|
4059
|
+
});
|
|
4060
|
+
export const FileUpdateSchema = z.object({
|
|
4061
|
+
type: z.literal("fs.file.update"),
|
|
4062
|
+
payload: z.object({
|
|
4063
|
+
subscriptionId: z.string(),
|
|
4064
|
+
version: FileVersionSchema,
|
|
4065
|
+
}),
|
|
4066
|
+
});
|
|
3860
4067
|
const ProjectIconSchema = z.object({
|
|
3861
4068
|
data: z.string(),
|
|
3862
4069
|
mimeType: z.string(),
|
|
@@ -4181,7 +4388,60 @@ export const DaemonUpdateProgressMessageSchema = z.object({
|
|
|
4181
4388
|
phase: z.enum(["starting", "downloading", "installing", "complete"]),
|
|
4182
4389
|
}),
|
|
4183
4390
|
});
|
|
4391
|
+
export const HubExecutionAgentCreateResponseSchema = z.object({
|
|
4392
|
+
type: z.literal("hub.execution.agent.create.response"),
|
|
4393
|
+
payload: z.object({
|
|
4394
|
+
requestId: z.string(),
|
|
4395
|
+
executionId: z.string(),
|
|
4396
|
+
agentId: z.string().nullable(),
|
|
4397
|
+
agent: AgentSnapshotPayloadSchema.nullable(),
|
|
4398
|
+
success: z.boolean(),
|
|
4399
|
+
error: z.string().nullable(),
|
|
4400
|
+
}),
|
|
4401
|
+
});
|
|
4402
|
+
export const HubExecutionAgentUpdateSchema = z.object({
|
|
4403
|
+
type: z.literal("hub.execution.agent.update"),
|
|
4404
|
+
payload: z.object({
|
|
4405
|
+
executionId: z.string(),
|
|
4406
|
+
agentId: z.string(),
|
|
4407
|
+
agent: AgentSnapshotPayloadSchema,
|
|
4408
|
+
}),
|
|
4409
|
+
});
|
|
4410
|
+
export const HubExecutionAgentStreamSchema = z.object({
|
|
4411
|
+
type: z.literal("hub.execution.agent.stream"),
|
|
4412
|
+
payload: z.object({
|
|
4413
|
+
executionId: z.string(),
|
|
4414
|
+
agentId: z.string(),
|
|
4415
|
+
event: AgentStreamEventPayloadSchema,
|
|
4416
|
+
}),
|
|
4417
|
+
});
|
|
4418
|
+
export const HubExecutionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
4419
|
+
HubExecutionAgentCreateResponseSchema,
|
|
4420
|
+
HubExecutionAgentUpdateSchema,
|
|
4421
|
+
HubExecutionAgentStreamSchema,
|
|
4422
|
+
]);
|
|
4423
|
+
export class HubMessageCorrelationError extends Error {
|
|
4424
|
+
constructor(messageType) {
|
|
4425
|
+
super(`Hub message ${messageType} has mismatched agent correlation`);
|
|
4426
|
+
this.name = "HubMessageCorrelationError";
|
|
4427
|
+
}
|
|
4428
|
+
}
|
|
4429
|
+
export function parseHubExecutionOutboundMessage(value) {
|
|
4430
|
+
const message = HubExecutionOutboundMessageSchema.parse(value);
|
|
4431
|
+
const payload = message.payload;
|
|
4432
|
+
if ("agent" in payload &&
|
|
4433
|
+
payload.agent !== null &&
|
|
4434
|
+
"agentId" in payload &&
|
|
4435
|
+
payload.agentId !== null &&
|
|
4436
|
+
payload.agent.id !== payload.agentId) {
|
|
4437
|
+
throw new HubMessageCorrelationError(message.type);
|
|
4438
|
+
}
|
|
4439
|
+
return message;
|
|
4440
|
+
}
|
|
4184
4441
|
export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
4442
|
+
HubExecutionAgentCreateResponseSchema,
|
|
4443
|
+
HubExecutionAgentUpdateSchema,
|
|
4444
|
+
HubExecutionAgentStreamSchema,
|
|
4185
4445
|
BrowserAutomationExecuteRequestSchema,
|
|
4186
4446
|
ActivityLogMessageSchema,
|
|
4187
4447
|
AssistantChunkMessageSchema,
|
|
@@ -4199,6 +4459,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
4199
4459
|
ArtifactMessageSchema,
|
|
4200
4460
|
AgentUpdateMessageSchema,
|
|
4201
4461
|
WorkspaceUpdateMessageSchema,
|
|
4462
|
+
ProjectUpdateMessageSchema,
|
|
4202
4463
|
ScriptStatusUpdateMessageSchema,
|
|
4203
4464
|
WorkspaceSetupProgressMessageSchema,
|
|
4204
4465
|
WorkspaceSetupStatusResponseMessageSchema,
|
|
@@ -4222,6 +4483,8 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
4222
4483
|
ProviderSubagentListResponseMessageSchema,
|
|
4223
4484
|
ProviderSubagentTimelineResponseMessageSchema,
|
|
4224
4485
|
ProviderSubagentUpdateMessageSchema,
|
|
4486
|
+
SetAgentTimelineSubscriptionResponseMessageSchema,
|
|
4487
|
+
AgentAttentionRequiredMessageSchema,
|
|
4225
4488
|
AgentForkContextResponseMessageSchema,
|
|
4226
4489
|
CancelAgentResponseMessageSchema,
|
|
4227
4490
|
ClearAgentAttentionResponseMessageSchema,
|
|
@@ -4231,6 +4494,9 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
4231
4494
|
SetVoiceModeResponseMessageSchema,
|
|
4232
4495
|
DaemonGetStatusResponseSchema,
|
|
4233
4496
|
DaemonGetPairingOfferResponseSchema,
|
|
4497
|
+
HubManagementDaemonConnectResponseSchema,
|
|
4498
|
+
HubManagementDaemonGetStatusResponseSchema,
|
|
4499
|
+
HubManagementDaemonDisconnectResponseSchema,
|
|
4234
4500
|
DiagnosticsResponseSchema,
|
|
4235
4501
|
GetDaemonConfigResponseMessageSchema,
|
|
4236
4502
|
SetDaemonConfigResponseMessageSchema,
|
|
@@ -4289,6 +4555,10 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
4289
4555
|
PaseoWorktreeArchiveResponseSchema,
|
|
4290
4556
|
CreatePaseoWorktreeResponseSchema,
|
|
4291
4557
|
FileExplorerResponseSchema,
|
|
4558
|
+
FileSubscribeResponseSchema,
|
|
4559
|
+
FileUnsubscribeResponseSchema,
|
|
4560
|
+
FileWriteResponseSchema,
|
|
4561
|
+
FileUpdateSchema,
|
|
4292
4562
|
ProjectIconResponseSchema,
|
|
4293
4563
|
FileDownloadTokenResponseSchema,
|
|
4294
4564
|
FileUploadResponseSchema,
|
|
@@ -4356,9 +4626,11 @@ export const WSHelloMessageSchema = z.object({
|
|
|
4356
4626
|
voice: z.boolean().optional(),
|
|
4357
4627
|
pushNotifications: z.boolean().optional(),
|
|
4358
4628
|
[CLIENT_CAPS.reasoningMergeEnum]: z.boolean().optional(),
|
|
4629
|
+
[CLIENT_CAPS.selectiveAgentTimeline]: z.boolean().optional(),
|
|
4359
4630
|
[CLIENT_CAPS.customModeIcons]: z.boolean().optional(),
|
|
4360
4631
|
[CLIENT_CAPS.terminalReflowableSnapshot]: z.boolean().optional(),
|
|
4361
4632
|
[CLIENT_CAPS.providerSubagents]: z.boolean().optional(),
|
|
4633
|
+
[CLIENT_CAPS.projectUpdates]: z.boolean().optional(),
|
|
4362
4634
|
[CLIENT_CAPS.browserHost]: BrowserAutomationHostCapabilitySchema.optional(),
|
|
4363
4635
|
})
|
|
4364
4636
|
.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
|
|
@@ -110,6 +110,13 @@ export const OMP_MODES = [
|
|
|
110
110
|
colorTier: "dangerous",
|
|
111
111
|
isUnattended: true,
|
|
112
112
|
},
|
|
113
|
+
{
|
|
114
|
+
id: "write",
|
|
115
|
+
label: "Write Approval",
|
|
116
|
+
description: "Launches OMP with write approval mode — reads are free, writes require approval.",
|
|
117
|
+
icon: "ShieldAlert",
|
|
118
|
+
colorTier: "moderate",
|
|
119
|
+
},
|
|
113
120
|
{
|
|
114
121
|
id: "ask",
|
|
115
122
|
label: "Always Ask",
|
|
@@ -141,7 +148,7 @@ export const AGENT_PROVIDER_DEFINITIONS = [
|
|
|
141
148
|
id: "claude",
|
|
142
149
|
label: "Claude",
|
|
143
150
|
description: "Anthropic's multi-tool assistant with MCP support, streaming, and deep reasoning",
|
|
144
|
-
defaultModeId: "
|
|
151
|
+
defaultModeId: "auto",
|
|
145
152
|
modes: CLAUDE_MODES,
|
|
146
153
|
voice: {
|
|
147
154
|
enabled: true,
|
|
@@ -153,7 +160,7 @@ export const AGENT_PROVIDER_DEFINITIONS = [
|
|
|
153
160
|
id: "codex",
|
|
154
161
|
label: "Codex",
|
|
155
162
|
description: "OpenAI's Codex workspace agent with sandbox controls and optional network access",
|
|
156
|
-
defaultModeId: "auto",
|
|
163
|
+
defaultModeId: "auto-review",
|
|
157
164
|
modes: CODEX_MODES,
|
|
158
165
|
voice: {
|
|
159
166
|
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
|