@friendlyrobot/discord-pi-agent 0.14.1 → 0.16.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.
@@ -8,6 +8,6 @@ export declare class PromptQueue {
8
8
  private running;
9
9
  enqueue<T>(task: QueueTask<T>): Promise<T>;
10
10
  getSnapshot(): QueueSnapshot;
11
- private kick;
11
+ private runNextTask;
12
12
  }
13
13
  export {};
@@ -4,5 +4,5 @@ type CollectReplyOptions = {
4
4
  logPrefix?: string;
5
5
  images?: ImageContent[];
6
6
  };
7
- export declare function collectReply(session: AgentSession, prompt: string, options?: CollectReplyOptions): Promise<string>;
7
+ export declare function runPromptAndCollectReply(session: AgentSession, prompt: string, options?: CollectReplyOptions): Promise<string>;
8
8
  export {};
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 DiscordPiBridgeConfig = {
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 ResolvedDiscordPiBridgeConfig = {
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.14.1",
4
- "description": "Reusable Discord gateway bridge for persistent pi agent sessions",
3
+ "version": "0.16.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",