pi-crew 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.
Files changed (35) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +35 -0
  3. package/docs/code-review-2026-05-11.md +592 -0
  4. package/docs/followup-plan-2026-05-12.md +463 -0
  5. package/docs/followup-review-2026-05-12.md +297 -0
  6. package/docs/followup-review-round3-2026-05-12.md +342 -0
  7. package/package.json +3 -2
  8. package/src/extension/cross-extension-rpc.ts +1 -0
  9. package/src/extension/registration/subagent-tools.ts +1 -0
  10. package/src/extension/registration/team-tool.ts +1 -0
  11. package/src/extension/team-manager-command.ts +1 -0
  12. package/src/extension/team-tool/run.ts +1 -0
  13. package/src/extension/team-tool.ts +344 -332
  14. package/src/runtime/async-runner.ts +89 -15
  15. package/src/runtime/background-runner.ts +1 -0
  16. package/src/runtime/child-pi.ts +2 -4
  17. package/src/runtime/iteration-hooks.ts +5 -2
  18. package/src/runtime/live-session-runtime.ts +1 -0
  19. package/src/runtime/post-checks.ts +5 -2
  20. package/src/runtime/runtime-resolver.ts +1 -0
  21. package/src/runtime/subagent-manager.ts +5 -0
  22. package/src/runtime/task-runner.ts +1 -0
  23. package/src/runtime/yield-handler.ts +1 -0
  24. package/src/schema/team-tool-schema.ts +1 -0
  25. package/src/state/artifact-store.ts +2 -2
  26. package/src/state/atomic-write.ts +21 -4
  27. package/src/state/event-log.ts +110 -47
  28. package/src/state/locks.ts +12 -14
  29. package/src/ui/run-action-dispatcher.ts +1 -0
  30. package/src/utils/env-filter.ts +30 -0
  31. package/src/utils/redaction.ts +1 -1
  32. package/src/utils/resolve-shell.ts +34 -0
  33. package/src/utils/sleep.ts +2 -1
  34. package/src/worktree/cleanup.ts +5 -2
  35. package/src/worktree/worktree-manager.ts +47 -5
@@ -5,6 +5,7 @@ import type { handleTeamTool as HandleTeamToolFn } from "./team-tool.ts";
5
5
  let _cachedHandleTeamTool: typeof HandleTeamToolFn | undefined;
6
6
  async function handleTeamTool(params: Parameters<typeof HandleTeamToolFn>[0], ctx: Parameters<typeof HandleTeamToolFn>[1]): Promise<Awaited<ReturnType<typeof HandleTeamToolFn>>> {
7
7
  if (!_cachedHandleTeamTool) {
8
+ // LAZY: team-tool.ts pulls in the entire runtime chain.
8
9
  const mod = await import("./team-tool.ts");
9
10
  _cachedHandleTeamTool = mod.handleTeamTool;
10
11
  }
@@ -15,6 +15,7 @@ const _typeCheck: typeof ExecuteTeamRunFn = null as never as typeof ExecuteTeamR
15
15
  let _cachedExecuteTeamRun: typeof ExecuteTeamRunFn | undefined;
16
16
  async function executeTeamRun(...args: Parameters<typeof ExecuteTeamRunFn>): Promise<Awaited<ReturnType<typeof ExecuteTeamRunFn>>> {
17
17
  if (!_cachedExecuteTeamRun) {
18
+ // LAZY: heavy runtime — defer 1.4s import cost until team run actually executes.
18
19
  const mod = await import("../../runtime/team-runner.ts");
19
20
  _cachedExecuteTeamRun = mod.executeTeamRun;
20
21
  }