@hyperdrive.bot/paseo-protocol 0.2.6 → 0.2.7
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/messages.d.ts +34 -0
- package/dist/messages.js +22 -1
- package/dist/provider-config.d.ts +10 -0
- package/dist/provider-config.js +5 -0
- package/package.json +1 -1
package/dist/messages.d.ts
CHANGED
|
@@ -2252,6 +2252,15 @@ export declare const FilesUploadCompleteRequestSchema: z.ZodObject<{
|
|
|
2252
2252
|
uploadId: z.ZodString;
|
|
2253
2253
|
totalChunks: z.ZodNumber;
|
|
2254
2254
|
}, z.core.$strip>;
|
|
2255
|
+
export declare const FilesUploadChunkSchema: z.ZodObject<{
|
|
2256
|
+
type: z.ZodLiteral<"files.upload.chunk">;
|
|
2257
|
+
payload: z.ZodObject<{
|
|
2258
|
+
requestId: z.ZodString;
|
|
2259
|
+
uploadId: z.ZodString;
|
|
2260
|
+
chunkIndex: z.ZodNumber;
|
|
2261
|
+
data: z.ZodString;
|
|
2262
|
+
}, z.core.$strip>;
|
|
2263
|
+
}, z.core.$strip>;
|
|
2255
2264
|
export declare const FilesUploadErrorSchema: z.ZodObject<{
|
|
2256
2265
|
type: z.ZodLiteral<"files.upload.error">;
|
|
2257
2266
|
payload: z.ZodObject<{
|
|
@@ -4192,6 +4201,14 @@ export declare const SessionInboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
4192
4201
|
requestId: z.ZodString;
|
|
4193
4202
|
uploadId: z.ZodString;
|
|
4194
4203
|
totalChunks: z.ZodNumber;
|
|
4204
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4205
|
+
type: z.ZodLiteral<"files.upload.chunk">;
|
|
4206
|
+
payload: z.ZodObject<{
|
|
4207
|
+
requestId: z.ZodString;
|
|
4208
|
+
uploadId: z.ZodString;
|
|
4209
|
+
chunkIndex: z.ZodNumber;
|
|
4210
|
+
data: z.ZodString;
|
|
4211
|
+
}, z.core.$strip>;
|
|
4195
4212
|
}, z.core.$strip>, z.ZodObject<{
|
|
4196
4213
|
type: z.ZodLiteral<"files.upload.error">;
|
|
4197
4214
|
payload: z.ZodObject<{
|
|
@@ -19214,6 +19231,7 @@ export type FileUploadErrorCode = z.infer<typeof FileUploadErrorCodeSchema>;
|
|
|
19214
19231
|
export type FilesUploadBeginRequest = z.infer<typeof FilesUploadBeginRequestSchema>;
|
|
19215
19232
|
export type FilesUploadBeginResponse = z.infer<typeof FilesUploadBeginResponseSchema>;
|
|
19216
19233
|
export type FilesUploadChunkAck = z.infer<typeof FilesUploadChunkAckSchema>;
|
|
19234
|
+
export type FilesUploadChunk = z.infer<typeof FilesUploadChunkSchema>;
|
|
19217
19235
|
export type FilesUploadCompleteRequest = z.infer<typeof FilesUploadCompleteRequestSchema>;
|
|
19218
19236
|
export type FilesUploadCompleteResponse = z.infer<typeof FilesUploadCompleteResponseSchema>;
|
|
19219
19237
|
export type FilesUploadError = z.infer<typeof FilesUploadErrorSchema>;
|
|
@@ -20368,6 +20386,14 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
|
|
|
20368
20386
|
requestId: z.ZodString;
|
|
20369
20387
|
uploadId: z.ZodString;
|
|
20370
20388
|
totalChunks: z.ZodNumber;
|
|
20389
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20390
|
+
type: z.ZodLiteral<"files.upload.chunk">;
|
|
20391
|
+
payload: z.ZodObject<{
|
|
20392
|
+
requestId: z.ZodString;
|
|
20393
|
+
uploadId: z.ZodString;
|
|
20394
|
+
chunkIndex: z.ZodNumber;
|
|
20395
|
+
data: z.ZodString;
|
|
20396
|
+
}, z.core.$strip>;
|
|
20371
20397
|
}, z.core.$strip>, z.ZodObject<{
|
|
20372
20398
|
type: z.ZodLiteral<"files.upload.error">;
|
|
20373
20399
|
payload: z.ZodObject<{
|
|
@@ -29018,6 +29044,14 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
29018
29044
|
requestId: z.ZodString;
|
|
29019
29045
|
uploadId: z.ZodString;
|
|
29020
29046
|
totalChunks: z.ZodNumber;
|
|
29047
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29048
|
+
type: z.ZodLiteral<"files.upload.chunk">;
|
|
29049
|
+
payload: z.ZodObject<{
|
|
29050
|
+
requestId: z.ZodString;
|
|
29051
|
+
uploadId: z.ZodString;
|
|
29052
|
+
chunkIndex: z.ZodNumber;
|
|
29053
|
+
data: z.ZodString;
|
|
29054
|
+
}, z.core.$strip>;
|
|
29021
29055
|
}, z.core.$strip>, z.ZodObject<{
|
|
29022
29056
|
type: z.ZodLiteral<"files.upload.error">;
|
|
29023
29057
|
payload: z.ZodObject<{
|
package/dist/messages.js
CHANGED
|
@@ -1688,6 +1688,24 @@ export const FilesUploadCompleteRequestSchema = z.object({
|
|
|
1688
1688
|
uploadId: z.string(),
|
|
1689
1689
|
totalChunks: z.number().int().nonnegative(),
|
|
1690
1690
|
});
|
|
1691
|
+
// Text-safe chunk carrier (client -> daemon). Binary `FileChunk` WebSocket frames do not
|
|
1692
|
+
// survive every proxy transport: on the hyperdrive proxy path binary frames are dropped
|
|
1693
|
+
// while JSON/text frames pass, which stalls the windowed sender forever (0 acks). So the
|
|
1694
|
+
// client streams each chunk here as a base64 string inside a JSON message instead of a
|
|
1695
|
+
// binary frame. `requestId` correlates to the transfer opened by files.upload.begin.request;
|
|
1696
|
+
// the daemon decodes `data` and feeds it through the SAME FileChunk write+ack pipeline as the
|
|
1697
|
+
// binary path (assigning its own chunkIndex), so both transports are behaviorally identical.
|
|
1698
|
+
// `chunkIndex` is the client's own sequence number, carried for observability only; the
|
|
1699
|
+
// daemon does not depend on it.
|
|
1700
|
+
export const FilesUploadChunkSchema = z.object({
|
|
1701
|
+
type: z.literal("files.upload.chunk"),
|
|
1702
|
+
payload: z.object({
|
|
1703
|
+
requestId: z.string(),
|
|
1704
|
+
uploadId: z.string(),
|
|
1705
|
+
chunkIndex: z.number().int().nonnegative(),
|
|
1706
|
+
data: z.string(),
|
|
1707
|
+
}),
|
|
1708
|
+
});
|
|
1691
1709
|
// Abort/error for an in-flight upload (either side may emit it). Declared here — before
|
|
1692
1710
|
// the inbound and outbound unions — because it is registered in BOTH (bidirectional).
|
|
1693
1711
|
export const FilesUploadErrorSchema = z.object({
|
|
@@ -2148,7 +2166,7 @@ export const ListAllSessionsResponseMessageSchema = z.object({
|
|
|
2148
2166
|
// Plugin platform RPCs. The daemon reports installed-extension contributions so
|
|
2149
2167
|
// the client populates its sidebar/command registries, and routes plugin
|
|
2150
2168
|
// command execution to the extension-host. Dotted RPC names per
|
|
2151
|
-
// docs/rpc-namespacing.md. The contribution shapes mirror @
|
|
2169
|
+
// docs/rpc-namespacing.md. The contribution shapes mirror @hyperdrive.bot/paseo-extension-sdk
|
|
2152
2170
|
// (kept local — protocol must not depend on the SDK).
|
|
2153
2171
|
const ExtensionCommandContributionSchema = z.object({
|
|
2154
2172
|
id: z.string(),
|
|
@@ -2449,6 +2467,9 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
2449
2467
|
CheckoutGithubSetAutoMergeRequestSchema,
|
|
2450
2468
|
FilesUploadBeginRequestSchema,
|
|
2451
2469
|
FilesUploadCompleteRequestSchema,
|
|
2470
|
+
// Text-safe chunk carrier: client streams chunks here (base64 in JSON) instead of binary
|
|
2471
|
+
// FileChunk frames on transports that drop binary WS frames (e.g. the hyperdrive proxy).
|
|
2472
|
+
FilesUploadChunkSchema,
|
|
2452
2473
|
// files.upload.error is bidirectional (either side may abort an in-flight upload).
|
|
2453
2474
|
// Story 1.2 registered it outbound-only; story 2.1's inbound abort handler
|
|
2454
2475
|
// (Session.handleFileUploadErrorMessage) needs it parseable as an inbound message too.
|
|
@@ -73,6 +73,11 @@ export declare const ProviderOverrideSchema: z.ZodObject<{
|
|
|
73
73
|
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
74
74
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
75
75
|
order: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
transport: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
auto: "auto";
|
|
78
|
+
sdk: "sdk";
|
|
79
|
+
pty: "pty";
|
|
80
|
+
}>>;
|
|
76
81
|
}, z.core.$strip>;
|
|
77
82
|
export declare const ProviderOverridesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
78
83
|
extends: z.ZodOptional<z.ZodString>;
|
|
@@ -108,6 +113,11 @@ export declare const ProviderOverridesSchema: z.ZodRecord<z.ZodString, z.ZodObje
|
|
|
108
113
|
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
114
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
110
115
|
order: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
transport: z.ZodOptional<z.ZodEnum<{
|
|
117
|
+
auto: "auto";
|
|
118
|
+
sdk: "sdk";
|
|
119
|
+
pty: "pty";
|
|
120
|
+
}>>;
|
|
111
121
|
}, z.core.$strip>>;
|
|
112
122
|
export declare const AgentProviderRuntimeSettingsMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
113
123
|
command: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/dist/provider-config.js
CHANGED
|
@@ -55,6 +55,11 @@ export const ProviderOverrideSchema = z.object({
|
|
|
55
55
|
disallowedTools: z.array(z.string()).optional(),
|
|
56
56
|
enabled: z.boolean().optional(),
|
|
57
57
|
order: z.number().optional(),
|
|
58
|
+
// Persisted opt-in for the transport a provider's sessions use. Mirrors the
|
|
59
|
+
// runtime hint on ProviderRuntimeSettingsSchema above so a value written to
|
|
60
|
+
// ~/.paseo/config.json survives the load instead of being stripped as an
|
|
61
|
+
// unknown key. extractAgentProviderSettings carries it into runtime settings.
|
|
62
|
+
transport: z.enum(["sdk", "pty", "auto"]).optional(),
|
|
58
63
|
});
|
|
59
64
|
const BUILTIN_PROVIDER_IDS = ["claude", "codex", "copilot", "opencode", "pi", "omp"];
|
|
60
65
|
const PROVIDER_ID_PATTERN = /^[a-z][a-z0-9-]*$/;
|