@alan-ai-hq/agent-manager-linux-arm64 0.1.162 → 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.
Files changed (3) hide show
  1. package/alan-agent.cjs +234 -257
  2. package/alan-holder.cjs +170 -174
  3. package/package.json +1 -1
package/alan-holder.cjs CHANGED
@@ -23615,7 +23615,7 @@ var init_chunk_YXWJW7I5 = __esm({
23615
23615
  }
23616
23616
  });
23617
23617
 
23618
- // ../agent-core/dist/chunk-6VWVDJ2A.js
23618
+ // ../agent-core/dist/chunk-KVTSAS2T.js
23619
23619
  function windowsEnvValue(env, name) {
23620
23620
  const wanted = name.toLowerCase();
23621
23621
  for (const [key, value] of Object.entries(env).reverse()) {
@@ -24159,7 +24159,7 @@ function spawnInWindowsJob(plan2, options) {
24159
24159
  throw new CoreFault("internal", `No Windows command line was planned for ${plan2.file}`);
24160
24160
  }
24161
24161
  const file2 = helperFile(options.env);
24162
- const directory = (0, import_fs2.mkdtempSync)((0, import_path2.join)((0, import_os.tmpdir)(), `alan-job-${(0, import_crypto.randomUUID)()}-`));
24162
+ const directory = (0, import_fs3.mkdtempSync)((0, import_path2.join)((0, import_os.tmpdir)(), `alan-job-${(0, import_crypto.randomUUID)()}-`));
24163
24163
  const path = (0, import_path2.join)(directory, "started");
24164
24164
  const child = (0, import_child_process6.spawn)(file2, [String(process.pid)], {
24165
24165
  cwd: options.cwd,
@@ -24212,6 +24212,12 @@ async function waitForWindowsJob(child, command) {
24212
24212
  await (0, import_promises7.rm)(status.directory, { recursive: true, force: true });
24213
24213
  }
24214
24214
  }
24215
+ function preferForOomKill(pid) {
24216
+ try {
24217
+ (0, import_fs2.writeFileSync)(`/proc/${pid}/oom_score_adj`, String(CLI_OOM_SCORE_ADJ));
24218
+ } catch {
24219
+ }
24220
+ }
24215
24221
  function onCliSpawned(listener) {
24216
24222
  spawnListeners.add(listener);
24217
24223
  return {
@@ -24232,6 +24238,7 @@ function spawnCli(options) {
24232
24238
  shell: false,
24233
24239
  detached: true
24234
24240
  });
24241
+ if (platform === "linux" && child.pid !== void 0) preferForOomKill(child.pid);
24235
24242
  for (const listener of spawnListeners) listener(child);
24236
24243
  return child;
24237
24244
  }
@@ -24256,7 +24263,7 @@ function waitForSpawn(child, command) {
24256
24263
  }
24257
24264
  function inode(path) {
24258
24265
  try {
24259
- return (0, import_fs3.statSync)(path).ino;
24266
+ return (0, import_fs4.statSync)(path).ino;
24260
24267
  } catch (error62) {
24261
24268
  if (errnoCode2(error62) !== "ENOENT") throw error62;
24262
24269
  return void 0;
@@ -24267,7 +24274,7 @@ async function removeDeadOwner(path) {
24267
24274
  try {
24268
24275
  let owner;
24269
24276
  try {
24270
- owner = asRecord(JSON.parse((0, import_fs3.readFileSync)(path, "utf8")));
24277
+ owner = asRecord(JSON.parse((0, import_fs4.readFileSync)(path, "utf8")));
24271
24278
  } catch (error62) {
24272
24279
  if (!(error62 instanceof SyntaxError)) throw error62;
24273
24280
  }
@@ -24284,24 +24291,24 @@ async function removeDeadOwner(path) {
24284
24291
  const actualStart = expectedStart ? await readProcessStartTime(pid) : void 0;
24285
24292
  dead ||= actualStart !== void 0 && actualStart !== expectedStart;
24286
24293
  }
24287
- if (dead && observed !== void 0 && inode(path) === observed) (0, import_fs3.rmSync)(path, { force: true });
24294
+ if (dead && observed !== void 0 && inode(path) === observed) (0, import_fs4.rmSync)(path, { force: true });
24288
24295
  } catch (error62) {
24289
24296
  if (errnoCode2(error62) !== "ENOENT") throw error62;
24290
24297
  }
24291
24298
  }
24292
24299
  async function withStartupLock(path, clock, work, signal) {
24293
- (0, import_fs3.mkdirSync)((0, import_path3.dirname)(path), { recursive: true, mode: 448 });
24300
+ (0, import_fs4.mkdirSync)((0, import_path3.dirname)(path), { recursive: true, mode: 448 });
24294
24301
  const candidate = `${path}.${(0, import_crypto2.randomUUID)()}`;
24295
24302
  const startedAt = await readProcessStartTime(process.pid);
24296
- (0, import_fs3.writeFileSync)(candidate, JSON.stringify({ pid: process.pid, startedAt }), { mode: 384 });
24297
- const owned = (0, import_fs3.statSync)(candidate).ino;
24303
+ (0, import_fs4.writeFileSync)(candidate, JSON.stringify({ pid: process.pid, startedAt }), { mode: 384 });
24304
+ const owned = (0, import_fs4.statSync)(candidate).ino;
24298
24305
  const deadline = clock.monotonic() + 12e4;
24299
24306
  let acquired = false;
24300
24307
  try {
24301
24308
  for (; ; ) {
24302
24309
  signal?.throwIfAborted();
24303
24310
  try {
24304
- (0, import_fs3.linkSync)(candidate, path);
24311
+ (0, import_fs4.linkSync)(candidate, path);
24305
24312
  acquired = true;
24306
24313
  break;
24307
24314
  } catch (error62) {
@@ -24314,13 +24321,13 @@ async function withStartupLock(path, clock, work, signal) {
24314
24321
  }
24315
24322
  return await work();
24316
24323
  } finally {
24317
- if (acquired && inode(path) === owned) (0, import_fs3.rmSync)(path, { force: true });
24318
- (0, import_fs3.rmSync)(candidate, { force: true });
24324
+ if (acquired && inode(path) === owned) (0, import_fs4.rmSync)(path, { force: true });
24325
+ (0, import_fs4.rmSync)(candidate, { force: true });
24319
24326
  }
24320
24327
  }
24321
- var import_child_process, import_fs, import_path, import_child_process2, import_promises6, import_child_process3, import_child_process4, import_child_process5, import_child_process6, import_crypto, import_fs2, import_promises7, import_os, import_path2, import_crypto2, import_fs3, 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, spawnListeners;
24322
- var init_chunk_6VWVDJ2A = __esm({
24323
- "../agent-core/dist/chunk-6VWVDJ2A.js"() {
24328
+ var import_child_process, import_fs, import_path, import_child_process2, import_promises6, import_child_process3, import_child_process4, import_child_process5, import_fs2, import_child_process6, import_crypto, import_fs3, import_promises7, 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;
24329
+ var init_chunk_KVTSAS2T = __esm({
24330
+ "../agent-core/dist/chunk-KVTSAS2T.js"() {
24324
24331
  "use strict";
24325
24332
  init_chunk_YXWJW7I5();
24326
24333
  import_child_process = require("child_process");
@@ -24331,14 +24338,15 @@ var init_chunk_6VWVDJ2A = __esm({
24331
24338
  import_child_process3 = require("child_process");
24332
24339
  import_child_process4 = require("child_process");
24333
24340
  import_child_process5 = require("child_process");
24341
+ import_fs2 = require("fs");
24334
24342
  import_child_process6 = require("child_process");
24335
24343
  import_crypto = require("crypto");
24336
- import_fs2 = require("fs");
24344
+ import_fs3 = require("fs");
24337
24345
  import_promises7 = require("fs/promises");
24338
24346
  import_os = require("os");
24339
24347
  import_path2 = require("path");
24340
24348
  import_crypto2 = require("crypto");
24341
- import_fs3 = require("fs");
24349
+ import_fs4 = require("fs");
24342
24350
  import_path3 = require("path");
24343
24351
  SHIM_MAX_BYTES = 64 * 1024;
24344
24352
  CMD_MAX_COMMAND_LINE = 8191;
@@ -24425,6 +24433,7 @@ var init_chunk_6VWVDJ2A = __esm({
24425
24433
  DEFAULT_TASKKILL_TIMEOUT_MS = 5e3;
24426
24434
  statuses = /* @__PURE__ */ new WeakMap();
24427
24435
  START_TIMEOUT_MS = 1e4;
24436
+ CLI_OOM_SCORE_ADJ = 500;
24428
24437
  spawnListeners = /* @__PURE__ */ new Set();
24429
24438
  }
24430
24439
  });
@@ -25621,13 +25630,13 @@ var init_acp2 = __esm({
25621
25630
  });
25622
25631
 
25623
25632
  // ../agent-core/dist/chunk-TFIO37PI.js
25624
- var import_fs4, NEWLINE2, TranscriptCursor, TranscriptLineLookup;
25633
+ var import_fs5, NEWLINE2, TranscriptCursor, TranscriptLineLookup;
25625
25634
  var init_chunk_TFIO37PI = __esm({
25626
25635
  "../agent-core/dist/chunk-TFIO37PI.js"() {
25627
25636
  "use strict";
25628
25637
  init_chunk_RBQC7XZH();
25629
25638
  init_chunk_YXWJW7I5();
25630
- import_fs4 = require("fs");
25639
+ import_fs5 = require("fs");
25631
25640
  NEWLINE2 = 10;
25632
25641
  TranscriptCursor = class {
25633
25642
  #path;
@@ -25645,7 +25654,7 @@ var init_chunk_TFIO37PI = __esm({
25645
25654
  try {
25646
25655
  this.#offset = Math.max(
25647
25656
  this.#offset,
25648
- (0, import_fs4.statSync)(this.#path, { throwIfNoEntry: false })?.size ?? 0
25657
+ (0, import_fs5.statSync)(this.#path, { throwIfNoEntry: false })?.size ?? 0
25649
25658
  );
25650
25659
  } catch {
25651
25660
  }
@@ -25667,15 +25676,15 @@ var init_chunk_TFIO37PI = __esm({
25667
25676
  /** Runs on the CLI's stdout path, so an unreadable file reads as no new lines. */
25668
25677
  #unread() {
25669
25678
  try {
25670
- const size = (0, import_fs4.statSync)(this.#path, { throwIfNoEntry: false })?.size ?? 0;
25679
+ const size = (0, import_fs5.statSync)(this.#path, { throwIfNoEntry: false })?.size ?? 0;
25671
25680
  if (size <= this.#offset) return void 0;
25672
25681
  const buffer = Buffer.alloc(size - this.#offset);
25673
- const fd = (0, import_fs4.openSync)(this.#path, "r");
25682
+ const fd = (0, import_fs5.openSync)(this.#path, "r");
25674
25683
  try {
25675
- const read = (0, import_fs4.readSync)(fd, buffer, 0, buffer.length, this.#offset);
25684
+ const read = (0, import_fs5.readSync)(fd, buffer, 0, buffer.length, this.#offset);
25676
25685
  return buffer.subarray(0, read);
25677
25686
  } finally {
25678
- (0, import_fs4.closeSync)(fd);
25687
+ (0, import_fs5.closeSync)(fd);
25679
25688
  }
25680
25689
  } catch {
25681
25690
  return void 0;
@@ -26173,7 +26182,7 @@ var init_chunk_ZCTKXKYY = __esm({
26173
26182
  }
26174
26183
  });
26175
26184
 
26176
- // ../agent-core/dist/chunk-N2M5D7RS.js
26185
+ // ../agent-core/dist/chunk-LDVOKUAU.js
26177
26186
  function detectImageMimeType(buffer) {
26178
26187
  if (buffer.length >= 8 && buffer.subarray(0, 8).equals(PNG_SIGNATURE)) return "image/png";
26179
26188
  if (buffer.length >= 3 && buffer[0] === 255 && buffer[1] === 216 && buffer[2] === 255) {
@@ -26275,14 +26284,14 @@ function readMediaFiles(query) {
26275
26284
  const files = [];
26276
26285
  for (const candidate of query.candidates) {
26277
26286
  const path = normalizePath(candidate, query.cwd);
26278
- if (!path || seen.has(path) || !(0, import_fs5.existsSync)(path)) continue;
26287
+ if (!path || seen.has(path) || !(0, import_fs6.existsSync)(path)) continue;
26279
26288
  seen.add(path);
26280
26289
  const mimeType = query.mimeByExt[(0, import_path4.extname)(path).toLowerCase()];
26281
26290
  if (!mimeType) continue;
26282
- const stat15 = (0, import_fs5.statSync)(path);
26291
+ const stat15 = (0, import_fs6.statSync)(path);
26283
26292
  if (!stat15.isFile() || stat15.size <= 0 || stat15.size > query.maxBytes) continue;
26284
26293
  if (stat15.mtimeMs < query.writtenSince && !query.named.has(path)) continue;
26285
- files.push({ path, mimeType, buffer: (0, import_fs5.readFileSync)(path) });
26294
+ files.push({ path, mimeType, buffer: (0, import_fs6.readFileSync)(path) });
26286
26295
  }
26287
26296
  return files;
26288
26297
  }
@@ -26613,16 +26622,16 @@ function silentStartError(name, timeoutMs) {
26613
26622
  message: `${name} printed nothing for ${seconds}s after it started and was stopped. Send your message again.`
26614
26623
  };
26615
26624
  }
26616
- var import_crypto4, import_fs5, 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;
26617
- var init_chunk_N2M5D7RS = __esm({
26618
- "../agent-core/dist/chunk-N2M5D7RS.js"() {
26625
+ 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;
26626
+ var init_chunk_LDVOKUAU = __esm({
26627
+ "../agent-core/dist/chunk-LDVOKUAU.js"() {
26619
26628
  "use strict";
26620
26629
  init_chunk_RBQC7XZH();
26621
26630
  init_chunk_ZCTKXKYY();
26622
- init_chunk_6VWVDJ2A();
26631
+ init_chunk_KVTSAS2T();
26623
26632
  init_chunk_YXWJW7I5();
26624
26633
  import_crypto4 = require("crypto");
26625
- import_fs5 = require("fs");
26634
+ import_fs6 = require("fs");
26626
26635
  import_path4 = require("path");
26627
26636
  init_agent2();
26628
26637
  init_acp();
@@ -28919,14 +28928,14 @@ function encodeProjectDir(cwd) {
28919
28928
  }
28920
28929
  function realCwd(cwd) {
28921
28930
  try {
28922
- return (0, import_fs6.realpathSync)(cwd);
28931
+ return (0, import_fs7.realpathSync)(cwd);
28923
28932
  } catch {
28924
28933
  return cwd;
28925
28934
  }
28926
28935
  }
28927
28936
  function projectDirs(projectsRoot) {
28928
28937
  try {
28929
- return (0, import_fs6.readdirSync)(projectsRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
28938
+ return (0, import_fs7.readdirSync)(projectsRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
28930
28939
  } catch {
28931
28940
  return [];
28932
28941
  }
@@ -28937,10 +28946,10 @@ function claudeSessionLogExists(query) {
28937
28946
  const fileName = `${query.sessionId}.jsonl`;
28938
28947
  const here = new Set([query.cwd, realCwd(query.cwd)].map(encodeProjectDir));
28939
28948
  for (const dir of here) {
28940
- if ((0, import_fs6.existsSync)((0, import_path6.join)(projectsRoot, dir, fileName))) return true;
28949
+ if ((0, import_fs7.existsSync)((0, import_path6.join)(projectsRoot, dir, fileName))) return true;
28941
28950
  }
28942
28951
  return projectDirs(projectsRoot).some(
28943
- (dir) => !here.has(dir) && (0, import_fs6.existsSync)((0, import_path6.join)(projectsRoot, dir, fileName))
28952
+ (dir) => !here.has(dir) && (0, import_fs7.existsSync)((0, import_path6.join)(projectsRoot, dir, fileName))
28944
28953
  );
28945
28954
  }
28946
28955
  function envDigest(env) {
@@ -29013,15 +29022,15 @@ async function claudeTurnInput(run, context) {
29013
29022
  );
29014
29023
  return { turnId: run.runId, text: text2, ...encoded.length ? { images: encoded } : {} };
29015
29024
  }
29016
- var import_crypto7, import_fs6, import_path6, import_crypto8, import_promises15, 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;
29025
+ var import_crypto7, import_fs7, import_path6, import_crypto8, import_promises15, 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;
29017
29026
  var init_claude = __esm({
29018
29027
  "../agent-core/dist/providers/claude.js"() {
29019
29028
  "use strict";
29020
29029
  init_chunk_TFIO37PI();
29021
- init_chunk_N2M5D7RS();
29030
+ init_chunk_LDVOKUAU();
29022
29031
  init_chunk_RBQC7XZH();
29023
29032
  init_chunk_ZCTKXKYY();
29024
- init_chunk_6VWVDJ2A();
29033
+ init_chunk_KVTSAS2T();
29025
29034
  init_chunk_DLVRNIY5();
29026
29035
  init_chunk_OSECDZA5();
29027
29036
  init_chunk_YXWJW7I5();
@@ -29033,7 +29042,7 @@ var init_claude = __esm({
29033
29042
  init_acp();
29034
29043
  init_constants();
29035
29044
  init_agent2();
29036
- import_fs6 = require("fs");
29045
+ import_fs7 = require("fs");
29037
29046
  import_path6 = require("path");
29038
29047
  import_crypto8 = require("crypto");
29039
29048
  import_promises15 = require("fs/promises");
@@ -30103,7 +30112,7 @@ function codexHomeOf(env) {
30103
30112
  }
30104
30113
  function namesNewestFirst(dir, isDir) {
30105
30114
  try {
30106
- return (0, import_fs7.readdirSync)(dir, { withFileTypes: true }).filter((entry) => isDir ? entry.isDirectory() : entry.isFile()).map((entry) => entry.name).sort().reverse();
30115
+ return (0, import_fs8.readdirSync)(dir, { withFileTypes: true }).filter((entry) => isDir ? entry.isDirectory() : entry.isFile()).map((entry) => entry.name).sort().reverse();
30107
30116
  } catch {
30108
30117
  return [];
30109
30118
  }
@@ -31300,19 +31309,19 @@ function codexTurnInput(run, context) {
31300
31309
  ...images.length ? { imagePaths: images.map((image) => image.path) } : {}
31301
31310
  };
31302
31311
  }
31303
- var import_fs7, 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;
31312
+ 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;
31304
31313
  var init_codex = __esm({
31305
31314
  "../agent-core/dist/providers/codex.js"() {
31306
31315
  "use strict";
31307
31316
  init_chunk_TFIO37PI();
31308
- init_chunk_N2M5D7RS();
31317
+ init_chunk_LDVOKUAU();
31309
31318
  init_chunk_RBQC7XZH();
31310
31319
  init_chunk_ZCTKXKYY();
31311
- init_chunk_6VWVDJ2A();
31320
+ init_chunk_KVTSAS2T();
31312
31321
  init_chunk_DLVRNIY5();
31313
31322
  init_chunk_OSECDZA5();
31314
31323
  init_chunk_YXWJW7I5();
31315
- import_fs7 = require("fs");
31324
+ import_fs8 = require("fs");
31316
31325
  import_path7 = require("path");
31317
31326
  init_effort();
31318
31327
  import_crypto9 = require("crypto");
@@ -32639,9 +32648,9 @@ function packagedAlanCodeEnginePath(bundle, platform) {
32639
32648
  }
32640
32649
  function isRunnableFile(path, platform) {
32641
32650
  try {
32642
- if (!(0, import_fs8.statSync)(path).isFile()) return false;
32651
+ if (!(0, import_fs9.statSync)(path).isFile()) return false;
32643
32652
  if (platform === "win32") return WINDOWS_RUNNABLE_EXTENSION.test(path);
32644
- (0, import_fs8.accessSync)(path, import_fs8.constants.X_OK);
32653
+ (0, import_fs9.accessSync)(path, import_fs9.constants.X_OK);
32645
32654
  return true;
32646
32655
  } catch {
32647
32656
  return false;
@@ -32966,7 +32975,7 @@ function alanCodeSystemPrompt(alanSystemPrompt) {
32966
32975
 
32967
32976
  ${instructions}` : ALAN_CODE_TOOL_NAMING_PROMPT;
32968
32977
  }
32969
- var import_http3, import_https, import_fs8, import_path8, import_crypto13, import_promises16, 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;
32978
+ var import_http3, import_https, import_fs9, import_path8, import_crypto13, import_promises16, 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;
32970
32979
  var init_alan_code = __esm({
32971
32980
  "../agent-core/dist/providers/alan-code.js"() {
32972
32981
  "use strict";
@@ -32977,7 +32986,7 @@ var init_alan_code = __esm({
32977
32986
  init_runtime_v2();
32978
32987
  init_runtime_v2();
32979
32988
  init_models();
32980
- import_fs8 = require("fs");
32989
+ import_fs9 = require("fs");
32981
32990
  import_path8 = require("path");
32982
32991
  init_runtime_v2();
32983
32992
  import_crypto13 = require("crypto");
@@ -40356,10 +40365,10 @@ var require_dist = __commonJS({
40356
40365
  var init_dist = __esm({
40357
40366
  "../agent-core/dist/index.js"() {
40358
40367
  "use strict";
40359
- init_chunk_N2M5D7RS();
40368
+ init_chunk_LDVOKUAU();
40360
40369
  init_chunk_RBQC7XZH();
40361
40370
  init_chunk_ZCTKXKYY();
40362
- init_chunk_6VWVDJ2A();
40371
+ init_chunk_KVTSAS2T();
40363
40372
  init_chunk_YXWJW7I5();
40364
40373
  }
40365
40374
  });
@@ -41109,10 +41118,10 @@ var import_promises24, import_path10, import_crypto14, import_promises25, CURSOR
41109
41118
  var init_acp3 = __esm({
41110
41119
  "../agent-core/dist/providers/acp.js"() {
41111
41120
  "use strict";
41112
- init_chunk_N2M5D7RS();
41121
+ init_chunk_LDVOKUAU();
41113
41122
  init_chunk_RBQC7XZH();
41114
41123
  init_chunk_ZCTKXKYY();
41115
- init_chunk_6VWVDJ2A();
41124
+ init_chunk_KVTSAS2T();
41116
41125
  init_chunk_DLVRNIY5();
41117
41126
  init_chunk_OSECDZA5();
41118
41127
  init_chunk_YXWJW7I5();
@@ -43152,17 +43161,18 @@ function openCodeTurnInput(run, context) {
43152
43161
  return {
43153
43162
  turnId: run.runId,
43154
43163
  text: text2,
43155
- ...images.length ? { imagePaths: images.map((image) => image.path) } : {}
43164
+ ...images.length ? { imagePaths: images.map((image) => image.path) } : {},
43165
+ ...context.attachments.length ? { readableFiles: context.attachments.map((attachment) => attachment.path) } : {}
43156
43166
  };
43157
43167
  }
43158
- var import_crypto15, import_http4, import_crypto16, import_promises26, import_path11, import_path12, import_url2, import_crypto17, IDLE_SOCKET_MS2, 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_OPERATIONS, 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;
43168
+ var import_crypto15, import_http4, import_crypto16, import_promises26, import_path11, import_path12, import_url2, import_path13, import_crypto17, IDLE_SOCKET_MS2, 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_OPERATIONS, 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;
43159
43169
  var init_opencode = __esm({
43160
43170
  "../agent-core/dist/providers/opencode.js"() {
43161
43171
  "use strict";
43162
- init_chunk_N2M5D7RS();
43172
+ init_chunk_LDVOKUAU();
43163
43173
  init_chunk_RBQC7XZH();
43164
43174
  init_chunk_ZCTKXKYY();
43165
- init_chunk_6VWVDJ2A();
43175
+ init_chunk_KVTSAS2T();
43166
43176
  init_chunk_DLVRNIY5();
43167
43177
  init_chunk_OSECDZA5();
43168
43178
  init_chunk_YXWJW7I5();
@@ -43176,6 +43186,7 @@ var init_opencode = __esm({
43176
43186
  import_path12 = require("path");
43177
43187
  import_url2 = require("url");
43178
43188
  init_acp();
43189
+ import_path13 = require("path");
43179
43190
  init_acp();
43180
43191
  init_constants();
43181
43192
  import_crypto17 = require("crypto");
@@ -43787,6 +43798,8 @@ var init_opencode = __esm({
43787
43798
  #readOnly;
43788
43799
  #memory;
43789
43800
  #engine;
43801
+ /** The turn's attachments: downloaded outside the workspace, still readable when read-only. */
43802
+ #readableFiles;
43790
43803
  #parts = new PartReader();
43791
43804
  /** Child session id \u2192 the `task` call that launched it; `undefined` when unlinked. */
43792
43805
  #children = /* @__PURE__ */ new Map();
@@ -43802,11 +43815,12 @@ var init_opencode = __esm({
43802
43815
  #finish;
43803
43816
  #error;
43804
43817
  #end;
43805
- constructor(rootSessionId, readOnly, memory, engine = OPENCODE_ENGINE) {
43818
+ constructor(rootSessionId, readOnly, memory, engine = OPENCODE_ENGINE, readableFiles = []) {
43806
43819
  this.#root = rootSessionId;
43807
43820
  this.#readOnly = readOnly;
43808
43821
  this.#memory = memory;
43809
43822
  this.#engine = engine;
43823
+ this.#readableFiles = new Set(readableFiles.map((path) => (0, import_path13.normalize)(path)));
43810
43824
  }
43811
43825
  get childSessionIds() {
43812
43826
  return [...this.#children.keys()];
@@ -44034,13 +44048,20 @@ var init_opencode = __esm({
44034
44048
  if (!requestId) return NOTHING;
44035
44049
  const kind = asString(properties.permission).trim() || "an action";
44036
44050
  const nonInteractive = NON_INTERACTIVE_PERMISSIONS.has(kind);
44037
- const reply = nonInteractive || this.#readOnly ? "reject" : "once";
44038
- const message = nonInteractive ? `${subject} tried to ${kind.replace(/_/g, " ")} \u2014 denied (Alan does not yet support interactive requests for ${this.#engine.label}).` : this.#readOnly ? `${subject} requested permission to ${kind} \u2014 automatically denied (read-only session).` : `${subject} requested permission to ${kind} \u2014 automatically approved (autonomous mode).`;
44051
+ const attachment = this.#readOnly && this.#opensAttachment(kind, properties);
44052
+ const reply = nonInteractive || this.#readOnly && !attachment ? "reject" : "once";
44053
+ const message = 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).`;
44039
44054
  return {
44040
44055
  updates: [notice("permission_decision", message)],
44041
44056
  actions: [{ kind: "permission", requestId, reply }]
44042
44057
  };
44043
44058
  }
44059
+ /** OpenCode asks `external_directory` with the exact target path in `metadata.filepath`. */
44060
+ #opensAttachment(kind, properties) {
44061
+ if (kind !== "external_directory") return false;
44062
+ const filepath = asString(asRecord(properties.metadata)?.filepath);
44063
+ return (0, import_path13.isAbsolute)(filepath) && this.#readableFiles.has((0, import_path13.normalize)(filepath));
44064
+ }
44044
44065
  #question(properties) {
44045
44066
  const requestId = asString(properties.id).trim();
44046
44067
  if (!requestId) return NOTHING;
@@ -44199,7 +44220,7 @@ var init_opencode = __esm({
44199
44220
  const client = this.#client;
44200
44221
  const sessionId = this.#sessionId;
44201
44222
  if (!client || !sessionId) throw new CoreFault("internal", `The ${engine} session is not open`);
44202
- const active = this.#startTurn(input2.turnId, sessionId);
44223
+ const active = this.#startTurn(input2.turnId, sessionId, input2.readableFiles);
44203
44224
  void this.#send(active, client, sessionId, {
44204
44225
  ...this.#promptBody(input2),
44205
44226
  messageID: active.initialMessageId
@@ -44321,14 +44342,15 @@ var init_opencode = __esm({
44321
44342
  #emit(event) {
44322
44343
  this.#listeners.emit(event);
44323
44344
  }
44324
- #startTurn(id, sessionId) {
44345
+ #startTurn(id, sessionId, readableFiles) {
44325
44346
  this.#turnCount += 1;
44326
44347
  this.#subagents.prune();
44327
44348
  const turn = new OpenCodeTurn(
44328
44349
  sessionId,
44329
44350
  this.#prompt.readOnly,
44330
44351
  this.#memory,
44331
- this.#options.engine
44352
+ this.#options.engine,
44353
+ readableFiles
44332
44354
  );
44333
44355
  let finish = () => {
44334
44356
  };
@@ -45255,10 +45277,10 @@ var import_crypto18, import_promises27, FACTORY_API_VERSION, FACTORY_PROTOCOL_VE
45255
45277
  var init_droid = __esm({
45256
45278
  "../agent-core/dist/providers/droid.js"() {
45257
45279
  "use strict";
45258
- init_chunk_N2M5D7RS();
45280
+ init_chunk_LDVOKUAU();
45259
45281
  init_chunk_RBQC7XZH();
45260
45282
  init_chunk_ZCTKXKYY();
45261
- init_chunk_6VWVDJ2A();
45283
+ init_chunk_KVTSAS2T();
45262
45284
  init_chunk_DLVRNIY5();
45263
45285
  init_chunk_OSECDZA5();
45264
45286
  init_chunk_YXWJW7I5();
@@ -45749,7 +45771,7 @@ var init_opencode2 = __esm({
45749
45771
  // ../agent-core/dist/providers/antigravity.js
45750
45772
  function settingsPath(env) {
45751
45773
  const home = env.HOME?.trim() || env.USERPROFILE?.trim();
45752
- return home ? (0, import_path13.resolve)(home, ".gemini", "antigravity-cli", "settings.json") : void 0;
45774
+ return home ? (0, import_path14.resolve)(home, ".gemini", "antigravity-cli", "settings.json") : void 0;
45753
45775
  }
45754
45776
  async function readSettings(path) {
45755
45777
  let raw;
@@ -45772,7 +45794,7 @@ async function selectAntigravityApiKeyMode(env) {
45772
45794
  const settings2 = await readSettings(path);
45773
45795
  if (settings2 === "malformed") return "malformed";
45774
45796
  if (settings2.modelProvider === "gemini") return "already_selected";
45775
- await (0, import_promises28.mkdir)((0, import_path13.dirname)(path), { recursive: true });
45797
+ await (0, import_promises28.mkdir)((0, import_path14.dirname)(path), { recursive: true });
45776
45798
  await (0, import_promises28.writeFile)(path, JSON.stringify({ ...settings2, modelProvider: "gemini" }), { mode: 384 });
45777
45799
  return "selected";
45778
45800
  }
@@ -45816,21 +45838,21 @@ function antigravityArgs(input2, capabilities, prompt) {
45816
45838
  ];
45817
45839
  }
45818
45840
  function workspaceRoot(cwd) {
45819
- for (let current = (0, import_path14.resolve)(cwd); ; current = (0, import_path14.dirname)(current)) {
45820
- if ((0, import_fs9.existsSync)((0, import_path14.join)(current, ".git"))) return current;
45821
- if ((0, import_path14.dirname)(current) === current) return (0, import_path14.resolve)(cwd);
45841
+ for (let current = (0, import_path15.resolve)(cwd); ; current = (0, import_path15.dirname)(current)) {
45842
+ if ((0, import_fs10.existsSync)((0, import_path15.join)(current, ".git"))) return current;
45843
+ if ((0, import_path15.dirname)(current) === current) return (0, import_path15.resolve)(cwd);
45822
45844
  }
45823
45845
  }
45824
45846
  function instructionPaths(cwd) {
45825
45847
  const root = workspaceRoot(cwd);
45826
45848
  const paths = [];
45827
- for (let current = (0, import_path14.resolve)(cwd); ; current = (0, import_path14.dirname)(current)) {
45828
- const path = (0, import_path14.join)(current, INSTRUCTIONS_FILE);
45849
+ for (let current = (0, import_path15.resolve)(cwd); ; current = (0, import_path15.dirname)(current)) {
45850
+ const path = (0, import_path15.join)(current, INSTRUCTIONS_FILE);
45829
45851
  try {
45830
- if ((0, import_fs9.existsSync)(path) && (0, import_fs9.statSync)(path).isFile()) paths.unshift(path);
45852
+ if ((0, import_fs10.existsSync)(path) && (0, import_fs10.statSync)(path).isFile()) paths.unshift(path);
45831
45853
  } catch {
45832
45854
  }
45833
- if (current === root || (0, import_path14.dirname)(current) === current) return paths;
45855
+ if (current === root || (0, import_path15.dirname)(current) === current) return paths;
45834
45856
  }
45835
45857
  }
45836
45858
  function antigravityWorkspaceInstructions(cwd, maxChars = MAX_INSTRUCTION_CHARS) {
@@ -45841,7 +45863,7 @@ function antigravityWorkspaceInstructions(cwd, maxChars = MAX_INSTRUCTION_CHARS)
45841
45863
  if (remaining <= 0) break;
45842
45864
  let content;
45843
45865
  try {
45844
- content = (0, import_fs9.readFileSync)(path, "utf8").trim();
45866
+ content = (0, import_fs10.readFileSync)(path, "utf8").trim();
45845
45867
  } catch {
45846
45868
  continue;
45847
45869
  }
@@ -46084,7 +46106,7 @@ function normalizeAntigravityFrame(event) {
46084
46106
  }
46085
46107
  function antigravityBrainRoot(env) {
46086
46108
  const home = env.HOME?.trim() || env.USERPROFILE?.trim();
46087
- return home ? (0, import_path15.resolve)(home, ".gemini", "antigravity-cli", "brain") : void 0;
46109
+ return home ? (0, import_path16.resolve)(home, ".gemini", "antigravity-cli", "brain") : void 0;
46088
46110
  }
46089
46111
  function parseEntry(text2) {
46090
46112
  try {
@@ -46122,14 +46144,14 @@ function childTranscriptPath(root, frame) {
46122
46144
  try {
46123
46145
  const url2 = new URL(logUri);
46124
46146
  if (url2.protocol !== "file:") return void 0;
46125
- path = (0, import_path15.resolve)((0, import_url3.fileURLToPath)(url2));
46147
+ path = (0, import_path16.resolve)((0, import_url3.fileURLToPath)(url2));
46126
46148
  } catch {
46127
46149
  return void 0;
46128
46150
  }
46129
- const fromRoot = (0, import_path15.relative)(root, path);
46130
- if (!fromRoot || (0, import_path15.isAbsolute)(fromRoot) || fromRoot.split(import_path15.sep).includes("..")) return void 0;
46151
+ const fromRoot = (0, import_path16.relative)(root, path);
46152
+ if (!fromRoot || (0, import_path16.isAbsolute)(fromRoot) || fromRoot.split(import_path16.sep).includes("..")) return void 0;
46131
46153
  const expected = [conversationId, ...LOG_DIRS, TRANSCRIPT_FILE];
46132
- const segments = fromRoot.split(import_path15.sep);
46154
+ const segments = fromRoot.split(import_path16.sep);
46133
46155
  const matches = segments.length === expected.length && segments.every((segment, index) => segment === expected[index]);
46134
46156
  return matches ? path : void 0;
46135
46157
  }
@@ -46389,24 +46411,24 @@ function antigravityTurnInput(run, context) {
46389
46411
  });
46390
46412
  return { turnId: run.runId, text: appendImagePathReferences(text2, images) };
46391
46413
  }
46392
- var import_promises28, import_path13, import_fs9, import_path14, import_path15, 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;
46414
+ var import_promises28, 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;
46393
46415
  var init_antigravity = __esm({
46394
46416
  "../agent-core/dist/providers/antigravity.js"() {
46395
46417
  "use strict";
46396
46418
  init_chunk_TFIO37PI();
46397
- init_chunk_N2M5D7RS();
46419
+ init_chunk_LDVOKUAU();
46398
46420
  init_chunk_RBQC7XZH();
46399
46421
  init_chunk_ZCTKXKYY();
46400
- init_chunk_6VWVDJ2A();
46422
+ init_chunk_KVTSAS2T();
46401
46423
  init_chunk_DLVRNIY5();
46402
46424
  init_chunk_YXWJW7I5();
46403
46425
  import_promises28 = require("fs/promises");
46404
- import_path13 = require("path");
46405
- init_type_guards();
46406
- import_fs9 = require("fs");
46407
46426
  import_path14 = require("path");
46408
- init_effort();
46427
+ init_type_guards();
46428
+ import_fs10 = require("fs");
46409
46429
  import_path15 = require("path");
46430
+ init_effort();
46431
+ import_path16 = require("path");
46410
46432
  import_url3 = require("url");
46411
46433
  import_crypto19 = require("crypto");
46412
46434
  init_agent2();
@@ -46446,7 +46468,7 @@ var init_antigravity = __esm({
46446
46468
  #full;
46447
46469
  constructor(path) {
46448
46470
  this.#cursor = new TranscriptCursor(path);
46449
- this.#fullPath = (0, import_path15.resolve)((0, import_path15.dirname)(path), FULL_TRANSCRIPT_FILE);
46471
+ this.#fullPath = (0, import_path16.resolve)((0, import_path16.dirname)(path), FULL_TRANSCRIPT_FILE);
46450
46472
  }
46451
46473
  skipExisting() {
46452
46474
  this.#cursor.read();
@@ -46494,7 +46516,7 @@ var init_antigravity = __esm({
46494
46516
  /** A conversation this turn did not resume was created by it, so it is read whole. */
46495
46517
  trackParent(conversationId) {
46496
46518
  if (this.#parent?.conversationId === conversationId) return;
46497
- const path = (0, import_path15.resolve)(this.#root, conversationId, ...LOG_DIRS, TRANSCRIPT_FILE);
46519
+ const path = (0, import_path16.resolve)(this.#root, conversationId, ...LOG_DIRS, TRANSCRIPT_FILE);
46498
46520
  this.#parent = { conversationId, transcript: new BrainTranscript(path) };
46499
46521
  }
46500
46522
  /** A launcher keeps the first valid transcript it names; later frames change nothing. */
@@ -46929,7 +46951,7 @@ function parseConfig(raw) {
46929
46951
  }
46930
46952
  }
46931
46953
  async function writeCommandCodeProjectMcp(cwd, mcp) {
46932
- const path = (0, import_path16.join)(cwd, ".mcp.json");
46954
+ const path = (0, import_path17.join)(cwd, ".mcp.json");
46933
46955
  const original = await (0, import_promises29.readFile)(path, "utf8").catch(() => null);
46934
46956
  const config2 = parseConfig(original);
46935
46957
  const next = {
@@ -47124,19 +47146,19 @@ function commandCodeTurnInput(run, context) {
47124
47146
  });
47125
47147
  return { turnId: run.runId, text: appendImagePathReferences(text2, images) };
47126
47148
  }
47127
- var import_promises29, import_path16, 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;
47149
+ var import_promises29, 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;
47128
47150
  var init_command_code = __esm({
47129
47151
  "../agent-core/dist/providers/command-code.js"() {
47130
47152
  "use strict";
47131
- init_chunk_N2M5D7RS();
47153
+ init_chunk_LDVOKUAU();
47132
47154
  init_chunk_RBQC7XZH();
47133
47155
  init_chunk_ZCTKXKYY();
47134
- init_chunk_6VWVDJ2A();
47156
+ init_chunk_KVTSAS2T();
47135
47157
  init_chunk_DLVRNIY5();
47136
47158
  init_chunk_OSECDZA5();
47137
47159
  init_chunk_YXWJW7I5();
47138
47160
  import_promises29 = require("fs/promises");
47139
- import_path16 = require("path");
47161
+ import_path17 = require("path");
47140
47162
  init_agent2();
47141
47163
  init_runtime_v2();
47142
47164
  init_acp();
@@ -48263,7 +48285,7 @@ async function assertValidBranch(git, repoRoot, branch, signal) {
48263
48285
  var import_node_child_process = require("child_process");
48264
48286
 
48265
48287
  // ../agent-core/dist/process.js
48266
- init_chunk_6VWVDJ2A();
48288
+ init_chunk_KVTSAS2T();
48267
48289
  init_chunk_YXWJW7I5();
48268
48290
 
48269
48291
  // src/capabilities/git/run-git.ts
@@ -48506,6 +48528,20 @@ async function readCheckoutStatus(git, cwd, signal) {
48506
48528
  );
48507
48529
  return output2.exitCode === 0 ? parseStatus(output2.stdout) : null;
48508
48530
  }
48531
+ async function currentBranch(git, cwd, signal) {
48532
+ const output2 = await git.run(
48533
+ { cwd, args: ["symbolic-ref", "--quiet", "--short", "HEAD"], readOnly: true },
48534
+ signal
48535
+ );
48536
+ return output2.exitCode === 0 ? output2.stdout.trim() || null : null;
48537
+ }
48538
+ async function moveSnapshotTo(git, cwd, snapshot, tip, signal) {
48539
+ const run = (args) => git.run({ cwd, args }, signal);
48540
+ if ((await run(["switch", "--quiet", "--detach", tip])).exitCode !== 0) return false;
48541
+ const moved = await run(["update-ref", `refs/heads/${snapshot.branch}`, tip, snapshot.head]);
48542
+ const back = await run(["switch", "--quiet", snapshot.branch]);
48543
+ return moved.exitCode === 0 && back.exitCode === 0;
48544
+ }
48509
48545
  async function isCheckout(path) {
48510
48546
  return (0, import_promises8.stat)((0, import_node_path4.join)(path, ".git")).then(
48511
48547
  () => true,
@@ -48885,7 +48921,6 @@ function runtimePaths(stateDir) {
48885
48921
 
48886
48922
  // src/platform/process-memory.ts
48887
48923
  var import_node_child_process4 = require("child_process");
48888
- var import_node_fs6 = require("fs");
48889
48924
  var import_promises12 = require("fs/promises");
48890
48925
  var import_node_os2 = require("os");
48891
48926
  var import_node_util3 = require("util");
@@ -48925,45 +48960,6 @@ async function readProcessRss(pid) {
48925
48960
  return null;
48926
48961
  }
48927
48962
  }
48928
- function parseDarwinVmStat(output2) {
48929
- const pageSize = Number(/page size of (\d+) bytes/.exec(output2)?.[1]);
48930
- if (!Number.isFinite(pageSize) || pageSize <= 0) return null;
48931
- const pages = (name) => {
48932
- const match = new RegExp(`^Pages ${name}:\\s+(\\d+)\\.?$`, "m").exec(output2);
48933
- return match ? Number(match[1]) : null;
48934
- };
48935
- const free = pages("free");
48936
- if (free === null) return null;
48937
- return (free + (pages("inactive") ?? 0) + (pages("speculative") ?? 0)) * pageSize;
48938
- }
48939
- function parseLinuxMemInfo(output2) {
48940
- const kilobytes = /^MemAvailable:\s+(\d+)\s+kB$/m.exec(output2)?.[1];
48941
- return kilobytes === void 0 ? null : Number(kilobytes) * 1024;
48942
- }
48943
- var CAPACITY_PROBE_TTL_MS = 2e3;
48944
- var AvailableMemoryProbe = class {
48945
- cached = null;
48946
- read(now) {
48947
- if (this.cached !== null && now - this.cached.at < CAPACITY_PROBE_TTL_MS) {
48948
- return this.cached.bytes;
48949
- }
48950
- let bytes = null;
48951
- try {
48952
- if (process.platform === "darwin") {
48953
- bytes = parseDarwinVmStat(
48954
- (0, import_node_child_process4.execFileSync)("vm_stat", { encoding: "utf8", timeout: PROBE_TIMEOUT_MS })
48955
- );
48956
- } else if (process.platform === "linux") {
48957
- bytes = parseLinuxMemInfo((0, import_node_fs6.readFileSync)("/proc/meminfo", "utf8"));
48958
- }
48959
- } catch {
48960
- bytes = null;
48961
- }
48962
- this.cached = { at: now, bytes };
48963
- return bytes;
48964
- }
48965
- };
48966
- var availableMemoryProbe = new AvailableMemoryProbe();
48967
48963
  async function processMemoryRows() {
48968
48964
  if (process.platform === "win32") {
48969
48965
  const { stdout: stdout2 } = await execFileAsync3(
@@ -49064,7 +49060,7 @@ var systemExec = (request2) => new Promise((resolve8) => {
49064
49060
  init_alan_code();
49065
49061
 
49066
49062
  // src/capabilities/providers/commands.ts
49067
- var import_node_fs7 = require("fs");
49063
+ var import_node_fs6 = require("fs");
49068
49064
  var import_promises17 = require("fs/promises");
49069
49065
  var import_node_path9 = require("path");
49070
49066
  var PROVIDER_COMMANDS = [
@@ -49102,7 +49098,7 @@ function pathDelimiter(platform) {
49102
49098
  async function isRunnable(path, platform) {
49103
49099
  try {
49104
49100
  if (!(await (0, import_promises17.stat)(path)).isFile()) return false;
49105
- if (platform !== "win32") await (0, import_promises17.access)(path, import_node_fs7.constants.X_OK);
49101
+ if (platform !== "win32") await (0, import_promises17.access)(path, import_node_fs6.constants.X_OK);
49106
49102
  return true;
49107
49103
  } catch {
49108
49104
  return false;
@@ -49752,7 +49748,7 @@ async function inspectIndexedSkill(directory, contentHash) {
49752
49748
 
49753
49749
  // src/capabilities/skills/native-index.ts
49754
49750
  var import_node_crypto10 = require("crypto");
49755
- var import_node_fs8 = require("fs");
49751
+ var import_node_fs7 = require("fs");
49756
49752
  var import_promises21 = require("fs/promises");
49757
49753
  var import_node_path13 = require("path");
49758
49754
  var ALAN_SKILLS_PLUGIN_NAME = "alan";
@@ -49766,7 +49762,7 @@ var PLUGIN_MANIFEST = `${JSON.stringify(
49766
49762
  )}
49767
49763
  `;
49768
49764
  function installedSkillFolders(layout) {
49769
- return (0, import_node_fs8.existsSync)((0, import_node_path13.join)(layout.pluginDir, ".claude-plugin", "plugin.json")) ? { pluginDir: layout.pluginDir, skillsDir: layout.pluginSkillsDir } : null;
49765
+ return (0, import_node_fs7.existsSync)((0, import_node_path13.join)(layout.pluginDir, ".claude-plugin", "plugin.json")) ? { pluginDir: layout.pluginDir, skillsDir: layout.pluginSkillsDir } : null;
49770
49766
  }
49771
49767
 
49772
49768
  // src/capabilities/workspace/index.ts
@@ -50383,20 +50379,20 @@ async function prepareRunInputs(spec, { source, tmpDir, signal, skills = [] }) {
50383
50379
 
50384
50380
  // src/holder/serve.ts
50385
50381
  var import_node_crypto15 = require("crypto");
50386
- var import_node_fs12 = require("fs");
50382
+ var import_node_fs11 = require("fs");
50387
50383
  var import_node_net2 = require("net");
50388
50384
  var import_node_path29 = require("path");
50389
50385
  init_runtime_v2();
50390
50386
 
50391
50387
  // src/holder/admission.ts
50392
- var import_node_fs10 = require("fs");
50388
+ var import_node_fs9 = require("fs");
50393
50389
  var import_promises35 = require("fs/promises");
50394
50390
  var import_node_os6 = require("os");
50395
50391
  var import_node_path25 = require("path");
50396
50392
  init_constants();
50397
50393
 
50398
50394
  // ../shared/dist/node/local-workspace.js
50399
- var import_node_fs9 = require("fs");
50395
+ var import_node_fs8 = require("fs");
50400
50396
  var import_node_os5 = require("os");
50401
50397
  var import_node_path20 = require("path");
50402
50398
  function resolveAlanDefaultWorkspacePath(homeDirectory = (0, import_node_os5.homedir)()) {
@@ -50624,18 +50620,16 @@ async function switchTo(checkout, current, operationId, deps, signal) {
50624
50620
  async function applyRequestedCheckout(checkout, spec, deps, signal) {
50625
50621
  try {
50626
50622
  if (!await isCheckout(checkout.path)) return await clone2(checkout, deps, signal);
50627
- const status = await readCheckoutStatus(deps.git, checkout.path, signal);
50628
- if (status === null) return notSwitched(checkout, null, "git status failed");
50629
- if (status.branch === checkout.branch) return { kind: "on_branch" };
50630
- if (status.dirty) return notSwitched(checkout, status.branch, "it has uncommitted changes");
50623
+ const branch = await currentBranch(deps.git, checkout.path, signal);
50624
+ if (branch === checkout.branch) return { kind: "on_branch" };
50631
50625
  if (!await claimFirstLease(deps.dir, checkout.path)) {
50632
50626
  return notSwitched(
50633
50627
  checkout,
50634
- status.branch,
50628
+ branch,
50635
50629
  "an earlier conversation on this machine already uses it"
50636
50630
  );
50637
50631
  }
50638
- return await switchTo(checkout, status.branch, `checkout-${spec.runId}`, deps, signal);
50632
+ return await switchTo(checkout, branch, `checkout-${spec.runId}`, deps, signal);
50639
50633
  } catch (error62) {
50640
50634
  return noted(
50641
50635
  `could not be put on ${checkout.branch}, the branch picked for this chat`,
@@ -50666,15 +50660,13 @@ async function fastForward(freshness, operationId, deps, signal) {
50666
50660
  const attempt = await deps.locks.tryExclusive(snapshot.commonDir, operationId);
50667
50661
  if (attempt.kind === "busy") return false;
50668
50662
  const _lock = __using(_stack, attempt.lock, true);
50669
- const now = await readCheckoutStatus(deps.git, cwd, signal);
50670
- if (now === null || now.dirty || now.head !== snapshot.head || now.branch !== snapshot.branch) {
50671
- return false;
50672
- }
50673
- const git = (args) => deps.git.run({ cwd, args }, signal);
50674
- if ((await git(["switch", "--quiet", "--detach", tip])).exitCode !== 0) return false;
50675
- const moved = await git(["update-ref", `refs/heads/${snapshot.branch}`, tip, snapshot.head]);
50676
- const back = await git(["switch", "--quiet", snapshot.branch]);
50677
- return moved.exitCode === 0 && back.exitCode === 0;
50663
+ const head = await deps.git.run(
50664
+ { cwd, args: ["rev-parse", "--verify", "HEAD"], readOnly: true },
50665
+ signal
50666
+ );
50667
+ if (head.exitCode !== 0 || head.stdout.trim() !== snapshot.head) return false;
50668
+ if (await currentBranch(deps.git, cwd, signal) !== snapshot.branch) return false;
50669
+ return moveSnapshotTo(deps.git, cwd, snapshot, tip, signal);
50678
50670
  } catch (_) {
50679
50671
  var _error = _, _hasError = true;
50680
50672
  } finally {
@@ -50725,13 +50717,15 @@ async function applyRequestedCheckouts(spec, deps, signal) {
50725
50717
  const settled2 = /* @__PURE__ */ new Set();
50726
50718
  const problems = [];
50727
50719
  for (const checkout of requestedCheckoutsOf(spec, deps.log)) {
50720
+ const startedAt = Date.now();
50728
50721
  const outcome2 = await applyRequestedCheckout(checkout, spec, deps, signal);
50729
50722
  deps.log.info("workspace.requested_checkout", {
50730
50723
  runId: spec.runId,
50731
50724
  path: checkout.path,
50732
50725
  branch: checkout.branch,
50733
50726
  outcome: outcome2.kind,
50734
- ...outcome2.kind === "moved" ? { how: outcome2.how } : {}
50727
+ ...outcome2.kind === "moved" ? { how: outcome2.how } : {},
50728
+ ms: Date.now() - startedAt
50735
50729
  });
50736
50730
  if (outcome2.kind === "on_branch") continue;
50737
50731
  settled2.add((0, import_node_path24.resolve)(checkout.path));
@@ -50747,6 +50741,7 @@ async function refreshSnapshotCheckouts(spec, targets, settled2, deps, signal) {
50747
50741
  if (settled2.has((0, import_node_path24.resolve)(target))) continue;
50748
50742
  const freshness = await readCheckoutFreshness(deps.dir, target);
50749
50743
  if (freshness === null) continue;
50744
+ const startedAt = Date.now();
50750
50745
  const outcome2 = await atFirstLease(freshness, spec, deps, signal).catch(
50751
50746
  () => "noted"
50752
50747
  );
@@ -50755,7 +50750,8 @@ async function refreshSnapshotCheckouts(spec, targets, settled2, deps, signal) {
50755
50750
  runId: spec.runId,
50756
50751
  path: freshness.path,
50757
50752
  state: freshness.state,
50758
- outcome: outcome2
50753
+ outcome: outcome2,
50754
+ ms: Date.now() - startedAt
50759
50755
  });
50760
50756
  }
50761
50757
  return problems;
@@ -50782,10 +50778,10 @@ var VOLUME_ERRORS = /* @__PURE__ */ new Set([
50782
50778
  "ESTALE"
50783
50779
  ]);
50784
50780
  var MESSAGES = {
50785
- missing: "This project folder was moved or removed. Locate it before starting the run.",
50786
- permission: "Alan needs permission to access this project folder.",
50787
- volume: "The drive containing this project is unavailable. Connect it and try again.",
50788
- pinnedMissing: "This run must use exactly this project folder, and it was moved or removed. Restore it or choose another folder.",
50781
+ missing: "This folder was moved or removed. Locate it before starting the run.",
50782
+ permission: "Alan needs permission to access this folder.",
50783
+ volume: "The drive containing this folder is unavailable. Connect it and try again.",
50784
+ pinnedMissing: "This run must use exactly this folder, and it was moved or removed. Restore it or choose another folder.",
50789
50785
  notApproved: "This folder is not one of the workspaces approved on this computer."
50790
50786
  };
50791
50787
  function rejected(rejection, message) {
@@ -50816,7 +50812,7 @@ async function inspectReadiness(path) {
50816
50812
  if (!(await (0, import_promises35.stat)(path)).isDirectory()) {
50817
50813
  return { ready: false, missing: true, message: MESSAGES.missing };
50818
50814
  }
50819
- await (0, import_promises35.access)(path, import_node_fs10.constants.R_OK | import_node_fs10.constants.W_OK | import_node_fs10.constants.X_OK);
50815
+ await (0, import_promises35.access)(path, import_node_fs9.constants.R_OK | import_node_fs9.constants.W_OK | import_node_fs9.constants.X_OK);
50820
50816
  return { ready: true };
50821
50817
  } catch (error62) {
50822
50818
  const code = errnoCode(error62) ?? "";
@@ -50861,7 +50857,7 @@ async function admitDefaultWorkspace(spec, context, skills) {
50861
50857
  const path = resolveAlanDefaultWorkspacePath(env.HOME || env.USERPROFILE || (0, import_node_os6.homedir)());
50862
50858
  try {
50863
50859
  await (0, import_promises35.mkdir)(path, { recursive: true, mode: 448 });
50864
- await (0, import_promises35.access)(path, import_node_fs10.constants.R_OK | import_node_fs10.constants.W_OK | import_node_fs10.constants.X_OK);
50860
+ await (0, import_promises35.access)(path, import_node_fs9.constants.R_OK | import_node_fs9.constants.W_OK | import_node_fs9.constants.X_OK);
50865
50861
  return { kind: "admitted", spec: { ...spec, projectPath: path }, skills };
50866
50862
  } catch (error62) {
50867
50863
  const code = errnoCode(error62);
@@ -51200,13 +51196,13 @@ function runEnded(input2) {
51200
51196
  var decoder = new TextDecoder();
51201
51197
 
51202
51198
  // src/run-log/writer.ts
51203
- var import_node_fs11 = require("fs");
51199
+ var import_node_fs10 = require("fs");
51204
51200
  var import_node_path28 = require("path");
51205
51201
  init_runtime_v2();
51206
51202
  function lastSeq(fd, size) {
51207
51203
  for (const length of tailWindows(size)) {
51208
51204
  const buffer = Buffer.alloc(length);
51209
- (0, import_node_fs11.readSync)(fd, buffer, 0, length, size - length);
51205
+ (0, import_node_fs10.readSync)(fd, buffer, 0, length, size - length);
51210
51206
  const last = lastLine(buffer.toString("utf8").trimEnd(), length === size);
51211
51207
  if (last === void 0) continue;
51212
51208
  if (last.length === 0) return 0;
@@ -51217,13 +51213,13 @@ function lastSeq(fd, size) {
51217
51213
  throw new RuntimeFault("record_too_large", "Run log tail record is larger than any record");
51218
51214
  }
51219
51215
  function openRunLog(path, clock) {
51220
- (0, import_node_fs11.mkdirSync)((0, import_node_path28.dirname)(path), { recursive: true, mode: 448 });
51221
- const fd = (0, import_node_fs11.openSync)(path, "a+", 384);
51222
- let size = (0, import_node_fs11.fstatSync)(fd).size;
51216
+ (0, import_node_fs10.mkdirSync)((0, import_node_path28.dirname)(path), { recursive: true, mode: 448 });
51217
+ const fd = (0, import_node_fs10.openSync)(path, "a+", 384);
51218
+ let size = (0, import_node_fs10.fstatSync)(fd).size;
51223
51219
  let seq = lastSeq(fd, size);
51224
51220
  let dirty = false;
51225
51221
  const sync = () => {
51226
- (0, import_node_fs11.fsyncSync)(fd);
51222
+ (0, import_node_fs10.fsyncSync)(fd);
51227
51223
  dirty = false;
51228
51224
  };
51229
51225
  return {
@@ -51237,7 +51233,7 @@ function openRunLog(path, clock) {
51237
51233
  };
51238
51234
  const line = Buffer.from(`${JSON.stringify(record2)}
51239
51235
  `, "utf8");
51240
- (0, import_node_fs11.writeSync)(fd, line);
51236
+ (0, import_node_fs10.writeSync)(fd, line);
51241
51237
  size += line.length;
51242
51238
  dirty = true;
51243
51239
  if (isRunLifecycleKind(update.sessionUpdate)) sync();
@@ -51249,7 +51245,7 @@ function openRunLog(path, clock) {
51249
51245
  },
51250
51246
  [Symbol.dispose]: () => {
51251
51247
  if (dirty) sync();
51252
- (0, import_node_fs11.closeSync)(fd);
51248
+ (0, import_node_fs10.closeSync)(fd);
51253
51249
  }
51254
51250
  };
51255
51251
  }
@@ -51690,7 +51686,7 @@ async function runHolder({
51690
51686
  for (const client of holder.clients) client.end();
51691
51687
  await new Promise((resolve8) => server.close(() => resolve8()));
51692
51688
  await statusWrites;
51693
- (0, import_node_fs12.rmSync)(launch.statusPath, { force: true });
51689
+ (0, import_node_fs11.rmSync)(launch.statusPath, { force: true });
51694
51690
  log.info("holder.suspended", { conversationId: launch.conversationId });
51695
51691
  } catch (_) {
51696
51692
  var _error = _, _hasError = true;