@pi-unipi/subagents 0.1.5 → 0.1.6
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/package.json +3 -2
- package/src/index.ts +32 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/subagents",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Subagents for UniPi — parallel execution, file locking, workflow integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@pi-unipi/core": "*",
|
|
20
|
-
"@pi-unipi/workflow": "*"
|
|
20
|
+
"@pi-unipi/workflow": "*",
|
|
21
|
+
"@pi-unipi/info-screen": "*"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"typescript": "^5.8.3"
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
import { defineTool, type ExtensionAPI, type ExtensionContext } from "@mariozechner/pi-coding-agent";
|
|
9
9
|
import { Text } from "@mariozechner/pi-tui";
|
|
10
10
|
import { Type } from "@sinclair/typebox";
|
|
11
|
+
|
|
12
|
+
// Get info registry from global
|
|
13
|
+
function getInfoRegistry() {
|
|
14
|
+
const g = globalThis as any;
|
|
15
|
+
return g.__unipi_info_registry;
|
|
16
|
+
}
|
|
11
17
|
import { AgentManager } from "./agent-manager.js";
|
|
12
18
|
import { initConfig, saveGlobalConfig } from "./config.js";
|
|
13
19
|
import { type AgentActivity, type AgentRecord, BUILTIN_TYPES } from "./types.js";
|
|
@@ -79,6 +85,32 @@ export default function (pi: ExtensionAPI) {
|
|
|
79
85
|
const workspaceConfig = `${ctx.cwd}/.unipi/config/subagents.json`;
|
|
80
86
|
const workspaceAgents = `${ctx.cwd}/.unipi/config/agents/`;
|
|
81
87
|
|
|
88
|
+
// Register info group
|
|
89
|
+
const registry = getInfoRegistry();
|
|
90
|
+
if (registry) {
|
|
91
|
+
registry.registerGroup({
|
|
92
|
+
id: "subagents",
|
|
93
|
+
name: "Subagents",
|
|
94
|
+
icon: "🤖",
|
|
95
|
+
priority: 80,
|
|
96
|
+
config: {
|
|
97
|
+
showByDefault: true,
|
|
98
|
+
stats: [
|
|
99
|
+
{ id: "maxConcurrent", label: "Max Concurrent", show: true },
|
|
100
|
+
{ id: "activeCount", label: "Active Agents", show: true },
|
|
101
|
+
{ id: "enabled", label: "Enabled", show: true },
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
dataProvider: async () => {
|
|
105
|
+
return {
|
|
106
|
+
maxConcurrent: { value: String(manager.getMaxConcurrent()) },
|
|
107
|
+
activeCount: { value: "N/A" },
|
|
108
|
+
enabled: { value: config.enabled ? "yes" : "no" },
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
82
114
|
ctx.ui.notify(
|
|
83
115
|
`UniPi Subagents config:\n` +
|
|
84
116
|
`• Global: ${globalConfig}\n` +
|