@helyx/bot 0.4.28 → 0.4.30
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/CHANGELOG.md +20 -0
- package/dist/control-server.js +2 -1
- package/dist/dashboard-category.d.ts +3 -0
- package/dist/dashboard-category.js +14 -0
- package/dist/numeric-write-behind-redis.js +3 -2
- package/dist/shard-router.js +6 -1
- package/dist/supervisor-cloud-directory.d.ts +1 -1
- package/package.json +70 -70
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.30
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Stabilize Redis write-behind barrier lease timestamps.
|
|
8
|
+
|
|
9
|
+
## 0.4.29
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Harden dashboard authentication, privacy execution, control routing, database transactions, and self-host configuration.
|
|
14
|
+
|
|
15
|
+
Add bounded multi-value record reads and use them to batch Polls and Reaction Roles dashboard queries. Improve dashboard presentation, Forms workflows, release safety, and operational tooling across hosted and self-hosted deployments.
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @helyx/control-protocol@0.4.0
|
|
19
|
+
- @helyx/database@0.8.0
|
|
20
|
+
- @helyx/sdk@0.7.0
|
|
21
|
+
- @helyx/platform@0.5.0
|
|
22
|
+
|
|
3
23
|
## 0.4.28
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/control-server.js
CHANGED
|
@@ -8,6 +8,7 @@ import { createHash, timingSafeEqual } from "node:crypto";
|
|
|
8
8
|
import { z, ZodError } from "zod";
|
|
9
9
|
import { addChannelMessageReaction as addDiscordChannelMessageReaction, deleteChannelMessage as deleteDiscordChannelMessage, editChannelMessage as editDiscordChannelMessage, normalizeDiscordPermission, sendToChannel as sendDiscordMessageToChannel, } from "./interactions.js";
|
|
10
10
|
import { SHARD_HEALTH_STALE_MS, } from "./shard-contracts.js";
|
|
11
|
+
import { dashboardCategoryLabel } from "./dashboard-category.js";
|
|
11
12
|
const snowflake = z.string().regex(/^\d{17,20}$/u);
|
|
12
13
|
const moduleId = z.string().regex(/^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)+$/u);
|
|
13
14
|
const MAX_DISCORD_SETTING_SELECTIONS = 25;
|
|
@@ -1825,7 +1826,7 @@ function mapDashboardModule(module) {
|
|
|
1825
1826
|
name: module.manifest.name,
|
|
1826
1827
|
version: module.manifest.version,
|
|
1827
1828
|
summary: module.manifest.description,
|
|
1828
|
-
category:
|
|
1829
|
+
category: dashboardCategoryLabel(dashboard.category),
|
|
1829
1830
|
icon: dashboard.icon,
|
|
1830
1831
|
availability: "available",
|
|
1831
1832
|
releaseStatus: module.manifest.releaseStatus,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const categoryLabels = {
|
|
2
|
+
community: "Community",
|
|
3
|
+
safety: "Safety",
|
|
4
|
+
support: "Support & Staff",
|
|
5
|
+
automation: "Automation",
|
|
6
|
+
engagement: "Engagement",
|
|
7
|
+
gaming: "Gaming",
|
|
8
|
+
insights: "Insights",
|
|
9
|
+
integrations: "Integrations",
|
|
10
|
+
};
|
|
11
|
+
export function dashboardCategoryLabel(category) {
|
|
12
|
+
return categoryLabels[category];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=dashboard-category.js.map
|
|
@@ -508,6 +508,7 @@ export class RedisNumericWriteBehindService {
|
|
|
508
508
|
async #acquireBarrier(scope, kind, guildId, subjectId) {
|
|
509
509
|
this.#assertAvailable(scope);
|
|
510
510
|
const barrierId = randomUUID();
|
|
511
|
+
const now = Date.now();
|
|
511
512
|
const result = await this.#redis.eval(ACQUIRE_BARRIER_SCRIPT, {
|
|
512
513
|
keys: keysFor(this.#prefix, scope),
|
|
513
514
|
arguments: [
|
|
@@ -515,8 +516,8 @@ export class RedisNumericWriteBehindService {
|
|
|
515
516
|
guildId,
|
|
516
517
|
subjectId,
|
|
517
518
|
barrierId,
|
|
518
|
-
String(
|
|
519
|
-
String(
|
|
519
|
+
String(now),
|
|
520
|
+
String(now + this.#barrierLeaseMs),
|
|
520
521
|
],
|
|
521
522
|
});
|
|
522
523
|
if (Number(result) === 2)
|
package/dist/shard-router.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { BotControlTransportError, } from "./control-server.js";
|
|
3
3
|
import { SHARD_CONTROL_TIMEOUT_MS, controlOperationGuildId, guildIdToShardId, shardControlOperationSchema, shardControlResponseSchema, } from "./shard-contracts.js";
|
|
4
|
-
|
|
4
|
+
// Cross-region/public Redis connections used by local staging routinely take
|
|
5
|
+
// just under one second. Privacy operations validate the leader lease several
|
|
6
|
+
// times in succession (provider discovery plus execution), so a one-second
|
|
7
|
+
// deadline turned healthy leases into deterministic 503s. Keep the check
|
|
8
|
+
// bounded while allowing normal network variance.
|
|
9
|
+
const LEASE_VALIDATION_TIMEOUT_MS = 3_000;
|
|
5
10
|
export class ShardControlRouter {
|
|
6
11
|
input;
|
|
7
12
|
constructor(input) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DatabasePool } from "@helyx/database";
|
|
2
2
|
import type { CloudDiscordDirectory, CloudDiscordSnapshot } from "./cloud-connector.js";
|
|
3
|
-
export declare const CLOUD_HELLO_GUILD_LIMIT =
|
|
3
|
+
export declare const CLOUD_HELLO_GUILD_LIMIT = 1000;
|
|
4
4
|
export declare class SupervisorCloudDiscordDirectory implements CloudDiscordDirectory {
|
|
5
5
|
#private;
|
|
6
6
|
private readonly database;
|
package/package.json
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@helyx/bot",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "Production Discord runtime for the modular Helyx platform.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"helyx",
|
|
7
|
-
"discord",
|
|
8
|
-
"bot",
|
|
9
|
-
"modular"
|
|
10
|
-
],
|
|
11
|
-
"private": false,
|
|
12
|
-
"license": "HSAL 1.0",
|
|
13
|
-
"homepage": "https://helyx.gg/",
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/ZyC0R3/Helyx/issues"
|
|
16
|
-
},
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/ZyC0R3/Helyx.git",
|
|
20
|
-
"directory": "apps/bot"
|
|
21
|
-
},
|
|
22
|
-
"engines": {
|
|
23
|
-
"node": ">=24 <27",
|
|
24
|
-
"npm": ">=11"
|
|
25
|
-
},
|
|
26
|
-
"publishConfig": {
|
|
27
|
-
"access": "public",
|
|
28
|
-
"provenance": true
|
|
29
|
-
},
|
|
30
|
-
"type": "module",
|
|
31
|
-
"files": [
|
|
32
|
-
"dist",
|
|
33
|
-
"!dist/*.tsbuildinfo",
|
|
34
|
-
"!dist/**/*.map",
|
|
35
|
-
"CHANGELOG.md",
|
|
36
|
-
"README.md",
|
|
37
|
-
"LICENSE"
|
|
38
|
-
],
|
|
39
|
-
"exports": {
|
|
40
|
-
".": {
|
|
41
|
-
"types": "./dist/index.d.ts",
|
|
42
|
-
"default": "./dist/index.js"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"scripts": {
|
|
46
|
-
"build": "tsc -b",
|
|
47
|
-
"dev": "node --env-file-if-exists=../../.env --import tsx src/index.ts",
|
|
48
|
-
"start": "node --env-file-if-exists=../../.env dist/index.js"
|
|
49
|
-
},
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"@helyx/config": ">=0.5.0 <0.6.0",
|
|
52
|
-
"@helyx/control-protocol": ">=0.
|
|
53
|
-
"@helyx/core": ">=0.1.0 <0.2.0",
|
|
54
|
-
"@helyx/database": ">=0.
|
|
55
|
-
"@helyx/framework": ">=0.1.0 <0.2.0",
|
|
56
|
-
"@helyx/module-manifest": ">=0.6.0 <0.7.0",
|
|
57
|
-
"@helyx/platform": ">=0.
|
|
58
|
-
"@helyx/sdk": ">=0.
|
|
59
|
-
"@helyx/verification-contracts": ">=0.3.0 <0.4.0",
|
|
60
|
-
"discord.js": "14.27.0",
|
|
61
|
-
"fastify": "5.10.0",
|
|
62
|
-
"pino": "10.3.1",
|
|
63
|
-
"redis": "6.1.0",
|
|
64
|
-
"ws": "8.21.1",
|
|
65
|
-
"zod": "4.4.3"
|
|
66
|
-
},
|
|
67
|
-
"devDependencies": {
|
|
68
|
-
"@types/ws": "8.18.1"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@helyx/bot",
|
|
3
|
+
"version": "0.4.30",
|
|
4
|
+
"description": "Production Discord runtime for the modular Helyx platform.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"helyx",
|
|
7
|
+
"discord",
|
|
8
|
+
"bot",
|
|
9
|
+
"modular"
|
|
10
|
+
],
|
|
11
|
+
"private": false,
|
|
12
|
+
"license": "HSAL 1.0",
|
|
13
|
+
"homepage": "https://helyx.gg/",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/ZyC0R3/Helyx/issues"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/ZyC0R3/Helyx.git",
|
|
20
|
+
"directory": "apps/bot"
|
|
21
|
+
},
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=24 <27",
|
|
24
|
+
"npm": ">=11"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public",
|
|
28
|
+
"provenance": true
|
|
29
|
+
},
|
|
30
|
+
"type": "module",
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"!dist/*.tsbuildinfo",
|
|
34
|
+
"!dist/**/*.map",
|
|
35
|
+
"CHANGELOG.md",
|
|
36
|
+
"README.md",
|
|
37
|
+
"LICENSE"
|
|
38
|
+
],
|
|
39
|
+
"exports": {
|
|
40
|
+
".": {
|
|
41
|
+
"types": "./dist/index.d.ts",
|
|
42
|
+
"default": "./dist/index.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsc -b",
|
|
47
|
+
"dev": "node --env-file-if-exists=../../.env --import tsx src/index.ts",
|
|
48
|
+
"start": "node --env-file-if-exists=../../.env dist/index.js"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@helyx/config": ">=0.5.0 <0.6.0",
|
|
52
|
+
"@helyx/control-protocol": ">=0.4.0 <0.5.0",
|
|
53
|
+
"@helyx/core": ">=0.1.0 <0.2.0",
|
|
54
|
+
"@helyx/database": ">=0.8.0 <0.9.0",
|
|
55
|
+
"@helyx/framework": ">=0.1.0 <0.2.0",
|
|
56
|
+
"@helyx/module-manifest": ">=0.6.0 <0.7.0",
|
|
57
|
+
"@helyx/platform": ">=0.5.0 <0.6.0",
|
|
58
|
+
"@helyx/sdk": ">=0.7.0 <0.8.0",
|
|
59
|
+
"@helyx/verification-contracts": ">=0.3.0 <0.4.0",
|
|
60
|
+
"discord.js": "14.27.0",
|
|
61
|
+
"fastify": "5.10.0",
|
|
62
|
+
"pino": "10.3.1",
|
|
63
|
+
"redis": "6.1.0",
|
|
64
|
+
"ws": "8.21.1",
|
|
65
|
+
"zod": "4.4.3"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@types/ws": "8.18.1"
|
|
69
|
+
}
|
|
70
|
+
}
|