aurival 0.1.8 → 0.2.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/README.md +134 -1
- package/dist/bot.d.ts +34 -0
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +133 -2
- package/dist/bot.js.map +1 -1
- package/dist/errors.d.ts +23 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +27 -0
- package/dist/errors.js.map +1 -1
- package/dist/events.d.ts +101 -4
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +196 -2
- package/dist/events.js.map +1 -1
- package/dist/http.d.ts +12 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +64 -1
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/socket.d.ts +7 -0
- package/dist/socket.d.ts.map +1 -1
- package/dist/socket.js +14 -6
- package/dist/socket.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -103,6 +103,134 @@ the server (your socket stays open), and a `backlog.overflowed` event telling yo
|
|
|
103
103
|
events you missed while you were away and where delivery resumed. Neither reaches a
|
|
104
104
|
command handler.
|
|
105
105
|
|
|
106
|
+
## Other events
|
|
107
|
+
|
|
108
|
+
`bot.command()` is for `/slash` invocations. Everything else the server can tell you about
|
|
109
|
+
goes through `bot.on(type, fn)`:
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
bot.on('member.joined', async (ctx) => {
|
|
113
|
+
await ctx.send(ctx.chat.id, `welcome, ${ctx.user?.handle}`);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
bot.on('member.left', async (ctx) => {
|
|
117
|
+
console.log(ctx.user?.handle, 'left', ctx.chat.id);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
bot.on('bot.added', async (ctx) => {
|
|
121
|
+
await ctx.send(ctx.chat.id, `thanks for adding me, ${ctx.actor?.handle}`);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
bot.on('bot.removed', async (ctx) => {
|
|
125
|
+
console.log(ctx.actor?.handle, 'removed me from', ctx.chat.id);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
bot.on('reaction.added', async (ctx) => {
|
|
129
|
+
console.log(ctx.sender?.handle, 'reacted', ctx.emoji, 'on', ctx.message?.id);
|
|
130
|
+
});
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
One `Context` for every event type. Only the fields that event actually carries are
|
|
134
|
+
populated — everything else is `null`:
|
|
135
|
+
|
|
136
|
+
| event | `ctx.chat` | `ctx.sender` | `ctx.user` | `ctx.actor` | `ctx.message` | `ctx.emoji` |
|
|
137
|
+
| ----------------- | ---------- | ------------ | ---------- | ----------- | ------------- | ----------- |
|
|
138
|
+
| `command.invoked` | ✓ | ✓ | | | ✓ | |
|
|
139
|
+
| `member.joined` | ✓ | | ✓ | | | |
|
|
140
|
+
| `member.left` | ✓ | | ✓ | | | |
|
|
141
|
+
| `bot.added` | ✓ | | | ✓ | | |
|
|
142
|
+
| `bot.removed` | ✓ | | | ✓ | | |
|
|
143
|
+
| `reaction.added` | ✓ | ✓ | | | ✓ | ✓ |
|
|
144
|
+
|
|
145
|
+
An event type this SDK does not know about yet is never fatal — `bot.on()` a type the
|
|
146
|
+
server hasn't invented yet and, if it starts sending it, the handler runs with whatever
|
|
147
|
+
fields it happens to carry. There is no `reaction.removed` event: un-reacting is silent.
|
|
148
|
+
|
|
149
|
+
## Actions
|
|
150
|
+
|
|
151
|
+
Every action is available on a handler's `ctx`. `ctx.chat.member_count` carries the chat's
|
|
152
|
+
live participant count, so you don't need a separate call to know how many people are in it:
|
|
153
|
+
|
|
154
|
+
The typing indicator is also automatic (0.2.1): a command handler still running 300 ms after
|
|
155
|
+
it started shows the chat "is thinking", and the indicator clears when the handler returns,
|
|
156
|
+
including on a throw. A handler that replies inside those 300 ms sends nothing, so a fast bot
|
|
157
|
+
never flickers. `new Bot({ autoTyping: false })` turns it off if you would rather drive
|
|
158
|
+
`ctx.withTyping()` yourself.
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
bot.command('busy', async (ctx) => {
|
|
162
|
+
await ctx.withTyping(async () => {
|
|
163
|
+
// ... slow work, e.g. calling out to another service ...
|
|
164
|
+
await ctx.reply(`done, and there are ${ctx.chat.member_count} of us in here`);
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
bot.command('fix', async (ctx) => {
|
|
169
|
+
const sent = await ctx.reply('working on it...');
|
|
170
|
+
await ctx.edit(String(sent['id']), 'done!');
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
bot.command('oops', async (ctx) => {
|
|
174
|
+
if (ctx.message) await ctx.delete(ctx.message);
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
bot.command('upvote', async (ctx) => {
|
|
178
|
+
if (ctx.message) await ctx.react(ctx.message, '\u{1F44D}');
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
bot.command('downvote', async (ctx) => {
|
|
182
|
+
if (ctx.message) await ctx.unreact(ctx.message, '\u{1F44D}');
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
bot.command('roster', async (ctx) => {
|
|
186
|
+
// One page per call — never auto-loads the rest. Loop on `hasMore`, never
|
|
187
|
+
// on whether `nextCursor` looks truthy: `hasMore` is the explicit signal
|
|
188
|
+
// (CONTRACT-V1 §4), and inferring "more pages" from the cursor is exactly
|
|
189
|
+
// the off-by-one every other SDK ships.
|
|
190
|
+
const handles: string[] = [];
|
|
191
|
+
let cursor: string | undefined;
|
|
192
|
+
for (;;) {
|
|
193
|
+
const page = await ctx.members(undefined, { cursor });
|
|
194
|
+
handles.push(...page.users.map((u) => u.handle));
|
|
195
|
+
if (!page.hasMore) break;
|
|
196
|
+
cursor = page.nextCursor ?? undefined;
|
|
197
|
+
}
|
|
198
|
+
await ctx.reply(handles.join(', '));
|
|
199
|
+
});
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
`ctx.typing(true | false)` and `ctx.withTyping(fn)` toggle the typing indicator — `withTyping`
|
|
203
|
+
sends `true` on entry and `false` on exit, always, even if `fn` throws.
|
|
204
|
+
|
|
205
|
+
`@`-mention someone with `mention(user)` — it template-literals straight into `text` as
|
|
206
|
+
`@handle`, and carries the id the server needs in `mentions`:
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
import { mention } from 'aurival';
|
|
210
|
+
|
|
211
|
+
bot.command('thanks', async (ctx) => {
|
|
212
|
+
if (!ctx.sender) return; // no sender on this event type — nothing to thank
|
|
213
|
+
await ctx.send(ctx.chat, `thanks, ${mention(ctx.sender)}!`, {
|
|
214
|
+
mentions: [mention(ctx.sender)],
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
> **0.2.0 breaking change:** `ctx.sender` is now `User | null` (was `User`). The single
|
|
220
|
+
> `Context` class is shared across every event type, and `sender` is genuinely absent on
|
|
221
|
+
> `member.joined`/`member.left`/`bot.added`/`bot.removed` (see the table above) — so it can
|
|
222
|
+
> no longer be typed as always-present. Narrow it before use:
|
|
223
|
+
>
|
|
224
|
+
> ```ts
|
|
225
|
+
> // 0.1.x — ctx.sender.handle compiled unconditionally.
|
|
226
|
+
> console.log(ctx.sender.handle);
|
|
227
|
+
>
|
|
228
|
+
> // 0.2.0 — narrow first (an early return, as in the `thanks` example above,
|
|
229
|
+
> // or an `if (ctx.sender)` guard around the rest of the handler).
|
|
230
|
+
> if (!ctx.sender) return;
|
|
231
|
+
> console.log(ctx.sender.handle);
|
|
232
|
+
> ```
|
|
233
|
+
|
|
106
234
|
## Shadowed commands
|
|
107
235
|
|
|
108
236
|
A bot can declare up to 50 commands, the SDK refuses to connect past that.
|
|
@@ -143,6 +271,11 @@ try {
|
|
|
143
271
|
}
|
|
144
272
|
```
|
|
145
273
|
|
|
274
|
+
A `rate_limited` reply is retried for you, up to five attempts, as long as `retry_after` is
|
|
275
|
+
15 seconds or less. Past that (0.2.1) the error is thrown at once instead of slept through:
|
|
276
|
+
a handler that sleeps for minutes holds its event unacknowledged for the whole wait, and the
|
|
277
|
+
server redelivers behind it.
|
|
278
|
+
|
|
146
279
|
`KeyRevoked`, `SessionSuperseded` and `BotSuspended` end the process on purpose — each one
|
|
147
280
|
means something a reconnect cannot fix. Everything else the SDK handles for you: token
|
|
148
281
|
expiry, deploys, network faults, redelivery.
|
|
@@ -163,7 +296,7 @@ and "zero runtime dependencies" could not both be true.
|
|
|
163
296
|
|
|
164
297
|
```
|
|
165
298
|
$ npm ls --omit=dev
|
|
166
|
-
aurival@0.
|
|
299
|
+
aurival@0.2.0
|
|
167
300
|
└── (empty)
|
|
168
301
|
```
|
|
169
302
|
|
package/dist/bot.d.ts
CHANGED
|
@@ -20,7 +20,21 @@ export interface BotOptions {
|
|
|
20
20
|
logger?: Logger | undefined;
|
|
21
21
|
/** Silences the `aurival: …` status banners on stderr. `AURIVAL_QUIET=1` does the same. */
|
|
22
22
|
quiet?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Auto-typing (SDK-41). A command handler still running after
|
|
25
|
+
* {@link AUTO_TYPING_DELAY_MS} shows the chat "is thinking", and the
|
|
26
|
+
* indicator is cleared when the handler returns. A handler that replies
|
|
27
|
+
* inside the delay sends nothing, so a fast bot never flickers. `false`
|
|
28
|
+
* keeps typing entirely in your hands (`ctx.withTyping()`). Default `true`.
|
|
29
|
+
*/
|
|
30
|
+
autoTyping?: boolean | undefined;
|
|
23
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* How long a command handler runs before the chat is told the bot is thinking
|
|
34
|
+
* (SDK-41). Long enough that an ordinary reply never trips it, short enough
|
|
35
|
+
* that a slow one reads as work in progress rather than silence.
|
|
36
|
+
*/
|
|
37
|
+
export declare const AUTO_TYPING_DELAY_MS = 300;
|
|
24
38
|
/**
|
|
25
39
|
* Load the key file, or pair this machine and save one.
|
|
26
40
|
*
|
|
@@ -67,6 +81,26 @@ export declare class Bot {
|
|
|
67
81
|
*/
|
|
68
82
|
command(name: string, handler: Handler): void;
|
|
69
83
|
command(name: string, description: string, handler: Handler): void;
|
|
84
|
+
/**
|
|
85
|
+
* Register a handler for any event type other than `command.invoked` (use
|
|
86
|
+
* `command()` for that) — `member.joined`, `member.left`, `bot.added`,
|
|
87
|
+
* `bot.removed`, `reaction.added`, or a future type this SDK does not yet
|
|
88
|
+
* name. Many handlers may share one type; each runs in the order it was
|
|
89
|
+
* registered (matches python), and the event is acked once, after every
|
|
90
|
+
* handler for it has settled.
|
|
91
|
+
*
|
|
92
|
+
* Throws immediately, before any registration, for the two types that are
|
|
93
|
+
* STRUCTURALLY undispatchable through `on()`: `command.invoked` (never
|
|
94
|
+
* dispatched here — use `command()`) and `backlog.overflowed` (never
|
|
95
|
+
* dispatched to any handler, by contract). A handler that truly can never
|
|
96
|
+
* run is exactly the silent footgun this check exists to catch at
|
|
97
|
+
* registration time. `reaction.removed` is NOT refused: it does not exist
|
|
98
|
+
* on the wire today (AMENDMENT-04 A-2.1, un-reacting is silent), but that
|
|
99
|
+
* is a today-fact, not a structural one, and refusing a type merely
|
|
100
|
+
* because the wire hasn't sent it yet would be a forward-compatibility
|
|
101
|
+
* trap — the handler just never fires until/unless that changes.
|
|
102
|
+
*/
|
|
103
|
+
on(type: string, handler: Handler): void;
|
|
70
104
|
/**
|
|
71
105
|
* Called with (error, context | null) for anything the SDK caught for you: a
|
|
72
106
|
* handler that threw, a `problem` frame, a backlog overflow.
|
package/dist/bot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bot.d.ts","sourceRoot":"","sources":["../src/bot.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAQ,OAAO,EAAmC,MAAM,WAAW,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAAE,OA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zB;IAEK,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA6C/C;CAoMF"}
|
package/dist/bot.js
CHANGED
|
@@ -3,8 +3,20 @@ import { Auth, KeyFile, machineLabel, pair, resolveHost } from './auth.js';
|
|
|
3
3
|
import { AurivalError, BotSuspended, RateLimitError, SessionSuperseded } from './errors.js';
|
|
4
4
|
import { Context, Event } from './events.js';
|
|
5
5
|
import { DEFAULT_HOST, HttpClient, defaultLogger } from './http.js';
|
|
6
|
-
import { Socket } from './socket.js';
|
|
6
|
+
import { EVENT_BACKLOG_OVERFLOWED, EVENT_COMMAND_INVOKED, Socket } from './socket.js';
|
|
7
7
|
import * as status from './status.js';
|
|
8
|
+
/** Types `on()` refuses, and why — each is a STRUCTURAL case where a
|
|
9
|
+
* registered handler truly cannot ever run, which is exactly the silent
|
|
10
|
+
* footgun `on()` throwing here saves a developer from. `reaction.removed`
|
|
11
|
+
* used to be refused here too, but it is merely not-a-thing-today rather
|
|
12
|
+
* than structurally undispatchable — refusing it was a forward-compatibility
|
|
13
|
+
* trap (merge-gate senior review; python makes the identical change), so
|
|
14
|
+
* `on('reaction.removed', ...)` now registers like any other unrecognized
|
|
15
|
+
* type: it just never fires until/unless the wire ever adds that event. */
|
|
16
|
+
const NEVER_DISPATCHED_TO_ON = new Map([
|
|
17
|
+
[EVENT_COMMAND_INVOKED, 'routed through bot.command(), not bot.on()'],
|
|
18
|
+
[EVENT_BACKLOG_OVERFLOWED, 'operational only — never reaches a handler (SDK-28)'],
|
|
19
|
+
]);
|
|
8
20
|
/** How long a clean shutdown waits for handlers that are still running (SDK-32). */
|
|
9
21
|
export const SHUTDOWN_GRACE_MS = 10_000;
|
|
10
22
|
// ERRORS-V1 has nothing to do with this cap — it never reaches the server. A
|
|
@@ -12,6 +24,13 @@ export const SHUTDOWN_GRACE_MS = 10_000;
|
|
|
12
24
|
// but catching it here means a bot author sees this line instead of a 400
|
|
13
25
|
// deep inside a sync call, and before we have made any network call at all.
|
|
14
26
|
export const MAX_COMMANDS = 50;
|
|
27
|
+
/**
|
|
28
|
+
* How long a command handler runs before the chat is told the bot is thinking
|
|
29
|
+
* (SDK-41). Long enough that an ordinary reply never trips it, short enough
|
|
30
|
+
* that a slow one reads as work in progress rather than silence.
|
|
31
|
+
*/
|
|
32
|
+
export const AUTO_TYPING_DELAY_MS = 300;
|
|
33
|
+
const noAutoTyping = { stop: async () => undefined };
|
|
15
34
|
// Mirrors the server's own normalisation (commands.go) so `Ping` finds the
|
|
16
35
|
// handler for the `ping` that comes back on the wire. Not validation.
|
|
17
36
|
function lookupKey(name) {
|
|
@@ -82,6 +101,15 @@ export function reportConflicts(response, log) {
|
|
|
82
101
|
*/
|
|
83
102
|
export class Bot {
|
|
84
103
|
#registered = new Map();
|
|
104
|
+
/**
|
|
105
|
+
* `bot.on(type, fn)` — a generic string-keyed registry beside the command
|
|
106
|
+
* registry (R1). `command.invoked` never lands here; it stays on
|
|
107
|
+
* `#registered` and its dispatch is unchanged. Many handlers per type,
|
|
108
|
+
* kept in registration order (matches python's `on()` — a divergence
|
|
109
|
+
* caught in review; js used to be one-handler-per-type and silently
|
|
110
|
+
* replace, python already ran all of them).
|
|
111
|
+
*/
|
|
112
|
+
#onHandlers = new Map();
|
|
85
113
|
#inflight = new Set();
|
|
86
114
|
#log;
|
|
87
115
|
#host;
|
|
@@ -89,11 +117,13 @@ export class Bot {
|
|
|
89
117
|
#errorHook = null;
|
|
90
118
|
#http = null;
|
|
91
119
|
#quiet;
|
|
120
|
+
#autoTyping;
|
|
92
121
|
constructor(options = {}) {
|
|
93
122
|
this.#log = options.logger ?? defaultLogger();
|
|
94
123
|
this.#host = options.host;
|
|
95
124
|
this.#keyPath = options.keyPath;
|
|
96
125
|
this.#quiet = status.isQuiet(options.quiet);
|
|
126
|
+
this.#autoTyping = options.autoTyping ?? true;
|
|
97
127
|
}
|
|
98
128
|
command(name, second, third) {
|
|
99
129
|
const description = typeof second === 'string' ? second : '';
|
|
@@ -105,6 +135,36 @@ export class Bot {
|
|
|
105
135
|
status.duplicateCommand(name, this.#quiet);
|
|
106
136
|
this.#registered.set(key, { command: { name, description }, handler });
|
|
107
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* Register a handler for any event type other than `command.invoked` (use
|
|
140
|
+
* `command()` for that) — `member.joined`, `member.left`, `bot.added`,
|
|
141
|
+
* `bot.removed`, `reaction.added`, or a future type this SDK does not yet
|
|
142
|
+
* name. Many handlers may share one type; each runs in the order it was
|
|
143
|
+
* registered (matches python), and the event is acked once, after every
|
|
144
|
+
* handler for it has settled.
|
|
145
|
+
*
|
|
146
|
+
* Throws immediately, before any registration, for the two types that are
|
|
147
|
+
* STRUCTURALLY undispatchable through `on()`: `command.invoked` (never
|
|
148
|
+
* dispatched here — use `command()`) and `backlog.overflowed` (never
|
|
149
|
+
* dispatched to any handler, by contract). A handler that truly can never
|
|
150
|
+
* run is exactly the silent footgun this check exists to catch at
|
|
151
|
+
* registration time. `reaction.removed` is NOT refused: it does not exist
|
|
152
|
+
* on the wire today (AMENDMENT-04 A-2.1, un-reacting is silent), but that
|
|
153
|
+
* is a today-fact, not a structural one, and refusing a type merely
|
|
154
|
+
* because the wire hasn't sent it yet would be a forward-compatibility
|
|
155
|
+
* trap — the handler just never fires until/unless that changes.
|
|
156
|
+
*/
|
|
157
|
+
on(type, handler) {
|
|
158
|
+
const reason = NEVER_DISPATCHED_TO_ON.get(type);
|
|
159
|
+
if (reason !== undefined) {
|
|
160
|
+
throw new AurivalError(`bot.on(${JSON.stringify(type)}, ...) can never run: ${reason}`);
|
|
161
|
+
}
|
|
162
|
+
const handlers = this.#onHandlers.get(type);
|
|
163
|
+
if (handlers === undefined)
|
|
164
|
+
this.#onHandlers.set(type, [handler]);
|
|
165
|
+
else
|
|
166
|
+
handlers.push(handler);
|
|
167
|
+
}
|
|
108
168
|
/**
|
|
109
169
|
* Called with (error, context | null) for anything the SDK caught for you: a
|
|
110
170
|
* handler that threw, a `problem` frame, a backlog overflow.
|
|
@@ -168,6 +228,7 @@ export class Bot {
|
|
|
168
228
|
onProblem: (problem) => {
|
|
169
229
|
void this.#callErrorHook(problem, null);
|
|
170
230
|
},
|
|
231
|
+
hasHandler: (type) => this.#onHandlers.has(type),
|
|
171
232
|
logger: this.#log,
|
|
172
233
|
botName: machine.bot,
|
|
173
234
|
commandCount: this.#registered.size,
|
|
@@ -257,8 +318,13 @@ export class Bot {
|
|
|
257
318
|
* Note what is NOT in this frame: no key, no seed, no token.
|
|
258
319
|
*/
|
|
259
320
|
async #handle(event) {
|
|
260
|
-
if (event.type
|
|
321
|
+
if (event.type === 'command.invoked') {
|
|
322
|
+
await this.#handleCommand(event);
|
|
261
323
|
return;
|
|
324
|
+
}
|
|
325
|
+
await this.#handleGeneric(event);
|
|
326
|
+
}
|
|
327
|
+
async #handleCommand(event) {
|
|
262
328
|
const name = typeof event.data['command'] === 'string' ? event.data['command'] : '';
|
|
263
329
|
const registered = this.#registered.get(lookupKey(name));
|
|
264
330
|
if (registered === undefined) {
|
|
@@ -270,6 +336,7 @@ export class Bot {
|
|
|
270
336
|
if (this.#http === null)
|
|
271
337
|
return;
|
|
272
338
|
const ctx = Context.fromEvent(event, this.#http);
|
|
339
|
+
const typing = this.#startAutoTyping(ctx);
|
|
273
340
|
try {
|
|
274
341
|
await registered.handler(ctx);
|
|
275
342
|
}
|
|
@@ -278,6 +345,70 @@ export class Bot {
|
|
|
278
345
|
this.#log.error(`handler for ${JSON.stringify(name)} threw: ${exc instanceof Error ? (exc.stack ?? exc.message) : String(exc)}`);
|
|
279
346
|
await this.#callErrorHook(exc, ctx);
|
|
280
347
|
}
|
|
348
|
+
finally {
|
|
349
|
+
await typing.stop();
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
// -- auto-typing (SDK-41) ------------------------------------------------
|
|
353
|
+
#startAutoTyping(ctx) {
|
|
354
|
+
if (!this.#autoTyping || ctx.chat.id === '')
|
|
355
|
+
return noAutoTyping;
|
|
356
|
+
// Once the timer fires the start request is in flight and may already be
|
|
357
|
+
// applied server-side, so stop() awaits it and clears, rather than
|
|
358
|
+
// abandoning a request it cannot take back. Typing is best-effort: a
|
|
359
|
+
// failure is a debug line, never the reply's problem.
|
|
360
|
+
let sent = null;
|
|
361
|
+
const timer = setTimeout(() => {
|
|
362
|
+
sent = ctx.typing(true).then(() => true, (exc) => {
|
|
363
|
+
this.#log.debug(`auto typing start failed: ${exc instanceof Error ? exc.message : String(exc)}`);
|
|
364
|
+
return false;
|
|
365
|
+
});
|
|
366
|
+
}, AUTO_TYPING_DELAY_MS);
|
|
367
|
+
return {
|
|
368
|
+
stop: async () => {
|
|
369
|
+
clearTimeout(timer);
|
|
370
|
+
if (sent === null)
|
|
371
|
+
return;
|
|
372
|
+
if (!(await sent))
|
|
373
|
+
return;
|
|
374
|
+
await ctx.typing(false).catch((exc) => {
|
|
375
|
+
this.#log.debug(`auto typing stop failed: ${exc instanceof Error ? exc.message : String(exc)}`);
|
|
376
|
+
});
|
|
377
|
+
},
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* `member.joined`/`left`, `bot.added`/`removed`, `reaction.added`, or any
|
|
382
|
+
* other type this bot registered via `on()`. `Socket` only dispatches
|
|
383
|
+
* here for a type `#hasHandler` said yes to, but this stays defensive.
|
|
384
|
+
*
|
|
385
|
+
* Every handler registered for this type runs, in registration order
|
|
386
|
+
* (R1/python parity) — one throwing does not skip the rest. `Socket` acks
|
|
387
|
+
* the event exactly once, after this whole method returns, regardless of
|
|
388
|
+
* how many handlers ran or how many of them threw: a crash never
|
|
389
|
+
* redelivers a deterministic failure into a loop (SDK-16 extended to the
|
|
390
|
+
* multi-handler case).
|
|
391
|
+
*/
|
|
392
|
+
async #handleGeneric(event) {
|
|
393
|
+
const handlers = this.#onHandlers.get(event.type);
|
|
394
|
+
if (handlers === undefined || handlers.length === 0) {
|
|
395
|
+
this.#log.debug(`no handler for event type ${JSON.stringify(event.type)}`);
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
if (this.#http === null)
|
|
399
|
+
return;
|
|
400
|
+
const ctx = Context.fromGenericEvent(event, this.#http);
|
|
401
|
+
for (const handler of handlers) {
|
|
402
|
+
try {
|
|
403
|
+
await handler(ctx);
|
|
404
|
+
}
|
|
405
|
+
catch (exc) {
|
|
406
|
+
// One bad handler must not take the bot offline (SDK-16), same as a
|
|
407
|
+
// command, and must not stop the other handlers for this event.
|
|
408
|
+
this.#log.error(`handler for ${JSON.stringify(event.type)} threw: ${exc instanceof Error ? (exc.stack ?? exc.message) : String(exc)}`);
|
|
409
|
+
await this.#callErrorHook(exc, ctx);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
281
412
|
}
|
|
282
413
|
async #callErrorHook(error, ctx) {
|
|
283
414
|
if (this.#errorHook === null)
|
package/dist/bot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bot.js","sourceRoot":"","sources":["../src/bot.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAGpE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAWtC,oFAAoF;AACpF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAExC,6EAA6E;AAC7E,6EAA6E;AAC7E,0EAA0E;AAC1E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,C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AAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;CACF;AAED,uFAAuF;AACvF,SAAS,iBAAiB,CAAC,EAAU,EAAE,CAAc,EAAE,CAAc;IACnE,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,IAAI,GAAG,CAAC,KAAc,EAAQ,EAAE;YACpC,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,CAAC,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,CAAC;QACF,MAAM,OAAO,GAAG,GAAS,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;QAChD,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACrD,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -105,10 +105,33 @@ export declare class AckUnknownEvent extends InvalidRequestError {
|
|
|
105
105
|
*/
|
|
106
106
|
export declare class TooManyProblems extends InvalidRequestError {
|
|
107
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* `reaction_emoji_too_long` — the emoji argument to `react()`/`unreact()`
|
|
110
|
+
* exceeded the server's >32-byte length clamp (AMENDMENT-04 A-2). This is a
|
|
111
|
+
* size limit, not an allowlist check — there is no disallowed-emoji list to
|
|
112
|
+
* go looking for; any emoji under the byte clamp is accepted.
|
|
113
|
+
*/
|
|
114
|
+
export declare class ReactionEmojiTooLong extends InvalidRequestError {
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* `mention_not_member` — a `mentions` entry named a user id that is not a
|
|
118
|
+
* member of the target chat. Deliberately indistinguishable from a
|
|
119
|
+
* nonexistent user id (AMENDMENT-04 A-4, R-8): both answer with this same
|
|
120
|
+
* code, so the response can never be used as an existence oracle for a
|
|
121
|
+
* user id the caller does not already know is valid.
|
|
122
|
+
*/
|
|
123
|
+
export declare class MentionNotMember extends InvalidRequestError {
|
|
124
|
+
}
|
|
125
|
+
/** `mention_token_missing` — a `mentions` entry's `@handle` never appeared in `text`. */
|
|
126
|
+
export declare class MentionTokenMissing extends InvalidRequestError {
|
|
127
|
+
}
|
|
108
128
|
export declare class BotSuspended extends PermissionDeniedError {
|
|
109
129
|
}
|
|
110
130
|
export declare class BotPlaygroundOnly extends PermissionDeniedError {
|
|
111
131
|
}
|
|
132
|
+
/** `message_not_yours` — 403, `edit()`/`delete()` only work on the bot's own messages. */
|
|
133
|
+
export declare class MessageNotYours extends PermissionDeniedError {
|
|
134
|
+
}
|
|
112
135
|
export declare class RateLimited extends RateLimitError {
|
|
113
136
|
}
|
|
114
137
|
export declare class PairRateLimited extends RateLimitError {
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,2CAA2C;AAC3C,qBAAa,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED,4EAA4E;AAC5E,qBAAa,cAAe,SAAQ,YAAY;CAAG;AAEnD,4EAA4E;AAC5E,qBAAa,aAAc,SAAQ,YAAY;CAAG;AAElD,MA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,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,GAAE,mBAAwB,GAChC,eAAe,CAoBjB"}
|
package/dist/errors.js
CHANGED
|
@@ -109,10 +109,33 @@ export class AckUnknownEvent extends InvalidRequestError {
|
|
|
109
109
|
*/
|
|
110
110
|
export class TooManyProblems extends InvalidRequestError {
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* `reaction_emoji_too_long` — the emoji argument to `react()`/`unreact()`
|
|
114
|
+
* exceeded the server's >32-byte length clamp (AMENDMENT-04 A-2). This is a
|
|
115
|
+
* size limit, not an allowlist check — there is no disallowed-emoji list to
|
|
116
|
+
* go looking for; any emoji under the byte clamp is accepted.
|
|
117
|
+
*/
|
|
118
|
+
export class ReactionEmojiTooLong extends InvalidRequestError {
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* `mention_not_member` — a `mentions` entry named a user id that is not a
|
|
122
|
+
* member of the target chat. Deliberately indistinguishable from a
|
|
123
|
+
* nonexistent user id (AMENDMENT-04 A-4, R-8): both answer with this same
|
|
124
|
+
* code, so the response can never be used as an existence oracle for a
|
|
125
|
+
* user id the caller does not already know is valid.
|
|
126
|
+
*/
|
|
127
|
+
export class MentionNotMember extends InvalidRequestError {
|
|
128
|
+
}
|
|
129
|
+
/** `mention_token_missing` — a `mentions` entry's `@handle` never appeared in `text`. */
|
|
130
|
+
export class MentionTokenMissing extends InvalidRequestError {
|
|
131
|
+
}
|
|
112
132
|
export class BotSuspended extends PermissionDeniedError {
|
|
113
133
|
}
|
|
114
134
|
export class BotPlaygroundOnly extends PermissionDeniedError {
|
|
115
135
|
}
|
|
136
|
+
/** `message_not_yours` — 403, `edit()`/`delete()` only work on the bot's own messages. */
|
|
137
|
+
export class MessageNotYours extends PermissionDeniedError {
|
|
138
|
+
}
|
|
116
139
|
export class RateLimited extends RateLimitError {
|
|
117
140
|
}
|
|
118
141
|
export class PairRateLimited extends RateLimitError {
|
|
@@ -168,6 +191,10 @@ export const CODE_CLASSES = {
|
|
|
168
191
|
unknown_operation: UnknownOperation,
|
|
169
192
|
ack_unknown_event: AckUnknownEvent,
|
|
170
193
|
too_many_problems: TooManyProblems,
|
|
194
|
+
reaction_emoji_too_long: ReactionEmojiTooLong,
|
|
195
|
+
mention_not_member: MentionNotMember,
|
|
196
|
+
mention_token_missing: MentionTokenMissing,
|
|
197
|
+
message_not_yours: MessageNotYours,
|
|
171
198
|
};
|
|
172
199
|
function asString(value) {
|
|
173
200
|
return typeof value === 'string' ? value : null;
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,2CAA2C;AAC3C,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC;IAC9B,CAAC;CACF;AAED,4EAA4E;AAC5E,MAAM,OAAO,cAAe,SAAQ,YAAY;CAAG;AAEnD,4EAA4E;AAC5E,MAAM,OAAO,aAAc,SAAQ,YAAY;CAAG;AAYlD,2EAA2E;AAC3E,MAAM,OAAO,eAAgB,SAAQ,YAAY;IACtC,IAAI,CAAS;IACb,IAAI,CAAS;IACb,OAAO,CAAS;IAChB,UAAU,CAAgB;IAC1B,WAAW,CAAgB;IAC3B,MAAM,CAAgB;IAE/B,YAAY,IAAyB;QACnC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC;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