Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

feat(agent): integrate skills config into AgentOptions

Jiang Bohan3d2e5391270e
diff --git a/src/agent/runner.ts b/src/agent/runner.ts
index 8eaee194be..8afa010b5c 100644
--- a/src/agent/runner.ts
+++ b/src/agent/runner.ts
@@ -146,10 +146,17 @@ export class Agent {
// Initialize SkillManager (enabled by default)
if (options.enableSkills !== false) {
+ // Merge extraSkillDirs from options with config
+ const extraDirs = [
+ ...(options.extraSkillDirs ?? []),
+ ...(options.skills?.load?.extraDirs ?? []),
+ ];
+
this.skillManager = new SkillManager({
profileId: options.profileId,
profileBaseDir: options.profileBaseDir,
- extraDirs: options.extraSkillDirs,
+ extraDirs: extraDirs.length > 0 ? extraDirs : undefined,
+ config: options.skills,
});
// Append skills prompt to system prompt
diff --git a/src/agent/types.ts b/src/agent/types.ts
index 405f0cc741..3f1ebb1e27 100644
--- a/src/agent/types.ts
+++ b/src/agent/types.ts
@@ -1,4 +1,5 @@
import type { ThinkingLevel } from "@mariozechner/pi-agent-core";
+import type { SkillsConfig } from "./skills/types.js";
export type AgentRunResult = {
text: string;
@@ -58,6 +59,8 @@ export type AgentOptions = {
enableSkills?: boolean | undefined;
/** Additional directories to search for skills */
extraSkillDirs?: string[] | undefined;
+ /** Full skills configuration */
+ skills?: SkillsConfig | undefined;
};
export interface Message {