@getpaseo/protocol 0.1.96 → 0.1.97-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/agent-title-limits.d.ts +0 -1
- package/dist/agent-title-limits.js +0 -1
- package/dist/messages.d.ts +13690 -4343
- package/dist/messages.js +136 -0
- package/dist/paseo-config-schema.d.ts +21 -21
- package/dist/paseo-config-schema.js +3 -1
- package/dist/terminal-activity.d.ts +22 -0
- package/dist/terminal-activity.js +25 -0
- package/dist/terminal-subscription-key.d.ts +2 -0
- package/dist/terminal-subscription-key.js +9 -0
- package/package.json +1 -1
package/dist/messages.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { TerminalActivitySchema } from "./terminal-activity.js";
|
|
2
3
|
import { CLIENT_CAPS } from "./client-capabilities.js";
|
|
3
4
|
import { AGENT_LIFECYCLE_STATUSES } from "./agent-lifecycle.js";
|
|
4
5
|
import { MAX_EXPLICIT_AGENT_TITLE_CHARS } from "@getpaseo/protocol/agent-title-limits";
|
|
@@ -57,6 +58,7 @@ export const MutableDaemonConfigSchema = z
|
|
|
57
58
|
providers: z.record(z.string(), MutableDaemonProviderConfigSchema).default({}),
|
|
58
59
|
metadataGeneration: MutableMetadataGenerationConfigSchema.default({ providers: [] }),
|
|
59
60
|
autoArchiveAfterMerge: z.boolean().default(false),
|
|
61
|
+
enableTerminalAgentHooks: z.boolean().default(false),
|
|
60
62
|
appendSystemPrompt: z.string().default(""),
|
|
61
63
|
terminalProfiles: z.array(TerminalProfileSchema).optional(),
|
|
62
64
|
})
|
|
@@ -69,6 +71,7 @@ export const MutableDaemonConfigPatchSchema = z
|
|
|
69
71
|
.optional(),
|
|
70
72
|
metadataGeneration: MutableMetadataGenerationConfigSchema.partial().optional(),
|
|
71
73
|
autoArchiveAfterMerge: z.boolean().optional(),
|
|
74
|
+
enableTerminalAgentHooks: z.boolean().optional(),
|
|
72
75
|
appendSystemPrompt: z.string().optional(),
|
|
73
76
|
terminalProfiles: z.array(TerminalProfileSchema).optional(),
|
|
74
77
|
})
|
|
@@ -516,6 +519,7 @@ export const AgentSnapshotPayloadSchema = z.object({
|
|
|
516
519
|
id: z.string(),
|
|
517
520
|
provider: AgentProviderSchema,
|
|
518
521
|
cwd: z.string(),
|
|
522
|
+
workspaceId: z.string().optional(),
|
|
519
523
|
model: z.string().nullable(),
|
|
520
524
|
features: z.array(AgentFeatureSchema).optional(),
|
|
521
525
|
thinkingOptionId: z.string().nullable().optional(),
|
|
@@ -624,6 +628,13 @@ export const ProjectRenameRequestSchema = z.object({
|
|
|
624
628
|
customName: z.string().nullable(),
|
|
625
629
|
requestId: z.string(),
|
|
626
630
|
});
|
|
631
|
+
export const WorkspaceTitleSetRequestSchema = z.object({
|
|
632
|
+
type: z.literal("workspace.title.set.request"),
|
|
633
|
+
workspaceId: z.string(),
|
|
634
|
+
// Null or empty string clears the title and reverts to the derived name.
|
|
635
|
+
title: z.string().nullable(),
|
|
636
|
+
requestId: z.string(),
|
|
637
|
+
});
|
|
627
638
|
export const SetVoiceModeMessageSchema = z.object({
|
|
628
639
|
type: z.literal("set_voice_mode"),
|
|
629
640
|
enabled: z.boolean(),
|
|
@@ -760,6 +771,7 @@ export const FetchWorkspacesRequestMessageSchema = z.object({
|
|
|
760
771
|
.object({
|
|
761
772
|
query: z.string().optional(),
|
|
762
773
|
projectId: z.string().optional(),
|
|
774
|
+
// Unused: accepted so older clients still parse, but the server does not filter on it.
|
|
763
775
|
idPrefix: z.string().optional(),
|
|
764
776
|
})
|
|
765
777
|
.optional(),
|
|
@@ -1085,6 +1097,17 @@ export const ProjectRenameResponseSchema = z.object({
|
|
|
1085
1097
|
type: z.literal("project.rename.response"),
|
|
1086
1098
|
payload: ProjectRenameResponsePayloadSchema,
|
|
1087
1099
|
});
|
|
1100
|
+
export const WorkspaceTitleSetResponsePayloadSchema = z.object({
|
|
1101
|
+
requestId: z.string(),
|
|
1102
|
+
workspaceId: z.string(),
|
|
1103
|
+
accepted: z.boolean(),
|
|
1104
|
+
title: z.string().nullable(),
|
|
1105
|
+
error: z.string().nullable(),
|
|
1106
|
+
});
|
|
1107
|
+
export const WorkspaceTitleSetResponseSchema = z.object({
|
|
1108
|
+
type: z.literal("workspace.title.set.response"),
|
|
1109
|
+
payload: WorkspaceTitleSetResponsePayloadSchema,
|
|
1110
|
+
});
|
|
1088
1111
|
export const SetVoiceModeResponseMessageSchema = z.object({
|
|
1089
1112
|
type: z.literal("set_voice_mode_response"),
|
|
1090
1113
|
payload: z.object({
|
|
@@ -1304,6 +1327,22 @@ export const PaseoWorktreeArchiveRequestSchema = z.object({
|
|
|
1304
1327
|
worktreePath: z.string().optional(),
|
|
1305
1328
|
repoRoot: z.string().optional(),
|
|
1306
1329
|
branchName: z.string().optional(),
|
|
1330
|
+
// COMPAT(worktreeArchiveWorkspaceId): added in v0.1.97, drop the optional gate when floor >= v0.1.97.
|
|
1331
|
+
// Explicit workspace record to archive. A directory can back multiple workspaces
|
|
1332
|
+
// (Model B), so resolving the target by cwd alone picks the wrong record. When
|
|
1333
|
+
// present the daemon archives this exact workspace; when absent it falls back to
|
|
1334
|
+
// resolving by worktreePath, preferring the worktree-kind record on a cwd tie.
|
|
1335
|
+
workspaceId: z.string().optional(),
|
|
1336
|
+
// COMPAT(worktreeArchiveScope): added in v0.1.97, drop the gate when floor >= v0.1.97.
|
|
1337
|
+
// Scope of the archive operation. "workspace" archives a single workspace record
|
|
1338
|
+
// (today's default UI behavior). "worktree" archives every active workspace whose
|
|
1339
|
+
// cwd resolves to the target directory, then removes the directory if it is
|
|
1340
|
+
// Paseo-owned. Omitted/unknown values default to "workspace" for old-client safety.
|
|
1341
|
+
scope: z.enum(["workspace", "worktree"]).optional().default("workspace"),
|
|
1342
|
+
// COMPAT(worktreeDiskDeletion): added in v0.1.97, ignored as of v0.1.97
|
|
1343
|
+
// (disk removal derived from scope + last-reference + ownership); field
|
|
1344
|
+
// retained for wire parse-compat, drop when floor >= v0.1.97.
|
|
1345
|
+
deleteWorktreeFromDisk: z.boolean().optional().default(false),
|
|
1307
1346
|
requestId: z.string(),
|
|
1308
1347
|
});
|
|
1309
1348
|
export const FirstAgentContextSchema = z.object({
|
|
@@ -1343,6 +1382,7 @@ export const LegacyOpenInEditorRequestSchema = z.object({
|
|
|
1343
1382
|
});
|
|
1344
1383
|
export const OpenProjectRequestSchema = z.object({
|
|
1345
1384
|
type: z.literal("open_project_request"),
|
|
1385
|
+
// Path used only for workspace lookup/creation. Use the returned workspace.id for all subsequent references.
|
|
1346
1386
|
cwd: z.string(),
|
|
1347
1387
|
requestId: z.string(),
|
|
1348
1388
|
});
|
|
@@ -1351,6 +1391,37 @@ export const ArchiveWorkspaceRequestSchema = z.object({
|
|
|
1351
1391
|
workspaceId: z.string(),
|
|
1352
1392
|
requestId: z.string(),
|
|
1353
1393
|
});
|
|
1394
|
+
// Create a new workspace record. Unlike open_project, this never deduplicates by
|
|
1395
|
+
// directory: it always produces a fresh workspace. The source discriminates
|
|
1396
|
+
// between an existing local directory and a newly created paseo worktree.
|
|
1397
|
+
export const WorkspaceCreateRequestSchema = z.object({
|
|
1398
|
+
type: z.literal("workspace.create.request"),
|
|
1399
|
+
requestId: z.string(),
|
|
1400
|
+
// Optional user-set title applied to the created workspace.
|
|
1401
|
+
title: z.string().optional(),
|
|
1402
|
+
// Optional prompt context for workspace-level name/branch generation.
|
|
1403
|
+
firstAgentContext: FirstAgentContextSchema.optional(),
|
|
1404
|
+
source: z.discriminatedUnion("kind", [
|
|
1405
|
+
z.object({
|
|
1406
|
+
kind: z.literal("directory"),
|
|
1407
|
+
// Path of the existing checkout/directory to back the workspace.
|
|
1408
|
+
path: z.string(),
|
|
1409
|
+
projectId: z.string().optional(),
|
|
1410
|
+
}),
|
|
1411
|
+
z.object({
|
|
1412
|
+
kind: z.literal("worktree"),
|
|
1413
|
+
// The project whose repo the worktree is cut from.
|
|
1414
|
+
cwd: z.string().optional(),
|
|
1415
|
+
projectId: z.string().optional(),
|
|
1416
|
+
action: z.enum(["branch-off", "checkout"]).optional(),
|
|
1417
|
+
// Target branch name for checkout, or new branch name for branch-off.
|
|
1418
|
+
refName: z.string().min(1).optional(),
|
|
1419
|
+
baseBranch: z.string().optional(),
|
|
1420
|
+
githubPrNumber: z.number().int().positive().optional(),
|
|
1421
|
+
worktreeSlug: z.string().optional(),
|
|
1422
|
+
}),
|
|
1423
|
+
]),
|
|
1424
|
+
});
|
|
1354
1425
|
export const WorkspaceClearAttentionRequestSchema = z.object({
|
|
1355
1426
|
type: z.literal("workspace.clear_attention.request"),
|
|
1356
1427
|
workspaceId: z.union([z.string(), z.array(z.string())]),
|
|
@@ -1439,6 +1510,8 @@ export const ClientHeartbeatMessageSchema = z.object({
|
|
|
1439
1510
|
type: z.literal("client_heartbeat"),
|
|
1440
1511
|
deviceType: z.enum(["web", "mobile"]),
|
|
1441
1512
|
focusedAgentId: z.string().nullable(),
|
|
1513
|
+
// COMPAT(terminalFocusHeartbeat): added in v0.1.97, remove optional default after 2026-12-13 once old clients no longer send heartbeats without terminal focus.
|
|
1514
|
+
focusedTerminalId: z.string().nullable().optional().default(null),
|
|
1442
1515
|
lastActivityAt: z.string(),
|
|
1443
1516
|
appVisible: z.boolean(),
|
|
1444
1517
|
appVisibilityChangedAt: z.string().optional(),
|
|
@@ -1477,19 +1550,23 @@ export const RegisterPushTokenMessageSchema = z.object({
|
|
|
1477
1550
|
export const ListTerminalsRequestSchema = z.object({
|
|
1478
1551
|
type: z.literal("list_terminals_request"),
|
|
1479
1552
|
cwd: z.string().optional(),
|
|
1553
|
+
workspaceId: z.string().optional(),
|
|
1480
1554
|
requestId: z.string(),
|
|
1481
1555
|
});
|
|
1482
1556
|
export const SubscribeTerminalsRequestSchema = z.object({
|
|
1483
1557
|
type: z.literal("subscribe_terminals_request"),
|
|
1484
1558
|
cwd: z.string(),
|
|
1559
|
+
workspaceId: z.string().optional(),
|
|
1485
1560
|
});
|
|
1486
1561
|
export const UnsubscribeTerminalsRequestSchema = z.object({
|
|
1487
1562
|
type: z.literal("unsubscribe_terminals_request"),
|
|
1488
1563
|
cwd: z.string(),
|
|
1564
|
+
workspaceId: z.string().optional(),
|
|
1489
1565
|
});
|
|
1490
1566
|
export const CreateTerminalRequestSchema = z.object({
|
|
1491
1567
|
type: z.literal("create_terminal_request"),
|
|
1492
1568
|
cwd: z.string(),
|
|
1569
|
+
workspaceId: z.string().optional(),
|
|
1493
1570
|
name: z.string().optional(),
|
|
1494
1571
|
agentId: z.string().optional(),
|
|
1495
1572
|
command: z.string().optional(),
|
|
@@ -1572,6 +1649,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
1572
1649
|
CloseItemsRequestMessageSchema,
|
|
1573
1650
|
UpdateAgentRequestMessageSchema,
|
|
1574
1651
|
ProjectRenameRequestSchema,
|
|
1652
|
+
WorkspaceTitleSetRequestSchema,
|
|
1575
1653
|
SetVoiceModeMessageSchema,
|
|
1576
1654
|
SendAgentMessageRequestSchema,
|
|
1577
1655
|
WaitForFinishRequestSchema,
|
|
@@ -1638,6 +1716,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
1638
1716
|
LegacyOpenInEditorRequestSchema,
|
|
1639
1717
|
OpenProjectRequestSchema,
|
|
1640
1718
|
ArchiveWorkspaceRequestSchema,
|
|
1719
|
+
WorkspaceCreateRequestSchema,
|
|
1641
1720
|
WorkspaceClearAttentionRequestSchema,
|
|
1642
1721
|
FileExplorerRequestSchema,
|
|
1643
1722
|
ProjectIconRequestSchema,
|
|
@@ -1835,6 +1914,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
1835
1914
|
rewind: z.boolean().optional(),
|
|
1836
1915
|
// COMPAT(checkoutRefresh): added in v0.1.86, remove gate after 2026-11-29.
|
|
1837
1916
|
checkoutRefresh: z.boolean().optional(),
|
|
1917
|
+
// COMPAT(workspaceMultiplicity): added in v0.1.97, drop the gate when floor >= v0.1.97
|
|
1918
|
+
workspaceMultiplicity: z.boolean().optional(),
|
|
1838
1919
|
})
|
|
1839
1920
|
.optional(),
|
|
1840
1921
|
})
|
|
@@ -2078,6 +2159,12 @@ export const WorkspaceDescriptorPayloadSchema = z
|
|
|
2078
2159
|
// COMPAT(workspaces): keep legacy directory workspace kind parseable.
|
|
2079
2160
|
workspaceKind: z.enum(["directory", "local_checkout", "checkout", "worktree"]),
|
|
2080
2161
|
name: z.string(),
|
|
2162
|
+
// COMPAT(workspaceTitles): added in v0.1.97, drop the optional gate when floor >= v0.1.97.
|
|
2163
|
+
// When the user has titled a workspace, `name` carries the resolved value
|
|
2164
|
+
// (title) and `title` mirrors the raw override so the rename UI can prefill
|
|
2165
|
+
// its input and offer a "reset to branch name" action. Null means the name
|
|
2166
|
+
// is derived from the branch/directory.
|
|
2167
|
+
title: z.string().nullable().optional(),
|
|
2081
2168
|
archivingAt: z.string().nullable().optional().default(null),
|
|
2082
2169
|
status: WorkspaceStateBucketSchema,
|
|
2083
2170
|
// Best-effort workspace status entry timestamp. Old daemons omit the
|
|
@@ -2178,12 +2265,26 @@ export const FetchRecentProviderSessionsResponseMessageSchema = z.object({
|
|
|
2178
2265
|
filteredAlreadyImportedCount: z.number().int().nonnegative().optional(),
|
|
2179
2266
|
}),
|
|
2180
2267
|
});
|
|
2268
|
+
// COMPAT(workspaceProjects): added in v0.1.97, drop the optional gate when floor >= v0.1.97.
|
|
2269
|
+
// A project parent that has zero active workspaces. The sidebar renders it as an
|
|
2270
|
+
// empty project row so projects persist after their last workspace is archived.
|
|
2271
|
+
export const WorkspaceProjectDescriptorPayloadSchema = z.object({
|
|
2272
|
+
projectId: z.string(),
|
|
2273
|
+
projectDisplayName: z.string(),
|
|
2274
|
+
projectCustomName: z.string().nullable().optional(),
|
|
2275
|
+
projectRootPath: z.string(),
|
|
2276
|
+
projectKind: z.enum(["git", "non_git", "directory"]),
|
|
2277
|
+
});
|
|
2181
2278
|
export const FetchWorkspacesResponseMessageSchema = z.object({
|
|
2182
2279
|
type: z.literal("fetch_workspaces_response"),
|
|
2183
2280
|
payload: z.object({
|
|
2184
2281
|
requestId: z.string(),
|
|
2185
2282
|
subscriptionId: z.string().nullable().optional(),
|
|
2186
2283
|
entries: z.array(WorkspaceDescriptorPayloadSchema),
|
|
2284
|
+
// COMPAT(workspaceProjects): added in v0.1.97, drop the optional gate when floor >= v0.1.97.
|
|
2285
|
+
// Project parents with no active workspaces. Old daemons omit it; old clients
|
|
2286
|
+
// ignore it. Only populated on the first page (no cursor).
|
|
2287
|
+
emptyProjects: z.array(WorkspaceProjectDescriptorPayloadSchema).optional().default([]),
|
|
2187
2288
|
pageInfo: z.object({
|
|
2188
2289
|
nextCursor: z.string().nullable(),
|
|
2189
2290
|
prevCursor: z.string().nullable(),
|
|
@@ -2201,6 +2302,13 @@ export const WorkspaceUpdateMessageSchema = z.object({
|
|
|
2201
2302
|
z.object({
|
|
2202
2303
|
kind: z.literal("remove"),
|
|
2203
2304
|
id: z.string(),
|
|
2305
|
+
// COMPAT(workspaceProjects): added in v0.1.97, drop the optional gate when floor >= v0.1.97.
|
|
2306
|
+
// When archiving this workspace leaves its project with no active
|
|
2307
|
+
// workspaces, the daemon includes the now-empty project parent so the
|
|
2308
|
+
// sidebar keeps rendering it without waiting for a full re-hydration. Old
|
|
2309
|
+
// daemons omit it; old clients ignore it and surface the empty project on
|
|
2310
|
+
// their next workspace fetch instead.
|
|
2311
|
+
emptyProject: WorkspaceProjectDescriptorPayloadSchema.optional(),
|
|
2204
2312
|
}),
|
|
2205
2313
|
]),
|
|
2206
2314
|
});
|
|
@@ -2344,6 +2452,16 @@ export const ClearAgentAttentionResponseMessageSchema = z.object({
|
|
|
2344
2452
|
agents: z.array(AgentSnapshotPayloadSchema),
|
|
2345
2453
|
}),
|
|
2346
2454
|
});
|
|
2455
|
+
export const WorkspaceCreateResponseSchema = z.object({
|
|
2456
|
+
type: z.literal("workspace.create.response"),
|
|
2457
|
+
payload: z.object({
|
|
2458
|
+
workspace: WorkspaceDescriptorPayloadSchema.nullable(),
|
|
2459
|
+
setupTerminalId: z.string().nullable(),
|
|
2460
|
+
error: z.string().nullable(),
|
|
2461
|
+
errorCode: z.string().optional(),
|
|
2462
|
+
requestId: z.string(),
|
|
2463
|
+
}),
|
|
2464
|
+
});
|
|
2347
2465
|
export const WorkspaceClearAttentionResponseSchema = z.object({
|
|
2348
2466
|
type: z.literal("workspace.clear_attention.response"),
|
|
2349
2467
|
payload: z.object({
|
|
@@ -3192,7 +3310,9 @@ const TerminalInfoSchema = z.object({
|
|
|
3192
3310
|
id: z.string(),
|
|
3193
3311
|
name: z.string(),
|
|
3194
3312
|
cwd: z.string(),
|
|
3313
|
+
workspaceId: z.string().optional(),
|
|
3195
3314
|
title: z.string().optional(),
|
|
3315
|
+
activity: TerminalActivitySchema.nullable().optional(),
|
|
3196
3316
|
});
|
|
3197
3317
|
export const TerminalCellSchema = z.object({
|
|
3198
3318
|
char: z.string(),
|
|
@@ -3300,6 +3420,19 @@ export const TerminalStreamExitSchema = z.object({
|
|
|
3300
3420
|
terminalId: z.string(),
|
|
3301
3421
|
}),
|
|
3302
3422
|
});
|
|
3423
|
+
export const TerminalAttentionRequiredSchema = z.object({
|
|
3424
|
+
type: z.literal("terminal_attention_required"),
|
|
3425
|
+
payload: z.object({
|
|
3426
|
+
serverId: z.string().optional(),
|
|
3427
|
+
terminalId: z.string(),
|
|
3428
|
+
cwd: z.string(),
|
|
3429
|
+
workspaceId: z.string().optional(),
|
|
3430
|
+
reason: z.enum(["finished", "needs_input"]),
|
|
3431
|
+
title: z.string(),
|
|
3432
|
+
body: z.string(),
|
|
3433
|
+
shouldNotify: z.boolean(),
|
|
3434
|
+
}),
|
|
3435
|
+
});
|
|
3303
3436
|
export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
3304
3437
|
ActivityLogMessageSchema,
|
|
3305
3438
|
AssistantChunkMessageSchema,
|
|
@@ -3335,6 +3468,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
3335
3468
|
FetchAgentTimelineResponseMessageSchema,
|
|
3336
3469
|
CancelAgentResponseMessageSchema,
|
|
3337
3470
|
ClearAgentAttentionResponseMessageSchema,
|
|
3471
|
+
WorkspaceCreateResponseSchema,
|
|
3338
3472
|
WorkspaceClearAttentionResponseSchema,
|
|
3339
3473
|
SendAgentMessageResponseMessageSchema,
|
|
3340
3474
|
SetVoiceModeResponseMessageSchema,
|
|
@@ -3351,6 +3485,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
3351
3485
|
AgentRewindResponseMessageSchema,
|
|
3352
3486
|
UpdateAgentResponseMessageSchema,
|
|
3353
3487
|
ProjectRenameResponseSchema,
|
|
3488
|
+
WorkspaceTitleSetResponseSchema,
|
|
3354
3489
|
WaitForFinishResponseMessageSchema,
|
|
3355
3490
|
AgentPermissionRequestMessageSchema,
|
|
3356
3491
|
AgentPermissionResolvedMessageSchema,
|
|
@@ -3406,6 +3541,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
3406
3541
|
KillTerminalResponseSchema,
|
|
3407
3542
|
CaptureTerminalResponseSchema,
|
|
3408
3543
|
TerminalStreamExitSchema,
|
|
3544
|
+
TerminalAttentionRequiredSchema,
|
|
3409
3545
|
ChatCreateResponseSchema,
|
|
3410
3546
|
ChatListResponseSchema,
|
|
3411
3547
|
ChatInspectResponseSchema,
|
|
@@ -35,7 +35,7 @@ export declare const PaseoMetadataGenerationEntrySchema: z.ZodCatch<z.ZodObject<
|
|
|
35
35
|
instructions: z.ZodOptional<z.ZodString>;
|
|
36
36
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
37
37
|
export declare const PaseoMetadataGenerationSchema: z.ZodCatch<z.ZodObject<{
|
|
38
|
-
|
|
38
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
39
39
|
instructions: z.ZodOptional<z.ZodString>;
|
|
40
40
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
41
41
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -64,7 +64,7 @@ export declare const PaseoMetadataGenerationSchema: z.ZodCatch<z.ZodObject<{
|
|
|
64
64
|
instructions: z.ZodOptional<z.ZodString>;
|
|
65
65
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
66
66
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
67
|
-
|
|
67
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
68
68
|
instructions: z.ZodOptional<z.ZodString>;
|
|
69
69
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
70
70
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -93,7 +93,7 @@ export declare const PaseoMetadataGenerationSchema: z.ZodCatch<z.ZodObject<{
|
|
|
93
93
|
instructions: z.ZodOptional<z.ZodString>;
|
|
94
94
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
95
95
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
96
|
-
|
|
96
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
97
97
|
instructions: z.ZodOptional<z.ZodString>;
|
|
98
98
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
99
99
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -150,7 +150,7 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
|
|
|
150
150
|
port: z.ZodOptional<z.ZodUnknown>;
|
|
151
151
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
152
152
|
metadataGeneration: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
153
|
-
|
|
153
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
154
154
|
instructions: z.ZodOptional<z.ZodString>;
|
|
155
155
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
156
156
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -179,7 +179,7 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
|
|
|
179
179
|
instructions: z.ZodOptional<z.ZodString>;
|
|
180
180
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
181
181
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
182
|
-
|
|
182
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
183
183
|
instructions: z.ZodOptional<z.ZodString>;
|
|
184
184
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
185
185
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -208,7 +208,7 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
|
|
|
208
208
|
instructions: z.ZodOptional<z.ZodString>;
|
|
209
209
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
210
210
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
211
|
-
|
|
211
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
212
212
|
instructions: z.ZodOptional<z.ZodString>;
|
|
213
213
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
214
214
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -265,7 +265,7 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
|
|
|
265
265
|
port: z.ZodOptional<z.ZodUnknown>;
|
|
266
266
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
267
267
|
metadataGeneration: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
268
|
-
|
|
268
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
269
269
|
instructions: z.ZodOptional<z.ZodString>;
|
|
270
270
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
271
271
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -294,7 +294,7 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
|
|
|
294
294
|
instructions: z.ZodOptional<z.ZodString>;
|
|
295
295
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
296
296
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
297
|
-
|
|
297
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
298
298
|
instructions: z.ZodOptional<z.ZodString>;
|
|
299
299
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
300
300
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -323,7 +323,7 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
|
|
|
323
323
|
instructions: z.ZodOptional<z.ZodString>;
|
|
324
324
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
325
325
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
326
|
-
|
|
326
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
327
327
|
instructions: z.ZodOptional<z.ZodString>;
|
|
328
328
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
329
329
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -380,7 +380,7 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
|
|
|
380
380
|
port: z.ZodOptional<z.ZodUnknown>;
|
|
381
381
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
382
382
|
metadataGeneration: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
383
|
-
|
|
383
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
384
384
|
instructions: z.ZodOptional<z.ZodString>;
|
|
385
385
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
386
386
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -409,7 +409,7 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
|
|
|
409
409
|
instructions: z.ZodOptional<z.ZodString>;
|
|
410
410
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
411
411
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
412
|
-
|
|
412
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
413
413
|
instructions: z.ZodOptional<z.ZodString>;
|
|
414
414
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
415
415
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -438,7 +438,7 @@ export declare const PaseoConfigRawSchema: z.ZodObject<{
|
|
|
438
438
|
instructions: z.ZodOptional<z.ZodString>;
|
|
439
439
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
440
440
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
441
|
-
|
|
441
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
442
442
|
instructions: z.ZodOptional<z.ZodString>;
|
|
443
443
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
444
444
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -528,7 +528,7 @@ export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{} & {
|
|
|
528
528
|
port: z.ZodOptional<z.ZodUnknown>;
|
|
529
529
|
}, z.ZodTypeAny, "passthrough">>>>>>;
|
|
530
530
|
metadataGeneration: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
531
|
-
|
|
531
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
532
532
|
instructions: z.ZodOptional<z.ZodString>;
|
|
533
533
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
534
534
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -557,7 +557,7 @@ export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{} & {
|
|
|
557
557
|
instructions: z.ZodOptional<z.ZodString>;
|
|
558
558
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
559
559
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
560
|
-
|
|
560
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
561
561
|
instructions: z.ZodOptional<z.ZodString>;
|
|
562
562
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
563
563
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -586,7 +586,7 @@ export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{} & {
|
|
|
586
586
|
instructions: z.ZodOptional<z.ZodString>;
|
|
587
587
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
588
588
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
589
|
-
|
|
589
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
590
590
|
instructions: z.ZodOptional<z.ZodString>;
|
|
591
591
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
592
592
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -646,7 +646,7 @@ export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{} & {
|
|
|
646
646
|
port: z.ZodOptional<z.ZodUnknown>;
|
|
647
647
|
}, z.ZodTypeAny, "passthrough">>>>>>;
|
|
648
648
|
metadataGeneration: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
649
|
-
|
|
649
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
650
650
|
instructions: z.ZodOptional<z.ZodString>;
|
|
651
651
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
652
652
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -675,7 +675,7 @@ export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{} & {
|
|
|
675
675
|
instructions: z.ZodOptional<z.ZodString>;
|
|
676
676
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
677
677
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
678
|
-
|
|
678
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
679
679
|
instructions: z.ZodOptional<z.ZodString>;
|
|
680
680
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
681
681
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -704,7 +704,7 @@ export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{} & {
|
|
|
704
704
|
instructions: z.ZodOptional<z.ZodString>;
|
|
705
705
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
706
706
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
707
|
-
|
|
707
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
708
708
|
instructions: z.ZodOptional<z.ZodString>;
|
|
709
709
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
710
710
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -764,7 +764,7 @@ export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{} & {
|
|
|
764
764
|
port: z.ZodOptional<z.ZodUnknown>;
|
|
765
765
|
}, z.ZodTypeAny, "passthrough">>>>>>;
|
|
766
766
|
metadataGeneration: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
767
|
-
|
|
767
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
768
768
|
instructions: z.ZodOptional<z.ZodString>;
|
|
769
769
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
770
770
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -793,7 +793,7 @@ export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{} & {
|
|
|
793
793
|
instructions: z.ZodOptional<z.ZodString>;
|
|
794
794
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
795
795
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
796
|
-
|
|
796
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
797
797
|
instructions: z.ZodOptional<z.ZodString>;
|
|
798
798
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
799
799
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -822,7 +822,7 @@ export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{} & {
|
|
|
822
822
|
instructions: z.ZodOptional<z.ZodString>;
|
|
823
823
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
824
824
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
825
|
-
|
|
825
|
+
title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
|
|
826
826
|
instructions: z.ZodOptional<z.ZodString>;
|
|
827
827
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
828
828
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -33,11 +33,13 @@ export const PaseoMetadataGenerationEntrySchema = z
|
|
|
33
33
|
.catch({});
|
|
34
34
|
export const PaseoMetadataGenerationSchema = z
|
|
35
35
|
.object({
|
|
36
|
-
|
|
36
|
+
title: PaseoMetadataGenerationEntrySchema.optional(),
|
|
37
37
|
branchName: PaseoMetadataGenerationEntrySchema.optional(),
|
|
38
38
|
commitMessage: PaseoMetadataGenerationEntrySchema.optional(),
|
|
39
39
|
pullRequest: PaseoMetadataGenerationEntrySchema.optional(),
|
|
40
40
|
})
|
|
41
|
+
// COMPAT(projectMetadataAgentTitle): `agentTitle` project metadata prompts were removed
|
|
42
|
+
// in v0.1.96; keep legacy paseo.json parseable until 2026-12-16.
|
|
41
43
|
.passthrough()
|
|
42
44
|
.catch({});
|
|
43
45
|
export const PaseoConfigRawSchema = z
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const TERMINAL_ACTIVITY_STATES: readonly ["idle", "working", "attention"];
|
|
3
|
+
export declare const TERMINAL_ACTIVITY_ATTENTION_REASONS: readonly ["finished", "needs_input"];
|
|
4
|
+
export type TerminalActivityState = (typeof TERMINAL_ACTIVITY_STATES)[number];
|
|
5
|
+
export type TerminalActivityAttentionReason = (typeof TERMINAL_ACTIVITY_ATTENTION_REASONS)[number];
|
|
6
|
+
export declare const TerminalActivitySchema: z.ZodObject<{
|
|
7
|
+
state: z.ZodCatch<z.ZodEnum<["idle", "working", "attention"]>>;
|
|
8
|
+
attentionReason: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodEnum<["finished", "needs_input"]>>>>;
|
|
9
|
+
changedAt: z.ZodNumber;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
state: "idle" | "working" | "attention";
|
|
12
|
+
changedAt: number;
|
|
13
|
+
attentionReason?: "finished" | "needs_input" | null | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
changedAt: number;
|
|
16
|
+
state?: unknown;
|
|
17
|
+
attentionReason?: unknown;
|
|
18
|
+
}>;
|
|
19
|
+
export type TerminalActivity = z.infer<typeof TerminalActivitySchema>;
|
|
20
|
+
export type TerminalActivityStatusBucket = "running" | "needs_input" | "attention";
|
|
21
|
+
export declare function deriveTerminalActivityStatusBucket(activity: TerminalActivity | null | undefined): TerminalActivityStatusBucket | null;
|
|
22
|
+
//# sourceMappingURL=terminal-activity.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const TERMINAL_ACTIVITY_STATES = ["idle", "working", "attention"];
|
|
3
|
+
export const TERMINAL_ACTIVITY_ATTENTION_REASONS = ["finished", "needs_input"];
|
|
4
|
+
export const TerminalActivitySchema = z.object({
|
|
5
|
+
// Forward-compat: a newer daemon may send a state this client doesn't know.
|
|
6
|
+
// Degrade unknown states to "idle" (no indicator, no notification) so the
|
|
7
|
+
// message still parses, instead of a strict enum rejecting the whole payload.
|
|
8
|
+
state: z.enum(TERMINAL_ACTIVITY_STATES).catch("idle"),
|
|
9
|
+
attentionReason: z.enum(TERMINAL_ACTIVITY_ATTENTION_REASONS).nullable().optional().catch(null),
|
|
10
|
+
changedAt: z.number(),
|
|
11
|
+
});
|
|
12
|
+
export function deriveTerminalActivityStatusBucket(activity) {
|
|
13
|
+
if (!activity)
|
|
14
|
+
return null;
|
|
15
|
+
if (activity.attentionReason === "needs_input")
|
|
16
|
+
return "needs_input";
|
|
17
|
+
if (activity.attentionReason === "finished")
|
|
18
|
+
return "attention";
|
|
19
|
+
if (activity.state === "working")
|
|
20
|
+
return "running";
|
|
21
|
+
if (activity.state === "attention")
|
|
22
|
+
return "needs_input";
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=terminal-activity.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// A terminal directory subscription is scoped to a (cwd, workspaceId) pair, not
|
|
2
|
+
// cwd alone: under Model B two workspaces can share a cwd, and each must track
|
|
3
|
+
// and tear down its own live subscription without disturbing the other. An
|
|
4
|
+
// absent workspaceId (old clients) keys to the cwd on its own. The `::`
|
|
5
|
+
// separator cannot collide with a workspace id, which is always `wks_<hex>`.
|
|
6
|
+
export function terminalSubscriptionKey(cwd, workspaceId) {
|
|
7
|
+
return workspaceId === undefined ? cwd : `${workspaceId}::${cwd}`;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=terminal-subscription-key.js.map
|