@whitesands/agent-player 1.2.0 → 1.3.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/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { A as AgentServerOptions, S as StartOptions, a as AgentHandle, E as EventListener } from './types-Zi-2YmF2.cjs';
2
- export { b as AgentEvent, L as Logger, T as TurnOptions, c as TurnResult } from './types-Zi-2YmF2.cjs';
1
+ import { A as AgentServerOptions, S as StartOptions, a as AgentHandle, E as EventListener, T as TurnResult } from './types-gmAkYoQr.cjs';
2
+ export { b as AgentEvent, L as Logger, c as TurnOptions } from './types-gmAkYoQr.cjs';
3
3
  import { AttemptRecord } from './protocol.cjs';
4
- export { TokenUsage } from './protocol.cjs';
4
+ export { Relationship, StepRecord, TokenUsage } from './protocol.cjs';
5
5
  import { ZodRawShape } from 'zod';
6
6
  import '@modelcontextprotocol/sdk/shared/transport.js';
7
7
 
@@ -77,4 +77,312 @@ type DynamicCallback = (args: Record<string, unknown>) => unknown | Promise<unkn
77
77
  */
78
78
  declare function bindDynamic(player: object, name: string, description: string, args: ZodRawShape | undefined, callback?: DynamicCallback): void;
79
79
 
80
- export { type ActionSpec, AgentHandle, type AgentMetadata, AgentServer, AgentServerOptions, AttemptRecord, ConnectionLostError, EventListener, PlatformAuthError, ProtocolVersionError, StartOptions, TurnFailedError, TurnTimeoutError, bindDynamic };
80
+ type Position = {
81
+ x: number;
82
+ y: number;
83
+ z?: number;
84
+ };
85
+ type Body = {
86
+ getPosition(): Position;
87
+ /** Walk to a position. Resolves true on arrival, false if interrupted or unreachable. */
88
+ moveTo(goal: Position): Promise<boolean>;
89
+ stop(): void;
90
+ /** Show a spoken line. May return the text as shown, when the game filters it. */
91
+ say(text: string, towards?: Position): string | void;
92
+ emote?(name: string): void;
93
+ face?(position: Position): void;
94
+ setStatus?(status: string | null): void;
95
+ emotes?: string[];
96
+ };
97
+ type Activity = {
98
+ description: string;
99
+ /** How long it takes. Default 5. */
100
+ seconds?: number;
101
+ /** Shown while it runs, such as "making coffee". Defaults to the activity name. */
102
+ status?: string;
103
+ /** Change to the character's needs when it finishes, such as { food: 40 }. */
104
+ effects?: Record<string, number>;
105
+ /** An item the character carries afterwards. */
106
+ gives?: string;
107
+ /** An item the character must carry. It is used up. */
108
+ needs?: string;
109
+ /** Emote played while it runs. */
110
+ emote?: string;
111
+ };
112
+ type WorldOptions = {
113
+ name: string;
114
+ /** One or two sentences about the world, for every character. */
115
+ about?: string;
116
+ /** Extra rules of the game, in plain words. */
117
+ rules?: string;
118
+ /** The time of day as text, such as "Tuesday 14:30, afternoon". */
119
+ clock?: () => string;
120
+ /** How far speech carries, and how far a character sees. Defaults 35 and 80. */
121
+ hearing?: number;
122
+ sight?: number;
123
+ /** A character with nothing to react to gets a turn about this often, in seconds. Default 45. */
124
+ idleSeconds?: number;
125
+ /** Idle turns are this many times rarer when no human is within activeRadius. Defaults 3 and 120. */
126
+ farSlowdown?: number;
127
+ activeRadius?: number;
128
+ /** A character no human can see waits this long before a turn for something it did itself. Default 20. */
129
+ farDelay?: number;
130
+ /** A human who comes this close is noticed. Default 12. 0 turns it off. */
131
+ greetDistance?: number;
132
+ /** Cap on turns per minute for the whole world. Default 30. */
133
+ turnsPerMinute?: number;
134
+ /** Actions per turn, 1 to 4. Default 3. */
135
+ maxActions?: number;
136
+ /** Needs every character has. 100 is satisfied, 0 is desperate. perMinute is how fast it falls. */
137
+ needs?: Record<string, {
138
+ perMinute: number;
139
+ start?: number;
140
+ }>;
141
+ /** Each character replies at most chatReplies times per chatPause seconds to another character. Defaults 2 and 90. */
142
+ chatReplies?: number;
143
+ chatPause?: number;
144
+ /** Keep memory and relationships on the platform. Default true. */
145
+ memory?: boolean;
146
+ /** Receives warnings. */
147
+ warn?: (message: string) => void;
148
+ };
149
+ type WorldEvent = {
150
+ type: "speech";
151
+ speaker: string;
152
+ text: string;
153
+ to?: string;
154
+ } | {
155
+ type: "status";
156
+ character: string;
157
+ status: string | null;
158
+ } | {
159
+ type: "relationship";
160
+ character: string;
161
+ about: string;
162
+ affinity: number;
163
+ label: string;
164
+ change: number;
165
+ because: string;
166
+ } | {
167
+ type: "memory";
168
+ character: string;
169
+ about: string;
170
+ note: string;
171
+ } | {
172
+ type: "action";
173
+ character: string;
174
+ action: string;
175
+ args: Record<string, unknown>;
176
+ } | {
177
+ type: "thinking";
178
+ character: string;
179
+ on: boolean;
180
+ } | {
181
+ type: "give";
182
+ from: string;
183
+ to: string;
184
+ item: string;
185
+ } | {
186
+ type: "emote";
187
+ character: string;
188
+ emote: string;
189
+ } | {
190
+ type: "turn";
191
+ character: string;
192
+ ok: boolean;
193
+ result?: TurnResult;
194
+ error?: string;
195
+ };
196
+ type Place = {
197
+ name: string;
198
+ description: string;
199
+ position: Position;
200
+ radius: number;
201
+ };
202
+ type Thing = {
203
+ id: string;
204
+ name: string;
205
+ place?: string;
206
+ position: Position;
207
+ activities: Record<string, Activity>;
208
+ usedBy: string | null;
209
+ };
210
+ type Person = {
211
+ name: string;
212
+ getPosition: () => Position | null;
213
+ carrying: string[];
214
+ };
215
+ type NoticeOptions = {
216
+ about?: string;
217
+ turn?: boolean;
218
+ urgent?: boolean;
219
+ };
220
+ declare class Character {
221
+ readonly world: World;
222
+ readonly name: string;
223
+ readonly body: Body;
224
+ readonly home: string | undefined;
225
+ readonly kind = "resident";
226
+ status: string | null;
227
+ carrying: string[];
228
+ needs: Record<string, number>;
229
+ turns: number;
230
+ tokens: number;
231
+ agent: AgentHandle;
232
+ /** @internal */ inbox: string[];
233
+ /** @internal */ wake: number | null;
234
+ /** @internal */ busy: boolean;
235
+ /** @internal */ greeted: Map<string, number>;
236
+ /** @internal */ needWarned: Set<string>;
237
+ private task;
238
+ private using;
239
+ private chat;
240
+ constructor(world: World, name: string, body: Body, home: string | undefined, carrying: string[]);
241
+ position(): Position;
242
+ place(): string | null;
243
+ setStatus(status: string | null): void;
244
+ /**
245
+ * Tell this character something happened. It goes into its memory and its
246
+ * next view. turn asks for a turn; urgent asks for one now.
247
+ */
248
+ notice(text: string, options?: NoticeOptions): void;
249
+ /** @internal */
250
+ wakeIn(seconds: number): void;
251
+ /** How this character feels about someone, from the platform. */
252
+ feelingFor(name: string): {
253
+ affinity: number;
254
+ label: string;
255
+ note?: string;
256
+ };
257
+ /** @internal Returns true when another character's line should get a reply. */
258
+ mayReplyToCharacter(): boolean;
259
+ /** @internal */
260
+ view(): Record<string, unknown>;
261
+ private interrupt;
262
+ private walk;
263
+ /** @internal */
264
+ doSay(rawText: string, to: string): {
265
+ said: string;
266
+ note: string;
267
+ } | {
268
+ said: string;
269
+ note?: undefined;
270
+ };
271
+ /** @internal */
272
+ doGoTo(placeName: string): {
273
+ walking_to: string;
274
+ };
275
+ /** @internal */
276
+ doApproach(person: string): {
277
+ note: string;
278
+ walking_to?: undefined;
279
+ } | {
280
+ walking_to: string;
281
+ note?: undefined;
282
+ };
283
+ /** @internal */
284
+ doUse(thingId: string, activityName: string): {
285
+ started: string;
286
+ takes_seconds: number;
287
+ };
288
+ /** @internal */
289
+ doGive(item: string, to: string): {
290
+ gave: string;
291
+ to: string;
292
+ };
293
+ /** @internal */
294
+ doEmote(name: string): {
295
+ did: string;
296
+ };
297
+ }
298
+ declare class World {
299
+ private readonly server;
300
+ readonly name: string;
301
+ readonly about: string;
302
+ readonly rules: string;
303
+ readonly clock: (() => string) | undefined;
304
+ readonly hearing: number;
305
+ readonly sight: number;
306
+ readonly idleSeconds: number;
307
+ readonly farSlowdown: number;
308
+ readonly activeRadius: number;
309
+ readonly farDelay: number;
310
+ readonly greetDistance: number;
311
+ readonly turnsPerMinute: number;
312
+ readonly maxActions: number;
313
+ readonly chatReplies: number;
314
+ readonly chatPause: number;
315
+ readonly places: Map<string, Place>;
316
+ readonly things: Map<string, Thing>;
317
+ readonly characters: Map<string, Character>;
318
+ readonly people: Map<string, Person>;
319
+ turnsUsed: number;
320
+ private readonly needDefs;
321
+ private readonly memory;
322
+ private readonly warn;
323
+ private readonly listeners;
324
+ private timer;
325
+ private budget;
326
+ private budgetAt;
327
+ private lastTick;
328
+ constructor(server: AgentServer, options: WorldOptions);
329
+ /** Listen for world events. Returns a function that unsubscribes. */
330
+ on(listener: (event: WorldEvent) => void): () => void;
331
+ /** @internal */
332
+ emit(event: WorldEvent): void;
333
+ addPlace(name: string, place: {
334
+ description?: string;
335
+ position: Position;
336
+ radius?: number;
337
+ }): void;
338
+ addThing(id: string, thing: {
339
+ name?: string;
340
+ place?: string;
341
+ position: Position;
342
+ activities: Record<string, Activity>;
343
+ }): void;
344
+ /** Add a human player. getPosition returns null while they have no body. */
345
+ addPerson(person: {
346
+ name: string;
347
+ getPosition: () => Position | null;
348
+ }): void;
349
+ removePerson(name: string): void;
350
+ placeAt(position: Position): string | null;
351
+ positionOf(name: string): Position | null;
352
+ /** Match a name the model wrote to someone in the world, ignoring case. */
353
+ resolve(name: string | undefined): string | undefined;
354
+ /** @internal */
355
+ humanNear(position: Position, range: number): boolean;
356
+ /** The instructions every character gets about this world. */
357
+ guide(home?: string): string;
358
+ /** Add a character and start its session. id is the character ID from the web app. */
359
+ addCharacter(def: {
360
+ id: string;
361
+ name: string;
362
+ body: Body;
363
+ home?: string;
364
+ goal?: string;
365
+ instructions?: string;
366
+ carrying?: string[];
367
+ }): Promise<Character>;
368
+ /** @internal Carry a spoken line to everyone who can hear it. Returns how many heard it. */
369
+ speech(speaker: string, text: string, to: string | undefined): number;
370
+ /** A human player said something. Without to, the closest resident in talking range takes it. */
371
+ say(speaker: string, text: string, to?: string): number;
372
+ /** Tell one character something happened, in plain words. */
373
+ tell(characterName: string, text: string, options?: NoticeOptions): void;
374
+ /** Tell every character within range of a position that something happened. */
375
+ announce(text: string, position?: Position, range?: number): void;
376
+ /** A human player hands an item to a character. */
377
+ give(from: string, characterName: string, item: string): boolean;
378
+ private spend;
379
+ private idleDelay;
380
+ private runTurn;
381
+ private tick;
382
+ /** Start giving characters turns. Call it once, after adding the characters. */
383
+ start(): void;
384
+ /** Stop giving turns. Sessions stay open until the server closes. */
385
+ stop(): void;
386
+ }
387
+
388
+ export { type ActionSpec, type Activity, AgentHandle, type AgentMetadata, AgentServer, AgentServerOptions, AttemptRecord, type Body, Character, ConnectionLostError, EventListener, PlatformAuthError, type Position, ProtocolVersionError, StartOptions, TurnFailedError, TurnResult, TurnTimeoutError, World, type WorldEvent, type WorldOptions, bindDynamic };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { A as AgentServerOptions, S as StartOptions, a as AgentHandle, E as EventListener } from './types-DXqkV7YA.js';
2
- export { b as AgentEvent, L as Logger, T as TurnOptions, c as TurnResult } from './types-DXqkV7YA.js';
1
+ import { A as AgentServerOptions, S as StartOptions, a as AgentHandle, E as EventListener, T as TurnResult } from './types-BcH7_ozx.js';
2
+ export { b as AgentEvent, L as Logger, c as TurnOptions } from './types-BcH7_ozx.js';
3
3
  import { AttemptRecord } from './protocol.js';
4
- export { TokenUsage } from './protocol.js';
4
+ export { Relationship, StepRecord, TokenUsage } from './protocol.js';
5
5
  import { ZodRawShape } from 'zod';
6
6
  import '@modelcontextprotocol/sdk/shared/transport.js';
7
7
 
@@ -77,4 +77,312 @@ type DynamicCallback = (args: Record<string, unknown>) => unknown | Promise<unkn
77
77
  */
78
78
  declare function bindDynamic(player: object, name: string, description: string, args: ZodRawShape | undefined, callback?: DynamicCallback): void;
79
79
 
80
- export { type ActionSpec, AgentHandle, type AgentMetadata, AgentServer, AgentServerOptions, AttemptRecord, ConnectionLostError, EventListener, PlatformAuthError, ProtocolVersionError, StartOptions, TurnFailedError, TurnTimeoutError, bindDynamic };
80
+ type Position = {
81
+ x: number;
82
+ y: number;
83
+ z?: number;
84
+ };
85
+ type Body = {
86
+ getPosition(): Position;
87
+ /** Walk to a position. Resolves true on arrival, false if interrupted or unreachable. */
88
+ moveTo(goal: Position): Promise<boolean>;
89
+ stop(): void;
90
+ /** Show a spoken line. May return the text as shown, when the game filters it. */
91
+ say(text: string, towards?: Position): string | void;
92
+ emote?(name: string): void;
93
+ face?(position: Position): void;
94
+ setStatus?(status: string | null): void;
95
+ emotes?: string[];
96
+ };
97
+ type Activity = {
98
+ description: string;
99
+ /** How long it takes. Default 5. */
100
+ seconds?: number;
101
+ /** Shown while it runs, such as "making coffee". Defaults to the activity name. */
102
+ status?: string;
103
+ /** Change to the character's needs when it finishes, such as { food: 40 }. */
104
+ effects?: Record<string, number>;
105
+ /** An item the character carries afterwards. */
106
+ gives?: string;
107
+ /** An item the character must carry. It is used up. */
108
+ needs?: string;
109
+ /** Emote played while it runs. */
110
+ emote?: string;
111
+ };
112
+ type WorldOptions = {
113
+ name: string;
114
+ /** One or two sentences about the world, for every character. */
115
+ about?: string;
116
+ /** Extra rules of the game, in plain words. */
117
+ rules?: string;
118
+ /** The time of day as text, such as "Tuesday 14:30, afternoon". */
119
+ clock?: () => string;
120
+ /** How far speech carries, and how far a character sees. Defaults 35 and 80. */
121
+ hearing?: number;
122
+ sight?: number;
123
+ /** A character with nothing to react to gets a turn about this often, in seconds. Default 45. */
124
+ idleSeconds?: number;
125
+ /** Idle turns are this many times rarer when no human is within activeRadius. Defaults 3 and 120. */
126
+ farSlowdown?: number;
127
+ activeRadius?: number;
128
+ /** A character no human can see waits this long before a turn for something it did itself. Default 20. */
129
+ farDelay?: number;
130
+ /** A human who comes this close is noticed. Default 12. 0 turns it off. */
131
+ greetDistance?: number;
132
+ /** Cap on turns per minute for the whole world. Default 30. */
133
+ turnsPerMinute?: number;
134
+ /** Actions per turn, 1 to 4. Default 3. */
135
+ maxActions?: number;
136
+ /** Needs every character has. 100 is satisfied, 0 is desperate. perMinute is how fast it falls. */
137
+ needs?: Record<string, {
138
+ perMinute: number;
139
+ start?: number;
140
+ }>;
141
+ /** Each character replies at most chatReplies times per chatPause seconds to another character. Defaults 2 and 90. */
142
+ chatReplies?: number;
143
+ chatPause?: number;
144
+ /** Keep memory and relationships on the platform. Default true. */
145
+ memory?: boolean;
146
+ /** Receives warnings. */
147
+ warn?: (message: string) => void;
148
+ };
149
+ type WorldEvent = {
150
+ type: "speech";
151
+ speaker: string;
152
+ text: string;
153
+ to?: string;
154
+ } | {
155
+ type: "status";
156
+ character: string;
157
+ status: string | null;
158
+ } | {
159
+ type: "relationship";
160
+ character: string;
161
+ about: string;
162
+ affinity: number;
163
+ label: string;
164
+ change: number;
165
+ because: string;
166
+ } | {
167
+ type: "memory";
168
+ character: string;
169
+ about: string;
170
+ note: string;
171
+ } | {
172
+ type: "action";
173
+ character: string;
174
+ action: string;
175
+ args: Record<string, unknown>;
176
+ } | {
177
+ type: "thinking";
178
+ character: string;
179
+ on: boolean;
180
+ } | {
181
+ type: "give";
182
+ from: string;
183
+ to: string;
184
+ item: string;
185
+ } | {
186
+ type: "emote";
187
+ character: string;
188
+ emote: string;
189
+ } | {
190
+ type: "turn";
191
+ character: string;
192
+ ok: boolean;
193
+ result?: TurnResult;
194
+ error?: string;
195
+ };
196
+ type Place = {
197
+ name: string;
198
+ description: string;
199
+ position: Position;
200
+ radius: number;
201
+ };
202
+ type Thing = {
203
+ id: string;
204
+ name: string;
205
+ place?: string;
206
+ position: Position;
207
+ activities: Record<string, Activity>;
208
+ usedBy: string | null;
209
+ };
210
+ type Person = {
211
+ name: string;
212
+ getPosition: () => Position | null;
213
+ carrying: string[];
214
+ };
215
+ type NoticeOptions = {
216
+ about?: string;
217
+ turn?: boolean;
218
+ urgent?: boolean;
219
+ };
220
+ declare class Character {
221
+ readonly world: World;
222
+ readonly name: string;
223
+ readonly body: Body;
224
+ readonly home: string | undefined;
225
+ readonly kind = "resident";
226
+ status: string | null;
227
+ carrying: string[];
228
+ needs: Record<string, number>;
229
+ turns: number;
230
+ tokens: number;
231
+ agent: AgentHandle;
232
+ /** @internal */ inbox: string[];
233
+ /** @internal */ wake: number | null;
234
+ /** @internal */ busy: boolean;
235
+ /** @internal */ greeted: Map<string, number>;
236
+ /** @internal */ needWarned: Set<string>;
237
+ private task;
238
+ private using;
239
+ private chat;
240
+ constructor(world: World, name: string, body: Body, home: string | undefined, carrying: string[]);
241
+ position(): Position;
242
+ place(): string | null;
243
+ setStatus(status: string | null): void;
244
+ /**
245
+ * Tell this character something happened. It goes into its memory and its
246
+ * next view. turn asks for a turn; urgent asks for one now.
247
+ */
248
+ notice(text: string, options?: NoticeOptions): void;
249
+ /** @internal */
250
+ wakeIn(seconds: number): void;
251
+ /** How this character feels about someone, from the platform. */
252
+ feelingFor(name: string): {
253
+ affinity: number;
254
+ label: string;
255
+ note?: string;
256
+ };
257
+ /** @internal Returns true when another character's line should get a reply. */
258
+ mayReplyToCharacter(): boolean;
259
+ /** @internal */
260
+ view(): Record<string, unknown>;
261
+ private interrupt;
262
+ private walk;
263
+ /** @internal */
264
+ doSay(rawText: string, to: string): {
265
+ said: string;
266
+ note: string;
267
+ } | {
268
+ said: string;
269
+ note?: undefined;
270
+ };
271
+ /** @internal */
272
+ doGoTo(placeName: string): {
273
+ walking_to: string;
274
+ };
275
+ /** @internal */
276
+ doApproach(person: string): {
277
+ note: string;
278
+ walking_to?: undefined;
279
+ } | {
280
+ walking_to: string;
281
+ note?: undefined;
282
+ };
283
+ /** @internal */
284
+ doUse(thingId: string, activityName: string): {
285
+ started: string;
286
+ takes_seconds: number;
287
+ };
288
+ /** @internal */
289
+ doGive(item: string, to: string): {
290
+ gave: string;
291
+ to: string;
292
+ };
293
+ /** @internal */
294
+ doEmote(name: string): {
295
+ did: string;
296
+ };
297
+ }
298
+ declare class World {
299
+ private readonly server;
300
+ readonly name: string;
301
+ readonly about: string;
302
+ readonly rules: string;
303
+ readonly clock: (() => string) | undefined;
304
+ readonly hearing: number;
305
+ readonly sight: number;
306
+ readonly idleSeconds: number;
307
+ readonly farSlowdown: number;
308
+ readonly activeRadius: number;
309
+ readonly farDelay: number;
310
+ readonly greetDistance: number;
311
+ readonly turnsPerMinute: number;
312
+ readonly maxActions: number;
313
+ readonly chatReplies: number;
314
+ readonly chatPause: number;
315
+ readonly places: Map<string, Place>;
316
+ readonly things: Map<string, Thing>;
317
+ readonly characters: Map<string, Character>;
318
+ readonly people: Map<string, Person>;
319
+ turnsUsed: number;
320
+ private readonly needDefs;
321
+ private readonly memory;
322
+ private readonly warn;
323
+ private readonly listeners;
324
+ private timer;
325
+ private budget;
326
+ private budgetAt;
327
+ private lastTick;
328
+ constructor(server: AgentServer, options: WorldOptions);
329
+ /** Listen for world events. Returns a function that unsubscribes. */
330
+ on(listener: (event: WorldEvent) => void): () => void;
331
+ /** @internal */
332
+ emit(event: WorldEvent): void;
333
+ addPlace(name: string, place: {
334
+ description?: string;
335
+ position: Position;
336
+ radius?: number;
337
+ }): void;
338
+ addThing(id: string, thing: {
339
+ name?: string;
340
+ place?: string;
341
+ position: Position;
342
+ activities: Record<string, Activity>;
343
+ }): void;
344
+ /** Add a human player. getPosition returns null while they have no body. */
345
+ addPerson(person: {
346
+ name: string;
347
+ getPosition: () => Position | null;
348
+ }): void;
349
+ removePerson(name: string): void;
350
+ placeAt(position: Position): string | null;
351
+ positionOf(name: string): Position | null;
352
+ /** Match a name the model wrote to someone in the world, ignoring case. */
353
+ resolve(name: string | undefined): string | undefined;
354
+ /** @internal */
355
+ humanNear(position: Position, range: number): boolean;
356
+ /** The instructions every character gets about this world. */
357
+ guide(home?: string): string;
358
+ /** Add a character and start its session. id is the character ID from the web app. */
359
+ addCharacter(def: {
360
+ id: string;
361
+ name: string;
362
+ body: Body;
363
+ home?: string;
364
+ goal?: string;
365
+ instructions?: string;
366
+ carrying?: string[];
367
+ }): Promise<Character>;
368
+ /** @internal Carry a spoken line to everyone who can hear it. Returns how many heard it. */
369
+ speech(speaker: string, text: string, to: string | undefined): number;
370
+ /** A human player said something. Without to, the closest resident in talking range takes it. */
371
+ say(speaker: string, text: string, to?: string): number;
372
+ /** Tell one character something happened, in plain words. */
373
+ tell(characterName: string, text: string, options?: NoticeOptions): void;
374
+ /** Tell every character within range of a position that something happened. */
375
+ announce(text: string, position?: Position, range?: number): void;
376
+ /** A human player hands an item to a character. */
377
+ give(from: string, characterName: string, item: string): boolean;
378
+ private spend;
379
+ private idleDelay;
380
+ private runTurn;
381
+ private tick;
382
+ /** Start giving characters turns. Call it once, after adding the characters. */
383
+ start(): void;
384
+ /** Stop giving turns. Sessions stay open until the server closes. */
385
+ stop(): void;
386
+ }
387
+
388
+ export { type ActionSpec, type Activity, AgentHandle, type AgentMetadata, AgentServer, AgentServerOptions, AttemptRecord, type Body, Character, ConnectionLostError, EventListener, PlatformAuthError, type Position, ProtocolVersionError, StartOptions, TurnFailedError, TurnResult, TurnTimeoutError, World, type WorldEvent, type WorldOptions, bindDynamic };