@pi-unipi/subagents 0.2.2 → 0.2.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.
- package/package.json +1 -1
- package/src/__tests__/badge-generation.test.ts +244 -0
- package/src/index.ts +28 -7
- package/dist/__tests__/config.test.d.ts +0 -11
- package/dist/__tests__/config.test.d.ts.map +0 -1
- package/dist/__tests__/config.test.js +0 -196
- package/dist/__tests__/config.test.js.map +0 -1
- package/dist/__tests__/esc-propagation.test.d.ts +0 -10
- package/dist/__tests__/esc-propagation.test.d.ts.map +0 -1
- package/dist/__tests__/esc-propagation.test.js +0 -140
- package/dist/__tests__/esc-propagation.test.js.map +0 -1
- package/dist/__tests__/file-lock.test.d.ts +0 -12
- package/dist/__tests__/file-lock.test.d.ts.map +0 -1
- package/dist/__tests__/file-lock.test.js +0 -187
- package/dist/__tests__/file-lock.test.js.map +0 -1
- package/dist/__tests__/workflow-integration.test.d.ts +0 -12
- package/dist/__tests__/workflow-integration.test.d.ts.map +0 -1
- package/dist/__tests__/workflow-integration.test.js +0 -261
- package/dist/__tests__/workflow-integration.test.js.map +0 -1
- package/dist/agent-manager.d.ts +0 -75
- package/dist/agent-manager.d.ts.map +0 -1
- package/dist/agent-manager.js +0 -268
- package/dist/agent-manager.js.map +0 -1
- package/dist/agent-runner.d.ts +0 -51
- package/dist/agent-runner.d.ts.map +0 -1
- package/dist/agent-runner.js +0 -254
- package/dist/agent-runner.js.map +0 -1
- package/dist/config.d.ts +0 -24
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -132
- package/dist/config.js.map +0 -1
- package/dist/conversation-viewer.d.ts +0 -40
- package/dist/conversation-viewer.d.ts.map +0 -1
- package/dist/conversation-viewer.js +0 -276
- package/dist/conversation-viewer.js.map +0 -1
- package/dist/custom-agents.d.ts +0 -14
- package/dist/custom-agents.d.ts.map +0 -1
- package/dist/custom-agents.js +0 -106
- package/dist/custom-agents.js.map +0 -1
- package/dist/file-lock.d.ts +0 -42
- package/dist/file-lock.d.ts.map +0 -1
- package/dist/file-lock.js +0 -91
- package/dist/file-lock.js.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -653
- package/dist/index.js.map +0 -1
- package/dist/model-resolver.d.ts +0 -19
- package/dist/model-resolver.d.ts.map +0 -1
- package/dist/model-resolver.js +0 -61
- package/dist/model-resolver.js.map +0 -1
- package/dist/prompts.d.ts +0 -13
- package/dist/prompts.d.ts.map +0 -1
- package/dist/prompts.js +0 -31
- package/dist/prompts.js.map +0 -1
- package/dist/types.d.ts +0 -96
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -36
- package/dist/types.js.map +0 -1
- package/dist/widget.d.ts +0 -55
- package/dist/widget.d.ts.map +0 -1
- package/dist/widget.js +0 -404
- package/dist/widget.js.map +0 -1
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @pi-unipi/subagents — Conversation Viewer
|
|
3
|
-
*
|
|
4
|
-
* Live-scrolling overlay for viewing agent conversations.
|
|
5
|
-
* Subscribes to session events for real-time streaming updates.
|
|
6
|
-
* Supports keyboard navigation: ↑↓, PgUp/PgDn, Home/End, Esc/q to close.
|
|
7
|
-
*/
|
|
8
|
-
import { matchesKey, truncateToWidth, visibleWidth, wrapTextWithAnsi, } from "@mariozechner/pi-tui";
|
|
9
|
-
/** Lines consumed by chrome: top border + header + header sep + footer sep + footer + bottom border. */
|
|
10
|
-
const CHROME_LINES = 6;
|
|
11
|
-
const MIN_VIEWPORT = 3;
|
|
12
|
-
/** Extract text from content array. */
|
|
13
|
-
function extractText(content) {
|
|
14
|
-
if (typeof content === "string")
|
|
15
|
-
return content;
|
|
16
|
-
return content
|
|
17
|
-
.filter((p) => p.type === "text" && typeof p.text === "string")
|
|
18
|
-
.map((p) => p.text)
|
|
19
|
-
.join("");
|
|
20
|
-
}
|
|
21
|
-
/** Format duration. */
|
|
22
|
-
function formatMs(ms) {
|
|
23
|
-
if (ms >= 60_000)
|
|
24
|
-
return `${(ms / 60_000).toFixed(1)}m`;
|
|
25
|
-
if (ms >= 1_000)
|
|
26
|
-
return `${(ms / 1_000).toFixed(1)}s`;
|
|
27
|
-
return `${ms}ms`;
|
|
28
|
-
}
|
|
29
|
-
/** Format tokens compactly. */
|
|
30
|
-
function formatTokens(count) {
|
|
31
|
-
if (count >= 1_000_000)
|
|
32
|
-
return `${(count / 1_000_000).toFixed(1)}M token`;
|
|
33
|
-
if (count >= 1_000)
|
|
34
|
-
return `${(count / 1_000).toFixed(1)}k token`;
|
|
35
|
-
return `${count} token`;
|
|
36
|
-
}
|
|
37
|
-
/** Describe current activity from active tools. */
|
|
38
|
-
function describeActivity(activeTools, responseText) {
|
|
39
|
-
if (activeTools.size > 0) {
|
|
40
|
-
const names = [...new Set(activeTools.values())];
|
|
41
|
-
return names.join(", ") + "…";
|
|
42
|
-
}
|
|
43
|
-
if (responseText && responseText.trim().length > 0) {
|
|
44
|
-
const lastLine = responseText.split("\n").find((l) => l.trim())?.trim() ?? "";
|
|
45
|
-
if (lastLine.length > 60)
|
|
46
|
-
return lastLine.slice(0, 60) + "…";
|
|
47
|
-
if (lastLine.length > 0)
|
|
48
|
-
return lastLine;
|
|
49
|
-
}
|
|
50
|
-
return "thinking…";
|
|
51
|
-
}
|
|
52
|
-
export class ConversationViewer {
|
|
53
|
-
tui;
|
|
54
|
-
session;
|
|
55
|
-
record;
|
|
56
|
-
activity;
|
|
57
|
-
theme;
|
|
58
|
-
done;
|
|
59
|
-
scrollOffset = 0;
|
|
60
|
-
autoScroll = true;
|
|
61
|
-
unsubscribe;
|
|
62
|
-
lastInnerW = 0;
|
|
63
|
-
closed = false;
|
|
64
|
-
constructor(tui, session, record, activity, theme, done) {
|
|
65
|
-
this.tui = tui;
|
|
66
|
-
this.session = session;
|
|
67
|
-
this.record = record;
|
|
68
|
-
this.activity = activity;
|
|
69
|
-
this.theme = theme;
|
|
70
|
-
this.done = done;
|
|
71
|
-
this.unsubscribe = session.subscribe(() => {
|
|
72
|
-
if (this.closed)
|
|
73
|
-
return;
|
|
74
|
-
this.tui.requestRender();
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
handleInput(data) {
|
|
78
|
-
if (matchesKey(data, "escape") || matchesKey(data, "q")) {
|
|
79
|
-
this.closed = true;
|
|
80
|
-
this.done(undefined);
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const totalLines = this.buildContentLines(this.lastInnerW).length;
|
|
84
|
-
const viewportHeight = this.viewportHeight();
|
|
85
|
-
const maxScroll = Math.max(0, totalLines - viewportHeight);
|
|
86
|
-
if (matchesKey(data, "up") || matchesKey(data, "k")) {
|
|
87
|
-
this.scrollOffset = Math.max(0, this.scrollOffset - 1);
|
|
88
|
-
this.autoScroll = this.scrollOffset >= maxScroll;
|
|
89
|
-
}
|
|
90
|
-
else if (matchesKey(data, "down") || matchesKey(data, "j")) {
|
|
91
|
-
this.scrollOffset = Math.min(maxScroll, this.scrollOffset + 1);
|
|
92
|
-
this.autoScroll = this.scrollOffset >= maxScroll;
|
|
93
|
-
}
|
|
94
|
-
else if (matchesKey(data, "pageUp")) {
|
|
95
|
-
this.scrollOffset = Math.max(0, this.scrollOffset - viewportHeight);
|
|
96
|
-
this.autoScroll = false;
|
|
97
|
-
}
|
|
98
|
-
else if (matchesKey(data, "pageDown")) {
|
|
99
|
-
this.scrollOffset = Math.min(maxScroll, this.scrollOffset + viewportHeight);
|
|
100
|
-
this.autoScroll = this.scrollOffset >= maxScroll;
|
|
101
|
-
}
|
|
102
|
-
else if (matchesKey(data, "home")) {
|
|
103
|
-
this.scrollOffset = 0;
|
|
104
|
-
this.autoScroll = false;
|
|
105
|
-
}
|
|
106
|
-
else if (matchesKey(data, "end")) {
|
|
107
|
-
this.scrollOffset = maxScroll;
|
|
108
|
-
this.autoScroll = true;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
render(width) {
|
|
112
|
-
if (width < 6)
|
|
113
|
-
return [];
|
|
114
|
-
const th = this.theme;
|
|
115
|
-
const innerW = width - 4; // border + padding
|
|
116
|
-
this.lastInnerW = innerW;
|
|
117
|
-
const lines = [];
|
|
118
|
-
const pad = (s, len) => {
|
|
119
|
-
const vis = visibleWidth(s);
|
|
120
|
-
return s + " ".repeat(Math.max(0, len - vis));
|
|
121
|
-
};
|
|
122
|
-
const row = (content) => th.fg("border", "│") + " " + truncateToWidth(pad(content, innerW), innerW) + " " + th.fg("border", "│");
|
|
123
|
-
const hrTop = th.fg("border", `╭${"─".repeat(width - 2)}╮`);
|
|
124
|
-
const hrBot = th.fg("border", `╰${"─".repeat(width - 2)}╯`);
|
|
125
|
-
const hrMid = row(th.fg("dim", "─".repeat(innerW)));
|
|
126
|
-
// Header
|
|
127
|
-
lines.push(hrTop);
|
|
128
|
-
const name = this.record.type;
|
|
129
|
-
const statusIcon = this.record.status === "running"
|
|
130
|
-
? th.fg("accent", "●")
|
|
131
|
-
: this.record.status === "completed"
|
|
132
|
-
? th.fg("success", "✓")
|
|
133
|
-
: this.record.status === "error"
|
|
134
|
-
? th.fg("error", "✗")
|
|
135
|
-
: th.fg("dim", "○");
|
|
136
|
-
const duration = this.record.completedAt
|
|
137
|
-
? formatMs(this.record.completedAt - this.record.startedAt)
|
|
138
|
-
: `${formatMs(Date.now() - this.record.startedAt)} (running)`;
|
|
139
|
-
const headerParts = [duration];
|
|
140
|
-
const toolUses = this.activity?.toolUses ?? this.record.toolUses;
|
|
141
|
-
if (toolUses > 0)
|
|
142
|
-
headerParts.unshift(`${toolUses} tool${toolUses === 1 ? "" : "s"}`);
|
|
143
|
-
if (this.activity?.session) {
|
|
144
|
-
try {
|
|
145
|
-
const tokens = this.activity.session.getSessionStats().tokens.total;
|
|
146
|
-
if (tokens > 0)
|
|
147
|
-
headerParts.push(formatTokens(tokens));
|
|
148
|
-
}
|
|
149
|
-
catch {
|
|
150
|
-
/* */
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
lines.push(row(`${statusIcon} ${th.bold(name)} ${th.fg("muted", this.record.description)} ${th.fg("dim", "·")} ${th.fg("dim", headerParts.join(" · "))}`));
|
|
154
|
-
lines.push(hrMid);
|
|
155
|
-
// Content area
|
|
156
|
-
const contentLines = this.buildContentLines(innerW);
|
|
157
|
-
const viewportHeight = this.viewportHeight();
|
|
158
|
-
const maxScroll = Math.max(0, contentLines.length - viewportHeight);
|
|
159
|
-
if (this.autoScroll) {
|
|
160
|
-
this.scrollOffset = maxScroll;
|
|
161
|
-
}
|
|
162
|
-
const visibleStart = Math.min(this.scrollOffset, maxScroll);
|
|
163
|
-
const visible = contentLines.slice(visibleStart, visibleStart + viewportHeight);
|
|
164
|
-
for (let i = 0; i < viewportHeight; i++) {
|
|
165
|
-
lines.push(row(visible[i] ?? ""));
|
|
166
|
-
}
|
|
167
|
-
// Footer
|
|
168
|
-
lines.push(hrMid);
|
|
169
|
-
const scrollPct = contentLines.length <= viewportHeight
|
|
170
|
-
? "100%"
|
|
171
|
-
: `${Math.round(((visibleStart + viewportHeight) / contentLines.length) * 100)}%`;
|
|
172
|
-
const footerLeft = th.fg("dim", `${contentLines.length} lines · ${scrollPct}`);
|
|
173
|
-
const footerRight = th.fg("dim", "↑↓ scroll · PgUp/PgDn · Esc close");
|
|
174
|
-
const footerGap = Math.max(1, innerW - visibleWidth(footerLeft) - visibleWidth(footerRight));
|
|
175
|
-
lines.push(row(footerLeft + " ".repeat(footerGap) + footerRight));
|
|
176
|
-
lines.push(hrBot);
|
|
177
|
-
return lines;
|
|
178
|
-
}
|
|
179
|
-
invalidate() {
|
|
180
|
-
/* no cached state to clear */
|
|
181
|
-
}
|
|
182
|
-
dispose() {
|
|
183
|
-
this.closed = true;
|
|
184
|
-
if (this.unsubscribe) {
|
|
185
|
-
this.unsubscribe();
|
|
186
|
-
this.unsubscribe = undefined;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
// ---- Private ----
|
|
190
|
-
viewportHeight() {
|
|
191
|
-
return Math.max(MIN_VIEWPORT, this.tui.terminal.rows - CHROME_LINES);
|
|
192
|
-
}
|
|
193
|
-
buildContentLines(width) {
|
|
194
|
-
if (width <= 0)
|
|
195
|
-
return [];
|
|
196
|
-
const th = this.theme;
|
|
197
|
-
const messages = this.session.messages;
|
|
198
|
-
const lines = [];
|
|
199
|
-
if (!messages || messages.length === 0) {
|
|
200
|
-
lines.push(th.fg("dim", "(waiting for first message...)"));
|
|
201
|
-
return lines;
|
|
202
|
-
}
|
|
203
|
-
let needsSeparator = false;
|
|
204
|
-
for (const msg of messages) {
|
|
205
|
-
if (msg.role === "user") {
|
|
206
|
-
const text = typeof msg.content === "string" ? msg.content : extractText(msg.content);
|
|
207
|
-
if (!text.trim())
|
|
208
|
-
continue;
|
|
209
|
-
if (needsSeparator)
|
|
210
|
-
lines.push(th.fg("dim", "───"));
|
|
211
|
-
lines.push(th.fg("accent", "[User]"));
|
|
212
|
-
for (const line of wrapTextWithAnsi(text.trim(), width)) {
|
|
213
|
-
lines.push(line);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
else if (msg.role === "assistant") {
|
|
217
|
-
const textParts = [];
|
|
218
|
-
const toolCalls = [];
|
|
219
|
-
for (const c of msg.content) {
|
|
220
|
-
if (c.type === "text" && c.text)
|
|
221
|
-
textParts.push(c.text);
|
|
222
|
-
else if (c.type === "tool_use" || c.type === "toolCall") {
|
|
223
|
-
toolCalls.push(c.name ?? c.toolName ?? "unknown");
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
if (needsSeparator)
|
|
227
|
-
lines.push(th.fg("dim", "───"));
|
|
228
|
-
lines.push(th.bold("[Assistant]"));
|
|
229
|
-
if (textParts.length > 0) {
|
|
230
|
-
for (const line of wrapTextWithAnsi(textParts.join("\n").trim(), width)) {
|
|
231
|
-
lines.push(line);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
for (const name of toolCalls) {
|
|
235
|
-
lines.push(truncateToWidth(th.fg("muted", ` [Tool: ${name}]`), width));
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
else if (msg.role === "toolResult") {
|
|
239
|
-
const text = extractText(msg.content);
|
|
240
|
-
const truncated = text.length > 500 ? text.slice(0, 500) + "... (truncated)" : text;
|
|
241
|
-
if (!truncated.trim())
|
|
242
|
-
continue;
|
|
243
|
-
if (needsSeparator)
|
|
244
|
-
lines.push(th.fg("dim", "───"));
|
|
245
|
-
lines.push(th.fg("dim", "[Result]"));
|
|
246
|
-
for (const line of wrapTextWithAnsi(truncated.trim(), width)) {
|
|
247
|
-
lines.push(th.fg("dim", line));
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
else if (msg.role === "bashExecution") {
|
|
251
|
-
const bash = msg;
|
|
252
|
-
if (needsSeparator)
|
|
253
|
-
lines.push(th.fg("dim", "───"));
|
|
254
|
-
lines.push(truncateToWidth(th.fg("muted", ` $ ${bash.command}`), width));
|
|
255
|
-
if (bash.output?.trim()) {
|
|
256
|
-
const out = bash.output.length > 500 ? bash.output.slice(0, 500) + "... (truncated)" : bash.output;
|
|
257
|
-
for (const line of wrapTextWithAnsi(out.trim(), width)) {
|
|
258
|
-
lines.push(th.fg("dim", line));
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
else {
|
|
263
|
-
continue;
|
|
264
|
-
}
|
|
265
|
-
needsSeparator = true;
|
|
266
|
-
}
|
|
267
|
-
// Streaming indicator for running agents
|
|
268
|
-
if (this.record.status === "running" && this.activity) {
|
|
269
|
-
const act = describeActivity(this.activity.activeTools, this.activity.responseText);
|
|
270
|
-
lines.push("");
|
|
271
|
-
lines.push(truncateToWidth(th.fg("accent", "▍ ") + th.fg("dim", act), width));
|
|
272
|
-
}
|
|
273
|
-
return lines.map((l) => truncateToWidth(l, width));
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
//# sourceMappingURL=conversation-viewer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,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C;gBACH,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,SAAS;YACX,CAAC;YACD,cAAc,GAAG,IAAI,CAAC;QACxB,CAAC;QAED,yCAAyC;QACzC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACtD,MAAM,GAAG,GAAG,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;YACpF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QAChF,CAAC;QAED,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IACrD,CAAC;CACF"}
|
package/dist/custom-agents.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @pi-unipi/subagents — Custom agent loader
|
|
3
|
-
*
|
|
4
|
-
* Discovers agent types from:
|
|
5
|
-
* - <workspace>/.unipi/config/agents/*.md (project, highest priority)
|
|
6
|
-
* - ~/.unipi/config/agents/*.md (global)
|
|
7
|
-
*/
|
|
8
|
-
import type { AgentConfig } from "./types.js";
|
|
9
|
-
/**
|
|
10
|
-
* Load all custom agents from project and global directories.
|
|
11
|
-
* Project agents override global agents with the same name.
|
|
12
|
-
*/
|
|
13
|
-
export declare function loadCustomAgents(cwd: string): Map<string, AgentConfig>;
|
|
14
|
-
//# sourceMappingURL=custom-agents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-agents.d.ts","sourceRoot":"","sources":["../src/custom-agents.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAyE9C;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CA4BtE"}
|
package/dist/custom-agents.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @pi-unipi/subagents — Custom agent loader
|
|
3
|
-
*
|
|
4
|
-
* Discovers agent types from:
|
|
5
|
-
* - <workspace>/.unipi/config/agents/*.md (project, highest priority)
|
|
6
|
-
* - ~/.unipi/config/agents/*.md (global)
|
|
7
|
-
*/
|
|
8
|
-
import { existsSync, readdirSync, readFileSync, renameSync } from "node:fs";
|
|
9
|
-
import { join } from "node:path";
|
|
10
|
-
import { homedir } from "node:os";
|
|
11
|
-
import { parseFrontmatter } from "@mariozechner/pi-coding-agent";
|
|
12
|
-
/** Backup a corrupted file by renaming to .bak */
|
|
13
|
-
function backupCorrupted(filePath) {
|
|
14
|
-
const backupPath = filePath + ".bak";
|
|
15
|
-
try {
|
|
16
|
-
renameSync(filePath, backupPath);
|
|
17
|
-
}
|
|
18
|
-
catch {
|
|
19
|
-
// If backup fails, just leave it
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
/** Get project agents directory. */
|
|
23
|
-
function getProjectAgentsDir(cwd) {
|
|
24
|
-
return join(cwd, ".unipi", "config", "agents");
|
|
25
|
-
}
|
|
26
|
-
/** Get global agents directory. */
|
|
27
|
-
function getGlobalAgentsDir() {
|
|
28
|
-
return join(homedir(), ".unipi", "config", "agents");
|
|
29
|
-
}
|
|
30
|
-
/** All known built-in tool names. */
|
|
31
|
-
const BUILTIN_TOOL_NAMES = ["read", "bash", "edit", "write", "grep", "find", "ls"];
|
|
32
|
-
/**
|
|
33
|
-
* Load a single agent from a .md file.
|
|
34
|
-
*/
|
|
35
|
-
function loadAgentFromFile(filePath, source) {
|
|
36
|
-
try {
|
|
37
|
-
const content = readFileSync(filePath, "utf-8");
|
|
38
|
-
const { frontmatter, body } = parseFrontmatter(content);
|
|
39
|
-
if (!frontmatter || typeof frontmatter !== "object") {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
const name = filePath.split("/").pop()?.replace(/\.md$/, "") ?? "unknown";
|
|
43
|
-
// Parse tools from comma-separated string
|
|
44
|
-
const toolsStr = frontmatter.tools;
|
|
45
|
-
const builtinToolNames = toolsStr
|
|
46
|
-
? toolsStr.split(",").map((t) => t.trim()).filter((t) => BUILTIN_TOOL_NAMES.includes(t))
|
|
47
|
-
: [...BUILTIN_TOOL_NAMES];
|
|
48
|
-
return {
|
|
49
|
-
name,
|
|
50
|
-
displayName: frontmatter.display_name,
|
|
51
|
-
description: frontmatter.description ?? `${name} agent`,
|
|
52
|
-
builtinToolNames,
|
|
53
|
-
disallowedTools: frontmatter.disallowed_tools
|
|
54
|
-
?.split(",")
|
|
55
|
-
.map((t) => t.trim()),
|
|
56
|
-
extensions: frontmatter.extensions !== false,
|
|
57
|
-
skills: frontmatter.skills !== false,
|
|
58
|
-
model: frontmatter.model,
|
|
59
|
-
thinking: frontmatter.thinking,
|
|
60
|
-
maxTurns: frontmatter.max_turns,
|
|
61
|
-
systemPrompt: body.trim(),
|
|
62
|
-
promptMode: frontmatter.prompt_mode ?? "replace",
|
|
63
|
-
inheritContext: frontmatter.inherit_context,
|
|
64
|
-
runInBackground: frontmatter.run_in_background,
|
|
65
|
-
isolated: frontmatter.isolated,
|
|
66
|
-
enabled: frontmatter.enabled !== false,
|
|
67
|
-
source,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
catch {
|
|
71
|
-
// Corrupted file — backup and skip
|
|
72
|
-
backupCorrupted(filePath);
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Load all custom agents from project and global directories.
|
|
78
|
-
* Project agents override global agents with the same name.
|
|
79
|
-
*/
|
|
80
|
-
export function loadCustomAgents(cwd) {
|
|
81
|
-
const agents = new Map();
|
|
82
|
-
// Load global agents first
|
|
83
|
-
const globalDir = getGlobalAgentsDir();
|
|
84
|
-
if (existsSync(globalDir)) {
|
|
85
|
-
const files = readdirSync(globalDir).filter((f) => f.endsWith(".md"));
|
|
86
|
-
for (const file of files) {
|
|
87
|
-
const agent = loadAgentFromFile(join(globalDir, file), "global");
|
|
88
|
-
if (agent) {
|
|
89
|
-
agents.set(agent.name, agent);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
// Load project agents (overrides global)
|
|
94
|
-
const projectDir = getProjectAgentsDir(cwd);
|
|
95
|
-
if (existsSync(projectDir)) {
|
|
96
|
-
const files = readdirSync(projectDir).filter((f) => f.endsWith(".md"));
|
|
97
|
-
for (const file of files) {
|
|
98
|
-
const agent = loadAgentFromFile(join(projectDir, file), "project");
|
|
99
|
-
if (agent) {
|
|
100
|
-
agents.set(agent.name, agent);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return agents;
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=custom-agents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-agents.js","sourceRoot":"","sources":["../src/custom-agents.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,kDAAkD;AAClD,SAAS,eAAe,CAAC,QAAgB;IACvC,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IACrC,IAAI,CA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AAC;IACvC,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC1B,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACtE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;YACjE,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;IAED,yCAAyC;IACzC,MAAM,UAAU,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC3B,MAAM,KAAK,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACvE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;YACnE,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/file-lock.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @pi-unipi/subagents — Per-file transparent locking
|
|
3
|
-
*
|
|
4
|
-
* Agents never see lock errors. Write tool queues internally.
|
|
5
|
-
* Per-file granularity: locking src/auth.ts doesn't block src/login.ts.
|
|
6
|
-
*/
|
|
7
|
-
export declare class FileLock {
|
|
8
|
-
/** Active locks by file path. */
|
|
9
|
-
private locks;
|
|
10
|
-
/** Queue of waiting acquires per file path. */
|
|
11
|
-
private queues;
|
|
12
|
-
/**
|
|
13
|
-
* Acquire a lock on a file. Blocks until available.
|
|
14
|
-
* Returns a release function.
|
|
15
|
-
*
|
|
16
|
-
* @param filePath - Absolute path to the file
|
|
17
|
-
* @param agentId - ID of the agent requesting the lock
|
|
18
|
-
* @returns Release function — call when done writing
|
|
19
|
-
*/
|
|
20
|
-
acquire(filePath: string, agentId: string): Promise<() => void>;
|
|
21
|
-
/**
|
|
22
|
-
* Check if a file is currently locked.
|
|
23
|
-
*/
|
|
24
|
-
isLocked(filePath: string): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Get the agent that holds a lock on a file.
|
|
27
|
-
*/
|
|
28
|
-
getHolder(filePath: string): string | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Get count of locked files.
|
|
31
|
-
*/
|
|
32
|
-
get lockCount(): number;
|
|
33
|
-
/**
|
|
34
|
-
* Release all locks held by an agent (on abort).
|
|
35
|
-
*/
|
|
36
|
-
releaseAll(agentId: string): void;
|
|
37
|
-
/**
|
|
38
|
-
* Clear all locks (on shutdown).
|
|
39
|
-
*/
|
|
40
|
-
clear(): void;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=file-lock.d.ts.map
|
package/dist/file-lock.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-lock.d.ts","sourceRoot":"","sources":["../src/file-lock.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,qBAAa,QAAQ;IACnB,iCAAiC;IACjC,OAAO,CAAC,KAAK,CAAoC;IACjD,+CAA+C;IAC/C,OAAO,CAAC,MAAM,CAAwC;IAEtD;;;;;;;OAOG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC;IAoCrE;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAInC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI/C;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAQjC;;OAEG;IACH,KAAK,IAAI,IAAI;CAOd"}
|
package/dist/file-lock.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @pi-unipi/subagents — Per-file transparent locking
|
|
3
|
-
*
|
|
4
|
-
* Agents never see lock errors. Write tool queues internally.
|
|
5
|
-
* Per-file granularity: locking src/auth.ts doesn't block src/login.ts.
|
|
6
|
-
*/
|
|
7
|
-
export class FileLock {
|
|
8
|
-
/** Active locks by file path. */
|
|
9
|
-
locks = new Map();
|
|
10
|
-
/** Queue of waiting acquires per file path. */
|
|
11
|
-
queues = new Map();
|
|
12
|
-
/**
|
|
13
|
-
* Acquire a lock on a file. Blocks until available.
|
|
14
|
-
* Returns a release function.
|
|
15
|
-
*
|
|
16
|
-
* @param filePath - Absolute path to the file
|
|
17
|
-
* @param agentId - ID of the agent requesting the lock
|
|
18
|
-
* @returns Release function — call when done writing
|
|
19
|
-
*/
|
|
20
|
-
async acquire(filePath, agentId) {
|
|
21
|
-
// Wait for existing lock
|
|
22
|
-
while (this.locks.has(filePath)) {
|
|
23
|
-
await new Promise((resolve) => {
|
|
24
|
-
const queue = this.queues.get(filePath) ?? [];
|
|
25
|
-
queue.push(resolve);
|
|
26
|
-
this.queues.set(filePath, queue);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
// Create lock entry
|
|
30
|
-
let releaseFn;
|
|
31
|
-
const promise = new Promise((resolve) => {
|
|
32
|
-
releaseFn = () => {
|
|
33
|
-
this.locks.delete(filePath);
|
|
34
|
-
resolve();
|
|
35
|
-
// Wake next waiter
|
|
36
|
-
const queue = this.queues.get(filePath);
|
|
37
|
-
if (queue && queue.length > 0) {
|
|
38
|
-
const next = queue.shift();
|
|
39
|
-
next();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
const entry = {
|
|
44
|
-
agentId,
|
|
45
|
-
filePath,
|
|
46
|
-
promise,
|
|
47
|
-
release: releaseFn,
|
|
48
|
-
};
|
|
49
|
-
this.locks.set(filePath, entry);
|
|
50
|
-
return releaseFn;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Check if a file is currently locked.
|
|
54
|
-
*/
|
|
55
|
-
isLocked(filePath) {
|
|
56
|
-
return this.locks.has(filePath);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Get the agent that holds a lock on a file.
|
|
60
|
-
*/
|
|
61
|
-
getHolder(filePath) {
|
|
62
|
-
return this.locks.get(filePath)?.agentId;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Get count of locked files.
|
|
66
|
-
*/
|
|
67
|
-
get lockCount() {
|
|
68
|
-
return this.locks.size;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Release all locks held by an agent (on abort).
|
|
72
|
-
*/
|
|
73
|
-
releaseAll(agentId) {
|
|
74
|
-
for (const [filePath, entry] of this.locks) {
|
|
75
|
-
if (entry.agentId === agentId) {
|
|
76
|
-
entry.release();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Clear all locks (on shutdown).
|
|
82
|
-
*/
|
|
83
|
-
clear() {
|
|
84
|
-
for (const entry of this.locks.values()) {
|
|
85
|
-
entry.release();
|
|
86
|
-
}
|
|
87
|
-
this.locks.clear();
|
|
88
|
-
this.queues.clear();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingUR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_helper, get_helper_result
|
|
5
|
-
* Features: renderCall/renderResult, message renderer, conversation viewer
|
|
6
|
-
* ESC propagation: all children abort on parent ESC
|
|
7
|
-
*/
|
|
8
|
-
import { type ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
9
|
-
export default function (pi: ExtensionAPI): void;
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAsH9E,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,YAAY,QAqnBxC"}
|