pi-crew 0.10.3 → 0.10.5
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.md +2 -1
- package/CHANGELOG.md +40 -0
- package/README.md +5 -1
- package/dist/index.mjs +10684 -6883
- package/docs/architecture.md +4 -4
- package/docs/commands-reference.md +3 -0
- package/docs/publishing.md +15 -3
- package/install.mjs +90 -39
- package/package.json +8 -3
- package/scripts/README.md +4 -3
- package/skills/real-test-pi-crew/REPORT-TEMPLATE.md +1 -0
- package/skills/real-test-pi-crew/SKILL.md +153 -6
- package/src/config/migration-validator.ts +113 -0
- package/src/extension/cross-extension-rpc.ts +3 -7
- package/src/extension/register.ts +13 -0
- package/src/extension/registration/observability.ts +3 -7
- package/src/extension/registration/subagent-tools.ts +3 -7
- package/src/extension/registration/team-tool.ts +3 -7
- package/src/extension/registration/ui.ts +3 -8
- package/src/extension/registration/viewers.ts +3 -10
- package/src/extension/team-manager-command.ts +3 -7
- package/src/extension/team-tool/api/agent-control.ts +17 -10
- package/src/extension/team-tool/api/heartbeat.ts +4 -3
- package/src/extension/team-tool/api/mailbox.ts +33 -20
- package/src/extension/team-tool/api/plan-approval.ts +5 -5
- package/src/extension/team-tool/api/task-claims.ts +8 -7
- package/src/extension/team-tool/cancel.ts +6 -0
- package/src/extension/team-tool/handle-settings.ts +4 -1
- package/src/extension/team-tool/run.ts +3 -7
- package/src/extension/team-tool/status.ts +5 -0
- package/src/extension/team-tool.ts +6 -14
- package/src/hooks/registry.ts +3 -0
- package/src/prompt/scratchpad-lifecycle.ts +3 -3
- package/src/runtime/background-runner.ts +62 -42
- package/src/runtime/broker/crew-broker.ts +112 -441
- package/src/runtime/broker/delegate/delegate-event.ts +37 -0
- package/src/runtime/broker/mailbox-observer/mailbox-fanout.ts +59 -0
- package/src/runtime/broker/protocol/connection-state.ts +103 -0
- package/src/runtime/broker/protocol/events-replay.ts +68 -0
- package/src/runtime/broker/protocol/manifest-loader.ts +20 -0
- package/src/runtime/broker/protocol/msg-inbox.ts +69 -0
- package/src/runtime/broker/protocol/request-parsers.ts +175 -0
- package/src/runtime/broker/protocol/wait-auth.ts +46 -0
- package/src/runtime/child-pi/child-pi.ts +15 -0
- package/src/runtime/finalize-run.ts +15 -7
- package/src/runtime/foreground-control.ts +19 -6
- package/src/runtime/goal-workflow/dynamic-workflow-context.ts +6 -0
- package/src/runtime/goal-workflow/dynamic-workflow-runner.ts +3 -0
- package/src/runtime/goal-workflow/goal-loop-runner.ts +29 -27
- package/src/runtime/goal-workflow/goal-state-store.ts +3 -0
- package/src/runtime/heartbeat/heartbeat-watcher.ts +3 -3
- package/src/runtime/model/pi-args.ts +6 -1
- package/src/runtime/plan-replan.ts +3 -0
- package/src/runtime/run-tracker.ts +9 -8
- package/src/runtime/stale-reconciler.ts +28 -3
- package/src/runtime/supervisor-contact.ts +3 -0
- package/src/runtime/task-runner/child-executor.ts +33 -0
- package/src/runtime/team-runner.ts +3 -3
- package/src/state/stores/ownership-map.ts +5 -4
- package/src/state/stores/plan-store.ts +12 -0
- package/src/state/stores/state-store.ts +5 -0
- package/src/ui/powerbar-publisher.ts +3 -7
- package/src/ui/run-action-dispatcher.ts +7 -10
- package/src/ui/settings-overlay.ts +4 -1
|
@@ -3,25 +3,22 @@ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
|
3
3
|
import type { handleTeamTool as HandleTeamToolFn } from "../extension/team-tool.ts";
|
|
4
4
|
import type { MetricRegistry } from "../observability/metric-registry.ts";
|
|
5
5
|
|
|
6
|
-
let _cachedHandleTeamTool: typeof HandleTeamToolFn | undefined;
|
|
7
6
|
async function handleTeamTool(
|
|
8
7
|
params: Parameters<typeof HandleTeamToolFn>[0],
|
|
9
8
|
ctx: Parameters<typeof HandleTeamToolFn>[1],
|
|
10
9
|
): Promise<Awaited<ReturnType<typeof HandleTeamToolFn>>> {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_cachedHandleTeamTool = mod.handleTeamTool;
|
|
15
|
-
}
|
|
16
|
-
return _cachedHandleTeamTool(params, ctx);
|
|
10
|
+
// LAZY: avoid pulling team-tool.ts (and its entire runtime chain) into module load.
|
|
11
|
+
const mod = await import("../extension/team-tool.ts");
|
|
12
|
+
return mod.handleTeamTool(params, ctx);
|
|
17
13
|
}
|
|
18
14
|
|
|
19
15
|
import { isToolError, textFromToolResult } from "../extension/tool-result.ts";
|
|
20
16
|
import { readCrewAgents } from "../runtime/crew-agent-records.ts";
|
|
21
17
|
import { exportDiagnostic } from "../runtime/diagnostic-export.ts";
|
|
22
18
|
import type { MailboxDirection, MailboxMessage } from "../state/coordination/mailbox.ts";
|
|
23
|
-
import {
|
|
19
|
+
import { appendEventBuffered } from "../state/event-log/event-log.ts";
|
|
24
20
|
import { loadRunManifestById, saveRunTasks } from "../state/stores/state-store.ts";
|
|
21
|
+
import { logInternalError } from "../utils/internal-error.ts";
|
|
25
22
|
|
|
26
23
|
export interface RunActionResult {
|
|
27
24
|
ok: boolean;
|
|
@@ -141,12 +138,12 @@ export async function dispatchKillStaleWorkers(ctx: ExtensionContext, runId: str
|
|
|
141
138
|
};
|
|
142
139
|
});
|
|
143
140
|
saveRunTasks(loaded.manifest, tasks);
|
|
144
|
-
|
|
141
|
+
appendEventBuffered(loaded.manifest.eventsPath, {
|
|
145
142
|
type: "worker.kill_stale",
|
|
146
143
|
runId,
|
|
147
144
|
message: `Marked ${count} stale worker heartbeat(s) dead.`,
|
|
148
145
|
data: { count },
|
|
149
|
-
});
|
|
146
|
+
}).catch((e) => logInternalError("run_action_dispatcher.buffered", e, "type=worker.kill_stale"));
|
|
150
147
|
return {
|
|
151
148
|
ok: true,
|
|
152
149
|
message: `Marked ${count} stale worker heartbeat(s) dead.`,
|
|
@@ -345,7 +345,10 @@ const EFFECTIVE_DEFAULTS: Record<string, unknown> = {
|
|
|
345
345
|
"ui.dashboardPlacement": "center",
|
|
346
346
|
"ui.dashboardWidth": 72,
|
|
347
347
|
"ui.autoOpenDashboard": false,
|
|
348
|
-
|
|
348
|
+
// G17 sync (2026-09-10 review): canonical DEFAULT_UI.widgetPlacement =
|
|
349
|
+
// "bottom" (defaults.ts / install.mjs / project-init) — was drifted
|
|
350
|
+
// "aboveEditor" in this duplicated EFFECTIVE_DEFAULTS map.
|
|
351
|
+
"ui.widgetPlacement": "bottom",
|
|
349
352
|
"autonomous.enabled": true,
|
|
350
353
|
"autonomous.injectPolicy": true,
|
|
351
354
|
"autonomous.preferAsyncForLongTasks": false,
|