@camerontaylor/paseo-protocol 0.8.0-fork.1 → 0.8.0-fork.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/browser-automation/rpc-schemas.d.ts +1 -0
- package/dist/browser-automation/rpc-schemas.js +1 -0
- package/dist/client-capabilities.d.ts +1 -0
- package/dist/client-capabilities.js +2 -0
- package/dist/generated/validation/ws-outbound.aot.js +46909 -61136
- package/dist/messages.d.ts +20683 -33337
- package/dist/messages.js +91 -94
- package/dist/validation/ws-outbound-schema-metadata.d.ts +153 -2797
- package/package.json +5 -1
package/dist/messages.js
CHANGED
|
@@ -10,7 +10,7 @@ import { WORKSPACE_LABEL_COLORS } from "./workspace-labels.js";
|
|
|
10
10
|
import { ChatCreateRequestSchema, ChatListRequestSchema, ChatInspectRequestSchema, ChatDeleteRequestSchema, ChatPostRequestSchema, ChatReadRequestSchema, ChatWaitRequestSchema, ChatCreateResponseSchema, ChatListResponseSchema, ChatInspectResponseSchema, ChatDeleteResponseSchema, ChatPostResponseSchema, ChatReadResponseSchema, ChatWaitResponseSchema, } from "./chat/rpc-schemas.js";
|
|
11
11
|
import { ScheduleCreateRequestSchema, ScheduleListRequestSchema, ScheduleInspectRequestSchema, ScheduleLogsRequestSchema, SchedulePauseRequestSchema, ScheduleResumeRequestSchema, ScheduleDeleteRequestSchema, ScheduleRunOnceRequestSchema, ScheduleUpdateRequestSchema, ScheduleCreateResponseSchema, ScheduleListResponseSchema, ScheduleInspectResponseSchema, ScheduleLogsResponseSchema, SchedulePauseResponseSchema, ScheduleResumeResponseSchema, ScheduleDeleteResponseSchema, ScheduleRunOnceResponseSchema, ScheduleUpdateResponseSchema, } from "./schedule/rpc-schemas.js";
|
|
12
12
|
import { LoopRunRequestSchema, LoopListRequestSchema, LoopInspectRequestSchema, LoopLogsRequestSchema, LoopStopRequestSchema, LoopRunResponseSchema, LoopListResponseSchema, LoopInspectResponseSchema, LoopLogsResponseSchema, LoopStopResponseSchema, } from "./loop/rpc-schemas.js";
|
|
13
|
-
import { BrowserAutomationExecuteRequestSchema, BrowserAutomationExecuteResponseSchema, } from "./browser-automation/rpc-schemas.js";
|
|
13
|
+
import { BROWSER_AUTOMATION_COMMAND_NAMES, BrowserAutomationExecuteRequestSchema, BrowserAutomationExecuteResponseSchema, } from "./browser-automation/rpc-schemas.js";
|
|
14
14
|
import { BrowserAutomationHostCapabilitySchema } from "./browser-automation/capabilities.js";
|
|
15
15
|
import { PaseoConfigRawSchema, PaseoLifecycleCommandRawSchema, PaseoMetadataGenerationEntrySchema, PaseoMetadataGenerationSchema, PaseoScriptEntryRawSchema, PaseoWorktreeConfigRawSchema, PaseoConfigRevisionSchema, ProjectConfigRpcErrorSchema, } from "./paseo-config-schema.js";
|
|
16
16
|
export { PaseoConfigRawSchema, PaseoLifecycleCommandRawSchema, PaseoMetadataGenerationEntrySchema, PaseoMetadataGenerationSchema, PaseoScriptEntryRawSchema, PaseoWorktreeConfigRawSchema, };
|
|
@@ -842,7 +842,7 @@ const WorkspaceLabelSyncCursorSchema = z.object({
|
|
|
842
842
|
export const WorkspaceLabelListRequestSchema = z.object({
|
|
843
843
|
type: z.literal("workspace.label.list.request"),
|
|
844
844
|
requestId: z.string(),
|
|
845
|
-
subscribe: z.object({ subscriptionId: z.string() }),
|
|
845
|
+
subscribe: z.object({ subscriptionId: z.string().optional() }).optional(),
|
|
846
846
|
sync: WorkspaceLabelSyncCursorSchema.optional(),
|
|
847
847
|
});
|
|
848
848
|
export const WorkspaceLabelAssignmentSetRequestSchema = z.object({
|
|
@@ -1397,7 +1397,7 @@ export const CreateAgentWorktreeTargetSchema = z.discriminatedUnion("mode", [
|
|
|
1397
1397
|
]);
|
|
1398
1398
|
export const CreateAgentRequestMessageSchema = z.object({
|
|
1399
1399
|
type: z.literal("create_agent_request"),
|
|
1400
|
-
//
|
|
1400
|
+
// A creation key requires initialPrompt to be sent separately with a stable messageId.
|
|
1401
1401
|
idempotencyKey: z.string().min(1).max(512).optional(),
|
|
1402
1402
|
config: AgentSessionConfigSchema,
|
|
1403
1403
|
env: z.record(z.string(), z.string()).optional(),
|
|
@@ -1417,30 +1417,6 @@ export const CreateAgentRequestMessageSchema = z.object({
|
|
|
1417
1417
|
labels: z.record(z.string(), z.string()).default({}),
|
|
1418
1418
|
requestId: z.string(),
|
|
1419
1419
|
});
|
|
1420
|
-
/** Resource IDs are optional on creation; supplied IDs retain their identity on replay. */
|
|
1421
|
-
export const AgentCreateRequestSchema = CreateAgentRequestMessageSchema.extend({
|
|
1422
|
-
type: z.literal("agent.create.request"),
|
|
1423
|
-
agentId: z.uuid().optional(),
|
|
1424
|
-
attachments: z.array(AgentAttachmentSchema).optional(),
|
|
1425
|
-
subscribe: z.boolean().optional(),
|
|
1426
|
-
});
|
|
1427
|
-
export const WorkspaceInitialAgentSchema = AgentCreateRequestSchema.omit({
|
|
1428
|
-
type: true,
|
|
1429
|
-
requestId: true,
|
|
1430
|
-
idempotencyKey: true,
|
|
1431
|
-
subscribe: true,
|
|
1432
|
-
workspaceId: true,
|
|
1433
|
-
worktree: true,
|
|
1434
|
-
worktreeName: true,
|
|
1435
|
-
git: true,
|
|
1436
|
-
});
|
|
1437
|
-
export const CreationSubscribeRequestSchema = z.object({
|
|
1438
|
-
type: z.literal("creation.subscribe.request"),
|
|
1439
|
-
requestId: z.string(),
|
|
1440
|
-
kind: z.enum(["workspace", "agent"]),
|
|
1441
|
-
idempotencyKey: z.string().min(1).max(512),
|
|
1442
|
-
subscribe: z.boolean().optional(),
|
|
1443
|
-
});
|
|
1444
1420
|
export const ListProviderModelsRequestMessageSchema = z.object({
|
|
1445
1421
|
type: z.literal("list_provider_models_request"),
|
|
1446
1422
|
provider: AgentProviderSchema,
|
|
@@ -1815,7 +1791,13 @@ export const CheckoutStatusRequestSchema = z.object({
|
|
|
1815
1791
|
});
|
|
1816
1792
|
export const SubscribeCheckoutDiffRequestSchema = z.object({
|
|
1817
1793
|
type: z.literal("subscribe_checkout_diff_request"),
|
|
1818
|
-
subscriptionId: z.string(),
|
|
1794
|
+
subscriptionId: z.string().optional(),
|
|
1795
|
+
cwd: z.string(),
|
|
1796
|
+
compare: CheckoutDiffCompareSchema,
|
|
1797
|
+
requestId: z.string(),
|
|
1798
|
+
});
|
|
1799
|
+
export const CheckoutDiffGetRequestSchema = z.object({
|
|
1800
|
+
type: z.literal("checkout.diff.get.request"),
|
|
1819
1801
|
cwd: z.string(),
|
|
1820
1802
|
compare: CheckoutDiffCompareSchema,
|
|
1821
1803
|
requestId: z.string(),
|
|
@@ -2197,14 +2179,7 @@ export const ArchiveWorkspaceRequestSchema = z.object({
|
|
|
2197
2179
|
// between an existing local directory and a newly created paseo worktree.
|
|
2198
2180
|
export const WorkspaceCreateRequestSchema = z.object({
|
|
2199
2181
|
type: z.literal("workspace.create.request"),
|
|
2200
|
-
workspaceId: z
|
|
2201
|
-
.string()
|
|
2202
|
-
.regex(/^wks_[a-f0-9]{16}$/)
|
|
2203
|
-
.optional(),
|
|
2204
|
-
agent: WorkspaceInitialAgentSchema.optional(),
|
|
2205
|
-
subscribe: z.boolean().optional(),
|
|
2206
2182
|
requestId: z.string(),
|
|
2207
|
-
idempotencyKey: z.string().min(1).max(512).optional(),
|
|
2208
2183
|
// Optional user-set title applied to the created workspace.
|
|
2209
2184
|
title: z.string().optional(),
|
|
2210
2185
|
// Optional prompt context for workspace-level name/branch generation.
|
|
@@ -2330,7 +2305,7 @@ export const FileSubscribeRequestSchema = z.object({
|
|
|
2330
2305
|
type: z.literal("fs.file.subscribe.request"),
|
|
2331
2306
|
cwd: z.string(),
|
|
2332
2307
|
path: z.string(),
|
|
2333
|
-
subscriptionId: z.string(),
|
|
2308
|
+
subscriptionId: z.string().optional(),
|
|
2334
2309
|
requestId: z.string(),
|
|
2335
2310
|
});
|
|
2336
2311
|
export const FileUnsubscribeRequestSchema = z.object({
|
|
@@ -2463,6 +2438,7 @@ export const ListTerminalsRequestSchema = z.object({
|
|
|
2463
2438
|
});
|
|
2464
2439
|
export const SubscribeTerminalsRequestSchema = z.object({
|
|
2465
2440
|
type: z.literal("subscribe_terminals_request"),
|
|
2441
|
+
requestId: z.string().optional(),
|
|
2466
2442
|
cwd: z.string(),
|
|
2467
2443
|
workspaceId: z.string().optional(),
|
|
2468
2444
|
});
|
|
@@ -2637,17 +2613,51 @@ export const SessionEventSubscriptionSchema = z.enum([
|
|
|
2637
2613
|
"agent_attention_required",
|
|
2638
2614
|
"agent_permission_request",
|
|
2639
2615
|
"agent_permission_resolved",
|
|
2616
|
+
"checkout_status_update",
|
|
2617
|
+
"script_status_update",
|
|
2618
|
+
"workspace_setup_progress",
|
|
2619
|
+
"agent.provider_subagents.update",
|
|
2620
|
+
"terminal_attention_required",
|
|
2621
|
+
"status.server_info",
|
|
2622
|
+
"status.daemon_config_changed",
|
|
2623
|
+
"status.plugin_catalog_changed",
|
|
2624
|
+
"status.plugin_settings_changed",
|
|
2625
|
+
"activity_log",
|
|
2626
|
+
"hub.execution.agent.update",
|
|
2627
|
+
"hub.execution.agent.stream",
|
|
2640
2628
|
]);
|
|
2641
2629
|
export const SessionEventsSetSubscriptionRequestSchema = z.object({
|
|
2642
2630
|
type: z.literal("session.events.set_subscription.request"),
|
|
2643
2631
|
requestId: z.string(),
|
|
2644
2632
|
events: z.array(SessionEventSubscriptionSchema),
|
|
2633
|
+
notifications: z.boolean().optional(),
|
|
2645
2634
|
});
|
|
2646
2635
|
export const SessionEventsSetSubscriptionResponseSchema = z.object({
|
|
2647
2636
|
type: z.literal("session.events.set_subscription.response"),
|
|
2648
|
-
payload: z.object({ requestId: z.string() }),
|
|
2637
|
+
payload: z.object({ requestId: z.string(), subscriptionId: z.string().optional() }),
|
|
2638
|
+
});
|
|
2639
|
+
export const BrowserHostRegisterRequestSchema = z.object({
|
|
2640
|
+
type: z.literal("browser.host.register.request"),
|
|
2641
|
+
requestId: z.string(),
|
|
2642
|
+
hostKind: z.string().min(1),
|
|
2643
|
+
supportedCommands: z.array(z.enum(BROWSER_AUTOMATION_COMMAND_NAMES)).min(1),
|
|
2644
|
+
});
|
|
2645
|
+
export const BrowserHostRegisterResponseSchema = z.object({
|
|
2646
|
+
type: z.literal("browser.host.register.response"),
|
|
2647
|
+
payload: z.object({ requestId: z.string(), subscriptionId: z.string() }),
|
|
2648
|
+
});
|
|
2649
|
+
export const SubscriptionReleaseRequestSchema = z.object({
|
|
2650
|
+
type: z.literal("subscription.release.request"),
|
|
2651
|
+
requestId: z.string(),
|
|
2652
|
+
subscriptionId: z.string(),
|
|
2653
|
+
});
|
|
2654
|
+
export const SubscriptionReleaseResponseSchema = z.object({
|
|
2655
|
+
type: z.literal("subscription.release.response"),
|
|
2656
|
+
payload: z.object({ requestId: z.string(), subscriptionId: z.string() }),
|
|
2649
2657
|
});
|
|
2650
2658
|
export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
2659
|
+
BrowserHostRegisterRequestSchema,
|
|
2660
|
+
SubscriptionReleaseRequestSchema,
|
|
2651
2661
|
SessionEventsSetSubscriptionRequestSchema,
|
|
2652
2662
|
HubExecutionAgentCreateRequestSchema,
|
|
2653
2663
|
HubExecutionAgentValidateRequestSchema,
|
|
@@ -2750,6 +2760,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2750
2760
|
AgentRewindRequestMessageSchema,
|
|
2751
2761
|
AgentPermissionResponseMessageSchema,
|
|
2752
2762
|
CheckoutStatusRequestSchema,
|
|
2763
|
+
CheckoutDiffGetRequestSchema,
|
|
2753
2764
|
SubscribeCheckoutDiffRequestSchema,
|
|
2754
2765
|
UnsubscribeCheckoutDiffRequestSchema,
|
|
2755
2766
|
CheckoutCommitRequestSchema,
|
|
@@ -2793,8 +2804,6 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2793
2804
|
ProjectGithubCloneRequestSchema,
|
|
2794
2805
|
ArchiveWorkspaceRequestSchema,
|
|
2795
2806
|
WorkspaceCreateRequestSchema,
|
|
2796
|
-
AgentCreateRequestSchema,
|
|
2797
|
-
CreationSubscribeRequestSchema,
|
|
2798
2807
|
WorkspaceClearAttentionRequestSchema,
|
|
2799
2808
|
WorkspaceMarkUnreadRequestSchema,
|
|
2800
2809
|
FileExplorerRequestSchema,
|
|
@@ -2855,6 +2864,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2855
2864
|
// Session Outbound Messages (Session emits these)
|
|
2856
2865
|
// ============================================================================
|
|
2857
2866
|
export const ActivityLogPayloadSchema = z.object({
|
|
2867
|
+
subscriptionId: z.string().optional(),
|
|
2858
2868
|
id: z.string(),
|
|
2859
2869
|
timestamp: z.coerce.date(),
|
|
2860
2870
|
type: z.enum(["transcript", "assistant", "tool_call", "tool_result", "error", "system"]),
|
|
@@ -2999,9 +3009,6 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
2999
3009
|
.object({
|
|
3000
3010
|
// COMPAT(agentRequestReceipts): added in v0.8.0; remove gate after 2027-03-05.
|
|
3001
3011
|
agentRequestReceipts: z.boolean().optional(),
|
|
3002
|
-
// COMPAT(workspaceRequestReceipts): added in v0.8.0; remove gate after 2027-03-07.
|
|
3003
|
-
workspaceRequestReceipts: z.boolean().optional(),
|
|
3004
|
-
creationLifecycle: z.boolean().optional(),
|
|
3005
3012
|
// COMPAT(hubAgentRpc): added in v0.8.0; remove gate after 2027-03-05.
|
|
3006
3013
|
hubAgentRpc: z.boolean().optional(),
|
|
3007
3014
|
providersSnapshot: z.boolean().optional(),
|
|
@@ -3142,6 +3149,7 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3142
3149
|
// COMPAT(selectiveAgentTimeline): added in v0.1.106, remove after 2027-01-12.
|
|
3143
3150
|
selectiveAgentTimeline: z.boolean().optional(),
|
|
3144
3151
|
explicitEventSubscriptions: z.boolean().optional(),
|
|
3152
|
+
ownedSubscriptions: z.boolean().optional(),
|
|
3145
3153
|
// COMPAT(canonicalSubmittedPrompts): added in v0.2.6, remove gate after 2027-01-30.
|
|
3146
3154
|
canonicalSubmittedPrompts: z.boolean().optional(),
|
|
3147
3155
|
// COMPAT(agentTurnIdentity): accept peers that observed pre-release v0.2.6 through 2027-01-31.
|
|
@@ -3479,6 +3487,7 @@ export const AgentUpdateMessageSchema = z.object({
|
|
|
3479
3487
|
type: z.literal("agent_update"),
|
|
3480
3488
|
payload: z.discriminatedUnion("kind", [
|
|
3481
3489
|
z.object({
|
|
3490
|
+
subscriptionId: z.string().optional(),
|
|
3482
3491
|
kind: z.literal("upsert"),
|
|
3483
3492
|
agent: AgentSnapshotPayloadSchema,
|
|
3484
3493
|
project: ProjectPlacementPayloadSchema.nullable().optional(),
|
|
@@ -3486,6 +3495,7 @@ export const AgentUpdateMessageSchema = z.object({
|
|
|
3486
3495
|
seq: z.number().int().positive().optional(),
|
|
3487
3496
|
}),
|
|
3488
3497
|
z.object({
|
|
3498
|
+
subscriptionId: z.string().optional(),
|
|
3489
3499
|
kind: z.literal("remove"),
|
|
3490
3500
|
agentId: z.string(),
|
|
3491
3501
|
generation: z.string().optional(),
|
|
@@ -3496,6 +3506,7 @@ export const AgentUpdateMessageSchema = z.object({
|
|
|
3496
3506
|
export const AgentStreamMessageSchema = z.object({
|
|
3497
3507
|
type: z.literal("agent_stream"),
|
|
3498
3508
|
payload: z.object({
|
|
3509
|
+
subscriptionId: z.string().optional(),
|
|
3499
3510
|
agentId: z.string(),
|
|
3500
3511
|
event: AgentStreamEventPayloadSchema,
|
|
3501
3512
|
timestamp: z.string(),
|
|
@@ -3624,12 +3635,14 @@ export const WorkspaceUpdateMessageSchema = z.object({
|
|
|
3624
3635
|
type: z.literal("workspace_update"),
|
|
3625
3636
|
payload: z.discriminatedUnion("kind", [
|
|
3626
3637
|
z.object({
|
|
3638
|
+
subscriptionId: z.string().optional(),
|
|
3627
3639
|
kind: z.literal("upsert"),
|
|
3628
3640
|
workspace: WorkspaceDescriptorPayloadSchema,
|
|
3629
3641
|
generation: z.string().optional(),
|
|
3630
3642
|
seq: z.number().int().positive().optional(),
|
|
3631
3643
|
}),
|
|
3632
3644
|
z.object({
|
|
3645
|
+
subscriptionId: z.string().optional(),
|
|
3633
3646
|
kind: z.literal("remove"),
|
|
3634
3647
|
id: z.string(),
|
|
3635
3648
|
// COMPAT(workspaceProjects): added in v0.1.97, drop the optional gate when floor >= v0.1.97.
|
|
@@ -3657,6 +3670,7 @@ export const WorkspaceLabelListResponseSchema = z.object({
|
|
|
3657
3670
|
type: z.literal("workspace.label.list.response"),
|
|
3658
3671
|
payload: z.object({
|
|
3659
3672
|
requestId: z.string(),
|
|
3673
|
+
subscriptionId: z.string().optional(),
|
|
3660
3674
|
labels: z.array(WorkspaceLabelDefinitionSchema),
|
|
3661
3675
|
sync: WorkspaceLabelSyncMetadataSchema,
|
|
3662
3676
|
}),
|
|
@@ -3665,6 +3679,7 @@ export const WorkspaceLabelUpdateSchema = z.object({
|
|
|
3665
3679
|
type: z.literal("workspace.label.update"),
|
|
3666
3680
|
payload: z.discriminatedUnion("kind", [
|
|
3667
3681
|
z.object({
|
|
3682
|
+
subscriptionId: z.string().optional(),
|
|
3668
3683
|
kind: z.literal("upsert"),
|
|
3669
3684
|
label: WorkspaceLabelDefinitionSchema,
|
|
3670
3685
|
previousName: z.string().optional(),
|
|
@@ -3672,6 +3687,7 @@ export const WorkspaceLabelUpdateSchema = z.object({
|
|
|
3672
3687
|
seq: z.number().int().positive(),
|
|
3673
3688
|
}),
|
|
3674
3689
|
z.object({
|
|
3690
|
+
subscriptionId: z.string().optional(),
|
|
3675
3691
|
kind: z.literal("remove"),
|
|
3676
3692
|
name: z.string(),
|
|
3677
3693
|
generation: z.string(),
|
|
@@ -3713,12 +3729,14 @@ export const ProjectUpdateMessageSchema = z.object({
|
|
|
3713
3729
|
type: z.literal("project.update"),
|
|
3714
3730
|
payload: z.discriminatedUnion("kind", [
|
|
3715
3731
|
z.object({
|
|
3732
|
+
subscriptionId: z.string().optional(),
|
|
3716
3733
|
kind: z.literal("upsert"),
|
|
3717
3734
|
project: WorkspaceProjectDescriptorPayloadSchema,
|
|
3718
3735
|
generation: z.string().optional(),
|
|
3719
3736
|
seq: z.number().int().positive().optional(),
|
|
3720
3737
|
}),
|
|
3721
3738
|
z.object({
|
|
3739
|
+
subscriptionId: z.string().optional(),
|
|
3722
3740
|
kind: z.literal("remove"),
|
|
3723
3741
|
projectId: z.string(),
|
|
3724
3742
|
generation: z.string().optional(),
|
|
@@ -3737,6 +3755,7 @@ export const ProjectListResponseMessageSchema = z.object({
|
|
|
3737
3755
|
export const ScriptStatusUpdateMessageSchema = z.object({
|
|
3738
3756
|
type: z.literal("script_status_update"),
|
|
3739
3757
|
payload: z.object({
|
|
3758
|
+
subscriptionId: z.string().optional(),
|
|
3740
3759
|
workspaceId: z.string(),
|
|
3741
3760
|
scripts: z.array(WorkspaceScriptPayloadSchema),
|
|
3742
3761
|
}),
|
|
@@ -3744,6 +3763,7 @@ export const ScriptStatusUpdateMessageSchema = z.object({
|
|
|
3744
3763
|
export const WorkspaceSetupProgressMessageSchema = z.object({
|
|
3745
3764
|
type: z.literal("workspace_setup_progress"),
|
|
3746
3765
|
payload: z.object({
|
|
3766
|
+
subscriptionId: z.string().optional(),
|
|
3747
3767
|
workspaceId: z.string(),
|
|
3748
3768
|
status: z.enum(["running", "completed", "failed", "blocked"]),
|
|
3749
3769
|
detail: WorktreeSetupDetailPayloadSchema,
|
|
@@ -3981,6 +4001,7 @@ export const FetchAgentTimelineResponseMessageSchema = z.object({
|
|
|
3981
4001
|
export const AgentTimelineReplacementMessageSchema = z.object({
|
|
3982
4002
|
type: z.literal("agent.timeline.replacement"),
|
|
3983
4003
|
payload: z.object({
|
|
4004
|
+
subscriptionId: z.string().optional(),
|
|
3984
4005
|
agentId: z.string(),
|
|
3985
4006
|
epoch: z.string(),
|
|
3986
4007
|
}),
|
|
@@ -4056,10 +4077,12 @@ export const ProviderSubagentUpdateMessageSchema = z.object({
|
|
|
4056
4077
|
type: z.literal("agent.provider_subagents.update"),
|
|
4057
4078
|
payload: z.discriminatedUnion("kind", [
|
|
4058
4079
|
z.object({
|
|
4080
|
+
subscriptionId: z.string().optional(),
|
|
4059
4081
|
kind: z.literal("upsert"),
|
|
4060
4082
|
subagent: ProviderSubagentDescriptorPayloadSchema,
|
|
4061
4083
|
}),
|
|
4062
4084
|
z.object({
|
|
4085
|
+
subscriptionId: z.string().optional(),
|
|
4063
4086
|
kind: z.literal("timeline"),
|
|
4064
4087
|
parentAgentId: z.string(),
|
|
4065
4088
|
subagentId: z.string(),
|
|
@@ -4070,6 +4093,7 @@ export const ProviderSubagentUpdateMessageSchema = z.object({
|
|
|
4070
4093
|
epoch: z.string(),
|
|
4071
4094
|
}),
|
|
4072
4095
|
z.object({
|
|
4096
|
+
subscriptionId: z.string().optional(),
|
|
4073
4097
|
kind: z.literal("remove"),
|
|
4074
4098
|
parentAgentId: z.string(),
|
|
4075
4099
|
subagentId: z.string(),
|
|
@@ -4146,6 +4170,7 @@ export const SideConversationRemovedMessageSchema = z.object({
|
|
|
4146
4170
|
export const SetAgentTimelineSubscriptionResponseMessageSchema = z.object({
|
|
4147
4171
|
type: z.literal("agent.timeline.set_subscription.response"),
|
|
4148
4172
|
payload: z.object({
|
|
4173
|
+
subscriptionId: z.string().optional(),
|
|
4149
4174
|
agentIds: z.array(z.string()),
|
|
4150
4175
|
requestId: z.string(),
|
|
4151
4176
|
}),
|
|
@@ -4153,6 +4178,7 @@ export const SetAgentTimelineSubscriptionResponseMessageSchema = z.object({
|
|
|
4153
4178
|
export const AgentAttentionRequiredMessageSchema = z.object({
|
|
4154
4179
|
type: z.literal("agent_attention_required"),
|
|
4155
4180
|
payload: z.object({
|
|
4181
|
+
subscriptionId: z.string().optional(),
|
|
4156
4182
|
agentId: z.string(),
|
|
4157
4183
|
reason: z.enum(["finished", "error", "permission"]),
|
|
4158
4184
|
timestamp: z.string(),
|
|
@@ -4200,57 +4226,9 @@ export const ClearAgentAttentionResponseMessageSchema = z.object({
|
|
|
4200
4226
|
agents: z.array(AgentSnapshotPayloadSchema),
|
|
4201
4227
|
}),
|
|
4202
4228
|
});
|
|
4203
|
-
export const CreationSnapshotSchema = z.object({
|
|
4204
|
-
kind: z.enum(["workspace", "agent"]),
|
|
4205
|
-
idempotencyKey: z.string(),
|
|
4206
|
-
revision: z.number().int().nonnegative(),
|
|
4207
|
-
phase: z.enum([
|
|
4208
|
-
"accepted",
|
|
4209
|
-
"workspace_ready",
|
|
4210
|
-
"agent_ready",
|
|
4211
|
-
"prompt_started",
|
|
4212
|
-
"completed",
|
|
4213
|
-
"failed",
|
|
4214
|
-
]),
|
|
4215
|
-
workspaceId: z.string().nullable(),
|
|
4216
|
-
agentId: z.string().nullable(),
|
|
4217
|
-
workspace: WorkspaceDescriptorPayloadSchema.optional(),
|
|
4218
|
-
agent: AgentSnapshotPayloadSchema.optional(),
|
|
4219
|
-
error: z.string().nullable(),
|
|
4220
|
-
setupSkippedReason: z.string().optional(),
|
|
4221
|
-
errorCode: z.string().optional(),
|
|
4222
|
-
failedStage: z.enum(["workspace", "agent", "prompt"]).optional(),
|
|
4223
|
-
outcomeUnknown: z.boolean().optional(),
|
|
4224
|
-
});
|
|
4225
|
-
export const WorkspaceCreationUpdateSchema = z.object({
|
|
4226
|
-
type: z.literal("workspace.create.update"),
|
|
4227
|
-
payload: CreationSnapshotSchema,
|
|
4228
|
-
});
|
|
4229
|
-
export const AgentCreationUpdateSchema = WorkspaceCreationUpdateSchema.extend({
|
|
4230
|
-
type: z.literal("agent.create.update"),
|
|
4231
|
-
});
|
|
4232
|
-
export const CreationSubscribeResponseSchema = z.object({
|
|
4233
|
-
type: z.literal("creation.subscribe.response"),
|
|
4234
|
-
payload: z.object({
|
|
4235
|
-
requestId: z.string(),
|
|
4236
|
-
snapshot: CreationSnapshotSchema.nullable(),
|
|
4237
|
-
error: z.string().nullable(),
|
|
4238
|
-
}),
|
|
4239
|
-
});
|
|
4240
|
-
export const AgentCreateResponseSchema = z.object({
|
|
4241
|
-
type: z.literal("agent.create.response"),
|
|
4242
|
-
payload: z.object({
|
|
4243
|
-
requestId: z.string(),
|
|
4244
|
-
agent: AgentSnapshotPayloadSchema.nullable(),
|
|
4245
|
-
error: z.string().nullable(),
|
|
4246
|
-
creation: CreationSnapshotSchema.optional(),
|
|
4247
|
-
}),
|
|
4248
|
-
});
|
|
4249
4229
|
export const WorkspaceCreateResponseSchema = z.object({
|
|
4250
4230
|
type: z.literal("workspace.create.response"),
|
|
4251
4231
|
payload: z.object({
|
|
4252
|
-
agent: AgentSnapshotPayloadSchema.optional(),
|
|
4253
|
-
creation: CreationSnapshotSchema.optional(),
|
|
4254
4232
|
workspace: WorkspaceDescriptorPayloadSchema.nullable(),
|
|
4255
4233
|
setupTerminalId: z.string().nullable(),
|
|
4256
4234
|
setupSkippedReason: z.string().optional(),
|
|
@@ -4462,6 +4440,7 @@ export const WriteProjectConfigResponseMessageSchema = z.object({
|
|
|
4462
4440
|
export const AgentPermissionRequestMessageSchema = z.object({
|
|
4463
4441
|
type: z.literal("agent_permission_request"),
|
|
4464
4442
|
payload: z.object({
|
|
4443
|
+
subscriptionId: z.string().optional(),
|
|
4465
4444
|
agentId: z.string(),
|
|
4466
4445
|
request: AgentPermissionRequestPayloadSchema,
|
|
4467
4446
|
}),
|
|
@@ -4469,6 +4448,7 @@ export const AgentPermissionRequestMessageSchema = z.object({
|
|
|
4469
4448
|
export const AgentPermissionResolvedMessageSchema = z.object({
|
|
4470
4449
|
type: z.literal("agent_permission_resolved"),
|
|
4471
4450
|
payload: z.object({
|
|
4451
|
+
subscriptionId: z.string().optional(),
|
|
4472
4452
|
agentId: z.string(),
|
|
4473
4453
|
requestId: z.string(),
|
|
4474
4454
|
resolution: AgentPermissionResponseSchema,
|
|
@@ -4677,6 +4657,7 @@ const CheckoutPrStatusPayloadSchema = z.object({
|
|
|
4677
4657
|
requestId: z.string(),
|
|
4678
4658
|
});
|
|
4679
4659
|
const CheckoutStatusUpdateMetadataSchema = z.object({
|
|
4660
|
+
subscriptionId: z.string().optional(),
|
|
4680
4661
|
prStatus: CheckoutPrStatusPayloadSchema.optional(),
|
|
4681
4662
|
});
|
|
4682
4663
|
export const CheckoutStatusUpdateSchema = z.object({
|
|
@@ -4703,6 +4684,12 @@ export const SubscribeCheckoutDiffResponseSchema = z.object({
|
|
|
4703
4684
|
requestId: z.string(),
|
|
4704
4685
|
}),
|
|
4705
4686
|
});
|
|
4687
|
+
export const CheckoutDiffGetResponseSchema = z.object({
|
|
4688
|
+
type: z.literal("checkout.diff.get.response"),
|
|
4689
|
+
payload: CheckoutDiffSubscriptionPayloadSchema.omit({ subscriptionId: true }).extend({
|
|
4690
|
+
requestId: z.string(),
|
|
4691
|
+
}),
|
|
4692
|
+
});
|
|
4706
4693
|
export const CheckoutDiffUpdateSchema = z.object({
|
|
4707
4694
|
type: z.literal("checkout_diff_update"),
|
|
4708
4695
|
payload: CheckoutDiffSubscriptionPayloadSchema,
|
|
@@ -5392,6 +5379,7 @@ export const GetProvidersSnapshotResponseMessageSchema = z.object({
|
|
|
5392
5379
|
export const ProvidersSnapshotUpdateMessageSchema = z.object({
|
|
5393
5380
|
type: z.literal("providers_snapshot_update"),
|
|
5394
5381
|
payload: z.object({
|
|
5382
|
+
subscriptionId: z.string().optional(),
|
|
5395
5383
|
cwd: z.string().optional(),
|
|
5396
5384
|
entries: z.array(ProviderSnapshotEntrySchema),
|
|
5397
5385
|
compactSnapshot: CompactProviderSnapshotSchema.optional(),
|
|
@@ -5541,6 +5529,9 @@ export const ListTerminalsResponseSchema = z.object({
|
|
|
5541
5529
|
export const TerminalsChangedSchema = z.object({
|
|
5542
5530
|
type: z.literal("terminals_changed"),
|
|
5543
5531
|
payload: z.object({
|
|
5532
|
+
subscriptionId: z.string().optional(),
|
|
5533
|
+
requestId: z.string().optional(),
|
|
5534
|
+
workspaceId: z.string().optional(),
|
|
5544
5535
|
cwd: z.string(),
|
|
5545
5536
|
terminals: z.array(TerminalInfoSchema.omit({ cwd: true })),
|
|
5546
5537
|
}),
|
|
@@ -5567,6 +5558,7 @@ export const SubscribeTerminalResponseSchema = z.object({
|
|
|
5567
5558
|
z.object({
|
|
5568
5559
|
terminalId: z.string(),
|
|
5569
5560
|
slot: z.number().int().min(0).max(255),
|
|
5561
|
+
subscriptionId: z.string().optional(),
|
|
5570
5562
|
error: z.null(),
|
|
5571
5563
|
requestId: z.string(),
|
|
5572
5564
|
}),
|
|
@@ -5597,12 +5589,16 @@ export const CaptureTerminalResponseSchema = z.object({
|
|
|
5597
5589
|
export const TerminalStreamExitSchema = z.object({
|
|
5598
5590
|
type: z.literal("terminal_stream_exit"),
|
|
5599
5591
|
payload: z.object({
|
|
5592
|
+
subscriptionId: z.string().optional(),
|
|
5600
5593
|
terminalId: z.string(),
|
|
5594
|
+
// Observation failure; the underlying terminal process may still be running.
|
|
5595
|
+
error: z.string().optional(),
|
|
5601
5596
|
}),
|
|
5602
5597
|
});
|
|
5603
5598
|
export const TerminalAttentionRequiredSchema = z.object({
|
|
5604
5599
|
type: z.literal("terminal_attention_required"),
|
|
5605
5600
|
payload: z.object({
|
|
5601
|
+
subscriptionId: z.string().optional(),
|
|
5606
5602
|
serverId: z.string().optional(),
|
|
5607
5603
|
terminalId: z.string(),
|
|
5608
5604
|
cwd: z.string(),
|
|
@@ -5668,6 +5664,7 @@ export const HubExecutionControlResponseSchema = z.object({
|
|
|
5668
5664
|
export const HubExecutionAgentUpdateSchema = z.object({
|
|
5669
5665
|
type: z.literal("hub.execution.agent.update"),
|
|
5670
5666
|
payload: z.object({
|
|
5667
|
+
subscriptionId: z.string().optional(),
|
|
5671
5668
|
executionId: z.string(),
|
|
5672
5669
|
agentId: z.string(),
|
|
5673
5670
|
agent: AgentSnapshotPayloadSchema,
|
|
@@ -5676,6 +5673,7 @@ export const HubExecutionAgentUpdateSchema = z.object({
|
|
|
5676
5673
|
export const HubExecutionAgentStreamSchema = z.object({
|
|
5677
5674
|
type: z.literal("hub.execution.agent.stream"),
|
|
5678
5675
|
payload: z.object({
|
|
5676
|
+
subscriptionId: z.string().optional(),
|
|
5679
5677
|
executionId: z.string(),
|
|
5680
5678
|
agentId: z.string(),
|
|
5681
5679
|
event: AgentStreamEventPayloadSchema,
|
|
@@ -5835,6 +5833,8 @@ export const AgentSkillsImportLegacySelectionResponseSchema = z.object({
|
|
|
5835
5833
|
}),
|
|
5836
5834
|
});
|
|
5837
5835
|
export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
5836
|
+
BrowserHostRegisterResponseSchema,
|
|
5837
|
+
SubscriptionReleaseResponseSchema,
|
|
5838
5838
|
SessionEventsSetSubscriptionResponseSchema,
|
|
5839
5839
|
HubExecutionAgentCreateResponseSchema,
|
|
5840
5840
|
HubExecutionAgentValidateResponseSchema,
|
|
@@ -5926,10 +5926,6 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
5926
5926
|
CancelAgentResponseMessageSchema,
|
|
5927
5927
|
ClearAgentAttentionResponseMessageSchema,
|
|
5928
5928
|
WorkspaceCreateResponseSchema,
|
|
5929
|
-
AgentCreateResponseSchema,
|
|
5930
|
-
WorkspaceCreationUpdateSchema,
|
|
5931
|
-
AgentCreationUpdateSchema,
|
|
5932
|
-
CreationSubscribeResponseSchema,
|
|
5933
5929
|
WorkspaceClearAttentionResponseSchema,
|
|
5934
5930
|
WorkspaceMarkUnreadResponseSchema,
|
|
5935
5931
|
SendAgentMessageResponseMessageSchema,
|
|
@@ -5969,6 +5965,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
5969
5965
|
CloseItemsResponseSchema,
|
|
5970
5966
|
CheckoutStatusResponseSchema,
|
|
5971
5967
|
CheckoutStatusUpdateSchema,
|
|
5968
|
+
CheckoutDiffGetResponseSchema,
|
|
5972
5969
|
SubscribeCheckoutDiffResponseSchema,
|
|
5973
5970
|
CheckoutDiffUpdateSchema,
|
|
5974
5971
|
CheckoutCommitResponseSchema,
|