pi-subagentura 1.0.0 → 1.0.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.
- package/LICENSE +21 -0
- package/README.md +112 -0
- package/package.json +12 -3
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,112 @@
|
|
|
1
|
+
# pi-subagentura
|
|
2
|
+
|
|
3
|
+
A public [Pi](https://pi.dev) package that adds two in-process sub-agent tools:
|
|
4
|
+
|
|
5
|
+
- `subagent_with_context` — spawn a sub-agent that inherits the full conversation history
|
|
6
|
+
- `subagent_isolated` — spawn a sub-agent with a fresh, empty context window
|
|
7
|
+
|
|
8
|
+
The sub-agents run inside the current Pi process, stream live progress back to the UI, and inherit the active model by default.
|
|
9
|
+
|
|
10
|
+
## Why use it?
|
|
11
|
+
|
|
12
|
+
- Delegate focused side-tasks without leaving the current session
|
|
13
|
+
- Compare context-aware vs isolated reasoning
|
|
14
|
+
- Keep tool feedback lightweight with live status updates
|
|
15
|
+
- Avoid subprocess overhead for sub-agent execution
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Install globally:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pi install npm:pi-subagentura
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Install for just the current project:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pi install -l npm:pi-subagentura
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Try it for a single run without installing:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pi -e npm:pi-subagentura
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
You can also install directly from GitHub:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pi install git:github.com/lmn451/pi-subagentura
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Tools
|
|
44
|
+
|
|
45
|
+
### `subagent_with_context`
|
|
46
|
+
|
|
47
|
+
Starts a sub-agent with the current conversation history included in its prompt.
|
|
48
|
+
|
|
49
|
+
Parameters:
|
|
50
|
+
|
|
51
|
+
- `task` — required task for the sub-agent
|
|
52
|
+
- `persona` — optional system-style persona
|
|
53
|
+
- `model` — optional model override like `anthropic/claude-sonnet-4-5`
|
|
54
|
+
- `cwd` — optional working directory override
|
|
55
|
+
|
|
56
|
+
Best for:
|
|
57
|
+
|
|
58
|
+
- review tasks that depend on prior discussion
|
|
59
|
+
- continuing a line of reasoning in parallel
|
|
60
|
+
- focused implementation or research using the current context
|
|
61
|
+
|
|
62
|
+
### `subagent_isolated`
|
|
63
|
+
|
|
64
|
+
Starts a sub-agent with no inherited conversation history.
|
|
65
|
+
|
|
66
|
+
Parameters:
|
|
67
|
+
|
|
68
|
+
- `task` — required task for the sub-agent
|
|
69
|
+
- `persona` — optional system-style persona
|
|
70
|
+
- `model` — optional model override like `anthropic/claude-sonnet-4-5`
|
|
71
|
+
- `cwd` — optional working directory override
|
|
72
|
+
|
|
73
|
+
Best for:
|
|
74
|
+
|
|
75
|
+
- second opinions
|
|
76
|
+
- clean-room summaries
|
|
77
|
+
- avoiding context contamination from the parent session
|
|
78
|
+
|
|
79
|
+
## Example prompts
|
|
80
|
+
|
|
81
|
+
- “Use a sub-agent to review this change and list risks.”
|
|
82
|
+
- “Use an isolated sub-agent to propose a README outline for this repo.”
|
|
83
|
+
- “Spawn a context-aware sub-agent to continue debugging while we keep planning here.”
|
|
84
|
+
|
|
85
|
+
## Development
|
|
86
|
+
|
|
87
|
+
This repo uses Bun for local development.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
bun install
|
|
91
|
+
bun test
|
|
92
|
+
bun run pack:check
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Release
|
|
96
|
+
|
|
97
|
+
Publishing is handled by GitHub Actions when you push a `v*` tag that matches `package.json`.
|
|
98
|
+
|
|
99
|
+
Example:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm version patch
|
|
103
|
+
git push origin master --follow-tags
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Contributing
|
|
107
|
+
|
|
108
|
+
Contributions are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
[MIT](./LICENSE)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-subagentura",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.2",
|
|
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"
|