@casual-simulation/aux-runtime 3.2.7-alpha.6226622763

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 (70) hide show
  1. package/LICENSE.txt +21 -0
  2. package/README.md +82 -0
  3. package/index.d.ts +26 -0
  4. package/index.js +26 -0
  5. package/index.js.map +1 -0
  6. package/package.json +79 -0
  7. package/runtime/AuxCompiler.d.ts +258 -0
  8. package/runtime/AuxCompiler.js +722 -0
  9. package/runtime/AuxCompiler.js.map +1 -0
  10. package/runtime/AuxDevice.d.ts +28 -0
  11. package/runtime/AuxDevice.js +2 -0
  12. package/runtime/AuxDevice.js.map +1 -0
  13. package/runtime/AuxGlobalContext.d.ts +572 -0
  14. package/runtime/AuxGlobalContext.js +606 -0
  15. package/runtime/AuxGlobalContext.js.map +1 -0
  16. package/runtime/AuxLibrary.d.ts +2566 -0
  17. package/runtime/AuxLibrary.js +10210 -0
  18. package/runtime/AuxLibrary.js.map +1 -0
  19. package/runtime/AuxLibraryDefinitions.def +12288 -0
  20. package/runtime/AuxPartitionRealtimeEditModeProvider.d.ts +9 -0
  21. package/runtime/AuxPartitionRealtimeEditModeProvider.js +21 -0
  22. package/runtime/AuxPartitionRealtimeEditModeProvider.js.map +1 -0
  23. package/runtime/AuxRealtimeEditModeProvider.d.ts +35 -0
  24. package/runtime/AuxRealtimeEditModeProvider.js +34 -0
  25. package/runtime/AuxRealtimeEditModeProvider.js.map +1 -0
  26. package/runtime/AuxResults.d.ts +77 -0
  27. package/runtime/AuxResults.js +6 -0
  28. package/runtime/AuxResults.js.map +1 -0
  29. package/runtime/AuxRuntime.d.ts +252 -0
  30. package/runtime/AuxRuntime.js +2688 -0
  31. package/runtime/AuxRuntime.js.map +1 -0
  32. package/runtime/AuxRuntimeDynamicImports.d.ts +14 -0
  33. package/runtime/AuxRuntimeDynamicImports.js +24 -0
  34. package/runtime/AuxRuntimeDynamicImports.js.map +1 -0
  35. package/runtime/AuxVersion.d.ts +39 -0
  36. package/runtime/AuxVersion.js +2 -0
  37. package/runtime/AuxVersion.js.map +1 -0
  38. package/runtime/CasualOSError.d.ts +37 -0
  39. package/runtime/CasualOSError.js +25 -0
  40. package/runtime/CasualOSError.js.map +1 -0
  41. package/runtime/CompiledBot.d.ts +107 -0
  42. package/runtime/CompiledBot.js +44 -0
  43. package/runtime/CompiledBot.js.map +1 -0
  44. package/runtime/PerformanceNowPolyfill.d.ts +1 -0
  45. package/runtime/PerformanceNowPolyfill.js +8 -0
  46. package/runtime/PerformanceNowPolyfill.js.map +1 -0
  47. package/runtime/RecordsEvents.d.ts +1025 -0
  48. package/runtime/RecordsEvents.js +449 -0
  49. package/runtime/RecordsEvents.js.map +1 -0
  50. package/runtime/RuntimeBot.d.ts +177 -0
  51. package/runtime/RuntimeBot.js +732 -0
  52. package/runtime/RuntimeBot.js.map +1 -0
  53. package/runtime/RuntimeEvents.d.ts +126 -0
  54. package/runtime/RuntimeEvents.js +29 -0
  55. package/runtime/RuntimeEvents.js.map +1 -0
  56. package/runtime/RuntimeStateVersion.d.ts +23 -0
  57. package/runtime/RuntimeStateVersion.js +22 -0
  58. package/runtime/RuntimeStateVersion.js.map +1 -0
  59. package/runtime/Transpiler.d.ts +174 -0
  60. package/runtime/Transpiler.js +611 -0
  61. package/runtime/Transpiler.js.map +1 -0
  62. package/runtime/Utils.d.ts +44 -0
  63. package/runtime/Utils.js +253 -0
  64. package/runtime/Utils.js.map +1 -0
  65. package/runtime/index.d.ts +13 -0
  66. package/runtime/index.js +13 -0
  67. package/runtime/index.js.map +1 -0
  68. package/runtime/test/TestScriptBotFactory.d.ts +16 -0
  69. package/runtime/test/TestScriptBotFactory.js +107 -0
  70. package/runtime/test/TestScriptBotFactory.js.map +1 -0
@@ -0,0 +1,9 @@
1
+ import { AuxRealtimeEditModeProvider } from './AuxRealtimeEditModeProvider';
2
+ import { AuxPartitions } from '@casual-simulation/aux-common';
3
+ import { RealtimeEditMode } from './RuntimeBot';
4
+ export declare class AuxPartitionRealtimeEditModeProvider implements AuxRealtimeEditModeProvider {
5
+ private _partitions;
6
+ constructor(partitions: AuxPartitions);
7
+ getEditMode(space: string): RealtimeEditMode;
8
+ }
9
+ //# sourceMappingURL=AuxPartitionRealtimeEditModeProvider.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { DEFAULT_REALTIME_EDIT_MODE, } from './AuxRealtimeEditModeProvider';
2
+ import { realtimeStrategyToRealtimeEditMode } from './Utils';
3
+ import { RealtimeEditMode } from './RuntimeBot';
4
+ export class AuxPartitionRealtimeEditModeProvider {
5
+ constructor(partitions) {
6
+ this._partitions = partitions;
7
+ }
8
+ getEditMode(space) {
9
+ if (space in this._partitions) {
10
+ return realtimeStrategyToRealtimeEditMode(this._partitions[space].realtimeStrategy);
11
+ }
12
+ if (space === 'certified') {
13
+ return RealtimeEditMode.None;
14
+ }
15
+ else if (space === 'bootstrap') {
16
+ return RealtimeEditMode.None;
17
+ }
18
+ return DEFAULT_REALTIME_EDIT_MODE;
19
+ }
20
+ }
21
+ //# sourceMappingURL=AuxPartitionRealtimeEditModeProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuxPartitionRealtimeEditModeProvider.js","sourceRoot":"","sources":["AuxPartitionRealtimeEditModeProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,0BAA0B,GAC7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,kCAAkC,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,OAAO,oCAAoC;IAK7C,YAAY,UAAyB;QACjC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAClC,CAAC;IAED,WAAW,CAAC,KAAa;QACrB,IAAI,KAAK,IAAI,IAAI,CAAC,WAAW,EAAE;YAC3B,OAAO,kCAAkC,CACrC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAC3C,CAAC;SACL;QACD,IAAI,KAAK,KAAK,WAAW,EAAE;YACvB,OAAO,gBAAgB,CAAC,IAAI,CAAC;SAChC;aAAM,IAAI,KAAK,KAAK,WAAW,EAAE;YAC9B,OAAO,gBAAgB,CAAC,IAAI,CAAC;SAChC;QACD,OAAO,0BAA0B,CAAC;IACtC,CAAC;CACJ"}
@@ -0,0 +1,35 @@
1
+ import { RealtimeEditMode } from './RuntimeBot';
2
+ /**
3
+ * The default realtime edit mode.
4
+ */
5
+ export declare const DEFAULT_REALTIME_EDIT_MODE: RealtimeEditMode;
6
+ /**
7
+ * A map between space types and the realtime edit modes they should use.
8
+ */
9
+ export type SpaceRealtimeEditModeMap = Map<string, RealtimeEditMode>;
10
+ /**
11
+ * The default map between bot spaces and realtime edit modes.
12
+ */
13
+ export declare const DEFAULT_SPACE_REALTIME_EDIT_MODE_MAP: SpaceRealtimeEditModeMap;
14
+ /**
15
+ * Gets the realtime edit mode for the given space and map.
16
+ * @param map The map.
17
+ * @param space The space.
18
+ */
19
+ export declare function getRealtimeEditMode(map: SpaceRealtimeEditModeMap, space: string): RealtimeEditMode;
20
+ /**
21
+ * Defines an interface for an object that is able to provide realtime edit modes for a particular partition key.
22
+ */
23
+ export interface AuxRealtimeEditModeProvider {
24
+ /**
25
+ * Gets the edit mode for the given space.
26
+ * @param space The space.
27
+ */
28
+ getEditMode(space: string): RealtimeEditMode;
29
+ }
30
+ export declare class DefaultRealtimeEditModeProvider implements AuxRealtimeEditModeProvider {
31
+ private _map;
32
+ constructor(map?: SpaceRealtimeEditModeMap);
33
+ getEditMode(space: string): RealtimeEditMode;
34
+ }
35
+ //# sourceMappingURL=AuxRealtimeEditModeProvider.d.ts.map
@@ -0,0 +1,34 @@
1
+ import { RealtimeEditMode } from './RuntimeBot';
2
+ /**
3
+ * The default realtime edit mode.
4
+ */
5
+ export const DEFAULT_REALTIME_EDIT_MODE = RealtimeEditMode.Immediate;
6
+ /**
7
+ * The default map between bot spaces and realtime edit modes.
8
+ */
9
+ export const DEFAULT_SPACE_REALTIME_EDIT_MODE_MAP = new Map([
10
+ ['shared', RealtimeEditMode.Immediate],
11
+ ['local', RealtimeEditMode.Immediate],
12
+ ['tempLocal', RealtimeEditMode.Immediate],
13
+ ['history', RealtimeEditMode.Delayed],
14
+ ['admin', RealtimeEditMode.Delayed],
15
+ ['certified', RealtimeEditMode.None],
16
+ ['bootstrap', RealtimeEditMode.None],
17
+ ]);
18
+ /**
19
+ * Gets the realtime edit mode for the given space and map.
20
+ * @param map The map.
21
+ * @param space The space.
22
+ */
23
+ export function getRealtimeEditMode(map, space) {
24
+ return map.get(space) || DEFAULT_REALTIME_EDIT_MODE;
25
+ }
26
+ export class DefaultRealtimeEditModeProvider {
27
+ constructor(map = DEFAULT_SPACE_REALTIME_EDIT_MODE_MAP) {
28
+ this._map = map;
29
+ }
30
+ getEditMode(space) {
31
+ return getRealtimeEditMode(this._map, space);
32
+ }
33
+ }
34
+ //# sourceMappingURL=AuxRealtimeEditModeProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuxRealtimeEditModeProvider.js","sourceRoot":"","sources":["AuxRealtimeEditModeProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GACnC,gBAAgB,CAAC,SAAS,CAAC;AAO/B;;GAEG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAC7C,IAAI,GAAG,CAAC;IACJ,CAAC,QAAQ,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACtC,CAAC,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACrC,CAAC,WAAW,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACzC,CAAC,SAAS,EAAE,gBAAgB,CAAC,OAAO,CAAC;IACrC,CAAC,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC;IACnC,CAAC,WAAW,EAAE,gBAAgB,CAAC,IAAI,CAAC;IACpC,CAAC,WAAW,EAAE,gBAAgB,CAAC,IAAI,CAAC;CACvC,CAAC,CAAC;AAEP;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAC/B,GAA6B,EAC7B,KAAa;IAEb,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,0BAA0B,CAAC;AACxD,CAAC;AAaD,MAAM,OAAO,+BAA+B;IAKxC,YACI,MAAgC,oCAAoC;QAEpE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IACpB,CAAC;IAED,WAAW,CAAC,KAAa;QACrB,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;CACJ"}
@@ -0,0 +1,77 @@
1
+ import { Bot } from '@casual-simulation/aux-common/bots/Bot';
2
+ import { RuntimeActions } from './RuntimeEvents';
3
+ export declare class RanOutOfEnergyError extends Error {
4
+ constructor();
5
+ }
6
+ /**
7
+ * Defines the result of a script.
8
+ */
9
+ export interface ScriptResult {
10
+ /**
11
+ * The actions that the script queued.
12
+ */
13
+ actions: RuntimeActions[];
14
+ /**
15
+ * The value that the script returned.
16
+ */
17
+ result: any;
18
+ /**
19
+ * The error that the script ran into.
20
+ */
21
+ error: ScriptError;
22
+ }
23
+ /**
24
+ * Defines an error that a script ran into,
25
+ */
26
+ export interface ScriptError {
27
+ /**
28
+ * The error.
29
+ */
30
+ error: Error;
31
+ /**
32
+ * The bot that ran into the error.
33
+ * Null if the script was not attached to a bot.
34
+ */
35
+ bot: Bot;
36
+ /**
37
+ * The tag that ran into the error.
38
+ * Null if the script was not attached to a bot.
39
+ */
40
+ tag: string;
41
+ /**
42
+ * The line number that the error occurred at.
43
+ */
44
+ line?: number;
45
+ /**
46
+ * The column number that the error occurred at.
47
+ */
48
+ column?: number;
49
+ /**
50
+ * The script that caused the error.
51
+ * Only set if the script was unable to be compiled.
52
+ */
53
+ script?: string;
54
+ }
55
+ /**
56
+ * Defines the result of running an action.
57
+ */
58
+ export interface ActionResult {
59
+ /**
60
+ * The actions that were queued.
61
+ */
62
+ actions: RuntimeActions[];
63
+ /**
64
+ * The results from the scripts that were run.
65
+ */
66
+ results: any[];
67
+ /**
68
+ * The errors that occurred.
69
+ */
70
+ errors: ScriptError[];
71
+ /**
72
+ * The bots that ran a script for the action.
73
+ */
74
+ listeners: Bot[];
75
+ }
76
+ export type ProcessActionResult = ActionResult | null;
77
+ //# sourceMappingURL=AuxResults.d.ts.map
@@ -0,0 +1,6 @@
1
+ export class RanOutOfEnergyError extends Error {
2
+ constructor() {
3
+ super('Ran out of energy');
4
+ }
5
+ }
6
+ //# sourceMappingURL=AuxResults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuxResults.js","sourceRoot":"","sources":["AuxResults.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC1C;QACI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC/B,CAAC;CACJ"}
@@ -0,0 +1,252 @@
1
+ import { StateUpdatedEvent, Bot, BotSpace, RuntimeBot, CompiledBotListener } from '@casual-simulation/aux-common/bots';
2
+ import { Observable, SubscriptionLike } from 'rxjs';
3
+ import { AuxGlobalContext } from './AuxGlobalContext';
4
+ import { AuxLibrary } from './AuxLibrary';
5
+ import { RuntimeBotInterface, RuntimeBotFactory, RealtimeEditMode, RealtimeEditConfig, RuntimeInterpreterGeneratorProcessor } from './RuntimeBot';
6
+ import { CompiledBot, CompiledBotsState, RuntimeBreakpoint, RuntimeStop } from './CompiledBot';
7
+ import { ScriptError, ActionResult } from './AuxResults';
8
+ import { AuxVersion } from './AuxVersion';
9
+ import { AuxDevice } from './AuxDevice';
10
+ import { RuntimePromise } from './Utils';
11
+ import { AuxRealtimeEditModeProvider } from './AuxRealtimeEditModeProvider';
12
+ import { CurrentVersion } from '@casual-simulation/aux-common';
13
+ import { RuntimeStateVersion } from './RuntimeStateVersion';
14
+ import type { Interpreter as InterpreterType, InterpreterContinuation, InterpreterStop } from '@casual-simulation/js-interpreter';
15
+ import { RuntimeActions } from './RuntimeEvents';
16
+ export declare function registerInterpreterModule(module: any): void;
17
+ /**
18
+ * Defines an class that is able to manage the runtime state of an AUX.
19
+ *
20
+ * Being a runtime means providing and managing the execution state that an AUX is in.
21
+ * This means taking state updates events, shouts and whispers, and emitting additional events to affect the future state.
22
+ */
23
+ export declare class AuxRuntime implements RuntimeBotInterface, RuntimeBotFactory, RuntimeInterpreterGeneratorProcessor, SubscriptionLike {
24
+ private _compiledState;
25
+ private _existingMasks;
26
+ private _compiler;
27
+ private _onActions;
28
+ private _onErrors;
29
+ private _onRuntimeStop;
30
+ private _stopState;
31
+ private _breakpoints;
32
+ private _currentStopCount;
33
+ private _currentPromise;
34
+ private _actionBatch;
35
+ private _errorBatch;
36
+ private _userId;
37
+ private _sub;
38
+ private _currentVersion;
39
+ private _updatedBots;
40
+ private _newBots;
41
+ private _globalContext;
42
+ private _library;
43
+ private _editModeProvider;
44
+ private _exemptSpaces;
45
+ private _batchPending;
46
+ private _jobQueueCheckPending;
47
+ private _jobQueueCheckCount;
48
+ private _processingErrors;
49
+ private _portalBots;
50
+ private _builtinPortalBots;
51
+ private _globalChanges;
52
+ private _globalObject;
53
+ private _interpretedApi;
54
+ private _interpretedTagSpecificApi;
55
+ private _beforeActionListeners;
56
+ private _scriptActionEnqueuedListeners;
57
+ private _scriptUpdatedTagListeners;
58
+ private _scriptUpdatedTagMaskListeners;
59
+ /**
60
+ * The counter that is used to generate function names.
61
+ */
62
+ private _functionNameCounter;
63
+ /**
64
+ * A map of function names to their respective functions.
65
+ */
66
+ private _functionMap;
67
+ /**
68
+ * A map of bot IDs to a list of function names.
69
+ */
70
+ private _botFunctionMap;
71
+ /**
72
+ * Whether changes should be automatically batched.
73
+ */
74
+ private _autoBatch;
75
+ private _forceSyncScripts;
76
+ private _currentDebugger;
77
+ private _libraryFactory;
78
+ private _interpreter;
79
+ /**
80
+ * The number of times that the runtime can call onError for an error from the same script.
81
+ */
82
+ repeatedErrorLimit: number;
83
+ get context(): AuxGlobalContext;
84
+ get currentVersion(): RuntimeStateVersion;
85
+ get globalObject(): any;
86
+ get canTriggerBreakpoint(): boolean;
87
+ /**
88
+ * Creates a new AuxRuntime using the given library factory.
89
+ * @param libraryFactory
90
+ * @param forceSignedScripts Whether to force the runtime to only allow scripts that are signed.
91
+ * @param exemptSpaces The spaces that are exempt from requiring signed scripts.
92
+ * @param interpreter The interpreter that should be used for the runtime.
93
+ */
94
+ constructor(version: AuxVersion, device: AuxDevice, libraryFactory?: (context: AuxGlobalContext) => AuxLibrary, editModeProvider?: AuxRealtimeEditModeProvider, exemptSpaces?: BotSpace[], forceSyncScripts?: boolean, interpreter?: InterpreterType);
95
+ getShoutTimers(): {
96
+ [shout: string]: number;
97
+ };
98
+ get closed(): boolean;
99
+ unsubscribe(): void;
100
+ /**
101
+ * Gets the current state that the runtime is operating on.
102
+ */
103
+ get currentState(): CompiledBotsState;
104
+ get userId(): string;
105
+ set userId(id: string);
106
+ get userBot(): RuntimeBot;
107
+ /**
108
+ * An observable that resolves whenever the runtime issues an action.
109
+ */
110
+ get onActions(): Observable<RuntimeActions[]>;
111
+ /**
112
+ * An observable that resolves whenever the runtime issues an error.
113
+ */
114
+ get onErrors(): Observable<ScriptError[]>;
115
+ /**
116
+ * An observable that resolves whenever the runtime pauses in a script.
117
+ */
118
+ get onRuntimeStop(): Observable<RuntimeStop>;
119
+ /**
120
+ * Processes the given bot actions and dispatches the resulting actions in the future.
121
+ * @param actions The actions to process.
122
+ */
123
+ process(actions: RuntimeActions[]): MaybeRuntimePromise<ActionResult[]>;
124
+ private _getExecutingDebugger;
125
+ private _createDebugger;
126
+ private _mapCallStack;
127
+ private _processCore;
128
+ private _processAction;
129
+ private _registerPortalBot;
130
+ private _rejectAction;
131
+ /**
132
+ * Executes the given function based on the current execution state of the runtime.
133
+ * If the runtime is stopped, then the given function will be executed after the current promise finishes.
134
+ * If the runtime is executing normally, then the given function will be executed immediately.
135
+ * Returns the function result if the function executes immediately,
136
+ * or returns a runtime promise if the function executes after the current promise.
137
+ *
138
+ * This function essentially forces the given function to execute synchronously with respect to other functions wrapped with this function.
139
+ *
140
+ * @param func The function to execute.
141
+ *
142
+ */
143
+ private _wrapWithCurrentPromise;
144
+ /**
145
+ * Executes a shout with the given event name on the given bot IDs with the given argument.
146
+ * Also dispatches any actions and errors that occur.
147
+ * @param eventName The name of the event.
148
+ * @param botIds The Bot IDs that the shout is being sent to.
149
+ * @param arg The argument to include in the shout.
150
+ */
151
+ shout(eventName: string, botIds?: string[], arg?: any): MaybeRuntimePromise<ActionResult>;
152
+ /**
153
+ * Executes the given shout synchronously with respect to other scripts that may be running or paused.
154
+ * @param eventName The name of the event that should be executed.
155
+ * @param botIds The IDs of the bots that the shout should be sent to.
156
+ * @param arg The argument that should be sent with the shout.
157
+ * @param batch Whether to batch events.
158
+ * @param resetEnergy Whether to reset the runtime energy before executing the shout.
159
+ */
160
+ private _synchronousShout;
161
+ private _shout;
162
+ /**
163
+ * Executes the given script.
164
+ * @param script The script to run.
165
+ */
166
+ execute(script: string): MaybeRuntimePromise<{
167
+ result: any;
168
+ actions: RuntimeActions[];
169
+ errors: ScriptError[];
170
+ }>;
171
+ private _execute;
172
+ /**
173
+ * Signals to the runtime that the bots state has been updated.
174
+ * @param update The bot state update.
175
+ */
176
+ stateUpdated(update: StateUpdatedEvent): StateUpdatedEvent;
177
+ /**
178
+ * Signals to the runtime that the state version has been updated.
179
+ * @param newVersion The version update.
180
+ */
181
+ versionUpdated(newVersion: CurrentVersion): RuntimeStateVersion;
182
+ private _sendOnBotsAddedShouts;
183
+ private _sendOnBotsRemovedShouts;
184
+ private _sendOnBotsChangedShouts;
185
+ private _triggerPortalChangedHandlers;
186
+ private _addBotsToState;
187
+ private _removeBotsFromState;
188
+ private _updateBotsWithState;
189
+ notifyChange(): void;
190
+ notifyActionEnqueued(action: RuntimeActions): void;
191
+ createRuntimeBot(bot: Bot): RuntimeBot;
192
+ destroyScriptBot(bot: RuntimeBot): RealtimeEditMode;
193
+ private _processBatch;
194
+ private _processErrors;
195
+ private _batchScriptResults;
196
+ private _calculateScriptResults;
197
+ private _processUnbatchedErrors;
198
+ private _processUnbatchedActions;
199
+ private _compileTags;
200
+ private _createCompiledBot;
201
+ private _createRuntimeBot;
202
+ updateTag(bot: CompiledBot, tag: string, newValue: any): RealtimeEditConfig;
203
+ getValue(bot: CompiledBot, tag: string): any;
204
+ getRawValue(bot: CompiledBot, tag: string): any;
205
+ updateTagMask(bot: CompiledBot, tag: string, spaces: string[], value: any): RealtimeEditConfig;
206
+ getTagMask(bot: CompiledBot, tag: string): any;
207
+ getListener(bot: CompiledBot, tag: string): CompiledBotListener;
208
+ getTagLink(bot: CompiledBot, tag: string): RuntimeBot | RuntimeBot[];
209
+ getSignature(bot: CompiledBot, signature: string): string;
210
+ private _compileTagOrMask;
211
+ private _compileTag;
212
+ private _compileTagValue;
213
+ private _compileValue;
214
+ private _compileTagMaskValue;
215
+ private _compile;
216
+ private _handleError;
217
+ private _getRuntimeBot;
218
+ /**
219
+ * Maps the given value to a new value where bots are replaced with script bots.
220
+ * This makes it easy to modify other bot values in listeners. If the value is not convertable,
221
+ * then it is returned unaffected. Only objects and arrays are convertable.
222
+ *
223
+ * Works by making a copy of the value where every bot value is replaced with a reference
224
+ * to a script bot instance for the bot. The copy has a reference to the original value in the ORIGINAL_OBJECT symbol property.
225
+ * We use this property in action.reject() to resolve the original action value so that doing a action.reject() in a onAnyAction works properly.
226
+ *
227
+ * @param context The sandbox context.
228
+ * @param value The value that should be converted.
229
+ */
230
+ private _mapBotsToRuntimeBots;
231
+ private _mapBotsToRuntimeBotsCore;
232
+ private _getFunctionNamesForBot;
233
+ setBreakpoint(breakpoint: RuntimeBreakpoint): void;
234
+ removeBreakpoint(breakpointId: string): void;
235
+ continueAfterStop(stopId: RuntimeStop['stopId'], continuation?: InterpreterContinuation): void;
236
+ private _scheduleJob;
237
+ private _scheduleJobQueueCheck;
238
+ private _processJobQueueNow;
239
+ processGenerator<T>(generator: Generator<InterpreterStop, T, InterpreterContinuation>): void;
240
+ private _processGenerator;
241
+ private _executeGenerator;
242
+ }
243
+ type MaybeRuntimePromise<T> = T | RuntimePromise<T>;
244
+ /**
245
+ * Recursively maps each of the given library's functions using the given map function and returns a new library that contains the converted functions.
246
+ * The returned object will contain the same enumerable properties as the original library except that its functions have been mapped.
247
+ * @param library The library to map.
248
+ * @param map The function to use for mapping library functions.
249
+ */
250
+ export declare function mapLibraryFunctions<T extends AuxLibrary>(library: T, map: (func: Function, key: string) => any): T;
251
+ export {};
252
+ //# sourceMappingURL=AuxRuntime.d.ts.map