brl-subagent 2.8.0 → 2.9.0

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 (47) hide show
  1. package/AGENT.md +1 -1
  2. package/README.md +3 -3
  3. package/package.json +6 -5
  4. package/src/agent-tools.ts +332 -0
  5. package/src/background-pipeline.ts +1025 -0
  6. package/src/boot-recovery.ts +313 -0
  7. package/src/commands.ts +137 -0
  8. package/src/concurrency.ts +3 -5
  9. package/src/delegate-handler.ts +2261 -0
  10. package/src/engineering-bar.ts +1 -1
  11. package/src/git.ts +220 -8
  12. package/src/headstate.ts +3 -3
  13. package/src/history.ts +21 -3
  14. package/src/index.ts +109 -4473
  15. package/src/loader.ts +1 -1
  16. package/src/logging.ts +1 -1
  17. package/src/mode-prologue.ts +4 -10
  18. package/src/mode-runners.ts +1575 -0
  19. package/src/notify-completion.ts +35 -8
  20. package/src/params.ts +14 -13
  21. package/src/preflight.ts +123 -16
  22. package/src/prelude.ts +14 -5
  23. package/src/presets.ts +3 -5
  24. package/src/proc.ts +2 -3
  25. package/src/recovery-engine.ts +1 -1
  26. package/src/recovery-surface.ts +1 -2
  27. package/src/recovery.ts +2 -3
  28. package/src/reports.ts +1 -7
  29. package/src/run-registry.ts +2 -3
  30. package/src/runner.ts +47 -18
  31. package/src/runtime.ts +50 -0
  32. package/src/sanitize.ts +20 -2
  33. package/src/scheduler.ts +1 -2
  34. package/src/scratch-root.ts +909 -0
  35. package/src/scratch-spawn.ts +256 -0
  36. package/src/session-manager.ts +75 -7
  37. package/src/state.ts +12 -14
  38. package/src/templates.ts +3 -5
  39. package/src/terminal-notifier.ts +405 -0
  40. package/src/transcript.ts +1 -1
  41. package/src/tui-format.ts +3 -1
  42. package/src/tui.ts +42 -32
  43. package/src/types.ts +29 -3
  44. package/src/unit-params.ts +113 -0
  45. package/src/unit-run.ts +35 -15
  46. package/src/validate.ts +2 -3
  47. package/src/worktree-report.ts +142 -0
package/src/loader.ts CHANGED
@@ -25,9 +25,9 @@
25
25
  * which is how PROJECT > USER precedence is enforced.
26
26
  */
27
27
 
28
+ import type { Logger } from "./logging";
28
29
  import * as fs from "node:fs";
29
30
  import * as path from "node:path";
30
- import type { Logger } from "./logging";
31
31
 
32
32
  // ---------------------------------------------------------------------------
33
33
  // Frontmatter parsing
package/src/logging.ts CHANGED
@@ -14,9 +14,9 @@
14
14
  * session starts and all loggers share <cwd>/.pi/subagent-logs/brl-subagent.log.
15
15
  */
16
16
 
17
+ import type { LogLevel } from "./types";
17
18
  import * as fs from "node:fs";
18
19
  import * as path from "node:path";
19
- import type { LogLevel } from "./types";
20
20
 
21
21
  // ---------------------------------------------------------------------------
22
22
  // Configuration
@@ -37,20 +37,14 @@
37
37
  * same point in the sequence.
38
38
  */
39
39
 
40
- import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
41
- import type { ToolResult } from "./types";
42
- import type { SessionState } from "./state";
43
40
  import type { Logger } from "./logging";
41
+ import type { SessionState } from "./state";
42
+ import type { ToolResult } from "./types";
43
+ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
44
44
  import { resolveSubagentParams, type ResolveInputParams } from "./params";
45
45
  import { getCurrentDepth } from "./sanitize";
46
46
  import { preflightCheck } from "./preflight";
47
- import {
48
- depthLimitRejection,
49
- gateSessionCost,
50
- rejection,
51
- runPreTaskValidation,
52
- validateDelegationTargets,
53
- } from "./prelude";
47
+ import { depthLimitRejection, gateSessionCost, rejection, runPreTaskValidation, validateDelegationTargets } from "./prelude";
54
48
 
55
49
  /** The params object the shared resolver consumes (`ResolveInputParams`,
56
50
  * params.ts) — the same type the background and single paths pass. */