@casual-simulation/aux-common 3.1.8 → 3.1.9-alpha.3341326932

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.
Files changed (42) hide show
  1. package/bots/Bot.d.ts +1 -1
  2. package/bots/Bot.js.map +1 -1
  3. package/bots/BotEvents.d.ts +24 -0
  4. package/bots/BotEvents.js.map +1 -1
  5. package/math/Vector2.js +6 -1
  6. package/math/Vector2.js.map +1 -1
  7. package/math/Vector3.js +6 -1
  8. package/math/Vector3.js.map +1 -1
  9. package/package.json +4 -2
  10. package/runtime/AuxCompiler.d.ts +74 -1
  11. package/runtime/AuxCompiler.js +332 -25
  12. package/runtime/AuxCompiler.js.map +1 -1
  13. package/runtime/AuxGlobalContext.d.ts +14 -4
  14. package/runtime/AuxGlobalContext.js +9 -1
  15. package/runtime/AuxGlobalContext.js.map +1 -1
  16. package/runtime/AuxLibrary.d.ts +191 -10
  17. package/runtime/AuxLibrary.js +172 -37
  18. package/runtime/AuxLibrary.js.map +1 -1
  19. package/runtime/AuxLibraryDefinitions.def +495 -83
  20. package/runtime/AuxRuntime.d.ts +66 -7
  21. package/runtime/AuxRuntime.js +976 -118
  22. package/runtime/AuxRuntime.js.map +1 -1
  23. package/runtime/AuxRuntimeDynamicImports.d.ts +14 -0
  24. package/runtime/AuxRuntimeDynamicImports.js +24 -0
  25. package/runtime/AuxRuntimeDynamicImports.js.map +1 -0
  26. package/runtime/CompiledBot.d.ts +59 -1
  27. package/runtime/CompiledBot.js +2 -0
  28. package/runtime/CompiledBot.js.map +1 -1
  29. package/runtime/RuntimeBot.d.ts +17 -0
  30. package/runtime/RuntimeBot.js +85 -5
  31. package/runtime/RuntimeBot.js.map +1 -1
  32. package/runtime/Transpiler.d.ts +21 -0
  33. package/runtime/Transpiler.js +27 -0
  34. package/runtime/Transpiler.js.map +1 -1
  35. package/runtime/Utils.d.ts +11 -0
  36. package/runtime/Utils.js +30 -1
  37. package/runtime/Utils.js.map +1 -1
  38. package/runtime/test/RuntimeTestHelpers.d.ts +5 -0
  39. package/runtime/test/RuntimeTestHelpers.js +11 -0
  40. package/runtime/test/RuntimeTestHelpers.js.map +1 -1
  41. package/test/TestHelpers.js +2 -2
  42. package/test/TestHelpers.js.map +1 -1
@@ -767,9 +767,33 @@ export interface FocusOnOptions {
767
767
  */
768
768
  easing?: EaseType | Easing;
769
769
 
770
+ /**
771
+ * The tag that should be focused.
772
+ * Only supported by the system portal.
773
+ */
774
+ tag?: string;
775
+
776
+ /**
777
+ * The space of the tag that should be focused.
778
+ * Only supported by the system portal.
779
+ */
780
+ space?: string;
781
+
782
+ /**
783
+ * The line number that should be focued.
784
+ * Only supported by the system portal.
785
+ */
786
+ lineNumber?: number;
787
+
788
+ /**
789
+ * The column number that should be focused.
790
+ * Only supported by the system portal.
791
+ */
792
+ columnNumber?: number;
793
+
770
794
  /**
771
795
  * The portal that the bot should be focused in.
772
- * If not specified, then the bot will be focused in all supported portals. (bot, mini and menu)
796
+ * If not specified, then the bot will be focused in all supported portals. (bot, mini, menu, and system)
773
797
  */
774
798
  portal?: PortalType;
775
799
  }
@@ -2859,6 +2883,7 @@ declare type PortalType =
2859
2883
  | 'miniGrid'
2860
2884
  | 'menu'
2861
2885
  | 'sheet'
2886
+ | 'system'
2862
2887
  | string;
2863
2888
 
2864
2889
  /**
@@ -3044,7 +3069,7 @@ export interface HtmlFunction {
3044
3069
  /**
3045
3070
  * Defines an interface that contains options for a debugger.
3046
3071
  */
3047
- export interface DebuggerOptions {
3072
+ export interface CommonDebuggerOptions {
3048
3073
  /**
3049
3074
  * Whether to use "real" UUIDs instead of predictable ones.
3050
3075
  */
@@ -3053,7 +3078,7 @@ export interface DebuggerOptions {
3053
3078
  /**
3054
3079
  * Whether to allow scripts to be asynchronous.
3055
3080
  * If false, then all scripts will be forced to be synchronous.
3056
- * Defaults to false.
3081
+ * Defaults to true.
3057
3082
  */
3058
3083
  allowAsynchronousScripts: boolean;
3059
3084
 
@@ -3064,6 +3089,14 @@ export interface DebuggerOptions {
3064
3089
  configBot: Bot | BotTags;
3065
3090
  }
3066
3091
 
3092
+ export interface NormalDebuggerOptions extends CommonDebuggerOptions {
3093
+ pausable: false;
3094
+ }
3095
+
3096
+ export interface PausableDebuggerOptions extends CommonDebuggerOptions {
3097
+ pausable: true;
3098
+ }
3099
+
3067
3100
  /**
3068
3101
  * Defines an interface that represents the result of a "create public record key" operation.
3069
3102
  */
@@ -7165,6 +7198,197 @@ export interface RaycastRay {
7165
7198
  direction: Vector3;
7166
7199
  }
7167
7200
 
7201
+ export type PossiblePauseTriggerStates =
7202
+ | ['before' | 'after']
7203
+ | ['before', 'after'];
7204
+
7205
+ /**
7206
+ * Defines an interface that contains options for a pause trigger.
7207
+ */
7208
+ export interface PauseTriggerOptions {
7209
+ /**
7210
+ * The line number that the trigger starts at.
7211
+ * Numbers should be one-based.
7212
+ */
7213
+ lineNumber: number;
7214
+
7215
+ /**
7216
+ * The column number that the trigger starts at.
7217
+ * Numbers should be one-based, and the @ symbol in listeners is ignored.
7218
+ */
7219
+ columnNumber: number;
7220
+
7221
+ /**
7222
+ * The states that the trigger should use.
7223
+ * Defaults to ["before"] if not specified.
7224
+ */
7225
+ states?: ('before' | 'after')[];
7226
+
7227
+ /**
7228
+ * Whether the trigger is enabled.
7229
+ * Defaults to true.
7230
+ */
7231
+ enabled?: boolean;
7232
+ }
7233
+
7234
+ /**
7235
+ * Defines an interface that represents a pause trigger.
7236
+ */
7237
+ export interface PauseTrigger extends PauseTriggerOptions {
7238
+ /**
7239
+ * The ID of the trigger.
7240
+ */
7241
+ triggerId: string;
7242
+
7243
+ /**
7244
+ * The ID of the bot that the trigger is set on.
7245
+ */
7246
+ botId: string;
7247
+
7248
+ /**
7249
+ * The tag that the trigger is set on.
7250
+ */
7251
+ tag: string;
7252
+ }
7253
+
7254
+ /**
7255
+ * Defines an interface for a possible pause trigger location.
7256
+ */
7257
+ export interface PossibleTriggerLocation {
7258
+ /**
7259
+ * The line number that the trigger would pause the debugger at.
7260
+ */
7261
+ lineNumber: number;
7262
+
7263
+ /**
7264
+ * The column number that the trigger would pause the debugger at.
7265
+ */
7266
+ columnNumber: number;
7267
+
7268
+ /**
7269
+ * The states that are reasonable for this pause trigger to stop at.
7270
+ */
7271
+ possibleStates: PossiblePauseTriggerStates;
7272
+ }
7273
+
7274
+ /**
7275
+ * Defines an interface that contains information about the current debugger pause state.
7276
+ */
7277
+ export interface DebuggerPause {
7278
+ /**
7279
+ * The ID of the pause.
7280
+ */
7281
+ pauseId: string | number;
7282
+
7283
+ /**
7284
+ * The pause trigger that started this pause.
7285
+ */
7286
+ trigger: PauseTrigger;
7287
+
7288
+ /**
7289
+ * The state of the pause.
7290
+ * Indicates whether the pause is before or after the node was executed.
7291
+ */
7292
+ state: 'before' | 'after';
7293
+
7294
+ /**
7295
+ * The result of the node evaluation.
7296
+ * Only included for "after" pause states.
7297
+ */
7298
+ result?: any;
7299
+
7300
+ /**
7301
+ * The call stack that the debugger currently has.
7302
+ */
7303
+ callStack: DebuggerCallFrame[];
7304
+ }
7305
+
7306
+ /**
7307
+ * Defines an interface that contains information about a single call stack frame.
7308
+ */
7309
+ export interface DebuggerCallFrame {
7310
+ /**
7311
+ * The location that was last evaluated in this frame.
7312
+ */
7313
+ location: DebuggerFunctionLocation;
7314
+
7315
+ /**
7316
+ * Gets the list of variables that are avaiable from this frame.
7317
+ */
7318
+ listVariables(): DebuggerVariable[];
7319
+
7320
+ /**
7321
+ * Sets the given variable name to the given value.
7322
+ * @param variableName The name of the variable to set.
7323
+ * @param value The value to set in the variable.
7324
+ */
7325
+ setVariableValue(variableName: string, value: any): void;
7326
+ }
7327
+
7328
+ /**
7329
+ * Defines an interface that represents a location in a debugger.
7330
+ */
7331
+ export interface DebuggerFunctionLocation {
7332
+ /**
7333
+ * The name of the function.
7334
+ */
7335
+ name?: string;
7336
+
7337
+ /**
7338
+ * The ID of the bot that this function is defined in.
7339
+ */
7340
+ botId?: string;
7341
+
7342
+ /**
7343
+ * The name of the tag that this function is defined in.
7344
+ */
7345
+ tag?: string;
7346
+
7347
+ /**
7348
+ * The line number that this function is defined at.
7349
+ */
7350
+ lineNumber?: number;
7351
+
7352
+ /**
7353
+ * The column number that this function is defined at.
7354
+ */
7355
+ columnNumber?: number;
7356
+ }
7357
+
7358
+ /**
7359
+ * Defines an interface that represents a debugger variable.
7360
+ */
7361
+ export interface DebuggerVariable {
7362
+ /**
7363
+ * The name of the variable.
7364
+ */
7365
+ name: string;
7366
+
7367
+ /**
7368
+ * The value contained by the variable.
7369
+ */
7370
+ value: any;
7371
+
7372
+ /**
7373
+ * The scope that the variable exists in.
7374
+ *
7375
+ * "block" indicates that the variable was defined in and exists only in the current block.
7376
+ * "frame" indicates that the variable was defined in and exists in the current stack frame.
7377
+ * "closure" indicates that the variable was inherited from a parent stack frame.
7378
+ */
7379
+ scope: 'block' | 'frame' | 'closure';
7380
+
7381
+ /**
7382
+ * Whether the variable value can be overwriten.
7383
+ */
7384
+ writable: boolean;
7385
+
7386
+ /**
7387
+ * Whether this variable has been initialized.
7388
+ */
7389
+ initialized?: boolean;
7390
+ }
7391
+
7168
7392
 
7169
7393
  declare global {
7170
7394
 
@@ -8061,7 +8285,7 @@ declare global {
8061
8285
  const perf: Perf;
8062
8286
  }
8063
8287
 
8064
- interface Debugger {
8288
+ interface DebuggerBase {
8065
8289
  /**
8066
8290
  * Gets the list of actions that have been performed by bots in this debugger.
8067
8291
  */
@@ -8085,30 +8309,72 @@ interface Debugger {
8085
8309
  getErrors(): any[];
8086
8310
 
8087
8311
  /**
8088
- * Creates a new bot and returns it.
8089
- * @param parent The bot that should be the parent of the new bot.
8090
- * @param mods The mods which specify the new bot's tag values. If given a mod with no tags, then an error will be thrown.
8091
- * @returns The bot(s) that were created.
8092
- *
8093
- * @example
8094
- * // Create a red bot without a parent.
8095
- * let redBot = create(null, { "color": "red" });
8096
- *
8097
- * @example
8098
- * // Create a red bot and a blue bot with `this` as the parent.
8099
- * let [redBot, blueBot] = create(this, [
8100
- * { "color": "red" },
8101
- * { "color": "blue" }
8102
- * ]);
8103
- *
8312
+ * Registers the given handler to react to when this debugger pauses by hitting a trigger.
8313
+ * @param handler The handler that should be called when the debugger pauses.
8104
8314
  */
8105
- create(...mods: Mod[]): Bot | Bot[];
8315
+ onPause(handler: (pause: DebuggerPause)): void;
8106
8316
 
8107
8317
  /**
8108
- * Destroys the given bot, bot ID, or list of bots.
8109
- * @param bot The bot, bot ID, or list of bots to destroy.
8318
+ * Registers or updates a pause trigger with this debugger.
8319
+ * Pause triggers can be used to tell the debugger when you want it to stop execution.
8320
+ * You specify the bot, tag, line and column numbers and the debugger will stop before/after it executes the code at that location.
8321
+ * @param botOrIdOrTrigger The bot, bot ID, or trigger that should be registered or updated.
8322
+ * @param tag The tag that the trigger should be registered in. Required if a bot or bot ID is specified.
8323
+ * @param options The options that go with this pause trigger. Required if a bot or bot ID is specified.
8110
8324
  */
8111
- destroy(bot: Bot | string | Bot[]): void;
8325
+ setPauseTrigger(botOrIdOrTrigger: Bot | string | PauseTrigger, tag?: string, options?: PauseTriggerOptions): PauseTrigger;
8326
+ /**
8327
+ * Registers a new pause trigger with this debugger.
8328
+ * Pause triggers can be used to tell the debugger when you want it to stop execution.
8329
+ * You specify the bot, tag, line and column numbers and the debugger will stop before/after it executes the code at that location.
8330
+ * @param botOrId The bot, or bot ID that the trigger should be placed in.
8331
+ * @param tag The tag that the trigger should be placed in.
8332
+ * @param options The options that go with this pause trigger.
8333
+ */
8334
+ setPauseTrigger(botOrId: Bot | string, tag: string, options: PauseTriggerOptions): PauseTrigger;
8335
+
8336
+ /**
8337
+ * Registers or updates the given pause trigger with this debugger.
8338
+ * @param trigger The trigger that should be registered or updated.
8339
+ */
8340
+ setPauseTrigger(trigger: PauseTrigger): PauseTrigger;
8341
+
8342
+ /**
8343
+ * Removes the given pause trigger from the debugger.
8344
+ * @param triggerOrId The trigger or trigger ID that should be removed from the debugger.
8345
+ */
8346
+ removePauseTrigger(triggerOrId: string | PauseTrigger): void;
8347
+
8348
+ /**
8349
+ * Disables the given pause trigger.
8350
+ * Disabled pause triggers will continue to be listed with listPauseTriggers(), but will not cause a pause to happen while they are disabled.
8351
+ * @param triggerOrId The trigger or trigger ID that should be disabled.
8352
+ */
8353
+ disablePauseTrigger(triggerOrId: string | PauseTrigger): void;
8354
+
8355
+ /**
8356
+ * Enables the given pause trigger
8357
+ * @param triggerOrId The trigger or trigger ID that should be enabled.
8358
+ */
8359
+ enablePauseTrigger(triggerOrId: strin | PauseTrigger): void;
8360
+
8361
+ /**
8362
+ * Gets the list of pause triggers that have been registered with this debugger.
8363
+ */
8364
+ listPauseTriggers(): PauseTrigger[];
8365
+
8366
+ /**
8367
+ * Gets a list of common trigger locations for the specified listener on the specified bot.
8368
+ * @param botOrId The bot or bot ID.
8369
+ * @param tag The name of the tag that the trigger locations should be listed for.
8370
+ */
8371
+ listCommonPauseTriggers(botOrId: Bot | string, tag: string): PossibleTriggerLocation[];
8372
+
8373
+ /**
8374
+ * Resumes the debugger execution from the given pause.
8375
+ * @param pause The pause state that execution should be resumed from.
8376
+ */
8377
+ resume(pause: DebuggerPause): void;
8112
8378
 
8113
8379
  /**
8114
8380
  * Removes tags from the given list of bots.
@@ -8211,63 +8477,6 @@ interface Debugger {
8211
8477
  */
8212
8478
  updateBotLinks(bot: Bot, idMap: Map<string, string | Bot> | { [id: string]: string | Bot }): void
8213
8479
 
8214
- /**
8215
- * Shouts the given events in order until a bot returns a result.
8216
- * Returns the result that was produced or undefined if no result was produced.
8217
- * @param eventNames The names of the events to shout.
8218
- * @param arg The argument to shout.
8219
- */
8220
- priorityShout(eventNames: string[], arg?: any): any;
8221
-
8222
- /**
8223
- * Asks every bot in the inst to run the given action.
8224
- * In effect, this is like shouting to a bunch of people in a room.
8225
- *
8226
- * @param name The event name.
8227
- * @param arg The optional argument to include in the shout.
8228
- * @returns Returns a list which contains the values returned from each script that was run for the shout.
8229
- *
8230
- * @example
8231
- * // Tell every bot to reset themselves.
8232
- * shout("reset()");
8233
- *
8234
- * @example
8235
- * // Ask every bot for its name.
8236
- * const names = shout("getName()");
8237
- *
8238
- * @example
8239
- * // Tell every bot say "Hi" to you.
8240
- * shout("sayHi()", "My Name");
8241
- */
8242
- shout(name: string, arg?: any): any[];
8243
-
8244
- /**
8245
- * Asks the given bots to run the given action.
8246
- * In effect, this is like whispering to a specific set of people in a room.
8247
- *
8248
- * @param bot The bot(s) to send the event to.
8249
- * @param eventName The name of the event to send.
8250
- * @param arg The optional argument to include.
8251
- * @returns Returns a list which contains the values returned from each script that was run for the shout.
8252
- *
8253
- * @example
8254
- * // Tell all the red bots to reset themselves.
8255
- * whisper(getBots("#color", "red"), "reset()");
8256
- *
8257
- * @example
8258
- * // Ask all the tall bots for their names.
8259
- * const names = whisper(getBots("scaleZ", height => height >= 2), "getName()");
8260
- *
8261
- * @example
8262
- * // Tell every friendly bot to say "Hi" to you.
8263
- * whisper(getBots("friendly", true), "sayHi()", "My Name");
8264
- */
8265
- whisper(
8266
- bot: (Bot | string)[] | Bot | string,
8267
- eventName: string,
8268
- arg?: any
8269
- ): any;
8270
-
8271
8480
  /**
8272
8481
  * Shouts the given event to every bot in every loaded simulation.
8273
8482
  * @param eventName The name of the event to shout.
@@ -8837,6 +9046,198 @@ interface Debugger {
8837
9046
  perf: Perf;
8838
9047
  }
8839
9048
 
9049
+ /**
9050
+ * Defines an interface that represents a debugger.
9051
+ */
9052
+ interface Debugger extends DebuggerBase {
9053
+ /**
9054
+ * Creates a new bot and returns it.
9055
+ * @param parent The bot that should be the parent of the new bot.
9056
+ * @param mods The mods which specify the new bot's tag values. If given a mod with no tags, then an error will be thrown.
9057
+ * @returns The bot(s) that were created.
9058
+ *
9059
+ * @example
9060
+ * // Create a red bot without a parent.
9061
+ * let redBot = create(null, { "color": "red" });
9062
+ *
9063
+ * @example
9064
+ * // Create a red bot and a blue bot with `this` as the parent.
9065
+ * let [redBot, blueBot] = create(this, [
9066
+ * { "color": "red" },
9067
+ * { "color": "blue" }
9068
+ * ]);
9069
+ *
9070
+ */
9071
+ create(...mods: Mod[]): Bot | Bot[];
9072
+
9073
+ /**
9074
+ * Destroys the given bot, bot ID, or list of bots.
9075
+ * @param bot The bot, bot ID, or list of bots to destroy.
9076
+ */
9077
+ destroy(bot: Bot | string | Bot[]): void;
9078
+
9079
+ /**
9080
+ * Shouts the given events in order until a bot returns a result.
9081
+ * Returns the result that was produced or undefined if no result was produced.
9082
+ * @param eventNames The names of the events to shout.
9083
+ * @param arg The argument to shout.
9084
+ */
9085
+ priorityShout(eventNames: string[], arg?: any): any;
9086
+
9087
+ /**
9088
+ * Asks every bot in the inst to run the given action.
9089
+ * In effect, this is like shouting to a bunch of people in a room.
9090
+ *
9091
+ * @param name The event name.
9092
+ * @param arg The optional argument to include in the shout.
9093
+ * @returns Returns a list which contains the values returned from each script that was run for the shout.
9094
+ *
9095
+ * @example
9096
+ * // Tell every bot to reset themselves.
9097
+ * shout("reset()");
9098
+ *
9099
+ * @example
9100
+ * // Ask every bot for its name.
9101
+ * const names = shout("getName()");
9102
+ *
9103
+ * @example
9104
+ * // Tell every bot say "Hi" to you.
9105
+ * shout("sayHi()", "My Name");
9106
+ */
9107
+ shout(name: string, arg?: any): any[];
9108
+
9109
+ /**
9110
+ * Asks the given bots to run the given action.
9111
+ * In effect, this is like whispering to a specific set of people in a room.
9112
+ *
9113
+ * @param bot The bot(s) to send the event to.
9114
+ * @param eventName The name of the event to send.
9115
+ * @param arg The optional argument to include.
9116
+ * @returns Returns a list which contains the values returned from each script that was run for the shout.
9117
+ *
9118
+ * @example
9119
+ * // Tell all the red bots to reset themselves.
9120
+ * whisper(getBots("#color", "red"), "reset()");
9121
+ *
9122
+ * @example
9123
+ * // Ask all the tall bots for their names.
9124
+ * const names = whisper(getBots("scaleZ", height => height >= 2), "getName()");
9125
+ *
9126
+ * @example
9127
+ * // Tell every friendly bot to say "Hi" to you.
9128
+ * whisper(getBots("friendly", true), "sayHi()", "My Name");
9129
+ */
9130
+ whisper(
9131
+ bot: (Bot | string)[] | Bot | string,
9132
+ eventName: string,
9133
+ arg?: any
9134
+ ): any;
9135
+
9136
+ /**
9137
+ * Changes the state that the given bot is in.
9138
+ * @param bot The bot to change.
9139
+ * @param stateName The state that the bot should move to.
9140
+ * @param groupName The group of states that the bot's state should change in. (Defaults to "state")
9141
+ */
9142
+ changeState(bot: Bot, stateName: string, groupName?: string): void;
9143
+ }
9144
+
9145
+ /**
9146
+ * Defines an interface that represents a debugger.
9147
+ */
9148
+ interface PausableDebugger extends DebuggerBase {
9149
+ /**
9150
+ * Creates a new bot and returns it.
9151
+ * @param parent The bot that should be the parent of the new bot.
9152
+ * @param mods The mods which specify the new bot's tag values. If given a mod with no tags, then an error will be thrown.
9153
+ * @returns The bot(s) that were created.
9154
+ *
9155
+ * @example
9156
+ * // Create a red bot without a parent.
9157
+ * let redBot = create(null, { "color": "red" });
9158
+ *
9159
+ * @example
9160
+ * // Create a red bot and a blue bot with `this` as the parent.
9161
+ * let [redBot, blueBot] = create(this, [
9162
+ * { "color": "red" },
9163
+ * { "color": "blue" }
9164
+ * ]);
9165
+ *
9166
+ */
9167
+ create(...mods: Mod[]): Promise<Bot | Bot[]>;
9168
+
9169
+ /**
9170
+ * Destroys the given bot, bot ID, or list of bots.
9171
+ * @param bot The bot, bot ID, or list of bots to destroy.
9172
+ */
9173
+ destroy(bot: Bot | string | Bot[]): Promise<void>;
9174
+
9175
+ /**
9176
+ * Shouts the given events in order until a bot returns a result.
9177
+ * Returns the result that was produced or undefined if no result was produced.
9178
+ * @param eventNames The names of the events to shout.
9179
+ * @param arg The argument to shout.
9180
+ */
9181
+ priorityShout(eventNames: string[], arg?: any): Promise<any>;
9182
+
9183
+ /**
9184
+ * Asks every bot in the inst to run the given action.
9185
+ * In effect, this is like shouting to a bunch of people in a room.
9186
+ *
9187
+ * @param name The event name.
9188
+ * @param arg The optional argument to include in the shout.
9189
+ * @returns Returns a list which contains the values returned from each script that was run for the shout.
9190
+ *
9191
+ * @example
9192
+ * // Tell every bot to reset themselves.
9193
+ * shout("reset()");
9194
+ *
9195
+ * @example
9196
+ * // Ask every bot for its name.
9197
+ * const names = shout("getName()");
9198
+ *
9199
+ * @example
9200
+ * // Tell every bot say "Hi" to you.
9201
+ * shout("sayHi()", "My Name");
9202
+ */
9203
+ shout(name: string, arg?: any): Promise<any[]>;
9204
+
9205
+ /**
9206
+ * Asks the given bots to run the given action.
9207
+ * In effect, this is like whispering to a specific set of people in a room.
9208
+ *
9209
+ * @param bot The bot(s) to send the event to.
9210
+ * @param eventName The name of the event to send.
9211
+ * @param arg The optional argument to include.
9212
+ * @returns Returns a list which contains the values returned from each script that was run for the shout.
9213
+ *
9214
+ * @example
9215
+ * // Tell all the red bots to reset themselves.
9216
+ * whisper(getBots("#color", "red"), "reset()");
9217
+ *
9218
+ * @example
9219
+ * // Ask all the tall bots for their names.
9220
+ * const names = whisper(getBots("scaleZ", height => height >= 2), "getName()");
9221
+ *
9222
+ * @example
9223
+ * // Tell every friendly bot to say "Hi" to you.
9224
+ * whisper(getBots("friendly", true), "sayHi()", "My Name");
9225
+ */
9226
+ whisper(
9227
+ bot: (Bot | string)[] | Bot | string,
9228
+ eventName: string,
9229
+ arg?: any
9230
+ ): Promise<any>;
9231
+
9232
+ /**
9233
+ * Changes the state that the given bot is in.
9234
+ * @param bot The bot to change.
9235
+ * @param stateName The state that the bot should move to.
9236
+ * @param groupName The group of states that the bot's state should change in. (Defaults to "state")
9237
+ */
9238
+ changeState(bot: Bot, stateName: string, groupName?: string): Promise<void>;
9239
+ }
9240
+
8840
9241
  /**
8841
9242
  * Defines an interface that represents the set of additional options that can be provided when recording a file.
8842
9243
  */
@@ -10216,12 +10617,23 @@ interface Os {
10216
10617
  * Creates a new debugger that can be used to test and simulate bots.
10217
10618
  * @param options The options that should be used for the debugger.
10218
10619
  */
10219
- createDebugger(options?: DebuggerOptions): Debugger;
10620
+ // createDebugger(options?: PausableDebuggerOptions | NormalDebuggerOptions): Debugger;
10621
+
10622
+ /**
10623
+ * Creates a new pausable debugger that can be used to test and simulate bots.
10624
+ * @param options The options that should be used for the debugger.
10625
+ */
10626
+ createDebugger(options: PausableDebuggerOptions): Promise<PausableDebugger>;
10220
10627
 
10628
+ /**
10629
+ * Creates a new debugger that can be used to test and simulate bots.
10630
+ * @param options The options that should be used for the debugger.
10631
+ */
10632
+ createDebugger(options: NormalDebuggerOptions): Promise<Debugger>;
10221
10633
  /**
10222
10634
  * Gets the debugger that this script is currently running in.
10223
10635
  */
10224
- getExecutingDebugger(): Debugger;
10636
+ getExecutingDebugger(): Debugger | PausableDebugger;
10225
10637
 
10226
10638
  /**
10227
10639
  * The global variables that are stored in the OS.