@friendlyrobot/discord-pi-agent 0.7.8 → 0.8.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/agent-service.d.ts +1 -1
- package/dist/commands.d.ts +1 -1
- package/dist/index.js +17 -13
- package/dist/reply-buffer.d.ts +1 -1
- package/dist/session-registry.d.ts +1 -1
- package/package.json +4 -4
package/dist/agent-service.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AgentSession } from "@
|
|
1
|
+
import { type AgentSession } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import type { AgentStatus, ResolvedDiscordPiBridgeConfig, ThinkingLevel } from "./types";
|
|
3
3
|
export declare class AgentService {
|
|
4
4
|
private readonly config;
|
package/dist/commands.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentSession } from "@
|
|
1
|
+
import type { AgentSession } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import type { AgentService } from "./agent-service";
|
|
3
3
|
import type { PromptQueue } from "./prompt-queue";
|
|
4
4
|
export type CommandResult = {
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
ModelRegistry,
|
|
12
12
|
SessionManager,
|
|
13
13
|
SettingsManager
|
|
14
|
-
} from "@
|
|
14
|
+
} from "@earendil-works/pi-coding-agent";
|
|
15
15
|
|
|
16
16
|
// src/logger.ts
|
|
17
17
|
import pino from "pino";
|
|
@@ -952,7 +952,7 @@ function isAuthorized(message, scope, authConfig) {
|
|
|
952
952
|
}
|
|
953
953
|
return false;
|
|
954
954
|
}
|
|
955
|
-
var TYPING_INTERVAL_MS =
|
|
955
|
+
var TYPING_INTERVAL_MS = 9000;
|
|
956
956
|
function startTypingInterval(channel) {
|
|
957
957
|
channel.sendTyping();
|
|
958
958
|
return setInterval(() => {
|
|
@@ -1134,18 +1134,22 @@ async function onMessage(message, config, agentService, sessionRegistry, authCon
|
|
|
1134
1134
|
if (queuePosition > 0) {
|
|
1135
1135
|
await sendReply(message, `Queued. ${queuePosition} request(s) ahead of this one.`);
|
|
1136
1136
|
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1137
|
+
let response;
|
|
1138
|
+
try {
|
|
1139
|
+
response = await promptQueue.enqueue(async () => {
|
|
1140
|
+
logger5.debug({
|
|
1141
|
+
messageId: message.id,
|
|
1142
|
+
scope
|
|
1143
|
+
}, "processing message");
|
|
1144
|
+
const promptContent = buildDiscordPromptContent(message, scope, content, config);
|
|
1145
|
+
const transformedPrompt = await config.promptTransform(promptContent);
|
|
1146
|
+
return collectReply(session, transformedPrompt, {
|
|
1147
|
+
logPrefix: `[agent:${session.sessionId}]`
|
|
1148
|
+
});
|
|
1146
1149
|
});
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1150
|
+
} finally {
|
|
1151
|
+
stopTypingInterval(typingInterval);
|
|
1152
|
+
}
|
|
1149
1153
|
logger5.info({
|
|
1150
1154
|
direction: "OUT",
|
|
1151
1155
|
scope,
|
package/dist/reply-buffer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentSession } from "@
|
|
1
|
+
import type { AgentSession } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import type { AgentService } from "./agent-service";
|
|
3
3
|
import { PromptQueue } from "./prompt-queue";
|
|
4
4
|
export type SessionScope = string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friendlyrobot/discord-pi-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Reusable Discord gateway bridge for persistent pi agent sessions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"typecheck": "tsgo --noEmit -p tsconfig.json"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
38
|
+
"@earendil-works/pi-ai": "^0.74.0",
|
|
39
|
+
"@earendil-works/pi-coding-agent": "^0.74.0",
|
|
40
40
|
"discord.js": "^14.26.4",
|
|
41
41
|
"dotenv": "^17.4.2",
|
|
42
42
|
"marked": "^18.0.3",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^25.6.2",
|
|
49
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
49
|
+
"@typescript/native-preview": "^7.0.0-dev.20260508.1",
|
|
50
50
|
"@vitest/ui": "^4.1.5",
|
|
51
51
|
"vitest": "^4.1.5"
|
|
52
52
|
}
|