@friendlyrobot/discord-pi-agent 0.3.16 → 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 +1 -0
- package/dist/agent-service.d.ts +1 -0
- package/dist/index.js +20 -0
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/agent-service.d.ts
CHANGED
|
@@ -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.
|
|
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",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@mariozechner/pi-ai": "^0.
|
|
37
|
-
"@mariozechner/pi-coding-agent": "^0.
|
|
36
|
+
"@mariozechner/pi-ai": "^0.70.0",
|
|
37
|
+
"@mariozechner/pi-coding-agent": "^0.70.0",
|
|
38
38
|
"discord.js": "^14.26.3",
|
|
39
39
|
"dotenv": "^17.4.2"
|
|
40
40
|
},
|