@friendlyrobot/discord-pi-agent 0.14.0 → 0.14.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 -0
- package/dist/index.js +20 -3
- package/package.json +1 -1
package/dist/agent-service.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare class AgentService {
|
|
|
22
22
|
findModel(provider: string, modelId: string): Model<any> | undefined;
|
|
23
23
|
createSession(sessionDir: string): Promise<AgentSession>;
|
|
24
24
|
prompt(text: string): Promise<string>;
|
|
25
|
+
getSkillsSummary(): string;
|
|
25
26
|
reloadResources(): Promise<string>;
|
|
26
27
|
getExtensionsSummary(): string;
|
|
27
28
|
compact(): Promise<string>;
|
package/dist/index.js
CHANGED
|
@@ -282,13 +282,25 @@ class AgentService {
|
|
|
282
282
|
logPrefix: `[agent:${session.sessionId}]`
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
|
+
getSkillsSummary() {
|
|
286
|
+
const result = this.resourceLoader.getSkills();
|
|
287
|
+
const { skills } = result;
|
|
288
|
+
if (skills.length === 0) {
|
|
289
|
+
return "Skills: (none loaded)";
|
|
290
|
+
}
|
|
291
|
+
const names = skills.map((s) => s.name);
|
|
292
|
+
return `Skills (${skills.length}): ${names.join(", ") || "(none)"}`;
|
|
293
|
+
}
|
|
285
294
|
async reloadResources() {
|
|
286
295
|
await this.resourceLoader.reload();
|
|
287
296
|
const extensions = this.resourceLoader.getExtensions().extensions.map((ext) => ext.path);
|
|
297
|
+
const skills = this.resourceLoader.getSkills();
|
|
298
|
+
const skillNames = skills.skills.map((s) => s.name);
|
|
288
299
|
const agentsFiles = this.resourceLoader.getAgentsFiles().agentsFiles.map((f) => f.path);
|
|
289
300
|
return [
|
|
290
301
|
"Resources reloaded.",
|
|
291
302
|
`Extensions (${extensions.length}): ${extensions.join(", ") || "(none)"}`,
|
|
303
|
+
`Skills (${skills.skills.length}): ${skillNames.join(", ") || "(none)"}`,
|
|
292
304
|
`AGENTS.md files (${agentsFiles.length}): ${agentsFiles.join(", ") || "(none)"}`
|
|
293
305
|
].join(`
|
|
294
306
|
`);
|
|
@@ -657,8 +669,11 @@ function getSessionStatusText(session, promptQueue, extras) {
|
|
|
657
669
|
`queue-busy: ${queueStatus.busy}`
|
|
658
670
|
];
|
|
659
671
|
if (extras?.tools && extras.tools.length > 0) {
|
|
660
|
-
const
|
|
661
|
-
lines.push("", `Tools (${extras.tools.length})
|
|
672
|
+
const toolNames = extras.tools.map((t) => t.name);
|
|
673
|
+
lines.push("", `Tools (${extras.tools.length}): ${toolNames.join(", ")}`);
|
|
674
|
+
}
|
|
675
|
+
if (extras?.skillsSummary) {
|
|
676
|
+
lines.push("", extras.skillsSummary);
|
|
662
677
|
}
|
|
663
678
|
if (extras?.extensionsSummary) {
|
|
664
679
|
lines.push("", extras.extensionsSummary);
|
|
@@ -725,11 +740,13 @@ async function handleCommand(input, ctx) {
|
|
|
725
740
|
}
|
|
726
741
|
const tools = effectiveSession.getAllTools();
|
|
727
742
|
const extensionsSummary = agentService.getExtensionsSummary();
|
|
743
|
+
const skillsSummary = agentService.getSkillsSummary();
|
|
728
744
|
return {
|
|
729
745
|
handled: true,
|
|
730
746
|
response: getSessionStatusText(effectiveSession, promptQueue, {
|
|
731
747
|
tools,
|
|
732
|
-
extensionsSummary
|
|
748
|
+
extensionsSummary,
|
|
749
|
+
skillsSummary
|
|
733
750
|
})
|
|
734
751
|
};
|
|
735
752
|
}
|