autopilot-ai 1.19.1 → 1.19.3
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 +97 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16748,8 +16748,42 @@ data: ${JSON.stringify(event.data)}
|
|
|
16748
16748
|
|
|
16749
16749
|
// src/server/aster-cell-runtime.ts
|
|
16750
16750
|
import { execFile as execFile5 } from "child_process";
|
|
16751
|
+
import { readFile as readFile21 } from "fs/promises";
|
|
16751
16752
|
import { promisify as promisify4 } from "util";
|
|
16752
16753
|
import { randomUUID as randomUUID8 } from "crypto";
|
|
16754
|
+
async function writeCellFileChunked(cell, path, content) {
|
|
16755
|
+
if (Buffer.byteLength(content, "utf8") <= CELL_FILE_WRITE_CHUNK_CHARS) {
|
|
16756
|
+
await cell.writeFile(path, content, { mode: "0600" });
|
|
16757
|
+
return;
|
|
16758
|
+
}
|
|
16759
|
+
const partsDir = `${path}.parts`;
|
|
16760
|
+
const encoded = Buffer.from(content, "utf8").toString("base64");
|
|
16761
|
+
const partPaths = [];
|
|
16762
|
+
await cell.mkdir(partsDir, { parents: true });
|
|
16763
|
+
try {
|
|
16764
|
+
for (let offset = 0, index = 0; offset < encoded.length; offset += CELL_FILE_WRITE_CHUNK_CHARS, index++) {
|
|
16765
|
+
const partPath = `${partsDir}/${String(index).padStart(6, "0")}.b64`;
|
|
16766
|
+
await cell.writeFile(partPath, encoded.slice(offset, offset + CELL_FILE_WRITE_CHUNK_CHARS), { mode: "0600" });
|
|
16767
|
+
partPaths.push(partPath);
|
|
16768
|
+
}
|
|
16769
|
+
const result2 = await cell.exec(
|
|
16770
|
+
`cat ${partPaths.map(shellQuote2).join(" ")} | base64 -d > ${shellQuote2(path)} && chmod 600 ${shellQuote2(path)}`
|
|
16771
|
+
);
|
|
16772
|
+
if (result2.exitCode !== 0) throw new Error("cell_control_failed");
|
|
16773
|
+
} finally {
|
|
16774
|
+
await cell.exec(`rm -rf ${shellQuote2(partsDir)}`).catch(() => {
|
|
16775
|
+
});
|
|
16776
|
+
}
|
|
16777
|
+
}
|
|
16778
|
+
async function readBundledCellSdkBundle() {
|
|
16779
|
+
for (const url of [new URL("./sdk/index.js", import.meta.url), new URL("../sdk/index.js", import.meta.url)]) {
|
|
16780
|
+
try {
|
|
16781
|
+
return await readFile21(url, "utf8");
|
|
16782
|
+
} catch {
|
|
16783
|
+
}
|
|
16784
|
+
}
|
|
16785
|
+
throw new Error("cell_runtime_bundle_unavailable");
|
|
16786
|
+
}
|
|
16753
16787
|
async function defaultArchiveWorkspace(workspaceRoot) {
|
|
16754
16788
|
const { stdout } = await execFileAsync3("git", ["-C", workspaceRoot, "archive", "--format=tar", "HEAD"], {
|
|
16755
16789
|
encoding: "buffer",
|
|
@@ -16799,7 +16833,7 @@ ${redacted.slice(-half)}`;
|
|
|
16799
16833
|
function sleep4(ms) {
|
|
16800
16834
|
return new Promise((resolve15) => setTimeout(resolve15, ms));
|
|
16801
16835
|
}
|
|
16802
|
-
var execFileAsync3, CELL_WORKSPACE, CELL_STATE_DIR, CHECKPOINT_MESSAGE_FILE, INSTALLED_RUNTIME_PACKAGE, NOTES_FILE, MEMORY_FILE, MEMORY_EXTRACTION_TIMEOUT_MS, LIVENESS_CHECK_MS, ARTIFACTS_DIR, MAX_ARTIFACTS, MAX_ARTIFACT_BYTES, BRANCH_RE, REPOSITORY_RE, GIT, COMMIT_SHA_RE, MAX_TOOL_OUTPUT_CHARS, MAX_TOOL_INPUT_CHARS, MAX_CHECKPOINTS, CELL_CONTROL_DIR, BRIDGE_MARKER, CONTROL_RUNNER, BRIDGE_RUNNER, HEALTH_TIMEOUT_MS, EVENT_POLL_MS, AsterHotcellRuntime, ARTIFACT_MIME_TYPES;
|
|
16836
|
+
var execFileAsync3, CELL_WORKSPACE, CELL_STATE_DIR, CHECKPOINT_MESSAGE_FILE, CELL_RUNTIME_DIR, INSTALLED_RUNTIME_PACKAGE, CELL_RUNTIME_SDK_ENTRY, NOTES_FILE, MEMORY_FILE, MEMORY_EXTRACTION_TIMEOUT_MS, LIVENESS_CHECK_MS, ARTIFACTS_DIR, MAX_ARTIFACTS, MAX_ARTIFACT_BYTES, BRANCH_RE, REPOSITORY_RE, GIT, COMMIT_SHA_RE, MAX_TOOL_OUTPUT_CHARS, MAX_TOOL_INPUT_CHARS, MAX_CHECKPOINTS, CELL_CONTROL_DIR, BRIDGE_MARKER, CONTROL_RUNNER, BRIDGE_RUNNER, HEALTH_TIMEOUT_MS, EVENT_POLL_MS, AsterHotcellRuntime, CELL_FILE_WRITE_CHUNK_CHARS, ARTIFACT_MIME_TYPES;
|
|
16803
16837
|
var init_aster_cell_runtime = __esm({
|
|
16804
16838
|
"src/server/aster-cell-runtime.ts"() {
|
|
16805
16839
|
"use strict";
|
|
@@ -16809,7 +16843,9 @@ var init_aster_cell_runtime = __esm({
|
|
|
16809
16843
|
CELL_WORKSPACE = "/workspace";
|
|
16810
16844
|
CELL_STATE_DIR = "/workspace/.aster";
|
|
16811
16845
|
CHECKPOINT_MESSAGE_FILE = `${CELL_STATE_DIR}/checkpoint-message`;
|
|
16812
|
-
|
|
16846
|
+
CELL_RUNTIME_DIR = "/opt/autopilot/node_modules/autopilot-ai";
|
|
16847
|
+
INSTALLED_RUNTIME_PACKAGE = `${CELL_RUNTIME_DIR}/package.json`;
|
|
16848
|
+
CELL_RUNTIME_SDK_ENTRY = `${CELL_RUNTIME_DIR}/dist/sdk/index.js`;
|
|
16813
16849
|
NOTES_FILE = `${CELL_STATE_DIR}/pending-notes`;
|
|
16814
16850
|
MEMORY_FILE = `${CELL_STATE_DIR}/memory.md`;
|
|
16815
16851
|
MEMORY_EXTRACTION_TIMEOUT_MS = 15e3;
|
|
@@ -16834,6 +16870,7 @@ var init_aster_cell_runtime = __esm({
|
|
|
16834
16870
|
constructor(provider, options = {}) {
|
|
16835
16871
|
this.provider = provider;
|
|
16836
16872
|
this.packageSpec = options.autopilotPackageSpec ?? `autopilot-ai@${getAppVersion()}`;
|
|
16873
|
+
this.cellRuntimeSdkBundle = options.cellRuntimeSdkBundle;
|
|
16837
16874
|
this.archiveWorkspace = options.archiveWorkspace ?? defaultArchiveWorkspace;
|
|
16838
16875
|
this.pollIntervalMs = options.pollIntervalMs ?? EVENT_POLL_MS;
|
|
16839
16876
|
this.healthTimeoutMs = options.healthTimeoutMs ?? HEALTH_TIMEOUT_MS;
|
|
@@ -16848,6 +16885,7 @@ var init_aster_cell_runtime = __esm({
|
|
|
16848
16885
|
}
|
|
16849
16886
|
provider;
|
|
16850
16887
|
packageSpec;
|
|
16888
|
+
cellRuntimeSdkBundle;
|
|
16851
16889
|
archiveWorkspace;
|
|
16852
16890
|
pollIntervalMs;
|
|
16853
16891
|
healthTimeoutMs;
|
|
@@ -17016,7 +17054,7 @@ var init_aster_cell_runtime = __esm({
|
|
|
17016
17054
|
const cell = await this.provider.getCell(cellId);
|
|
17017
17055
|
if (turn.memory) {
|
|
17018
17056
|
await cell.mkdir(CELL_STATE_DIR, { parents: true });
|
|
17019
|
-
await cell
|
|
17057
|
+
await writeCellFileChunked(cell, MEMORY_FILE, turn.memory.snapshot);
|
|
17020
17058
|
}
|
|
17021
17059
|
const note = [await this.readNotes(cell), turn.memory?.note ?? ""].filter(Boolean).join("\n\n");
|
|
17022
17060
|
const message2 = note ? `${note}
|
|
@@ -17244,11 +17282,38 @@ ${text}` : text, { mode: "0600" });
|
|
|
17244
17282
|
}
|
|
17245
17283
|
async installRuntime(cell) {
|
|
17246
17284
|
const expectedVersion = /@(\d[^@/]*)$/.exec(this.packageSpec)?.[1];
|
|
17285
|
+
let installed;
|
|
17247
17286
|
try {
|
|
17248
|
-
|
|
17249
|
-
if (!expectedVersion || installed
|
|
17287
|
+
installed = JSON.parse(await cell.readFile(INSTALLED_RUNTIME_PACKAGE));
|
|
17288
|
+
if (!expectedVersion || installed?.version === expectedVersion) return;
|
|
17250
17289
|
} catch {
|
|
17251
17290
|
}
|
|
17291
|
+
if (installed && expectedVersion) {
|
|
17292
|
+
const sdkBundle = this.cellRuntimeSdkBundle ?? await readBundledCellSdkBundle();
|
|
17293
|
+
await cell.mkdir(`${CELL_RUNTIME_DIR}/dist/sdk`, { parents: true });
|
|
17294
|
+
await writeCellFileChunked(cell, CELL_RUNTIME_SDK_ENTRY, sdkBundle);
|
|
17295
|
+
const bridge = (await cell.listProcesses()).find(
|
|
17296
|
+
(process3) => process3.status === "running" && process3.command.includes(BRIDGE_MARKER)
|
|
17297
|
+
);
|
|
17298
|
+
if (bridge) {
|
|
17299
|
+
await cell.killProcess(bridge.procId);
|
|
17300
|
+
const deadline = Date.now() + 5e3;
|
|
17301
|
+
for (; ; ) {
|
|
17302
|
+
const stillRunning = (await cell.listProcesses()).some(
|
|
17303
|
+
(process3) => process3.procId === bridge.procId && process3.status === "running"
|
|
17304
|
+
);
|
|
17305
|
+
if (!stillRunning) break;
|
|
17306
|
+
if (Date.now() >= deadline) throw new Error("cell_runtime_restart_failed");
|
|
17307
|
+
await sleep4(50);
|
|
17308
|
+
}
|
|
17309
|
+
}
|
|
17310
|
+
await cell.writeFile(
|
|
17311
|
+
INSTALLED_RUNTIME_PACKAGE,
|
|
17312
|
+
JSON.stringify({ ...installed, version: expectedVersion }),
|
|
17313
|
+
{ mode: "0600" }
|
|
17314
|
+
);
|
|
17315
|
+
return;
|
|
17316
|
+
}
|
|
17252
17317
|
const install = await cell.exec(`mkdir -p /opt/autopilot && npm install --prefix /opt/autopilot --no-audit --no-fund ${this.packageSpec}`);
|
|
17253
17318
|
if (install.exitCode !== 0) throw new Error("cell_runtime_install_failed");
|
|
17254
17319
|
}
|
|
@@ -17273,7 +17338,7 @@ ${text}` : text, { mode: "0600" });
|
|
|
17273
17338
|
async control(cell, method, path, body) {
|
|
17274
17339
|
const requestId = randomUUID8();
|
|
17275
17340
|
await cell.mkdir(CELL_CONTROL_DIR, { parents: true });
|
|
17276
|
-
await cell
|
|
17341
|
+
await writeCellFileChunked(cell, `${CELL_CONTROL_DIR}/${requestId}.json`, JSON.stringify({ method, path, body }));
|
|
17277
17342
|
const result2 = await cell.exec(`${CONTROL_RUNNER} ${requestId}`);
|
|
17278
17343
|
if (result2.exitCode !== 0) throw new Error("cell_control_failed");
|
|
17279
17344
|
const parsed = JSON.parse(result2.stdout.trim().split("\n").pop() ?? "{}");
|
|
@@ -17285,6 +17350,7 @@ ${text}` : text, { mode: "0600" });
|
|
|
17285
17350
|
return this.control(cell, method, path, body);
|
|
17286
17351
|
}
|
|
17287
17352
|
};
|
|
17353
|
+
CELL_FILE_WRITE_CHUNK_CHARS = 32 * 1024;
|
|
17288
17354
|
ARTIFACT_MIME_TYPES = {
|
|
17289
17355
|
pdf: "application/pdf",
|
|
17290
17356
|
html: "text/html",
|
|
@@ -17488,7 +17554,7 @@ var init_hotcell_provider = __esm({
|
|
|
17488
17554
|
// src/server/routes.ts
|
|
17489
17555
|
import { randomUUID as randomUUID9 } from "crypto";
|
|
17490
17556
|
import { URL as URL2 } from "url";
|
|
17491
|
-
import { readFile as
|
|
17557
|
+
import { readFile as readFile22, unlink as unlink3 } from "fs/promises";
|
|
17492
17558
|
import { resolve as resolve9, basename as basename5 } from "path";
|
|
17493
17559
|
function createHotcellAsterRuntime() {
|
|
17494
17560
|
try {
|
|
@@ -17581,7 +17647,7 @@ async function buildUserMessage2(prompt, files, cwd) {
|
|
|
17581
17647
|
}
|
|
17582
17648
|
} else {
|
|
17583
17649
|
try {
|
|
17584
|
-
const content = await
|
|
17650
|
+
const content = await readFile22(filePath, "utf8");
|
|
17585
17651
|
const relPath = filePath.startsWith(cwd) ? filePath.slice(cwd.length + 1) : filePath;
|
|
17586
17652
|
fileContents.push(`
|
|
17587
17653
|
--- ${relPath} ---
|
|
@@ -20543,7 +20609,7 @@ __export(requesty_catalog_exports, {
|
|
|
20543
20609
|
loadRequestyCatalog: () => loadRequestyCatalog,
|
|
20544
20610
|
mapRequestyModel: () => mapRequestyModel
|
|
20545
20611
|
});
|
|
20546
|
-
import { readFile as
|
|
20612
|
+
import { readFile as readFile23, writeFile as writeFile13, mkdir as mkdir14 } from "fs/promises";
|
|
20547
20613
|
import { homedir as homedir23 } from "os";
|
|
20548
20614
|
import { join as join32, dirname as dirname18 } from "path";
|
|
20549
20615
|
function catalogCachePath2() {
|
|
@@ -20604,7 +20670,7 @@ async function fetchRequestyCatalog(fetchImpl2 = fetch) {
|
|
|
20604
20670
|
}
|
|
20605
20671
|
async function readCache4() {
|
|
20606
20672
|
try {
|
|
20607
|
-
const raw = await
|
|
20673
|
+
const raw = await readFile23(catalogCachePath2(), "utf8");
|
|
20608
20674
|
const parsed = JSON.parse(raw);
|
|
20609
20675
|
if (parsed.version !== CACHE_VERSION2) return null;
|
|
20610
20676
|
return {
|
|
@@ -20936,8 +21002,8 @@ var init_session = __esm({
|
|
|
20936
21002
|
const parts = [{ type: "text", text }];
|
|
20937
21003
|
for (const img of options.images) {
|
|
20938
21004
|
if ("path" in img) {
|
|
20939
|
-
const { readFile:
|
|
20940
|
-
const data = await
|
|
21005
|
+
const { readFile: readFile32 } = await import("fs/promises");
|
|
21006
|
+
const data = await readFile32(img.path, "base64");
|
|
20941
21007
|
const mimeType = img.path.endsWith(".png") ? "image/png" : img.path.endsWith(".jpg") || img.path.endsWith(".jpeg") ? "image/jpeg" : "image/webp";
|
|
20942
21008
|
parts.push({ type: "image_url", image_url: { url: `data:${mimeType};base64,${data}` } });
|
|
20943
21009
|
} else {
|
|
@@ -21223,7 +21289,7 @@ var init_session = __esm({
|
|
|
21223
21289
|
this.lspManager?.notifyChange(path, content);
|
|
21224
21290
|
} else {
|
|
21225
21291
|
void import("fs/promises").then(
|
|
21226
|
-
({ readFile:
|
|
21292
|
+
({ readFile: readFile32 }) => readFile32(path, "utf8").then((c) => this.lspManager?.notifyChange(path, c)).catch(() => {
|
|
21227
21293
|
})
|
|
21228
21294
|
).catch(() => {
|
|
21229
21295
|
});
|
|
@@ -22954,7 +23020,7 @@ var init_app_helpers = __esm({
|
|
|
22954
23020
|
|
|
22955
23021
|
// src/ui/bang-command.ts
|
|
22956
23022
|
import { spawn as spawn7 } from "child_process";
|
|
22957
|
-
import { mkdtemp as mkdtemp2, readFile as
|
|
23023
|
+
import { mkdtemp as mkdtemp2, readFile as readFile24, rm as rm3 } from "fs/promises";
|
|
22958
23024
|
import { tmpdir as tmpdir4, platform as platform4 } from "os";
|
|
22959
23025
|
import { join as join35 } from "path";
|
|
22960
23026
|
function registerInkInstance(instance) {
|
|
@@ -23102,7 +23168,7 @@ $ ${command}
|
|
|
23102
23168
|
}
|
|
23103
23169
|
let output = spawnError ? `failed to start: ${spawnError}` : null;
|
|
23104
23170
|
if (captured && logPath) {
|
|
23105
|
-
output = cleanTerminalOutput(await
|
|
23171
|
+
output = cleanTerminalOutput(await readFile24(logPath, "utf8").catch(() => ""));
|
|
23106
23172
|
}
|
|
23107
23173
|
if (logDir2) await rm3(logDir2, { recursive: true, force: true }).catch(() => {
|
|
23108
23174
|
});
|
|
@@ -28822,7 +28888,7 @@ var init_queue_plan_picker = __esm({
|
|
|
28822
28888
|
|
|
28823
28889
|
// src/agent/jev-context.ts
|
|
28824
28890
|
import { execFileSync as execFileSync3 } from "child_process";
|
|
28825
|
-
import { readFile as
|
|
28891
|
+
import { readFile as readFile25 } from "fs/promises";
|
|
28826
28892
|
import { basename as basename6, join as join37, resolve as resolve12 } from "path";
|
|
28827
28893
|
function messageText(message2) {
|
|
28828
28894
|
if (typeof message2.content === "string") return message2.content.trim();
|
|
@@ -28845,7 +28911,7 @@ function projectRoot(cwd) {
|
|
|
28845
28911
|
}
|
|
28846
28912
|
async function readPackageMetadata(root) {
|
|
28847
28913
|
try {
|
|
28848
|
-
const parsed = JSON.parse(await
|
|
28914
|
+
const parsed = JSON.parse(await readFile25(join37(root, "package.json"), "utf8"));
|
|
28849
28915
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
28850
28916
|
const pkg = parsed;
|
|
28851
28917
|
const metadata = {};
|
|
@@ -28862,7 +28928,7 @@ async function readPackageMetadata(root) {
|
|
|
28862
28928
|
async function readLicenseEvidence(root) {
|
|
28863
28929
|
for (const name of ["LICENSE", "LICENSE.md", "LICENSE.txt", "LICENCE", "COPYING"]) {
|
|
28864
28930
|
try {
|
|
28865
|
-
const content = (await
|
|
28931
|
+
const content = (await readFile25(join37(root, name), "utf8")).trim();
|
|
28866
28932
|
if (content) return { source: `project license (${name})`, content: content.slice(0, 700) };
|
|
28867
28933
|
} catch {
|
|
28868
28934
|
}
|
|
@@ -29944,7 +30010,7 @@ var init_frontmatter = __esm({
|
|
|
29944
30010
|
});
|
|
29945
30011
|
|
|
29946
30012
|
// src/skills/loader.ts
|
|
29947
|
-
import { readFile as
|
|
30013
|
+
import { readFile as readFile26, readdir as readdir6, stat as stat7 } from "fs/promises";
|
|
29948
30014
|
import { join as join38, extname } from "path";
|
|
29949
30015
|
function normalizeManifest(raw, filePath) {
|
|
29950
30016
|
const name = typeof raw.name === "string" ? raw.name : "";
|
|
@@ -29959,7 +30025,7 @@ function normalizeManifest(raw, filePath) {
|
|
|
29959
30025
|
return { name, description, match, scope, priority, enabled: enabled2 };
|
|
29960
30026
|
}
|
|
29961
30027
|
async function loadSkillFile(filePath) {
|
|
29962
|
-
const raw = await
|
|
30028
|
+
const raw = await readFile26(filePath, "utf-8");
|
|
29963
30029
|
const parsed = parseFrontmatter(raw);
|
|
29964
30030
|
const manifest = normalizeManifest(parsed.data, filePath);
|
|
29965
30031
|
const body = parsed.content.trim();
|
|
@@ -30009,7 +30075,7 @@ var init_loader = __esm({
|
|
|
30009
30075
|
});
|
|
30010
30076
|
|
|
30011
30077
|
// src/skills/manager.ts
|
|
30012
|
-
import { mkdir as mkdir15, writeFile as writeFile14, unlink as unlink4, readFile as
|
|
30078
|
+
import { mkdir as mkdir15, writeFile as writeFile14, unlink as unlink4, readFile as readFile27 } from "fs/promises";
|
|
30013
30079
|
import { join as join39 } from "path";
|
|
30014
30080
|
function getSkillDirs(cwd) {
|
|
30015
30081
|
return {
|
|
@@ -30064,7 +30130,7 @@ async function setSkillEnabled(name, enabled2, cwd) {
|
|
|
30064
30130
|
const all = await listAllSkills(cwd);
|
|
30065
30131
|
const skill = all.project.find((s) => s.name === name) ?? all.global.find((s) => s.name === name);
|
|
30066
30132
|
if (!skill) throw new Error(`skill "${name}" not found`);
|
|
30067
|
-
const raw = await
|
|
30133
|
+
const raw = await readFile27(skill.filePath, "utf-8");
|
|
30068
30134
|
const parsed = parseFrontmatter(raw);
|
|
30069
30135
|
parsed.data.enabled = enabled2;
|
|
30070
30136
|
const yaml = Object.entries(parsed.data).map(([k, v]) => {
|
|
@@ -30336,7 +30402,7 @@ var tui_report_exports = {};
|
|
|
30336
30402
|
__export(tui_report_exports, {
|
|
30337
30403
|
getCategoryReportText: () => getCategoryReportText
|
|
30338
30404
|
});
|
|
30339
|
-
import { readFile as
|
|
30405
|
+
import { readFile as readFile28 } from "fs/promises";
|
|
30340
30406
|
import { join as join40 } from "path";
|
|
30341
30407
|
import { homedir as homedir26 } from "os";
|
|
30342
30408
|
function usageDir3() {
|
|
@@ -30356,7 +30422,7 @@ function daysAgo2(n) {
|
|
|
30356
30422
|
}
|
|
30357
30423
|
async function loadLog3() {
|
|
30358
30424
|
try {
|
|
30359
|
-
const raw = await
|
|
30425
|
+
const raw = await readFile28(usagePath4(), "utf8");
|
|
30360
30426
|
return JSON.parse(raw);
|
|
30361
30427
|
} catch {
|
|
30362
30428
|
return { version: 1, days: [], sessions: [] };
|
|
@@ -33222,7 +33288,7 @@ var init_wcag = __esm({
|
|
|
33222
33288
|
});
|
|
33223
33289
|
|
|
33224
33290
|
// src/ui/theme-loader.ts
|
|
33225
|
-
import { readFile as
|
|
33291
|
+
import { readFile as readFile29, readdir as readdir7 } from "fs/promises";
|
|
33226
33292
|
import { join as join43 } from "path";
|
|
33227
33293
|
import { homedir as homedir28 } from "os";
|
|
33228
33294
|
function projectThemesDir(cwd = process.cwd()) {
|
|
@@ -33318,7 +33384,7 @@ async function loadThemesFromDir(dir, source) {
|
|
|
33318
33384
|
const path = join43(dir, file);
|
|
33319
33385
|
let raw;
|
|
33320
33386
|
try {
|
|
33321
|
-
raw = await
|
|
33387
|
+
raw = await readFile29(path, "utf-8");
|
|
33322
33388
|
} catch (e) {
|
|
33323
33389
|
errors.push(`${path}: ${e instanceof Error ? e.message : String(e)}`);
|
|
33324
33390
|
continue;
|
|
@@ -35920,7 +35986,7 @@ var init_resume_progress = __esm({
|
|
|
35920
35986
|
});
|
|
35921
35987
|
|
|
35922
35988
|
// src/agent/supervisor.ts
|
|
35923
|
-
import { readdir as readdir8, readFile as
|
|
35989
|
+
import { readdir as readdir8, readFile as readFile30, stat as stat8 } from "fs/promises";
|
|
35924
35990
|
import { createHash as createHash5 } from "crypto";
|
|
35925
35991
|
import { resolve as resolve13, join as join44 } from "path";
|
|
35926
35992
|
var TurnSupervisor;
|
|
@@ -36835,7 +36901,7 @@ async function runInit(deps) {
|
|
|
36835
36901
|
lspManagerRef.current.notifyChange(path, content);
|
|
36836
36902
|
} else {
|
|
36837
36903
|
void import("fs/promises").then(
|
|
36838
|
-
({ readFile:
|
|
36904
|
+
({ readFile: readFile32 }) => readFile32(path, "utf8").then((c) => lspManagerRef.current.notifyChange(path, c)).catch(() => {
|
|
36839
36905
|
})
|
|
36840
36906
|
);
|
|
36841
36907
|
}
|
|
@@ -37032,7 +37098,7 @@ var init_run_init = __esm({
|
|
|
37032
37098
|
});
|
|
37033
37099
|
|
|
37034
37100
|
// src/skills/discovery.ts
|
|
37035
|
-
import { readdir as readdir9, stat as stat9, readFile as
|
|
37101
|
+
import { readdir as readdir9, stat as stat9, readFile as readFile31 } from "fs/promises";
|
|
37036
37102
|
import { join as join47, extname as extname2 } from "path";
|
|
37037
37103
|
async function dirExists(path) {
|
|
37038
37104
|
try {
|
|
@@ -37070,7 +37136,7 @@ async function discoverSkills(cwd) {
|
|
|
37070
37136
|
return ordered;
|
|
37071
37137
|
}
|
|
37072
37138
|
async function readSkillFile(filePath) {
|
|
37073
|
-
const bytes = await
|
|
37139
|
+
const bytes = await readFile31(filePath);
|
|
37074
37140
|
return { bytes, text: bytes.toString("utf-8") };
|
|
37075
37141
|
}
|
|
37076
37142
|
var SKILL_EXTENSIONS;
|
|
@@ -39448,7 +39514,7 @@ ${result2.output ?? "(output not captured)"}`,
|
|
|
39448
39514
|
lspManagerRef.current.notifyChange(path, content2);
|
|
39449
39515
|
} else {
|
|
39450
39516
|
void import("fs/promises").then(
|
|
39451
|
-
({ readFile:
|
|
39517
|
+
({ readFile: readFile32 }) => readFile32(path, "utf8").then((c) => lspManagerRef.current.notifyChange(path, c)).catch(() => {
|
|
39452
39518
|
})
|
|
39453
39519
|
);
|
|
39454
39520
|
}
|