@gotgenes/pi-subagents 6.17.0 → 6.17.2

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 (61) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/docs/architecture/architecture.md +588 -536
  3. package/docs/architecture/history/phase-1-api-boundary.md +8 -0
  4. package/docs/architecture/history/phase-2-remove-scheduling.md +9 -0
  5. package/docs/architecture/history/phase-3-remove-rpc-groupjoin.md +11 -0
  6. package/docs/architecture/history/phase-4-implement-service.md +8 -0
  7. package/docs/architecture/history/phase-5-decompose-index.md +42 -0
  8. package/docs/architecture/history/phase-7-encapsulation.md +173 -0
  9. package/docs/architecture/history/phase-8-testability.md +103 -0
  10. package/docs/architecture/history/phase-9-observation-ctx.md +122 -0
  11. package/docs/plans/0164-reorganize-into-domain-directories.md +409 -0
  12. package/docs/retro/0147-inject-wrap-text-into-conversation-viewer.md +40 -0
  13. package/docs/retro/0164-reorganize-into-domain-directories.md +46 -0
  14. package/package.json +5 -1
  15. package/src/{agent-types.ts → config/agent-types.ts} +2 -2
  16. package/src/{custom-agents.ts → config/custom-agents.ts} +3 -3
  17. package/src/{default-agents.ts → config/default-agents.ts} +1 -1
  18. package/src/{invocation-config.ts → config/invocation-config.ts} +1 -1
  19. package/src/handlers/index.ts +2 -2
  20. package/src/index.ts +26 -26
  21. package/src/{agent-manager.ts → lifecycle/agent-manager.ts} +11 -11
  22. package/src/{agent-record.ts → lifecycle/agent-record.ts} +6 -6
  23. package/src/{agent-runner.ts → lifecycle/agent-runner.ts} +6 -6
  24. package/src/{parent-snapshot.ts → lifecycle/parent-snapshot.ts} +1 -1
  25. package/src/{worktree-state.ts → lifecycle/worktree-state.ts} +1 -1
  26. package/src/{worktree.ts → lifecycle/worktree.ts} +1 -1
  27. package/src/{notification.ts → observation/notification.ts} +4 -4
  28. package/src/{record-observer.ts → observation/record-observer.ts} +2 -2
  29. package/src/{renderer.ts → observation/renderer.ts} +2 -2
  30. package/src/runtime.ts +2 -2
  31. package/src/{service-adapter.ts → service/service-adapter.ts} +5 -5
  32. package/src/{service.ts → service/service.ts} +1 -1
  33. package/src/{env.ts → session/env.ts} +2 -2
  34. package/src/{memory.ts → session/memory.ts} +2 -2
  35. package/src/{prompts.ts → session/prompts.ts} +2 -2
  36. package/src/{session-config.ts → session/session-config.ts} +5 -5
  37. package/src/{skill-loader.ts → session/skill-loader.ts} +2 -2
  38. package/src/tools/agent-tool.ts +11 -12
  39. package/src/tools/background-spawner.ts +8 -8
  40. package/src/tools/foreground-runner.ts +14 -14
  41. package/src/tools/get-result-tool.ts +5 -5
  42. package/src/tools/helpers.ts +4 -4
  43. package/src/tools/spawn-config.ts +6 -6
  44. package/src/tools/steer-tool.ts +3 -3
  45. package/src/types.ts +1 -1
  46. package/src/ui/agent-activity-tracker.ts +1 -1
  47. package/src/ui/agent-config-editor.ts +4 -4
  48. package/src/ui/agent-creation-wizard.ts +5 -5
  49. package/src/ui/agent-menu.ts +10 -10
  50. package/src/ui/agent-widget.ts +5 -5
  51. package/src/ui/conversation-viewer.ts +6 -6
  52. package/src/ui/display.ts +2 -2
  53. package/src/ui/ui-observer.ts +1 -1
  54. package/src/ui/widget-renderer.ts +5 -5
  55. package/vitest.config.ts +14 -0
  56. /package/src/{execution-state.ts → lifecycle/execution-state.ts} +0 -0
  57. /package/src/{usage.ts → lifecycle/usage.ts} +0 -0
  58. /package/src/{notification-state.ts → observation/notification-state.ts} +0 -0
  59. /package/src/{context.ts → session/context.ts} +0 -0
  60. /package/src/{model-resolver.ts → session/model-resolver.ts} +0 -0
  61. /package/src/{session-dir.ts → session/session-dir.ts} +0 -0
package/src/ui/display.ts CHANGED
@@ -5,8 +5,8 @@
5
5
  * Consumed by the widget, the menu, tool modules, and the notification renderer.
6
6
  */
7
7
 
8
- import type { AgentConfigLookup } from "../agent-types.js";
9
- import type { AgentInvocation, SubagentType } from "../types.js";
8
+ import type { AgentConfigLookup } from "#src/config/agent-types";
9
+ import type { AgentInvocation, SubagentType } from "#src/types";
10
10
 
11
11
  // ---- Types ----
12
12
 
@@ -6,7 +6,7 @@
6
6
  * turn count, lifetime usage).
7
7
  */
8
8
 
9
- import type { AgentActivityTracker } from "./agent-activity-tracker.js";
9
+ import type { AgentActivityTracker } from "#src/ui/agent-activity-tracker";
10
10
 
11
11
  /** Narrow session interface — only the subscribe method needed by the observer. */
12
12
  interface SubscribableSession {
@@ -6,10 +6,10 @@
6
6
  */
7
7
 
8
8
  import { truncateToWidth } from "@earendil-works/pi-tui";
9
- import type { AgentConfigLookup } from "../agent-types.js";
10
- import type { SubagentType } from "../types.js";
11
- import type { LifetimeUsage, SessionLike } from "../usage.js";
12
- import { getLifetimeTotal, getSessionContextPercent } from "../usage.js";
9
+ import type { AgentConfigLookup } from "#src/config/agent-types";
10
+ import type { LifetimeUsage, SessionLike } from "#src/lifecycle/usage";
11
+ import { getLifetimeTotal, getSessionContextPercent } from "#src/lifecycle/usage";
12
+ import type { SubagentType } from "#src/types";
13
13
  import {
14
14
  describeActivity,
15
15
  formatMs,
@@ -19,7 +19,7 @@ import {
19
19
  getPromptModeLabel,
20
20
  SPINNER,
21
21
  type Theme,
22
- } from "./display.js";
22
+ } from "#src/ui/display";
23
23
 
24
24
  // ── Data interfaces ──────────────────────────────────────────────────────────
25
25
 
@@ -0,0 +1,14 @@
1
+ import path from "node:path";
2
+ import { defineConfig } from "vitest/config";
3
+
4
+ export default defineConfig({
5
+ resolve: {
6
+ alias: {
7
+ "#src": path.resolve(import.meta.dirname, "src"),
8
+ "#test": path.resolve(import.meta.dirname, "test"),
9
+ },
10
+ },
11
+ test: {
12
+ include: ["test/**/*.test.ts"],
13
+ },
14
+ });
File without changes
File without changes
File without changes