@friendlyrobot/discord-pi-agent 0.18.2 → 0.19.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/dist/index.js +6 -3
- package/package.json +5 -5
- package/dist/debug-print.test.d.ts +0 -1
- package/dist/discord-attachments.test.d.ts +0 -1
- package/dist/discord-auth.test.d.ts +0 -1
- package/dist/discord-media-resolution.test.d.ts +0 -1
- package/dist/markdown-table-transformer.test.d.ts +0 -1
- package/dist/message-chunker.test.d.ts +0 -1
- package/dist/prompt-context.test.d.ts +0 -1
- package/dist/session-commands.test.d.ts +0 -1
- package/dist/session-registry.test.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -558,11 +558,12 @@ import path2 from "node:path";
|
|
|
558
558
|
import dotenv from "dotenv";
|
|
559
559
|
function resolveConfig(config) {
|
|
560
560
|
const discordAllowedUserId = requireNonEmptyConfigValue("discordAllowedUserId", config.discordAllowedUserId);
|
|
561
|
+
const cwd = requireNonEmptyConfigValue("cwd", config.cwd);
|
|
561
562
|
return {
|
|
562
563
|
discordBotToken: requireNonEmptyConfigValue("discordBotToken", config.discordBotToken),
|
|
563
564
|
discordAllowedUserId,
|
|
564
|
-
cwd
|
|
565
|
-
agentDir: config.agentDir?.trim() || path2.join(
|
|
565
|
+
cwd,
|
|
566
|
+
agentDir: config.agentDir?.trim() || path2.join(cwd, ".pi-agent"),
|
|
566
567
|
modelProvider: config.modelProvider?.trim() || "openrouter",
|
|
567
568
|
modelId: config.modelId?.trim() || "anthropic/claude-3.5-haiku",
|
|
568
569
|
thinkingLevel: parseThinkingLevel(config.thinkingLevel) || "medium",
|
|
@@ -573,7 +574,9 @@ function resolveConfig(config) {
|
|
|
573
574
|
shutdownOnSignals: config.shutdownOnSignals ?? true,
|
|
574
575
|
visionModelId: config.visionModelId?.trim() || null,
|
|
575
576
|
discordAllowedForumChannelIds: config.discordAllowedForumChannelIds ?? [],
|
|
576
|
-
discordAllowedUserIds: config.discordAllowedUserIds ?? [
|
|
577
|
+
discordAllowedUserIds: config.discordAllowedUserIds ?? [
|
|
578
|
+
discordAllowedUserId
|
|
579
|
+
]
|
|
577
580
|
};
|
|
578
581
|
}
|
|
579
582
|
function loadDiscordGatewayConfigFromEnv(overrides = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friendlyrobot/discord-pi-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "Reusable Discord gateway for persistent pi agent sessions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"test:coverage": "vitest run --coverage",
|
|
31
31
|
"format": "prettier --write .",
|
|
32
32
|
"build:01-clean": "rm -rf dist",
|
|
33
|
-
"build:02-tsgo": "tsgo -p tsconfig.json --emitDeclarationOnly --declaration --declarationMap false",
|
|
33
|
+
"build:02-tsgo": "tsgo -p tsconfig.build.json --emitDeclarationOnly --declaration --declarationMap false",
|
|
34
34
|
"build:03-build": "bun build ./src/index.ts --outdir ./dist --target node --format esm --packages external",
|
|
35
35
|
"build": "bun run --sequential 'build:*'",
|
|
36
36
|
"typecheck": "tsgo --noEmit -p tsconfig.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@earendil-works/pi-ai": "^0.75.
|
|
40
|
-
"@earendil-works/pi-coding-agent": "^0.75.
|
|
39
|
+
"@earendil-works/pi-ai": "^0.75.3",
|
|
40
|
+
"@earendil-works/pi-coding-agent": "^0.75.3",
|
|
41
41
|
"discord.js": "^14.26.4",
|
|
42
42
|
"dotenv": "^17.4.2",
|
|
43
43
|
"marked": "^18.0.3",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^25.8.0",
|
|
50
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
50
|
+
"@typescript/native-preview": "^7.0.0-dev.20260518.1",
|
|
51
51
|
"@vitest/coverage-v8": "^4.1.6",
|
|
52
52
|
"@vitest/ui": "^4.1.6",
|
|
53
53
|
"vitest": "^4.1.6"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|