@apolloyh/apollo-agent 0.1.6 → 0.1.8
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/.apollo/config.example.json +3 -2
- package/README.md +2 -1
- package/dist/brand.d.ts +1 -1
- package/dist/brand.js +1 -1
- package/dist/cli-input.d.ts +1 -0
- package/dist/cli-input.d.ts.map +1 -1
- package/dist/cli-input.js +9 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -3
- package/dist/index.js +19 -29
- package/dist/runtime/prompt-builder.d.ts.map +1 -1
- package/dist/runtime/prompt-builder.js +2 -0
- package/dist/runtime/tool-policy.d.ts.map +1 -1
- package/dist/runtime/tool-policy.js +2 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"workspaceRoot": ".",
|
|
3
3
|
"systemPrompt": "",
|
|
4
|
+
"modeInstructions": "",
|
|
4
5
|
"maxTurns": 40,
|
|
5
6
|
"context": {
|
|
6
7
|
"maxChars": 262144,
|
|
@@ -23,9 +24,9 @@
|
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
26
|
"name": "Explore",
|
|
26
|
-
"description": "
|
|
27
|
+
"description": "Read-only exploration with explicit quick, medium, or very-thorough coverage: find files, map trees, and answer where/how questions without edits.",
|
|
27
28
|
"tools": ["list_files", "read_file", "git_status", "git_diff", "web_search", "web_fetch", "skill_search", "skill_read"],
|
|
28
|
-
"prompt": "You are an Explore subagent (read-only).
|
|
29
|
+
"prompt": "You are an Explore subagent (read-only). Start broad and narrow down. For all, complete, inventory, or very-thorough requests, recursively traverse the full requested tree, use at least three complementary passes (tree structure, filename/content search, and summary/index/manifest files), cross-check against counts or an independent aggregate source, and report scope, evidence, exclusions, and gaps. Prefer list_files / read_file. Do not modify files."
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
32
|
"name": "Plan",
|
package/README.md
CHANGED
|
@@ -35,7 +35,8 @@ apollo -r <session-id>
|
|
|
35
35
|
|
|
36
36
|
Apollo loads project `.apollo/.env`, project `.env`, then user-level `~/.apollo/.env`; use `--env-file <path>` to override discovery.
|
|
37
37
|
|
|
38
|
-
Apollo creates global defaults at `~/.apollo/config.json
|
|
38
|
+
Apollo creates global defaults at `~/.apollo/config.json` and copies the complete option
|
|
39
|
+
reference to `~/.apollo/config.example.json`. Project overrides live at
|
|
39
40
|
`.apollo/config.json`; Apollo also reads the legacy `agent.config.json` during migration.
|
|
40
41
|
Configuration layers as built-in defaults → user config → project config → `--config`.
|
|
41
42
|
Set `systemPrompt` in either config to append stable custom system instructions; restart Apollo to reload them.
|
package/dist/brand.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Product identity — single source of truth for display strings. */
|
|
2
2
|
export declare const PRODUCT: {
|
|
3
3
|
readonly name: "Apollo";
|
|
4
|
-
readonly version: "0.1.
|
|
4
|
+
readonly version: "0.1.8";
|
|
5
5
|
readonly tagline: "Your personal agent — answer first, act when needed.";
|
|
6
6
|
readonly packageName: "@apolloyh/apollo-agent";
|
|
7
7
|
readonly userAgent: "ApolloAgent/0.1";
|
package/dist/brand.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Product identity — single source of truth for display strings. */
|
|
2
2
|
export const PRODUCT = {
|
|
3
3
|
name: "Apollo",
|
|
4
|
-
version: "0.1.
|
|
4
|
+
version: "0.1.8",
|
|
5
5
|
tagline: "Your personal agent — answer first, act when needed.",
|
|
6
6
|
packageName: "@apolloyh/apollo-agent",
|
|
7
7
|
userAgent: "ApolloAgent/0.1",
|
package/dist/cli-input.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export type InputView = {
|
|
|
9
9
|
cursorWidth: number;
|
|
10
10
|
lines: string[];
|
|
11
11
|
};
|
|
12
|
+
export declare function slashCommandMatches(input: string, command: string): boolean;
|
|
12
13
|
export declare function createPastedTextBlock(text: string, id: number): PastedTextBlock | undefined;
|
|
13
14
|
export declare function resolvePastedText(value: string, blocks: ReadonlyMap<string, PastedTextBlock>): string;
|
|
14
15
|
export declare function pastedTextPreview(value: string, blocks: ReadonlyMap<string, PastedTextBlock>): string;
|
package/dist/cli-input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-input.d.ts","sourceRoot":"","sources":["../src/cli-input.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli-input.d.ts","sourceRoot":"","sources":["../src/cli-input.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAM3E;AAMD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAQ3F;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,MAAM,CAErG;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,MAAM,CAErG;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,GAC3C,SAAS,CAyCX"}
|
package/dist/cli-input.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export function slashCommandMatches(input, command) {
|
|
2
|
+
if (!input.startsWith("/"))
|
|
3
|
+
return false;
|
|
4
|
+
const query = input.slice(1).toLowerCase().trim();
|
|
5
|
+
if (!query)
|
|
6
|
+
return true;
|
|
7
|
+
const name = command.slice(1).toLowerCase();
|
|
8
|
+
return name.startsWith(query) || name.split(/\s+/).some((word) => word.startsWith(query));
|
|
9
|
+
}
|
|
1
10
|
const MIN_FOLDED_PASTE_LINES = 6;
|
|
2
11
|
const MIN_FOLDED_PASTE_CHARS = 1000;
|
|
3
12
|
const FIRST_MARKER = 0xf0000;
|
package/dist/config.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ export declare function ensureUserConfigFile(): {
|
|
|
10
10
|
path: string;
|
|
11
11
|
created: boolean;
|
|
12
12
|
};
|
|
13
|
+
export declare function ensureUserConfigExampleFile(): {
|
|
14
|
+
path: string;
|
|
15
|
+
created: boolean;
|
|
16
|
+
};
|
|
13
17
|
export declare function loadAgentConfig(configPath?: string): Promise<AgentConfig>;
|
|
14
18
|
/**
|
|
15
19
|
* Load an explicit env file, or discover project env then ~/.apollo/.env.
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEzE,wDAAwD;AACxD,eAAO,MAAM,cAAc,EAAE,cAAc,EA8B1C,CAAC;AAsBF,eAAO,MAAM,0BAA0B,oHAC4E,CAAC;AAwBpH,wBAAgB,iBAAiB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAatE;AAED,wBAAgB,oBAAoB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAazE;AAED,wBAAgB,2BAA2B,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAchF;AAED,wBAAsB,eAAe,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAkD/E;AAiBD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAwB3F;AAYD,wBAAgB,aAAa,CAAC,OAAO,GAAE;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,SAAS,CAkCrF"}
|
package/dist/config.js
CHANGED
|
@@ -2,6 +2,7 @@ import fsSync from "node:fs";
|
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
5
6
|
/** Default subagents — Claude Code–style Task roles. */
|
|
6
7
|
export const DEFAULT_AGENTS = [
|
|
7
8
|
{
|
|
@@ -14,11 +15,13 @@ Work thoroughly but stay scoped. Use tools as needed. Return one concise final r
|
|
|
14
15
|
},
|
|
15
16
|
{
|
|
16
17
|
name: "Explore",
|
|
17
|
-
description: "
|
|
18
|
+
description: "Read-only exploration with explicit quick, medium, or very-thorough coverage: find files, map trees, and answer where/how questions without edits.",
|
|
18
19
|
tools: ["list_files", "read_file", "git_status", "git_diff", "web_search", "web_fetch", "skill_search", "skill_read"],
|
|
19
|
-
prompt: `You are an Explore subagent (read-only). Map the codebase or research a question
|
|
20
|
+
prompt: `You are an Explore subagent (read-only). Map the codebase or research a question with the thoroughness requested by the caller.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
Start broad and narrow down. Check multiple locations, naming conventions, and related files instead of stopping at the first match. For "all", "complete", inventory, or very-thorough requests: recursively traverse the full requested tree, use at least three complementary passes (tree structure, filename/content search, and summary/index/manifest files), and cross-check detailed findings against counts or an independent aggregate source. Report the exact scope covered, evidence for completeness, exclusions, and unresolved gaps.
|
|
23
|
+
|
|
24
|
+
Prefer list_files / read_file over shell. Do not modify files, run destructive commands, or commit. Return a concise structured report: scope, search passes, key paths, findings, completeness check, and open questions.`,
|
|
22
25
|
},
|
|
23
26
|
{
|
|
24
27
|
name: "Plan",
|
|
@@ -65,6 +68,7 @@ const USER_CONFIG_TEMPLATE = `${JSON.stringify({
|
|
|
65
68
|
skills: defaultConfig.skills,
|
|
66
69
|
mcpServers: defaultConfig.mcpServers,
|
|
67
70
|
}, null, 2)}\n`;
|
|
71
|
+
const BUNDLED_CONFIG_EXAMPLE_PATH = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../.apollo/config.example.json");
|
|
68
72
|
export function ensureUserEnvFile() {
|
|
69
73
|
const directory = path.join(os.homedir(), ".apollo");
|
|
70
74
|
const envPath = path.join(directory, ".env");
|
|
@@ -97,6 +101,23 @@ export function ensureUserConfigFile() {
|
|
|
97
101
|
throw error;
|
|
98
102
|
}
|
|
99
103
|
}
|
|
104
|
+
export function ensureUserConfigExampleFile() {
|
|
105
|
+
const directory = path.join(os.homedir(), ".apollo");
|
|
106
|
+
const examplePath = path.join(directory, "config.example.json");
|
|
107
|
+
if (fsSync.existsSync(examplePath))
|
|
108
|
+
return { path: examplePath, created: false };
|
|
109
|
+
const template = fsSync.readFileSync(BUNDLED_CONFIG_EXAMPLE_PATH, "utf8");
|
|
110
|
+
fsSync.mkdirSync(directory, { recursive: true, mode: 0o700 });
|
|
111
|
+
try {
|
|
112
|
+
fsSync.writeFileSync(examplePath, template, { encoding: "utf8", flag: "wx", mode: 0o600 });
|
|
113
|
+
return { path: examplePath, created: true };
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
if (error.code === "EEXIST")
|
|
117
|
+
return { path: examplePath, created: false };
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
100
121
|
export async function loadAgentConfig(configPath) {
|
|
101
122
|
const userConfigPath = path.join(os.homedir(), ".apollo", "config.json");
|
|
102
123
|
const projectConfigPath = [DEFAULT_CONFIG_PATH, LEGACY_CONFIG_PATH].find(fsSync.existsSync);
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { stdin, stdout } from "node:process";
|
|
|
3
3
|
import readline from "node:readline/promises";
|
|
4
4
|
import { ASCII_LOGO, PRODUCT } from "./brand.js";
|
|
5
5
|
import { parseArgs } from "./cli-args.js";
|
|
6
|
-
import { createPastedTextBlock, pastedTextPreview, renderInputView, resolvePastedText, } from "./cli-input.js";
|
|
7
|
-
import { ensureUserEnvFile, ensureUserConfigFile, loadAgentConfig, loadEnvFile, loadLlmConfig, MISSING_AUTH_TOKEN_MESSAGE, } from "./config.js";
|
|
6
|
+
import { createPastedTextBlock, pastedTextPreview, renderInputView, resolvePastedText, slashCommandMatches, } from "./cli-input.js";
|
|
7
|
+
import { ensureUserEnvFile, ensureUserConfigExampleFile, ensureUserConfigFile, loadAgentConfig, loadEnvFile, loadLlmConfig, MISSING_AUTH_TOKEN_MESSAGE, } from "./config.js";
|
|
8
8
|
import { pickSpinnerVerb } from "./constants/spinner-verbs.js";
|
|
9
9
|
import { QueryEngine } from "./runtime/query-engine.js";
|
|
10
10
|
import { createCliApprovalProvider } from "./runtime/permissions.js";
|
|
@@ -41,24 +41,13 @@ const slashCommands = [
|
|
|
41
41
|
];
|
|
42
42
|
/** Filter slash commands by command-name prefix only (accurate search). */
|
|
43
43
|
function filterSlashCommands(buffer) {
|
|
44
|
-
|
|
45
|
-
return [];
|
|
46
|
-
const q = buffer.slice(1).toLowerCase().trim();
|
|
47
|
-
if (!q)
|
|
48
|
-
return slashCommands;
|
|
49
|
-
// /s → /status /stream /skill… NOT /help (desc has "slash")
|
|
50
|
-
return slashCommands.filter((cmd) => {
|
|
51
|
-
const name = cmd.command.slice(1).toLowerCase();
|
|
52
|
-
if (name.startsWith(q))
|
|
53
|
-
return true;
|
|
54
|
-
// multi-word: "/sk" matches "skill install"
|
|
55
|
-
return name.split(/\s+/).some((w) => w.startsWith(q));
|
|
56
|
-
});
|
|
44
|
+
return slashCommands.filter((command) => slashCommandMatches(buffer, command.command));
|
|
57
45
|
}
|
|
58
46
|
async function main() {
|
|
59
47
|
const args = parseArgs(process.argv.slice(2));
|
|
60
48
|
const userEnv = ensureUserEnvFile();
|
|
61
49
|
const userConfig = ensureUserConfigFile();
|
|
50
|
+
const userConfigExample = ensureUserConfigExampleFile();
|
|
62
51
|
loadEnvFile(args.envPath);
|
|
63
52
|
const task = args.task ?? (stdin.isTTY ? undefined : (await readStdin()).trim());
|
|
64
53
|
if (!task && !stdin.isTTY) {
|
|
@@ -245,6 +234,9 @@ async function main() {
|
|
|
245
234
|
if (userConfig.created) {
|
|
246
235
|
stdout.write(`Created ${shortenHome(userConfig.path)} with default settings.\n`);
|
|
247
236
|
}
|
|
237
|
+
if (userConfigExample.created) {
|
|
238
|
+
stdout.write(`Created ${shortenHome(userConfigExample.path)} with all configuration options.\n`);
|
|
239
|
+
}
|
|
248
240
|
const approvalProvider = createCliApprovalProvider(agentConfig, traceSink, () => yolo, {
|
|
249
241
|
beforePrompt: () => {
|
|
250
242
|
stopLiveStatus("none");
|
|
@@ -1117,6 +1109,13 @@ async function readCliLine(options) {
|
|
|
1117
1109
|
}
|
|
1118
1110
|
selected = ((selected % list.length) + list.length) % list.length;
|
|
1119
1111
|
};
|
|
1112
|
+
const syncPalette = () => {
|
|
1113
|
+
paletteOpen = filterSlashCommands(buffer).length > 0;
|
|
1114
|
+
if (paletteOpen)
|
|
1115
|
+
clampSelected();
|
|
1116
|
+
else
|
|
1117
|
+
selected = 0;
|
|
1118
|
+
};
|
|
1120
1119
|
const handleKey = (chunk) => {
|
|
1121
1120
|
if (done)
|
|
1122
1121
|
return;
|
|
@@ -1182,13 +1181,7 @@ async function readCliLine(options) {
|
|
|
1182
1181
|
buffer = characters.join("");
|
|
1183
1182
|
cursor -= 1;
|
|
1184
1183
|
}
|
|
1185
|
-
|
|
1186
|
-
paletteOpen = true;
|
|
1187
|
-
clampSelected();
|
|
1188
|
-
}
|
|
1189
|
-
else {
|
|
1190
|
-
closePalette();
|
|
1191
|
-
}
|
|
1184
|
+
syncPalette();
|
|
1192
1185
|
render();
|
|
1193
1186
|
return;
|
|
1194
1187
|
}
|
|
@@ -1213,6 +1206,7 @@ async function readCliLine(options) {
|
|
|
1213
1206
|
if (cursor < characters.length)
|
|
1214
1207
|
characters.splice(cursor, 1);
|
|
1215
1208
|
buffer = characters.join("");
|
|
1209
|
+
syncPalette();
|
|
1216
1210
|
render();
|
|
1217
1211
|
return;
|
|
1218
1212
|
}
|
|
@@ -1233,6 +1227,7 @@ async function readCliLine(options) {
|
|
|
1233
1227
|
characters.splice(start, cursor - start);
|
|
1234
1228
|
buffer = characters.join("");
|
|
1235
1229
|
cursor = start;
|
|
1230
|
+
syncPalette();
|
|
1236
1231
|
render();
|
|
1237
1232
|
return;
|
|
1238
1233
|
}
|
|
@@ -1264,13 +1259,7 @@ async function readCliLine(options) {
|
|
|
1264
1259
|
buffer = characters.join("");
|
|
1265
1260
|
cursor += 1;
|
|
1266
1261
|
}
|
|
1267
|
-
|
|
1268
|
-
paletteOpen = true;
|
|
1269
|
-
clampSelected();
|
|
1270
|
-
}
|
|
1271
|
-
else {
|
|
1272
|
-
closePalette();
|
|
1273
|
-
}
|
|
1262
|
+
syncPalette();
|
|
1274
1263
|
render();
|
|
1275
1264
|
};
|
|
1276
1265
|
const insertText = (text) => {
|
|
@@ -1312,6 +1301,7 @@ async function readCliLine(options) {
|
|
|
1312
1301
|
insertText(pasteBuffer);
|
|
1313
1302
|
pasteBuffer = undefined;
|
|
1314
1303
|
rest = rest.slice(end + pasteEnd.length);
|
|
1304
|
+
syncPalette();
|
|
1315
1305
|
render();
|
|
1316
1306
|
continue;
|
|
1317
1307
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-builder.d.ts","sourceRoot":"","sources":["../../src/runtime/prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI9E,KAAK,oBAAoB,GAAG;IAC1B,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAChE,CAAC;AAEF,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,oBAAoB;IAE1D,KAAK,IAAI,MAAM;IAqBf,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,0BAA0B;IASlC,OAAO,CAAC,yBAAyB;IAOjC,OAAO,CAAC,iBAAiB;
|
|
1
|
+
{"version":3,"file":"prompt-builder.d.ts","sourceRoot":"","sources":["../../src/runtime/prompt-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI9E,KAAK,oBAAoB,GAAG;IAC1B,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAChE,CAAC;AAEF,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,oBAAoB;IAE1D,KAAK,IAAI,MAAM;IAqBf,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,0BAA0B;IASlC,OAAO,CAAC,yBAAyB;IAOjC,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,uBAAuB;IAO/B,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,WAAW;CAQpB"}
|
|
@@ -70,6 +70,8 @@ ${prompt}`;
|
|
|
70
70
|
return `# Doing Tasks
|
|
71
71
|
- For ordinary questions, answer directly without tools.
|
|
72
72
|
- For code or workspace tasks, read relevant files before proposing or making changes.
|
|
73
|
+
- Treat words such as "all", "every", "complete", "entire", "inventory", and "exhaustive" as coverage requirements, not requests for representative examples. Define the scope, traverse every relevant branch recursively, and do not answer after inspecting only the first few matches.
|
|
74
|
+
- For exhaustive discovery, start broad and then narrow: inspect the full directory tree, search multiple locations and naming conventions, look for summary/index/manifest/catalog files, and cross-check detailed findings against an independent source or count. If completeness cannot be proven, state the exact boundary and remaining gaps.
|
|
73
75
|
- Keep changes scoped to what the user asked. Do not add speculative features, broad refactors, or unnecessary abstractions.
|
|
74
76
|
- Prefer editing existing files over creating new files unless a new file is necessary.
|
|
75
77
|
- When calling tools, include every required input field every time. Prefer edit_file with path, old_string, and new_string for localized changes. Use write_file with both path and content only for new files or intentional full-file replacement.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-policy.d.ts","sourceRoot":"","sources":["../../src/runtime/tool-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEjE,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,aAAa,EAAE;IAEnD,kBAAkB,IAAI,MAAM;IAqC5B,mBAAmB,IAAI,MAAM;IAU7B;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"tool-policy.d.ts","sourceRoot":"","sources":["../../src/runtime/tool-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEjE,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,aAAa,EAAE;IAEnD,kBAAkB,IAAI,MAAM;IAqC5B,mBAAmB,IAAI,MAAM;IAU7B;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM;IA6ClD,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM;CAU1D"}
|
|
@@ -83,6 +83,8 @@ You may launch a **fresh subagent** with the \`Task\` tool. This follows the Cla
|
|
|
83
83
|
Write for a capable colleague who just joined with **no context**:
|
|
84
84
|
goal · why it matters · relevant paths/facts · what you already tried · scope boundaries · whether edits are expected · expected output format.
|
|
85
85
|
|
|
86
|
+
For inventory or "find all" tasks, also specify the desired thoroughness and require coverage evidence: recursive scope traversal, multiple search strategies, summary/index files checked, and any exclusions or unresolved gaps.
|
|
87
|
+
|
|
86
88
|
Always set:
|
|
87
89
|
- \`description\`: 3–5 words, user-visible status (e.g. "find auth handlers")
|
|
88
90
|
- \`subagent_type\`: one of the types below
|