@viewportai/daemon 0.5.3 → 0.6.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/cli/commands.d.ts +1 -0
- package/dist/cli/commands.d.ts.map +1 -1
- package/dist/cli/commands.js +1 -0
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/context-access-command.d.ts +0 -6
- package/dist/cli/context-access-command.d.ts.map +1 -1
- package/dist/cli/context-access-command.js +1 -71
- package/dist/cli/context-access-command.js.map +1 -1
- package/dist/cli/context-command.d.ts.map +1 -1
- package/dist/cli/context-command.js +575 -38
- package/dist/cli/context-command.js.map +1 -1
- package/dist/cli/context-vault-metadata-command.d.ts.map +1 -1
- package/dist/cli/context-vault-metadata-command.js +6 -1
- package/dist/cli/context-vault-metadata-command.js.map +1 -1
- package/dist/cli/lifecycle-commands.d.ts.map +1 -1
- package/dist/cli/lifecycle-commands.js +2 -8
- package/dist/cli/lifecycle-commands.js.map +1 -1
- package/dist/cli/skills-command.js +3 -3
- package/dist/cli/unlock-command.d.ts +2 -0
- package/dist/cli/unlock-command.d.ts.map +1 -0
- package/dist/cli/unlock-command.js +35 -0
- package/dist/cli/unlock-command.js.map +1 -0
- package/dist/context/local-edge-auto-sync.d.ts +17 -0
- package/dist/context/local-edge-auto-sync.d.ts.map +1 -0
- package/dist/context/local-edge-auto-sync.js +94 -0
- package/dist/context/local-edge-auto-sync.js.map +1 -0
- package/dist/context/local-edge-store.d.ts +11 -0
- package/dist/context/local-edge-store.d.ts.map +1 -1
- package/dist/context/local-edge-store.js +25 -0
- package/dist/context/local-edge-store.js.map +1 -1
- package/dist/context/local-edge-sync.d.ts +2 -15
- package/dist/context/local-edge-sync.d.ts.map +1 -1
- package/dist/context/local-edge-sync.js +306 -86
- package/dist/context/local-edge-sync.js.map +1 -1
- package/dist/context/local-edge-types.d.ts +12 -0
- package/dist/context/local-edge-types.d.ts.map +1 -1
- package/dist/context-providers/viewport-vault-provider.d.ts.map +1 -1
- package/dist/context-providers/viewport-vault-provider.js +11 -0
- package/dist/context-providers/viewport-vault-provider.js.map +1 -1
- package/dist/core/session-context-prompt.d.ts.map +1 -1
- package/dist/core/session-context-prompt.js +8 -0
- package/dist/core/session-context-prompt.js.map +1 -1
- package/dist/hooks/trusted-edge-plan-artifacts.d.ts +30 -27
- package/dist/hooks/trusted-edge-plan-artifacts.d.ts.map +1 -1
- package/dist/hooks/trusted-edge-plan-artifacts.js +71 -89
- package/dist/hooks/trusted-edge-plan-artifacts.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/relay/bridge-daemon-key-registration.d.ts.map +1 -1
- package/dist/relay/bridge-daemon-key-registration.js +27 -7
- package/dist/relay/bridge-daemon-key-registration.js.map +1 -1
- package/dist/security/epoch-enrollment.d.ts +48 -0
- package/dist/security/epoch-enrollment.d.ts.map +1 -0
- package/dist/security/epoch-enrollment.js +290 -0
- package/dist/security/epoch-enrollment.js.map +1 -0
- package/dist/security/epoch-protocol.d.ts +181 -0
- package/dist/security/epoch-protocol.d.ts.map +1 -0
- package/dist/security/epoch-protocol.js +285 -0
- package/dist/security/epoch-protocol.js.map +1 -0
- package/dist/security/epoch-public-pins.d.ts +19 -0
- package/dist/security/epoch-public-pins.d.ts.map +1 -0
- package/dist/security/epoch-public-pins.js +129 -0
- package/dist/security/epoch-public-pins.js.map +1 -0
- package/dist/security/epoch-recovery.d.ts +56 -0
- package/dist/security/epoch-recovery.d.ts.map +1 -0
- package/dist/security/epoch-recovery.js +314 -0
- package/dist/security/epoch-recovery.js.map +1 -0
- package/dist/security/epoch-store.d.ts +111 -0
- package/dist/security/epoch-store.d.ts.map +1 -0
- package/dist/security/epoch-store.js +224 -0
- package/dist/security/epoch-store.js.map +1 -0
- package/dist/security/epoch-sync.d.ts +47 -0
- package/dist/security/epoch-sync.d.ts.map +1 -0
- package/dist/security/epoch-sync.js +371 -0
- package/dist/security/epoch-sync.js.map +1 -0
- package/dist/security/team-epoch-grant-payloads.d.ts +44 -0
- package/dist/security/team-epoch-grant-payloads.d.ts.map +1 -0
- package/dist/security/team-epoch-grant-payloads.js +100 -0
- package/dist/security/team-epoch-grant-payloads.js.map +1 -0
- package/dist/security/team-epoch-grants.d.ts +31 -0
- package/dist/security/team-epoch-grants.d.ts.map +1 -0
- package/dist/security/team-epoch-grants.js +194 -0
- package/dist/security/team-epoch-grants.js.map +1 -0
- package/dist/server/http-context-routes.d.ts +2 -1
- package/dist/server/http-context-routes.d.ts.map +1 -1
- package/dist/server/http-context-routes.js +57 -15
- package/dist/server/http-context-routes.js.map +1 -1
- package/dist/server/http-server.js +1 -1
- package/dist/server/http-server.js.map +1 -1
- package/dist/server/rate-limiter.d.ts.map +1 -1
- package/dist/server/rate-limiter.js +2 -1
- package/dist/server/rate-limiter.js.map +1 -1
- package/dist/server/trusted-edge-command-capability.d.ts +2 -1
- package/dist/server/trusted-edge-command-capability.d.ts.map +1 -1
- package/dist/server/trusted-edge-command-capability.js +15 -0
- package/dist/server/trusted-edge-command-capability.js.map +1 -1
- package/dist/server/ws-command-handlers.d.ts.map +1 -1
- package/dist/server/ws-command-handlers.js +200 -28
- package/dist/server/ws-command-handlers.js.map +1 -1
- package/dist/server/ws-protocol.d.ts +281 -44
- package/dist/server/ws-protocol.d.ts.map +1 -1
- package/dist/server/ws-protocol.js +89 -19
- package/dist/server/ws-protocol.js.map +1 -1
- package/dist/startup.d.ts.map +1 -1
- package/dist/startup.js +0 -17
- package/dist/startup.js.map +1 -1
- package/docs/README.md +18 -0
- package/docs/configuration.md +3 -3
- package/docs/protocol-matrix.json +53 -8
- package/docs/security.md +11 -8
- package/node_modules/@viewportai/context-engine/src/repo/identities.js +7 -3
- package/node_modules/@viewportai/context-engine/src/repo/materializer.js +20 -5
- package/node_modules/@viewportai/context-engine/src/repo/membership.js +15 -0
- package/node_modules/@viewportai/context-engine/src/repo/sync.js +4 -4
- package/node_modules/@viewportai/context-engine/src/repo/vault.js +8 -3
- package/package.json +1 -1
|
@@ -121,6 +121,43 @@ export declare const ContextCandidatePreviewSchema: z.ZodObject<{
|
|
|
121
121
|
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
122
122
|
requestId: z.ZodOptional<z.ZodString>;
|
|
123
123
|
}, z.core.$strip>;
|
|
124
|
+
export declare const ContextResolveSchema: z.ZodObject<{
|
|
125
|
+
type: z.ZodLiteral<"context-resolve">;
|
|
126
|
+
contextResourceId: z.ZodString;
|
|
127
|
+
workspaceId: z.ZodString;
|
|
128
|
+
actorName: z.ZodString;
|
|
129
|
+
query: z.ZodDefault<z.ZodString>;
|
|
130
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
includePrivate: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
133
|
+
profilePin: z.ZodOptional<z.ZodObject<{
|
|
134
|
+
path: z.ZodOptional<z.ZodString>;
|
|
135
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.core.$strip>>;
|
|
137
|
+
passphrase: z.ZodOptional<z.ZodString>;
|
|
138
|
+
recoveryCode: z.ZodOptional<z.ZodString>;
|
|
139
|
+
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
140
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
export declare const ContextProposeSchema: z.ZodObject<{
|
|
143
|
+
type: z.ZodLiteral<"context-propose">;
|
|
144
|
+
contextResourceId: z.ZodString;
|
|
145
|
+
workspaceId: z.ZodString;
|
|
146
|
+
actorName: z.ZodString;
|
|
147
|
+
title: z.ZodString;
|
|
148
|
+
body: z.ZodString;
|
|
149
|
+
source: z.ZodOptional<z.ZodString>;
|
|
150
|
+
sourceKind: z.ZodOptional<z.ZodEnum<{
|
|
151
|
+
plan: "plan";
|
|
152
|
+
workflow: "workflow";
|
|
153
|
+
integration: "integration";
|
|
154
|
+
}>>;
|
|
155
|
+
sync: z.ZodOptional<z.ZodBoolean>;
|
|
156
|
+
passphrase: z.ZodOptional<z.ZodString>;
|
|
157
|
+
recoveryCode: z.ZodOptional<z.ZodString>;
|
|
158
|
+
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
159
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, z.core.$strip>;
|
|
124
161
|
export declare const ResumeSchema: z.ZodObject<{
|
|
125
162
|
type: z.ZodLiteral<"resume">;
|
|
126
163
|
sessionId: z.ZodString;
|
|
@@ -235,11 +272,6 @@ export declare const RespondHookPermissionSchema: z.ZodObject<{
|
|
|
235
272
|
}, z.core.$strip>;
|
|
236
273
|
requestId: z.ZodOptional<z.ZodString>;
|
|
237
274
|
}, z.core.$strip>;
|
|
238
|
-
export declare const GetHookPlanDraftSchema: z.ZodObject<{
|
|
239
|
-
type: z.ZodLiteral<"get-hook-plan-draft">;
|
|
240
|
-
draftId: z.ZodString;
|
|
241
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
242
|
-
}, z.core.$strip>;
|
|
243
275
|
export declare const TrustedEdgePlanDecryptSchema: z.ZodObject<{
|
|
244
276
|
type: z.ZodLiteral<"trusted-edge-plan-decrypt">;
|
|
245
277
|
workspaceId: z.ZodString;
|
|
@@ -256,12 +288,23 @@ export declare const TrustedEdgePlanDecryptSchema: z.ZodObject<{
|
|
|
256
288
|
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
257
289
|
}, z.core.$strip>;
|
|
258
290
|
bodyKeyGrants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
259
|
-
schema: z.ZodLiteral<"viewport.plan_body_key_grant/
|
|
260
|
-
algorithm: z.ZodLiteral<"
|
|
261
|
-
|
|
262
|
-
|
|
291
|
+
schema: z.ZodLiteral<"viewport.plan_body_key_grant/v2">;
|
|
292
|
+
algorithm: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
293
|
+
recipient_type: z.ZodUnion<readonly [z.ZodLiteral<"user_epoch">, z.ZodLiteral<"team_epoch">]>;
|
|
294
|
+
recipient_epoch_id: z.ZodString;
|
|
295
|
+
recipient_fingerprint: z.ZodString;
|
|
263
296
|
key_ref: z.ZodString;
|
|
264
|
-
|
|
297
|
+
aad: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
298
|
+
encrypted_payload: z.ZodObject<{
|
|
299
|
+
schema: z.ZodLiteral<"viewport.wrapped_key_envelope/v1">;
|
|
300
|
+
alg: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
301
|
+
ephemeralPublicKeyJwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
302
|
+
iv: z.ZodString;
|
|
303
|
+
ciphertext: z.ZodString;
|
|
304
|
+
tag: z.ZodString;
|
|
305
|
+
aadDigest: z.ZodString;
|
|
306
|
+
createdAt: z.ZodString;
|
|
307
|
+
}, z.core.$strip>;
|
|
265
308
|
}, z.core.$strip>>>;
|
|
266
309
|
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
267
310
|
requestId: z.ZodOptional<z.ZodString>;
|
|
@@ -282,18 +325,76 @@ export declare const TrustedEdgePlanEncryptFieldSchema: z.ZodObject<{
|
|
|
282
325
|
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
283
326
|
}, z.core.$strip>;
|
|
284
327
|
bodyKeyGrants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
285
|
-
schema: z.ZodLiteral<"viewport.plan_body_key_grant/
|
|
286
|
-
algorithm: z.ZodLiteral<"
|
|
287
|
-
|
|
288
|
-
|
|
328
|
+
schema: z.ZodLiteral<"viewport.plan_body_key_grant/v2">;
|
|
329
|
+
algorithm: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
330
|
+
recipient_type: z.ZodUnion<readonly [z.ZodLiteral<"user_epoch">, z.ZodLiteral<"team_epoch">]>;
|
|
331
|
+
recipient_epoch_id: z.ZodString;
|
|
332
|
+
recipient_fingerprint: z.ZodString;
|
|
289
333
|
key_ref: z.ZodString;
|
|
290
|
-
|
|
334
|
+
aad: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
335
|
+
encrypted_payload: z.ZodObject<{
|
|
336
|
+
schema: z.ZodLiteral<"viewport.wrapped_key_envelope/v1">;
|
|
337
|
+
alg: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
338
|
+
ephemeralPublicKeyJwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
339
|
+
iv: z.ZodString;
|
|
340
|
+
ciphertext: z.ZodString;
|
|
341
|
+
tag: z.ZodString;
|
|
342
|
+
aadDigest: z.ZodString;
|
|
343
|
+
createdAt: z.ZodString;
|
|
344
|
+
}, z.core.$strip>;
|
|
291
345
|
}, z.core.$strip>>>;
|
|
292
346
|
text: z.ZodString;
|
|
293
347
|
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
294
348
|
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
295
349
|
requestId: z.ZodOptional<z.ZodString>;
|
|
296
350
|
}, z.core.$strip>;
|
|
351
|
+
export declare const TrustedEdgePlanDecryptFieldSchema: z.ZodObject<{
|
|
352
|
+
type: z.ZodLiteral<"trusted-edge-plan-decrypt-field">;
|
|
353
|
+
workspaceId: z.ZodString;
|
|
354
|
+
planId: z.ZodOptional<z.ZodString>;
|
|
355
|
+
sourceRef: z.ZodOptional<z.ZodString>;
|
|
356
|
+
bodyEncryption: z.ZodObject<{
|
|
357
|
+
schema: z.ZodLiteral<"viewport.plan_body_encrypted/v1">;
|
|
358
|
+
algorithm: z.ZodLiteral<"AES-GCM-256">;
|
|
359
|
+
key_ref: z.ZodString;
|
|
360
|
+
ciphertext: z.ZodString;
|
|
361
|
+
iv: z.ZodString;
|
|
362
|
+
tag: z.ZodString;
|
|
363
|
+
digest: z.ZodString;
|
|
364
|
+
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
365
|
+
}, z.core.$strip>;
|
|
366
|
+
bodyKeyGrants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
367
|
+
schema: z.ZodLiteral<"viewport.plan_body_key_grant/v2">;
|
|
368
|
+
algorithm: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
369
|
+
recipient_type: z.ZodUnion<readonly [z.ZodLiteral<"user_epoch">, z.ZodLiteral<"team_epoch">]>;
|
|
370
|
+
recipient_epoch_id: z.ZodString;
|
|
371
|
+
recipient_fingerprint: z.ZodString;
|
|
372
|
+
key_ref: z.ZodString;
|
|
373
|
+
aad: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
374
|
+
encrypted_payload: z.ZodObject<{
|
|
375
|
+
schema: z.ZodLiteral<"viewport.wrapped_key_envelope/v1">;
|
|
376
|
+
alg: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
377
|
+
ephemeralPublicKeyJwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
378
|
+
iv: z.ZodString;
|
|
379
|
+
ciphertext: z.ZodString;
|
|
380
|
+
tag: z.ZodString;
|
|
381
|
+
aadDigest: z.ZodString;
|
|
382
|
+
createdAt: z.ZodString;
|
|
383
|
+
}, z.core.$strip>;
|
|
384
|
+
}, z.core.$strip>>>;
|
|
385
|
+
fieldEncryption: z.ZodObject<{
|
|
386
|
+
schema: z.ZodLiteral<"viewport.plan_feedback_field_encrypted/v1">;
|
|
387
|
+
algorithm: z.ZodLiteral<"AES-GCM-256">;
|
|
388
|
+
key_ref: z.ZodString;
|
|
389
|
+
ciphertext: z.ZodString;
|
|
390
|
+
iv: z.ZodString;
|
|
391
|
+
tag: z.ZodString;
|
|
392
|
+
digest: z.ZodString;
|
|
393
|
+
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
394
|
+
}, z.core.$strip>;
|
|
395
|
+
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
396
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
397
|
+
}, z.core.$strip>;
|
|
297
398
|
export declare const TrustedEdgePlanWrapKeySchema: z.ZodObject<{
|
|
298
399
|
type: z.ZodLiteral<"trusted-edge-plan-wrap-key">;
|
|
299
400
|
workspaceId: z.ZodString;
|
|
@@ -310,21 +411,40 @@ export declare const TrustedEdgePlanWrapKeySchema: z.ZodObject<{
|
|
|
310
411
|
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
311
412
|
}, z.core.$strip>;
|
|
312
413
|
bodyKeyGrants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
313
|
-
schema: z.ZodLiteral<"viewport.plan_body_key_grant/
|
|
314
|
-
algorithm: z.ZodLiteral<"
|
|
315
|
-
|
|
316
|
-
|
|
414
|
+
schema: z.ZodLiteral<"viewport.plan_body_key_grant/v2">;
|
|
415
|
+
algorithm: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
416
|
+
recipient_type: z.ZodUnion<readonly [z.ZodLiteral<"user_epoch">, z.ZodLiteral<"team_epoch">]>;
|
|
417
|
+
recipient_epoch_id: z.ZodString;
|
|
418
|
+
recipient_fingerprint: z.ZodString;
|
|
317
419
|
key_ref: z.ZodString;
|
|
318
|
-
|
|
420
|
+
aad: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
421
|
+
encrypted_payload: z.ZodObject<{
|
|
422
|
+
schema: z.ZodLiteral<"viewport.wrapped_key_envelope/v1">;
|
|
423
|
+
alg: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
424
|
+
ephemeralPublicKeyJwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
425
|
+
iv: z.ZodString;
|
|
426
|
+
ciphertext: z.ZodString;
|
|
427
|
+
tag: z.ZodString;
|
|
428
|
+
aadDigest: z.ZodString;
|
|
429
|
+
createdAt: z.ZodString;
|
|
430
|
+
}, z.core.$strip>;
|
|
319
431
|
}, z.core.$strip>>>;
|
|
320
432
|
recipients: z.ZodArray<z.ZodObject<{
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
433
|
+
recipient_type: z.ZodUnion<readonly [z.ZodLiteral<"user_epoch">, z.ZodLiteral<"team_epoch">]>;
|
|
434
|
+
recipient_epoch_id: z.ZodString;
|
|
435
|
+
recipient_fingerprint: z.ZodString;
|
|
436
|
+
encryption_public_key_jwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
324
437
|
}, z.core.$strip>>;
|
|
325
438
|
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
326
439
|
requestId: z.ZodOptional<z.ZodString>;
|
|
327
440
|
}, z.core.$strip>;
|
|
441
|
+
export declare const TrustedEdgeTeamEpochPublishSchema: z.ZodObject<{
|
|
442
|
+
type: z.ZodLiteral<"trusted-edge-team-epoch-publish">;
|
|
443
|
+
workspaceId: z.ZodString;
|
|
444
|
+
teamId: z.ZodString;
|
|
445
|
+
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
446
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
447
|
+
}, z.core.$strip>;
|
|
328
448
|
export declare const IncomingMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
329
449
|
type: z.ZodLiteral<"launch">;
|
|
330
450
|
directoryId: z.ZodString;
|
|
@@ -426,6 +546,41 @@ export declare const IncomingMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
426
546
|
recoveryCode: z.ZodOptional<z.ZodString>;
|
|
427
547
|
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
428
548
|
requestId: z.ZodOptional<z.ZodString>;
|
|
549
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
550
|
+
type: z.ZodLiteral<"context-resolve">;
|
|
551
|
+
contextResourceId: z.ZodString;
|
|
552
|
+
workspaceId: z.ZodString;
|
|
553
|
+
actorName: z.ZodString;
|
|
554
|
+
query: z.ZodDefault<z.ZodString>;
|
|
555
|
+
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
556
|
+
includePrivate: z.ZodOptional<z.ZodBoolean>;
|
|
557
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
558
|
+
profilePin: z.ZodOptional<z.ZodObject<{
|
|
559
|
+
path: z.ZodOptional<z.ZodString>;
|
|
560
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
561
|
+
}, z.core.$strip>>;
|
|
562
|
+
passphrase: z.ZodOptional<z.ZodString>;
|
|
563
|
+
recoveryCode: z.ZodOptional<z.ZodString>;
|
|
564
|
+
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
565
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
566
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
567
|
+
type: z.ZodLiteral<"context-propose">;
|
|
568
|
+
contextResourceId: z.ZodString;
|
|
569
|
+
workspaceId: z.ZodString;
|
|
570
|
+
actorName: z.ZodString;
|
|
571
|
+
title: z.ZodString;
|
|
572
|
+
body: z.ZodString;
|
|
573
|
+
source: z.ZodOptional<z.ZodString>;
|
|
574
|
+
sourceKind: z.ZodOptional<z.ZodEnum<{
|
|
575
|
+
plan: "plan";
|
|
576
|
+
workflow: "workflow";
|
|
577
|
+
integration: "integration";
|
|
578
|
+
}>>;
|
|
579
|
+
sync: z.ZodOptional<z.ZodBoolean>;
|
|
580
|
+
passphrase: z.ZodOptional<z.ZodString>;
|
|
581
|
+
recoveryCode: z.ZodOptional<z.ZodString>;
|
|
582
|
+
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
583
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
429
584
|
}, z.core.$strip>, z.ZodObject<{
|
|
430
585
|
type: z.ZodLiteral<"resume">;
|
|
431
586
|
sessionId: z.ZodString;
|
|
@@ -530,11 +685,43 @@ export declare const IncomingMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
530
685
|
}, z.core.$strip>;
|
|
531
686
|
requestId: z.ZodOptional<z.ZodString>;
|
|
532
687
|
}, z.core.$strip>, z.ZodObject<{
|
|
533
|
-
type: z.ZodLiteral<"
|
|
534
|
-
|
|
688
|
+
type: z.ZodLiteral<"trusted-edge-plan-decrypt">;
|
|
689
|
+
workspaceId: z.ZodString;
|
|
690
|
+
planId: z.ZodOptional<z.ZodString>;
|
|
691
|
+
sourceRef: z.ZodOptional<z.ZodString>;
|
|
692
|
+
bodyEncryption: z.ZodObject<{
|
|
693
|
+
schema: z.ZodLiteral<"viewport.plan_body_encrypted/v1">;
|
|
694
|
+
algorithm: z.ZodLiteral<"AES-GCM-256">;
|
|
695
|
+
key_ref: z.ZodString;
|
|
696
|
+
ciphertext: z.ZodString;
|
|
697
|
+
iv: z.ZodString;
|
|
698
|
+
tag: z.ZodString;
|
|
699
|
+
digest: z.ZodString;
|
|
700
|
+
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
701
|
+
}, z.core.$strip>;
|
|
702
|
+
bodyKeyGrants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
703
|
+
schema: z.ZodLiteral<"viewport.plan_body_key_grant/v2">;
|
|
704
|
+
algorithm: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
705
|
+
recipient_type: z.ZodUnion<readonly [z.ZodLiteral<"user_epoch">, z.ZodLiteral<"team_epoch">]>;
|
|
706
|
+
recipient_epoch_id: z.ZodString;
|
|
707
|
+
recipient_fingerprint: z.ZodString;
|
|
708
|
+
key_ref: z.ZodString;
|
|
709
|
+
aad: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
710
|
+
encrypted_payload: z.ZodObject<{
|
|
711
|
+
schema: z.ZodLiteral<"viewport.wrapped_key_envelope/v1">;
|
|
712
|
+
alg: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
713
|
+
ephemeralPublicKeyJwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
714
|
+
iv: z.ZodString;
|
|
715
|
+
ciphertext: z.ZodString;
|
|
716
|
+
tag: z.ZodString;
|
|
717
|
+
aadDigest: z.ZodString;
|
|
718
|
+
createdAt: z.ZodString;
|
|
719
|
+
}, z.core.$strip>;
|
|
720
|
+
}, z.core.$strip>>>;
|
|
721
|
+
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
535
722
|
requestId: z.ZodOptional<z.ZodString>;
|
|
536
723
|
}, z.core.$strip>, z.ZodObject<{
|
|
537
|
-
type: z.ZodLiteral<"trusted-edge-plan-decrypt">;
|
|
724
|
+
type: z.ZodLiteral<"trusted-edge-plan-decrypt-field">;
|
|
538
725
|
workspaceId: z.ZodString;
|
|
539
726
|
planId: z.ZodOptional<z.ZodString>;
|
|
540
727
|
sourceRef: z.ZodOptional<z.ZodString>;
|
|
@@ -549,13 +736,34 @@ export declare const IncomingMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
549
736
|
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
550
737
|
}, z.core.$strip>;
|
|
551
738
|
bodyKeyGrants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
552
|
-
schema: z.ZodLiteral<"viewport.plan_body_key_grant/
|
|
553
|
-
algorithm: z.ZodLiteral<"
|
|
554
|
-
|
|
555
|
-
|
|
739
|
+
schema: z.ZodLiteral<"viewport.plan_body_key_grant/v2">;
|
|
740
|
+
algorithm: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
741
|
+
recipient_type: z.ZodUnion<readonly [z.ZodLiteral<"user_epoch">, z.ZodLiteral<"team_epoch">]>;
|
|
742
|
+
recipient_epoch_id: z.ZodString;
|
|
743
|
+
recipient_fingerprint: z.ZodString;
|
|
556
744
|
key_ref: z.ZodString;
|
|
557
|
-
|
|
745
|
+
aad: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
746
|
+
encrypted_payload: z.ZodObject<{
|
|
747
|
+
schema: z.ZodLiteral<"viewport.wrapped_key_envelope/v1">;
|
|
748
|
+
alg: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
749
|
+
ephemeralPublicKeyJwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
750
|
+
iv: z.ZodString;
|
|
751
|
+
ciphertext: z.ZodString;
|
|
752
|
+
tag: z.ZodString;
|
|
753
|
+
aadDigest: z.ZodString;
|
|
754
|
+
createdAt: z.ZodString;
|
|
755
|
+
}, z.core.$strip>;
|
|
558
756
|
}, z.core.$strip>>>;
|
|
757
|
+
fieldEncryption: z.ZodObject<{
|
|
758
|
+
schema: z.ZodLiteral<"viewport.plan_feedback_field_encrypted/v1">;
|
|
759
|
+
algorithm: z.ZodLiteral<"AES-GCM-256">;
|
|
760
|
+
key_ref: z.ZodString;
|
|
761
|
+
ciphertext: z.ZodString;
|
|
762
|
+
iv: z.ZodString;
|
|
763
|
+
tag: z.ZodString;
|
|
764
|
+
digest: z.ZodString;
|
|
765
|
+
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
766
|
+
}, z.core.$strip>;
|
|
559
767
|
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
560
768
|
requestId: z.ZodOptional<z.ZodString>;
|
|
561
769
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -574,12 +782,23 @@ export declare const IncomingMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
574
782
|
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
575
783
|
}, z.core.$strip>;
|
|
576
784
|
bodyKeyGrants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
577
|
-
schema: z.ZodLiteral<"viewport.plan_body_key_grant/
|
|
578
|
-
algorithm: z.ZodLiteral<"
|
|
579
|
-
|
|
580
|
-
|
|
785
|
+
schema: z.ZodLiteral<"viewport.plan_body_key_grant/v2">;
|
|
786
|
+
algorithm: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
787
|
+
recipient_type: z.ZodUnion<readonly [z.ZodLiteral<"user_epoch">, z.ZodLiteral<"team_epoch">]>;
|
|
788
|
+
recipient_epoch_id: z.ZodString;
|
|
789
|
+
recipient_fingerprint: z.ZodString;
|
|
581
790
|
key_ref: z.ZodString;
|
|
582
|
-
|
|
791
|
+
aad: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
792
|
+
encrypted_payload: z.ZodObject<{
|
|
793
|
+
schema: z.ZodLiteral<"viewport.wrapped_key_envelope/v1">;
|
|
794
|
+
alg: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
795
|
+
ephemeralPublicKeyJwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
796
|
+
iv: z.ZodString;
|
|
797
|
+
ciphertext: z.ZodString;
|
|
798
|
+
tag: z.ZodString;
|
|
799
|
+
aadDigest: z.ZodString;
|
|
800
|
+
createdAt: z.ZodString;
|
|
801
|
+
}, z.core.$strip>;
|
|
583
802
|
}, z.core.$strip>>>;
|
|
584
803
|
text: z.ZodString;
|
|
585
804
|
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -601,20 +820,38 @@ export declare const IncomingMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
601
820
|
aad: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
602
821
|
}, z.core.$strip>;
|
|
603
822
|
bodyKeyGrants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
604
|
-
schema: z.ZodLiteral<"viewport.plan_body_key_grant/
|
|
605
|
-
algorithm: z.ZodLiteral<"
|
|
606
|
-
|
|
607
|
-
|
|
823
|
+
schema: z.ZodLiteral<"viewport.plan_body_key_grant/v2">;
|
|
824
|
+
algorithm: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
825
|
+
recipient_type: z.ZodUnion<readonly [z.ZodLiteral<"user_epoch">, z.ZodLiteral<"team_epoch">]>;
|
|
826
|
+
recipient_epoch_id: z.ZodString;
|
|
827
|
+
recipient_fingerprint: z.ZodString;
|
|
608
828
|
key_ref: z.ZodString;
|
|
609
|
-
|
|
829
|
+
aad: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
830
|
+
encrypted_payload: z.ZodObject<{
|
|
831
|
+
schema: z.ZodLiteral<"viewport.wrapped_key_envelope/v1">;
|
|
832
|
+
alg: z.ZodLiteral<"x25519-hkdf-sha256-aes-256-gcm">;
|
|
833
|
+
ephemeralPublicKeyJwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
834
|
+
iv: z.ZodString;
|
|
835
|
+
ciphertext: z.ZodString;
|
|
836
|
+
tag: z.ZodString;
|
|
837
|
+
aadDigest: z.ZodString;
|
|
838
|
+
createdAt: z.ZodString;
|
|
839
|
+
}, z.core.$strip>;
|
|
610
840
|
}, z.core.$strip>>>;
|
|
611
841
|
recipients: z.ZodArray<z.ZodObject<{
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
842
|
+
recipient_type: z.ZodUnion<readonly [z.ZodLiteral<"user_epoch">, z.ZodLiteral<"team_epoch">]>;
|
|
843
|
+
recipient_epoch_id: z.ZodString;
|
|
844
|
+
recipient_fingerprint: z.ZodString;
|
|
845
|
+
encryption_public_key_jwk: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
615
846
|
}, z.core.$strip>>;
|
|
616
847
|
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
617
848
|
requestId: z.ZodOptional<z.ZodString>;
|
|
849
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
850
|
+
type: z.ZodLiteral<"trusted-edge-team-epoch-publish">;
|
|
851
|
+
workspaceId: z.ZodString;
|
|
852
|
+
teamId: z.ZodString;
|
|
853
|
+
capabilityToken: z.ZodOptional<z.ZodString>;
|
|
854
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
618
855
|
}, z.core.$strip>], "type">;
|
|
619
856
|
export type IncomingMessage = z.infer<typeof IncomingMessageSchema>;
|
|
620
857
|
//# sourceMappingURL=ws-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-protocol.d.ts","sourceRoot":"","sources":["../../src/server/ws-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAoBhE,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAWnD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;kBAmBd,CAAC;AAEZ,eAAO,MAAM,UAAU;;;;iBAIrB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;iBAMvB,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;iBASlC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;iBAK1B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;iBAM5B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;iBAM7B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;iBAQpC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;iBAWxC,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;kBAUd,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;iBAKvC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;iBAKzC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiC1B,CAAC;AAEL,eAAO,MAAM,sBAAsB;;;;iBAIjC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;iBAenC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;iBAalC,CAAC;AAMH,eAAO,MAAM,eAAe;;;;;iBAK1B,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;iBAQtC,CAAC;
|
|
1
|
+
{"version":3,"file":"ws-protocol.d.ts","sourceRoot":"","sources":["../../src/server/ws-protocol.ts"],"names":[],"mappings":"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"}
|
|
@@ -129,6 +129,41 @@ export const ContextCandidatePreviewSchema = z.object({
|
|
|
129
129
|
capabilityToken: z.string().min(1).max(4096).optional(),
|
|
130
130
|
requestId: z.string().max(MAX_REQUEST_ID_CHARS).optional(),
|
|
131
131
|
});
|
|
132
|
+
export const ContextResolveSchema = z.object({
|
|
133
|
+
type: z.literal('context-resolve'),
|
|
134
|
+
contextResourceId: z.string().min(1).max(256),
|
|
135
|
+
workspaceId: z.string().min(1).max(256),
|
|
136
|
+
actorName: z.string().min(1).max(256),
|
|
137
|
+
query: z.string().max(10_000).default(''),
|
|
138
|
+
maxItems: z.number().int().min(1).max(500).optional(),
|
|
139
|
+
includePrivate: z.boolean().optional(),
|
|
140
|
+
profile: z.string().min(1).max(256).optional(),
|
|
141
|
+
profilePin: z
|
|
142
|
+
.object({
|
|
143
|
+
path: z.string().min(1).max(4096).optional(),
|
|
144
|
+
digest: z.string().min(1).max(256).optional(),
|
|
145
|
+
})
|
|
146
|
+
.optional(),
|
|
147
|
+
passphrase: z.string().max(4096).optional(),
|
|
148
|
+
recoveryCode: z.string().max(4096).optional(),
|
|
149
|
+
capabilityToken: z.string().min(1).max(4096).optional(),
|
|
150
|
+
requestId: z.string().max(MAX_REQUEST_ID_CHARS).optional(),
|
|
151
|
+
});
|
|
152
|
+
export const ContextProposeSchema = z.object({
|
|
153
|
+
type: z.literal('context-propose'),
|
|
154
|
+
contextResourceId: z.string().min(1).max(256),
|
|
155
|
+
workspaceId: z.string().min(1).max(256),
|
|
156
|
+
actorName: z.string().min(1).max(256),
|
|
157
|
+
title: z.string().min(1).max(500),
|
|
158
|
+
body: z.string().min(1).max(100_000),
|
|
159
|
+
source: z.string().max(512).optional(),
|
|
160
|
+
sourceKind: z.enum(['workflow', 'plan', 'integration']).optional(),
|
|
161
|
+
sync: z.boolean().optional(),
|
|
162
|
+
passphrase: z.string().max(4096).optional(),
|
|
163
|
+
recoveryCode: z.string().max(4096).optional(),
|
|
164
|
+
capabilityToken: z.string().min(1).max(4096).optional(),
|
|
165
|
+
requestId: z.string().max(MAX_REQUEST_ID_CHARS).optional(),
|
|
166
|
+
});
|
|
132
167
|
export const ResumeSchema = z
|
|
133
168
|
.object({
|
|
134
169
|
type: z.literal('resume'),
|
|
@@ -248,10 +283,24 @@ export const RespondHookPermissionSchema = z.object({
|
|
|
248
283
|
}),
|
|
249
284
|
requestId: z.string().max(MAX_REQUEST_ID_CHARS).optional(),
|
|
250
285
|
});
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
286
|
+
const TrustedEdgePlanBodyKeyGrantSchema = z.object({
|
|
287
|
+
schema: z.literal('viewport.plan_body_key_grant/v2'),
|
|
288
|
+
algorithm: z.literal('x25519-hkdf-sha256-aes-256-gcm'),
|
|
289
|
+
recipient_type: z.union([z.literal('user_epoch'), z.literal('team_epoch')]),
|
|
290
|
+
recipient_epoch_id: z.string().min(1).max(256),
|
|
291
|
+
recipient_fingerprint: z.string().min(1).max(256),
|
|
292
|
+
key_ref: z.string().min(1).max(256),
|
|
293
|
+
aad: z.record(z.string(), z.unknown()),
|
|
294
|
+
encrypted_payload: z.object({
|
|
295
|
+
schema: z.literal('viewport.wrapped_key_envelope/v1'),
|
|
296
|
+
alg: z.literal('x25519-hkdf-sha256-aes-256-gcm'),
|
|
297
|
+
ephemeralPublicKeyJwk: z.record(z.string(), z.unknown()),
|
|
298
|
+
iv: z.string().min(1),
|
|
299
|
+
ciphertext: z.string().min(1),
|
|
300
|
+
tag: z.string().min(1),
|
|
301
|
+
aadDigest: z.string().min(1),
|
|
302
|
+
createdAt: z.string().min(1),
|
|
303
|
+
}),
|
|
255
304
|
});
|
|
256
305
|
export const TrustedEdgePlanDecryptSchema = z.object({
|
|
257
306
|
type: z.literal('trusted-edge-plan-decrypt'),
|
|
@@ -268,17 +317,7 @@ export const TrustedEdgePlanDecryptSchema = z.object({
|
|
|
268
317
|
digest: z.string().min(1).max(256),
|
|
269
318
|
aad: z.record(z.string(), z.unknown()).optional(),
|
|
270
319
|
}),
|
|
271
|
-
bodyKeyGrants: z
|
|
272
|
-
.array(z.object({
|
|
273
|
-
schema: z.literal('viewport.plan_body_key_grant/v1'),
|
|
274
|
-
algorithm: z.literal('RSA-OAEP-256'),
|
|
275
|
-
recipient_user_id: z.number().int(),
|
|
276
|
-
recipient_key_id: z.string().min(1).max(256),
|
|
277
|
-
key_ref: z.string().min(1).max(256),
|
|
278
|
-
encrypted_key: z.string().min(1),
|
|
279
|
-
}))
|
|
280
|
-
.max(500)
|
|
281
|
-
.optional(),
|
|
320
|
+
bodyKeyGrants: z.array(TrustedEdgePlanBodyKeyGrantSchema).max(500).optional(),
|
|
282
321
|
capabilityToken: z.string().min(1).max(4096).optional(),
|
|
283
322
|
requestId: z.string().max(MAX_REQUEST_ID_CHARS).optional(),
|
|
284
323
|
});
|
|
@@ -294,6 +333,26 @@ export const TrustedEdgePlanEncryptFieldSchema = z.object({
|
|
|
294
333
|
capabilityToken: TrustedEdgePlanDecryptSchema.shape.capabilityToken,
|
|
295
334
|
requestId: z.string().max(MAX_REQUEST_ID_CHARS).optional(),
|
|
296
335
|
});
|
|
336
|
+
export const TrustedEdgePlanDecryptFieldSchema = z.object({
|
|
337
|
+
type: z.literal('trusted-edge-plan-decrypt-field'),
|
|
338
|
+
workspaceId: z.string().min(1).max(256),
|
|
339
|
+
planId: z.string().min(1).max(256).optional(),
|
|
340
|
+
sourceRef: z.string().min(1).max(512).optional(),
|
|
341
|
+
bodyEncryption: TrustedEdgePlanDecryptSchema.shape.bodyEncryption,
|
|
342
|
+
bodyKeyGrants: TrustedEdgePlanDecryptSchema.shape.bodyKeyGrants,
|
|
343
|
+
fieldEncryption: z.object({
|
|
344
|
+
schema: z.literal('viewport.plan_feedback_field_encrypted/v1'),
|
|
345
|
+
algorithm: z.literal('AES-GCM-256'),
|
|
346
|
+
key_ref: z.string().min(1).max(256),
|
|
347
|
+
ciphertext: z.string().min(1),
|
|
348
|
+
iv: z.string().min(1),
|
|
349
|
+
tag: z.string().min(1),
|
|
350
|
+
digest: z.string().min(1).max(256),
|
|
351
|
+
aad: z.record(z.string(), z.unknown()).optional(),
|
|
352
|
+
}),
|
|
353
|
+
capabilityToken: TrustedEdgePlanDecryptSchema.shape.capabilityToken,
|
|
354
|
+
requestId: z.string().max(MAX_REQUEST_ID_CHARS).optional(),
|
|
355
|
+
});
|
|
297
356
|
export const TrustedEdgePlanWrapKeySchema = z.object({
|
|
298
357
|
type: z.literal('trusted-edge-plan-wrap-key'),
|
|
299
358
|
workspaceId: z.string().min(1).max(256),
|
|
@@ -303,15 +362,23 @@ export const TrustedEdgePlanWrapKeySchema = z.object({
|
|
|
303
362
|
bodyKeyGrants: TrustedEdgePlanDecryptSchema.shape.bodyKeyGrants,
|
|
304
363
|
recipients: z
|
|
305
364
|
.array(z.object({
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
365
|
+
recipient_type: z.union([z.literal('user_epoch'), z.literal('team_epoch')]),
|
|
366
|
+
recipient_epoch_id: z.string().min(1).max(256),
|
|
367
|
+
recipient_fingerprint: z.string().min(1).max(256),
|
|
368
|
+
encryption_public_key_jwk: z.record(z.string(), z.unknown()),
|
|
309
369
|
}))
|
|
310
370
|
.min(1)
|
|
311
371
|
.max(500),
|
|
312
372
|
capabilityToken: TrustedEdgePlanDecryptSchema.shape.capabilityToken,
|
|
313
373
|
requestId: z.string().max(MAX_REQUEST_ID_CHARS).optional(),
|
|
314
374
|
});
|
|
375
|
+
export const TrustedEdgeTeamEpochPublishSchema = z.object({
|
|
376
|
+
type: z.literal('trusted-edge-team-epoch-publish'),
|
|
377
|
+
workspaceId: z.string().min(1).max(256),
|
|
378
|
+
teamId: z.string().min(1).max(256),
|
|
379
|
+
capabilityToken: z.string().min(1).max(4096).optional(),
|
|
380
|
+
requestId: z.string().max(MAX_REQUEST_ID_CHARS).optional(),
|
|
381
|
+
});
|
|
315
382
|
// ---------------------------------------------------------------------------
|
|
316
383
|
// Discriminated union of all incoming messages
|
|
317
384
|
// ---------------------------------------------------------------------------
|
|
@@ -328,6 +395,8 @@ export const IncomingMessageSchema = z.discriminatedUnion('type', [
|
|
|
328
395
|
ListSessionsSchema,
|
|
329
396
|
ReadSessionMessagesSchema,
|
|
330
397
|
ContextCandidatePreviewSchema,
|
|
398
|
+
ContextResolveSchema,
|
|
399
|
+
ContextProposeSchema,
|
|
331
400
|
ResumeSchema,
|
|
332
401
|
WatchDiscoveredSessionSchema,
|
|
333
402
|
UnwatchDiscoveredSessionSchema,
|
|
@@ -339,9 +408,10 @@ export const IncomingMessageSchema = z.discriminatedUnion('type', [
|
|
|
339
408
|
WorkflowCancelRunSchema,
|
|
340
409
|
SuperviseSchema,
|
|
341
410
|
RespondHookPermissionSchema,
|
|
342
|
-
GetHookPlanDraftSchema,
|
|
343
411
|
TrustedEdgePlanDecryptSchema,
|
|
412
|
+
TrustedEdgePlanDecryptFieldSchema,
|
|
344
413
|
TrustedEdgePlanEncryptFieldSchema,
|
|
345
414
|
TrustedEdgePlanWrapKeySchema,
|
|
415
|
+
TrustedEdgeTeamEpochPublishSchema,
|
|
346
416
|
]);
|
|
347
417
|
//# sourceMappingURL=ws-protocol.js.map
|