pi-subagent-manager 0.5.1 → 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.
@@ -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,24 +11,24 @@ 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 = [
18
18
  {
19
19
  id: "maxLevels",
20
20
  label: "Maximum levels",
21
- help: "How deep agents can delegate. Your main conversation is level 1; 3 allows an agent and its child. Positive integer, at most 32.",
21
+ help: "How deep agents can delegate.\nYour main conversation is level 1; 3 allows an agent and its child.\nPositive integer, at most 32.",
22
22
  },
23
23
  {
24
24
  id: "maxConcurrent",
25
25
  label: "Concurrent agents",
26
- help: "How many agents can be active at once across all levels. Parents waiting for children also count. Positive safe integer.",
26
+ help: "How many agents can be active at once across all levels.\nParents waiting for children also count.\nPositive safe integer.",
27
27
  },
28
28
  {
29
29
  id: "maxThreads",
30
30
  label: "Retained threads",
31
- help: "How many agent sessions can be kept for follow-up work, including completed and paused agents. At the limit, new agents cannot start. Positive safe integer.",
31
+ help: "How many agent sessions can be kept for follow-up work, including completed and paused agents.\nAt the limit, new agents cannot start.\nPositive safe integer.",
32
32
  },
33
33
  ] as const;
34
34
 
@@ -37,29 +37,29 @@ const MODE_OPTIONS = [
37
37
  id: "off",
38
38
  label: "Off",
39
39
  value: "No subagent tools or prompt guidance",
40
- help: "Off: hide subagent tools and inject no subagent guidance into the system prompt. Existing work and retained sessions are kept.",
40
+ help: "Off: hide subagent tools and inject no subagent guidance into the system prompt.\nExisting work and retained sessions are kept.",
41
41
  },
42
42
  {
43
43
  id: "opportunistic",
44
44
  label: "Opportunistic",
45
45
  value: "Parallelizable or very large tasks only",
46
- help: "Opportunistic: make subagent tools available. Delegate only when tasks can be parallelized or a task is very large; otherwise work directly.",
46
+ help: "Opportunistic: make subagent tools available.\nDelegate only when tasks can be parallelized or a task is very large; otherwise work directly.",
47
47
  },
48
48
  {
49
49
  id: "orchestration",
50
50
  label: "Orchestration",
51
51
  value: "/root coordinates; subagents execute",
52
- help: "Orchestration: tell /root to delegate all task execution to subagents and only coordinate and synthesize results. This rule is not inherited by workers.",
52
+ help: "Orchestration: tell /root to delegate all task execution to subagents and only coordinate and synthesize results.\nThis rule is not inherited by workers.",
53
53
  },
54
54
  ] as const;
55
55
 
56
56
  const MODE_HELP =
57
- "Off: no subagent tools or prompt guidance. Opportunistic: delegate only parallelizable or very large tasks. Orchestration: /root delegates all execution and only coordinates and synthesizes results.";
57
+ "Off: no subagent tools or prompt guidance.\nOpportunistic: delegate only parallelizable or very large tasks.\nOrchestration: /root delegates all execution and only coordinates and synthesizes results.";
58
58
 
59
59
  const SCOPED_MODEL_FILTERING = {
60
60
  id: "scopedModelFiltering",
61
61
  label: "Scoped model filtering",
62
- help: "On: agents can use only models selected in /scoped-models. Off: agents can use any available model. Save and apply to activate changes.",
62
+ help: "On: agents can use only models selected in /scoped-models.\nOff: agents can use any available model.\nSave and apply to activate changes.",
63
63
  } as const;
64
64
 
65
65
  export async function configureAgents(
@@ -114,28 +114,26 @@ async function configureAgentsDialog(
114
114
  {
115
115
  id: "scope",
116
116
  label: "Save scope",
117
- value: scope === "user" ? "Global" : "Trusted project",
118
- help: scope === "user"
119
- ? "Global: save all values shown as your defaults for every project. Existing trusted-project settings still override them, including here. Switching scope only changes where you save, not the values shown."
120
- : "Trusted project: save all values shown for this project only, overriding your global defaults here. Other projects are unchanged. Switching scope only changes where you save, not the values shown.",
117
+ value: scope === "user" ? "Global" : "Current Project",
118
+ help: "Global: save all values shown as your defaults for every project. Existing project settings still override them, including here.\nCurrent Project: save all values shown for this project only, overriding your global defaults here. Other projects are unchanged. Requires a trusted project.\nSwitching scope only changes where you save, not the values shown.",
121
119
  },
122
120
  {
123
121
  id: "types",
124
122
  label: "Agent definitions",
125
123
  value: `${options.store.list().length} types`,
126
- help: "Create or edit agent definitions, model preferences and tool policy.",
124
+ help: "Create or edit agent definitions.\nConfigure model preferences and tool policy for each agent type.",
127
125
  },
128
126
  {
129
127
  id: "defaults",
130
128
  label: "Restore defaults",
131
- help: "Replace all values shown with built-in defaults. Nothing is saved until you choose Save and apply.",
129
+ help: "Replace all values shown with built-in defaults.\nNothing is saved until you choose Save and apply.",
132
130
  },
133
131
  {
134
132
  id: "save",
135
133
  label: "Save and apply",
136
134
  value: dirty ? "(changes)" : undefined,
137
135
  valueColor: dirty ? "warning" as const : undefined,
138
- help: "Save all values to the selected scope and reload settings now. Project overrides still take precedence. Running agents and retained sessions are kept.",
136
+ help: "Save all values to the selected scope and reload settings now.\nProject overrides still take precedence.\nRunning agents and retained sessions are kept.",
139
137
  },
140
138
  {
141
139
  id: "cancel",
@@ -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,