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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/index.ts +10 -10
- package/src/{manager.ts → orch/manager.ts} +2 -2
- package/src/{prompt.ts → orch/prompt.ts} +1 -1
- package/src/{runtime.ts → orch/runtime.ts} +3 -3
- package/src/{tools.ts → orch/tools.ts} +2 -2
- package/src/{agent-import.ts → prefs/agent-import.ts} +2 -2
- package/src/{config.ts → prefs/config.ts} +2 -2
- package/src/{dialog.ts → ui/dialog.ts} +7 -5
- package/src/ui/model-picker.ts +451 -0
- package/src/{settings-ui.ts → ui/settings-ui.ts} +15 -17
- package/src/{status-ui.ts → ui/status-ui.ts} +1 -1
- package/src/{thread-tree.ts → ui/thread-tree.ts} +1 -1
- package/src/{ui.ts → ui/ui.ts} +3 -3
- package/src/model-picker.ts +0 -687
- /package/src/{mailbox.ts → orch/mailbox.ts} +0 -0
- /package/src/{paths.ts → orch/paths.ts} +0 -0
- /package/src/{import-discovery.ts → prefs/import-discovery.ts} +0 -0
- /package/src/{import-instructions.ts → prefs/import-instructions.ts} +0 -0
- /package/src/{models.ts → prefs/models.ts} +0 -0
- /package/src/{settings.ts → prefs/settings.ts} +0 -0
- /package/src/{import-picker.ts → ui/import-picker.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import type { ConfigStore } from "
|
|
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 "
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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" : "
|
|
118
|
-
help: scope
|
|
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
|
|
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
|
|
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
|
|
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 "
|
|
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
|
|
package/src/{ui.ts → ui/ui.ts}
RENAMED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
ConfigStore,
|
|
27
27
|
parseAgentType,
|
|
28
28
|
serializeAgentType,
|
|
29
|
-
} from "
|
|
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 "
|
|
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 "
|
|
47
|
+
} from "../types.ts";
|
|
48
48
|
|
|
49
49
|
export type ThreadController = Pick<
|
|
50
50
|
ThreadService,
|