@psnext/s-subagents 0.1.20260522-1 → 0.1.20260523-2

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.
@@ -1,6 +1,6 @@
1
1
  [
2
2
  {
3
- "id": "hook-1779457904343-864",
3
+ "id": "hook-1779537187645-746",
4
4
  "name": "Code review",
5
5
  "description": "Review the code for all coding standard",
6
6
  "triggerType": "file_saved",
@@ -18,7 +18,7 @@
18
18
  "createdBy": "user",
19
19
  "tags": [],
20
20
  "debounceDuration": "120000",
21
- "createdAt": "2026-05-22T13:51:44.411Z",
22
- "updatedAt": "2026-05-22T13:51:44.411Z"
21
+ "createdAt": "2026-05-23T11:53:07.661Z",
22
+ "updatedAt": "2026-05-23T11:53:07.661Z"
23
23
  }
24
24
  ]
package/README.md CHANGED
@@ -12,7 +12,7 @@ A [sling](https://www.npmjs.com/package/@psnext/slingcli) extension that registe
12
12
 
13
13
  ## Dependencies
14
14
 
15
- `safe_bash` ships in this repo (`tools/safe-bash.ts`). `web_search` and `web_fetch` do not — `researcher` and `worker` depend on them. Grab those two extensions from [amosblomqvist/pi-config](https://github.com/amosblomqvist/pi-config) (`extensions/web-search/`, `extensions/web-fetch/`) and drop them into `~/.pi/agent/extensions/`. Without them the affected agents will launch with an empty tool allowlist and silently do nothing useful.
15
+ `safe_bash` ships in this repo (`tools/safe-bash.ts`). `web_search` and `web_fetch` do not — `researcher` and `worker` depend on them. Grab those two extensions from [amosblomqvist/pi-config](https://github.com/amosblomqvist/pi-config) (`extensions/web-search/`, `extensions/web-fetch/`) and drop them into `~/.sling/agent/extensions/`. Without them the affected agents will launch with an empty tool allowlist and silently do nothing useful.
16
16
 
17
17
  ## Usage
18
18
 
@@ -21,9 +21,9 @@ One tool call = one subagent:
21
21
  { "agent": "scout", "task": "Find all auth-related files in src/" }
22
22
  ```
23
23
 
24
- To fan out, emit multiple `subagent` tool calls in the same assistant turn — pi runs them in parallel automatically. A per-process semaphore caps simultaneous subagents at `maxConcurrency` (default 4); calls past the cap wait their turn.
24
+ To fan out, emit multiple `subagent` tool calls in the same assistant turn — sling runs them in parallel automatically. A per-process semaphore caps simultaneous subagents at `maxConcurrency` (default 4); calls past the cap wait their turn.
25
25
 
26
- Each subagent runs as an isolated `pi` process with no inherited context — all context must be in the task description.
26
+ Each subagent runs as an isolated `sling` process with no inherited context — all context must be in the task description.
27
27
 
28
28
  ## Config
29
29
 
@@ -71,13 +71,13 @@ Frontmatter fields:
71
71
  - **tools** — comma-separated list of tools the agent needs (builtin or extension). Include `subagent` here to let this agent spawn other agents.
72
72
  - **model** — model identifier (defaults to `anthropic/claude-sonnet-4-6`)
73
73
  - **thinking** — reasoning level: `off`, `low`, `medium`, `high` (defaults to `medium`)
74
- - **subagent_agents** — if `subagent` is in `tools`, restrict which agents this one may spawn. Comma-separated list of agent names. Omit for no restriction. Enforced by passing `PI_SUBAGENT_ALLOWED` env to the child `pi` process — the child's subagents extension filters its registry before any tool description sees it, so the child LLM literally can't reference an agent outside the allowlist.
74
+ - **subagent_agents** — if `subagent` is in `tools`, restrict which agents this one may spawn. Comma-separated list of agent names. Omit for no restriction. Enforced by passing `PI_SUBAGENT_ALLOWED` env to the child `sling` process — the child's subagents extension filters its registry before any tool description sees it, so the child LLM literally can't reference an agent outside the allowlist.
75
75
 
76
76
  The markdown body becomes the agent's system prompt.
77
77
 
78
78
  ### 2. Register agents via `globalThis.__pi_subagents`
79
79
 
80
- Pi loads extensions via jiti, which creates separate module instances. Direct imports from the subagents extension will reference a different `agents` array than the one the `subagent` tool uses. Use the `globalThis` bridge instead:
80
+ sling loads extensions via jiti, which creates separate module instances. Direct imports from the subagents extension will reference a different `agents` array than the one the `subagent` tool uses. Use the `globalThis` bridge instead:
81
81
 
82
82
  ```typescript
83
83
  import { parseFrontmatter } from "@earendil-works/pi-coding-agent";
@@ -2,7 +2,7 @@
2
2
  name: researcher
3
3
  description: Web researcher — searches the web and synthesizes findings
4
4
  tools: web_search, web_fetch
5
- model: claude-sonnet-4-5@20250929
5
+ model: claude-sonnet-4-6
6
6
  thinking: medium
7
7
  ---
8
8
 
package/agents/worker.md CHANGED
@@ -3,7 +3,7 @@ name: worker
3
3
  description: General-purpose worker — reads, writes, and edits code
4
4
  tools: read, write, edit, safe_bash, web_search, web_fetch, subagent
5
5
  subagent_agents: scout, researcher
6
- model: claude-sonnet-4-5@20250929
6
+ model: claude-sonnet-4-6
7
7
  thinking: medium
8
8
  ---
9
9
 
package/index.ts CHANGED
@@ -177,7 +177,7 @@ function loadAgents(): AgentConfig[] {
177
177
  name: frontmatter.name,
178
178
  description: frontmatter.description || "",
179
179
  tools,
180
- model: frontmatter.model || "claude-sonnet-4-5@20250929",
180
+ model: frontmatter.model || "anthropic/claude-sonnet-4-6",
181
181
  thinking: frontmatter.thinking || "medium",
182
182
  systemPrompt: body,
183
183
  filePath,
@@ -289,7 +289,7 @@ async function buildPiArgs(
289
289
  cwd: string,
290
290
  ): Promise<{ args: string[]; tempDir: string; childEnv: NodeJS.ProcessEnv | undefined }> {
291
291
  const piBin = resolvePiBinary();
292
- const tempDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "pi-sub-"));
292
+ const tempDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "sling-sub-"));
293
293
 
294
294
  // Write system prompt to temp file
295
295
  const promptPath = path.join(tempDir, `${agent.name}.md`);
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@psnext/s-subagents",
3
- "version": "0.1.20260522-1",
3
+ "version": "0.1.20260523-2",
4
+ "scripts": {
5
+ "postinstall": "scripts/postinstall.js"
6
+ },
4
7
  "devDependencies": {
5
- "@earendil-works/pi-coding-agent": "^0.75.4",
6
- "@earendil-works/pi-tui": "^0.75.4",
7
- "@sinclair/typebox": "^0.34.49",
8
- "@types/node": "^25.9.1"
8
+ "@earendil-works/pi-coding-agent": "^0.75.5",
9
+ "@earendil-works/pi-tui": "^0.75.5",
10
+ "@sinclair/typebox": "^0.34.49"
9
11
  }
10
12
  }
@@ -0,0 +1 @@
1
+ //copy
@@ -1,15 +0,0 @@
1
- {
2
- "filename": "index.ts",
3
- "path": "index.ts",
4
- "version": "1.1",
5
- "files": {},
6
- "promptMessage": {
7
- "0dbda967": {
8
- "value": "Cannot find name 'node:child_process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.ts"
9
- }
10
- },
11
- "localPrompts": {},
12
- "remotePrompts": {},
13
- "figma": {},
14
- "jira": {}
15
- }
@@ -1,101 +0,0 @@
1
- {
2
- "index.ts": {
3
- "filename": "index.ts",
4
- "path": "index.ts",
5
- "version": "1.2",
6
- "contextFile": "51adc022-context.json",
7
- "chunks": {
8
- "33a9a4": {
9
- "user": "Rakesh Ravuri",
10
- "model": "claude-sonnet-4-5@20250929",
11
- "timestamp": 1779458883,
12
- "platform": "VisualStudioCode",
13
- "product": "AIPP",
14
- "productVersion": "2.5.0",
15
- "source": "chat",
16
- "type": "compareCode",
17
- "extraContext": {
18
- "promptMessage": "0dbda967"
19
- },
20
- "hash": "0d52ee42",
21
- "messageId": "system_980f1e50-55e7-11f1-92a0-cdb27b9735e4",
22
- "codeBlockId": "system_980f1e50-55e7-11f1-92a0-cdb27b9735e4-Codeblock-2",
23
- "isActive": false
24
- },
25
- "ee44cb": {
26
- "user": "Rakesh Ravuri",
27
- "model": "claude-sonnet-4-5@20250929",
28
- "timestamp": 1779458886,
29
- "platform": "VisualStudioCode",
30
- "product": "AIPP",
31
- "productVersion": "2.5.0",
32
- "source": "chat",
33
- "type": "insertCode",
34
- "extraContext": {
35
- "promptMessage": "0dbda967"
36
- },
37
- "hash": "0d52ee42",
38
- "messageId": "system_980f1e50-55e7-11f1-92a0-cdb27b9735e4",
39
- "codeBlockId": "system_980f1e50-55e7-11f1-92a0-cdb27b9735e4-Codeblock-2",
40
- "isActive": true
41
- },
42
- "3caf2e": {
43
- "user": "Rakesh Ravuri",
44
- "model": "claude-sonnet-4-5@20250929",
45
- "timestamp": 1779458886,
46
- "platform": "VisualStudioCode",
47
- "product": "AIPP",
48
- "productVersion": "2.5.0",
49
- "source": "chat",
50
- "type": "pasteCode",
51
- "extraContext": {
52
- "promptMessage": "0dbda967"
53
- },
54
- "hash": "0d52ee42",
55
- "messageId": "system_980f1e50-55e7-11f1-92a0-cdb27b9735e4",
56
- "codeBlockId": "system_980f1e50-55e7-11f1-92a0-cdb27b9735e4-Codeblock-2",
57
- "isActive": false
58
- }
59
- },
60
- "lines": {
61
- "32": {
62
- "chunkId": "ee44cb",
63
- "hash": "699fd80f",
64
- "encoded": "%7D",
65
- "prevChunkIds": []
66
- },
67
- "55": {
68
- "chunkId": "ee44cb",
69
- "hash": "2ef1d392",
70
- "encoded": "%7D",
71
- "prevChunkIds": []
72
- },
73
- "71": {
74
- "chunkId": "ee44cb",
75
- "hash": "f064f9d6",
76
- "encoded": "%7D",
77
- "prevChunkIds": []
78
- },
79
- "429": {
80
- "chunkId": "ee44cb",
81
- "hash": "bd760bbf",
82
- "encoded": "%7D,",
83
- "prevChunkIds": [
84
- "ee44cb"
85
- ]
86
- },
87
- "872": {
88
- "chunkId": "ee44cb",
89
- "hash": "c3395656",
90
- "encoded": "%7D,",
91
- "prevChunkIds": []
92
- },
93
- "913": {
94
- "chunkId": "ee44cb",
95
- "hash": "f8f5c1fc",
96
- "encoded": "%7D,",
97
- "prevChunkIds": []
98
- }
99
- }
100
- }
101
- }
@@ -1,87 +0,0 @@
1
- {
2
- "tsconfig.json": {
3
- "filename": "tsconfig.json",
4
- "path": "tsconfig.json",
5
- "version": "1.2",
6
- "contextFile": null,
7
- "chunks": {
8
- "ba71e7": {
9
- "user": "Rakesh Ravuri",
10
- "model": "claude-sonnet-4-5@20250929",
11
- "timestamp": 1779458900,
12
- "platform": "VisualStudioCode",
13
- "product": "AIPP",
14
- "productVersion": "2.5.0",
15
- "source": "chat",
16
- "type": "createFileWithCode",
17
- "extraContext": {},
18
- "hash": "0d52ee42",
19
- "messageId": "2f82f3d1-de96-4e70-b6f0-6bd10a200ad6",
20
- "codeBlockId": null,
21
- "isActive": true
22
- }
23
- },
24
- "lines": {
25
- "0": {
26
- "chunkId": "ba71e7",
27
- "hash": "47009686",
28
- "encoded": "%7B",
29
- "prevChunkIds": []
30
- },
31
- "1": {
32
- "chunkId": "ba71e7",
33
- "hash": "c1221f13",
34
- "encoded": "%22compilerOptions%22:%20%7B",
35
- "prevChunkIds": []
36
- },
37
- "2": {
38
- "chunkId": "ba71e7",
39
- "hash": "dbfbff26",
40
- "encoded": "%22types%22:%20%5B%22node%22%5D,",
41
- "prevChunkIds": []
42
- },
43
- "4": {
44
- "chunkId": "ba71e7",
45
- "hash": "57c8aecd",
46
- "encoded": "%22esModuleInterop%22:%20true,",
47
- "prevChunkIds": []
48
- },
49
- "5": {
50
- "chunkId": "ba71e7",
51
- "hash": "54a5ae06",
52
- "encoded": "%22skipLibCheck%22:%20true,",
53
- "prevChunkIds": []
54
- },
55
- "6": {
56
- "chunkId": "ba71e7",
57
- "hash": "fe5f646c",
58
- "encoded": "%22target%22:%20%22ES2020%22,",
59
- "prevChunkIds": []
60
- },
61
- "9": {
62
- "chunkId": "ba71e7",
63
- "hash": "e58a5dfb",
64
- "encoded": "%7D,",
65
- "prevChunkIds": []
66
- },
67
- "10": {
68
- "chunkId": "ba71e7",
69
- "hash": "ce5ebcb5",
70
- "encoded": "%22include%22:%20%5B%22**/*.ts%22%5D,",
71
- "prevChunkIds": []
72
- },
73
- "11": {
74
- "chunkId": "ba71e7",
75
- "hash": "b7a45cbe",
76
- "encoded": "%22exclude%22:%20%5B%22node_modules%22%5D",
77
- "prevChunkIds": []
78
- },
79
- "12": {
80
- "chunkId": "ba71e7",
81
- "hash": "6a3f2143",
82
- "encoded": "%7D",
83
- "prevChunkIds": []
84
- }
85
- }
86
- }
87
- }
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "types": ["node"],
4
- "moduleResolution": "nodenext",
5
- "esModuleInterop": true,
6
- "skipLibCheck": true,
7
- "target": "ES2020",
8
- "module": "NodeNext",
9
- "lib": ["ES2022"]
10
- },
11
- "include": ["**/*.ts"],
12
- "exclude": ["node_modules"]
13
- }