open-agents-ai 0.187.503 → 0.187.505
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +57 -36
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4609,17 +4609,17 @@ var init_memory_search = __esm({
|
|
|
4609
4609
|
try {
|
|
4610
4610
|
const { join: pathJoin } = await import("node:path");
|
|
4611
4611
|
const { existsSync: pathExists } = await import("node:fs");
|
|
4612
|
-
const { createRequire:
|
|
4612
|
+
const { createRequire: createRequire8 } = await import("node:module");
|
|
4613
4613
|
const oaDir = pathJoin(this.workingDir, ".oa");
|
|
4614
4614
|
const epDbPath = pathJoin(oaDir, "episodes.db");
|
|
4615
4615
|
const kgDbPath = pathJoin(oaDir, "knowledge.db");
|
|
4616
4616
|
if (!pathExists(epDbPath)) {
|
|
4617
4617
|
return { success: true, output: `No episode store found. Run tasks to build the knowledge graph.`, durationMs: performance.now() - start2 };
|
|
4618
4618
|
}
|
|
4619
|
-
const req2 =
|
|
4620
|
-
const
|
|
4619
|
+
const req2 = createRequire8(import.meta.url);
|
|
4620
|
+
const Database = req2("better-sqlite3");
|
|
4621
4621
|
if (mode === "episodes") {
|
|
4622
|
-
const db = new
|
|
4622
|
+
const db = new Database(epDbPath, { readonly: true });
|
|
4623
4623
|
const queryLower = query.toLowerCase();
|
|
4624
4624
|
const rows = db.prepare(`
|
|
4625
4625
|
SELECT * FROM episodes
|
|
@@ -4642,7 +4642,7 @@ ${lines.join("\n\n")}`,
|
|
|
4642
4642
|
};
|
|
4643
4643
|
}
|
|
4644
4644
|
if (mode === "graph" && pathExists(kgDbPath)) {
|
|
4645
|
-
const db = new
|
|
4645
|
+
const db = new Database(kgDbPath, { readonly: true });
|
|
4646
4646
|
const queryLower = query.toLowerCase();
|
|
4647
4647
|
const nodes = db.prepare(`
|
|
4648
4648
|
SELECT * FROM kg_nodes WHERE text LIKE ? ORDER BY mention_count DESC LIMIT 20
|
|
@@ -4662,7 +4662,7 @@ ${lines.join("\n\n")}`,
|
|
|
4662
4662
|
db.close();
|
|
4663
4663
|
const epLines = [];
|
|
4664
4664
|
if (episodeIds.size > 0 && pathExists(epDbPath)) {
|
|
4665
|
-
const epDb = new
|
|
4665
|
+
const epDb = new Database(epDbPath, { readonly: true });
|
|
4666
4666
|
for (const epId of [...episodeIds].slice(0, maxResults)) {
|
|
4667
4667
|
const ep = epDb.prepare("SELECT * FROM episodes WHERE id = ?").get(epId);
|
|
4668
4668
|
if (ep)
|
|
@@ -15371,8 +15371,8 @@ async function loadTranscribeCli() {
|
|
|
15371
15371
|
}).trim();
|
|
15372
15372
|
const tcPath = join24(globalRoot, "transcribe-cli");
|
|
15373
15373
|
if (existsSync19(join24(tcPath, "dist", "index.js"))) {
|
|
15374
|
-
const { createRequire:
|
|
15375
|
-
const req2 =
|
|
15374
|
+
const { createRequire: createRequire8 } = await import("node:module");
|
|
15375
|
+
const req2 = createRequire8(import.meta.url);
|
|
15376
15376
|
_tcModule = req2(join24(tcPath, "dist", "index.js"));
|
|
15377
15377
|
return _tcModule;
|
|
15378
15378
|
}
|
|
@@ -15385,8 +15385,8 @@ async function loadTranscribeCli() {
|
|
|
15385
15385
|
for (const ver of readdirSync38(nvmBase)) {
|
|
15386
15386
|
const tcPath = join24(nvmBase, ver, "lib", "node_modules", "transcribe-cli");
|
|
15387
15387
|
if (existsSync19(join24(tcPath, "dist", "index.js"))) {
|
|
15388
|
-
const { createRequire:
|
|
15389
|
-
const req2 =
|
|
15388
|
+
const { createRequire: createRequire8 } = await import("node:module");
|
|
15389
|
+
const req2 = createRequire8(import.meta.url);
|
|
15390
15390
|
_tcModule = req2(join24(tcPath, "dist", "index.js"));
|
|
15391
15391
|
return _tcModule;
|
|
15392
15392
|
}
|
|
@@ -500899,10 +500899,29 @@ var init_ts_morph_parser = __esm({
|
|
|
500899
500899
|
});
|
|
500900
500900
|
|
|
500901
500901
|
// packages/indexer/dist/code-graph-db.js
|
|
500902
|
-
import
|
|
500902
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
500903
500903
|
import { createHash as createHash5 } from "node:crypto";
|
|
500904
500904
|
import { mkdirSync as mkdirSync12, readFileSync as readFileSync26 } from "node:fs";
|
|
500905
500905
|
import { join as join50, dirname as dirname14, extname as extname9 } from "node:path";
|
|
500906
|
+
function loadDatabaseCtor() {
|
|
500907
|
+
if (_DatabaseCtor)
|
|
500908
|
+
return _DatabaseCtor;
|
|
500909
|
+
try {
|
|
500910
|
+
const req2 = createRequire2(import.meta.url);
|
|
500911
|
+
_DatabaseCtor = req2("better-sqlite3");
|
|
500912
|
+
return _DatabaseCtor;
|
|
500913
|
+
} catch (err) {
|
|
500914
|
+
const msg = err?.message ?? String(err);
|
|
500915
|
+
throw new Error(`CodeGraphDB requires the optional 'better-sqlite3' native module, but it failed to load.
|
|
500916
|
+
Install it manually:
|
|
500917
|
+
npm i -g better-sqlite3 (matches your global open-agents-ai install)
|
|
500918
|
+
If the install fails, install build tools first:
|
|
500919
|
+
Debian/Ubuntu: sudo apt install -y python3 build-essential
|
|
500920
|
+
Fedora/RHEL: sudo dnf install -y python3 gcc-c++ make
|
|
500921
|
+
macOS: xcode-select --install
|
|
500922
|
+
Underlying error: ${msg}`);
|
|
500923
|
+
}
|
|
500924
|
+
}
|
|
500906
500925
|
function extractFileSymbols(content, filePath) {
|
|
500907
500926
|
const isPython = /\.py$/.test(filePath);
|
|
500908
500927
|
const patterns = isPython ? [{ kind: "function", re: /^\s*(async\s+)?def\s+(\w+)/m }, { kind: "class", re: /^\s*class\s+(\w+)/m }] : TS_PATTERNS2;
|
|
@@ -500958,11 +500977,12 @@ function hashContent(content) {
|
|
|
500958
500977
|
function detectLanguage(filePath) {
|
|
500959
500978
|
return EXT_TO_LANG[extname9(filePath)] ?? "unknown";
|
|
500960
500979
|
}
|
|
500961
|
-
var TS_PATTERNS2, EXT_TO_LANG, CodeGraphDB;
|
|
500980
|
+
var _DatabaseCtor, TS_PATTERNS2, EXT_TO_LANG, CodeGraphDB;
|
|
500962
500981
|
var init_code_graph_db = __esm({
|
|
500963
500982
|
"packages/indexer/dist/code-graph-db.js"() {
|
|
500964
500983
|
"use strict";
|
|
500965
500984
|
init_ts_morph_parser();
|
|
500985
|
+
_DatabaseCtor = null;
|
|
500966
500986
|
TS_PATTERNS2 = [
|
|
500967
500987
|
{ kind: "function", re: /^\s*(export\s+)?(async\s+)?function\s+(\w+)/m },
|
|
500968
500988
|
{ kind: "class", re: /^\s*(export\s+)?(abstract\s+)?class\s+(\w+)/m },
|
|
@@ -501003,6 +501023,7 @@ var init_code_graph_db = __esm({
|
|
|
501003
501023
|
this.rootDir = rootDir;
|
|
501004
501024
|
const resolvedPath = dbPath ?? join50(rootDir, ".oa", "index", "code-graph.db");
|
|
501005
501025
|
mkdirSync12(dirname14(resolvedPath), { recursive: true });
|
|
501026
|
+
const Database = loadDatabaseCtor();
|
|
501006
501027
|
this.db = new Database(resolvedPath);
|
|
501007
501028
|
this.db.pragma("journal_mode = WAL");
|
|
501008
501029
|
this.db.pragma("foreign_keys = ON");
|
|
@@ -515581,12 +515602,12 @@ var init_pressure_gate = __esm({
|
|
|
515581
515602
|
});
|
|
515582
515603
|
|
|
515583
515604
|
// packages/memory/dist/db.js
|
|
515584
|
-
import { createRequire as
|
|
515605
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
515585
515606
|
function getDatabase() {
|
|
515586
515607
|
if (_Database !== null)
|
|
515587
515608
|
return _Database;
|
|
515588
515609
|
try {
|
|
515589
|
-
const req2 =
|
|
515610
|
+
const req2 = createRequire3(import.meta.url);
|
|
515590
515611
|
_Database = req2("better-sqlite3");
|
|
515591
515612
|
} catch {
|
|
515592
515613
|
throw new Error("better-sqlite3 is not available (native module build may have failed).\nTry: npm rebuild better-sqlite3\nMemory features (SQLite) are disabled until this is resolved.");
|
|
@@ -515594,8 +515615,8 @@ function getDatabase() {
|
|
|
515594
515615
|
return _Database;
|
|
515595
515616
|
}
|
|
515596
515617
|
function initDb(dbPath) {
|
|
515597
|
-
const
|
|
515598
|
-
const db = new
|
|
515618
|
+
const Database = getDatabase();
|
|
515619
|
+
const db = new Database(dbPath);
|
|
515599
515620
|
db.pragma("journal_mode = WAL");
|
|
515600
515621
|
db.pragma("foreign_keys = ON");
|
|
515601
515622
|
runMigrations(db);
|
|
@@ -534341,8 +534362,8 @@ var init_listen = __esm({
|
|
|
534341
534362
|
/** Load transcribe-cli — bundled as a dependency of open-agents-ai. */
|
|
534342
534363
|
async loadTranscribeCli() {
|
|
534343
534364
|
try {
|
|
534344
|
-
const { createRequire:
|
|
534345
|
-
const req2 =
|
|
534365
|
+
const { createRequire: createRequire8 } = await import("node:module");
|
|
534366
|
+
const req2 = createRequire8(import.meta.url);
|
|
534346
534367
|
return req2("transcribe-cli");
|
|
534347
534368
|
} catch {
|
|
534348
534369
|
}
|
|
@@ -534354,8 +534375,8 @@ var init_listen = __esm({
|
|
|
534354
534375
|
}).trim();
|
|
534355
534376
|
const tcPath = join85(globalRoot, "transcribe-cli");
|
|
534356
534377
|
if (existsSync69(join85(tcPath, "dist", "index.js"))) {
|
|
534357
|
-
const { createRequire:
|
|
534358
|
-
const req2 =
|
|
534378
|
+
const { createRequire: createRequire8 } = await import("node:module");
|
|
534379
|
+
const req2 = createRequire8(import.meta.url);
|
|
534359
534380
|
return req2(join85(tcPath, "dist", "index.js"));
|
|
534360
534381
|
}
|
|
534361
534382
|
} catch {
|
|
@@ -534367,8 +534388,8 @@ var init_listen = __esm({
|
|
|
534367
534388
|
for (const ver of readdirSync38(nvmBase)) {
|
|
534368
534389
|
const tcPath = join85(nvmBase, ver, "lib", "node_modules", "transcribe-cli");
|
|
534369
534390
|
if (existsSync69(join85(tcPath, "dist", "index.js"))) {
|
|
534370
|
-
const { createRequire:
|
|
534371
|
-
const req2 =
|
|
534391
|
+
const { createRequire: createRequire8 } = await import("node:module");
|
|
534392
|
+
const req2 = createRequire8(import.meta.url);
|
|
534372
534393
|
return req2(join85(tcPath, "dist", "index.js"));
|
|
534373
534394
|
}
|
|
534374
534395
|
}
|
|
@@ -553676,7 +553697,7 @@ import { existsSync as existsSync80, mkdirSync as mkdirSync44, writeFileSync as
|
|
|
553676
553697
|
import { join as join96, dirname as dirname30 } from "node:path";
|
|
553677
553698
|
import { homedir as homedir30, tmpdir as tmpdir20, platform as platform4 } from "node:os";
|
|
553678
553699
|
import { execSync as execSync50, spawn as nodeSpawn } from "node:child_process";
|
|
553679
|
-
import { createRequire as
|
|
553700
|
+
import { createRequire as createRequire4 } from "node:module";
|
|
553680
553701
|
function sanitizeForTTS(text) {
|
|
553681
553702
|
return text.replace(/^#{1,6}\s+/gm, "").replace(/\*{1,3}([^*]+)\*{1,3}/g, "$1").replace(/_{1,3}([^_]+)_{1,3}/g, "$1").replace(/~~([^~]+)~~/g, "$1").replace(/`([^`]+)`/g, "$1").replace(/```[\s\S]*?```/g, "").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[([^\]]*)\]\([^)]+\)/g, "$1").replace(/^[\s]*[-*+]\s+/gm, "").replace(/^[\s]*\d+\.\s+/gm, "").replace(/^>\s+/gm, "").replace(/^[-*_]{3,}$/gm, "").replace(/\[[ xX]\]\s*/g, "").replace(/[\u{1F600}-\u{1F64F}]/gu, "").replace(/[\u{1F300}-\u{1F5FF}]/gu, "").replace(/[\u{1F680}-\u{1F6FF}]/gu, "").replace(/[\u{1F1E0}-\u{1F1FF}]/gu, "").replace(/[\u{2600}-\u{26FF}]/gu, "").replace(/[\u{2700}-\u{27BF}]/gu, "").replace(/[\u{FE00}-\u{FE0F}]/gu, "").replace(/[\u{1F900}-\u{1F9FF}]/gu, "").replace(/[\u{1FA00}-\u{1FA6F}]/gu, "").replace(/[\u{1FA70}-\u{1FAFF}]/gu, "").replace(/[\u{200D}]/gu, "").replace(/[\u{20E3}]/gu, "").replace(/[✓✔✗✘✕✖⚠️⏸⏹⏵●○◆◇■□▪▫►▼▲◀⬆⬇⬅➡↑↓←→⇐⇒⇑⇓]/g, "").replace(/[─━│┃┌┐└┘├┤┬┴┼╔╗╚╝╠╣╦╩╬⎿⎾▕▏⏐░▒▓█⠀-⣿]/g, "").replace(/\s{2,}/g, " ").trim();
|
|
553682
553703
|
}
|
|
@@ -556324,7 +556345,7 @@ if __name__ == '__main__':
|
|
|
556324
556345
|
dependencies: expectedDeps
|
|
556325
556346
|
}, null, 2));
|
|
556326
556347
|
}
|
|
556327
|
-
const voiceRequire =
|
|
556348
|
+
const voiceRequire = createRequire4(join96(voiceDir(), "index.js"));
|
|
556328
556349
|
const probeOnnx = async () => {
|
|
556329
556350
|
try {
|
|
556330
556351
|
const output = await this.asyncShell(
|
|
@@ -563158,11 +563179,11 @@ async function handleUpdate(subcommand, ctx3) {
|
|
|
563158
563179
|
}
|
|
563159
563180
|
let currentVersion = "0.0.0";
|
|
563160
563181
|
try {
|
|
563161
|
-
const { createRequire:
|
|
563182
|
+
const { createRequire: createRequire8 } = await import("node:module");
|
|
563162
563183
|
const { fileURLToPath: fileURLToPath20 } = await import("node:url");
|
|
563163
563184
|
const { dirname: dirname39, join: join125 } = await import("node:path");
|
|
563164
563185
|
const { existsSync: existsSync107 } = await import("node:fs");
|
|
563165
|
-
const req2 =
|
|
563186
|
+
const req2 = createRequire8(import.meta.url);
|
|
563166
563187
|
const thisDir = dirname39(fileURLToPath20(import.meta.url));
|
|
563167
563188
|
const candidates = [
|
|
563168
563189
|
join125(thisDir, "..", "package.json"),
|
|
@@ -564294,10 +564315,10 @@ var init_commands = __esm({
|
|
|
564294
564315
|
return "handled";
|
|
564295
564316
|
}
|
|
564296
564317
|
try {
|
|
564297
|
-
const { createRequire:
|
|
564318
|
+
const { createRequire: createRequire8 } = await import("node:module");
|
|
564298
564319
|
const { fileURLToPath: fileURLToPath20 } = await import("node:url");
|
|
564299
564320
|
const { dirname: pathDirname, join: pathJoin } = await import("node:path");
|
|
564300
|
-
const localRequire =
|
|
564321
|
+
const localRequire = createRequire8(import.meta.url);
|
|
564301
564322
|
const here = pathDirname(fileURLToPath20(import.meta.url));
|
|
564302
564323
|
let version4 = "?";
|
|
564303
564324
|
for (const up of ["..", "../..", "../../.."]) {
|
|
@@ -590526,7 +590547,7 @@ __export(serve_exports, {
|
|
|
590526
590547
|
});
|
|
590527
590548
|
import * as http5 from "node:http";
|
|
590528
590549
|
import * as https3 from "node:https";
|
|
590529
|
-
import { createRequire as
|
|
590550
|
+
import { createRequire as createRequire5 } from "node:module";
|
|
590530
590551
|
import { fileURLToPath as fileURLToPath17 } from "node:url";
|
|
590531
590552
|
import { dirname as dirname36, join as join119, resolve as resolve38 } from "node:path";
|
|
590532
590553
|
import { homedir as homedir41 } from "node:os";
|
|
@@ -593696,8 +593717,8 @@ async function handleRequest(req2, res, ollamaUrl, verbose) {
|
|
|
593696
593717
|
const entry = fileMap[pathname];
|
|
593697
593718
|
if (entry) {
|
|
593698
593719
|
try {
|
|
593699
|
-
const { createRequire:
|
|
593700
|
-
const req22 =
|
|
593720
|
+
const { createRequire: createRequire8 } = await import("node:module");
|
|
593721
|
+
const req22 = createRequire8(import.meta.url);
|
|
593701
593722
|
const cssEntry = req22.resolve("swagger-ui-dist/swagger-ui.css");
|
|
593702
593723
|
const fs7 = await import("node:fs");
|
|
593703
593724
|
const path8 = await import("node:path");
|
|
@@ -597173,7 +597194,7 @@ var init_serve = __esm({
|
|
|
597173
597194
|
init_profiles();
|
|
597174
597195
|
init_docker();
|
|
597175
597196
|
init_typed_node_events();
|
|
597176
|
-
require3 =
|
|
597197
|
+
require3 = createRequire5(import.meta.url);
|
|
597177
597198
|
endpointRegistry = [];
|
|
597178
597199
|
modelRouteMap = /* @__PURE__ */ new Map();
|
|
597179
597200
|
endpointUsage = /* @__PURE__ */ new Map();
|
|
@@ -597195,7 +597216,7 @@ var init_serve = __esm({
|
|
|
597195
597216
|
// packages/cli/src/tui/interactive.ts
|
|
597196
597217
|
import { cwd } from "node:process";
|
|
597197
597218
|
import { resolve as resolve39, join as join120, dirname as dirname37, extname as extname12 } from "node:path";
|
|
597198
|
-
import { createRequire as
|
|
597219
|
+
import { createRequire as createRequire6 } from "node:module";
|
|
597199
597220
|
import { fileURLToPath as fileURLToPath18 } from "node:url";
|
|
597200
597221
|
import { readFileSync as readFileSync84, writeFileSync as writeFileSync56, appendFileSync as appendFileSync8, rmSync as rmSync5, readdirSync as readdirSync36, mkdirSync as mkdirSync64 } from "node:fs";
|
|
597201
597222
|
import { existsSync as existsSync104 } from "node:fs";
|
|
@@ -597213,7 +597234,7 @@ function formatTimeAgo2(date) {
|
|
|
597213
597234
|
}
|
|
597214
597235
|
function getVersion4() {
|
|
597215
597236
|
try {
|
|
597216
|
-
const require4 =
|
|
597237
|
+
const require4 = createRequire6(import.meta.url);
|
|
597217
597238
|
const thisDir = dirname37(fileURLToPath18(import.meta.url));
|
|
597218
597239
|
const candidates = [
|
|
597219
597240
|
join120(thisDir, "..", "package.json"),
|
|
@@ -604863,7 +604884,7 @@ init_output();
|
|
|
604863
604884
|
init_updater();
|
|
604864
604885
|
init_typed_node_events();
|
|
604865
604886
|
import { parseArgs as nodeParseArgs2 } from "node:util";
|
|
604866
|
-
import { createRequire as
|
|
604887
|
+
import { createRequire as createRequire7 } from "node:module";
|
|
604867
604888
|
import { fileURLToPath as fileURLToPath19 } from "node:url";
|
|
604868
604889
|
import { dirname as dirname38, join as join124 } from "node:path";
|
|
604869
604890
|
|
|
@@ -605004,7 +605025,7 @@ init_spinner();
|
|
|
605004
605025
|
init_output();
|
|
605005
605026
|
function getVersion5() {
|
|
605006
605027
|
try {
|
|
605007
|
-
const require4 =
|
|
605028
|
+
const require4 = createRequire7(import.meta.url);
|
|
605008
605029
|
const pkgPath = join124(dirname38(fileURLToPath19(import.meta.url)), "..", "package.json");
|
|
605009
605030
|
const pkg = require4(pkgPath);
|
|
605010
605031
|
return pkg.version;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-agents-ai",
|
|
3
|
-
"version": "0.187.
|
|
3
|
+
"version": "0.187.505",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "open-agents-ai",
|
|
9
|
-
"version": "0.187.
|
|
9
|
+
"version": "0.187.505",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
|
@@ -8784,9 +8784,9 @@
|
|
|
8784
8784
|
"license": "MIT"
|
|
8785
8785
|
},
|
|
8786
8786
|
"node_modules/transcribe-cli": {
|
|
8787
|
-
"version": "2.0.
|
|
8788
|
-
"resolved": "https://registry.npmjs.org/transcribe-cli/-/transcribe-cli-2.0.
|
|
8789
|
-
"integrity": "sha512-
|
|
8787
|
+
"version": "2.0.2",
|
|
8788
|
+
"resolved": "https://registry.npmjs.org/transcribe-cli/-/transcribe-cli-2.0.2.tgz",
|
|
8789
|
+
"integrity": "sha512-dgL6ZqIPvmbUrKPPSruM/J+FCcZ5kacu1+5JabqoUo8MzprOp97aN5vlnRiuj0ZgUajMDPemI9VvKyvFdIEEQQ==",
|
|
8790
8790
|
"hasInstallScript": true,
|
|
8791
8791
|
"license": "MIT",
|
|
8792
8792
|
"optional": true,
|
package/package.json
CHANGED