@thestatic-tv/dcl-sdk 2.9.0 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -79,9 +79,36 @@ interface StaticTVConfig {
79
79
  onBroadcast?: (text: string) => void;
80
80
  /**
81
81
  * Command handler for scene-specific commands (Pro tier).
82
- * Called when admin triggers a command from the panel.
82
+ * Called when admin triggers a command from the panel, and on every visitor's copy for each queued command the
83
+ * SDK does not play itself. Kicks no longer need it (2026-11-17): the SDK carries out `kickBanned` and `kickAll`
84
+ * on every visitor's copy, and still hands them here too.
83
85
  */
84
86
  onCommand?: (type: string, payload?: Record<string, unknown>) => void;
87
+ /**
88
+ * Called when this visitor becomes banned or kicked, and again when they are clear (Pro tier, 2026-11-17).
89
+ * The SDK already keeps a blocked visitor out of the scene's parcels, shows them only the notice, closes its
90
+ * panels and stops the video it plays on `videoScreen`; the scene's own media - a radio, a screen it plays
91
+ * itself through `onVideoPlay` - is the scene's to stop here. `staticTV.isVisitorBlocked` reads the same.
92
+ * Since 2026-11-19 'private' too: the scene's private mode keeps this visitor out (Venue).
93
+ * @example
94
+ * onBlockedChange: (blocked) => { if (blocked) radio.stop() }
95
+ */
96
+ onBlockedChange?: (blocked: boolean, standing: 'banned' | 'kicked' | 'private' | 'clear') => void;
97
+ /**
98
+ * The scene's own controls (2026-11-18; Venue since 2026-11-19, Pro until then): each a named group of options the Admin Panel's CONTROLS tab
99
+ * and the scene's page on thestatic.tv draw as buttons. A press reaches every visitor's copy through the scene's
100
+ * command queue and runs the control's `onChange`. `staticTV.registerControls()` adds more after construction.
101
+ * See `SceneControl`.
102
+ */
103
+ controls?: SceneControl[];
104
+ /**
105
+ * The scene's picture frames (Venue tier, 2026-11-19): spots the scene places itself, whose picture, hover text and
106
+ * link the scene's page on thestatic.tv edits. Every visitor's copy reads the content at load and hands each frame
107
+ * its own through `onContent`. `staticTV.registerFrames()` adds more at any time; `staticTV.openFrame(id)` is the
108
+ * click. Kept whatever the tier; without Venue nothing is read or sent, and a click still opens the default's link.
109
+ * See `SceneFrame`.
110
+ */
111
+ frames?: SceneFrame[];
85
112
  /** Automatically start session tracking on init (default: true) */
86
113
  autoStartSession?: boolean;
87
114
  /** Interval for session heartbeats in ms (default: 30000) */
@@ -192,6 +219,11 @@ interface SessionResponse {
192
219
  keyId?: string;
193
220
  keyType?: 'scene' | 'channel';
194
221
  sdkType?: SDKTier | 'lite' | 'full';
222
+ /**
223
+ * Venue (2026-11-19): the tier above Pro, carried as a flag beside sdkType 'pro' - never as an sdkType,
224
+ * which every SDK before it would read as free. True only with sdkType 'pro'.
225
+ */
226
+ venue?: boolean;
195
227
  version: string;
196
228
  }
197
229
  /**
@@ -344,6 +376,92 @@ interface VideoSlot {
344
376
  * Command handler for scene-specific commands
345
377
  */
346
378
  type CommandHandler = (type: string, payload?: Record<string, unknown>) => void;
379
+ /**
380
+ * One option of a scene control: a button in the CONTROLS tab and on the scene's page
381
+ */
382
+ interface SceneControlOption {
383
+ /** A slug: /^[a-z0-9][a-z0-9-]{0,31}$/ - never 'off', which the OFF button sends */
384
+ id: string;
385
+ /** The button's label, 1 to 40 characters */
386
+ label: string;
387
+ }
388
+ /**
389
+ * A scene control (2026-11-18; the Venue tier since 2026-11-19, Pro until then): a named group of options the scene's code declares, drawn as buttons in the
390
+ * Admin Panel's CONTROLS tab and on the scene's page at thestatic.tv. A press, in-world or on the page, queues one
391
+ * command, `sceneControl { control, option }`, which every visitor's copy reads and runs through `onChange`. The SDK
392
+ * uploads the declaration (ids and labels, never code) to the scene's record once per load from an admin's copy;
393
+ * thestatic.tv checks every press against it. At most 20 controls a scene; the declaration's JSON at most 8 KB.
394
+ *
395
+ * @example
396
+ * ```typescript
397
+ * {
398
+ * id: 'digifog', label: 'DigiFog', off: true, persist: true,
399
+ * options: [{ id: 'stars', label: 'Stars' }, { id: 'pulse', label: 'Pulse' }],
400
+ * onChange: (option) => fog.play(option) // 'off' when OFF is pressed
401
+ * }
402
+ * ```
403
+ */
404
+ interface SceneControl {
405
+ /** A slug: /^[a-z0-9][a-z0-9-]{0,31}$/ */
406
+ id: string;
407
+ /** The section's label in the tab, 1 to 40 characters */
408
+ label: string;
409
+ /** 1 to 24 options */
410
+ options: SceneControlOption[];
411
+ /** Draws an OFF button, which sends the option 'off' */
412
+ off?: boolean;
413
+ /** The current option is saved on thestatic.tv and applied at load, so a late arrival sees the same state */
414
+ persist?: boolean;
415
+ /** Runs in every visitor's copy with the option's id, or 'off' when OFF is pressed */
416
+ onChange: (option: string) => void;
417
+ }
418
+ /**
419
+ * What a frame shows (Venue tier, 2026-11-19): its saved content from thestatic.tv, or its default with version
420
+ * 'default'. The scene applies it to its own entity in `SceneFrame.onContent`.
421
+ */
422
+ interface FrameContent {
423
+ /** The picture, an https: URL */
424
+ image: string;
425
+ /** The hover text, '' when none */
426
+ text: string;
427
+ /** Where a click goes, '' when nowhere - `staticTV.openFrame(id)` opens it */
428
+ link: string;
429
+ /** Changes with each new picture (a click count restarts with it); 'default' for the frame's default */
430
+ version: string;
431
+ }
432
+ /**
433
+ * A picture frame (Venue tier, 2026-11-19): a spot the scene's code declares and places itself, whose picture, hover
434
+ * text and link the scene's page on thestatic.tv edits. Every visitor's copy reads the content at load and again when
435
+ * the page saves a frame, and calls `onContent` with the frame's saved content, else its `default`; a frame with
436
+ * neither gets no call. The SDK uploads the declaration (ids, labels and defaults, never code) once per load from an
437
+ * admin's copy. At most 64 frames a scene; thestatic.tv checks the ids, labels and URLs.
438
+ *
439
+ * @example
440
+ * ```typescript
441
+ * {
442
+ * id: 'f00', label: 'Ground floor, west wall',
443
+ * default: { image: 'https://example.com/poster.png', text: 'Our sponsor', link: 'https://example.com' },
444
+ * onContent: (c) => showPicture(frameEntity, c.image, c.text) // a click: staticTV.openFrame('f00')
445
+ * }
446
+ * ```
447
+ */
448
+ interface SceneFrame {
449
+ /** A slug: /^[a-z0-9][a-z0-9-]{0,31}$/ */
450
+ id: string;
451
+ /** The frame's name on the scene's page, 1 to 40 characters */
452
+ label: string;
453
+ /**
454
+ * Shown until the scene's page saves content for the frame, and again after a reset (an https: image). Its link is
455
+ * what `openFrame` opens while the frame shows no content from thestatic.tv - without Venue, or before the read lands.
456
+ */
457
+ default?: {
458
+ image: string;
459
+ text?: string;
460
+ link?: string;
461
+ };
462
+ /** Runs in every visitor's copy with what the frame shows; the scene applies it to its own entity */
463
+ onContent: (content: FrameContent) => void;
464
+ }
347
465
  /**
348
466
  * Custom scene tab definition for Pro tier
349
467
  */
@@ -413,6 +531,10 @@ interface AdminPanelConfig {
413
531
  * Called when admin triggers a command from the panel
414
532
  */
415
533
  onCommand?: CommandHandler;
534
+ /**
535
+ * The scene's own controls, drawn in the CONTROLS tab (2026-11-18; Venue since 2026-11-19). See `SceneControl`.
536
+ */
537
+ controls?: SceneControl[];
416
538
  /**
417
539
  * Callback when video URL should be played
418
540
  */
@@ -657,6 +779,72 @@ declare class InteractionsModule {
657
779
  follow(channelSlug: string): Promise<InteractionResponse | null>;
658
780
  }
659
781
 
782
+ /** What the module needs of the client (StaticTVClient) */
783
+ interface FramesHost {
784
+ getBaseUrl(): string;
785
+ getSceneId(): string | undefined;
786
+ log(message: string, ...args: unknown[]): void;
787
+ warn(message: string): void;
788
+ error(message: string, err?: unknown): void;
789
+ }
790
+ declare class FramesModule {
791
+ private host;
792
+ private entries;
793
+ /** Venue is known: the reads, the upload and the clicks may go */
794
+ private enabled;
795
+ /** This copy's admin check succeeded: the declaration may be uploaded */
796
+ private adminOk;
797
+ private uploaded;
798
+ private loadReadStarted;
799
+ /** The last good read's `frames` object (saved content by frame id), or null until a read succeeds */
800
+ private answer;
801
+ /** Reads are numbered as they start; an answer older than the one shown is dropped */
802
+ private readSeq;
803
+ private shownSeq;
804
+ /** A framesRefresh is waiting out its jitter: another inside the wait shares its read */
805
+ private refreshWaiting;
806
+ constructor(host: FramesHost);
807
+ /** The declared frames' ids, in the order they were first registered */
808
+ get ids(): string[];
809
+ /** True once Venue is known for this scene */
810
+ get isEnabled(): boolean;
811
+ /**
812
+ * Declare frames: kept until Venue is known; after, a frame registered now gets what the last read gave at once,
813
+ * and the load read and the upload that waited on frames go now (each still once a load)
814
+ */
815
+ register(frames: SceneFrame[]): void;
816
+ /** Venue is known (the client calls this once the session confirms it): the load read, and the upload if it waited */
817
+ enable(): void;
818
+ /** This copy's admin check succeeded (the admin panel calls this): the declaration goes up once Venue is known */
819
+ adminCheckSucceeded(): void;
820
+ /**
821
+ * A queued framesRefresh (the scene's page saved or reset a frame): read again after a random wait of up to
822
+ * REFRESH_JITTER_MS. Refreshes that arrive inside the wait share its read.
823
+ */
824
+ refresh(): void;
825
+ /**
826
+ * A visitor clicked a frame. The link opens when it is an https: one: the shown content's, else the frame's default's
827
+ * - so a scene without Venue (or before its read lands), which shows its own defaults, has no dead frames. The click is
828
+ * posted signed under the shown version (fire and forget; a failure is logged, never shown) only with Venue and
829
+ * something shown. An id not declared opens nothing and posts nothing.
830
+ */
831
+ open(id: string): void;
832
+ /** The routes' base for this scene: the scene id encoded, as any value in a url path is */
833
+ private sceneUrl;
834
+ /** The read at load: once, when Venue is known and a frame is declared */
835
+ private loadRead;
836
+ /** Read the saved content and show it; a failed read keeps what was shown */
837
+ private read;
838
+ /** A frame's content from the last good read: its saved content when usable, else its default, else null */
839
+ private contentFor;
840
+ /** Each declared frame's content handed to its onContent when it differs from what the frame shows */
841
+ private apply;
842
+ /** The declaration - ids, labels, defaults, never the handlers - once a load, in its own request to the config route */
843
+ private upload;
844
+ /** The click, signed: thestatic.tv counts it under the frame's shown version (one a wallet a frame a 10 s) */
845
+ private postClick;
846
+ }
847
+
660
848
  /**
661
849
  * Guide UI Module - provides channel/video browser
662
850
  */
@@ -760,6 +948,7 @@ declare class ChatUIModule {
760
948
  private systemMessages;
761
949
  private inputText;
762
950
  private chatScrollOffset;
951
+ private historyError;
763
952
  private position;
764
953
  private chatTimerId;
765
954
  private playerInfoTimerId;
@@ -840,13 +1029,113 @@ declare class ChatUIModule {
840
1029
  private renderToggleButton;
841
1030
  }
842
1031
 
1032
+ /** Precedence banned, kicked, private, clear ('private' since 2026-11-19: the scene's private mode keeps this visitor out) */
1033
+ type Standing = 'banned' | 'kicked' | 'private' | 'clear';
1034
+ /** What admin-check answered, as far as standing goes */
1035
+ interface StandingAnswer {
1036
+ isBanned: boolean;
1037
+ /** owner, scene admin, authorized or platform admin: KICK ALL passes them by */
1038
+ canModerate: boolean;
1039
+ /** The scene's private mode is on and the server does not admit this visitor (2026-11-19; absent before: open) */
1040
+ privateBlocked?: boolean;
1041
+ /** This visitor's wallet is linked to a TheStatic.tv account (2026-11-19; absent before: not a citizen) */
1042
+ isCitizen?: boolean;
1043
+ }
1044
+ interface ModerationDeps {
1045
+ /** Read admin-check again, signed as this visitor; it hands the answer to applyStanding */
1046
+ reread: () => Promise<void>;
1047
+ /** This visitor's wallet, or null while unknown */
1048
+ myWallet: () => string | null;
1049
+ /** Blocked turned on or off, or its reason changed */
1050
+ onChange?: (blocked: boolean, standing: Standing) => void;
1051
+ log?: (msg: string, ...args: unknown[]) => void;
1052
+ now?: () => number;
1053
+ /** 0 (inclusive) to 1 (exclusive), for a hint's wait; Math.random when not given */
1054
+ random?: () => number;
1055
+ }
1056
+ declare class ModerationModule {
1057
+ private deps;
1058
+ private banned;
1059
+ private kickedUntil;
1060
+ private canModerate;
1061
+ private privateBlocked;
1062
+ private citizen;
1063
+ private citizenAnsweredAt;
1064
+ private hintDueAt;
1065
+ private readWaiters;
1066
+ private rects;
1067
+ private boxes;
1068
+ private spawn;
1069
+ private wallEntities;
1070
+ private lastBlocked;
1071
+ private lastStanding;
1072
+ private lastReadAt;
1073
+ private readInFlight;
1074
+ private readPending;
1075
+ private wasInScene;
1076
+ private sinceCheck;
1077
+ private started;
1078
+ constructor(deps: ModerationDeps);
1079
+ private now;
1080
+ private log;
1081
+ /** Reads the scene's parcels and starts the checks (once) */
1082
+ start(): Promise<void>;
1083
+ /** banned, kicked (KICK ALL, until it lapses), private (the scene's private mode) or clear - in that precedence */
1084
+ get standing(): Standing;
1085
+ /** The last answer's isCitizen (2026-11-19): false before one, and from a server that does not answer it */
1086
+ get isCitizen(): boolean;
1087
+ /**
1088
+ * Whether this visitor is a TheStatic.tv citizen (2026-11-19): the last answer when it is under READ_GAP_MS old, else
1089
+ * the answer of the next read - started now, or the one in flight - through the same gate as every other read. A
1090
+ * read that fails answers what the last one said (false before any), and so does one that has not settled within
1091
+ * CITIZEN_WAIT_MS (the module's system ends that wait).
1092
+ */
1093
+ checkCitizen(): Promise<boolean>;
1094
+ get blocked(): boolean;
1095
+ /** How long a kick has left, in ms (0 when not kicked) */
1096
+ get kickLeftMs(): number;
1097
+ /**
1098
+ * admin-check's answer: the ban list's word on this visitor, whether they moderate the scene, and (2026-11-19) the
1099
+ * private mode's word and whether they are a citizen. Only the boolean true counts, so an answer without the new
1100
+ * fields reads as open and not a citizen. One who can moderate is never walled by private mode here, whatever the
1101
+ * answer says (the server admits them; this keeps a wrong answer from locking an admin out).
1102
+ */
1103
+ applyStanding(answer: StandingAnswer): void;
1104
+ /**
1105
+ * A command from the scene's queue (the poll every visitor runs). Returns true for the three this module takes.
1106
+ * kickBanned names a wallet: the named visitor re-reads their standing, every other visitor does nothing.
1107
+ * privateMode (2026-11-19) is a hint for every visitor: its payload is not read - a re-read after a random wait of up
1108
+ * to HINT_SPREAD_MS, joined by any hint that comes while it waits, and still gated by one read in flight and
1109
+ * READ_GAP_MS, so no number of hints makes this copy read faster than that.
1110
+ */
1111
+ handleCommand(type: string, payload?: Record<string, unknown>): boolean;
1112
+ /** Ask for a fresh standing read: at once when the gate allows, else as soon as it does */
1113
+ requestRead(): void;
1114
+ private tryRead;
1115
+ /** The walls follow blocked; the scene hears of a change */
1116
+ private sync;
1117
+ private raiseWalls;
1118
+ private lowerWalls;
1119
+ /** The walls this copy has up (one per parcel while blocked) */
1120
+ get wallCount(): number;
1121
+ /** Every CHECK_EVERY_S: a lapsed kick, the re-reads, and a blocked visitor out of place moved to the front entry */
1122
+ system: (dt: number) => void;
1123
+ }
1124
+
843
1125
  /**
844
1126
  * Admin Panel UI Module for The Static TV SDK (Pro Tier)
845
1127
  *
846
1128
  * Provides in-scene admin controls:
1129
+ * - Controls Tab: the scene's own controls (SceneControl), first in the bar when any are registered (2026-11-18) -
1130
+ * Venue only since 2026-11-19 (the controls are kept on a Pro scene without it, never drawn, uploaded or run)
847
1131
  * - Video Tab: Stream control, video playback, slots
848
- * - Mod Tab: Scene admins, banned wallets, broadcast
1132
+ * - Mod Tab: Scene admins, banned wallets, broadcast; private mode ON / OFF on a Venue scene (2026-11-19)
849
1133
  * - Custom Scene Tabs: Pro tier
1134
+ *
1135
+ * Since 2026-11-18 every button that changes what visitors see - the controls, the Video tab's plays, Stop and Reset
1136
+ * Default, the broadcast, the kicks - goes through one signed sender to the scene's command queue on thestatic.tv,
1137
+ * which every visitor's copy polls; the presser's copy does the same at once and skips its own command when the poll
1138
+ * returns it. Until then the Video and Broadcast buttons reached the presser's copy alone.
850
1139
  */
851
1140
 
852
1141
  declare class AdminPanelUIModule {
@@ -885,6 +1174,38 @@ declare class AdminPanelUIModule {
885
1174
  private broadcastText;
886
1175
  private modStatus;
887
1176
  private modsFetched;
1177
+ private kickStatus;
1178
+ private videoStatus;
1179
+ private broadcastStatus;
1180
+ /** The url the screen last played - the scene's current one from the video state at load, or the last play here - which PLAYBACK Play sends */
1181
+ private currentVideoUrl;
1182
+ private controls;
1183
+ private currentOption;
1184
+ private controlStatus;
1185
+ private controlsUploaded;
1186
+ private stateRead;
1187
+ /** init has read the video state: the saved control state may be read now (a persist control registered later reads then) */
1188
+ private loadReadsDone;
1189
+ private commandCursor;
1190
+ private seenCommandIds;
1191
+ private seenCommandOrder;
1192
+ private readonly controlLine;
1193
+ private readonly videoLine;
1194
+ private readonly broadcastLine;
1195
+ private kickLine;
1196
+ private privateModeOn;
1197
+ private privateStatus;
1198
+ private readonly privateLine;
1199
+ /**
1200
+ * The Venue tier (2026-11-19): scene controls and private mode are Venue's, so the CONTROLS tab, the declaration's
1201
+ * upload, a press, the saved state's read, a queued control's run and the private-mode switch all need it. The
1202
+ * client knows it from the session start, before this panel exists.
1203
+ */
1204
+ private get venue();
1205
+ /** This visitor's own standing - banned, kicked or clear - and the walls that follow it (2026-11-17) */
1206
+ readonly moderation: ModerationModule;
1207
+ /** The admin check, run once the player is known: with none yet it waits for one (utils/player-wait.ts, 2026-11-17) */
1208
+ private adminWait;
888
1209
  constructor(client: StaticTVClient, config: AdminPanelConfig);
889
1210
  private log;
890
1211
  /** Scale a dimension by shared uiScale */
@@ -896,9 +1217,22 @@ declare class AdminPanelUIModule {
896
1217
  */
897
1218
  init(): Promise<void>;
898
1219
  /**
899
- * Check if current player is an admin for this scene
1220
+ * Check if current player is an admin for this scene. With no player yet it waits for one on the SDK's timer and
1221
+ * checks then (utils/player-wait.ts): one wait at a time, ended quietly after 30 s with no wallet. A guest reading
1222
+ * (isGuest true) is checked at once and the wait goes on for a non-guest reading, checked once more if one comes
1223
+ * within the 30 s. Resolves when the check is done, or at once when there is none to run.
900
1224
  */
901
1225
  checkAdminStatus(): Promise<void>;
1226
+ /** The admin check proper, for a player the explorer has resolved */
1227
+ private checkAdminFor;
1228
+ /** My wallet, lowercased: admin-check's player, else the explorer's */
1229
+ private myWallet;
1230
+ /** Blocked turned on or off: the panel closes, and the client stops what it plays and tells the scene */
1231
+ private onStandingChange;
1232
+ /** True while this visitor is banned or kicked (2026-11-17) */
1233
+ get isVisitorBlocked(): boolean;
1234
+ /** A url the scene's queue or the slots would play - nothing while this visitor is blocked */
1235
+ private playUrl;
902
1236
  /**
903
1237
  * Toggle the admin panel open/closed
904
1238
  */
@@ -923,6 +1257,37 @@ declare class AdminPanelUIModule {
923
1257
  * Register a custom scene tab (Pro tier)
924
1258
  */
925
1259
  registerSceneTab(tab: SceneTabDefinition): void;
1260
+ /**
1261
+ * Register scene controls: the CONTROLS tab draws them, a press reaches every visitor's copy through the scene's
1262
+ * queue, and the declaration goes to the scene's record once an admin's check has succeeded. The same as the config's
1263
+ * `controls`; a control registered again by id replaces the earlier one. Only the shape is checked here - thestatic.tv
1264
+ * checks the ids, labels and bounds when the declaration is uploaded, and every press against it.
1265
+ */
1266
+ registerControls(controls: SceneControl[]): void;
1267
+ /** True when `option` is one of the control's, or 'off' on a control that has OFF */
1268
+ private isControlOption;
1269
+ /** A queued sceneControl's registered control and valid option, or null for anything else */
1270
+ private controlCommand;
1271
+ /** Run a control's option on this copy and mark it current; a handler that throws is logged and breaks nothing else */
1272
+ private applyControl;
1273
+ /** A press in the CONTROLS tab: this copy runs it at once, then everyone's through the queue (Venue, 2026-11-19) */
1274
+ private pressControl;
1275
+ /**
1276
+ * The saved option of every persist control, read once a load from the scene's public state route - after the admin
1277
+ * check and the video state, before the poll starts - and run on this copy, so a late arrival sees what the last
1278
+ * press set. A saved option that is not one of the control's is ignored, as is a failed read; a control with no saved
1279
+ * option keeps the scene's own default.
1280
+ */
1281
+ private readSavedState;
1282
+ /**
1283
+ * The declaration - each control's id, label, options, off and persist, never its handler - posted once a load to the
1284
+ * scene's record on thestatic.tv, from a copy whose admin check succeeded, so the scene's page draws the same buttons.
1285
+ * thestatic.tv checks the shape and bounds and writes only a declaration that differs. A refusal is logged, never
1286
+ * shown to the visitor, and not retried in this load.
1287
+ */
1288
+ private uploadControls;
1289
+ /** Remember a command id the poll has run or this copy has sent, forgetting the oldest past SEEN_COMMAND_IDS_MAX */
1290
+ private markCommandSeen;
926
1291
  private startStreamPolling;
927
1292
  private stopStreamPolling;
928
1293
  private startCommandPolling;
@@ -934,7 +1299,17 @@ declare class AdminPanelUIModule {
934
1299
  * body proved nothing and is no longer sent. Returns a fetch-like shape for the call sites.
935
1300
  */
936
1301
  private signedRequest;
1302
+ /**
1303
+ * Every visitor's copy reads the scene's queue (a public GET, every 5 s). Since 2026-11-18 the poll sends the server's
1304
+ * cursor back as `since` once it has one - the first poll has none, so the 30-second replay on load stays, which the
1305
+ * kicks rely on - and tells commands apart by id: a bounded set of the last SEEN_COMMAND_IDS_MAX, this copy's own
1306
+ * sends among them (a press is not run twice here), so two commands in one millisecond both run. A command with no id
1307
+ * falls back to the timestamp rule every command used until then, and a server that answers no cursor (production
1308
+ * before 2026-11-18) gets no since and is read as before.
1309
+ */
937
1310
  private pollCommands;
1311
+ /** One queued command on this copy: the SDK's own types here, a registered control's option, else the scene's onCommand */
1312
+ private runCommand;
938
1313
  private fetchStreamData;
939
1314
  private refreshStreamStatus;
940
1315
  private fetchVideoState;
@@ -972,11 +1347,69 @@ declare class AdminPanelUIModule {
972
1347
  private removeSceneAdmin;
973
1348
  private banWallet;
974
1349
  private unbanWallet;
975
- private banKickPlayer;
1350
+ /**
1351
+ * Queue a command on thestatic.tv for every visitor's copy of the scene (2026-11-17): a signed POST to the scene's
1352
+ * commands route, which takes it from the scene's owner, an admin or an authorized user at the scene's registered
1353
+ * location, and which every copy's poll reads within its 30-second window. The one sender for the kicks, the scene
1354
+ * controls and, since 2026-11-18, the Video and Broadcast buttons; each shows what it came to on its section's own
1355
+ * line. The command id the server answers goes into the seen set, so this copy's poll does not run its own press a
1356
+ * second time. Returns that id (empty when the answer carries none), or null when the command was not sent.
1357
+ */
1358
+ private sendSceneCommand;
1359
+ /**
1360
+ * The one signed sender's POST (2026-11-18; since 2026-11-19 private mode's switch goes through it too, to its own
1361
+ * route): signed as the presser to one of the scene's routes on thestatic.tv, which decides whether the presser may;
1362
+ * what it came to shown on the section's line in a control's four words. Returns the answer, or null when not sent.
1363
+ */
1364
+ private sendSigned;
1365
+ /**
1366
+ * PRIVATE MODE ON / OFF (2026-11-19, Venue; thestatic-hq docs/MERGE-CONTRACT-2026-11-19.md section 2): `{ on }` to
1367
+ * the scene's private route through the one signed sender. thestatic.tv decides who may switch it (its scene access
1368
+ * check) and queues `privateMode` for every copy, this one included, which re-reads its standing on it. The state
1369
+ * shown follows the server's answer, never the press.
1370
+ */
1371
+ private setPrivateMode;
1372
+ /** KICK ALL: every visitor who cannot moderate the scene is moved out and kept out for a while (2026-11-17) */
1373
+ private kickAll;
1374
+ /**
1375
+ * BROADCAST (2026-11-18): queued for every visitor, as the scene's page on thestatic.tv sends it - `from` the presser's
1376
+ * display name, ADMIN when the explorer has none (the page's own default) - and shown here at once as everyone sees
1377
+ * it, `from: text`. Until then the in-world Send reached the presser's copy alone.
1378
+ */
976
1379
  private sendBroadcast;
1380
+ /** The presser's display name for a broadcast's from, ADMIN when the explorer has none; within the route's 100 */
1381
+ private myName;
1382
+ /** PLAY NOW: the typed url plays here and is queued as videoSetUrl, which thestatic.tv keeps for later arrivals */
1383
+ private playNow;
1384
+ /** Play on Screen: the scene's own live stream, as PLAY NOW with its HLS url (what the scene's page sends for it) */
1385
+ private playStreamOnScreen;
1386
+ /** Play 1-5: the slot plays here (its url from the video state) and is queued as videoPlaySlot; the server resolves its url for everyone */
1387
+ private pressSlot;
1388
+ /**
1389
+ * PLAYBACK Play: the current video - the one the screen last played here, or the scene's current url from the video
1390
+ * state at load - plays again here and is queued as videoPlay with its url; with none known nothing is sent and the
1391
+ * line says so. onCommand gets ('videoPlay', { playing: true }) as it did before, for a scene that reads it.
1392
+ */
1393
+ private playbackPlay;
1394
+ /** Stop: the screen stops here and videoStop is queued for everyone */
1395
+ private playbackStop;
1396
+ /**
1397
+ * Reset Default: the screen goes back to its default here - what every copy does on a queued videoClear - and
1398
+ * videoClear is queued, which also clears the scene's kept url on thestatic.tv. onCommand gets ('videoClear', {}) as
1399
+ * it did before.
1400
+ */
1401
+ private resetDefault;
977
1402
  private setActiveTab;
978
1403
  private SectionHead;
979
1404
  private TabBtn;
1405
+ /** A control's button (2026-11-18): the option's label, highlighted while that option is current on this copy */
1406
+ private controlButton;
1407
+ /**
1408
+ * The CONTROLS tab (2026-11-18): a section per registered control, a button per option, OFF when the control has one,
1409
+ * the current option highlighted, and one status line for the last press. Listed first in the tab bar, only when
1410
+ * controls are registered, for the same admins the VIDEO tab is.
1411
+ */
1412
+ private ControlsTab;
980
1413
  private VideoTab;
981
1414
  private ModTab;
982
1415
  /**
@@ -1011,9 +1444,13 @@ declare class StaticTVClient {
1011
1444
  private _keyId;
1012
1445
  private _disabled;
1013
1446
  private _tier;
1447
+ /** Venue (2026-11-19): the server's flag beside a Pro tier; the event features need it */
1448
+ private _venue;
1014
1449
  private _standardFeaturesEnabled;
1015
1450
  private _proFeaturesEnabled;
1016
1451
  private _pendingProConfig;
1452
+ /** Controls registered before the admin panel exists (the tier not yet confirmed) - handed to it at init (2026-11-18) */
1453
+ private _pendingControls;
1017
1454
  private _featuresReadyPromise;
1018
1455
  private _featuresReadyResolve;
1019
1456
  private _featuresResolved;
@@ -1031,6 +1468,11 @@ declare class StaticTVClient {
1031
1468
  chatUI: ChatUIModule | null;
1032
1469
  /** Admin Panel module - Video/Mod tabs (pro tier only) */
1033
1470
  adminPanel: AdminPanelUIModule | null;
1471
+ /**
1472
+ * Frames module - the scene's picture frames, their content and their clicks (Venue tier, 2026-11-19). Holds the
1473
+ * declared frames from construction; reads, uploads and clicks only once the session confirms Venue.
1474
+ */
1475
+ readonly frames: FramesModule;
1034
1476
  /** UI scale - fixed at 1.0. DCL's UI system auto-scales based on viewport. */
1035
1477
  readonly uiScale: number;
1036
1478
  /** Get the API base URL (for internal module use) */
@@ -1239,6 +1681,38 @@ declare class StaticTVClient {
1239
1681
  * ```
1240
1682
  */
1241
1683
  confirmVideoPlaying(): void;
1684
+ /**
1685
+ * True while this visitor is banned from the scene or kicked out of it (Pro tier, 2026-11-17), or kept out by its
1686
+ * private mode (Venue, 2026-11-19): the SDK keeps them out of the scene's parcels, shows them only the notice and
1687
+ * plays them no video. A scene with its own media (a radio, its own screen) checks this, or passes
1688
+ * `onBlockedChange`, and stops it.
1689
+ */
1690
+ get isVisitorBlocked(): boolean;
1691
+ /**
1692
+ * This visitor's standing: 'banned', 'kicked', 'private' (2026-11-19) or 'clear', in that precedence (always 'clear'
1693
+ * without the Pro tier's admin panel)
1694
+ */
1695
+ get visitorStanding(): Standing;
1696
+ /**
1697
+ * True when the last standing read said this visitor is a TheStatic.tv citizen - their wallet linked to an account
1698
+ * (2026-11-19). False before a read, from a server that does not answer it, and without the Pro tier's admin panel.
1699
+ * For a fresh answer, `checkCitizen()`.
1700
+ */
1701
+ get visitorIsCitizen(): boolean;
1702
+ /**
1703
+ * Whether this visitor is a TheStatic.tv citizen, fresh (2026-11-19): a read of the scene's admin-check through the
1704
+ * moderation module - the last answer when it is under 5 s old, else the next read, gated as every standing read
1705
+ * is. False without the Pro tier's admin panel, and when no read has answered. A scene's citizens-only door asks
1706
+ * this instead of calling a route of its own; thestatic.tv answers it from the signed request, so a scene cannot
1707
+ * claim a citizen.
1708
+ */
1709
+ checkCitizen(): Promise<boolean>;
1710
+ /**
1711
+ * The admin panel's moderation reports blocked on or off (2026-11-17): the panels close, the SDK's own video
1712
+ * stops (and its fallback loop comes back once clear), the watch heartbeat stops, and the scene hears of it.
1713
+ * @internal
1714
+ */
1715
+ _onBlockedChange(blocked: boolean, standing: Standing): void;
1242
1716
  /**
1243
1717
  * Internal handler for broadcast messages
1244
1718
  * @internal
@@ -1278,7 +1752,7 @@ declare class StaticTVClient {
1278
1752
  * request came from the scene deployed at that scene's registered location.
1279
1753
  */
1280
1754
  getSceneId(): string | undefined;
1281
- _enableFeaturesForTier(tier: SDKTier, keyId?: string | null): void;
1755
+ _enableFeaturesForTier(tier: SDKTier, keyId?: string | null, venue?: boolean): void;
1282
1756
  /**
1283
1757
  * @deprecated Use `_enableFeaturesForTier` instead
1284
1758
  * @internal
@@ -1296,6 +1770,11 @@ declare class StaticTVClient {
1296
1770
  * Check if pro features are enabled (admin panel)
1297
1771
  */
1298
1772
  get hasProFeatures(): boolean;
1773
+ /**
1774
+ * True when the server confirmed the Venue tier (2026-11-19): Pro plus the event features - scene
1775
+ * controls, frames, private mode. `tier` stays 'pro' for a Venue scene, so a scene's own Pro checks hold.
1776
+ */
1777
+ get hasVenueFeatures(): boolean;
1299
1778
  /**
1300
1779
  * @deprecated Use `tier` instead
1301
1780
  */
@@ -1346,6 +1825,46 @@ declare class StaticTVClient {
1346
1825
  * ```
1347
1826
  */
1348
1827
  registerSceneTab(tab: SceneTabDefinition): void;
1828
+ /**
1829
+ * Register scene controls for the Admin Panel's CONTROLS tab and the scene's page on thestatic.tv (2026-11-18;
1830
+ * the Venue tier since 2026-11-19, Pro until then) - the same as passing `controls` in the config. Before the panel
1831
+ * exists (the tier not yet confirmed) they are kept and handed to it at init; after, they join the tab at once. On a
1832
+ * Pro scene without Venue they are kept and never drawn, uploaded or run. See `SceneControl`.
1833
+ *
1834
+ * @example
1835
+ * ```typescript
1836
+ * staticTV.registerControls([{
1837
+ * id: 'digifog', label: 'DigiFog', off: true, persist: true,
1838
+ * options: [{ id: 'stars', label: 'Stars' }, { id: 'pulse', label: 'Pulse' }],
1839
+ * onChange: (option) => fog.play(option)
1840
+ * }])
1841
+ * ```
1842
+ */
1843
+ registerControls(controls: SceneControl[]): void;
1844
+ /**
1845
+ * Register picture frames (Venue tier, 2026-11-19) - the same as passing `frames` in the config. Kept whatever the
1846
+ * tier (without Venue `openFrame` still opens a default's link); once Venue is known, a frame registered now gets the
1847
+ * content the last read gave at once. A frame registered again by id
1848
+ * replaces the earlier one; at most 64. Only the shape is checked here - thestatic.tv checks the ids, labels and URLs
1849
+ * when the declaration is uploaded. See `SceneFrame`.
1850
+ *
1851
+ * @example
1852
+ * ```typescript
1853
+ * staticTV.registerFrames([{
1854
+ * id: 'f00', label: 'Ground floor, west wall',
1855
+ * default: { image: 'https://example.com/poster.png' },
1856
+ * onContent: (c) => showPicture(frameEntity, c.image, c.text)
1857
+ * }])
1858
+ * ```
1859
+ */
1860
+ registerFrames(frames: SceneFrame[]): void;
1861
+ /**
1862
+ * A visitor clicked a frame (2026-11-19): the link opens when it is an https: one - the content's, else the frame's
1863
+ * default's, so a frame works before Venue is on - and, with Venue, the click is counted on thestatic.tv under the
1864
+ * picture the frame shows (signed, fire and forget). Call it from the frame's own pointer handler. Nothing happens
1865
+ * for an id the scene did not declare.
1866
+ */
1867
+ openFrame(id: string): void;
1349
1868
  /**
1350
1869
  * Close Admin/Guide panels (they share the same screen space)
1351
1870
  * Chat is independent and stays open.
@@ -1458,6 +1977,13 @@ declare function getPlayerWallet(): string | null;
1458
1977
  */
1459
1978
  declare function getPlayerDisplayName(): string | null;
1460
1979
 
1980
+ interface ParcelRect {
1981
+ minX: number;
1982
+ maxX: number;
1983
+ minZ: number;
1984
+ maxZ: number;
1985
+ }
1986
+
1461
1987
  interface SceneBounds {
1462
1988
  minX: number;
1463
1989
  maxX: number;
@@ -1478,6 +2004,11 @@ declare function getSceneBounds(): Promise<SceneBounds | null>;
1478
2004
  * Returns true if in bounds, false if out of bounds or can't determine.
1479
2005
  */
1480
2006
  declare function isPlayerInBounds(_bounds: SceneBounds): boolean;
2007
+ /**
2008
+ * Each of the scene's parcels as a square in the scene's coordinates, once getSceneBounds() has read them; empty
2009
+ * before, or when they could not be read (2026-11-17: the blocked visitor's walls and move are built from these)
2010
+ */
2011
+ declare function getParcelRects(): ParcelRect[];
1481
2012
  /**
1482
2013
  * Get player's current position
1483
2014
  */
@@ -1487,4 +2018,4 @@ declare function getPlayerPosition(): {
1487
2018
  z: number;
1488
2019
  } | null;
1489
2020
 
1490
- export { type AdminPanelConfig, AdminPanelUIModule, type Channel, type ChatChannel, type ChatMessage, type ChatUIConfig, ChatUIModule, type CommandHandler, type GuideFeaturedPlaylist, GuideModule, type GuideResponse, type GuideUIConfig, GuideUIModule, type GuideVideo, HeartbeatModule, type HeartbeatResponse, type InteractionResponse, InteractionsModule, KEY_TYPE_CHANNEL, KEY_TYPE_SCENE, NotificationBanner, type PlayerData, type SDKTier, type SceneBounds$1 as SceneBounds, type SceneStats, type SceneStatsResponse, type SceneTabDefinition, SessionModule, type SessionResponse, StaticTVClient, type StaticTVConfig, type StreamData, type VideoSlot, type Vod, fetchUserData, getPlayerDisplayName, getPlayerPosition, getPlayerWallet, getSceneBounds, hideNotification, isPlayerInBounds, setupStaticUI, showNotification };
2021
+ export { type AdminPanelConfig, AdminPanelUIModule, type Channel, type ChatChannel, type ChatMessage, type ChatUIConfig, ChatUIModule, type CommandHandler, type FrameContent, FramesModule, type GuideFeaturedPlaylist, GuideModule, type GuideResponse, type GuideUIConfig, GuideUIModule, type GuideVideo, HeartbeatModule, type HeartbeatResponse, type InteractionResponse, InteractionsModule, KEY_TYPE_CHANNEL, KEY_TYPE_SCENE, ModerationModule, NotificationBanner, type PlayerData, type SDKTier, type SceneBounds$1 as SceneBounds, type SceneControl, type SceneControlOption, type SceneFrame, type SceneStats, type SceneStatsResponse, type SceneTabDefinition, SessionModule, type SessionResponse, type Standing, StaticTVClient, type StaticTVConfig, type StreamData, type VideoSlot, type Vod, fetchUserData, getParcelRects, getPlayerDisplayName, getPlayerPosition, getPlayerWallet, getSceneBounds, hideNotification, isPlayerInBounds, setupStaticUI, showNotification };