@neta-art/cohub 8.20.1 → 8.21.0

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.
@@ -259,1475 +259,502 @@ type RuntimeArchivePage = {
259
259
  };
260
260
  declare function validateArchiveBoundary(index: HarnessArchiveIndex, parent: HarnessArchiveIndex | null): void;
261
261
  //#endregion
262
- //#region ../protocol/dist/runtime/context.d.ts
263
- type ContextProjectionOptions = {
264
- /** Provider recorded on projected assistant messages whose row has none. */
265
- fallbackProvider?: string | null;
266
- /** Resolve the wire api of a historical row from its own provider/model. */
267
- resolveApi?: (input: {
268
- provider: string | null;
269
- model: string | null;
270
- }) => string | null;
271
- };
272
- declare function selectRuntimeContextMessages(messages: RuntimeContextMessage[]): RuntimeContextMessage[];
262
+ //#region ../protocol/dist/app-authorization.d.ts
263
+ declare const appAuthorizationTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
264
+ kind: z.ZodLiteral<"account">;
265
+ }, z.core.$strip>, z.ZodObject<{
266
+ kind: z.ZodLiteral<"space">;
267
+ spaceId: z.ZodString;
268
+ }, z.core.$strip>, z.ZodObject<{
269
+ kind: z.ZodLiteral<"pick-space">;
270
+ }, z.core.$strip>], "kind">;
271
+ declare const appAuthorizationRequestSchema: z.ZodObject<{
272
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
273
+ kind: z.ZodLiteral<"account">;
274
+ }, z.core.$strip>, z.ZodObject<{
275
+ kind: z.ZodLiteral<"space">;
276
+ spaceId: z.ZodString;
277
+ }, z.core.$strip>, z.ZodObject<{
278
+ kind: z.ZodLiteral<"pick-space">;
279
+ }, z.core.$strip>], "kind">;
280
+ scopes: z.ZodArray<z.ZodString>;
281
+ reason: z.ZodOptional<z.ZodString>;
282
+ alwaysAsk: z.ZodOptional<z.ZodBoolean>;
283
+ fallback: z.ZodDefault<z.ZodEnum<{
284
+ allow: "allow";
285
+ none: "none";
286
+ }>>;
287
+ }, z.core.$strip>;
288
+ declare const appAuthorizationGrantSchema: z.ZodObject<{
289
+ id: z.ZodString;
290
+ spaceId: z.ZodString;
291
+ scopes: z.ZodArray<z.ZodString>;
292
+ expiresAt: z.ZodNullable<z.ZodString>;
293
+ }, z.core.$strip>;
294
+ declare const appAuthorizationResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
295
+ status: z.ZodLiteral<"granted">;
296
+ requestedTarget: z.ZodDiscriminatedUnion<[z.ZodObject<{
297
+ kind: z.ZodLiteral<"account">;
298
+ }, z.core.$strip>, z.ZodObject<{
299
+ kind: z.ZodLiteral<"space">;
300
+ spaceId: z.ZodString;
301
+ }, z.core.$strip>, z.ZodObject<{
302
+ kind: z.ZodLiteral<"pick-space">;
303
+ }, z.core.$strip>], "kind">;
304
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
305
+ kind: z.ZodLiteral<"account">;
306
+ }, z.core.$strip>, z.ZodObject<{
307
+ kind: z.ZodLiteral<"space">;
308
+ spaceId: z.ZodString;
309
+ name: z.ZodNullable<z.ZodString>;
310
+ }, z.core.$strip>], "kind">;
311
+ resolution: z.ZodEnum<{
312
+ fallback: "fallback";
313
+ requested: "requested";
314
+ selected: "selected";
315
+ }>;
316
+ grant: z.ZodObject<{
317
+ id: z.ZodString;
318
+ spaceId: z.ZodString;
319
+ scopes: z.ZodArray<z.ZodString>;
320
+ expiresAt: z.ZodNullable<z.ZodString>;
321
+ }, z.core.$strip>;
322
+ }, z.core.$strip>, z.ZodObject<{
323
+ status: z.ZodLiteral<"cancelled">;
324
+ }, z.core.$strip>, z.ZodObject<{
325
+ status: z.ZodLiteral<"denied">;
326
+ code: z.ZodString;
327
+ }, z.core.$strip>], "status">;
328
+ type AppAuthorizationTarget = z.infer<typeof appAuthorizationTargetSchema>;
329
+ type AppAuthorizationGrant = z.infer<typeof appAuthorizationGrantSchema>;
330
+ type AppAuthorizationResult = z.infer<typeof appAuthorizationResultSchema>;
331
+ type AppAuthorizationRequest = z.input<typeof appAuthorizationRequestSchema>;
332
+ //#endregion
333
+ //#region ../protocol/dist/billing.d.ts
273
334
  /**
274
- * Compile durable, normalized messages into Pi-compatible context without replaying tools.
275
- * Representable blocks and tool pairing are preserved verbatim; anything without a native
276
- * representation is dropped rather than described in prompt text.
335
+ * Standard billing payload attached under the `billing` key of any response
336
+ * or realtime event that involves a billing gate. Present on 402 error bodies
337
+ * (blocked / not entitled), on success responses carrying a soft debt warning,
338
+ * and on realtime error events. `conversion` always drives the shared upgrade
339
+ * UI; balance fields appear only for balance-based gates.
340
+ *
341
+ * `conversion` is intentionally `unknown` here to keep the protocol layer free
342
+ * of a billing dependency — clients validate it against `BillingConversionIntent`.
277
343
  */
278
- declare function contextToPiMessages(messages: RuntimeContextMessage[], options?: ContextProjectionOptions): Record<string, unknown>[];
279
- //#endregion
280
- //#region ../protocol/dist/runtime/index.d.ts
281
- declare const RUNTIME_PROTOCOL_VERSION: 1;
282
- declare const RUNTIME_MAX_FRAME_BYTES: number;
283
- declare const RUNTIME_RECOVERY_BATCH_SIZE = 64;
284
- declare const harnessSchema: z.ZodEnum<{
285
- codex: "codex";
286
- cohub: "cohub";
287
- pi: "pi";
288
- }>;
289
- type HarnessKind = z.infer<typeof harnessSchema>;
290
- type LocalHarness = Exclude<HarnessKind, "cohub">;
291
- declare const isLocalHarness: (value: unknown) => value is LocalHarness;
292
- declare const resolveHarness: (meta: unknown) => HarnessKind;
293
- type RuntimeContextMessage = {
294
- id: string;
295
- turnId: string;
296
- role: "user" | "assistant" | "system";
297
- content: ContentBlock[];
298
- provider?: string | null;
299
- model?: string | null;
300
- usage?: Usage | null;
301
- stopReason?: string | null;
302
- errorMessage?: string | null;
303
- meta?: Record<string, unknown> | null;
344
+ type BillingPayload = {
345
+ conversion: unknown;
346
+ status?: "blocked" | "allowed_with_debt";
347
+ netUsd?: number;
348
+ hardNegativeLimitUsd?: number;
349
+ minimumBalanceUsd?: number;
304
350
  };
305
- type RuntimeContext = {
306
- complete?: boolean;
307
- revision: string;
308
- throughTurnId: string | null;
309
- messages: RuntimeContextMessage[];
310
- archive?: HarnessArchive | null;
311
- resolvedTurnIds?: string[];
312
- settledTurnIds?: string[];
351
+ //#endregion
352
+ //#region ../protocol/dist/board-constants.d.ts
353
+ type BoardCoordinateSpace = "world" | "frame-local" | "world-offset" | "screen" | "screen-offset" | "normalized";
354
+ type BoardRenderCost = {
355
+ particles: number;
356
+ vertices: number;
357
+ dynamicVertices: number;
358
+ drawCalls: number;
359
+ filterPasses: number;
360
+ renderTexturePixels: number;
361
+ textureBytes: number;
362
+ bufferBytes: number;
363
+ simulationSteps: number;
313
364
  };
314
- /** Trace identifiers carried to a local Runtime without carrying credentials. */
315
- type RuntimeTraceContext = {
316
- requestId?: string;
317
- traceId?: string | null;
318
- spanId?: string | null;
319
- traceparent?: string | null;
365
+ type BoardCapability = {
366
+ kind: "preset" | "clip" | "effect" | "shader";
367
+ id: string;
368
+ version: number;
369
+ digest?: string;
370
+ renderers?: Array<"webgpu" | "webgl">;
371
+ fallbackId?: string;
372
+ schema?: Record<string, unknown>;
320
373
  };
321
- declare const runtimeCapabilitiesSchema: z.ZodObject<{
322
- harnesses: z.ZodArray<z.ZodEnum<{
323
- codex: "codex";
324
- pi: "pi";
374
+ //#endregion
375
+ //#region ../protocol/dist/board-connection.d.ts
376
+ declare const BoardConnectionSchema: z.ZodObject<{
377
+ id: z.ZodString;
378
+ source: z.ZodObject<{
379
+ itemId: z.ZodString;
380
+ portId: z.ZodOptional<z.ZodString>;
381
+ anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
382
+ kind: z.ZodLiteral<"auto">;
383
+ }, z.core.$strip>, z.ZodObject<{
384
+ kind: z.ZodLiteral<"side">;
385
+ side: z.ZodEnum<{
386
+ bottom: "bottom";
387
+ left: "left";
388
+ right: "right";
389
+ top: "top";
390
+ }>;
391
+ offset: z.ZodDefault<z.ZodNumber>;
392
+ }, z.core.$strip>, z.ZodObject<{
393
+ kind: z.ZodLiteral<"fixed">;
394
+ nx: z.ZodNumber;
395
+ ny: z.ZodNumber;
396
+ }, z.core.$strip>]>>;
397
+ }, z.core.$strip>;
398
+ target: z.ZodObject<{
399
+ itemId: z.ZodString;
400
+ portId: z.ZodOptional<z.ZodString>;
401
+ anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
402
+ kind: z.ZodLiteral<"auto">;
403
+ }, z.core.$strip>, z.ZodObject<{
404
+ kind: z.ZodLiteral<"side">;
405
+ side: z.ZodEnum<{
406
+ bottom: "bottom";
407
+ left: "left";
408
+ right: "right";
409
+ top: "top";
410
+ }>;
411
+ offset: z.ZodDefault<z.ZodNumber>;
412
+ }, z.core.$strip>, z.ZodObject<{
413
+ kind: z.ZodLiteral<"fixed">;
414
+ nx: z.ZodNumber;
415
+ ny: z.ZodNumber;
416
+ }, z.core.$strip>]>>;
417
+ }, z.core.$strip>;
418
+ relation: z.ZodDefault<z.ZodString>;
419
+ direction: z.ZodDefault<z.ZodEnum<{
420
+ backward: "backward";
421
+ both: "both";
422
+ forward: "forward";
423
+ none: "none";
325
424
  }>>;
326
- models: z.ZodArray<z.ZodObject<{
327
- harness: z.ZodEnum<{
328
- codex: "codex";
329
- pi: "pi";
330
- }>;
331
- provider: z.ZodString;
332
- id: z.ZodString;
333
- name: z.ZodString;
425
+ label: z.ZodDefault<z.ZodString>;
426
+ routing: z.ZodDefault<z.ZodObject<{
427
+ kind: z.ZodDefault<z.ZodEnum<{
428
+ curve: "curve";
429
+ orthogonal: "orthogonal";
430
+ straight: "straight";
431
+ }>>;
432
+ bend: z.ZodDefault<z.ZodNumber>;
433
+ waypoints: z.ZodDefault<z.ZodArray<z.ZodObject<{
434
+ x: z.ZodNumber;
435
+ y: z.ZodNumber;
436
+ }, z.core.$strip>>>;
334
437
  }, z.core.$strip>>;
335
- }, z.core.$strip>;
336
- type RuntimeCapabilities = z.infer<typeof runtimeCapabilitiesSchema>;
337
- declare const runtimePendingExecutionSchema: z.ZodObject<{
338
- sessionId: z.ZodString;
339
- turnId: z.ZodString;
340
- harness: z.ZodEnum<{
341
- codex: "codex";
342
- pi: "pi";
343
- }>;
438
+ style: z.ZodDefault<z.ZodObject<{
439
+ color: z.ZodDefault<z.ZodString>;
440
+ size: z.ZodDefault<z.ZodNumber>;
441
+ line: z.ZodDefault<z.ZodEnum<{
442
+ dashed: "dashed";
443
+ solid: "solid";
444
+ }>>;
445
+ }, z.core.$strip>>;
446
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
344
447
  }, z.core.$strict>;
345
- type RuntimePendingExecution = z.infer<typeof runtimePendingExecutionSchema>;
346
- declare const runtimeReadySchema: z.ZodObject<{
347
- type: z.ZodLiteral<"runtime.ready">;
348
- connectionId: z.ZodString;
349
- }, z.core.$strip>;
350
- declare const fileWatcherStatusSchema: z.ZodObject<{
351
- backend: z.ZodEnum<{
352
- fsevents: "fsevents";
353
- fsnotify: "fsnotify";
448
+ type BoardConnection = z.infer<typeof BoardConnectionSchema>;
449
+ /** Server-owned fields, mirroring how nodes carry a board id and revision. */
450
+ type BoardConnectionRecord = BoardConnection & {
451
+ boardId: string;
452
+ revision: number;
453
+ createdAt: string | null;
454
+ updatedAt: string | null;
455
+ };
456
+ /** The client-authored form of a connection (no server-owned fields). */
457
+ type BoardConnectionInput = BoardConnection;
458
+ /**
459
+ * A patch to an existing connection.
460
+ *
461
+ * `id` is excluded: a connection's identity never changes, and re-pointing both
462
+ * endpoints is an edit of the same relation, not a new one.
463
+ */
464
+ declare const BoardConnectionPatchSchema: z.ZodObject<{
465
+ source: z.ZodOptional<z.ZodObject<{
466
+ itemId: z.ZodString;
467
+ portId: z.ZodOptional<z.ZodString>;
468
+ anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
469
+ kind: z.ZodLiteral<"auto">;
470
+ }, z.core.$strip>, z.ZodObject<{
471
+ kind: z.ZodLiteral<"side">;
472
+ side: z.ZodEnum<{
473
+ bottom: "bottom";
474
+ left: "left";
475
+ right: "right";
476
+ top: "top";
477
+ }>;
478
+ offset: z.ZodDefault<z.ZodNumber>;
479
+ }, z.core.$strip>, z.ZodObject<{
480
+ kind: z.ZodLiteral<"fixed">;
481
+ nx: z.ZodNumber;
482
+ ny: z.ZodNumber;
483
+ }, z.core.$strip>]>>;
484
+ }, z.core.$strip>>;
485
+ target: z.ZodOptional<z.ZodObject<{
486
+ itemId: z.ZodString;
487
+ portId: z.ZodOptional<z.ZodString>;
488
+ anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
489
+ kind: z.ZodLiteral<"auto">;
490
+ }, z.core.$strip>, z.ZodObject<{
491
+ kind: z.ZodLiteral<"side">;
492
+ side: z.ZodEnum<{
493
+ bottom: "bottom";
494
+ left: "left";
495
+ right: "right";
496
+ top: "top";
497
+ }>;
498
+ offset: z.ZodDefault<z.ZodNumber>;
499
+ }, z.core.$strip>, z.ZodObject<{
500
+ kind: z.ZodLiteral<"fixed">;
501
+ nx: z.ZodNumber;
502
+ ny: z.ZodNumber;
503
+ }, z.core.$strip>]>>;
504
+ }, z.core.$strip>>;
505
+ relation: z.ZodOptional<z.ZodDefault<z.ZodString>>;
506
+ direction: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
507
+ backward: "backward";
508
+ both: "both";
509
+ forward: "forward";
354
510
  none: "none";
355
- scan: "scan";
356
- }>;
357
- state: z.ZodEnum<{
358
- degraded: "degraded";
359
- running: "running";
360
- unavailable: "unavailable";
361
- }>;
362
- reason: z.ZodOptional<z.ZodEnum<{
363
- coverage_incomplete: "coverage_incomplete";
364
- polling: "polling";
365
- root_changed: "root_changed";
366
- start_failed: "start_failed";
367
- watch_error: "watch_error";
511
+ }>>>;
512
+ label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
513
+ routing: z.ZodOptional<z.ZodDefault<z.ZodObject<{
514
+ kind: z.ZodDefault<z.ZodEnum<{
515
+ curve: "curve";
516
+ orthogonal: "orthogonal";
517
+ straight: "straight";
518
+ }>>;
519
+ bend: z.ZodDefault<z.ZodNumber>;
520
+ waypoints: z.ZodDefault<z.ZodArray<z.ZodObject<{
521
+ x: z.ZodNumber;
522
+ y: z.ZodNumber;
523
+ }, z.core.$strip>>>;
524
+ }, z.core.$strip>>>;
525
+ style: z.ZodOptional<z.ZodDefault<z.ZodObject<{
526
+ color: z.ZodDefault<z.ZodString>;
527
+ size: z.ZodDefault<z.ZodNumber>;
528
+ line: z.ZodDefault<z.ZodEnum<{
529
+ dashed: "dashed";
530
+ solid: "solid";
531
+ }>>;
532
+ }, z.core.$strip>>>;
533
+ metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
534
+ }, z.core.$strict>;
535
+ type BoardConnectionPatch = z.infer<typeof BoardConnectionPatchSchema>;
536
+ //#endregion
537
+ //#region ../protocol/dist/board-composition.d.ts
538
+ declare const BoardEasingSchema: z.ZodEnum<{
539
+ "ease-in-cubic": "ease-in-cubic";
540
+ "ease-in-out-cubic": "ease-in-out-cubic";
541
+ "ease-in-out-quad": "ease-in-out-quad";
542
+ "ease-in-quad": "ease-in-quad";
543
+ "ease-out-cubic": "ease-out-cubic";
544
+ "ease-out-expo": "ease-out-expo";
545
+ "ease-out-quad": "ease-out-quad";
546
+ "ease-out-quart": "ease-out-quart";
547
+ linear: "linear";
548
+ }>;
549
+ type BoardEasing = z.infer<typeof BoardEasingSchema>;
550
+ declare const BoardAnimationTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
551
+ type: z.ZodLiteral<"item">;
552
+ itemId: z.ZodString;
553
+ }, z.core.$strict>, z.ZodObject<{
554
+ type: z.ZodLiteral<"effect">;
555
+ effectId: z.ZodString;
556
+ }, z.core.$strict>, z.ZodObject<{
557
+ type: z.ZodLiteral<"camera">;
558
+ }, z.core.$strict>, z.ZodObject<{
559
+ type: z.ZodLiteral<"board">;
560
+ }, z.core.$strict>], "type">;
561
+ type BoardAnimationTarget = z.infer<typeof BoardAnimationTargetSchema>;
562
+ type BoardTrackInterpolation = "linear" | "step";
563
+ declare const BoardTrackSchema: z.ZodObject<{
564
+ id: z.ZodString;
565
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
566
+ type: z.ZodLiteral<"item">;
567
+ itemId: z.ZodString;
568
+ }, z.core.$strict>, z.ZodObject<{
569
+ type: z.ZodLiteral<"effect">;
570
+ effectId: z.ZodString;
571
+ }, z.core.$strict>, z.ZodObject<{
572
+ type: z.ZodLiteral<"camera">;
573
+ }, z.core.$strict>, z.ZodObject<{
574
+ type: z.ZodLiteral<"board">;
575
+ }, z.core.$strict>], "type">;
576
+ channel: z.ZodString;
577
+ channelVersion: z.ZodDefault<z.ZodNumber>;
578
+ interpolation: z.ZodDefault<z.ZodEnum<{
579
+ linear: "linear";
580
+ step: "step";
368
581
  }>>;
369
- observedAt: z.ZodISODateTime;
370
- }, z.core.$strip>;
371
- type RuntimeStatus = {
372
- kind: "cloud" | "local";
373
- online: boolean;
374
- runtimeId?: string | null;
375
- capabilities: RuntimeCapabilities | null;
376
- fileWatcher: z.infer<typeof fileWatcherStatusSchema> | null;
377
- };
378
- type RuntimeSessionRecoveryStatus = {
379
- pending: boolean;
380
- revision: string;
381
- turnId: string | null;
382
- harness: LocalHarness | null;
383
- canManage: boolean;
384
- };
385
- declare const runtimeStopConfirmationSchema: z.ZodObject<{
386
- expectedTurnId: z.ZodString;
387
- revision: z.ZodString;
388
- confirmed: z.ZodLiteral<true>;
582
+ fill: z.ZodDefault<z.ZodEnum<{
583
+ backwards: "backwards";
584
+ both: "both";
585
+ forwards: "forwards";
586
+ none: "none";
587
+ }>>;
588
+ keyframes: z.ZodArray<z.ZodObject<{
589
+ time: z.ZodNumber;
590
+ value: z.ZodUnknown;
591
+ easing: z.ZodOptional<z.ZodEnum<{
592
+ "ease-in-cubic": "ease-in-cubic";
593
+ "ease-in-out-cubic": "ease-in-out-cubic";
594
+ "ease-in-out-quad": "ease-in-out-quad";
595
+ "ease-in-quad": "ease-in-quad";
596
+ "ease-out-cubic": "ease-out-cubic";
597
+ "ease-out-expo": "ease-out-expo";
598
+ "ease-out-quad": "ease-out-quad";
599
+ "ease-out-quart": "ease-out-quart";
600
+ linear: "linear";
601
+ }>>;
602
+ }, z.core.$strict>>;
603
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
389
604
  }, z.core.$strict>;
390
- type RuntimeStopConfirmation = z.infer<typeof runtimeStopConfirmationSchema>;
391
- type RuntimeTurnUserMessage = {
392
- turnId: string;
393
- userMessageId: string;
394
- userId: string | null;
395
- content: ContentBlock[];
396
- };
397
- type RuntimeTurnInput = {
398
- spaceId: string;
399
- sessionId: string;
400
- turnId: string;
401
- userMessageId: string;
402
- harness: LocalHarness;
403
- /** Ordered claim inputs. The final message owns execution, streaming and archival. */
404
- messages: RuntimeTurnUserMessage[];
405
- context: RuntimeContext;
406
- provider?: string | null;
407
- model?: string | null;
408
- thinkingLevel?: string | null;
409
- requestId?: string | null;
410
- traceContext?: RuntimeTraceContext;
411
- accessMode: "read_only" | "full_access";
412
- };
413
- type RuntimeMessage = {
414
- ordinal: number;
415
- content: ContentBlock[];
416
- provider?: string | null;
417
- model?: string | null;
418
- usage?: Usage | null;
419
- stopReason?: string | null;
420
- errorMessage?: string | null;
421
- };
422
- type RuntimeExecutionEvent = {
423
- type: "message.start";
424
- ordinal: number;
425
- } | {
426
- type: "text.delta";
427
- ordinal: number;
428
- index: number;
429
- kind: "text" | "thinking";
430
- delta: string;
431
- } | {
432
- type: "content.replace";
433
- ordinal: number;
434
- content: ContentBlock[];
435
- } | {
436
- type: "message.commit";
437
- message: RuntimeMessage;
438
- } | {
439
- type: "turn.end";
440
- message: RuntimeMessage;
441
- archive?: HarnessArchive | null;
442
- resume: "native" | "restored" | "handoff" | "new";
443
- } | {
444
- type: "context.required";
445
- pendingTurnIds?: string[];
446
- } | {
447
- type: "turn.acknowledged";
448
- } | {
449
- type: "turn.error";
450
- message: string;
451
- uncertain?: boolean;
452
- };
453
- declare const runtimeEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
454
- type: z.ZodLiteral<"message.start">;
455
- ordinal: z.ZodNumber;
456
- }, z.core.$strip>, z.ZodObject<{
457
- type: z.ZodLiteral<"text.delta">;
458
- ordinal: z.ZodNumber;
459
- index: z.ZodNumber;
460
- kind: z.ZodEnum<{
461
- text: "text";
462
- thinking: "thinking";
463
- }>;
464
- delta: z.ZodString;
465
- }, z.core.$strip>, z.ZodObject<{
466
- type: z.ZodLiteral<"content.replace">;
467
- ordinal: z.ZodNumber;
468
- content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
469
- }, z.core.$strip>, z.ZodObject<{
470
- type: z.ZodLiteral<"message.commit">;
471
- message: z.ZodObject<{
472
- ordinal: z.ZodNumber;
473
- content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
474
- provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
475
- model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
476
- usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
477
- input: z.ZodOptional<z.ZodNumber>;
478
- output: z.ZodOptional<z.ZodNumber>;
479
- cacheRead: z.ZodOptional<z.ZodNumber>;
480
- cacheWrite: z.ZodOptional<z.ZodNumber>;
481
- totalTokens: z.ZodOptional<z.ZodNumber>;
482
- cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
483
- input: z.ZodOptional<z.ZodNumber>;
484
- output: z.ZodOptional<z.ZodNumber>;
485
- cacheRead: z.ZodOptional<z.ZodNumber>;
486
- cacheWrite: z.ZodOptional<z.ZodNumber>;
487
- total: z.ZodOptional<z.ZodNumber>;
488
- }, z.core.$strip>>>;
489
- }, z.core.$strip>>>;
490
- stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
491
- errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
492
- }, z.core.$strip>;
493
- }, z.core.$strip>, z.ZodObject<{
494
- type: z.ZodLiteral<"turn.end">;
495
- message: z.ZodObject<{
496
- ordinal: z.ZodNumber;
497
- content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
498
- provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
499
- model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
500
- usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
501
- input: z.ZodOptional<z.ZodNumber>;
502
- output: z.ZodOptional<z.ZodNumber>;
503
- cacheRead: z.ZodOptional<z.ZodNumber>;
504
- cacheWrite: z.ZodOptional<z.ZodNumber>;
505
- totalTokens: z.ZodOptional<z.ZodNumber>;
506
- cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
507
- input: z.ZodOptional<z.ZodNumber>;
508
- output: z.ZodOptional<z.ZodNumber>;
509
- cacheRead: z.ZodOptional<z.ZodNumber>;
510
- cacheWrite: z.ZodOptional<z.ZodNumber>;
511
- total: z.ZodOptional<z.ZodNumber>;
512
- }, z.core.$strip>>>;
513
- }, z.core.$strip>>>;
514
- stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
515
- errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
516
- }, z.core.$strip>;
517
- archive: z.ZodOptional<z.ZodNullable<z.ZodObject<{
518
- sessionId: z.ZodString;
519
- turnId: z.ZodString;
520
- harness: z.ZodEnum<{
521
- codex: "codex";
522
- pi: "pi";
605
+ type BoardTrack = z.infer<typeof BoardTrackSchema>;
606
+ declare const BoardProceduralClipSchema: z.ZodObject<{
607
+ id: z.ZodString;
608
+ kind: z.ZodString;
609
+ kindVersion: z.ZodNumber;
610
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
611
+ type: z.ZodLiteral<"item">;
612
+ itemId: z.ZodString;
613
+ }, z.core.$strict>, z.ZodObject<{
614
+ type: z.ZodLiteral<"effect">;
615
+ effectId: z.ZodString;
616
+ }, z.core.$strict>, z.ZodObject<{
617
+ type: z.ZodLiteral<"camera">;
618
+ }, z.core.$strict>, z.ZodObject<{
619
+ type: z.ZodLiteral<"board">;
620
+ }, z.core.$strict>], "type">;
621
+ start: z.ZodNumber;
622
+ duration: z.ZodNumber;
623
+ layer: z.ZodDefault<z.ZodEnum<{
624
+ behind: "behind";
625
+ content: "content";
626
+ front: "front";
627
+ screen: "screen";
628
+ }>>;
629
+ fill: z.ZodDefault<z.ZodEnum<{
630
+ backwards: "backwards";
631
+ both: "both";
632
+ forwards: "forwards";
633
+ none: "none";
634
+ }>>;
635
+ easing: z.ZodDefault<z.ZodEnum<{
636
+ "ease-in-cubic": "ease-in-cubic";
637
+ "ease-in-out-cubic": "ease-in-out-cubic";
638
+ "ease-in-out-quad": "ease-in-out-quad";
639
+ "ease-in-quad": "ease-in-quad";
640
+ "ease-out-cubic": "ease-out-cubic";
641
+ "ease-out-expo": "ease-out-expo";
642
+ "ease-out-quad": "ease-out-quad";
643
+ "ease-out-quart": "ease-out-quart";
644
+ linear: "linear";
645
+ }>>;
646
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
647
+ assetRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
648
+ type: z.ZodEnum<{
649
+ extension: "extension";
650
+ "space-file": "space-file";
523
651
  }>;
652
+ ref: z.ZodString;
653
+ digest: z.ZodOptional<z.ZodString>;
524
654
  }, z.core.$strict>>>;
525
- resume: z.ZodEnum<{
526
- handoff: "handoff";
527
- native: "native";
528
- new: "new";
529
- restored: "restored";
530
- }>;
531
- }, z.core.$strip>, z.ZodObject<{
532
- type: z.ZodLiteral<"context.required">;
533
- pendingTurnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
534
- }, z.core.$strip>, z.ZodObject<{
535
- type: z.ZodLiteral<"turn.acknowledged">;
536
- }, z.core.$strip>, z.ZodObject<{
537
- type: z.ZodLiteral<"turn.error">;
538
- message: z.ZodString;
539
- uncertain: z.ZodOptional<z.ZodBoolean>;
540
- }, z.core.$strip>], "type">;
541
- declare const runtimeCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
542
- type: z.ZodLiteral<"turn.recover">;
543
- requestId: z.ZodString;
544
- execution: z.ZodObject<{
545
- spaceId: z.ZodString;
546
- sessionId: z.ZodString;
547
- turnId: z.ZodString;
548
- harness: z.ZodEnum<{
549
- codex: "codex";
550
- pi: "pi";
551
- }>;
552
- }, z.core.$strip>;
553
- traceContext: z.ZodOptional<z.ZodObject<{
554
- requestId: z.ZodOptional<z.ZodString>;
555
- traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
556
- spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
557
- traceparent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
558
- }, z.core.$strict>>;
559
- }, z.core.$strip>, z.ZodObject<{
560
- type: z.ZodLiteral<"turn.start">;
561
- requestId: z.ZodString;
562
- resumeOnly: z.ZodOptional<z.ZodBoolean>;
563
- input: z.ZodObject<{
564
- spaceId: z.ZodString;
565
- sessionId: z.ZodString;
566
- turnId: z.ZodString;
567
- userMessageId: z.ZodString;
568
- harness: z.ZodEnum<{
569
- codex: "codex";
570
- pi: "pi";
571
- }>;
572
- messages: z.ZodArray<z.ZodObject<{
573
- turnId: z.ZodString;
574
- userMessageId: z.ZodString;
575
- userId: z.ZodNullable<z.ZodString>;
576
- content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
577
- }, z.core.$strip>>;
578
- context: z.ZodObject<{
579
- complete: z.ZodOptional<z.ZodBoolean>;
580
- revision: z.ZodString;
581
- throughTurnId: z.ZodNullable<z.ZodString>;
582
- messages: z.ZodArray<z.ZodObject<{
583
- id: z.ZodString;
584
- turnId: z.ZodString;
585
- role: z.ZodEnum<{
586
- assistant: "assistant";
587
- system: "system";
588
- user: "user";
589
- }>;
590
- content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
591
- provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
592
- model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
593
- usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
594
- input: z.ZodOptional<z.ZodNumber>;
595
- output: z.ZodOptional<z.ZodNumber>;
596
- cacheRead: z.ZodOptional<z.ZodNumber>;
597
- cacheWrite: z.ZodOptional<z.ZodNumber>;
598
- totalTokens: z.ZodOptional<z.ZodNumber>;
599
- cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
600
- input: z.ZodOptional<z.ZodNumber>;
601
- output: z.ZodOptional<z.ZodNumber>;
602
- cacheRead: z.ZodOptional<z.ZodNumber>;
603
- cacheWrite: z.ZodOptional<z.ZodNumber>;
604
- total: z.ZodOptional<z.ZodNumber>;
605
- }, z.core.$strip>>>;
606
- }, z.core.$strip>>>;
607
- stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
608
- errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
609
- meta: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
610
- }, z.core.$strip>>;
611
- archive: z.ZodOptional<z.ZodNullable<z.ZodObject<{
612
- sessionId: z.ZodString;
613
- turnId: z.ZodString;
614
- harness: z.ZodEnum<{
615
- codex: "codex";
616
- pi: "pi";
617
- }>;
618
- }, z.core.$strict>>>;
619
- resolvedTurnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
620
- settledTurnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
621
- }, z.core.$strip>;
622
- provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
623
- model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
624
- thinkingLevel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
625
- requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
626
- traceContext: z.ZodOptional<z.ZodObject<{
627
- requestId: z.ZodOptional<z.ZodString>;
628
- traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
629
- spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
630
- traceparent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
631
- }, z.core.$strict>>;
632
- accessMode: z.ZodEnum<{
633
- full_access: "full_access";
634
- read_only: "read_only";
635
- }>;
636
- }, z.core.$strip>;
637
- }, z.core.$strip>, z.ZodObject<{
638
- type: z.ZodLiteral<"session.context">;
639
- requestId: z.ZodString;
640
- context: z.ZodObject<{
641
- complete: z.ZodOptional<z.ZodBoolean>;
642
- revision: z.ZodString;
643
- throughTurnId: z.ZodNullable<z.ZodString>;
644
- messages: z.ZodArray<z.ZodObject<{
645
- id: z.ZodString;
646
- turnId: z.ZodString;
647
- role: z.ZodEnum<{
648
- assistant: "assistant";
649
- system: "system";
650
- user: "user";
651
- }>;
652
- content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
653
- provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
654
- model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
655
- usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
656
- input: z.ZodOptional<z.ZodNumber>;
657
- output: z.ZodOptional<z.ZodNumber>;
658
- cacheRead: z.ZodOptional<z.ZodNumber>;
659
- cacheWrite: z.ZodOptional<z.ZodNumber>;
660
- totalTokens: z.ZodOptional<z.ZodNumber>;
661
- cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
662
- input: z.ZodOptional<z.ZodNumber>;
663
- output: z.ZodOptional<z.ZodNumber>;
664
- cacheRead: z.ZodOptional<z.ZodNumber>;
665
- cacheWrite: z.ZodOptional<z.ZodNumber>;
666
- total: z.ZodOptional<z.ZodNumber>;
667
- }, z.core.$strip>>>;
668
- }, z.core.$strip>>>;
669
- stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
670
- errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
671
- meta: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
672
- }, z.core.$strip>>;
673
- archive: z.ZodOptional<z.ZodNullable<z.ZodObject<{
674
- sessionId: z.ZodString;
675
- turnId: z.ZodString;
676
- harness: z.ZodEnum<{
677
- codex: "codex";
678
- pi: "pi";
655
+ seed: z.ZodString;
656
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
657
+ }, z.core.$strict>;
658
+ type BoardProceduralClip = z.infer<typeof BoardProceduralClipSchema>;
659
+ declare const BoardTimelineMarkerSchema: z.ZodObject<{
660
+ id: z.ZodString;
661
+ time: z.ZodNumber;
662
+ duration: z.ZodOptional<z.ZodNumber>;
663
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
664
+ }, z.core.$strict>;
665
+ type BoardTimelineMarker = z.infer<typeof BoardTimelineMarkerSchema>;
666
+ declare const BoardTimelineSchema: z.ZodObject<{
667
+ duration: z.ZodNumber;
668
+ tracks: z.ZodDefault<z.ZodArray<z.ZodObject<{
669
+ id: z.ZodString;
670
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
671
+ type: z.ZodLiteral<"item">;
672
+ itemId: z.ZodString;
673
+ }, z.core.$strict>, z.ZodObject<{
674
+ type: z.ZodLiteral<"effect">;
675
+ effectId: z.ZodString;
676
+ }, z.core.$strict>, z.ZodObject<{
677
+ type: z.ZodLiteral<"camera">;
678
+ }, z.core.$strict>, z.ZodObject<{
679
+ type: z.ZodLiteral<"board">;
680
+ }, z.core.$strict>], "type">;
681
+ channel: z.ZodString;
682
+ channelVersion: z.ZodDefault<z.ZodNumber>;
683
+ interpolation: z.ZodDefault<z.ZodEnum<{
684
+ linear: "linear";
685
+ step: "step";
686
+ }>>;
687
+ fill: z.ZodDefault<z.ZodEnum<{
688
+ backwards: "backwards";
689
+ both: "both";
690
+ forwards: "forwards";
691
+ none: "none";
692
+ }>>;
693
+ keyframes: z.ZodArray<z.ZodObject<{
694
+ time: z.ZodNumber;
695
+ value: z.ZodUnknown;
696
+ easing: z.ZodOptional<z.ZodEnum<{
697
+ "ease-in-cubic": "ease-in-cubic";
698
+ "ease-in-out-cubic": "ease-in-out-cubic";
699
+ "ease-in-out-quad": "ease-in-out-quad";
700
+ "ease-in-quad": "ease-in-quad";
701
+ "ease-out-cubic": "ease-out-cubic";
702
+ "ease-out-expo": "ease-out-expo";
703
+ "ease-out-quad": "ease-out-quad";
704
+ "ease-out-quart": "ease-out-quart";
705
+ linear: "linear";
706
+ }>>;
707
+ }, z.core.$strict>>;
708
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
709
+ }, z.core.$strict>>>;
710
+ clips: z.ZodDefault<z.ZodArray<z.ZodObject<{
711
+ id: z.ZodString;
712
+ kind: z.ZodString;
713
+ kindVersion: z.ZodNumber;
714
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
715
+ type: z.ZodLiteral<"item">;
716
+ itemId: z.ZodString;
717
+ }, z.core.$strict>, z.ZodObject<{
718
+ type: z.ZodLiteral<"effect">;
719
+ effectId: z.ZodString;
720
+ }, z.core.$strict>, z.ZodObject<{
721
+ type: z.ZodLiteral<"camera">;
722
+ }, z.core.$strict>, z.ZodObject<{
723
+ type: z.ZodLiteral<"board">;
724
+ }, z.core.$strict>], "type">;
725
+ start: z.ZodNumber;
726
+ duration: z.ZodNumber;
727
+ layer: z.ZodDefault<z.ZodEnum<{
728
+ behind: "behind";
729
+ content: "content";
730
+ front: "front";
731
+ screen: "screen";
732
+ }>>;
733
+ fill: z.ZodDefault<z.ZodEnum<{
734
+ backwards: "backwards";
735
+ both: "both";
736
+ forwards: "forwards";
737
+ none: "none";
738
+ }>>;
739
+ easing: z.ZodDefault<z.ZodEnum<{
740
+ "ease-in-cubic": "ease-in-cubic";
741
+ "ease-in-out-cubic": "ease-in-out-cubic";
742
+ "ease-in-out-quad": "ease-in-out-quad";
743
+ "ease-in-quad": "ease-in-quad";
744
+ "ease-out-cubic": "ease-out-cubic";
745
+ "ease-out-expo": "ease-out-expo";
746
+ "ease-out-quad": "ease-out-quad";
747
+ "ease-out-quart": "ease-out-quart";
748
+ linear: "linear";
749
+ }>>;
750
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
751
+ assetRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
752
+ type: z.ZodEnum<{
753
+ extension: "extension";
754
+ "space-file": "space-file";
679
755
  }>;
680
- }, z.core.$strict>>>;
681
- resolvedTurnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
682
- settledTurnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
683
- }, z.core.$strip>;
684
- }, z.core.$strip>, z.ZodObject<{
685
- type: z.ZodLiteral<"turn.abort">;
686
- requestId: z.ZodString;
687
- }, z.core.$strip>, z.ZodObject<{
688
- type: z.ZodLiteral<"turn.ack">;
689
- requestId: z.ZodString;
690
- revision: z.ZodString;
691
- turnId: z.ZodString;
692
- }, z.core.$strip>], "type">;
693
- type RuntimeCommand = z.infer<typeof runtimeCommandSchema>;
694
- //#endregion
695
- //#region ../protocol/dist/model/turn.d.ts
696
- type SessionTurnStatus = "queued" | "running" | "abort_requested" | "completed" | "failed" | "interrupted" | "merged" | "cancelled";
697
- type SessionTurnIntent = "steer" | "followup" | "compact";
698
- type SessionTurnExecutionKind = "agent" | "direct_generation";
699
- type SessionTurnSummary = {
700
- text?: string | null;
701
- finishReason?: "completed" | "failed" | "interrupted" | "merged" | "cancelled";
702
- reason?: "steer" | "abort" | "merge" | string;
703
- continuedByTurnId?: string | null;
704
- interruptedByTurnId?: string | null;
705
- mergedIntoTurnId?: string | null;
706
- };
707
- type SessionTurnIntermediateIndex = {
708
- version: 1;
709
- messagesObjectKey: string | null;
710
- messagesSizeBytes?: number | null;
711
- toolCallsBaseObjectKey?: string | null;
712
- };
713
- type SessionTurnCompactionSummary = {
714
- count: number;
715
- summarizedMessageCountTotal: number;
716
- attemptCountTotal: number;
717
- usage: Usage | null;
718
- durationMsTotal: number | null;
719
- last: {
720
- compactionId: string;
721
- tokensBefore: number;
722
- estimatedTokensAfter: number | null;
723
- compactedAt: string;
724
- } | null;
725
- };
726
- type ImageToTextUsageSummary = {
727
- callCount: number;
728
- successCount: number;
729
- errorCount: number;
730
- sourceCount: number;
731
- usage: Usage | null;
732
- };
733
- type SessionTurnIntermediateSummary = {
734
- messageCount: number;
735
- toolCallCount: number;
736
- usage?: Usage | null;
737
- durationMs?: number | null;
738
- lastMessageText?: string | null;
739
- hasError?: boolean;
740
- compaction?: SessionTurnCompactionSummary | null;
741
- imageToText?: ImageToTextUsageSummary | null;
742
- };
743
- type StoredIntermediateMessage = {
744
- id: string;
745
- sessionId: string;
746
- sequence?: number | null;
747
- role: "user" | "assistant" | "system";
748
- content: ContentBlock[];
749
- text: string | null;
750
- provider: string | null;
751
- model: string | null;
752
- stopReason: string | null;
753
- errorMessage: string | null;
754
- usage: Usage | null;
755
- durationMs: number | null;
756
- toolCallsObjectKey: string | null;
757
- meta: Record<string, unknown> | null;
758
- createdAt: string;
759
- };
760
- type StoredToolCall = {
761
- id: string;
762
- name: string;
763
- input: Record<string, unknown>;
764
- meta: Record<string, unknown> | null;
765
- result: {
766
- content: string | ContentBlock[] | null;
767
- isError: boolean;
768
- meta: Record<string, unknown> | null;
769
- } | null;
770
- };
771
- type MessageToolCallsFile = {
772
- version: 1;
773
- spaceId: string;
774
- sessionId: string;
775
- turnId: string;
776
- messageId: string;
777
- toolCalls: StoredToolCall[];
778
- };
779
- type TurnIntermediateMessagesFile = {
780
- version: 1;
781
- spaceId: string;
782
- sessionId: string;
783
- turnId: string;
784
- summary: SessionTurnIntermediateSummary;
785
- messages: StoredIntermediateMessage[];
786
- };
787
- type SessionTurnAuthorProfile = {
788
- userUuid: string;
789
- username?: string | null;
790
- displayName: string;
791
- avatarUrl: string | null;
792
- };
793
- type SessionTurnIndexItem = {
794
- id: string;
795
- sessionId: string;
796
- sourceSessionId?: string;
797
- sourceTurnId?: string;
798
- sequence: number;
799
- status: SessionTurnStatus;
800
- executionKind?: SessionTurnExecutionKind;
801
- /** Present on current turn index payloads; older caches may omit it. */
802
- intent?: SessionTurnIntent;
803
- userUuid?: string | null;
804
- authorProfile?: SessionTurnAuthorProfile | null;
805
- startedAt: string | null;
806
- completedAt: string | null;
807
- durationMs: number | null;
808
- createdAt: string;
809
- updatedAt: string;
810
- userPreview: string | null;
811
- assistantPreview: string | null;
812
- provider: string | null;
813
- model: string | null;
814
- finalUsage: Usage | null;
815
- totalUsage: Usage | null;
816
- errorMessage: string | null;
817
- };
818
- type SpaceTurnAuthorFilter$1 = "any" | "self" | "others";
819
- type SpaceTurnListItem$1 = SessionTurnIndexItem & {
820
- session: {
821
- id: string;
822
- title: string | null;
823
- source: string | null;
824
- };
825
- };
826
- type SpaceTurnsResponse$1 = {
827
- turns: SpaceTurnListItem$1[];
828
- snapshotAt: string;
829
- snapshotCursor: string;
830
- pageInfo: {
831
- hasMore: boolean;
832
- nextCursor: string | null;
833
- };
834
- };
835
- type SessionTurnRecord = {
836
- id: string;
837
- sessionId: string;
838
- sourceSessionId?: string;
839
- sourceTurnId?: string;
840
- userUuid: string | null;
841
- sequence: number;
842
- executionKind?: SessionTurnExecutionKind;
843
- status: SessionTurnStatus;
844
- intent: SessionTurnIntent;
845
- userContent: ContentBlock[];
846
- userText: string | null;
847
- assistantContent: ContentBlock[] | null;
848
- assistantText: string | null;
849
- provider: string | null;
850
- model: string | null;
851
- stopReason: string | null;
852
- errorMessage: string | null;
853
- finalUsage: Usage | null;
854
- totalUsage: Usage | null;
855
- summary: SessionTurnSummary | null;
856
- intermediateIndex: SessionTurnIntermediateIndex | null;
857
- intermediateSummary: SessionTurnIntermediateSummary | null;
858
- harnessIndex?: HarnessArchiveIndex | null;
859
- meta: Record<string, unknown> | null;
860
- /** Effective thinking level used for this turn (derived from meta.effectiveThinkingLevel). */
861
- thinkingLevel?: ModelThinkingLevel | null;
862
- authorProfile?: SessionTurnAuthorProfile | null;
863
- startedAt: string | null;
864
- completedAt: string | null;
865
- durationMs: number | null;
866
- createdAt: string;
867
- updatedAt: string;
868
- };
869
- //#endregion
870
- //#region ../protocol/dist/model/session.d.ts
871
- type SessionForkRecord = {
872
- id: string;
873
- spaceId: string;
874
- parentSessionId: string;
875
- childSessionId: string;
876
- rootSessionId: string;
877
- depth: number;
878
- anchorSourceSessionId: string;
879
- anchorTurnId: string;
880
- anchorSequence: number;
881
- ancestorSessionIds: string[];
882
- sessionPath: string[];
883
- createdBy: string | null;
884
- createdAt: string;
885
- };
886
- type SessionTurnSegmentRecord = {
887
- id: string;
888
- sessionId: string;
889
- ordinal: number;
890
- sourceSessionId: string;
891
- fromSequence: number;
892
- toSequence: number | null;
893
- createdAt: string;
894
- };
895
- type SessionBindingRecord$1 = {
896
- id: string;
897
- spaceId: string;
898
- spaceSessionId: string;
899
- spaceChannelId: string;
900
- provider: string;
901
- bindingKey: string;
902
- externalChatId: string;
903
- status: string | null;
904
- meta: Record<string, unknown> | null;
905
- createdAt: string;
906
- updatedAt: string;
907
- lastMessageAt: string | null;
908
- };
909
- type SessionUserProfile = {
910
- userUuid: string;
911
- username: string | null;
912
- displayName: string;
913
- avatarUrl: string | null;
914
- };
915
- type SessionActiveTurn = {
916
- id: string;
917
- status: "queued" | "running" | "abort_requested";
918
- provider: string | null;
919
- model: string | null;
920
- startedAt: string | null;
921
- anchorUserMessageId: string | null;
922
- };
923
- type SessionRecord$1 = {
924
- id: string;
925
- spaceId: string;
926
- userUuid: string | null;
927
- userProfile?: SessionUserProfile | null;
928
- participantUserUuids?: string[];
929
- participantProfiles?: SessionUserProfile[];
930
- title: string | null;
931
- source: string | null;
932
- status: string | null;
933
- activeTurn?: SessionActiveTurn | null;
934
- externalSessionId: string | null;
935
- meta: Record<string, unknown> | null;
936
- latestMessageText: string | null;
937
- lastMessageAt: string | null;
938
- lastMessageId: string | null;
939
- createdAt: string;
940
- updatedAt: string;
941
- };
942
- type MessageAuthorProfile = {
943
- userUuid: string;
944
- username?: string | null;
945
- displayName: string;
946
- avatarUrl: string | null;
947
- };
948
- type MessageRecord = {
949
- id: string;
950
- sessionId: string;
951
- role: "user" | "assistant" | "system";
952
- content: ContentBlock[];
953
- text: string | null;
954
- sequence: number;
955
- provider: string | null;
956
- model: string | null;
957
- stopReason: string | null;
958
- errorMessage: string | null;
959
- usage: Usage | null;
960
- meta: Record<string, unknown> | null;
961
- authorUuid?: string | null;
962
- authorProfile?: MessageAuthorProfile | null;
963
- startedAt: string | null;
964
- completedAt: string | null;
965
- durationMs: number | null;
966
- createdAt: string;
967
- };
968
- //#endregion
969
- //#region ../protocol/dist/gateway/types.d.ts
970
- type ChannelModelConfig = {
971
- provider: string;
972
- id: string;
973
- thinkingLevel?: ModelThinkingLevel | null;
974
- };
975
- type BaseChannelConfig = {
976
- model?: ChannelModelConfig | null;
977
- };
978
- type DiscordChannelConfig = BaseChannelConfig & {
979
- inbound?: {
980
- requireMentionInGuild?: boolean;
981
- };
982
- outbound?: {
983
- showThinking?: boolean;
984
- showToolCalls?: boolean;
985
- };
986
- };
987
- type FeishuChannelConfig = BaseChannelConfig & {
988
- brand?: "feishu" | "lark";
989
- inbound?: {
990
- requireMentionInGroup?: boolean;
991
- };
992
- outbound?: {
993
- renderMode?: "card" | "post";
994
- showThinking?: boolean;
995
- showToolCalls?: boolean;
996
- };
997
- };
998
- type WeChatChannelConfig = BaseChannelConfig & {
999
- outbound?: {
1000
- showIntermediateStatus?: boolean;
1001
- };
1002
- };
1003
- type QQChannelConfig = BaseChannelConfig & {
1004
- inbound?: {
1005
- requireMentionInGroup?: boolean;
1006
- };
1007
- outbound?: {
1008
- markdownSupport?: boolean;
1009
- };
1010
- };
1011
- type ChannelConfig = DiscordChannelConfig | FeishuChannelConfig | WeChatChannelConfig | QQChannelConfig | (BaseChannelConfig & Record<string, unknown>);
1012
- /** Runtime connection health for a bound gateway channel (space_channel id). */
1013
- type ChannelRuntimeState = "unbound" | "connecting" | "ready" | "degraded" | "error" | "stopped";
1014
- type ChannelHealthReasonCode = "invalid_credentials" | "auth_failed" | "network" | "permission" | "provider_error" | "rate_limit" | "unknown";
1015
- type ChannelHealth = {
1016
- state: ChannelRuntimeState;
1017
- reasonCode?: ChannelHealthReasonCode | null;
1018
- message?: string | null;
1019
- detail?: string | null;
1020
- lastReadyAt?: string | null;
1021
- lastErrorAt?: string | null;
1022
- lastInboundAt?: string | null;
1023
- lastOutboundAt?: string | null;
1024
- nodeId?: string | null;
1025
- updatedAt: string;
1026
- meta?: Record<string, string> | null;
1027
- };
1028
- //#endregion
1029
- //#region ../../node_modules/.pnpm/@neta-art+generation@0.1.30/node_modules/@neta-art/generation/dist/builtins-jIE_k69Z.d.ts
1030
- //#region src/types.d.ts
1031
- declare const MODEL_SCHEMA: "neta.generation.model.v1";
1032
- declare const GENERATION_MODEL_CATEGORIES: readonly ["image", "video", "audio"];
1033
- type GenerationModelCategory = (typeof GENERATION_MODEL_CATEGORIES)[number];
1034
- declare const GENERATION_PRICING_UNITS: readonly ["image", "second", "request", "1m_tokens"];
1035
- type GenerationPricingUnit = (typeof GENERATION_PRICING_UNITS)[number];
1036
- /**
1037
- * Display-only unit price for a model catalog. `unit` names what one charge
1038
- * covers; `amount` is the exact unit price, or a `min`/`max` pair when the
1039
- * price depends on request parameters (resolution, duration, quality).
1040
- */
1041
- type GenerationModelPricing = {
1042
- unit: GenerationPricingUnit;
1043
- /** Short qualifier shown with the price, e.g. "std-pro". */
1044
- note?: string;
1045
- } & ({
1046
- amount: number;
1047
- min?: never;
1048
- max?: never;
1049
- } | {
1050
- amount?: never;
1051
- min: number;
1052
- max: number;
1053
- });
1054
- type GenerationSource = {
1055
- type: "url";
1056
- url: string;
1057
- } | {
1058
- type: "base64";
1059
- mediaType: string;
1060
- data: string;
1061
- };
1062
- type GenerationContentBlockMeta = Record<string, unknown>;
1063
- type GenerationContentBlock = {
1064
- type: "text";
1065
- text: string;
1066
- meta?: GenerationContentBlockMeta;
1067
- } | {
1068
- type: "image";
1069
- source: GenerationSource;
1070
- meta?: GenerationContentBlockMeta;
1071
- } | {
1072
- type: "video";
1073
- source: GenerationSource;
1074
- meta?: GenerationContentBlockMeta;
1075
- } | {
1076
- type: "audio";
1077
- source: GenerationSource;
1078
- meta?: GenerationContentBlockMeta;
1079
- };
1080
- type GenerationResult = {
1081
- content: GenerationContentBlock[];
1082
- requestId?: string;
1083
- cost?: number;
1084
- };
1085
- type GenerationContentSpec = {
1086
- type: "text" | "image" | "video" | "audio";
1087
- required?: boolean;
1088
- min?: number;
1089
- max?: number;
1090
- sources?: Array<GenerationSource["type"]>;
1091
- roles?: string[];
1092
- roleRequired?: boolean;
1093
- merge?: "newline" | "space" | "concat";
1094
- meta?: Record<string, unknown>;
1095
- description?: string;
1096
- };
1097
- type GenerationDimensionsSpec = {
1098
- separator?: "x" | "*";
1099
- min?: number;
1100
- max?: number;
1101
- multipleOf?: number;
1102
- };
1103
- type GenerationParameterSpec = {
1104
- type: "string";
1105
- optional?: boolean;
1106
- default?: string;
1107
- enum?: string[];
1108
- dimensions?: GenerationDimensionsSpec;
1109
- description?: string;
1110
- examples?: string[];
1111
- } | {
1112
- type: "number";
1113
- optional?: boolean;
1114
- default?: number;
1115
- min?: number;
1116
- max?: number;
1117
- description?: string;
1118
- examples?: number[];
1119
- } | {
1120
- type: "integer";
1121
- optional?: boolean;
1122
- default?: number;
1123
- min?: number;
1124
- max?: number;
1125
- description?: string;
1126
- examples?: number[];
1127
- } | {
1128
- type: "boolean";
1129
- optional?: boolean;
1130
- default?: boolean;
1131
- description?: string;
1132
- examples?: boolean[];
1133
- };
1134
- type GenerationMetaFieldSpec = GenerationParameterSpec | {
1135
- type: "object";
1136
- optional?: boolean;
1137
- description?: string;
1138
- };
1139
- type GenerationMetaTaskVariantSpec = {
1140
- description?: string;
1141
- required?: string[];
1142
- requiredContent?: Array<GenerationContentSpec["type"]>;
1143
- sendTask?: boolean;
1144
- };
1145
- type GenerationMetaSpec = {
1146
- fields?: Record<string, GenerationMetaFieldSpec>;
1147
- taskField?: string;
1148
- taskVariants?: Record<string, GenerationMetaTaskVariantSpec>;
1149
- };
1150
- type GenerationModelDeclaration = {
1151
- schema: typeof MODEL_SCHEMA;
1152
- model: string;
1153
- title?: string;
1154
- /** Product catalog class. */
1155
- category?: GenerationModelCategory;
1156
- /** Display-only unit price in USD, maintained per deployment. */
1157
- pricing?: GenerationModelPricing;
1158
- description?: string;
1159
- /** Hide from default discovery while keeping exact-ID lookup and runtime use available. */
1160
- hidden?: boolean;
1161
- allowUnknownParameters?: boolean;
1162
- adapter: {
1163
- type: string;
1164
- } & Record<string, unknown>;
1165
- content: {
1166
- input: GenerationContentSpec[];
1167
- };
1168
- parameters?: Record<string, GenerationParameterSpec>;
1169
- meta?: GenerationMetaSpec;
1170
- examples?: Array<{
1171
- title?: string;
1172
- request: GenerateRequest;
1173
- }>;
1174
- };
1175
- type GenerateRequest = {
1176
- model: string;
1177
- content: GenerationContentBlock[];
1178
- parameters?: Record<string, unknown>;
1179
- meta?: Record<string, unknown>;
1180
- /** @deprecated Use meta. */
1181
- metadata?: Record<string, unknown>;
1182
- apiKey?: string;
1183
- baseUrl?: string;
1184
- };
1185
- //#endregion
1186
- //#region ../protocol/dist/billing.d.ts
1187
- /**
1188
- * Standard billing payload attached under the `billing` key of any response
1189
- * or realtime event that involves a billing gate. Present on 402 error bodies
1190
- * (blocked / not entitled), on success responses carrying a soft debt warning,
1191
- * and on realtime error events. `conversion` always drives the shared upgrade
1192
- * UI; balance fields appear only for balance-based gates.
1193
- *
1194
- * `conversion` is intentionally `unknown` here to keep the protocol layer free
1195
- * of a billing dependency — clients validate it against `BillingConversionIntent`.
1196
- */
1197
- type BillingPayload = {
1198
- conversion: unknown;
1199
- status?: "blocked" | "allowed_with_debt";
1200
- netUsd?: number;
1201
- hardNegativeLimitUsd?: number;
1202
- minimumBalanceUsd?: number;
1203
- };
1204
- //#endregion
1205
- //#region ../protocol/dist/generation/policy.d.ts
1206
- type GenerationPolicy = {
1207
- version: 1;
1208
- mode: "auto" | "limited";
1209
- models?: GenerationModelPolicy[];
1210
- };
1211
- type GenerationModelPolicy = {
1212
- model: string;
1213
- /**
1214
- * Generic constraints keyed by generation declaration parameter name.
1215
- * Missing parameters are not restricted by policy.
1216
- */
1217
- parameters?: Record<string, GenerationParameterConstraint>;
1218
- };
1219
- type GenerationParameterConstraint = {
1220
- kind: "enum";
1221
- values: Array<string | number | boolean>;
1222
- } | {
1223
- kind: "number";
1224
- min?: number;
1225
- max?: number;
1226
- values?: number[];
1227
- } | {
1228
- kind: "integer";
1229
- min?: number;
1230
- max?: number;
1231
- values?: number[];
1232
- } | {
1233
- kind: "boolean";
1234
- value?: boolean;
1235
- };
1236
- declare class GenerationPolicyError extends Error {
1237
- constructor(message: string);
1238
- }
1239
- type EnvLike = Record<string, string | undefined>;
1240
- type PublicDeclaration = Omit<GenerationModelDeclaration, "adapter">;
1241
- declare function normalizeGenerationPolicy(value: unknown): GenerationPolicy | null;
1242
- declare function encodeGenerationPolicy(policy: GenerationPolicy): string;
1243
- declare function decodeGenerationPolicy(value: string): GenerationPolicy | null;
1244
- declare function parseGenerationPolicyFromEnv(env: EnvLike): GenerationPolicy | null;
1245
- declare function getAllowedGenerationModelIds(policy: GenerationPolicy | null): string[] | null;
1246
- declare function findGenerationModelPolicy(policy: GenerationPolicy | null, model: string): GenerationModelPolicy | null;
1247
- declare function assertGenerationRequestAllowedByPolicy(input: {
1248
- policy: GenerationPolicy | null;
1249
- model: string;
1250
- parameters?: Record<string, unknown>;
1251
- }): void;
1252
- declare function filterGenerationDeclarationsByPolicy<T extends PublicDeclaration>(declarations: T[], policy: GenerationPolicy | null): T[];
1253
- //#endregion
1254
- //#region ../protocol/dist/app-authorization.d.ts
1255
- declare const appAuthorizationTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1256
- kind: z.ZodLiteral<"account">;
1257
- }, z.core.$strip>, z.ZodObject<{
1258
- kind: z.ZodLiteral<"space">;
1259
- spaceId: z.ZodString;
1260
- }, z.core.$strip>, z.ZodObject<{
1261
- kind: z.ZodLiteral<"pick-space">;
1262
- }, z.core.$strip>], "kind">;
1263
- declare const appAuthorizationRequestSchema: z.ZodObject<{
1264
- target: z.ZodDiscriminatedUnion<[z.ZodObject<{
1265
- kind: z.ZodLiteral<"account">;
1266
- }, z.core.$strip>, z.ZodObject<{
1267
- kind: z.ZodLiteral<"space">;
1268
- spaceId: z.ZodString;
1269
- }, z.core.$strip>, z.ZodObject<{
1270
- kind: z.ZodLiteral<"pick-space">;
1271
- }, z.core.$strip>], "kind">;
1272
- scopes: z.ZodArray<z.ZodString>;
1273
- reason: z.ZodOptional<z.ZodString>;
1274
- alwaysAsk: z.ZodOptional<z.ZodBoolean>;
1275
- fallback: z.ZodDefault<z.ZodEnum<{
1276
- allow: "allow";
1277
- none: "none";
1278
- }>>;
1279
- }, z.core.$strip>;
1280
- declare const appAuthorizationGrantSchema: z.ZodObject<{
1281
- id: z.ZodString;
1282
- spaceId: z.ZodString;
1283
- scopes: z.ZodArray<z.ZodString>;
1284
- expiresAt: z.ZodNullable<z.ZodString>;
1285
- }, z.core.$strip>;
1286
- declare const appAuthorizationResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1287
- status: z.ZodLiteral<"granted">;
1288
- requestedTarget: z.ZodDiscriminatedUnion<[z.ZodObject<{
1289
- kind: z.ZodLiteral<"account">;
1290
- }, z.core.$strip>, z.ZodObject<{
1291
- kind: z.ZodLiteral<"space">;
1292
- spaceId: z.ZodString;
1293
- }, z.core.$strip>, z.ZodObject<{
1294
- kind: z.ZodLiteral<"pick-space">;
1295
- }, z.core.$strip>], "kind">;
1296
- target: z.ZodDiscriminatedUnion<[z.ZodObject<{
1297
- kind: z.ZodLiteral<"account">;
1298
- }, z.core.$strip>, z.ZodObject<{
1299
- kind: z.ZodLiteral<"space">;
1300
- spaceId: z.ZodString;
1301
- name: z.ZodNullable<z.ZodString>;
1302
- }, z.core.$strip>], "kind">;
1303
- resolution: z.ZodEnum<{
1304
- fallback: "fallback";
1305
- requested: "requested";
1306
- selected: "selected";
1307
- }>;
1308
- grant: z.ZodObject<{
1309
- id: z.ZodString;
1310
- spaceId: z.ZodString;
1311
- scopes: z.ZodArray<z.ZodString>;
1312
- expiresAt: z.ZodNullable<z.ZodString>;
1313
- }, z.core.$strip>;
1314
- }, z.core.$strip>, z.ZodObject<{
1315
- status: z.ZodLiteral<"cancelled">;
1316
- }, z.core.$strip>, z.ZodObject<{
1317
- status: z.ZodLiteral<"denied">;
1318
- code: z.ZodString;
1319
- }, z.core.$strip>], "status">;
1320
- type AppAuthorizationTarget = z.infer<typeof appAuthorizationTargetSchema>;
1321
- type AppAuthorizationGrant = z.infer<typeof appAuthorizationGrantSchema>;
1322
- type AppAuthorizationResult = z.infer<typeof appAuthorizationResultSchema>;
1323
- type AppAuthorizationRequest = z.input<typeof appAuthorizationRequestSchema>;
1324
- //#endregion
1325
- //#region ../protocol/dist/board-constants.d.ts
1326
- type BoardCoordinateSpace = "world" | "frame-local" | "world-offset" | "screen" | "screen-offset" | "normalized";
1327
- type BoardRenderCost = {
1328
- particles: number;
1329
- vertices: number;
1330
- dynamicVertices: number;
1331
- drawCalls: number;
1332
- filterPasses: number;
1333
- renderTexturePixels: number;
1334
- textureBytes: number;
1335
- bufferBytes: number;
1336
- simulationSteps: number;
1337
- };
1338
- type BoardCapability = {
1339
- kind: "preset" | "clip" | "effect" | "shader";
1340
- id: string;
1341
- version: number;
1342
- digest?: string;
1343
- renderers?: Array<"webgpu" | "webgl">;
1344
- fallbackId?: string;
1345
- schema?: Record<string, unknown>;
1346
- };
1347
- //#endregion
1348
- //#region ../protocol/dist/board-connection.d.ts
1349
- declare const BoardConnectionSchema: z.ZodObject<{
1350
- id: z.ZodString;
1351
- source: z.ZodObject<{
1352
- itemId: z.ZodString;
1353
- portId: z.ZodOptional<z.ZodString>;
1354
- anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
1355
- kind: z.ZodLiteral<"auto">;
1356
- }, z.core.$strip>, z.ZodObject<{
1357
- kind: z.ZodLiteral<"side">;
1358
- side: z.ZodEnum<{
1359
- bottom: "bottom";
1360
- left: "left";
1361
- right: "right";
1362
- top: "top";
1363
- }>;
1364
- offset: z.ZodDefault<z.ZodNumber>;
1365
- }, z.core.$strip>, z.ZodObject<{
1366
- kind: z.ZodLiteral<"fixed">;
1367
- nx: z.ZodNumber;
1368
- ny: z.ZodNumber;
1369
- }, z.core.$strip>]>>;
1370
- }, z.core.$strip>;
1371
- target: z.ZodObject<{
1372
- itemId: z.ZodString;
1373
- portId: z.ZodOptional<z.ZodString>;
1374
- anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
1375
- kind: z.ZodLiteral<"auto">;
1376
- }, z.core.$strip>, z.ZodObject<{
1377
- kind: z.ZodLiteral<"side">;
1378
- side: z.ZodEnum<{
1379
- bottom: "bottom";
1380
- left: "left";
1381
- right: "right";
1382
- top: "top";
1383
- }>;
1384
- offset: z.ZodDefault<z.ZodNumber>;
1385
- }, z.core.$strip>, z.ZodObject<{
1386
- kind: z.ZodLiteral<"fixed">;
1387
- nx: z.ZodNumber;
1388
- ny: z.ZodNumber;
1389
- }, z.core.$strip>]>>;
1390
- }, z.core.$strip>;
1391
- relation: z.ZodDefault<z.ZodString>;
1392
- direction: z.ZodDefault<z.ZodEnum<{
1393
- backward: "backward";
1394
- both: "both";
1395
- forward: "forward";
1396
- none: "none";
1397
- }>>;
1398
- label: z.ZodDefault<z.ZodString>;
1399
- routing: z.ZodDefault<z.ZodObject<{
1400
- kind: z.ZodDefault<z.ZodEnum<{
1401
- curve: "curve";
1402
- orthogonal: "orthogonal";
1403
- straight: "straight";
1404
- }>>;
1405
- bend: z.ZodDefault<z.ZodNumber>;
1406
- waypoints: z.ZodDefault<z.ZodArray<z.ZodObject<{
1407
- x: z.ZodNumber;
1408
- y: z.ZodNumber;
1409
- }, z.core.$strip>>>;
1410
- }, z.core.$strip>>;
1411
- style: z.ZodDefault<z.ZodObject<{
1412
- color: z.ZodDefault<z.ZodString>;
1413
- size: z.ZodDefault<z.ZodNumber>;
1414
- line: z.ZodDefault<z.ZodEnum<{
1415
- dashed: "dashed";
1416
- solid: "solid";
1417
- }>>;
1418
- }, z.core.$strip>>;
1419
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1420
- }, z.core.$strict>;
1421
- type BoardConnection = z.infer<typeof BoardConnectionSchema>;
1422
- /** Server-owned fields, mirroring how nodes carry a board id and revision. */
1423
- type BoardConnectionRecord = BoardConnection & {
1424
- boardId: string;
1425
- revision: number;
1426
- createdAt: string | null;
1427
- updatedAt: string | null;
1428
- };
1429
- /** The client-authored form of a connection (no server-owned fields). */
1430
- type BoardConnectionInput = BoardConnection;
1431
- /**
1432
- * A patch to an existing connection.
1433
- *
1434
- * `id` is excluded: a connection's identity never changes, and re-pointing both
1435
- * endpoints is an edit of the same relation, not a new one.
1436
- */
1437
- declare const BoardConnectionPatchSchema: z.ZodObject<{
1438
- source: z.ZodOptional<z.ZodObject<{
1439
- itemId: z.ZodString;
1440
- portId: z.ZodOptional<z.ZodString>;
1441
- anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
1442
- kind: z.ZodLiteral<"auto">;
1443
- }, z.core.$strip>, z.ZodObject<{
1444
- kind: z.ZodLiteral<"side">;
1445
- side: z.ZodEnum<{
1446
- bottom: "bottom";
1447
- left: "left";
1448
- right: "right";
1449
- top: "top";
1450
- }>;
1451
- offset: z.ZodDefault<z.ZodNumber>;
1452
- }, z.core.$strip>, z.ZodObject<{
1453
- kind: z.ZodLiteral<"fixed">;
1454
- nx: z.ZodNumber;
1455
- ny: z.ZodNumber;
1456
- }, z.core.$strip>]>>;
1457
- }, z.core.$strip>>;
1458
- target: z.ZodOptional<z.ZodObject<{
1459
- itemId: z.ZodString;
1460
- portId: z.ZodOptional<z.ZodString>;
1461
- anchor: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
1462
- kind: z.ZodLiteral<"auto">;
1463
- }, z.core.$strip>, z.ZodObject<{
1464
- kind: z.ZodLiteral<"side">;
1465
- side: z.ZodEnum<{
1466
- bottom: "bottom";
1467
- left: "left";
1468
- right: "right";
1469
- top: "top";
1470
- }>;
1471
- offset: z.ZodDefault<z.ZodNumber>;
1472
- }, z.core.$strip>, z.ZodObject<{
1473
- kind: z.ZodLiteral<"fixed">;
1474
- nx: z.ZodNumber;
1475
- ny: z.ZodNumber;
1476
- }, z.core.$strip>]>>;
1477
- }, z.core.$strip>>;
1478
- relation: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1479
- direction: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
1480
- backward: "backward";
1481
- both: "both";
1482
- forward: "forward";
1483
- none: "none";
1484
- }>>>;
1485
- label: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1486
- routing: z.ZodOptional<z.ZodDefault<z.ZodObject<{
1487
- kind: z.ZodDefault<z.ZodEnum<{
1488
- curve: "curve";
1489
- orthogonal: "orthogonal";
1490
- straight: "straight";
1491
- }>>;
1492
- bend: z.ZodDefault<z.ZodNumber>;
1493
- waypoints: z.ZodDefault<z.ZodArray<z.ZodObject<{
1494
- x: z.ZodNumber;
1495
- y: z.ZodNumber;
1496
- }, z.core.$strip>>>;
1497
- }, z.core.$strip>>>;
1498
- style: z.ZodOptional<z.ZodDefault<z.ZodObject<{
1499
- color: z.ZodDefault<z.ZodString>;
1500
- size: z.ZodDefault<z.ZodNumber>;
1501
- line: z.ZodDefault<z.ZodEnum<{
1502
- dashed: "dashed";
1503
- solid: "solid";
1504
- }>>;
1505
- }, z.core.$strip>>>;
1506
- metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1507
- }, z.core.$strict>;
1508
- type BoardConnectionPatch = z.infer<typeof BoardConnectionPatchSchema>;
1509
- //#endregion
1510
- //#region ../protocol/dist/board-composition.d.ts
1511
- declare const BoardEasingSchema: z.ZodEnum<{
1512
- "ease-in-cubic": "ease-in-cubic";
1513
- "ease-in-out-cubic": "ease-in-out-cubic";
1514
- "ease-in-out-quad": "ease-in-out-quad";
1515
- "ease-in-quad": "ease-in-quad";
1516
- "ease-out-cubic": "ease-out-cubic";
1517
- "ease-out-expo": "ease-out-expo";
1518
- "ease-out-quad": "ease-out-quad";
1519
- "ease-out-quart": "ease-out-quart";
1520
- linear: "linear";
1521
- }>;
1522
- type BoardEasing = z.infer<typeof BoardEasingSchema>;
1523
- declare const BoardAnimationTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1524
- type: z.ZodLiteral<"item">;
1525
- itemId: z.ZodString;
1526
- }, z.core.$strict>, z.ZodObject<{
1527
- type: z.ZodLiteral<"effect">;
1528
- effectId: z.ZodString;
1529
- }, z.core.$strict>, z.ZodObject<{
1530
- type: z.ZodLiteral<"camera">;
1531
- }, z.core.$strict>, z.ZodObject<{
1532
- type: z.ZodLiteral<"board">;
1533
- }, z.core.$strict>], "type">;
1534
- type BoardAnimationTarget = z.infer<typeof BoardAnimationTargetSchema>;
1535
- type BoardTrackInterpolation = "linear" | "step";
1536
- declare const BoardTrackSchema: z.ZodObject<{
1537
- id: z.ZodString;
1538
- target: z.ZodDiscriminatedUnion<[z.ZodObject<{
1539
- type: z.ZodLiteral<"item">;
1540
- itemId: z.ZodString;
1541
- }, z.core.$strict>, z.ZodObject<{
1542
- type: z.ZodLiteral<"effect">;
1543
- effectId: z.ZodString;
1544
- }, z.core.$strict>, z.ZodObject<{
1545
- type: z.ZodLiteral<"camera">;
1546
- }, z.core.$strict>, z.ZodObject<{
1547
- type: z.ZodLiteral<"board">;
1548
- }, z.core.$strict>], "type">;
1549
- channel: z.ZodString;
1550
- channelVersion: z.ZodDefault<z.ZodNumber>;
1551
- interpolation: z.ZodDefault<z.ZodEnum<{
1552
- linear: "linear";
1553
- step: "step";
1554
- }>>;
1555
- fill: z.ZodDefault<z.ZodEnum<{
1556
- backwards: "backwards";
1557
- both: "both";
1558
- forwards: "forwards";
1559
- none: "none";
1560
- }>>;
1561
- keyframes: z.ZodArray<z.ZodObject<{
1562
- time: z.ZodNumber;
1563
- value: z.ZodUnknown;
1564
- easing: z.ZodOptional<z.ZodEnum<{
1565
- "ease-in-cubic": "ease-in-cubic";
1566
- "ease-in-out-cubic": "ease-in-out-cubic";
1567
- "ease-in-out-quad": "ease-in-out-quad";
1568
- "ease-in-quad": "ease-in-quad";
1569
- "ease-out-cubic": "ease-out-cubic";
1570
- "ease-out-expo": "ease-out-expo";
1571
- "ease-out-quad": "ease-out-quad";
1572
- "ease-out-quart": "ease-out-quart";
1573
- linear: "linear";
1574
- }>>;
1575
- }, z.core.$strict>>;
1576
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1577
- }, z.core.$strict>;
1578
- type BoardTrack = z.infer<typeof BoardTrackSchema>;
1579
- declare const BoardProceduralClipSchema: z.ZodObject<{
1580
- id: z.ZodString;
1581
- kind: z.ZodString;
1582
- kindVersion: z.ZodNumber;
1583
- target: z.ZodDiscriminatedUnion<[z.ZodObject<{
1584
- type: z.ZodLiteral<"item">;
1585
- itemId: z.ZodString;
1586
- }, z.core.$strict>, z.ZodObject<{
1587
- type: z.ZodLiteral<"effect">;
1588
- effectId: z.ZodString;
1589
- }, z.core.$strict>, z.ZodObject<{
1590
- type: z.ZodLiteral<"camera">;
1591
- }, z.core.$strict>, z.ZodObject<{
1592
- type: z.ZodLiteral<"board">;
1593
- }, z.core.$strict>], "type">;
1594
- start: z.ZodNumber;
1595
- duration: z.ZodNumber;
1596
- layer: z.ZodDefault<z.ZodEnum<{
1597
- behind: "behind";
1598
- content: "content";
1599
- front: "front";
1600
- screen: "screen";
1601
- }>>;
1602
- fill: z.ZodDefault<z.ZodEnum<{
1603
- backwards: "backwards";
1604
- both: "both";
1605
- forwards: "forwards";
1606
- none: "none";
1607
- }>>;
1608
- easing: z.ZodDefault<z.ZodEnum<{
1609
- "ease-in-cubic": "ease-in-cubic";
1610
- "ease-in-out-cubic": "ease-in-out-cubic";
1611
- "ease-in-out-quad": "ease-in-out-quad";
1612
- "ease-in-quad": "ease-in-quad";
1613
- "ease-out-cubic": "ease-out-cubic";
1614
- "ease-out-expo": "ease-out-expo";
1615
- "ease-out-quad": "ease-out-quad";
1616
- "ease-out-quart": "ease-out-quart";
1617
- linear: "linear";
1618
- }>>;
1619
- params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1620
- assetRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
1621
- type: z.ZodEnum<{
1622
- extension: "extension";
1623
- "space-file": "space-file";
1624
- }>;
1625
- ref: z.ZodString;
1626
- digest: z.ZodOptional<z.ZodString>;
1627
- }, z.core.$strict>>>;
1628
- seed: z.ZodString;
1629
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1630
- }, z.core.$strict>;
1631
- type BoardProceduralClip = z.infer<typeof BoardProceduralClipSchema>;
1632
- declare const BoardTimelineMarkerSchema: z.ZodObject<{
1633
- id: z.ZodString;
1634
- time: z.ZodNumber;
1635
- duration: z.ZodOptional<z.ZodNumber>;
1636
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1637
- }, z.core.$strict>;
1638
- type BoardTimelineMarker = z.infer<typeof BoardTimelineMarkerSchema>;
1639
- declare const BoardTimelineSchema: z.ZodObject<{
1640
- duration: z.ZodNumber;
1641
- tracks: z.ZodDefault<z.ZodArray<z.ZodObject<{
1642
- id: z.ZodString;
1643
- target: z.ZodDiscriminatedUnion<[z.ZodObject<{
1644
- type: z.ZodLiteral<"item">;
1645
- itemId: z.ZodString;
1646
- }, z.core.$strict>, z.ZodObject<{
1647
- type: z.ZodLiteral<"effect">;
1648
- effectId: z.ZodString;
1649
- }, z.core.$strict>, z.ZodObject<{
1650
- type: z.ZodLiteral<"camera">;
1651
- }, z.core.$strict>, z.ZodObject<{
1652
- type: z.ZodLiteral<"board">;
1653
- }, z.core.$strict>], "type">;
1654
- channel: z.ZodString;
1655
- channelVersion: z.ZodDefault<z.ZodNumber>;
1656
- interpolation: z.ZodDefault<z.ZodEnum<{
1657
- linear: "linear";
1658
- step: "step";
1659
- }>>;
1660
- fill: z.ZodDefault<z.ZodEnum<{
1661
- backwards: "backwards";
1662
- both: "both";
1663
- forwards: "forwards";
1664
- none: "none";
1665
- }>>;
1666
- keyframes: z.ZodArray<z.ZodObject<{
1667
- time: z.ZodNumber;
1668
- value: z.ZodUnknown;
1669
- easing: z.ZodOptional<z.ZodEnum<{
1670
- "ease-in-cubic": "ease-in-cubic";
1671
- "ease-in-out-cubic": "ease-in-out-cubic";
1672
- "ease-in-out-quad": "ease-in-out-quad";
1673
- "ease-in-quad": "ease-in-quad";
1674
- "ease-out-cubic": "ease-out-cubic";
1675
- "ease-out-expo": "ease-out-expo";
1676
- "ease-out-quad": "ease-out-quad";
1677
- "ease-out-quart": "ease-out-quart";
1678
- linear: "linear";
1679
- }>>;
1680
- }, z.core.$strict>>;
1681
- metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1682
- }, z.core.$strict>>>;
1683
- clips: z.ZodDefault<z.ZodArray<z.ZodObject<{
1684
- id: z.ZodString;
1685
- kind: z.ZodString;
1686
- kindVersion: z.ZodNumber;
1687
- target: z.ZodDiscriminatedUnion<[z.ZodObject<{
1688
- type: z.ZodLiteral<"item">;
1689
- itemId: z.ZodString;
1690
- }, z.core.$strict>, z.ZodObject<{
1691
- type: z.ZodLiteral<"effect">;
1692
- effectId: z.ZodString;
1693
- }, z.core.$strict>, z.ZodObject<{
1694
- type: z.ZodLiteral<"camera">;
1695
- }, z.core.$strict>, z.ZodObject<{
1696
- type: z.ZodLiteral<"board">;
1697
- }, z.core.$strict>], "type">;
1698
- start: z.ZodNumber;
1699
- duration: z.ZodNumber;
1700
- layer: z.ZodDefault<z.ZodEnum<{
1701
- behind: "behind";
1702
- content: "content";
1703
- front: "front";
1704
- screen: "screen";
1705
- }>>;
1706
- fill: z.ZodDefault<z.ZodEnum<{
1707
- backwards: "backwards";
1708
- both: "both";
1709
- forwards: "forwards";
1710
- none: "none";
1711
- }>>;
1712
- easing: z.ZodDefault<z.ZodEnum<{
1713
- "ease-in-cubic": "ease-in-cubic";
1714
- "ease-in-out-cubic": "ease-in-out-cubic";
1715
- "ease-in-out-quad": "ease-in-out-quad";
1716
- "ease-in-quad": "ease-in-quad";
1717
- "ease-out-cubic": "ease-out-cubic";
1718
- "ease-out-expo": "ease-out-expo";
1719
- "ease-out-quad": "ease-out-quad";
1720
- "ease-out-quart": "ease-out-quart";
1721
- linear: "linear";
1722
- }>>;
1723
- params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1724
- assetRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
1725
- type: z.ZodEnum<{
1726
- extension: "extension";
1727
- "space-file": "space-file";
1728
- }>;
1729
- ref: z.ZodString;
1730
- digest: z.ZodOptional<z.ZodString>;
756
+ ref: z.ZodString;
757
+ digest: z.ZodOptional<z.ZodString>;
1731
758
  }, z.core.$strict>>>;
1732
759
  seed: z.ZodString;
1733
760
  metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -5663,960 +4690,2124 @@ declare const BoardAwarenessUpdateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5663
4690
  rotate: "rotate";
5664
4691
  translate: "translate";
5665
4692
  }>;
5666
- nodes: z.ZodArray<z.ZodObject<{
5667
- nodeId: z.ZodString;
5668
- frame: z.ZodObject<{
5669
- x: z.ZodNumber;
5670
- y: z.ZodNumber;
5671
- width: z.ZodNumber;
5672
- height: z.ZodNumber;
5673
- rotation: z.ZodNumber;
5674
- }, z.core.$strip>;
5675
- arrow: z.ZodOptional<z.ZodObject<{
5676
- start: z.ZodObject<{
5677
- x: z.ZodNumber;
5678
- y: z.ZodNumber;
5679
- }, z.core.$strip>;
5680
- end: z.ZodObject<{
5681
- x: z.ZodNumber;
5682
- y: z.ZodNumber;
5683
- }, z.core.$strip>;
5684
- bend: z.ZodNumber;
5685
- }, z.core.$strip>>;
5686
- }, z.core.$strip>>;
5687
- bounds: z.ZodNullable<z.ZodObject<{
5688
- x: z.ZodNumber;
5689
- y: z.ZodNumber;
5690
- width: z.ZodNumber;
5691
- height: z.ZodNumber;
5692
- rotation: z.ZodNumber;
5693
- }, z.core.$strip>>;
5694
- }, z.core.$strip>], "kind">;
5695
- }, z.core.$strip>, z.ZodObject<{
5696
- type: z.ZodLiteral<"gesture.end">;
5697
- gestureId: z.ZodString;
5698
- resultingNodeIds: z.ZodArray<z.ZodString>;
5699
- }, z.core.$strip>, z.ZodObject<{
5700
- type: z.ZodLiteral<"gesture.cancel">;
5701
- gestureId: z.ZodString;
5702
- }, z.core.$strip>], "type">;
5703
- type BoardAwarenessNodePreview = z.infer<typeof BoardAwarenessNodePreviewSchema>;
5704
- type BoardAwarenessStateUpdate = z.infer<typeof BoardAwarenessStateUpdateSchema>;
5705
- type BoardAwarenessGesture = z.infer<typeof BoardAwarenessGestureSchema>;
5706
- type BoardAwarenessUpdate = z.infer<typeof BoardAwarenessUpdateSchema>;
5707
- //#endregion
5708
- //#region ../protocol/dist/task/index.d.ts
5709
- type TaskRunStatus = "pending" | "running" | "completed" | "failed";
5710
- //#endregion
5711
- //#region ../protocol/dist/fs/index.d.ts
5712
- type SpaceFsChange = {
5713
- path?: string;
5714
- oldPath?: string;
5715
- kind: "create" | "modify" | "delete" | "rename";
5716
- nodeType?: "file" | "dir" | "unknown";
5717
- mtimeMs?: number;
5718
- size?: number;
4693
+ nodes: z.ZodArray<z.ZodObject<{
4694
+ nodeId: z.ZodString;
4695
+ frame: z.ZodObject<{
4696
+ x: z.ZodNumber;
4697
+ y: z.ZodNumber;
4698
+ width: z.ZodNumber;
4699
+ height: z.ZodNumber;
4700
+ rotation: z.ZodNumber;
4701
+ }, z.core.$strip>;
4702
+ arrow: z.ZodOptional<z.ZodObject<{
4703
+ start: z.ZodObject<{
4704
+ x: z.ZodNumber;
4705
+ y: z.ZodNumber;
4706
+ }, z.core.$strip>;
4707
+ end: z.ZodObject<{
4708
+ x: z.ZodNumber;
4709
+ y: z.ZodNumber;
4710
+ }, z.core.$strip>;
4711
+ bend: z.ZodNumber;
4712
+ }, z.core.$strip>>;
4713
+ }, z.core.$strip>>;
4714
+ bounds: z.ZodNullable<z.ZodObject<{
4715
+ x: z.ZodNumber;
4716
+ y: z.ZodNumber;
4717
+ width: z.ZodNumber;
4718
+ height: z.ZodNumber;
4719
+ rotation: z.ZodNumber;
4720
+ }, z.core.$strip>>;
4721
+ }, z.core.$strip>], "kind">;
4722
+ }, z.core.$strip>, z.ZodObject<{
4723
+ type: z.ZodLiteral<"gesture.end">;
4724
+ gestureId: z.ZodString;
4725
+ resultingNodeIds: z.ZodArray<z.ZodString>;
4726
+ }, z.core.$strip>, z.ZodObject<{
4727
+ type: z.ZodLiteral<"gesture.cancel">;
4728
+ gestureId: z.ZodString;
4729
+ }, z.core.$strip>], "type">;
4730
+ type BoardAwarenessNodePreview = z.infer<typeof BoardAwarenessNodePreviewSchema>;
4731
+ type BoardAwarenessStateUpdate = z.infer<typeof BoardAwarenessStateUpdateSchema>;
4732
+ type BoardAwarenessGesture = z.infer<typeof BoardAwarenessGestureSchema>;
4733
+ type BoardAwarenessUpdate = z.infer<typeof BoardAwarenessUpdateSchema>;
4734
+ //#endregion
4735
+ //#region ../protocol/dist/task/index.d.ts
4736
+ type TaskRunStatus = "pending" | "running" | "completed" | "failed";
4737
+ //#endregion
4738
+ //#region ../protocol/dist/fs/index.d.ts
4739
+ type SpaceFsChange = {
4740
+ path?: string;
4741
+ oldPath?: string;
4742
+ kind: "create" | "modify" | "delete" | "rename";
4743
+ nodeType?: "file" | "dir" | "unknown";
4744
+ mtimeMs?: number;
4745
+ size?: number;
4746
+ };
4747
+ type SpaceFsChangedPayload = {
4748
+ source: "sandbox-watch" | "api-fs" | "bootstrap" | "sandbox-watch-started";
4749
+ /** Client-generated id used to identify an API write echoed over realtime. */
4750
+ mutationId?: string;
4751
+ seq?: number;
4752
+ resync?: boolean;
4753
+ changes: SpaceFsChange[];
4754
+ };
4755
+ //#endregion
4756
+ //#region ../protocol/dist/ports/index.d.ts
4757
+ declare const SANDBOX_PUBLIC_PORTS: readonly [3000, 5173];
4758
+ type SandboxPublicPort = (typeof SANDBOX_PUBLIC_PORTS)[number];
4759
+ type SpacePortStatus = "listening" | "closed";
4760
+ type SpacePortChange = {
4761
+ port: SandboxPublicPort | number;
4762
+ protocol: "tcp";
4763
+ status: SpacePortStatus;
4764
+ observedAt: number;
4765
+ };
4766
+ type SpacePortsChangedPayload = {
4767
+ source: "sandbox-port-watch" | "sandbox-port-watch-started";
4768
+ seq?: number;
4769
+ resync?: boolean;
4770
+ ports: SpacePortChange[];
4771
+ };
4772
+ type SpacePublicEndpoint = {
4773
+ url: string;
4774
+ status?: SpacePortStatus | "unknown";
4775
+ observedAt?: number;
4776
+ };
4777
+ type SpacePublicEndpoints = Record<string, SpacePublicEndpoint>;
4778
+ //#endregion
4779
+ //#region ../protocol/dist/navigation.d.ts
4780
+ /** Shared payload shapes used by local App navigation and remote desktop open. */
4781
+ type NavigationLaunch = {
4782
+ search?: string;
4783
+ hash?: string;
4784
+ };
4785
+ type NavigationCall = {
4786
+ method: string;
4787
+ input?: unknown;
4788
+ };
4789
+ //#endregion
4790
+ //#region ../protocol/dist/desktop-command.d.ts
4791
+ declare const DESKTOP_COMMAND_VERSION = 1;
4792
+ /** Persisted and broadcast, so every field is capped; MAX_BYTES bounds the whole. */
4793
+ declare const DESKTOP_COMMAND_PAYLOAD_MAX_BYTES: number;
4794
+ declare const DESKTOP_COMMAND_DEFAULT_TIMEOUT_MS: number;
4795
+ declare const DESKTOP_COMMAND_MAX_TIMEOUT_MS: number;
4796
+ declare const DESKTOP_COMMAND_SETTLEMENT_GRACE_SECONDS: number;
4797
+ /** Keeps pending commands reportable for the full wait window plus settlement grace. */
4798
+ declare const DESKTOP_COMMAND_PENDING_TTL_SECONDS: number;
4799
+ declare const DESKTOP_COMMAND_TERMINAL_TTL_SECONDS: number;
4800
+ type DesktopCommandStatus = "pending" | "applied" | "no_active_client" | "desktop_host_unavailable" | "rejected" | "unsupported" | "timeout";
4801
+ declare const isTerminalDesktopCommandStatus: (status: DesktopCommandStatus) => boolean;
4802
+ /**
4803
+ * How the App surface should be presented on the desktop.
4804
+ *
4805
+ * - `window` (default) — opens as a preview tab in the workspace panel.
4806
+ * - `overlay` — renders in a transparent, chrome-free layer above the
4807
+ * workspace. The App controls its own geometry via `configure.request`
4808
+ * and input hit-testing via `inputRegion`. Stays below system UI.
4809
+ */
4810
+ type DesktopSurface = "window" | "overlay";
4811
+ /**
4812
+ * The surface a desktop open should use: an explicit request wins, then
4813
+ * whatever the App declared at publish time. `window` is the implicit
4814
+ * default and yields `undefined` so the command stays compact.
4815
+ */
4816
+ declare function resolveOpenSurface(requested: unknown, declared: unknown): DesktopSurface | undefined;
4817
+ type DesktopAppTarget = {
4818
+ kind: "app";
4819
+ appId: string;
4820
+ label?: string;
4821
+ launch?: NavigationLaunch;
4822
+ /** Requested surface role. Defaults to `"window"` when absent. */
4823
+ surface?: DesktopSurface;
4824
+ };
4825
+ type DesktopFileTarget = {
4826
+ kind: "file";
4827
+ path: string;
4828
+ };
4829
+ type DesktopTarget = DesktopAppTarget | DesktopFileTarget;
4830
+ type DesktopCall = NavigationCall;
4831
+ type DesktopOpenCommand = {
4832
+ type: "desktop.open";
4833
+ target: DesktopTarget;
4834
+ call?: DesktopCall;
4835
+ };
4836
+ type DesktopCommand = DesktopOpenCommand;
4837
+ type DesktopCommandError = {
4838
+ code: string;
4839
+ message: string;
4840
+ };
4841
+ type DesktopCommandRecord = {
4842
+ version: typeof DESKTOP_COMMAND_VERSION;
4843
+ commandId: string;
4844
+ status: DesktopCommandStatus;
4845
+ command: DesktopCommand;
4846
+ actorUserId: string;
4847
+ targetClientId: string;
4848
+ source: RequestSource | null;
4849
+ result?: unknown;
4850
+ error?: DesktopCommandError | null;
4851
+ createdAt: string;
4852
+ settledAt?: string | null;
4853
+ };
4854
+ type DesktopCommandDispatchedPayload = {
4855
+ commandId: string;
4856
+ targetClientId: string;
4857
+ command: DesktopCommand;
4858
+ source: RequestSource | null;
4859
+ };
4860
+ declare const isDesktopCallMethod: (value: unknown) => value is string;
4861
+ type ParsedDesktopCommand = {
4862
+ command: DesktopCommand;
4863
+ error: null;
4864
+ } | {
4865
+ command: null;
4866
+ error: string;
4867
+ };
4868
+ /**
4869
+ * Parse a desktop command from untrusted input.
4870
+ *
4871
+ * Accepts both the canonical `desktop.open` shape (`target` / `call`) and the
4872
+ * legacy `preview.show` shape (`preview` / `request`); the result is always
4873
+ * canonical so every later stage handles a single form.
4874
+ */
4875
+ declare const parseDesktopCommand: (input: unknown) => ParsedDesktopCommand;
4876
+ //#endregion
4877
+ //#region ../protocol/dist/app.d.ts
4878
+ type AppContentKind = "web" | "file" | "board";
4879
+ /**
4880
+ * Provenance summary for a published app version. The session/turn identity is
4881
+ * included only when the caller may view the source session, so a viewer who
4882
+ * cannot read a session still learns nothing about it.
4883
+ */
4884
+ type AppVersionSource = {
4885
+ via?: string;
4886
+ sessionId?: string;
4887
+ turnId?: string;
4888
+ /** Turn sequence within `sessionId`, for deep links into a session. */
4889
+ turnSequence?: number;
4890
+ /** Present only when the caller holds `session.view` for the source session. */
4891
+ session?: {
4892
+ id: string;
4893
+ title: string | null;
4894
+ } | null;
4895
+ };
4896
+ type AppArtifactDownloadDescriptor = {
4897
+ artifactRootKey: string;
4898
+ manifestKey: string;
4899
+ manifestSha256: string;
4900
+ };
4901
+ type AppArtifactDescriptor = (({
4902
+ kind: "web";
4903
+ mimeType: "text/html";
4904
+ sizeBytes: number;
4905
+ fileCount: number;
4906
+ } | {
4907
+ kind: "file";
4908
+ name: string;
4909
+ mimeType: string | null;
4910
+ sizeBytes: number;
4911
+ sha256: string;
4912
+ }) & {
4913
+ download?: AppArtifactDownloadDescriptor;
4914
+ }) | {
4915
+ kind: "board";
4916
+ boardId: string;
4917
+ boardVersion: number;
4918
+ sizeBytes: number;
4919
+ fileCount: number;
4920
+ };
4921
+ type AppArtifactManifestFile = {
4922
+ /** Path below the immutable artifact's content root. */
4923
+ artifactPath: string;
4924
+ /** Safe relative path restored by download clients. */
4925
+ outputPath: string;
4926
+ mimeType: string | null;
4927
+ sizeBytes: number;
4928
+ sha256: string;
4929
+ };
4930
+ type AppArtifactManifest = {
4931
+ kind: "cohub.work.artifact-manifest";
4932
+ version: 1;
4933
+ targetType: "file" | "directory";
4934
+ targetRef: string;
4935
+ entrypoint: string;
4936
+ fileCount: number;
4937
+ sizeBytes: number;
4938
+ files: AppArtifactManifestFile[];
4939
+ };
4940
+ type AppBoardAsset = {
4941
+ sourcePath: string;
4942
+ status: "captured" | "missing" | "rejected";
4943
+ reason?: string;
4944
+ artifactPath?: string;
4945
+ mimeType?: string | null;
4946
+ sizeBytes?: number;
4947
+ sha256?: string;
4948
+ };
4949
+ type AppBoardArtifactManifest = {
4950
+ kind: "cohub.work.board";
4951
+ version: 1;
4952
+ sourcePath: string;
4953
+ snapshot: BoardSnapshot;
4954
+ assets: AppBoardAsset[];
4955
+ };
4956
+ //#endregion
4957
+ //#region ../protocol/dist/realtime/types.d.ts
4958
+ declare const REALTIME_DOMAINS: readonly ["system", "session", "space", "label", "room", "ui", "desktop"];
4959
+ type RealtimeDomain = (typeof REALTIME_DOMAINS)[number];
4960
+ type RealtimeRoom = `space:${string}` | `user:${string}` | `board:${string}` | `room:${string}`;
4961
+ type RealtimeEnvelope = {
4962
+ id: string;
4963
+ timestamp: number;
4964
+ domain: RealtimeDomain;
4965
+ type: string;
4966
+ requestId?: string | null;
4967
+ spaceId?: string | null;
4968
+ sessionId?: string | null;
4969
+ roomId?: string | null;
4970
+ rooms?: RealtimeRoom[];
4971
+ payload: Record<string, unknown>;
4972
+ };
4973
+ type ChannelEnvelope = RealtimeEnvelope;
4974
+ type RealtimeRoomDescriptor = {
4975
+ id: string;
4976
+ code: string;
4977
+ createdAt: string;
4978
+ expiresAt: string;
4979
+ maxParticipants: number;
4980
+ /**
4981
+ * When true a viewer holds at most one seat: rejoining from another tab, or
4982
+ * after an unclean disconnect, takes over the existing seat instead of
4983
+ * consuming a second one. Default false, which gives every connection its own
4984
+ * seat (two tabs are two participants).
4985
+ */
4986
+ seatPerUser: boolean;
4987
+ };
4988
+ type RealtimeRoomMember = {
4989
+ participantId: string;
4990
+ joinedAt: string;
4991
+ presence: Record<string, unknown> | null;
4992
+ /**
4993
+ * Opaque, stable per room and viewer. Connections of the same viewer share it,
4994
+ * so an application can group or de-duplicate participants without seeing the
4995
+ * underlying account id.
4996
+ */
4997
+ userKey?: string;
4998
+ };
4999
+ type RealtimeRoomEvent = {
5000
+ id: string;
5001
+ timestamp: number;
5002
+ domain: "room";
5003
+ type: "realtime.room.event";
5004
+ requestId?: string | null;
5005
+ spaceId?: null;
5006
+ sessionId?: null;
5007
+ rooms: RealtimeRoom[];
5008
+ payload: {
5009
+ roomId: string;
5010
+ sequence: number;
5011
+ event: string;
5012
+ data: unknown;
5013
+ clientEventId: string | null;
5014
+ sender: {
5015
+ participantId: string;
5016
+ };
5017
+ };
5018
+ };
5019
+ type RealtimeRoomJoinedEvent = {
5020
+ id: string;
5021
+ timestamp: number;
5022
+ domain: "room";
5023
+ type: "realtime.room.joined";
5024
+ requestId?: string | null;
5025
+ spaceId?: null;
5026
+ sessionId?: null;
5027
+ rooms: RealtimeRoom[];
5028
+ payload: {
5029
+ room: RealtimeRoomDescriptor;
5030
+ participantId: string;
5031
+ members: RealtimeRoomMember[];
5032
+ sequence: number;
5033
+ };
5034
+ };
5035
+ type RealtimeRoomMemberChangedEvent = {
5036
+ id: string;
5037
+ timestamp: number;
5038
+ domain: "room";
5039
+ type: "realtime.room.member.joined" | "realtime.room.member.left";
5040
+ requestId?: string | null;
5041
+ spaceId?: null;
5042
+ sessionId?: null;
5043
+ rooms: RealtimeRoom[];
5044
+ payload: {
5045
+ roomId: string;
5046
+ sequence: number;
5047
+ member: RealtimeRoomMember;
5048
+ };
5049
+ };
5050
+ type RealtimeRoomPresenceUpdatedEvent = {
5051
+ id: string;
5052
+ timestamp: number;
5053
+ domain: "room";
5054
+ type: "realtime.room.presence.updated";
5055
+ requestId?: string | null;
5056
+ spaceId?: null;
5057
+ sessionId?: null;
5058
+ rooms: RealtimeRoom[];
5059
+ payload: {
5060
+ roomId: string;
5061
+ sequence: number;
5062
+ member: RealtimeRoomMember;
5063
+ };
5064
+ };
5065
+ type RealtimeRoomRequestEvent = {
5066
+ id: string;
5067
+ timestamp: number;
5068
+ domain: "room";
5069
+ type: "realtime.room.request.ok";
5070
+ requestId?: string | null;
5071
+ spaceId?: null;
5072
+ sessionId?: null;
5073
+ roomId?: string | null;
5074
+ payload: {
5075
+ roomId: string;
5076
+ sequence?: number;
5077
+ eventId?: string | null;
5078
+ clientEventId?: string | null;
5079
+ };
5080
+ };
5081
+ type RealtimeRoomRequestErrorEvent = {
5082
+ id: string;
5083
+ timestamp: number;
5084
+ domain: "room";
5085
+ type: "realtime.room.request.error";
5086
+ requestId?: string | null;
5087
+ spaceId?: null;
5088
+ sessionId?: null;
5089
+ roomId?: string | null;
5090
+ payload: {
5091
+ roomId: string;
5092
+ code: string;
5093
+ message: string;
5094
+ };
5095
+ };
5096
+ type RealtimeRoomClosedEvent = {
5097
+ id: string;
5098
+ timestamp: number;
5099
+ domain: "room";
5100
+ type: "realtime.room.closed";
5101
+ requestId?: string | null;
5102
+ spaceId?: null;
5103
+ sessionId?: null;
5104
+ rooms: RealtimeRoom[];
5105
+ payload: {
5106
+ roomId: string;
5107
+ reason: "expired" | "left" | "revoked" | "superseded";
5108
+ };
5109
+ };
5110
+ type SystemReadyEvent = {
5111
+ id: string;
5112
+ timestamp: number;
5113
+ domain: "system";
5114
+ type: "system.ready";
5115
+ requestId?: string | null;
5116
+ spaceId?: string | null;
5117
+ sessionId?: string | null;
5118
+ payload: {
5119
+ connectionId: string;
5120
+ };
5121
+ };
5122
+ type SystemAuthOkEvent = {
5123
+ id: string;
5124
+ timestamp: number;
5125
+ domain: "system";
5126
+ type: "system.auth.ok";
5127
+ requestId?: string | null;
5128
+ spaceId?: string | null;
5129
+ sessionId?: string | null;
5130
+ payload: {
5131
+ connectionId: string;
5132
+ user: Record<string, unknown>;
5133
+ capabilities?: string[];
5134
+ };
5135
+ };
5136
+ type SystemRequestErrorEvent = {
5137
+ id: string;
5138
+ timestamp: number;
5139
+ domain: "system";
5140
+ type: "system.request.error";
5141
+ requestId?: string | null;
5142
+ spaceId?: string | null;
5143
+ sessionId?: string | null;
5144
+ payload: {
5145
+ code?: string;
5146
+ message: string;
5147
+ };
5148
+ };
5149
+ type SystemPongEvent = {
5150
+ id: string;
5151
+ timestamp: number;
5152
+ domain: "system";
5153
+ type: "system.pong";
5154
+ requestId?: string | null;
5155
+ spaceId?: string | null;
5156
+ sessionId?: string | null;
5157
+ payload: Record<string, unknown>;
5158
+ };
5159
+ type SystemAckOkEvent = {
5160
+ id: string;
5161
+ timestamp: number;
5162
+ domain: "system";
5163
+ type: "system.ack.ok";
5164
+ requestId?: string | null;
5165
+ spaceId?: string | null;
5166
+ sessionId?: string | null;
5167
+ payload: {
5168
+ eventId?: string;
5169
+ };
5170
+ };
5171
+ type SystemSubscribeOkEvent = {
5172
+ id: string;
5173
+ timestamp: number;
5174
+ domain: "system";
5175
+ type: "system.subscribe.ok";
5176
+ requestId?: string | null;
5177
+ spaceId?: string | null;
5178
+ sessionId?: string | null;
5179
+ payload: {
5180
+ rooms: RealtimeRoom[];
5181
+ };
5182
+ };
5183
+ type SystemSubscribeErrorEvent = {
5184
+ id: string;
5185
+ timestamp: number;
5186
+ domain: "system";
5187
+ type: "system.subscribe.error";
5188
+ requestId?: string | null;
5189
+ spaceId?: string | null;
5190
+ sessionId?: string | null;
5191
+ payload: {
5192
+ rejected: Array<{
5193
+ room: string;
5194
+ code: "BAD_ROOM" | "FORBIDDEN";
5195
+ message: string;
5196
+ }>;
5197
+ };
5198
+ };
5199
+ type RealtimeSessionRecord = Pick<SessionRecord$1, "id" | "spaceId" | "userUuid" | "title" | "source" | "status" | "activeTurn" | "externalSessionId" | "latestMessageText" | "lastMessageAt" | "lastMessageId" | "createdAt" | "updatedAt">;
5200
+ type SessionCreatedEvent = {
5201
+ id: string;
5202
+ timestamp: number;
5203
+ domain: "session";
5204
+ type: "session.created";
5205
+ requestId?: string | null;
5206
+ spaceId: string;
5207
+ sessionId: string;
5208
+ payload: {
5209
+ session: RealtimeSessionRecord;
5210
+ };
5211
+ };
5212
+ type SessionUpdatedEvent = {
5213
+ id: string;
5214
+ timestamp: number;
5215
+ domain: "session";
5216
+ type: "session.updated";
5217
+ requestId?: string | null;
5218
+ spaceId: string;
5219
+ sessionId: string;
5220
+ payload: {
5221
+ session: RealtimeSessionRecord;
5222
+ changed: string[];
5223
+ };
5224
+ };
5225
+ type SessionRequestAcceptedEvent = {
5226
+ id: string;
5227
+ timestamp: number;
5228
+ domain: "session";
5229
+ type: "session.request.accepted";
5230
+ requestId?: string | null;
5231
+ spaceId: string;
5232
+ sessionId: string;
5233
+ payload: {
5234
+ clientMessageId?: string | null;
5235
+ turnId?: string | null;
5236
+ userMessageId?: string | null;
5237
+ traceId?: string | null;
5238
+ };
5239
+ };
5240
+ type SessionRequestErrorEvent = {
5241
+ id: string;
5242
+ timestamp: number;
5243
+ domain: "session";
5244
+ type: "session.request.error";
5245
+ requestId?: string | null;
5246
+ spaceId?: string | null;
5247
+ sessionId?: string | null;
5248
+ payload: {
5249
+ code?: string;
5250
+ message: string;
5251
+ clientMessageId?: string | null;
5252
+ billing?: BillingPayload | null;
5253
+ };
5254
+ };
5255
+ type RealtimePatchOperation = {
5256
+ o: "append";
5257
+ p: string;
5258
+ v: unknown;
5259
+ } | {
5260
+ o: "replace";
5261
+ p: string;
5262
+ v: unknown;
5263
+ } | {
5264
+ o: "add";
5265
+ p: string;
5266
+ v: unknown;
5267
+ } | {
5268
+ o: "merge";
5269
+ p: string;
5270
+ v: Record<string, unknown>;
5271
+ } | {
5272
+ o: "remove";
5273
+ p: string;
5274
+ } | {
5275
+ v: unknown;
5276
+ o?: undefined;
5277
+ p?: undefined;
5278
+ };
5279
+ type SessionTurnPatchEvent = {
5280
+ id: string;
5281
+ timestamp: number;
5282
+ domain: "session";
5283
+ type: "session.turn.patch";
5284
+ requestId?: string | null;
5285
+ spaceId: string;
5286
+ sessionId: string;
5287
+ payload: {
5288
+ turnId: string | null;
5289
+ messageId: string | null;
5290
+ messageOrdinal?: number | null;
5291
+ sourceMessageId?: string | null;
5292
+ anchorUserMessageId: string | null;
5293
+ seq: number;
5294
+ baseSeq: number;
5295
+ ops: RealtimePatchOperation[];
5296
+ };
5297
+ };
5298
+ type SessionTurnErrorEvent = {
5299
+ id: string;
5300
+ timestamp: number;
5301
+ domain: "session";
5302
+ type: "session.turn.error";
5303
+ requestId?: string | null;
5304
+ spaceId: string;
5305
+ sessionId: string;
5306
+ payload: {
5307
+ turnId?: string | null;
5308
+ anchorUserMessageId: string | null;
5309
+ error: string;
5310
+ };
5311
+ };
5312
+ type SessionTurnLifecyclePhase = "llm_call_started";
5313
+ type SessionTurnLifecycleEvent = {
5314
+ id: string;
5315
+ timestamp: number;
5316
+ domain: "session";
5317
+ type: "session.turn.lifecycle";
5318
+ requestId?: string | null;
5319
+ spaceId: string;
5320
+ sessionId: string;
5321
+ payload: {
5322
+ turnId: string | null;
5323
+ anchorUserMessageId: string | null;
5324
+ phase: SessionTurnLifecyclePhase;
5325
+ llmRound: number;
5326
+ provider: string | null;
5327
+ model: string | null;
5328
+ at: string;
5329
+ };
5330
+ };
5331
+ type RealtimeTurnRecord = Partial<Pick<SessionTurnRecord, "id" | "sessionId" | "sequence" | "executionKind" | "status" | "intent" | "userUuid" | "authorProfile" | "userContent" | "userText" | "assistantContent" | "assistantText" | "provider" | "model" | "stopReason" | "errorMessage" | "finalUsage" | "totalUsage" | "summary" | "intermediateIndex" | "intermediateSummary" | "harnessIndex" | "meta" | "thinkingLevel" | "startedAt" | "completedAt" | "durationMs" | "createdAt" | "updatedAt">>;
5332
+ type RealtimeMessageRecord = Pick<MessageRecord, "id" | "sessionId" | "role" | "content" | "text" | "sequence" | "provider" | "model" | "stopReason" | "errorMessage" | "usage" | "meta" | "startedAt" | "completedAt" | "durationMs" | "createdAt">;
5333
+ type SessionTurnCreatedEvent = {
5334
+ id: string;
5335
+ timestamp: number;
5336
+ domain: "session";
5337
+ type: "session.turn.created";
5338
+ requestId?: string | null;
5339
+ spaceId: string;
5340
+ sessionId: string;
5341
+ payload: {
5342
+ turn: RealtimeTurnRecord;
5343
+ };
5344
+ };
5345
+ type SessionTurnUpdatedEvent = {
5346
+ id: string;
5347
+ timestamp: number;
5348
+ domain: "session";
5349
+ type: "session.turn.updated";
5350
+ requestId?: string | null;
5351
+ spaceId: string;
5352
+ sessionId: string;
5353
+ payload: {
5354
+ turn: RealtimeTurnRecord;
5355
+ };
5356
+ };
5357
+ type SessionTurnFinalizedEvent = {
5358
+ id: string;
5359
+ timestamp: number;
5360
+ domain: "session";
5361
+ type: "session.turn.finalized";
5362
+ requestId?: string | null;
5363
+ spaceId: string;
5364
+ sessionId: string;
5365
+ payload: {
5366
+ turn: RealtimeTurnRecord;
5367
+ sessionLabelRefs: string[] | null;
5368
+ };
5369
+ };
5370
+ type SessionTurnNotifyEvent = {
5371
+ id: string;
5372
+ timestamp: number;
5373
+ domain: "session";
5374
+ type: "session.turn.notify";
5375
+ requestId?: string | null;
5376
+ spaceId: string;
5377
+ sessionId: string;
5378
+ payload: {
5379
+ spaceId: string;
5380
+ sessionId: string;
5381
+ turnId: string;
5382
+ status: SessionTurnRecord["status"];
5383
+ finishReason?: SessionTurnSummary["finishReason"] | null;
5384
+ userPreview: string | null;
5385
+ durationMs: number | null;
5386
+ stepCount: number | null;
5387
+ sequence: number | null;
5388
+ provider: string | null;
5389
+ model: string | null;
5390
+ completedAt: string | null;
5391
+ };
5719
5392
  };
5720
- type SpaceFsChangedPayload = {
5721
- source: "sandbox-watch" | "api-fs" | "bootstrap" | "sandbox-watch-started";
5722
- /** Client-generated id used to identify an API write echoed over realtime. */
5723
- mutationId?: string;
5724
- seq?: number;
5725
- resync?: boolean;
5726
- changes: SpaceFsChange[];
5393
+ type SessionMessagePersistedEvent = {
5394
+ id: string;
5395
+ timestamp: number;
5396
+ domain: "session";
5397
+ type: "session.message.persisted";
5398
+ requestId?: string | null;
5399
+ spaceId: string;
5400
+ sessionId: string;
5401
+ payload: {
5402
+ message: RealtimeMessageRecord;
5403
+ };
5727
5404
  };
5728
- //#endregion
5729
- //#region ../protocol/dist/ports/index.d.ts
5730
- declare const SANDBOX_PUBLIC_PORTS: readonly [3000, 5173];
5731
- type SandboxPublicPort = (typeof SANDBOX_PUBLIC_PORTS)[number];
5732
- type SpacePortStatus = "listening" | "closed";
5733
- type SpacePortChange = {
5734
- port: SandboxPublicPort | number;
5735
- protocol: "tcp";
5736
- status: SpacePortStatus;
5737
- observedAt: number;
5405
+ type SpaceFsChangedEvent = {
5406
+ id: string;
5407
+ timestamp: number;
5408
+ domain: "space";
5409
+ type: "space.fs.changed";
5410
+ requestId?: string | null;
5411
+ spaceId: string;
5412
+ sessionId?: string | null;
5413
+ payload: SpaceFsChangedPayload;
5738
5414
  };
5739
- type SpacePortsChangedPayload = {
5740
- source: "sandbox-port-watch" | "sandbox-port-watch-started";
5741
- seq?: number;
5742
- resync?: boolean;
5743
- ports: SpacePortChange[];
5415
+ type SpacePortsChangedEvent = {
5416
+ id: string;
5417
+ timestamp: number;
5418
+ domain: "space";
5419
+ type: "space.ports.changed";
5420
+ requestId?: string | null;
5421
+ spaceId: string;
5422
+ sessionId?: string | null;
5423
+ payload: SpacePortsChangedPayload;
5744
5424
  };
5745
- type SpacePublicEndpoint = {
5746
- url: string;
5747
- status?: SpacePortStatus | "unknown";
5748
- observedAt?: number;
5425
+ type SpacePresenceUser$1 = {
5426
+ userId: string;
5427
+ connectionCount: number;
5428
+ lastSeenAt: string;
5429
+ meta: Record<string, unknown> | null;
5430
+ metas: Record<string, unknown>[];
5431
+ profile: {
5432
+ userUuid: string;
5433
+ username: string | null;
5434
+ displayName: string;
5435
+ avatarUrl: string | null;
5436
+ };
5749
5437
  };
5750
- type SpacePublicEndpoints = Record<string, SpacePublicEndpoint>;
5751
- //#endregion
5752
- //#region ../protocol/dist/navigation.d.ts
5753
- /** Shared payload shapes used by local App navigation and remote desktop open. */
5754
- type NavigationLaunch = {
5755
- search?: string;
5756
- hash?: string;
5438
+ type SpacePresenceSnapshot$1 = {
5439
+ spaceId: string;
5440
+ users: SpacePresenceUser$1[];
5441
+ updatedAt: string;
5757
5442
  };
5758
- type NavigationCall = {
5759
- method: string;
5760
- input?: unknown;
5443
+ type SpacePresenceUpdatedEvent = {
5444
+ id: string;
5445
+ timestamp: number;
5446
+ domain: "space";
5447
+ type: "space.presence.updated";
5448
+ requestId?: string | null;
5449
+ spaceId: string;
5450
+ sessionId?: string | null;
5451
+ payload: SpacePresenceSnapshot$1;
5761
5452
  };
5762
- //#endregion
5763
- //#region ../protocol/dist/desktop-command.d.ts
5764
- declare const DESKTOP_COMMAND_VERSION = 1;
5765
- /** Persisted and broadcast, so every field is capped; MAX_BYTES bounds the whole. */
5766
- declare const DESKTOP_COMMAND_PAYLOAD_MAX_BYTES: number;
5767
- declare const DESKTOP_COMMAND_DEFAULT_TIMEOUT_MS: number;
5768
- declare const DESKTOP_COMMAND_MAX_TIMEOUT_MS: number;
5769
- declare const DESKTOP_COMMAND_SETTLEMENT_GRACE_SECONDS: number;
5770
- /** Keeps pending commands reportable for the full wait window plus settlement grace. */
5771
- declare const DESKTOP_COMMAND_PENDING_TTL_SECONDS: number;
5772
- declare const DESKTOP_COMMAND_TERMINAL_TTL_SECONDS: number;
5773
- type DesktopCommandStatus = "pending" | "applied" | "no_active_client" | "desktop_host_unavailable" | "rejected" | "unsupported" | "timeout";
5774
- declare const isTerminalDesktopCommandStatus: (status: DesktopCommandStatus) => boolean;
5453
+ type BoardChangedEvent = {
5454
+ id: string;
5455
+ timestamp: number;
5456
+ domain: "space";
5457
+ type: "board.changed";
5458
+ requestId?: string | null;
5459
+ spaceId: string;
5460
+ sessionId?: string | null;
5461
+ payload: {
5462
+ boardId: string;
5463
+ actorId: string;
5464
+ mutationId: string;
5465
+ version: number;
5466
+ changed: BoardMutationReceipt["changed"];
5467
+ /** Server-authored animation rows for a small, pure animation mutation. */
5468
+ animationPatch?: {
5469
+ effects: BoardEffect[];
5470
+ compositions: BoardComposition[];
5471
+ playback?: BoardPlaybackSnapshot | null;
5472
+ };
5473
+ source?: RequestSource;
5474
+ };
5475
+ };
5476
+ type BoardAwarenessUpdatedEvent = {
5477
+ id: string;
5478
+ timestamp: number;
5479
+ domain: "space";
5480
+ type: "board.awareness.updated";
5481
+ requestId?: string | null;
5482
+ spaceId: string;
5483
+ sessionId?: string | null;
5484
+ rooms?: RealtimeRoom[];
5485
+ payload: {
5486
+ boardId: string;
5487
+ connectionId: string;
5488
+ actorId: string;
5489
+ actorName: string;
5490
+ seq: number;
5491
+ update: BoardAwarenessUpdate;
5492
+ };
5493
+ };
5494
+ type BoardPlaybackChangedEvent = {
5495
+ id: string;
5496
+ timestamp: number;
5497
+ domain: "space";
5498
+ type: "board.playback.changed";
5499
+ requestId?: string | null;
5500
+ spaceId: string;
5501
+ sessionId?: string | null;
5502
+ payload: BoardPlaybackSnapshot;
5503
+ };
5504
+ type RealtimeAppStatus = "published" | "disabled";
5505
+ type RealtimeAppVisibility = "public" | "space";
5506
+ type RealtimeAppTargetType = "file" | "directory" | "port";
5775
5507
  /**
5776
- * How the App surface should be presented on the desktop.
5777
- *
5778
- * - `window` (default) — opens as a preview tab in the workspace panel.
5779
- * - `overlay` — renders in a transparent, chrome-free layer above the
5780
- * workspace. The App controls its own geometry via `configure.request`
5781
- * and input hit-testing via `inputRegion`. Stays below system UI.
5508
+ * Canonical wire shape of an app record: realtime events and `/api/apps`
5509
+ * responses. The legacy `/api/works` mount serves the work-era field names
5510
+ * (`workScopes`) until the next breaking protocol version.
5782
5511
  */
5783
- type DesktopSurface = "window" | "overlay";
5512
+ type RealtimeAppRecord = {
5513
+ id: string;
5514
+ spaceId: string;
5515
+ userUuid: string;
5516
+ slug: string;
5517
+ status: RealtimeAppStatus;
5518
+ visibility: RealtimeAppVisibility;
5519
+ targetType: RealtimeAppTargetType;
5520
+ targetRef: string;
5521
+ assetKey: string | null;
5522
+ currentVersionId: string | null;
5523
+ latestVersion: number;
5524
+ publishedAt: string | null;
5525
+ appScopes: string[];
5526
+ allowedViewerScopes: string[];
5527
+ meta: Record<string, unknown> | null;
5528
+ createdAt: string | null;
5529
+ updatedAt: string | null;
5530
+ };
5784
5531
  /**
5785
- * The surface a desktop open should use: an explicit request wins, then
5786
- * whatever the App declared at publish time. `window` is the implicit
5787
- * default and yields `undefined` so the command stays compact.
5532
+ * Canonical wire shape of a published app version. The legacy `/api/works`
5533
+ * mount serves the work-era `workId` field name until the next breaking
5534
+ * protocol version.
5788
5535
  */
5789
- declare function resolveOpenSurface(requested: unknown, declared: unknown): DesktopSurface | undefined;
5790
- type DesktopAppTarget = {
5791
- kind: "app";
5536
+ type RealtimeAppVersionRecord = {
5537
+ id: string;
5792
5538
  appId: string;
5793
- label?: string;
5794
- launch?: NavigationLaunch;
5795
- /** Requested surface role. Defaults to `"window"` when absent. */
5796
- surface?: DesktopSurface;
5797
- };
5798
- type DesktopFileTarget = {
5799
- kind: "file";
5800
- path: string;
5801
- };
5802
- type DesktopTarget = DesktopAppTarget | DesktopFileTarget;
5803
- type DesktopCall = NavigationCall;
5804
- type DesktopOpenCommand = {
5805
- type: "desktop.open";
5806
- target: DesktopTarget;
5807
- call?: DesktopCall;
5808
- };
5809
- type DesktopCommand = DesktopOpenCommand;
5810
- type DesktopCommandError = {
5811
- code: string;
5812
- message: string;
5539
+ version: number;
5540
+ targetType: RealtimeAppTargetType;
5541
+ targetRef: string;
5542
+ assetKey: string | null;
5543
+ contentKind: AppContentKind;
5544
+ artifact: AppArtifactDescriptor | null;
5545
+ meta: Record<string, unknown> | null;
5546
+ /** Version provenance; session identity is gated on `session.view`. */
5547
+ source: AppVersionSource | null;
5548
+ createdAt: string | null;
5813
5549
  };
5814
- type DesktopCommandRecord = {
5815
- version: typeof DESKTOP_COMMAND_VERSION;
5816
- commandId: string;
5817
- status: DesktopCommandStatus;
5818
- command: DesktopCommand;
5819
- actorUserId: string;
5820
- targetClientId: string;
5821
- source: RequestSource | null;
5822
- result?: unknown;
5823
- error?: DesktopCommandError | null;
5550
+ type AppVersionPublishedEvent = {
5551
+ id: string;
5552
+ timestamp: number;
5553
+ domain: "space";
5554
+ type: "app.version.published";
5555
+ requestId?: string | null;
5556
+ spaceId: string;
5557
+ sessionId?: null;
5558
+ payload: {
5559
+ app: RealtimeAppRecord;
5560
+ version: RealtimeAppVersionRecord;
5561
+ standaloneUrl?: string | null;
5562
+ previousVersionId: string | null;
5563
+ actor: {
5564
+ userId: string;
5565
+ };
5566
+ source: RequestSource | null;
5567
+ };
5568
+ };
5569
+ type RealtimeTaskRecord = {
5570
+ id: string;
5571
+ type: string;
5572
+ status: TaskRunStatus;
5573
+ jobId: string;
5574
+ cronJobId: string | null;
5575
+ spaceId: string | null;
5576
+ sessionId: string | null;
5577
+ turnId: string | null;
5578
+ userId: string | null;
5579
+ attemptCount: number;
5580
+ scheduledAt: string | null;
5581
+ startedAt: string | null;
5582
+ finishedAt: string | null;
5583
+ errorMessage: string | null;
5824
5584
  createdAt: string;
5825
- settledAt?: string | null;
5585
+ updatedAt: string;
5826
5586
  };
5827
- type DesktopCommandDispatchedPayload = {
5828
- commandId: string;
5829
- targetClientId: string;
5830
- command: DesktopCommand;
5831
- source: RequestSource | null;
5587
+ type TaskCreatedEvent = {
5588
+ id: string;
5589
+ timestamp: number;
5590
+ domain: "space";
5591
+ type: "task.created";
5592
+ requestId?: string | null;
5593
+ spaceId?: string | null;
5594
+ sessionId?: string | null;
5595
+ payload: {
5596
+ task: RealtimeTaskRecord;
5597
+ };
5832
5598
  };
5833
- declare const isDesktopCallMethod: (value: unknown) => value is string;
5834
- type ParsedDesktopCommand = {
5835
- command: DesktopCommand;
5836
- error: null;
5837
- } | {
5838
- command: null;
5839
- error: string;
5599
+ type TaskUpdatedEvent = {
5600
+ id: string;
5601
+ timestamp: number;
5602
+ domain: "space";
5603
+ type: "task.updated";
5604
+ requestId?: string | null;
5605
+ spaceId?: string | null;
5606
+ sessionId?: string | null;
5607
+ payload: {
5608
+ task: RealtimeTaskRecord;
5609
+ changed: string[];
5610
+ };
5611
+ };
5612
+ type LabelAssignmentsUpdatedEvent = {
5613
+ id: string;
5614
+ timestamp: number;
5615
+ domain: "label";
5616
+ type: "label.assignments.updated";
5617
+ requestId?: string | null;
5618
+ /** Space room target; null for user-scoped label events (delivered to user room). */
5619
+ spaceId: string | null;
5620
+ sessionId?: string | null;
5621
+ payload: {
5622
+ resourceType: "session" | "checkpoint" | "file" | "space";
5623
+ resourceRef: string;
5624
+ labels: unknown[];
5625
+ assignments: unknown[];
5626
+ items?: unknown[];
5627
+ affectedLabelIds: string[];
5628
+ };
5840
5629
  };
5841
5630
  /**
5842
- * Parse a desktop command from untrusted input.
5843
- *
5844
- * Accepts both the canonical `desktop.open` shape (`target` / `call`) and the
5845
- * legacy `preview.show` shape (`preview` / `request`); the result is always
5846
- * canonical so every later stage handles a single form.
5631
+ * A desktop command addressed at one frontend instance of the acting user.
5632
+ * Delivered to the user room; every client compares `targetClientId` with its
5633
+ * own client id and ignores commands that are not for it.
5847
5634
  */
5848
- declare const parseDesktopCommand: (input: unknown) => ParsedDesktopCommand;
5635
+ type DesktopCommandDispatchedEvent = {
5636
+ id: string;
5637
+ timestamp: number;
5638
+ domain: "desktop";
5639
+ type: "desktop.command.dispatched";
5640
+ requestId?: string | null;
5641
+ spaceId?: string | null;
5642
+ sessionId?: string | null;
5643
+ rooms?: RealtimeRoom[];
5644
+ payload: DesktopCommandDispatchedPayload;
5645
+ };
5646
+ type RealtimeServerEvent = SystemReadyEvent | SystemAuthOkEvent | SystemRequestErrorEvent | SystemPongEvent | SystemAckOkEvent | SystemSubscribeOkEvent | SystemSubscribeErrorEvent | SessionCreatedEvent | SessionUpdatedEvent | SessionRequestAcceptedEvent | SessionRequestErrorEvent | SessionTurnCreatedEvent | SessionTurnPatchEvent | SessionTurnErrorEvent | SessionTurnLifecycleEvent | SessionTurnUpdatedEvent | SessionTurnFinalizedEvent | SessionTurnNotifyEvent | SessionMessagePersistedEvent | SpaceFsChangedEvent | SpacePortsChangedEvent | SpacePresenceUpdatedEvent | BoardChangedEvent | BoardAwarenessUpdatedEvent | BoardPlaybackChangedEvent | AppVersionPublishedEvent | TaskCreatedEvent | TaskUpdatedEvent | LabelAssignmentsUpdatedEvent | DesktopCommandDispatchedEvent | RealtimeRoomEvent | RealtimeRoomJoinedEvent | RealtimeRoomMemberChangedEvent | RealtimeRoomPresenceUpdatedEvent | RealtimeRoomRequestEvent | RealtimeRoomRequestErrorEvent | RealtimeRoomClosedEvent;
5849
5647
  //#endregion
5850
- //#region ../protocol/dist/app.d.ts
5851
- type AppContentKind = "web" | "file" | "board";
5648
+ //#region ../../node_modules/.pnpm/@neta-art+generation@0.1.30/node_modules/@neta-art/generation/dist/builtins-jIE_k69Z.d.ts
5649
+ //#region src/types.d.ts
5650
+ declare const MODEL_SCHEMA: "neta.generation.model.v1";
5651
+ declare const GENERATION_MODEL_CATEGORIES: readonly ["image", "video", "audio"];
5652
+ type GenerationModelCategory = (typeof GENERATION_MODEL_CATEGORIES)[number];
5653
+ declare const GENERATION_PRICING_UNITS: readonly ["image", "second", "request", "1m_tokens"];
5654
+ type GenerationPricingUnit = (typeof GENERATION_PRICING_UNITS)[number];
5852
5655
  /**
5853
- * Provenance summary for a published app version. The session/turn identity is
5854
- * included only when the caller may view the source session, so a viewer who
5855
- * cannot read a session still learns nothing about it.
5656
+ * Display-only unit price for a model catalog. `unit` names what one charge
5657
+ * covers; `amount` is the exact unit price, or a `min`/`max` pair when the
5658
+ * price depends on request parameters (resolution, duration, quality).
5856
5659
  */
5857
- type AppVersionSource = {
5858
- via?: string;
5859
- sessionId?: string;
5860
- turnId?: string;
5861
- /** Turn sequence within `sessionId`, for deep links into a session. */
5862
- turnSequence?: number;
5863
- /** Present only when the caller holds `session.view` for the source session. */
5864
- session?: {
5865
- id: string;
5866
- title: string | null;
5867
- } | null;
5660
+ type GenerationModelPricing = {
5661
+ unit: GenerationPricingUnit;
5662
+ /** Short qualifier shown with the price, e.g. "std-pro". */
5663
+ note?: string;
5664
+ } & ({
5665
+ amount: number;
5666
+ min?: never;
5667
+ max?: never;
5668
+ } | {
5669
+ amount?: never;
5670
+ min: number;
5671
+ max: number;
5672
+ });
5673
+ type GenerationSource = {
5674
+ type: "url";
5675
+ url: string;
5676
+ } | {
5677
+ type: "base64";
5678
+ mediaType: string;
5679
+ data: string;
5868
5680
  };
5869
- type AppArtifactDownloadDescriptor = {
5870
- artifactRootKey: string;
5871
- manifestKey: string;
5872
- manifestSha256: string;
5681
+ type GenerationContentBlockMeta = Record<string, unknown>;
5682
+ type GenerationContentBlock = {
5683
+ type: "text";
5684
+ text: string;
5685
+ meta?: GenerationContentBlockMeta;
5686
+ } | {
5687
+ type: "image";
5688
+ source: GenerationSource;
5689
+ meta?: GenerationContentBlockMeta;
5690
+ } | {
5691
+ type: "video";
5692
+ source: GenerationSource;
5693
+ meta?: GenerationContentBlockMeta;
5694
+ } | {
5695
+ type: "audio";
5696
+ source: GenerationSource;
5697
+ meta?: GenerationContentBlockMeta;
5873
5698
  };
5874
- type AppArtifactDescriptor = (({
5875
- kind: "web";
5876
- mimeType: "text/html";
5877
- sizeBytes: number;
5878
- fileCount: number;
5699
+ type GenerationResult = {
5700
+ content: GenerationContentBlock[];
5701
+ requestId?: string;
5702
+ cost?: number;
5703
+ };
5704
+ type GenerationContentSpec = {
5705
+ type: "text" | "image" | "video" | "audio";
5706
+ required?: boolean;
5707
+ min?: number;
5708
+ max?: number;
5709
+ sources?: Array<GenerationSource["type"]>;
5710
+ roles?: string[];
5711
+ roleRequired?: boolean;
5712
+ merge?: "newline" | "space" | "concat";
5713
+ meta?: Record<string, unknown>;
5714
+ description?: string;
5715
+ };
5716
+ type GenerationDimensionsSpec = {
5717
+ separator?: "x" | "*";
5718
+ min?: number;
5719
+ max?: number;
5720
+ multipleOf?: number;
5721
+ };
5722
+ type GenerationParameterSpec = {
5723
+ type: "string";
5724
+ optional?: boolean;
5725
+ default?: string;
5726
+ enum?: string[];
5727
+ dimensions?: GenerationDimensionsSpec;
5728
+ description?: string;
5729
+ examples?: string[];
5879
5730
  } | {
5880
- kind: "file";
5881
- name: string;
5882
- mimeType: string | null;
5883
- sizeBytes: number;
5884
- sha256: string;
5885
- }) & {
5886
- download?: AppArtifactDownloadDescriptor;
5887
- }) | {
5888
- kind: "board";
5889
- boardId: string;
5890
- boardVersion: number;
5891
- sizeBytes: number;
5892
- fileCount: number;
5731
+ type: "number";
5732
+ optional?: boolean;
5733
+ default?: number;
5734
+ min?: number;
5735
+ max?: number;
5736
+ description?: string;
5737
+ examples?: number[];
5738
+ } | {
5739
+ type: "integer";
5740
+ optional?: boolean;
5741
+ default?: number;
5742
+ min?: number;
5743
+ max?: number;
5744
+ description?: string;
5745
+ examples?: number[];
5746
+ } | {
5747
+ type: "boolean";
5748
+ optional?: boolean;
5749
+ default?: boolean;
5750
+ description?: string;
5751
+ examples?: boolean[];
5893
5752
  };
5894
- type AppArtifactManifestFile = {
5895
- /** Path below the immutable artifact's content root. */
5896
- artifactPath: string;
5897
- /** Safe relative path restored by download clients. */
5898
- outputPath: string;
5899
- mimeType: string | null;
5900
- sizeBytes: number;
5901
- sha256: string;
5753
+ type GenerationMetaFieldSpec = GenerationParameterSpec | {
5754
+ type: "object";
5755
+ optional?: boolean;
5756
+ description?: string;
5902
5757
  };
5903
- type AppArtifactManifest = {
5904
- kind: "cohub.work.artifact-manifest";
5905
- version: 1;
5906
- targetType: "file" | "directory";
5907
- targetRef: string;
5908
- entrypoint: string;
5909
- fileCount: number;
5910
- sizeBytes: number;
5911
- files: AppArtifactManifestFile[];
5758
+ type GenerationMetaTaskVariantSpec = {
5759
+ description?: string;
5760
+ required?: string[];
5761
+ requiredContent?: Array<GenerationContentSpec["type"]>;
5762
+ sendTask?: boolean;
5912
5763
  };
5913
- type AppBoardAsset = {
5914
- sourcePath: string;
5915
- status: "captured" | "missing" | "rejected";
5916
- reason?: string;
5917
- artifactPath?: string;
5918
- mimeType?: string | null;
5919
- sizeBytes?: number;
5920
- sha256?: string;
5764
+ type GenerationMetaSpec = {
5765
+ fields?: Record<string, GenerationMetaFieldSpec>;
5766
+ taskField?: string;
5767
+ taskVariants?: Record<string, GenerationMetaTaskVariantSpec>;
5921
5768
  };
5922
- type AppBoardArtifactManifest = {
5923
- kind: "cohub.work.board";
5924
- version: 1;
5925
- sourcePath: string;
5926
- snapshot: BoardSnapshot;
5927
- assets: AppBoardAsset[];
5769
+ type GenerationModelDeclaration = {
5770
+ schema: typeof MODEL_SCHEMA;
5771
+ model: string;
5772
+ title?: string;
5773
+ /** Product catalog class. */
5774
+ category?: GenerationModelCategory;
5775
+ /** Display-only unit price in USD, maintained per deployment. */
5776
+ pricing?: GenerationModelPricing;
5777
+ description?: string;
5778
+ /** Hide from default discovery while keeping exact-ID lookup and runtime use available. */
5779
+ hidden?: boolean;
5780
+ allowUnknownParameters?: boolean;
5781
+ adapter: {
5782
+ type: string;
5783
+ } & Record<string, unknown>;
5784
+ content: {
5785
+ input: GenerationContentSpec[];
5786
+ };
5787
+ parameters?: Record<string, GenerationParameterSpec>;
5788
+ meta?: GenerationMetaSpec;
5789
+ examples?: Array<{
5790
+ title?: string;
5791
+ request: GenerateRequest;
5792
+ }>;
5928
5793
  };
5929
- //#endregion
5930
- //#region ../protocol/dist/realtime/types.d.ts
5931
- declare const REALTIME_DOMAINS: readonly ["system", "session", "space", "label", "room", "ui", "desktop"];
5932
- type RealtimeDomain = (typeof REALTIME_DOMAINS)[number];
5933
- type RealtimeRoom = `space:${string}` | `user:${string}` | `board:${string}` | `room:${string}`;
5934
- type RealtimeEnvelope = {
5935
- id: string;
5936
- timestamp: number;
5937
- domain: RealtimeDomain;
5938
- type: string;
5939
- requestId?: string | null;
5940
- spaceId?: string | null;
5941
- sessionId?: string | null;
5942
- roomId?: string | null;
5943
- rooms?: RealtimeRoom[];
5944
- payload: Record<string, unknown>;
5794
+ type GenerateRequest = {
5795
+ model: string;
5796
+ content: GenerationContentBlock[];
5797
+ parameters?: Record<string, unknown>;
5798
+ meta?: Record<string, unknown>;
5799
+ /** @deprecated Use meta. */
5800
+ metadata?: Record<string, unknown>;
5801
+ apiKey?: string;
5802
+ baseUrl?: string;
5945
5803
  };
5946
- type ChannelEnvelope = RealtimeEnvelope;
5947
- type RealtimeRoomDescriptor = {
5948
- id: string;
5949
- code: string;
5950
- createdAt: string;
5951
- expiresAt: string;
5952
- maxParticipants: number;
5953
- /**
5954
- * When true a viewer holds at most one seat: rejoining from another tab, or
5955
- * after an unclean disconnect, takes over the existing seat instead of
5956
- * consuming a second one. Default false, which gives every connection its own
5957
- * seat (two tabs are two participants).
5958
- */
5959
- seatPerUser: boolean;
5804
+ //#endregion
5805
+ //#region ../protocol/dist/generation/policy.d.ts
5806
+ type GenerationPolicy = {
5807
+ version: 1;
5808
+ mode: "auto" | "limited";
5809
+ models?: GenerationModelPolicy[];
5960
5810
  };
5961
- type RealtimeRoomMember = {
5962
- participantId: string;
5963
- joinedAt: string;
5964
- presence: Record<string, unknown> | null;
5811
+ type GenerationModelPolicy = {
5812
+ model: string;
5965
5813
  /**
5966
- * Opaque, stable per room and viewer. Connections of the same viewer share it,
5967
- * so an application can group or de-duplicate participants without seeing the
5968
- * underlying account id.
5814
+ * Generic constraints keyed by generation declaration parameter name.
5815
+ * Missing parameters are not restricted by policy.
5969
5816
  */
5970
- userKey?: string;
5971
- };
5972
- type RealtimeRoomEvent = {
5973
- id: string;
5974
- timestamp: number;
5975
- domain: "room";
5976
- type: "realtime.room.event";
5977
- requestId?: string | null;
5978
- spaceId?: null;
5979
- sessionId?: null;
5980
- rooms: RealtimeRoom[];
5981
- payload: {
5982
- roomId: string;
5983
- sequence: number;
5984
- event: string;
5985
- data: unknown;
5986
- clientEventId: string | null;
5987
- sender: {
5988
- participantId: string;
5989
- };
5990
- };
5817
+ parameters?: Record<string, GenerationParameterConstraint>;
5991
5818
  };
5992
- type RealtimeRoomJoinedEvent = {
5993
- id: string;
5994
- timestamp: number;
5995
- domain: "room";
5996
- type: "realtime.room.joined";
5997
- requestId?: string | null;
5998
- spaceId?: null;
5999
- sessionId?: null;
6000
- rooms: RealtimeRoom[];
6001
- payload: {
6002
- room: RealtimeRoomDescriptor;
6003
- participantId: string;
6004
- members: RealtimeRoomMember[];
6005
- sequence: number;
6006
- };
5819
+ type GenerationParameterConstraint = {
5820
+ kind: "enum";
5821
+ values: Array<string | number | boolean>;
5822
+ } | {
5823
+ kind: "number";
5824
+ min?: number;
5825
+ max?: number;
5826
+ values?: number[];
5827
+ } | {
5828
+ kind: "integer";
5829
+ min?: number;
5830
+ max?: number;
5831
+ values?: number[];
5832
+ } | {
5833
+ kind: "boolean";
5834
+ value?: boolean;
6007
5835
  };
6008
- type RealtimeRoomMemberChangedEvent = {
6009
- id: string;
6010
- timestamp: number;
6011
- domain: "room";
6012
- type: "realtime.room.member.joined" | "realtime.room.member.left";
6013
- requestId?: string | null;
6014
- spaceId?: null;
6015
- sessionId?: null;
6016
- rooms: RealtimeRoom[];
6017
- payload: {
6018
- roomId: string;
6019
- sequence: number;
6020
- member: RealtimeRoomMember;
6021
- };
5836
+ declare class GenerationPolicyError extends Error {
5837
+ constructor(message: string);
5838
+ }
5839
+ type EnvLike = Record<string, string | undefined>;
5840
+ type PublicDeclaration = Omit<GenerationModelDeclaration, "adapter">;
5841
+ declare function normalizeGenerationPolicy(value: unknown): GenerationPolicy | null;
5842
+ declare function encodeGenerationPolicy(policy: GenerationPolicy): string;
5843
+ declare function decodeGenerationPolicy(value: string): GenerationPolicy | null;
5844
+ declare function parseGenerationPolicyFromEnv(env: EnvLike): GenerationPolicy | null;
5845
+ declare function getAllowedGenerationModelIds(policy: GenerationPolicy | null): string[] | null;
5846
+ declare function findGenerationModelPolicy(policy: GenerationPolicy | null, model: string): GenerationModelPolicy | null;
5847
+ declare function assertGenerationRequestAllowedByPolicy(input: {
5848
+ policy: GenerationPolicy | null;
5849
+ model: string;
5850
+ parameters?: Record<string, unknown>;
5851
+ }): void;
5852
+ declare function filterGenerationDeclarationsByPolicy<T extends PublicDeclaration>(declarations: T[], policy: GenerationPolicy | null): T[];
5853
+ //#endregion
5854
+ //#region ../protocol/dist/runtime/native.d.ts
5855
+ /** One native execution maps to one Cohub Turn. No message-level fork anchors. */
5856
+ declare const nativeTurnStartSchema: z.ZodObject<{
5857
+ turnId: z.ZodUUID;
5858
+ sessionId: z.ZodNullable<z.ZodUUID>;
5859
+ parentTurnId: z.ZodNullable<z.ZodUUID>;
5860
+ branchSessionId: z.ZodUUID;
5861
+ harness: z.ZodEnum<{
5862
+ codex: "codex";
5863
+ pi: "pi";
5864
+ }>;
5865
+ nativeSessionId: z.ZodString;
5866
+ userContent: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
5867
+ startedAt: z.ZodISODateTime;
5868
+ }, z.core.$strict>;
5869
+ type NativeTurnStart = z.infer<typeof nativeTurnStartSchema>;
5870
+ type NativeTurnBinding = {
5871
+ sessionId: string;
5872
+ turnId: string;
5873
+ forked: boolean;
6022
5874
  };
6023
- type RealtimeRoomPresenceUpdatedEvent = {
6024
- id: string;
6025
- timestamp: number;
6026
- domain: "room";
6027
- type: "realtime.room.presence.updated";
6028
- requestId?: string | null;
6029
- spaceId?: null;
6030
- sessionId?: null;
6031
- rooms: RealtimeRoom[];
6032
- payload: {
6033
- roomId: string;
6034
- sequence: number;
6035
- member: RealtimeRoomMember;
6036
- };
5875
+ declare const nativeTurnMessageSchema: z.ZodObject<{
5876
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
5877
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5878
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5879
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5880
+ input: z.ZodOptional<z.ZodNumber>;
5881
+ output: z.ZodOptional<z.ZodNumber>;
5882
+ cacheRead: z.ZodOptional<z.ZodNumber>;
5883
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
5884
+ totalTokens: z.ZodOptional<z.ZodNumber>;
5885
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5886
+ input: z.ZodOptional<z.ZodNumber>;
5887
+ output: z.ZodOptional<z.ZodNumber>;
5888
+ cacheRead: z.ZodOptional<z.ZodNumber>;
5889
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
5890
+ total: z.ZodOptional<z.ZodNumber>;
5891
+ }, z.core.$strip>>>;
5892
+ }, z.core.$strip>>>;
5893
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5894
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5895
+ }, z.core.$strict>;
5896
+ type NativeTurnMessage = z.infer<typeof nativeTurnMessageSchema>;
5897
+ /** Ephemeral display snapshot within a Turn; never a fork or persistence boundary. */
5898
+ declare const nativeTurnProgressSchema: z.ZodObject<{
5899
+ revision: z.ZodNumber;
5900
+ messages: z.ZodArray<z.ZodObject<{
5901
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
5902
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5903
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5904
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5905
+ input: z.ZodOptional<z.ZodNumber>;
5906
+ output: z.ZodOptional<z.ZodNumber>;
5907
+ cacheRead: z.ZodOptional<z.ZodNumber>;
5908
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
5909
+ totalTokens: z.ZodOptional<z.ZodNumber>;
5910
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5911
+ input: z.ZodOptional<z.ZodNumber>;
5912
+ output: z.ZodOptional<z.ZodNumber>;
5913
+ cacheRead: z.ZodOptional<z.ZodNumber>;
5914
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
5915
+ total: z.ZodOptional<z.ZodNumber>;
5916
+ }, z.core.$strip>>>;
5917
+ }, z.core.$strip>>>;
5918
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5919
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5920
+ }, z.core.$strict>>;
5921
+ }, z.core.$strict>;
5922
+ type NativeTurnProgress = z.infer<typeof nativeTurnProgressSchema>;
5923
+ /** Final, immutable Turn receipt. Native bytes are archived separately, without lossy normalization. */
5924
+ declare const nativeTurnCompleteSchema: z.ZodObject<{
5925
+ messages: z.ZodArray<z.ZodObject<{
5926
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
5927
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5928
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5929
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5930
+ input: z.ZodOptional<z.ZodNumber>;
5931
+ output: z.ZodOptional<z.ZodNumber>;
5932
+ cacheRead: z.ZodOptional<z.ZodNumber>;
5933
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
5934
+ totalTokens: z.ZodOptional<z.ZodNumber>;
5935
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5936
+ input: z.ZodOptional<z.ZodNumber>;
5937
+ output: z.ZodOptional<z.ZodNumber>;
5938
+ cacheRead: z.ZodOptional<z.ZodNumber>;
5939
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
5940
+ total: z.ZodOptional<z.ZodNumber>;
5941
+ }, z.core.$strip>>>;
5942
+ }, z.core.$strip>>>;
5943
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5944
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5945
+ }, z.core.$strict>>;
5946
+ status: z.ZodEnum<{
5947
+ completed: "completed";
5948
+ failed: "failed";
5949
+ interrupted: "interrupted";
5950
+ }>;
5951
+ completedAt: z.ZodISODateTime;
5952
+ }, z.core.$strict>;
5953
+ type NativeTurnComplete = z.infer<typeof nativeTurnCompleteSchema>;
5954
+ declare const nativeRuntimeEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5955
+ type: z.ZodLiteral<"start">;
5956
+ input: z.ZodObject<{
5957
+ turnId: z.ZodUUID;
5958
+ sessionId: z.ZodNullable<z.ZodUUID>;
5959
+ parentTurnId: z.ZodNullable<z.ZodUUID>;
5960
+ branchSessionId: z.ZodUUID;
5961
+ harness: z.ZodEnum<{
5962
+ codex: "codex";
5963
+ pi: "pi";
5964
+ }>;
5965
+ nativeSessionId: z.ZodString;
5966
+ userContent: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
5967
+ startedAt: z.ZodISODateTime;
5968
+ }, z.core.$strict>;
5969
+ }, z.core.$strict>, z.ZodObject<{
5970
+ type: z.ZodLiteral<"progress">;
5971
+ sessionId: z.ZodUUID;
5972
+ turnId: z.ZodUUID;
5973
+ progress: z.ZodObject<{
5974
+ revision: z.ZodNumber;
5975
+ messages: z.ZodArray<z.ZodObject<{
5976
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
5977
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5978
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5979
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5980
+ input: z.ZodOptional<z.ZodNumber>;
5981
+ output: z.ZodOptional<z.ZodNumber>;
5982
+ cacheRead: z.ZodOptional<z.ZodNumber>;
5983
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
5984
+ totalTokens: z.ZodOptional<z.ZodNumber>;
5985
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5986
+ input: z.ZodOptional<z.ZodNumber>;
5987
+ output: z.ZodOptional<z.ZodNumber>;
5988
+ cacheRead: z.ZodOptional<z.ZodNumber>;
5989
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
5990
+ total: z.ZodOptional<z.ZodNumber>;
5991
+ }, z.core.$strip>>>;
5992
+ }, z.core.$strip>>>;
5993
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5994
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5995
+ }, z.core.$strict>>;
5996
+ }, z.core.$strict>;
5997
+ }, z.core.$strict>, z.ZodObject<{
5998
+ type: z.ZodLiteral<"complete">;
5999
+ sessionId: z.ZodUUID;
6000
+ turnId: z.ZodUUID;
6001
+ result: z.ZodObject<{
6002
+ messages: z.ZodArray<z.ZodObject<{
6003
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
6004
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6005
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6006
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6007
+ input: z.ZodOptional<z.ZodNumber>;
6008
+ output: z.ZodOptional<z.ZodNumber>;
6009
+ cacheRead: z.ZodOptional<z.ZodNumber>;
6010
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
6011
+ totalTokens: z.ZodOptional<z.ZodNumber>;
6012
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6013
+ input: z.ZodOptional<z.ZodNumber>;
6014
+ output: z.ZodOptional<z.ZodNumber>;
6015
+ cacheRead: z.ZodOptional<z.ZodNumber>;
6016
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
6017
+ total: z.ZodOptional<z.ZodNumber>;
6018
+ }, z.core.$strip>>>;
6019
+ }, z.core.$strip>>>;
6020
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6021
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6022
+ }, z.core.$strict>>;
6023
+ status: z.ZodEnum<{
6024
+ completed: "completed";
6025
+ failed: "failed";
6026
+ interrupted: "interrupted";
6027
+ }>;
6028
+ completedAt: z.ZodISODateTime;
6029
+ }, z.core.$strict>;
6030
+ }, z.core.$strict>, z.ZodObject<{
6031
+ type: z.ZodLiteral<"heartbeat">;
6032
+ sessionId: z.ZodUUID;
6033
+ turnId: z.ZodUUID;
6034
+ }, z.core.$strict>], "type">;
6035
+ type NativeRuntimeEvent = z.infer<typeof nativeRuntimeEventSchema>;
6036
+ declare const NATIVE_SYNC_SOURCE: "native_client";
6037
+ declare const isNativeClientTurn: (meta: unknown) => boolean;
6038
+ //#endregion
6039
+ //#region ../protocol/dist/runtime/context.d.ts
6040
+ type ContextProjectionOptions = {
6041
+ /** Provider recorded on projected assistant messages whose row has none. */
6042
+ fallbackProvider?: string | null;
6043
+ /** Resolve the wire api of a historical row from its own provider/model. */
6044
+ resolveApi?: (input: {
6045
+ provider: string | null;
6046
+ model: string | null;
6047
+ }) => string | null;
6037
6048
  };
6038
- type RealtimeRoomRequestEvent = {
6049
+ declare function selectRuntimeContextMessages(messages: RuntimeContextMessage[]): RuntimeContextMessage[];
6050
+ /**
6051
+ * Compile durable, normalized messages into Pi-compatible context without replaying tools.
6052
+ * Representable blocks and tool pairing are preserved verbatim; anything without a native
6053
+ * representation is dropped rather than described in prompt text.
6054
+ */
6055
+ declare function contextToPiMessages(messages: RuntimeContextMessage[], options?: ContextProjectionOptions): Record<string, unknown>[];
6056
+ //#endregion
6057
+ //#region ../protocol/dist/runtime/index.d.ts
6058
+ declare const RUNTIME_PROTOCOL_VERSION: 1;
6059
+ declare const RUNTIME_MAX_FRAME_BYTES: number;
6060
+ declare const RUNTIME_RECOVERY_BATCH_SIZE = 64;
6061
+ declare const harnessSchema: z.ZodEnum<{
6062
+ codex: "codex";
6063
+ cohub: "cohub";
6064
+ pi: "pi";
6065
+ }>;
6066
+ type HarnessKind = z.infer<typeof harnessSchema>;
6067
+ type LocalHarness = Exclude<HarnessKind, "cohub">;
6068
+ declare const isLocalHarness: (value: unknown) => value is LocalHarness;
6069
+ declare const resolveHarness: (meta: unknown) => HarnessKind;
6070
+ type RuntimeContextMessage = {
6039
6071
  id: string;
6040
- timestamp: number;
6041
- domain: "room";
6042
- type: "realtime.room.request.ok";
6043
- requestId?: string | null;
6044
- spaceId?: null;
6045
- sessionId?: null;
6046
- roomId?: string | null;
6047
- payload: {
6048
- roomId: string;
6049
- sequence?: number;
6050
- eventId?: string | null;
6051
- clientEventId?: string | null;
6052
- };
6072
+ turnId: string;
6073
+ role: "user" | "assistant" | "system";
6074
+ content: ContentBlock[];
6075
+ provider?: string | null;
6076
+ model?: string | null;
6077
+ usage?: Usage | null;
6078
+ stopReason?: string | null;
6079
+ errorMessage?: string | null;
6080
+ meta?: Record<string, unknown> | null;
6053
6081
  };
6054
- type RealtimeRoomRequestErrorEvent = {
6055
- id: string;
6056
- timestamp: number;
6057
- domain: "room";
6058
- type: "realtime.room.request.error";
6059
- requestId?: string | null;
6060
- spaceId?: null;
6061
- sessionId?: null;
6062
- roomId?: string | null;
6063
- payload: {
6064
- roomId: string;
6065
- code: string;
6066
- message: string;
6067
- };
6082
+ type RuntimeContext = {
6083
+ complete?: boolean;
6084
+ revision: string;
6085
+ throughTurnId: string | null;
6086
+ messages: RuntimeContextMessage[];
6087
+ archive?: HarnessArchive | null;
6088
+ resolvedTurnIds?: string[];
6089
+ settledTurnIds?: string[];
6068
6090
  };
6069
- type RealtimeRoomClosedEvent = {
6070
- id: string;
6071
- timestamp: number;
6072
- domain: "room";
6073
- type: "realtime.room.closed";
6074
- requestId?: string | null;
6075
- spaceId?: null;
6076
- sessionId?: null;
6077
- rooms: RealtimeRoom[];
6078
- payload: {
6079
- roomId: string;
6080
- reason: "expired" | "left" | "revoked" | "superseded";
6081
- };
6091
+ /** Trace identifiers carried to a local Runtime without carrying credentials. */
6092
+ type RuntimeTraceContext = {
6093
+ requestId?: string;
6094
+ traceId?: string | null;
6095
+ spanId?: string | null;
6096
+ traceparent?: string | null;
6082
6097
  };
6083
- type SystemReadyEvent = {
6084
- id: string;
6085
- timestamp: number;
6086
- domain: "system";
6087
- type: "system.ready";
6088
- requestId?: string | null;
6089
- spaceId?: string | null;
6090
- sessionId?: string | null;
6091
- payload: {
6092
- connectionId: string;
6098
+ declare const runtimeCapabilitiesSchema: z.ZodObject<{
6099
+ harnesses: z.ZodArray<z.ZodEnum<{
6100
+ codex: "codex";
6101
+ pi: "pi";
6102
+ }>>;
6103
+ models: z.ZodArray<z.ZodObject<{
6104
+ harness: z.ZodEnum<{
6105
+ codex: "codex";
6106
+ pi: "pi";
6107
+ }>;
6108
+ provider: z.ZodString;
6109
+ id: z.ZodString;
6110
+ name: z.ZodString;
6111
+ }, z.core.$strip>>;
6112
+ }, z.core.$strip>;
6113
+ type RuntimeCapabilities = z.infer<typeof runtimeCapabilitiesSchema>;
6114
+ declare const runtimePendingExecutionSchema: z.ZodObject<{
6115
+ sessionId: z.ZodString;
6116
+ turnId: z.ZodString;
6117
+ harness: z.ZodEnum<{
6118
+ codex: "codex";
6119
+ pi: "pi";
6120
+ }>;
6121
+ }, z.core.$strict>;
6122
+ type RuntimePendingExecution = z.infer<typeof runtimePendingExecutionSchema>;
6123
+ declare const runtimeReadySchema: z.ZodObject<{
6124
+ type: z.ZodLiteral<"runtime.ready">;
6125
+ connectionId: z.ZodString;
6126
+ }, z.core.$strip>;
6127
+ declare const fileWatcherStatusSchema: z.ZodObject<{
6128
+ backend: z.ZodEnum<{
6129
+ fsevents: "fsevents";
6130
+ fsnotify: "fsnotify";
6131
+ none: "none";
6132
+ scan: "scan";
6133
+ }>;
6134
+ state: z.ZodEnum<{
6135
+ degraded: "degraded";
6136
+ running: "running";
6137
+ unavailable: "unavailable";
6138
+ }>;
6139
+ reason: z.ZodOptional<z.ZodEnum<{
6140
+ coverage_incomplete: "coverage_incomplete";
6141
+ polling: "polling";
6142
+ root_changed: "root_changed";
6143
+ start_failed: "start_failed";
6144
+ watch_error: "watch_error";
6145
+ }>>;
6146
+ observedAt: z.ZodISODateTime;
6147
+ }, z.core.$strip>;
6148
+ type RuntimeStatus = {
6149
+ kind: "cloud" | "local";
6150
+ online: boolean;
6151
+ runtimeId?: string | null;
6152
+ capabilities: RuntimeCapabilities | null;
6153
+ fileWatcher: z.infer<typeof fileWatcherStatusSchema> | null;
6154
+ /** Authoritative file-bridge lease; absent on older servers. */
6155
+ workspace?: {
6156
+ online: boolean;
6157
+ observedAt: string | null;
6093
6158
  };
6159
+ observedAt?: string;
6094
6160
  };
6095
- type SystemAuthOkEvent = {
6096
- id: string;
6097
- timestamp: number;
6098
- domain: "system";
6099
- type: "system.auth.ok";
6100
- requestId?: string | null;
6101
- spaceId?: string | null;
6102
- sessionId?: string | null;
6103
- payload: {
6104
- connectionId: string;
6105
- user: Record<string, unknown>;
6106
- capabilities?: string[];
6107
- };
6161
+ type RuntimeSessionRecoveryStatus = {
6162
+ pending: boolean;
6163
+ revision: string;
6164
+ turnId: string | null;
6165
+ harness: LocalHarness | null;
6166
+ canManage: boolean;
6108
6167
  };
6109
- type SystemRequestErrorEvent = {
6110
- id: string;
6111
- timestamp: number;
6112
- domain: "system";
6113
- type: "system.request.error";
6114
- requestId?: string | null;
6115
- spaceId?: string | null;
6116
- sessionId?: string | null;
6117
- payload: {
6118
- code?: string;
6119
- message: string;
6120
- };
6168
+ declare const runtimeStopConfirmationSchema: z.ZodObject<{
6169
+ expectedTurnId: z.ZodString;
6170
+ revision: z.ZodString;
6171
+ confirmed: z.ZodLiteral<true>;
6172
+ }, z.core.$strict>;
6173
+ type RuntimeStopConfirmation = z.infer<typeof runtimeStopConfirmationSchema>;
6174
+ type RuntimeTurnUserMessage = {
6175
+ turnId: string;
6176
+ userMessageId: string;
6177
+ userId: string | null;
6178
+ content: ContentBlock[];
6121
6179
  };
6122
- type SystemPongEvent = {
6123
- id: string;
6124
- timestamp: number;
6125
- domain: "system";
6126
- type: "system.pong";
6180
+ type RuntimeTurnInput = {
6181
+ spaceId: string;
6182
+ sessionId: string;
6183
+ turnId: string;
6184
+ userMessageId: string;
6185
+ harness: LocalHarness;
6186
+ /** Ordered claim inputs. The final message owns execution, streaming and archival. */
6187
+ messages: RuntimeTurnUserMessage[];
6188
+ context: RuntimeContext;
6189
+ provider?: string | null;
6190
+ model?: string | null;
6191
+ thinkingLevel?: string | null;
6127
6192
  requestId?: string | null;
6128
- spaceId?: string | null;
6129
- sessionId?: string | null;
6130
- payload: Record<string, unknown>;
6193
+ traceContext?: RuntimeTraceContext;
6194
+ accessMode: "read_only" | "full_access";
6131
6195
  };
6132
- type SystemAckOkEvent = {
6133
- id: string;
6134
- timestamp: number;
6135
- domain: "system";
6136
- type: "system.ack.ok";
6137
- requestId?: string | null;
6138
- spaceId?: string | null;
6139
- sessionId?: string | null;
6140
- payload: {
6141
- eventId?: string;
6142
- };
6196
+ type RuntimeMessage = {
6197
+ ordinal: number;
6198
+ content: ContentBlock[];
6199
+ provider?: string | null;
6200
+ model?: string | null;
6201
+ usage?: Usage | null;
6202
+ stopReason?: string | null;
6203
+ errorMessage?: string | null;
6143
6204
  };
6144
- type SystemSubscribeOkEvent = {
6145
- id: string;
6146
- timestamp: number;
6147
- domain: "system";
6148
- type: "system.subscribe.ok";
6149
- requestId?: string | null;
6150
- spaceId?: string | null;
6151
- sessionId?: string | null;
6152
- payload: {
6153
- rooms: RealtimeRoom[];
6154
- };
6205
+ type RuntimeExecutionEvent = {
6206
+ type: "message.start";
6207
+ ordinal: number;
6208
+ } | {
6209
+ type: "text.delta";
6210
+ ordinal: number;
6211
+ index: number;
6212
+ kind: "text" | "thinking";
6213
+ delta: string;
6214
+ } | {
6215
+ type: "content.replace";
6216
+ ordinal: number;
6217
+ content: ContentBlock[];
6218
+ } | {
6219
+ type: "message.commit";
6220
+ message: RuntimeMessage;
6221
+ } | {
6222
+ type: "turn.end";
6223
+ message: RuntimeMessage;
6224
+ archive?: HarnessArchive | null;
6225
+ resume: "native" | "restored" | "handoff" | "new";
6226
+ } | {
6227
+ type: "context.required";
6228
+ pendingTurnIds?: string[];
6229
+ } | {
6230
+ type: "turn.acknowledged";
6231
+ } | {
6232
+ type: "turn.error";
6233
+ message: string;
6234
+ uncertain?: boolean;
6155
6235
  };
6156
- type SystemSubscribeErrorEvent = {
6157
- id: string;
6158
- timestamp: number;
6159
- domain: "system";
6160
- type: "system.subscribe.error";
6161
- requestId?: string | null;
6162
- spaceId?: string | null;
6163
- sessionId?: string | null;
6164
- payload: {
6165
- rejected: Array<{
6166
- room: string;
6167
- code: "BAD_ROOM" | "FORBIDDEN";
6168
- message: string;
6236
+ declare const runtimeEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6237
+ type: z.ZodLiteral<"message.start">;
6238
+ ordinal: z.ZodNumber;
6239
+ }, z.core.$strip>, z.ZodObject<{
6240
+ type: z.ZodLiteral<"text.delta">;
6241
+ ordinal: z.ZodNumber;
6242
+ index: z.ZodNumber;
6243
+ kind: z.ZodEnum<{
6244
+ text: "text";
6245
+ thinking: "thinking";
6246
+ }>;
6247
+ delta: z.ZodString;
6248
+ }, z.core.$strip>, z.ZodObject<{
6249
+ type: z.ZodLiteral<"content.replace">;
6250
+ ordinal: z.ZodNumber;
6251
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
6252
+ }, z.core.$strip>, z.ZodObject<{
6253
+ type: z.ZodLiteral<"message.commit">;
6254
+ message: z.ZodObject<{
6255
+ ordinal: z.ZodNumber;
6256
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
6257
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6258
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6259
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6260
+ input: z.ZodOptional<z.ZodNumber>;
6261
+ output: z.ZodOptional<z.ZodNumber>;
6262
+ cacheRead: z.ZodOptional<z.ZodNumber>;
6263
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
6264
+ totalTokens: z.ZodOptional<z.ZodNumber>;
6265
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6266
+ input: z.ZodOptional<z.ZodNumber>;
6267
+ output: z.ZodOptional<z.ZodNumber>;
6268
+ cacheRead: z.ZodOptional<z.ZodNumber>;
6269
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
6270
+ total: z.ZodOptional<z.ZodNumber>;
6271
+ }, z.core.$strip>>>;
6272
+ }, z.core.$strip>>>;
6273
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6274
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6275
+ }, z.core.$strip>;
6276
+ }, z.core.$strip>, z.ZodObject<{
6277
+ type: z.ZodLiteral<"turn.end">;
6278
+ message: z.ZodObject<{
6279
+ ordinal: z.ZodNumber;
6280
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
6281
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6282
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6283
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6284
+ input: z.ZodOptional<z.ZodNumber>;
6285
+ output: z.ZodOptional<z.ZodNumber>;
6286
+ cacheRead: z.ZodOptional<z.ZodNumber>;
6287
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
6288
+ totalTokens: z.ZodOptional<z.ZodNumber>;
6289
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6290
+ input: z.ZodOptional<z.ZodNumber>;
6291
+ output: z.ZodOptional<z.ZodNumber>;
6292
+ cacheRead: z.ZodOptional<z.ZodNumber>;
6293
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
6294
+ total: z.ZodOptional<z.ZodNumber>;
6295
+ }, z.core.$strip>>>;
6296
+ }, z.core.$strip>>>;
6297
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6298
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6299
+ }, z.core.$strip>;
6300
+ archive: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6301
+ sessionId: z.ZodString;
6302
+ turnId: z.ZodString;
6303
+ harness: z.ZodEnum<{
6304
+ codex: "codex";
6305
+ pi: "pi";
6306
+ }>;
6307
+ }, z.core.$strict>>>;
6308
+ resume: z.ZodEnum<{
6309
+ handoff: "handoff";
6310
+ native: "native";
6311
+ new: "new";
6312
+ restored: "restored";
6313
+ }>;
6314
+ }, z.core.$strip>, z.ZodObject<{
6315
+ type: z.ZodLiteral<"context.required">;
6316
+ pendingTurnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6317
+ }, z.core.$strip>, z.ZodObject<{
6318
+ type: z.ZodLiteral<"turn.acknowledged">;
6319
+ }, z.core.$strip>, z.ZodObject<{
6320
+ type: z.ZodLiteral<"turn.error">;
6321
+ message: z.ZodString;
6322
+ uncertain: z.ZodOptional<z.ZodBoolean>;
6323
+ }, z.core.$strip>], "type">;
6324
+ declare const runtimeCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6325
+ type: z.ZodLiteral<"turn.recover">;
6326
+ requestId: z.ZodString;
6327
+ execution: z.ZodObject<{
6328
+ spaceId: z.ZodString;
6329
+ sessionId: z.ZodString;
6330
+ turnId: z.ZodString;
6331
+ harness: z.ZodEnum<{
6332
+ codex: "codex";
6333
+ pi: "pi";
6334
+ }>;
6335
+ }, z.core.$strip>;
6336
+ traceContext: z.ZodOptional<z.ZodObject<{
6337
+ requestId: z.ZodOptional<z.ZodString>;
6338
+ traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6339
+ spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6340
+ traceparent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6341
+ }, z.core.$strict>>;
6342
+ }, z.core.$strip>, z.ZodObject<{
6343
+ type: z.ZodLiteral<"turn.start">;
6344
+ requestId: z.ZodString;
6345
+ resumeOnly: z.ZodOptional<z.ZodBoolean>;
6346
+ input: z.ZodObject<{
6347
+ spaceId: z.ZodString;
6348
+ sessionId: z.ZodString;
6349
+ turnId: z.ZodString;
6350
+ userMessageId: z.ZodString;
6351
+ harness: z.ZodEnum<{
6352
+ codex: "codex";
6353
+ pi: "pi";
6354
+ }>;
6355
+ messages: z.ZodArray<z.ZodObject<{
6356
+ turnId: z.ZodString;
6357
+ userMessageId: z.ZodString;
6358
+ userId: z.ZodNullable<z.ZodString>;
6359
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
6360
+ }, z.core.$strip>>;
6361
+ context: z.ZodObject<{
6362
+ complete: z.ZodOptional<z.ZodBoolean>;
6363
+ revision: z.ZodString;
6364
+ throughTurnId: z.ZodNullable<z.ZodString>;
6365
+ messages: z.ZodArray<z.ZodObject<{
6366
+ id: z.ZodString;
6367
+ turnId: z.ZodString;
6368
+ role: z.ZodEnum<{
6369
+ assistant: "assistant";
6370
+ system: "system";
6371
+ user: "user";
6372
+ }>;
6373
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
6374
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6375
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6376
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6377
+ input: z.ZodOptional<z.ZodNumber>;
6378
+ output: z.ZodOptional<z.ZodNumber>;
6379
+ cacheRead: z.ZodOptional<z.ZodNumber>;
6380
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
6381
+ totalTokens: z.ZodOptional<z.ZodNumber>;
6382
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6383
+ input: z.ZodOptional<z.ZodNumber>;
6384
+ output: z.ZodOptional<z.ZodNumber>;
6385
+ cacheRead: z.ZodOptional<z.ZodNumber>;
6386
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
6387
+ total: z.ZodOptional<z.ZodNumber>;
6388
+ }, z.core.$strip>>>;
6389
+ }, z.core.$strip>>>;
6390
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6391
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6392
+ meta: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
6393
+ }, z.core.$strip>>;
6394
+ archive: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6395
+ sessionId: z.ZodString;
6396
+ turnId: z.ZodString;
6397
+ harness: z.ZodEnum<{
6398
+ codex: "codex";
6399
+ pi: "pi";
6400
+ }>;
6401
+ }, z.core.$strict>>>;
6402
+ resolvedTurnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6403
+ settledTurnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6404
+ }, z.core.$strip>;
6405
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6406
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6407
+ thinkingLevel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6408
+ requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6409
+ traceContext: z.ZodOptional<z.ZodObject<{
6410
+ requestId: z.ZodOptional<z.ZodString>;
6411
+ traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6412
+ spanId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6413
+ traceparent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6414
+ }, z.core.$strict>>;
6415
+ accessMode: z.ZodEnum<{
6416
+ full_access: "full_access";
6417
+ read_only: "read_only";
6169
6418
  }>;
6170
- };
6171
- };
6172
- type RealtimeSessionRecord = Pick<SessionRecord$1, "id" | "spaceId" | "userUuid" | "title" | "source" | "status" | "activeTurn" | "externalSessionId" | "latestMessageText" | "lastMessageAt" | "lastMessageId" | "createdAt" | "updatedAt">;
6173
- type SessionCreatedEvent = {
6174
- id: string;
6175
- timestamp: number;
6176
- domain: "session";
6177
- type: "session.created";
6178
- requestId?: string | null;
6179
- spaceId: string;
6180
- sessionId: string;
6181
- payload: {
6182
- session: RealtimeSessionRecord;
6183
- };
6184
- };
6185
- type SessionUpdatedEvent = {
6186
- id: string;
6187
- timestamp: number;
6188
- domain: "session";
6189
- type: "session.updated";
6190
- requestId?: string | null;
6191
- spaceId: string;
6192
- sessionId: string;
6193
- payload: {
6194
- session: RealtimeSessionRecord;
6195
- changed: string[];
6196
- };
6197
- };
6198
- type SessionRequestAcceptedEvent = {
6199
- id: string;
6200
- timestamp: number;
6201
- domain: "session";
6202
- type: "session.request.accepted";
6203
- requestId?: string | null;
6204
- spaceId: string;
6205
- sessionId: string;
6206
- payload: {
6207
- clientMessageId?: string | null;
6208
- turnId?: string | null;
6209
- userMessageId?: string | null;
6210
- traceId?: string | null;
6211
- };
6212
- };
6213
- type SessionRequestErrorEvent = {
6214
- id: string;
6215
- timestamp: number;
6216
- domain: "session";
6217
- type: "session.request.error";
6218
- requestId?: string | null;
6219
- spaceId?: string | null;
6220
- sessionId?: string | null;
6221
- payload: {
6222
- code?: string;
6223
- message: string;
6224
- clientMessageId?: string | null;
6225
- billing?: BillingPayload | null;
6226
- };
6419
+ }, z.core.$strip>;
6420
+ }, z.core.$strip>, z.ZodObject<{
6421
+ type: z.ZodLiteral<"session.context">;
6422
+ requestId: z.ZodString;
6423
+ context: z.ZodObject<{
6424
+ complete: z.ZodOptional<z.ZodBoolean>;
6425
+ revision: z.ZodString;
6426
+ throughTurnId: z.ZodNullable<z.ZodString>;
6427
+ messages: z.ZodArray<z.ZodObject<{
6428
+ id: z.ZodString;
6429
+ turnId: z.ZodString;
6430
+ role: z.ZodEnum<{
6431
+ assistant: "assistant";
6432
+ system: "system";
6433
+ user: "user";
6434
+ }>;
6435
+ content: z.ZodArray<z.ZodType<ContentBlock, unknown, z.core.$ZodTypeInternals<ContentBlock, unknown>>>;
6436
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6437
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6438
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6439
+ input: z.ZodOptional<z.ZodNumber>;
6440
+ output: z.ZodOptional<z.ZodNumber>;
6441
+ cacheRead: z.ZodOptional<z.ZodNumber>;
6442
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
6443
+ totalTokens: z.ZodOptional<z.ZodNumber>;
6444
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6445
+ input: z.ZodOptional<z.ZodNumber>;
6446
+ output: z.ZodOptional<z.ZodNumber>;
6447
+ cacheRead: z.ZodOptional<z.ZodNumber>;
6448
+ cacheWrite: z.ZodOptional<z.ZodNumber>;
6449
+ total: z.ZodOptional<z.ZodNumber>;
6450
+ }, z.core.$strip>>>;
6451
+ }, z.core.$strip>>>;
6452
+ stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6453
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6454
+ meta: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
6455
+ }, z.core.$strip>>;
6456
+ archive: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6457
+ sessionId: z.ZodString;
6458
+ turnId: z.ZodString;
6459
+ harness: z.ZodEnum<{
6460
+ codex: "codex";
6461
+ pi: "pi";
6462
+ }>;
6463
+ }, z.core.$strict>>>;
6464
+ resolvedTurnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6465
+ settledTurnIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6466
+ }, z.core.$strip>;
6467
+ }, z.core.$strip>, z.ZodObject<{
6468
+ type: z.ZodLiteral<"turn.abort">;
6469
+ requestId: z.ZodString;
6470
+ }, z.core.$strip>, z.ZodObject<{
6471
+ type: z.ZodLiteral<"turn.ack">;
6472
+ requestId: z.ZodString;
6473
+ revision: z.ZodString;
6474
+ turnId: z.ZodString;
6475
+ }, z.core.$strip>], "type">;
6476
+ type RuntimeCommand = z.infer<typeof runtimeCommandSchema>;
6477
+ //#endregion
6478
+ //#region ../protocol/dist/model/turn.d.ts
6479
+ type SessionTurnStatus = "queued" | "running" | "abort_requested" | "completed" | "failed" | "interrupted" | "merged" | "cancelled";
6480
+ type SessionTurnIntent = "steer" | "followup" | "compact";
6481
+ type SessionTurnExecutionKind = "agent" | "direct_generation";
6482
+ type SessionTurnSummary = {
6483
+ text?: string | null;
6484
+ finishReason?: "completed" | "failed" | "interrupted" | "merged" | "cancelled";
6485
+ reason?: "steer" | "abort" | "merge" | string;
6486
+ continuedByTurnId?: string | null;
6487
+ interruptedByTurnId?: string | null;
6488
+ mergedIntoTurnId?: string | null;
6227
6489
  };
6228
- type RealtimePatchOperation = {
6229
- o: "append";
6230
- p: string;
6231
- v: unknown;
6232
- } | {
6233
- o: "replace";
6234
- p: string;
6235
- v: unknown;
6236
- } | {
6237
- o: "add";
6238
- p: string;
6239
- v: unknown;
6240
- } | {
6241
- o: "merge";
6242
- p: string;
6243
- v: Record<string, unknown>;
6244
- } | {
6245
- o: "remove";
6246
- p: string;
6247
- } | {
6248
- v: unknown;
6249
- o?: undefined;
6250
- p?: undefined;
6490
+ type SessionTurnIntermediateIndex = {
6491
+ version: 1;
6492
+ messagesObjectKey: string | null;
6493
+ messagesSizeBytes?: number | null;
6494
+ toolCallsBaseObjectKey?: string | null;
6251
6495
  };
6252
- type SessionTurnPatchEvent = {
6253
- id: string;
6254
- timestamp: number;
6255
- domain: "session";
6256
- type: "session.turn.patch";
6257
- requestId?: string | null;
6258
- spaceId: string;
6259
- sessionId: string;
6260
- payload: {
6261
- turnId: string | null;
6262
- messageId: string | null;
6263
- messageOrdinal?: number | null;
6264
- sourceMessageId?: string | null;
6265
- anchorUserMessageId: string | null;
6266
- seq: number;
6267
- baseSeq: number;
6268
- ops: RealtimePatchOperation[];
6269
- };
6496
+ type SessionTurnCompactionSummary = {
6497
+ count: number;
6498
+ summarizedMessageCountTotal: number;
6499
+ attemptCountTotal: number;
6500
+ usage: Usage | null;
6501
+ durationMsTotal: number | null;
6502
+ last: {
6503
+ compactionId: string;
6504
+ tokensBefore: number;
6505
+ estimatedTokensAfter: number | null;
6506
+ compactedAt: string;
6507
+ } | null;
6270
6508
  };
6271
- type SessionTurnErrorEvent = {
6272
- id: string;
6273
- timestamp: number;
6274
- domain: "session";
6275
- type: "session.turn.error";
6276
- requestId?: string | null;
6277
- spaceId: string;
6278
- sessionId: string;
6279
- payload: {
6280
- turnId?: string | null;
6281
- anchorUserMessageId: string | null;
6282
- error: string;
6283
- };
6509
+ type ImageToTextUsageSummary = {
6510
+ callCount: number;
6511
+ successCount: number;
6512
+ errorCount: number;
6513
+ sourceCount: number;
6514
+ usage: Usage | null;
6284
6515
  };
6285
- type SessionTurnLifecyclePhase = "llm_call_started";
6286
- type SessionTurnLifecycleEvent = {
6287
- id: string;
6288
- timestamp: number;
6289
- domain: "session";
6290
- type: "session.turn.lifecycle";
6291
- requestId?: string | null;
6292
- spaceId: string;
6293
- sessionId: string;
6294
- payload: {
6295
- turnId: string | null;
6296
- anchorUserMessageId: string | null;
6297
- phase: SessionTurnLifecyclePhase;
6298
- llmRound: number;
6299
- provider: string | null;
6300
- model: string | null;
6301
- at: string;
6302
- };
6516
+ type SessionTurnIntermediateSummary = {
6517
+ messageCount: number;
6518
+ toolCallCount: number;
6519
+ usage?: Usage | null;
6520
+ durationMs?: number | null;
6521
+ lastMessageText?: string | null;
6522
+ hasError?: boolean;
6523
+ compaction?: SessionTurnCompactionSummary | null;
6524
+ imageToText?: ImageToTextUsageSummary | null;
6303
6525
  };
6304
- type RealtimeTurnRecord = Partial<Pick<SessionTurnRecord, "id" | "sessionId" | "sequence" | "executionKind" | "status" | "intent" | "userUuid" | "authorProfile" | "userContent" | "userText" | "assistantContent" | "assistantText" | "provider" | "model" | "stopReason" | "errorMessage" | "finalUsage" | "totalUsage" | "summary" | "intermediateIndex" | "intermediateSummary" | "harnessIndex" | "meta" | "thinkingLevel" | "startedAt" | "completedAt" | "durationMs" | "createdAt" | "updatedAt">>;
6305
- type RealtimeMessageRecord = Pick<MessageRecord, "id" | "sessionId" | "role" | "content" | "text" | "sequence" | "provider" | "model" | "stopReason" | "errorMessage" | "usage" | "meta" | "startedAt" | "completedAt" | "durationMs" | "createdAt">;
6306
- type SessionTurnCreatedEvent = {
6526
+ type StoredIntermediateMessage = {
6307
6527
  id: string;
6308
- timestamp: number;
6309
- domain: "session";
6310
- type: "session.turn.created";
6311
- requestId?: string | null;
6312
- spaceId: string;
6313
6528
  sessionId: string;
6314
- payload: {
6315
- turn: RealtimeTurnRecord;
6316
- };
6529
+ sequence?: number | null;
6530
+ role: "user" | "assistant" | "system";
6531
+ content: ContentBlock[];
6532
+ text: string | null;
6533
+ provider: string | null;
6534
+ model: string | null;
6535
+ stopReason: string | null;
6536
+ errorMessage: string | null;
6537
+ usage: Usage | null;
6538
+ durationMs: number | null;
6539
+ toolCallsObjectKey: string | null;
6540
+ meta: Record<string, unknown> | null;
6541
+ createdAt: string;
6317
6542
  };
6318
- type SessionTurnUpdatedEvent = {
6543
+ type StoredToolCall = {
6319
6544
  id: string;
6320
- timestamp: number;
6321
- domain: "session";
6322
- type: "session.turn.updated";
6323
- requestId?: string | null;
6324
- spaceId: string;
6325
- sessionId: string;
6326
- payload: {
6327
- turn: RealtimeTurnRecord;
6328
- };
6545
+ name: string;
6546
+ input: Record<string, unknown>;
6547
+ meta: Record<string, unknown> | null;
6548
+ result: {
6549
+ content: string | ContentBlock[] | null;
6550
+ isError: boolean;
6551
+ meta: Record<string, unknown> | null;
6552
+ } | null;
6329
6553
  };
6330
- type SessionTurnFinalizedEvent = {
6331
- id: string;
6332
- timestamp: number;
6333
- domain: "session";
6334
- type: "session.turn.finalized";
6335
- requestId?: string | null;
6554
+ type MessageToolCallsFile = {
6555
+ version: 1;
6336
6556
  spaceId: string;
6337
6557
  sessionId: string;
6338
- payload: {
6339
- turn: RealtimeTurnRecord;
6340
- sessionLabelRefs: string[] | null;
6341
- };
6558
+ turnId: string;
6559
+ messageId: string;
6560
+ toolCalls: StoredToolCall[];
6342
6561
  };
6343
- type SessionTurnNotifyEvent = {
6344
- id: string;
6345
- timestamp: number;
6346
- domain: "session";
6347
- type: "session.turn.notify";
6348
- requestId?: string | null;
6562
+ type TurnIntermediateMessagesFile = {
6563
+ version: 1;
6349
6564
  spaceId: string;
6350
6565
  sessionId: string;
6351
- payload: {
6352
- spaceId: string;
6353
- sessionId: string;
6354
- turnId: string;
6355
- status: SessionTurnRecord["status"];
6356
- finishReason?: SessionTurnSummary["finishReason"] | null;
6357
- userPreview: string | null;
6358
- durationMs: number | null;
6359
- stepCount: number | null;
6360
- sequence: number | null;
6361
- provider: string | null;
6362
- model: string | null;
6363
- completedAt: string | null;
6364
- };
6566
+ turnId: string;
6567
+ summary: SessionTurnIntermediateSummary;
6568
+ messages: StoredIntermediateMessage[];
6365
6569
  };
6366
- type SessionMessagePersistedEvent = {
6570
+ type SessionTurnAuthorProfile = {
6571
+ userUuid: string;
6572
+ username?: string | null;
6573
+ displayName: string;
6574
+ avatarUrl: string | null;
6575
+ };
6576
+ type SessionTurnIndexItem = {
6367
6577
  id: string;
6368
- timestamp: number;
6369
- domain: "session";
6370
- type: "session.message.persisted";
6371
- requestId?: string | null;
6372
- spaceId: string;
6373
6578
  sessionId: string;
6374
- payload: {
6375
- message: RealtimeMessageRecord;
6579
+ sourceSessionId?: string;
6580
+ sourceTurnId?: string;
6581
+ sequence: number;
6582
+ status: SessionTurnStatus;
6583
+ executionKind?: SessionTurnExecutionKind;
6584
+ /** Present on current turn index payloads; older caches may omit it. */
6585
+ intent?: SessionTurnIntent;
6586
+ userUuid?: string | null;
6587
+ authorProfile?: SessionTurnAuthorProfile | null;
6588
+ startedAt: string | null;
6589
+ completedAt: string | null;
6590
+ durationMs: number | null;
6591
+ createdAt: string;
6592
+ updatedAt: string;
6593
+ userPreview: string | null;
6594
+ assistantPreview: string | null;
6595
+ provider: string | null;
6596
+ model: string | null;
6597
+ finalUsage: Usage | null;
6598
+ totalUsage: Usage | null;
6599
+ errorMessage: string | null;
6600
+ };
6601
+ type SpaceTurnAuthorFilter$1 = "any" | "self" | "others";
6602
+ type SpaceTurnListItem$1 = SessionTurnIndexItem & {
6603
+ session: {
6604
+ id: string;
6605
+ title: string | null;
6606
+ source: string | null;
6376
6607
  };
6377
6608
  };
6378
- type SpaceFsChangedEvent = {
6379
- id: string;
6380
- timestamp: number;
6381
- domain: "space";
6382
- type: "space.fs.changed";
6383
- requestId?: string | null;
6384
- spaceId: string;
6385
- sessionId?: string | null;
6386
- payload: SpaceFsChangedPayload;
6609
+ type SpaceTurnsResponse$1 = {
6610
+ turns: SpaceTurnListItem$1[];
6611
+ snapshotAt: string;
6612
+ snapshotCursor: string;
6613
+ pageInfo: {
6614
+ hasMore: boolean;
6615
+ nextCursor: string | null;
6616
+ };
6387
6617
  };
6388
- type SpacePortsChangedEvent = {
6618
+ type SessionTurnRecord = {
6389
6619
  id: string;
6390
- timestamp: number;
6391
- domain: "space";
6392
- type: "space.ports.changed";
6393
- requestId?: string | null;
6394
- spaceId: string;
6395
- sessionId?: string | null;
6396
- payload: SpacePortsChangedPayload;
6397
- };
6398
- type SpacePresenceUser$1 = {
6399
- userId: string;
6400
- connectionCount: number;
6401
- lastSeenAt: string;
6620
+ sessionId: string;
6621
+ sourceSessionId?: string;
6622
+ sourceTurnId?: string;
6623
+ userUuid: string | null;
6624
+ sequence: number;
6625
+ executionKind?: SessionTurnExecutionKind;
6626
+ status: SessionTurnStatus;
6627
+ intent: SessionTurnIntent;
6628
+ userContent: ContentBlock[];
6629
+ userText: string | null;
6630
+ assistantContent: ContentBlock[] | null;
6631
+ assistantText: string | null;
6632
+ provider: string | null;
6633
+ model: string | null;
6634
+ stopReason: string | null;
6635
+ errorMessage: string | null;
6636
+ finalUsage: Usage | null;
6637
+ totalUsage: Usage | null;
6638
+ summary: SessionTurnSummary | null;
6639
+ intermediateIndex: SessionTurnIntermediateIndex | null;
6640
+ intermediateSummary: SessionTurnIntermediateSummary | null;
6641
+ harnessIndex?: HarnessArchiveIndex | null;
6402
6642
  meta: Record<string, unknown> | null;
6403
- metas: Record<string, unknown>[];
6404
- profile: {
6405
- userUuid: string;
6406
- username: string | null;
6407
- displayName: string;
6408
- avatarUrl: string | null;
6409
- };
6410
- };
6411
- type SpacePresenceSnapshot$1 = {
6412
- spaceId: string;
6413
- users: SpacePresenceUser$1[];
6643
+ /** Effective thinking level used for this turn (derived from meta.effectiveThinkingLevel). */
6644
+ thinkingLevel?: ModelThinkingLevel | null;
6645
+ authorProfile?: SessionTurnAuthorProfile | null;
6646
+ startedAt: string | null;
6647
+ completedAt: string | null;
6648
+ durationMs: number | null;
6649
+ createdAt: string;
6414
6650
  updatedAt: string;
6415
6651
  };
6416
- type SpacePresenceUpdatedEvent = {
6417
- id: string;
6418
- timestamp: number;
6419
- domain: "space";
6420
- type: "space.presence.updated";
6421
- requestId?: string | null;
6422
- spaceId: string;
6423
- sessionId?: string | null;
6424
- payload: SpacePresenceSnapshot$1;
6425
- };
6426
- type BoardChangedEvent = {
6427
- id: string;
6428
- timestamp: number;
6429
- domain: "space";
6430
- type: "board.changed";
6431
- requestId?: string | null;
6432
- spaceId: string;
6433
- sessionId?: string | null;
6434
- payload: {
6435
- boardId: string;
6436
- actorId: string;
6437
- mutationId: string;
6438
- version: number;
6439
- changed: BoardMutationReceipt["changed"];
6440
- /** Server-authored animation rows for a small, pure animation mutation. */
6441
- animationPatch?: {
6442
- effects: BoardEffect[];
6443
- compositions: BoardComposition[];
6444
- playback?: BoardPlaybackSnapshot | null;
6445
- };
6446
- source?: RequestSource;
6447
- };
6448
- };
6449
- type BoardAwarenessUpdatedEvent = {
6652
+ //#endregion
6653
+ //#region ../protocol/dist/model/session.d.ts
6654
+ type SessionForkRecord = {
6450
6655
  id: string;
6451
- timestamp: number;
6452
- domain: "space";
6453
- type: "board.awareness.updated";
6454
- requestId?: string | null;
6455
6656
  spaceId: string;
6456
- sessionId?: string | null;
6457
- rooms?: RealtimeRoom[];
6458
- payload: {
6459
- boardId: string;
6460
- connectionId: string;
6461
- actorId: string;
6462
- actorName: string;
6463
- seq: number;
6464
- update: BoardAwarenessUpdate;
6465
- };
6657
+ parentSessionId: string;
6658
+ childSessionId: string;
6659
+ rootSessionId: string;
6660
+ depth: number;
6661
+ anchorSourceSessionId: string;
6662
+ anchorTurnId: string;
6663
+ anchorSequence: number;
6664
+ ancestorSessionIds: string[];
6665
+ sessionPath: string[];
6666
+ createdBy: string | null;
6667
+ createdAt: string;
6466
6668
  };
6467
- type BoardPlaybackChangedEvent = {
6669
+ type SessionTurnSegmentRecord = {
6468
6670
  id: string;
6469
- timestamp: number;
6470
- domain: "space";
6471
- type: "board.playback.changed";
6472
- requestId?: string | null;
6473
- spaceId: string;
6474
- sessionId?: string | null;
6475
- payload: BoardPlaybackSnapshot;
6671
+ sessionId: string;
6672
+ ordinal: number;
6673
+ sourceSessionId: string;
6674
+ fromSequence: number;
6675
+ toSequence: number | null;
6676
+ createdAt: string;
6476
6677
  };
6477
- type RealtimeAppStatus = "published" | "disabled";
6478
- type RealtimeAppVisibility = "public" | "space";
6479
- type RealtimeAppTargetType = "file" | "directory" | "port";
6480
- /**
6481
- * Canonical wire shape of an app record: realtime events and `/api/apps`
6482
- * responses. The legacy `/api/works` mount serves the work-era field names
6483
- * (`workScopes`) until the next breaking protocol version.
6484
- */
6485
- type RealtimeAppRecord = {
6678
+ type SessionBindingRecord$1 = {
6486
6679
  id: string;
6487
6680
  spaceId: string;
6488
- userUuid: string;
6489
- slug: string;
6490
- status: RealtimeAppStatus;
6491
- visibility: RealtimeAppVisibility;
6492
- targetType: RealtimeAppTargetType;
6493
- targetRef: string;
6494
- assetKey: string | null;
6495
- currentVersionId: string | null;
6496
- latestVersion: number;
6497
- publishedAt: string | null;
6498
- appScopes: string[];
6499
- allowedViewerScopes: string[];
6681
+ spaceSessionId: string;
6682
+ spaceChannelId: string;
6683
+ provider: string;
6684
+ bindingKey: string;
6685
+ externalChatId: string;
6686
+ status: string | null;
6500
6687
  meta: Record<string, unknown> | null;
6501
- createdAt: string | null;
6502
- updatedAt: string | null;
6688
+ createdAt: string;
6689
+ updatedAt: string;
6690
+ lastMessageAt: string | null;
6503
6691
  };
6504
- /**
6505
- * Canonical wire shape of a published app version. The legacy `/api/works`
6506
- * mount serves the work-era `workId` field name until the next breaking
6507
- * protocol version.
6508
- */
6509
- type RealtimeAppVersionRecord = {
6692
+ type SessionUserProfile = {
6693
+ userUuid: string;
6694
+ username: string | null;
6695
+ displayName: string;
6696
+ avatarUrl: string | null;
6697
+ };
6698
+ type SessionActiveTurn = {
6510
6699
  id: string;
6511
- appId: string;
6512
- version: number;
6513
- targetType: RealtimeAppTargetType;
6514
- targetRef: string;
6515
- assetKey: string | null;
6516
- contentKind: AppContentKind;
6517
- artifact: AppArtifactDescriptor | null;
6518
- meta: Record<string, unknown> | null;
6519
- /** Version provenance; session identity is gated on `session.view`. */
6520
- source: AppVersionSource | null;
6521
- createdAt: string | null;
6700
+ status: "queued" | "running" | "abort_requested";
6701
+ provider: string | null;
6702
+ model: string | null;
6703
+ startedAt: string | null;
6704
+ anchorUserMessageId: string | null;
6522
6705
  };
6523
- type AppVersionPublishedEvent = {
6706
+ type SessionRecord$1 = {
6524
6707
  id: string;
6525
- timestamp: number;
6526
- domain: "space";
6527
- type: "app.version.published";
6528
- requestId?: string | null;
6529
6708
  spaceId: string;
6530
- sessionId?: null;
6531
- payload: {
6532
- app: RealtimeAppRecord;
6533
- version: RealtimeAppVersionRecord;
6534
- standaloneUrl?: string | null;
6535
- previousVersionId: string | null;
6536
- actor: {
6537
- userId: string;
6538
- };
6539
- source: RequestSource | null;
6540
- };
6709
+ userUuid: string | null;
6710
+ userProfile?: SessionUserProfile | null;
6711
+ participantUserUuids?: string[];
6712
+ participantProfiles?: SessionUserProfile[];
6713
+ title: string | null;
6714
+ source: string | null;
6715
+ status: string | null;
6716
+ activeTurn?: SessionActiveTurn | null;
6717
+ externalSessionId: string | null;
6718
+ meta: Record<string, unknown> | null;
6719
+ latestMessageText: string | null;
6720
+ lastMessageAt: string | null;
6721
+ lastMessageId: string | null;
6722
+ createdAt: string;
6723
+ updatedAt: string;
6541
6724
  };
6542
- type RealtimeTaskRecord = {
6725
+ type MessageAuthorProfile = {
6726
+ userUuid: string;
6727
+ username?: string | null;
6728
+ displayName: string;
6729
+ avatarUrl: string | null;
6730
+ };
6731
+ type MessageRecord = {
6543
6732
  id: string;
6544
- type: string;
6545
- status: TaskRunStatus;
6546
- jobId: string;
6547
- cronJobId: string | null;
6548
- spaceId: string | null;
6549
- sessionId: string | null;
6550
- turnId: string | null;
6551
- userId: string | null;
6552
- attemptCount: number;
6553
- scheduledAt: string | null;
6554
- startedAt: string | null;
6555
- finishedAt: string | null;
6733
+ sessionId: string;
6734
+ role: "user" | "assistant" | "system";
6735
+ content: ContentBlock[];
6736
+ text: string | null;
6737
+ sequence: number;
6738
+ provider: string | null;
6739
+ model: string | null;
6740
+ stopReason: string | null;
6556
6741
  errorMessage: string | null;
6742
+ usage: Usage | null;
6743
+ meta: Record<string, unknown> | null;
6744
+ authorUuid?: string | null;
6745
+ authorProfile?: MessageAuthorProfile | null;
6746
+ startedAt: string | null;
6747
+ completedAt: string | null;
6748
+ durationMs: number | null;
6557
6749
  createdAt: string;
6558
- updatedAt: string;
6559
6750
  };
6560
- type TaskCreatedEvent = {
6751
+ //#endregion
6752
+ //#region ../protocol/dist/gateway/types.d.ts
6753
+ type ChannelModelConfig = {
6754
+ provider: string;
6561
6755
  id: string;
6562
- timestamp: number;
6563
- domain: "space";
6564
- type: "task.created";
6565
- requestId?: string | null;
6566
- spaceId?: string | null;
6567
- sessionId?: string | null;
6568
- payload: {
6569
- task: RealtimeTaskRecord;
6756
+ thinkingLevel?: ModelThinkingLevel | null;
6757
+ };
6758
+ type BaseChannelConfig = {
6759
+ model?: ChannelModelConfig | null;
6760
+ };
6761
+ type DiscordChannelConfig = BaseChannelConfig & {
6762
+ inbound?: {
6763
+ requireMentionInGuild?: boolean;
6764
+ };
6765
+ outbound?: {
6766
+ showThinking?: boolean;
6767
+ showToolCalls?: boolean;
6570
6768
  };
6571
6769
  };
6572
- type TaskUpdatedEvent = {
6573
- id: string;
6574
- timestamp: number;
6575
- domain: "space";
6576
- type: "task.updated";
6577
- requestId?: string | null;
6578
- spaceId?: string | null;
6579
- sessionId?: string | null;
6580
- payload: {
6581
- task: RealtimeTaskRecord;
6582
- changed: string[];
6770
+ type FeishuChannelConfig = BaseChannelConfig & {
6771
+ brand?: "feishu" | "lark";
6772
+ inbound?: {
6773
+ requireMentionInGroup?: boolean;
6774
+ };
6775
+ outbound?: {
6776
+ renderMode?: "card" | "post";
6777
+ showThinking?: boolean;
6778
+ showToolCalls?: boolean;
6583
6779
  };
6584
6780
  };
6585
- type LabelAssignmentsUpdatedEvent = {
6586
- id: string;
6587
- timestamp: number;
6588
- domain: "label";
6589
- type: "label.assignments.updated";
6590
- requestId?: string | null;
6591
- /** Space room target; null for user-scoped label events (delivered to user room). */
6592
- spaceId: string | null;
6593
- sessionId?: string | null;
6594
- payload: {
6595
- resourceType: "session" | "checkpoint" | "file" | "space";
6596
- resourceRef: string;
6597
- labels: unknown[];
6598
- assignments: unknown[];
6599
- items?: unknown[];
6600
- affectedLabelIds: string[];
6781
+ type WeChatChannelConfig = BaseChannelConfig & {
6782
+ outbound?: {
6783
+ showIntermediateStatus?: boolean;
6601
6784
  };
6602
6785
  };
6603
- /**
6604
- * A desktop command addressed at one frontend instance of the acting user.
6605
- * Delivered to the user room; every client compares `targetClientId` with its
6606
- * own client id and ignores commands that are not for it.
6607
- */
6608
- type DesktopCommandDispatchedEvent = {
6609
- id: string;
6610
- timestamp: number;
6611
- domain: "desktop";
6612
- type: "desktop.command.dispatched";
6613
- requestId?: string | null;
6614
- spaceId?: string | null;
6615
- sessionId?: string | null;
6616
- rooms?: RealtimeRoom[];
6617
- payload: DesktopCommandDispatchedPayload;
6786
+ type QQChannelConfig = BaseChannelConfig & {
6787
+ inbound?: {
6788
+ requireMentionInGroup?: boolean;
6789
+ };
6790
+ outbound?: {
6791
+ markdownSupport?: boolean;
6792
+ };
6793
+ };
6794
+ type ChannelConfig = DiscordChannelConfig | FeishuChannelConfig | WeChatChannelConfig | QQChannelConfig | (BaseChannelConfig & Record<string, unknown>);
6795
+ /** Runtime connection health for a bound gateway channel (space_channel id). */
6796
+ type ChannelRuntimeState = "unbound" | "connecting" | "ready" | "degraded" | "error" | "stopped";
6797
+ type ChannelHealthReasonCode = "invalid_credentials" | "auth_failed" | "network" | "permission" | "provider_error" | "rate_limit" | "unknown";
6798
+ type ChannelHealth = {
6799
+ state: ChannelRuntimeState;
6800
+ reasonCode?: ChannelHealthReasonCode | null;
6801
+ message?: string | null;
6802
+ detail?: string | null;
6803
+ lastReadyAt?: string | null;
6804
+ lastErrorAt?: string | null;
6805
+ lastInboundAt?: string | null;
6806
+ lastOutboundAt?: string | null;
6807
+ nodeId?: string | null;
6808
+ updatedAt: string;
6809
+ meta?: Record<string, string> | null;
6618
6810
  };
6619
- type RealtimeServerEvent = SystemReadyEvent | SystemAuthOkEvent | SystemRequestErrorEvent | SystemPongEvent | SystemAckOkEvent | SystemSubscribeOkEvent | SystemSubscribeErrorEvent | SessionCreatedEvent | SessionUpdatedEvent | SessionRequestAcceptedEvent | SessionRequestErrorEvent | SessionTurnCreatedEvent | SessionTurnPatchEvent | SessionTurnErrorEvent | SessionTurnLifecycleEvent | SessionTurnUpdatedEvent | SessionTurnFinalizedEvent | SessionTurnNotifyEvent | SessionMessagePersistedEvent | SpaceFsChangedEvent | SpacePortsChangedEvent | SpacePresenceUpdatedEvent | BoardChangedEvent | BoardAwarenessUpdatedEvent | BoardPlaybackChangedEvent | AppVersionPublishedEvent | TaskCreatedEvent | TaskUpdatedEvent | LabelAssignmentsUpdatedEvent | DesktopCommandDispatchedEvent | RealtimeRoomEvent | RealtimeRoomJoinedEvent | RealtimeRoomMemberChangedEvent | RealtimeRoomPresenceUpdatedEvent | RealtimeRoomRequestEvent | RealtimeRoomRequestErrorEvent | RealtimeRoomClosedEvent;
6620
6811
  //#endregion
6621
6812
  //#region src/types.d.ts
6622
6813
  type SpaceTurnAuthorFilter = SpaceTurnAuthorFilter$1;
@@ -8236,4 +8427,4 @@ declare const resolveVoiceInputWebsocketUrl: (options?: {
8236
8427
  env?: CohubEnvironment;
8237
8428
  }) => string;
8238
8429
  //#endregion
8239
- export { CheckpointDiffDelivery as $, BoardEffect as $a, DesktopCommandStatus as $i, SpaceCommerceProductBenefitBinding as $n, StoredIntermediateMessage as $o, SpaceUsageHourlyStat as $r, isRequestSourceEmpty as $s, PromptTemplateCatalogResponse as $t, BillingCreditExpiryGroup as A, BoardMutationReceipt as Aa, RealtimeServerEvent as Ai, SessionTurnStreamSnapshotResponse as An, encodeGenerationPolicy as Ao, SpaceFsUploadResponse as Ar, RuntimeArchivePage as As, JsonValue as At, BillingProductBillingInterval as B, BoardTransactionsReadInput as Ba, DESKTOP_COMMAND_DEFAULT_TIMEOUT_MS as Bi, SpaceActivityResponse as Bn, ChannelConfig as Bo, SpacePendingDiffSummary as Br, CreateSpaceCompletionInput as Bs, LabelSource as Bt, BillingBalanceActivityStatus as C, BoardCameraFocus as Ca, RealtimeAppRecord as Ci, SessionMessageResponse as Cn, AppAuthorizationTarget as Co, SpaceFsTreeResponse as Cr, runtimeEventSchema as Cs, GlobalSearchResponse as Ct, BillingCheckoutConfirmation as D, BoardCreateInput as Da, RealtimeRoomDescriptor as Di, SessionTurnIndexResponse as Dn, GenerationPolicyError as Do, SpaceFsUploadPlanEntry as Dr, HarnessArchive as Ds, InvitationDetail as Dt, BillingCheckoutActionState as E, BoardCapabilities as Ea, RealtimeRoom as Ei, SessionRecord as En, GenerationPolicy as Eo, SpaceFsUploadError as Er, selectRuntimeContextMessages as Es, GlobalSearchViewerRelation as Et, BillingDiscountOfferRef as F, BoardRecord as Fa, AppArtifactManifestFile as Fi, SkillCatalogSource as Fn, parseGenerationPolicyFromEnv as Fo, SpaceListItem as Fr, CompletionAssistantMessage as Fs, LabelItemsSessionFork as Ft, BillingProductPromotion as G, BoardAuthoringReadInput as Ga, DESKTOP_COMMAND_TERMINAL_TTL_SECONDS as Gi, SpaceChannelBindingInput as Gn, FeishuChannelConfig as Go, SpaceRole as Gr, ContentBlock as Gs, PaletteOverviewSession as Gt, BillingProductDisplay as H, parseBoardPlaybackPolicy as Ha, DESKTOP_COMMAND_PAYLOAD_MAX_BYTES as Hi, SpaceBootstrapSource as Hn, ChannelHealthReasonCode as Ho, SpacePresenceUser as Hr, SpaceCompletionResult as Hs, ModelCatalogEntry as Ht, BillingDiscountPricing as I, BoardSummary as Ia, AppBoardArtifactManifest as Ii, SpaceAccess as In, BillingPayload as Io, SpaceMember as Ir, CompletionMessage as Is, LabelListItem as It, BillingResponsePayload as J, BoardItemPatchSchema as Ja, DesktopCall as Ji, SpaceCommerceBuyerProfile as Jn, SessionTurnSegmentRecord as Jo, SpaceSandboxProvider as Jr, REQUEST_SOURCE_VIA_MAX_LENGTH as Js, PatchResourceLabelsInput as Jt, BillingPromotionCodePreview as K, BoardAuthoringSnapshot as Ka, DESKTOP_COMMAND_VERSION as Ki, SpaceCheckpointDetailResponse as Kn, MessageRecord as Ko, SpaceSandboxAutoDestroyPolicy as Kr, COHUB_SOURCE_HEADER as Ks, PaletteOverviewSpace as Kt, BillingHistoryPagination as L, BoardTransactionOperation as La, AppBoardAsset as Li, SpaceAccessPolicy as Ln, GenerationContentBlock as Lo, SpaceMeta as Lr, CompletionMessageRole as Ls, LabelRecord as Lt, BillingCreditStatus as M, BoardPlaybackPolicy as Ma, AppArtifactDescriptor as Mi, SessionTurnsPaginatedResponse as Mn, findGenerationModelPolicy as Mo, SpaceInvitation as Mr, RuntimeArchiveUpload as Ms, LabelAssignmentPageInfo as Mt, BillingCreditUnit as N, BoardPlaybackPolicySchema as Na, AppArtifactDownloadDescriptor as Ni, SkillCatalogEntry as Nn, getAllowedGenerationModelIds as No, SpaceInvitationListResponse as Nr, harnessArchiveIndexSchema as Ns, LabelAssignmentRecord as Nt, BillingCheckoutResult as O, BoardDiagnostic as Oa, RealtimeRoomEvent as Oi, SessionTurnResponse as On, assertGenerationRequestAllowedByPolicy as Oo, SpaceFsUploadPlanEntryInput as Or, HarnessArchiveIndex as Os, JsonObject as Ot, BillingDiscountOffer as P, BoardPlaybackSnapshot as Pa, AppArtifactManifest as Pi, SkillCatalogResponse as Pn, normalizeGenerationPolicy as Po, SpaceInvitationLocation as Pr, validateArchiveBoundary as Ps, LabelItemsResponse as Pt, Channel as Q, BoardAssetRef as Qa, DesktopCommandRecord as Qi, SpaceCommerceProduct as Qn, SpaceTurnsResponse$1 as Qo, SpaceTurnsResponse as Qr, isRequestSourceClientId as Qs, PromptTemplateCatalogEntry as Qt, BillingPaymentStatus as R, BoardTransactionRecord as Ra, AppContentKind as Ri, SpaceActivityAppRanking as Rn, GenerationModelDeclaration as Ro, SpaceModListItem as Rr, CompletionThinkingLevel as Rs, LabelResourceType as Rt, BillingBalanceActivityList as S, BoardDealParamsSchema as Sa, LabelAssignmentsUpdatedEvent as Si, SessionBindingRecord as Sn, AppAuthorizationResult as So, SpaceFsReadFilesResponse as Sr, runtimeCommandSchema as Ss, GenerationUsageSummary as St, BillingCatalogProduct as T, BoardCameraState as Ta, RealtimePatchOperation as Ti, SessionMessagesResponse as Tn, GenerationParameterConstraint as To, SpaceFsUploadEntry as Tr, contextToPiMessages as Ts, GlobalSearchType as Tt, BillingProductKind as U, BoardAuthoringItem as Ua, DESKTOP_COMMAND_PENDING_TTL_SECONDS as Ui, SpaceBootstrapStage as Un, ChannelRuntimeState as Uo, SpacePublicProfile as Ur, SpaceCompletionStreamEvent as Us, PERMISSIONS as Ut, BillingProductCreditBenefit as V, BoardValidationResult as Va, DESKTOP_COMMAND_MAX_TIMEOUT_MS as Vi, SpaceBootstrapMeta as Vn, ChannelHealth as Vo, SpacePresenceSnapshot as Vr, ModelThinkingLevel as Vs, MeResponse as Vt, BillingProductPricing as W, BoardAuthoringItemSchema as Wa, DESKTOP_COMMAND_SETTLEMENT_GRACE_SECONDS as Wi, SpaceBootstrapStatus as Wn, DiscordChannelConfig as Wo, SpaceRecord as Wr, Usage as Ws, PaletteOverviewResponse as Wt, BillingSubscriptionHistoryStatus as X, BoardSemanticCommandSchema as Xa, DesktopCommandDispatchedPayload as Xi, SpaceCommerceFeatureBenefit as Xn, SessionTurnIndexItem as Xo, SpaceTurnAuthorFilter as Xr, RequestSourceVia as Xs, Permission as Xt, BillingSubscriptionHistoryList as Y, BoardSemanticCommand as Ya, DesktopCommand as Yi, SpaceCommerceCreditsBenefit as Yn, MessageToolCallsFile as Yo, SpaceSessionsResponse as Yr, RequestSource as Ys, PatchResourceLabelsResponse as Yt, BillingSubscriptionSummary as Z, BoardSemanticMutation as Za, DesktopCommandError as Zi, SpaceCommerceOrder as Zn, SessionTurnRecord as Zo, SpaceTurnListItem as Zr, hasRequestSourceIdentity as Zs, PromptAccessMode as Zt, AcceptInvitationResponse as _, BoardColorId as _a, AppVersionPublishedEvent as _i, ReferralReward as _n, BoardCapability as _o, SpaceFsFileResponse as _r, RuntimeTraceContext as _s, CronJobRecord as _t, CohubRuntimeKind as a, isTerminalDesktopCommandStatus as aa, requestSourceToHeaders as ac, UserActivityQuery as ai, PublicUserWorkItem as an, BoardAnimationTarget as ao, SpaceCreateResponse as ar, RUNTIME_PROTOCOL_VERSION as as, CheckpointDiffStatus as at, BillingBalanceActivity as b, BoardAnimationSpecSchema as ba, BoardPlaybackChangedEvent as bi, SandboxSpecId as bn, AppAuthorizationGrant as bo, SpaceFsReadFilesError as br, isLocalHarness as bs, GenerationUsageBlock as bt, normalizeVoiceInputWebsocketUrl as c, NavigationCall as ca, UserActivityResponse as ci, ReferenceAggregateResponse as cn, BoardCompositionPlayback as co, SpaceFsCompleteUploadInput as cr, RuntimeCommand as cs, ClaimReferralResponse as ct, resolveCohubEnvironment as d, BoardAwarenessGesture as da, UserSessionListItem as di, ReferenceQueryResponse as dn, BoardProceduralClip as do, SpaceFsCreateUploadInput as dr, RuntimeExecutionEvent as ds, CreateSpaceInput as dt, DesktopFileTarget as ea, isRequestSourceUuid as ec, SpaceUsageResponse as ei, PublicReferral as en, BoardEffectInput as eo, SpaceCommerceProductCreditBenefit as er, StoredToolCall as es, CheckpointDiffFile as et, resolveExecutionAppId as f, BoardAwarenessNodePreview as fa, UserSessionSourceKey as fi, ReferenceQueryableType as fn, BoardTimeline as fo, SpaceFsCreateUploadResponse as fr, RuntimeMessage as fs, CreateSpaceModInput as ft, resolveWebsocketUrl as g, BOARD_GEO_KINDS as ga, scopeListHasPermission as gi, ReferralListItem as gn, parseBoardCompositionInput as go, SpaceFsFileKind as gr, RuntimeStopConfirmation as gs, CronJobPayload as gt, resolveWebBaseUrl as h, BOARD_COLOR_IDS as ha, isUserLevelPermission as hi, ReferralDashboard as hn, BoardTrackInterpolation as ho, SpaceFsEntry as hr, RuntimeStatus as hs, CreateSpaceSessionInput as ht, CohubExecutionContext as i, isDesktopCallMethod as ia, readRequestSourceFromEnv as ic, USER_LEVEL_PERMISSIONS as ii, PublicUserSpaceItem as in, BOARD_ANIMATION_CHANNEL_CAPABILITIES as io, SpaceConfigUpdateResponse as ir, RUNTIME_MAX_FRAME_BYTES as is, CheckpointDiffStats as it, BillingCreditGrantStatus as j, BoardPlaybackCommand as ja, SessionTurnPatchEvent as ji, SessionTurnWindowResponse as jn, filterGenerationDeclarationsByPolicy as jo, SpaceFsWriteFileInput as jr, RuntimeArchiveSegment as js, LabelAssignmentListItem as jt, BillingConversionIntent as k, BoardManifest as ka, RealtimeRoomMember as ki, SessionTurnSignedUrlsResponse as kn, decodeGenerationPolicy as ko, SpaceFsUploadProgress as kr, RUNTIME_ARCHIVE_SEGMENT_BYTES as ks, JsonPrimitive as kt, normalizeWebsocketUrl as l, NavigationLaunch as la, UserProfile as li, ReferenceDirection as ln, BoardCompositionSchema as lo, SpaceFsCompleteUploadResponse as lr, RuntimeContext as ls, CreateInvitationInput as lt, resolveVoiceInputWebsocketUrl as m, BoardAwarenessUpdate as ma, UserSessionsResponse as mi, ReferenceResourceType as mn, BoardTrack as mo, SpaceFsEncoding as mr, RuntimeSessionRecoveryStatus as ms, CreateSpacePromptResponse as mt, CohubContext as n, DesktopSurface as na, normalizeRequestSource as nc, TaskRunDetailResponse as ni, PublicUserPageResponse as nn, BoardEffectSchema as no, SpaceConfigInput as nr, HarnessKind as ns, CheckpointDiffPatchKind as nt, getCohubContext as o, parseDesktopCommand as oa, resolveRequestSourceChannel as oc, UserActivityRange as oi, ReferenceAggregateGroup as on, BoardComposition as oo, SpaceDefaultResponse as or, RUNTIME_RECOVERY_BATCH_SIZE as os, CheckpointDiffSummary as ot, resolveExecutionToken as p, BoardAwarenessStateUpdate as pa, UserSessionSpaceSummary as pi, ReferenceRecord as pn, BoardTimelineMarker as po, SpaceFsDeleteNodeInput as pr, RuntimePendingExecution as ps, CreateSpacePromptInput as pt, BillingRedemptionResult as q, BoardItemPatch as qa, DesktopAppTarget as qi, SpaceCommerceBenefit as qn, SessionForkRecord as qo, SpaceSandboxConfig as qr, COHUB_SOURCE_HEADER_NAMES as qs, PaletteOverviewSpaceRelation as qt, CohubEnvironment as r, DesktopTarget as ra, parseRequestSourceFromHeaders as rc, TaskRunRecord as ri, PublicUserProfile as rn, parseBoardEffectInput as ro, SpaceConfigResponse as rr, LocalHarness as rs, CheckpointDiffPatchLine as rt, normalizeBaseUrl as s, resolveOpenSurface as sa, UserActivityRankings as si, ReferenceAggregateGroupBy as sn, BoardCompositionInputSchema as so, SpaceEnvInput as sr, RuntimeCapabilities as ss, CheckpointRecord as st, COHUB_ENVIRONMENTS as t, DesktopOpenCommand as ta, mergeRequestSourceIntoMeta as tc, SpaceUsageSummary as ti, PublicUserAppItem as tn, BoardEffectInputSchema as to, SpaceConfig as tr, TurnIntermediateMessagesFile as ts, CheckpointDiffFileResponse as tt, resolveApiBaseUrl as u, SpacePublicEndpoints as ua, UserRulesResponse as ui, ReferenceKind as un, BoardEasing as uo, SpaceFsCreateDirectoryInput as ur, RuntimeContextMessage as us, CreateInvitationResponse as ut, ApiError as v, BoardGeoKind as va, BoardAwarenessUpdatedEvent as vi, ReferralStatus as vn, BoardCoordinateSpace as vo, SpaceFsMoveInput as vr, RuntimeTurnInput as vs, CronJobUpdatePatch as vt, BillingCatalog as w, BoardCameraFocusParams as wa, RealtimeAppVersionRecord as wi, SessionMessagesPaginatedResponse as wn, GenerationModelPolicy as wo, SpaceFsUploadDestination as wr, runtimeReadySchema as ws, GlobalSearchResult as wt, BillingBalanceActivityKind as x, BoardDealParams as xa, ChannelEnvelope as xi, SendMessageCronJobPayload as xn, AppAuthorizationRequest as xo, SpaceFsReadFilesInput as xr, resolveHarness as xs, GenerationUsageHourlyStat as xt, BatchUserProfilesResponse as y, BoardAnimationSpec as ya, BoardChangedEvent as yi, ResourceLabelsResponse as yn, BoardRenderCost as yo, SpaceFsPreparingFile as yr, RuntimeTurnUserMessage as ys, CursorPageInfo as yt, BillingPluginStatus as z, BoardTransactionsPage as za, AppVersionSource as zi, SpaceActivityContributor as zn, GenerationResult as zo, SpacePendingDiffFileResponse as zr, CompletionUsage as zs, LabelScopeType as zt };
8430
+ export { CheckpointDiffDelivery as $, DESKTOP_COMMAND_DEFAULT_TIMEOUT_MS as $a, runtimeCommandSchema as $i, SpaceCommerceProductBenefitBinding as $n, BoardTransactionsReadInput as $o, SpaceUsageHourlyStat as $r, SpaceCompletionResult as $s, PromptTemplateCatalogResponse as $t, BillingCreditExpiryGroup as A, AppVersionPublishedEvent as Aa, StoredIntermediateMessage as Ai, SessionTurnStreamSnapshotResponse as An, BoardColorId as Ao, SpaceFsUploadResponse as Ar, BoardCapability as As, JsonValue as At, BillingProductBillingInterval as B, RealtimeRoomDescriptor as Ba, RuntimeContext as Bi, SpaceActivityResponse as Bn, BoardCreateInput as Bo, SpacePendingDiffSummary as Br, RUNTIME_ARCHIVE_SEGMENT_BYTES as Bs, LabelSource as Bt, BillingBalanceActivityStatus as C, findGenerationModelPolicy as Ca, MessageRecord as Ci, SessionMessageResponse as Cn, SpacePublicEndpoints as Co, SpaceFsTreeResponse as Cr, BoardEasing as Cs, GlobalSearchResponse as Ct, BillingCheckoutConfirmation as D, GenerationContentBlock as Da, SessionTurnIndexItem as Di, SessionTurnIndexResponse as Dn, BoardAwarenessUpdate as Do, SpaceFsUploadPlanEntry as Dr, BoardTrack as Ds, InvitationDetail as Dt, BillingCheckoutActionState as E, parseGenerationPolicyFromEnv as Ea, MessageToolCallsFile as Ei, SessionRecord as En, BoardAwarenessStateUpdate as Eo, SpaceFsUploadError as Er, BoardTimelineMarker as Es, GlobalSearchViewerRelation as Et, BillingDiscountOfferRef as F, LabelAssignmentsUpdatedEvent as Fa, RUNTIME_MAX_FRAME_BYTES as Fi, SkillCatalogSource as Fn, BoardDealParamsSchema as Fo, SpaceListItem as Fr, AppAuthorizationRequest as Fs, LabelItemsSessionFork as Ft, BillingProductPromotion as G, AppArtifactDescriptor as Ga, RuntimeSessionRecoveryStatus as Gi, SpaceChannelBindingInput as Gn, BoardPlaybackPolicy as Go, SpaceRole as Gr, validateArchiveBoundary as Gs, PaletteOverviewSession as Gt, BillingProductDisplay as H, RealtimeRoomMember as Ha, RuntimeExecutionEvent as Hi, SpaceBootstrapSource as Hn, BoardManifest as Ho, SpacePresenceUser as Hr, RuntimeArchiveSegment as Hs, ModelCatalogEntry as Ht, BillingDiscountPricing as I, RealtimeAppRecord as Ia, RUNTIME_PROTOCOL_VERSION as Ii, SpaceAccess as In, BoardCameraFocus as Io, SpaceMember as Ir, AppAuthorizationResult as Is, LabelListItem as It, BillingResponsePayload as J, AppArtifactManifestFile as Ja, RuntimeTraceContext as Ji, SpaceCommerceBuyerProfile as Jn, BoardRecord as Jo, SpaceSandboxProvider as Jr, CompletionMessageRole as Js, PatchResourceLabelsInput as Jt, BillingPromotionCodePreview as K, AppArtifactDownloadDescriptor as Ka, RuntimeStatus as Ki, SpaceCheckpointDetailResponse as Kn, BoardPlaybackPolicySchema as Ko, SpaceSandboxAutoDestroyPolicy as Kr, CompletionAssistantMessage as Ks, PaletteOverviewSpace as Kt, BillingHistoryPagination as L, RealtimeAppVersionRecord as La, RUNTIME_RECOVERY_BATCH_SIZE as Li, SpaceAccessPolicy as Ln, BoardCameraFocusParams as Lo, SpaceMeta as Lr, AppAuthorizationTarget as Ls, LabelRecord as Lt, BillingCreditStatus as M, BoardChangedEvent as Ma, TurnIntermediateMessagesFile as Mi, SessionTurnsPaginatedResponse as Mn, BoardAnimationSpec as Mo, SpaceInvitation as Mr, BoardRenderCost as Ms, LabelAssignmentPageInfo as Mt, BillingCreditUnit as N, BoardPlaybackChangedEvent as Na, HarnessKind as Ni, SkillCatalogEntry as Nn, BoardAnimationSpecSchema as No, SpaceInvitationListResponse as Nr, BillingPayload as Ns, LabelAssignmentRecord as Nt, BillingCheckoutResult as O, GenerationModelDeclaration as Oa, SessionTurnRecord as Oi, SessionTurnResponse as On, BOARD_COLOR_IDS as Oo, SpaceFsUploadPlanEntryInput as Or, BoardTrackInterpolation as Os, JsonObject as Ot, BillingDiscountOffer as P, ChannelEnvelope as Pa, LocalHarness as Pi, SkillCatalogResponse as Pn, BoardDealParams as Po, SpaceInvitationLocation as Pr, AppAuthorizationGrant as Ps, LabelItemsResponse as Pt, Channel as Q, AppVersionSource as Qa, resolveHarness as Qi, SpaceCommerceProduct as Qn, BoardTransactionsPage as Qo, SpaceTurnsResponse as Qr, ModelThinkingLevel as Qs, PromptTemplateCatalogEntry as Qt, BillingPaymentStatus as R, RealtimePatchOperation as Ra, RuntimeCapabilities as Ri, SpaceActivityAppRanking as Rn, BoardCameraState as Ro, SpaceModListItem as Rr, HarnessArchive as Rs, LabelResourceType as Rt, BillingBalanceActivityList as S, filterGenerationDeclarationsByPolicy as Sa, FeishuChannelConfig as Si, SessionBindingRecord as Sn, NavigationLaunch as So, SpaceFsReadFilesResponse as Sr, BoardCompositionSchema as Ss, GenerationUsageSummary as St, BillingCatalogProduct as T, normalizeGenerationPolicy as Ta, SessionTurnSegmentRecord as Ti, SessionMessagesResponse as Tn, BoardAwarenessNodePreview as To, SpaceFsUploadEntry as Tr, BoardTimeline as Ts, GlobalSearchType as Tt, BillingProductKind as U, RealtimeServerEvent as Ua, RuntimeMessage as Ui, SpaceBootstrapStage as Un, BoardMutationReceipt as Uo, SpacePublicProfile as Ur, RuntimeArchiveUpload as Us, PERMISSIONS as Ut, BillingProductCreditBenefit as V, RealtimeRoomEvent as Va, RuntimeContextMessage as Vi, SpaceBootstrapMeta as Vn, BoardDiagnostic as Vo, SpacePresenceSnapshot as Vr, RuntimeArchivePage as Vs, MeResponse as Vt, BillingProductPricing as W, SessionTurnPatchEvent as Wa, RuntimePendingExecution as Wi, SpaceBootstrapStatus as Wn, BoardPlaybackCommand as Wo, SpaceRecord as Wr, harnessArchiveIndexSchema as Ws, PaletteOverviewResponse as Wt, BillingSubscriptionHistoryStatus as X, AppBoardAsset as Xa, RuntimeTurnUserMessage as Xi, SpaceCommerceFeatureBenefit as Xn, BoardTransactionOperation as Xo, SpaceTurnAuthorFilter as Xr, CompletionUsage as Xs, Permission as Xt, BillingSubscriptionHistoryList as Y, AppBoardArtifactManifest as Ya, RuntimeTurnInput as Yi, SpaceCommerceCreditsBenefit as Yn, BoardSummary as Yo, SpaceSessionsResponse as Yr, CompletionThinkingLevel as Ys, PatchResourceLabelsResponse as Yt, BillingSubscriptionSummary as Z, AppContentKind as Za, isLocalHarness as Zi, SpaceCommerceOrder as Zn, BoardTransactionRecord as Zo, SpaceTurnListItem as Zr, CreateSpaceCompletionInput as Zs, PromptAccessMode as Zt, AcceptInvitationResponse as _, GenerationPolicy as _a, resolveRequestSourceChannel as _c, ChannelConfig as _i, ReferralReward as _n, isDesktopCallMethod as _o, SpaceFsFileResponse as _r, BOARD_ANIMATION_CHANNEL_CAPABILITIES as _s, CronJobRecord as _t, CohubRuntimeKind as a, NativeRuntimeEvent as aa, REQUEST_SOURCE_VIA_MAX_LENGTH as ac, UserActivityQuery as ai, PublicUserWorkItem as an, DESKTOP_COMMAND_VERSION as ao, SpaceCreateResponse as ar, BoardAuthoringSnapshot as as, CheckpointDiffStatus as at, BillingBalanceActivity as b, decodeGenerationPolicy as ba, ChannelRuntimeState as bi, SandboxSpecId as bn, resolveOpenSurface as bo, SpaceFsReadFilesError as br, BoardCompositionInputSchema as bs, GenerationUsageBlock as bt, normalizeVoiceInputWebsocketUrl as c, NativeTurnMessage as ca, hasRequestSourceIdentity as cc, UserActivityResponse as ci, ReferenceAggregateResponse as cn, DesktopCommand as co, SpaceFsCompleteUploadInput as cr, BoardSemanticCommand as cs, ClaimReferralResponse as ct, resolveCohubEnvironment as d, isNativeClientTurn as da, isRequestSourceUuid as dc, UserSessionListItem as di, ReferenceQueryResponse as dn, DesktopCommandRecord as do, SpaceFsCreateUploadInput as dr, BoardAssetRef as ds, CreateSpaceInput as dt, runtimeEventSchema as ea, SpaceCompletionStreamEvent as ec, SpaceUsageResponse as ei, PublicReferral as en, DESKTOP_COMMAND_MAX_TIMEOUT_MS as eo, SpaceCommerceProductCreditBenefit as er, BoardValidationResult as es, CheckpointDiffFile as et, resolveExecutionAppId as f, nativeTurnCompleteSchema as fa, mergeRequestSourceIntoMeta as fc, UserSessionSourceKey as fi, ReferenceQueryableType as fn, DesktopCommandStatus as fo, SpaceFsCreateUploadResponse as fr, BoardEffect as fs, CreateSpaceModInput as ft, resolveWebsocketUrl as g, GenerationParameterConstraint as ga, requestSourceToHeaders as gc, scopeListHasPermission as gi, ReferralListItem as gn, DesktopTarget as go, SpaceFsFileKind as gr, parseBoardEffectInput as gs, CronJobPayload as gt, resolveWebBaseUrl as h, GenerationModelPolicy as ha, readRequestSourceFromEnv as hc, isUserLevelPermission as hi, ReferralDashboard as hn, DesktopSurface as ho, SpaceFsEntry as hr, BoardEffectSchema as hs, CreateSpaceSessionInput as ht, CohubExecutionContext as i, NATIVE_SYNC_SOURCE as ia, COHUB_SOURCE_HEADER_NAMES as ic, USER_LEVEL_PERMISSIONS as ii, PublicUserSpaceItem as in, DESKTOP_COMMAND_TERMINAL_TTL_SECONDS as io, SpaceConfigUpdateResponse as ir, BoardAuthoringReadInput as is, CheckpointDiffStats as it, BillingCreditGrantStatus as j, BoardAwarenessUpdatedEvent as ja, StoredToolCall as ji, SessionTurnWindowResponse as jn, BoardGeoKind as jo, SpaceFsWriteFileInput as jr, BoardCoordinateSpace as js, LabelAssignmentListItem as jt, BillingConversionIntent as k, GenerationResult as ka, SpaceTurnsResponse$1 as ki, SessionTurnSignedUrlsResponse as kn, BOARD_GEO_KINDS as ko, SpaceFsUploadProgress as kr, parseBoardCompositionInput as ks, JsonPrimitive as kt, normalizeWebsocketUrl as l, NativeTurnProgress as la, isRequestSourceClientId as lc, UserProfile as li, ReferenceDirection as ln, DesktopCommandDispatchedPayload as lo, SpaceFsCompleteUploadResponse as lr, BoardSemanticCommandSchema as ls, CreateInvitationInput as lt, resolveVoiceInputWebsocketUrl as m, nativeTurnStartSchema as ma, parseRequestSourceFromHeaders as mc, UserSessionsResponse as mi, ReferenceResourceType as mn, DesktopOpenCommand as mo, SpaceFsEncoding as mr, BoardEffectInputSchema as ms, CreateSpacePromptResponse as mt, CohubContext as n, contextToPiMessages as na, ContentBlock as nc, TaskRunDetailResponse as ni, PublicUserPageResponse as nn, DESKTOP_COMMAND_PENDING_TTL_SECONDS as no, SpaceConfigInput as nr, BoardAuthoringItem as ns, CheckpointDiffPatchKind as nt, getCohubContext as o, NativeTurnBinding as oa, RequestSource as oc, UserActivityRange as oi, ReferenceAggregateGroup as on, DesktopAppTarget as oo, SpaceDefaultResponse as or, BoardItemPatch as os, CheckpointDiffSummary as ot, resolveExecutionToken as p, nativeTurnProgressSchema as pa, normalizeRequestSource as pc, UserSessionSpaceSummary as pi, ReferenceRecord as pn, DesktopFileTarget as po, SpaceFsDeleteNodeInput as pr, BoardEffectInput as ps, CreateSpacePromptInput as pt, BillingRedemptionResult as q, AppArtifactManifest as qa, RuntimeStopConfirmation as qi, SpaceCommerceBenefit as qn, BoardPlaybackSnapshot as qo, SpaceSandboxConfig as qr, CompletionMessage as qs, PaletteOverviewSpaceRelation as qt, CohubEnvironment as r, selectRuntimeContextMessages as ra, COHUB_SOURCE_HEADER as rc, TaskRunRecord as ri, PublicUserProfile as rn, DESKTOP_COMMAND_SETTLEMENT_GRACE_SECONDS as ro, SpaceConfigResponse as rr, BoardAuthoringItemSchema as rs, CheckpointDiffPatchLine as rt, normalizeBaseUrl as s, NativeTurnComplete as sa, RequestSourceVia as sc, UserActivityRankings as si, ReferenceAggregateGroupBy as sn, DesktopCall as so, SpaceEnvInput as sr, BoardItemPatchSchema as ss, CheckpointRecord as st, COHUB_ENVIRONMENTS as t, runtimeReadySchema as ta, Usage as tc, SpaceUsageSummary as ti, PublicUserAppItem as tn, DESKTOP_COMMAND_PAYLOAD_MAX_BYTES as to, SpaceConfig as tr, parseBoardPlaybackPolicy as ts, CheckpointDiffFileResponse as tt, resolveApiBaseUrl as u, NativeTurnStart as ua, isRequestSourceEmpty as uc, UserRulesResponse as ui, ReferenceKind as un, DesktopCommandError as uo, SpaceFsCreateDirectoryInput as ur, BoardSemanticMutation as us, CreateInvitationResponse as ut, ApiError as v, GenerationPolicyError as va, ChannelHealth as vi, ReferralStatus as vn, isTerminalDesktopCommandStatus as vo, SpaceFsMoveInput as vr, BoardAnimationTarget as vs, CronJobUpdatePatch as vt, BillingCatalog as w, getAllowedGenerationModelIds as wa, SessionForkRecord as wi, SessionMessagesPaginatedResponse as wn, BoardAwarenessGesture as wo, SpaceFsUploadDestination as wr, BoardProceduralClip as ws, GlobalSearchResult as wt, BillingBalanceActivityKind as x, encodeGenerationPolicy as xa, DiscordChannelConfig as xi, SendMessageCronJobPayload as xn, NavigationCall as xo, SpaceFsReadFilesInput as xr, BoardCompositionPlayback as xs, GenerationUsageHourlyStat as xt, BatchUserProfilesResponse as y, assertGenerationRequestAllowedByPolicy as ya, ChannelHealthReasonCode as yi, ResourceLabelsResponse as yn, parseDesktopCommand as yo, SpaceFsPreparingFile as yr, BoardComposition as ys, CursorPageInfo as yt, BillingPluginStatus as z, RealtimeRoom as za, RuntimeCommand as zi, SpaceActivityContributor as zn, BoardCapabilities as zo, SpacePendingDiffFileResponse as zr, HarnessArchiveIndex as zs, LabelScopeType as zt };