autopilot-ai 1.8.0 → 1.9.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/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/sdk/index.js +2 -2
- package/dist/sdk/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4576,7 +4576,7 @@ var init_system_prompt = __esm({
|
|
|
4576
4576
|
"use strict";
|
|
4577
4577
|
init_mode();
|
|
4578
4578
|
init_user_shell();
|
|
4579
|
-
CONTEXT_FILENAMES = ["KIMI.md", "KIMIFLARE.md", "AGENT.md"];
|
|
4579
|
+
CONTEXT_FILENAMES = ["AGENTS.md", "KIMI.md", "KIMIFLARE.md", "AGENT.md"];
|
|
4580
4580
|
MAX_CONTEXT_BYTES = 20 * 1024;
|
|
4581
4581
|
}
|
|
4582
4582
|
});
|
|
@@ -16955,7 +16955,7 @@ var init_session = __esm({
|
|
|
16955
16955
|
}
|
|
16956
16956
|
}
|
|
16957
16957
|
});
|
|
16958
|
-
if (existsSync4(join29(this.cwd,
|
|
16958
|
+
if (["AGENTS.md", "KIMI.md", "KIMIFLARE.md", "AGENT.md"].some((name) => existsSync4(join29(this.cwd, name)))) {
|
|
16959
16959
|
this.messages[0] = {
|
|
16960
16960
|
role: "system",
|
|
16961
16961
|
content: buildSystemPrompt({
|
|
@@ -18750,7 +18750,7 @@ var init_builtins = __esm({
|
|
|
18750
18750
|
{ name: "compact", description: "Summarize old turns to free context", source: "builtin" },
|
|
18751
18751
|
{ name: "clear", description: "Clear current conversation", source: "builtin" },
|
|
18752
18752
|
{ name: "fresh", description: "Start a fresh session with a summarized plan or continuation context", source: "builtin" },
|
|
18753
|
-
{ name: "init", description: "Scan repo and write
|
|
18753
|
+
{ name: "init", description: "Scan repo and write AGENTS.md", source: "builtin" },
|
|
18754
18754
|
{ name: "remote", argHint: "[<prompt>]", description: "Run a remote session on Cloudflare", source: "builtin" },
|
|
18755
18755
|
{ name: "update", description: "Check for updates", source: "builtin" },
|
|
18756
18756
|
{ name: "hello", description: "Send a voice note to the creator", source: "builtin" },
|
|
@@ -19290,7 +19290,7 @@ var init_help_menu = __esm({
|
|
|
19290
19290
|
key: "config",
|
|
19291
19291
|
label: "Config",
|
|
19292
19292
|
commands: [
|
|
19293
|
-
{ command: "/init", description: "scan this repo and write
|
|
19293
|
+
{ command: "/init", description: "scan this repo and write an AGENTS.md" },
|
|
19294
19294
|
{ command: "/settings", description: "show feature settings" },
|
|
19295
19295
|
{ command: "/key", description: "show your OpenRouter key status and credit" },
|
|
19296
19296
|
{ command: "/key set <key>", description: "replace your OpenRouter key", selectable: false },
|
|
@@ -24288,10 +24288,10 @@ function humanizeInfo(text, tier) {
|
|
|
24288
24288
|
heavy: "Running the latest version"
|
|
24289
24289
|
});
|
|
24290
24290
|
}
|
|
24291
|
-
if (
|
|
24291
|
+
if (/^(AGENTS|KIMI|KIMIFLARE|AGENT)\.md generated; context loaded for future turns$/.test(text)) {
|
|
24292
24292
|
return pick(tier, {
|
|
24293
24293
|
light: "Project context refreshed",
|
|
24294
|
-
medium: "
|
|
24294
|
+
medium: "Project context generated \u2014 loaded",
|
|
24295
24295
|
heavy: "Project context snapshot updated"
|
|
24296
24296
|
});
|
|
24297
24297
|
}
|
|
@@ -33587,11 +33587,11 @@ Aim for 100\u2013200 lines total. Use markdown tables where they save space.
|
|
|
33587
33587
|
`.trim();
|
|
33588
33588
|
}
|
|
33589
33589
|
function buildInitPrompt(cwd) {
|
|
33590
|
-
const existingName = ["KIMI.md", "KIMIFLARE.md", "AGENT.md"].find(
|
|
33590
|
+
const existingName = ["AGENTS.md", "KIMI.md", "KIMIFLARE.md", "AGENT.md"].find(
|
|
33591
33591
|
(n) => existsSync6(join41(cwd, n))
|
|
33592
33592
|
);
|
|
33593
33593
|
const isRefresh = existingName !== void 0;
|
|
33594
|
-
const targetFilename = existingName ?? "
|
|
33594
|
+
const targetFilename = existingName ?? "AGENTS.md";
|
|
33595
33595
|
const profile = analyzeProject(cwd);
|
|
33596
33596
|
const checklist = discoveryChecklist(profile);
|
|
33597
33597
|
const sections = sectionTemplate();
|
|
@@ -33863,14 +33863,14 @@ async function runInit(deps) {
|
|
|
33863
33863
|
{
|
|
33864
33864
|
kind: "info",
|
|
33865
33865
|
key: mkKey2(),
|
|
33866
|
-
text: "Project context may be stale. Run /init to refresh
|
|
33866
|
+
text: "Project context may be stale. Run /init to refresh AGENTS.md based on recent changes."
|
|
33867
33867
|
}
|
|
33868
33868
|
]);
|
|
33869
33869
|
}
|
|
33870
33870
|
}
|
|
33871
33871
|
}
|
|
33872
33872
|
});
|
|
33873
|
-
if (existsSync7(join42(cwd,
|
|
33873
|
+
if (existsSync7(join42(cwd, targetFilename))) {
|
|
33874
33874
|
if (cacheStableRef.current) {
|
|
33875
33875
|
messagesRef.current[1] = {
|
|
33876
33876
|
role: "system",
|
|
@@ -33894,7 +33894,7 @@ async function runInit(deps) {
|
|
|
33894
33894
|
}
|
|
33895
33895
|
setEvents((e) => [
|
|
33896
33896
|
...e,
|
|
33897
|
-
{ kind: "info", key: mkKey2(), text:
|
|
33897
|
+
{ kind: "info", key: mkKey2(), text: `${targetFilename} generated; context loaded for future turns` }
|
|
33898
33898
|
]);
|
|
33899
33899
|
void memoryManagerRef.current?.recordKimiMdRefresh(cwd, ensureSessionId());
|
|
33900
33900
|
setKimiMdStale(false);
|
|
@@ -33921,7 +33921,7 @@ async function runInit(deps) {
|
|
|
33921
33921
|
{
|
|
33922
33922
|
kind: "error",
|
|
33923
33923
|
key: mkKey2(),
|
|
33924
|
-
text: "/init stopped: the agent kept repeating the same tool calls and couldn't finish writing
|
|
33924
|
+
text: "/init stopped: the agent kept repeating the same tool calls and couldn't finish writing the project context file. Try /init again \u2014 if it loops in the same place, the repo may be too large for a single pass; you can write AGENTS.md manually or scope it by deleting noisy paths from your .gitignore-style ignore list."
|
|
33925
33925
|
}
|
|
33926
33926
|
]);
|
|
33927
33927
|
} else if (e instanceof KimiApiError && (e.httpStatus === 429 || e.httpStatus !== void 0 && e.httpStatus >= 500)) {
|
|
@@ -34260,7 +34260,7 @@ function runStartupTasks(deps) {
|
|
|
34260
34260
|
});
|
|
34261
34261
|
const cwd = process.cwd();
|
|
34262
34262
|
sessionStartRecallRef.current = manager.recall({ text: cwd, repoPath: cwd, limit: 5 });
|
|
34263
|
-
if (
|
|
34263
|
+
if (["AGENTS.md", "KIMI.md", "KIMIFLARE.md", "AGENT.md"].some((name) => existsSync8(join44(cwd, name)))) {
|
|
34264
34264
|
const lastRefresh = manager.getLastKimiMdRefreshTime(cwd);
|
|
34265
34265
|
const driftCount = manager.countHighSignalMemoriesSince(cwd, lastRefresh);
|
|
34266
34266
|
if (driftCount >= 5) {
|
|
@@ -36208,7 +36208,7 @@ ${result2.output ?? "(output not captured)"}`,
|
|
|
36208
36208
|
}
|
|
36209
36209
|
}
|
|
36210
36210
|
turnCounterRef.current += 1;
|
|
36211
|
-
if (turnCounterRef.current % 15 === 0 && existsSync9(join46(process.cwd(),
|
|
36211
|
+
if (turnCounterRef.current % 15 === 0 && ["AGENTS.md", "KIMI.md", "KIMIFLARE.md", "AGENT.md"].some((name) => existsSync9(join46(process.cwd(), name))) && !kimiMdStale) {
|
|
36212
36212
|
setEvents((e) => [
|
|
36213
36213
|
...e,
|
|
36214
36214
|
{ kind: "info", key: mkKey(), text: "Tip: Rerunning /init occasionally helps autopilot (formerly kimiflare) stay accurate as your project evolves." }
|
|
@@ -36494,7 +36494,7 @@ ${conflicts.join("\n")}` }
|
|
|
36494
36494
|
setKimiMdStale(true);
|
|
36495
36495
|
setEvents((e) => [
|
|
36496
36496
|
...e,
|
|
36497
|
-
{ kind: "info", key: mkKey(), text: "Project context may be stale. Run /init to refresh
|
|
36497
|
+
{ kind: "info", key: mkKey(), text: "Project context may be stale. Run /init to refresh AGENTS.md based on recent changes." }
|
|
36498
36498
|
]);
|
|
36499
36499
|
}
|
|
36500
36500
|
},
|