@getpaseo/protocol 0.6.1 → 0.7.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/check-traits.d.ts +11 -0
- package/dist/check-traits.js +10 -0
- package/dist/client-capabilities.d.ts +1 -0
- package/dist/client-capabilities.js +3 -0
- package/dist/generated/validation/ws-outbound.aot.js +33775 -33330
- package/dist/gitea-status.d.ts +10 -0
- package/dist/gitea-status.js +23 -0
- package/dist/gitlab-pipeline.d.ts +10 -0
- package/dist/gitlab-pipeline.js +17 -0
- package/dist/messages.d.ts +579 -24
- package/dist/messages.js +150 -40
- package/dist/ssh-transport.d.ts +11 -0
- package/dist/ssh-transport.js +72 -0
- package/dist/validation/ws-outbound-schema-metadata.d.ts +116 -4
- package/package.json +1 -1
package/dist/messages.js
CHANGED
|
@@ -847,6 +847,9 @@ export const SetVoiceModeMessageSchema = z.object({
|
|
|
847
847
|
agentId: z.string().optional(),
|
|
848
848
|
requestId: z.string().optional(),
|
|
849
849
|
});
|
|
850
|
+
// COMPAT(githubAttachmentKinds): legacy wire attachment retained when
|
|
851
|
+
// forge-neutral attachments shipped in v0.2.0-beta.1. Stop emitting it after
|
|
852
|
+
// 2027-01-17 once supported client and daemon floors are >= v0.2.0.
|
|
850
853
|
export const GitHubPrAttachmentSchema = z.object({
|
|
851
854
|
type: z.literal("github_pr"),
|
|
852
855
|
mimeType: z.literal("application/github-pr"),
|
|
@@ -869,6 +872,9 @@ export const ForgeChangeRequestAttachmentSchema = z.object({
|
|
|
869
872
|
baseRefName: z.string().nullable().optional(),
|
|
870
873
|
headRefName: z.string().nullable().optional(),
|
|
871
874
|
});
|
|
875
|
+
// COMPAT(githubAttachmentKinds): legacy wire attachment retained when
|
|
876
|
+
// forge-neutral attachments shipped in v0.2.0-beta.1. Stop emitting it after
|
|
877
|
+
// 2027-01-17 once supported client and daemon floors are >= v0.2.0.
|
|
872
878
|
export const GitHubIssueAttachmentSchema = z.object({
|
|
873
879
|
type: z.literal("github_issue"),
|
|
874
880
|
mimeType: z.literal("application/github-issue"),
|
|
@@ -1182,6 +1188,24 @@ export const PluginDirectoryInspectRequestSchema = z.object({
|
|
|
1182
1188
|
requestId: z.string(),
|
|
1183
1189
|
path: z.string().min(1),
|
|
1184
1190
|
});
|
|
1191
|
+
export const PluginSourceInstallRequestSchema = z.object({
|
|
1192
|
+
type: z.literal("plugin.source.install.request"),
|
|
1193
|
+
requestId: z.string(),
|
|
1194
|
+
source: z.string().min(1),
|
|
1195
|
+
id: PluginIdSchema.optional(),
|
|
1196
|
+
ref: z.string().min(1).optional(),
|
|
1197
|
+
pluginPath: z.string().min(1).optional(),
|
|
1198
|
+
});
|
|
1199
|
+
export const PluginSourceStatusRequestSchema = z.object({
|
|
1200
|
+
type: z.literal("plugin.source.status.request"),
|
|
1201
|
+
requestId: z.string(),
|
|
1202
|
+
pluginId: PluginIdSchema.optional(),
|
|
1203
|
+
});
|
|
1204
|
+
export const PluginSourceUpdateRequestSchema = z.object({
|
|
1205
|
+
type: z.literal("plugin.source.update.request"),
|
|
1206
|
+
requestId: z.string(),
|
|
1207
|
+
pluginId: PluginIdSchema.optional(),
|
|
1208
|
+
});
|
|
1185
1209
|
function pluginIdRequest(type) {
|
|
1186
1210
|
return z.object({ type: z.literal(type), requestId: z.string(), pluginId: PluginIdSchema });
|
|
1187
1211
|
}
|
|
@@ -1287,8 +1311,9 @@ const GitSetupOptionsSchema = z.object({
|
|
|
1287
1311
|
refName: z.string().min(1).optional(),
|
|
1288
1312
|
action: z.enum(["branch-off", "checkout"]).optional(),
|
|
1289
1313
|
checkoutSource: ChangeRequestCheckoutSourceSchema.optional(),
|
|
1290
|
-
// COMPAT(githubPrNumber):
|
|
1291
|
-
//
|
|
1314
|
+
// COMPAT(githubPrNumber): legacy GitHub checkout input retained when
|
|
1315
|
+
// checkoutSource shipped in v0.2.0-beta.1. Remove after 2027-01-17 once the
|
|
1316
|
+
// supported client floor is >= v0.2.0.
|
|
1292
1317
|
githubPrNumber: z.number().int().positive().optional(),
|
|
1293
1318
|
});
|
|
1294
1319
|
export const CreateAgentWorktreeTargetSchema = z.discriminatedUnion("mode", [
|
|
@@ -1755,8 +1780,9 @@ export const CheckoutForgeSetAutoMergeRequestSchema = z.object({
|
|
|
1755
1780
|
mergeMethod: z.enum(["merge", "squash", "rebase"]).optional(),
|
|
1756
1781
|
requestId: z.string(),
|
|
1757
1782
|
});
|
|
1758
|
-
// COMPAT(githubAutoMergeRpc):
|
|
1759
|
-
//
|
|
1783
|
+
// COMPAT(githubAutoMergeRpc): legacy RPC retained when
|
|
1784
|
+
// checkout.forge.set_auto_merge.* shipped in v0.2.0-beta.1. Stop serving and
|
|
1785
|
+
// consuming it after 2027-01-17 once client and daemon floors are >= v0.2.0.
|
|
1760
1786
|
export const CheckoutGithubSetAutoMergeRequestSchema = z.object({
|
|
1761
1787
|
type: z.literal("checkout.github.set_auto_merge.request"),
|
|
1762
1788
|
cwd: z.string(),
|
|
@@ -1816,8 +1842,9 @@ const CheckoutCheckDetailsRequestPayloadSchema = z.object({
|
|
|
1816
1842
|
export const CheckoutForgeGetCheckDetailsRequestSchema = CheckoutCheckDetailsRequestPayloadSchema.extend({
|
|
1817
1843
|
type: z.literal("checkout.forge.get_check_details.request"),
|
|
1818
1844
|
});
|
|
1819
|
-
// COMPAT(githubCheckDetailsRpc):
|
|
1820
|
-
//
|
|
1845
|
+
// COMPAT(githubCheckDetailsRpc): legacy RPC retained when
|
|
1846
|
+
// checkout.forge.get_check_details.* shipped in v0.2.0-beta.1. Stop serving
|
|
1847
|
+
// and consuming it after 2027-01-17 once client and daemon floors are >= v0.2.0.
|
|
1821
1848
|
export const CheckoutGithubGetCheckDetailsRequestSchema = CheckoutCheckDetailsRequestPayloadSchema.extend({
|
|
1822
1849
|
type: z.literal("checkout.github.get_check_details.request"),
|
|
1823
1850
|
});
|
|
@@ -1897,8 +1924,9 @@ export const GitHubSearchItemSchema = z.object({
|
|
|
1897
1924
|
export const ForgeSearchItemSchema = GitHubSearchItemSchema.extend({
|
|
1898
1925
|
kind: z.enum(["issue", "change_request"]),
|
|
1899
1926
|
});
|
|
1900
|
-
// COMPAT(githubSearchKind):
|
|
1901
|
-
//
|
|
1927
|
+
// COMPAT(githubSearchKind): legacy GitHub kind aliases retained when neutral
|
|
1928
|
+
// forge search shipped in v0.2.0-beta.1. Remove after 2027-01-17 together with
|
|
1929
|
+
// the legacy github_search_request RPC.
|
|
1902
1930
|
export const ForgeSearchKindSchema = z.enum([
|
|
1903
1931
|
"issue",
|
|
1904
1932
|
"change_request",
|
|
@@ -1915,8 +1943,9 @@ export const ForgeSearchRequestSchema = z.object({
|
|
|
1915
1943
|
kinds: z.array(ForgeSearchKindSchema).optional(),
|
|
1916
1944
|
requestId: z.string(),
|
|
1917
1945
|
});
|
|
1918
|
-
// COMPAT(githubSearchRpc):
|
|
1919
|
-
//
|
|
1946
|
+
// COMPAT(githubSearchRpc): legacy RPC retained when forge.search.* shipped in
|
|
1947
|
+
// v0.2.0-beta.1. Stop serving and consuming it after 2027-01-17 once client
|
|
1948
|
+
// and daemon floors are >= v0.2.0.
|
|
1920
1949
|
export const GitHubSearchRequestSchema = z.object({
|
|
1921
1950
|
type: z.literal("github_search_request"),
|
|
1922
1951
|
cwd: z.string(),
|
|
@@ -1979,8 +2008,9 @@ export const CreatePaseoWorktreeRequestSchema = z.object({
|
|
|
1979
2008
|
refName: z.string().min(1).optional(),
|
|
1980
2009
|
action: z.enum(["branch-off", "checkout"]).optional(),
|
|
1981
2010
|
checkoutSource: ChangeRequestCheckoutSourceSchema.optional(),
|
|
1982
|
-
// COMPAT(githubPrNumber):
|
|
1983
|
-
//
|
|
2011
|
+
// COMPAT(githubPrNumber): legacy GitHub checkout input retained when
|
|
2012
|
+
// checkoutSource shipped in v0.2.0-beta.1. Remove after 2027-01-17 once the
|
|
2013
|
+
// supported client floor is >= v0.2.0.
|
|
1984
2014
|
githubPrNumber: z.number().int().positive().optional(),
|
|
1985
2015
|
requestId: z.string(),
|
|
1986
2016
|
});
|
|
@@ -2078,8 +2108,9 @@ export const WorkspaceCreateRequestSchema = z.object({
|
|
|
2078
2108
|
// New branch name for branch-off. The worktree path may use a different slug.
|
|
2079
2109
|
branchName: z.string().min(1).optional(),
|
|
2080
2110
|
checkoutSource: ChangeRequestCheckoutSourceSchema.optional(),
|
|
2081
|
-
// COMPAT(githubPrNumber):
|
|
2082
|
-
//
|
|
2111
|
+
// COMPAT(githubPrNumber): legacy GitHub checkout input retained when
|
|
2112
|
+
// checkoutSource shipped in v0.2.0-beta.1. Remove after 2027-01-17 once
|
|
2113
|
+
// the supported client floor is >= v0.2.0.
|
|
2083
2114
|
githubPrNumber: z.number().int().positive().optional(),
|
|
2084
2115
|
worktreeSlug: z.string().optional(),
|
|
2085
2116
|
}),
|
|
@@ -2519,6 +2550,9 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2519
2550
|
PluginLogsGetRequestSchema,
|
|
2520
2551
|
PluginDirectoryInstallRequestSchema,
|
|
2521
2552
|
PluginDirectoryInspectRequestSchema,
|
|
2553
|
+
PluginSourceInstallRequestSchema,
|
|
2554
|
+
PluginSourceStatusRequestSchema,
|
|
2555
|
+
PluginSourceUpdateRequestSchema,
|
|
2522
2556
|
PluginReloadRequestSchema,
|
|
2523
2557
|
PluginEnableRequestSchema,
|
|
2524
2558
|
PluginDisableRequestSchema,
|
|
@@ -2816,15 +2850,25 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
2816
2850
|
directorySync: z.boolean().optional(),
|
|
2817
2851
|
// COMPAT(workspaceLabels): added in v0.5.0, remove after 2027-08-14.
|
|
2818
2852
|
workspaceLabels: z.boolean().optional(),
|
|
2819
|
-
// COMPAT(checkoutForgeSetAutoMerge): added in v0.1.
|
|
2820
|
-
// checkoutGithubSetAutoMerge fallback after
|
|
2853
|
+
// COMPAT(checkoutForgeSetAutoMerge): added in v0.2.0-beta.1. Remove the
|
|
2854
|
+
// feature gate and checkoutGithubSetAutoMerge fallback after 2027-01-17
|
|
2855
|
+
// once the supported daemon floor is >= v0.2.0.
|
|
2821
2856
|
checkoutForgeSetAutoMerge: z.boolean().optional(),
|
|
2857
|
+
// COMPAT(checkoutGithubSetAutoMerge): added in v0.1.75 and retained as
|
|
2858
|
+
// the fallback for checkoutForgeSetAutoMerge. Stop advertising and
|
|
2859
|
+
// consuming it after 2027-01-17 once supported floors are >= v0.2.0.
|
|
2822
2860
|
checkoutGithubSetAutoMerge: z.boolean().optional(),
|
|
2823
|
-
// COMPAT(githubCheckDetails): added in v0.1.92
|
|
2861
|
+
// COMPAT(githubCheckDetails): added in v0.1.92 and retained as the
|
|
2862
|
+
// fallback for forgeCheckDetails. Stop advertising and consuming it
|
|
2863
|
+
// after 2027-01-17 once supported floors are >= v0.2.0.
|
|
2824
2864
|
githubCheckDetails: z.boolean().optional(),
|
|
2825
|
-
// COMPAT(forgeCheckDetails): added in v0.1.
|
|
2865
|
+
// COMPAT(forgeCheckDetails): added in v0.2.0-beta.1. Remove the feature
|
|
2866
|
+
// gate and githubCheckDetails fallback after 2027-01-17 once the
|
|
2867
|
+
// supported daemon floor is >= v0.2.0.
|
|
2826
2868
|
forgeCheckDetails: z.boolean().optional(),
|
|
2827
|
-
// COMPAT(forgeSearch): added in v0.1.
|
|
2869
|
+
// COMPAT(forgeSearch): added in v0.2.0-beta.1. Remove the feature gate
|
|
2870
|
+
// and github_search fallback after 2027-01-17 once the supported daemon
|
|
2871
|
+
// floor is >= v0.2.0.
|
|
2828
2872
|
forgeSearch: z.boolean().optional(),
|
|
2829
2873
|
// COMPAT(daemonStatusRpc): added in v0.1.76, remove gate after 2026-11-18.
|
|
2830
2874
|
daemonStatusRpc: z.boolean().optional(),
|
|
@@ -2840,6 +2884,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
2840
2884
|
pluginManagement: z.boolean().optional(),
|
|
2841
2885
|
// COMPAT(pluginLogs): added in v0.4.0, remove gate after 2027-08-16.
|
|
2842
2886
|
pluginLogs: z.boolean().optional(),
|
|
2887
|
+
// COMPAT(pluginGitManagement): added in v0.7.0, remove gate after 2027-08-26.
|
|
2888
|
+
pluginGitManagement: z.boolean().optional(),
|
|
2843
2889
|
// COMPAT(pluginThemes): added in v0.5.0, remove gate after 2027-08-20.
|
|
2844
2890
|
// A daemon that predates this flag keeps `addTheme` in the server bundle it compiles,
|
|
2845
2891
|
// so a theme plugin cannot start there at all.
|
|
@@ -2908,7 +2954,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
2908
2954
|
providerRemoval: z.boolean().optional(),
|
|
2909
2955
|
// COMPAT(importSessionWorkspaceTarget): added in v0.1.110, remove gate after 2027-01-16.
|
|
2910
2956
|
importSessionWorkspaceTarget: z.boolean().optional(),
|
|
2911
|
-
// COMPAT(forgeProviders): added in v0.1.
|
|
2957
|
+
// COMPAT(forgeProviders): added in v0.2.0-beta.1. Drop the gate after
|
|
2958
|
+
// 2027-01-17 once the supported daemon floor is >= v0.2.0.
|
|
2912
2959
|
// Daemon advertises pluggable non-GitHub forge support (the forge registry);
|
|
2913
2960
|
// the client gates non-GitHub setup UI on it.
|
|
2914
2961
|
forgeProviders: z.boolean().optional(),
|
|
@@ -3150,6 +3197,8 @@ export const WorkspaceGitHubRuntimePayloadSchema = z
|
|
|
3150
3197
|
url: z.string().nullable(),
|
|
3151
3198
|
workflow: z.string().optional(),
|
|
3152
3199
|
duration: z.string().optional(),
|
|
3200
|
+
// Open so future forge-neutral refinements remain parse-compatible.
|
|
3201
|
+
traits: z.array(z.string()).optional(),
|
|
3153
3202
|
}))
|
|
3154
3203
|
.optional(),
|
|
3155
3204
|
checksStatus: z.enum(["none", "pending", "success", "failure"]).optional(),
|
|
@@ -3222,10 +3271,14 @@ export const WorkspaceDescriptorPayloadSchema = z
|
|
|
3222
3271
|
.optional(),
|
|
3223
3272
|
scripts: z.array(WorkspaceScriptPayloadSchema).default([]),
|
|
3224
3273
|
gitRuntime: WorkspaceGitRuntimePayloadSchema,
|
|
3274
|
+
// COMPAT(githubRuntimeName): legacy wire-field name now carries
|
|
3275
|
+
// forge-neutral runtime data. Introduce and migrate to a neutral
|
|
3276
|
+
// forgeRuntime field before consumers stop using this name. Target cleanup
|
|
3277
|
+
// after 2027-01-17 once the supported client floor is >= v0.2.0.
|
|
3225
3278
|
githubRuntime: WorkspaceGitHubRuntimePayloadSchema,
|
|
3226
|
-
// COMPAT(forge): added in v0.1.
|
|
3227
|
-
//
|
|
3228
|
-
//
|
|
3279
|
+
// COMPAT(forge): added in v0.2.0-beta.1. Treat an absent forge as GitHub
|
|
3280
|
+
// until 2027-01-17; remove the consumer fallback once the supported daemon
|
|
3281
|
+
// floor is >= v0.2.0.
|
|
3229
3282
|
forge: z.string().optional(),
|
|
3230
3283
|
project: ProjectPlacementPayloadSchema.optional(),
|
|
3231
3284
|
// COMPAT(directorySync): sequence of this latest directory projection.
|
|
@@ -3707,6 +3760,13 @@ export const FetchAgentTimelineResponseMessageSchema = z.object({
|
|
|
3707
3760
|
error: z.string().nullable(),
|
|
3708
3761
|
}),
|
|
3709
3762
|
});
|
|
3763
|
+
export const AgentTimelineReplacementMessageSchema = z.object({
|
|
3764
|
+
type: z.literal("agent.timeline.replacement"),
|
|
3765
|
+
payload: z.object({
|
|
3766
|
+
agentId: z.string(),
|
|
3767
|
+
epoch: z.string(),
|
|
3768
|
+
}),
|
|
3769
|
+
});
|
|
3710
3770
|
export const AgentTimelineListPromptsResponseMessageSchema = z.object({
|
|
3711
3771
|
type: z.literal("agent.timeline.list_prompts.response"),
|
|
3712
3772
|
payload: z.object({
|
|
@@ -4209,7 +4269,8 @@ const CheckoutPrGithubStatusSchema = CheckoutPrGithubStatusObjectSchema.optional
|
|
|
4209
4269
|
// in the consumer that knows that forge family.
|
|
4210
4270
|
const CheckoutPrForgeSpecificSchema = z.unknown().optional();
|
|
4211
4271
|
export const CheckoutPrStatusSchema = z.object({
|
|
4212
|
-
// COMPAT(forge): added in v0.1.
|
|
4272
|
+
// COMPAT(forge): added in v0.2.0-beta.1. Remove the GitHub default after
|
|
4273
|
+
// 2027-01-17 once the supported daemon floor is >= v0.2.0.
|
|
4213
4274
|
forge: z.string().optional().default("github"),
|
|
4214
4275
|
projectPath: z.string().optional(),
|
|
4215
4276
|
number: z.number().optional(),
|
|
@@ -4238,6 +4299,8 @@ export const CheckoutPrStatusSchema = z.object({
|
|
|
4238
4299
|
duration: z.string().optional(),
|
|
4239
4300
|
checkRunId: z.number().optional(),
|
|
4240
4301
|
workflowRunId: z.number().optional(),
|
|
4302
|
+
// Open so future forge-neutral refinements remain parse-compatible.
|
|
4303
|
+
traits: z.array(z.string()).optional(),
|
|
4241
4304
|
}))
|
|
4242
4305
|
.optional()
|
|
4243
4306
|
.default([]),
|
|
@@ -4253,12 +4316,12 @@ const CheckoutPrStatusPayloadSchema = z.object({
|
|
|
4253
4316
|
cwd: z.string(),
|
|
4254
4317
|
status: CheckoutPrStatusSchema.nullable(),
|
|
4255
4318
|
githubFeaturesEnabled: z.boolean(),
|
|
4256
|
-
// COMPAT(forgeAuthState): added in v0.1.
|
|
4257
|
-
//
|
|
4258
|
-
//
|
|
4259
|
-
// Drop the boolean once the daemon floor >= v0.1.106.
|
|
4319
|
+
// COMPAT(forgeAuthState): added in v0.2.0-beta.1. Remove the legacy
|
|
4320
|
+
// githubFeaturesEnabled normalization after 2027-01-17 once the supported
|
|
4321
|
+
// daemon floor is >= v0.2.0.
|
|
4260
4322
|
authState: ForgeAuthStateSchema,
|
|
4261
|
-
// COMPAT(forge): added in v0.1.
|
|
4323
|
+
// COMPAT(forge): added in v0.2.0-beta.1. Remove the GitHub default after
|
|
4324
|
+
// 2027-01-17 once the supported daemon floor is >= v0.2.0.
|
|
4262
4325
|
forge: z.string().optional().default("github"),
|
|
4263
4326
|
error: CheckoutErrorSchema.nullable(),
|
|
4264
4327
|
requestId: z.string(),
|
|
@@ -4377,8 +4440,9 @@ export const CheckoutForgeSetAutoMergeResponseSchema = z.object({
|
|
|
4377
4440
|
requestId: z.string(),
|
|
4378
4441
|
}),
|
|
4379
4442
|
});
|
|
4380
|
-
// COMPAT(githubAutoMergeRpc):
|
|
4381
|
-
//
|
|
4443
|
+
// COMPAT(githubAutoMergeRpc): legacy RPC retained when
|
|
4444
|
+
// checkout.forge.set_auto_merge.* shipped in v0.2.0-beta.1. Stop serving and
|
|
4445
|
+
// consuming it after 2027-01-17 once client and daemon floors are >= v0.2.0.
|
|
4382
4446
|
export const CheckoutGithubSetAutoMergeResponseSchema = z.object({
|
|
4383
4447
|
type: z.literal("checkout.github.set_auto_merge.response"),
|
|
4384
4448
|
payload: z.object({
|
|
@@ -4445,7 +4509,11 @@ const CheckoutPipelineJobSchema = z.object({
|
|
|
4445
4509
|
name: z.string(),
|
|
4446
4510
|
stage: z.string(),
|
|
4447
4511
|
status: z.string(),
|
|
4448
|
-
|
|
4512
|
+
// COMPAT(pipelineRawStatus): no client reads this, but peers <= v0.2.0-rc.1
|
|
4513
|
+
// validate it as required, so daemons must keep emitting it. Optional since
|
|
4514
|
+
// this schema so future daemons may omit it; delete the field and its
|
|
4515
|
+
// emission after 2027-01-17 once the supported client floor is >= v0.2.0.
|
|
4516
|
+
rawStatus: z.string().optional(),
|
|
4449
4517
|
url: z.string().nullable().optional().default(null),
|
|
4450
4518
|
allowFailure: z.boolean().optional().default(false),
|
|
4451
4519
|
durationSeconds: z.number().nullable().optional().default(null),
|
|
@@ -4458,7 +4526,8 @@ const CheckoutPipelineStageSchema = z.object({
|
|
|
4458
4526
|
const CheckoutPipelineSchema = z.object({
|
|
4459
4527
|
id: z.number(),
|
|
4460
4528
|
status: z.string(),
|
|
4461
|
-
|
|
4529
|
+
// COMPAT(pipelineRawStatus): see CheckoutPipelineJobSchema.rawStatus.
|
|
4530
|
+
rawStatus: z.string().optional(),
|
|
4462
4531
|
url: z.string().nullable().optional().default(null),
|
|
4463
4532
|
ref: z.string().nullable().optional().default(null),
|
|
4464
4533
|
sha: z.string().nullable().optional().default(null),
|
|
@@ -4497,8 +4566,9 @@ export const CheckoutForgeGetCheckDetailsResponseSchema = z.object({
|
|
|
4497
4566
|
requestId: z.string(),
|
|
4498
4567
|
}),
|
|
4499
4568
|
});
|
|
4500
|
-
// COMPAT(githubCheckDetailsRpc):
|
|
4501
|
-
//
|
|
4569
|
+
// COMPAT(githubCheckDetailsRpc): legacy RPC retained when
|
|
4570
|
+
// checkout.forge.get_check_details.* shipped in v0.2.0-beta.1. Stop serving
|
|
4571
|
+
// and consuming it after 2027-01-17 once client and daemon floors are >= v0.2.0.
|
|
4502
4572
|
export const CheckoutGithubGetCheckDetailsResponseSchema = z.object({
|
|
4503
4573
|
type: z.literal("checkout.github.get_check_details.response"),
|
|
4504
4574
|
payload: z.object({
|
|
@@ -4609,9 +4679,9 @@ export const PullRequestTimelineResponseSchema = z.object({
|
|
|
4609
4679
|
error: PullRequestTimelineErrorSchema.nullable().optional().default(null),
|
|
4610
4680
|
requestId: z.string().optional().default(""),
|
|
4611
4681
|
githubFeaturesEnabled: z.boolean().optional().default(true),
|
|
4612
|
-
// COMPAT(forgeAuthState): added in v0.1.
|
|
4613
|
-
//
|
|
4614
|
-
//
|
|
4682
|
+
// COMPAT(forgeAuthState): added in v0.2.0-beta.1. Remove the legacy
|
|
4683
|
+
// githubFeaturesEnabled normalization after 2027-01-17 once the supported
|
|
4684
|
+
// daemon floor is >= v0.2.0.
|
|
4615
4685
|
authState: ForgeAuthStateSchema,
|
|
4616
4686
|
})
|
|
4617
4687
|
.optional()
|
|
@@ -4717,8 +4787,9 @@ export const ForgeSearchResponseSchema = z.object({
|
|
|
4717
4787
|
type: z.literal("forge.search.response"),
|
|
4718
4788
|
payload: ForgeSearchResponsePayloadSchema,
|
|
4719
4789
|
});
|
|
4720
|
-
// COMPAT(githubSearchRpc):
|
|
4721
|
-
//
|
|
4790
|
+
// COMPAT(githubSearchRpc): legacy RPC retained when forge.search.* shipped in
|
|
4791
|
+
// v0.2.0-beta.1. Stop serving and consuming it after 2027-01-17 once client
|
|
4792
|
+
// and daemon floors are >= v0.2.0.
|
|
4722
4793
|
export const GitHubSearchResponseSchema = z.object({
|
|
4723
4794
|
type: z.literal("github_search_response"),
|
|
4724
4795
|
payload: GitHubSearchResponsePayloadSchema,
|
|
@@ -5296,6 +5367,10 @@ export const PluginListItemSchema = z.object({
|
|
|
5296
5367
|
path: z.string(),
|
|
5297
5368
|
enabled: z.boolean(),
|
|
5298
5369
|
status: PluginStatusSchema,
|
|
5370
|
+
source: z.enum(["directory", "git"]).optional(),
|
|
5371
|
+
remote: z.string().optional(),
|
|
5372
|
+
ref: z.string().optional(),
|
|
5373
|
+
commit: z.string().optional(),
|
|
5299
5374
|
error: z.string().optional(),
|
|
5300
5375
|
});
|
|
5301
5376
|
export const PluginLogEntrySchema = z.object({
|
|
@@ -5324,6 +5399,36 @@ export const PluginDirectoryInspectResponseSchema = z.object({
|
|
|
5324
5399
|
type: z.literal("plugin.directory.inspect.response"),
|
|
5325
5400
|
payload: z.object({ requestId: z.string(), id: PluginIdSchema }),
|
|
5326
5401
|
});
|
|
5402
|
+
export const PluginSourceInstallResponseSchema = z.object({
|
|
5403
|
+
type: z.literal("plugin.source.install.response"),
|
|
5404
|
+
payload: z.object({ requestId: z.string(), plugin: PluginListItemSchema }),
|
|
5405
|
+
});
|
|
5406
|
+
export const PluginSourceStatusItemSchema = z.object({
|
|
5407
|
+
id: PluginIdSchema,
|
|
5408
|
+
source: z.enum(["directory", "git"]),
|
|
5409
|
+
path: z.string(),
|
|
5410
|
+
remote: z.string().optional(),
|
|
5411
|
+
ref: z.string().optional(),
|
|
5412
|
+
currentCommit: z.string().optional(),
|
|
5413
|
+
latestCommit: z.string().optional(),
|
|
5414
|
+
commitsBehind: z.number().int().nonnegative().optional(),
|
|
5415
|
+
updateAvailable: z.boolean().optional(),
|
|
5416
|
+
});
|
|
5417
|
+
export const PluginSourceStatusResponseSchema = z.object({
|
|
5418
|
+
type: z.literal("plugin.source.status.response"),
|
|
5419
|
+
payload: z.object({ requestId: z.string(), plugins: z.array(PluginSourceStatusItemSchema) }),
|
|
5420
|
+
});
|
|
5421
|
+
export const PluginSourceUpdateItemSchema = z.object({
|
|
5422
|
+
id: PluginIdSchema,
|
|
5423
|
+
previousCommit: z.string(),
|
|
5424
|
+
currentCommit: z.string(),
|
|
5425
|
+
commits: z.number().int().nonnegative(),
|
|
5426
|
+
updated: z.boolean(),
|
|
5427
|
+
});
|
|
5428
|
+
export const PluginSourceUpdateResponseSchema = z.object({
|
|
5429
|
+
type: z.literal("plugin.source.update.response"),
|
|
5430
|
+
payload: z.object({ requestId: z.string(), plugins: z.array(PluginSourceUpdateItemSchema) }),
|
|
5431
|
+
});
|
|
5327
5432
|
function pluginActionResponse(type) {
|
|
5328
5433
|
return z.object({
|
|
5329
5434
|
type: z.literal(type),
|
|
@@ -5377,6 +5482,9 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
5377
5482
|
PluginLogsGetResponseSchema,
|
|
5378
5483
|
PluginDirectoryInstallResponseSchema,
|
|
5379
5484
|
PluginDirectoryInspectResponseSchema,
|
|
5485
|
+
PluginSourceInstallResponseSchema,
|
|
5486
|
+
PluginSourceStatusResponseSchema,
|
|
5487
|
+
PluginSourceUpdateResponseSchema,
|
|
5380
5488
|
PluginReloadResponseSchema,
|
|
5381
5489
|
PluginEnableResponseSchema,
|
|
5382
5490
|
PluginDisableResponseSchema,
|
|
@@ -5435,6 +5543,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
5435
5543
|
ArchiveWorkspaceResponseMessageSchema,
|
|
5436
5544
|
FetchAgentResponseMessageSchema,
|
|
5437
5545
|
FetchAgentTimelineResponseMessageSchema,
|
|
5546
|
+
AgentTimelineReplacementMessageSchema,
|
|
5438
5547
|
AgentTimelineListPromptsResponseMessageSchema,
|
|
5439
5548
|
ProviderSubagentListResponseMessageSchema,
|
|
5440
5549
|
ProviderSubagentTimelineResponseMessageSchema,
|
|
@@ -5597,6 +5706,7 @@ export const WSHelloMessageSchema = z.object({
|
|
|
5597
5706
|
[CLIENT_CAPS.providerSubagents]: z.boolean().optional(),
|
|
5598
5707
|
[CLIENT_CAPS.projectUpdates]: z.boolean().optional(),
|
|
5599
5708
|
[CLIENT_CAPS.compactProviderSnapshots]: z.boolean().optional(),
|
|
5709
|
+
[CLIENT_CAPS.timelineReplacementInvalidation]: z.boolean().optional(),
|
|
5600
5710
|
[CLIENT_CAPS.browserHost]: BrowserAutomationHostCapabilitySchema.optional(),
|
|
5601
5711
|
})
|
|
5602
5712
|
.passthrough()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEFAULT_SSH_DAEMON_PORT = 6767;
|
|
2
|
+
export interface SshTransportTarget {
|
|
3
|
+
host: string;
|
|
4
|
+
sshPort?: number;
|
|
5
|
+
daemonPort: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function validatePort(value: string | number, label: string): number;
|
|
8
|
+
export declare function validateSshHost(host: string): string;
|
|
9
|
+
export declare function parseSshTransportUri(value: string): SshTransportTarget;
|
|
10
|
+
export declare function buildSshTunnelArgs(target: SshTransportTarget): string[];
|
|
11
|
+
//# sourceMappingURL=ssh-transport.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export const DEFAULT_SSH_DAEMON_PORT = 6767;
|
|
2
|
+
export function validatePort(value, label) {
|
|
3
|
+
const port = Number(value);
|
|
4
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
5
|
+
throw new Error(`${label} must be between 1 and 65535`);
|
|
6
|
+
}
|
|
7
|
+
return port;
|
|
8
|
+
}
|
|
9
|
+
export function validateSshHost(host) {
|
|
10
|
+
const normalized = host.trim();
|
|
11
|
+
if (!normalized)
|
|
12
|
+
throw new Error("SSH host is required");
|
|
13
|
+
if (/\s/u.test(normalized) || normalized.startsWith("-")) {
|
|
14
|
+
throw new Error("SSH host is invalid");
|
|
15
|
+
}
|
|
16
|
+
return normalized;
|
|
17
|
+
}
|
|
18
|
+
export function parseSshTransportUri(value) {
|
|
19
|
+
let url;
|
|
20
|
+
try {
|
|
21
|
+
url = new URL(value);
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
throw new Error("Invalid SSH host URI", { cause: error });
|
|
25
|
+
}
|
|
26
|
+
if (url.protocol !== "ssh:" || url.password || (url.pathname !== "" && url.pathname !== "/")) {
|
|
27
|
+
throw new Error("Invalid SSH host URI");
|
|
28
|
+
}
|
|
29
|
+
if (url.hash)
|
|
30
|
+
throw new Error("SSH host URI does not support fragments");
|
|
31
|
+
for (const key of url.searchParams.keys()) {
|
|
32
|
+
if (key !== "daemonPort")
|
|
33
|
+
throw new Error(`Unsupported SSH host option: ${key}`);
|
|
34
|
+
}
|
|
35
|
+
const daemonPorts = url.searchParams.getAll("daemonPort");
|
|
36
|
+
if (daemonPorts.length > 1)
|
|
37
|
+
throw new Error("daemonPort may only be specified once");
|
|
38
|
+
const urlHostname = url.hostname;
|
|
39
|
+
const hostname = validateSshHost(urlHostname.startsWith("[") && urlHostname.endsWith("]")
|
|
40
|
+
? urlHostname.slice(1, -1)
|
|
41
|
+
: urlHostname);
|
|
42
|
+
const username = decodeURIComponent(url.username);
|
|
43
|
+
const host = validateSshHost(username ? `${username}@${hostname}` : hostname);
|
|
44
|
+
return {
|
|
45
|
+
host,
|
|
46
|
+
...(url.port ? { sshPort: validatePort(url.port, "SSH port") } : {}),
|
|
47
|
+
daemonPort: daemonPorts[0] === undefined
|
|
48
|
+
? DEFAULT_SSH_DAEMON_PORT
|
|
49
|
+
: validatePort(daemonPorts[0], "Daemon port"),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export function buildSshTunnelArgs(target) {
|
|
53
|
+
const host = validateSshHost(target.host);
|
|
54
|
+
const daemonPort = validatePort(target.daemonPort, "Daemon port");
|
|
55
|
+
const args = [
|
|
56
|
+
"-T",
|
|
57
|
+
"-o",
|
|
58
|
+
"BatchMode=yes",
|
|
59
|
+
"-o",
|
|
60
|
+
"ConnectTimeout=10",
|
|
61
|
+
"-o",
|
|
62
|
+
"ClearAllForwardings=yes",
|
|
63
|
+
"-o",
|
|
64
|
+
"ExitOnForwardFailure=yes",
|
|
65
|
+
];
|
|
66
|
+
if (target.sshPort !== undefined) {
|
|
67
|
+
args.push("-p", String(validatePort(target.sshPort, "SSH port")));
|
|
68
|
+
}
|
|
69
|
+
args.push("-W", `127.0.0.1:${daemonPort}`, host);
|
|
70
|
+
return args;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=ssh-transport.js.map
|