pi-agents-switch 0.3.2 → 0.3.3
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 -2
- package/frontmatter.ts +0 -1
- package/index.ts +1 -3
- package/package.json +1 -1
- package/profile-manager.ts +1 -3
- package/types.ts +2 -2
package/README.md
CHANGED
|
@@ -57,8 +57,7 @@ The Builder will design the agent, write the AGENTS.md, and set everything up.
|
|
|
57
57
|
```
|
|
58
58
|
~/.pi/agents/<name>/
|
|
59
59
|
├── AGENTS.md ← YAML frontmatter + system prompt (all-in-one)
|
|
60
|
-
|
|
61
|
-
└── prompts/ ← agent-specific prompt templates (optional)
|
|
60
|
+
└── skills/ ← agent-specific skills (auto-loaded, optional)
|
|
62
61
|
```
|
|
63
62
|
|
|
64
63
|
When you switch to an agent, its `AGENTS.md` body is injected into the system prompt. You can also configure model, thinking level, and tools per agent via the frontmatter.
|
package/frontmatter.ts
CHANGED
|
@@ -145,7 +145,6 @@ function parseScalar(value: string): string | boolean | number {
|
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* Serialize frontmatter back to a YAML block (for creating agents).
|
|
148
|
-
* Uses the preferred key names: `excluded_tools`, `excluded_extensions`, `excluded_skills`.
|
|
149
148
|
*/
|
|
150
149
|
export function serializeFrontmatter(fm: AgentFrontmatter): string {
|
|
151
150
|
const lines: string[] = ["---"];
|
package/index.ts
CHANGED
|
@@ -140,9 +140,7 @@ If you want to exclude just a few items, add \`*\` to the include list and use t
|
|
|
140
140
|
|
|
141
141
|
\`\`\`
|
|
142
142
|
~/.pi/agents/<name>/
|
|
143
|
-
|
|
144
|
-
├── skills/ ← Agent-specific skills (mkdir)
|
|
145
|
-
└── prompts/ ← Agent-specific prompt templates (mkdir)
|
|
143
|
+
└── skills/ ← Agent-specific skills (mkdir, optional)
|
|
146
144
|
\`\`\`
|
|
147
145
|
|
|
148
146
|
## Workflow: How to create an agent
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agents-switch",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Tab to switch primary agents in Pi — like OpenCode's agent switching. Each agent gets an isolated profile with its own AGENTS.md, extensions, skills, and settings.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"pi": {
|
package/profile-manager.ts
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
* Profile dir layout:
|
|
9
9
|
* ~/.pi/agents/<name>/ ← user-level agent
|
|
10
10
|
* ├── AGENTS.md ← YAML frontmatter + system prompt
|
|
11
|
-
*
|
|
12
|
-
* └── prompts/ ← agent-specific prompt templates
|
|
11
|
+
* └── skills/ ← agent-specific skills
|
|
13
12
|
*
|
|
14
13
|
* <cwd>/.pi/agents/<name>/ ← project-level agent (overrides user)
|
|
15
14
|
* └── AGENTS.md
|
|
@@ -718,7 +717,6 @@ export class ProfileManager {
|
|
|
718
717
|
try {
|
|
719
718
|
mkdirSync(path, { recursive: true });
|
|
720
719
|
mkdirSync(join(path, "skills"));
|
|
721
|
-
mkdirSync(join(path, "prompts"));
|
|
722
720
|
} catch (err) {
|
|
723
721
|
try {
|
|
724
722
|
rmSync(path, { recursive: true, force: true });
|
package/types.ts
CHANGED
|
@@ -62,8 +62,8 @@ export interface FrontmatterResult {
|
|
|
62
62
|
body: string;
|
|
63
63
|
/**
|
|
64
64
|
* Ordered list of top-level YAML keys as they appear in the file.
|
|
65
|
-
* Used for last-write-wins conflict resolution between `tools`/`excluded_tools
|
|
66
|
-
* `
|
|
65
|
+
* Used for last-write-wins conflict resolution between `tools`/`excluded_tools`
|
|
66
|
+
* and `skills`/`excluded_skills`.
|
|
67
67
|
*/
|
|
68
68
|
keyOrder: string[];
|
|
69
69
|
}
|