@pi-unipi/unipi 2.6.4 → 2.7.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 +16 -11
- package/packages/autocomplete/src/constants.ts +5 -0
- package/packages/subagents/README.md +89 -78
- package/packages/subagents/package.json +8 -2
- package/packages/subagents/skills/council-mode/SKILL.md +230 -0
- package/packages/subagents/skills/subagents/SKILL.md +49 -0
- package/packages/subagents/skills/subagents/references/constraints-and-recipes.md +259 -0
- package/packages/subagents/skills/subagents/references/execution-controls.md +454 -0
- package/packages/subagents/skills/subagents/references/management-authoring-rpc.md +161 -0
- package/packages/subagents/skills/subagents/references/multi-lane-orchestration.md +39 -0
- package/packages/subagents/skills/subagents/references/prompting-and-roles.md +267 -0
- package/packages/subagents/src/acceptance.ts +331 -0
- package/packages/subagents/src/agent-manager.ts +89 -6
- package/packages/subagents/src/agent-memory.ts +300 -0
- package/packages/subagents/src/agent-overrides.ts +183 -0
- package/packages/subagents/src/agent-runner.ts +10 -0
- package/packages/subagents/src/async-runner.ts +417 -0
- package/packages/subagents/src/authority-policy.ts +47 -0
- package/packages/subagents/src/budgets.ts +285 -0
- package/packages/subagents/src/child-safety.ts +140 -0
- package/packages/subagents/src/config.ts +80 -1
- package/packages/subagents/src/custom-agents.ts +236 -38
- package/packages/subagents/src/file-system-retry.ts +50 -0
- package/packages/subagents/src/fleet-data.ts +61 -0
- package/packages/subagents/src/fleet-view.ts +316 -0
- package/packages/subagents/src/foreground-detach.ts +59 -0
- package/packages/subagents/src/fork-context.ts +285 -0
- package/packages/subagents/src/guide.ts +129 -0
- package/packages/subagents/src/index.ts +515 -197
- package/packages/subagents/src/mission-state.ts +133 -0
- package/packages/subagents/src/mission-store.ts +434 -0
- package/packages/subagents/src/output-limits.ts +142 -0
- package/packages/subagents/src/parity-types.ts +315 -0
- package/packages/subagents/src/pi-args.ts +161 -0
- package/packages/subagents/src/pi-spawn.ts +147 -0
- package/packages/subagents/src/result-files.ts +232 -0
- package/packages/subagents/src/result-watcher.ts +221 -0
- package/packages/subagents/src/retained-children.ts +176 -0
- package/packages/subagents/src/run-fanout-budget.ts +356 -0
- package/packages/subagents/src/scheduled-runs.ts +351 -0
- package/packages/subagents/src/schemas.ts +263 -0
- package/packages/subagents/src/slash-commands.ts +77 -0
- package/packages/subagents/src/supervisor-channel.ts +249 -0
- package/packages/subagents/src/tool-handler.ts +1144 -0
- package/packages/subagents/src/types.ts +103 -2
- package/packages/subagents/src/workflow-script.ts +737 -0
- package/packages/subagents/src/workflow-worker.ts +384 -0
- package/packages/subagents/src/worktree.ts +614 -0
- package/packages/unipi/bundled.js +6577 -1093
|
@@ -60,26 +60,62 @@ export const BUILTIN_CONFIGS: Record<string, AgentConfig> = {
|
|
|
60
60
|
/** Memory scope for persistent agent memory. */
|
|
61
61
|
export type MemoryScope = "user" | "project" | "local";
|
|
62
62
|
|
|
63
|
+
/** Structured per-agent memory config (reference parity). */
|
|
64
|
+
export interface AgentMemoryConfig {
|
|
65
|
+
scope: "user" | "project";
|
|
66
|
+
path: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
63
69
|
/** Unified agent configuration. */
|
|
64
70
|
export interface AgentConfig {
|
|
65
71
|
name: string;
|
|
66
72
|
displayName?: string;
|
|
67
73
|
description: string;
|
|
74
|
+
/** Alias names resolving to this agent (reference parity). */
|
|
75
|
+
aliases?: string[];
|
|
68
76
|
builtinToolNames?: string[];
|
|
69
77
|
disallowedTools?: string[];
|
|
70
78
|
extensions: true | string[] | false;
|
|
71
79
|
skills: true | string[] | false;
|
|
80
|
+
/** Extra skill directories to load for this agent. */
|
|
81
|
+
skillPath?: string[];
|
|
72
82
|
model?: string;
|
|
73
|
-
|
|
83
|
+
/** Ordered fallback models (reference parity; resolved Phase 2). */
|
|
84
|
+
fallbackModels?: string[];
|
|
85
|
+
thinking?: ThinkingLevel | string | false;
|
|
74
86
|
maxTurns?: number;
|
|
75
87
|
systemPrompt: string;
|
|
76
88
|
promptMode: "replace" | "append";
|
|
89
|
+
/** Reference alias for promptMode. */
|
|
90
|
+
systemPromptMode?: "replace" | "append";
|
|
91
|
+
/** Whether the child inherits project context (AGENTS.md etc.). Default: delegate only. */
|
|
92
|
+
inheritProjectContext?: boolean;
|
|
93
|
+
/** Whether the child inherits skills. Default: false. */
|
|
94
|
+
inheritSkills?: boolean;
|
|
95
|
+
/** Default context for launches that omit context. */
|
|
96
|
+
defaultContext?: "fresh" | "fork";
|
|
77
97
|
runInBackground?: boolean;
|
|
78
98
|
isolated?: boolean;
|
|
79
|
-
|
|
99
|
+
/** Agent-level default run deadline. */
|
|
100
|
+
timeoutMs?: number;
|
|
101
|
+
/** Agent-level default hard per-tool deadline. */
|
|
102
|
+
toolTimeoutMs?: number;
|
|
103
|
+
/** Nested-delegation cap for this agent's children. */
|
|
104
|
+
maxSubagentDepth?: number;
|
|
105
|
+
/** Output file for this agent's result. */
|
|
106
|
+
output?: string;
|
|
107
|
+
/** inline (default) or file-only result reference. */
|
|
108
|
+
outputMode?: "inline" | "file-only";
|
|
109
|
+
/** Files to read before running. */
|
|
110
|
+
defaultReads?: string[];
|
|
111
|
+
/** Maintain progress.md during runs. */
|
|
112
|
+
defaultProgress?: boolean;
|
|
113
|
+
memory?: MemoryScope | AgentMemoryConfig;
|
|
80
114
|
isDefault?: boolean;
|
|
81
115
|
enabled?: boolean;
|
|
82
116
|
source?: "builtin" | "project" | "global";
|
|
117
|
+
/** Unknown frontmatter fields preserved for later phases. */
|
|
118
|
+
extraFields?: Record<string, string>;
|
|
83
119
|
}
|
|
84
120
|
|
|
85
121
|
/** Agent record — tracks a running agent. */
|
|
@@ -107,6 +143,71 @@ export interface SubagentsConfig {
|
|
|
107
143
|
maxConcurrent: number;
|
|
108
144
|
enabled: boolean;
|
|
109
145
|
types: Record<string, { enabled?: boolean }>;
|
|
146
|
+
|
|
147
|
+
// ---- pi-subagents parity keys (optional; defaults follow the reference) ----
|
|
148
|
+
/** Background execution for launches that omit run_in_background. Default: true (their asyncByDefault). */
|
|
149
|
+
asyncByDefault?: boolean;
|
|
150
|
+
/** Context for launches that omit context. "fresh" | "fork". */
|
|
151
|
+
defaultSubagentContext?: "fresh" | "fork";
|
|
152
|
+
/** Force depth-0 runs into background mode and bypass launch UI. Default: false. */
|
|
153
|
+
forceTopLevelAsync?: boolean;
|
|
154
|
+
/** Global default runtime deadline (ms). Replaces the 30-minute foreground backstop. */
|
|
155
|
+
timeoutMs?: number;
|
|
156
|
+
/** Optional hard per-tool-call deadline (ms). Precedence: call > agent frontmatter > this > env. */
|
|
157
|
+
toolTimeoutMs?: number;
|
|
158
|
+
/** Cap on simultaneously running children within durable multi-child runs. Default: 20. */
|
|
159
|
+
globalConcurrencyLimit?: number;
|
|
160
|
+
/** Cumulative child launches per parent session. Unset/0 = unlimited. */
|
|
161
|
+
maxSubagentSpawnsPerSession?: number;
|
|
162
|
+
/** Cumulative logical-child cap for one top-level run tree. Default: 64. */
|
|
163
|
+
maxSubagentSpawnsPerRun?: number;
|
|
164
|
+
/** Concurrently active top-level async runs per parent session. Unset/0 = unlimited. */
|
|
165
|
+
maxActiveAsyncRunsPerSession?: number;
|
|
166
|
+
/** Nested delegation depth cap. Default: 2. */
|
|
167
|
+
maxSubagentDepth?: number;
|
|
168
|
+
/** Parallel fanout caps. maxTasks default 8; concurrency default 4. */
|
|
169
|
+
parallel?: { maxTasks?: number; concurrency?: number };
|
|
170
|
+
/** Default output limits for child results. Default: 200KB / 5000 lines. */
|
|
171
|
+
maxOutput?: { bytes?: number; lines?: number };
|
|
172
|
+
/** Session directory for child sessions. `~/` expanded. */
|
|
173
|
+
defaultSessionDir?: string;
|
|
174
|
+
/** Show the persistent fleet panel. Default: true. */
|
|
175
|
+
fleetView?: boolean;
|
|
176
|
+
/** Fleet panel placement. Default: "belowEditor". */
|
|
177
|
+
fleetViewPlacement?: "belowEditor" | "aboveEditor";
|
|
178
|
+
/** Inline chat rendering for spawn_helper results. "rich" | "summary". Default: rich. */
|
|
179
|
+
inlineToolDisplay?: "rich" | "summary";
|
|
180
|
+
/** Main chat renderer density controls. */
|
|
181
|
+
mainWindowRenderer?: { horizontalSpacing?: number; compactResultMaxLines?: number };
|
|
182
|
+
/** How slow async result scans are logged. "all" | "activity" | "off". Default: all. */
|
|
183
|
+
resultScanLogging?: "all" | "activity" | "off";
|
|
184
|
+
/** Shortcut detaching the active foreground single run without terminating it. */
|
|
185
|
+
foregroundDetachShortcut?: string;
|
|
186
|
+
/** Keep get_helper_result registered but make direct calls non-blocking. Default: true. */
|
|
187
|
+
waitTool?: boolean | { enabled?: boolean };
|
|
188
|
+
/** Base directory for worktree-isolated runs. Default: OS temp. */
|
|
189
|
+
worktreeBaseDir?: string;
|
|
190
|
+
/** Hook run once per created worktree. */
|
|
191
|
+
worktreeSetupHook?: string;
|
|
192
|
+
/** Timeout for the worktree setup hook in ms. Default: 30000. */
|
|
193
|
+
worktreeSetupHookTimeoutMs?: number;
|
|
194
|
+
/** Missions store config. */
|
|
195
|
+
missions?: {
|
|
196
|
+
enabled?: boolean;
|
|
197
|
+
directory?: string;
|
|
198
|
+
globalIndex?: boolean;
|
|
199
|
+
globalIndexDir?: string;
|
|
200
|
+
retainTerminal?: number;
|
|
201
|
+
};
|
|
202
|
+
/** Scheduled runs config. */
|
|
203
|
+
scheduledRuns?: { enabled?: boolean; maxPending?: number; storeRoot?: string };
|
|
204
|
+
/** Authority policy for operational actions. */
|
|
205
|
+
authorityPolicy?: {
|
|
206
|
+
discardWorktree?: "confirm" | "auto";
|
|
207
|
+
destructiveCleanup?: "confirm" | "auto";
|
|
208
|
+
spawnBudgetGrant?: "confirm" | "auto";
|
|
209
|
+
scheduleCreate?: "confirm" | "auto";
|
|
210
|
+
};
|
|
110
211
|
}
|
|
111
212
|
|
|
112
213
|
/** Agent activity for widget display. */
|