@yefengr/remote-pi 0.9.6 → 0.9.8
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/README.md +11 -2
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/protocol/types.d.ts +2 -52
- package/dist/protocol/v2/codec.d.ts +5 -25
- package/dist/protocol/v2/codec.js +3 -206
- package/dist/protocol/v2/codec.js.map +1 -1
- package/dist/protocol/v2/index.d.ts +1 -0
- package/dist/protocol/v2/index.js +1 -0
- package/dist/protocol/v2/index.js.map +1 -1
- package/dist/protocol/v2/marker.d.ts +40 -0
- package/dist/protocol/v2/marker.js +47 -0
- package/dist/protocol/v2/marker.js.map +1 -0
- package/dist/protocol/v2/schemas.d.ts +3 -2017
- package/dist/protocol/v2/schemas.js +3 -432
- package/dist/protocol/v2/schemas.js.map +1 -1
- package/dist/runtime/owner_router.js +5 -1
- package/dist/runtime/owner_router.js.map +1 -1
- package/dist/timeline/user_delivery.d.ts +38 -3
- package/dist/timeline/user_delivery.js +120 -6
- package/dist/timeline/user_delivery.js.map +1 -1
- package/dist/timeline/user_delivery_binding.d.ts +6 -2
- package/dist/timeline/user_delivery_binding.js +27 -4
- package/dist/timeline/user_delivery_binding.js.map +1 -1
- package/dist/timeline/v2_service.d.ts +17 -2
- package/dist/timeline/v2_service.js +104 -7
- package/dist/timeline/v2_service.js.map +1 -1
- package/dist/transport/peer_channel.d.ts +2 -11
- package/dist/transport/peer_channel.js +7 -11
- package/dist/transport/peer_channel.js.map +1 -1
- package/dist/transport/relay_client.d.ts +2 -8
- package/dist/transport/relay_client.js +3 -2
- package/dist/transport/relay_client.js.map +1 -1
- package/dist/vendor/protocol/constants.d.ts +1 -0
- package/dist/vendor/protocol/constants.js +1 -0
- package/dist/vendor/protocol/encoding.d.ts +9 -0
- package/dist/vendor/protocol/encoding.js +66 -0
- package/dist/vendor/protocol/outer/codec.d.ts +13 -0
- package/dist/vendor/protocol/outer/codec.js +105 -0
- package/dist/vendor/protocol/outer/index.d.ts +4 -0
- package/dist/vendor/protocol/outer/index.js +4 -0
- package/dist/vendor/protocol/outer/types.d.ts +120 -0
- package/dist/vendor/protocol/outer/types.js +1 -0
- package/dist/vendor/protocol/session/codec.d.ts +41 -0
- package/dist/vendor/protocol/session/codec.js +236 -0
- package/dist/vendor/protocol/session/frames.d.ts +5750 -0
- package/dist/vendor/protocol/session/frames.js +406 -0
- package/dist/vendor/protocol/session/index.d.ts +3 -0
- package/dist/vendor/protocol/session/index.js +3 -0
- package/dist/vendor/protocol/session/schema.d.ts +1060 -0
- package/dist/vendor/protocol/session/schema.js +302 -0
- package/package.json +17 -25
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { PROTOCOL_VERSION } from "../constants.js";
|
|
3
|
+
export { PROTOCOL_VERSION } from "../constants.js";
|
|
4
|
+
export const PROTOCOL_VERSION_V2 = PROTOCOL_VERSION;
|
|
5
|
+
export const MAX_FRAME_BYTES = 2 * 1024 * 1024;
|
|
6
|
+
export const MAX_HISTORY_CHUNK_BYTES = 512 * 1024;
|
|
7
|
+
export const MAX_SESSION_HISTORY_CHUNK_BYTES = MAX_HISTORY_CHUNK_BYTES;
|
|
8
|
+
export const MAX_WINDOW_BYTES = 32 * 1024 * 1024;
|
|
9
|
+
export const MAX_WINDOW_DECODE_BYTES = MAX_WINDOW_BYTES;
|
|
10
|
+
export const MAX_FRAGMENT_BYTES = 50 * 1024;
|
|
11
|
+
export const MAX_FRAGMENT_DECODE_BYTES = MAX_FRAGMENT_BYTES;
|
|
12
|
+
export const MAX_ID_CHARS = 256;
|
|
13
|
+
export const MAX_STRING_CHARS = 1024 * 1024;
|
|
14
|
+
export const MAX_TEXT_CHARS = MAX_STRING_CHARS;
|
|
15
|
+
export const MAX_ARRAY_ITEMS = 4096;
|
|
16
|
+
export const strictObject = (shape) => z.object(shape).strict();
|
|
17
|
+
const finiteNumber = z.number().finite();
|
|
18
|
+
export const idSchema = z.string().min(1).max(MAX_ID_CHARS);
|
|
19
|
+
export const pairingCodeSchema = z.string().regex(/^[0-9A-HJKMNP-TV-Z]{8}$/);
|
|
20
|
+
export const textSchema = z.string().max(MAX_STRING_CHARS);
|
|
21
|
+
export const nonEmptyTextSchema = textSchema.min(1);
|
|
22
|
+
export const timestampSchema = finiteNumber.nonnegative();
|
|
23
|
+
export const positiveIntSchema = z.number().int().nonnegative().finite();
|
|
24
|
+
/** Dense history ordinals are positive and exactly representable in JavaScript. */
|
|
25
|
+
export const eventSequenceSchema = z.number().int().positive().finite().max(Number.MAX_SAFE_INTEGER);
|
|
26
|
+
export const headSequenceSchema = z.number().int().nonnegative().finite().max(Number.MAX_SAFE_INTEGER - 1);
|
|
27
|
+
export const protocolVersionSchema = z.literal(PROTOCOL_VERSION);
|
|
28
|
+
export const channelIdSchema = idSchema;
|
|
29
|
+
export const historyGenerationSchema = idSchema;
|
|
30
|
+
export const jsonValueSchema = z.lazy(() => z.union([
|
|
31
|
+
z.null(),
|
|
32
|
+
z.boolean(),
|
|
33
|
+
finiteNumber,
|
|
34
|
+
textSchema,
|
|
35
|
+
z.array(jsonValueSchema).max(MAX_ARRAY_ITEMS),
|
|
36
|
+
z.record(z.string().max(MAX_ID_CHARS), jsonValueSchema),
|
|
37
|
+
]));
|
|
38
|
+
export const JsonValueSchema = jsonValueSchema;
|
|
39
|
+
const truncatedSchema = z.literal(true);
|
|
40
|
+
const textBlockShape = {
|
|
41
|
+
type: z.literal("text"),
|
|
42
|
+
text: textSchema,
|
|
43
|
+
truncated: truncatedSchema.optional(),
|
|
44
|
+
};
|
|
45
|
+
export const textBlockSchema = strictObject(textBlockShape);
|
|
46
|
+
const thinkingBlockShape = {
|
|
47
|
+
type: z.literal("thinking"),
|
|
48
|
+
text: textSchema,
|
|
49
|
+
truncated: truncatedSchema.optional(),
|
|
50
|
+
};
|
|
51
|
+
export const thinkingBlockSchema = strictObject(thinkingBlockShape);
|
|
52
|
+
export const imageMimeSchema = z.string().min(1).max(128).regex(/^[\w.+-]+\/[\w.+-]+$/);
|
|
53
|
+
const imageByteLengthSchema = positiveIntSchema.max(MAX_WINDOW_BYTES);
|
|
54
|
+
const completeImageSchema = strictObject({
|
|
55
|
+
type: z.literal("image"),
|
|
56
|
+
mime_type: imageMimeSchema,
|
|
57
|
+
data: z.string().min(1).max(MAX_WINDOW_BYTES),
|
|
58
|
+
byte_length: imageByteLengthSchema,
|
|
59
|
+
});
|
|
60
|
+
const omittedImageSchema = strictObject({
|
|
61
|
+
type: z.literal("image"),
|
|
62
|
+
mime_type: imageMimeSchema,
|
|
63
|
+
byte_length: imageByteLengthSchema,
|
|
64
|
+
omitted: z.literal(true),
|
|
65
|
+
});
|
|
66
|
+
export const imageBlockSchema = z.union([completeImageSchema, omittedImageSchema]);
|
|
67
|
+
export const userBlockSchema = z.union([textBlockSchema, imageBlockSchema]);
|
|
68
|
+
export const assistantBlockSchema = z.union([textBlockSchema, thinkingBlockSchema]);
|
|
69
|
+
const timelineBaseShape = {
|
|
70
|
+
event_id: idSchema,
|
|
71
|
+
// Legacy IndexedDB records predate dense history ordinals.
|
|
72
|
+
event_seq: eventSequenceSchema.optional(),
|
|
73
|
+
session_id: idSchema,
|
|
74
|
+
history_generation: historyGenerationSchema,
|
|
75
|
+
timestamp: timestampSchema,
|
|
76
|
+
};
|
|
77
|
+
const groupedTimelineBaseShape = {
|
|
78
|
+
...timelineBaseShape,
|
|
79
|
+
group_id: idSchema,
|
|
80
|
+
};
|
|
81
|
+
const userEventShape = {
|
|
82
|
+
...groupedTimelineBaseShape,
|
|
83
|
+
kind: z.literal("user"),
|
|
84
|
+
message_id: idSchema,
|
|
85
|
+
blocks: z.array(userBlockSchema).max(MAX_ARRAY_ITEMS),
|
|
86
|
+
origin: z.enum(["pwa", "extension", "unknown"]),
|
|
87
|
+
sender_ref: idSchema.optional(),
|
|
88
|
+
delivery: z.enum(["normal", "queued", "unknown"]),
|
|
89
|
+
status: z.literal("committed"),
|
|
90
|
+
};
|
|
91
|
+
export const timelineUserEventSchema = strictObject(userEventShape).superRefine((event, ctx) => {
|
|
92
|
+
if (event.event_id !== event.message_id) {
|
|
93
|
+
ctx.addIssue({ code: "custom", path: ["message_id"], message: "event_id must equal message_id" });
|
|
94
|
+
}
|
|
95
|
+
if (event.origin === "pwa" && event.sender_ref === undefined) {
|
|
96
|
+
ctx.addIssue({ code: "custom", path: ["sender_ref"], message: "pwa user events require sender_ref" });
|
|
97
|
+
}
|
|
98
|
+
if (event.origin !== "pwa" && event.sender_ref !== undefined) {
|
|
99
|
+
ctx.addIssue({ code: "custom", path: ["sender_ref"], message: "non-pwa user events must not include sender_ref" });
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
const assistantEventShape = {
|
|
103
|
+
...groupedTimelineBaseShape,
|
|
104
|
+
kind: z.literal("assistant"),
|
|
105
|
+
blocks: z.array(assistantBlockSchema).max(MAX_ARRAY_ITEMS),
|
|
106
|
+
status: z.enum(["complete", "interrupted"]),
|
|
107
|
+
};
|
|
108
|
+
export const timelineAssistantEventSchema = strictObject(assistantEventShape);
|
|
109
|
+
const completeToolEventSchema = strictObject({
|
|
110
|
+
...groupedTimelineBaseShape,
|
|
111
|
+
kind: z.literal("tool"),
|
|
112
|
+
tool_call_id: idSchema,
|
|
113
|
+
tool: nonEmptyTextSchema,
|
|
114
|
+
args: jsonValueSchema,
|
|
115
|
+
truncated: z.boolean(),
|
|
116
|
+
status: z.literal("complete"),
|
|
117
|
+
result: jsonValueSchema,
|
|
118
|
+
error: z.never().optional(),
|
|
119
|
+
});
|
|
120
|
+
const errorToolEventSchema = strictObject({
|
|
121
|
+
...groupedTimelineBaseShape,
|
|
122
|
+
kind: z.literal("tool"),
|
|
123
|
+
tool_call_id: idSchema,
|
|
124
|
+
tool: nonEmptyTextSchema,
|
|
125
|
+
args: jsonValueSchema,
|
|
126
|
+
truncated: z.boolean(),
|
|
127
|
+
status: z.literal("error"),
|
|
128
|
+
result: jsonValueSchema.optional(),
|
|
129
|
+
error: nonEmptyTextSchema,
|
|
130
|
+
});
|
|
131
|
+
const interruptedToolEventSchema = strictObject({
|
|
132
|
+
...groupedTimelineBaseShape,
|
|
133
|
+
kind: z.literal("tool"),
|
|
134
|
+
tool_call_id: idSchema,
|
|
135
|
+
tool: nonEmptyTextSchema,
|
|
136
|
+
args: jsonValueSchema,
|
|
137
|
+
truncated: z.boolean(),
|
|
138
|
+
status: z.literal("interrupted"),
|
|
139
|
+
result: z.never().optional(),
|
|
140
|
+
error: z.never().optional(),
|
|
141
|
+
});
|
|
142
|
+
export const timelineToolEventSchema = z.union([
|
|
143
|
+
completeToolEventSchema,
|
|
144
|
+
errorToolEventSchema,
|
|
145
|
+
interruptedToolEventSchema,
|
|
146
|
+
]);
|
|
147
|
+
const groupedSystemShape = {
|
|
148
|
+
...timelineBaseShape,
|
|
149
|
+
kind: z.enum(["compaction", "branch_summary", "custom"]),
|
|
150
|
+
group_id: idSchema.optional(),
|
|
151
|
+
payload: jsonValueSchema,
|
|
152
|
+
truncated: z.boolean(),
|
|
153
|
+
};
|
|
154
|
+
export const timelineSystemEventSchema = strictObject(groupedSystemShape);
|
|
155
|
+
export const timelineProviderErrorEventSchema = strictObject({
|
|
156
|
+
...groupedTimelineBaseShape,
|
|
157
|
+
kind: z.literal("provider_error"),
|
|
158
|
+
message: nonEmptyTextSchema,
|
|
159
|
+
});
|
|
160
|
+
export const timelineEventSchema = z.union([
|
|
161
|
+
timelineUserEventSchema,
|
|
162
|
+
timelineAssistantEventSchema,
|
|
163
|
+
timelineToolEventSchema,
|
|
164
|
+
timelineSystemEventSchema,
|
|
165
|
+
timelineProviderErrorEventSchema,
|
|
166
|
+
]);
|
|
167
|
+
export const TimelineEventSchema = timelineEventSchema;
|
|
168
|
+
export const sequencedTimelineEventSchema = timelineEventSchema.and(z.object({ event_seq: eventSequenceSchema }));
|
|
169
|
+
const partialBaseShape = {
|
|
170
|
+
protocol_version: protocolVersionSchema,
|
|
171
|
+
type: z.literal("timeline_partial"),
|
|
172
|
+
session_id: idSchema,
|
|
173
|
+
history_generation: historyGenerationSchema,
|
|
174
|
+
group_id: idSchema,
|
|
175
|
+
partial_id: idSchema,
|
|
176
|
+
status: z.enum(["running", "delta"]),
|
|
177
|
+
};
|
|
178
|
+
const partialTextShape = { delta: textSchema.optional() };
|
|
179
|
+
export const timelinePartialSchema = z.union([
|
|
180
|
+
strictObject({
|
|
181
|
+
...partialBaseShape,
|
|
182
|
+
kind: z.literal("assistant"),
|
|
183
|
+
blocks: z.array(assistantBlockSchema).max(MAX_ARRAY_ITEMS).optional(),
|
|
184
|
+
...partialTextShape,
|
|
185
|
+
}),
|
|
186
|
+
strictObject({
|
|
187
|
+
...partialBaseShape,
|
|
188
|
+
kind: z.literal("thinking"),
|
|
189
|
+
blocks: z.array(thinkingBlockSchema).max(MAX_ARRAY_ITEMS).optional(),
|
|
190
|
+
...partialTextShape,
|
|
191
|
+
}),
|
|
192
|
+
strictObject({
|
|
193
|
+
...partialBaseShape,
|
|
194
|
+
kind: z.literal("tool"),
|
|
195
|
+
tool_call_id: idSchema,
|
|
196
|
+
tool: nonEmptyTextSchema,
|
|
197
|
+
args: jsonValueSchema.optional(),
|
|
198
|
+
blocks: z.array(assistantBlockSchema).max(MAX_ARRAY_ITEMS).optional(),
|
|
199
|
+
...partialTextShape,
|
|
200
|
+
}),
|
|
201
|
+
]);
|
|
202
|
+
export const TimelinePartialSchema = timelinePartialSchema;
|
|
203
|
+
export const base64Schema = z.string()
|
|
204
|
+
.min(4)
|
|
205
|
+
.max(Math.ceil((MAX_FRAGMENT_BYTES * 4) / 3) + 4)
|
|
206
|
+
.regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
|
|
207
|
+
export const timelineEventFragmentSchema = strictObject({
|
|
208
|
+
event_id: idSchema,
|
|
209
|
+
index: positiveIntSchema,
|
|
210
|
+
data_base64: base64Schema,
|
|
211
|
+
final: z.boolean(),
|
|
212
|
+
});
|
|
213
|
+
export const historyFragmentSchema = timelineEventFragmentSchema;
|
|
214
|
+
export const TimelineEventFragmentSchema = timelineEventFragmentSchema;
|
|
215
|
+
export const HistoryFragmentSchema = historyFragmentSchema;
|
|
216
|
+
const askQuestionTypeSchema = z.enum(["single", "multi", "preview"]);
|
|
217
|
+
const askOptionSchema = strictObject({
|
|
218
|
+
value: textSchema,
|
|
219
|
+
label: textSchema,
|
|
220
|
+
description: textSchema.optional(),
|
|
221
|
+
preview: textSchema.optional(),
|
|
222
|
+
freeform: z.boolean().optional(),
|
|
223
|
+
});
|
|
224
|
+
const askQuestionSchema = strictObject({
|
|
225
|
+
id: idSchema,
|
|
226
|
+
label: textSchema,
|
|
227
|
+
prompt: textSchema,
|
|
228
|
+
type: askQuestionTypeSchema,
|
|
229
|
+
required: z.boolean(),
|
|
230
|
+
presentedType: askQuestionTypeSchema.optional(),
|
|
231
|
+
requestedType: askQuestionTypeSchema.optional(),
|
|
232
|
+
options: z.array(askOptionSchema).max(MAX_ARRAY_ITEMS),
|
|
233
|
+
});
|
|
234
|
+
const askEnrichmentSchema = strictObject({
|
|
235
|
+
flow_id: idSchema,
|
|
236
|
+
tool_call_id: idSchema.nullable(),
|
|
237
|
+
source: idSchema,
|
|
238
|
+
title: textSchema.nullable(),
|
|
239
|
+
questions: z.array(askQuestionSchema).max(MAX_ARRAY_ITEMS),
|
|
240
|
+
});
|
|
241
|
+
const askAnswerSchema = strictObject({
|
|
242
|
+
values: z.array(textSchema).max(MAX_ARRAY_ITEMS).optional(),
|
|
243
|
+
customText: textSchema.optional(),
|
|
244
|
+
note: textSchema.optional(),
|
|
245
|
+
optionNotes: z.record(idSchema, textSchema).optional(),
|
|
246
|
+
});
|
|
247
|
+
const askResponseEnrichmentSchema = z.union([
|
|
248
|
+
strictObject({
|
|
249
|
+
flow_id: idSchema,
|
|
250
|
+
kind: z.literal("answer"),
|
|
251
|
+
mode: z.enum(["submit", "elaborate"]).optional(),
|
|
252
|
+
answers: z.record(idSchema, askAnswerSchema),
|
|
253
|
+
}),
|
|
254
|
+
strictObject({ flow_id: idSchema, kind: z.literal("cancel") }),
|
|
255
|
+
]);
|
|
256
|
+
export const extensionUiRequestPayloadSchema = z.union([
|
|
257
|
+
strictObject({ type: z.literal("extension_ui_request"), id: idSchema, method: z.literal("select"), title: textSchema, options: z.array(textSchema).max(MAX_ARRAY_ITEMS), ask: askEnrichmentSchema.optional() }),
|
|
258
|
+
strictObject({ type: z.literal("extension_ui_request"), id: idSchema, method: z.literal("confirm"), title: textSchema, message: textSchema, ask: askEnrichmentSchema.optional() }),
|
|
259
|
+
strictObject({ type: z.literal("extension_ui_request"), id: idSchema, method: z.literal("input"), title: textSchema, placeholder: textSchema.optional(), ask: askEnrichmentSchema.optional() }),
|
|
260
|
+
strictObject({ type: z.literal("extension_ui_request"), id: idSchema, method: z.literal("editor"), title: textSchema, prefill: textSchema.optional(), ask: askEnrichmentSchema.optional() }),
|
|
261
|
+
strictObject({ type: z.literal("extension_ui_request"), id: idSchema, method: z.literal("notify"), message: textSchema, notify_type: z.enum(["info", "warning", "error"]).optional() }),
|
|
262
|
+
]);
|
|
263
|
+
export const extensionUiResponsePayloadSchema = z.union([
|
|
264
|
+
strictObject({ type: z.literal("extension_ui_response"), id: idSchema, value: textSchema, ask: askResponseEnrichmentSchema.optional() }),
|
|
265
|
+
strictObject({ type: z.literal("extension_ui_response"), id: idSchema, confirmed: z.boolean(), ask: askResponseEnrichmentSchema.optional() }),
|
|
266
|
+
strictObject({ type: z.literal("extension_ui_response"), id: idSchema, cancelled: z.literal(true), ask: askResponseEnrichmentSchema.optional() }),
|
|
267
|
+
strictObject({ type: z.literal("extension_ui_response"), id: idSchema, ask: askResponseEnrichmentSchema }),
|
|
268
|
+
]);
|
|
269
|
+
export const thinkingLevelSchema = z.enum(["off", "minimal", "low", "medium", "high", "xhigh"]);
|
|
270
|
+
export const actionNameSchema = z.enum(["session_new", "session_compact", "model_set", "thinking_set"]);
|
|
271
|
+
export const byeReasonSchema = z.enum(["peer_stop", "session_replaced", "shutdown"]);
|
|
272
|
+
export const wireImageSchema = strictObject({
|
|
273
|
+
data: z.string().min(1).max(MAX_WINDOW_BYTES),
|
|
274
|
+
mime: imageMimeSchema,
|
|
275
|
+
});
|
|
276
|
+
export const queuedMessageItemSchema = strictObject({
|
|
277
|
+
id: idSchema,
|
|
278
|
+
text: textSchema,
|
|
279
|
+
images: z.array(wireImageSchema).max(1).optional(),
|
|
280
|
+
sender_ref: idSchema.optional(),
|
|
281
|
+
editable: z.boolean(),
|
|
282
|
+
created_at: timestampSchema,
|
|
283
|
+
});
|
|
284
|
+
export const wireModelSchema = strictObject({
|
|
285
|
+
id: idSchema,
|
|
286
|
+
name: textSchema,
|
|
287
|
+
provider: idSchema,
|
|
288
|
+
reasoning: z.boolean(),
|
|
289
|
+
context_window: positiveIntSchema,
|
|
290
|
+
vision: z.boolean(),
|
|
291
|
+
});
|
|
292
|
+
export const harnessSchema = strictObject({ name: idSchema, version: idSchema });
|
|
293
|
+
export const CLIENT_FRAME_TYPES = [
|
|
294
|
+
"pair_request", "session_hello", "user_message", "user_message_observed", "session_sync", "ping", "cancel",
|
|
295
|
+
"session_new", "session_compact", "model_set", "thinking_set", "list_models", "queued_message_set",
|
|
296
|
+
"queued_message_clear", "queued_message_steer", "approve_tool", "extension_ui_response",
|
|
297
|
+
];
|
|
298
|
+
export const SERVER_FRAME_TYPES = [
|
|
299
|
+
"pair_ok", "pair_error", "session_ready", "user_message_started", "user_message_status", "timeline_event",
|
|
300
|
+
"timeline_partial", "timeline_event_fragment", "session_history_chunk", "protocol_error", "reset", "pong",
|
|
301
|
+
"cancelled", "action_ok", "action_error", "models_list", "queued_message_state", "extension_ui_request", "bye",
|
|
302
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yefengr/remote-pi",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,15 +8,6 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "tsc",
|
|
13
|
-
"typecheck": "tsc --noEmit",
|
|
14
|
-
"dev": "tsx src/index.ts",
|
|
15
|
-
"test": "vitest run",
|
|
16
|
-
"verify": "pnpm typecheck && pnpm test && pnpm build",
|
|
17
|
-
"prepublishOnly": "pnpm verify",
|
|
18
|
-
"publish:npm": "bash ./publish-npm.sh"
|
|
19
|
-
},
|
|
20
11
|
"keywords": [
|
|
21
12
|
"pi",
|
|
22
13
|
"pi-package",
|
|
@@ -55,32 +46,33 @@
|
|
|
55
46
|
"engines": {
|
|
56
47
|
"node": ">=20.0.0"
|
|
57
48
|
},
|
|
58
|
-
"pnpm": {
|
|
59
|
-
"onlyBuiltDependencies": [
|
|
60
|
-
"@google/genai",
|
|
61
|
-
"esbuild",
|
|
62
|
-
"koffi",
|
|
63
|
-
"protobufjs"
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
49
|
"devDependencies": {
|
|
67
50
|
"@earendil-works/pi-coding-agent": "0.84.4",
|
|
68
|
-
"@types/node": "
|
|
51
|
+
"@types/node": "25.9.4",
|
|
69
52
|
"@types/ws": "^8.18.1",
|
|
70
53
|
"tsx": "^4.22.0",
|
|
71
|
-
"typescript": "
|
|
72
|
-
"vite": "
|
|
73
|
-
"vitest": "
|
|
54
|
+
"typescript": "6.0.3",
|
|
55
|
+
"vite": "8.2.2",
|
|
56
|
+
"vitest": "4.1.11",
|
|
57
|
+
"@remote-pi/protocol": "0.0.0"
|
|
74
58
|
},
|
|
75
59
|
"peerDependencies": {
|
|
76
60
|
"@earendil-works/pi-coding-agent": "*"
|
|
77
61
|
},
|
|
78
62
|
"dependencies": {
|
|
79
63
|
"@napi-rs/keyring": "^1.3.0",
|
|
80
|
-
"@noble/ed25519": "
|
|
64
|
+
"@noble/ed25519": "3.1.0",
|
|
81
65
|
"qrcode-terminal": "^0.12.0",
|
|
82
66
|
"typebox": "^1.1.38",
|
|
83
67
|
"ws": "^8.21.0",
|
|
84
|
-
"zod": "
|
|
68
|
+
"zod": "4.4.3"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"build": "pnpm --filter @remote-pi/protocol build && tsc && node scripts/vendor-protocol.mjs",
|
|
72
|
+
"typecheck": "tsc --noEmit",
|
|
73
|
+
"dev": "tsx src/index.ts",
|
|
74
|
+
"test": "vitest run --exclude \"scripts/**\" && node --test scripts/*.test.mjs",
|
|
75
|
+
"verify": "pnpm typecheck && pnpm test && pnpm build",
|
|
76
|
+
"publish:npm": "bash ./publish-npm.sh"
|
|
85
77
|
}
|
|
86
|
-
}
|
|
78
|
+
}
|