@camerontaylor/paseo-protocol 0.12.0-beta.1.fork.1 → 0.13.0-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/addresses.d.ts +6 -0
- package/dist/addresses.js +2 -0
- package/dist/agent-labels.d.ts +4 -0
- package/dist/agent-labels.js +17 -0
- package/dist/agent-message.d.ts +1 -0
- package/dist/agent-message.js +1 -0
- package/dist/binary-frames/demux.d.ts +4 -0
- package/dist/binary-frames/demux.js +5 -0
- package/dist/binary-frames/host-route.d.ts +12 -0
- package/dist/binary-frames/host-route.js +36 -0
- package/dist/binary-frames/index.d.ts +1 -0
- package/dist/binary-frames/index.js +1 -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 +1 -0
- package/dist/connection-offer.d.ts +2 -0
- package/dist/connection-offer.js +3 -0
- package/dist/daemon-endpoints.js +8 -0
- package/dist/generated/validation/ws-outbound-schema-metadata.d.ts +858 -341
- package/dist/generated/validation/ws-outbound-schema-metadata.js +10 -0
- package/dist/generated/validation/ws-outbound.aot.d.ts +20 -0
- package/dist/generated/validation/ws-outbound.aot.js +117355 -115207
- package/dist/host-target.d.ts +18 -0
- package/dist/host-target.js +118 -0
- package/dist/hosts.d.ts +303 -0
- package/dist/hosts.js +117 -0
- package/dist/messages.d.ts +2698 -540
- package/dist/messages.js +83 -9
- package/dist/paseo-tool-call-detail.d.ts +1 -14
- package/dist/paseo-tool-call-detail.js +2 -306
- package/dist/paseo-tool-presentation/agent-message.d.ts +10 -0
- package/dist/paseo-tool-presentation/agent-message.js +22 -0
- package/dist/paseo-tool-presentation/catalog.d.ts +312 -0
- package/dist/paseo-tool-presentation/catalog.js +316 -0
- package/dist/paseo-tool-presentation/detail-sections.d.ts +15 -0
- package/dist/paseo-tool-presentation/detail-sections.js +161 -0
- package/dist/paseo-tool-presentation/index.d.ts +22 -0
- package/dist/paseo-tool-presentation/index.js +62 -0
- package/dist/paseo-tool-presentation/summary-text.d.ts +7 -0
- package/dist/paseo-tool-presentation/summary-text.js +22 -0
- package/dist/plugin-registry.d.ts +21 -0
- package/dist/plugin-registry.js +11 -1
- package/dist/provider-icon-names.js +3 -0
- package/dist/schedule/rpc-schemas.d.ts +4 -4
- package/dist/schedule/types.d.ts +1 -1
- package/dist/tool-call-display.d.ts +2 -0
- package/dist/tool-call-display.js +15 -11
- package/dist/validation/ws-outbound-envelope.d.ts +587 -100
- package/package.json +5 -1
- package/dist/agent-message-display.d.ts +0 -8
- package/dist/agent-message-display.js +0 -20
package/dist/messages.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgentMessageSchema } from "./agent-message.js";
|
|
2
|
+
import { HostsListRequestSchema, HostsAddRequestSchema, HostsUpdateRequestSchema, HostsRemoveRequestSchema, HostsLinkOpenRequestSchema, HostsRouteOpenRequestSchema, HostsRouteFrameRequestSchema, HostsRouteCloseRequestSchema, HostsListResponseSchema, HostsChangedSchema, HostsAddResponseSchema, HostsUpdateResponseSchema, HostsRemoveResponseSchema, HostsLinkOpenResponseSchema, HostsRouteOpenResponseSchema, HostsRouteFrameSchema, HostsRouteClosedSchema, } from "./hosts.js";
|
|
2
3
|
import { PluginRegistryIdentitySchema } from "./plugin-registry.js";
|
|
3
4
|
import { AgentProfileSchema, AgentSkillSelectionSchema } from "./agent-profile.js";
|
|
4
5
|
export { AgentProfileSchema, AgentSkillSelectionSchema, } from "./agent-profile.js";
|
|
@@ -73,6 +74,9 @@ const MutableBrowserToolsConfigSchema = z
|
|
|
73
74
|
const MutableRelayConfigSchema = z
|
|
74
75
|
.object({
|
|
75
76
|
enabled: z.boolean(),
|
|
77
|
+
// COMPAT(relayProtectedSecurity): added in v0.13.0, keep optional while old daemons are supported.
|
|
78
|
+
// When true the daemon admits only relay sessions that negotiated protected endpoint security.
|
|
79
|
+
requireProtectedSecurity: z.boolean().optional(),
|
|
76
80
|
})
|
|
77
81
|
.passthrough();
|
|
78
82
|
export const MutableDaemonConfigSchema = z
|
|
@@ -1038,7 +1042,7 @@ export const ReviewAttachmentSchema = z.object({
|
|
|
1038
1042
|
type: z.literal("review"),
|
|
1039
1043
|
mimeType: z.literal("application/paseo-review"),
|
|
1040
1044
|
cwd: z.string(),
|
|
1041
|
-
mode: z.enum(["uncommitted", "base"]),
|
|
1045
|
+
mode: z.enum(["uncommitted", "base", "all"]),
|
|
1042
1046
|
baseRef: z.string().nullable().optional(),
|
|
1043
1047
|
comments: z.array(ReviewAttachmentCommentSchema),
|
|
1044
1048
|
});
|
|
@@ -1244,6 +1248,8 @@ export const SendAgentMessageRequestSchema = z.object({
|
|
|
1244
1248
|
text: z.string(),
|
|
1245
1249
|
/** Opaque sender identity for agent-originated prompts. */
|
|
1246
1250
|
sourceAgentId: z.string().min(1).optional(),
|
|
1251
|
+
sourceAgentServerId: z.string().min(1).optional(),
|
|
1252
|
+
sessionMode: z.string().optional(),
|
|
1247
1253
|
messageId: z.string().optional(), // Client-provided ID for deduplication
|
|
1248
1254
|
activeTurnBehavior: ActiveTurnBehaviorSchema.optional(),
|
|
1249
1255
|
images: z.array(ImageAttachmentSchema).optional(),
|
|
@@ -1960,7 +1966,7 @@ const CheckoutErrorSchema = z.object({
|
|
|
1960
1966
|
message: z.string(),
|
|
1961
1967
|
});
|
|
1962
1968
|
const CheckoutDiffCompareSchema = z.object({
|
|
1963
|
-
mode: z.enum(["uncommitted", "base"]),
|
|
1969
|
+
mode: z.enum(["uncommitted", "base", "all"]),
|
|
1964
1970
|
baseRef: z.string().optional(),
|
|
1965
1971
|
ignoreWhitespace: z.boolean().optional(),
|
|
1966
1972
|
});
|
|
@@ -2522,6 +2528,11 @@ export const WorkspaceSetupStatusRequestSchema = z.object({
|
|
|
2522
2528
|
workspaceId: z.string(),
|
|
2523
2529
|
requestId: z.string(),
|
|
2524
2530
|
});
|
|
2531
|
+
export const WorkspaceSetupSubscribeRequestSchema = z.object({
|
|
2532
|
+
type: z.literal("workspace.setup.subscribe.request"),
|
|
2533
|
+
workspaceId: z.string(),
|
|
2534
|
+
requestId: z.string(),
|
|
2535
|
+
});
|
|
2525
2536
|
export const WorkspaceSetupRunRequestSchema = z.object({
|
|
2526
2537
|
type: z.literal("workspace.setup.run.request"),
|
|
2527
2538
|
workspaceId: z.string(),
|
|
@@ -2712,6 +2723,10 @@ export const FileVersionSchema = z.discriminatedUnion("status", [
|
|
|
2712
2723
|
size: z.number().int().nonnegative(),
|
|
2713
2724
|
modifiedAt: z.string(),
|
|
2714
2725
|
revision: z.string().optional(),
|
|
2726
|
+
// Classified from the extension and the first bytes, so a client can choose how to open the
|
|
2727
|
+
// file before reading it.
|
|
2728
|
+
kind: z.enum(["text", "image", "binary"]).optional(),
|
|
2729
|
+
mimeType: z.string().optional(),
|
|
2715
2730
|
}),
|
|
2716
2731
|
z.object({
|
|
2717
2732
|
status: z.literal("missing"),
|
|
@@ -2742,6 +2757,8 @@ export const FileWriteRequestSchema = z.object({
|
|
|
2742
2757
|
cwd: z.string(),
|
|
2743
2758
|
path: z.string(),
|
|
2744
2759
|
content: z.string(),
|
|
2760
|
+
// COMPAT(fileByteWrites): added in v0.13.0. Daemons without the feature write `content` as text.
|
|
2761
|
+
contentEncoding: z.enum(["utf-8", "base64"]).optional(),
|
|
2745
2762
|
expectedModifiedAt: z.string(),
|
|
2746
2763
|
expectedRevision: z.string().optional(),
|
|
2747
2764
|
requestId: z.string(),
|
|
@@ -3086,6 +3103,14 @@ export const SubscriptionReleaseResponseSchema = z.object({
|
|
|
3086
3103
|
payload: z.object({ requestId: z.string(), subscriptionId: z.string() }),
|
|
3087
3104
|
});
|
|
3088
3105
|
export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
3106
|
+
HostsListRequestSchema,
|
|
3107
|
+
HostsAddRequestSchema,
|
|
3108
|
+
HostsUpdateRequestSchema,
|
|
3109
|
+
HostsRemoveRequestSchema,
|
|
3110
|
+
HostsLinkOpenRequestSchema,
|
|
3111
|
+
HostsRouteOpenRequestSchema,
|
|
3112
|
+
HostsRouteFrameRequestSchema,
|
|
3113
|
+
HostsRouteCloseRequestSchema,
|
|
3089
3114
|
BrowserHostRegisterRequestSchema,
|
|
3090
3115
|
SubscriptionReleaseRequestSchema,
|
|
3091
3116
|
SessionEventsSetSubscriptionRequestSchema,
|
|
@@ -3240,6 +3265,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
3240
3265
|
PaseoWorktreeArchiveRequestSchema,
|
|
3241
3266
|
CreatePaseoWorktreeRequestSchema,
|
|
3242
3267
|
WorkspaceSetupStatusRequestSchema,
|
|
3268
|
+
WorkspaceSetupSubscribeRequestSchema,
|
|
3243
3269
|
WorkspaceSetupRunRequestSchema,
|
|
3244
3270
|
LegacyListAvailableEditorsRequestSchema,
|
|
3245
3271
|
LegacyOpenInEditorRequestSchema,
|
|
@@ -3462,6 +3488,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3462
3488
|
serverId: z.string().trim().min(1),
|
|
3463
3489
|
hostname: ServerInfoHostnameSchema.optional(),
|
|
3464
3490
|
version: ServerInfoVersionSchema.optional(),
|
|
3491
|
+
// Authenticated producer for host registration ownership, separate from admission authority.
|
|
3492
|
+
sourceId: z.string().optional(),
|
|
3465
3493
|
// COMPAT(sessionPermissions): optional while clients support older daemons.
|
|
3466
3494
|
permissions: z.array(DaemonPermissionSchema).optional(),
|
|
3467
3495
|
// COMPAT(desktopManaged): added in v0.1.X, remove optional parsing after 2027-01-16.
|
|
@@ -3483,6 +3511,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3483
3511
|
internalWorkspaces: z.boolean().optional(),
|
|
3484
3512
|
backgroundWorkspaces: z.boolean().optional(),
|
|
3485
3513
|
providersSnapshot: z.boolean().optional(),
|
|
3514
|
+
connectedHosts: z.boolean().optional(),
|
|
3515
|
+
hostMultiplexing: z.boolean().optional(),
|
|
3486
3516
|
usageSources: z.boolean().optional(),
|
|
3487
3517
|
usageReportsStreaming: z.boolean().optional(),
|
|
3488
3518
|
// COMPAT(providersSnapshotCwd): added in v0.3.2, remove gate after 2027-02-10.
|
|
@@ -3584,6 +3614,8 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3584
3614
|
workspaceRecovery: z.boolean().optional(),
|
|
3585
3615
|
// COMPAT(workspaceFileEditing): added in v0.2.0, remove after 2027-01-18 once daemon floor >= v0.2.0.
|
|
3586
3616
|
workspaceFileEditing: z.boolean().optional(),
|
|
3617
|
+
// COMPAT(fileByteWrites): added in v0.13.0, remove gate after 2027-04-20.
|
|
3618
|
+
fileByteWrites: z.boolean().optional(),
|
|
3587
3619
|
// COMPAT(companionStreamPortV1): added in v0.11.0-beta.3-fork, remove after 2027-04-01.
|
|
3588
3620
|
// Deliberately not the source fork's `companionStream`/`artifactFeed` flags: a client
|
|
3589
3621
|
// that saw those names would expect the source's flat companion RPC, which this
|
|
@@ -3622,6 +3654,9 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3622
3654
|
workspaceMarkUnread: z.boolean().optional(),
|
|
3623
3655
|
// COMPAT(hubRelationship): added in v0.1.X, drop the gate when floor >= v0.1.X.
|
|
3624
3656
|
hubRelationship: z.boolean().optional(),
|
|
3657
|
+
// COMPAT(relayProtectedSecurity): added in v0.13.0. A capable daemon always advertises
|
|
3658
|
+
// it; relay clients that negotiated legacy security reject the connection on seeing it.
|
|
3659
|
+
relayProtectedSecurity: z.boolean().optional(),
|
|
3625
3660
|
// COMPAT(projectGithubClone): added in v0.1.108, remove gate after 2027-01-15.
|
|
3626
3661
|
projectGithubClone: z.boolean().optional(),
|
|
3627
3662
|
// COMPAT(workspaceGithubRepositorySearch): added in v0.1.108, remove gate after 2027-01-15.
|
|
@@ -3656,9 +3691,12 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3656
3691
|
selectiveAgentTimeline: z.boolean().optional(),
|
|
3657
3692
|
explicitEventSubscriptions: z.boolean().optional(),
|
|
3658
3693
|
ownedSubscriptions: z.boolean().optional(),
|
|
3694
|
+
workspaceSetupObservation: z.boolean().optional(),
|
|
3695
|
+
workspaceSortTimes: z.boolean().optional(),
|
|
3659
3696
|
// COMPAT(canonicalSubmittedPrompts): added in v0.2.6, remove gate after 2027-01-30.
|
|
3660
3697
|
canonicalSubmittedPrompts: z.boolean().optional(),
|
|
3661
3698
|
agentMessageProvenance: z.boolean().optional(),
|
|
3699
|
+
agentMessageBatching: z.boolean().optional(),
|
|
3662
3700
|
// COMPAT(agentTurnIdentity): accept peers that observed pre-release v0.2.6 through 2027-01-31.
|
|
3663
3701
|
agentTurnIdentity: z.boolean().optional(),
|
|
3664
3702
|
// COMPAT(stableProjectIdentity): added in v0.1.109, remove gate after 2027-01-15.
|
|
@@ -3673,6 +3711,7 @@ export const ServerInfoStatusPayloadSchema = z
|
|
|
3673
3711
|
fsEntryDuplicate: z.boolean().optional(),
|
|
3674
3712
|
// COMPAT(checkoutDiscardChanges): added in v0.3.0, remove gate after 2027-02-08.
|
|
3675
3713
|
checkoutDiscardChanges: z.boolean().optional(),
|
|
3714
|
+
checkoutDiffAll: z.boolean().optional(),
|
|
3676
3715
|
// COMPAT(agentProfiles): added in v0.3.2, remove gate after 2027-02-11.
|
|
3677
3716
|
// An older daemon parses its persisted config strictly, so writing
|
|
3678
3717
|
// agentProfiles to one is silently dropped. The client hides the feature
|
|
@@ -3937,6 +3976,8 @@ export const WorkspaceDescriptorPayloadSchema = z
|
|
|
3937
3976
|
projectCustomIconRevision: z.string().nullable().optional(),
|
|
3938
3977
|
projectRootPath: z.string(),
|
|
3939
3978
|
workspaceDirectory: z.string().optional(),
|
|
3979
|
+
// COMPAT(workspaceSetupObservation): added in v0.12.0, remove optional after 2027-04-19.
|
|
3980
|
+
setupStatus: z.enum(["running", "completed", "failed", "blocked"]).nullable().optional(),
|
|
3940
3981
|
// COMPAT(worktreeSlug): added in v0.2.6, remove optional after 2027-01-31.
|
|
3941
3982
|
// Present only for Paseo-owned worktrees; this is the basename of their root directory.
|
|
3942
3983
|
worktreeSlug: z.string().optional(),
|
|
@@ -3968,6 +4009,8 @@ export const WorkspaceDescriptorPayloadSchema = z
|
|
|
3968
4009
|
.nullish()
|
|
3969
4010
|
.transform((value) => value ?? null),
|
|
3970
4011
|
activityAt: z.string().nullable(),
|
|
4012
|
+
createdAt: z.string().optional(),
|
|
4013
|
+
lastUserMessageAt: z.string().nullable().optional(),
|
|
3971
4014
|
diffStat: z
|
|
3972
4015
|
.object({
|
|
3973
4016
|
additions: z.number(),
|
|
@@ -4297,6 +4340,15 @@ export const WorkspaceSetupSnapshotSchema = z.object({
|
|
|
4297
4340
|
})
|
|
4298
4341
|
.optional(),
|
|
4299
4342
|
});
|
|
4343
|
+
export const WorkspaceSetupSubscribeResponseSchema = z.object({
|
|
4344
|
+
type: z.literal("workspace.setup.subscribe.response"),
|
|
4345
|
+
payload: z.object({
|
|
4346
|
+
requestId: z.string(),
|
|
4347
|
+
subscriptionId: z.string().optional(),
|
|
4348
|
+
workspaceId: z.string(),
|
|
4349
|
+
snapshot: WorkspaceSetupSnapshotSchema.nullable(),
|
|
4350
|
+
}),
|
|
4351
|
+
});
|
|
4300
4352
|
export const WorkspaceSetupRunResponseMessageSchema = z.object({
|
|
4301
4353
|
type: z.literal("workspace.setup.run.response"),
|
|
4302
4354
|
payload: z.object({
|
|
@@ -4854,6 +4906,7 @@ export const SendAgentMessageResponseMessageSchema = z.object({
|
|
|
4854
4906
|
requestId: z.string(),
|
|
4855
4907
|
agentId: z.string(),
|
|
4856
4908
|
accepted: z.boolean(),
|
|
4909
|
+
deliveryStatus: z.literal("queued").optional(),
|
|
4857
4910
|
error: z.string().nullable(),
|
|
4858
4911
|
}),
|
|
4859
4912
|
});
|
|
@@ -6074,14 +6127,15 @@ export const UsageProblemSchema = z.discriminatedUnion("kind", [
|
|
|
6074
6127
|
}),
|
|
6075
6128
|
z.object({ kind: z.literal("no_quota"), detail: z.string() }),
|
|
6076
6129
|
]);
|
|
6130
|
+
const AvailableUsageReportSchema = z.object({
|
|
6131
|
+
status: z.literal("available"),
|
|
6132
|
+
planLabel: z.string().optional(),
|
|
6133
|
+
windows: z.array(ProviderUsageWindowSchema),
|
|
6134
|
+
balances: z.array(ProviderUsageBalanceSchema).optional(),
|
|
6135
|
+
details: z.array(ProviderUsageDetailSchema).optional(),
|
|
6136
|
+
});
|
|
6077
6137
|
export const UsageReportSchema = z.discriminatedUnion("status", [
|
|
6078
|
-
|
|
6079
|
-
status: z.literal("available"),
|
|
6080
|
-
planLabel: z.string().optional(),
|
|
6081
|
-
windows: z.array(ProviderUsageWindowSchema),
|
|
6082
|
-
balances: z.array(ProviderUsageBalanceSchema).optional(),
|
|
6083
|
-
details: z.array(ProviderUsageDetailSchema).optional(),
|
|
6084
|
-
}),
|
|
6138
|
+
AvailableUsageReportSchema,
|
|
6085
6139
|
z.object({ status: z.literal("unavailable"), problem: UsageProblemSchema }),
|
|
6086
6140
|
z.object({ status: z.literal("error"), error: z.string() }),
|
|
6087
6141
|
]);
|
|
@@ -6093,6 +6147,11 @@ export const UsageReportEntrySchema = z.object({
|
|
|
6093
6147
|
sourceLabel: z.string(),
|
|
6094
6148
|
icon: z.string().optional(),
|
|
6095
6149
|
report: UsageReportSchema,
|
|
6150
|
+
// Successful completion time; fetchedAt remains the attempt timestamp for ordering.
|
|
6151
|
+
successfulAt: z.string().optional(),
|
|
6152
|
+
lastSuccessful: z
|
|
6153
|
+
.object({ fetchedAt: z.string(), report: AvailableUsageReportSchema })
|
|
6154
|
+
.optional(),
|
|
6096
6155
|
loginErrors: z
|
|
6097
6156
|
.array(z.object({
|
|
6098
6157
|
harness: z.string(),
|
|
@@ -6530,6 +6589,15 @@ export const AgentSkillsImportLegacySelectionResponseSchema = z.object({
|
|
|
6530
6589
|
}),
|
|
6531
6590
|
});
|
|
6532
6591
|
export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
6592
|
+
HostsListResponseSchema,
|
|
6593
|
+
HostsChangedSchema,
|
|
6594
|
+
HostsAddResponseSchema,
|
|
6595
|
+
HostsUpdateResponseSchema,
|
|
6596
|
+
HostsRemoveResponseSchema,
|
|
6597
|
+
HostsLinkOpenResponseSchema,
|
|
6598
|
+
HostsRouteOpenResponseSchema,
|
|
6599
|
+
HostsRouteFrameSchema,
|
|
6600
|
+
HostsRouteClosedSchema,
|
|
6533
6601
|
AgentCompanionUpdateEntryResponseMessageSchema,
|
|
6534
6602
|
AgentArtifactsScanResponseMessageSchema,
|
|
6535
6603
|
BrowserHostRegisterResponseSchema,
|
|
@@ -6590,6 +6658,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
6590
6658
|
ScriptStatusUpdateMessageSchema,
|
|
6591
6659
|
WorkspaceSetupProgressMessageSchema,
|
|
6592
6660
|
WorkspaceSetupStatusResponseMessageSchema,
|
|
6661
|
+
WorkspaceSetupSubscribeResponseSchema,
|
|
6593
6662
|
WorkspaceSetupRunResponseMessageSchema,
|
|
6594
6663
|
AgentStreamMessageSchema,
|
|
6595
6664
|
AgentStatusMessageSchema,
|
|
@@ -6785,6 +6854,11 @@ export const WSPongMessageSchema = z.object({
|
|
|
6785
6854
|
});
|
|
6786
6855
|
export const WSHelloMessageSchema = z.object({
|
|
6787
6856
|
type: z.literal("hello"),
|
|
6857
|
+
sessionPermissions: z.array(DaemonPermissionSchema).optional(),
|
|
6858
|
+
routed: z.boolean().optional(),
|
|
6859
|
+
producer: z
|
|
6860
|
+
.object({ serverId: z.string().min(1).max(256), sourceId: z.string().min(1).max(1024) })
|
|
6861
|
+
.optional(),
|
|
6788
6862
|
clientId: z.string().min(1),
|
|
6789
6863
|
clientType: z.enum(["mobile", "browser", "cli", "mcp", "hub"]),
|
|
6790
6864
|
protocolVersion: z.number().int(),
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
label: string;
|
|
3
|
-
value: string;
|
|
4
|
-
}
|
|
5
|
-
export type PaseoToolDetailSection = {
|
|
6
|
-
kind: "prose";
|
|
7
|
-
title: string;
|
|
8
|
-
text: string;
|
|
9
|
-
} | {
|
|
10
|
-
kind: "fields";
|
|
11
|
-
title: string;
|
|
12
|
-
fields: PaseoToolDetailField[];
|
|
13
|
-
};
|
|
14
|
-
export declare function buildPaseoToolDetailSections(toolName: string, input: unknown, output: unknown): PaseoToolDetailSection[] | null;
|
|
1
|
+
export { buildPaseoToolDetailSections, type PaseoToolDetailField, type PaseoToolDetailSection, } from "./paseo-tool-presentation/index.js";
|
|
15
2
|
//# sourceMappingURL=paseo-tool-call-detail.d.ts.map
|
|
@@ -1,307 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"title",
|
|
4
|
-
"workspaceId",
|
|
5
|
-
"projectId",
|
|
6
|
-
"isolation",
|
|
7
|
-
"path",
|
|
8
|
-
"mode",
|
|
9
|
-
"worktreeSlug",
|
|
10
|
-
"branchName",
|
|
11
|
-
"baseBranch",
|
|
12
|
-
"branch",
|
|
13
|
-
"prNumber",
|
|
14
|
-
"forge",
|
|
15
|
-
];
|
|
16
|
-
const AGENT_FIELDS = [
|
|
17
|
-
"title",
|
|
18
|
-
"agentId",
|
|
19
|
-
"provider",
|
|
20
|
-
"workspaceId",
|
|
21
|
-
"cwd",
|
|
22
|
-
"sessionMode",
|
|
23
|
-
"modeId",
|
|
24
|
-
"background",
|
|
25
|
-
"notifyOnFinish",
|
|
26
|
-
"internal",
|
|
27
|
-
"settings",
|
|
28
|
-
"labels",
|
|
29
|
-
];
|
|
30
|
-
const AUTOMATION_FIELDS = [
|
|
31
|
-
"name",
|
|
32
|
-
"id",
|
|
33
|
-
"cron",
|
|
34
|
-
"timezone",
|
|
35
|
-
"provider",
|
|
36
|
-
"cwd",
|
|
37
|
-
"isolation",
|
|
38
|
-
"maxRuns",
|
|
39
|
-
"expiresIn",
|
|
40
|
-
"clearExpires",
|
|
41
|
-
];
|
|
42
|
-
const BROWSER_FIELDS = [
|
|
43
|
-
"browserId",
|
|
44
|
-
"url",
|
|
45
|
-
"ref",
|
|
46
|
-
"sourceRef",
|
|
47
|
-
"targetRef",
|
|
48
|
-
"value",
|
|
49
|
-
"text",
|
|
50
|
-
"key",
|
|
51
|
-
"button",
|
|
52
|
-
"doubleClick",
|
|
53
|
-
"modifiers",
|
|
54
|
-
"filePaths",
|
|
55
|
-
"fullPage",
|
|
56
|
-
"maxEntries",
|
|
57
|
-
"timeoutMs",
|
|
58
|
-
"deltaX",
|
|
59
|
-
"deltaY",
|
|
60
|
-
"width",
|
|
61
|
-
"height",
|
|
62
|
-
"function",
|
|
63
|
-
];
|
|
64
|
-
const TOOL_SPECS = {
|
|
65
|
-
create_workspace: {
|
|
66
|
-
inputOrder: WORKSPACE_FIELDS,
|
|
67
|
-
outputFields: ["workspaceId", "projectId"],
|
|
68
|
-
},
|
|
69
|
-
list_workspaces: {},
|
|
70
|
-
archive_workspace: {
|
|
71
|
-
inputOrder: ["workspaceId"],
|
|
72
|
-
outputFields: ["workspaceId", "archivedAgentIds", "removedDirectory"],
|
|
73
|
-
},
|
|
74
|
-
rename_workspace: { inputOrder: ["title", "workspaceId"] },
|
|
75
|
-
create_agent: {
|
|
76
|
-
promptField: "initialPrompt",
|
|
77
|
-
inputOrder: AGENT_FIELDS,
|
|
78
|
-
outputFields: ["agentId", "status", "currentModeId", "cwd"],
|
|
79
|
-
},
|
|
80
|
-
send_agent_prompt: {
|
|
81
|
-
promptField: "prompt",
|
|
82
|
-
inputOrder: AGENT_FIELDS,
|
|
83
|
-
outputFields: ["status", "lastMessage", "permission"],
|
|
84
|
-
},
|
|
85
|
-
get_agent_status: { inputOrder: ["agentId"] },
|
|
86
|
-
list_agents: { inputOrder: ["cwd", "statuses", "sinceHours", "limit", "includeArchived"] },
|
|
87
|
-
cancel_agent: { inputOrder: ["agentId"] },
|
|
88
|
-
archive_agent: { inputOrder: ["agentId"] },
|
|
89
|
-
kill_agent: { inputOrder: ["agentId"] },
|
|
90
|
-
update_agent: { inputOrder: AGENT_FIELDS },
|
|
91
|
-
get_agent_activity: { inputOrder: ["agentId", "limit"] },
|
|
92
|
-
set_agent_mode: { inputOrder: ["agentId", "modeId"] },
|
|
93
|
-
list_workspace_scripts: { inputOrder: ["workspaceId"] },
|
|
94
|
-
start_workspace_script: { inputOrder: ["workspaceId", "scriptName"] },
|
|
95
|
-
stop_workspace_script: { inputOrder: ["workspaceId", "scriptName"] },
|
|
96
|
-
list_terminals: { inputOrder: ["cwd", "all"] },
|
|
97
|
-
create_terminal: { inputOrder: ["cwd", "workspaceId", "name", "command"] },
|
|
98
|
-
kill_terminal: { inputOrder: ["terminalId"] },
|
|
99
|
-
capture_terminal: { inputOrder: ["terminalId", "lines"] },
|
|
100
|
-
send_terminal_keys: { inputOrder: ["terminalId", "keys", "literal"] },
|
|
101
|
-
create_schedule: {
|
|
102
|
-
promptField: "prompt",
|
|
103
|
-
inputOrder: AUTOMATION_FIELDS,
|
|
104
|
-
outputFields: ["id", "status", "nextRunAt", "expiresAt"],
|
|
105
|
-
},
|
|
106
|
-
create_heartbeat: {
|
|
107
|
-
promptField: "prompt",
|
|
108
|
-
inputOrder: AUTOMATION_FIELDS,
|
|
109
|
-
outputFields: ["id", "status", "nextRunAt", "expiresAt"],
|
|
110
|
-
},
|
|
111
|
-
delete_heartbeat: { inputOrder: ["id"] },
|
|
112
|
-
list_schedules: {},
|
|
113
|
-
inspect_schedule: { inputOrder: ["id"] },
|
|
114
|
-
pause_schedule: { inputOrder: ["id"] },
|
|
115
|
-
resume_schedule: { inputOrder: ["id"] },
|
|
116
|
-
delete_schedule: { inputOrder: ["id"] },
|
|
117
|
-
update_schedule: { promptField: "prompt", inputOrder: AUTOMATION_FIELDS },
|
|
118
|
-
schedule_logs: { inputOrder: ["id"] },
|
|
119
|
-
run_schedule_once: { inputOrder: ["id"] },
|
|
120
|
-
list_providers: {},
|
|
121
|
-
list_models: { inputOrder: ["provider"] },
|
|
122
|
-
list_profiles: {},
|
|
123
|
-
inspect_provider: { inputOrder: ["provider", "cwd", "settings"] },
|
|
124
|
-
list_pending_permissions: {},
|
|
125
|
-
respond_to_permission: { inputOrder: ["agentId", "requestId", "response"] },
|
|
126
|
-
browser_list_tabs: {},
|
|
127
|
-
browser_new_tab: { inputOrder: BROWSER_FIELDS },
|
|
128
|
-
browser_snapshot: { inputOrder: BROWSER_FIELDS },
|
|
129
|
-
browser_click: { inputOrder: BROWSER_FIELDS },
|
|
130
|
-
browser_fill: { inputOrder: BROWSER_FIELDS },
|
|
131
|
-
browser_wait: { inputOrder: BROWSER_FIELDS },
|
|
132
|
-
browser_type: { inputOrder: BROWSER_FIELDS },
|
|
133
|
-
browser_keypress: { inputOrder: BROWSER_FIELDS },
|
|
134
|
-
browser_navigate: { inputOrder: BROWSER_FIELDS },
|
|
135
|
-
browser_back: { inputOrder: BROWSER_FIELDS },
|
|
136
|
-
browser_forward: { inputOrder: BROWSER_FIELDS },
|
|
137
|
-
browser_reload: { inputOrder: BROWSER_FIELDS },
|
|
138
|
-
browser_screenshot: { inputOrder: BROWSER_FIELDS },
|
|
139
|
-
browser_upload: { inputOrder: BROWSER_FIELDS },
|
|
140
|
-
browser_hover: { inputOrder: BROWSER_FIELDS },
|
|
141
|
-
browser_select: { inputOrder: BROWSER_FIELDS },
|
|
142
|
-
browser_drag: { inputOrder: BROWSER_FIELDS },
|
|
143
|
-
browser_logs: { inputOrder: BROWSER_FIELDS },
|
|
144
|
-
browser_evaluate: { inputOrder: BROWSER_FIELDS },
|
|
145
|
-
browser_scroll: { inputOrder: BROWSER_FIELDS },
|
|
146
|
-
browser_resize: { inputOrder: BROWSER_FIELDS },
|
|
147
|
-
browser_close_tab: { inputOrder: BROWSER_FIELDS },
|
|
148
|
-
};
|
|
149
|
-
const FIELD_LABELS = {
|
|
150
|
-
agentId: "Agent",
|
|
151
|
-
archivedAgentIds: "Archived agents",
|
|
152
|
-
baseBranch: "Base branch",
|
|
153
|
-
branchName: "New branch",
|
|
154
|
-
browserId: "Browser tab",
|
|
155
|
-
clearExpires: "Clear expiry",
|
|
156
|
-
currentModeId: "Current mode",
|
|
157
|
-
cwd: "Working directory",
|
|
158
|
-
deltaX: "Horizontal delta",
|
|
159
|
-
deltaY: "Vertical delta",
|
|
160
|
-
doubleClick: "Double click",
|
|
161
|
-
expiresIn: "Expires in",
|
|
162
|
-
expiresAt: "Expires",
|
|
163
|
-
filePaths: "Files",
|
|
164
|
-
fullPage: "Full page",
|
|
165
|
-
initialPrompt: "Prompt",
|
|
166
|
-
id: "ID",
|
|
167
|
-
lastMessage: "Last message",
|
|
168
|
-
maxEntries: "Maximum entries",
|
|
169
|
-
maxRuns: "Maximum runs",
|
|
170
|
-
modeId: "Mode",
|
|
171
|
-
newMode: "New mode",
|
|
172
|
-
nextRunAt: "Next run",
|
|
173
|
-
notifyOnFinish: "Notify on finish",
|
|
174
|
-
internal: "Internal",
|
|
175
|
-
prNumber: "Change request",
|
|
176
|
-
projectId: "Project",
|
|
177
|
-
removedDirectory: "Removed directory",
|
|
178
|
-
requestId: "Request",
|
|
179
|
-
scriptName: "Script",
|
|
180
|
-
sessionMode: "Session mode",
|
|
181
|
-
sinceHours: "Since (hours)",
|
|
182
|
-
sourceRef: "Source",
|
|
183
|
-
targetRef: "Target",
|
|
184
|
-
terminalId: "Terminal",
|
|
185
|
-
thinkingOptionId: "Thinking",
|
|
186
|
-
timeoutMs: "Timeout (ms)",
|
|
187
|
-
updateCount: "Updates",
|
|
188
|
-
workspaceId: "Workspace",
|
|
189
|
-
worktreeSlug: "Worktree",
|
|
190
|
-
};
|
|
191
|
-
function isRecord(value) {
|
|
192
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
193
|
-
}
|
|
194
|
-
function humanizeKey(key) {
|
|
195
|
-
const known = FIELD_LABELS[key];
|
|
196
|
-
if (known)
|
|
197
|
-
return known;
|
|
198
|
-
const words = key
|
|
199
|
-
.replace(/([a-z0-9])([A-Z])/g, "$1 $2")
|
|
200
|
-
.replace(/[._-]+/g, " ")
|
|
201
|
-
.split(" ")
|
|
202
|
-
.filter(Boolean);
|
|
203
|
-
const sentence = words.join(" ").toLowerCase();
|
|
204
|
-
return `${sentence[0]?.toUpperCase() ?? ""}${sentence.slice(1)}`;
|
|
205
|
-
}
|
|
206
|
-
function formatValue(value, depth = 0) {
|
|
207
|
-
if (value === null)
|
|
208
|
-
return "None";
|
|
209
|
-
if (value === undefined)
|
|
210
|
-
return "";
|
|
211
|
-
if (typeof value === "boolean")
|
|
212
|
-
return value ? "Yes" : "No";
|
|
213
|
-
if (typeof value === "string" || typeof value === "number" || typeof value === "bigint") {
|
|
214
|
-
return String(value);
|
|
215
|
-
}
|
|
216
|
-
if (Array.isArray(value)) {
|
|
217
|
-
if (value.length === 0)
|
|
218
|
-
return "None";
|
|
219
|
-
return value.map((item) => `• ${indentMultiline(formatValue(item, depth + 1), 2)}`).join("\n");
|
|
220
|
-
}
|
|
221
|
-
if (isRecord(value)) {
|
|
222
|
-
const entries = Object.entries(value).filter(([, child]) => child !== undefined);
|
|
223
|
-
if (entries.length === 0)
|
|
224
|
-
return "None";
|
|
225
|
-
return entries
|
|
226
|
-
.map(([key, child]) => {
|
|
227
|
-
const formatted = formatValue(child, depth + 1);
|
|
228
|
-
return `${humanizeKey(key)}: ${indentMultiline(formatted, 2)}`;
|
|
229
|
-
})
|
|
230
|
-
.join("\n");
|
|
231
|
-
}
|
|
232
|
-
return String(value);
|
|
233
|
-
}
|
|
234
|
-
function indentMultiline(value, spaces) {
|
|
235
|
-
const indentation = " ".repeat(spaces);
|
|
236
|
-
return value.replace(/\n/g, `\n${indentation}`);
|
|
237
|
-
}
|
|
238
|
-
function orderedEntries(value, order = [], omittedKey, includedKeys) {
|
|
239
|
-
const included = includedKeys ? new Set(includedKeys) : null;
|
|
240
|
-
const keys = Object.keys(value).filter((key) => key !== omittedKey && value[key] !== undefined && (!included || included.has(key)));
|
|
241
|
-
const rank = new Map(order.map((key, index) => [key, index]));
|
|
242
|
-
keys.sort((left, right) => {
|
|
243
|
-
const leftRank = rank.get(left) ?? Number.MAX_SAFE_INTEGER;
|
|
244
|
-
const rightRank = rank.get(right) ?? Number.MAX_SAFE_INTEGER;
|
|
245
|
-
return leftRank - rightRank || left.localeCompare(right);
|
|
246
|
-
});
|
|
247
|
-
return keys.map((key) => [key, value[key]]);
|
|
248
|
-
}
|
|
249
|
-
function fieldsFromValue(value, order, omittedKey, includedKeys) {
|
|
250
|
-
if (value === null || value === undefined)
|
|
251
|
-
return [];
|
|
252
|
-
if (!isRecord(value)) {
|
|
253
|
-
const formatted = formatValue(value);
|
|
254
|
-
return formatted ? [{ label: "Value", value: formatted }] : [];
|
|
255
|
-
}
|
|
256
|
-
return orderedEntries(value, order, omittedKey, includedKeys).map(([key, child]) => ({
|
|
257
|
-
label: humanizeKey(key),
|
|
258
|
-
value: formatValue(child),
|
|
259
|
-
}));
|
|
260
|
-
}
|
|
261
|
-
function parseJsonText(value) {
|
|
262
|
-
if (typeof value !== "string")
|
|
263
|
-
return undefined;
|
|
264
|
-
try {
|
|
265
|
-
return JSON.parse(value);
|
|
266
|
-
}
|
|
267
|
-
catch {
|
|
268
|
-
return undefined;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
function unwrapMcpResult(output) {
|
|
272
|
-
if (!isRecord(output))
|
|
273
|
-
return output;
|
|
274
|
-
if (output.structuredContent !== undefined) {
|
|
275
|
-
return output.structuredContent;
|
|
276
|
-
}
|
|
277
|
-
if (Array.isArray(output.content) && output.content.length === 1) {
|
|
278
|
-
const item = output.content[0];
|
|
279
|
-
if (isRecord(item) && item.type === "text") {
|
|
280
|
-
return parseJsonText(item.text) ?? item.text;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
return output;
|
|
284
|
-
}
|
|
285
|
-
export function buildPaseoToolDetailSections(toolName, input, output) {
|
|
286
|
-
const leafName = getPaseoToolLeafName(toolName);
|
|
287
|
-
if (!leafName)
|
|
288
|
-
return null;
|
|
289
|
-
const spec = TOOL_SPECS[leafName] ?? {};
|
|
290
|
-
const sections = [];
|
|
291
|
-
if (spec.promptField && isRecord(input)) {
|
|
292
|
-
const prompt = input[spec.promptField];
|
|
293
|
-
if (typeof prompt === "string" && prompt.length > 0) {
|
|
294
|
-
sections.push({ kind: "prose", title: "Prompt", text: prompt });
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
const inputFields = fieldsFromValue(input, spec.inputOrder, spec.promptField);
|
|
298
|
-
if (inputFields.length > 0) {
|
|
299
|
-
sections.push({ kind: "fields", title: "Details", fields: inputFields });
|
|
300
|
-
}
|
|
301
|
-
const outputFields = fieldsFromValue(unwrapMcpResult(output), spec.outputFields, undefined, spec.outputFields);
|
|
302
|
-
if (outputFields.length > 0) {
|
|
303
|
-
sections.push({ kind: "fields", title: "Result", fields: outputFields });
|
|
304
|
-
}
|
|
305
|
-
return sections;
|
|
306
|
-
}
|
|
1
|
+
// COMPAT(paseoToolCallDetail): added in v0.12.0, remove after 2027-04-19 once plugins have migrated to paseo-tool-presentation/index.
|
|
2
|
+
export { buildPaseoToolDetailSections, } from "./paseo-tool-presentation/index.js";
|
|
307
3
|
//# sourceMappingURL=paseo-tool-call-detail.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AgentMessage } from "../agent-message.js";
|
|
2
|
+
import type { ToolCallDetail } from "../agent-types.js";
|
|
3
|
+
export interface AgentMessageDisplay {
|
|
4
|
+
displayName: string;
|
|
5
|
+
summary?: string;
|
|
6
|
+
detail: ToolCallDetail;
|
|
7
|
+
}
|
|
8
|
+
/** Presentation shared by clients; never used to encode provider prompts. */
|
|
9
|
+
export declare function buildAgentMessageDisplay(message: AgentMessage): AgentMessageDisplay;
|
|
10
|
+
//# sourceMappingURL=agent-message.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { toSummaryText } from "./summary-text.js";
|
|
2
|
+
/** Events read noun-first ("Agent finished"); the sender goes in the summary. */
|
|
3
|
+
const EVENT_LABELS = {
|
|
4
|
+
message: "Message received",
|
|
5
|
+
finished: "Agent finished",
|
|
6
|
+
errored: "Agent errored",
|
|
7
|
+
"permission-required": "Agent needs permission",
|
|
8
|
+
closed: "Agent closed",
|
|
9
|
+
};
|
|
10
|
+
/** Presentation shared by clients; never used to encode provider prompts. */
|
|
11
|
+
export function buildAgentMessageDisplay(message) {
|
|
12
|
+
const summary = toSummaryText(message.sender.title ?? message.sender.id);
|
|
13
|
+
return {
|
|
14
|
+
displayName: EVENT_LABELS[message.event],
|
|
15
|
+
...(summary ? { summary } : {}),
|
|
16
|
+
detail: {
|
|
17
|
+
type: "plain_text",
|
|
18
|
+
text: `From agent: ${message.sender.id}\n\n${message.text}`,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=agent-message.js.map
|