@alan-ai-hq/agent-manager-linux-arm64 0.1.163 → 0.1.164
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/alan-agent.cjs +125 -101
- package/alan-holder.cjs +121 -99
- package/package.json +1 -1
package/alan-agent.cjs
CHANGED
|
@@ -23748,7 +23748,7 @@ var init_chunk_YXWJW7I5 = __esm({
|
|
|
23748
23748
|
}
|
|
23749
23749
|
});
|
|
23750
23750
|
|
|
23751
|
-
// ../agent-core/dist/chunk-
|
|
23751
|
+
// ../agent-core/dist/chunk-KVTSAS2T.js
|
|
23752
23752
|
function windowsEnvValue(env, name) {
|
|
23753
23753
|
const wanted = name.toLowerCase();
|
|
23754
23754
|
for (const [key, value2] of Object.entries(env).reverse()) {
|
|
@@ -24292,7 +24292,7 @@ function spawnInWindowsJob(plan2, options) {
|
|
|
24292
24292
|
throw new CoreFault("internal", `No Windows command line was planned for ${plan2.file}`);
|
|
24293
24293
|
}
|
|
24294
24294
|
const file2 = helperFile(options.env);
|
|
24295
|
-
const directory = (0,
|
|
24295
|
+
const directory = (0, import_fs3.mkdtempSync)((0, import_path2.join)((0, import_os.tmpdir)(), `alan-job-${(0, import_crypto.randomUUID)()}-`));
|
|
24296
24296
|
const path4 = (0, import_path2.join)(directory, "started");
|
|
24297
24297
|
const child = (0, import_child_process6.spawn)(file2, [String(process.pid)], {
|
|
24298
24298
|
cwd: options.cwd,
|
|
@@ -24345,6 +24345,12 @@ async function waitForWindowsJob(child, command) {
|
|
|
24345
24345
|
await (0, import_promises10.rm)(status.directory, { recursive: true, force: true });
|
|
24346
24346
|
}
|
|
24347
24347
|
}
|
|
24348
|
+
function preferForOomKill(pid) {
|
|
24349
|
+
try {
|
|
24350
|
+
(0, import_fs2.writeFileSync)(`/proc/${pid}/oom_score_adj`, String(CLI_OOM_SCORE_ADJ));
|
|
24351
|
+
} catch {
|
|
24352
|
+
}
|
|
24353
|
+
}
|
|
24348
24354
|
function onCliSpawned(listener) {
|
|
24349
24355
|
spawnListeners.add(listener);
|
|
24350
24356
|
return {
|
|
@@ -24365,6 +24371,7 @@ function spawnCli(options) {
|
|
|
24365
24371
|
shell: false,
|
|
24366
24372
|
detached: true
|
|
24367
24373
|
});
|
|
24374
|
+
if (platform3 === "linux" && child.pid !== void 0) preferForOomKill(child.pid);
|
|
24368
24375
|
for (const listener of spawnListeners) listener(child);
|
|
24369
24376
|
return child;
|
|
24370
24377
|
}
|
|
@@ -24389,7 +24396,7 @@ function waitForSpawn(child, command) {
|
|
|
24389
24396
|
}
|
|
24390
24397
|
function inode(path4) {
|
|
24391
24398
|
try {
|
|
24392
|
-
return (0,
|
|
24399
|
+
return (0, import_fs4.statSync)(path4).ino;
|
|
24393
24400
|
} catch (error62) {
|
|
24394
24401
|
if (errnoCode2(error62) !== "ENOENT") throw error62;
|
|
24395
24402
|
return void 0;
|
|
@@ -24400,7 +24407,7 @@ async function removeDeadOwner(path4) {
|
|
|
24400
24407
|
try {
|
|
24401
24408
|
let owner;
|
|
24402
24409
|
try {
|
|
24403
|
-
owner = asRecord(JSON.parse((0,
|
|
24410
|
+
owner = asRecord(JSON.parse((0, import_fs4.readFileSync)(path4, "utf8")));
|
|
24404
24411
|
} catch (error62) {
|
|
24405
24412
|
if (!(error62 instanceof SyntaxError)) throw error62;
|
|
24406
24413
|
}
|
|
@@ -24417,24 +24424,24 @@ async function removeDeadOwner(path4) {
|
|
|
24417
24424
|
const actualStart = expectedStart ? await readProcessStartTime(pid) : void 0;
|
|
24418
24425
|
dead ||= actualStart !== void 0 && actualStart !== expectedStart;
|
|
24419
24426
|
}
|
|
24420
|
-
if (dead && observed !== void 0 && inode(path4) === observed) (0,
|
|
24427
|
+
if (dead && observed !== void 0 && inode(path4) === observed) (0, import_fs4.rmSync)(path4, { force: true });
|
|
24421
24428
|
} catch (error62) {
|
|
24422
24429
|
if (errnoCode2(error62) !== "ENOENT") throw error62;
|
|
24423
24430
|
}
|
|
24424
24431
|
}
|
|
24425
24432
|
async function withStartupLock(path4, clock, work, signal) {
|
|
24426
|
-
(0,
|
|
24433
|
+
(0, import_fs4.mkdirSync)((0, import_path3.dirname)(path4), { recursive: true, mode: 448 });
|
|
24427
24434
|
const candidate = `${path4}.${(0, import_crypto2.randomUUID)()}`;
|
|
24428
24435
|
const startedAt = await readProcessStartTime(process.pid);
|
|
24429
|
-
(0,
|
|
24430
|
-
const owned = (0,
|
|
24436
|
+
(0, import_fs4.writeFileSync)(candidate, JSON.stringify({ pid: process.pid, startedAt }), { mode: 384 });
|
|
24437
|
+
const owned = (0, import_fs4.statSync)(candidate).ino;
|
|
24431
24438
|
const deadline = clock.monotonic() + 12e4;
|
|
24432
24439
|
let acquired = false;
|
|
24433
24440
|
try {
|
|
24434
24441
|
for (; ; ) {
|
|
24435
24442
|
signal?.throwIfAborted();
|
|
24436
24443
|
try {
|
|
24437
|
-
(0,
|
|
24444
|
+
(0, import_fs4.linkSync)(candidate, path4);
|
|
24438
24445
|
acquired = true;
|
|
24439
24446
|
break;
|
|
24440
24447
|
} catch (error62) {
|
|
@@ -24447,13 +24454,13 @@ async function withStartupLock(path4, clock, work, signal) {
|
|
|
24447
24454
|
}
|
|
24448
24455
|
return await work();
|
|
24449
24456
|
} finally {
|
|
24450
|
-
if (acquired && inode(path4) === owned) (0,
|
|
24451
|
-
(0,
|
|
24457
|
+
if (acquired && inode(path4) === owned) (0, import_fs4.rmSync)(path4, { force: true });
|
|
24458
|
+
(0, import_fs4.rmSync)(candidate, { force: true });
|
|
24452
24459
|
}
|
|
24453
24460
|
}
|
|
24454
|
-
var import_child_process, import_fs, import_path, import_child_process2, import_promises9, import_child_process3, import_child_process4, import_child_process5, import_child_process6, import_crypto,
|
|
24455
|
-
var
|
|
24456
|
-
"../agent-core/dist/chunk-
|
|
24461
|
+
var import_child_process, import_fs, import_path, import_child_process2, import_promises9, import_child_process3, import_child_process4, import_child_process5, import_fs2, import_child_process6, import_crypto, import_fs3, import_promises10, import_os, import_path2, import_crypto2, import_fs4, import_path3, SHIM_MAX_BYTES, CMD_MAX_COMMAND_LINE, MAX_COMMAND_LINE, DEFAULT_PATHEXT, LAUNCHABLE_EXTENSIONS, nodeWindowsFiles, NODE_SHIM_ENTRY, SCRIPT_EXTENSION, NATIVE_SHIM_LINES, NATIVE_SHIM_ENTRY, CMD_META, NEVER_STARTED, HIDDEN_FLAG_PROBE_VALUE, NEWLINE, CARRIAGE_RETURN, EMPTY, MAX_LINE_BYTES, LineSplitter, PS_LINE, POLL_MS, DEFAULT_GRACE_MS, DEFAULT_KILL_WAIT_MS, DEFAULT_TASKKILL_TIMEOUT_MS, statuses, START_TIMEOUT_MS, CLI_OOM_SCORE_ADJ, spawnListeners;
|
|
24462
|
+
var init_chunk_KVTSAS2T = __esm({
|
|
24463
|
+
"../agent-core/dist/chunk-KVTSAS2T.js"() {
|
|
24457
24464
|
"use strict";
|
|
24458
24465
|
init_chunk_YXWJW7I5();
|
|
24459
24466
|
import_child_process = require("child_process");
|
|
@@ -24464,14 +24471,15 @@ var init_chunk_6VWVDJ2A = __esm({
|
|
|
24464
24471
|
import_child_process3 = require("child_process");
|
|
24465
24472
|
import_child_process4 = require("child_process");
|
|
24466
24473
|
import_child_process5 = require("child_process");
|
|
24474
|
+
import_fs2 = require("fs");
|
|
24467
24475
|
import_child_process6 = require("child_process");
|
|
24468
24476
|
import_crypto = require("crypto");
|
|
24469
|
-
|
|
24477
|
+
import_fs3 = require("fs");
|
|
24470
24478
|
import_promises10 = require("fs/promises");
|
|
24471
24479
|
import_os = require("os");
|
|
24472
24480
|
import_path2 = require("path");
|
|
24473
24481
|
import_crypto2 = require("crypto");
|
|
24474
|
-
|
|
24482
|
+
import_fs4 = require("fs");
|
|
24475
24483
|
import_path3 = require("path");
|
|
24476
24484
|
SHIM_MAX_BYTES = 64 * 1024;
|
|
24477
24485
|
CMD_MAX_COMMAND_LINE = 8191;
|
|
@@ -24558,6 +24566,7 @@ var init_chunk_6VWVDJ2A = __esm({
|
|
|
24558
24566
|
DEFAULT_TASKKILL_TIMEOUT_MS = 5e3;
|
|
24559
24567
|
statuses = /* @__PURE__ */ new WeakMap();
|
|
24560
24568
|
START_TIMEOUT_MS = 1e4;
|
|
24569
|
+
CLI_OOM_SCORE_ADJ = 500;
|
|
24561
24570
|
spawnListeners = /* @__PURE__ */ new Set();
|
|
24562
24571
|
}
|
|
24563
24572
|
});
|
|
@@ -26791,7 +26800,9 @@ var init_conversation_messages = __esm({
|
|
|
26791
26800
|
"pattern",
|
|
26792
26801
|
"search_query",
|
|
26793
26802
|
"subagent_type",
|
|
26794
|
-
"run_in_background"
|
|
26803
|
+
"run_in_background",
|
|
26804
|
+
"skill",
|
|
26805
|
+
"skill_name"
|
|
26795
26806
|
]);
|
|
26796
26807
|
COMMAND_INPUT_FIELDS = /* @__PURE__ */ new Set(["command", "cmd", "code"]);
|
|
26797
26808
|
STEP_INPUT_TEXT_LIMIT = 1024;
|
|
@@ -27545,13 +27556,13 @@ function readTranscriptTurns(transcript, chunk, baseOffset, skipped = []) {
|
|
|
27545
27556
|
});
|
|
27546
27557
|
return { turns, consumedBytes: consumedEnd - baseOffset };
|
|
27547
27558
|
}
|
|
27548
|
-
var
|
|
27559
|
+
var import_fs5, NEWLINE2, TranscriptCursor, TranscriptLineLookup, CONTENT_UPDATES;
|
|
27549
27560
|
var init_chunk_TFIO37PI = __esm({
|
|
27550
27561
|
"../agent-core/dist/chunk-TFIO37PI.js"() {
|
|
27551
27562
|
"use strict";
|
|
27552
27563
|
init_chunk_RBQC7XZH();
|
|
27553
27564
|
init_chunk_YXWJW7I5();
|
|
27554
|
-
|
|
27565
|
+
import_fs5 = require("fs");
|
|
27555
27566
|
NEWLINE2 = 10;
|
|
27556
27567
|
TranscriptCursor = class {
|
|
27557
27568
|
#path;
|
|
@@ -27569,7 +27580,7 @@ var init_chunk_TFIO37PI = __esm({
|
|
|
27569
27580
|
try {
|
|
27570
27581
|
this.#offset = Math.max(
|
|
27571
27582
|
this.#offset,
|
|
27572
|
-
(0,
|
|
27583
|
+
(0, import_fs5.statSync)(this.#path, { throwIfNoEntry: false })?.size ?? 0
|
|
27573
27584
|
);
|
|
27574
27585
|
} catch {
|
|
27575
27586
|
}
|
|
@@ -27591,15 +27602,15 @@ var init_chunk_TFIO37PI = __esm({
|
|
|
27591
27602
|
/** Runs on the CLI's stdout path, so an unreadable file reads as no new lines. */
|
|
27592
27603
|
#unread() {
|
|
27593
27604
|
try {
|
|
27594
|
-
const size = (0,
|
|
27605
|
+
const size = (0, import_fs5.statSync)(this.#path, { throwIfNoEntry: false })?.size ?? 0;
|
|
27595
27606
|
if (size <= this.#offset) return void 0;
|
|
27596
27607
|
const buffer = Buffer.alloc(size - this.#offset);
|
|
27597
|
-
const fd = (0,
|
|
27608
|
+
const fd = (0, import_fs5.openSync)(this.#path, "r");
|
|
27598
27609
|
try {
|
|
27599
|
-
const read = (0,
|
|
27610
|
+
const read = (0, import_fs5.readSync)(fd, buffer, 0, buffer.length, this.#offset);
|
|
27600
27611
|
return buffer.subarray(0, read);
|
|
27601
27612
|
} finally {
|
|
27602
|
-
(0,
|
|
27613
|
+
(0, import_fs5.closeSync)(fd);
|
|
27603
27614
|
}
|
|
27604
27615
|
} catch {
|
|
27605
27616
|
return void 0;
|
|
@@ -28106,7 +28117,7 @@ var init_chunk_ZCTKXKYY = __esm({
|
|
|
28106
28117
|
}
|
|
28107
28118
|
});
|
|
28108
28119
|
|
|
28109
|
-
// ../agent-core/dist/chunk-
|
|
28120
|
+
// ../agent-core/dist/chunk-LDVOKUAU.js
|
|
28110
28121
|
function detectImageMimeType(buffer) {
|
|
28111
28122
|
if (buffer.length >= 8 && buffer.subarray(0, 8).equals(PNG_SIGNATURE)) return "image/png";
|
|
28112
28123
|
if (buffer.length >= 3 && buffer[0] === 255 && buffer[1] === 216 && buffer[2] === 255) {
|
|
@@ -28208,14 +28219,14 @@ function readMediaFiles(query) {
|
|
|
28208
28219
|
const files = [];
|
|
28209
28220
|
for (const candidate of query.candidates) {
|
|
28210
28221
|
const path4 = normalizePath(candidate, query.cwd);
|
|
28211
|
-
if (!path4 || seen.has(path4) || !(0,
|
|
28222
|
+
if (!path4 || seen.has(path4) || !(0, import_fs6.existsSync)(path4)) continue;
|
|
28212
28223
|
seen.add(path4);
|
|
28213
28224
|
const mimeType = query.mimeByExt[(0, import_path4.extname)(path4).toLowerCase()];
|
|
28214
28225
|
if (!mimeType) continue;
|
|
28215
|
-
const stat22 = (0,
|
|
28226
|
+
const stat22 = (0, import_fs6.statSync)(path4);
|
|
28216
28227
|
if (!stat22.isFile() || stat22.size <= 0 || stat22.size > query.maxBytes) continue;
|
|
28217
28228
|
if (stat22.mtimeMs < query.writtenSince && !query.named.has(path4)) continue;
|
|
28218
|
-
files.push({ path: path4, mimeType, buffer: (0,
|
|
28229
|
+
files.push({ path: path4, mimeType, buffer: (0, import_fs6.readFileSync)(path4) });
|
|
28219
28230
|
}
|
|
28220
28231
|
return files;
|
|
28221
28232
|
}
|
|
@@ -28546,16 +28557,16 @@ function silentStartError(name, timeoutMs) {
|
|
|
28546
28557
|
message: `${name} printed nothing for ${seconds}s after it started and was stopped. Send your message again.`
|
|
28547
28558
|
};
|
|
28548
28559
|
}
|
|
28549
|
-
var import_crypto4,
|
|
28550
|
-
var
|
|
28551
|
-
"../agent-core/dist/chunk-
|
|
28560
|
+
var import_crypto4, import_fs6, import_path4, PNG_SIGNATURE, IMAGE_MIME_BY_EXT, VIDEO_MIME_BY_EXT, IMAGE_EXTENSIONS, VIDEO_EXTENSIONS, MAX_IMAGE_BYTES, MAX_VIDEO_BYTES, MAX_TURN_MEDIA_DATA_CHARS, MTIME_SLACK_MS, AGENT_BROWSER_MENTION, AGENT_BROWSER_CAPTURE_COMMAND, LocalMediaReader, SessionOpenRefusal, JsonRpcError, ACP_PROTOCOL_VERSION, ACP_ERROR, STDERR_TAIL_LINES, RESULT_EXIT_GRACE_MS, PerTurnSession;
|
|
28561
|
+
var init_chunk_LDVOKUAU = __esm({
|
|
28562
|
+
"../agent-core/dist/chunk-LDVOKUAU.js"() {
|
|
28552
28563
|
"use strict";
|
|
28553
28564
|
init_chunk_RBQC7XZH();
|
|
28554
28565
|
init_chunk_ZCTKXKYY();
|
|
28555
|
-
|
|
28566
|
+
init_chunk_KVTSAS2T();
|
|
28556
28567
|
init_chunk_YXWJW7I5();
|
|
28557
28568
|
import_crypto4 = require("crypto");
|
|
28558
|
-
|
|
28569
|
+
import_fs6 = require("fs");
|
|
28559
28570
|
import_path4 = require("path");
|
|
28560
28571
|
init_agent2();
|
|
28561
28572
|
init_acp();
|
|
@@ -30852,14 +30863,14 @@ function encodeProjectDir(cwd) {
|
|
|
30852
30863
|
}
|
|
30853
30864
|
function realCwd(cwd) {
|
|
30854
30865
|
try {
|
|
30855
|
-
return (0,
|
|
30866
|
+
return (0, import_fs7.realpathSync)(cwd);
|
|
30856
30867
|
} catch {
|
|
30857
30868
|
return cwd;
|
|
30858
30869
|
}
|
|
30859
30870
|
}
|
|
30860
30871
|
function projectDirs(projectsRoot) {
|
|
30861
30872
|
try {
|
|
30862
|
-
return (0,
|
|
30873
|
+
return (0, import_fs7.readdirSync)(projectsRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
30863
30874
|
} catch {
|
|
30864
30875
|
return [];
|
|
30865
30876
|
}
|
|
@@ -30870,10 +30881,10 @@ function claudeSessionLogExists(query) {
|
|
|
30870
30881
|
const fileName = `${query.sessionId}.jsonl`;
|
|
30871
30882
|
const here = new Set([query.cwd, realCwd(query.cwd)].map(encodeProjectDir));
|
|
30872
30883
|
for (const dir of here) {
|
|
30873
|
-
if ((0,
|
|
30884
|
+
if ((0, import_fs7.existsSync)((0, import_path6.join)(projectsRoot, dir, fileName))) return true;
|
|
30874
30885
|
}
|
|
30875
30886
|
return projectDirs(projectsRoot).some(
|
|
30876
|
-
(dir) => !here.has(dir) && (0,
|
|
30887
|
+
(dir) => !here.has(dir) && (0, import_fs7.existsSync)((0, import_path6.join)(projectsRoot, dir, fileName))
|
|
30877
30888
|
);
|
|
30878
30889
|
}
|
|
30879
30890
|
function envDigest(env) {
|
|
@@ -31144,15 +31155,15 @@ function claudeTurnClosingUpdates(records, state) {
|
|
|
31144
31155
|
function readClaudeTranscriptTurns(chunk, baseOffset, skipped) {
|
|
31145
31156
|
return readTranscriptTurns(claudeTranscriptFile, chunk, baseOffset, skipped);
|
|
31146
31157
|
}
|
|
31147
|
-
var import_crypto7,
|
|
31158
|
+
var import_crypto7, import_fs7, import_path6, import_crypto8, import_promises31, EDIT_TOOLS, ThoughtBlocks, UNDERSTOOD_SYSTEM_SUBTYPES, CLAUDE_MCP_STATUS, RATE_LIMIT_WARN_AT, CLAUDE_GRAMMAR_NAME, SUBAGENT_TOOL_NAMES, controlResponseSchema, STOPPED_STATUSES, TaskRecords, TERMINAL_BACKGROUND_STATUSES, NON_TERMINAL_BACKGROUND_STATUSES, ASYNC_LAUNCH_ACK, BackgroundTasks, FAILED_STATUSES, STOPPED_BY_USER_TEXT, ClaudeTurn, STDERR_TAIL_LINES2, MAX_EARLY_LINES, UNSUPPORTED_STOP, OUTPUT_CLOSED_REASON, ClaudeSession, DEFAULTS, READ_ONLY_DISALLOWED_TOOLS, DEFAULT_MCP_TIMEOUT_MS, SYNTHETIC_MODEL, INTERRUPT_MARKER, NON_PROMPT_PREFIXES, PRELUDE_TYPES, claudeTranscriptFile;
|
|
31148
31159
|
var init_claude = __esm({
|
|
31149
31160
|
"../agent-core/dist/providers/claude.js"() {
|
|
31150
31161
|
"use strict";
|
|
31151
31162
|
init_chunk_TFIO37PI();
|
|
31152
|
-
|
|
31163
|
+
init_chunk_LDVOKUAU();
|
|
31153
31164
|
init_chunk_RBQC7XZH();
|
|
31154
31165
|
init_chunk_ZCTKXKYY();
|
|
31155
|
-
|
|
31166
|
+
init_chunk_KVTSAS2T();
|
|
31156
31167
|
init_chunk_DLVRNIY5();
|
|
31157
31168
|
init_chunk_OSECDZA5();
|
|
31158
31169
|
init_chunk_YXWJW7I5();
|
|
@@ -31164,7 +31175,7 @@ var init_claude = __esm({
|
|
|
31164
31175
|
init_acp();
|
|
31165
31176
|
init_constants();
|
|
31166
31177
|
init_agent2();
|
|
31167
|
-
|
|
31178
|
+
import_fs7 = require("fs");
|
|
31168
31179
|
import_path6 = require("path");
|
|
31169
31180
|
import_crypto8 = require("crypto");
|
|
31170
31181
|
import_promises31 = require("fs/promises");
|
|
@@ -32257,7 +32268,7 @@ function codexHomeOf(env) {
|
|
|
32257
32268
|
}
|
|
32258
32269
|
function namesNewestFirst(dir, isDir) {
|
|
32259
32270
|
try {
|
|
32260
|
-
return (0,
|
|
32271
|
+
return (0, import_fs8.readdirSync)(dir, { withFileTypes: true }).filter((entry) => isDir ? entry.isDirectory() : entry.isFile()).map((entry) => entry.name).sort().reverse();
|
|
32261
32272
|
} catch {
|
|
32262
32273
|
return [];
|
|
32263
32274
|
}
|
|
@@ -34074,19 +34085,19 @@ function codexTurnInput(run2, context) {
|
|
|
34074
34085
|
...images.length ? { imagePaths: images.map((image) => image.path) } : {}
|
|
34075
34086
|
};
|
|
34076
34087
|
}
|
|
34077
|
-
var
|
|
34088
|
+
var import_fs8, import_path7, import_crypto9, import_crypto10, import_crypto11, import_crypto12, TokenRefresher, MCP_STARTUP_TIMEOUT_SEC, FIELD_TYPES, YES_NO, ACCEPT_DECLINE, MAX_INLINE_GENERATED_IMAGE_BYTES, PNG_SIGNATURE2, JPEG_NON_FRAME_MARKERS, IMAGE_GEN_CALL, PROMPT_LITERAL, RELOCATE_EVERY_MS, CodexImageGenerationFold, CodexRolloutImages, CodexRateLimits, USER_INPUT_METHOD, PERMISSIONS_METHOD, ELICITATION_METHOD, COMMAND_OR_FILE, LEGACY, DECISIONS, COORDINATION_TOOLS, SETTLED_AGENT, STATUS, CHANGE_OPERATIONS, SILENT_ON_START, IGNORED_ITEMS, PLAN_STATUS, CodexTurnTokens, CODEX_MCP_STATUS, WORKER_LIFECYCLE, INFO_KINDS, SILENT, CodexTurn, STDERR_TAIL_LINES3, MAX_BETWEEN_UPDATES, UNSUPPORTED_REQUEST, DECLINED_ELICITATION, IMAGE_CATCH_UP_MS, IMAGE_POLL_MS, CodexSession, CODEX_MIN_VERSION, CODEX_REQUIREMENT, CODEX_TESTED_LINE, DEFAULTS2, CLIENT_INFO, STATUS2, EXITED_WITHOUT_RESPONSE, CodexExecTurn, DEFAULTS22, CodexExecSession, INJECTED_USER_PREFIXES, SHELL_TOOL_NAMES, ANNOUNCING_ITEM_TYPES, OUTPUT_MARKER, OPEN_PAGE_ACTIONS, FIND_IN_PAGE_ACTIONS, FILE_OPERATIONS, UNDERSTOOD_ITEM_TYPES, PRELUDE_TYPES2, PRELUDE_EVENTS, codexRolloutFile;
|
|
34078
34089
|
var init_codex = __esm({
|
|
34079
34090
|
"../agent-core/dist/providers/codex.js"() {
|
|
34080
34091
|
"use strict";
|
|
34081
34092
|
init_chunk_TFIO37PI();
|
|
34082
|
-
|
|
34093
|
+
init_chunk_LDVOKUAU();
|
|
34083
34094
|
init_chunk_RBQC7XZH();
|
|
34084
34095
|
init_chunk_ZCTKXKYY();
|
|
34085
|
-
|
|
34096
|
+
init_chunk_KVTSAS2T();
|
|
34086
34097
|
init_chunk_DLVRNIY5();
|
|
34087
34098
|
init_chunk_OSECDZA5();
|
|
34088
34099
|
init_chunk_YXWJW7I5();
|
|
34089
|
-
|
|
34100
|
+
import_fs8 = require("fs");
|
|
34090
34101
|
import_path7 = require("path");
|
|
34091
34102
|
init_effort();
|
|
34092
34103
|
import_crypto9 = require("crypto");
|
|
@@ -35478,9 +35489,9 @@ function packagedAlanCodeEnginePath(bundle, platform3) {
|
|
|
35478
35489
|
}
|
|
35479
35490
|
function isRunnableFile(path4, platform3) {
|
|
35480
35491
|
try {
|
|
35481
|
-
if (!(0,
|
|
35492
|
+
if (!(0, import_fs9.statSync)(path4).isFile()) return false;
|
|
35482
35493
|
if (platform3 === "win32") return WINDOWS_RUNNABLE_EXTENSION.test(path4);
|
|
35483
|
-
(0,
|
|
35494
|
+
(0, import_fs9.accessSync)(path4, import_fs9.constants.X_OK);
|
|
35484
35495
|
return true;
|
|
35485
35496
|
} catch {
|
|
35486
35497
|
return false;
|
|
@@ -35805,7 +35816,7 @@ function alanCodeSystemPrompt(alanSystemPrompt) {
|
|
|
35805
35816
|
|
|
35806
35817
|
${instructions}` : ALAN_CODE_TOOL_NAMING_PROMPT;
|
|
35807
35818
|
}
|
|
35808
|
-
var import_http9, import_https,
|
|
35819
|
+
var import_http9, import_https, import_fs9, import_path8, import_crypto13, import_promises34, import_path9, import_url, ALAN_CODE_BASELINE_PROMPT, ALAN_CODE_ENGINE_PROVIDER_ID, DEFAULT_CONTEXT_WINDOW, DEFAULT_MAX_OUTPUT_TOKENS, ALAN_CODE_API_KEY_ENV, ALAN_CODE_CONVERSATION_ID_ENV, ALAN_CODE_PROXY_PATH, ALAN_CODE_WEBSEARCH_PATH, ALAN_CODE_CATALOG_PATH, ALAN_CODE_CHUNK_TIMEOUT_MS, CATALOG_TIMEOUT_MS, MAX_CATALOG_BYTES, ACTIVATION_WAIT_MS, ACTIVATION_POLL_MS, CatalogResponseError, ALAN_CODE_ENGINE_PATH_ENV, ALAN_CODE_ENGINE_COMMAND, ALAN_CODE_ENGINE_NAME, WINDOWS_RUNNABLE_EXTENSION, ALAN_CODE_ENGINE_PLUGIN_VERSION, ALAN_CODE_TOOL_NAMING_PROMPT;
|
|
35809
35820
|
var init_alan_code = __esm({
|
|
35810
35821
|
"../agent-core/dist/providers/alan-code.js"() {
|
|
35811
35822
|
"use strict";
|
|
@@ -35816,7 +35827,7 @@ var init_alan_code = __esm({
|
|
|
35816
35827
|
init_runtime_v2();
|
|
35817
35828
|
init_runtime_v2();
|
|
35818
35829
|
init_models();
|
|
35819
|
-
|
|
35830
|
+
import_fs9 = require("fs");
|
|
35820
35831
|
import_path8 = require("path");
|
|
35821
35832
|
init_runtime_v2();
|
|
35822
35833
|
import_crypto13 = require("crypto");
|
|
@@ -45631,10 +45642,10 @@ var require_tar_stream = __commonJS({
|
|
|
45631
45642
|
var init_dist = __esm({
|
|
45632
45643
|
"../agent-core/dist/index.js"() {
|
|
45633
45644
|
"use strict";
|
|
45634
|
-
|
|
45645
|
+
init_chunk_LDVOKUAU();
|
|
45635
45646
|
init_chunk_RBQC7XZH();
|
|
45636
45647
|
init_chunk_ZCTKXKYY();
|
|
45637
|
-
|
|
45648
|
+
init_chunk_KVTSAS2T();
|
|
45638
45649
|
init_chunk_YXWJW7I5();
|
|
45639
45650
|
}
|
|
45640
45651
|
});
|
|
@@ -46384,10 +46395,10 @@ var import_promises50, import_path10, import_crypto14, import_promises51, CURSOR
|
|
|
46384
46395
|
var init_acp3 = __esm({
|
|
46385
46396
|
"../agent-core/dist/providers/acp.js"() {
|
|
46386
46397
|
"use strict";
|
|
46387
|
-
|
|
46398
|
+
init_chunk_LDVOKUAU();
|
|
46388
46399
|
init_chunk_RBQC7XZH();
|
|
46389
46400
|
init_chunk_ZCTKXKYY();
|
|
46390
|
-
|
|
46401
|
+
init_chunk_KVTSAS2T();
|
|
46391
46402
|
init_chunk_DLVRNIY5();
|
|
46392
46403
|
init_chunk_OSECDZA5();
|
|
46393
46404
|
init_chunk_YXWJW7I5();
|
|
@@ -48427,17 +48438,18 @@ function openCodeTurnInput(run2, context) {
|
|
|
48427
48438
|
return {
|
|
48428
48439
|
turnId: run2.runId,
|
|
48429
48440
|
text: text3,
|
|
48430
|
-
...images.length ? { imagePaths: images.map((image) => image.path) } : {}
|
|
48441
|
+
...images.length ? { imagePaths: images.map((image) => image.path) } : {},
|
|
48442
|
+
...context.attachments.length ? { readableFiles: context.attachments.map((attachment) => attachment.path) } : {}
|
|
48431
48443
|
};
|
|
48432
48444
|
}
|
|
48433
|
-
var import_crypto15, import_http10, import_crypto16, import_promises52, import_path11, import_path12, import_url2, import_crypto17, IDLE_SOCKET_MS3, OpenCodeHttpError, BASE62, messageIdClock, OpenCodeClient, OPENCODE_CONFIG_ENV, OPENCODE_ENGINE, TEXT_PARTS, STEP_PARTS, STOPPED_BY_USER, OpenCodeSubagents, NAMED_KINDS, OPENCODE_ABORTED_ERROR, PROVIDER_EVENT_META, TASK_TOOL_NAME, TASK_RESULT_TAG, TASK_ERROR_TAG, PERMISSION_DENIED, FILE_OPERATIONS2, NO_USAGE, PartReader, NOTHING, NON_INTERACTIVE_PERMISSIONS, CONTENT_FILTER_FINISHES, TRUNCATED_FINISHES, OUTPUT_PARTS, OpenCodeTurn, LISTENING, OUTPUT_TAIL_LINES, IMAGE_TYPES, OpenCodeSession, OPENCODE_MIN_VERSION, OPENCODE_REQUIREMENT, OPENCODE_TESTED_LINE, OPENCODE_SUPPORTED_MAJOR, DEFAULTS4, STORE_LOCKED, NON_INTERACTIVE_RULES, TITLE_LENGTH, MAX_VARIANT_LENGTH;
|
|
48445
|
+
var import_crypto15, import_http10, import_crypto16, import_promises52, import_path11, import_path12, import_url2, import_path13, import_crypto17, IDLE_SOCKET_MS3, OpenCodeHttpError, BASE62, messageIdClock, OpenCodeClient, OPENCODE_CONFIG_ENV, OPENCODE_ENGINE, TEXT_PARTS, STEP_PARTS, STOPPED_BY_USER, OpenCodeSubagents, NAMED_KINDS, OPENCODE_ABORTED_ERROR, PROVIDER_EVENT_META, TASK_TOOL_NAME, TASK_RESULT_TAG, TASK_ERROR_TAG, PERMISSION_DENIED, FILE_OPERATIONS2, NO_USAGE, PartReader, NOTHING, NON_INTERACTIVE_PERMISSIONS, CONTENT_FILTER_FINISHES, TRUNCATED_FINISHES, OUTPUT_PARTS, OpenCodeTurn, LISTENING, OUTPUT_TAIL_LINES, IMAGE_TYPES, OpenCodeSession, OPENCODE_MIN_VERSION, OPENCODE_REQUIREMENT, OPENCODE_TESTED_LINE, OPENCODE_SUPPORTED_MAJOR, DEFAULTS4, STORE_LOCKED, NON_INTERACTIVE_RULES, TITLE_LENGTH, MAX_VARIANT_LENGTH;
|
|
48434
48446
|
var init_opencode = __esm({
|
|
48435
48447
|
"../agent-core/dist/providers/opencode.js"() {
|
|
48436
48448
|
"use strict";
|
|
48437
|
-
|
|
48449
|
+
init_chunk_LDVOKUAU();
|
|
48438
48450
|
init_chunk_RBQC7XZH();
|
|
48439
48451
|
init_chunk_ZCTKXKYY();
|
|
48440
|
-
|
|
48452
|
+
init_chunk_KVTSAS2T();
|
|
48441
48453
|
init_chunk_DLVRNIY5();
|
|
48442
48454
|
init_chunk_OSECDZA5();
|
|
48443
48455
|
init_chunk_YXWJW7I5();
|
|
@@ -48451,6 +48463,7 @@ var init_opencode = __esm({
|
|
|
48451
48463
|
import_path12 = require("path");
|
|
48452
48464
|
import_url2 = require("url");
|
|
48453
48465
|
init_acp();
|
|
48466
|
+
import_path13 = require("path");
|
|
48454
48467
|
init_acp();
|
|
48455
48468
|
init_constants();
|
|
48456
48469
|
import_crypto17 = require("crypto");
|
|
@@ -49062,6 +49075,8 @@ var init_opencode = __esm({
|
|
|
49062
49075
|
#readOnly;
|
|
49063
49076
|
#memory;
|
|
49064
49077
|
#engine;
|
|
49078
|
+
/** The turn's attachments: downloaded outside the workspace, still readable when read-only. */
|
|
49079
|
+
#readableFiles;
|
|
49065
49080
|
#parts = new PartReader();
|
|
49066
49081
|
/** Child session id \u2192 the `task` call that launched it; `undefined` when unlinked. */
|
|
49067
49082
|
#children = /* @__PURE__ */ new Map();
|
|
@@ -49077,11 +49092,12 @@ var init_opencode = __esm({
|
|
|
49077
49092
|
#finish;
|
|
49078
49093
|
#error;
|
|
49079
49094
|
#end;
|
|
49080
|
-
constructor(rootSessionId, readOnly, memory, engine = OPENCODE_ENGINE) {
|
|
49095
|
+
constructor(rootSessionId, readOnly, memory, engine = OPENCODE_ENGINE, readableFiles = []) {
|
|
49081
49096
|
this.#root = rootSessionId;
|
|
49082
49097
|
this.#readOnly = readOnly;
|
|
49083
49098
|
this.#memory = memory;
|
|
49084
49099
|
this.#engine = engine;
|
|
49100
|
+
this.#readableFiles = new Set(readableFiles.map((path4) => (0, import_path13.normalize)(path4)));
|
|
49085
49101
|
}
|
|
49086
49102
|
get childSessionIds() {
|
|
49087
49103
|
return [...this.#children.keys()];
|
|
@@ -49309,13 +49325,20 @@ var init_opencode = __esm({
|
|
|
49309
49325
|
if (!requestId) return NOTHING;
|
|
49310
49326
|
const kind = asString(properties.permission).trim() || "an action";
|
|
49311
49327
|
const nonInteractive = NON_INTERACTIVE_PERMISSIONS.has(kind);
|
|
49312
|
-
const
|
|
49313
|
-
const
|
|
49328
|
+
const attachment = this.#readOnly && this.#opensAttachment(kind, properties);
|
|
49329
|
+
const reply2 = nonInteractive || this.#readOnly && !attachment ? "reject" : "once";
|
|
49330
|
+
const message2 = nonInteractive ? `${subject} tried to ${kind.replace(/_/g, " ")} \u2014 denied (Alan does not yet support interactive requests for ${this.#engine.label}).` : attachment ? `${subject} opened an attached file outside the workspace \u2014 approved (read-only session).` : this.#readOnly ? `${subject} requested permission to ${kind} \u2014 automatically denied (read-only session).` : `${subject} requested permission to ${kind} \u2014 automatically approved (autonomous mode).`;
|
|
49314
49331
|
return {
|
|
49315
49332
|
updates: [notice("permission_decision", message2)],
|
|
49316
49333
|
actions: [{ kind: "permission", requestId, reply: reply2 }]
|
|
49317
49334
|
};
|
|
49318
49335
|
}
|
|
49336
|
+
/** OpenCode asks `external_directory` with the exact target path in `metadata.filepath`. */
|
|
49337
|
+
#opensAttachment(kind, properties) {
|
|
49338
|
+
if (kind !== "external_directory") return false;
|
|
49339
|
+
const filepath = asString(asRecord(properties.metadata)?.filepath);
|
|
49340
|
+
return (0, import_path13.isAbsolute)(filepath) && this.#readableFiles.has((0, import_path13.normalize)(filepath));
|
|
49341
|
+
}
|
|
49319
49342
|
#question(properties) {
|
|
49320
49343
|
const requestId = asString(properties.id).trim();
|
|
49321
49344
|
if (!requestId) return NOTHING;
|
|
@@ -49474,7 +49497,7 @@ var init_opencode = __esm({
|
|
|
49474
49497
|
const client = this.#client;
|
|
49475
49498
|
const sessionId = this.#sessionId;
|
|
49476
49499
|
if (!client || !sessionId) throw new CoreFault("internal", `The ${engine} session is not open`);
|
|
49477
|
-
const active = this.#startTurn(input2.turnId, sessionId);
|
|
49500
|
+
const active = this.#startTurn(input2.turnId, sessionId, input2.readableFiles);
|
|
49478
49501
|
void this.#send(active, client, sessionId, {
|
|
49479
49502
|
...this.#promptBody(input2),
|
|
49480
49503
|
messageID: active.initialMessageId
|
|
@@ -49596,14 +49619,15 @@ var init_opencode = __esm({
|
|
|
49596
49619
|
#emit(event) {
|
|
49597
49620
|
this.#listeners.emit(event);
|
|
49598
49621
|
}
|
|
49599
|
-
#startTurn(id, sessionId) {
|
|
49622
|
+
#startTurn(id, sessionId, readableFiles) {
|
|
49600
49623
|
this.#turnCount += 1;
|
|
49601
49624
|
this.#subagents.prune();
|
|
49602
49625
|
const turn = new OpenCodeTurn(
|
|
49603
49626
|
sessionId,
|
|
49604
49627
|
this.#prompt.readOnly,
|
|
49605
49628
|
this.#memory,
|
|
49606
|
-
this.#options.engine
|
|
49629
|
+
this.#options.engine,
|
|
49630
|
+
readableFiles
|
|
49607
49631
|
);
|
|
49608
49632
|
let finish = () => {
|
|
49609
49633
|
};
|
|
@@ -50530,10 +50554,10 @@ var import_crypto18, import_promises53, FACTORY_API_VERSION, FACTORY_PROTOCOL_VE
|
|
|
50530
50554
|
var init_droid = __esm({
|
|
50531
50555
|
"../agent-core/dist/providers/droid.js"() {
|
|
50532
50556
|
"use strict";
|
|
50533
|
-
|
|
50557
|
+
init_chunk_LDVOKUAU();
|
|
50534
50558
|
init_chunk_RBQC7XZH();
|
|
50535
50559
|
init_chunk_ZCTKXKYY();
|
|
50536
|
-
|
|
50560
|
+
init_chunk_KVTSAS2T();
|
|
50537
50561
|
init_chunk_DLVRNIY5();
|
|
50538
50562
|
init_chunk_OSECDZA5();
|
|
50539
50563
|
init_chunk_YXWJW7I5();
|
|
@@ -51024,7 +51048,7 @@ var init_opencode2 = __esm({
|
|
|
51024
51048
|
// ../agent-core/dist/providers/antigravity.js
|
|
51025
51049
|
function settingsPath(env) {
|
|
51026
51050
|
const home = env.HOME?.trim() || env.USERPROFILE?.trim();
|
|
51027
|
-
return home ? (0,
|
|
51051
|
+
return home ? (0, import_path14.resolve)(home, ".gemini", "antigravity-cli", "settings.json") : void 0;
|
|
51028
51052
|
}
|
|
51029
51053
|
async function readSettings2(path4) {
|
|
51030
51054
|
let raw;
|
|
@@ -51047,7 +51071,7 @@ async function selectAntigravityApiKeyMode(env) {
|
|
|
51047
51071
|
const settings2 = await readSettings2(path4);
|
|
51048
51072
|
if (settings2 === "malformed") return "malformed";
|
|
51049
51073
|
if (settings2.modelProvider === "gemini") return "already_selected";
|
|
51050
|
-
await (0, import_promises54.mkdir)((0,
|
|
51074
|
+
await (0, import_promises54.mkdir)((0, import_path14.dirname)(path4), { recursive: true });
|
|
51051
51075
|
await (0, import_promises54.writeFile)(path4, JSON.stringify({ ...settings2, modelProvider: "gemini" }), { mode: 384 });
|
|
51052
51076
|
return "selected";
|
|
51053
51077
|
}
|
|
@@ -51091,21 +51115,21 @@ function antigravityArgs(input2, capabilities, prompt) {
|
|
|
51091
51115
|
];
|
|
51092
51116
|
}
|
|
51093
51117
|
function workspaceRoot(cwd) {
|
|
51094
|
-
for (let current = (0,
|
|
51095
|
-
if ((0,
|
|
51096
|
-
if ((0,
|
|
51118
|
+
for (let current = (0, import_path15.resolve)(cwd); ; current = (0, import_path15.dirname)(current)) {
|
|
51119
|
+
if ((0, import_fs10.existsSync)((0, import_path15.join)(current, ".git"))) return current;
|
|
51120
|
+
if ((0, import_path15.dirname)(current) === current) return (0, import_path15.resolve)(cwd);
|
|
51097
51121
|
}
|
|
51098
51122
|
}
|
|
51099
51123
|
function instructionPaths(cwd) {
|
|
51100
51124
|
const root = workspaceRoot(cwd);
|
|
51101
51125
|
const paths = [];
|
|
51102
|
-
for (let current = (0,
|
|
51103
|
-
const path4 = (0,
|
|
51126
|
+
for (let current = (0, import_path15.resolve)(cwd); ; current = (0, import_path15.dirname)(current)) {
|
|
51127
|
+
const path4 = (0, import_path15.join)(current, INSTRUCTIONS_FILE);
|
|
51104
51128
|
try {
|
|
51105
|
-
if ((0,
|
|
51129
|
+
if ((0, import_fs10.existsSync)(path4) && (0, import_fs10.statSync)(path4).isFile()) paths.unshift(path4);
|
|
51106
51130
|
} catch {
|
|
51107
51131
|
}
|
|
51108
|
-
if (current === root || (0,
|
|
51132
|
+
if (current === root || (0, import_path15.dirname)(current) === current) return paths;
|
|
51109
51133
|
}
|
|
51110
51134
|
}
|
|
51111
51135
|
function antigravityWorkspaceInstructions(cwd, maxChars = MAX_INSTRUCTION_CHARS) {
|
|
@@ -51116,7 +51140,7 @@ function antigravityWorkspaceInstructions(cwd, maxChars = MAX_INSTRUCTION_CHARS)
|
|
|
51116
51140
|
if (remaining <= 0) break;
|
|
51117
51141
|
let content;
|
|
51118
51142
|
try {
|
|
51119
|
-
content = (0,
|
|
51143
|
+
content = (0, import_fs10.readFileSync)(path4, "utf8").trim();
|
|
51120
51144
|
} catch {
|
|
51121
51145
|
continue;
|
|
51122
51146
|
}
|
|
@@ -51359,7 +51383,7 @@ function normalizeAntigravityFrame(event) {
|
|
|
51359
51383
|
}
|
|
51360
51384
|
function antigravityBrainRoot(env) {
|
|
51361
51385
|
const home = env.HOME?.trim() || env.USERPROFILE?.trim();
|
|
51362
|
-
return home ? (0,
|
|
51386
|
+
return home ? (0, import_path16.resolve)(home, ".gemini", "antigravity-cli", "brain") : void 0;
|
|
51363
51387
|
}
|
|
51364
51388
|
function parseEntry(text3) {
|
|
51365
51389
|
try {
|
|
@@ -51397,14 +51421,14 @@ function childTranscriptPath(root, frame) {
|
|
|
51397
51421
|
try {
|
|
51398
51422
|
const url3 = new URL(logUri);
|
|
51399
51423
|
if (url3.protocol !== "file:") return void 0;
|
|
51400
|
-
path4 = (0,
|
|
51424
|
+
path4 = (0, import_path16.resolve)((0, import_url3.fileURLToPath)(url3));
|
|
51401
51425
|
} catch {
|
|
51402
51426
|
return void 0;
|
|
51403
51427
|
}
|
|
51404
|
-
const fromRoot = (0,
|
|
51405
|
-
if (!fromRoot || (0,
|
|
51428
|
+
const fromRoot = (0, import_path16.relative)(root, path4);
|
|
51429
|
+
if (!fromRoot || (0, import_path16.isAbsolute)(fromRoot) || fromRoot.split(import_path16.sep).includes("..")) return void 0;
|
|
51406
51430
|
const expected = [conversationId, ...LOG_DIRS, TRANSCRIPT_FILE];
|
|
51407
|
-
const segments = fromRoot.split(
|
|
51431
|
+
const segments = fromRoot.split(import_path16.sep);
|
|
51408
51432
|
const matches = segments.length === expected.length && segments.every((segment, index) => segment === expected[index]);
|
|
51409
51433
|
return matches ? path4 : void 0;
|
|
51410
51434
|
}
|
|
@@ -51664,24 +51688,24 @@ function antigravityTurnInput(run2, context) {
|
|
|
51664
51688
|
});
|
|
51665
51689
|
return { turnId: run2.runId, text: appendImagePathReferences(text3, images) };
|
|
51666
51690
|
}
|
|
51667
|
-
var import_promises54,
|
|
51691
|
+
var import_promises54, import_path14, import_fs10, import_path15, import_path16, import_url3, import_crypto19, NO_ANTIGRAVITY_CAPABILITIES, INSTRUCTIONS_FILE, MAX_INSTRUCTION_CHARS, SHORTENED_NOTE, DIFF_BLOCK_START, DIFF_BLOCK_END, HUNK_HEADER, TRANSCRIPT_FILE, FULL_TRANSCRIPT_FILE, LOG_DIRS, TOOL_RESULT_TYPES, BrainTranscript, AntigravityTranscripts, ANTIGRAVITY_GRAMMAR_NAME, AntigravityGrammar, ignored, HANDLERS, SUCCESSFUL_STATUSES, SESSION_START_TYPES, RESULT_TYPES, SUBAGENT_START_TYPES, RESUME_FORKED, EXITED_WITHOUT_RESULT, AntigravityTurn, DEFAULTS6, AntigravitySession, WINDOWS_LINE_MARGIN;
|
|
51668
51692
|
var init_antigravity = __esm({
|
|
51669
51693
|
"../agent-core/dist/providers/antigravity.js"() {
|
|
51670
51694
|
"use strict";
|
|
51671
51695
|
init_chunk_TFIO37PI();
|
|
51672
|
-
|
|
51696
|
+
init_chunk_LDVOKUAU();
|
|
51673
51697
|
init_chunk_RBQC7XZH();
|
|
51674
51698
|
init_chunk_ZCTKXKYY();
|
|
51675
|
-
|
|
51699
|
+
init_chunk_KVTSAS2T();
|
|
51676
51700
|
init_chunk_DLVRNIY5();
|
|
51677
51701
|
init_chunk_YXWJW7I5();
|
|
51678
51702
|
import_promises54 = require("fs/promises");
|
|
51679
|
-
import_path13 = require("path");
|
|
51680
|
-
init_type_guards();
|
|
51681
|
-
import_fs9 = require("fs");
|
|
51682
51703
|
import_path14 = require("path");
|
|
51683
|
-
|
|
51704
|
+
init_type_guards();
|
|
51705
|
+
import_fs10 = require("fs");
|
|
51684
51706
|
import_path15 = require("path");
|
|
51707
|
+
init_effort();
|
|
51708
|
+
import_path16 = require("path");
|
|
51685
51709
|
import_url3 = require("url");
|
|
51686
51710
|
import_crypto19 = require("crypto");
|
|
51687
51711
|
init_agent2();
|
|
@@ -51721,7 +51745,7 @@ var init_antigravity = __esm({
|
|
|
51721
51745
|
#full;
|
|
51722
51746
|
constructor(path4) {
|
|
51723
51747
|
this.#cursor = new TranscriptCursor(path4);
|
|
51724
|
-
this.#fullPath = (0,
|
|
51748
|
+
this.#fullPath = (0, import_path16.resolve)((0, import_path16.dirname)(path4), FULL_TRANSCRIPT_FILE);
|
|
51725
51749
|
}
|
|
51726
51750
|
skipExisting() {
|
|
51727
51751
|
this.#cursor.read();
|
|
@@ -51769,7 +51793,7 @@ var init_antigravity = __esm({
|
|
|
51769
51793
|
/** A conversation this turn did not resume was created by it, so it is read whole. */
|
|
51770
51794
|
trackParent(conversationId) {
|
|
51771
51795
|
if (this.#parent?.conversationId === conversationId) return;
|
|
51772
|
-
const path4 = (0,
|
|
51796
|
+
const path4 = (0, import_path16.resolve)(this.#root, conversationId, ...LOG_DIRS, TRANSCRIPT_FILE);
|
|
51773
51797
|
this.#parent = { conversationId, transcript: new BrainTranscript(path4) };
|
|
51774
51798
|
}
|
|
51775
51799
|
/** A launcher keeps the first valid transcript it names; later frames change nothing. */
|
|
@@ -52204,7 +52228,7 @@ function parseConfig(raw) {
|
|
|
52204
52228
|
}
|
|
52205
52229
|
}
|
|
52206
52230
|
async function writeCommandCodeProjectMcp(cwd, mcp) {
|
|
52207
|
-
const path4 = (0,
|
|
52231
|
+
const path4 = (0, import_path17.join)(cwd, ".mcp.json");
|
|
52208
52232
|
const original = await (0, import_promises55.readFile)(path4, "utf8").catch(() => null);
|
|
52209
52233
|
const config2 = parseConfig(original);
|
|
52210
52234
|
const next = {
|
|
@@ -52399,19 +52423,19 @@ function commandCodeTurnInput(run2, context) {
|
|
|
52399
52423
|
});
|
|
52400
52424
|
return { turnId: run2.runId, text: appendImagePathReferences(text3, images) };
|
|
52401
52425
|
}
|
|
52402
|
-
var import_promises55,
|
|
52426
|
+
var import_promises55, import_path17, import_crypto20, COMMAND_CODE_GRAMMAR_NAME, SILENT3, CommandCodeGrammar, SHELL_TOOL, STOP_TOOLS, REPORTED_STATUS, SHELL_STATUS, SWEEP_INTERVAL_MS, CommandCodeBackgroundTasks, EXITED_WITHOUT_RESULT2, CommandCodeTurn, COMMAND_CODE_MAX_TURNS, DEFAULTS7, CommandCodeSession;
|
|
52403
52427
|
var init_command_code = __esm({
|
|
52404
52428
|
"../agent-core/dist/providers/command-code.js"() {
|
|
52405
52429
|
"use strict";
|
|
52406
|
-
|
|
52430
|
+
init_chunk_LDVOKUAU();
|
|
52407
52431
|
init_chunk_RBQC7XZH();
|
|
52408
52432
|
init_chunk_ZCTKXKYY();
|
|
52409
|
-
|
|
52433
|
+
init_chunk_KVTSAS2T();
|
|
52410
52434
|
init_chunk_DLVRNIY5();
|
|
52411
52435
|
init_chunk_OSECDZA5();
|
|
52412
52436
|
init_chunk_YXWJW7I5();
|
|
52413
52437
|
import_promises55 = require("fs/promises");
|
|
52414
|
-
|
|
52438
|
+
import_path17 = require("path");
|
|
52415
52439
|
init_agent2();
|
|
52416
52440
|
init_runtime_v2();
|
|
52417
52441
|
init_acp();
|
|
@@ -57830,7 +57854,7 @@ var require_websocket_server = __commonJS({
|
|
|
57830
57854
|
// package.json
|
|
57831
57855
|
var package_default = {
|
|
57832
57856
|
name: "@alan-ai-hq/agent-manager",
|
|
57833
|
-
version: "0.1.
|
|
57857
|
+
version: "0.1.164",
|
|
57834
57858
|
private: true,
|
|
57835
57859
|
type: "module",
|
|
57836
57860
|
description: "Alan machine runtime (alan-agent): identity, link, reconciler, session holders, run log, uploader, local API",
|
|
@@ -59962,7 +59986,7 @@ async function push(context, request2) {
|
|
|
59962
59986
|
var import_node_child_process = require("child_process");
|
|
59963
59987
|
|
|
59964
59988
|
// ../agent-core/dist/process.js
|
|
59965
|
-
|
|
59989
|
+
init_chunk_KVTSAS2T();
|
|
59966
59990
|
init_chunk_YXWJW7I5();
|
|
59967
59991
|
|
|
59968
59992
|
// src/capabilities/git/run-git.ts
|
|
@@ -71871,10 +71895,10 @@ var VOLUME_ERRORS = /* @__PURE__ */ new Set([
|
|
|
71871
71895
|
"ESTALE"
|
|
71872
71896
|
]);
|
|
71873
71897
|
var MESSAGES = {
|
|
71874
|
-
missing: "This
|
|
71875
|
-
permission: "Alan needs permission to access this
|
|
71876
|
-
volume: "The drive containing this
|
|
71877
|
-
pinnedMissing: "This run must use exactly this
|
|
71898
|
+
missing: "This folder was moved or removed. Locate it before starting the run.",
|
|
71899
|
+
permission: "Alan needs permission to access this folder.",
|
|
71900
|
+
volume: "The drive containing this folder is unavailable. Connect it and try again.",
|
|
71901
|
+
pinnedMissing: "This run must use exactly this folder, and it was moved or removed. Restore it or choose another folder.",
|
|
71878
71902
|
notApproved: "This folder is not one of the workspaces approved on this computer."
|
|
71879
71903
|
};
|
|
71880
71904
|
function rejected(rejection2, message2) {
|