@friendlyrobot/discord-pi-agent 0.3.17 → 0.3.18

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 CHANGED
@@ -17,6 +17,7 @@ Reusable Discord DM bridge for persistent pi agent sessions.
17
17
  - `!status`
18
18
  - `!thinking`
19
19
  - `!compact`
20
+ - `!reload`
20
21
  - `!reset-session`
21
22
 
22
23
  Any other DM text is sent to the persistent agent session.
@@ -9,6 +9,7 @@ export declare class AgentService {
9
9
  constructor(config: ResolvedDiscordPiBridgeConfig);
10
10
  initialize(): Promise<void>;
11
11
  prompt(text: string): Promise<string>;
12
+ reloadResources(): Promise<string>;
12
13
  compact(): Promise<string>;
13
14
  resetSession(): Promise<string>;
14
15
  getStatus(): AgentStatus;
package/dist/index.js CHANGED
@@ -147,6 +147,17 @@ class AgentService {
147
147
  logPrefix: `[agent:${session.sessionId}]`
148
148
  });
149
149
  }
150
+ async reloadResources() {
151
+ await this.resourceLoader.reload();
152
+ const extensions = this.resourceLoader.getExtensions().extensions.map((ext) => ext.path);
153
+ const agentsFiles = this.resourceLoader.getAgentsFiles().agentsFiles.map((f) => f.path);
154
+ return [
155
+ "Resources reloaded.",
156
+ `Extensions (${extensions.length}): ${extensions.join(", ") || "(none)"}`,
157
+ `AGENTS.md files (${agentsFiles.length}): ${agentsFiles.join(", ") || "(none)"}`
158
+ ].join(`
159
+ `);
160
+ }
150
161
  async compact() {
151
162
  const session = this.requireSession();
152
163
  await session.compact();
@@ -391,6 +402,7 @@ async function handleCommand(input, agentService, promptQueue) {
391
402
  "!thinking - show or set thinking/reasoning level",
392
403
  "!compact - compact the persistent session",
393
404
  "!reset-session - start a fresh persistent session",
405
+ "!reload - reload resources (AGENTS.md, extensions, skills, etc.)",
394
406
  "Any other DM text goes to the persistent agent session."
395
407
  ].join(`
396
408
  `)
@@ -451,6 +463,14 @@ async function handleCommand(input, agentService, promptQueue) {
451
463
  })
452
464
  };
453
465
  }
466
+ if (trimmed === "!reload") {
467
+ return {
468
+ handled: true,
469
+ response: await promptQueue.enqueue(async () => {
470
+ return agentService.reloadResources();
471
+ })
472
+ };
473
+ }
454
474
  if (trimmed === "!reset-session") {
455
475
  return {
456
476
  handled: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@friendlyrobot/discord-pi-agent",
3
- "version": "0.3.17",
3
+ "version": "0.3.18",
4
4
  "description": "Reusable Discord gateway bridge for persistent pi agent sessions",
5
5
  "license": "MIT",
6
6
  "type": "module",