@camerontaylor/paseo-protocol 0.9.0-beta.2.fork.1 → 0.10.1-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/client-capabilities.d.ts +1 -0
- package/dist/client-capabilities.js +1 -0
- package/dist/daemon-endpoints.d.ts +7 -0
- package/dist/daemon-endpoints.js +42 -0
- package/dist/generated/validation/ws-outbound.aot.js +45 -1
- package/dist/messages.d.ts +40 -10
- package/dist/messages.js +21 -3
- package/dist/terminal-profiles.js +7 -1
- package/dist/validation/ws-outbound-schema-metadata.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const CLIENT_CAPS = {
|
|
2
|
+
helloRejection: "hello_rejection",
|
|
2
3
|
// COMPAT(ownedSubscriptions): added in v0.8.0, remove legacy ownership after 2027-03-09.
|
|
3
4
|
ownedSubscriptions: "owned_subscriptions",
|
|
4
5
|
// Clients outside the Paseo app version series can explicitly accept provider IDs.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ConnectionOfferV2 } from "./connection-offer.js";
|
|
1
2
|
export interface HostPortParts {
|
|
2
3
|
host: string;
|
|
3
4
|
port: number;
|
|
@@ -9,6 +10,12 @@ export interface ConnectionUriParts extends HostPortParts {
|
|
|
9
10
|
export interface ParsedConnectionUri extends ConnectionUriParts {
|
|
10
11
|
password?: string;
|
|
11
12
|
}
|
|
13
|
+
export interface ParsedRelayConnectionUri {
|
|
14
|
+
offer: ConnectionOfferV2;
|
|
15
|
+
password?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function parseRelayConnectionUri(input: string): ParsedRelayConnectionUri;
|
|
18
|
+
export declare function serializeRelayConnectionUri(parts: ParsedRelayConnectionUri): string;
|
|
12
19
|
export type RelayRole = "server" | "client";
|
|
13
20
|
export type RelayProtocolVersion = "1" | "2";
|
|
14
21
|
export declare const CURRENT_RELAY_PROTOCOL_VERSION: RelayProtocolVersion;
|
package/dist/daemon-endpoints.js
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
export function parseRelayConnectionUri(input) {
|
|
2
|
+
const trimmed = input.trim();
|
|
3
|
+
const connectIndex = trimmed.indexOf("#connect=");
|
|
4
|
+
const uri = connectIndex >= 0
|
|
5
|
+
? decodeURIComponent(trimmed.slice(connectIndex + "#connect=".length))
|
|
6
|
+
: trimmed;
|
|
7
|
+
let url;
|
|
8
|
+
try {
|
|
9
|
+
url = new URL(uri);
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
throw new Error("Invalid relay connection URI");
|
|
13
|
+
}
|
|
14
|
+
if (url.protocol !== "relay:" || !url.hostname || !url.port || url.username || url.password) {
|
|
15
|
+
throw new Error("Invalid relay connection URI");
|
|
16
|
+
}
|
|
17
|
+
const serverId = decodeURIComponent(url.pathname.slice(1));
|
|
18
|
+
const key = url.searchParams.get("key");
|
|
19
|
+
if (!serverId || !key || serverId.includes("/")) {
|
|
20
|
+
throw new Error("Relay connection URI requires a server id and key");
|
|
21
|
+
}
|
|
22
|
+
const endpoint = normalizeHostPort(url.host);
|
|
23
|
+
const password = url.searchParams.get("password") || undefined;
|
|
24
|
+
return {
|
|
25
|
+
offer: {
|
|
26
|
+
v: 2,
|
|
27
|
+
serverId,
|
|
28
|
+
daemonPublicKeyB64: key,
|
|
29
|
+
relay: { endpoint, useTls: url.searchParams.get("ssl") === "true" },
|
|
30
|
+
},
|
|
31
|
+
...(password ? { password } : {}),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function serializeRelayConnectionUri(parts) {
|
|
35
|
+
const url = new URL(`relay://${parts.offer.relay.endpoint}/${encodeURIComponent(parts.offer.serverId)}`);
|
|
36
|
+
url.searchParams.set("key", parts.offer.daemonPublicKeyB64);
|
|
37
|
+
if (parts.offer.relay.useTls)
|
|
38
|
+
url.searchParams.set("ssl", "true");
|
|
39
|
+
if (parts.password)
|
|
40
|
+
url.searchParams.set("password", parts.password);
|
|
41
|
+
return url.toString();
|
|
42
|
+
}
|
|
1
43
|
export const CURRENT_RELAY_PROTOCOL_VERSION = "2";
|
|
2
44
|
export const DEFAULT_RELAY_ENDPOINT = "relay.paseo.sh:443";
|
|
3
45
|
export function normalizeRelayProtocolVersion(value, fallback = CURRENT_RELAY_PROTOCOL_VERSION) {
|
|
@@ -39178,6 +39178,25 @@ export const WSOutboundMessageSchema = /* @__PURE__ */ (() => {
|
|
|
39178
39178
|
if (__o_2791["role"] !== "user" && __o_2791["role"] !== "assistant") {
|
|
39179
39179
|
_e.push({ code: "invalid_value", values: ["user", "assistant"], input: __o_2791["role"], path: ["message"].concat("payload").concat("locations").concat(__i_2790).concat("role") });
|
|
39180
39180
|
}
|
|
39181
|
+
if (__o_2791["count"] !== undefined) {
|
|
39182
|
+
if (typeof __o_2791["count"] !== "number") {
|
|
39183
|
+
_e.push({ code: "invalid_type", expected: "number", input: __o_2791["count"], path: ["message"].concat("payload").concat("locations").concat(__i_2790).concat("count") });
|
|
39184
|
+
}
|
|
39185
|
+
else if (Number.isNaN(__o_2791["count"])) {
|
|
39186
|
+
_e.push({ code: "invalid_type", expected: "number", received: "NaN", input: __o_2791["count"], path: ["message"].concat("payload").concat("locations").concat(__i_2790).concat("count") });
|
|
39187
|
+
}
|
|
39188
|
+
else if (!Number.isFinite(__o_2791["count"])) {
|
|
39189
|
+
_e.push({ code: "invalid_type", expected: "number", received: "Infinity", input: __o_2791["count"], path: ["message"].concat("payload").concat("locations").concat(__i_2790).concat("count") });
|
|
39190
|
+
}
|
|
39191
|
+
else {
|
|
39192
|
+
if (!Number.isSafeInteger(__o_2791["count"])) {
|
|
39193
|
+
_e.push({ code: "invalid_type", expected: "int", format: "safeint", input: __o_2791["count"], path: ["message"].concat("payload").concat("locations").concat(__i_2790).concat("count") });
|
|
39194
|
+
}
|
|
39195
|
+
if (__o_2791["count"] <= 0) {
|
|
39196
|
+
_e.push({ code: "too_small", minimum: 0, origin: "number", inclusive: false, input: __o_2791["count"], path: ["message"].concat("payload").concat("locations").concat(__i_2790).concat("count") });
|
|
39197
|
+
}
|
|
39198
|
+
}
|
|
39199
|
+
}
|
|
39181
39200
|
}
|
|
39182
39201
|
}
|
|
39183
39202
|
}
|
|
@@ -99959,7 +99978,32 @@ export const WSOutboundMessageSchema = /* @__PURE__ */ (() => {
|
|
|
99959
99978
|
}
|
|
99960
99979
|
_d = __du_223;
|
|
99961
99980
|
break;
|
|
99962
|
-
|
|
99981
|
+
case "hello.rejected":
|
|
99982
|
+
if (typeof __du_223 !== "object" || __du_223 === null || Array.isArray(__du_223)) {
|
|
99983
|
+
_e.push({ code: "invalid_type", expected: "object", input: __du_223, path: [] });
|
|
99984
|
+
}
|
|
99985
|
+
else {
|
|
99986
|
+
var __o_6977 = __du_223;
|
|
99987
|
+
if (__o_6977["type"] !== "hello.rejected") {
|
|
99988
|
+
_e.push({ code: "invalid_value", values: ["hello.rejected"], input: __o_6977["type"], path: ["type"] });
|
|
99989
|
+
}
|
|
99990
|
+
if (__o_6977["reason"] !== "password_required" && __o_6977["reason"] !== "incorrect_password" && __o_6977["reason"] !== "incompatible_protocol") {
|
|
99991
|
+
_e.push({ code: "invalid_value", values: ["password_required", "incorrect_password", "incompatible_protocol"], input: __o_6977["reason"], path: ["reason"] });
|
|
99992
|
+
}
|
|
99993
|
+
if (!Array.isArray(__o_6977["accepts"])) {
|
|
99994
|
+
_e.push({ code: "invalid_type", expected: "array", input: __o_6977["accepts"], path: ["accepts"] });
|
|
99995
|
+
}
|
|
99996
|
+
else {
|
|
99997
|
+
for (var __i_6978 = 0; __i_6978 < __o_6977["accepts"].length; __i_6978++) {
|
|
99998
|
+
if (__o_6977["accepts"][__i_6978] !== "password") {
|
|
99999
|
+
_e.push({ code: "invalid_value", values: ["password"], input: __o_6977["accepts"][__i_6978], path: ["accepts"].concat(__i_6978) });
|
|
100000
|
+
}
|
|
100001
|
+
}
|
|
100002
|
+
}
|
|
100003
|
+
}
|
|
100004
|
+
_d = __du_223;
|
|
100005
|
+
break;
|
|
100006
|
+
default: _e.push({ code: "invalid_union", errors: [], note: "No matching discriminator", discriminator: "type", options: ["pong", "session", "hello.rejected"], input: _d, path: [].concat("type") });
|
|
99963
100007
|
}
|
|
99964
100008
|
}
|
|
99965
100009
|
return __fin(_e, _d);
|
package/dist/messages.d.ts
CHANGED
|
@@ -4455,8 +4455,6 @@ export declare const SessionEventSubscriptionSchema: z.ZodEnum<{
|
|
|
4455
4455
|
script_status_update: "script_status_update";
|
|
4456
4456
|
workspace_setup_progress: "workspace_setup_progress";
|
|
4457
4457
|
"agent.provider_subagents.update": "agent.provider_subagents.update";
|
|
4458
|
-
"agent.side_conversation.update": "agent.side_conversation.update";
|
|
4459
|
-
"agent.side_conversation.removed": "agent.side_conversation.removed";
|
|
4460
4458
|
terminal_attention_required: "terminal_attention_required";
|
|
4461
4459
|
"status.server_info": "status.server_info";
|
|
4462
4460
|
"status.daemon_config_changed": "status.daemon_config_changed";
|
|
@@ -4480,8 +4478,6 @@ export declare const SessionEventsSetSubscriptionRequestSchema: z.ZodObject<{
|
|
|
4480
4478
|
script_status_update: "script_status_update";
|
|
4481
4479
|
workspace_setup_progress: "workspace_setup_progress";
|
|
4482
4480
|
"agent.provider_subagents.update": "agent.provider_subagents.update";
|
|
4483
|
-
"agent.side_conversation.update": "agent.side_conversation.update";
|
|
4484
|
-
"agent.side_conversation.removed": "agent.side_conversation.removed";
|
|
4485
4481
|
terminal_attention_required: "terminal_attention_required";
|
|
4486
4482
|
"status.server_info": "status.server_info";
|
|
4487
4483
|
"status.daemon_config_changed": "status.daemon_config_changed";
|
|
@@ -4593,8 +4589,6 @@ export declare const SessionInboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
4593
4589
|
script_status_update: "script_status_update";
|
|
4594
4590
|
workspace_setup_progress: "workspace_setup_progress";
|
|
4595
4591
|
"agent.provider_subagents.update": "agent.provider_subagents.update";
|
|
4596
|
-
"agent.side_conversation.update": "agent.side_conversation.update";
|
|
4597
|
-
"agent.side_conversation.removed": "agent.side_conversation.removed";
|
|
4598
4592
|
terminal_attention_required: "terminal_attention_required";
|
|
4599
4593
|
"status.server_info": "status.server_info";
|
|
4600
4594
|
"status.daemon_config_changed": "status.daemon_config_changed";
|
|
@@ -7514,6 +7508,7 @@ export declare const ServerCapabilitiesSchema: z.ZodObject<{
|
|
|
7514
7508
|
}, z.core.$loose>;
|
|
7515
7509
|
export declare const ServerInfoStatusPayloadSchema: z.ZodPipe<z.ZodObject<{
|
|
7516
7510
|
status: z.ZodLiteral<"server_info">;
|
|
7511
|
+
protocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
7517
7512
|
serverId: z.ZodString;
|
|
7518
7513
|
hostname: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | null, unknown>>>;
|
|
7519
7514
|
version: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | null, unknown>>>;
|
|
@@ -7630,6 +7625,7 @@ export declare const ServerInfoStatusPayloadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
7630
7625
|
version: string | null;
|
|
7631
7626
|
status: "server_info";
|
|
7632
7627
|
serverId: string;
|
|
7628
|
+
protocolVersion?: number | undefined;
|
|
7633
7629
|
permissions?: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[] | undefined;
|
|
7634
7630
|
desktopManaged?: boolean | undefined;
|
|
7635
7631
|
capabilities?: {
|
|
@@ -7732,6 +7728,7 @@ export declare const ServerInfoStatusPayloadSchema: z.ZodPipe<z.ZodObject<{
|
|
|
7732
7728
|
[x: string]: unknown;
|
|
7733
7729
|
status: "server_info";
|
|
7734
7730
|
serverId: string;
|
|
7731
|
+
protocolVersion?: number | undefined;
|
|
7735
7732
|
hostname?: string | null | undefined;
|
|
7736
7733
|
version?: string | null | undefined;
|
|
7737
7734
|
permissions?: ("daemon.read" | "daemon.manage" | "tunnel.manage" | "access.manage" | "workspace.read" | "workspace.write" | "workspace.manage" | "automation.manage" | "hub.execute")[] | undefined;
|
|
@@ -12280,6 +12277,7 @@ export declare const AgentTimelineSearchResponseMessageSchema: z.ZodObject<{
|
|
|
12280
12277
|
assistant: "assistant";
|
|
12281
12278
|
user: "user";
|
|
12282
12279
|
}>;
|
|
12280
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
12283
12281
|
}, z.core.$strip>>;
|
|
12284
12282
|
nextCursor: z.ZodNullable<z.ZodNumber>;
|
|
12285
12283
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -25607,6 +25605,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zo
|
|
|
25607
25605
|
assistant: "assistant";
|
|
25608
25606
|
user: "user";
|
|
25609
25607
|
}>;
|
|
25608
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
25610
25609
|
}, z.core.$strip>>;
|
|
25611
25610
|
nextCursor: z.ZodNullable<z.ZodNumber>;
|
|
25612
25611
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -33644,9 +33643,17 @@ export declare const WSHelloMessageSchema: z.ZodObject<{
|
|
|
33644
33643
|
hub: "hub";
|
|
33645
33644
|
}>;
|
|
33646
33645
|
protocolVersion: z.ZodNumber;
|
|
33646
|
+
auth: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
33647
|
+
kind: z.ZodLiteral<"password">;
|
|
33648
|
+
password: z.ZodString;
|
|
33649
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
33650
|
+
kind: z.ZodLiteral<"localCredential">;
|
|
33651
|
+
token: z.ZodString;
|
|
33652
|
+
}, z.core.$strip>], "kind">>;
|
|
33647
33653
|
appVersion: z.ZodOptional<z.ZodString>;
|
|
33648
33654
|
capabilities: z.ZodOptional<z.ZodObject<{
|
|
33649
33655
|
voice: z.ZodOptional<z.ZodBoolean>;
|
|
33656
|
+
hello_rejection: z.ZodOptional<z.ZodBoolean>;
|
|
33650
33657
|
pushNotifications: z.ZodOptional<z.ZodBoolean>;
|
|
33651
33658
|
explicit_event_subscriptions: z.ZodOptional<z.ZodBoolean>;
|
|
33652
33659
|
all_providers: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -33718,8 +33725,6 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
|
|
|
33718
33725
|
script_status_update: "script_status_update";
|
|
33719
33726
|
workspace_setup_progress: "workspace_setup_progress";
|
|
33720
33727
|
"agent.provider_subagents.update": "agent.provider_subagents.update";
|
|
33721
|
-
"agent.side_conversation.update": "agent.side_conversation.update";
|
|
33722
|
-
"agent.side_conversation.removed": "agent.side_conversation.removed";
|
|
33723
33728
|
terminal_attention_required: "terminal_attention_required";
|
|
33724
33729
|
"status.server_info": "status.server_info";
|
|
33725
33730
|
"status.daemon_config_changed": "status.daemon_config_changed";
|
|
@@ -40647,6 +40652,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
|
|
|
40647
40652
|
assistant: "assistant";
|
|
40648
40653
|
user: "user";
|
|
40649
40654
|
}>;
|
|
40655
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
40650
40656
|
}, z.core.$strip>>;
|
|
40651
40657
|
nextCursor: z.ZodNullable<z.ZodNumber>;
|
|
40652
40658
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -48317,6 +48323,15 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
|
|
|
48317
48323
|
}, z.core.$strip>;
|
|
48318
48324
|
}, z.core.$strip>], "type">;
|
|
48319
48325
|
}, z.core.$strip>;
|
|
48326
|
+
export declare const WSHelloRejectedMessageSchema: z.ZodObject<{
|
|
48327
|
+
type: z.ZodLiteral<"hello.rejected">;
|
|
48328
|
+
reason: z.ZodEnum<{
|
|
48329
|
+
password_required: "password_required";
|
|
48330
|
+
incorrect_password: "incorrect_password";
|
|
48331
|
+
incompatible_protocol: "incompatible_protocol";
|
|
48332
|
+
}>;
|
|
48333
|
+
accepts: z.ZodArray<z.ZodLiteral<"password">>;
|
|
48334
|
+
}, z.core.$strip>;
|
|
48320
48335
|
export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
48321
48336
|
type: z.ZodLiteral<"ping">;
|
|
48322
48337
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -48330,9 +48345,17 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
48330
48345
|
hub: "hub";
|
|
48331
48346
|
}>;
|
|
48332
48347
|
protocolVersion: z.ZodNumber;
|
|
48348
|
+
auth: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
48349
|
+
kind: z.ZodLiteral<"password">;
|
|
48350
|
+
password: z.ZodString;
|
|
48351
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
48352
|
+
kind: z.ZodLiteral<"localCredential">;
|
|
48353
|
+
token: z.ZodString;
|
|
48354
|
+
}, z.core.$strip>], "kind">>;
|
|
48333
48355
|
appVersion: z.ZodOptional<z.ZodString>;
|
|
48334
48356
|
capabilities: z.ZodOptional<z.ZodObject<{
|
|
48335
48357
|
voice: z.ZodOptional<z.ZodBoolean>;
|
|
48358
|
+
hello_rejection: z.ZodOptional<z.ZodBoolean>;
|
|
48336
48359
|
pushNotifications: z.ZodOptional<z.ZodBoolean>;
|
|
48337
48360
|
explicit_event_subscriptions: z.ZodOptional<z.ZodBoolean>;
|
|
48338
48361
|
all_providers: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -48402,8 +48425,6 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
48402
48425
|
script_status_update: "script_status_update";
|
|
48403
48426
|
workspace_setup_progress: "workspace_setup_progress";
|
|
48404
48427
|
"agent.provider_subagents.update": "agent.provider_subagents.update";
|
|
48405
|
-
"agent.side_conversation.update": "agent.side_conversation.update";
|
|
48406
|
-
"agent.side_conversation.removed": "agent.side_conversation.removed";
|
|
48407
48428
|
terminal_attention_required: "terminal_attention_required";
|
|
48408
48429
|
"status.server_info": "status.server_info";
|
|
48409
48430
|
"status.daemon_config_changed": "status.daemon_config_changed";
|
|
@@ -55333,6 +55354,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
55333
55354
|
assistant: "assistant";
|
|
55334
55355
|
user: "user";
|
|
55335
55356
|
}>;
|
|
55357
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
55336
55358
|
}, z.core.$strip>>;
|
|
55337
55359
|
nextCursor: z.ZodNullable<z.ZodNumber>;
|
|
55338
55360
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -63002,6 +63024,14 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
63002
63024
|
newVersion: z.ZodNullable<z.ZodString>;
|
|
63003
63025
|
}, z.core.$strip>;
|
|
63004
63026
|
}, z.core.$strip>], "type">;
|
|
63027
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63028
|
+
type: z.ZodLiteral<"hello.rejected">;
|
|
63029
|
+
reason: z.ZodEnum<{
|
|
63030
|
+
password_required: "password_required";
|
|
63031
|
+
incorrect_password: "incorrect_password";
|
|
63032
|
+
incompatible_protocol: "incompatible_protocol";
|
|
63033
|
+
}>;
|
|
63034
|
+
accepts: z.ZodArray<z.ZodLiteral<"password">>;
|
|
63005
63035
|
}, z.core.$strip>], "type">;
|
|
63006
63036
|
export type WSInboundMessage = z.infer<typeof WSInboundMessageSchema>;
|
|
63007
63037
|
export type WSOutboundMessage = z.infer<typeof WSOutboundMessageSchema>;
|
package/dist/messages.js
CHANGED
|
@@ -2652,8 +2652,6 @@ export const SessionEventSubscriptionSchema = z.enum([
|
|
|
2652
2652
|
"script_status_update",
|
|
2653
2653
|
"workspace_setup_progress",
|
|
2654
2654
|
"agent.provider_subagents.update",
|
|
2655
|
-
"agent.side_conversation.update",
|
|
2656
|
-
"agent.side_conversation.removed",
|
|
2657
2655
|
"terminal_attention_required",
|
|
2658
2656
|
"status.server_info",
|
|
2659
2657
|
"status.daemon_config_changed",
|
|
@@ -3038,6 +3036,7 @@ const ServerCapabilitiesFromUnknownSchema = z
|
|
|
3038
3036
|
export const ServerInfoStatusPayloadSchema = z
|
|
3039
3037
|
.object({
|
|
3040
3038
|
status: z.literal("server_info"),
|
|
3039
|
+
protocolVersion: z.number().int().optional(),
|
|
3041
3040
|
serverId: z.string().trim().min(1),
|
|
3042
3041
|
hostname: ServerInfoHostnameSchema.optional(),
|
|
3043
3042
|
version: ServerInfoVersionSchema.optional(),
|
|
@@ -4058,7 +4057,13 @@ export const AgentTimelineSearchResponseMessageSchema = z.object({
|
|
|
4058
4057
|
requestId: z.string(),
|
|
4059
4058
|
agentId: z.string(),
|
|
4060
4059
|
epoch: z.string(),
|
|
4061
|
-
locations: z.array(z.object({
|
|
4060
|
+
locations: z.array(z.object({
|
|
4061
|
+
seq: z.number().int().nonnegative(),
|
|
4062
|
+
role: z.enum(["user", "assistant"]),
|
|
4063
|
+
// Estimated occurrences in the message; the client verifies against rendered text.
|
|
4064
|
+
// COMPAT(timelineSearchCount): added in v0.9.0, remove optional after 2027-09-22.
|
|
4065
|
+
count: z.number().int().positive().optional(),
|
|
4066
|
+
})),
|
|
4062
4067
|
nextCursor: z.number().int().nonnegative().nullable(),
|
|
4063
4068
|
error: z.string().nullable(),
|
|
4064
4069
|
}),
|
|
@@ -6228,10 +6233,17 @@ export const WSHelloMessageSchema = z.object({
|
|
|
6228
6233
|
clientId: z.string().min(1),
|
|
6229
6234
|
clientType: z.enum(["mobile", "browser", "cli", "mcp", "hub"]),
|
|
6230
6235
|
protocolVersion: z.number().int(),
|
|
6236
|
+
auth: z
|
|
6237
|
+
.discriminatedUnion("kind", [
|
|
6238
|
+
z.object({ kind: z.literal("password"), password: z.string() }),
|
|
6239
|
+
z.object({ kind: z.literal("localCredential"), token: z.string() }),
|
|
6240
|
+
])
|
|
6241
|
+
.optional(),
|
|
6231
6242
|
appVersion: z.string().optional(),
|
|
6232
6243
|
capabilities: z
|
|
6233
6244
|
.object({
|
|
6234
6245
|
voice: z.boolean().optional(),
|
|
6246
|
+
[CLIENT_CAPS.helloRejection]: z.boolean().optional(),
|
|
6235
6247
|
pushNotifications: z.boolean().optional(),
|
|
6236
6248
|
[CLIENT_CAPS.explicitEventSubscriptions]: z.boolean().optional(),
|
|
6237
6249
|
[CLIENT_CAPS.allProviders]: z.boolean().optional(),
|
|
@@ -6264,6 +6276,11 @@ export const WSSessionOutboundSchema = z.object({
|
|
|
6264
6276
|
type: z.literal("session"),
|
|
6265
6277
|
message: SessionOutboundMessageSchema,
|
|
6266
6278
|
});
|
|
6279
|
+
export const WSHelloRejectedMessageSchema = z.object({
|
|
6280
|
+
type: z.literal("hello.rejected"),
|
|
6281
|
+
reason: z.enum(["password_required", "incorrect_password", "incompatible_protocol"]),
|
|
6282
|
+
accepts: z.array(z.literal("password")),
|
|
6283
|
+
});
|
|
6267
6284
|
// Complete WebSocket message schemas
|
|
6268
6285
|
export const WSInboundMessageSchema = z.discriminatedUnion("type", [
|
|
6269
6286
|
WSPingMessageSchema,
|
|
@@ -6274,6 +6291,7 @@ export const WSInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
6274
6291
|
export const WSOutboundMessageSchema = z.discriminatedUnion("type", [
|
|
6275
6292
|
WSPongMessageSchema,
|
|
6276
6293
|
WSSessionOutboundSchema,
|
|
6294
|
+
WSHelloRejectedMessageSchema,
|
|
6277
6295
|
]);
|
|
6278
6296
|
// ============================================================================
|
|
6279
6297
|
// Helper functions for message conversion
|
|
@@ -73,7 +73,13 @@ export function formatResolvedCommand(resolved) {
|
|
|
73
73
|
export function resolveTerminalProfileLaunch(profile, prompt) {
|
|
74
74
|
return { name: profile.name, ...substitutePrompt(profile, prompt) };
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
// CLIs whose binary is not named after their icon. Matching stays exact, so a
|
|
77
|
+
// command only gets an icon when its whole base name is listed.
|
|
78
|
+
const COMMAND_ICON_ALIASES = [["cursor-agent", "cursor"]];
|
|
79
|
+
const WELL_KNOWN_COMMAND_ICONS = new Map([
|
|
80
|
+
...KNOWN_PROVIDER_ICON_NAMES.map((name) => [name, name]),
|
|
81
|
+
...COMMAND_ICON_ALIASES,
|
|
82
|
+
]);
|
|
77
83
|
function getCommandBaseName(command) {
|
|
78
84
|
const lastSlash = command.lastIndexOf("/");
|
|
79
85
|
const lastBackslash = command.lastIndexOf("\\");
|
|
@@ -4148,6 +4148,7 @@ export declare const WSOutboundMessageSchema: {
|
|
|
4148
4148
|
assistant: "assistant";
|
|
4149
4149
|
user: "user";
|
|
4150
4150
|
}>;
|
|
4151
|
+
count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4151
4152
|
}, import("zod/v4/core").$strip>>;
|
|
4152
4153
|
nextCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
4153
4154
|
error: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -11817,6 +11818,14 @@ export declare const WSOutboundMessageSchema: {
|
|
|
11817
11818
|
newVersion: import("zod").ZodNullable<import("zod").ZodString>;
|
|
11818
11819
|
}, import("zod/v4/core").$strip>;
|
|
11819
11820
|
}, import("zod/v4/core").$strip>], "type">;
|
|
11821
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
11822
|
+
type: import("zod").ZodLiteral<"hello.rejected">;
|
|
11823
|
+
reason: import("zod").ZodEnum<{
|
|
11824
|
+
password_required: "password_required";
|
|
11825
|
+
incorrect_password: "incorrect_password";
|
|
11826
|
+
incompatible_protocol: "incompatible_protocol";
|
|
11827
|
+
}>;
|
|
11828
|
+
accepts: import("zod").ZodArray<import("zod").ZodLiteral<"password">>;
|
|
11820
11829
|
}, import("zod/v4/core").$strip>], "type">;
|
|
11821
11830
|
};
|
|
11822
11831
|
//# sourceMappingURL=ws-outbound-schema-metadata.d.ts.map
|