@melihmucuk/pi-crew 1.0.7 → 1.0.9
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/agents/code-reviewer.md +18 -6
- package/agents/planner.md +9 -1
- package/agents/quality-reviewer.md +20 -13
- package/agents/scout.md +33 -26
- package/dist/agent-discovery.d.ts +0 -5
- package/dist/agent-discovery.js +1 -1
- package/dist/bootstrap-session.d.ts +13 -4
- package/dist/bootstrap-session.js +25 -16
- package/dist/index.js +37 -7
- package/dist/integration/register-command.d.ts +2 -2
- package/dist/integration/register-command.js +5 -5
- package/dist/integration/register-renderers.js +3 -0
- package/dist/integration/register-tools.d.ts +2 -2
- package/dist/integration/register-tools.js +2 -2
- package/dist/integration/tool-presentation.d.ts +2 -3
- package/dist/integration/tool-presentation.js +7 -8
- package/dist/integration/tools/crew-abort.d.ts +1 -1
- package/dist/integration/tools/crew-abort.js +3 -3
- package/dist/integration/tools/crew-done.d.ts +1 -1
- package/dist/integration/tools/crew-done.js +2 -2
- package/dist/integration/tools/crew-list.d.ts +1 -1
- package/dist/integration/tools/crew-list.js +3 -3
- package/dist/integration/tools/crew-respond.d.ts +1 -1
- package/dist/integration/tools/crew-respond.js +6 -7
- package/dist/integration/tools/crew-spawn.d.ts +1 -1
- package/dist/integration/tools/crew-spawn.js +17 -14
- package/dist/integration/tools/tool-deps.d.ts +3 -2
- package/dist/integration.d.ts +2 -2
- package/dist/integration.js +3 -3
- package/dist/runtime/crew-runtime.d.ts +61 -0
- package/dist/{crew-manager.js → runtime/crew-runtime.js} +84 -58
- package/dist/runtime/delivery-coordinator.d.ts +16 -7
- package/dist/runtime/delivery-coordinator.js +46 -20
- package/dist/runtime/subagent-registry.d.ts +1 -0
- package/dist/runtime/subagent-registry.js +3 -0
- package/dist/runtime/subagent-state.d.ts +2 -0
- package/dist/status-widget.d.ts +2 -2
- package/dist/status-widget.js +3 -3
- package/dist/subagent-messages.d.ts +5 -2
- package/dist/subagent-messages.js +5 -4
- package/docs/architecture.md +106 -843
- package/package.json +1 -1
- package/prompts/pi-crew-plan.md +82 -123
- package/prompts/pi-crew-review.md +64 -115
- package/dist/crew-manager.d.ts +0 -44
|
@@ -52,4 +52,7 @@ export class SubagentRegistry {
|
|
|
52
52
|
.filter((state) => state.ownerSessionId === ownerSessionId && isAbortableStatus(state.status))
|
|
53
53
|
.map((state) => state.id);
|
|
54
54
|
}
|
|
55
|
+
getAllRunning() {
|
|
56
|
+
return Array.from(this.activeAgents.values()).filter((state) => isAbortableStatus(state.status));
|
|
57
|
+
}
|
|
55
58
|
}
|
package/dist/status-widget.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
|
|
2
|
-
import type {
|
|
3
|
-
export declare function updateWidget(ctx: ExtensionContext,
|
|
2
|
+
import type { CrewRuntime } from "./runtime/crew-runtime.js";
|
|
3
|
+
export declare function updateWidget(ctx: ExtensionContext, crew: CrewRuntime): void;
|
package/dist/status-widget.js
CHANGED
|
@@ -36,13 +36,13 @@ function syncWidgetText(state, agents) {
|
|
|
36
36
|
state.text.setText(lines.join("\n"));
|
|
37
37
|
state.tui.requestRender();
|
|
38
38
|
}
|
|
39
|
-
export function updateWidget(ctx,
|
|
39
|
+
export function updateWidget(ctx, crew) {
|
|
40
40
|
if (!ctx.hasUI) {
|
|
41
41
|
clearWidget();
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
const ownerSessionId = ctx.sessionManager.getSessionId();
|
|
45
|
-
const running =
|
|
45
|
+
const running = crew.getActiveSummariesForOwner(ownerSessionId);
|
|
46
46
|
if (running.length === 0) {
|
|
47
47
|
clearWidget();
|
|
48
48
|
return;
|
|
@@ -62,7 +62,7 @@ export function updateWidget(ctx, crewManager) {
|
|
|
62
62
|
tui,
|
|
63
63
|
frameIndex: 0,
|
|
64
64
|
timer: setInterval(() => {
|
|
65
|
-
const agents =
|
|
65
|
+
const agents = crew.getActiveSummariesForOwner(ownerSessionId);
|
|
66
66
|
if (agents.length === 0) {
|
|
67
67
|
clearWidget();
|
|
68
68
|
return;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
2
|
export type SubagentStatus = "running" | "waiting" | "done" | "error" | "aborted";
|
|
3
|
+
export type SendMessageFn = ExtensionAPI["sendMessage"];
|
|
3
4
|
export declare const STATUS_ICON: Record<SubagentStatus, string>;
|
|
4
5
|
export declare const STATUS_LABEL: Record<SubagentStatus, string>;
|
|
5
6
|
export interface SteeringPayload {
|
|
6
7
|
id: string;
|
|
7
8
|
agentName: string;
|
|
9
|
+
sessionFile?: string;
|
|
8
10
|
status: SubagentStatus;
|
|
9
11
|
result?: string;
|
|
10
12
|
error?: string;
|
|
@@ -12,6 +14,7 @@ export interface SteeringPayload {
|
|
|
12
14
|
export interface CrewResultMessageDetails {
|
|
13
15
|
agentId: string;
|
|
14
16
|
agentName: string;
|
|
17
|
+
sessionFile?: string;
|
|
15
18
|
status: SubagentStatus;
|
|
16
19
|
body?: string;
|
|
17
20
|
}
|
|
@@ -20,11 +23,11 @@ export declare function getCrewResultTitle(details: {
|
|
|
20
23
|
agentName: string;
|
|
21
24
|
status: SubagentStatus;
|
|
22
25
|
}): string;
|
|
23
|
-
export declare function sendSteeringMessage(payload: SteeringPayload,
|
|
26
|
+
export declare function sendSteeringMessage(payload: SteeringPayload, sendMessage: SendMessageFn, opts: {
|
|
24
27
|
isIdle: boolean;
|
|
25
28
|
triggerTurn: boolean;
|
|
26
29
|
}): void;
|
|
27
|
-
export declare function sendRemainingNote(remainingCount: number,
|
|
30
|
+
export declare function sendRemainingNote(remainingCount: number, sendMessage: SendMessageFn, opts: {
|
|
28
31
|
isIdle: boolean;
|
|
29
32
|
triggerTurn: boolean;
|
|
30
33
|
}): void;
|
|
@@ -20,7 +20,7 @@ function getSteeringBody(payload) {
|
|
|
20
20
|
? (payload.error ?? payload.result)
|
|
21
21
|
: (payload.result ?? payload.error);
|
|
22
22
|
}
|
|
23
|
-
export function sendSteeringMessage(payload,
|
|
23
|
+
export function sendSteeringMessage(payload, sendMessage, opts) {
|
|
24
24
|
const body = getSteeringBody(payload);
|
|
25
25
|
const title = getCrewResultTitle({
|
|
26
26
|
agentId: payload.id,
|
|
@@ -37,18 +37,19 @@ export function sendSteeringMessage(payload, pi, opts) {
|
|
|
37
37
|
details: {
|
|
38
38
|
agentId: payload.id,
|
|
39
39
|
agentName: payload.agentName,
|
|
40
|
+
sessionFile: payload.sessionFile,
|
|
40
41
|
status: payload.status,
|
|
41
42
|
body,
|
|
42
43
|
},
|
|
43
44
|
};
|
|
44
|
-
|
|
45
|
+
sendMessage(message, opts.isIdle
|
|
45
46
|
? { triggerTurn: opts.triggerTurn }
|
|
46
47
|
: { deliverAs: "steer", triggerTurn: opts.triggerTurn });
|
|
47
48
|
}
|
|
48
|
-
export function sendRemainingNote(remainingCount,
|
|
49
|
+
export function sendRemainingNote(remainingCount, sendMessage, opts) {
|
|
49
50
|
if (remainingCount <= 0)
|
|
50
51
|
return;
|
|
51
|
-
|
|
52
|
+
sendMessage({
|
|
52
53
|
customType: "crew-remaining",
|
|
53
54
|
content: `⏳ ${remainingCount} subagent(s) still running`,
|
|
54
55
|
display: true,
|