open-agents-ai 0.103.10 → 0.103.12

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 (2) hide show
  1. package/dist/index.js +615 -472
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  mod
40
40
  ));
41
41
 
42
- // packages/cli/dist/config.js
42
+ // ../packages/cli/dist/config.js
43
43
  import { readFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
44
44
  import { homedir } from "node:os";
45
45
  import { join } from "node:path";
@@ -126,7 +126,7 @@ function coerceConfigValue(key, value) {
126
126
  }
127
127
  var DEFAULT_CONFIG, VALID_BACKEND_TYPES;
128
128
  var init_config = __esm({
129
- "packages/cli/dist/config.js"() {
129
+ "../packages/cli/dist/config.js"() {
130
130
  "use strict";
131
131
  DEFAULT_CONFIG = Object.freeze({
132
132
  backendUrl: "http://127.0.0.1:11434",
@@ -143,7 +143,7 @@ var init_config = __esm({
143
143
  }
144
144
  });
145
145
 
146
- // packages/cli/dist/ui/output.js
146
+ // ../packages/cli/dist/ui/output.js
147
147
  function ansi(code, text, tty) {
148
148
  return tty ? `\x1B[${code}m${text}\x1B[0m` : text;
149
149
  }
@@ -222,7 +222,7 @@ function printReport(opts) {
222
222
  }
223
223
  var isTTY, isStderrTTY, c, STATUS_ICON, STATUS_COLOR;
224
224
  var init_output = __esm({
225
- "packages/cli/dist/ui/output.js"() {
225
+ "../packages/cli/dist/ui/output.js"() {
226
226
  "use strict";
227
227
  isTTY = process.stdout.isTTY;
228
228
  isStderrTTY = process.stderr.isTTY;
@@ -254,7 +254,7 @@ var init_output = __esm({
254
254
  }
255
255
  });
256
256
 
257
- // packages/cli/dist/updater.js
257
+ // ../packages/cli/dist/updater.js
258
258
  import { execSync } from "node:child_process";
259
259
  import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
260
260
  import { join as join2 } from "node:path";
@@ -362,7 +362,7 @@ function formatUpdateBanner(info) {
362
362
  }
363
363
  var PACKAGE_NAME, CHECK_INTERVAL_MS, CACHE_DIR, CACHE_FILE;
364
364
  var init_updater = __esm({
365
- "packages/cli/dist/updater.js"() {
365
+ "../packages/cli/dist/updater.js"() {
366
366
  "use strict";
367
367
  PACKAGE_NAME = "open-agents-ai";
368
368
  CHECK_INTERVAL_MS = 60 * 60 * 1e3;
@@ -371,10 +371,10 @@ var init_updater = __esm({
371
371
  }
372
372
  });
373
373
 
374
- // packages/cli/dist/ui/spinner.js
374
+ // ../packages/cli/dist/ui/spinner.js
375
375
  var FRAMES, INTERVAL_MS, Spinner;
376
376
  var init_spinner = __esm({
377
- "packages/cli/dist/ui/spinner.js"() {
377
+ "../packages/cli/dist/ui/spinner.js"() {
378
378
  "use strict";
379
379
  FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
380
380
  INTERVAL_MS = 80;
@@ -472,10 +472,10 @@ var init_spinner = __esm({
472
472
  }
473
473
  });
474
474
 
475
- // packages/backend-vllm/dist/sleep.js
475
+ // ../packages/backend-vllm/dist/sleep.js
476
476
  var SleepManager;
477
477
  var init_sleep = __esm({
478
- "packages/backend-vllm/dist/sleep.js"() {
478
+ "../packages/backend-vllm/dist/sleep.js"() {
479
479
  "use strict";
480
480
  SleepManager = class {
481
481
  baseUrl;
@@ -551,7 +551,7 @@ var init_sleep = __esm({
551
551
  }
552
552
  });
553
553
 
554
- // packages/backend-vllm/dist/normalizeUrl.js
554
+ // ../packages/backend-vllm/dist/normalizeUrl.js
555
555
  function normalizeBaseUrl(url) {
556
556
  let u = url.trim();
557
557
  u = u.replace(/\/+$/, "");
@@ -583,7 +583,7 @@ function detectProvider(url) {
583
583
  }
584
584
  var PROVIDERS;
585
585
  var init_normalizeUrl = __esm({
586
- "packages/backend-vllm/dist/normalizeUrl.js"() {
586
+ "../packages/backend-vllm/dist/normalizeUrl.js"() {
587
587
  "use strict";
588
588
  PROVIDERS = [
589
589
  // --- Cloud providers (specific domains) ---
@@ -652,7 +652,7 @@ var init_normalizeUrl = __esm({
652
652
  }
653
653
  });
654
654
 
655
- // packages/backend-vllm/dist/VllmBackend.js
655
+ // ../packages/backend-vllm/dist/VllmBackend.js
656
656
  function agentMessageToChatMessage(msg) {
657
657
  return {
658
658
  role: msg.role,
@@ -664,7 +664,7 @@ function buildEmptyUsage() {
664
664
  }
665
665
  var VllmBackend;
666
666
  var init_VllmBackend = __esm({
667
- "packages/backend-vllm/dist/VllmBackend.js"() {
667
+ "../packages/backend-vllm/dist/VllmBackend.js"() {
668
668
  "use strict";
669
669
  init_sleep();
670
670
  init_normalizeUrl();
@@ -807,7 +807,7 @@ var init_VllmBackend = __esm({
807
807
  }
808
808
  });
809
809
 
810
- // packages/backend-vllm/dist/OllamaBackend.js
810
+ // ../packages/backend-vllm/dist/OllamaBackend.js
811
811
  function agentMessageToChatMessage2(msg) {
812
812
  return {
813
813
  role: msg.role,
@@ -819,7 +819,7 @@ function buildEmptyUsage2() {
819
819
  }
820
820
  var OllamaBackend;
821
821
  var init_OllamaBackend = __esm({
822
- "packages/backend-vllm/dist/OllamaBackend.js"() {
822
+ "../packages/backend-vllm/dist/OllamaBackend.js"() {
823
823
  "use strict";
824
824
  init_normalizeUrl();
825
825
  OllamaBackend = class _OllamaBackend {
@@ -998,7 +998,7 @@ var init_OllamaBackend = __esm({
998
998
  }
999
999
  });
1000
1000
 
1001
- // packages/backend-vllm/dist/FakeBackend.js
1001
+ // ../packages/backend-vllm/dist/FakeBackend.js
1002
1002
  function fnv1a32(input) {
1003
1003
  const FNV_PRIME = 16777619;
1004
1004
  const FNV_OFFSET_BASIS = 2166136261;
@@ -1011,7 +1011,7 @@ function fnv1a32(input) {
1011
1011
  }
1012
1012
  var FakeBackend;
1013
1013
  var init_FakeBackend = __esm({
1014
- "packages/backend-vllm/dist/FakeBackend.js"() {
1014
+ "../packages/backend-vllm/dist/FakeBackend.js"() {
1015
1015
  "use strict";
1016
1016
  FakeBackend = class {
1017
1017
  options;
@@ -1111,7 +1111,7 @@ var init_FakeBackend = __esm({
1111
1111
  }
1112
1112
  });
1113
1113
 
1114
- // packages/backend-vllm/dist/backendFactory.js
1114
+ // ../packages/backend-vllm/dist/backendFactory.js
1115
1115
  function detectBackendType(baseUrl) {
1116
1116
  if (!baseUrl) {
1117
1117
  return "ollama";
@@ -1150,7 +1150,7 @@ function createBackend(opts) {
1150
1150
  }
1151
1151
  }
1152
1152
  var init_backendFactory = __esm({
1153
- "packages/backend-vllm/dist/backendFactory.js"() {
1153
+ "../packages/backend-vllm/dist/backendFactory.js"() {
1154
1154
  "use strict";
1155
1155
  init_OllamaBackend();
1156
1156
  init_VllmBackend();
@@ -1158,7 +1158,7 @@ var init_backendFactory = __esm({
1158
1158
  }
1159
1159
  });
1160
1160
 
1161
- // packages/backend-vllm/dist/metrics.js
1161
+ // ../packages/backend-vllm/dist/metrics.js
1162
1162
  function parseMetricValue(prometheusText, metricName) {
1163
1163
  const lines = prometheusText.split("\n");
1164
1164
  for (const line of lines) {
@@ -1179,7 +1179,7 @@ function parseMetricValue(prometheusText, metricName) {
1179
1179
  }
1180
1180
  var MetricsCollector;
1181
1181
  var init_metrics = __esm({
1182
- "packages/backend-vllm/dist/metrics.js"() {
1182
+ "../packages/backend-vllm/dist/metrics.js"() {
1183
1183
  "use strict";
1184
1184
  MetricsCollector = class {
1185
1185
  metricsUrl;
@@ -1234,16 +1234,16 @@ var init_metrics = __esm({
1234
1234
  }
1235
1235
  });
1236
1236
 
1237
- // packages/backend-vllm/dist/routing.js
1237
+ // ../packages/backend-vllm/dist/routing.js
1238
1238
  var init_routing = __esm({
1239
- "packages/backend-vllm/dist/routing.js"() {
1239
+ "../packages/backend-vllm/dist/routing.js"() {
1240
1240
  "use strict";
1241
1241
  }
1242
1242
  });
1243
1243
 
1244
- // packages/backend-vllm/dist/index.js
1244
+ // ../packages/backend-vllm/dist/index.js
1245
1245
  var init_dist = __esm({
1246
- "packages/backend-vllm/dist/index.js"() {
1246
+ "../packages/backend-vllm/dist/index.js"() {
1247
1247
  "use strict";
1248
1248
  init_VllmBackend();
1249
1249
  init_OllamaBackend();
@@ -1256,18 +1256,18 @@ var init_dist = __esm({
1256
1256
  }
1257
1257
  });
1258
1258
 
1259
- // packages/execution/dist/tool-executor.js
1259
+ // ../packages/execution/dist/tool-executor.js
1260
1260
  var init_tool_executor = __esm({
1261
- "packages/execution/dist/tool-executor.js"() {
1261
+ "../packages/execution/dist/tool-executor.js"() {
1262
1262
  "use strict";
1263
1263
  }
1264
1264
  });
1265
1265
 
1266
- // packages/execution/dist/tools/shell.js
1266
+ // ../packages/execution/dist/tools/shell.js
1267
1267
  import { spawn } from "node:child_process";
1268
1268
  var PERMISSION_ERROR_RE, ShellTool;
1269
1269
  var init_shell = __esm({
1270
- "packages/execution/dist/tools/shell.js"() {
1270
+ "../packages/execution/dist/tools/shell.js"() {
1271
1271
  "use strict";
1272
1272
  PERMISSION_ERROR_RE = /Permission denied|Operation not permitted|EACCES|EPERM|PermissionError|sudo:|not permitted|password is required|authentication failure/i;
1273
1273
  ShellTool = class {
@@ -1464,7 +1464,7 @@ ${stderr}` : ""),
1464
1464
  }
1465
1465
  });
1466
1466
 
1467
- // packages/execution/dist/tools/file-read.js
1467
+ // ../packages/execution/dist/tools/file-read.js
1468
1468
  import { readFile } from "node:fs/promises";
1469
1469
  import { resolve } from "node:path";
1470
1470
  function extractPath(args) {
@@ -1493,7 +1493,7 @@ function extractPath(args) {
1493
1493
  }
1494
1494
  var FileReadTool;
1495
1495
  var init_file_read = __esm({
1496
- "packages/execution/dist/tools/file-read.js"() {
1496
+ "../packages/execution/dist/tools/file-read.js"() {
1497
1497
  "use strict";
1498
1498
  FileReadTool = class {
1499
1499
  name = "file_read";
@@ -1581,7 +1581,7 @@ var init_file_read = __esm({
1581
1581
  }
1582
1582
  });
1583
1583
 
1584
- // packages/execution/dist/tools/file-write.js
1584
+ // ../packages/execution/dist/tools/file-write.js
1585
1585
  import { writeFile, mkdir } from "node:fs/promises";
1586
1586
  import { resolve as resolve2, dirname } from "node:path";
1587
1587
  function extractWritePath(args) {
@@ -1594,7 +1594,7 @@ function extractWritePath(args) {
1594
1594
  }
1595
1595
  var FileWriteTool;
1596
1596
  var init_file_write = __esm({
1597
- "packages/execution/dist/tools/file-write.js"() {
1597
+ "../packages/execution/dist/tools/file-write.js"() {
1598
1598
  "use strict";
1599
1599
  FileWriteTool = class {
1600
1600
  name = "file_write";
@@ -1653,13 +1653,13 @@ var init_file_write = __esm({
1653
1653
  }
1654
1654
  });
1655
1655
 
1656
- // packages/execution/dist/tools/grep-search.js
1656
+ // ../packages/execution/dist/tools/grep-search.js
1657
1657
  import { execFile } from "node:child_process";
1658
1658
  import { promisify } from "node:util";
1659
1659
  import { resolve as resolve3 } from "node:path";
1660
1660
  var execFileAsync, MAX_OUTPUT_LINES, GrepSearchTool;
1661
1661
  var init_grep_search = __esm({
1662
- "packages/execution/dist/tools/grep-search.js"() {
1662
+ "../packages/execution/dist/tools/grep-search.js"() {
1663
1663
  "use strict";
1664
1664
  execFileAsync = promisify(execFile);
1665
1665
  MAX_OUTPUT_LINES = 100;
@@ -1758,13 +1758,13 @@ var init_grep_search = __esm({
1758
1758
  }
1759
1759
  });
1760
1760
 
1761
- // packages/execution/dist/tools/glob-find.js
1761
+ // ../packages/execution/dist/tools/glob-find.js
1762
1762
  import { execFile as execFile2 } from "node:child_process";
1763
1763
  import { promisify as promisify2 } from "node:util";
1764
1764
  import { resolve as resolve4 } from "node:path";
1765
1765
  var execFileAsync2, MAX_RESULTS, GlobFindTool;
1766
1766
  var init_glob_find = __esm({
1767
- "packages/execution/dist/tools/glob-find.js"() {
1767
+ "../packages/execution/dist/tools/glob-find.js"() {
1768
1768
  "use strict";
1769
1769
  execFileAsync2 = promisify2(execFile2);
1770
1770
  MAX_RESULTS = 50;
@@ -1835,10 +1835,10 @@ var init_glob_find = __esm({
1835
1835
  }
1836
1836
  });
1837
1837
 
1838
- // packages/execution/dist/tools/web-fetch.js
1838
+ // ../packages/execution/dist/tools/web-fetch.js
1839
1839
  var DEFAULT_MAX_LENGTH, WebFetchTool;
1840
1840
  var init_web_fetch = __esm({
1841
- "packages/execution/dist/tools/web-fetch.js"() {
1841
+ "../packages/execution/dist/tools/web-fetch.js"() {
1842
1842
  "use strict";
1843
1843
  DEFAULT_MAX_LENGTH = 5e3;
1844
1844
  WebFetchTool = class {
@@ -1910,7 +1910,7 @@ var init_web_fetch = __esm({
1910
1910
  }
1911
1911
  });
1912
1912
 
1913
- // packages/execution/dist/tools/web-search.js
1913
+ // ../packages/execution/dist/tools/web-search.js
1914
1914
  function detectSearchProvider() {
1915
1915
  if (process.env["TAVILY_API_KEY"])
1916
1916
  return "tavily";
@@ -1920,7 +1920,7 @@ function detectSearchProvider() {
1920
1920
  }
1921
1921
  var DEFAULT_NUM_RESULTS, DUCKDUCKGO_HTML_URL, TAVILY_API_URL, JINA_SEARCH_URL, WebSearchTool;
1922
1922
  var init_web_search = __esm({
1923
- "packages/execution/dist/tools/web-search.js"() {
1923
+ "../packages/execution/dist/tools/web-search.js"() {
1924
1924
  "use strict";
1925
1925
  DEFAULT_NUM_RESULTS = 5;
1926
1926
  DUCKDUCKGO_HTML_URL = "https://html.duckduckgo.com/html/";
@@ -2184,14 +2184,14 @@ ${formatted}`,
2184
2184
  }
2185
2185
  });
2186
2186
 
2187
- // packages/execution/dist/tools/web-crawl.js
2187
+ // ../packages/execution/dist/tools/web-crawl.js
2188
2188
  import { execFile as execFile3 } from "node:child_process";
2189
2189
  import { dirname as dirname2, join as join3 } from "node:path";
2190
2190
  import { fileURLToPath } from "node:url";
2191
2191
  import { existsSync as existsSync3 } from "node:fs";
2192
2192
  var DEFAULT_MAX_LENGTH2, WebCrawlTool;
2193
2193
  var init_web_crawl = __esm({
2194
- "packages/execution/dist/tools/web-crawl.js"() {
2194
+ "../packages/execution/dist/tools/web-crawl.js"() {
2195
2195
  "use strict";
2196
2196
  DEFAULT_MAX_LENGTH2 = 8e3;
2197
2197
  WebCrawlTool = class {
@@ -2465,7 +2465,7 @@ Meta: ${metaKeys.map((k) => `${k}="${meta[k]?.slice(0, 80)}"`).join(", ")}`);
2465
2465
  }
2466
2466
  });
2467
2467
 
2468
- // packages/execution/dist/tools/file-edit.js
2468
+ // ../packages/execution/dist/tools/file-edit.js
2469
2469
  import { readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
2470
2470
  import { resolve as resolve5 } from "node:path";
2471
2471
  function extractEditPath(args) {
@@ -2500,7 +2500,7 @@ function replaceAllOccurrences(haystack, needle, replacement) {
2500
2500
  }
2501
2501
  var FileEditTool;
2502
2502
  var init_file_edit = __esm({
2503
- "packages/execution/dist/tools/file-edit.js"() {
2503
+ "../packages/execution/dist/tools/file-edit.js"() {
2504
2504
  "use strict";
2505
2505
  FileEditTool = class {
2506
2506
  name = "file_edit";
@@ -2610,12 +2610,12 @@ var init_file_edit = __esm({
2610
2610
  }
2611
2611
  });
2612
2612
 
2613
- // packages/execution/dist/tools/memory-read.js
2613
+ // ../packages/execution/dist/tools/memory-read.js
2614
2614
  import { readFile as readFile3 } from "node:fs/promises";
2615
2615
  import { resolve as resolve6, join as join4 } from "node:path";
2616
2616
  var MemoryReadTool;
2617
2617
  var init_memory_read = __esm({
2618
- "packages/execution/dist/tools/memory-read.js"() {
2618
+ "../packages/execution/dist/tools/memory-read.js"() {
2619
2619
  "use strict";
2620
2620
  MemoryReadTool = class {
2621
2621
  name = "memory_read";
@@ -2705,13 +2705,13 @@ ${JSON.stringify(entries, null, 2)}`,
2705
2705
  }
2706
2706
  });
2707
2707
 
2708
- // packages/execution/dist/tools/memory-write.js
2708
+ // ../packages/execution/dist/tools/memory-write.js
2709
2709
  import { readFile as readFile4, writeFile as writeFile3, mkdir as mkdir2 } from "node:fs/promises";
2710
2710
  import { resolve as resolve7, join as join5 } from "node:path";
2711
2711
  import { randomBytes } from "node:crypto";
2712
2712
  var MemoryWriteTool;
2713
2713
  var init_memory_write = __esm({
2714
- "packages/execution/dist/tools/memory-write.js"() {
2714
+ "../packages/execution/dist/tools/memory-write.js"() {
2715
2715
  "use strict";
2716
2716
  MemoryWriteTool = class {
2717
2717
  name = "memory_write";
@@ -2796,7 +2796,7 @@ var init_memory_write = __esm({
2796
2796
  }
2797
2797
  });
2798
2798
 
2799
- // packages/execution/dist/tools/memory-search.js
2799
+ // ../packages/execution/dist/tools/memory-search.js
2800
2800
  import { readFile as readFile5, readdir } from "node:fs/promises";
2801
2801
  import { resolve as resolve8, join as join6, basename } from "node:path";
2802
2802
  import { existsSync as existsSync4 } from "node:fs";
@@ -2902,7 +2902,7 @@ function tokenize(text) {
2902
2902
  }
2903
2903
  var MemorySearchTool;
2904
2904
  var init_memory_search = __esm({
2905
- "packages/execution/dist/tools/memory-search.js"() {
2905
+ "../packages/execution/dist/tools/memory-search.js"() {
2906
2906
  "use strict";
2907
2907
  MemorySearchTool = class {
2908
2908
  name = "memory_search";
@@ -3026,10 +3026,10 @@ Try broader terms or use memory_read with a specific topic.`,
3026
3026
  }
3027
3027
  });
3028
3028
 
3029
- // packages/execution/dist/tools/explore-tools.js
3029
+ // ../packages/execution/dist/tools/explore-tools.js
3030
3030
  var TOOL_CATALOG, ExploreToolsTool;
3031
3031
  var init_explore_tools = __esm({
3032
- "packages/execution/dist/tools/explore-tools.js"() {
3032
+ "../packages/execution/dist/tools/explore-tools.js"() {
3033
3033
  "use strict";
3034
3034
  TOOL_CATALOG = {
3035
3035
  grep_search: "Search file contents with regex patterns",
@@ -3193,12 +3193,12 @@ Examples:`);
3193
3193
  }
3194
3194
  });
3195
3195
 
3196
- // packages/execution/dist/tools/list-directory.js
3196
+ // ../packages/execution/dist/tools/list-directory.js
3197
3197
  import { readdirSync, statSync } from "node:fs";
3198
3198
  import { resolve as resolve9, join as join7 } from "node:path";
3199
3199
  var EXCLUDED, MAX_ENTRIES, ListDirectoryTool;
3200
3200
  var init_list_directory = __esm({
3201
- "packages/execution/dist/tools/list-directory.js"() {
3201
+ "../packages/execution/dist/tools/list-directory.js"() {
3202
3202
  "use strict";
3203
3203
  EXCLUDED = /* @__PURE__ */ new Set(["node_modules", ".git"]);
3204
3204
  MAX_ENTRIES = 100;
@@ -3280,11 +3280,11 @@ var init_list_directory = __esm({
3280
3280
  }
3281
3281
  });
3282
3282
 
3283
- // packages/execution/dist/tools/aiwg-setup.js
3283
+ // ../packages/execution/dist/tools/aiwg-setup.js
3284
3284
  import { execSync as execSync2 } from "node:child_process";
3285
3285
  var AiwgSetupTool;
3286
3286
  var init_aiwg_setup = __esm({
3287
- "packages/execution/dist/tools/aiwg-setup.js"() {
3287
+ "../packages/execution/dist/tools/aiwg-setup.js"() {
3288
3288
  "use strict";
3289
3289
  AiwgSetupTool = class {
3290
3290
  name = "aiwg_setup";
@@ -3358,13 +3358,13 @@ ${output}`,
3358
3358
  }
3359
3359
  });
3360
3360
 
3361
- // packages/execution/dist/tools/aiwg-health.js
3361
+ // ../packages/execution/dist/tools/aiwg-health.js
3362
3362
  import { execSync as execSync3 } from "node:child_process";
3363
3363
  import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync3, statSync as statSync2 } from "node:fs";
3364
3364
  import { join as join8 } from "node:path";
3365
3365
  var AiwgHealthTool;
3366
3366
  var init_aiwg_health = __esm({
3367
- "packages/execution/dist/tools/aiwg-health.js"() {
3367
+ "../packages/execution/dist/tools/aiwg-health.js"() {
3368
3368
  "use strict";
3369
3369
  AiwgHealthTool = class {
3370
3370
  name = "aiwg_health";
@@ -3570,11 +3570,11 @@ var init_aiwg_health = __esm({
3570
3570
  }
3571
3571
  });
3572
3572
 
3573
- // packages/execution/dist/tools/aiwg-workflow.js
3573
+ // ../packages/execution/dist/tools/aiwg-workflow.js
3574
3574
  import { execSync as execSync4 } from "node:child_process";
3575
3575
  var AiwgWorkflowTool;
3576
3576
  var init_aiwg_workflow = __esm({
3577
- "packages/execution/dist/tools/aiwg-workflow.js"() {
3577
+ "../packages/execution/dist/tools/aiwg-workflow.js"() {
3578
3578
  "use strict";
3579
3579
  AiwgWorkflowTool = class {
3580
3580
  name = "aiwg_workflow";
@@ -3655,7 +3655,7 @@ var init_aiwg_workflow = __esm({
3655
3655
  }
3656
3656
  });
3657
3657
 
3658
- // packages/execution/dist/tools/batch-edit.js
3658
+ // ../packages/execution/dist/tools/batch-edit.js
3659
3659
  import { readFile as readFile6, writeFile as writeFile4 } from "node:fs/promises";
3660
3660
  import { resolve as resolve10 } from "node:path";
3661
3661
  function countOccurrences2(haystack, needle) {
@@ -3669,7 +3669,7 @@ function countOccurrences2(haystack, needle) {
3669
3669
  }
3670
3670
  var BatchEditTool;
3671
3671
  var init_batch_edit = __esm({
3672
- "packages/execution/dist/tools/batch-edit.js"() {
3672
+ "../packages/execution/dist/tools/batch-edit.js"() {
3673
3673
  "use strict";
3674
3674
  BatchEditTool = class {
3675
3675
  name = "batch_edit";
@@ -3781,12 +3781,12 @@ ${results.join("\n")}`,
3781
3781
  }
3782
3782
  });
3783
3783
 
3784
- // packages/execution/dist/tools/file-patch.js
3784
+ // ../packages/execution/dist/tools/file-patch.js
3785
3785
  import { readFile as readFile7, writeFile as writeFile5, copyFile } from "node:fs/promises";
3786
3786
  import { resolve as resolve11 } from "node:path";
3787
3787
  var FilePatchTool;
3788
3788
  var init_file_patch = __esm({
3789
- "packages/execution/dist/tools/file-patch.js"() {
3789
+ "../packages/execution/dist/tools/file-patch.js"() {
3790
3790
  "use strict";
3791
3791
  FilePatchTool = class {
3792
3792
  name = "file_patch";
@@ -3953,12 +3953,12 @@ ${diff}`,
3953
3953
  }
3954
3954
  });
3955
3955
 
3956
- // packages/execution/dist/tools/codebase-map.js
3956
+ // ../packages/execution/dist/tools/codebase-map.js
3957
3957
  import { readdirSync as readdirSync3, statSync as statSync3, readFileSync as readFileSync4, existsSync as existsSync6 } from "node:fs";
3958
3958
  import { join as join9, relative, extname } from "node:path";
3959
3959
  var CodebaseMapTool;
3960
3960
  var init_codebase_map = __esm({
3961
- "packages/execution/dist/tools/codebase-map.js"() {
3961
+ "../packages/execution/dist/tools/codebase-map.js"() {
3962
3962
  "use strict";
3963
3963
  CodebaseMapTool = class {
3964
3964
  name = "codebase_map";
@@ -4241,13 +4241,13 @@ var init_codebase_map = __esm({
4241
4241
  }
4242
4242
  });
4243
4243
 
4244
- // packages/execution/dist/tools/diagnostic.js
4244
+ // ../packages/execution/dist/tools/diagnostic.js
4245
4245
  import { execSync as execSync5 } from "node:child_process";
4246
4246
  import { existsSync as existsSync7, readFileSync as readFileSync5 } from "node:fs";
4247
4247
  import { join as join10 } from "node:path";
4248
4248
  var DiagnosticTool;
4249
4249
  var init_diagnostic = __esm({
4250
- "packages/execution/dist/tools/diagnostic.js"() {
4250
+ "../packages/execution/dist/tools/diagnostic.js"() {
4251
4251
  "use strict";
4252
4252
  DiagnosticTool = class {
4253
4253
  name = "diagnostic";
@@ -4386,13 +4386,13 @@ ${err.stderr ?? ""}`.trim(),
4386
4386
  }
4387
4387
  });
4388
4388
 
4389
- // packages/execution/dist/tools/git-info.js
4389
+ // ../packages/execution/dist/tools/git-info.js
4390
4390
  import { execSync as execSync6 } from "node:child_process";
4391
4391
  import { existsSync as existsSync8 } from "node:fs";
4392
4392
  import { join as join11 } from "node:path";
4393
4393
  var GitInfoTool;
4394
4394
  var init_git_info = __esm({
4395
- "packages/execution/dist/tools/git-info.js"() {
4395
+ "../packages/execution/dist/tools/git-info.js"() {
4396
4396
  "use strict";
4397
4397
  GitInfoTool = class {
4398
4398
  name = "git_info";
@@ -4517,7 +4517,7 @@ var init_git_info = __esm({
4517
4517
  }
4518
4518
  });
4519
4519
 
4520
- // packages/execution/dist/tools/background-task.js
4520
+ // ../packages/execution/dist/tools/background-task.js
4521
4521
  import { spawn as spawn2 } from "node:child_process";
4522
4522
  function toInfo(entry) {
4523
4523
  return {
@@ -4533,7 +4533,7 @@ function toInfo(entry) {
4533
4533
  }
4534
4534
  var BackgroundTaskManager, BackgroundRunTool, TaskStatusTool, TaskOutputTool, TaskStopTool;
4535
4535
  var init_background_task = __esm({
4536
- "packages/execution/dist/tools/background-task.js"() {
4536
+ "../packages/execution/dist/tools/background-task.js"() {
4537
4537
  "use strict";
4538
4538
  BackgroundTaskManager = class {
4539
4539
  tasks = /* @__PURE__ */ new Map();
@@ -4805,7 +4805,7 @@ Exit code: ${task.exitCode ?? "N/A"}`,
4805
4805
  }
4806
4806
  });
4807
4807
 
4808
- // packages/execution/dist/system-deps.js
4808
+ // ../packages/execution/dist/system-deps.js
4809
4809
  import { execSync as execSync7 } from "node:child_process";
4810
4810
  function detectPackageManager() {
4811
4811
  if (_detectedPkgManager !== void 0)
@@ -4946,7 +4946,7 @@ function ensureCommand(command) {
4946
4946
  }
4947
4947
  var DESKTOP_DEPS, _detectedPkgManager, _cache, _sudoPassword;
4948
4948
  var init_system_deps = __esm({
4949
- "packages/execution/dist/system-deps.js"() {
4949
+ "../packages/execution/dist/system-deps.js"() {
4950
4950
  "use strict";
4951
4951
  DESKTOP_DEPS = [
4952
4952
  {
@@ -4997,7 +4997,7 @@ var init_system_deps = __esm({
4997
4997
  }
4998
4998
  });
4999
4999
 
5000
- // packages/execution/dist/tools/image.js
5000
+ // ../packages/execution/dist/tools/image.js
5001
5001
  import { existsSync as existsSync9, readFileSync as readFileSync6, statSync as statSync4 } from "node:fs";
5002
5002
  import { resolve as resolve12, extname as extname2, basename as basename2 } from "node:path";
5003
5003
  import { execSync as execSync8 } from "node:child_process";
@@ -5086,7 +5086,7 @@ function runOCR(filePath) {
5086
5086
  }
5087
5087
  var IMAGE_EXTENSIONS, ImageReadTool, ScreenshotTool, OCRTool;
5088
5088
  var init_image = __esm({
5089
- "packages/execution/dist/tools/image.js"() {
5089
+ "../packages/execution/dist/tools/image.js"() {
5090
5090
  "use strict";
5091
5091
  init_system_deps();
5092
5092
  IMAGE_EXTENSIONS = /* @__PURE__ */ new Set([
@@ -5376,7 +5376,7 @@ ${text}`,
5376
5376
  }
5377
5377
  });
5378
5378
 
5379
- // packages/execution/dist/tools/custom-tool.js
5379
+ // ../packages/execution/dist/tools/custom-tool.js
5380
5380
  var custom_tool_exports = {};
5381
5381
  __export(custom_tool_exports, {
5382
5382
  CustomTool: () => CustomTool,
@@ -5479,7 +5479,7 @@ function loadFromDirectory(dir) {
5479
5479
  }
5480
5480
  var CustomTool;
5481
5481
  var init_custom_tool = __esm({
5482
- "packages/execution/dist/tools/custom-tool.js"() {
5482
+ "../packages/execution/dist/tools/custom-tool.js"() {
5483
5483
  "use strict";
5484
5484
  CustomTool = class {
5485
5485
  name;
@@ -5588,10 +5588,10 @@ ${stderr}` : ""),
5588
5588
  }
5589
5589
  });
5590
5590
 
5591
- // packages/execution/dist/tools/tool-creator.js
5591
+ // ../packages/execution/dist/tools/tool-creator.js
5592
5592
  var CreateToolTool, ManageToolsTool;
5593
5593
  var init_tool_creator = __esm({
5594
- "packages/execution/dist/tools/tool-creator.js"() {
5594
+ "../packages/execution/dist/tools/tool-creator.js"() {
5595
5595
  "use strict";
5596
5596
  init_custom_tool();
5597
5597
  CreateToolTool = class {
@@ -5882,7 +5882,7 @@ var init_tool_creator = __esm({
5882
5882
  }
5883
5883
  });
5884
5884
 
5885
- // packages/execution/dist/tools/skill-tools.js
5885
+ // ../packages/execution/dist/tools/skill-tools.js
5886
5886
  import { existsSync as existsSync11, readdirSync as readdirSync5, readFileSync as readFileSync8 } from "node:fs";
5887
5887
  import { join as join14, basename as basename3, dirname as dirname3 } from "node:path";
5888
5888
  import { homedir as homedir5 } from "node:os";
@@ -6197,7 +6197,7 @@ function parseTriggers(filePath) {
6197
6197
  }
6198
6198
  var _cachedAiwgPkgRoot, SkillListTool, SkillExecuteTool;
6199
6199
  var init_skill_tools = __esm({
6200
- "packages/execution/dist/tools/skill-tools.js"() {
6200
+ "../packages/execution/dist/tools/skill-tools.js"() {
6201
6201
  "use strict";
6202
6202
  SkillListTool = class {
6203
6203
  name = "skill_list";
@@ -6322,7 +6322,7 @@ ${content}`,
6322
6322
  }
6323
6323
  });
6324
6324
 
6325
- // packages/execution/dist/tools/skill-builder.js
6325
+ // ../packages/execution/dist/tools/skill-builder.js
6326
6326
  import { existsSync as existsSync12, mkdirSync as mkdirSync4, readFileSync as readFileSync9, writeFileSync as writeFileSync4 } from "node:fs";
6327
6327
  import { join as join15, dirname as dirname4 } from "node:path";
6328
6328
  function loadBuilderPrompt(name, vars) {
@@ -6360,7 +6360,7 @@ function extractJSON(text) {
6360
6360
  }
6361
6361
  var SkillBuildTool;
6362
6362
  var init_skill_builder = __esm({
6363
- "packages/execution/dist/tools/skill-builder.js"() {
6363
+ "../packages/execution/dist/tools/skill-builder.js"() {
6364
6364
  "use strict";
6365
6365
  SkillBuildTool = class {
6366
6366
  name = "skill_build";
@@ -6567,7 +6567,7 @@ ${content}`
6567
6567
  }
6568
6568
  });
6569
6569
 
6570
- // packages/execution/dist/tools/transcribe-tool.js
6570
+ // ../packages/execution/dist/tools/transcribe-tool.js
6571
6571
  import { existsSync as existsSync13, mkdirSync as mkdirSync5, writeFileSync as writeFileSync5, readFileSync as readFileSync10, unlinkSync } from "node:fs";
6572
6572
  import { join as join16, basename as basename4, extname as extname3, resolve as resolve13 } from "node:path";
6573
6573
  import { homedir as homedir6 } from "node:os";
@@ -6620,7 +6620,7 @@ function formatTime(seconds) {
6620
6620
  }
6621
6621
  var AUDIO_EXTS, VIDEO_EXTS, _tcModule, _tcChecked, TranscribeFileTool, TranscribeUrlTool;
6622
6622
  var init_transcribe_tool = __esm({
6623
- "packages/execution/dist/tools/transcribe-tool.js"() {
6623
+ "../packages/execution/dist/tools/transcribe-tool.js"() {
6624
6624
  "use strict";
6625
6625
  AUDIO_EXTS = /* @__PURE__ */ new Set([
6626
6626
  ".mp3",
@@ -6861,7 +6861,7 @@ ${result.output}`,
6861
6861
  }
6862
6862
  });
6863
6863
 
6864
- // packages/execution/dist/tools/structured-file.js
6864
+ // ../packages/execution/dist/tools/structured-file.js
6865
6865
  import { writeFile as writeFile6, mkdir as mkdir3 } from "node:fs/promises";
6866
6866
  import { resolve as resolve14, dirname as dirname5, extname as extname4 } from "node:path";
6867
6867
  function jsonToCSV(data, separator = ",") {
@@ -6898,7 +6898,7 @@ function jsonToMarkdownTable(data) {
6898
6898
  }
6899
6899
  var StructuredFileTool;
6900
6900
  var init_structured_file = __esm({
6901
- "packages/execution/dist/tools/structured-file.js"() {
6901
+ "../packages/execution/dist/tools/structured-file.js"() {
6902
6902
  "use strict";
6903
6903
  StructuredFileTool = class {
6904
6904
  name = "create_structured_file";
@@ -7041,7 +7041,7 @@ var init_structured_file = __esm({
7041
7041
  }
7042
7042
  });
7043
7043
 
7044
- // packages/execution/dist/tools/code-sandbox.js
7044
+ // ../packages/execution/dist/tools/code-sandbox.js
7045
7045
  import { spawn as spawn5 } from "node:child_process";
7046
7046
  import { writeFile as writeFile7, mkdtemp, rm, readdir as readdir2, stat } from "node:fs/promises";
7047
7047
  import { join as join17 } from "node:path";
@@ -7122,7 +7122,7 @@ async function listCreatedFiles(dir) {
7122
7122
  }
7123
7123
  var LANGUAGE_CONFIG, CodeSandboxTool;
7124
7124
  var init_code_sandbox = __esm({
7125
- "packages/execution/dist/tools/code-sandbox.js"() {
7125
+ "../packages/execution/dist/tools/code-sandbox.js"() {
7126
7126
  "use strict";
7127
7127
  LANGUAGE_CONFIG = {
7128
7128
  javascript: { ext: ".js", cmd: "node", args: (f) => [f] },
@@ -7294,7 +7294,7 @@ ${result.filesCreated.join("\n")}`);
7294
7294
  }
7295
7295
  });
7296
7296
 
7297
- // packages/execution/dist/tools/structured-read.js
7297
+ // ../packages/execution/dist/tools/structured-read.js
7298
7298
  import { readFile as readFile8, stat as stat2 } from "node:fs/promises";
7299
7299
  import { resolve as resolve15, extname as extname5 } from "node:path";
7300
7300
  function parseCSV(text, separator = ",") {
@@ -7402,7 +7402,7 @@ function detectBinaryFormat(buffer) {
7402
7402
  }
7403
7403
  var StructuredReadTool;
7404
7404
  var init_structured_read = __esm({
7405
- "packages/execution/dist/tools/structured-read.js"() {
7405
+ "../packages/execution/dist/tools/structured-read.js"() {
7406
7406
  "use strict";
7407
7407
  StructuredReadTool = class {
7408
7408
  name = "read_structured_file";
@@ -7629,7 +7629,7 @@ ${parts.join("\n\n")}`,
7629
7629
  }
7630
7630
  });
7631
7631
 
7632
- // packages/execution/dist/tools/vision.js
7632
+ // ../packages/execution/dist/tools/vision.js
7633
7633
  import { readFileSync as readFileSync11, existsSync as existsSync14, statSync as statSync5 } from "node:fs";
7634
7634
  import { execSync as execSync11, spawn as spawn6 } from "node:child_process";
7635
7635
  import { resolve as resolve16, extname as extname6, basename as basename5, dirname as dirname6, join as join18 } from "node:path";
@@ -7776,7 +7776,7 @@ function loadImageBuffer(workingDir, rawPath) {
7776
7776
  }
7777
7777
  var moondreamClient, moondreamError, stationProcess, IMAGE_EXTENSIONS2, VisionTool;
7778
7778
  var init_vision = __esm({
7779
- "packages/execution/dist/tools/vision.js"() {
7779
+ "../packages/execution/dist/tools/vision.js"() {
7780
7780
  "use strict";
7781
7781
  moondreamClient = null;
7782
7782
  moondreamError = null;
@@ -7999,7 +7999,7 @@ ${response}`, durationMs: performance.now() - start };
7999
7999
  }
8000
8000
  });
8001
8001
 
8002
- // packages/execution/dist/tools/desktop-click.js
8002
+ // ../packages/execution/dist/tools/desktop-click.js
8003
8003
  import { readFileSync as readFileSync12, existsSync as existsSync15 } from "node:fs";
8004
8004
  import { execSync as execSync12 } from "node:child_process";
8005
8005
  import { tmpdir as tmpdir3 } from "node:os";
@@ -8152,7 +8152,7 @@ for i in range(${clicks}):
8152
8152
  }
8153
8153
  var __dirname2, DesktopClickTool, DesktopDescribeTool;
8154
8154
  var init_desktop_click = __esm({
8155
- "packages/execution/dist/tools/desktop-click.js"() {
8155
+ "../packages/execution/dist/tools/desktop-click.js"() {
8156
8156
  "use strict";
8157
8157
  init_system_deps();
8158
8158
  __dirname2 = dirname7(fileURLToPath3(import.meta.url));
@@ -8508,13 +8508,13 @@ Screen: ${dims.width}x${dims.height}`);
8508
8508
  }
8509
8509
  });
8510
8510
 
8511
- // packages/execution/dist/tools/ocr-pdf.js
8511
+ // ../packages/execution/dist/tools/ocr-pdf.js
8512
8512
  import { existsSync as existsSync16, statSync as statSync6 } from "node:fs";
8513
8513
  import { resolve as resolve17, basename as basename6 } from "node:path";
8514
8514
  import { execSync as execSync13 } from "node:child_process";
8515
8515
  var OcrPdfTool;
8516
8516
  var init_ocr_pdf = __esm({
8517
- "packages/execution/dist/tools/ocr-pdf.js"() {
8517
+ "../packages/execution/dist/tools/ocr-pdf.js"() {
8518
8518
  "use strict";
8519
8519
  init_system_deps();
8520
8520
  OcrPdfTool = class {
@@ -8631,14 +8631,14 @@ Language: ${language}
8631
8631
  }
8632
8632
  });
8633
8633
 
8634
- // packages/execution/dist/tools/pdf-to-text.js
8634
+ // ../packages/execution/dist/tools/pdf-to-text.js
8635
8635
  import { existsSync as existsSync17, statSync as statSync7, readFileSync as readFileSync13, unlinkSync as unlinkSync2 } from "node:fs";
8636
8636
  import { resolve as resolve18, basename as basename7, join as join20 } from "node:path";
8637
8637
  import { execSync as execSync14 } from "node:child_process";
8638
8638
  import { tmpdir as tmpdir4 } from "node:os";
8639
8639
  var PdfToTextTool;
8640
8640
  var init_pdf_to_text = __esm({
8641
- "packages/execution/dist/tools/pdf-to-text.js"() {
8641
+ "../packages/execution/dist/tools/pdf-to-text.js"() {
8642
8642
  "use strict";
8643
8643
  init_system_deps();
8644
8644
  PdfToTextTool = class {
@@ -8816,7 +8816,7 @@ ${text}`,
8816
8816
  }
8817
8817
  });
8818
8818
 
8819
- // packages/execution/dist/tools/ocr-image-advanced.js
8819
+ // ../packages/execution/dist/tools/ocr-image-advanced.js
8820
8820
  import { existsSync as existsSync18, statSync as statSync8 } from "node:fs";
8821
8821
  import { resolve as resolve19, basename as basename8, dirname as dirname8, join as join21 } from "node:path";
8822
8822
  import { execSync as execSync15 } from "node:child_process";
@@ -8859,7 +8859,7 @@ function findPython() {
8859
8859
  }
8860
8860
  var OcrImageAdvancedTool;
8861
8861
  var init_ocr_image_advanced = __esm({
8862
- "packages/execution/dist/tools/ocr-image-advanced.js"() {
8862
+ "../packages/execution/dist/tools/ocr-image-advanced.js"() {
8863
8863
  "use strict";
8864
8864
  init_system_deps();
8865
8865
  OcrImageAdvancedTool = class {
@@ -9119,7 +9119,7 @@ Note: Advanced Python pipeline not available \u2014 install pytesseract, opencv-
9119
9119
  }
9120
9120
  });
9121
9121
 
9122
- // packages/execution/dist/tools/browser-action.js
9122
+ // ../packages/execution/dist/tools/browser-action.js
9123
9123
  import { execSync as execSync16, spawn as spawn7 } from "node:child_process";
9124
9124
  import { existsSync as existsSync19, readFileSync as readFileSync14 } from "node:fs";
9125
9125
  import { join as join22, dirname as dirname9 } from "node:path";
@@ -9211,7 +9211,7 @@ async function apiCall(endpoint, method = "POST", body) {
9211
9211
  }
9212
9212
  var __dirname3, SCRAPE_SCRIPT, DEFAULT_PORT, BASE_URL, serviceProcess, activeSessionId, BrowserActionTool;
9213
9213
  var init_browser_action = __esm({
9214
- "packages/execution/dist/tools/browser-action.js"() {
9214
+ "../packages/execution/dist/tools/browser-action.js"() {
9215
9215
  "use strict";
9216
9216
  __dirname3 = dirname9(fileURLToPath5(import.meta.url));
9217
9217
  SCRAPE_SCRIPT = join22(__dirname3, "..", "..", "scripts", "web_scrape.py");
@@ -9372,7 +9372,7 @@ var init_browser_action = __esm({
9372
9372
  }
9373
9373
  });
9374
9374
 
9375
- // packages/execution/dist/tools/autoresearch.js
9375
+ // ../packages/execution/dist/tools/autoresearch.js
9376
9376
  import { execSync as execSync17, spawn as spawn8 } from "node:child_process";
9377
9377
  import { existsSync as existsSync20, readFileSync as readFileSync15, writeFileSync as writeFileSync6, mkdirSync as mkdirSync6, appendFileSync, copyFileSync } from "node:fs";
9378
9378
  import { join as join23, resolve as resolve20, dirname as dirname10 } from "node:path";
@@ -9415,7 +9415,7 @@ function parseRunLog(logContent) {
9415
9415
  }
9416
9416
  var AutoresearchTool;
9417
9417
  var init_autoresearch = __esm({
9418
- "packages/execution/dist/tools/autoresearch.js"() {
9418
+ "../packages/execution/dist/tools/autoresearch.js"() {
9419
9419
  "use strict";
9420
9420
  AutoresearchTool = class {
9421
9421
  repoRoot;
@@ -9892,7 +9892,7 @@ train.py reverted to last kept state. Ready for next experiment.`,
9892
9892
  }
9893
9893
  });
9894
9894
 
9895
- // packages/execution/dist/tools/scheduler.js
9895
+ // ../packages/execution/dist/tools/scheduler.js
9896
9896
  import { execSync as execSync18, exec as execCb } from "node:child_process";
9897
9897
  import { readFile as readFile9, writeFile as writeFile8, mkdir as mkdir4 } from "node:fs/promises";
9898
9898
  import { resolve as resolve21, join as join24 } from "node:path";
@@ -10027,7 +10027,7 @@ async function saveStore(workingDir, store) {
10027
10027
  }
10028
10028
  var SCHEDULE_PRESETS, CRON_MARKER, SchedulerTool;
10029
10029
  var init_scheduler = __esm({
10030
- "packages/execution/dist/tools/scheduler.js"() {
10030
+ "../packages/execution/dist/tools/scheduler.js"() {
10031
10031
  "use strict";
10032
10032
  SCHEDULE_PRESETS = {
10033
10033
  "every minute": "* * * * *",
@@ -10255,7 +10255,7 @@ ${truncated}`, durationMs: performance.now() - start };
10255
10255
  }
10256
10256
  });
10257
10257
 
10258
- // packages/execution/dist/tools/reminder.js
10258
+ // ../packages/execution/dist/tools/reminder.js
10259
10259
  import { readFile as readFile10, writeFile as writeFile9, mkdir as mkdir5 } from "node:fs/promises";
10260
10260
  import { resolve as resolve22, join as join25 } from "node:path";
10261
10261
  import { randomBytes as randomBytes3 } from "node:crypto";
@@ -10349,7 +10349,7 @@ async function markRemindersSeen(workingDir, ids) {
10349
10349
  }
10350
10350
  var STORE_FILE, ReminderTool;
10351
10351
  var init_reminder = __esm({
10352
- "packages/execution/dist/tools/reminder.js"() {
10352
+ "../packages/execution/dist/tools/reminder.js"() {
10353
10353
  "use strict";
10354
10354
  STORE_FILE = "reminders.json";
10355
10355
  ReminderTool = class {
@@ -10568,7 +10568,7 @@ var init_reminder = __esm({
10568
10568
  }
10569
10569
  });
10570
10570
 
10571
- // packages/execution/dist/tools/agenda.js
10571
+ // ../packages/execution/dist/tools/agenda.js
10572
10572
  import { readFile as readFile11, writeFile as writeFile10, mkdir as mkdir6 } from "node:fs/promises";
10573
10573
  import { resolve as resolve23, join as join26 } from "node:path";
10574
10574
  import { randomBytes as randomBytes4 } from "node:crypto";
@@ -10603,7 +10603,7 @@ async function getActiveAttentionItems(workingDir) {
10603
10603
  }
10604
10604
  var AgendaTool;
10605
10605
  var init_agenda = __esm({
10606
- "packages/execution/dist/tools/agenda.js"() {
10606
+ "../packages/execution/dist/tools/agenda.js"() {
10607
10607
  "use strict";
10608
10608
  init_reminder();
10609
10609
  AgendaTool = class {
@@ -10892,7 +10892,7 @@ ${sections.join("\n")}`,
10892
10892
  }
10893
10893
  });
10894
10894
 
10895
- // packages/execution/dist/tools/opencode.js
10895
+ // ../packages/execution/dist/tools/opencode.js
10896
10896
  import { execSync as execSync19, spawn as spawn9 } from "node:child_process";
10897
10897
  import { existsSync as existsSync21 } from "node:fs";
10898
10898
  import { join as join27, resolve as resolve24 } from "node:path";
@@ -10953,7 +10953,7 @@ function installOpencode() {
10953
10953
  }
10954
10954
  var OpenCodeTool;
10955
10955
  var init_opencode = __esm({
10956
- "packages/execution/dist/tools/opencode.js"() {
10956
+ "../packages/execution/dist/tools/opencode.js"() {
10957
10957
  "use strict";
10958
10958
  OpenCodeTool = class {
10959
10959
  name = "opencode";
@@ -11166,7 +11166,7 @@ var init_opencode = __esm({
11166
11166
  }
11167
11167
  });
11168
11168
 
11169
- // packages/execution/dist/tools/factory.js
11169
+ // ../packages/execution/dist/tools/factory.js
11170
11170
  import { execSync as execSync20, spawn as spawn10 } from "node:child_process";
11171
11171
  import { existsSync as existsSync22 } from "node:fs";
11172
11172
  import { join as join28 } from "node:path";
@@ -11227,7 +11227,7 @@ function installDroid() {
11227
11227
  }
11228
11228
  var FactoryTool;
11229
11229
  var init_factory = __esm({
11230
- "packages/execution/dist/tools/factory.js"() {
11230
+ "../packages/execution/dist/tools/factory.js"() {
11231
11231
  "use strict";
11232
11232
  FactoryTool = class {
11233
11233
  name = "factory";
@@ -11475,7 +11475,7 @@ var init_factory = __esm({
11475
11475
  }
11476
11476
  });
11477
11477
 
11478
- // packages/execution/dist/tools/cron-agent.js
11478
+ // ../packages/execution/dist/tools/cron-agent.js
11479
11479
  import { execSync as execSync21 } from "node:child_process";
11480
11480
  import { readFile as readFile12, writeFile as writeFile11, mkdir as mkdir7 } from "node:fs/promises";
11481
11481
  import { resolve as resolve25, join as join29 } from "node:path";
@@ -11609,7 +11609,7 @@ async function saveStore2(workingDir, store) {
11609
11609
  }
11610
11610
  var LONG_HORIZON_PRESETS, CRON_AGENT_MARKER, CronAgentTool;
11611
11611
  var init_cron_agent = __esm({
11612
- "packages/execution/dist/tools/cron-agent.js"() {
11612
+ "../packages/execution/dist/tools/cron-agent.js"() {
11613
11613
  "use strict";
11614
11614
  LONG_HORIZON_PRESETS = {
11615
11615
  "every hour": "0 * * * *",
@@ -11940,7 +11940,7 @@ ${truncated}`, durationMs: performance.now() - start };
11940
11940
  }
11941
11941
  });
11942
11942
 
11943
- // packages/execution/dist/tools/nexus.js
11943
+ // ../packages/execution/dist/tools/nexus.js
11944
11944
  import { readFile as readFile13, writeFile as writeFile12, mkdir as mkdir8, chmod, unlink, readdir as readdir3, open as fsOpen } from "node:fs/promises";
11945
11945
  import { existsSync as existsSync23, readFileSync as readFileSync16 } from "node:fs";
11946
11946
  import { resolve as resolve26, join as join30 } from "node:path";
@@ -11956,7 +11956,7 @@ function containsKeyMaterial(input) {
11956
11956
  }
11957
11957
  var DAEMON_SCRIPT, KEY_PATTERNS, NexusTool;
11958
11958
  var init_nexus = __esm({
11959
- "packages/execution/dist/tools/nexus.js"() {
11959
+ "../packages/execution/dist/tools/nexus.js"() {
11960
11960
  "use strict";
11961
11961
  DAEMON_SCRIPT = `#!/usr/bin/env node
11962
11962
  /**
@@ -14064,71 +14064,71 @@ process.on('SIGINT', () => process.emit('SIGTERM'));
14064
14064
  }
14065
14065
  });
14066
14066
 
14067
- // packages/execution/dist/shellRunner.js
14067
+ // ../packages/execution/dist/shellRunner.js
14068
14068
  var init_shellRunner = __esm({
14069
- "packages/execution/dist/shellRunner.js"() {
14069
+ "../packages/execution/dist/shellRunner.js"() {
14070
14070
  "use strict";
14071
14071
  }
14072
14072
  });
14073
14073
 
14074
- // packages/execution/dist/gitWorktree.js
14074
+ // ../packages/execution/dist/gitWorktree.js
14075
14075
  var init_gitWorktree = __esm({
14076
- "packages/execution/dist/gitWorktree.js"() {
14076
+ "../packages/execution/dist/gitWorktree.js"() {
14077
14077
  "use strict";
14078
14078
  init_shellRunner();
14079
14079
  }
14080
14080
  });
14081
14081
 
14082
- // packages/execution/dist/patchApplier.js
14082
+ // ../packages/execution/dist/patchApplier.js
14083
14083
  var init_patchApplier = __esm({
14084
- "packages/execution/dist/patchApplier.js"() {
14084
+ "../packages/execution/dist/patchApplier.js"() {
14085
14085
  "use strict";
14086
14086
  }
14087
14087
  });
14088
14088
 
14089
- // packages/execution/dist/formatterRunner.js
14089
+ // ../packages/execution/dist/formatterRunner.js
14090
14090
  var init_formatterRunner = __esm({
14091
- "packages/execution/dist/formatterRunner.js"() {
14091
+ "../packages/execution/dist/formatterRunner.js"() {
14092
14092
  "use strict";
14093
14093
  init_shellRunner();
14094
14094
  }
14095
14095
  });
14096
14096
 
14097
- // packages/execution/dist/linterRunner.js
14097
+ // ../packages/execution/dist/linterRunner.js
14098
14098
  var init_linterRunner = __esm({
14099
- "packages/execution/dist/linterRunner.js"() {
14099
+ "../packages/execution/dist/linterRunner.js"() {
14100
14100
  "use strict";
14101
14101
  init_shellRunner();
14102
14102
  }
14103
14103
  });
14104
14104
 
14105
- // packages/execution/dist/typecheckRunner.js
14105
+ // ../packages/execution/dist/typecheckRunner.js
14106
14106
  var init_typecheckRunner = __esm({
14107
- "packages/execution/dist/typecheckRunner.js"() {
14107
+ "../packages/execution/dist/typecheckRunner.js"() {
14108
14108
  "use strict";
14109
14109
  init_shellRunner();
14110
14110
  }
14111
14111
  });
14112
14112
 
14113
- // packages/execution/dist/testRunner.js
14113
+ // ../packages/execution/dist/testRunner.js
14114
14114
  var init_testRunner = __esm({
14115
- "packages/execution/dist/testRunner.js"() {
14115
+ "../packages/execution/dist/testRunner.js"() {
14116
14116
  "use strict";
14117
14117
  init_shellRunner();
14118
14118
  }
14119
14119
  });
14120
14120
 
14121
- // packages/execution/dist/buildRunner.js
14121
+ // ../packages/execution/dist/buildRunner.js
14122
14122
  var init_buildRunner = __esm({
14123
- "packages/execution/dist/buildRunner.js"() {
14123
+ "../packages/execution/dist/buildRunner.js"() {
14124
14124
  "use strict";
14125
14125
  init_shellRunner();
14126
14126
  }
14127
14127
  });
14128
14128
 
14129
- // packages/execution/dist/validationPipeline.js
14129
+ // ../packages/execution/dist/validationPipeline.js
14130
14130
  var init_validationPipeline = __esm({
14131
- "packages/execution/dist/validationPipeline.js"() {
14131
+ "../packages/execution/dist/validationPipeline.js"() {
14132
14132
  "use strict";
14133
14133
  init_formatterRunner();
14134
14134
  init_linterRunner();
@@ -14138,9 +14138,9 @@ var init_validationPipeline = __esm({
14138
14138
  }
14139
14139
  });
14140
14140
 
14141
- // packages/execution/dist/index.js
14141
+ // ../packages/execution/dist/index.js
14142
14142
  var init_dist2 = __esm({
14143
- "packages/execution/dist/index.js"() {
14143
+ "../packages/execution/dist/index.js"() {
14144
14144
  "use strict";
14145
14145
  init_tool_executor();
14146
14146
  init_shell();
@@ -14202,9 +14202,9 @@ var init_dist2 = __esm({
14202
14202
  }
14203
14203
  });
14204
14204
 
14205
- // packages/orchestrator/dist/agent-loop.js
14205
+ // ../packages/orchestrator/dist/agent-loop.js
14206
14206
  var init_agent_loop = __esm({
14207
- "packages/orchestrator/dist/agent-loop.js"() {
14207
+ "../packages/orchestrator/dist/agent-loop.js"() {
14208
14208
  "use strict";
14209
14209
  init_dist();
14210
14210
  init_dist2();
@@ -14212,11 +14212,11 @@ var init_agent_loop = __esm({
14212
14212
  }
14213
14213
  });
14214
14214
 
14215
- // packages/schemas/dist/messages.js
14215
+ // ../packages/schemas/dist/messages.js
14216
14216
  import { z } from "zod";
14217
14217
  var AgentMessageSchema;
14218
14218
  var init_messages = __esm({
14219
- "packages/schemas/dist/messages.js"() {
14219
+ "../packages/schemas/dist/messages.js"() {
14220
14220
  "use strict";
14221
14221
  AgentMessageSchema = z.object({
14222
14222
  id: z.string().uuid(),
@@ -14229,11 +14229,11 @@ var init_messages = __esm({
14229
14229
  }
14230
14230
  });
14231
14231
 
14232
- // packages/schemas/dist/tools.js
14232
+ // ../packages/schemas/dist/tools.js
14233
14233
  import { z as z2 } from "zod";
14234
14234
  var ToolCallSchema;
14235
14235
  var init_tools = __esm({
14236
- "packages/schemas/dist/tools.js"() {
14236
+ "../packages/schemas/dist/tools.js"() {
14237
14237
  "use strict";
14238
14238
  ToolCallSchema = z2.object({
14239
14239
  id: z2.string().uuid(),
@@ -14247,11 +14247,11 @@ var init_tools = __esm({
14247
14247
  }
14248
14248
  });
14249
14249
 
14250
- // packages/schemas/dist/session.js
14250
+ // ../packages/schemas/dist/session.js
14251
14251
  import { z as z3 } from "zod";
14252
14252
  var SessionSchema;
14253
14253
  var init_session = __esm({
14254
- "packages/schemas/dist/session.js"() {
14254
+ "../packages/schemas/dist/session.js"() {
14255
14255
  "use strict";
14256
14256
  SessionSchema = z3.object({
14257
14257
  id: z3.string().uuid(),
@@ -14265,11 +14265,11 @@ var init_session = __esm({
14265
14265
  }
14266
14266
  });
14267
14267
 
14268
- // packages/schemas/dist/task.js
14268
+ // ../packages/schemas/dist/task.js
14269
14269
  import { z as z4 } from "zod";
14270
14270
  var TaskClassSchema, UrgencySchema, NormalizedTaskSchema, TaskStatusSchema;
14271
14271
  var init_task = __esm({
14272
- "packages/schemas/dist/task.js"() {
14272
+ "../packages/schemas/dist/task.js"() {
14273
14273
  "use strict";
14274
14274
  TaskClassSchema = z4.enum([
14275
14275
  "bugfix",
@@ -14314,11 +14314,11 @@ var init_task = __esm({
14314
14314
  }
14315
14315
  });
14316
14316
 
14317
- // packages/schemas/dist/plan.js
14317
+ // ../packages/schemas/dist/plan.js
14318
14318
  import { z as z5 } from "zod";
14319
14319
  var SubtaskKindSchema, SubtaskSchema, PlanSchema;
14320
14320
  var init_plan = __esm({
14321
- "packages/schemas/dist/plan.js"() {
14321
+ "../packages/schemas/dist/plan.js"() {
14322
14322
  "use strict";
14323
14323
  SubtaskKindSchema = z5.enum([
14324
14324
  "inspect",
@@ -14352,11 +14352,11 @@ var init_plan = __esm({
14352
14352
  }
14353
14353
  });
14354
14354
 
14355
- // packages/schemas/dist/patch.js
14355
+ // ../packages/schemas/dist/patch.js
14356
14356
  import { z as z6 } from "zod";
14357
14357
  var EditOperationSchema, FileEditSchema, NeedsMoreContextSchema, PatchProposalSchema;
14358
14358
  var init_patch = __esm({
14359
- "packages/schemas/dist/patch.js"() {
14359
+ "../packages/schemas/dist/patch.js"() {
14360
14360
  "use strict";
14361
14361
  EditOperationSchema = z6.enum([
14362
14362
  "diff",
@@ -14395,11 +14395,11 @@ var init_patch = __esm({
14395
14395
  }
14396
14396
  });
14397
14397
 
14398
- // packages/schemas/dist/verification.js
14398
+ // ../packages/schemas/dist/verification.js
14399
14399
  import { z as z7 } from "zod";
14400
14400
  var VerificationStatusSchema, VerificationNextActionSchema, VerificationDecisionSchema;
14401
14401
  var init_verification = __esm({
14402
- "packages/schemas/dist/verification.js"() {
14402
+ "../packages/schemas/dist/verification.js"() {
14403
14403
  "use strict";
14404
14404
  VerificationStatusSchema = z7.enum(["pass", "fail", "partial"]);
14405
14405
  VerificationNextActionSchema = z7.enum([
@@ -14424,11 +14424,11 @@ var init_verification = __esm({
14424
14424
  }
14425
14425
  });
14426
14426
 
14427
- // packages/schemas/dist/repoProfile.js
14427
+ // ../packages/schemas/dist/repoProfile.js
14428
14428
  import { z as z8 } from "zod";
14429
14429
  var LanguageSchema, PackageManagerSchema, BuildSystemSchema, MigrationSystemSchema, RepoProfileSchema;
14430
14430
  var init_repoProfile = __esm({
14431
- "packages/schemas/dist/repoProfile.js"() {
14431
+ "../packages/schemas/dist/repoProfile.js"() {
14432
14432
  "use strict";
14433
14433
  LanguageSchema = z8.enum([
14434
14434
  "typescript",
@@ -14506,11 +14506,11 @@ var init_repoProfile = __esm({
14506
14506
  }
14507
14507
  });
14508
14508
 
14509
- // packages/schemas/dist/retrieval.js
14509
+ // ../packages/schemas/dist/retrieval.js
14510
14510
  import { z as z9 } from "zod";
14511
14511
  var RetrievalRequestSchema, SnippetSchema, RetrievalPacketSchema;
14512
14512
  var init_retrieval = __esm({
14513
- "packages/schemas/dist/retrieval.js"() {
14513
+ "../packages/schemas/dist/retrieval.js"() {
14514
14514
  "use strict";
14515
14515
  RetrievalRequestSchema = z9.object({
14516
14516
  /** Natural language description of what information is needed */
@@ -14558,11 +14558,11 @@ var init_retrieval = __esm({
14558
14558
  }
14559
14559
  });
14560
14560
 
14561
- // packages/schemas/dist/dispatch.js
14561
+ // ../packages/schemas/dist/dispatch.js
14562
14562
  import { z as z10 } from "zod";
14563
14563
  var DispatchModeSchema, TaskComplexitySchema, AgentRoleSchema, BudgetsSchema, DispatchDecisionSchema;
14564
14564
  var init_dispatch = __esm({
14565
- "packages/schemas/dist/dispatch.js"() {
14565
+ "../packages/schemas/dist/dispatch.js"() {
14566
14566
  "use strict";
14567
14567
  DispatchModeSchema = z10.enum([
14568
14568
  "single_pass",
@@ -14596,11 +14596,11 @@ var init_dispatch = __esm({
14596
14596
  }
14597
14597
  });
14598
14598
 
14599
- // packages/schemas/dist/memory.js
14599
+ // ../packages/schemas/dist/memory.js
14600
14600
  import { z as z11 } from "zod";
14601
14601
  var RiskLevelSchema, FileSummarySchema, FailureCategorySchema, FailureFingerprintSchema, TaskMemorySchema;
14602
14602
  var init_memory = __esm({
14603
- "packages/schemas/dist/memory.js"() {
14603
+ "../packages/schemas/dist/memory.js"() {
14604
14604
  "use strict";
14605
14605
  RiskLevelSchema = z11.enum(["low", "medium", "high", "critical"]);
14606
14606
  FileSummarySchema = z11.object({
@@ -14676,11 +14676,11 @@ var init_memory = __esm({
14676
14676
  }
14677
14677
  });
14678
14678
 
14679
- // packages/schemas/dist/backend.js
14679
+ // ../packages/schemas/dist/backend.js
14680
14680
  import { z as z12 } from "zod";
14681
14681
  var MessageRoleSchema, ChatMessageSchema, CompletionRequestSchema, TokenUsageSchema, CompletionResponseSchema, StructuredCompletionRequestSchema, BackendHealthSchema, BackendMetricsSchema;
14682
14682
  var init_backend = __esm({
14683
- "packages/schemas/dist/backend.js"() {
14683
+ "../packages/schemas/dist/backend.js"() {
14684
14684
  "use strict";
14685
14685
  MessageRoleSchema = z12.enum([
14686
14686
  "system",
@@ -14765,11 +14765,11 @@ var init_backend = __esm({
14765
14765
  }
14766
14766
  });
14767
14767
 
14768
- // packages/schemas/dist/config.js
14768
+ // ../packages/schemas/dist/config.js
14769
14769
  import { z as z13 } from "zod";
14770
14770
  var AgentConfigSchema;
14771
14771
  var init_config2 = __esm({
14772
- "packages/schemas/dist/config.js"() {
14772
+ "../packages/schemas/dist/config.js"() {
14773
14773
  "use strict";
14774
14774
  AgentConfigSchema = z13.object({
14775
14775
  // -----------------------------------------------------------------------
@@ -14828,11 +14828,11 @@ var init_config2 = __esm({
14828
14828
  }
14829
14829
  });
14830
14830
 
14831
- // packages/schemas/dist/queue.js
14831
+ // ../packages/schemas/dist/queue.js
14832
14832
  import { z as z14 } from "zod";
14833
14833
  var QueueClassSchema;
14834
14834
  var init_queue = __esm({
14835
- "packages/schemas/dist/queue.js"() {
14835
+ "../packages/schemas/dist/queue.js"() {
14836
14836
  "use strict";
14837
14837
  QueueClassSchema = z14.enum([
14838
14838
  /** CLI and direct user-facing requests; lowest latency target */
@@ -14851,9 +14851,9 @@ var init_queue = __esm({
14851
14851
  }
14852
14852
  });
14853
14853
 
14854
- // packages/schemas/dist/index.js
14854
+ // ../packages/schemas/dist/index.js
14855
14855
  var init_dist3 = __esm({
14856
- "packages/schemas/dist/index.js"() {
14856
+ "../packages/schemas/dist/index.js"() {
14857
14857
  "use strict";
14858
14858
  init_messages();
14859
14859
  init_tools();
@@ -14872,7 +14872,7 @@ var init_dist3 = __esm({
14872
14872
  }
14873
14873
  });
14874
14874
 
14875
- // packages/orchestrator/dist/promptLoader.js
14875
+ // ../packages/orchestrator/dist/promptLoader.js
14876
14876
  import { readFileSync as readFileSync17, existsSync as existsSync24 } from "node:fs";
14877
14877
  import { join as join31, dirname as dirname11 } from "node:path";
14878
14878
  import { fileURLToPath as fileURLToPath7 } from "node:url";
@@ -14892,7 +14892,7 @@ function loadPrompt(promptPath, vars) {
14892
14892
  }
14893
14893
  var __filename, __dirname4, PROMPTS_DIR, cache;
14894
14894
  var init_promptLoader = __esm({
14895
- "packages/orchestrator/dist/promptLoader.js"() {
14895
+ "../packages/orchestrator/dist/promptLoader.js"() {
14896
14896
  "use strict";
14897
14897
  __filename = fileURLToPath7(import.meta.url);
14898
14898
  __dirname4 = dirname11(__filename);
@@ -14901,7 +14901,7 @@ var init_promptLoader = __esm({
14901
14901
  }
14902
14902
  });
14903
14903
 
14904
- // packages/orchestrator/dist/taskNormalizer.js
14904
+ // ../packages/orchestrator/dist/taskNormalizer.js
14905
14905
  function parseJsonFromContent(content) {
14906
14906
  const fencedMatch = content.match(/```(?:json)?\s*([\s\S]*?)```/);
14907
14907
  const raw = fencedMatch ? fencedMatch[1] : content;
@@ -14916,7 +14916,7 @@ function normalizationPrompt(rawRequest, repoRoot) {
14916
14916
  }
14917
14917
  var TaskNormalizer;
14918
14918
  var init_taskNormalizer = __esm({
14919
- "packages/orchestrator/dist/taskNormalizer.js"() {
14919
+ "../packages/orchestrator/dist/taskNormalizer.js"() {
14920
14920
  "use strict";
14921
14921
  init_dist3();
14922
14922
  init_promptLoader();
@@ -14968,7 +14968,7 @@ var init_taskNormalizer = __esm({
14968
14968
  }
14969
14969
  });
14970
14970
 
14971
- // packages/orchestrator/dist/dispatcher.js
14971
+ // ../packages/orchestrator/dist/dispatcher.js
14972
14972
  function estimateComplexity(task) {
14973
14973
  const text = `${task.goal} ${task.constraints.join(" ")} ${task.successCriteria.join(" ")}`;
14974
14974
  const wordCount = text.split(/\s+/).length;
@@ -15035,7 +15035,7 @@ function parseJsonFromContent2(content) {
15035
15035
  }
15036
15036
  var Dispatcher;
15037
15037
  var init_dispatcher = __esm({
15038
- "packages/orchestrator/dist/dispatcher.js"() {
15038
+ "../packages/orchestrator/dist/dispatcher.js"() {
15039
15039
  "use strict";
15040
15040
  init_dist3();
15041
15041
  init_promptLoader();
@@ -15095,7 +15095,7 @@ var init_dispatcher = __esm({
15095
15095
  }
15096
15096
  });
15097
15097
 
15098
- // packages/orchestrator/dist/plannerRunner.js
15098
+ // ../packages/orchestrator/dist/plannerRunner.js
15099
15099
  function plannerPrompt(task, repoProfile, retrievalPacket) {
15100
15100
  const profileSection = repoProfile ? `REPOSITORY PROFILE:
15101
15101
  ${JSON.stringify(repoProfile, null, 2)}` : "REPOSITORY PROFILE: (not available)";
@@ -15116,7 +15116,7 @@ function parseJsonFromContent3(content) {
15116
15116
  }
15117
15117
  var PlannerRunner;
15118
15118
  var init_plannerRunner = __esm({
15119
- "packages/orchestrator/dist/plannerRunner.js"() {
15119
+ "../packages/orchestrator/dist/plannerRunner.js"() {
15120
15120
  "use strict";
15121
15121
  init_dist3();
15122
15122
  init_promptLoader();
@@ -15169,12 +15169,12 @@ var init_plannerRunner = __esm({
15169
15169
  }
15170
15170
  });
15171
15171
 
15172
- // packages/retrieval/dist/grep-search.js
15172
+ // ../packages/retrieval/dist/grep-search.js
15173
15173
  import { execFile as execFile4 } from "node:child_process";
15174
15174
  import { promisify as promisify3 } from "node:util";
15175
15175
  var execFileAsync3, GrepSearch;
15176
15176
  var init_grep_search2 = __esm({
15177
- "packages/retrieval/dist/grep-search.js"() {
15177
+ "../packages/retrieval/dist/grep-search.js"() {
15178
15178
  "use strict";
15179
15179
  execFileAsync3 = promisify3(execFile4);
15180
15180
  GrepSearch = class {
@@ -15231,10 +15231,10 @@ var init_grep_search2 = __esm({
15231
15231
  }
15232
15232
  });
15233
15233
 
15234
- // packages/retrieval/dist/code-retriever.js
15234
+ // ../packages/retrieval/dist/code-retriever.js
15235
15235
  var DEFAULT_CONFIG2, CodeRetriever;
15236
15236
  var init_code_retriever = __esm({
15237
- "packages/retrieval/dist/code-retriever.js"() {
15237
+ "../packages/retrieval/dist/code-retriever.js"() {
15238
15238
  "use strict";
15239
15239
  init_grep_search2();
15240
15240
  DEFAULT_CONFIG2 = {
@@ -15272,7 +15272,7 @@ var init_code_retriever = __esm({
15272
15272
  }
15273
15273
  });
15274
15274
 
15275
- // packages/retrieval/dist/lexicalSearch.js
15275
+ // ../packages/retrieval/dist/lexicalSearch.js
15276
15276
  import { execFile as execFile5 } from "node:child_process";
15277
15277
  import { promisify as promisify4 } from "node:util";
15278
15278
  import { readFile as readFile14, readdir as readdir4, stat as stat3 } from "node:fs/promises";
@@ -15450,7 +15450,7 @@ function matchesGlob(filePath, glob2) {
15450
15450
  }
15451
15451
  var execFileAsync4, DEFAULT_INCLUDE_GLOBS, DEFAULT_EXCLUDE_GLOBS, DEFAULT_MAX_MATCHES, ALWAYS_SKIP, ALL_CODE_EXTS;
15452
15452
  var init_lexicalSearch = __esm({
15453
- "packages/retrieval/dist/lexicalSearch.js"() {
15453
+ "../packages/retrieval/dist/lexicalSearch.js"() {
15454
15454
  "use strict";
15455
15455
  execFileAsync4 = promisify4(execFile5);
15456
15456
  DEFAULT_INCLUDE_GLOBS = ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.py"];
@@ -15461,7 +15461,7 @@ var init_lexicalSearch = __esm({
15461
15461
  }
15462
15462
  });
15463
15463
 
15464
- // packages/retrieval/dist/semanticSearch.js
15464
+ // ../packages/retrieval/dist/semanticSearch.js
15465
15465
  function parseTagFilter(query) {
15466
15466
  const required = [];
15467
15467
  const anyOf = [];
@@ -15538,7 +15538,7 @@ function makePlaceholderSummary(filePath) {
15538
15538
  }
15539
15539
  var StubSemanticSearchEngine, IndexBackedSemanticSearchEngine, LazySemanticSearchEngine;
15540
15540
  var init_semanticSearch = __esm({
15541
- "packages/retrieval/dist/semanticSearch.js"() {
15541
+ "../packages/retrieval/dist/semanticSearch.js"() {
15542
15542
  "use strict";
15543
15543
  StubSemanticSearchEngine = class {
15544
15544
  isAvailable = false;
@@ -15658,7 +15658,7 @@ var init_semanticSearch = __esm({
15658
15658
  }
15659
15659
  });
15660
15660
 
15661
- // packages/retrieval/dist/graphExpand.js
15661
+ // ../packages/retrieval/dist/graphExpand.js
15662
15662
  function expandGraph(seeds, graph, opts = {}) {
15663
15663
  const { direction = "both", maxHops = 1, maxNeighbors = 20, includeSeeds = false } = opts;
15664
15664
  const seedSet = new Set(seeds);
@@ -15718,12 +15718,12 @@ function bfsExpand(seeds, adjacency, maxHops, maxNeighbors, excludeSet, result)
15718
15718
  }
15719
15719
  }
15720
15720
  var init_graphExpand = __esm({
15721
- "packages/retrieval/dist/graphExpand.js"() {
15721
+ "../packages/retrieval/dist/graphExpand.js"() {
15722
15722
  "use strict";
15723
15723
  }
15724
15724
  });
15725
15725
 
15726
- // packages/retrieval/dist/snippetPacker.js
15726
+ // ../packages/retrieval/dist/snippetPacker.js
15727
15727
  import { readFile as readFile15 } from "node:fs/promises";
15728
15728
  import { join as join33 } from "node:path";
15729
15729
  async function packSnippets(requests, opts = {}) {
@@ -15786,7 +15786,7 @@ async function packFiles(filePaths, repoRoot, maxTokens = DEFAULT_MAX_TOKENS) {
15786
15786
  }
15787
15787
  var DEFAULT_MAX_TOKENS, DEFAULT_CONTEXT_LINES, CHARS_PER_TOKEN;
15788
15788
  var init_snippetPacker = __esm({
15789
- "packages/retrieval/dist/snippetPacker.js"() {
15789
+ "../packages/retrieval/dist/snippetPacker.js"() {
15790
15790
  "use strict";
15791
15791
  DEFAULT_MAX_TOKENS = 32e3;
15792
15792
  DEFAULT_CONTEXT_LINES = 2;
@@ -15794,7 +15794,7 @@ var init_snippetPacker = __esm({
15794
15794
  }
15795
15795
  });
15796
15796
 
15797
- // packages/retrieval/dist/contextAssembler.js
15797
+ // ../packages/retrieval/dist/contextAssembler.js
15798
15798
  async function assembleContext(request, opts) {
15799
15799
  const { repoRoot, graph, semanticEngine, summaryMap, maxFiles = 8, maxSnippets = 20, maxLogs = 3, maxTokens = 24e3, expandNeighbors = true, architectureNote, priorAttemptNote } = opts;
15800
15800
  const lexOpts = {
@@ -15950,7 +15950,7 @@ function estimatePacketTokens(packet) {
15950
15950
  return fileTokens + snippetTokens;
15951
15951
  }
15952
15952
  var init_contextAssembler = __esm({
15953
- "packages/retrieval/dist/contextAssembler.js"() {
15953
+ "../packages/retrieval/dist/contextAssembler.js"() {
15954
15954
  "use strict";
15955
15955
  init_lexicalSearch();
15956
15956
  init_graphExpand();
@@ -15958,7 +15958,7 @@ var init_contextAssembler = __esm({
15958
15958
  }
15959
15959
  });
15960
15960
 
15961
- // packages/retrieval/dist/index.js
15961
+ // ../packages/retrieval/dist/index.js
15962
15962
  var dist_exports = {};
15963
15963
  __export(dist_exports, {
15964
15964
  CodeRetriever: () => CodeRetriever,
@@ -15983,7 +15983,7 @@ __export(dist_exports, {
15983
15983
  testsForFiles: () => testsForFiles
15984
15984
  });
15985
15985
  var init_dist4 = __esm({
15986
- "packages/retrieval/dist/index.js"() {
15986
+ "../packages/retrieval/dist/index.js"() {
15987
15987
  "use strict";
15988
15988
  init_code_retriever();
15989
15989
  init_grep_search2();
@@ -15995,7 +15995,7 @@ var init_dist4 = __esm({
15995
15995
  }
15996
15996
  });
15997
15997
 
15998
- // packages/orchestrator/dist/scoutRunner.js
15998
+ // ../packages/orchestrator/dist/scoutRunner.js
15999
15999
  async function loadCodeRetriever(rootDir) {
16000
16000
  const mod = await Promise.resolve().then(() => (init_dist4(), dist_exports));
16001
16001
  return new mod.CodeRetriever({ rootDir });
@@ -16026,7 +16026,7 @@ function scoutPrompt(task, repoProfile, candidateFiles, subtasks) {
16026
16026
  }
16027
16027
  var ScoutRunner;
16028
16028
  var init_scoutRunner = __esm({
16029
- "packages/orchestrator/dist/scoutRunner.js"() {
16029
+ "../packages/orchestrator/dist/scoutRunner.js"() {
16030
16030
  "use strict";
16031
16031
  init_dist3();
16032
16032
  init_promptLoader();
@@ -16132,7 +16132,7 @@ var init_scoutRunner = __esm({
16132
16132
  }
16133
16133
  });
16134
16134
 
16135
- // packages/orchestrator/dist/editorRunner.js
16135
+ // ../packages/orchestrator/dist/editorRunner.js
16136
16136
  function editorPrompt(task, subtask, retrievalPacket, previousVerification, retryNumber) {
16137
16137
  const filesSection = Object.entries(retrievalPacket.files).map(([path, content]) => `=== ${path} ===
16138
16138
  ${content}`).join("\n\n");
@@ -16160,7 +16160,7 @@ function parseJsonFromContent5(content) {
16160
16160
  }
16161
16161
  var EditorRunner;
16162
16162
  var init_editorRunner = __esm({
16163
- "packages/orchestrator/dist/editorRunner.js"() {
16163
+ "../packages/orchestrator/dist/editorRunner.js"() {
16164
16164
  "use strict";
16165
16165
  init_dist3();
16166
16166
  init_promptLoader();
@@ -16218,7 +16218,7 @@ var init_editorRunner = __esm({
16218
16218
  }
16219
16219
  });
16220
16220
 
16221
- // packages/orchestrator/dist/verifierRunner.js
16221
+ // ../packages/orchestrator/dist/verifierRunner.js
16222
16222
  function verifierPrompt(task, subtask, patch, toolOutput) {
16223
16223
  const toolSection = toolOutput ? `TOOL EXECUTION OUTPUT:
16224
16224
  ${toolOutput}` : "TOOL EXECUTION OUTPUT: (not executed)";
@@ -16246,7 +16246,7 @@ function parseJsonFromContent6(content) {
16246
16246
  }
16247
16247
  var VerifierRunner;
16248
16248
  var init_verifierRunner = __esm({
16249
- "packages/orchestrator/dist/verifierRunner.js"() {
16249
+ "../packages/orchestrator/dist/verifierRunner.js"() {
16250
16250
  "use strict";
16251
16251
  init_dist3();
16252
16252
  init_promptLoader();
@@ -16341,10 +16341,10 @@ FAILED: ${execError.stderr ?? execError.stdout ?? execError.message ?? "unknown
16341
16341
  }
16342
16342
  });
16343
16343
 
16344
- // packages/orchestrator/dist/mergeRunner.js
16344
+ // ../packages/orchestrator/dist/mergeRunner.js
16345
16345
  var MergeRunner;
16346
16346
  var init_mergeRunner = __esm({
16347
- "packages/orchestrator/dist/mergeRunner.js"() {
16347
+ "../packages/orchestrator/dist/mergeRunner.js"() {
16348
16348
  "use strict";
16349
16349
  init_promptLoader();
16350
16350
  MergeRunner = class {
@@ -16429,10 +16429,10 @@ var init_mergeRunner = __esm({
16429
16429
  }
16430
16430
  });
16431
16431
 
16432
- // packages/orchestrator/dist/retryController.js
16432
+ // ../packages/orchestrator/dist/retryController.js
16433
16433
  var RetryController;
16434
16434
  var init_retryController = __esm({
16435
- "packages/orchestrator/dist/retryController.js"() {
16435
+ "../packages/orchestrator/dist/retryController.js"() {
16436
16436
  "use strict";
16437
16437
  RetryController = class {
16438
16438
  maxRetries;
@@ -16529,7 +16529,7 @@ var init_retryController = __esm({
16529
16529
  }
16530
16530
  });
16531
16531
 
16532
- // packages/orchestrator/dist/ralphLoop.js
16532
+ // ../packages/orchestrator/dist/ralphLoop.js
16533
16533
  function isoNow() {
16534
16534
  return (/* @__PURE__ */ new Date()).toISOString();
16535
16535
  }
@@ -16577,7 +16577,7 @@ function deriveTerminalStatus(executions) {
16577
16577
  }
16578
16578
  var RalphLoop;
16579
16579
  var init_ralphLoop = __esm({
16580
- "packages/orchestrator/dist/ralphLoop.js"() {
16580
+ "../packages/orchestrator/dist/ralphLoop.js"() {
16581
16581
  "use strict";
16582
16582
  init_taskNormalizer();
16583
16583
  init_dispatcher();
@@ -16860,7 +16860,7 @@ var init_ralphLoop = __esm({
16860
16860
  }
16861
16861
  });
16862
16862
 
16863
- // packages/orchestrator/dist/personality.js
16863
+ // ../packages/orchestrator/dist/personality.js
16864
16864
  function compilePersonalityPrompt(profile, presetName) {
16865
16865
  if (presetName === "stark") {
16866
16866
  return loadPrompt("personality/level-stark.md");
@@ -16888,7 +16888,7 @@ function getPreset(name) {
16888
16888
  }
16889
16889
  var PERSONALITY_PRESETS, PRESET_NAMES;
16890
16890
  var init_personality = __esm({
16891
- "packages/orchestrator/dist/personality.js"() {
16891
+ "../packages/orchestrator/dist/personality.js"() {
16892
16892
  "use strict";
16893
16893
  init_promptLoader();
16894
16894
  PERSONALITY_PRESETS = {
@@ -16909,7 +16909,7 @@ var init_personality = __esm({
16909
16909
  }
16910
16910
  });
16911
16911
 
16912
- // packages/orchestrator/dist/agenticRunner.js
16912
+ // ../packages/orchestrator/dist/agenticRunner.js
16913
16913
  function repairJson(raw) {
16914
16914
  if (!raw || typeof raw !== "string")
16915
16915
  return null;
@@ -16975,7 +16975,7 @@ function getSystemPromptForTier(tier) {
16975
16975
  }
16976
16976
  var SYSTEM_PROMPT, SYSTEM_PROMPT_MEDIUM, SYSTEM_PROMPT_SMALL, AgenticRunner, OllamaAgenticBackend;
16977
16977
  var init_agenticRunner = __esm({
16978
- "packages/orchestrator/dist/agenticRunner.js"() {
16978
+ "../packages/orchestrator/dist/agenticRunner.js"() {
16979
16979
  "use strict";
16980
16980
  init_dist();
16981
16981
  init_personality();
@@ -17464,7 +17464,9 @@ If you're stuck, try a completely different approach. Do NOT repeat what failed
17464
17464
  } catch (reqErr) {
17465
17465
  const recovered = await this.retryOnTransient(reqErr, chatRequest, turn);
17466
17466
  if (!recovered) {
17467
- this.emit({ type: "error", content: `Backend error: ${reqErr instanceof Error ? reqErr.message : String(reqErr)}`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
17467
+ const errMsg = reqErr instanceof Error ? reqErr.message : String(reqErr);
17468
+ const cause = reqErr instanceof Error && reqErr.cause ? ` (${reqErr.cause.message ?? ""} ${reqErr.cause?.code ?? ""})` : "";
17469
+ this.emit({ type: "error", content: `Backend error: ${errMsg}${cause}`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
17468
17470
  messages.push({ role: "user", content: "[System: backend request failed, retrying on next turn. The previous request was lost.]" });
17469
17471
  continue;
17470
17472
  }
@@ -17974,7 +17976,9 @@ Integrate this guidance into your current approach. Continue working on the task
17974
17976
  } catch (reqErr) {
17975
17977
  const recovered = await this.retryOnTransient(reqErr, chatRequest, turn);
17976
17978
  if (!recovered) {
17977
- this.emit({ type: "error", content: `Backend error: ${reqErr instanceof Error ? reqErr.message : String(reqErr)}`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
17979
+ const errMsg2 = reqErr instanceof Error ? reqErr.message : String(reqErr);
17980
+ const cause2 = reqErr instanceof Error && reqErr.cause ? ` (${reqErr.cause.message ?? ""} ${reqErr.cause?.code ?? ""})` : "";
17981
+ this.emit({ type: "error", content: `Backend error: ${errMsg2}${cause2}`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
17978
17982
  messages.push({ role: "user", content: "[System: backend request failed, retrying on next turn. The previous request was lost.]" });
17979
17983
  continue;
17980
17984
  }
@@ -19502,10 +19506,10 @@ ${transcript}`
19502
19506
  }
19503
19507
  });
19504
19508
 
19505
- // packages/orchestrator/dist/nexusBackend.js
19509
+ // ../packages/orchestrator/dist/nexusBackend.js
19506
19510
  var NexusAgenticBackend;
19507
19511
  var init_nexusBackend = __esm({
19508
- "packages/orchestrator/dist/nexusBackend.js"() {
19512
+ "../packages/orchestrator/dist/nexusBackend.js"() {
19509
19513
  "use strict";
19510
19514
  NexusAgenticBackend = class {
19511
19515
  sendFn;
@@ -19660,10 +19664,10 @@ var init_nexusBackend = __esm({
19660
19664
  }
19661
19665
  });
19662
19666
 
19663
- // packages/orchestrator/dist/flowstatePrompt.js
19667
+ // ../packages/orchestrator/dist/flowstatePrompt.js
19664
19668
  var FLOWSTATE_PROMPT;
19665
19669
  var init_flowstatePrompt = __esm({
19666
- "packages/orchestrator/dist/flowstatePrompt.js"() {
19670
+ "../packages/orchestrator/dist/flowstatePrompt.js"() {
19667
19671
  "use strict";
19668
19672
  FLOWSTATE_PROMPT = `## FlowState Protocol (Active)
19669
19673
 
@@ -19714,10 +19718,10 @@ Constrain your context. Clarify your target. Focus your tools. Flow will follow.
19714
19718
  }
19715
19719
  });
19716
19720
 
19717
- // packages/orchestrator/dist/costTracker.js
19721
+ // ../packages/orchestrator/dist/costTracker.js
19718
19722
  var DEFAULT_PRICING, CostTracker;
19719
19723
  var init_costTracker = __esm({
19720
- "packages/orchestrator/dist/costTracker.js"() {
19724
+ "../packages/orchestrator/dist/costTracker.js"() {
19721
19725
  "use strict";
19722
19726
  DEFAULT_PRICING = [
19723
19727
  // Cloud providers — typical pricing tiers
@@ -19865,7 +19869,7 @@ var init_costTracker = __esm({
19865
19869
  }
19866
19870
  });
19867
19871
 
19868
- // packages/orchestrator/dist/workEvaluator.js
19872
+ // ../packages/orchestrator/dist/workEvaluator.js
19869
19873
  function detectTaskType(taskDescription) {
19870
19874
  let bestType = "general";
19871
19875
  let bestScore = 0;
@@ -19900,7 +19904,7 @@ function buildEvaluationPrompt(task, summary, rubric) {
19900
19904
  }
19901
19905
  var RUBRICS, TASK_TYPE_PATTERNS, WorkEvaluator;
19902
19906
  var init_workEvaluator = __esm({
19903
- "packages/orchestrator/dist/workEvaluator.js"() {
19907
+ "../packages/orchestrator/dist/workEvaluator.js"() {
19904
19908
  "use strict";
19905
19909
  init_promptLoader();
19906
19910
  RUBRICS = {
@@ -20071,10 +20075,10 @@ var init_workEvaluator = __esm({
20071
20075
  }
20072
20076
  });
20073
20077
 
20074
- // packages/orchestrator/dist/sessionMetrics.js
20078
+ // ../packages/orchestrator/dist/sessionMetrics.js
20075
20079
  var SessionMetrics;
20076
20080
  var init_sessionMetrics = __esm({
20077
- "packages/orchestrator/dist/sessionMetrics.js"() {
20081
+ "../packages/orchestrator/dist/sessionMetrics.js"() {
20078
20082
  "use strict";
20079
20083
  SessionMetrics = class {
20080
20084
  sessionStart;
@@ -20171,16 +20175,16 @@ var init_sessionMetrics = __esm({
20171
20175
  }
20172
20176
  });
20173
20177
 
20174
- // packages/orchestrator/dist/taskLearning.js
20178
+ // ../packages/orchestrator/dist/taskLearning.js
20175
20179
  var init_taskLearning = __esm({
20176
- "packages/orchestrator/dist/taskLearning.js"() {
20180
+ "../packages/orchestrator/dist/taskLearning.js"() {
20177
20181
  "use strict";
20178
20182
  }
20179
20183
  });
20180
20184
 
20181
- // packages/orchestrator/dist/index.js
20185
+ // ../packages/orchestrator/dist/index.js
20182
20186
  var init_dist5 = __esm({
20183
- "packages/orchestrator/dist/index.js"() {
20187
+ "../packages/orchestrator/dist/index.js"() {
20184
20188
  "use strict";
20185
20189
  init_agent_loop();
20186
20190
  init_ralphLoop();
@@ -20203,7 +20207,7 @@ var init_dist5 = __esm({
20203
20207
  }
20204
20208
  });
20205
20209
 
20206
- // packages/cli/dist/tui/listen.js
20210
+ // ../packages/cli/dist/tui/listen.js
20207
20211
  var listen_exports = {};
20208
20212
  __export(listen_exports, {
20209
20213
  ListenEngine: () => ListenEngine,
@@ -20358,9 +20362,9 @@ function ensureTranscribeCliBackground() {
20358
20362
  } catch {
20359
20363
  }
20360
20364
  try {
20361
- const { exec } = await import("node:child_process");
20365
+ const { exec: exec2 } = await import("node:child_process");
20362
20366
  return new Promise((resolve31) => {
20363
- exec("npm i -g transcribe-cli", { timeout: 18e4 }, (err) => {
20367
+ exec2("npm i -g transcribe-cli", { timeout: 18e4 }, (err) => {
20364
20368
  resolve31(!err);
20365
20369
  });
20366
20370
  });
@@ -20383,7 +20387,7 @@ function getListenEngine(config) {
20383
20387
  }
20384
20388
  var AUDIO_EXTENSIONS, VIDEO_EXTENSIONS, WhisperFallbackTranscriber, ListenEngine, _bgInstallPromise, _engine;
20385
20389
  var init_listen = __esm({
20386
- "packages/cli/dist/tui/listen.js"() {
20390
+ "../packages/cli/dist/tui/listen.js"() {
20387
20391
  "use strict";
20388
20392
  AUDIO_EXTENSIONS = /* @__PURE__ */ new Set([
20389
20393
  ".mp3",
@@ -20922,9 +20926,9 @@ transcribe-cli error: ${transcribeCliError}` : "";
20922
20926
  }
20923
20927
  });
20924
20928
 
20925
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/constants.js
20929
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/constants.js
20926
20930
  var require_constants = __commonJS({
20927
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/constants.js"(exports, module) {
20931
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/constants.js"(exports, module) {
20928
20932
  "use strict";
20929
20933
  var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
20930
20934
  var hasBlob = typeof Blob !== "undefined";
@@ -20945,9 +20949,9 @@ var require_constants = __commonJS({
20945
20949
  }
20946
20950
  });
20947
20951
 
20948
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/buffer-util.js
20952
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/buffer-util.js
20949
20953
  var require_buffer_util = __commonJS({
20950
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/buffer-util.js"(exports, module) {
20954
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/buffer-util.js"(exports, module) {
20951
20955
  "use strict";
20952
20956
  var { EMPTY_BUFFER } = require_constants();
20953
20957
  var FastBuffer = Buffer[Symbol.species];
@@ -21020,9 +21024,9 @@ var require_buffer_util = __commonJS({
21020
21024
  }
21021
21025
  });
21022
21026
 
21023
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/limiter.js
21027
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/limiter.js
21024
21028
  var require_limiter = __commonJS({
21025
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/limiter.js"(exports, module) {
21029
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/limiter.js"(exports, module) {
21026
21030
  "use strict";
21027
21031
  var kDone = /* @__PURE__ */ Symbol("kDone");
21028
21032
  var kRun = /* @__PURE__ */ Symbol("kRun");
@@ -21070,9 +21074,9 @@ var require_limiter = __commonJS({
21070
21074
  }
21071
21075
  });
21072
21076
 
21073
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/permessage-deflate.js
21077
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/permessage-deflate.js
21074
21078
  var require_permessage_deflate = __commonJS({
21075
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
21079
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
21076
21080
  "use strict";
21077
21081
  var zlib = __require("zlib");
21078
21082
  var bufferUtil = require_buffer_util();
@@ -21453,9 +21457,9 @@ var require_permessage_deflate = __commonJS({
21453
21457
  }
21454
21458
  });
21455
21459
 
21456
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/validation.js
21460
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/validation.js
21457
21461
  var require_validation = __commonJS({
21458
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/validation.js"(exports, module) {
21462
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/validation.js"(exports, module) {
21459
21463
  "use strict";
21460
21464
  var { isUtf8 } = __require("buffer");
21461
21465
  var { hasBlob } = require_constants();
@@ -21654,9 +21658,9 @@ var require_validation = __commonJS({
21654
21658
  }
21655
21659
  });
21656
21660
 
21657
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/receiver.js
21661
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/receiver.js
21658
21662
  var require_receiver = __commonJS({
21659
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/receiver.js"(exports, module) {
21663
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/receiver.js"(exports, module) {
21660
21664
  "use strict";
21661
21665
  var { Writable: Writable2 } = __require("stream");
21662
21666
  var PerMessageDeflate = require_permessage_deflate();
@@ -22246,9 +22250,9 @@ var require_receiver = __commonJS({
22246
22250
  }
22247
22251
  });
22248
22252
 
22249
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/sender.js
22253
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/sender.js
22250
22254
  var require_sender = __commonJS({
22251
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/sender.js"(exports, module) {
22255
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/sender.js"(exports, module) {
22252
22256
  "use strict";
22253
22257
  var { Duplex } = __require("stream");
22254
22258
  var { randomFillSync } = __require("crypto");
@@ -22734,9 +22738,9 @@ var require_sender = __commonJS({
22734
22738
  }
22735
22739
  });
22736
22740
 
22737
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/event-target.js
22741
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/event-target.js
22738
22742
  var require_event_target = __commonJS({
22739
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/event-target.js"(exports, module) {
22743
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/event-target.js"(exports, module) {
22740
22744
  "use strict";
22741
22745
  var { kForOnEventAttribute, kListener } = require_constants();
22742
22746
  var kCode = /* @__PURE__ */ Symbol("kCode");
@@ -22963,9 +22967,9 @@ var require_event_target = __commonJS({
22963
22967
  }
22964
22968
  });
22965
22969
 
22966
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/extension.js
22970
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/extension.js
22967
22971
  var require_extension = __commonJS({
22968
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/extension.js"(exports, module) {
22972
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/extension.js"(exports, module) {
22969
22973
  "use strict";
22970
22974
  var { tokenChars } = require_validation();
22971
22975
  function push(dest, name, elem) {
@@ -23116,9 +23120,9 @@ var require_extension = __commonJS({
23116
23120
  }
23117
23121
  });
23118
23122
 
23119
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket.js
23123
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket.js
23120
23124
  var require_websocket = __commonJS({
23121
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket.js"(exports, module) {
23125
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket.js"(exports, module) {
23122
23126
  "use strict";
23123
23127
  var EventEmitter7 = __require("events");
23124
23128
  var https = __require("https");
@@ -24002,9 +24006,9 @@ var require_websocket = __commonJS({
24002
24006
  }
24003
24007
  });
24004
24008
 
24005
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/stream.js
24009
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/stream.js
24006
24010
  var require_stream = __commonJS({
24007
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/stream.js"(exports, module) {
24011
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/stream.js"(exports, module) {
24008
24012
  "use strict";
24009
24013
  var WebSocket2 = require_websocket();
24010
24014
  var { Duplex } = __require("stream");
@@ -24100,9 +24104,9 @@ var require_stream = __commonJS({
24100
24104
  }
24101
24105
  });
24102
24106
 
24103
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/subprotocol.js
24107
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/subprotocol.js
24104
24108
  var require_subprotocol = __commonJS({
24105
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/subprotocol.js"(exports, module) {
24109
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/subprotocol.js"(exports, module) {
24106
24110
  "use strict";
24107
24111
  var { tokenChars } = require_validation();
24108
24112
  function parse(header) {
@@ -24145,9 +24149,9 @@ var require_subprotocol = __commonJS({
24145
24149
  }
24146
24150
  });
24147
24151
 
24148
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket-server.js
24152
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket-server.js
24149
24153
  var require_websocket_server = __commonJS({
24150
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket-server.js"(exports, module) {
24154
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket-server.js"(exports, module) {
24151
24155
  "use strict";
24152
24156
  var EventEmitter7 = __require("events");
24153
24157
  var http = __require("http");
@@ -24538,10 +24542,10 @@ var require_websocket_server = __commonJS({
24538
24542
  }
24539
24543
  });
24540
24544
 
24541
- // node_modules/.pnpm/ws@8.19.0/node_modules/ws/wrapper.mjs
24545
+ // ../node_modules/.pnpm/ws@8.19.0/node_modules/ws/wrapper.mjs
24542
24546
  var import_stream, import_receiver, import_sender, import_websocket, import_websocket_server;
24543
24547
  var init_wrapper = __esm({
24544
- "node_modules/.pnpm/ws@8.19.0/node_modules/ws/wrapper.mjs"() {
24548
+ "../node_modules/.pnpm/ws@8.19.0/node_modules/ws/wrapper.mjs"() {
24545
24549
  import_stream = __toESM(require_stream(), 1);
24546
24550
  import_receiver = __toESM(require_receiver(), 1);
24547
24551
  import_sender = __toESM(require_sender(), 1);
@@ -24550,7 +24554,7 @@ var init_wrapper = __esm({
24550
24554
  }
24551
24555
  });
24552
24556
 
24553
- // packages/cli/dist/tui/render.js
24557
+ // ../packages/cli/dist/tui/render.js
24554
24558
  function ansi2(code, text) {
24555
24559
  return isTTY2 ? `\x1B[${code}m${text}\x1B[0m` : text;
24556
24560
  }
@@ -25181,7 +25185,7 @@ function formatToolArgs(toolName, args, verbose) {
25181
25185
  case "memory_write":
25182
25186
  return `${args["topic"]}.${args["key"]}`;
25183
25187
  case "task_complete":
25184
- return truncStr(String(args["summary"] ?? ""), maxArg);
25188
+ return "";
25185
25189
  case "aiwg_setup":
25186
25190
  return String(args["framework"] ?? "sdlc");
25187
25191
  case "aiwg_health":
@@ -25239,7 +25243,7 @@ function formatDuration2(ms) {
25239
25243
  }
25240
25244
  var isTTY2, c2, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, TOOL_COLORS, _contentWriteHook, HINTS, TOOL_NAMES, COMMAND_NAMES;
25241
25245
  var init_render = __esm({
25242
- "packages/cli/dist/tui/render.js"() {
25246
+ "../packages/cli/dist/tui/render.js"() {
25243
25247
  "use strict";
25244
25248
  isTTY2 = process.stdout.isTTY ?? false;
25245
25249
  c2 = {
@@ -25464,7 +25468,7 @@ var init_render = __esm({
25464
25468
  }
25465
25469
  });
25466
25470
 
25467
- // packages/cli/dist/tui/voice-session.js
25471
+ // ../packages/cli/dist/tui/voice-session.js
25468
25472
  import { createServer } from "node:http";
25469
25473
  import { spawn as spawn13, execSync as execSync24 } from "node:child_process";
25470
25474
  import { EventEmitter as EventEmitter2 } from "node:events";
@@ -25845,7 +25849,7 @@ function renderVoiceSessionTranscript(speaker, text) {
25845
25849
  }
25846
25850
  var VoiceSession;
25847
25851
  var init_voice_session = __esm({
25848
- "packages/cli/dist/tui/voice-session.js"() {
25852
+ "../packages/cli/dist/tui/voice-session.js"() {
25849
25853
  "use strict";
25850
25854
  init_wrapper();
25851
25855
  init_render();
@@ -26192,14 +26196,32 @@ var init_voice_session = __esm({
26192
26196
  }
26193
26197
  });
26194
26198
 
26195
- // packages/cli/dist/tui/expose.js
26199
+ // ../packages/cli/dist/tui/expose.js
26196
26200
  import { createServer as createServer2, request as httpRequest } from "node:http";
26197
- import { spawn as spawn14, execSync as execSync25 } from "node:child_process";
26201
+ import { spawn as spawn14, exec } from "node:child_process";
26198
26202
  import { EventEmitter as EventEmitter3 } from "node:events";
26199
26203
  import { randomBytes as randomBytes7 } from "node:crypto";
26200
26204
  import { URL as URL2 } from "node:url";
26201
26205
  import { loadavg, cpus, totalmem, freemem } from "node:os";
26202
- function collectSystemMetrics() {
26206
+ function cleanForwardHeaders(raw, targetHost) {
26207
+ const out = {};
26208
+ for (const [key, value] of Object.entries(raw)) {
26209
+ if (HOP_BY_HOP_HEADERS.has(key))
26210
+ continue;
26211
+ if (CF_HEADERS_PREFIX.some((p) => key.startsWith(p)))
26212
+ continue;
26213
+ if (key === "authorization")
26214
+ continue;
26215
+ if (key.startsWith("x-forwarded-"))
26216
+ continue;
26217
+ if (key === "sec-fetch-mode")
26218
+ continue;
26219
+ out[key] = value;
26220
+ }
26221
+ out.host = targetHost;
26222
+ return out;
26223
+ }
26224
+ async function collectSystemMetricsAsync() {
26203
26225
  const [l1, l5, l15] = loadavg();
26204
26226
  const cores = cpus().length;
26205
26227
  const totalMem = totalmem();
@@ -26214,7 +26236,9 @@ function collectSystemMetrics() {
26214
26236
  vramUtilization: 0
26215
26237
  };
26216
26238
  try {
26217
- const smi = execSync25("nvidia-smi --query-gpu=utilization.gpu,memory.used,memory.total,name --format=csv,noheader,nounits 2>/dev/null", { encoding: "utf8", timeout: 3e3 });
26239
+ const smi = await new Promise((resolve31, reject) => {
26240
+ exec("nvidia-smi --query-gpu=utilization.gpu,memory.used,memory.total,name --format=csv,noheader,nounits 2>/dev/null", { encoding: "utf8", timeout: 3e3 }, (err, stdout) => err ? reject(err) : resolve31(stdout));
26241
+ });
26218
26242
  const line = smi.trim().split("\n")[0];
26219
26243
  if (line) {
26220
26244
  const parts = line.split(",").map((s) => s.trim());
@@ -26245,11 +26269,22 @@ function collectSystemMetrics() {
26245
26269
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
26246
26270
  };
26247
26271
  }
26248
- var DEFAULT_TARGETS, ExposeGateway;
26272
+ var HOP_BY_HOP_HEADERS, CF_HEADERS_PREFIX, DEFAULT_TARGETS, ExposeGateway;
26249
26273
  var init_expose = __esm({
26250
- "packages/cli/dist/tui/expose.js"() {
26274
+ "../packages/cli/dist/tui/expose.js"() {
26251
26275
  "use strict";
26252
26276
  init_render();
26277
+ HOP_BY_HOP_HEADERS = /* @__PURE__ */ new Set([
26278
+ "connection",
26279
+ "keep-alive",
26280
+ "proxy-authenticate",
26281
+ "proxy-authorization",
26282
+ "te",
26283
+ "trailers",
26284
+ "transfer-encoding",
26285
+ "upgrade"
26286
+ ]);
26287
+ CF_HEADERS_PREFIX = ["cf-", "cdn-"];
26253
26288
  DEFAULT_TARGETS = {
26254
26289
  ollama: "http://127.0.0.1:11434",
26255
26290
  vllm: "http://127.0.0.1:8000",
@@ -26344,15 +26379,19 @@ var init_expose = __esm({
26344
26379
  return;
26345
26380
  }
26346
26381
  if (url.pathname === "/v1/system/metrics" && req.method === "GET") {
26347
- const metrics = collectSystemMetrics();
26348
- const gatewayStats = {
26349
- totalRequests: this._stats.totalRequests,
26350
- activeConnections: this._stats.activeConnections,
26351
- errors: this._stats.errors,
26352
- modelUsage: Object.fromEntries(this._stats.modelUsage)
26353
- };
26354
- res.writeHead(200, { "Content-Type": "application/json" });
26355
- res.end(JSON.stringify({ ...metrics, gateway: gatewayStats }));
26382
+ collectSystemMetricsAsync().then((metrics) => {
26383
+ const gatewayStats = {
26384
+ totalRequests: this._stats.totalRequests,
26385
+ activeConnections: this._stats.activeConnections,
26386
+ errors: this._stats.errors,
26387
+ modelUsage: Object.fromEntries(this._stats.modelUsage)
26388
+ };
26389
+ res.writeHead(200, { "Content-Type": "application/json" });
26390
+ res.end(JSON.stringify({ ...metrics, gateway: gatewayStats }));
26391
+ }).catch(() => {
26392
+ res.writeHead(500);
26393
+ res.end("metrics error");
26394
+ });
26356
26395
  return;
26357
26396
  }
26358
26397
  this._stats.totalRequests++;
@@ -26364,6 +26403,7 @@ var init_expose = __esm({
26364
26403
  req.on("data", (chunk) => bodyChunks.push(chunk));
26365
26404
  req.on("end", () => {
26366
26405
  const body = Buffer.concat(bodyChunks);
26406
+ let isStreaming = false;
26367
26407
  if (req.method === "POST" && body.length > 0) {
26368
26408
  try {
26369
26409
  const text = body.toString("utf8", 0, Math.min(body.length, 1024));
@@ -26373,14 +26413,35 @@ var init_expose = __esm({
26373
26413
  const count = this._stats.modelUsage.get(model) ?? 0;
26374
26414
  this._stats.modelUsage.set(model, count + 1);
26375
26415
  }
26416
+ isStreaming = /"stream"\s*:\s*true/.test(text);
26376
26417
  } catch {
26377
26418
  }
26378
26419
  }
26379
- const forwardHeaders = { ...req.headers, host: target.host };
26380
- delete forwardHeaders.authorization;
26420
+ const forwardHeaders = cleanForwardHeaders(req.headers, target.host);
26381
26421
  if (body.length > 0) {
26382
26422
  forwardHeaders["content-length"] = String(body.length);
26383
26423
  }
26424
+ let heartbeatTimer = null;
26425
+ if (isStreaming) {
26426
+ res.writeHead(200, {
26427
+ "Content-Type": "text/event-stream",
26428
+ "Cache-Control": "no-cache",
26429
+ "X-Accel-Buffering": "no"
26430
+ // tells nginx/CF not to buffer
26431
+ });
26432
+ heartbeatTimer = setInterval(() => {
26433
+ try {
26434
+ res.write(": heartbeat\n\n");
26435
+ } catch {
26436
+ }
26437
+ }, 15e3);
26438
+ }
26439
+ const cleanupHeartbeat = () => {
26440
+ if (heartbeatTimer) {
26441
+ clearInterval(heartbeatTimer);
26442
+ heartbeatTimer = null;
26443
+ }
26444
+ };
26384
26445
  const proxyReq = httpRequest({
26385
26446
  hostname: target.hostname,
26386
26447
  port: target.port || (target.protocol === "https:" ? 443 : 80),
@@ -26388,24 +26449,58 @@ var init_expose = __esm({
26388
26449
  method: req.method,
26389
26450
  headers: forwardHeaders
26390
26451
  }, (proxyRes) => {
26452
+ cleanupHeartbeat();
26391
26453
  proxyRes.on("error", () => {
26392
26454
  this._stats.activeConnections = Math.max(0, this._stats.activeConnections - 1);
26393
26455
  this.emitStats();
26394
26456
  });
26395
- res.writeHead(proxyRes.statusCode ?? 502, proxyRes.headers);
26396
- proxyRes.pipe(res);
26457
+ if (isStreaming) {
26458
+ if (proxyRes.statusCode !== 200) {
26459
+ let errBody = "";
26460
+ proxyRes.on("data", (chunk) => {
26461
+ errBody += chunk.toString();
26462
+ });
26463
+ proxyRes.on("end", () => {
26464
+ try {
26465
+ res.write(`data: ${JSON.stringify({ error: `Backend ${proxyRes.statusCode}: ${errBody.slice(0, 200)}` })}
26466
+
26467
+ `);
26468
+ } catch {
26469
+ }
26470
+ try {
26471
+ res.end();
26472
+ } catch {
26473
+ }
26474
+ this._stats.errors++;
26475
+ this._stats.activeConnections = Math.max(0, this._stats.activeConnections - 1);
26476
+ this.emitStats();
26477
+ });
26478
+ return;
26479
+ }
26480
+ proxyRes.pipe(res);
26481
+ } else {
26482
+ res.writeHead(proxyRes.statusCode ?? 502, proxyRes.headers);
26483
+ proxyRes.pipe(res);
26484
+ }
26397
26485
  proxyRes.on("end", () => {
26398
26486
  this._stats.activeConnections = Math.max(0, this._stats.activeConnections - 1);
26399
26487
  this.emitStats();
26400
26488
  });
26401
26489
  });
26402
26490
  proxyReq.on("error", (err) => {
26491
+ cleanupHeartbeat();
26403
26492
  this._stats.errors++;
26404
26493
  this._stats.activeConnections = Math.max(0, this._stats.activeConnections - 1);
26405
26494
  if (!res.headersSent) {
26406
26495
  res.writeHead(502, { "Content-Type": "application/json" });
26407
26496
  res.end(JSON.stringify({ error: `Backend unreachable: ${err.message}` }));
26408
26497
  } else {
26498
+ try {
26499
+ res.write(`data: ${JSON.stringify({ error: err.message })}
26500
+
26501
+ `);
26502
+ } catch {
26503
+ }
26409
26504
  try {
26410
26505
  res.end();
26411
26506
  } catch {
@@ -26429,7 +26524,10 @@ var init_expose = __esm({
26429
26524
  return server;
26430
26525
  }
26431
26526
  // ── Cloudflared ─────────────────────────────────────────────────────────
26527
+ /** Port the proxy is listening on (needed for cloudflared restart) */
26528
+ _proxyPort = 0;
26432
26529
  startCloudflared(port) {
26530
+ this._proxyPort = port;
26433
26531
  return new Promise((resolve31, reject) => {
26434
26532
  const timeout = setTimeout(() => {
26435
26533
  reject(new Error("Cloudflared tunnel start timeout (30s)"));
@@ -26437,7 +26535,9 @@ var init_expose = __esm({
26437
26535
  this.cloudflaredProcess = spawn14("cloudflared", [
26438
26536
  "tunnel",
26439
26537
  "--url",
26440
- `http://127.0.0.1:${port}`
26538
+ `http://127.0.0.1:${port}`,
26539
+ "--proxy-keepalive-timeout",
26540
+ "300s"
26441
26541
  ], {
26442
26542
  stdio: ["ignore", "pipe", "pipe"]
26443
26543
  });
@@ -26463,12 +26563,27 @@ var init_expose = __esm({
26463
26563
  reject(new Error(`Cloudflared exited with code ${code} before providing URL`));
26464
26564
  }
26465
26565
  if (this._stats.status === "active") {
26566
+ this.options.onInfo?.("Cloudflared tunnel died \u2014 restarting...");
26466
26567
  this._stats.status = "error";
26467
26568
  this.emitStats();
26569
+ this.restartCloudflared();
26468
26570
  }
26469
26571
  });
26470
26572
  });
26471
26573
  }
26574
+ /** Auto-restart cloudflared after unexpected exit (new URL assigned) */
26575
+ async restartCloudflared() {
26576
+ if (!this.server || this._proxyPort === 0)
26577
+ return;
26578
+ try {
26579
+ this._tunnelUrl = await this.startCloudflared(this._proxyPort);
26580
+ this._stats.status = "active";
26581
+ this.emitStats();
26582
+ this.options.onInfo?.(`Tunnel restarted: ${this._tunnelUrl}`);
26583
+ } catch (err) {
26584
+ this.options.onError?.(`Tunnel restart failed: ${err instanceof Error ? err.message : String(err)}`);
26585
+ }
26586
+ }
26472
26587
  // ── Helpers ─────────────────────────────────────────────────────────────
26473
26588
  findFreePort() {
26474
26589
  return new Promise((resolve31, reject) => {
@@ -26523,25 +26638,25 @@ var init_expose = __esm({
26523
26638
  }
26524
26639
  });
26525
26640
 
26526
- // packages/cli/dist/tui/p2p/types.js
26641
+ // ../packages/cli/dist/tui/p2p/types.js
26527
26642
  function trustLevel(tier) {
26528
26643
  return TRUST_ORDER.indexOf(tier);
26529
26644
  }
26530
26645
  var TRUST_ORDER;
26531
26646
  var init_types = __esm({
26532
- "packages/cli/dist/tui/p2p/types.js"() {
26647
+ "../packages/cli/dist/tui/p2p/types.js"() {
26533
26648
  "use strict";
26534
26649
  TRUST_ORDER = ["public", "verified", "tee", "local"];
26535
26650
  }
26536
26651
  });
26537
26652
 
26538
- // packages/cli/dist/tui/p2p/secret-vault.js
26653
+ // ../packages/cli/dist/tui/p2p/secret-vault.js
26539
26654
  import { createCipheriv as createCipheriv2, createDecipheriv as createDecipheriv2, randomBytes as randomBytes8, scryptSync as scryptSync2, createHash as createHash2 } from "node:crypto";
26540
26655
  import { readFileSync as readFileSync18, writeFileSync as writeFileSync8, existsSync as existsSync26, mkdirSync as mkdirSync8 } from "node:fs";
26541
26656
  import { join as join35, dirname as dirname13 } from "node:path";
26542
26657
  var PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX, CIPHER_ALGO, SALT_LEN, IV_LEN, KEY_LEN, SecretVault;
26543
26658
  var init_secret_vault = __esm({
26544
- "packages/cli/dist/tui/p2p/secret-vault.js"() {
26659
+ "../packages/cli/dist/tui/p2p/secret-vault.js"() {
26545
26660
  "use strict";
26546
26661
  init_types();
26547
26662
  PLACEHOLDER_PREFIX = "{{OA_VAR_";
@@ -26799,13 +26914,13 @@ var init_secret_vault = __esm({
26799
26914
  }
26800
26915
  });
26801
26916
 
26802
- // packages/cli/dist/tui/p2p/peer-mesh.js
26917
+ // ../packages/cli/dist/tui/p2p/peer-mesh.js
26803
26918
  import { EventEmitter as EventEmitter4 } from "node:events";
26804
26919
  import { createServer as createServer3 } from "node:http";
26805
26920
  import { randomBytes as randomBytes9, createHash as createHash3, generateKeyPairSync } from "node:crypto";
26806
26921
  var PING_INTERVAL_MS, PEER_TIMEOUT_MS, GOSSIP_INTERVAL_MS, MAX_PEERS, PeerMesh;
26807
26922
  var init_peer_mesh = __esm({
26808
- "packages/cli/dist/tui/p2p/peer-mesh.js"() {
26923
+ "../packages/cli/dist/tui/p2p/peer-mesh.js"() {
26809
26924
  "use strict";
26810
26925
  init_wrapper();
26811
26926
  PING_INTERVAL_MS = 3e4;
@@ -27264,11 +27379,11 @@ var init_peer_mesh = __esm({
27264
27379
  }
27265
27380
  });
27266
27381
 
27267
- // packages/cli/dist/tui/p2p/inference-router.js
27382
+ // ../packages/cli/dist/tui/p2p/inference-router.js
27268
27383
  import { EventEmitter as EventEmitter5 } from "node:events";
27269
27384
  var TRUST_WEIGHTS, InferenceRouter;
27270
27385
  var init_inference_router = __esm({
27271
- "packages/cli/dist/tui/p2p/inference-router.js"() {
27386
+ "../packages/cli/dist/tui/p2p/inference-router.js"() {
27272
27387
  "use strict";
27273
27388
  init_types();
27274
27389
  TRUST_WEIGHTS = {
@@ -27462,9 +27577,9 @@ var init_inference_router = __esm({
27462
27577
  }
27463
27578
  });
27464
27579
 
27465
- // packages/cli/dist/tui/p2p/index.js
27580
+ // ../packages/cli/dist/tui/p2p/index.js
27466
27581
  var init_p2p = __esm({
27467
- "packages/cli/dist/tui/p2p/index.js"() {
27582
+ "../packages/cli/dist/tui/p2p/index.js"() {
27468
27583
  "use strict";
27469
27584
  init_secret_vault();
27470
27585
  init_peer_mesh();
@@ -27473,7 +27588,7 @@ var init_p2p = __esm({
27473
27588
  }
27474
27589
  });
27475
27590
 
27476
- // packages/cli/dist/tui/call-agent.js
27591
+ // ../packages/cli/dist/tui/call-agent.js
27477
27592
  import { EventEmitter as EventEmitter6 } from "node:events";
27478
27593
  import crypto2 from "node:crypto";
27479
27594
  function adaptTool(tool) {
@@ -27497,7 +27612,7 @@ function generateSessionKey() {
27497
27612
  }
27498
27613
  var ActivityFeed, _globalFeed, CallSubAgent;
27499
27614
  var init_call_agent = __esm({
27500
- "packages/cli/dist/tui/call-agent.js"() {
27615
+ "../packages/cli/dist/tui/call-agent.js"() {
27501
27616
  "use strict";
27502
27617
  init_dist5();
27503
27618
  init_dist2();
@@ -27755,7 +27870,7 @@ ${activitySummary}
27755
27870
  }
27756
27871
  });
27757
27872
 
27758
- // packages/cli/dist/tui/model-picker.js
27873
+ // ../packages/cli/dist/tui/model-picker.js
27759
27874
  async function fetchOllamaModels(baseUrl) {
27760
27875
  const url = `${normalizeBaseUrl(baseUrl)}/api/tags`;
27761
27876
  const resp = await fetch(url, {
@@ -27960,27 +28075,27 @@ function formatRelativeTime(iso) {
27960
28075
  return `${months}mo ago`;
27961
28076
  }
27962
28077
  var init_model_picker = __esm({
27963
- "packages/cli/dist/tui/model-picker.js"() {
28078
+ "../packages/cli/dist/tui/model-picker.js"() {
27964
28079
  "use strict";
27965
28080
  init_dist();
27966
28081
  }
27967
28082
  });
27968
28083
 
27969
- // packages/prompts/dist/loader.js
28084
+ // ../packages/prompts/dist/loader.js
27970
28085
  var init_loader = __esm({
27971
- "packages/prompts/dist/loader.js"() {
28086
+ "../packages/prompts/dist/loader.js"() {
27972
28087
  "use strict";
27973
28088
  }
27974
28089
  });
27975
28090
 
27976
- // packages/prompts/dist/render.js
28091
+ // ../packages/prompts/dist/render.js
27977
28092
  var init_render2 = __esm({
27978
- "packages/prompts/dist/render.js"() {
28093
+ "../packages/prompts/dist/render.js"() {
27979
28094
  "use strict";
27980
28095
  }
27981
28096
  });
27982
28097
 
27983
- // packages/prompts/dist/promptLoader.js
28098
+ // ../packages/prompts/dist/promptLoader.js
27984
28099
  import { readFileSync as readFileSync19, existsSync as existsSync27 } from "node:fs";
27985
28100
  import { join as join36, dirname as dirname14 } from "node:path";
27986
28101
  import { fileURLToPath as fileURLToPath9 } from "node:url";
@@ -28000,7 +28115,7 @@ function loadPrompt2(promptPath, vars) {
28000
28115
  }
28001
28116
  var __filename2, __dirname5, devPath, publishedPath, PROMPTS_DIR2, cache2;
28002
28117
  var init_promptLoader2 = __esm({
28003
- "packages/prompts/dist/promptLoader.js"() {
28118
+ "../packages/prompts/dist/promptLoader.js"() {
28004
28119
  "use strict";
28005
28120
  __filename2 = fileURLToPath9(import.meta.url);
28006
28121
  __dirname5 = dirname14(__filename2);
@@ -28011,7 +28126,7 @@ var init_promptLoader2 = __esm({
28011
28126
  }
28012
28127
  });
28013
28128
 
28014
- // packages/prompts/dist/task-templates.js
28129
+ // ../packages/prompts/dist/task-templates.js
28015
28130
  function getTaskTemplate(type) {
28016
28131
  return TEMPLATES[type];
28017
28132
  }
@@ -28027,7 +28142,7 @@ ${template.outputGuidance}`;
28027
28142
  }
28028
28143
  var TEMPLATES;
28029
28144
  var init_task_templates = __esm({
28030
- "packages/prompts/dist/task-templates.js"() {
28145
+ "../packages/prompts/dist/task-templates.js"() {
28031
28146
  "use strict";
28032
28147
  init_promptLoader2();
28033
28148
  TEMPLATES = {
@@ -28116,12 +28231,12 @@ var init_task_templates = __esm({
28116
28231
  }
28117
28232
  });
28118
28233
 
28119
- // packages/prompts/dist/index.js
28234
+ // ../packages/prompts/dist/index.js
28120
28235
  import { join as join37, dirname as dirname15 } from "node:path";
28121
28236
  import { fileURLToPath as fileURLToPath10 } from "node:url";
28122
28237
  var _dir, _packageRoot;
28123
28238
  var init_dist6 = __esm({
28124
- "packages/prompts/dist/index.js"() {
28239
+ "../packages/prompts/dist/index.js"() {
28125
28240
  "use strict";
28126
28241
  init_loader();
28127
28242
  init_render2();
@@ -28132,7 +28247,7 @@ var init_dist6 = __esm({
28132
28247
  }
28133
28248
  });
28134
28249
 
28135
- // packages/cli/dist/tui/oa-directory.js
28250
+ // ../packages/cli/dist/tui/oa-directory.js
28136
28251
  import { existsSync as existsSync28, mkdirSync as mkdirSync9, readFileSync as readFileSync20, writeFileSync as writeFileSync9, readdirSync as readdirSync7, statSync as statSync9, unlinkSync as unlinkSync3 } from "node:fs";
28137
28252
  import { join as join38, relative as relative2, basename as basename9, extname as extname8 } from "node:path";
28138
28253
  import { homedir as homedir9 } from "node:os";
@@ -28580,7 +28695,7 @@ function loadUsageHistory(kind, repoRoot) {
28580
28695
  }
28581
28696
  var OA_DIR, SUBDIRS, CONTEXT_FILES, PENDING_TASK_FILE, CONTEXT_SAVE_FILE, MAX_CONTEXT_ENTRIES, SKIP_DIRS, USAGE_HISTORY_FILE, MAX_HISTORY_RECORDS;
28582
28697
  var init_oa_directory = __esm({
28583
- "packages/cli/dist/tui/oa-directory.js"() {
28698
+ "../packages/cli/dist/tui/oa-directory.js"() {
28584
28699
  "use strict";
28585
28700
  OA_DIR = ".oa";
28586
28701
  SUBDIRS = ["memory", "index", "context", "history", "notes", "embedded", "provenance", "tools", "dreams"];
@@ -28621,9 +28736,9 @@ var init_oa_directory = __esm({
28621
28736
  }
28622
28737
  });
28623
28738
 
28624
- // packages/cli/dist/tui/setup.js
28739
+ // ../packages/cli/dist/tui/setup.js
28625
28740
  import * as readline from "node:readline";
28626
- import { execSync as execSync26, spawn as spawn15 } from "node:child_process";
28741
+ import { execSync as execSync25, spawn as spawn15 } from "node:child_process";
28627
28742
  import { existsSync as existsSync29, writeFileSync as writeFileSync10, mkdirSync as mkdirSync10 } from "node:fs";
28628
28743
  import { join as join39 } from "node:path";
28629
28744
  import { homedir as homedir10, platform } from "node:os";
@@ -28633,7 +28748,7 @@ function detectSystemSpecs() {
28633
28748
  let gpuVramGB = 0;
28634
28749
  let gpuName = "";
28635
28750
  try {
28636
- const memInfo = execSync26("free -b 2>/dev/null || sysctl -n hw.memsize 2>/dev/null", {
28751
+ const memInfo = execSync25("free -b 2>/dev/null || sysctl -n hw.memsize 2>/dev/null", {
28637
28752
  encoding: "utf8",
28638
28753
  timeout: 5e3
28639
28754
  });
@@ -28653,7 +28768,7 @@ function detectSystemSpecs() {
28653
28768
  } catch {
28654
28769
  }
28655
28770
  try {
28656
- const nvidiaSmi = execSync26("nvidia-smi --query-gpu=memory.total,name --format=csv,noheader,nounits 2>/dev/null", { encoding: "utf8", timeout: 5e3 });
28771
+ const nvidiaSmi = execSync25("nvidia-smi --query-gpu=memory.total,name --format=csv,noheader,nounits 2>/dev/null", { encoding: "utf8", timeout: 5e3 });
28657
28772
  const lines = nvidiaSmi.trim().split("\n");
28658
28773
  if (lines.length > 0) {
28659
28774
  for (const line of lines) {
@@ -28778,7 +28893,7 @@ function ensureCurl() {
28778
28893
  for (const s of strategies) {
28779
28894
  if (hasCmd(s.check)) {
28780
28895
  try {
28781
- execSync26(s.install, { stdio: "inherit", timeout: 12e4 });
28896
+ execSync25(s.install, { stdio: "inherit", timeout: 12e4 });
28782
28897
  if (hasCmd("curl")) {
28783
28898
  process.stdout.write(` ${c2.green("\u2714")} curl installed via ${s.label}.
28784
28899
  `);
@@ -28792,7 +28907,7 @@ function ensureCurl() {
28792
28907
  }
28793
28908
  if (plat === "darwin") {
28794
28909
  try {
28795
- execSync26("xcode-select --install", { stdio: "inherit", timeout: 3e5 });
28910
+ execSync25("xcode-select --install", { stdio: "inherit", timeout: 3e5 });
28796
28911
  if (hasCmd("curl"))
28797
28912
  return true;
28798
28913
  } catch {
@@ -28827,7 +28942,7 @@ function installOllamaLinux() {
28827
28942
 
28828
28943
  `);
28829
28944
  try {
28830
- execSync26("curl -fsSL https://ollama.com/install.sh | sh", {
28945
+ execSync25("curl -fsSL https://ollama.com/install.sh | sh", {
28831
28946
  stdio: "inherit",
28832
28947
  timeout: 3e5
28833
28948
  });
@@ -28855,7 +28970,7 @@ async function installOllamaMac(_rl) {
28855
28970
 
28856
28971
  `);
28857
28972
  try {
28858
- execSync26('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"', { stdio: "inherit", timeout: 6e5 });
28973
+ execSync25('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"', { stdio: "inherit", timeout: 6e5 });
28859
28974
  if (!hasCmd("brew")) {
28860
28975
  try {
28861
28976
  const brewPrefix = existsSync29("/opt/homebrew/bin/brew") ? "/opt/homebrew" : "/usr/local";
@@ -28888,7 +29003,7 @@ async function installOllamaMac(_rl) {
28888
29003
 
28889
29004
  `);
28890
29005
  try {
28891
- execSync26("brew install ollama", {
29006
+ execSync25("brew install ollama", {
28892
29007
  stdio: "inherit",
28893
29008
  timeout: 3e5
28894
29009
  });
@@ -28915,7 +29030,7 @@ function installOllamaWindows() {
28915
29030
 
28916
29031
  `);
28917
29032
  try {
28918
- execSync26('powershell -Command "irm https://ollama.com/install.ps1 | iex"', {
29033
+ execSync25('powershell -Command "irm https://ollama.com/install.ps1 | iex"', {
28919
29034
  stdio: "inherit",
28920
29035
  timeout: 3e5
28921
29036
  });
@@ -28996,7 +29111,7 @@ async function ensureOllamaRunning(backendUrl, rl) {
28996
29111
  }
28997
29112
  function pullModelWithAutoUpdate(tag) {
28998
29113
  try {
28999
- execSync26(`ollama pull ${tag}`, {
29114
+ execSync25(`ollama pull ${tag}`, {
29000
29115
  stdio: "inherit",
29001
29116
  timeout: 36e5
29002
29117
  // 1 hour max
@@ -29016,7 +29131,7 @@ function pullModelWithAutoUpdate(tag) {
29016
29131
 
29017
29132
  `);
29018
29133
  try {
29019
- execSync26("curl -fsSL https://ollama.com/install.sh | sh", {
29134
+ execSync25("curl -fsSL https://ollama.com/install.sh | sh", {
29020
29135
  stdio: "inherit",
29021
29136
  timeout: 3e5
29022
29137
  // 5 min max for install
@@ -29027,7 +29142,7 @@ function pullModelWithAutoUpdate(tag) {
29027
29142
  process.stdout.write(` ${c2.cyan("\u25CF")} Retrying pull of ${c2.bold(tag)}...
29028
29143
 
29029
29144
  `);
29030
- execSync26(`ollama pull ${tag}`, {
29145
+ execSync25(`ollama pull ${tag}`, {
29031
29146
  stdio: "inherit",
29032
29147
  timeout: 36e5
29033
29148
  });
@@ -29129,7 +29244,7 @@ function ensurePython3() {
29129
29244
  if (plat === "darwin") {
29130
29245
  if (hasCmd("brew")) {
29131
29246
  try {
29132
- execSync26("brew install python3", { stdio: "inherit", timeout: 3e5 });
29247
+ execSync25("brew install python3", { stdio: "inherit", timeout: 3e5 });
29133
29248
  if (hasCmd("python3")) {
29134
29249
  process.stdout.write(` ${c2.green("\u2714")} Python3 installed via Homebrew.
29135
29250
  `);
@@ -29142,7 +29257,7 @@ function ensurePython3() {
29142
29257
  for (const s of strategies) {
29143
29258
  if (hasCmd(s.check)) {
29144
29259
  try {
29145
- execSync26(s.install, { stdio: "inherit", timeout: 12e4 });
29260
+ execSync25(s.install, { stdio: "inherit", timeout: 12e4 });
29146
29261
  if (hasCmd("python3") || hasCmd("python")) {
29147
29262
  process.stdout.write(` ${c2.green("\u2714")} Python3 installed via ${s.label}.
29148
29263
  `);
@@ -29158,11 +29273,11 @@ function ensurePython3() {
29158
29273
  }
29159
29274
  function checkPythonVenv() {
29160
29275
  try {
29161
- execSync26("python3 -m venv --help", { stdio: "pipe", timeout: 5e3 });
29276
+ execSync25("python3 -m venv --help", { stdio: "pipe", timeout: 5e3 });
29162
29277
  return true;
29163
29278
  } catch {
29164
29279
  try {
29165
- execSync26("python -m venv --help", { stdio: "pipe", timeout: 5e3 });
29280
+ execSync25("python -m venv --help", { stdio: "pipe", timeout: 5e3 });
29166
29281
  return true;
29167
29282
  } catch {
29168
29283
  return false;
@@ -29181,7 +29296,7 @@ function ensurePythonVenv() {
29181
29296
  for (const s of strategies) {
29182
29297
  if (hasCmd(s.check)) {
29183
29298
  try {
29184
- execSync26(s.install, { stdio: "inherit", timeout: 12e4 });
29299
+ execSync25(s.install, { stdio: "inherit", timeout: 12e4 });
29185
29300
  if (checkPythonVenv()) {
29186
29301
  process.stdout.write(` ${c2.green("\u2714")} python3-venv installed via ${s.label}.
29187
29302
  `);
@@ -29617,7 +29732,7 @@ async function doSetup(config, rl) {
29617
29732
  const modelfilePath = join39(modelDir2, `Modelfile.${customName}`);
29618
29733
  writeFileSync10(modelfilePath, modelfileContent + "\n", "utf8");
29619
29734
  process.stdout.write(` ${c2.dim("Creating model...")} `);
29620
- execSync26(`ollama create ${customName} -f ${modelfilePath}`, {
29735
+ execSync25(`ollama create ${customName} -f ${modelfilePath}`, {
29621
29736
  stdio: "pipe",
29622
29737
  timeout: 12e4
29623
29738
  });
@@ -29668,7 +29783,7 @@ function isFirstRun() {
29668
29783
  function hasCmd(cmd) {
29669
29784
  try {
29670
29785
  const whichCmd = process.platform === "win32" ? `where ${cmd}` : `which ${cmd}`;
29671
- execSync26(whichCmd, { stdio: "pipe", timeout: 3e3 });
29786
+ execSync25(whichCmd, { stdio: "pipe", timeout: 3e3 });
29672
29787
  return true;
29673
29788
  } catch {
29674
29789
  return false;
@@ -29701,7 +29816,7 @@ function getVenvDir() {
29701
29816
  }
29702
29817
  function hasVenvModule() {
29703
29818
  try {
29704
- execSync26("python3 -m venv --help", { stdio: "pipe", timeout: 5e3 });
29819
+ execSync25("python3 -m venv --help", { stdio: "pipe", timeout: 5e3 });
29705
29820
  return true;
29706
29821
  } catch {
29707
29822
  return false;
@@ -29723,8 +29838,8 @@ function ensureVenv(log) {
29723
29838
  }
29724
29839
  try {
29725
29840
  mkdirSync10(join39(homedir10(), ".open-agents"), { recursive: true });
29726
- execSync26(`python3 -m venv "${venvDir}"`, { stdio: "pipe", timeout: 3e4 });
29727
- execSync26(`"${join39(venvDir, "bin", "pip")}" install --upgrade pip`, {
29841
+ execSync25(`python3 -m venv "${venvDir}"`, { stdio: "pipe", timeout: 3e4 });
29842
+ execSync25(`"${join39(venvDir, "bin", "pip")}" install --upgrade pip`, {
29728
29843
  stdio: "pipe",
29729
29844
  timeout: 6e4
29730
29845
  });
@@ -29737,7 +29852,7 @@ function ensureVenv(log) {
29737
29852
  }
29738
29853
  function trySudoPasswordless(cmd, timeoutMs = 12e4) {
29739
29854
  try {
29740
- execSync26(`sudo -n ${cmd}`, {
29855
+ execSync25(`sudo -n ${cmd}`, {
29741
29856
  stdio: "pipe",
29742
29857
  timeout: timeoutMs,
29743
29858
  env: { ...process.env, DEBIAN_FRONTEND: "noninteractive" }
@@ -29750,7 +29865,7 @@ function trySudoPasswordless(cmd, timeoutMs = 12e4) {
29750
29865
  function runWithSudo(cmd, password, timeoutMs = 12e4) {
29751
29866
  try {
29752
29867
  const escaped = cmd.replace(/'/g, "'\\''");
29753
- execSync26(`sudo -S bash -c '${escaped}'`, {
29868
+ execSync25(`sudo -S bash -c '${escaped}'`, {
29754
29869
  input: password + "\n",
29755
29870
  stdio: ["pipe", "pipe", "pipe"],
29756
29871
  timeout: timeoutMs,
@@ -29857,7 +29972,7 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
29857
29972
  ok = await sudoInstall(batchCmd, getPassword, log, cachedPasswordRef, 18e4);
29858
29973
  } else {
29859
29974
  try {
29860
- execSync26(batchCmd, { stdio: "pipe", timeout: 18e4 });
29975
+ execSync25(batchCmd, { stdio: "pipe", timeout: 18e4 });
29861
29976
  ok = true;
29862
29977
  } catch {
29863
29978
  ok = false;
@@ -29894,7 +30009,7 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
29894
30009
  const venvCmds = {
29895
30010
  apt: () => {
29896
30011
  try {
29897
- const pyVer = execSync26(`python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"`, { encoding: "utf8", stdio: "pipe", timeout: 5e3 }).trim();
30012
+ const pyVer = execSync25(`python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"`, { encoding: "utf8", stdio: "pipe", timeout: 5e3 }).trim();
29898
30013
  return `apt-get install -y python3-venv python${pyVer}-venv`;
29899
30014
  } catch {
29900
30015
  return "apt-get install -y python3-venv";
@@ -29922,12 +30037,12 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
29922
30037
  const venvPip = join39(venvBin, "pip");
29923
30038
  log("Installing moondream-station in ~/.open-agents/venv...");
29924
30039
  try {
29925
- execSync26(`"${venvPip}" install moondream-station`, { stdio: "pipe", timeout: 3e5 });
30040
+ execSync25(`"${venvPip}" install moondream-station`, { stdio: "pipe", timeout: 3e5 });
29926
30041
  if (existsSync29(venvMoondream)) {
29927
30042
  log("moondream-station installed successfully.");
29928
30043
  } else {
29929
30044
  try {
29930
- const check = execSync26(`"${venvPip}" show moondream-station`, { encoding: "utf8", stdio: "pipe", timeout: 5e3 });
30045
+ const check = execSync25(`"${venvPip}" show moondream-station`, { encoding: "utf8", stdio: "pipe", timeout: 5e3 });
29931
30046
  if (check.includes("moondream")) {
29932
30047
  log("moondream-station package installed.");
29933
30048
  }
@@ -29944,7 +30059,7 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
29944
30059
  const venvPip2 = join39(venvBin, "pip");
29945
30060
  let ocrStackInstalled = false;
29946
30061
  try {
29947
- execSync26(`"${venvPython}" -c "import cv2, pytesseract, numpy, PIL"`, { stdio: "pipe", timeout: 1e4 });
30062
+ execSync25(`"${venvPython}" -c "import cv2, pytesseract, numpy, PIL"`, { stdio: "pipe", timeout: 1e4 });
29948
30063
  ocrStackInstalled = true;
29949
30064
  } catch {
29950
30065
  }
@@ -29952,9 +30067,9 @@ async function ensureVisionDeps(onInfo, getSudoPassword) {
29952
30067
  const ocrPackages = "pytesseract Pillow opencv-python-headless numpy";
29953
30068
  log("Installing OCR Python stack (pytesseract, OpenCV, Pillow, numpy)...");
29954
30069
  try {
29955
- execSync26(`"${venvPip2}" install ${ocrPackages}`, { stdio: "pipe", timeout: 3e5 });
30070
+ execSync25(`"${venvPip2}" install ${ocrPackages}`, { stdio: "pipe", timeout: 3e5 });
29956
30071
  try {
29957
- execSync26(`"${venvPython}" -c "import cv2, pytesseract, numpy, PIL"`, { stdio: "pipe", timeout: 1e4 });
30072
+ execSync25(`"${venvPython}" -c "import cv2, pytesseract, numpy, PIL"`, { stdio: "pipe", timeout: 1e4 });
29958
30073
  log("OCR Python stack installed successfully.");
29959
30074
  } catch {
29960
30075
  log("OCR Python stack install completed but import verification failed.");
@@ -29988,7 +30103,7 @@ function ensureCloudflaredBackground(onInfo) {
29988
30103
  const archMap = { x64: "amd64", arm64: "arm64", arm: "arm" };
29989
30104
  const cfArch = archMap[arch] ?? "amd64";
29990
30105
  try {
29991
- execSync26(`curl -fsSL "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${cfArch}" -o /tmp/cloudflared && chmod +x /tmp/cloudflared && mkdir -p "${homedir10()}/.local/bin" && mv /tmp/cloudflared "${homedir10()}/.local/bin/cloudflared"`, { stdio: "pipe", timeout: 6e4 });
30106
+ execSync25(`curl -fsSL "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${cfArch}" -o /tmp/cloudflared && chmod +x /tmp/cloudflared && mkdir -p "${homedir10()}/.local/bin" && mv /tmp/cloudflared "${homedir10()}/.local/bin/cloudflared"`, { stdio: "pipe", timeout: 6e4 });
29992
30107
  if (!process.env.PATH?.includes(`${homedir10()}/.local/bin`)) {
29993
30108
  process.env.PATH = `${homedir10()}/.local/bin:${process.env.PATH}`;
29994
30109
  }
@@ -29999,7 +30114,7 @@ function ensureCloudflaredBackground(onInfo) {
29999
30114
  } catch {
30000
30115
  }
30001
30116
  try {
30002
- execSync26(`curl -fsSL "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${cfArch}" -o /tmp/cloudflared && chmod +x /tmp/cloudflared && sudo mv /tmp/cloudflared /usr/local/bin/cloudflared 2>/dev/null`, { stdio: "pipe", timeout: 6e4 });
30117
+ execSync25(`curl -fsSL "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${cfArch}" -o /tmp/cloudflared && chmod +x /tmp/cloudflared && sudo mv /tmp/cloudflared /usr/local/bin/cloudflared 2>/dev/null`, { stdio: "pipe", timeout: 6e4 });
30003
30118
  if (hasCmd("cloudflared")) {
30004
30119
  log("cloudflared installed.");
30005
30120
  return true;
@@ -30008,7 +30123,7 @@ function ensureCloudflaredBackground(onInfo) {
30008
30123
  }
30009
30124
  } else if (os === "darwin") {
30010
30125
  try {
30011
- execSync26("brew install cloudflared", { stdio: "pipe", timeout: 12e4 });
30126
+ execSync25("brew install cloudflared", { stdio: "pipe", timeout: 12e4 });
30012
30127
  if (hasCmd("cloudflared")) {
30013
30128
  log("cloudflared installed via Homebrew.");
30014
30129
  return true;
@@ -30058,7 +30173,7 @@ function createExpandedVariant(baseModel, specs, sizeGB) {
30058
30173
  mkdirSync10(modelDir2, { recursive: true });
30059
30174
  const modelfilePath = join39(modelDir2, `Modelfile.${customName}`);
30060
30175
  writeFileSync10(modelfilePath, modelfileContent + "\n", "utf8");
30061
- execSync26(`ollama create ${customName} -f ${modelfilePath}`, {
30176
+ execSync25(`ollama create ${customName} -f ${modelfilePath}`, {
30062
30177
  stdio: "pipe",
30063
30178
  timeout: 12e4
30064
30179
  });
@@ -30106,7 +30221,7 @@ async function ensureExpandedContext(modelName, backendUrl) {
30106
30221
  }
30107
30222
  var QWEN_VARIANTS, TOOL_CALLING_MODELS, _cloudflaredInstallPromise;
30108
30223
  var init_setup = __esm({
30109
- "packages/cli/dist/tui/setup.js"() {
30224
+ "../packages/cli/dist/tui/setup.js"() {
30110
30225
  "use strict";
30111
30226
  init_model_picker();
30112
30227
  init_render();
@@ -30140,7 +30255,7 @@ var init_setup = __esm({
30140
30255
  }
30141
30256
  });
30142
30257
 
30143
- // packages/cli/dist/tui/tui-select.js
30258
+ // ../packages/cli/dist/tui/tui-select.js
30144
30259
  function ansi3(code, text) {
30145
30260
  return isTTY3 ? `\x1B[${code}m${text}\x1B[0m` : text;
30146
30261
  }
@@ -30450,7 +30565,7 @@ function tuiSelect(opts) {
30450
30565
  }
30451
30566
  var isTTY3, selectColors;
30452
30567
  var init_tui_select = __esm({
30453
- "packages/cli/dist/tui/tui-select.js"() {
30568
+ "../packages/cli/dist/tui/tui-select.js"() {
30454
30569
  "use strict";
30455
30570
  isTTY3 = process.stdout.isTTY ?? false;
30456
30571
  selectColors = {
@@ -30467,7 +30582,7 @@ var init_tui_select = __esm({
30467
30582
  }
30468
30583
  });
30469
30584
 
30470
- // packages/cli/dist/tui/commands.js
30585
+ // ../packages/cli/dist/tui/commands.js
30471
30586
  async function handleSlashCommand(input, ctx) {
30472
30587
  const trimmed = input.trim();
30473
30588
  if (!trimmed.startsWith("/"))
@@ -31808,10 +31923,38 @@ async function handleEndpoint(arg, ctx, local = false) {
31808
31923
  process.stdout.write(` ${c2.dim(" /endpoint https://api.together.xyz --auth ... Together AI")}
31809
31924
  `);
31810
31925
  process.stdout.write(` ${c2.dim(" /endpoint http://localhost:8000 vLLM")}
31926
+ `);
31927
+ process.stdout.write(` ${c2.dim(" /endpoint stop Reset to local Ollama")}
31811
31928
 
31812
31929
  `);
31813
31930
  return;
31814
31931
  }
31932
+ if (arg === "stop" || arg === "off" || arg.startsWith("stop ") || arg.startsWith("off ")) {
31933
+ if (ctx.isExposeActive?.()) {
31934
+ await ctx.exposeStop?.();
31935
+ renderInfo("Expose gateway stopped.");
31936
+ }
31937
+ if (ctx.hasActiveTask?.()) {
31938
+ ctx.abortActiveTask?.();
31939
+ }
31940
+ const defaultUrl = "http://127.0.0.1:11434";
31941
+ ctx.setEndpoint(defaultUrl, "ollama", void 0);
31942
+ const defaultSettings = { backendUrl: defaultUrl, backendType: "ollama", apiKey: void 0 };
31943
+ if (local) {
31944
+ ctx.saveLocalSettings(defaultSettings);
31945
+ } else {
31946
+ setConfigValue("backendUrl", defaultUrl);
31947
+ setConfigValue("backendType", "ollama");
31948
+ ctx.saveSettings(defaultSettings);
31949
+ }
31950
+ process.stdout.write(`
31951
+ ${c2.green("\u2714")} Endpoint reset to local Ollama (${defaultUrl})
31952
+ `);
31953
+ if (ctx.hasActiveTask?.()) {
31954
+ renderWarning("Active task aborted \u2014 send a new prompt to continue.");
31955
+ }
31956
+ return;
31957
+ }
31815
31958
  const parts = arg.split(/\s+/);
31816
31959
  const url = parts[0];
31817
31960
  let apiKey;
@@ -32008,7 +32151,7 @@ async function handleUpdate(subcommand, ctx) {
32008
32151
  return;
32009
32152
  }
32010
32153
  checkSpinner.stop(`Update available: v${info.currentVersion} \u2192 v${c2.bold(c2.green(info.latestVersion))}`);
32011
- const { exec, execSync: es2 } = await import("node:child_process");
32154
+ const { exec: exec2, execSync: es2 } = await import("node:child_process");
32012
32155
  let needsSudo = false;
32013
32156
  try {
32014
32157
  const prefix = es2("npm prefix -g", { encoding: "utf8", timeout: 5e3 }).trim();
@@ -32037,7 +32180,7 @@ async function handleUpdate(subcommand, ctx) {
32037
32180
  let installOk = false;
32038
32181
  let installError = "";
32039
32182
  const runInstall2 = (cmd) => new Promise((resolve31) => {
32040
- const child = exec(cmd, { timeout: 18e4 }, (err, _stdout, stderr) => {
32183
+ const child = exec2(cmd, { timeout: 18e4 }, (err, _stdout, stderr) => {
32041
32184
  if (err)
32042
32185
  installError = (stderr || err.message || "").trim();
32043
32186
  resolve31(!err);
@@ -32075,7 +32218,7 @@ async function handleUpdate(subcommand, ctx) {
32075
32218
  installSpinner.stop(`Update installed (v${info.latestVersion}).`);
32076
32219
  const rebuildSpinner = startInlineSpinner("Rebuilding native modules");
32077
32220
  const rebuildOk = await new Promise((resolve31) => {
32078
- const child = exec(`${sudoPrefix}npm rebuild -g open-agents-ai 2>/dev/null || true`, { timeout: 12e4 }, () => resolve31(true));
32221
+ const child = exec2(`${sudoPrefix}npm rebuild -g open-agents-ai 2>/dev/null || true`, { timeout: 12e4 }, () => resolve31(true));
32079
32222
  child.stdout?.resume();
32080
32223
  child.stderr?.resume();
32081
32224
  });
@@ -32108,7 +32251,7 @@ async function handleUpdate(subcommand, ctx) {
32108
32251
  if (fsExists(venvPip)) {
32109
32252
  const pySpinner = startInlineSpinner("Upgrading Python venv packages");
32110
32253
  const pyOk = await new Promise((resolve31) => {
32111
- const child = exec(`"${venvPip}" install --upgrade moondream-station pytesseract Pillow opencv-python-headless numpy 2>/dev/null || true`, { timeout: 3e5 }, (err) => resolve31(!err));
32254
+ const child = exec2(`"${venvPip}" install --upgrade moondream-station pytesseract Pillow opencv-python-headless numpy 2>/dev/null || true`, { timeout: 3e5 }, (err) => resolve31(!err));
32112
32255
  child.stdout?.resume();
32113
32256
  child.stderr?.resume();
32114
32257
  });
@@ -32239,7 +32382,7 @@ async function switchModel(query, ctx, local = false) {
32239
32382
  }
32240
32383
  }
32241
32384
  var init_commands = __esm({
32242
- "packages/cli/dist/tui/commands.js"() {
32385
+ "../packages/cli/dist/tui/commands.js"() {
32243
32386
  "use strict";
32244
32387
  init_model_picker();
32245
32388
  init_render();
@@ -32256,10 +32399,10 @@ var init_commands = __esm({
32256
32399
  }
32257
32400
  });
32258
32401
 
32259
- // packages/cli/dist/tui/project-context.js
32402
+ // ../packages/cli/dist/tui/project-context.js
32260
32403
  import { existsSync as existsSync30, readFileSync as readFileSync21, readdirSync as readdirSync8 } from "node:fs";
32261
32404
  import { join as join40, basename as basename10 } from "node:path";
32262
- import { execSync as execSync27 } from "node:child_process";
32405
+ import { execSync as execSync26 } from "node:child_process";
32263
32406
  import { homedir as homedir11, platform as platform2, release } from "node:os";
32264
32407
  function getModelTier(modelName) {
32265
32408
  const m = modelName.toLowerCase();
@@ -32305,19 +32448,19 @@ function loadProjectMap(repoRoot) {
32305
32448
  }
32306
32449
  function getGitInfo(repoRoot) {
32307
32450
  try {
32308
- execSync27("git rev-parse --is-inside-work-tree", { cwd: repoRoot, stdio: "pipe" });
32451
+ execSync26("git rev-parse --is-inside-work-tree", { cwd: repoRoot, stdio: "pipe" });
32309
32452
  } catch {
32310
32453
  return "";
32311
32454
  }
32312
32455
  const lines = [];
32313
32456
  try {
32314
- const branch = execSync27("git branch --show-current", { cwd: repoRoot, encoding: "utf-8", stdio: "pipe" }).trim();
32457
+ const branch = execSync26("git branch --show-current", { cwd: repoRoot, encoding: "utf-8", stdio: "pipe" }).trim();
32315
32458
  if (branch)
32316
32459
  lines.push(`Branch: ${branch}`);
32317
32460
  } catch {
32318
32461
  }
32319
32462
  try {
32320
- const status = execSync27("git status --porcelain", { cwd: repoRoot, encoding: "utf-8", stdio: "pipe" }).trim();
32463
+ const status = execSync26("git status --porcelain", { cwd: repoRoot, encoding: "utf-8", stdio: "pipe" }).trim();
32321
32464
  if (status) {
32322
32465
  const changed = status.split("\n").length;
32323
32466
  lines.push(`Working tree: ${changed} changed file(s)`);
@@ -32327,7 +32470,7 @@ function getGitInfo(repoRoot) {
32327
32470
  } catch {
32328
32471
  }
32329
32472
  try {
32330
- const log = execSync27("git log --oneline -5 --no-decorate", { cwd: repoRoot, encoding: "utf-8", stdio: "pipe" }).trim();
32473
+ const log = execSync26("git log --oneline -5 --no-decorate", { cwd: repoRoot, encoding: "utf-8", stdio: "pipe" }).trim();
32331
32474
  if (log)
32332
32475
  lines.push(`Recent commits:
32333
32476
  ${log}`);
@@ -32561,14 +32704,14 @@ These patterns have been repeated 3+ times. Consider using create_tool to automa
32561
32704
  return sections.join("\n\n");
32562
32705
  }
32563
32706
  var init_project_context = __esm({
32564
- "packages/cli/dist/tui/project-context.js"() {
32707
+ "../packages/cli/dist/tui/project-context.js"() {
32565
32708
  "use strict";
32566
32709
  init_oa_directory();
32567
32710
  init_dist2();
32568
32711
  }
32569
32712
  });
32570
32713
 
32571
- // packages/memory/dist/db.js
32714
+ // ../packages/memory/dist/db.js
32572
32715
  import Database from "better-sqlite3";
32573
32716
  function initDb(dbPath) {
32574
32717
  const db = new Database(dbPath);
@@ -32723,26 +32866,26 @@ function runMigrations(db) {
32723
32866
  `);
32724
32867
  }
32725
32868
  var init_db = __esm({
32726
- "packages/memory/dist/db.js"() {
32869
+ "../packages/memory/dist/db.js"() {
32727
32870
  "use strict";
32728
32871
  }
32729
32872
  });
32730
32873
 
32731
- // packages/memory/dist/repoProfileStore.js
32874
+ // ../packages/memory/dist/repoProfileStore.js
32732
32875
  var init_repoProfileStore = __esm({
32733
- "packages/memory/dist/repoProfileStore.js"() {
32876
+ "../packages/memory/dist/repoProfileStore.js"() {
32734
32877
  "use strict";
32735
32878
  }
32736
32879
  });
32737
32880
 
32738
- // packages/memory/dist/fileSummaryStore.js
32881
+ // ../packages/memory/dist/fileSummaryStore.js
32739
32882
  var init_fileSummaryStore = __esm({
32740
- "packages/memory/dist/fileSummaryStore.js"() {
32883
+ "../packages/memory/dist/fileSummaryStore.js"() {
32741
32884
  "use strict";
32742
32885
  }
32743
32886
  });
32744
32887
 
32745
- // packages/memory/dist/taskMemoryStore.js
32888
+ // ../packages/memory/dist/taskMemoryStore.js
32746
32889
  import { randomUUID } from "node:crypto";
32747
32890
  function rowToTask(row) {
32748
32891
  return {
@@ -32761,7 +32904,7 @@ function rowToTask(row) {
32761
32904
  }
32762
32905
  var TaskMemoryStore;
32763
32906
  var init_taskMemoryStore = __esm({
32764
- "packages/memory/dist/taskMemoryStore.js"() {
32907
+ "../packages/memory/dist/taskMemoryStore.js"() {
32765
32908
  "use strict";
32766
32909
  TaskMemoryStore = class {
32767
32910
  db;
@@ -32812,14 +32955,14 @@ var init_taskMemoryStore = __esm({
32812
32955
  }
32813
32956
  });
32814
32957
 
32815
- // packages/memory/dist/patchHistoryStore.js
32958
+ // ../packages/memory/dist/patchHistoryStore.js
32816
32959
  var init_patchHistoryStore = __esm({
32817
- "packages/memory/dist/patchHistoryStore.js"() {
32960
+ "../packages/memory/dist/patchHistoryStore.js"() {
32818
32961
  "use strict";
32819
32962
  }
32820
32963
  });
32821
32964
 
32822
- // packages/memory/dist/failureStore.js
32965
+ // ../packages/memory/dist/failureStore.js
32823
32966
  import { randomUUID as randomUUID2 } from "node:crypto";
32824
32967
  function rowToFailure(row) {
32825
32968
  return {
@@ -32840,7 +32983,7 @@ function rowToFailure(row) {
32840
32983
  }
32841
32984
  var FailureStore;
32842
32985
  var init_failureStore = __esm({
32843
- "packages/memory/dist/failureStore.js"() {
32986
+ "../packages/memory/dist/failureStore.js"() {
32844
32987
  "use strict";
32845
32988
  FailureStore = class {
32846
32989
  db;
@@ -32895,18 +33038,18 @@ var init_failureStore = __esm({
32895
33038
  }
32896
33039
  });
32897
33040
 
32898
- // packages/memory/dist/validationStore.js
33041
+ // ../packages/memory/dist/validationStore.js
32899
33042
  var init_validationStore = __esm({
32900
- "packages/memory/dist/validationStore.js"() {
33043
+ "../packages/memory/dist/validationStore.js"() {
32901
33044
  "use strict";
32902
33045
  }
32903
33046
  });
32904
33047
 
32905
- // packages/memory/dist/toolPatternStore.js
33048
+ // ../packages/memory/dist/toolPatternStore.js
32906
33049
  import { randomUUID as randomUUID3 } from "node:crypto";
32907
33050
  var ToolPatternStore;
32908
33051
  var init_toolPatternStore = __esm({
32909
- "packages/memory/dist/toolPatternStore.js"() {
33052
+ "../packages/memory/dist/toolPatternStore.js"() {
32910
33053
  "use strict";
32911
33054
  ToolPatternStore = class {
32912
33055
  db;
@@ -33085,9 +33228,9 @@ var init_toolPatternStore = __esm({
33085
33228
  }
33086
33229
  });
33087
33230
 
33088
- // packages/memory/dist/index.js
33231
+ // ../packages/memory/dist/index.js
33089
33232
  var init_dist7 = __esm({
33090
- "packages/memory/dist/index.js"() {
33233
+ "../packages/memory/dist/index.js"() {
33091
33234
  "use strict";
33092
33235
  init_db();
33093
33236
  init_repoProfileStore();
@@ -33100,7 +33243,7 @@ var init_dist7 = __esm({
33100
33243
  }
33101
33244
  });
33102
33245
 
33103
- // packages/cli/dist/tui/carousel.js
33246
+ // ../packages/cli/dist/tui/carousel.js
33104
33247
  function fg(code, text) {
33105
33248
  return isTTY4 ? `\x1B[38;5;${code}m${text}\x1B[0m` : text;
33106
33249
  }
@@ -33142,7 +33285,7 @@ function createRow(phraseIndices, speed, direction, bank) {
33142
33285
  }
33143
33286
  var isTTY4, PHRASES, Carousel;
33144
33287
  var init_carousel = __esm({
33145
- "packages/cli/dist/tui/carousel.js"() {
33288
+ "../packages/cli/dist/tui/carousel.js"() {
33146
33289
  "use strict";
33147
33290
  isTTY4 = process.stdout.isTTY ?? false;
33148
33291
  PHRASES = [
@@ -33387,7 +33530,7 @@ var init_carousel = __esm({
33387
33530
  }
33388
33531
  });
33389
33532
 
33390
- // packages/cli/dist/tui/carousel-descriptors.js
33533
+ // ../packages/cli/dist/tui/carousel-descriptors.js
33391
33534
  import { existsSync as existsSync31, readFileSync as readFileSync22, writeFileSync as writeFileSync11, mkdirSync as mkdirSync11, readdirSync as readdirSync9 } from "node:fs";
33392
33535
  import { join as join41, basename as basename11 } from "node:path";
33393
33536
  function loadToolProfile(repoRoot) {
@@ -33634,7 +33777,7 @@ function extractFromToolProfile(profile, tags) {
33634
33777
  }
33635
33778
  var TOOL_CATEGORIES, TOOL_PROFILE_FILE, DESCRIPTOR_FILE, CATEGORY_LABELS, STOP_WORDS;
33636
33779
  var init_carousel_descriptors = __esm({
33637
- "packages/cli/dist/tui/carousel-descriptors.js"() {
33780
+ "../packages/cli/dist/tui/carousel-descriptors.js"() {
33638
33781
  "use strict";
33639
33782
  init_oa_directory();
33640
33783
  TOOL_CATEGORIES = [
@@ -33740,11 +33883,11 @@ var init_carousel_descriptors = __esm({
33740
33883
  }
33741
33884
  });
33742
33885
 
33743
- // packages/cli/dist/tui/voice.js
33886
+ // ../packages/cli/dist/tui/voice.js
33744
33887
  import { existsSync as existsSync32, mkdirSync as mkdirSync12, writeFileSync as writeFileSync12, readFileSync as readFileSync23, unlinkSync as unlinkSync4 } from "node:fs";
33745
33888
  import { join as join42 } from "node:path";
33746
33889
  import { homedir as homedir12, tmpdir as tmpdir6, platform as platform3 } from "node:os";
33747
- import { execSync as execSync28, spawn as nodeSpawn } from "node:child_process";
33890
+ import { execSync as execSync27, spawn as nodeSpawn } from "node:child_process";
33748
33891
  import { createRequire } from "node:module";
33749
33892
  function voiceDir() {
33750
33893
  return join42(homedir12(), ".open-agents", "voice");
@@ -34211,7 +34354,7 @@ function formatBytes2(bytes) {
34211
34354
  }
34212
34355
  var VOICE_MODELS, VoiceEngine, narration, FILE_READ_VARIANTS, FILE_WRITE_VARIANTS, FILE_EDIT_VARIANTS, GREP_VARIANTS, WEB_SEARCH_VARIANTS, WEB_FETCH_VARIANTS, MEMORY_READ_VARIANTS, MEMORY_WRITE_VARIANTS, SUB_AGENT_VARIANTS, SHELL_VARIANTS, RESULT_SUCCESS_VARIANTS, RESULT_FAIL_VARIANTS, RESULT_MULTI_FAIL_VARIANTS, TASK_COMPLETE_VARIANTS, TASK_INCOMPLETE_VARIANTS;
34213
34356
  var init_voice = __esm({
34214
- "packages/cli/dist/tui/voice.js"() {
34357
+ "../packages/cli/dist/tui/voice.js"() {
34215
34358
  "use strict";
34216
34359
  init_render();
34217
34360
  VOICE_MODELS = {
@@ -34801,7 +34944,7 @@ var init_voice = __esm({
34801
34944
  }
34802
34945
  for (const player of ["paplay", "pw-play", "aplay"]) {
34803
34946
  try {
34804
- execSync28(`which ${player}`, { stdio: "pipe" });
34947
+ execSync27(`which ${player}`, { stdio: "pipe" });
34805
34948
  return [player, path];
34806
34949
  } catch {
34807
34950
  }
@@ -34830,7 +34973,7 @@ var init_voice = __esm({
34830
34973
  return this.python3Path;
34831
34974
  for (const bin of ["python3", "python"]) {
34832
34975
  try {
34833
- const path = execSync28(`which ${bin}`, { stdio: "pipe", timeout: 5e3 }).toString().trim();
34976
+ const path = execSync27(`which ${bin}`, { stdio: "pipe", timeout: 5e3 }).toString().trim();
34834
34977
  if (path) {
34835
34978
  this.python3Path = path;
34836
34979
  return path;
@@ -34850,7 +34993,7 @@ var init_voice = __esm({
34850
34993
  return false;
34851
34994
  }
34852
34995
  try {
34853
- execSync28(`${py} -c "import mlx_audio"`, { stdio: "pipe", timeout: 1e4 });
34996
+ execSync27(`${py} -c "import mlx_audio"`, { stdio: "pipe", timeout: 1e4 });
34854
34997
  this.mlxInstalled = true;
34855
34998
  return true;
34856
34999
  } catch {
@@ -34874,7 +35017,7 @@ var init_voice = __esm({
34874
35017
  return;
34875
35018
  renderInfo("Installing MLX Audio for voice synthesis (first time setup)...");
34876
35019
  try {
34877
- execSync28(`${py} -m pip install mlx-audio --quiet`, {
35020
+ execSync27(`${py} -m pip install mlx-audio --quiet`, {
34878
35021
  stdio: "pipe",
34879
35022
  timeout: 3e5
34880
35023
  // 5 min — may need to compile
@@ -34882,7 +35025,7 @@ var init_voice = __esm({
34882
35025
  this.mlxInstalled = true;
34883
35026
  } catch (err) {
34884
35027
  try {
34885
- execSync28(`${py} -m pip install mlx-audio --user --quiet`, {
35028
+ execSync27(`${py} -m pip install mlx-audio --user --quiet`, {
34886
35029
  stdio: "pipe",
34887
35030
  timeout: 3e5
34888
35031
  });
@@ -34918,11 +35061,11 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
34918
35061
  `tts_gen.main(["--model", ${JSON.stringify(mlxModelId)}, "--text", text, "--voice", ${JSON.stringify(mlxVoice)}, "--lang_code", ${JSON.stringify(mlxLangCode)}, "--audio_path", ${JSON.stringify(wavPath)}])`
34919
35062
  ].join("; ");
34920
35063
  try {
34921
- execSync28(`${py} -c ${JSON.stringify(pyScript)} ${JSON.stringify(JSON.stringify(cleaned))}`, { stdio: "pipe", timeout: 6e4, cwd: tmpdir6() });
35064
+ execSync27(`${py} -c ${JSON.stringify(pyScript)} ${JSON.stringify(JSON.stringify(cleaned))}`, { stdio: "pipe", timeout: 6e4, cwd: tmpdir6() });
34922
35065
  } catch (err) {
34923
35066
  try {
34924
35067
  const safeText = cleaned.replace(/'/g, "'\\''");
34925
- execSync28(`${py} -m mlx_audio.tts.generate --model ${mlxModelId} --text '${safeText}' --voice ${mlxVoice} --lang_code ${mlxLangCode} --audio_path ${JSON.stringify(wavPath)}`, { stdio: "pipe", timeout: 6e4, cwd: tmpdir6() });
35068
+ execSync27(`${py} -m mlx_audio.tts.generate --model ${mlxModelId} --text '${safeText}' --voice ${mlxVoice} --lang_code ${mlxLangCode} --audio_path ${JSON.stringify(wavPath)}`, { stdio: "pipe", timeout: 6e4, cwd: tmpdir6() });
34926
35069
  } catch (err2) {
34927
35070
  return;
34928
35071
  }
@@ -34986,11 +35129,11 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
34986
35129
  `tts_gen.main(["--model", ${JSON.stringify(mlxModelId)}, "--text", text, "--voice", ${JSON.stringify(mlxVoice)}, "--lang_code", ${JSON.stringify(mlxLangCode)}, "--audio_path", ${JSON.stringify(wavPath)}])`
34987
35130
  ].join("; ");
34988
35131
  try {
34989
- execSync28(`${py} -c ${JSON.stringify(pyScript)} ${JSON.stringify(JSON.stringify(cleaned))}`, { stdio: "pipe", timeout: 6e4, cwd: tmpdir6() });
35132
+ execSync27(`${py} -c ${JSON.stringify(pyScript)} ${JSON.stringify(JSON.stringify(cleaned))}`, { stdio: "pipe", timeout: 6e4, cwd: tmpdir6() });
34990
35133
  } catch {
34991
35134
  try {
34992
35135
  const safeText = cleaned.replace(/'/g, "'\\''");
34993
- execSync28(`${py} -m mlx_audio.tts.generate --model ${mlxModelId} --text '${safeText}' --voice ${mlxVoice} --lang_code ${mlxLangCode} --audio_path ${JSON.stringify(wavPath)}`, { stdio: "pipe", timeout: 6e4, cwd: tmpdir6() });
35136
+ execSync27(`${py} -m mlx_audio.tts.generate --model ${mlxModelId} --text '${safeText}' --voice ${mlxVoice} --lang_code ${mlxLangCode} --audio_path ${JSON.stringify(wavPath)}`, { stdio: "pipe", timeout: 6e4, cwd: tmpdir6() });
34994
35137
  } catch {
34995
35138
  return null;
34996
35139
  }
@@ -35038,7 +35181,7 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
35038
35181
  const voiceRequire = createRequire(join42(voiceDir(), "index.js"));
35039
35182
  const probeOnnx = () => {
35040
35183
  try {
35041
- const result = execSync28(`node -e "try { require('onnxruntime-node'); console.log('OK'); } catch(e) { console.log('FAIL:' + e.message); }"`, { cwd: voiceDir(), stdio: "pipe", timeout: 15e3, env: { ...process.env, NODE_PATH: join42(voiceDir(), "node_modules") } });
35184
+ const result = execSync27(`node -e "try { require('onnxruntime-node'); console.log('OK'); } catch(e) { console.log('FAIL:' + e.message); }"`, { cwd: voiceDir(), stdio: "pipe", timeout: 15e3, env: { ...process.env, NODE_PATH: join42(voiceDir(), "node_modules") } });
35042
35185
  const output = result.toString().trim();
35043
35186
  return output === "OK";
35044
35187
  } catch {
@@ -35055,7 +35198,7 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
35055
35198
  } catch {
35056
35199
  renderInfo("Installing ONNX runtime for voice synthesis...");
35057
35200
  try {
35058
- execSync28("npm install --no-audit --no-fund", {
35201
+ execSync27("npm install --no-audit --no-fund", {
35059
35202
  cwd: voiceDir(),
35060
35203
  stdio: "pipe",
35061
35204
  timeout: 12e4
@@ -35080,7 +35223,7 @@ Error: ${err instanceof Error ? err.message : String(err)}`);
35080
35223
  } catch {
35081
35224
  renderInfo("Installing phonemizer for voice synthesis...");
35082
35225
  try {
35083
- execSync28("npm install --no-audit --no-fund", {
35226
+ execSync27("npm install --no-audit --no-fund", {
35084
35227
  cwd: voiceDir(),
35085
35228
  stdio: "pipe",
35086
35229
  timeout: 12e4
@@ -35528,7 +35671,7 @@ Error: ${err instanceof Error ? err.message : String(err)}`);
35528
35671
  }
35529
35672
  });
35530
35673
 
35531
- // packages/cli/dist/tui/stream-renderer.js
35674
+ // ../packages/cli/dist/tui/stream-renderer.js
35532
35675
  function fg2563(code, text) {
35533
35676
  return isTTY5 ? `\x1B[38;5;${code}m${text}\x1B[0m` : text;
35534
35677
  }
@@ -35546,7 +35689,7 @@ function boldText(text) {
35546
35689
  }
35547
35690
  var isTTY5, PASTEL, StreamRenderer;
35548
35691
  var init_stream_renderer = __esm({
35549
- "packages/cli/dist/tui/stream-renderer.js"() {
35692
+ "../packages/cli/dist/tui/stream-renderer.js"() {
35550
35693
  "use strict";
35551
35694
  isTTY5 = process.stdout.isTTY ?? false;
35552
35695
  PASTEL = {
@@ -36015,7 +36158,7 @@ var init_stream_renderer = __esm({
36015
36158
  }
36016
36159
  });
36017
36160
 
36018
- // packages/cli/dist/tui/edit-history.js
36161
+ // ../packages/cli/dist/tui/edit-history.js
36019
36162
  import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync13 } from "node:fs";
36020
36163
  import { join as join43 } from "node:path";
36021
36164
  function createEditHistoryLogger(repoRoot, sessionId) {
@@ -36119,7 +36262,7 @@ function sanitizeArgs(tool, args) {
36119
36262
  }
36120
36263
  var EDIT_TOOLS;
36121
36264
  var init_edit_history = __esm({
36122
- "packages/cli/dist/tui/edit-history.js"() {
36265
+ "../packages/cli/dist/tui/edit-history.js"() {
36123
36266
  "use strict";
36124
36267
  EDIT_TOOLS = /* @__PURE__ */ new Set([
36125
36268
  "file_edit",
@@ -36130,7 +36273,7 @@ var init_edit_history = __esm({
36130
36273
  }
36131
36274
  });
36132
36275
 
36133
- // packages/cli/dist/tui/promptLoader.js
36276
+ // ../packages/cli/dist/tui/promptLoader.js
36134
36277
  import { readFileSync as readFileSync24, existsSync as existsSync33 } from "node:fs";
36135
36278
  import { join as join44, dirname as dirname16 } from "node:path";
36136
36279
  import { fileURLToPath as fileURLToPath11 } from "node:url";
@@ -36150,7 +36293,7 @@ function loadPrompt3(promptPath, vars) {
36150
36293
  }
36151
36294
  var __filename3, __dirname6, devPath2, publishedPath2, PROMPTS_DIR3, cache3;
36152
36295
  var init_promptLoader3 = __esm({
36153
- "packages/cli/dist/tui/promptLoader.js"() {
36296
+ "../packages/cli/dist/tui/promptLoader.js"() {
36154
36297
  "use strict";
36155
36298
  __filename3 = fileURLToPath11(import.meta.url);
36156
36299
  __dirname6 = dirname16(__filename3);
@@ -36161,10 +36304,10 @@ var init_promptLoader3 = __esm({
36161
36304
  }
36162
36305
  });
36163
36306
 
36164
- // packages/cli/dist/tui/dream-engine.js
36307
+ // ../packages/cli/dist/tui/dream-engine.js
36165
36308
  import { mkdirSync as mkdirSync14, writeFileSync as writeFileSync13, readFileSync as readFileSync25, existsSync as existsSync34, cpSync, rmSync, readdirSync as readdirSync10 } from "node:fs";
36166
36309
  import { join as join45, basename as basename12 } from "node:path";
36167
- import { execSync as execSync29 } from "node:child_process";
36310
+ import { execSync as execSync28 } from "node:child_process";
36168
36311
  function loadAutoresearchMemory(repoRoot) {
36169
36312
  const memoryPath = join45(repoRoot, ".oa", "memory", "autoresearch.json");
36170
36313
  if (!existsSync34(memoryPath))
@@ -36324,7 +36467,7 @@ function renderSwarmComplete(workspace) {
36324
36467
  }
36325
36468
  var SWARM_ROLE_CONFIG, AutoresearchFileWriteTool, AutoresearchFileEditTool, AUTORESEARCH_MEMORY_KEYS, SLEEP_STAGES, DreamFileWriteTool, DreamFileEditTool, DreamShellTool, DreamEngine;
36326
36469
  var init_dream_engine = __esm({
36327
- "packages/cli/dist/tui/dream-engine.js"() {
36470
+ "../packages/cli/dist/tui/dream-engine.js"() {
36328
36471
  "use strict";
36329
36472
  init_dist5();
36330
36473
  init_dist2();
@@ -36528,7 +36671,7 @@ var init_dream_engine = __esm({
36528
36671
  }
36529
36672
  }
36530
36673
  try {
36531
- const output = execSync29(cmd, {
36674
+ const output = execSync28(cmd, {
36532
36675
  cwd: this.repoRoot,
36533
36676
  timeout: 3e4,
36534
36677
  encoding: "utf-8",
@@ -37305,17 +37448,17 @@ ${summaryResult}
37305
37448
  try {
37306
37449
  mkdirSync14(checkpointDir, { recursive: true });
37307
37450
  try {
37308
- const gitStatus = execSync29("git status --porcelain", {
37451
+ const gitStatus = execSync28("git status --porcelain", {
37309
37452
  cwd: this.repoRoot,
37310
37453
  encoding: "utf-8",
37311
37454
  timeout: 1e4
37312
37455
  });
37313
- const gitDiff = execSync29("git diff", {
37456
+ const gitDiff = execSync28("git diff", {
37314
37457
  cwd: this.repoRoot,
37315
37458
  encoding: "utf-8",
37316
37459
  timeout: 1e4
37317
37460
  });
37318
- const gitHash = execSync29("git rev-parse HEAD 2>/dev/null || echo 'no-git'", {
37461
+ const gitHash = execSync28("git rev-parse HEAD 2>/dev/null || echo 'no-git'", {
37319
37462
  cwd: this.repoRoot,
37320
37463
  encoding: "utf-8",
37321
37464
  timeout: 5e3
@@ -37404,7 +37547,7 @@ ${files.map((f) => `- [\`${f}\`](./${f})`).join("\n")}
37404
37547
  }
37405
37548
  });
37406
37549
 
37407
- // packages/cli/dist/tui/priority-ingress.js
37550
+ // ../packages/cli/dist/tui/priority-ingress.js
37408
37551
  function classifyPriority(prompt, source, origin) {
37409
37552
  for (const rule of CLASSIFICATION_RULES) {
37410
37553
  if (rule.sourceType !== "any" && rule.sourceType !== source)
@@ -37429,7 +37572,7 @@ function classifyPriority(prompt, source, origin) {
37429
37572
  }
37430
37573
  var PRIORITY_WEIGHT, PRIORITY_POLICIES, CLASSIFICATION_RULES, PriorityIngressEngine;
37431
37574
  var init_priority_ingress = __esm({
37432
- "packages/cli/dist/tui/priority-ingress.js"() {
37575
+ "../packages/cli/dist/tui/priority-ingress.js"() {
37433
37576
  "use strict";
37434
37577
  PRIORITY_WEIGHT = {
37435
37578
  critical: 100,
@@ -37614,7 +37757,7 @@ var init_priority_ingress = __esm({
37614
37757
  }
37615
37758
  });
37616
37759
 
37617
- // packages/cli/dist/tui/bless-engine.js
37760
+ // ../packages/cli/dist/tui/bless-engine.js
37618
37761
  function renderBlessStart() {
37619
37762
  process.stdout.write(`
37620
37763
  ${c2.green("\u26A1")} ${c2.bold("BLESSED")} \u2014 Infinite warm loop activated
@@ -37638,7 +37781,7 @@ function renderBlessStop(state) {
37638
37781
  }
37639
37782
  var BlessEngine;
37640
37783
  var init_bless_engine = __esm({
37641
- "packages/cli/dist/tui/bless-engine.js"() {
37784
+ "../packages/cli/dist/tui/bless-engine.js"() {
37642
37785
  "use strict";
37643
37786
  init_render();
37644
37787
  init_dist2();
@@ -37769,7 +37912,7 @@ var init_bless_engine = __esm({
37769
37912
  }
37770
37913
  });
37771
37914
 
37772
- // packages/cli/dist/tui/dmn-engine.js
37915
+ // ../packages/cli/dist/tui/dmn-engine.js
37773
37916
  import { existsSync as existsSync35, readFileSync as readFileSync26, writeFileSync as writeFileSync14, mkdirSync as mkdirSync15, readdirSync as readdirSync11, unlinkSync as unlinkSync5 } from "node:fs";
37774
37917
  import { join as join46, basename as basename13 } from "node:path";
37775
37918
  function buildDMNGatherPrompt(recentTaskSummaries, dueReminders, attentionItems, memoryTopics, capabilities, competence, reflectionBuffer) {
@@ -37857,7 +38000,7 @@ function renderDMNResting(consecutiveNulls) {
37857
38000
  }
37858
38001
  var DMNEngine;
37859
38002
  var init_dmn_engine = __esm({
37860
- "packages/cli/dist/tui/dmn-engine.js"() {
38003
+ "../packages/cli/dist/tui/dmn-engine.js"() {
37861
38004
  "use strict";
37862
38005
  init_dist5();
37863
38006
  init_dist2();
@@ -38529,7 +38672,7 @@ OUTPUT: Call task_complete with JSON:
38529
38672
  }
38530
38673
  });
38531
38674
 
38532
- // packages/cli/dist/tui/snr-engine.js
38675
+ // ../packages/cli/dist/tui/snr-engine.js
38533
38676
  import { existsSync as existsSync36, readdirSync as readdirSync12, readFileSync as readFileSync27 } from "node:fs";
38534
38677
  import { join as join47, basename as basename14 } from "node:path";
38535
38678
  function computeDPrime(signalScores, noiseScores) {
@@ -38589,7 +38732,7 @@ function adaptTool4(tool) {
38589
38732
  }
38590
38733
  var SNREngine;
38591
38734
  var init_snr_engine = __esm({
38592
- "packages/cli/dist/tui/snr-engine.js"() {
38735
+ "../packages/cli/dist/tui/snr-engine.js"() {
38593
38736
  "use strict";
38594
38737
  init_dist5();
38595
38738
  init_dist2();
@@ -38864,7 +39007,7 @@ Call task_complete with the JSON array when done.`, onEvent)
38864
39007
  }
38865
39008
  });
38866
39009
 
38867
- // packages/cli/dist/tui/emotion-engine.js
39010
+ // ../packages/cli/dist/tui/emotion-engine.js
38868
39011
  function labelFromCoordinates(valence, arousal) {
38869
39012
  if (valence > 0.6 && arousal > 0.6)
38870
39013
  return { label: "exhilarated", emoji: "\u{1F929}" };
@@ -38925,7 +39068,7 @@ function clamp(value, min, max) {
38925
39068
  }
38926
39069
  var BASELINE_VALENCE, BASELINE_AROUSAL, DECAY_HALF_LIFE_MS, LABEL_UPDATE_INTERVAL_MS, EXCITEMENT_THRESHOLD, DISTRESS_THRESHOLD, OUTREACH_COOLDOWN_MS, OUTREACH_MIN_STREAK, LABEL_REGEN_THRESHOLD, EmotionEngine;
38927
39070
  var init_emotion_engine = __esm({
38928
- "packages/cli/dist/tui/emotion-engine.js"() {
39071
+ "../packages/cli/dist/tui/emotion-engine.js"() {
38929
39072
  "use strict";
38930
39073
  init_dist5();
38931
39074
  init_promptLoader3();
@@ -39271,7 +39414,7 @@ var init_emotion_engine = __esm({
39271
39414
  }
39272
39415
  });
39273
39416
 
39274
- // packages/cli/dist/tui/tool-policy.js
39417
+ // ../packages/cli/dist/tui/tool-policy.js
39275
39418
  function getDefaultPolicy(context) {
39276
39419
  switch (context) {
39277
39420
  case "terminal":
@@ -39321,7 +39464,7 @@ function applyToolPolicy(tools, context, userConfig) {
39321
39464
  }
39322
39465
  var SAFE_PUBLIC_TOOLS, SAFE_GROUP_ADMIN_TOOLS;
39323
39466
  var init_tool_policy = __esm({
39324
- "packages/cli/dist/tui/tool-policy.js"() {
39467
+ "../packages/cli/dist/tui/tool-policy.js"() {
39325
39468
  "use strict";
39326
39469
  SAFE_PUBLIC_TOOLS = /* @__PURE__ */ new Set([
39327
39470
  "memory_read",
@@ -39350,7 +39493,7 @@ var init_tool_policy = __esm({
39350
39493
  }
39351
39494
  });
39352
39495
 
39353
- // packages/cli/dist/tui/telegram-bridge.js
39496
+ // ../packages/cli/dist/tui/telegram-bridge.js
39354
39497
  import { mkdirSync as mkdirSync16, existsSync as existsSync37, unlinkSync as unlinkSync6, readdirSync as readdirSync13, statSync as statSync10 } from "node:fs";
39355
39498
  import { join as join48, resolve as resolve27 } from "node:path";
39356
39499
  import { writeFile as writeFileAsync } from "node:fs/promises";
@@ -39487,7 +39630,7 @@ function renderTelegramSubAgentError(username, error) {
39487
39630
  }
39488
39631
  var TELEGRAM_SAFETY_PROMPT, ADMIN_DM_PROMPT, ADMIN_GROUP_PROMPT, GROUP_REPLY_DISCRETION_PROMPT, MEDIA_CACHE_TTL_MS, TelegramBridge;
39489
39632
  var init_telegram_bridge = __esm({
39490
- "packages/cli/dist/tui/telegram-bridge.js"() {
39633
+ "../packages/cli/dist/tui/telegram-bridge.js"() {
39491
39634
  "use strict";
39492
39635
  init_dist5();
39493
39636
  init_dist2();
@@ -40526,7 +40669,7 @@ ${caption}\r
40526
40669
  }
40527
40670
  });
40528
40671
 
40529
- // packages/cli/dist/tui/braille-spinner.js
40672
+ // ../packages/cli/dist/tui/braille-spinner.js
40530
40673
  function buildColorRamp(ramp) {
40531
40674
  return [...ramp, ...ramp.slice(1, -1).reverse()];
40532
40675
  }
@@ -40568,7 +40711,7 @@ function themeForTool(toolName) {
40568
40711
  }
40569
40712
  var DENSITY, WAVE, THEME_DEFAULT, THEME_FILE, THEME_SHELL, THEME_WEB, THEME_SEARCH, THEME_MEMORY, THEME_SKILL, THEME_TOOL_CREATE, THEME_DREAM, DEFAULT_METRICS, BrailleSpinner;
40570
40713
  var init_braille_spinner = __esm({
40571
- "packages/cli/dist/tui/braille-spinner.js"() {
40714
+ "../packages/cli/dist/tui/braille-spinner.js"() {
40572
40715
  "use strict";
40573
40716
  DENSITY = [
40574
40717
  "\u2800",
@@ -40765,10 +40908,10 @@ var init_braille_spinner = __esm({
40765
40908
  }
40766
40909
  });
40767
40910
 
40768
- // packages/cli/dist/tui/status-bar.js
40911
+ // ../packages/cli/dist/tui/status-bar.js
40769
40912
  var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, StatusBar;
40770
40913
  var init_status_bar = __esm({
40771
- "packages/cli/dist/tui/status-bar.js"() {
40914
+ "../packages/cli/dist/tui/status-bar.js"() {
40772
40915
  "use strict";
40773
40916
  init_render();
40774
40917
  init_braille_spinner();
@@ -41946,7 +42089,7 @@ var init_status_bar = __esm({
41946
42089
  }
41947
42090
  });
41948
42091
 
41949
- // packages/cli/dist/tui/interactive.js
42092
+ // ../packages/cli/dist/tui/interactive.js
41950
42093
  import * as readline2 from "node:readline";
41951
42094
  import { Writable } from "node:stream";
41952
42095
  import { cwd } from "node:process";
@@ -42547,7 +42690,7 @@ ${entry.fullContent}`
42547
42690
  const sizeStr = resultLen > 0 ? ` | ${resultLen.toLocaleString()} chars (~${Math.ceil(resultLen / 4).toLocaleString()} tokens)` : "";
42548
42691
  renderVerbose(`${event.toolName ?? "unknown"}: ${durStr}${sizeStr}`);
42549
42692
  }
42550
- if (voice?.enabled) {
42693
+ if (voice?.enabled && event.toolName !== "task_complete") {
42551
42694
  const emoState2 = emotionEngine?.getState();
42552
42695
  const emoCtx2 = emoState2 ? { valence: emoState2.valence, arousal: emoState2.arousal, label: emoState2.label, emoji: emoState2.emoji } : void 0;
42553
42696
  const desc = describeToolResult(event.toolName ?? "unknown", event.success ?? false, vLevel, event.content ?? void 0, emoCtx2, isStark);
@@ -44650,8 +44793,8 @@ NEW TASK: ${fullInput}`;
44650
44793
  try {
44651
44794
  const updateInfo = await checkForUpdate(version);
44652
44795
  if (updateInfo) {
44653
- const { exec } = await import("node:child_process");
44654
- exec(`npm install -g open-agents-ai@latest --prefer-online`, { timeout: 18e4 }, (err) => {
44796
+ const { exec: exec2 } = await import("node:child_process");
44797
+ exec2(`npm install -g open-agents-ai@latest --prefer-online`, { timeout: 18e4 }, (err) => {
44655
44798
  if (!err) {
44656
44799
  writeContent(() => renderInfo(`Updated to v${updateInfo.latestVersion} in background. Takes effect next session.`));
44657
44800
  }
@@ -44849,7 +44992,7 @@ async function runWithTUI(task, config, repoPath) {
44849
44992
  }
44850
44993
  var taskManager;
44851
44994
  var init_interactive = __esm({
44852
- "packages/cli/dist/tui/interactive.js"() {
44995
+ "../packages/cli/dist/tui/interactive.js"() {
44853
44996
  "use strict";
44854
44997
  init_dist5();
44855
44998
  init_dist5();
@@ -44886,7 +45029,7 @@ var init_interactive = __esm({
44886
45029
  }
44887
45030
  });
44888
45031
 
44889
- // packages/cli/dist/commands/run.js
45032
+ // ../packages/cli/dist/commands/run.js
44890
45033
  var run_exports = {};
44891
45034
  __export(run_exports, {
44892
45035
  runCommand: () => runCommand
@@ -44906,13 +45049,13 @@ async function runCommand(opts, config) {
44906
45049
  }
44907
45050
  }
44908
45051
  var init_run = __esm({
44909
- "packages/cli/dist/commands/run.js"() {
45052
+ "../packages/cli/dist/commands/run.js"() {
44910
45053
  "use strict";
44911
45054
  init_interactive();
44912
45055
  }
44913
45056
  });
44914
45057
 
44915
- // packages/indexer/dist/codebase-indexer.js
45058
+ // ../packages/indexer/dist/codebase-indexer.js
44916
45059
  import { glob } from "glob";
44917
45060
  import ignore from "ignore";
44918
45061
  import { readFile as readFile16, stat as stat4 } from "node:fs/promises";
@@ -44920,7 +45063,7 @@ import { createHash as createHash4 } from "node:crypto";
44920
45063
  import { join as join50, relative as relative3, extname as extname10, basename as basename15 } from "node:path";
44921
45064
  var DEFAULT_EXCLUDE, LANGUAGE_MAP, CodebaseIndexer;
44922
45065
  var init_codebase_indexer = __esm({
44923
- "packages/indexer/dist/codebase-indexer.js"() {
45066
+ "../packages/indexer/dist/codebase-indexer.js"() {
44924
45067
  "use strict";
44925
45068
  DEFAULT_EXCLUDE = [
44926
45069
  "node_modules",
@@ -45038,25 +45181,25 @@ var init_codebase_indexer = __esm({
45038
45181
  }
45039
45182
  });
45040
45183
 
45041
- // packages/indexer/dist/repoScanner.js
45184
+ // ../packages/indexer/dist/repoScanner.js
45042
45185
  import ignore2 from "ignore";
45043
45186
  var init_repoScanner = __esm({
45044
- "packages/indexer/dist/repoScanner.js"() {
45187
+ "../packages/indexer/dist/repoScanner.js"() {
45045
45188
  "use strict";
45046
45189
  }
45047
45190
  });
45048
45191
 
45049
- // packages/indexer/dist/symbolExtractor.js
45192
+ // ../packages/indexer/dist/symbolExtractor.js
45050
45193
  var init_symbolExtractor = __esm({
45051
- "packages/indexer/dist/symbolExtractor.js"() {
45194
+ "../packages/indexer/dist/symbolExtractor.js"() {
45052
45195
  "use strict";
45053
45196
  }
45054
45197
  });
45055
45198
 
45056
- // packages/indexer/dist/graphBuilder.js
45199
+ // ../packages/indexer/dist/graphBuilder.js
45057
45200
  var TS_EXTENSIONS, JS_EXTENSIONS, ALL_EXTENSIONS;
45058
45201
  var init_graphBuilder = __esm({
45059
- "packages/indexer/dist/graphBuilder.js"() {
45202
+ "../packages/indexer/dist/graphBuilder.js"() {
45060
45203
  "use strict";
45061
45204
  TS_EXTENSIONS = [".ts", ".tsx", ".mts", ".cts"];
45062
45205
  JS_EXTENSIONS = [".js", ".jsx", ".mjs", ".cjs"];
@@ -45064,30 +45207,30 @@ var init_graphBuilder = __esm({
45064
45207
  }
45065
45208
  });
45066
45209
 
45067
- // packages/indexer/dist/fileSummarizer.js
45210
+ // ../packages/indexer/dist/fileSummarizer.js
45068
45211
  var init_fileSummarizer = __esm({
45069
- "packages/indexer/dist/fileSummarizer.js"() {
45212
+ "../packages/indexer/dist/fileSummarizer.js"() {
45070
45213
  "use strict";
45071
45214
  }
45072
45215
  });
45073
45216
 
45074
- // packages/indexer/dist/embeddings.js
45217
+ // ../packages/indexer/dist/embeddings.js
45075
45218
  var init_embeddings = __esm({
45076
- "packages/indexer/dist/embeddings.js"() {
45219
+ "../packages/indexer/dist/embeddings.js"() {
45077
45220
  "use strict";
45078
45221
  }
45079
45222
  });
45080
45223
 
45081
- // packages/indexer/dist/ollamaEmbeddings.js
45224
+ // ../packages/indexer/dist/ollamaEmbeddings.js
45082
45225
  var init_ollamaEmbeddings = __esm({
45083
- "packages/indexer/dist/ollamaEmbeddings.js"() {
45226
+ "../packages/indexer/dist/ollamaEmbeddings.js"() {
45084
45227
  "use strict";
45085
45228
  }
45086
45229
  });
45087
45230
 
45088
- // packages/indexer/dist/index.js
45231
+ // ../packages/indexer/dist/index.js
45089
45232
  var init_dist8 = __esm({
45090
- "packages/indexer/dist/index.js"() {
45233
+ "../packages/indexer/dist/index.js"() {
45091
45234
  "use strict";
45092
45235
  init_codebase_indexer();
45093
45236
  init_repoScanner();
@@ -45099,7 +45242,7 @@ var init_dist8 = __esm({
45099
45242
  }
45100
45243
  });
45101
45244
 
45102
- // packages/cli/dist/commands/index-repo.js
45245
+ // ../packages/cli/dist/commands/index-repo.js
45103
45246
  var index_repo_exports = {};
45104
45247
  __export(index_repo_exports, {
45105
45248
  indexRepoCommand: () => indexRepoCommand
@@ -45192,7 +45335,7 @@ async function indexRepoCommand(opts, _config) {
45192
45335
  printSuccess("Repository indexed successfully");
45193
45336
  }
45194
45337
  var init_index_repo = __esm({
45195
- "packages/cli/dist/commands/index-repo.js"() {
45338
+ "../packages/cli/dist/commands/index-repo.js"() {
45196
45339
  "use strict";
45197
45340
  init_dist8();
45198
45341
  init_spinner();
@@ -45200,7 +45343,7 @@ var init_index_repo = __esm({
45200
45343
  }
45201
45344
  });
45202
45345
 
45203
- // packages/cli/dist/commands/status.js
45346
+ // ../packages/cli/dist/commands/status.js
45204
45347
  var status_exports = {};
45205
45348
  __export(status_exports, {
45206
45349
  statusCommand: () => statusCommand
@@ -45350,7 +45493,7 @@ async function statusVllm(opts, config) {
45350
45493
  printSuccess("vLLM backend is operational");
45351
45494
  }
45352
45495
  var init_status = __esm({
45353
- "packages/cli/dist/commands/status.js"() {
45496
+ "../packages/cli/dist/commands/status.js"() {
45354
45497
  "use strict";
45355
45498
  init_dist();
45356
45499
  init_spinner();
@@ -45358,7 +45501,7 @@ var init_status = __esm({
45358
45501
  }
45359
45502
  });
45360
45503
 
45361
- // packages/cli/dist/commands/config.js
45504
+ // ../packages/cli/dist/commands/config.js
45362
45505
  var config_exports = {};
45363
45506
  __export(config_exports, {
45364
45507
  configCommand: () => configCommand
@@ -45533,7 +45676,7 @@ function handleKeys() {
45533
45676
  }
45534
45677
  var CONFIG_KEYS, SENSITIVE_KEYS, INT_KEYS, BOOL_KEYS, ENUM_KEYS;
45535
45678
  var init_config3 = __esm({
45536
- "packages/cli/dist/commands/config.js"() {
45679
+ "../packages/cli/dist/commands/config.js"() {
45537
45680
  "use strict";
45538
45681
  init_config();
45539
45682
  init_oa_directory();
@@ -45580,7 +45723,7 @@ var init_config3 = __esm({
45580
45723
  }
45581
45724
  });
45582
45725
 
45583
- // packages/cli/dist/commands/serve.js
45726
+ // ../packages/cli/dist/commands/serve.js
45584
45727
  var serve_exports = {};
45585
45728
  __export(serve_exports, {
45586
45729
  serveCommand: () => serveCommand
@@ -45730,14 +45873,14 @@ async function runVllmServer(args, verbose) {
45730
45873
  });
45731
45874
  }
45732
45875
  var init_serve = __esm({
45733
- "packages/cli/dist/commands/serve.js"() {
45876
+ "../packages/cli/dist/commands/serve.js"() {
45734
45877
  "use strict";
45735
45878
  init_dist();
45736
45879
  init_output();
45737
45880
  }
45738
45881
  });
45739
45882
 
45740
- // packages/cli/dist/commands/eval.js
45883
+ // ../packages/cli/dist/commands/eval.js
45741
45884
  var eval_exports = {};
45742
45885
  __export(eval_exports, {
45743
45886
  evalCommand: () => evalCommand
@@ -45876,7 +46019,7 @@ function createTempEvalRepo() {
45876
46019
  }
45877
46020
  var BASIC_SUITE, FULL_SUITE, SUITES;
45878
46021
  var init_eval = __esm({
45879
- "packages/cli/dist/commands/eval.js"() {
46022
+ "../packages/cli/dist/commands/eval.js"() {
45880
46023
  "use strict";
45881
46024
  init_dist5();
45882
46025
  init_dist();
@@ -45924,7 +46067,7 @@ var init_eval = __esm({
45924
46067
  }
45925
46068
  });
45926
46069
 
45927
- // packages/cli/dist/index.js
46070
+ // ../packages/cli/dist/index.js
45928
46071
  init_config();
45929
46072
  init_output();
45930
46073
  init_updater();
@@ -45933,7 +46076,7 @@ import { createRequire as createRequire3 } from "node:module";
45933
46076
  import { fileURLToPath as fileURLToPath13 } from "node:url";
45934
46077
  import { dirname as dirname18, join as join53 } from "node:path";
45935
46078
 
45936
- // packages/cli/dist/cli.js
46079
+ // ../packages/cli/dist/cli.js
45937
46080
  import { createInterface } from "node:readline";
45938
46081
  function createCli(options) {
45939
46082
  return {
@@ -45972,10 +46115,10 @@ function createCli(options) {
45972
46115
  };
45973
46116
  }
45974
46117
 
45975
- // packages/cli/dist/args.js
46118
+ // ../packages/cli/dist/args.js
45976
46119
  import { parseArgs as nodeParseArgs } from "node:util";
45977
46120
 
45978
- // packages/cli/dist/types.js
46121
+ // ../packages/cli/dist/types.js
45979
46122
  var DEFAULT_OPTIONS = {
45980
46123
  model: "qwen-2.5-coder-32b",
45981
46124
  backendUrl: "http://localhost:8000/v1",
@@ -45985,7 +46128,7 @@ var DEFAULT_OPTIONS = {
45985
46128
  verbose: false
45986
46129
  };
45987
46130
 
45988
- // packages/cli/dist/args.js
46131
+ // ../packages/cli/dist/args.js
45989
46132
  function parseArgs(argv) {
45990
46133
  const { values } = nodeParseArgs({
45991
46134
  args: argv.slice(2),
@@ -46031,7 +46174,7 @@ Options:
46031
46174
  console.log(help.trim());
46032
46175
  }
46033
46176
 
46034
- // packages/cli/dist/index.js
46177
+ // ../packages/cli/dist/index.js
46035
46178
  init_config();
46036
46179
  init_spinner();
46037
46180
  init_output();