@helyx/bot 1.5.3 → 1.6.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/CHANGELOG.md +24 -0
- package/README.md +5 -2
- package/command-root-catalogue.json +10 -2
- package/dist/command-registration-policy.js +1 -0
- package/dist/developer-operations-module.js +0 -55
- package/dist/diagnostic-command.js +1 -0
- package/dist/discord-guild-health.js +1 -0
- package/dist/index.js +4 -0
- package/dist/process-info-module.d.ts +3 -0
- package/dist/process-info-module.js +97 -0
- package/dist/shard-supervisor.js +4 -0
- package/dist/shard-worker.js +4 -0
- package/documentation/examples/.env.example +29 -130
- package/documentation/reference/environment.md +7 -6
- package/documentation/runbooks/installation-and-upgrades.md +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add public `/proc` process information for hosted and self-hosted bots, replacing
|
|
8
|
+
the private `/dev proc` path. Keep the reply private and independent of database
|
|
9
|
+
availability.
|
|
10
|
+
|
|
11
|
+
Add a PebbleHost starter profile with direct Node CLI scripts, flat starter ZIPs,
|
|
12
|
+
compact quoted environment examples and matching guided environment builder
|
|
13
|
+
output. Preserve existing custom settings and encryption keys when rebuilding
|
|
14
|
+
an environment file, and recognize quoted placeholders during setup.
|
|
15
|
+
|
|
16
|
+
## 1.5.4
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Remove unused internal development, status reporting, OAuth, private control,
|
|
21
|
+
advanced Cloud Connect and Auto Moderation tuning examples from the self-host
|
|
22
|
+
environment template and portable documentation. The environment builder also
|
|
23
|
+
omits these examples from older templates while preserving existing active
|
|
24
|
+
custom settings. Keep Discord intent settings, basic Cloud Connect and data
|
|
25
|
+
encryption configuration; runtime defaults and scanning behavior are unchanged.
|
|
26
|
+
|
|
3
27
|
## 1.5.3
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -164,8 +164,11 @@ paths are read-only:
|
|
|
164
164
|
|
|
165
165
|
- `/dev shards` reports bounded shard health, including the unsharded
|
|
166
166
|
compatibility baseline;
|
|
167
|
-
- `/dev bot` reports the bot build and bounded installed-module versions
|
|
168
|
-
|
|
167
|
+
- `/dev bot` reports the bot build and bounded installed-module versions.
|
|
168
|
+
|
|
169
|
+
The public `/proc` command reports the same safe process metrics on hosted and
|
|
170
|
+
self-hosted bots, in a server or bot DM. Anyone can run it; replies are ephemeral.
|
|
171
|
+
It works independently of database and module enablement checks.
|
|
169
172
|
|
|
170
173
|
On the official hosted bot only,
|
|
171
174
|
`HELYX_HOSTED_MODERATION_ENABLED=true` adds `/dev leave` and `/dev blacklist`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"revision":
|
|
3
|
+
"revision": 3,
|
|
4
4
|
"roots": [
|
|
5
5
|
{ "name": "access", "type": 1, "ownerModuleId": "helyx.account-gate" },
|
|
6
6
|
{ "name": "access", "type": 1, "ownerModuleId": "helyx.verification" },
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
{ "name": "mod", "type": 1, "ownerModuleId": "helyx.moderation" },
|
|
27
27
|
{ "name": "nexus", "type": 1, "ownerModuleId": "helyx.nexus-core" },
|
|
28
28
|
{ "name": "poll", "type": 1, "ownerModuleId": "helyx.polls" },
|
|
29
|
+
{ "name": "proc", "type": 1, "ownerModuleId": "helyx.process-info" },
|
|
29
30
|
{ "name": "profile", "type": 1, "ownerModuleId": "helyx.achievements" },
|
|
30
31
|
{ "name": "profile", "type": 1, "ownerModuleId": "helyx.levels" },
|
|
31
32
|
{ "name": "submit", "type": 1, "ownerModuleId": "helyx.feedback" },
|
|
@@ -96,6 +97,13 @@
|
|
|
96
97
|
"sourcePath": "apps/bot/src/privacy-module.ts",
|
|
97
98
|
"version": "0.1.0"
|
|
98
99
|
},
|
|
100
|
+
{
|
|
101
|
+
"commands": ["proc"],
|
|
102
|
+
"moduleId": "helyx.process-info",
|
|
103
|
+
"releaseStatus": "live",
|
|
104
|
+
"sourcePath": "apps/bot/src/process-info-module.ts",
|
|
105
|
+
"version": "0.1.0"
|
|
106
|
+
},
|
|
99
107
|
{
|
|
100
108
|
"commands": ["helyx.bug"],
|
|
101
109
|
"moduleId": "helyx.support",
|
|
@@ -448,5 +456,5 @@
|
|
|
448
456
|
}
|
|
449
457
|
]
|
|
450
458
|
},
|
|
451
|
-
"fingerprint": "
|
|
459
|
+
"fingerprint": "70fb5cb9554c8fdb723ff8139a9e1b0ae2128d256b12a6146d5674c63774c42a"
|
|
452
460
|
}
|
|
@@ -27,7 +27,6 @@ export function createDeveloperOperationsModule(input) {
|
|
|
27
27
|
"dev.shards",
|
|
28
28
|
"dev.bot",
|
|
29
29
|
"dev.modules",
|
|
30
|
-
"dev.proc",
|
|
31
30
|
"dev.trivia-data",
|
|
32
31
|
"dev.leave",
|
|
33
32
|
"dev.blacklist",
|
|
@@ -166,41 +165,6 @@ export function createDeveloperOperationsModule(input) {
|
|
|
166
165
|
});
|
|
167
166
|
},
|
|
168
167
|
},
|
|
169
|
-
{
|
|
170
|
-
name: "proc",
|
|
171
|
-
permissionId: "dev.proc",
|
|
172
|
-
description: "Show safe process resource and uptime information",
|
|
173
|
-
acknowledgement: "immediate-response",
|
|
174
|
-
authorization: "self-authorized",
|
|
175
|
-
async execute(context) {
|
|
176
|
-
if (!(await authorizeDeveloperCommand(context)))
|
|
177
|
-
return;
|
|
178
|
-
const memory = process.memoryUsage();
|
|
179
|
-
const cpu = process.cpuUsage();
|
|
180
|
-
await context.reply({
|
|
181
|
-
ephemeral: true,
|
|
182
|
-
componentsV2: {
|
|
183
|
-
accentColor: 0x2563eb,
|
|
184
|
-
text: [
|
|
185
|
-
{
|
|
186
|
-
content: [
|
|
187
|
-
"## Process information",
|
|
188
|
-
`Runtime: ${input.processLabel}`,
|
|
189
|
-
`Uptime: ${formatDuration(process.uptime())}`,
|
|
190
|
-
`RSS memory: ${formatBytes(memory.rss)}`,
|
|
191
|
-
`Heap: ${formatBytes(memory.heapUsed)} used / ${formatBytes(memory.heapTotal)} allocated`,
|
|
192
|
-
`External memory: ${formatBytes(memory.external)}`,
|
|
193
|
-
`CPU time: ${formatCpu(cpu.user)} user / ${formatCpu(cpu.system)} system`,
|
|
194
|
-
`Node: ${safeInlineCode(process.version)}`,
|
|
195
|
-
`Platform: ${safeInlineCode(`${process.platform}/${process.arch}`)}`,
|
|
196
|
-
`PID: ${process.pid}`,
|
|
197
|
-
].join("\n"),
|
|
198
|
-
},
|
|
199
|
-
],
|
|
200
|
-
},
|
|
201
|
-
});
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
168
|
{
|
|
205
169
|
name: "trivia-data",
|
|
206
170
|
permissionId: "dev.trivia-data",
|
|
@@ -411,25 +375,6 @@ function categoryLabel(category) {
|
|
|
411
375
|
.join(" ")
|
|
412
376
|
.replace("And", "and");
|
|
413
377
|
}
|
|
414
|
-
function formatBytes(value) {
|
|
415
|
-
return `${(value / (1024 * 1024)).toFixed(1)} MiB`;
|
|
416
|
-
}
|
|
417
|
-
function formatCpu(microseconds) {
|
|
418
|
-
return `${(microseconds / 1_000_000).toFixed(2)}s`;
|
|
419
|
-
}
|
|
420
|
-
function formatDuration(seconds) {
|
|
421
|
-
const total = Math.max(0, Math.floor(seconds));
|
|
422
|
-
const days = Math.floor(total / 86_400);
|
|
423
|
-
const hours = Math.floor((total % 86_400) / 3_600);
|
|
424
|
-
const minutes = Math.floor((total % 3_600) / 60);
|
|
425
|
-
const remainder = total % 60;
|
|
426
|
-
return [
|
|
427
|
-
...(days > 0 ? [`${days}d`] : []),
|
|
428
|
-
...(days > 0 || hours > 0 ? [`${hours}h`] : []),
|
|
429
|
-
`${minutes}m`,
|
|
430
|
-
`${remainder}s`,
|
|
431
|
-
].join(" ");
|
|
432
|
-
}
|
|
433
378
|
export class WorkerShardHealthProvider {
|
|
434
379
|
#pending = new Map();
|
|
435
380
|
getHealth() {
|
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ import { shardHealthSnapshotSchema, } from "./shard-contracts.js";
|
|
|
35
35
|
import { createSupportModule } from "./support-module.js";
|
|
36
36
|
import { createOAuthModule } from "./oauth-module.js";
|
|
37
37
|
import { createPrivacyModule } from "./privacy-module.js";
|
|
38
|
+
import { createProcessInfoModule } from "./process-info-module.js";
|
|
38
39
|
import { installModerationPlatformServices } from "./moderation-platform-services.js";
|
|
39
40
|
import { EckoEvidenceReceiver } from "./ecko-evidence-receiver.js";
|
|
40
41
|
import { EckoTransportAuthenticator } from "./ecko-transport-auth.js";
|
|
@@ -361,6 +362,7 @@ async function startUnshardedBot(processEnvironment) {
|
|
|
361
362
|
: undefined;
|
|
362
363
|
const supportModule = createSupportModule(cloudConnector);
|
|
363
364
|
const privacyModule = createPrivacyModule();
|
|
365
|
+
const processInfoModule = createProcessInfoModule("unsharded bot process");
|
|
364
366
|
const premiumEnvironment = requirePremiumProviderEnvironment(featureModules, environment.STRIPE_ENVIRONMENT);
|
|
365
367
|
const premiumActivationModule = !premiumEnvironment || !database
|
|
366
368
|
? undefined
|
|
@@ -380,6 +382,7 @@ async function startUnshardedBot(processEnvironment) {
|
|
|
380
382
|
permissionsModule,
|
|
381
383
|
supportModule,
|
|
382
384
|
privacyModule,
|
|
385
|
+
processInfoModule,
|
|
383
386
|
...(premiumActivationModule ? [premiumActivationModule] : []),
|
|
384
387
|
...(oauthModule ? [oauthModule] : []),
|
|
385
388
|
...(cloudManagementModule ? [cloudManagementModule] : []),
|
|
@@ -458,6 +461,7 @@ async function startUnshardedBot(processEnvironment) {
|
|
|
458
461
|
permissionsModule,
|
|
459
462
|
supportModule,
|
|
460
463
|
privacyModule,
|
|
464
|
+
processInfoModule,
|
|
461
465
|
...(premiumActivationModule ? [premiumActivationModule] : []),
|
|
462
466
|
...(oauthModule ? [oauthModule] : []),
|
|
463
467
|
...(cloudManagementModule ? [cloudManagementModule] : []),
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { defineModule } from "@helyx/sdk";
|
|
2
|
+
import { INTERNAL_MODULE_MANIFEST_FIELDS } from "./internal-module-manifest.js";
|
|
3
|
+
const everyonePolicy = {
|
|
4
|
+
everyone: true,
|
|
5
|
+
requiredPermissions: [],
|
|
6
|
+
allowedRoleIds: [],
|
|
7
|
+
deniedRoleIds: [],
|
|
8
|
+
allowedUserIds: [],
|
|
9
|
+
deniedUserIds: [],
|
|
10
|
+
};
|
|
11
|
+
/** Local process metrics remain available without database or installation checks. */
|
|
12
|
+
export function createProcessInfoModule(processLabel) {
|
|
13
|
+
return defineModule({
|
|
14
|
+
manifest: {
|
|
15
|
+
...INTERNAL_MODULE_MANIFEST_FIELDS,
|
|
16
|
+
releaseStatus: "live",
|
|
17
|
+
id: "helyx.process-info",
|
|
18
|
+
name: "Helyx Process Information",
|
|
19
|
+
version: "0.1.0",
|
|
20
|
+
description: "Reports safe resource and uptime information for the running bot.",
|
|
21
|
+
entry: "./dist/process-info-module.js",
|
|
22
|
+
framework: "^0.1.0",
|
|
23
|
+
dependencies: [],
|
|
24
|
+
permissions: [],
|
|
25
|
+
contributions: { commands: ["proc"], events: [] },
|
|
26
|
+
},
|
|
27
|
+
defaultPermissions: {
|
|
28
|
+
module: everyonePolicy,
|
|
29
|
+
commands: { proc: everyonePolicy },
|
|
30
|
+
},
|
|
31
|
+
interactions: {
|
|
32
|
+
commands: [
|
|
33
|
+
{
|
|
34
|
+
name: "proc",
|
|
35
|
+
permissionId: "proc",
|
|
36
|
+
description: "Show safe process resource and uptime information",
|
|
37
|
+
acknowledgement: "immediate-response",
|
|
38
|
+
registrationPolicy: "platform-global",
|
|
39
|
+
contexts: ["guild", "bot_dm"],
|
|
40
|
+
integrationTypes: ["guild_install"],
|
|
41
|
+
authorization: "public",
|
|
42
|
+
async execute(context) {
|
|
43
|
+
const memory = process.memoryUsage();
|
|
44
|
+
const cpu = process.cpuUsage();
|
|
45
|
+
await context.reply({
|
|
46
|
+
ephemeral: true,
|
|
47
|
+
componentsV2: {
|
|
48
|
+
accentColor: 0x2563eb,
|
|
49
|
+
text: [
|
|
50
|
+
{
|
|
51
|
+
content: [
|
|
52
|
+
"## Process information",
|
|
53
|
+
`Runtime: ${processLabel}`,
|
|
54
|
+
`Uptime: ${formatDuration(process.uptime())}`,
|
|
55
|
+
`RSS memory: ${formatBytes(memory.rss)}`,
|
|
56
|
+
`Heap: ${formatBytes(memory.heapUsed)} used / ${formatBytes(memory.heapTotal)} allocated`,
|
|
57
|
+
`External memory: ${formatBytes(memory.external)}`,
|
|
58
|
+
`CPU time: ${formatCpu(cpu.user)} user / ${formatCpu(cpu.system)} system`,
|
|
59
|
+
`Node: ${safeInlineCode(process.version)}`,
|
|
60
|
+
`Platform: ${safeInlineCode(`${process.platform}/${process.arch}`)}`,
|
|
61
|
+
`PID: ${process.pid}`,
|
|
62
|
+
].join("\n"),
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
start: () => Promise.resolve(),
|
|
72
|
+
stop: () => Promise.resolve(),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function safeInlineCode(value) {
|
|
76
|
+
return `\`${value.replaceAll("`", "'").slice(0, 120)}\``;
|
|
77
|
+
}
|
|
78
|
+
function formatBytes(value) {
|
|
79
|
+
return `${(value / (1024 * 1024)).toFixed(1)} MiB`;
|
|
80
|
+
}
|
|
81
|
+
function formatCpu(microseconds) {
|
|
82
|
+
return `${(microseconds / 1_000_000).toFixed(2)}s`;
|
|
83
|
+
}
|
|
84
|
+
function formatDuration(seconds) {
|
|
85
|
+
const total = Math.max(0, Math.floor(seconds));
|
|
86
|
+
const days = Math.floor(total / 86_400);
|
|
87
|
+
const hours = Math.floor((total % 86_400) / 3_600);
|
|
88
|
+
const minutes = Math.floor((total % 3_600) / 60);
|
|
89
|
+
const remainder = total % 60;
|
|
90
|
+
return [
|
|
91
|
+
...(days > 0 ? [`${days}d`] : []),
|
|
92
|
+
...(days > 0 || hours > 0 ? [`${hours}h`] : []),
|
|
93
|
+
`${minutes}m`,
|
|
94
|
+
`${remainder}s`,
|
|
95
|
+
].join(" ");
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=process-info-module.js.map
|
package/dist/shard-supervisor.js
CHANGED
|
@@ -36,6 +36,7 @@ import { SupervisorCloudDiscordDirectory } from "./supervisor-cloud-directory.js
|
|
|
36
36
|
import { createSupportModule } from "./support-module.js";
|
|
37
37
|
import { createOAuthModule } from "./oauth-module.js";
|
|
38
38
|
import { createPrivacyModule } from "./privacy-module.js";
|
|
39
|
+
import { createProcessInfoModule } from "./process-info-module.js";
|
|
39
40
|
import { REVIEWED_PREMIUM_MODULE_IDS } from "@helyx/module-manifest";
|
|
40
41
|
import { createPremiumActivationModule } from "./premium-activation-module.js";
|
|
41
42
|
import { DiscordPremiumGuildAuthority } from "./premium-guild-authority.js";
|
|
@@ -248,6 +249,7 @@ export async function startShardSupervisor(environment, processEnvironment, work
|
|
|
248
249
|
: undefined;
|
|
249
250
|
const supportModule = createSupportModule(cloudConnector);
|
|
250
251
|
const privacyModule = createPrivacyModule();
|
|
252
|
+
const processInfoModule = createProcessInfoModule("shard supervisor");
|
|
251
253
|
const premiumEnvironment = requirePremiumProviderEnvironment(featureModules, environment.STRIPE_ENVIRONMENT);
|
|
252
254
|
const premiumActivationModule = !premiumEnvironment
|
|
253
255
|
? undefined
|
|
@@ -267,6 +269,7 @@ export async function startShardSupervisor(environment, processEnvironment, work
|
|
|
267
269
|
permissionsModule,
|
|
268
270
|
supportModule,
|
|
269
271
|
privacyModule,
|
|
272
|
+
processInfoModule,
|
|
270
273
|
...(premiumActivationModule ? [premiumActivationModule] : []),
|
|
271
274
|
...(oauthModule ? [oauthModule] : []),
|
|
272
275
|
...(cloudManagementModule ? [cloudManagementModule] : []),
|
|
@@ -291,6 +294,7 @@ export async function startShardSupervisor(environment, processEnvironment, work
|
|
|
291
294
|
permissionsModule,
|
|
292
295
|
supportModule,
|
|
293
296
|
privacyModule,
|
|
297
|
+
processInfoModule,
|
|
294
298
|
...(premiumActivationModule ? [premiumActivationModule] : []),
|
|
295
299
|
...(oauthModule ? [oauthModule] : []),
|
|
296
300
|
...(cloudManagementModule ? [cloudManagementModule] : []),
|
package/dist/shard-worker.js
CHANGED
|
@@ -44,6 +44,7 @@ import { HostedBotInviteGateClient, HostedServerLeaveWorker, HostedServerModerat
|
|
|
44
44
|
import { createSupportModule } from "./support-module.js";
|
|
45
45
|
import { createOAuthModule } from "./oauth-module.js";
|
|
46
46
|
import { createPrivacyModule } from "./privacy-module.js";
|
|
47
|
+
import { createProcessInfoModule } from "./process-info-module.js";
|
|
47
48
|
import { HttpOAuthService } from "./oauth-service.js";
|
|
48
49
|
import { createLocalScheduledTaskRoute, } from "./scheduled-task-runner.js";
|
|
49
50
|
import { createLocalNumericWriteBehind } from "./numeric-write-behind.js";
|
|
@@ -202,6 +203,7 @@ export async function startShardWorker(processEnvironment = process.env, identit
|
|
|
202
203
|
: undefined;
|
|
203
204
|
const supportModule = createSupportModule(cloudProxy);
|
|
204
205
|
const privacyModule = createPrivacyModule();
|
|
206
|
+
const processInfoModule = createProcessInfoModule(`shard worker ${identity.shardId}`);
|
|
205
207
|
const premiumEnvironment = requirePremiumProviderEnvironment(featureModules, environment.STRIPE_ENVIRONMENT);
|
|
206
208
|
const premiumActivationModule = !premiumEnvironment
|
|
207
209
|
? undefined
|
|
@@ -221,6 +223,7 @@ export async function startShardWorker(processEnvironment = process.env, identit
|
|
|
221
223
|
permissionsModule,
|
|
222
224
|
supportModule,
|
|
223
225
|
privacyModule,
|
|
226
|
+
processInfoModule,
|
|
224
227
|
...(premiumActivationModule ? [premiumActivationModule] : []),
|
|
225
228
|
...(oauthModule ? [oauthModule] : []),
|
|
226
229
|
...(cloudManagementModule ? [cloudManagementModule] : []),
|
|
@@ -244,6 +247,7 @@ export async function startShardWorker(processEnvironment = process.env, identit
|
|
|
244
247
|
permissionsModule,
|
|
245
248
|
supportModule,
|
|
246
249
|
privacyModule,
|
|
250
|
+
processInfoModule,
|
|
247
251
|
...(premiumActivationModule ? [premiumActivationModule] : []),
|
|
248
252
|
...(oauthModule ? [oauthModule] : []),
|
|
249
253
|
...(cloudManagementModule ? [cloudManagementModule] : []),
|
|
@@ -1,134 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Helyx self-hosted environment
|
|
2
|
+
# Keep this file private. Retain the encryption key when updating.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
# Runtime
|
|
5
|
+
HELYX_RUNTIME_PROFILE='self-hosted'
|
|
6
|
+
HELYX_DEPLOYMENT_ENVIRONMENT='self-hosted'
|
|
7
|
+
NODE_ENV='production'
|
|
5
8
|
|
|
6
9
|
# Discord
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
HELYX_MESSAGE_CONTENT_ENABLED=false
|
|
12
|
-
# Enhanced Auto Moderation stays inside this bot process. One worker is the
|
|
13
|
-
# recommended default (range 1-4); increase only after measuring CPU and memory.
|
|
14
|
-
# Hosted scanning uses the separate Helyx Ecko service, not these settings.
|
|
15
|
-
HELYX_AUTOMOD_EMBEDDED_WORKERS=1
|
|
16
|
-
# Optional conservative queue overrides (hard ceilings: 5000 items, 64 MiB,
|
|
17
|
-
# 100 items per server). Defaults are used when these remain commented.
|
|
18
|
-
# HELYX_AUTOMOD_EMBEDDED_QUEUE_ITEMS=5000
|
|
19
|
-
# HELYX_AUTOMOD_EMBEDDED_QUEUE_BYTES=67108864
|
|
20
|
-
# HELYX_AUTOMOD_EMBEDDED_QUEUE_ITEMS_PER_GUILD=100
|
|
21
|
-
# HELYX_AUTOMOD_EMBEDDED_REFRESH_SECONDS=300
|
|
22
|
-
# Enable for loaded member workflows such as Welcome, Access Control or Levels,
|
|
23
|
-
# with Server Members Intent also enabled in the Discord developer portal.
|
|
24
|
-
HELYX_GUILD_MEMBERS_ENABLED=false
|
|
25
|
-
# Database
|
|
26
|
-
# Docker: keep the URL. Direct Node.js/managed hosting: use your provider URL.
|
|
27
|
-
DATABASE_ENGINE=postgresql
|
|
28
|
-
DATABASE_URL=postgresql://database:5432/helyx
|
|
29
|
-
DATABASE_SSL=disable
|
|
30
|
-
# Self-host startup applies pending migrations automatically (the default).
|
|
31
|
-
# Hosted-only inspect mode is not a self-host setting; leave this commented.
|
|
32
|
-
# HELYX_DATABASE_STARTUP_MODE=apply
|
|
33
|
-
# Match your provider: disable=no TLS; require=TLS without certificate
|
|
34
|
-
# verification; verify-full=TLS with certificate verification.
|
|
35
|
-
|
|
36
|
-
# Included Docker database — both password values must match.
|
|
37
|
-
PGUSER=helyx
|
|
38
|
-
PGPASSWORD=replace-with-a-strong-password
|
|
39
|
-
POSTGRES_DB=helyx
|
|
40
|
-
POSTGRES_USER=helyx
|
|
41
|
-
POSTGRES_PASSWORD=replace-with-a-strong-password
|
|
42
|
-
|
|
43
|
-
# OPTIONAL EVERYDAY SETTINGS
|
|
44
|
-
|
|
45
|
-
# Ready for dashboard linking, but remains unpaired until you use a one-use code.
|
|
46
|
-
HELYX_CLOUD_CONNECT_ENABLED=true
|
|
47
|
-
# Public dashboard origin used in bot-generated report links.
|
|
48
|
-
# HELYX_DASHBOARD_PUBLIC_URL=https://app.helyx.gg
|
|
49
|
-
# HELYX_OWNER_USER_IDS=12345678901234567
|
|
50
|
-
|
|
51
|
-
# trace, debug, info, warn, error, fatal or silent
|
|
52
|
-
LOG_LEVEL=info
|
|
53
|
-
|
|
54
|
-
# Guild-scoped development commands only
|
|
55
|
-
# DISCORD_INTERNAL_GUILD_ID=12345678901234567
|
|
56
|
-
# APPROVED_ROLES=12345678901234567,12345678901234568
|
|
57
|
-
|
|
58
|
-
# SHARDING: OFF BY DEFAULT
|
|
59
|
-
|
|
60
|
-
# `off` is the compatible self-host default. Keep shard-only values commented
|
|
61
|
-
# in this mode; an empty value is still rejected as configured. MySQL must stay
|
|
62
|
-
# off. Advanced PostgreSQL self-hosting may use `auto` under one
|
|
63
|
-
# supervisor, or `fixed` with a deliberate total count. Local mode never needs
|
|
64
|
-
# Redis. Coordinated multi-host self-hosting is outside the first release.
|
|
65
|
-
HELYX_SHARD_MODE=off
|
|
66
|
-
# HELYX_SHARD_SCOPE=local
|
|
67
|
-
# HELYX_SHARD_COUNT=2
|
|
68
|
-
# HELYX_SHARD_WORKERS_PER_REPLICA=2
|
|
69
|
-
# HELYX_SHARD_REDIS_URL=rediss://private-redis.example:6379
|
|
70
|
-
# HELYX_SHARD_REDIS_NAMESPACE=helyx.self-host
|
|
71
|
-
# HELYX_SHARD_GENERATION=local-20260728
|
|
72
|
-
# HELYX_SHARD_DATABASE_CONNECTION_BUDGET=10
|
|
73
|
-
# HELYX_SHARD_SUPERVISOR_DATABASE_POOL_MAX=2
|
|
74
|
-
# HELYX_SHARD_WORKER_DATABASE_POOL_MAX=4
|
|
75
|
-
# Redis URL and namespace are intentionally unsupported for the first
|
|
76
|
-
# self-hosted release: do not uncomment them for local auto or fixed mode.
|
|
77
|
-
|
|
78
|
-
# ADVANCED INTEGRATIONS — EDIT ONLY WHEN NEEDED
|
|
79
|
-
|
|
80
|
-
# Additional reviewed module packages
|
|
81
|
-
# HELYX_MODULE_PACKAGES=
|
|
82
|
-
|
|
83
|
-
# Private dashboard control endpoint — configure both together
|
|
84
|
-
# HELYX_BOT_CONTROL_SECRET=replace-with-a-base64-encoded-32-byte-key
|
|
85
|
-
# HELYX_BOT_CONTROL_PORT=3001
|
|
86
|
-
# HELYX_GUILD_RECONCILIATION_INTERVAL_SECONDS=900
|
|
87
|
-
HELYX_HOSTED_MODERATION_ENABLED=false
|
|
10
|
+
DISCORD_CLIENT_ID='12345678901234567'
|
|
11
|
+
DISCORD_TOKEN='replace-me'
|
|
12
|
+
HELYX_GUILD_MEMBERS_ENABLED='false'
|
|
13
|
+
HELYX_MESSAGE_CONTENT_ENABLED='false'
|
|
88
14
|
|
|
89
|
-
#
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
#
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
# Generated module selection
|
|
110
|
-
HELYX_MODULE_CATALOGUE_PATH=./helyx.modules.json
|
|
111
|
-
|
|
112
|
-
# Generated privately by npm run setup. Required by Cloud Connect, Giveaways,
|
|
113
|
-
# and Invite Tracking; retain it unchanged across restarts and deployments.
|
|
114
|
-
# HELYX_DATA_ENCRYPTION_KEY=replace-with-a-base64-encoded-32-byte-key
|
|
115
|
-
|
|
116
|
-
# Official Cloud Connect endpoints
|
|
117
|
-
# HELYX_CLOUD_API_URL=https://api.helyx.gg
|
|
118
|
-
# HELYX_CLOUD_ENDPOINT=wss://connect.helyx.gg/v1/connect
|
|
119
|
-
|
|
120
|
-
# Security audit retention
|
|
121
|
-
# HELYX_CLOUD_AUDIT_RETENTION_DAYS=90
|
|
122
|
-
# HELYX_CLOUD_CREDENTIAL_AUDIT_RETENTION_DAYS=365
|
|
123
|
-
|
|
124
|
-
# Optional public status reporting. Keep disabled unless this installation has
|
|
125
|
-
# its own approved Helyx status credentials.
|
|
126
|
-
HELYX_STATUS_ENABLED=false
|
|
127
|
-
# HELYX_STATUS_URL=https://status.helyx.gg
|
|
128
|
-
# HELYX_STATUS_HEARTBEAT_SECRET=replace-with-a-base64-encoded-32-byte-key
|
|
129
|
-
# HELYX_STATUS_HEARTBEAT_INTERVAL_SECONDS=60
|
|
130
|
-
# CF_ACCESS_CLIENT_ID=replace-with-access-client-id
|
|
131
|
-
# CF_ACCESS_CLIENT_SECRET=replace-with-access-client-secret
|
|
132
|
-
|
|
133
|
-
# Runtime mode
|
|
134
|
-
NODE_ENV=production
|
|
15
|
+
# Database
|
|
16
|
+
DATABASE_ENGINE='postgresql'
|
|
17
|
+
DATABASE_URL='postgresql://database:5432/helyx'
|
|
18
|
+
DATABASE_SSL='disable'
|
|
19
|
+
|
|
20
|
+
# Commands
|
|
21
|
+
HELYX_GUILD_COMMAND_WRITES_ENABLED='true'
|
|
22
|
+
HELYX_GUILD_COMMAND_WRITE_SCOPE='allowlist'
|
|
23
|
+
HELYX_GLOBAL_COMMAND_MODE='platform-only'
|
|
24
|
+
HELYX_GUILD_COMMAND_WRITE_GUILD_IDS=''
|
|
25
|
+
|
|
26
|
+
# Modules and dashboard
|
|
27
|
+
HELYX_MODULE_CATALOGUE_PATH='./helyx.modules.json'
|
|
28
|
+
HELYX_CLOUD_CONNECT_ENABLED='true'
|
|
29
|
+
HELYX_SHARD_MODE='off'
|
|
30
|
+
LOG_LEVEL='info'
|
|
31
|
+
|
|
32
|
+
# Keep this key unchanged across restarts and updates
|
|
33
|
+
HELYX_DATA_ENCRYPTION_KEY='replace-with-a-base64-encoded-32-byte-key'
|
|
@@ -4,7 +4,7 @@ Start from [the published example](../examples/.env.example). The example is a
|
|
|
4
4
|
copy of the starter emitted by the supported CLI and is checked for drift.
|
|
5
5
|
|
|
6
6
|
This page explains the ownership and safe defaults of the generated variables;
|
|
7
|
-
the
|
|
7
|
+
the compact `.env.example` contains only the standard installation settings.
|
|
8
8
|
|
|
9
9
|
## Required values
|
|
10
10
|
|
|
@@ -12,8 +12,9 @@ the comments in `.env.example` remain the version-matched field reference.
|
|
|
12
12
|
`DISCORD_CLIENT_ID` is the application's numeric ID. `DATABASE_ENGINE` accepts
|
|
13
13
|
`postgresql` or `mysql` and defaults to PostgreSQL when omitted. `DATABASE_URL`
|
|
14
14
|
must match the selected engine, and `DATABASE_SSL` must match the database
|
|
15
|
-
provider. PostgreSQL Docker users
|
|
16
|
-
|
|
15
|
+
provider. PostgreSQL Docker users can run `npm run envbuilder` and select the
|
|
16
|
+
bundled database. That choice adds matching `PGPASSWORD` and `POSTGRES_PASSWORD`
|
|
17
|
+
values and the Docker database/user settings. The MySQL Compose starter
|
|
17
18
|
runs only the bot and connects to the external database in `DATABASE_URL`.
|
|
18
19
|
|
|
19
20
|
Percent-encode special characters in URL credentials. `DATABASE_SSL=disable`
|
|
@@ -30,7 +31,7 @@ boundary and prevents Hosted-only Helyx Ecko calls from entering the local
|
|
|
30
31
|
runtime.
|
|
31
32
|
|
|
32
33
|
Privileged Discord intents, privacy execution, hosted OAuth, status reporting,
|
|
33
|
-
|
|
34
|
+
and advanced sharding stay disabled until their complete
|
|
34
35
|
requirements are deliberately configured. An empty variable still counts as a
|
|
35
36
|
configured value in many environments, so leave unused optional lines
|
|
36
37
|
commented.
|
|
@@ -48,8 +49,8 @@ For enabled-module command builds in approved servers, set
|
|
|
48
49
|
Discord server IDs. Use `HELYX_GLOBAL_COMMAND_MODE=platform-only` to retain global
|
|
49
50
|
core/deployment commands while feature commands use per-server builds. Restart
|
|
50
51
|
after changing these values and check the dashboard command-build status. The
|
|
51
|
-
template
|
|
52
|
-
|
|
52
|
+
template uses `platform-only` and enables guild writes for the server IDs you
|
|
53
|
+
provide. Enter those IDs before starting; leave the allowlist scope in place.
|
|
53
54
|
Do not use the advanced `all` scope merely to bypass an allowlist error.
|
|
54
55
|
|
|
55
56
|
`HELYX_AUTOMOD_EMBEDDED_WORKERS` controls only the in-process Self-Hosted
|
|
@@ -22,7 +22,10 @@ below.
|
|
|
22
22
|
|
|
23
23
|
1. Download a starter ZIP, or generate it from the builder's reviewed manifest.
|
|
24
24
|
2. Install its dependencies with `npm ci` unless generation used `--install`.
|
|
25
|
-
3. Run `npm run
|
|
25
|
+
3. Run `npm run envbuilder` to prepare `.env`, or use `npm run setup` and edit
|
|
26
|
+
the compact example. For the included Docker PostgreSQL service, use the
|
|
27
|
+
builder and choose **bundled** so its required database credentials are added.
|
|
28
|
+
A managed host may supply the
|
|
26
29
|
required values through its protected variables panel instead. Keep the
|
|
27
30
|
generated encryption key stable.
|
|
28
31
|
4. Make the selected database reachable and run doctor through the matching
|