@camerontaylor/paseo-protocol 0.8.0-fork.3 → 0.9.0-beta.2.fork.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-profile.d.ts +31 -0
- package/dist/agent-profile.js +32 -0
- package/dist/agent-types.d.ts +2 -0
- package/dist/agent-types.js +11 -0
- package/dist/browser-automation/capabilities.d.ts +1 -1
- package/dist/browser-automation/rpc-schemas.d.ts +1 -1
- package/dist/client-capabilities.d.ts +1 -0
- package/dist/client-capabilities.js +2 -0
- package/dist/generated/validation/ws-outbound.aot.js +57650 -41551
- package/dist/messages.d.ts +35195 -20264
- package/dist/messages.js +222 -63
- package/dist/plugin-config.d.ts +18 -0
- package/dist/plugin-config.js +13 -0
- package/dist/plugin-requirements.js +1 -1
- package/dist/plugin-source-reference.d.ts +3 -0
- package/dist/plugin-source-reference.js +20 -1
- package/dist/search/text-match.d.ts +2 -5
- package/dist/search/text-match.js +7 -1
- package/dist/terminal-profile.d.ts +10 -0
- package/dist/terminal-profile.js +11 -0
- package/dist/validation/ws-outbound-schema-metadata.d.ts +3154 -106
- package/package.json +1 -1
package/dist/messages.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { AgentProfileSchema, AgentSkillSelectionSchema } from "./agent-profile.js";
|
|
2
|
+
export { AgentProfileSchema, AgentSkillSelectionSchema, } from "./agent-profile.js";
|
|
3
|
+
import { PluginIdSchema, PluginRequirementsSchema, PluginSourceSchema } from "./plugin-config.js";
|
|
4
|
+
export { PluginIdSchema, PluginRequirementsSchema, DirectoryPluginSourceSchema, PluginSourceSchema, } from "./plugin-config.js";
|
|
5
|
+
import { TerminalProfileSchema } from "./terminal-profile.js";
|
|
6
|
+
export { TerminalProfileSchema } from "./terminal-profile.js";
|
|
1
7
|
import { z } from "zod";
|
|
2
8
|
import { TerminalActivitySchema } from "./terminal-activity.js";
|
|
3
9
|
import { CLIENT_CAPS } from "./client-capabilities.js";
|
|
@@ -56,41 +62,6 @@ const MutableMetadataGenerationConfigSchema = z
|
|
|
56
62
|
providers: z.array(MutableStructuredGenerationProviderSchema).default([]),
|
|
57
63
|
})
|
|
58
64
|
.passthrough();
|
|
59
|
-
export const TerminalProfileSchema = z
|
|
60
|
-
.object({
|
|
61
|
-
id: z.string(),
|
|
62
|
-
name: z.string(),
|
|
63
|
-
command: z.string(),
|
|
64
|
-
args: z.array(z.string()).optional(),
|
|
65
|
-
icon: z.string().optional(),
|
|
66
|
-
})
|
|
67
|
-
.passthrough();
|
|
68
|
-
/**
|
|
69
|
-
* A named launch bundle: a provider plus the agent-config values a client would
|
|
70
|
-
* otherwise set one control at a time. Field names mirror `AgentSessionConfig`
|
|
71
|
-
* so applying a profile is a copy rather than a translation table.
|
|
72
|
-
*
|
|
73
|
-
* There is deliberately no system prompt here. `AgentSessionConfig.systemPrompt`
|
|
74
|
-
* is creation-only, so a profile carrying one would apply when starting a new
|
|
75
|
-
* agent and silently do nothing when applied to a running one.
|
|
76
|
-
*/
|
|
77
|
-
export const AgentProfileSchema = z
|
|
78
|
-
.object({
|
|
79
|
-
id: z.string(),
|
|
80
|
-
name: z.string(),
|
|
81
|
-
/** A key into the client's icon registry, not a glyph. Unknown keys draw the default. */
|
|
82
|
-
icon: z.string().optional(),
|
|
83
|
-
/** An identity colour name shared with host badges. Unknown values draw unthemed. */
|
|
84
|
-
color: z.string().optional(),
|
|
85
|
-
provider: z.string(),
|
|
86
|
-
model: z.string().optional(),
|
|
87
|
-
modeId: z.string().optional(),
|
|
88
|
-
thinkingOptionId: z.string().optional(),
|
|
89
|
-
featureValues: z.record(z.string(), z.unknown()).optional(),
|
|
90
|
-
/** Free text, surfaced to orchestrating agents by the `list_profiles` MCP tool. */
|
|
91
|
-
notes: z.string().optional(),
|
|
92
|
-
})
|
|
93
|
-
.passthrough();
|
|
94
65
|
const MutableBrowserToolsConfigSchema = z
|
|
95
66
|
.object({
|
|
96
67
|
enabled: z.boolean().default(false),
|
|
@@ -101,21 +72,6 @@ const MutableRelayConfigSchema = z
|
|
|
101
72
|
enabled: z.boolean(),
|
|
102
73
|
})
|
|
103
74
|
.passthrough();
|
|
104
|
-
export const PluginIdSchema = z.string().regex(/^[a-z][a-z0-9-]*$/);
|
|
105
|
-
// Semver validation belongs at the manifest/runtime boundary, not on the wire.
|
|
106
|
-
export const PluginRequirementsSchema = z.object({ paseo: z.string().optional() });
|
|
107
|
-
export const DirectoryPluginSourceSchema = z
|
|
108
|
-
.object({
|
|
109
|
-
source: z.literal("directory"),
|
|
110
|
-
path: z.string().min(1),
|
|
111
|
-
enabled: z.boolean().optional(),
|
|
112
|
-
})
|
|
113
|
-
.strict();
|
|
114
|
-
export const PluginSourceSchema = z.discriminatedUnion("source", [DirectoryPluginSourceSchema]);
|
|
115
|
-
export const AgentSkillSelectionSchema = z.discriminatedUnion("mode", [
|
|
116
|
-
z.object({ mode: z.literal("all") }).strict(),
|
|
117
|
-
z.object({ mode: z.literal("custom"), skills: z.array(z.string()) }).strict(),
|
|
118
|
-
]);
|
|
119
75
|
export const MutableDaemonConfigSchema = z
|
|
120
76
|
.object({
|
|
121
77
|
// COMPAT(relayConfig): added in v0.2.6, remove after 2027-01-31 when old daemons are unsupported.
|
|
@@ -1127,9 +1083,8 @@ export const FetchAgentHistoryRequestMessageSchema = z.object({
|
|
|
1127
1083
|
type: z.literal("fetch_agent_history_request"),
|
|
1128
1084
|
requestId: z.string(),
|
|
1129
1085
|
filter: AgentDirectoryFilterSchema.optional(),
|
|
1130
|
-
// A
|
|
1131
|
-
//
|
|
1132
|
-
// structure, not on relevance. Ranking replaces `sort` when it is set.
|
|
1086
|
+
// A free-text filter over agent title, workspace name, branch, and project name.
|
|
1087
|
+
// Matching rows follow the requested sort and cursor pagination.
|
|
1133
1088
|
search: z.string().optional(),
|
|
1134
1089
|
sort: z
|
|
1135
1090
|
.array(z.object({
|
|
@@ -1248,6 +1203,48 @@ export const PluginSourceInstallRequestSchema = z.object({
|
|
|
1248
1203
|
// COMPAT(plugin-source-path): accepted for v0.7 clients; remove after 2027-09-01.
|
|
1249
1204
|
pluginPath: z.string().min(1).optional(),
|
|
1250
1205
|
});
|
|
1206
|
+
export const PluginSourceIdentitySchema = z.discriminatedUnion("kind", [
|
|
1207
|
+
z.object({ kind: z.literal("directory"), path: z.string() }),
|
|
1208
|
+
z.object({ kind: z.literal("git"), remote: z.string(), pluginPath: z.string() }),
|
|
1209
|
+
z.object({ kind: z.literal("npm"), packageName: z.string(), pluginPath: z.string() }),
|
|
1210
|
+
]);
|
|
1211
|
+
export const PluginInstallationSchema = z.object({
|
|
1212
|
+
identity: PluginSourceIdentitySchema,
|
|
1213
|
+
currentRevision: z.string().optional(),
|
|
1214
|
+
});
|
|
1215
|
+
export const PluginUpdateTargetSchema = z.discriminatedUnion("kind", [
|
|
1216
|
+
z.object({ kind: z.literal("git"), commit: z.string().regex(/^[0-9a-f]{40,64}$/) }),
|
|
1217
|
+
z.object({
|
|
1218
|
+
kind: z.literal("npm"),
|
|
1219
|
+
version: z.string().min(1),
|
|
1220
|
+
resolved: z.string().url(),
|
|
1221
|
+
integrity: z.string().min(1),
|
|
1222
|
+
}),
|
|
1223
|
+
]);
|
|
1224
|
+
export const PluginUpdateProposalSchema = z.object({
|
|
1225
|
+
id: PluginIdSchema,
|
|
1226
|
+
expected: z.object({
|
|
1227
|
+
identity: PluginSourceIdentitySchema,
|
|
1228
|
+
installationRoot: z.string(),
|
|
1229
|
+
revision: z.string(),
|
|
1230
|
+
}),
|
|
1231
|
+
target: PluginUpdateTargetSchema,
|
|
1232
|
+
});
|
|
1233
|
+
export const PluginUpdateSelectionSchema = z.discriminatedUnion("kind", [
|
|
1234
|
+
z.object({ kind: z.literal("git"), ref: z.string().min(1) }),
|
|
1235
|
+
z.object({ kind: z.literal("npm"), version: z.string().min(1) }),
|
|
1236
|
+
]);
|
|
1237
|
+
export const PluginUpdatePreviewRequestSchema = z.object({
|
|
1238
|
+
type: z.literal("plugin.source.update.preview.request"),
|
|
1239
|
+
requestId: z.string(),
|
|
1240
|
+
pluginId: PluginIdSchema.optional(),
|
|
1241
|
+
target: PluginUpdateSelectionSchema.optional(),
|
|
1242
|
+
});
|
|
1243
|
+
export const PluginUpdateApplyRequestSchema = z.object({
|
|
1244
|
+
type: z.literal("plugin.source.update.apply.request"),
|
|
1245
|
+
requestId: z.string(),
|
|
1246
|
+
proposals: z.array(PluginUpdateProposalSchema).min(1),
|
|
1247
|
+
});
|
|
1251
1248
|
export const PluginSourceStatusRequestSchema = z.object({
|
|
1252
1249
|
type: z.literal("plugin.source.status.request"),
|
|
1253
1250
|
requestId: z.string(),
|
|
@@ -1397,7 +1394,7 @@ export const CreateAgentWorktreeTargetSchema = z.discriminatedUnion("mode", [
|
|
|
1397
1394
|
]);
|
|
1398
1395
|
export const CreateAgentRequestMessageSchema = z.object({
|
|
1399
1396
|
type: z.literal("create_agent_request"),
|
|
1400
|
-
//
|
|
1397
|
+
// Legacy create_agent_request uses a separate initial-message receipt when keyed.
|
|
1401
1398
|
idempotencyKey: z.string().min(1).max(512).optional(),
|
|
1402
1399
|
config: AgentSessionConfigSchema,
|
|
1403
1400
|
env: z.record(z.string(), z.string()).optional(),
|
|
@@ -1417,6 +1414,30 @@ export const CreateAgentRequestMessageSchema = z.object({
|
|
|
1417
1414
|
labels: z.record(z.string(), z.string()).default({}),
|
|
1418
1415
|
requestId: z.string(),
|
|
1419
1416
|
});
|
|
1417
|
+
/** Resource IDs are optional on creation; supplied IDs retain their identity on replay. */
|
|
1418
|
+
export const AgentCreateRequestSchema = CreateAgentRequestMessageSchema.extend({
|
|
1419
|
+
type: z.literal("agent.create.request"),
|
|
1420
|
+
agentId: z.uuid().optional(),
|
|
1421
|
+
attachments: z.array(AgentAttachmentSchema).optional(),
|
|
1422
|
+
subscribe: z.boolean().optional(),
|
|
1423
|
+
});
|
|
1424
|
+
export const WorkspaceInitialAgentSchema = AgentCreateRequestSchema.omit({
|
|
1425
|
+
type: true,
|
|
1426
|
+
requestId: true,
|
|
1427
|
+
idempotencyKey: true,
|
|
1428
|
+
subscribe: true,
|
|
1429
|
+
workspaceId: true,
|
|
1430
|
+
worktree: true,
|
|
1431
|
+
worktreeName: true,
|
|
1432
|
+
git: true,
|
|
1433
|
+
});
|
|
1434
|
+
export const CreationSubscribeRequestSchema = z.object({
|
|
1435
|
+
type: z.literal("creation.subscribe.request"),
|
|
1436
|
+
requestId: z.string(),
|
|
1437
|
+
kind: z.enum(["workspace", "agent"]),
|
|
1438
|
+
idempotencyKey: z.string().min(1).max(512),
|
|
1439
|
+
subscribe: z.boolean().optional(),
|
|
1440
|
+
});
|
|
1420
1441
|
export const ListProviderModelsRequestMessageSchema = z.object({
|
|
1421
1442
|
type: z.literal("list_provider_models_request"),
|
|
1422
1443
|
provider: AgentProviderSchema,
|
|
@@ -1512,6 +1533,13 @@ export const FetchAgentTimelineRequestMessageSchema = z.object({
|
|
|
1512
1533
|
// Allow the client to merge this bounded page outside its contiguous loaded range.
|
|
1513
1534
|
mergeWindow: z.boolean().optional(),
|
|
1514
1535
|
});
|
|
1536
|
+
export const AgentTimelineSearchRequestMessageSchema = z.object({
|
|
1537
|
+
type: z.literal("agent.timeline.search.request"),
|
|
1538
|
+
agentId: z.string(),
|
|
1539
|
+
requestId: z.string(),
|
|
1540
|
+
query: z.string(),
|
|
1541
|
+
cursor: z.number().int().nonnegative().optional(),
|
|
1542
|
+
});
|
|
1515
1543
|
export const AgentTimelineListPromptsRequestMessageSchema = z.object({
|
|
1516
1544
|
type: z.literal("agent.timeline.list_prompts.request"),
|
|
1517
1545
|
agentId: z.string(),
|
|
@@ -2179,7 +2207,14 @@ export const ArchiveWorkspaceRequestSchema = z.object({
|
|
|
2179
2207
|
// between an existing local directory and a newly created paseo worktree.
|
|
2180
2208
|
export const WorkspaceCreateRequestSchema = z.object({
|
|
2181
2209
|
type: z.literal("workspace.create.request"),
|
|
2210
|
+
workspaceId: z
|
|
2211
|
+
.string()
|
|
2212
|
+
.regex(/^wks_[a-f0-9]{16}$/)
|
|
2213
|
+
.optional(),
|
|
2214
|
+
agent: WorkspaceInitialAgentSchema.optional(),
|
|
2215
|
+
subscribe: z.boolean().optional(),
|
|
2182
2216
|
requestId: z.string(),
|
|
2217
|
+
idempotencyKey: z.string().min(1).max(512).optional(),
|
|
2183
2218
|
// Optional user-set title applied to the created workspace.
|
|
2184
2219
|
title: z.string().optional(),
|
|
2185
2220
|
// Optional prompt context for workspace-level name/branch generation.
|
|
@@ -2617,6 +2652,8 @@ export const SessionEventSubscriptionSchema = z.enum([
|
|
|
2617
2652
|
"script_status_update",
|
|
2618
2653
|
"workspace_setup_progress",
|
|
2619
2654
|
"agent.provider_subagents.update",
|
|
2655
|
+
"agent.side_conversation.update",
|
|
2656
|
+
"agent.side_conversation.removed",
|
|
2620
2657
|
"terminal_attention_required",
|
|
2621
2658
|
"status.server_info",
|
|
2622
2659
|
"status.daemon_config_changed",
|
|
@@ -2707,6 +2744,8 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2707
2744
|
PluginSourceInstallRequestSchema,
|
|
2708
2745
|
PluginSourceStatusRequestSchema,
|
|
2709
2746
|
PluginSourceUpdateRequestSchema,
|
|
2747
|
+
PluginUpdatePreviewRequestSchema,
|
|
2748
|
+
PluginUpdateApplyRequestSchema,
|
|
2710
2749
|
PluginReloadRequestSchema,
|
|
2711
2750
|
PluginEnableRequestSchema,
|
|
2712
2751
|
PluginDisableRequestSchema,
|
|
@@ -2743,6 +2782,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2743
2782
|
RestartServerRequestMessageSchema,
|
|
2744
2783
|
DaemonUpdateRequestMessageSchema,
|
|
2745
2784
|
FetchAgentTimelineRequestMessageSchema,
|
|
2785
|
+
AgentTimelineSearchRequestMessageSchema,
|
|
2746
2786
|
AgentTimelineListPromptsRequestMessageSchema,
|
|
2747
2787
|
ProviderSubagentListRequestMessageSchema,
|
|
2748
2788
|
ProviderSubagentTimelineRequestMessageSchema,
|
|
@@ -2804,6 +2844,8 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2804
2844
|
ProjectGithubCloneRequestSchema,
|
|
2805
2845
|
ArchiveWorkspaceRequestSchema,
|
|
2806
2846
|
WorkspaceCreateRequestSchema,
|
|
2847
|
+
AgentCreateRequestSchema,
|
|
2848
|
+
CreationSubscribeRequestSchema,
|
|
2807
2849
|
WorkspaceClearAttentionRequestSchema,
|
|
2808
2850
|
WorkspaceMarkUnreadRequestSchema,
|
|
2809
2851
|
FileExplorerRequestSchema,
|
|
@@ -3009,6 +3051,9 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3009
3051
|
.object({
|
|
3010
3052
|
// COMPAT(agentRequestReceipts): added in v0.8.0; remove gate after 2027-03-05.
|
|
3011
3053
|
agentRequestReceipts: z.boolean().optional(),
|
|
3054
|
+
// COMPAT(workspaceRequestReceipts): added in v0.8.0; remove gate after 2027-03-07.
|
|
3055
|
+
workspaceRequestReceipts: z.boolean().optional(),
|
|
3056
|
+
creationLifecycle: z.boolean().optional(),
|
|
3012
3057
|
// COMPAT(hubAgentRpc): added in v0.8.0; remove gate after 2027-03-05.
|
|
3013
3058
|
hubAgentRpc: z.boolean().optional(),
|
|
3014
3059
|
providersSnapshot: z.boolean().optional(),
|
|
@@ -3058,6 +3103,10 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3058
3103
|
pluginLogs: z.boolean().optional(),
|
|
3059
3104
|
// COMPAT(pluginGitManagement): added in v0.7.0, remove gate after 2027-08-26.
|
|
3060
3105
|
pluginGitManagement: z.boolean().optional(),
|
|
3106
|
+
// COMPAT(pluginSourceInstallation): added in v0.8.0; remove gate after 2027-03-16 once daemon floor supports source identifiers.
|
|
3107
|
+
pluginSourceInstallation: z.boolean().optional(),
|
|
3108
|
+
// COMPAT(pluginSourceUpdates): added in v0.8.0; remove gate after 2027-03-16 once daemon floor supports reviewed updates.
|
|
3109
|
+
pluginSourceUpdates: z.boolean().optional(),
|
|
3061
3110
|
// COMPAT(pluginThemes): added in v0.5.0, remove gate after 2027-08-20.
|
|
3062
3111
|
// A daemon that predates this flag keeps `addTheme` in the server bundle it compiles,
|
|
3063
3112
|
// so a theme plugin cannot start there at all.
|
|
@@ -3108,6 +3157,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3108
3157
|
agentForkContextCursor: z.boolean().optional(),
|
|
3109
3158
|
// COMPAT(providerSubagents): added in v0.1.107, remove gate after 2027-01-12.
|
|
3110
3159
|
providerSubagents: z.boolean().optional(),
|
|
3160
|
+
// COMPAT(projectedSubagentTimeline): added after v0.8.0, remove gates after 2027-03-14; retain wire field.
|
|
3161
|
+
projectedSubagentTimeline: z.boolean().optional(),
|
|
3111
3162
|
// COMPAT(providerSubagentNesting): added in v0.7, remove gate after 2027-03-04.
|
|
3112
3163
|
providerSubagentNesting: z.boolean().optional(),
|
|
3113
3164
|
// COMPAT(sideConversations): added in 0.7.0-beta.2.fork.1, fork-only — stock peers never gain it, so the gate lasts as long as stock peers are supported.
|
|
@@ -3540,13 +3591,10 @@ export const AgentSearchMatchSchema = z.object({
|
|
|
3540
3591
|
const AgentDirectoryResponseEntrySchema = z.object({
|
|
3541
3592
|
agent: AgentSnapshotPayloadSchema,
|
|
3542
3593
|
project: ProjectPlacementPayloadSchema,
|
|
3543
|
-
//
|
|
3544
|
-
//
|
|
3545
|
-
// several hosts needs it to interleave their separately ranked pages.
|
|
3594
|
+
// Legacy relevance metadata remains accepted from older daemons.
|
|
3595
|
+
// Current history responses use the requested chronological sort.
|
|
3546
3596
|
searchScore: z.number().optional(),
|
|
3547
|
-
//
|
|
3548
|
-
// anyway; sending it keeps the client from re-deriving a second opinion that
|
|
3549
|
-
// could disagree with the ranking it is explaining.
|
|
3597
|
+
// Legacy server-generated highlights. Current clients highlight displayed text locally.
|
|
3550
3598
|
searchMatches: z.array(AgentSearchMatchSchema).optional(),
|
|
3551
3599
|
// COMPAT(directorySync): sequence of this latest directory projection.
|
|
3552
3600
|
syncSeq: z.number().int().positive().optional(),
|
|
@@ -3572,9 +3620,7 @@ export const FetchAgentHistoryResponseMessageSchema = z.object({
|
|
|
3572
3620
|
requestId: z.string(),
|
|
3573
3621
|
entries: z.array(AgentDirectoryResponseEntrySchema),
|
|
3574
3622
|
pageInfo: AgentDirectoryPageInfoSchema,
|
|
3575
|
-
//
|
|
3576
|
-
// Distinct from `pageInfo.hasMore`, which promises a fetchable next page —
|
|
3577
|
-
// a ranked result set has none, and the way on is a narrower query.
|
|
3623
|
+
// Older daemons truncate relevance-ranked searches instead of returning a cursor.
|
|
3578
3624
|
searchTruncated: z.boolean().optional(),
|
|
3579
3625
|
}),
|
|
3580
3626
|
});
|
|
@@ -4006,6 +4052,17 @@ export const AgentTimelineReplacementMessageSchema = z.object({
|
|
|
4006
4052
|
epoch: z.string(),
|
|
4007
4053
|
}),
|
|
4008
4054
|
});
|
|
4055
|
+
export const AgentTimelineSearchResponseMessageSchema = z.object({
|
|
4056
|
+
type: z.literal("agent.timeline.search.response"),
|
|
4057
|
+
payload: z.object({
|
|
4058
|
+
requestId: z.string(),
|
|
4059
|
+
agentId: z.string(),
|
|
4060
|
+
epoch: z.string(),
|
|
4061
|
+
locations: z.array(z.object({ seq: z.number().int().nonnegative(), role: z.enum(["user", "assistant"]) })),
|
|
4062
|
+
nextCursor: z.number().int().nonnegative().nullable(),
|
|
4063
|
+
error: z.string().nullable(),
|
|
4064
|
+
}),
|
|
4065
|
+
});
|
|
4009
4066
|
export const AgentTimelineListPromptsResponseMessageSchema = z.object({
|
|
4010
4067
|
type: z.literal("agent.timeline.list_prompts.response"),
|
|
4011
4068
|
payload: z.object({
|
|
@@ -4055,6 +4112,9 @@ export const ProviderSubagentTimelineResponseMessageSchema = z.object({
|
|
|
4055
4112
|
provider: AgentProviderSchema.nullable(),
|
|
4056
4113
|
direction: z.enum(["tail", "before", "after"]),
|
|
4057
4114
|
epoch: z.string(),
|
|
4115
|
+
projection: z.literal("projected").optional(),
|
|
4116
|
+
startCursor: AgentTimelineCursorSchema.nullable().optional(),
|
|
4117
|
+
endCursor: AgentTimelineCursorSchema.nullable().optional(),
|
|
4058
4118
|
reset: z.boolean(),
|
|
4059
4119
|
staleCursor: z.boolean(),
|
|
4060
4120
|
gap: z.boolean(),
|
|
@@ -4069,6 +4129,14 @@ export const ProviderSubagentTimelineResponseMessageSchema = z.object({
|
|
|
4069
4129
|
item: AgentTimelineItemPayloadSchema,
|
|
4070
4130
|
timestamp: z.string(),
|
|
4071
4131
|
seq: z.number().int().nonnegative(),
|
|
4132
|
+
seqStart: z.number().int().nonnegative().optional(),
|
|
4133
|
+
seqEnd: z.number().int().nonnegative().optional(),
|
|
4134
|
+
sourceSeqRanges: z
|
|
4135
|
+
.array(z.object({
|
|
4136
|
+
startSeq: z.number().int().nonnegative(),
|
|
4137
|
+
endSeq: z.number().int().nonnegative(),
|
|
4138
|
+
}))
|
|
4139
|
+
.optional(),
|
|
4072
4140
|
})),
|
|
4073
4141
|
error: z.string().nullable(),
|
|
4074
4142
|
}),
|
|
@@ -4226,9 +4294,58 @@ export const ClearAgentAttentionResponseMessageSchema = z.object({
|
|
|
4226
4294
|
agents: z.array(AgentSnapshotPayloadSchema),
|
|
4227
4295
|
}),
|
|
4228
4296
|
});
|
|
4297
|
+
export const CreationSnapshotSchema = z.object({
|
|
4298
|
+
kind: z.enum(["workspace", "agent"]),
|
|
4299
|
+
idempotencyKey: z.string(),
|
|
4300
|
+
revision: z.number().int().nonnegative(),
|
|
4301
|
+
phase: z.enum([
|
|
4302
|
+
"accepted",
|
|
4303
|
+
"workspace_ready",
|
|
4304
|
+
"agent_ready",
|
|
4305
|
+
"prompt_started",
|
|
4306
|
+
"completed",
|
|
4307
|
+
"failed",
|
|
4308
|
+
]),
|
|
4309
|
+
workspaceId: z.string().nullable(),
|
|
4310
|
+
agentId: z.string().nullable(),
|
|
4311
|
+
workspace: WorkspaceDescriptorPayloadSchema.optional(),
|
|
4312
|
+
agent: AgentSnapshotPayloadSchema.optional(),
|
|
4313
|
+
error: z.string().nullable(),
|
|
4314
|
+
setupSkippedReason: z.string().optional(),
|
|
4315
|
+
errorCode: z.string().optional(),
|
|
4316
|
+
failedStage: z.enum(["workspace", "agent", "prompt"]).optional(),
|
|
4317
|
+
outcomeUnknown: z.boolean().optional(),
|
|
4318
|
+
});
|
|
4319
|
+
export const WorkspaceCreationUpdateSchema = z.object({
|
|
4320
|
+
type: z.literal("workspace.create.update"),
|
|
4321
|
+
payload: CreationSnapshotSchema.extend({ subscriptionId: z.string().optional() }),
|
|
4322
|
+
});
|
|
4323
|
+
export const AgentCreationUpdateSchema = WorkspaceCreationUpdateSchema.extend({
|
|
4324
|
+
type: z.literal("agent.create.update"),
|
|
4325
|
+
});
|
|
4326
|
+
export const CreationSubscribeResponseSchema = z.object({
|
|
4327
|
+
type: z.literal("creation.subscribe.response"),
|
|
4328
|
+
payload: z.object({
|
|
4329
|
+
requestId: z.string(),
|
|
4330
|
+
subscriptionId: z.string().optional(),
|
|
4331
|
+
snapshot: CreationSnapshotSchema.nullable(),
|
|
4332
|
+
error: z.string().nullable(),
|
|
4333
|
+
}),
|
|
4334
|
+
});
|
|
4335
|
+
export const AgentCreateResponseSchema = z.object({
|
|
4336
|
+
type: z.literal("agent.create.response"),
|
|
4337
|
+
payload: z.object({
|
|
4338
|
+
requestId: z.string(),
|
|
4339
|
+
agent: AgentSnapshotPayloadSchema.nullable(),
|
|
4340
|
+
error: z.string().nullable(),
|
|
4341
|
+
creation: CreationSnapshotSchema.optional(),
|
|
4342
|
+
}),
|
|
4343
|
+
});
|
|
4229
4344
|
export const WorkspaceCreateResponseSchema = z.object({
|
|
4230
4345
|
type: z.literal("workspace.create.response"),
|
|
4231
4346
|
payload: z.object({
|
|
4347
|
+
agent: AgentSnapshotPayloadSchema.optional(),
|
|
4348
|
+
creation: CreationSnapshotSchema.optional(),
|
|
4232
4349
|
workspace: WorkspaceDescriptorPayloadSchema.nullable(),
|
|
4233
4350
|
setupTerminalId: z.string().nullable(),
|
|
4234
4351
|
setupSkippedReason: z.string().optional(),
|
|
@@ -5716,12 +5833,21 @@ export const PluginCatalogGetResponseSchema = z.object({
|
|
|
5716
5833
|
}),
|
|
5717
5834
|
});
|
|
5718
5835
|
export const PluginStatusSchema = z.enum(["running", "disabled", "failed"]);
|
|
5836
|
+
export const PluginNpmInstallationSchema = z.object({
|
|
5837
|
+
packageName: z.string(),
|
|
5838
|
+
requestedSpec: z.string(),
|
|
5839
|
+
version: z.string(),
|
|
5840
|
+
integrity: z.string(),
|
|
5841
|
+
});
|
|
5719
5842
|
export const PluginListItemSchema = z.object({
|
|
5720
5843
|
id: PluginIdSchema,
|
|
5844
|
+
description: z.string().optional(),
|
|
5721
5845
|
path: z.string(),
|
|
5722
5846
|
enabled: z.boolean(),
|
|
5723
5847
|
status: PluginStatusSchema,
|
|
5724
5848
|
source: z.enum(["directory", "git"]).optional(),
|
|
5849
|
+
npm: PluginNpmInstallationSchema.optional(),
|
|
5850
|
+
installation: PluginInstallationSchema.optional(),
|
|
5725
5851
|
remote: z.string().optional(),
|
|
5726
5852
|
ref: z.string().optional(),
|
|
5727
5853
|
commit: z.string().optional(),
|
|
@@ -5760,6 +5886,8 @@ export const PluginSourceInstallResponseSchema = z.object({
|
|
|
5760
5886
|
export const PluginSourceStatusItemSchema = z.object({
|
|
5761
5887
|
id: PluginIdSchema,
|
|
5762
5888
|
source: z.enum(["directory", "git"]),
|
|
5889
|
+
npm: PluginNpmInstallationSchema.optional(),
|
|
5890
|
+
installation: PluginInstallationSchema.optional(),
|
|
5763
5891
|
path: z.string(),
|
|
5764
5892
|
remote: z.string().optional(),
|
|
5765
5893
|
ref: z.string().optional(),
|
|
@@ -5783,6 +5911,30 @@ export const PluginSourceUpdateResponseSchema = z.object({
|
|
|
5783
5911
|
type: z.literal("plugin.source.update.response"),
|
|
5784
5912
|
payload: z.object({ requestId: z.string(), plugins: z.array(PluginSourceUpdateItemSchema) }),
|
|
5785
5913
|
});
|
|
5914
|
+
export const PluginUpdatePreviewSchema = z.object({
|
|
5915
|
+
id: PluginIdSchema,
|
|
5916
|
+
outcome: z.enum(["update", "current", "installed-newer", "local", "error"]),
|
|
5917
|
+
current: PluginInstallationSchema.optional(),
|
|
5918
|
+
target: PluginUpdateTargetSchema.optional(),
|
|
5919
|
+
links: z.array(z.string()),
|
|
5920
|
+
proposal: PluginUpdateProposalSchema.optional(),
|
|
5921
|
+
error: z.string().optional(),
|
|
5922
|
+
});
|
|
5923
|
+
export const PluginUpdateResultSchema = z.object({
|
|
5924
|
+
id: PluginIdSchema,
|
|
5925
|
+
outcome: z.enum(["updated", "error"]),
|
|
5926
|
+
plugin: PluginListItemSchema.optional(),
|
|
5927
|
+
error: z.string().optional(),
|
|
5928
|
+
warning: z.string().optional(),
|
|
5929
|
+
});
|
|
5930
|
+
export const PluginUpdatePreviewResponseSchema = z.object({
|
|
5931
|
+
type: z.literal("plugin.source.update.preview.response"),
|
|
5932
|
+
payload: z.object({ requestId: z.string(), plugins: z.array(PluginUpdatePreviewSchema) }),
|
|
5933
|
+
});
|
|
5934
|
+
export const PluginUpdateApplyResponseSchema = z.object({
|
|
5935
|
+
type: z.literal("plugin.source.update.apply.response"),
|
|
5936
|
+
payload: z.object({ requestId: z.string(), plugins: z.array(PluginUpdateResultSchema) }),
|
|
5937
|
+
});
|
|
5786
5938
|
function pluginActionResponse(type) {
|
|
5787
5939
|
return z.object({
|
|
5788
5940
|
type: z.literal(type),
|
|
@@ -5850,6 +6002,8 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
5850
6002
|
PluginSourceInstallResponseSchema,
|
|
5851
6003
|
PluginSourceStatusResponseSchema,
|
|
5852
6004
|
PluginSourceUpdateResponseSchema,
|
|
6005
|
+
PluginUpdatePreviewResponseSchema,
|
|
6006
|
+
PluginUpdateApplyResponseSchema,
|
|
5853
6007
|
PluginReloadResponseSchema,
|
|
5854
6008
|
PluginEnableResponseSchema,
|
|
5855
6009
|
PluginDisableResponseSchema,
|
|
@@ -5911,6 +6065,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
5911
6065
|
FetchAgentResponseMessageSchema,
|
|
5912
6066
|
FetchAgentTimelineResponseMessageSchema,
|
|
5913
6067
|
AgentTimelineReplacementMessageSchema,
|
|
6068
|
+
AgentTimelineSearchResponseMessageSchema,
|
|
5914
6069
|
AgentTimelineListPromptsResponseMessageSchema,
|
|
5915
6070
|
ProviderSubagentListResponseMessageSchema,
|
|
5916
6071
|
ProviderSubagentTimelineResponseMessageSchema,
|
|
@@ -5926,6 +6081,10 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
5926
6081
|
CancelAgentResponseMessageSchema,
|
|
5927
6082
|
ClearAgentAttentionResponseMessageSchema,
|
|
5928
6083
|
WorkspaceCreateResponseSchema,
|
|
6084
|
+
AgentCreateResponseSchema,
|
|
6085
|
+
WorkspaceCreationUpdateSchema,
|
|
6086
|
+
AgentCreationUpdateSchema,
|
|
6087
|
+
CreationSubscribeResponseSchema,
|
|
5929
6088
|
WorkspaceClearAttentionResponseSchema,
|
|
5930
6089
|
WorkspaceMarkUnreadResponseSchema,
|
|
5931
6090
|
SendAgentMessageResponseMessageSchema,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PluginIdSchema: z.ZodString;
|
|
3
|
+
export declare const PluginRequirementsSchema: z.ZodObject<{
|
|
4
|
+
paseo: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type PluginRequirements = z.infer<typeof PluginRequirementsSchema>;
|
|
7
|
+
export declare const DirectoryPluginSourceSchema: z.ZodObject<{
|
|
8
|
+
source: z.ZodLiteral<"directory">;
|
|
9
|
+
path: z.ZodString;
|
|
10
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export declare const PluginSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
|
+
source: z.ZodLiteral<"directory">;
|
|
14
|
+
path: z.ZodString;
|
|
15
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strict>], "source">;
|
|
17
|
+
export type PluginSource = z.infer<typeof PluginSourceSchema>;
|
|
18
|
+
//# sourceMappingURL=plugin-config.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const PluginIdSchema = z.string().regex(/^[a-z][a-z0-9-]*$/);
|
|
3
|
+
// Semver validation belongs at the manifest/runtime boundary, not on the wire.
|
|
4
|
+
export const PluginRequirementsSchema = z.object({ paseo: z.string().optional() });
|
|
5
|
+
export const DirectoryPluginSourceSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
source: z.literal("directory"),
|
|
8
|
+
path: z.string().min(1),
|
|
9
|
+
enabled: z.boolean().optional(),
|
|
10
|
+
})
|
|
11
|
+
.strict();
|
|
12
|
+
export const PluginSourceSchema = z.discriminatedUnion("source", [DirectoryPluginSourceSchema]);
|
|
13
|
+
//# sourceMappingURL=plugin-config.js.map
|
|
@@ -19,7 +19,7 @@ export function assertPluginCompatibility(input) {
|
|
|
19
19
|
if (satisfies(version, range) || satisfies(stableCore, range))
|
|
20
20
|
return;
|
|
21
21
|
const action = input.requirements?.paseo === undefined
|
|
22
|
-
? "This plugin has no requirements.paseo and targets Paseo before 0.8. Ask its author to migrate it: https://paseo.sh/docs/plugins/
|
|
22
|
+
? "This plugin has no requirements.paseo and targets Paseo before 0.8. Ask its author to migrate it: https://paseo.sh/docs/plugins/migration"
|
|
23
23
|
: `Use a compatible plugin version or update the ${input.runtime}.`;
|
|
24
24
|
throw new Error(`Plugin "${input.id}" requires Paseo ${range}. Your ${input.runtime} is ${input.version}. ${action}`);
|
|
25
25
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type { PluginInstallation } from "./messages.js";
|
|
1
2
|
export interface PluginSourceReference {
|
|
2
3
|
source: string;
|
|
3
4
|
pluginPath: string | undefined;
|
|
4
5
|
}
|
|
5
6
|
export declare function parsePluginSourceReference(reference: string): PluginSourceReference;
|
|
6
7
|
export declare function formatPluginSourceReference(source: string, pluginPath: string | undefined): string;
|
|
8
|
+
export declare function formatPluginIdentity(identity: PluginInstallation["identity"]): string;
|
|
9
|
+
export declare function formatPluginInstallation(installation: PluginInstallation): string;
|
|
7
10
|
//# sourceMappingURL=plugin-source-reference.d.ts.map
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export function parsePluginSourceReference(reference) {
|
|
2
|
+
const prefix = /^(npm:|github:|git:(?!\/\/))/.exec(reference)?.[0];
|
|
3
|
+
const source = prefix ? reference.slice(prefix.length) : reference;
|
|
4
|
+
const parsed = splitPluginPath(source, { scp: prefix !== "npm:" });
|
|
5
|
+
return { ...parsed, source: `${prefix ?? ""}${parsed.source}` };
|
|
6
|
+
}
|
|
7
|
+
function splitPluginPath(reference, options) {
|
|
2
8
|
const separator = reference.lastIndexOf(":");
|
|
3
9
|
if (separator === -1)
|
|
4
10
|
return { source: reference, pluginPath: undefined };
|
|
@@ -13,7 +19,7 @@ export function parsePluginSourceReference(reference) {
|
|
|
13
19
|
return { source: reference, pluginPath: undefined };
|
|
14
20
|
}
|
|
15
21
|
}
|
|
16
|
-
else {
|
|
22
|
+
else if (options.scp) {
|
|
17
23
|
const scpSeparator = reference.match(/^[^/@\s]+@[^:\s]+:/)?.[0].length;
|
|
18
24
|
if (scpSeparator !== undefined && separator === scpSeparator - 1) {
|
|
19
25
|
return { source: reference, pluginPath: undefined };
|
|
@@ -38,4 +44,17 @@ function isPortableRelativePluginPath(pluginPath) {
|
|
|
38
44
|
return false;
|
|
39
45
|
return pluginPath.split(/[\\/]/).every((part) => part !== "" && part !== "." && part !== "..");
|
|
40
46
|
}
|
|
47
|
+
export function formatPluginIdentity(identity) {
|
|
48
|
+
if (identity.kind === "directory")
|
|
49
|
+
return identity.path;
|
|
50
|
+
const source = identity.kind === "npm" ? `npm:${identity.packageName}` : `git:${identity.remote}`;
|
|
51
|
+
return identity.pluginPath === "." ? source : `${source}:${identity.pluginPath}`;
|
|
52
|
+
}
|
|
53
|
+
export function formatPluginInstallation(installation) {
|
|
54
|
+
const identity = formatPluginIdentity(installation.identity);
|
|
55
|
+
const revision = installation.identity.kind === "git"
|
|
56
|
+
? installation.currentRevision?.slice(0, 12)
|
|
57
|
+
: installation.currentRevision;
|
|
58
|
+
return revision ? `${identity} · ${revision}` : identity;
|
|
59
|
+
}
|
|
41
60
|
//# sourceMappingURL=plugin-source-reference.js.map
|
|
@@ -16,11 +16,8 @@ export interface MatchOptions {
|
|
|
16
16
|
/** Omit or pass null to match exactly. `fuzzyPolicyForToken` picks a policy. */
|
|
17
17
|
fuzzy?: FuzzyPolicy | null;
|
|
18
18
|
/**
|
|
19
|
-
* Match characters
|
|
20
|
-
* `paseo-babysit
|
|
21
|
-
* no match at all: it widens far enough that most typos hit something, and a
|
|
22
|
-
* list that preselects its first row would then act on that row when the user
|
|
23
|
-
* presses Enter expecting nothing to happen.
|
|
19
|
+
* Match characters in order within one whitespace-delimited word, so `pasbab`
|
|
20
|
+
* finds `paseo-babysit`, but `labdes` cannot join "Label as Design". Defaults to on.
|
|
24
21
|
*/
|
|
25
22
|
subsequence?: boolean;
|
|
26
23
|
}
|
|
@@ -56,6 +56,12 @@ function scoreSubsequenceMatch(query, text) {
|
|
|
56
56
|
let firstIndex = -1;
|
|
57
57
|
let lastIndex = -1;
|
|
58
58
|
for (let textIndex = 0; textIndex < text.length && queryIndex < query.length; textIndex += 1) {
|
|
59
|
+
if (/\s/u.test(text[textIndex])) {
|
|
60
|
+
queryIndex = 0;
|
|
61
|
+
firstIndex = -1;
|
|
62
|
+
lastIndex = -1;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
59
65
|
if (text[textIndex] !== query[queryIndex])
|
|
60
66
|
continue;
|
|
61
67
|
if (firstIndex === -1)
|
|
@@ -242,7 +248,7 @@ export function matchRanges(query, text, score) {
|
|
|
242
248
|
if (score.tier === TIER_SUBSEQUENCE) {
|
|
243
249
|
const indices = [];
|
|
244
250
|
let queryIndex = 0;
|
|
245
|
-
for (let textIndex =
|
|
251
|
+
for (let textIndex = score.offset; textIndex < t.length && queryIndex < q.length; textIndex += 1) {
|
|
246
252
|
if (t[textIndex] !== q[queryIndex])
|
|
247
253
|
continue;
|
|
248
254
|
indices.push(textIndex);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const TerminalProfileSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
command: z.ZodString;
|
|
6
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$loose>;
|
|
9
|
+
export type TerminalProfile = z.infer<typeof TerminalProfileSchema>;
|
|
10
|
+
//# sourceMappingURL=terminal-profile.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const TerminalProfileSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
name: z.string(),
|
|
6
|
+
command: z.string(),
|
|
7
|
+
args: z.array(z.string()).optional(),
|
|
8
|
+
icon: z.string().optional(),
|
|
9
|
+
})
|
|
10
|
+
.passthrough();
|
|
11
|
+
//# sourceMappingURL=terminal-profile.js.map
|