@askexenow/exe-os 0.9.13 → 0.9.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/backfill-conversations.js +31 -4
- package/dist/bin/backfill-responses.js +31 -4
- package/dist/bin/backfill-vectors.js +25 -4
- package/dist/bin/cleanup-stale-review-tasks.js +1 -1
- package/dist/bin/cli.js +55 -8
- package/dist/bin/exe-assign.js +31 -4
- package/dist/bin/exe-boot.js +25 -4
- package/dist/bin/exe-dispatch.js +1 -1
- package/dist/bin/exe-doctor.js +1 -1
- package/dist/bin/exe-export-behaviors.js +1 -1
- package/dist/bin/exe-forget.js +1 -1
- package/dist/bin/exe-gateway.js +447 -21
- package/dist/bin/exe-heartbeat.js +1 -1
- package/dist/bin/exe-kill.js +1 -1
- package/dist/bin/exe-launch-agent.js +1 -1
- package/dist/bin/exe-link.js +31 -4
- package/dist/bin/exe-pending-messages.js +1 -1
- package/dist/bin/exe-pending-notifications.js +1 -1
- package/dist/bin/exe-pending-reviews.js +1 -1
- package/dist/bin/exe-rename.js +31 -4
- package/dist/bin/exe-review.js +1 -1
- package/dist/bin/exe-search.js +31 -4
- package/dist/bin/exe-session-cleanup.js +25 -4
- package/dist/bin/exe-start-codex.js +1 -1
- package/dist/bin/exe-start-opencode.js +1 -1
- package/dist/bin/exe-status.js +1 -1
- package/dist/bin/exe-team.js +1 -1
- package/dist/bin/git-sweep.js +25 -4
- package/dist/bin/graph-backfill.js +1 -1
- package/dist/bin/graph-export.js +1 -1
- package/dist/bin/scan-tasks.js +25 -4
- package/dist/bin/setup.js +46 -8
- package/dist/bin/shard-migrate.js +1 -1
- package/dist/bin/wiki-sync.js +1 -1
- package/dist/gateway/index.js +128 -125
- package/dist/hooks/bug-report-worker.js +1 -1
- package/dist/hooks/codex-stop-task-finalizer.js +1 -1
- package/dist/hooks/commit-complete.js +25 -4
- package/dist/hooks/error-recall.js +31 -4
- package/dist/hooks/ingest-worker.js +25 -4
- package/dist/hooks/ingest.js +1 -1
- package/dist/hooks/instructions-loaded.js +31 -4
- package/dist/hooks/notification.js +31 -4
- package/dist/hooks/post-compact.js +31 -4
- package/dist/hooks/pre-compact.js +25 -4
- package/dist/hooks/pre-tool-use.js +31 -4
- package/dist/hooks/prompt-ingest-worker.js +25 -4
- package/dist/hooks/prompt-submit.js +25 -4
- package/dist/hooks/response-ingest-worker.js +25 -4
- package/dist/hooks/session-end.js +25 -4
- package/dist/hooks/session-start.js +31 -4
- package/dist/hooks/stop.js +25 -4
- package/dist/hooks/subagent-stop.js +31 -4
- package/dist/hooks/summary-worker.js +25 -4
- package/dist/index.js +128 -125
- package/dist/lib/cloud-sync.js +31 -4
- package/dist/lib/database.js +31 -4
- package/dist/lib/db-daemon-client.js +31 -3
- package/dist/lib/db.js +31 -4
- package/dist/lib/device-registry.js +31 -4
- package/dist/lib/embedder.js +30 -3
- package/dist/lib/exe-daemon-client.js +31 -3
- package/dist/lib/exe-daemon.js +1958 -153
- package/dist/lib/hybrid-search.js +31 -4
- package/dist/lib/schedules.js +1 -1
- package/dist/lib/store.js +1 -1
- package/dist/mcp/server.js +25 -4
- package/dist/runtime/index.js +25 -4
- package/dist/tui/App.js +34 -4
- package/package.json +1 -1
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
|
+
}) : x)(function(x) {
|
|
6
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
7
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
+
});
|
|
3
9
|
var __esm = (fn, res) => function __init() {
|
|
4
10
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
5
11
|
};
|
|
@@ -659,7 +665,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
659
665
|
for (const mapping of VIEW_MAPPINGS) {
|
|
660
666
|
const relation = mapping.source.replace(/"/g, "");
|
|
661
667
|
const rows = await prisma.$queryRawUnsafe(
|
|
662
|
-
"SELECT to_regclass($1) AS regclass",
|
|
668
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
663
669
|
relation
|
|
664
670
|
);
|
|
665
671
|
if (!rows[0]?.regclass) {
|
|
@@ -1013,8 +1019,29 @@ function findPackageRoot() {
|
|
|
1013
1019
|
}
|
|
1014
1020
|
return null;
|
|
1015
1021
|
}
|
|
1022
|
+
function getAvailableMemoryGB() {
|
|
1023
|
+
if (process.platform === "darwin") {
|
|
1024
|
+
try {
|
|
1025
|
+
const { execSync: execSync4 } = __require("child_process");
|
|
1026
|
+
const vmstat = execSync4("vm_stat", { encoding: "utf8" });
|
|
1027
|
+
const pageSize = 16384;
|
|
1028
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1029
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
1030
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
1031
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
1032
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
1033
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
1034
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
1035
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
1036
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
1037
|
+
} catch {
|
|
1038
|
+
return os4.freemem() / (1024 * 1024 * 1024);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
return os4.freemem() / (1024 * 1024 * 1024);
|
|
1042
|
+
}
|
|
1016
1043
|
function spawnDaemon() {
|
|
1017
|
-
const freeGB =
|
|
1044
|
+
const freeGB = getAvailableMemoryGB();
|
|
1018
1045
|
const totalGB = os4.totalmem() / (1024 * 1024 * 1024);
|
|
1019
1046
|
if (totalGB <= 8) {
|
|
1020
1047
|
process.stderr.write(
|
|
@@ -1023,9 +1050,9 @@ function spawnDaemon() {
|
|
|
1023
1050
|
);
|
|
1024
1051
|
return;
|
|
1025
1052
|
}
|
|
1026
|
-
if (totalGB <= 16 && freeGB <
|
|
1053
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
1027
1054
|
process.stderr.write(
|
|
1028
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
1055
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
1029
1056
|
`
|
|
1030
1057
|
);
|
|
1031
1058
|
return;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
|
+
}) : x)(function(x) {
|
|
6
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
7
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
+
});
|
|
3
9
|
var __esm = (fn, res) => function __init() {
|
|
4
10
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
5
11
|
};
|
|
@@ -668,7 +674,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
668
674
|
for (const mapping of VIEW_MAPPINGS) {
|
|
669
675
|
const relation = mapping.source.replace(/"/g, "");
|
|
670
676
|
const rows = await prisma.$queryRawUnsafe(
|
|
671
|
-
"SELECT to_regclass($1) AS regclass",
|
|
677
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
672
678
|
relation
|
|
673
679
|
);
|
|
674
680
|
if (!rows[0]?.regclass) {
|
|
@@ -1022,8 +1028,29 @@ function findPackageRoot() {
|
|
|
1022
1028
|
}
|
|
1023
1029
|
return null;
|
|
1024
1030
|
}
|
|
1031
|
+
function getAvailableMemoryGB() {
|
|
1032
|
+
if (process.platform === "darwin") {
|
|
1033
|
+
try {
|
|
1034
|
+
const { execSync: execSync4 } = __require("child_process");
|
|
1035
|
+
const vmstat = execSync4("vm_stat", { encoding: "utf8" });
|
|
1036
|
+
const pageSize = 16384;
|
|
1037
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1038
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
1039
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
1040
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
1041
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
1042
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
1043
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
1044
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
1045
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
1046
|
+
} catch {
|
|
1047
|
+
return os4.freemem() / (1024 * 1024 * 1024);
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
return os4.freemem() / (1024 * 1024 * 1024);
|
|
1051
|
+
}
|
|
1025
1052
|
function spawnDaemon() {
|
|
1026
|
-
const freeGB =
|
|
1053
|
+
const freeGB = getAvailableMemoryGB();
|
|
1027
1054
|
const totalGB = os4.totalmem() / (1024 * 1024 * 1024);
|
|
1028
1055
|
if (totalGB <= 8) {
|
|
1029
1056
|
process.stderr.write(
|
|
@@ -1032,9 +1059,9 @@ function spawnDaemon() {
|
|
|
1032
1059
|
);
|
|
1033
1060
|
return;
|
|
1034
1061
|
}
|
|
1035
|
-
if (totalGB <= 16 && freeGB <
|
|
1062
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
1036
1063
|
process.stderr.write(
|
|
1037
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
1064
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
1038
1065
|
`
|
|
1039
1066
|
);
|
|
1040
1067
|
return;
|
|
@@ -2,6 +2,12 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
6
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
7
|
+
}) : x)(function(x) {
|
|
8
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
9
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
10
|
+
});
|
|
5
11
|
var __esm = (fn, res) => function __init() {
|
|
6
12
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
7
13
|
};
|
|
@@ -944,7 +950,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
944
950
|
for (const mapping of VIEW_MAPPINGS) {
|
|
945
951
|
const relation = mapping.source.replace(/"/g, "");
|
|
946
952
|
const rows = await prisma.$queryRawUnsafe(
|
|
947
|
-
"SELECT to_regclass($1) AS regclass",
|
|
953
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
948
954
|
relation
|
|
949
955
|
);
|
|
950
956
|
if (!rows[0]?.regclass) {
|
|
@@ -1298,8 +1304,29 @@ function findPackageRoot() {
|
|
|
1298
1304
|
}
|
|
1299
1305
|
return null;
|
|
1300
1306
|
}
|
|
1307
|
+
function getAvailableMemoryGB() {
|
|
1308
|
+
if (process.platform === "darwin") {
|
|
1309
|
+
try {
|
|
1310
|
+
const { execSync: execSync5 } = __require("child_process");
|
|
1311
|
+
const vmstat = execSync5("vm_stat", { encoding: "utf8" });
|
|
1312
|
+
const pageSize = 16384;
|
|
1313
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1314
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
1315
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
1316
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
1317
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
1318
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
1319
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
1320
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
1321
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
1322
|
+
} catch {
|
|
1323
|
+
return os6.freemem() / (1024 * 1024 * 1024);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
return os6.freemem() / (1024 * 1024 * 1024);
|
|
1327
|
+
}
|
|
1301
1328
|
function spawnDaemon() {
|
|
1302
|
-
const freeGB =
|
|
1329
|
+
const freeGB = getAvailableMemoryGB();
|
|
1303
1330
|
const totalGB = os6.totalmem() / (1024 * 1024 * 1024);
|
|
1304
1331
|
if (totalGB <= 8) {
|
|
1305
1332
|
process.stderr.write(
|
|
@@ -1308,9 +1335,9 @@ function spawnDaemon() {
|
|
|
1308
1335
|
);
|
|
1309
1336
|
return;
|
|
1310
1337
|
}
|
|
1311
|
-
if (totalGB <= 16 && freeGB <
|
|
1338
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
1312
1339
|
process.stderr.write(
|
|
1313
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
1340
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
1314
1341
|
`
|
|
1315
1342
|
);
|
|
1316
1343
|
return;
|
|
@@ -1176,7 +1176,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
1176
1176
|
for (const mapping of VIEW_MAPPINGS) {
|
|
1177
1177
|
const relation = mapping.source.replace(/"/g, "");
|
|
1178
1178
|
const rows = await prisma.$queryRawUnsafe(
|
|
1179
|
-
"SELECT to_regclass($1) AS regclass",
|
|
1179
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
1180
1180
|
relation
|
|
1181
1181
|
);
|
|
1182
1182
|
if (!rows[0]?.regclass) {
|
|
@@ -1530,8 +1530,29 @@ function findPackageRoot() {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
return null;
|
|
1532
1532
|
}
|
|
1533
|
+
function getAvailableMemoryGB() {
|
|
1534
|
+
if (process.platform === "darwin") {
|
|
1535
|
+
try {
|
|
1536
|
+
const { execSync: execSync8 } = __require("child_process");
|
|
1537
|
+
const vmstat = execSync8("vm_stat", { encoding: "utf8" });
|
|
1538
|
+
const pageSize = 16384;
|
|
1539
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1540
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
1541
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
1542
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
1543
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
1544
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
1545
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
1546
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
1547
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
1548
|
+
} catch {
|
|
1549
|
+
return os6.freemem() / (1024 * 1024 * 1024);
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
return os6.freemem() / (1024 * 1024 * 1024);
|
|
1553
|
+
}
|
|
1533
1554
|
function spawnDaemon() {
|
|
1534
|
-
const freeGB =
|
|
1555
|
+
const freeGB = getAvailableMemoryGB();
|
|
1535
1556
|
const totalGB = os6.totalmem() / (1024 * 1024 * 1024);
|
|
1536
1557
|
if (totalGB <= 8) {
|
|
1537
1558
|
process.stderr.write(
|
|
@@ -1540,9 +1561,9 @@ function spawnDaemon() {
|
|
|
1540
1561
|
);
|
|
1541
1562
|
return;
|
|
1542
1563
|
}
|
|
1543
|
-
if (totalGB <= 16 && freeGB <
|
|
1564
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
1544
1565
|
process.stderr.write(
|
|
1545
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
1566
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
1546
1567
|
`
|
|
1547
1568
|
);
|
|
1548
1569
|
return;
|
|
@@ -2,6 +2,12 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
6
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
7
|
+
}) : x)(function(x) {
|
|
8
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
9
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
10
|
+
});
|
|
5
11
|
var __esm = (fn, res) => function __init() {
|
|
6
12
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
7
13
|
};
|
|
@@ -1228,7 +1234,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
1228
1234
|
for (const mapping of VIEW_MAPPINGS) {
|
|
1229
1235
|
const relation = mapping.source.replace(/"/g, "");
|
|
1230
1236
|
const rows = await prisma.$queryRawUnsafe(
|
|
1231
|
-
"SELECT to_regclass($1) AS regclass",
|
|
1237
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
1232
1238
|
relation
|
|
1233
1239
|
);
|
|
1234
1240
|
if (!rows[0]?.regclass) {
|
|
@@ -1582,8 +1588,29 @@ function findPackageRoot() {
|
|
|
1582
1588
|
}
|
|
1583
1589
|
return null;
|
|
1584
1590
|
}
|
|
1591
|
+
function getAvailableMemoryGB() {
|
|
1592
|
+
if (process.platform === "darwin") {
|
|
1593
|
+
try {
|
|
1594
|
+
const { execSync: execSync7 } = __require("child_process");
|
|
1595
|
+
const vmstat = execSync7("vm_stat", { encoding: "utf8" });
|
|
1596
|
+
const pageSize = 16384;
|
|
1597
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1598
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
1599
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
1600
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
1601
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
1602
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
1603
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
1604
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
1605
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
1606
|
+
} catch {
|
|
1607
|
+
return os6.freemem() / (1024 * 1024 * 1024);
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
return os6.freemem() / (1024 * 1024 * 1024);
|
|
1611
|
+
}
|
|
1585
1612
|
function spawnDaemon() {
|
|
1586
|
-
const freeGB =
|
|
1613
|
+
const freeGB = getAvailableMemoryGB();
|
|
1587
1614
|
const totalGB = os6.totalmem() / (1024 * 1024 * 1024);
|
|
1588
1615
|
if (totalGB <= 8) {
|
|
1589
1616
|
process.stderr.write(
|
|
@@ -1592,9 +1619,9 @@ function spawnDaemon() {
|
|
|
1592
1619
|
);
|
|
1593
1620
|
return;
|
|
1594
1621
|
}
|
|
1595
|
-
if (totalGB <= 16 && freeGB <
|
|
1622
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
1596
1623
|
process.stderr.write(
|
|
1597
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
1624
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
1598
1625
|
`
|
|
1599
1626
|
);
|
|
1600
1627
|
return;
|
|
@@ -726,7 +726,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
726
726
|
for (const mapping of VIEW_MAPPINGS) {
|
|
727
727
|
const relation = mapping.source.replace(/"/g, "");
|
|
728
728
|
const rows = await prisma.$queryRawUnsafe(
|
|
729
|
-
"SELECT to_regclass($1) AS regclass",
|
|
729
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
730
730
|
relation
|
|
731
731
|
);
|
|
732
732
|
if (!rows[0]?.regclass) {
|
|
@@ -2648,8 +2648,29 @@ function findPackageRoot() {
|
|
|
2648
2648
|
}
|
|
2649
2649
|
return null;
|
|
2650
2650
|
}
|
|
2651
|
+
function getAvailableMemoryGB() {
|
|
2652
|
+
if (process.platform === "darwin") {
|
|
2653
|
+
try {
|
|
2654
|
+
const { execSync: execSync3 } = __require("child_process");
|
|
2655
|
+
const vmstat = execSync3("vm_stat", { encoding: "utf8" });
|
|
2656
|
+
const pageSize = 16384;
|
|
2657
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
2658
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
2659
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
2660
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
2661
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
2662
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
2663
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
2664
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
2665
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
2666
|
+
} catch {
|
|
2667
|
+
return os6.freemem() / (1024 * 1024 * 1024);
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
return os6.freemem() / (1024 * 1024 * 1024);
|
|
2671
|
+
}
|
|
2651
2672
|
function spawnDaemon() {
|
|
2652
|
-
const freeGB =
|
|
2673
|
+
const freeGB = getAvailableMemoryGB();
|
|
2653
2674
|
const totalGB = os6.totalmem() / (1024 * 1024 * 1024);
|
|
2654
2675
|
if (totalGB <= 8) {
|
|
2655
2676
|
process.stderr.write(
|
|
@@ -2658,9 +2679,9 @@ function spawnDaemon() {
|
|
|
2658
2679
|
);
|
|
2659
2680
|
return;
|
|
2660
2681
|
}
|
|
2661
|
-
if (totalGB <= 16 && freeGB <
|
|
2682
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
2662
2683
|
process.stderr.write(
|
|
2663
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
2684
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
2664
2685
|
`
|
|
2665
2686
|
);
|
|
2666
2687
|
return;
|
|
@@ -1069,7 +1069,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
1069
1069
|
for (const mapping of VIEW_MAPPINGS) {
|
|
1070
1070
|
const relation = mapping.source.replace(/"/g, "");
|
|
1071
1071
|
const rows = await prisma.$queryRawUnsafe(
|
|
1072
|
-
"SELECT to_regclass($1) AS regclass",
|
|
1072
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
1073
1073
|
relation
|
|
1074
1074
|
);
|
|
1075
1075
|
if (!rows[0]?.regclass) {
|
|
@@ -1423,8 +1423,29 @@ function findPackageRoot() {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
return null;
|
|
1425
1425
|
}
|
|
1426
|
+
function getAvailableMemoryGB() {
|
|
1427
|
+
if (process.platform === "darwin") {
|
|
1428
|
+
try {
|
|
1429
|
+
const { execSync: execSync9 } = __require("child_process");
|
|
1430
|
+
const vmstat = execSync9("vm_stat", { encoding: "utf8" });
|
|
1431
|
+
const pageSize = 16384;
|
|
1432
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1433
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
1434
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
1435
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
1436
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
1437
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
1438
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
1439
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
1440
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
1441
|
+
} catch {
|
|
1442
|
+
return os4.freemem() / (1024 * 1024 * 1024);
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
return os4.freemem() / (1024 * 1024 * 1024);
|
|
1446
|
+
}
|
|
1426
1447
|
function spawnDaemon() {
|
|
1427
|
-
const freeGB =
|
|
1448
|
+
const freeGB = getAvailableMemoryGB();
|
|
1428
1449
|
const totalGB = os4.totalmem() / (1024 * 1024 * 1024);
|
|
1429
1450
|
if (totalGB <= 8) {
|
|
1430
1451
|
process.stderr.write(
|
|
@@ -1433,9 +1454,9 @@ function spawnDaemon() {
|
|
|
1433
1454
|
);
|
|
1434
1455
|
return;
|
|
1435
1456
|
}
|
|
1436
|
-
if (totalGB <= 16 && freeGB <
|
|
1457
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
1437
1458
|
process.stderr.write(
|
|
1438
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
1459
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
1439
1460
|
`
|
|
1440
1461
|
);
|
|
1441
1462
|
return;
|
|
@@ -737,7 +737,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
737
737
|
for (const mapping of VIEW_MAPPINGS) {
|
|
738
738
|
const relation = mapping.source.replace(/"/g, "");
|
|
739
739
|
const rows = await prisma.$queryRawUnsafe(
|
|
740
|
-
"SELECT to_regclass($1) AS regclass",
|
|
740
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
741
741
|
relation
|
|
742
742
|
);
|
|
743
743
|
if (!rows[0]?.regclass) {
|
|
@@ -2659,8 +2659,29 @@ function findPackageRoot() {
|
|
|
2659
2659
|
}
|
|
2660
2660
|
return null;
|
|
2661
2661
|
}
|
|
2662
|
+
function getAvailableMemoryGB() {
|
|
2663
|
+
if (process.platform === "darwin") {
|
|
2664
|
+
try {
|
|
2665
|
+
const { execSync: execSync3 } = __require("child_process");
|
|
2666
|
+
const vmstat = execSync3("vm_stat", { encoding: "utf8" });
|
|
2667
|
+
const pageSize = 16384;
|
|
2668
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
2669
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
2670
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
2671
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
2672
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
2673
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
2674
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
2675
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
2676
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
2677
|
+
} catch {
|
|
2678
|
+
return os5.freemem() / (1024 * 1024 * 1024);
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
return os5.freemem() / (1024 * 1024 * 1024);
|
|
2682
|
+
}
|
|
2662
2683
|
function spawnDaemon() {
|
|
2663
|
-
const freeGB =
|
|
2684
|
+
const freeGB = getAvailableMemoryGB();
|
|
2664
2685
|
const totalGB = os5.totalmem() / (1024 * 1024 * 1024);
|
|
2665
2686
|
if (totalGB <= 8) {
|
|
2666
2687
|
process.stderr.write(
|
|
@@ -2669,9 +2690,9 @@ function spawnDaemon() {
|
|
|
2669
2690
|
);
|
|
2670
2691
|
return;
|
|
2671
2692
|
}
|
|
2672
|
-
if (totalGB <= 16 && freeGB <
|
|
2693
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
2673
2694
|
process.stderr.write(
|
|
2674
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
2695
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
2675
2696
|
`
|
|
2676
2697
|
);
|
|
2677
2698
|
return;
|
|
@@ -1179,7 +1179,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
1179
1179
|
for (const mapping of VIEW_MAPPINGS) {
|
|
1180
1180
|
const relation = mapping.source.replace(/"/g, "");
|
|
1181
1181
|
const rows = await prisma.$queryRawUnsafe(
|
|
1182
|
-
"SELECT to_regclass($1) AS regclass",
|
|
1182
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
1183
1183
|
relation
|
|
1184
1184
|
);
|
|
1185
1185
|
if (!rows[0]?.regclass) {
|
|
@@ -1533,8 +1533,29 @@ function findPackageRoot() {
|
|
|
1533
1533
|
}
|
|
1534
1534
|
return null;
|
|
1535
1535
|
}
|
|
1536
|
+
function getAvailableMemoryGB() {
|
|
1537
|
+
if (process.platform === "darwin") {
|
|
1538
|
+
try {
|
|
1539
|
+
const { execSync: execSync10 } = __require("child_process");
|
|
1540
|
+
const vmstat = execSync10("vm_stat", { encoding: "utf8" });
|
|
1541
|
+
const pageSize = 16384;
|
|
1542
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1543
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
1544
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
1545
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
1546
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
1547
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
1548
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
1549
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
1550
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
1551
|
+
} catch {
|
|
1552
|
+
return os7.freemem() / (1024 * 1024 * 1024);
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
return os7.freemem() / (1024 * 1024 * 1024);
|
|
1556
|
+
}
|
|
1536
1557
|
function spawnDaemon() {
|
|
1537
|
-
const freeGB =
|
|
1558
|
+
const freeGB = getAvailableMemoryGB();
|
|
1538
1559
|
const totalGB = os7.totalmem() / (1024 * 1024 * 1024);
|
|
1539
1560
|
if (totalGB <= 8) {
|
|
1540
1561
|
process.stderr.write(
|
|
@@ -1543,9 +1564,9 @@ function spawnDaemon() {
|
|
|
1543
1564
|
);
|
|
1544
1565
|
return;
|
|
1545
1566
|
}
|
|
1546
|
-
if (totalGB <= 16 && freeGB <
|
|
1567
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
1547
1568
|
process.stderr.write(
|
|
1548
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
1569
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
1549
1570
|
`
|
|
1550
1571
|
);
|
|
1551
1572
|
return;
|
|
@@ -2,6 +2,12 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
6
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
7
|
+
}) : x)(function(x) {
|
|
8
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
9
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
10
|
+
});
|
|
5
11
|
var __esm = (fn, res) => function __init() {
|
|
6
12
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
7
13
|
};
|
|
@@ -1063,7 +1069,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
1063
1069
|
for (const mapping of VIEW_MAPPINGS) {
|
|
1064
1070
|
const relation = mapping.source.replace(/"/g, "");
|
|
1065
1071
|
const rows = await prisma.$queryRawUnsafe(
|
|
1066
|
-
"SELECT to_regclass($1) AS regclass",
|
|
1072
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
1067
1073
|
relation
|
|
1068
1074
|
);
|
|
1069
1075
|
if (!rows[0]?.regclass) {
|
|
@@ -1417,8 +1423,29 @@ function findPackageRoot() {
|
|
|
1417
1423
|
}
|
|
1418
1424
|
return null;
|
|
1419
1425
|
}
|
|
1426
|
+
function getAvailableMemoryGB() {
|
|
1427
|
+
if (process.platform === "darwin") {
|
|
1428
|
+
try {
|
|
1429
|
+
const { execSync: execSync9 } = __require("child_process");
|
|
1430
|
+
const vmstat = execSync9("vm_stat", { encoding: "utf8" });
|
|
1431
|
+
const pageSize = 16384;
|
|
1432
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1433
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
1434
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
1435
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
1436
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
1437
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
1438
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
1439
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
1440
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
1441
|
+
} catch {
|
|
1442
|
+
return os4.freemem() / (1024 * 1024 * 1024);
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
return os4.freemem() / (1024 * 1024 * 1024);
|
|
1446
|
+
}
|
|
1420
1447
|
function spawnDaemon() {
|
|
1421
|
-
const freeGB =
|
|
1448
|
+
const freeGB = getAvailableMemoryGB();
|
|
1422
1449
|
const totalGB = os4.totalmem() / (1024 * 1024 * 1024);
|
|
1423
1450
|
if (totalGB <= 8) {
|
|
1424
1451
|
process.stderr.write(
|
|
@@ -1427,9 +1454,9 @@ function spawnDaemon() {
|
|
|
1427
1454
|
);
|
|
1428
1455
|
return;
|
|
1429
1456
|
}
|
|
1430
|
-
if (totalGB <= 16 && freeGB <
|
|
1457
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
1431
1458
|
process.stderr.write(
|
|
1432
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
1459
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
1433
1460
|
`
|
|
1434
1461
|
);
|
|
1435
1462
|
return;
|
package/dist/hooks/stop.js
CHANGED
|
@@ -976,7 +976,7 @@ async function ensureCompatibilityViews(prisma) {
|
|
|
976
976
|
for (const mapping of VIEW_MAPPINGS) {
|
|
977
977
|
const relation = mapping.source.replace(/"/g, "");
|
|
978
978
|
const rows = await prisma.$queryRawUnsafe(
|
|
979
|
-
"SELECT to_regclass($1) AS regclass",
|
|
979
|
+
"SELECT to_regclass($1)::text AS regclass",
|
|
980
980
|
relation
|
|
981
981
|
);
|
|
982
982
|
if (!rows[0]?.regclass) {
|
|
@@ -1330,8 +1330,29 @@ function findPackageRoot() {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
return null;
|
|
1332
1332
|
}
|
|
1333
|
+
function getAvailableMemoryGB() {
|
|
1334
|
+
if (process.platform === "darwin") {
|
|
1335
|
+
try {
|
|
1336
|
+
const { execSync: execSync5 } = __require("child_process");
|
|
1337
|
+
const vmstat = execSync5("vm_stat", { encoding: "utf8" });
|
|
1338
|
+
const pageSize = 16384;
|
|
1339
|
+
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1340
|
+
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
1341
|
+
const free = vmstat.match(/Pages free:\s+(\d+)/);
|
|
1342
|
+
const inactive = vmstat.match(/Pages inactive:\s+(\d+)/);
|
|
1343
|
+
const speculative = vmstat.match(/Pages speculative:\s+(\d+)/);
|
|
1344
|
+
const freePages = free ? parseInt(free[1], 10) : 0;
|
|
1345
|
+
const inactivePages = inactive ? parseInt(inactive[1], 10) : 0;
|
|
1346
|
+
const speculativePages = speculative ? parseInt(speculative[1], 10) : 0;
|
|
1347
|
+
return (freePages + inactivePages + speculativePages) * actualPageSize / (1024 * 1024 * 1024);
|
|
1348
|
+
} catch {
|
|
1349
|
+
return os6.freemem() / (1024 * 1024 * 1024);
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
return os6.freemem() / (1024 * 1024 * 1024);
|
|
1353
|
+
}
|
|
1333
1354
|
function spawnDaemon() {
|
|
1334
|
-
const freeGB =
|
|
1355
|
+
const freeGB = getAvailableMemoryGB();
|
|
1335
1356
|
const totalGB = os6.totalmem() / (1024 * 1024 * 1024);
|
|
1336
1357
|
if (totalGB <= 8) {
|
|
1337
1358
|
process.stderr.write(
|
|
@@ -1340,9 +1361,9 @@ function spawnDaemon() {
|
|
|
1340
1361
|
);
|
|
1341
1362
|
return;
|
|
1342
1363
|
}
|
|
1343
|
-
if (totalGB <= 16 && freeGB <
|
|
1364
|
+
if (totalGB <= 16 && freeGB < 2) {
|
|
1344
1365
|
process.stderr.write(
|
|
1345
|
-
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB
|
|
1366
|
+
`[exed-client] SKIP: low memory (${freeGB.toFixed(1)}GB available / ${totalGB.toFixed(0)}GB total). Embedding daemon not started \u2014 using keyword search only.
|
|
1346
1367
|
`
|
|
1347
1368
|
);
|
|
1348
1369
|
return;
|