forked from hackerai-tech/hackerai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrigger.config.ts
More file actions
42 lines (40 loc) · 1.36 KB
/
Copy pathtrigger.config.ts
File metadata and controls
42 lines (40 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { config } from "dotenv";
import { defineConfig } from "@trigger.dev/sdk";
import { additionalPackages } from "@trigger.dev/build/extensions/core";
if (process.env.NODE_ENV !== "production") {
config({ path: ".env.local" });
}
export default defineConfig({
project: process.env.TRIGGER_PROJECT_ID!,
// centrifuge-js relies on globalThis.WebSocket, which is only stable on
// Node 22+. The default "node" runtime is older and would throw
// "WebSocket constructor not found" when CentrifugoSandbox connects.
runtime: "node-22",
logLevel: "log",
// Up to two hours per agent-long run. The task enforces a lower free-plan
// runtime cap inside trigger/agent-long.ts.
maxDuration: 2 * 60 * 60,
retries: {
enabledInDev: false,
default: {
maxAttempts: 3,
minTimeoutInMs: 1000,
maxTimeoutInMs: 10000,
factor: 2,
randomize: true,
},
},
dirs: ["./trigger"],
build: {
// Native modules that must be installed at deploy time, not bundled.
// @e2b/code-interpreter is pure JS and intentionally NOT listed here —
// bundling it lets esbuild convert chalk's ESM to CJS inline, avoiding
// the ERR_REQUIRE_ESM crash that occurs when Docker installs it via npm.
external: ["node-pty", "sharp"],
extensions: [
additionalPackages({
packages: ["node-pty", "sharp"],
}),
],
},
});