@neta-art/cohub 2.15.0 → 3.1.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.
- package/README.md +56 -0
- package/dist/board.d.ts +99 -0
- package/dist/board.js +2 -0
- package/dist/chunks/board.d.ts +2589 -0
- package/dist/chunks/board.js +392 -0
- package/dist/chunks/http.d.ts +211 -54
- package/dist/chunks/http.js +202 -67
- package/dist/chunks/transport.js +4 -2
- package/dist/chunks/websocket.d.ts +394 -108
- package/dist/chunks/websocket.js +14 -13
- package/dist/http.d.ts +4 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3 -2
- package/package.json +5 -1
|
@@ -1,4 +1,23 @@
|
|
|
1
|
+
import { A as ZodOptional, C as ZodBoolean, D as ZodNullable, E as ZodLiteral, M as ZodUnion, N as output, O as ZodNumber, P as $strip, S as ZodArray, T as ZodEnum, g as BoardPlaybackSnapshot, j as ZodString, k as ZodObject, m as BoardOperation, w as ZodDiscriminatedUnion } from "./board.js";
|
|
1
2
|
import { n as CohubEnvironment } from "./environment.js";
|
|
3
|
+
//#region ../protocol/dist/billing.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Standard billing payload attached under the `billing` key of any response
|
|
6
|
+
* or realtime event that involves a billing gate. Present on 402 error bodies
|
|
7
|
+
* (blocked / not entitled), on success responses carrying a soft debt warning,
|
|
8
|
+
* and on realtime error events. `conversion` always drives the shared upgrade
|
|
9
|
+
* UI; balance fields appear only for balance-based gates.
|
|
10
|
+
*
|
|
11
|
+
* `conversion` is intentionally `unknown` here to keep the protocol layer free
|
|
12
|
+
* of a billing dependency — clients validate it against `BillingConversionIntent`.
|
|
13
|
+
*/
|
|
14
|
+
type BillingPayload = {
|
|
15
|
+
conversion: unknown;
|
|
16
|
+
status?: "blocked" | "allowed_with_debt";
|
|
17
|
+
netUsd?: number;
|
|
18
|
+
hardNegativeLimitUsd?: number;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
2
21
|
//#region ../protocol/dist/core/content.d.ts
|
|
3
22
|
type ContentBlockMeta = Record<string, unknown>;
|
|
4
23
|
type ContentBlock = {
|
|
@@ -45,24 +64,6 @@ type ContentBlock = {
|
|
|
45
64
|
_meta?: ContentBlockMeta;
|
|
46
65
|
};
|
|
47
66
|
//#endregion
|
|
48
|
-
//#region ../protocol/dist/billing.d.ts
|
|
49
|
-
/**
|
|
50
|
-
* Standard billing payload attached under the `billing` key of any response
|
|
51
|
-
* or realtime event that involves a billing gate. Present on 402 error bodies
|
|
52
|
-
* (blocked / not entitled), on success responses carrying a soft debt warning,
|
|
53
|
-
* and on realtime error events. `conversion` always drives the shared upgrade
|
|
54
|
-
* UI; balance fields appear only for balance-based gates.
|
|
55
|
-
*
|
|
56
|
-
* `conversion` is intentionally `unknown` here to keep the protocol layer free
|
|
57
|
-
* of a billing dependency — clients validate it against `BillingConversionIntent`.
|
|
58
|
-
*/
|
|
59
|
-
type BillingPayload = {
|
|
60
|
-
conversion: unknown;
|
|
61
|
-
status?: "blocked" | "allowed_with_debt";
|
|
62
|
-
netUsd?: number;
|
|
63
|
-
hardNegativeLimitUsd?: number;
|
|
64
|
-
};
|
|
65
|
-
//#endregion
|
|
66
67
|
//#region ../protocol/dist/core/usage.d.ts
|
|
67
68
|
type Usage = {
|
|
68
69
|
input?: number;
|
|
@@ -332,6 +333,308 @@ type MessageRecord = {
|
|
|
332
333
|
createdAt: string;
|
|
333
334
|
};
|
|
334
335
|
//#endregion
|
|
336
|
+
//#region ../protocol/dist/realtime/board-awareness.d.ts
|
|
337
|
+
declare const BoardAwarenessNodePreviewSchema: ZodObject<{
|
|
338
|
+
nodeId: ZodString;
|
|
339
|
+
frame: ZodObject<{
|
|
340
|
+
x: ZodNumber;
|
|
341
|
+
y: ZodNumber;
|
|
342
|
+
width: ZodNumber;
|
|
343
|
+
height: ZodNumber;
|
|
344
|
+
rotation: ZodNumber;
|
|
345
|
+
}, $strip>;
|
|
346
|
+
arrow: ZodOptional<ZodObject<{
|
|
347
|
+
start: ZodUnion<readonly [ZodObject<{
|
|
348
|
+
kind: ZodLiteral<"point">;
|
|
349
|
+
x: ZodNumber;
|
|
350
|
+
y: ZodNumber;
|
|
351
|
+
}, $strip>, ZodObject<{
|
|
352
|
+
kind: ZodLiteral<"binding">;
|
|
353
|
+
target: ZodString;
|
|
354
|
+
nx: ZodNumber;
|
|
355
|
+
ny: ZodNumber;
|
|
356
|
+
precise: ZodBoolean;
|
|
357
|
+
}, $strip>]>;
|
|
358
|
+
end: ZodUnion<readonly [ZodObject<{
|
|
359
|
+
kind: ZodLiteral<"point">;
|
|
360
|
+
x: ZodNumber;
|
|
361
|
+
y: ZodNumber;
|
|
362
|
+
}, $strip>, ZodObject<{
|
|
363
|
+
kind: ZodLiteral<"binding">;
|
|
364
|
+
target: ZodString;
|
|
365
|
+
nx: ZodNumber;
|
|
366
|
+
ny: ZodNumber;
|
|
367
|
+
precise: ZodBoolean;
|
|
368
|
+
}, $strip>]>;
|
|
369
|
+
bend: ZodNumber;
|
|
370
|
+
}, $strip>>;
|
|
371
|
+
}, $strip>;
|
|
372
|
+
declare const BoardAwarenessStateUpdateSchema: ZodObject<{
|
|
373
|
+
type: ZodLiteral<"state">;
|
|
374
|
+
client: ZodOptional<ZodObject<{
|
|
375
|
+
formFactor: ZodEnum<{
|
|
376
|
+
desktop: "desktop";
|
|
377
|
+
mobile: "mobile";
|
|
378
|
+
}>;
|
|
379
|
+
}, $strip>>;
|
|
380
|
+
cursor: ZodNullable<ZodObject<{
|
|
381
|
+
x: ZodNumber;
|
|
382
|
+
y: ZodNumber;
|
|
383
|
+
pointerType: ZodEnum<{
|
|
384
|
+
mouse: "mouse";
|
|
385
|
+
pen: "pen";
|
|
386
|
+
touch: "touch";
|
|
387
|
+
}>;
|
|
388
|
+
}, $strip>>;
|
|
389
|
+
tool: ZodString;
|
|
390
|
+
selection: ZodObject<{
|
|
391
|
+
ids: ZodArray<ZodString>;
|
|
392
|
+
count: ZodNumber;
|
|
393
|
+
bounds: ZodNullable<ZodObject<{
|
|
394
|
+
x: ZodNumber;
|
|
395
|
+
y: ZodNumber;
|
|
396
|
+
width: ZodNumber;
|
|
397
|
+
height: ZodNumber;
|
|
398
|
+
rotation: ZodNumber;
|
|
399
|
+
}, $strip>>;
|
|
400
|
+
}, $strip>;
|
|
401
|
+
editingId: ZodNullable<ZodString>;
|
|
402
|
+
}, $strip>;
|
|
403
|
+
declare const BoardAwarenessGestureSchema: ZodDiscriminatedUnion<[ZodObject<{
|
|
404
|
+
kind: ZodLiteral<"draw">;
|
|
405
|
+
id: ZodString;
|
|
406
|
+
nodeId: ZodString;
|
|
407
|
+
color: ZodString;
|
|
408
|
+
size: ZodNumber;
|
|
409
|
+
from: ZodNumber;
|
|
410
|
+
points: ZodArray<ZodObject<{
|
|
411
|
+
x: ZodNumber;
|
|
412
|
+
y: ZodNumber;
|
|
413
|
+
p: ZodNumber;
|
|
414
|
+
}, $strip>>;
|
|
415
|
+
}, $strip>, ZodObject<{
|
|
416
|
+
kind: ZodLiteral<"arrow">;
|
|
417
|
+
id: ZodString;
|
|
418
|
+
nodeId: ZodString;
|
|
419
|
+
start: ZodObject<{
|
|
420
|
+
x: ZodNumber;
|
|
421
|
+
y: ZodNumber;
|
|
422
|
+
}, $strip>;
|
|
423
|
+
current: ZodObject<{
|
|
424
|
+
x: ZodNumber;
|
|
425
|
+
y: ZodNumber;
|
|
426
|
+
}, $strip>;
|
|
427
|
+
color: ZodString;
|
|
428
|
+
}, $strip>, ZodObject<{
|
|
429
|
+
kind: ZodLiteral<"box">;
|
|
430
|
+
id: ZodString;
|
|
431
|
+
nodeId: ZodString;
|
|
432
|
+
shape: ZodEnum<{
|
|
433
|
+
frame: "frame";
|
|
434
|
+
geo: "geo";
|
|
435
|
+
}>;
|
|
436
|
+
start: ZodObject<{
|
|
437
|
+
x: ZodNumber;
|
|
438
|
+
y: ZodNumber;
|
|
439
|
+
}, $strip>;
|
|
440
|
+
current: ZodObject<{
|
|
441
|
+
x: ZodNumber;
|
|
442
|
+
y: ZodNumber;
|
|
443
|
+
}, $strip>;
|
|
444
|
+
color: ZodString;
|
|
445
|
+
geo: ZodString;
|
|
446
|
+
}, $strip>, ZodObject<{
|
|
447
|
+
kind: ZodLiteral<"transform">;
|
|
448
|
+
id: ZodString;
|
|
449
|
+
mode: ZodEnum<{
|
|
450
|
+
arrow: "arrow";
|
|
451
|
+
resize: "resize";
|
|
452
|
+
rotate: "rotate";
|
|
453
|
+
translate: "translate";
|
|
454
|
+
}>;
|
|
455
|
+
nodes: ZodArray<ZodObject<{
|
|
456
|
+
nodeId: ZodString;
|
|
457
|
+
frame: ZodObject<{
|
|
458
|
+
x: ZodNumber;
|
|
459
|
+
y: ZodNumber;
|
|
460
|
+
width: ZodNumber;
|
|
461
|
+
height: ZodNumber;
|
|
462
|
+
rotation: ZodNumber;
|
|
463
|
+
}, $strip>;
|
|
464
|
+
arrow: ZodOptional<ZodObject<{
|
|
465
|
+
start: ZodUnion<readonly [ZodObject<{
|
|
466
|
+
kind: ZodLiteral<"point">;
|
|
467
|
+
x: ZodNumber;
|
|
468
|
+
y: ZodNumber;
|
|
469
|
+
}, $strip>, ZodObject<{
|
|
470
|
+
kind: ZodLiteral<"binding">;
|
|
471
|
+
target: ZodString;
|
|
472
|
+
nx: ZodNumber;
|
|
473
|
+
ny: ZodNumber;
|
|
474
|
+
precise: ZodBoolean;
|
|
475
|
+
}, $strip>]>;
|
|
476
|
+
end: ZodUnion<readonly [ZodObject<{
|
|
477
|
+
kind: ZodLiteral<"point">;
|
|
478
|
+
x: ZodNumber;
|
|
479
|
+
y: ZodNumber;
|
|
480
|
+
}, $strip>, ZodObject<{
|
|
481
|
+
kind: ZodLiteral<"binding">;
|
|
482
|
+
target: ZodString;
|
|
483
|
+
nx: ZodNumber;
|
|
484
|
+
ny: ZodNumber;
|
|
485
|
+
precise: ZodBoolean;
|
|
486
|
+
}, $strip>]>;
|
|
487
|
+
bend: ZodNumber;
|
|
488
|
+
}, $strip>>;
|
|
489
|
+
}, $strip>>;
|
|
490
|
+
bounds: ZodNullable<ZodObject<{
|
|
491
|
+
x: ZodNumber;
|
|
492
|
+
y: ZodNumber;
|
|
493
|
+
width: ZodNumber;
|
|
494
|
+
height: ZodNumber;
|
|
495
|
+
rotation: ZodNumber;
|
|
496
|
+
}, $strip>>;
|
|
497
|
+
}, $strip>], "kind">;
|
|
498
|
+
declare const BoardAwarenessUpdateSchema: ZodDiscriminatedUnion<[ZodObject<{
|
|
499
|
+
type: ZodLiteral<"state">;
|
|
500
|
+
client: ZodOptional<ZodObject<{
|
|
501
|
+
formFactor: ZodEnum<{
|
|
502
|
+
desktop: "desktop";
|
|
503
|
+
mobile: "mobile";
|
|
504
|
+
}>;
|
|
505
|
+
}, $strip>>;
|
|
506
|
+
cursor: ZodNullable<ZodObject<{
|
|
507
|
+
x: ZodNumber;
|
|
508
|
+
y: ZodNumber;
|
|
509
|
+
pointerType: ZodEnum<{
|
|
510
|
+
mouse: "mouse";
|
|
511
|
+
pen: "pen";
|
|
512
|
+
touch: "touch";
|
|
513
|
+
}>;
|
|
514
|
+
}, $strip>>;
|
|
515
|
+
tool: ZodString;
|
|
516
|
+
selection: ZodObject<{
|
|
517
|
+
ids: ZodArray<ZodString>;
|
|
518
|
+
count: ZodNumber;
|
|
519
|
+
bounds: ZodNullable<ZodObject<{
|
|
520
|
+
x: ZodNumber;
|
|
521
|
+
y: ZodNumber;
|
|
522
|
+
width: ZodNumber;
|
|
523
|
+
height: ZodNumber;
|
|
524
|
+
rotation: ZodNumber;
|
|
525
|
+
}, $strip>>;
|
|
526
|
+
}, $strip>;
|
|
527
|
+
editingId: ZodNullable<ZodString>;
|
|
528
|
+
}, $strip>, ZodObject<{
|
|
529
|
+
type: ZodLiteral<"gesture">;
|
|
530
|
+
gesture: ZodDiscriminatedUnion<[ZodObject<{
|
|
531
|
+
kind: ZodLiteral<"draw">;
|
|
532
|
+
id: ZodString;
|
|
533
|
+
nodeId: ZodString;
|
|
534
|
+
color: ZodString;
|
|
535
|
+
size: ZodNumber;
|
|
536
|
+
from: ZodNumber;
|
|
537
|
+
points: ZodArray<ZodObject<{
|
|
538
|
+
x: ZodNumber;
|
|
539
|
+
y: ZodNumber;
|
|
540
|
+
p: ZodNumber;
|
|
541
|
+
}, $strip>>;
|
|
542
|
+
}, $strip>, ZodObject<{
|
|
543
|
+
kind: ZodLiteral<"arrow">;
|
|
544
|
+
id: ZodString;
|
|
545
|
+
nodeId: ZodString;
|
|
546
|
+
start: ZodObject<{
|
|
547
|
+
x: ZodNumber;
|
|
548
|
+
y: ZodNumber;
|
|
549
|
+
}, $strip>;
|
|
550
|
+
current: ZodObject<{
|
|
551
|
+
x: ZodNumber;
|
|
552
|
+
y: ZodNumber;
|
|
553
|
+
}, $strip>;
|
|
554
|
+
color: ZodString;
|
|
555
|
+
}, $strip>, ZodObject<{
|
|
556
|
+
kind: ZodLiteral<"box">;
|
|
557
|
+
id: ZodString;
|
|
558
|
+
nodeId: ZodString;
|
|
559
|
+
shape: ZodEnum<{
|
|
560
|
+
frame: "frame";
|
|
561
|
+
geo: "geo";
|
|
562
|
+
}>;
|
|
563
|
+
start: ZodObject<{
|
|
564
|
+
x: ZodNumber;
|
|
565
|
+
y: ZodNumber;
|
|
566
|
+
}, $strip>;
|
|
567
|
+
current: ZodObject<{
|
|
568
|
+
x: ZodNumber;
|
|
569
|
+
y: ZodNumber;
|
|
570
|
+
}, $strip>;
|
|
571
|
+
color: ZodString;
|
|
572
|
+
geo: ZodString;
|
|
573
|
+
}, $strip>, ZodObject<{
|
|
574
|
+
kind: ZodLiteral<"transform">;
|
|
575
|
+
id: ZodString;
|
|
576
|
+
mode: ZodEnum<{
|
|
577
|
+
arrow: "arrow";
|
|
578
|
+
resize: "resize";
|
|
579
|
+
rotate: "rotate";
|
|
580
|
+
translate: "translate";
|
|
581
|
+
}>;
|
|
582
|
+
nodes: ZodArray<ZodObject<{
|
|
583
|
+
nodeId: ZodString;
|
|
584
|
+
frame: ZodObject<{
|
|
585
|
+
x: ZodNumber;
|
|
586
|
+
y: ZodNumber;
|
|
587
|
+
width: ZodNumber;
|
|
588
|
+
height: ZodNumber;
|
|
589
|
+
rotation: ZodNumber;
|
|
590
|
+
}, $strip>;
|
|
591
|
+
arrow: ZodOptional<ZodObject<{
|
|
592
|
+
start: ZodUnion<readonly [ZodObject<{
|
|
593
|
+
kind: ZodLiteral<"point">;
|
|
594
|
+
x: ZodNumber;
|
|
595
|
+
y: ZodNumber;
|
|
596
|
+
}, $strip>, ZodObject<{
|
|
597
|
+
kind: ZodLiteral<"binding">;
|
|
598
|
+
target: ZodString;
|
|
599
|
+
nx: ZodNumber;
|
|
600
|
+
ny: ZodNumber;
|
|
601
|
+
precise: ZodBoolean;
|
|
602
|
+
}, $strip>]>;
|
|
603
|
+
end: ZodUnion<readonly [ZodObject<{
|
|
604
|
+
kind: ZodLiteral<"point">;
|
|
605
|
+
x: ZodNumber;
|
|
606
|
+
y: ZodNumber;
|
|
607
|
+
}, $strip>, ZodObject<{
|
|
608
|
+
kind: ZodLiteral<"binding">;
|
|
609
|
+
target: ZodString;
|
|
610
|
+
nx: ZodNumber;
|
|
611
|
+
ny: ZodNumber;
|
|
612
|
+
precise: ZodBoolean;
|
|
613
|
+
}, $strip>]>;
|
|
614
|
+
bend: ZodNumber;
|
|
615
|
+
}, $strip>>;
|
|
616
|
+
}, $strip>>;
|
|
617
|
+
bounds: ZodNullable<ZodObject<{
|
|
618
|
+
x: ZodNumber;
|
|
619
|
+
y: ZodNumber;
|
|
620
|
+
width: ZodNumber;
|
|
621
|
+
height: ZodNumber;
|
|
622
|
+
rotation: ZodNumber;
|
|
623
|
+
}, $strip>>;
|
|
624
|
+
}, $strip>], "kind">;
|
|
625
|
+
}, $strip>, ZodObject<{
|
|
626
|
+
type: ZodLiteral<"gesture.end">;
|
|
627
|
+
gestureId: ZodString;
|
|
628
|
+
resultingNodeIds: ZodArray<ZodString>;
|
|
629
|
+
}, $strip>, ZodObject<{
|
|
630
|
+
type: ZodLiteral<"gesture.cancel">;
|
|
631
|
+
gestureId: ZodString;
|
|
632
|
+
}, $strip>], "type">;
|
|
633
|
+
type BoardAwarenessNodePreview = output<typeof BoardAwarenessNodePreviewSchema>;
|
|
634
|
+
type BoardAwarenessStateUpdate = output<typeof BoardAwarenessStateUpdateSchema>;
|
|
635
|
+
type BoardAwarenessGesture = output<typeof BoardAwarenessGestureSchema>;
|
|
636
|
+
type BoardAwarenessUpdate = output<typeof BoardAwarenessUpdateSchema>;
|
|
637
|
+
//#endregion
|
|
335
638
|
//#region ../protocol/dist/task/index.d.ts
|
|
336
639
|
type TaskRunStatus = "pending" | "running" | "completed" | "failed";
|
|
337
640
|
//#endregion
|
|
@@ -376,8 +679,43 @@ type SpacePublicEndpoint = {
|
|
|
376
679
|
};
|
|
377
680
|
type SpacePublicEndpoints = Record<string, SpacePublicEndpoint>;
|
|
378
681
|
//#endregion
|
|
682
|
+
//#region ../protocol/dist/provenance.d.ts
|
|
683
|
+
/** Request provenance via X-Cohub-Source-* headers. Never used for authorization. */
|
|
684
|
+
declare const COHUB_SOURCE_HEADER: {
|
|
685
|
+
readonly space: "X-Cohub-Source-Space";
|
|
686
|
+
readonly session: "X-Cohub-Source-Session";
|
|
687
|
+
readonly turn: "X-Cohub-Source-Turn";
|
|
688
|
+
readonly toolCall: "X-Cohub-Source-Tool-Call";
|
|
689
|
+
readonly via: "X-Cohub-Source-Via";
|
|
690
|
+
};
|
|
691
|
+
type RequestSourceVia = "cli" | "bash" | "tool" | "api" | "web" | (string & {});
|
|
692
|
+
/** Caller context: via (channel) and optional identity fields. */
|
|
693
|
+
type RequestSource = {
|
|
694
|
+
spaceId?: string;
|
|
695
|
+
sessionId?: string;
|
|
696
|
+
turnId?: string;
|
|
697
|
+
toolCallId?: string;
|
|
698
|
+
via?: RequestSourceVia;
|
|
699
|
+
};
|
|
700
|
+
declare const isRequestSourceUuid: (value: unknown) => value is string;
|
|
701
|
+
declare const REQUEST_SOURCE_VIA_MAX_LENGTH = 64;
|
|
702
|
+
declare const isRequestSourceEmpty: (source: RequestSource | null | undefined) => boolean;
|
|
703
|
+
declare const hasRequestSourceIdentity: (source: RequestSource | null | undefined) => boolean;
|
|
704
|
+
/** Drop invalid UUIDs; via-only is valid. */
|
|
705
|
+
declare const normalizeRequestSource: (input: unknown) => RequestSource | null;
|
|
706
|
+
declare const parseRequestSourceFromHeaders: (getHeader: (name: string) => string | null | undefined) => RequestSource | null;
|
|
707
|
+
declare const requestSourceToHeaders: (source: RequestSource | null | undefined) => Record<string, string>;
|
|
708
|
+
/** Read COHUB_* env into a RequestSource. */
|
|
709
|
+
declare const readRequestSourceFromEnv: (env?: Record<string, string | undefined>, defaults?: {
|
|
710
|
+
via?: RequestSourceVia;
|
|
711
|
+
}) => RequestSource | null;
|
|
712
|
+
declare const resolveRequestSourceChannel: (source: RequestSource | null | undefined, fallback?: string) => string;
|
|
713
|
+
/** Put identity under meta.source; strip body source. Via-only is skipped. */
|
|
714
|
+
declare const mergeRequestSourceIntoMeta: (meta: Record<string, unknown> | null | undefined, headerSource: RequestSource | null | undefined) => Record<string, unknown> | null;
|
|
715
|
+
declare const COHUB_SOURCE_HEADER_NAMES: readonly string[];
|
|
716
|
+
//#endregion
|
|
379
717
|
//#region ../protocol/dist/realtime/types.d.ts
|
|
380
|
-
type RealtimeRoom = `space:${string}` | `user:${string}`;
|
|
718
|
+
type RealtimeRoom = `space:${string}` | `user:${string}` | `board:${string}`;
|
|
381
719
|
type RealtimeEnvelope = {
|
|
382
720
|
id: string;
|
|
383
721
|
timestamp: number;
|
|
@@ -731,49 +1069,52 @@ type SpacePresenceUpdatedEvent = {
|
|
|
731
1069
|
sessionId?: string | null;
|
|
732
1070
|
payload: SpacePresenceSnapshot$1;
|
|
733
1071
|
};
|
|
734
|
-
type
|
|
1072
|
+
type BoardTransactionAppliedEvent = {
|
|
735
1073
|
id: string;
|
|
736
1074
|
timestamp: number;
|
|
737
1075
|
domain: "space";
|
|
738
|
-
type: "
|
|
1076
|
+
type: "board.transaction.applied";
|
|
739
1077
|
requestId?: string | null;
|
|
740
1078
|
spaceId: string;
|
|
741
1079
|
sessionId?: string | null;
|
|
742
1080
|
payload: {
|
|
743
|
-
|
|
1081
|
+
boardId: string;
|
|
744
1082
|
actorId: string;
|
|
745
1083
|
txId: string;
|
|
746
1084
|
version: number;
|
|
747
|
-
|
|
1085
|
+
operations: BoardOperation[];
|
|
1086
|
+
metadata?: Record<string, unknown> & {
|
|
1087
|
+
source?: RequestSource;
|
|
1088
|
+
};
|
|
748
1089
|
};
|
|
749
1090
|
};
|
|
750
|
-
type
|
|
1091
|
+
type BoardAwarenessUpdatedEvent = {
|
|
751
1092
|
id: string;
|
|
752
1093
|
timestamp: number;
|
|
753
1094
|
domain: "space";
|
|
754
|
-
type: "
|
|
1095
|
+
type: "board.awareness.updated";
|
|
755
1096
|
requestId?: string | null;
|
|
756
1097
|
spaceId: string;
|
|
757
1098
|
sessionId?: string | null;
|
|
1099
|
+
rooms?: RealtimeRoom[];
|
|
758
1100
|
payload: {
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
1101
|
+
boardId: string;
|
|
1102
|
+
connectionId: string;
|
|
1103
|
+
actorId: string;
|
|
1104
|
+
actorName: string;
|
|
1105
|
+
seq: number;
|
|
1106
|
+
update: BoardAwarenessUpdate;
|
|
762
1107
|
};
|
|
763
1108
|
};
|
|
764
|
-
type
|
|
1109
|
+
type BoardPlaybackChangedEvent = {
|
|
765
1110
|
id: string;
|
|
766
1111
|
timestamp: number;
|
|
767
1112
|
domain: "space";
|
|
768
|
-
type: "
|
|
1113
|
+
type: "board.playback.changed";
|
|
769
1114
|
requestId?: string | null;
|
|
770
|
-
spaceId
|
|
1115
|
+
spaceId: string;
|
|
771
1116
|
sessionId?: string | null;
|
|
772
|
-
payload:
|
|
773
|
-
documentId?: string | null;
|
|
774
|
-
txId?: string | null;
|
|
775
|
-
message: string;
|
|
776
|
-
};
|
|
1117
|
+
payload: BoardPlaybackSnapshot;
|
|
777
1118
|
};
|
|
778
1119
|
type RealtimeTaskRecord = {
|
|
779
1120
|
id: string;
|
|
@@ -824,10 +1165,11 @@ type LabelAssignmentsUpdatedEvent = {
|
|
|
824
1165
|
domain: "label";
|
|
825
1166
|
type: "label.assignments.updated";
|
|
826
1167
|
requestId?: string | null;
|
|
827
|
-
|
|
1168
|
+
/** Space room target; null for user-scoped label events (delivered to user room). */
|
|
1169
|
+
spaceId: string | null;
|
|
828
1170
|
sessionId?: string | null;
|
|
829
1171
|
payload: {
|
|
830
|
-
resourceType: "session" | "checkpoint" | "file";
|
|
1172
|
+
resourceType: "session" | "checkpoint" | "file" | "space";
|
|
831
1173
|
resourceRef: string;
|
|
832
1174
|
labels: unknown[];
|
|
833
1175
|
assignments: unknown[];
|
|
@@ -835,7 +1177,7 @@ type LabelAssignmentsUpdatedEvent = {
|
|
|
835
1177
|
affectedLabelIds: string[];
|
|
836
1178
|
};
|
|
837
1179
|
};
|
|
838
|
-
type RealtimeServerEvent = SystemReadyEvent | SystemAuthOkEvent | SystemRequestErrorEvent | SystemPongEvent | SystemAckOkEvent | SystemSubscribeOkEvent | SystemSubscribeErrorEvent | SessionCreatedEvent | SessionUpdatedEvent | SessionRequestAcceptedEvent | SessionRequestErrorEvent | SessionTurnCreatedEvent | SessionTurnPatchEvent | SessionTurnErrorEvent | SessionTurnLifecycleEvent | SessionTurnUpdatedEvent | SessionTurnFinalizedEvent | SessionTurnNotifyEvent | SessionMessagePersistedEvent | SpaceFsChangedEvent | SpacePortsChangedEvent | SpacePresenceUpdatedEvent |
|
|
1180
|
+
type RealtimeServerEvent = SystemReadyEvent | SystemAuthOkEvent | SystemRequestErrorEvent | SystemPongEvent | SystemAckOkEvent | SystemSubscribeOkEvent | SystemSubscribeErrorEvent | SessionCreatedEvent | SessionUpdatedEvent | SessionRequestAcceptedEvent | SessionRequestErrorEvent | SessionTurnCreatedEvent | SessionTurnPatchEvent | SessionTurnErrorEvent | SessionTurnLifecycleEvent | SessionTurnUpdatedEvent | SessionTurnFinalizedEvent | SessionTurnNotifyEvent | SessionMessagePersistedEvent | SpaceFsChangedEvent | SpacePortsChangedEvent | SpacePresenceUpdatedEvent | BoardTransactionAppliedEvent | BoardAwarenessUpdatedEvent | BoardPlaybackChangedEvent | TaskCreatedEvent | TaskUpdatedEvent | LabelAssignmentsUpdatedEvent;
|
|
839
1181
|
//#endregion
|
|
840
1182
|
//#region ../../node_modules/.pnpm/@neta-art+generation@0.1.16/node_modules/@neta-art/generation/dist/builtins-DQq2dSq-.d.ts
|
|
841
1183
|
//#region src/types.d.ts
|
|
@@ -1671,6 +2013,8 @@ type SpaceRecord = {
|
|
|
1671
2013
|
access?: SpaceAccess;
|
|
1672
2014
|
accessLevel?: "minimal";
|
|
1673
2015
|
ownerProfile?: Pick<UserProfile, "userUuid" | "username" | "displayName" | "avatarUrl"> | null;
|
|
2016
|
+
/** Whether the viewer has pinned this space (only present in list responses). */
|
|
2017
|
+
isPinned?: boolean;
|
|
1674
2018
|
};
|
|
1675
2019
|
type SpaceBootstrapSource = {
|
|
1676
2020
|
type: "blank";
|
|
@@ -1720,63 +2064,6 @@ type SpaceConfigUpdateResponse = {
|
|
|
1720
2064
|
message?: string;
|
|
1721
2065
|
};
|
|
1722
2066
|
};
|
|
1723
|
-
type CanvasDocumentRecord = {
|
|
1724
|
-
id: string;
|
|
1725
|
-
spaceId: string;
|
|
1726
|
-
filePath: string;
|
|
1727
|
-
title: string;
|
|
1728
|
-
version: number;
|
|
1729
|
-
meta?: Record<string, unknown> | null;
|
|
1730
|
-
createdAt: string | null;
|
|
1731
|
-
updatedAt: string | null;
|
|
1732
|
-
deletedAt?: string | null;
|
|
1733
|
-
};
|
|
1734
|
-
type CanvasNodeRecord = {
|
|
1735
|
-
documentId: string;
|
|
1736
|
-
nodeId: string;
|
|
1737
|
-
type: string;
|
|
1738
|
-
parentId?: string | null;
|
|
1739
|
-
orderKey?: string | null;
|
|
1740
|
-
x: number;
|
|
1741
|
-
y: number;
|
|
1742
|
-
width: number;
|
|
1743
|
-
height: number;
|
|
1744
|
-
rotation: number;
|
|
1745
|
-
refKind?: string | null;
|
|
1746
|
-
refPath?: string | null;
|
|
1747
|
-
refUrl?: string | null;
|
|
1748
|
-
view: Record<string, unknown>;
|
|
1749
|
-
style: Record<string, unknown>;
|
|
1750
|
-
animation: Record<string, unknown>;
|
|
1751
|
-
data: Record<string, unknown>;
|
|
1752
|
-
version: number;
|
|
1753
|
-
createdAt: string | null;
|
|
1754
|
-
updatedAt: string | null;
|
|
1755
|
-
deletedAt?: string | null;
|
|
1756
|
-
};
|
|
1757
|
-
type CanvasNodeInput = Omit<CanvasNodeRecord, "documentId" | "version" | "createdAt" | "updatedAt" | "deletedAt">;
|
|
1758
|
-
type CanvasSemanticOp = {
|
|
1759
|
-
opId?: string;
|
|
1760
|
-
type: "node.create" | "node.patch" | "node.delete";
|
|
1761
|
-
payload: Record<string, unknown>;
|
|
1762
|
-
inverse?: Record<string, unknown>;
|
|
1763
|
-
};
|
|
1764
|
-
type CanvasTransactionInput = {
|
|
1765
|
-
txId: string;
|
|
1766
|
-
baseVersion?: number | null;
|
|
1767
|
-
clientId?: string | null;
|
|
1768
|
-
undoGroupId?: string | null;
|
|
1769
|
-
ops: CanvasSemanticOp[];
|
|
1770
|
-
};
|
|
1771
|
-
type CanvasCreateInput = {
|
|
1772
|
-
path: string;
|
|
1773
|
-
title?: string;
|
|
1774
|
-
nodes?: CanvasNodeInput[];
|
|
1775
|
-
};
|
|
1776
|
-
type CanvasBootstrapResponse = {
|
|
1777
|
-
document: CanvasDocumentRecord;
|
|
1778
|
-
nodes: CanvasNodeRecord[];
|
|
1779
|
-
};
|
|
1780
2067
|
type SpaceCreateResponse = {
|
|
1781
2068
|
space: SpaceRecord;
|
|
1782
2069
|
taskRunId: string;
|
|
@@ -2186,7 +2473,7 @@ type SpaceMember = {
|
|
|
2186
2473
|
};
|
|
2187
2474
|
type LabelScopeType = "space" | "user" | "org";
|
|
2188
2475
|
type LabelSource = "user" | "system";
|
|
2189
|
-
type LabelResourceType = "session" | "checkpoint" | "file";
|
|
2476
|
+
type LabelResourceType = "session" | "checkpoint" | "file" | "space";
|
|
2190
2477
|
type LabelRecord = {
|
|
2191
2478
|
id: string;
|
|
2192
2479
|
scopeType: LabelScopeType;
|
|
@@ -2218,6 +2505,9 @@ type LabelAssignmentRecord = {
|
|
|
2218
2505
|
meta: Record<string, unknown> | null;
|
|
2219
2506
|
createdAt: string | null;
|
|
2220
2507
|
updatedAt: string | null;
|
|
2508
|
+
/** Label metadata joined in user-scope assignment responses. */
|
|
2509
|
+
labelSystemKey?: string | null;
|
|
2510
|
+
labelName?: string;
|
|
2221
2511
|
};
|
|
2222
2512
|
type LabelAssignmentListItem = LabelAssignmentRecord & {
|
|
2223
2513
|
href: string;
|
|
@@ -2288,7 +2578,6 @@ type ExploreSpaceItem = {
|
|
|
2288
2578
|
category: string | null;
|
|
2289
2579
|
tags: string[];
|
|
2290
2580
|
saveCount: number;
|
|
2291
|
-
pinCount: number;
|
|
2292
2581
|
forkCount: number;
|
|
2293
2582
|
updatedAt: string | null;
|
|
2294
2583
|
accessLabel: "public" | "sign-in-required" | "unknown";
|
|
@@ -2608,19 +2897,16 @@ declare class WebsocketClient {
|
|
|
2608
2897
|
private log;
|
|
2609
2898
|
connect(): Promise<void>;
|
|
2610
2899
|
disconnect(code?: number, reason?: string): Promise<void>;
|
|
2611
|
-
|
|
2900
|
+
updatePresence(input: {
|
|
2612
2901
|
spaceId: string;
|
|
2613
|
-
|
|
2614
|
-
txId: string;
|
|
2615
|
-
ops: Array<Record<string, unknown>>;
|
|
2616
|
-
baseVersion?: number | null;
|
|
2617
|
-
clientId?: string | null;
|
|
2618
|
-
undoGroupId?: string | null;
|
|
2902
|
+
meta?: Record<string, unknown> | null;
|
|
2619
2903
|
requestId?: string;
|
|
2620
2904
|
}): Promise<void>;
|
|
2621
|
-
|
|
2905
|
+
updateBoardAwareness(input: {
|
|
2622
2906
|
spaceId: string;
|
|
2623
|
-
|
|
2907
|
+
boardId: string;
|
|
2908
|
+
seq: number;
|
|
2909
|
+
update: BoardAwarenessUpdate;
|
|
2624
2910
|
requestId?: string;
|
|
2625
2911
|
}): Promise<void>;
|
|
2626
2912
|
sendMessage(input: {
|
|
@@ -2660,4 +2946,4 @@ declare class WebsocketClient {
|
|
|
2660
2946
|
}
|
|
2661
2947
|
declare const createWebsocketClient: (options?: WebsocketClientOptions) => WebsocketClient;
|
|
2662
2948
|
//#endregion
|
|
2663
|
-
export {
|
|
2949
|
+
export { CreateSpacePromptInput as $, SpaceFsUploadError as $n, BoardPlaybackChangedEvent as $r, ReferralReward as $t, BillingProductDisplay as A, CompletionAssistantMessage as Ai, SpaceConfig as An, UserSessionsResponse as Ar, ModelCatalogEntry as At, CheckpointDiffFile as B, ContentBlock as Bi, SpaceFsCreateUploadResponse as Bn, GenerationPolicyError as Br, PublicUserSpaceItem as Bt, BillingCreditStatus as C, BoardAwarenessStateUpdate as Ci, SpaceCommerceBuyerProfile as Cn, SpaceUsageSummary as Cr, LabelItemsSessionFork as Ct, BillingPluginStatus as D, SessionTurnSegmentRecord as Di, SpaceCommerceProduct as Dn, UserRulesResponse as Dr, LabelScopeType as Dt, BillingPaymentStatus as E, SessionForkRecord as Ei, SpaceCommerceOrder as En, UserProfile as Er, LabelResourceType as Et, BillingSubscriptionHistoryList as F, CreateSpaceCompletionInput as Fi, SpaceDefaultResponse as Fn, DiscordChannelConfig as Fr, PromptTemplateCatalogEntry as Ft, CheckpointDiffStatus as G, SpaceFsMoveInput as Gn, findGenerationModelPolicy as Gr, ReferenceDirection as Gt, CheckpointDiffPatchKind as H, SpaceFsEntry as Hn, decodeGenerationPolicy as Hr, ReferenceAggregateGroup as Ht, BillingSubscriptionHistoryStatus as I, ModelThinkingLevel as Ii, SpaceEnvInput as In, FeishuChannelConfig as Ir, PromptTemplateCatalogResponse as It, ClaimReferralResponse as J, SpaceFsReadFilesInput as Jn, parseGenerationPolicyFromEnv as Jr, ReferenceQueryableType as Jt, CheckpointDiffSummary as K, SpaceFsPreparingFile as Kn, getAllowedGenerationModelIds as Kr, ReferenceKind as Kt, BillingSubscriptionSummary as L, SpaceCompletionResult as Li, SpaceFsCompleteUploadInput as Ln, GenerationModelPolicy as Lr, PublicReferral as Lt, BillingProductPricing as M, CompletionMessageRole as Mi, SpaceConfigResponse as Mn, ChannelHealth as Mr, PatchResourceLabelsResponse as Mt, BillingRedemptionResult as N, CompletionThinkingLevel as Ni, SpaceConfigUpdateResponse as Nn, ChannelHealthReasonCode as Nr, Permission as Nt, BillingProductBillingInterval as O, SessionTurnIndexItem as Oi, SpaceCommerceProductBenefitBinding as On, UserSessionListItem as Or, LabelSource as Ot, BillingResponsePayload as P, CompletionUsage as Pi, SpaceCreateResponse as Pn, ChannelRuntimeState as Pr, PromptAccessMode as Pt, CreateSpaceModInput as Q, SpaceFsUploadEntry as Qn, BoardAwarenessUpdatedEvent as Qr, ReferralListItem as Qt, Channel as R, SpaceCompletionStreamEvent as Ri, SpaceFsCompleteUploadResponse as Rn, GenerationParameterConstraint as Rr, PublicUserPageResponse as Rt, BillingCreditGrantStatus as S, BoardAwarenessNodePreview as Si, SpaceCommerceBenefit as Sn, SpaceUsageResponse as Sr, LabelItemsResponse as St, BillingHistoryPagination as T, MessageRecord as Ti, SpaceCommerceFeatureBenefit as Tn, TaskRunRecord as Tr, LabelRecord as Tt, CheckpointDiffPatchLine as U, SpaceFsFileKind as Un, encodeGenerationPolicy as Ur, ReferenceAggregateGroupBy as Ut, CheckpointDiffFileResponse as V, BillingPayload as Vi, SpaceFsEncoding as Vn, assertGenerationRequestAllowedByPolicy as Vr, PublicUserWorkItem as Vt, CheckpointDiffStats as W, SpaceFsFileResponse as Wn, filterGenerationDeclarationsByPolicy as Wr, ReferenceAggregateResponse as Wt, CreateInvitationResponse as X, SpaceFsTreeResponse as Xn, GenerationModelDeclaration as Xr, ReferenceResourceType as Xt, CreateInvitationInput as Y, SpaceFsReadFilesResponse as Yn, GenerationContentBlock as Yr, ReferenceRecord as Yt, CreateSpaceInput as Z, SpaceFsUploadDestination as Zn, GenerationResult as Zr, ReferralDashboard as Zt, BillingCatalogProduct as _, readRequestSourceFromEnv as _i, SpaceAccess as _n, SpaceSandboxAutoDestroyPolicy as _r, JsonPrimitive as _t, WebsocketClientOptions as a, SessionTurnPatchEvent as ai, SessionMessageResponse as an, SpaceInvitation as ar, CursorPageInfo as at, BillingConversionIntent as b, SpacePublicEndpoints as bi, SpaceChannelBindingInput as bn, SpaceSessionsResponse as br, LabelAssignmentPageInfo as bt, createWebsocketClient as c, REQUEST_SOURCE_VIA_MAX_LENGTH as ci, SessionRecord as cn, SpaceMeta as cr, ExploreSpacesResponse as ct, BatchUserProfilesResponse as d, hasRequestSourceIdentity as di, SessionTurnSignedUrlsResponse as dn, SpacePendingDiffSummary as dr, GenerationUsageSummary as dt, BoardTransactionAppliedEvent as ei, ReferralStatus as en, SpaceFsUploadPlanEntry as er, CreateSpacePromptResponse as et, BillingBalanceActivity as f, isRequestSourceEmpty as fi, SessionTurnStreamSnapshotResponse as fn, SpacePresenceSnapshot as fr, GlobalSearchResponse as ft, BillingCatalog as g, parseRequestSourceFromHeaders as gi, SkillCatalogResponse as gn, SpaceRole as gr, JsonObject as gt, BillingBalanceActivityStatus as h, normalizeRequestSource as hi, SkillCatalogEntry as hn, SpaceRecord as hr, InvitationDetail as ht, WebsocketClientEvents as i, RealtimeServerEvent as ii, SessionBindingRecord as in, SpaceFsWriteFileInput as ir, CronJobUpdatePatch as it, BillingProductKind as j, CompletionMessage as ji, SpaceConfigInput as jn, ChannelConfig as jr, PatchResourceLabelsInput as jt, BillingProductCreditBenefit as k, SessionTurnRecord as ki, SpaceCommerceProductCreditBenefit as kn, UserSessionSpaceSummary as kr, MeResponse as kt, AcceptInvitationResponse as l, RequestSource as li, SessionTurnIndexResponse as ln, SpaceModListItem as lr, GenerationUsageBlock as lt, BillingBalanceActivityList as m, mergeRequestSourceIntoMeta as mi, SessionTurnsPaginatedResponse as mn, SpacePublicProfile as mr, GlobalSearchType as mt, WebSocketLike as n, LabelAssignmentsUpdatedEvent as ni, SandboxSpecId as nn, SpaceFsUploadProgress as nr, CronJobPayload as nt, WebsocketClientState as o, COHUB_SOURCE_HEADER as oi, SessionMessagesPaginatedResponse as on, SpaceListItem as or, ExploreSection as ot, BillingBalanceActivityKind as p, isRequestSourceUuid as pi, SessionTurnWindowResponse as pn, SpacePresenceUser as pr, GlobalSearchResult as pt, CheckpointRecord as q, SpaceFsReadFilesError as qn, normalizeGenerationPolicy as qr, ReferenceQueryResponse as qt, WebsocketClient as r, RealtimePatchOperation as ri, SendMessageCronJobPayload as rn, SpaceFsUploadResponse as rr, CronJobRecord as rt, WebsocketEventPayload as s, COHUB_SOURCE_HEADER_NAMES as si, SessionMessagesResponse as sn, SpaceMember as sr, ExploreSpaceItem as st, WebSocketConstructor as t, ChannelEnvelope as ti, ResourceLabelsResponse as tn, SpaceFsUploadPlanEntryInput as tr, CreateSpaceSessionInput as tt, ApiError as u, RequestSourceVia as ui, SessionTurnResponse as un, SpacePendingDiffFileResponse as ur, GenerationUsageHourlyStat as ut, BillingCheckoutActionState as v, requestSourceToHeaders as vi, SpaceAccessPolicy as vn, SpaceSandboxConfig as vr, JsonValue as vt, BillingCreditUnit as w, BoardAwarenessUpdate as wi, SpaceCommerceCreditsBenefit as wn, TaskRunDetailResponse as wr, LabelListItem as wt, BillingCreditExpiryGroup as x, BoardAwarenessGesture as xi, SpaceCheckpointDetailResponse as xn, SpaceUsageHourlyStat as xr, LabelAssignmentRecord as xt, BillingCheckoutResult as y, resolveRequestSourceChannel as yi, SpaceBootstrapSource as yn, SpaceSandboxProvider as yr, LabelAssignmentListItem as yt, CheckpointDiffDelivery as z, Usage as zi, SpaceFsCreateUploadInput as zn, GenerationPolicy as zr, PublicUserProfile as zt };
|