@restranger/repi-subagents 0.0.1-44677f3 → 0.0.1-562ada7
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 +4 -5
- package/package.json +3 -3
- package/src/discovery.ts +0 -1
- package/src/format.ts +1 -1
- package/src/overrides.ts +2 -2
package/README.md
CHANGED
|
@@ -84,9 +84,8 @@ Scanned recursively, lowest priority first; a later directory overrides the same
|
|
|
84
84
|
|
|
85
85
|
1. `$PI_CODING_AGENT_DIR/agents/**/*.md`, or `~/.config/pi/agent/agents/**/*.md` and
|
|
86
86
|
`~/.pi/agent/agents/**/*.md`
|
|
87
|
-
2.
|
|
88
|
-
3. `<project>/.
|
|
89
|
-
4. `<project>/.repi/agents/**/*.md` (highest)
|
|
87
|
+
2. `<project>/.pi/agents/**/*.md`
|
|
88
|
+
3. `<project>/.repi/agents/**/*.md` (highest)
|
|
90
89
|
|
|
91
90
|
Project directories are skipped when Pi reports the workspace as untrusted. Hidden directories,
|
|
92
91
|
`node_modules`, `.git` and `*.chain.md` files are ignored. `/subagents reload` rescans without
|
|
@@ -97,7 +96,7 @@ restarting Pi.
|
|
|
97
96
|
Markdown remains the declaration format, but frontmatter values can be overridden without editing
|
|
98
97
|
the file. Overrides live in:
|
|
99
98
|
|
|
100
|
-
1. `$
|
|
99
|
+
1. `$PI_CODING_AGENT_DIR/extensions/repi-subagents.json` (default `~/.pi/agent/extensions/repi-subagents.json`)
|
|
101
100
|
2. `<project>/.repi/subagents.json` (highest priority; skipped when the workspace is untrusted)
|
|
102
101
|
|
|
103
102
|
Both files are optional. Within JSON, project values win over user values. JSON is applied after
|
|
@@ -228,7 +227,7 @@ yet). Without `@restranger/repi-permission-system-core`, the declaration's `tool
|
|
|
228
227
|
|
|
229
228
|
Subagent runs share an in-process FIFO pool (default 4 concurrent). Concurrency can be configured via:
|
|
230
229
|
1. Programmatic option: `maxConcurrent` in `SubagentsPluginOptions`.
|
|
231
|
-
2. JSON override config: `"maxConcurrent": 8` in `.repi/subagents.json` or
|
|
230
|
+
2. JSON override config: `"maxConcurrent": 8` in `.repi/subagents.json` or `$PI_CODING_AGENT_DIR/extensions/repi-subagents.json`.
|
|
232
231
|
|
|
233
232
|
Runs beyond the concurrency limit enter the `queued` state and automatically start when an active slot frees up. Runs are not persisted across a Pi restart; P1 will add durable records and artifacts. `subagent_wait` can collect finished background results after they complete.
|
|
234
233
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restranger/repi-subagents",
|
|
3
|
-
"version": "0.0.1-
|
|
3
|
+
"version": "0.0.1-562ada7",
|
|
4
4
|
"description": "Declarative subagents with Markdown definitions, Fleet UI, and isolated child sessions for pi-coding-agent",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"extensions": ["./src/index.ts"]
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@restranger/repi-lib": "0.0.1-
|
|
32
|
-
"@restranger/repi-ui": "0.0.1-
|
|
31
|
+
"@restranger/repi-lib": "0.0.1-562ada7",
|
|
32
|
+
"@restranger/repi-ui": "0.0.1-562ada7"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@earendil-works/pi-coding-agent": ">=0.79.0"
|
package/src/discovery.ts
CHANGED
|
@@ -48,7 +48,6 @@ export function resolveAgentDirectories(options: DiscoverAgentsOptions): AgentDi
|
|
|
48
48
|
...(env.PI_CODING_AGENT_DIR
|
|
49
49
|
? [join(env.PI_CODING_AGENT_DIR, "agents")]
|
|
50
50
|
: [join(configHome, "pi", "agent", "agents"), join(home, ".pi", "agent", "agents")]),
|
|
51
|
-
join(configHome, "repi", "agents"),
|
|
52
51
|
];
|
|
53
52
|
const projectDirs = options.projectDirs ?? [join(cwd, ".pi", "agents"), join(cwd, ".repi", "agents")];
|
|
54
53
|
|
package/src/format.ts
CHANGED
|
@@ -205,7 +205,7 @@ export function paintIdentity(identity?: string, theme?: PiUiCustomTheme): strin
|
|
|
205
205
|
|
|
206
206
|
export function formatAgentCatalog(agents: readonly AgentDefinition[], limit = 20): string {
|
|
207
207
|
if (agents.length === 0) {
|
|
208
|
-
return "No declarative agents found. Create `.pi/agents/<name>.md` or
|
|
208
|
+
return "No declarative agents found. Create `.pi/agents/<name>.md` or `$PI_CODING_AGENT_DIR/agents/<name>.md`.";
|
|
209
209
|
}
|
|
210
210
|
const visible = agents.slice(0, limit);
|
|
211
211
|
const lines = visible.map(
|
package/src/overrides.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { AgentDefinition, AgentDiagnostic, AgentPromptMode, AgentToolSpec }
|
|
|
11
11
|
* Discovery first resolves `*.md` files (project files already outrank user files). The JSON
|
|
12
12
|
* layers are then applied on top:
|
|
13
13
|
*
|
|
14
|
-
* user
|
|
14
|
+
* user `$PI_CODING_AGENT_DIR/extensions/repi-subagents.json` → project `<cwd>/.repi/subagents.json`
|
|
15
15
|
*
|
|
16
16
|
* Project config wins over user config. `null` removes an override from a lower-priority config
|
|
17
17
|
* layer and falls back to the Markdown value. JSON config never creates agents that do not exist
|
|
@@ -28,7 +28,7 @@ export interface AgentOverrideContext {
|
|
|
28
28
|
readonly cwd: string;
|
|
29
29
|
/** Defaults to `os.homedir()`; injectable for tests. */
|
|
30
30
|
readonly homeDir?: string;
|
|
31
|
-
/** Defaults to `process.env`; `
|
|
31
|
+
/** Defaults to `process.env`; `PI_CODING_AGENT_DIR` is honored. */
|
|
32
32
|
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
33
33
|
/** When false, the project `.repi/subagents.json` is not read. */
|
|
34
34
|
readonly workspaceTrusted?: boolean;
|