pi-subagentura 1.0.0 → 1.0.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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +107 -0
  3. package/package.json +14 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 lmn451
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # pi-subagentura
2
+
3
+ [![npm](https://img.shields.io/npm/v/pi-subagentura?label=npm)](https://npmjs.com/package/pi-subagentura) [![GitHub](https://img.shields.io/github/v/tag/lmn451/pi-subagentura?label=github)](https://github.com/lmn451/pi-subagentura)
4
+
5
+ > **Note:** The `docs/` folder is managed by the [`pi-docs`](https://github.com/lmn451/pi-docs) package.
6
+
7
+ A public [Pi](https://pi.dev) package that adds two in-process sub-agent tools:
8
+
9
+ - `subagent_with_context` — spawn a sub-agent that inherits the full conversation history
10
+ - `subagent_isolated` — spawn a sub-agent with a fresh, empty context window
11
+
12
+ The sub-agents run inside the current Pi process, stream live progress back to the UI, and inherit the active model by default.
13
+
14
+ ## Why use it?
15
+
16
+ - Delegate focused side-tasks without leaving the current session
17
+ - Compare context-aware vs isolated reasoning
18
+ - Keep tool feedback lightweight with live status updates
19
+ - Avoid subprocess overhead for sub-agent execution
20
+
21
+ ![Sub-agent demo](working.png)
22
+
23
+ ## Installation
24
+
25
+ Install globally:
26
+
27
+ ```bash
28
+ pi install npm:pi-subagentura
29
+ ```
30
+
31
+ Install for just the current project:
32
+
33
+ ```bash
34
+ pi install -l npm:pi-subagentura
35
+ ```
36
+
37
+ Try it for a single run without installing:
38
+
39
+ ```bash
40
+ pi -e npm:pi-subagentura
41
+ ```
42
+
43
+ You can also install directly from GitHub:
44
+
45
+ ```bash
46
+ pi install git:github.com/lmn451/pi-subagentura
47
+ ```
48
+
49
+ ## Tools
50
+
51
+ ### `subagent_with_context`
52
+
53
+ Starts a sub-agent with the current conversation history included in its prompt.
54
+
55
+ Parameters:
56
+
57
+ - `task` — required task for the sub-agent
58
+ - `persona` — optional system-style persona
59
+ - `model` — optional model override like `anthropic/claude-sonnet-4-5`
60
+ - `cwd` — optional working directory override
61
+
62
+ Best for:
63
+
64
+ - review tasks that depend on prior discussion
65
+ - continuing a line of reasoning in parallel
66
+ - focused implementation or research using the current context
67
+
68
+ ### `subagent_isolated`
69
+
70
+ Starts a sub-agent with no inherited conversation history.
71
+
72
+ Parameters:
73
+
74
+ - `task` — required task for the sub-agent
75
+ - `persona` — optional system-style persona
76
+ - `model` — optional model override like `anthropic/claude-sonnet-4-5`
77
+ - `cwd` — optional working directory override
78
+
79
+ Best for:
80
+
81
+ - second opinions
82
+ - clean-room summaries
83
+ - avoiding context contamination from the parent session
84
+
85
+ ## Example prompts
86
+
87
+ - “Use a sub-agent to review this change and list risks.”
88
+ - “Use an isolated sub-agent to propose a README outline for this repo.”
89
+ - “Spawn a context-aware sub-agent to continue debugging while we keep planning here.”
90
+
91
+ ## Development
92
+
93
+ This repo uses Bun for local development.
94
+
95
+ ```bash
96
+ bun install
97
+ bun test
98
+ bun run pack:check
99
+ ```
100
+
101
+ ## Contributing
102
+
103
+ Contributions are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md).
104
+
105
+ ## License
106
+
107
+ [MIT](./LICENSE)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-subagentura",
3
- "version": "1.0.0",
4
- "description": "Sub-agent engine extension for Pi — spawn in-process sub-agents via the SDK",
3
+ "version": "1.0.3",
4
+ "description": "Public Pi package that adds in-process sub-agents via the SDK",
5
5
  "main": "subagent.ts",
6
6
  "type": "module",
7
7
  "keywords": [
@@ -14,9 +14,18 @@
14
14
  "crew"
15
15
  ],
16
16
  "license": "MIT",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/lmn451/pi-subagentura"
20
+ },
21
+ "homepage": "https://github.com/lmn451/pi-subagentura#readme",
22
+ "bugs": {
23
+ "url": "https://github.com/lmn451/pi-subagentura/issues"
24
+ },
17
25
  "files": [
18
26
  "subagent.ts",
19
- "README.md"
27
+ "README.md",
28
+ "LICENSE"
20
29
  ],
21
30
  "engines": {
22
31
  "bun": ">=1.0.0"
@@ -40,5 +49,6 @@
40
49
  "@mariozechner/pi-ai": "*",
41
50
  "@mariozechner/pi-tui": "*",
42
51
  "typebox": "*"
43
- }
52
+ },
53
+ "packageManager": "bun@1.3.11"
44
54
  }