@pi-unipi/subagents 0.1.9 → 0.1.10

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 (2) hide show
  1. package/README.md +114 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # @pi-unipi/subagents
2
+
3
+ Parallel sub-agent execution for [Pi coding agent](https://github.com/badlogic/pi-mono). Spawn background or foreground agents, track activity, and manage concurrent work.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pi install npm:@pi-unipi/subagents
9
+ ```
10
+
11
+ Or as part of the full suite:
12
+ ```bash
13
+ pi install npm:unipi
14
+ ```
15
+
16
+ ## Tools
17
+
18
+ | Tool | Description |
19
+ |------|-------------|
20
+ | `spawn_helper` | Launch a sub-agent for parallel work |
21
+ | `get_helper_result` | Check status and retrieve results from a background agent |
22
+
23
+ ## Agent Types
24
+
25
+ | Type | Description |
26
+ |------|-------------|
27
+ | `explore` | Parallel file reads, research, analysis |
28
+ | `work` | Parallel file writes with transparent locking |
29
+ | Custom | Define your own in `~/.unipi/config/agents/<name>.md` |
30
+
31
+ ## Usage
32
+
33
+ ### Foreground (blocks until done)
34
+
35
+ ```
36
+ spawn_helper(
37
+ type: "explore",
38
+ prompt: "Find all auth-related files",
39
+ description: "Research auth files"
40
+ )
41
+ ```
42
+
43
+ ### Background (returns immediately)
44
+
45
+ ```
46
+ spawn_helper(
47
+ type: "work",
48
+ prompt: "Fix all lint errors in src/",
49
+ description: "Fix lint errors",
50
+ run_in_background: true
51
+ )
52
+ ```
53
+
54
+ ### Check Background Result
55
+
56
+ ```
57
+ get_helper_result(agent_id: "helper_abc123")
58
+ ```
59
+
60
+ ## Options
61
+
62
+ | Parameter | Description |
63
+ |-----------|-------------|
64
+ | `type` | Agent type (`explore`, `work`, or custom) |
65
+ | `prompt` | Task for the agent |
66
+ | `description` | Short description (3-5 words) |
67
+ | `run_in_background` | Return immediately, notify on completion |
68
+ | `max_turns` | Max agentic turns before stopping |
69
+ | `model` | Model override (e.g. `"haiku"`, `"sonnet"`) |
70
+ | `thinking` | Thinking level (`off`, `minimal`, `low`, `medium`, `high`, `xhigh`) |
71
+
72
+ ## Custom Agent Types
73
+
74
+ Create markdown files defining agent behavior:
75
+
76
+ ```bash
77
+ # Global agents
78
+ ~/.unipi/config/agents/reviewer.md
79
+
80
+ # Project agents
81
+ <workspace>/.unipi/config/agents/deployer.md
82
+ ```
83
+
84
+ ## Configuration
85
+
86
+ ```json
87
+ // ~/.unipi/config/subagents.json
88
+ {
89
+ "enabled": true,
90
+ "maxConcurrent": 3,
91
+ "types": {
92
+ "explore": { "enabled": true },
93
+ "work": { "enabled": true }
94
+ }
95
+ }
96
+ ```
97
+
98
+ ## Features
99
+
100
+ - **Concurrent execution** — run up to N agents simultaneously
101
+ - **File locking** — transparent locking for parallel writes
102
+ - **ESC propagation** — kill all agents with ESC
103
+ - **Activity tracking** — real-time widget showing agent progress
104
+ - **Info screen integration** — agent status in dashboard
105
+
106
+ ## Dependencies
107
+
108
+ - `@pi-unipi/core` — shared utilities
109
+ - `@pi-unipi/workflow` — workflow integration
110
+ - `@pi-unipi/info-screen` — dashboard registration
111
+
112
+ ## License
113
+
114
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/subagents",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Subagents for UniPi — parallel execution, file locking, workflow integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",