-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpackage.json
More file actions
141 lines (141 loc) · 6.42 KB
/
package.json
File metadata and controls
141 lines (141 loc) · 6.42 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{
"name": "@elizaos/plugin-discord-root",
"private": true,
"version": "2.0.0-alpha.1",
"type": "module",
"main": "typescript/dist/index.js",
"module": "typescript/dist/index.js",
"types": "typescript/dist/index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/elizaos-plugins/plugin-discord.git"
},
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./typescript/dist/index.d.ts",
"default": "./typescript/dist/index.js"
}
},
"./rust": {
"node": {
"import": "./rust/pkg/node/elizaos_plugin_discord.js",
"default": "./rust/pkg/node/elizaos_plugin_discord.js"
},
"default": "./rust/pkg/node/elizaos_plugin_discord.js"
}
},
"files": [
"typescript/dist"
],
"dependencies": {
"@discordjs/opus": "^0.10.0",
"@discordjs/rest": "2.4.3",
"@discordjs/voice": "0.18.0",
"@elizaos/core": "workspace:*",
"discord-api-types": "^0.37.119",
"discord.js": "14.18.0",
"fast-levenshtein": "^3.0.0",
"fluent-ffmpeg": "^2.1.3",
"get-func-name": "^3.0.0",
"libsodium-wrappers": "^0.7.13",
"opusscript": "^0.1.1",
"prism-media": "1.3.5",
"typescript": "^6.0.0",
"zod": "^4.3.6"
},
"devDependencies": {
"@biomejs/biome": "^2.3.11",
"@types/node": "^25.0.3"
},
"scripts": {
"build:prompts": "sh -c 'if test -f ../../eliza/packages/prompts/scripts/generate-plugin-prompts.js; then node ../../eliza/packages/prompts/scripts/generate-plugin-prompts.js ./prompts ./typescript/generated/prompts --target all; elif test -f ../../packages/prompts/scripts/generate-plugin-prompts.js; then node ../../packages/prompts/scripts/generate-plugin-prompts.js ./prompts ./typescript/generated/prompts --target all; else echo \"Prompt generation skipped\"; fi'",
"build": "npm run build:prompts && bun run build:ts && bun run build:rust && bun run build:python",
"build:ts": "cd typescript && bun run build.ts",
"build:python": "test -n \"$SKIP_PYTHON_BUILD\" && echo 'Python build skipped (SKIP_PYTHON_BUILD set)' || (test -d python && cd python && (timeout 120 python3 -m build 2>/dev/null || timeout 120 pyproject-build 2>/dev/null) || echo 'Python build skipped or timed out')",
"dev": "cd typescript && bun run build.ts --watch",
"typecheck": "cd typescript && tsc --noEmit -p tsconfig.json",
"test": "bun run test:ts && bun run test:rust && bun run test:python",
"test:ts": "cd typescript && bun run test",
"test:unit": "cd typescript && bun run test",
"lint": "cd typescript && bun run lint",
"lint:check": "cd typescript && bun run lint:check",
"clean": "rm -rf typescript/dist .turbo typescript/node_modules .turbo-tsconfig.json typescript/tsconfig.tsbuildinfo",
"format": "cd typescript && bun run format",
"format:check": "cd typescript && bun run format:check",
"build:rust": "test -d rust && cd rust && cargo build --release || echo 'Rust build skipped - no rust directory'",
"build:rust:native": "cd rust && cargo build --release",
"test:rust": "if [ -d rust ]; then cd rust && cargo test; else echo 'Rust tests skipped - no rust directory'; fi",
"lint:rust": "cd rust && cargo clippy --all-targets --fix --allow-dirty --allow-staged -- -D warnings && cargo fmt",
"typecheck:rust": "cd rust && cargo check --all-targets --all-features",
"lint:python": "cd python && ruff check --fix . && ruff format .",
"test:python": "if [ -d python ]; then cd python && tmpdir=$(mktemp -d) && python3 -m venv \"$tmpdir\" && \"$tmpdir/bin/python\" -m pip install -e ../../../packages/python -e '.[dev]' -q && \"$tmpdir/bin/python\" -m pytest -p no:anchorpy --asyncio-mode=auto; status=$?; rm -rf \"$tmpdir\"; exit $status; else echo 'Python tests skipped - no python directory'; fi",
"typecheck:python": "cd python && python3 -m mypy elizaos_plugin_discord || echo 'mypy not installed, skipping typecheck'",
"test:e2e": "node ../../packages/app-core/scripts/run-local-plugin-live-smoke.mjs",
"test:live": "bun run test:e2e"
},
"peerDependencies": {
"whatwg-url": "7.1.0"
},
"gitHead": "05d4ca11d769db8c7f54a722ee24b2ce2b951543",
"agentConfig": {
"pluginType": "elizaos:plugin:1.0.0",
"pluginParameters": {
"DISCORD_API_TOKEN": {
"type": "string",
"description": "Discord API token used to authenticate and log in the Discord client/service.",
"required": true,
"sensitive": true
},
"DISCORD_APPLICATION_ID": {
"type": "string",
"description": "Discord application ID for the bot",
"required": true,
"sensitive": false
},
"CHANNEL_IDS": {
"type": "string",
"description": "Comma-separated list of Discord channel IDs that will be parsed into an array if provided.",
"required": false,
"sensitive": false
},
"DISCORD_TEST_CHANNEL_ID": {
"type": "string",
"description": "Discord channel ID used during test suite to locate the test channel for sending messages, voice interactions, and other test operations.",
"required": false,
"sensitive": false
},
"DISCORD_VOICE_CHANNEL_ID": {
"type": "string",
"description": "ID of the Discord voice channel the bot should join when scanning a guild. If not supplied, the bot selects a channel based on member activity.",
"required": false,
"sensitive": false
},
"DISCORD_SHOULD_IGNORE_BOT_MESSAGES": {
"type": "boolean",
"description": "If true, the bot will ignore messages from other bots. Can be overridden by character settings.",
"required": false,
"sensitive": false
},
"DISCORD_SHOULD_IGNORE_DIRECT_MESSAGES": {
"type": "boolean",
"description": "If true, the bot will ignore direct messages. Can be overridden by character settings.",
"required": false,
"sensitive": false
},
"DISCORD_SHOULD_RESPOND_ONLY_TO_MENTIONS": {
"type": "boolean",
"description": "If true, the bot will only respond when explicitly mentioned. Can be overridden by character settings.",
"required": false,
"sensitive": false
},
"DISCORD_LISTEN_CHANNEL_IDS": {
"type": "string",
"description": "Comma-separated list of Discord channel IDs where the bot will only listen (not respond).",
"required": false,
"sensitive": false
}
}
}
}