@friendlyrobot/discord-pi-agent 0.14.0 → 0.15.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/README.md +1 -1
- package/dist/agent-service.d.ts +3 -2
- package/dist/commands.d.ts +1 -1
- package/dist/commands.test.d.ts +1 -0
- package/dist/config.d.ts +2 -9
- package/dist/discord-attachments.d.ts +19 -0
- package/dist/discord-attachments.test.d.ts +1 -0
- package/dist/discord-auth.d.ts +9 -0
- package/dist/discord-auth.test.d.ts +1 -0
- package/dist/discord-gateway-client.d.ts +2 -2
- package/dist/discord-media-resolution.d.ts +17 -0
- package/dist/discord-media-resolution.test.d.ts +1 -0
- package/dist/discord-message-handler.d.ts +6 -0
- package/dist/discord-replies.d.ts +4 -0
- package/dist/discord-typing.d.ts +4 -0
- package/dist/index.d.ts +3 -7
- package/dist/index.js +698 -633
- package/dist/types.d.ts +11 -20
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Client } from "discord.js";
|
|
2
2
|
export type PromptTransform = (input: string) => string | Promise<string>;
|
|
3
3
|
export type ThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
4
|
-
export type
|
|
4
|
+
export type DiscordGatewayConfig = {
|
|
5
5
|
discordBotToken: string;
|
|
6
6
|
discordAllowedUserId: string;
|
|
7
7
|
cwd: string;
|
|
@@ -21,8 +21,14 @@ export type DiscordPiBridgeConfig = {
|
|
|
21
21
|
* Defaults to null (image handling disabled).
|
|
22
22
|
*/
|
|
23
23
|
visionModelId?: string | null;
|
|
24
|
+
/** Which forum channels the bot responds in (absent = forum disabled). */
|
|
25
|
+
discordAllowedForumChannelIds?: string[];
|
|
26
|
+
/** Which users can interact in forum threads (defaults to [discordAllowedUserId]). */
|
|
27
|
+
discordAllowedUserIds?: string[];
|
|
28
|
+
/** Auto-shutdown idle thread sessions after this many ms. */
|
|
29
|
+
sessionIdleTimeoutMs?: number;
|
|
24
30
|
};
|
|
25
|
-
export type
|
|
31
|
+
export type ResolvedDiscordGatewayConfig = {
|
|
26
32
|
discordBotToken: string;
|
|
27
33
|
discordAllowedUserId: string;
|
|
28
34
|
cwd: string;
|
|
@@ -37,6 +43,9 @@ export type ResolvedDiscordPiBridgeConfig = {
|
|
|
37
43
|
shutdownOnSignals: boolean;
|
|
38
44
|
/** Vision model provider/modelId for image description (null = disabled). */
|
|
39
45
|
visionModelId: string | null;
|
|
46
|
+
discordAllowedForumChannelIds: string[];
|
|
47
|
+
discordAllowedUserIds: string[];
|
|
48
|
+
sessionIdleTimeoutMs: number | null;
|
|
40
49
|
};
|
|
41
50
|
export type ContextUsageStatus = {
|
|
42
51
|
tokens: number | null;
|
|
@@ -51,24 +60,6 @@ export type AgentStatus = {
|
|
|
51
60
|
contextUsage: ContextUsageStatus | undefined;
|
|
52
61
|
thinkingInfo: string;
|
|
53
62
|
};
|
|
54
|
-
export type DiscordPiBridge = {
|
|
55
|
-
client: Client;
|
|
56
|
-
stop: () => Promise<void>;
|
|
57
|
-
getStatus: () => AgentStatus;
|
|
58
|
-
};
|
|
59
|
-
export type DiscordGatewayConfig = DiscordPiBridgeConfig & {
|
|
60
|
-
/** Which forum channels the bot responds in (absent = forum disabled). */
|
|
61
|
-
discordAllowedForumChannelIds?: string[];
|
|
62
|
-
/** Which users can interact in forum threads (defaults to [discordAllowedUserId]). */
|
|
63
|
-
discordAllowedUserIds?: string[];
|
|
64
|
-
/** Auto-shutdown idle thread sessions after this many ms. */
|
|
65
|
-
sessionIdleTimeoutMs?: number;
|
|
66
|
-
};
|
|
67
|
-
export type ResolvedDiscordGatewayConfig = ResolvedDiscordPiBridgeConfig & {
|
|
68
|
-
discordAllowedForumChannelIds: string[];
|
|
69
|
-
discordAllowedUserIds: string[];
|
|
70
|
-
sessionIdleTimeoutMs: number | null;
|
|
71
|
-
};
|
|
72
63
|
export type DiscordGateway = {
|
|
73
64
|
client: Client;
|
|
74
65
|
stop: () => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friendlyrobot/discord-pi-agent",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Reusable Discord gateway
|
|
3
|
+
"version": "0.15.0",
|
|
4
|
+
"description": "Reusable Discord gateway for persistent pi agent sessions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|