pi-subagent-manager 0.5.2 → 0.6.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-subagent-manager",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "description": "Hierarchical, steerable subagent threads for pi",
5
5
  "type": "module",
6
6
  "engines": {
package/src/index.ts CHANGED
@@ -2,16 +2,16 @@ import { randomUUID } from "node:crypto";
2
2
  import { buildSessionContext, getAgentDir } from "@earendil-works/pi-coding-agent";
3
3
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
4
4
  import { fuzzyFilter } from "@earendil-works/pi-tui";
5
- import { ConfigStore } from "./config.ts";
6
- import { IMPORT_REQUEST_PREFIX, markImportOffered, offerAgentImport } from "./agent-import.ts";
7
- import { ThreadManager } from "./manager.ts";
8
- import { loadManagerSettings } from "./settings.ts";
9
- import { configureAgents } from "./settings-ui.ts";
10
- import { showAgentStatus, showAgentTree } from "./status-ui.ts";
11
- import { createDriverFactory } from "./runtime.ts";
12
- import { subagentPrompt } from "./prompt.ts";
13
- import { agentTools } from "./tools.ts";
14
- import { editAgentTypes, updateWidget } from "./ui.ts";
5
+ import { ConfigStore } from "./prefs/config.ts";
6
+ import { IMPORT_REQUEST_PREFIX, markImportOffered, offerAgentImport } from "./prefs/agent-import.ts";
7
+ import { ThreadManager } from "./orch/manager.ts";
8
+ import { loadManagerSettings } from "./prefs/settings.ts";
9
+ import { configureAgents } from "./ui/settings-ui.ts";
10
+ import { showAgentStatus, showAgentTree } from "./ui/status-ui.ts";
11
+ import { createDriverFactory } from "./orch/runtime.ts";
12
+ import { subagentPrompt } from "./orch/prompt.ts";
13
+ import { agentTools } from "./orch/tools.ts";
14
+ import { editAgentTypes, updateWidget } from "./ui/ui.ts";
15
15
  import type { SavedThread, ThreadEvent } from "./types.ts";
16
16
 
17
17
  const REGISTRY_ENTRY = "pi-subagent:registry:v1";
@@ -8,9 +8,9 @@ import type {
8
8
  SavedThreadView,
9
9
  ThreadService,
10
10
  ThreadView,
11
- } from "./types.ts";
11
+ } from "../types.ts";
12
12
  import { canonicalPath, inheritContext, isDescendant, parentPath } from "./paths.ts";
13
- import { DEFAULT_MANAGER_SETTINGS, type ManagerSettings } from "./settings.ts";
13
+ import { DEFAULT_MANAGER_SETTINGS, type ManagerSettings } from "../prefs/settings.ts";
14
14
 
15
15
  interface Record {
16
16
  view: ThreadView;
@@ -1,4 +1,4 @@
1
- import type { ManagerSettings } from "./settings.ts";
1
+ import type { ManagerSettings } from "../prefs/settings.ts";
2
2
 
3
3
  /** Root-only guidance: child SDK sessions use their own worker prompt. */
4
4
  export function subagentPrompt(settings: ManagerSettings): string | undefined {
@@ -18,14 +18,14 @@ import {
18
18
  buildUpdateDetails,
19
19
  DurableMailbox,
20
20
  } from "./mailbox.ts";
21
- import { selectTools } from "./config.ts";
22
- import { modelIdentity, getModelPreferences, selectPreferredModel } from "./models.ts";
21
+ import { selectTools } from "../prefs/config.ts";
22
+ import { modelIdentity, getModelPreferences, selectPreferredModel } from "../prefs/models.ts";
23
23
  import {
24
24
  THINKING_LEVELS,
25
25
  type DriverFactory,
26
26
  type DriverOptions,
27
27
  type ThinkingLevel,
28
- } from "./types.ts";
28
+ } from "../types.ts";
29
29
 
30
30
  const BUILTINS = ["read", "bash", "powershell", "edit", "write", "grep", "find", "ls"];
31
31
  /** Persisted before transcript messages so older-leaf restores still carry ownership. */
@@ -1,8 +1,8 @@
1
1
  import { Type } from "typebox";
2
2
  import type { ToolDefinition } from "@earendil-works/pi-coding-agent";
3
- import { getModelPreferences } from "./models.ts";
3
+ import { getModelPreferences } from "../prefs/models.ts";
4
4
  import type { ThreadManager } from "./manager.ts";
5
- import type { AgentType, ThreadView } from "./types.ts";
5
+ import type { AgentType, ThreadView } from "../types.ts";
6
6
 
7
7
  const path = Type.String({ description: "Absolute agent path, or name relative to the caller" });
8
8
  const text = Type.String({ minLength: 1 });
@@ -4,9 +4,9 @@ import { fileURLToPath } from "node:url";
4
4
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
5
5
  import { AGENT_COLORS, type ConfigStore } from "./config.ts";
6
6
  import { discoverImportCandidates, type ImportCandidate } from "./import-discovery.ts";
7
- import { selectImportAgents } from "./import-picker.ts";
7
+ import { selectImportAgents } from "../ui/import-picker.ts";
8
8
  import { MIGRATION_INSTRUCTIONS } from "./import-instructions.ts";
9
- import { dialogText } from "./dialog.ts";
9
+ import { dialogText } from "../ui/dialog.ts";
10
10
 
11
11
  export const IMPORT_REQUEST_PREFIX =
12
12
  "Import ONLY the agents I selected in the pi-subagent-manager migration picker.";
@@ -12,7 +12,7 @@ import { fileURLToPath } from "node:url";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import { isMap, isScalar, parseDocument, stringify } from "yaml";
14
14
  import { getModelPreferences } from "./models.js";
15
- import { THINKING_LEVELS, type AgentType } from "./types.js";
15
+ import { THINKING_LEVELS, type AgentType } from "../types.js";
16
16
 
17
17
  // Pi semantic color tokens, resolved as concrete colors for agent name backgrounds.
18
18
  export const AGENT_COLORS = [
@@ -292,7 +292,7 @@ export class ConfigStore {
292
292
  const layers: [string, NonNullable<AgentType["source"]>][] = [
293
293
  [
294
294
  this.options.bundledDir ??
295
- fileURLToPath(new URL("../agents/", import.meta.url)),
295
+ fileURLToPath(new URL("../../agents/", import.meta.url)),
296
296
  "bundled",
297
297
  ],
298
298
  ...this.scopeDirectories("user").map(
@@ -18,7 +18,7 @@ import {
18
18
  Text,
19
19
  type SelectItem,
20
20
  } from "@earendil-works/pi-tui";
21
- import { modelIdentity } from "./models.ts";
21
+ import { modelIdentity } from "../prefs/models.ts";
22
22
  import { dialogHeight, frameDialog, DIALOG_OPTIONS } from "./dialog.ts";
23
23
 
24
24
  const MODEL_EDITOR_LAYOUT = {
@@ -1,5 +1,5 @@
1
1
  import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
2
- import type { ConfigStore } from "./config.ts";
2
+ import type { ConfigStore } from "../prefs/config.ts";
3
3
  import {
4
4
  canOpenDialog,
5
5
  dialogInput,
@@ -11,7 +11,7 @@ import {
11
11
  saveManagerSettings,
12
12
  type ManagerSettings,
13
13
  type SubagentMode,
14
- } from "./settings.ts";
14
+ } from "../prefs/settings.ts";
15
15
  import { editAgentTypes } from "./ui.ts";
16
16
 
17
17
  const FIELDS = [
@@ -12,7 +12,7 @@ import {
12
12
  frameDialog,
13
13
  withDialogSession,
14
14
  } from "./dialog.ts";
15
- import type { ThreadService } from "./types.ts";
15
+ import type { ThreadService } from "../types.ts";
16
16
  import { buildStatusTree, type StatusRow } from "./thread-tree.ts";
17
17
  import { showThreads, threadMetrics } from "./ui.ts";
18
18
 
@@ -1,4 +1,4 @@
1
- import type { ThreadView } from "./types.ts";
1
+ import type { ThreadView } from "../types.ts";
2
2
 
3
3
  const ROOT = "/root";
4
4
 
@@ -26,7 +26,7 @@ import {
26
26
  ConfigStore,
27
27
  parseAgentType,
28
28
  serializeAgentType,
29
- } from "./config.ts";
29
+ } from "../prefs/config.ts";
30
30
  import { editModelPreferences, MODEL_EDITOR_CANCEL } from "./model-picker.ts";
31
31
  import {
32
32
  canOpenDialog,
@@ -37,14 +37,14 @@ import {
37
37
  DIALOG_OPTIONS,
38
38
  withDialogSession,
39
39
  } from "./dialog.ts";
40
- import { getModelPreferences } from "./models.ts";
40
+ import { getModelPreferences } from "../prefs/models.ts";
41
41
  import { buildStatusTree, type StatusRow } from "./thread-tree.ts";
42
42
  import {
43
43
  THINKING_LEVELS,
44
44
  type AgentType,
45
45
  type ThreadService,
46
46
  type ThreadView,
47
- } from "./types.ts";
47
+ } from "../types.ts";
48
48
 
49
49
  export type ThreadController = Pick<
50
50
  ThreadService,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes