@getpaseo/protocol 0.1.110 → 0.2.0-beta.1
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-types.d.ts +1 -0
- package/dist/forge-manifest.d.ts +66 -0
- package/dist/forge-manifest.js +92 -0
- package/dist/generated/validation/ws-outbound.aot.js +9001 -7859
- package/dist/git-remote.js +2 -1
- package/dist/messages.d.ts +2178 -80
- package/dist/messages.js +347 -21
- package/dist/provider-manifest.d.ts +1 -0
- package/dist/provider-manifest.js +21 -4
- package/dist/validation/ws-outbound-schema-metadata.d.ts +266 -16
- package/package.json +1 -1
package/dist/messages.js
CHANGED
|
@@ -78,6 +78,7 @@ export const MutableDaemonConfigPatchSchema = z
|
|
|
78
78
|
providers: z
|
|
79
79
|
.record(z.string(), MutableDaemonProviderConfigSchema.partial().passthrough())
|
|
80
80
|
.optional(),
|
|
81
|
+
removeProviders: z.array(z.string().min(1)).optional(),
|
|
81
82
|
metadataGeneration: MutableMetadataGenerationConfigSchema.partial().optional(),
|
|
82
83
|
autoArchiveAfterMerge: z.boolean().optional(),
|
|
83
84
|
enableTerminalAgentHooks: z.boolean().optional(),
|
|
@@ -150,6 +151,7 @@ export const ProviderSnapshotEntrySchema = z.object({
|
|
|
150
151
|
provider: AgentProviderSchema,
|
|
151
152
|
status: ProviderStatusSchema,
|
|
152
153
|
enabled: z.boolean().optional().default(true),
|
|
154
|
+
source: z.enum(["builtin", "custom"]).optional(),
|
|
153
155
|
error: z.string().optional(),
|
|
154
156
|
models: z.array(AgentModelDefinitionSchema).optional(),
|
|
155
157
|
modes: z.array(AgentModeSchema).optional(),
|
|
@@ -661,6 +663,16 @@ export const WorkspacePinSetRequestSchema = z.object({
|
|
|
661
663
|
pinned: z.boolean(),
|
|
662
664
|
requestId: z.string(),
|
|
663
665
|
});
|
|
666
|
+
export const WorkspaceRecoveryInspectRequestSchema = z.object({
|
|
667
|
+
type: z.literal("workspace.recovery.inspect.request"),
|
|
668
|
+
workspaceId: z.string(),
|
|
669
|
+
requestId: z.string(),
|
|
670
|
+
});
|
|
671
|
+
export const WorkspaceRecoveryRestoreRequestSchema = z.object({
|
|
672
|
+
type: z.literal("workspace.recovery.restore.request"),
|
|
673
|
+
workspaceId: z.string(),
|
|
674
|
+
requestId: z.string(),
|
|
675
|
+
});
|
|
664
676
|
export const SetVoiceModeMessageSchema = z.object({
|
|
665
677
|
type: z.literal("set_voice_mode"),
|
|
666
678
|
enabled: z.boolean(),
|
|
@@ -677,6 +689,18 @@ export const GitHubPrAttachmentSchema = z.object({
|
|
|
677
689
|
baseRefName: z.string().nullable().optional(),
|
|
678
690
|
headRefName: z.string().nullable().optional(),
|
|
679
691
|
});
|
|
692
|
+
export const ForgeChangeRequestAttachmentSchema = z.object({
|
|
693
|
+
type: z.literal("forge_change_request"),
|
|
694
|
+
mimeType: z.literal("application/paseo-forge-change-request"),
|
|
695
|
+
forge: z.string().optional().default("github"),
|
|
696
|
+
number: z.number().int().positive(),
|
|
697
|
+
title: z.string(),
|
|
698
|
+
url: z.string(),
|
|
699
|
+
body: z.string().nullable().optional(),
|
|
700
|
+
projectPath: z.string().optional(),
|
|
701
|
+
baseRefName: z.string().nullable().optional(),
|
|
702
|
+
headRefName: z.string().nullable().optional(),
|
|
703
|
+
});
|
|
680
704
|
export const GitHubIssueAttachmentSchema = z.object({
|
|
681
705
|
type: z.literal("github_issue"),
|
|
682
706
|
mimeType: z.literal("application/github-issue"),
|
|
@@ -685,6 +709,16 @@ export const GitHubIssueAttachmentSchema = z.object({
|
|
|
685
709
|
url: z.string(),
|
|
686
710
|
body: z.string().nullable().optional(),
|
|
687
711
|
});
|
|
712
|
+
export const ForgeIssueAttachmentSchema = z.object({
|
|
713
|
+
type: z.literal("forge_issue"),
|
|
714
|
+
mimeType: z.literal("application/paseo-forge-issue"),
|
|
715
|
+
forge: z.string().optional().default("github"),
|
|
716
|
+
number: z.number().int().positive(),
|
|
717
|
+
title: z.string(),
|
|
718
|
+
url: z.string(),
|
|
719
|
+
body: z.string().nullable().optional(),
|
|
720
|
+
projectPath: z.string().optional(),
|
|
721
|
+
});
|
|
688
722
|
export const TextAttachmentSchema = z
|
|
689
723
|
.object({
|
|
690
724
|
type: z.literal("text"),
|
|
@@ -731,6 +765,8 @@ export const UploadedFileAttachmentSchema = z.object({
|
|
|
731
765
|
path: z.string(),
|
|
732
766
|
});
|
|
733
767
|
export const AgentAttachmentSchema = z.discriminatedUnion("type", [
|
|
768
|
+
ForgeChangeRequestAttachmentSchema,
|
|
769
|
+
ForgeIssueAttachmentSchema,
|
|
734
770
|
GitHubPrAttachmentSchema,
|
|
735
771
|
GitHubIssueAttachmentSchema,
|
|
736
772
|
TextAttachmentSchema,
|
|
@@ -751,6 +787,12 @@ function normalizeAgentAttachments(input) {
|
|
|
751
787
|
return normalized;
|
|
752
788
|
}
|
|
753
789
|
const AgentAttachmentsSchema = z.unknown().transform(normalizeAgentAttachments).optional();
|
|
790
|
+
export const ChangeRequestCheckoutSourceSchema = z.object({
|
|
791
|
+
kind: z.literal("change_request"),
|
|
792
|
+
forge: z.string().optional().default("github"),
|
|
793
|
+
number: z.number().int().positive(),
|
|
794
|
+
projectPath: z.string().optional(),
|
|
795
|
+
});
|
|
754
796
|
const ImageAttachmentSchema = z.object({
|
|
755
797
|
data: z.string(), // base64 encoded image
|
|
756
798
|
mimeType: z.string(), // e.g., "image/jpeg", "image/png"
|
|
@@ -938,6 +980,9 @@ const GitSetupOptionsSchema = z.object({
|
|
|
938
980
|
worktreeSlug: z.string().optional(),
|
|
939
981
|
refName: z.string().min(1).optional(),
|
|
940
982
|
action: z.enum(["branch-off", "checkout"]).optional(),
|
|
983
|
+
checkoutSource: ChangeRequestCheckoutSourceSchema.optional(),
|
|
984
|
+
// COMPAT(githubPrNumber): added in v0.1.106, remove after 2026-12-28 once
|
|
985
|
+
// clients send checkoutSource.
|
|
941
986
|
githubPrNumber: z.number().int().positive().optional(),
|
|
942
987
|
});
|
|
943
988
|
export const CreateAgentWorktreeTargetSchema = z.discriminatedUnion("mode", [
|
|
@@ -1021,6 +1066,7 @@ export const ImportAgentRequestMessageSchema = z.object({
|
|
|
1021
1066
|
sessionId: z.string().optional(),
|
|
1022
1067
|
providerHandleId: z.string().optional(),
|
|
1023
1068
|
cwd: z.string().optional(),
|
|
1069
|
+
workspaceId: z.string().optional(),
|
|
1024
1070
|
labels: z.record(z.string(), z.string()).optional(),
|
|
1025
1071
|
requestId: z.string(),
|
|
1026
1072
|
});
|
|
@@ -1205,6 +1251,37 @@ export const WorkspacePinSetResponseSchema = z.object({
|
|
|
1205
1251
|
type: z.literal("workspace.pin.set.response"),
|
|
1206
1252
|
payload: WorkspacePinSetResponsePayloadSchema,
|
|
1207
1253
|
});
|
|
1254
|
+
export const WorkspaceRecoveryStateSchema = z.discriminatedUnion("kind", [
|
|
1255
|
+
z.object({
|
|
1256
|
+
kind: z.literal("recoverable"),
|
|
1257
|
+
workspaceId: z.string(),
|
|
1258
|
+
workspaceName: z.string(),
|
|
1259
|
+
action: z.string(),
|
|
1260
|
+
branch: z.string().nullable(),
|
|
1261
|
+
}),
|
|
1262
|
+
z.object({
|
|
1263
|
+
kind: z.literal("unavailable"),
|
|
1264
|
+
workspaceId: z.string(),
|
|
1265
|
+
reason: z.string(),
|
|
1266
|
+
message: z.string(),
|
|
1267
|
+
}),
|
|
1268
|
+
]);
|
|
1269
|
+
export const WorkspaceRecoveryInspectResponseSchema = z.object({
|
|
1270
|
+
type: z.literal("workspace.recovery.inspect.response"),
|
|
1271
|
+
payload: z.object({
|
|
1272
|
+
requestId: z.string(),
|
|
1273
|
+
state: WorkspaceRecoveryStateSchema,
|
|
1274
|
+
}),
|
|
1275
|
+
});
|
|
1276
|
+
export const WorkspaceRecoveryRestoreResponseSchema = z.object({
|
|
1277
|
+
type: z.literal("workspace.recovery.restore.response"),
|
|
1278
|
+
payload: z.object({
|
|
1279
|
+
requestId: z.string(),
|
|
1280
|
+
workspaceId: z.string(),
|
|
1281
|
+
accepted: z.boolean(),
|
|
1282
|
+
error: z.string().nullable(),
|
|
1283
|
+
}),
|
|
1284
|
+
});
|
|
1208
1285
|
export const SetVoiceModeResponseMessageSchema = z.object({
|
|
1209
1286
|
type: z.literal("set_voice_mode_response"),
|
|
1210
1287
|
payload: z.object({
|
|
@@ -1306,6 +1383,15 @@ export const CheckoutPrMergeRequestSchema = z.object({
|
|
|
1306
1383
|
mergeMethod: z.enum(["merge", "squash", "rebase"]),
|
|
1307
1384
|
requestId: z.string(),
|
|
1308
1385
|
});
|
|
1386
|
+
export const CheckoutForgeSetAutoMergeRequestSchema = z.object({
|
|
1387
|
+
type: z.literal("checkout.forge.set_auto_merge.request"),
|
|
1388
|
+
cwd: z.string(),
|
|
1389
|
+
enabled: z.boolean(),
|
|
1390
|
+
mergeMethod: z.enum(["merge", "squash", "rebase"]).optional(),
|
|
1391
|
+
requestId: z.string(),
|
|
1392
|
+
});
|
|
1393
|
+
// COMPAT(githubAutoMergeRpc): added in v0.1.106, remove after 2026-12-28 once
|
|
1394
|
+
// all supported clients use checkout.forge.set_auto_merge.*.
|
|
1309
1395
|
export const CheckoutGithubSetAutoMergeRequestSchema = z.object({
|
|
1310
1396
|
type: z.literal("checkout.github.set_auto_merge.request"),
|
|
1311
1397
|
cwd: z.string(),
|
|
@@ -1313,16 +1399,61 @@ export const CheckoutGithubSetAutoMergeRequestSchema = z.object({
|
|
|
1313
1399
|
mergeMethod: z.enum(["merge", "squash", "rebase"]).optional(),
|
|
1314
1400
|
requestId: z.string(),
|
|
1315
1401
|
});
|
|
1402
|
+
const CheckoutCommitFileSchema = z.object({
|
|
1403
|
+
path: z.string(),
|
|
1404
|
+
additions: z.number(),
|
|
1405
|
+
deletions: z.number(),
|
|
1406
|
+
status: z.enum(["added", "modified", "deleted", "renamed"]).optional(),
|
|
1407
|
+
});
|
|
1408
|
+
const CheckoutCommitSchema = z.object({
|
|
1409
|
+
sha: z.string(),
|
|
1410
|
+
shortSha: z.string(),
|
|
1411
|
+
subject: z.string(),
|
|
1412
|
+
authorName: z.string(),
|
|
1413
|
+
authorDate: z.string(), // ISO 8601
|
|
1414
|
+
isOnRemote: z.boolean(), // false = local-only (unpushed)
|
|
1415
|
+
files: z.array(CheckoutCommitFileSchema),
|
|
1416
|
+
});
|
|
1417
|
+
export const CheckoutCommitsListRequestSchema = z.object({
|
|
1418
|
+
type: z.literal("checkout.commits.list.request"),
|
|
1419
|
+
cwd: z.string(),
|
|
1420
|
+
requestId: z.string(),
|
|
1421
|
+
});
|
|
1422
|
+
export const CheckoutCommitFileDiffRequestSchema = z.object({
|
|
1423
|
+
type: z.literal("checkout.commits.file_diff.request"),
|
|
1424
|
+
cwd: z.string(),
|
|
1425
|
+
sha: z.string(),
|
|
1426
|
+
path: z.string(),
|
|
1427
|
+
requestId: z.string(),
|
|
1428
|
+
});
|
|
1316
1429
|
const GitHubRepoSegmentSchema = z.string().regex(/^[A-Za-z0-9._-]+$/);
|
|
1317
|
-
|
|
1318
|
-
type: z.literal("checkout.github.get_check_details.request"),
|
|
1430
|
+
const CheckoutCheckDetailsRequestPayloadSchema = z.object({
|
|
1319
1431
|
cwd: z.string(),
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1432
|
+
// GitHub addresses check runs by owner/name. GitLab resolves the project from
|
|
1433
|
+
// cwd and omits these GitHub-only single-segment fields.
|
|
1434
|
+
repoOwner: GitHubRepoSegmentSchema.optional(),
|
|
1435
|
+
repoName: GitHubRepoSegmentSchema.optional(),
|
|
1436
|
+
// Permanently optional: a check addressed only by workflowRunId (Gitea
|
|
1437
|
+
// Actions runs carry no check-run id) is fetchable. Callers send at least one
|
|
1438
|
+
// of checkRunId/workflowRunId; the gated forge RPC only reaches daemons that
|
|
1439
|
+
// understand this.
|
|
1440
|
+
checkRunId: z.number().int().positive().optional(),
|
|
1323
1441
|
workflowRunId: z.number().int().positive().optional(),
|
|
1442
|
+
// Permanent forge-routing field, optional because only some forges need it:
|
|
1443
|
+
// GitLab routes the check-details fetch to the change request's head pipeline
|
|
1444
|
+
// by iid, so a fork/detached MR pipeline (which lives in the source project,
|
|
1445
|
+
// not the checkout's target project) resolves correctly. GitHub ignores it.
|
|
1446
|
+
changeRequestNumber: z.number().int().positive().optional(),
|
|
1324
1447
|
requestId: z.string(),
|
|
1325
1448
|
});
|
|
1449
|
+
export const CheckoutForgeGetCheckDetailsRequestSchema = CheckoutCheckDetailsRequestPayloadSchema.extend({
|
|
1450
|
+
type: z.literal("checkout.forge.get_check_details.request"),
|
|
1451
|
+
});
|
|
1452
|
+
// COMPAT(githubCheckDetailsRpc): added in v0.1.106, remove after 2026-12-28 once
|
|
1453
|
+
// all supported clients use checkout.forge.get_check_details.*.
|
|
1454
|
+
export const CheckoutGithubGetCheckDetailsRequestSchema = CheckoutCheckDetailsRequestPayloadSchema.extend({
|
|
1455
|
+
type: z.literal("checkout.github.get_check_details.request"),
|
|
1456
|
+
});
|
|
1326
1457
|
export const CheckoutPrStatusRequestSchema = z.object({
|
|
1327
1458
|
type: z.literal("checkout_pr_status_request"),
|
|
1328
1459
|
cwd: z.string(),
|
|
@@ -1384,17 +1515,41 @@ export const BranchSuggestionsRequestSchema = z.object({
|
|
|
1384
1515
|
});
|
|
1385
1516
|
export const GitHubSearchItemSchema = z.object({
|
|
1386
1517
|
kind: z.enum(["issue", "pr"]),
|
|
1518
|
+
forge: z.string().optional(),
|
|
1387
1519
|
number: z.number(),
|
|
1388
1520
|
title: z.string(),
|
|
1389
1521
|
url: z.string(),
|
|
1390
1522
|
state: z.string(),
|
|
1391
1523
|
body: z.string().nullable(),
|
|
1392
1524
|
labels: z.array(z.string()),
|
|
1525
|
+
projectPath: z.string().optional(),
|
|
1393
1526
|
baseRefName: z.string().nullable().optional(),
|
|
1394
1527
|
headRefName: z.string().nullable().optional(),
|
|
1395
1528
|
updatedAt: z.string().optional(),
|
|
1396
1529
|
});
|
|
1397
|
-
export const
|
|
1530
|
+
export const ForgeSearchItemSchema = GitHubSearchItemSchema.extend({
|
|
1531
|
+
kind: z.enum(["issue", "change_request"]),
|
|
1532
|
+
});
|
|
1533
|
+
// COMPAT(githubSearchKind): added in v0.1.106, remove with the legacy
|
|
1534
|
+
// github_search_request RPC after 2026-12-28.
|
|
1535
|
+
export const ForgeSearchKindSchema = z.enum([
|
|
1536
|
+
"issue",
|
|
1537
|
+
"change_request",
|
|
1538
|
+
"github-issue",
|
|
1539
|
+
"github-pr",
|
|
1540
|
+
"pr",
|
|
1541
|
+
]);
|
|
1542
|
+
export const GitHubSearchKindSchema = ForgeSearchKindSchema;
|
|
1543
|
+
export const ForgeSearchRequestSchema = z.object({
|
|
1544
|
+
type: z.literal("forge.search.request"),
|
|
1545
|
+
cwd: z.string(),
|
|
1546
|
+
query: z.string(),
|
|
1547
|
+
limit: z.number().int().min(1).max(50).optional(),
|
|
1548
|
+
kinds: z.array(ForgeSearchKindSchema).optional(),
|
|
1549
|
+
requestId: z.string(),
|
|
1550
|
+
});
|
|
1551
|
+
// COMPAT(githubSearchRpc): added in v0.1.106, remove after 2026-12-28 once
|
|
1552
|
+
// clients use forge.search.*.
|
|
1398
1553
|
export const GitHubSearchRequestSchema = z.object({
|
|
1399
1554
|
type: z.literal("github_search_request"),
|
|
1400
1555
|
cwd: z.string(),
|
|
@@ -1456,6 +1611,9 @@ export const CreatePaseoWorktreeRequestSchema = z.object({
|
|
|
1456
1611
|
firstAgentContext: FirstAgentContextSchema.optional(),
|
|
1457
1612
|
refName: z.string().min(1).optional(),
|
|
1458
1613
|
action: z.enum(["branch-off", "checkout"]).optional(),
|
|
1614
|
+
checkoutSource: ChangeRequestCheckoutSourceSchema.optional(),
|
|
1615
|
+
// COMPAT(githubPrNumber): added in v0.1.106, remove after 2026-12-28 once
|
|
1616
|
+
// clients send checkoutSource: { kind: "change_request", forge, number }.
|
|
1459
1617
|
githubPrNumber: z.number().int().positive().optional(),
|
|
1460
1618
|
requestId: z.string(),
|
|
1461
1619
|
});
|
|
@@ -1550,6 +1708,9 @@ export const WorkspaceCreateRequestSchema = z.object({
|
|
|
1550
1708
|
// Target branch name for checkout, or new branch name for branch-off.
|
|
1551
1709
|
refName: z.string().min(1).optional(),
|
|
1552
1710
|
baseBranch: z.string().optional(),
|
|
1711
|
+
checkoutSource: ChangeRequestCheckoutSourceSchema.optional(),
|
|
1712
|
+
// COMPAT(githubPrNumber): added in v0.1.106, remove after 2026-12-28 once
|
|
1713
|
+
// clients send checkoutSource.
|
|
1553
1714
|
githubPrNumber: z.number().int().positive().optional(),
|
|
1554
1715
|
worktreeSlug: z.string().optional(),
|
|
1555
1716
|
}),
|
|
@@ -1704,10 +1865,10 @@ export const CreateTerminalRequestSchema = z.object({
|
|
|
1704
1865
|
agentId: z.string().optional(),
|
|
1705
1866
|
command: z.string().optional(),
|
|
1706
1867
|
args: z.array(z.string()).optional(),
|
|
1707
|
-
//
|
|
1708
|
-
//
|
|
1709
|
-
//
|
|
1710
|
-
// the
|
|
1868
|
+
// Initial PTY size. Added in v0.1.107; the app no longer sends it (the estimate cache that fed
|
|
1869
|
+
// it was removed — the pane-focus resize claim sizes the PTY instead). Kept and honored
|
|
1870
|
+
// permanently: released v0.1.107 clients still send it, and programmatic callers may pass an
|
|
1871
|
+
// exact size. Daemons without it start at 80x24 and the first resize corrects that.
|
|
1711
1872
|
size: z
|
|
1712
1873
|
.object({
|
|
1713
1874
|
rows: z.number().int().positive(),
|
|
@@ -1796,6 +1957,8 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
1796
1957
|
ProjectRemoveRequestSchema,
|
|
1797
1958
|
WorkspaceTitleSetRequestSchema,
|
|
1798
1959
|
WorkspacePinSetRequestSchema,
|
|
1960
|
+
WorkspaceRecoveryInspectRequestSchema,
|
|
1961
|
+
WorkspaceRecoveryRestoreRequestSchema,
|
|
1799
1962
|
SetVoiceModeMessageSchema,
|
|
1800
1963
|
SendAgentMessageRequestSchema,
|
|
1801
1964
|
WaitForFinishRequestSchema,
|
|
@@ -1848,7 +2011,11 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
1848
2011
|
CheckoutRefreshRequestSchema,
|
|
1849
2012
|
CheckoutPrCreateRequestSchema,
|
|
1850
2013
|
CheckoutPrMergeRequestSchema,
|
|
2014
|
+
CheckoutForgeSetAutoMergeRequestSchema,
|
|
1851
2015
|
CheckoutGithubSetAutoMergeRequestSchema,
|
|
2016
|
+
CheckoutCommitsListRequestSchema,
|
|
2017
|
+
CheckoutCommitFileDiffRequestSchema,
|
|
2018
|
+
CheckoutForgeGetCheckDetailsRequestSchema,
|
|
1852
2019
|
CheckoutGithubGetCheckDetailsRequestSchema,
|
|
1853
2020
|
CheckoutPrStatusRequestSchema,
|
|
1854
2021
|
PullRequestTimelineRequestSchema,
|
|
@@ -1859,6 +2026,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
1859
2026
|
StashListRequestSchema,
|
|
1860
2027
|
ValidateBranchRequestSchema,
|
|
1861
2028
|
BranchSuggestionsRequestSchema,
|
|
2029
|
+
ForgeSearchRequestSchema,
|
|
1862
2030
|
GitHubSearchRequestSchema,
|
|
1863
2031
|
DirectorySuggestionsRequestSchema,
|
|
1864
2032
|
PaseoWorktreeListRequestSchema,
|
|
@@ -2055,14 +2223,23 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
2055
2223
|
serverId: z.string().trim().min(1),
|
|
2056
2224
|
hostname: ServerInfoHostnameSchema.optional(),
|
|
2057
2225
|
version: ServerInfoVersionSchema.optional(),
|
|
2226
|
+
// COMPAT(desktopManaged): added in v0.1.X, remove optional parsing after 2027-01-16.
|
|
2227
|
+
desktopManaged: z.boolean().optional(),
|
|
2058
2228
|
capabilities: ServerCapabilitiesFromUnknownSchema.optional(),
|
|
2059
2229
|
// COMPAT(providersSnapshot): added in v0.1.48, remove gating when all clients use snapshot
|
|
2060
2230
|
features: z
|
|
2061
2231
|
.object({
|
|
2062
2232
|
providersSnapshot: z.boolean().optional(),
|
|
2233
|
+
// COMPAT(checkoutForgeSetAutoMerge): added in v0.1.106, remove old
|
|
2234
|
+
// checkoutGithubSetAutoMerge fallback after 2026-12-28.
|
|
2235
|
+
checkoutForgeSetAutoMerge: z.boolean().optional(),
|
|
2063
2236
|
checkoutGithubSetAutoMerge: z.boolean().optional(),
|
|
2064
2237
|
// COMPAT(githubCheckDetails): added in v0.1.92, remove gate after 2026-12-08.
|
|
2065
2238
|
githubCheckDetails: z.boolean().optional(),
|
|
2239
|
+
// COMPAT(forgeCheckDetails): added in v0.1.106, remove githubCheckDetails fallback after 2026-12-28.
|
|
2240
|
+
forgeCheckDetails: z.boolean().optional(),
|
|
2241
|
+
// COMPAT(forgeSearch): added in v0.1.106, remove github_search fallback after 2026-12-28.
|
|
2242
|
+
forgeSearch: z.boolean().optional(),
|
|
2066
2243
|
// COMPAT(daemonStatusRpc): added in v0.1.76, remove gate after 2026-11-18.
|
|
2067
2244
|
daemonStatusRpc: z.boolean().optional(),
|
|
2068
2245
|
// COMPAT(terminalRestoreModes): added in v0.1.81, remove gate after 2026-11-23.
|
|
@@ -2079,6 +2256,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
2079
2256
|
projectAdd: z.boolean().optional(),
|
|
2080
2257
|
// COMPAT(worktreeRestore): added in v0.1.97, drop the gate when floor >= v0.1.97
|
|
2081
2258
|
worktreeRestore: z.boolean().optional(),
|
|
2259
|
+
// COMPAT(workspaceRecovery): added in v0.1.105, remove after 2027-01-11 once daemon floor >= v0.1.105.
|
|
2260
|
+
workspaceRecovery: z.boolean().optional(),
|
|
2082
2261
|
// COMPAT(providerUsageList): added in v0.1.98, drop the gate when daemon floor >= v0.1.98.
|
|
2083
2262
|
providerUsageList: z.boolean().optional(),
|
|
2084
2263
|
// COMPAT(agentDetach): added in v0.1.98, remove gate after 2026-12-19 once daemon floor >= v0.1.98.
|
|
@@ -2101,6 +2280,16 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
2101
2280
|
workspaceGithubRepositorySearch: z.boolean().optional(),
|
|
2102
2281
|
// COMPAT(projectCreateDirectory): added in v0.1.108, remove gate after 2027-01-15.
|
|
2103
2282
|
projectCreateDirectory: z.boolean().optional(),
|
|
2283
|
+
// COMPAT(commitsList): added in v0.1.110, remove gate after 2027-01-16.
|
|
2284
|
+
commitsList: z.boolean().optional(),
|
|
2285
|
+
// COMPAT(providerRemoval): added in v0.1.105, drop the gate when floor >= v0.1.105.
|
|
2286
|
+
providerRemoval: z.boolean().optional(),
|
|
2287
|
+
// COMPAT(importSessionWorkspaceTarget): added in v0.1.110, remove gate after 2027-01-16.
|
|
2288
|
+
importSessionWorkspaceTarget: z.boolean().optional(),
|
|
2289
|
+
// COMPAT(forgeProviders): added in v0.1.106, drop the gate when daemon floor >= v0.1.106.
|
|
2290
|
+
// Daemon advertises pluggable non-GitHub forge support (the forge registry);
|
|
2291
|
+
// the client gates non-GitHub setup UI on it.
|
|
2292
|
+
forgeProviders: z.boolean().optional(),
|
|
2104
2293
|
})
|
|
2105
2294
|
.optional(),
|
|
2106
2295
|
})
|
|
@@ -2374,6 +2563,10 @@ export const WorkspaceDescriptorPayloadSchema = z
|
|
|
2374
2563
|
scripts: z.array(WorkspaceScriptPayloadSchema).default([]),
|
|
2375
2564
|
gitRuntime: WorkspaceGitRuntimePayloadSchema,
|
|
2376
2565
|
githubRuntime: WorkspaceGitHubRuntimePayloadSchema,
|
|
2566
|
+
// COMPAT(forge): added in v0.1.106, remove after 2026-12-27. The forge resolved
|
|
2567
|
+
// for this workspace, so the sidebar/hover-card render the right brand mark.
|
|
2568
|
+
// Old daemons omit it; absent means the client falls back to GitHub.
|
|
2569
|
+
forge: z.string().optional(),
|
|
2377
2570
|
project: ProjectPlacementPayloadSchema.optional(),
|
|
2378
2571
|
})
|
|
2379
2572
|
.transform((workspace) => ({
|
|
@@ -3083,8 +3276,7 @@ const CheckoutPrGithubRepositoryPolicySchema = z
|
|
|
3083
3276
|
rebaseMergeAllowed: false,
|
|
3084
3277
|
viewerDefaultMergeMethod: null,
|
|
3085
3278
|
});
|
|
3086
|
-
const
|
|
3087
|
-
.object({
|
|
3279
|
+
const CheckoutPrGithubStatusObjectSchema = z.object({
|
|
3088
3280
|
mergeStateStatus: z.string().nullable().optional().default(null),
|
|
3089
3281
|
autoMergeRequest: CheckoutPrGithubAutoMergeRequestSchema,
|
|
3090
3282
|
viewerCanEnableAutoMerge: z.boolean().optional().default(false),
|
|
@@ -3094,9 +3286,23 @@ const CheckoutPrGithubStatusSchema = z
|
|
|
3094
3286
|
repository: CheckoutPrGithubRepositoryPolicySchema,
|
|
3095
3287
|
isMergeQueueEnabled: z.boolean().optional().default(false),
|
|
3096
3288
|
isInMergeQueue: z.boolean().optional().default(false),
|
|
3097
|
-
})
|
|
3098
|
-
|
|
3289
|
+
});
|
|
3290
|
+
const CheckoutPrGithubStatusSchema = CheckoutPrGithubStatusObjectSchema.optional();
|
|
3291
|
+
// The open facts envelope for forge-specific PR facts. Permanent — non-GitHub
|
|
3292
|
+
// forges deliver their native facts through it. The transitional piece is the
|
|
3293
|
+
// `github` mirror above, which stays populated for clients predating this
|
|
3294
|
+
// envelope; see COMPAT(forgeSpecific) in status-projection.ts for the shim.
|
|
3295
|
+
//
|
|
3296
|
+
// NOTE: `forgeSpecific.forge` is a FACTS-FAMILY tag, not the workspace brand id.
|
|
3297
|
+
// The whole Gitea family (gitea, forgejo, codeberg) emits `forge: "gitea"` here
|
|
3298
|
+
// because they share one facts shape, while the top-level `forge` above carries
|
|
3299
|
+
// the specific brand. Validation of family-specific payloads happens at runtime
|
|
3300
|
+
// in the consumer that knows that forge family.
|
|
3301
|
+
const CheckoutPrForgeSpecificSchema = z.unknown().optional();
|
|
3099
3302
|
export const CheckoutPrStatusSchema = z.object({
|
|
3303
|
+
// COMPAT(forge): added in v0.1.106, remove the default after 2026-12-27 once daemon floor >= v0.1.106.
|
|
3304
|
+
forge: z.string().optional().default("github"),
|
|
3305
|
+
projectPath: z.string().optional(),
|
|
3100
3306
|
number: z.number().optional(),
|
|
3101
3307
|
url: z.string(),
|
|
3102
3308
|
title: z.string(),
|
|
@@ -3127,11 +3333,20 @@ export const CheckoutPrStatusSchema = z.object({
|
|
|
3127
3333
|
repoOwner: z.string().optional(),
|
|
3128
3334
|
repoName: z.string().optional(),
|
|
3129
3335
|
github: CheckoutPrGithubStatusSchema,
|
|
3336
|
+
forgeSpecific: CheckoutPrForgeSpecificSchema,
|
|
3130
3337
|
});
|
|
3338
|
+
export const ForgeAuthStateSchema = z.unknown().optional();
|
|
3131
3339
|
const CheckoutPrStatusPayloadSchema = z.object({
|
|
3132
3340
|
cwd: z.string(),
|
|
3133
3341
|
status: CheckoutPrStatusSchema.nullable(),
|
|
3134
3342
|
githubFeaturesEnabled: z.boolean(),
|
|
3343
|
+
// COMPAT(forgeAuthState): added in v0.1.106, remove after 2026-12-27. Optional richer
|
|
3344
|
+
// signal that supersedes githubFeaturesEnabled. The legacy boolean stays for old clients
|
|
3345
|
+
// and may remain true for non-auth error payloads so old clients still show the error.
|
|
3346
|
+
// Drop the boolean once the daemon floor >= v0.1.106.
|
|
3347
|
+
authState: ForgeAuthStateSchema,
|
|
3348
|
+
// COMPAT(forge): added in v0.1.106, remove the default after 2026-12-27 once daemon floor >= v0.1.106.
|
|
3349
|
+
forge: z.string().optional().default("github"),
|
|
3135
3350
|
error: CheckoutErrorSchema.nullable(),
|
|
3136
3351
|
requestId: z.string(),
|
|
3137
3352
|
});
|
|
@@ -3237,6 +3452,18 @@ export const CheckoutPrMergeResponseSchema = z.object({
|
|
|
3237
3452
|
requestId: z.string(),
|
|
3238
3453
|
}),
|
|
3239
3454
|
});
|
|
3455
|
+
export const CheckoutForgeSetAutoMergeResponseSchema = z.object({
|
|
3456
|
+
type: z.literal("checkout.forge.set_auto_merge.response"),
|
|
3457
|
+
payload: z.object({
|
|
3458
|
+
cwd: z.string(),
|
|
3459
|
+
enabled: z.boolean(),
|
|
3460
|
+
success: z.boolean(),
|
|
3461
|
+
error: CheckoutErrorSchema.nullable(),
|
|
3462
|
+
requestId: z.string(),
|
|
3463
|
+
}),
|
|
3464
|
+
});
|
|
3465
|
+
// COMPAT(githubAutoMergeRpc): added in v0.1.106, remove after 2026-12-28 once
|
|
3466
|
+
// all supported clients use checkout.forge.set_auto_merge.*.
|
|
3240
3467
|
export const CheckoutGithubSetAutoMergeResponseSchema = z.object({
|
|
3241
3468
|
type: z.literal("checkout.github.set_auto_merge.response"),
|
|
3242
3469
|
payload: z.object({
|
|
@@ -3247,6 +3474,29 @@ export const CheckoutGithubSetAutoMergeResponseSchema = z.object({
|
|
|
3247
3474
|
requestId: z.string(),
|
|
3248
3475
|
}),
|
|
3249
3476
|
});
|
|
3477
|
+
export const CheckoutCommitsListResponseSchema = z.object({
|
|
3478
|
+
type: z.literal("checkout.commits.list.response"),
|
|
3479
|
+
payload: z.object({
|
|
3480
|
+
cwd: z.string(),
|
|
3481
|
+
baseRef: z.string().nullable(),
|
|
3482
|
+
commits: z.array(CheckoutCommitSchema),
|
|
3483
|
+
error: CheckoutErrorSchema.nullable(),
|
|
3484
|
+
requestId: z.string(),
|
|
3485
|
+
}),
|
|
3486
|
+
});
|
|
3487
|
+
export const CheckoutCommitFileDiffResponseSchema = z.object({
|
|
3488
|
+
type: z.literal("checkout.commits.file_diff.response"),
|
|
3489
|
+
payload: z.object({
|
|
3490
|
+
cwd: z.string(),
|
|
3491
|
+
sha: z.string(),
|
|
3492
|
+
path: z.string(),
|
|
3493
|
+
// null when the file is absent from the commit or carries no textual diff
|
|
3494
|
+
// (e.g. binary-only changes).
|
|
3495
|
+
file: ParsedDiffFileSchema.nullable(),
|
|
3496
|
+
error: CheckoutErrorSchema.nullable(),
|
|
3497
|
+
requestId: z.string(),
|
|
3498
|
+
}),
|
|
3499
|
+
});
|
|
3250
3500
|
const CheckoutGithubCheckAnnotationSchema = z.object({
|
|
3251
3501
|
path: z.string().optional(),
|
|
3252
3502
|
startLine: z.number().optional(),
|
|
@@ -3265,6 +3515,31 @@ const CheckoutGithubCheckJobSchema = z.object({
|
|
|
3265
3515
|
logTail: z.string().optional(),
|
|
3266
3516
|
logTruncated: z.boolean().optional(),
|
|
3267
3517
|
});
|
|
3518
|
+
// Statuses stay open strings so future forge values cannot break parsing.
|
|
3519
|
+
const CheckoutPipelineJobSchema = z.object({
|
|
3520
|
+
id: z.number(),
|
|
3521
|
+
name: z.string(),
|
|
3522
|
+
stage: z.string(),
|
|
3523
|
+
status: z.string(),
|
|
3524
|
+
rawStatus: z.string(),
|
|
3525
|
+
url: z.string().nullable().optional().default(null),
|
|
3526
|
+
allowFailure: z.boolean().optional().default(false),
|
|
3527
|
+
durationSeconds: z.number().nullable().optional().default(null),
|
|
3528
|
+
});
|
|
3529
|
+
const CheckoutPipelineStageSchema = z.object({
|
|
3530
|
+
name: z.string(),
|
|
3531
|
+
status: z.string(),
|
|
3532
|
+
jobs: z.array(CheckoutPipelineJobSchema).optional().default([]),
|
|
3533
|
+
});
|
|
3534
|
+
const CheckoutPipelineSchema = z.object({
|
|
3535
|
+
id: z.number(),
|
|
3536
|
+
status: z.string(),
|
|
3537
|
+
rawStatus: z.string(),
|
|
3538
|
+
url: z.string().nullable().optional().default(null),
|
|
3539
|
+
ref: z.string().nullable().optional().default(null),
|
|
3540
|
+
sha: z.string().nullable().optional().default(null),
|
|
3541
|
+
stages: z.array(CheckoutPipelineStageSchema).optional().default([]),
|
|
3542
|
+
});
|
|
3268
3543
|
export const CheckoutGithubCheckDetailsSchema = z.object({
|
|
3269
3544
|
checkRunId: z.number(),
|
|
3270
3545
|
workflowRunId: z.number().nullable().optional(),
|
|
@@ -3284,13 +3559,28 @@ export const CheckoutGithubCheckDetailsSchema = z.object({
|
|
|
3284
3559
|
annotations: z.array(CheckoutGithubCheckAnnotationSchema).optional().default([]),
|
|
3285
3560
|
failedJobs: z.array(CheckoutGithubCheckJobSchema).optional().default([]),
|
|
3286
3561
|
truncated: z.boolean().optional().default(false),
|
|
3562
|
+
// No default: server CheckDetails keeps this optional and GitHub leaves it absent.
|
|
3563
|
+
pipeline: CheckoutPipelineSchema.nullable().optional(),
|
|
3564
|
+
});
|
|
3565
|
+
export const CheckoutCheckDetailsSchema = CheckoutGithubCheckDetailsSchema;
|
|
3566
|
+
export const CheckoutForgeGetCheckDetailsResponseSchema = z.object({
|
|
3567
|
+
type: z.literal("checkout.forge.get_check_details.response"),
|
|
3568
|
+
payload: z.object({
|
|
3569
|
+
cwd: z.string(),
|
|
3570
|
+
success: z.boolean(),
|
|
3571
|
+
details: CheckoutCheckDetailsSchema.nullable().optional().default(null),
|
|
3572
|
+
error: CheckoutErrorSchema.nullable(),
|
|
3573
|
+
requestId: z.string(),
|
|
3574
|
+
}),
|
|
3287
3575
|
});
|
|
3576
|
+
// COMPAT(githubCheckDetailsRpc): added in v0.1.106, remove after 2026-12-28 once
|
|
3577
|
+
// all supported clients use checkout.forge.get_check_details.*.
|
|
3288
3578
|
export const CheckoutGithubGetCheckDetailsResponseSchema = z.object({
|
|
3289
3579
|
type: z.literal("checkout.github.get_check_details.response"),
|
|
3290
3580
|
payload: z.object({
|
|
3291
3581
|
cwd: z.string(),
|
|
3292
3582
|
success: z.boolean(),
|
|
3293
|
-
details:
|
|
3583
|
+
details: CheckoutCheckDetailsSchema.nullable().optional().default(null),
|
|
3294
3584
|
error: CheckoutErrorSchema.nullable(),
|
|
3295
3585
|
requestId: z.string(),
|
|
3296
3586
|
}),
|
|
@@ -3350,6 +3640,16 @@ const PullRequestTimelineCommentItemSchema = z.object({
|
|
|
3350
3640
|
// threads under their parent review. Absent on issue comments and on
|
|
3351
3641
|
// timelines from daemons that predate the field.
|
|
3352
3642
|
reviewId: z.string().optional(),
|
|
3643
|
+
// Forge-neutral discussion/thread id this comment belongs to, independent of a
|
|
3644
|
+
// file position. GitLab maps its discussion id here so general (non-file)
|
|
3645
|
+
// reply chains group into one thread; file-position threads also carry it.
|
|
3646
|
+
// Absent on standalone comments and on timelines from daemons that predate it.
|
|
3647
|
+
threadId: z.string().optional(),
|
|
3648
|
+
// Forge-neutral resolution state for a thread that has no file position, e.g. a
|
|
3649
|
+
// GitLab general (non-file) discussion that is resolvable. File-position threads
|
|
3650
|
+
// carry their resolution under `location.isResolved` instead. Absent on ordinary
|
|
3651
|
+
// comments, on forges that expose no thread resolution, and on older timelines.
|
|
3652
|
+
threadIsResolved: z.boolean().optional(),
|
|
3353
3653
|
location: z
|
|
3354
3654
|
.object({
|
|
3355
3655
|
path: z.string(),
|
|
@@ -3385,6 +3685,10 @@ export const PullRequestTimelineResponseSchema = z.object({
|
|
|
3385
3685
|
error: PullRequestTimelineErrorSchema.nullable().optional().default(null),
|
|
3386
3686
|
requestId: z.string().optional().default(""),
|
|
3387
3687
|
githubFeaturesEnabled: z.boolean().optional().default(true),
|
|
3688
|
+
// COMPAT(forgeAuthState): added in v0.1.106, remove after 2026-12-27. Optional richer
|
|
3689
|
+
// signal that supersedes githubFeaturesEnabled, mirroring CheckoutPrStatusPayloadSchema.
|
|
3690
|
+
// Drop the boolean once the daemon floor >= v0.1.106.
|
|
3691
|
+
authState: ForgeAuthStateSchema,
|
|
3388
3692
|
})
|
|
3389
3693
|
.optional()
|
|
3390
3694
|
.prefault({}),
|
|
@@ -3469,14 +3773,29 @@ export const BranchSuggestionsResponseSchema = z.object({
|
|
|
3469
3773
|
requestId: z.string(),
|
|
3470
3774
|
}),
|
|
3471
3775
|
});
|
|
3776
|
+
const ForgeSearchResponsePayloadSchema = z.object({
|
|
3777
|
+
items: z.array(z.unknown()),
|
|
3778
|
+
authState: z.unknown().optional(),
|
|
3779
|
+
error: z.string().nullable(),
|
|
3780
|
+
requestId: z.string(),
|
|
3781
|
+
});
|
|
3782
|
+
const GitHubSearchResponsePayloadSchema = z.object({
|
|
3783
|
+
items: z.array(z.unknown()),
|
|
3784
|
+
featuresEnabled: z.boolean().optional(),
|
|
3785
|
+
authState: z.unknown().optional(),
|
|
3786
|
+
githubFeaturesEnabled: z.boolean().optional(),
|
|
3787
|
+
error: z.string().nullable(),
|
|
3788
|
+
requestId: z.string(),
|
|
3789
|
+
});
|
|
3790
|
+
export const ForgeSearchResponseSchema = z.object({
|
|
3791
|
+
type: z.literal("forge.search.response"),
|
|
3792
|
+
payload: ForgeSearchResponsePayloadSchema,
|
|
3793
|
+
});
|
|
3794
|
+
// COMPAT(githubSearchRpc): added in v0.1.106, remove after 2026-12-28 once
|
|
3795
|
+
// clients use forge.search.*.
|
|
3472
3796
|
export const GitHubSearchResponseSchema = z.object({
|
|
3473
3797
|
type: z.literal("github_search_response"),
|
|
3474
|
-
payload:
|
|
3475
|
-
items: z.array(GitHubSearchItemSchema),
|
|
3476
|
-
githubFeaturesEnabled: z.boolean(),
|
|
3477
|
-
error: z.string().nullable(),
|
|
3478
|
-
requestId: z.string(),
|
|
3479
|
-
}),
|
|
3798
|
+
payload: GitHubSearchResponsePayloadSchema,
|
|
3480
3799
|
});
|
|
3481
3800
|
export const DirectorySuggestionsResponseSchema = z.object({
|
|
3482
3801
|
type: z.literal("directory_suggestions_response"),
|
|
@@ -3928,6 +4247,8 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
3928
4247
|
ProjectRemoveResponseSchema,
|
|
3929
4248
|
WorkspaceTitleSetResponseSchema,
|
|
3930
4249
|
WorkspacePinSetResponseSchema,
|
|
4250
|
+
WorkspaceRecoveryInspectResponseSchema,
|
|
4251
|
+
WorkspaceRecoveryRestoreResponseSchema,
|
|
3931
4252
|
WaitForFinishResponseMessageSchema,
|
|
3932
4253
|
AgentPermissionRequestMessageSchema,
|
|
3933
4254
|
AgentPermissionResolvedMessageSchema,
|
|
@@ -3946,7 +4267,11 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
3946
4267
|
CheckoutRefreshResponseSchema,
|
|
3947
4268
|
CheckoutPrCreateResponseSchema,
|
|
3948
4269
|
CheckoutPrMergeResponseSchema,
|
|
4270
|
+
CheckoutForgeSetAutoMergeResponseSchema,
|
|
3949
4271
|
CheckoutGithubSetAutoMergeResponseSchema,
|
|
4272
|
+
CheckoutCommitsListResponseSchema,
|
|
4273
|
+
CheckoutCommitFileDiffResponseSchema,
|
|
4274
|
+
CheckoutForgeGetCheckDetailsResponseSchema,
|
|
3950
4275
|
CheckoutGithubGetCheckDetailsResponseSchema,
|
|
3951
4276
|
CheckoutPrStatusResponseSchema,
|
|
3952
4277
|
PullRequestTimelineResponseSchema,
|
|
@@ -3957,6 +4282,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
3957
4282
|
StashListResponseSchema,
|
|
3958
4283
|
ValidateBranchResponseSchema,
|
|
3959
4284
|
BranchSuggestionsResponseSchema,
|
|
4285
|
+
ForgeSearchResponseSchema,
|
|
3960
4286
|
GitHubSearchResponseSchema,
|
|
3961
4287
|
DirectorySuggestionsResponseSchema,
|
|
3962
4288
|
PaseoWorktreeListResponseSchema,
|
|
@@ -22,6 +22,7 @@ export interface AgentProviderDefinition {
|
|
|
22
22
|
defaultModel?: string;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
+
export declare const OMP_MODES: AgentProviderModeDefinition[];
|
|
25
26
|
export declare const AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[];
|
|
26
27
|
export declare const DEV_AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[];
|
|
27
28
|
export declare function getAgentProviderDefinition(provider: string, definitions?: AgentProviderDefinition[]): AgentProviderDefinition;
|