open-agents-ai 0.186.44 → 0.186.45
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 +100 -85
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -123404,7 +123404,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
123404
123404
|
"../node_modules/undici/lib/mock/snapshot-recorder.js"(exports, module) {
|
|
123405
123405
|
"use strict";
|
|
123406
123406
|
var { writeFile: writeFile21, readFile: readFile24, mkdir: mkdir16 } = __require("node:fs/promises");
|
|
123407
|
-
var { dirname:
|
|
123407
|
+
var { dirname: dirname26, resolve: resolve38 } = __require("node:path");
|
|
123408
123408
|
var { setTimeout: setTimeout3, clearTimeout: clearTimeout3 } = __require("node:timers");
|
|
123409
123409
|
var { InvalidArgumentError, UndiciError } = require_errors2();
|
|
123410
123410
|
var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
|
|
@@ -123635,7 +123635,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
123635
123635
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
123636
123636
|
}
|
|
123637
123637
|
const resolvedPath = resolve38(path5);
|
|
123638
|
-
await mkdir16(
|
|
123638
|
+
await mkdir16(dirname26(resolvedPath), { recursive: true });
|
|
123639
123639
|
const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
|
|
123640
123640
|
hash,
|
|
123641
123641
|
snapshot
|
|
@@ -237297,15 +237297,15 @@ var init_ls = __esm({
|
|
|
237297
237297
|
});
|
|
237298
237298
|
|
|
237299
237299
|
// ../node_modules/@helia/unixfs/dist/src/commands/mkdir.js
|
|
237300
|
-
async function mkdir5(parentCid,
|
|
237301
|
-
if (
|
|
237300
|
+
async function mkdir5(parentCid, dirname26, blockstore, options2 = {}) {
|
|
237301
|
+
if (dirname26.includes("/")) {
|
|
237302
237302
|
throw new InvalidParametersError4("Path must not have slashes");
|
|
237303
237303
|
}
|
|
237304
237304
|
const entry = await exporter2(parentCid, blockstore, options2);
|
|
237305
237305
|
if (entry.type !== "directory") {
|
|
237306
237306
|
throw new NotADirectoryError(`${parentCid.toString()} was not a UnixFS directory`);
|
|
237307
237307
|
}
|
|
237308
|
-
log16("creating %s",
|
|
237308
|
+
log16("creating %s", dirname26);
|
|
237309
237309
|
const metadata = new UnixFS({
|
|
237310
237310
|
type: "directory",
|
|
237311
237311
|
mode: options2.mode,
|
|
@@ -237321,9 +237321,9 @@ async function mkdir5(parentCid, dirname25, blockstore, options2 = {}) {
|
|
|
237321
237321
|
await blockstore.put(emptyDirCid, buf);
|
|
237322
237322
|
const [directory, pblink] = await Promise.all([
|
|
237323
237323
|
cidToDirectory(parentCid, blockstore, options2),
|
|
237324
|
-
cidToPBLink(emptyDirCid,
|
|
237324
|
+
cidToPBLink(emptyDirCid, dirname26, blockstore, options2)
|
|
237325
237325
|
]);
|
|
237326
|
-
log16("adding empty dir called %s to %c",
|
|
237326
|
+
log16("adding empty dir called %s to %c", dirname26, parentCid);
|
|
237327
237327
|
const result = await addLink(directory, pblink, blockstore, {
|
|
237328
237328
|
...options2,
|
|
237329
237329
|
allowOverwriting: options2.force
|
|
@@ -237822,8 +237822,8 @@ var init_unixfs2 = __esm({
|
|
|
237822
237822
|
async *ls(cid, options2 = {}) {
|
|
237823
237823
|
yield* ls(cid, this.components.blockstore, options2);
|
|
237824
237824
|
}
|
|
237825
|
-
async mkdir(cid,
|
|
237826
|
-
return mkdir5(cid,
|
|
237825
|
+
async mkdir(cid, dirname26, options2 = {}) {
|
|
237826
|
+
return mkdir5(cid, dirname26, this.components.blockstore, options2);
|
|
237827
237827
|
}
|
|
237828
237828
|
async rm(cid, path5, options2 = {}) {
|
|
237829
237829
|
return rm2(cid, path5, this.components.blockstore, options2);
|
|
@@ -245105,11 +245105,11 @@ print("__SESSION__" + json.dumps(_session) + "__SESSION__")
|
|
|
245105
245105
|
* what was previously computed. */
|
|
245106
245106
|
async loadSessionInfo() {
|
|
245107
245107
|
try {
|
|
245108
|
-
const { readFileSync:
|
|
245108
|
+
const { readFileSync: readFileSync49, existsSync: existsSync62 } = await import("node:fs");
|
|
245109
245109
|
const sessionPath = join23(this.cwd, ".oa", "rlm", "session.json");
|
|
245110
245110
|
if (!existsSync62(sessionPath))
|
|
245111
245111
|
return null;
|
|
245112
|
-
return JSON.parse(
|
|
245112
|
+
return JSON.parse(readFileSync49(sessionPath, "utf8"));
|
|
245113
245113
|
} catch {
|
|
245114
245114
|
return null;
|
|
245115
245115
|
}
|
|
@@ -245286,10 +245286,10 @@ var init_memory_metabolism = __esm({
|
|
|
245286
245286
|
const trajDir = join24(this.cwd, ".oa", "rlm-trajectories");
|
|
245287
245287
|
let lessons = [];
|
|
245288
245288
|
try {
|
|
245289
|
-
const { readdirSync: readdirSync25, readFileSync:
|
|
245289
|
+
const { readdirSync: readdirSync25, readFileSync: readFileSync49 } = await import("node:fs");
|
|
245290
245290
|
const files = readdirSync25(trajDir).filter((f2) => f2.endsWith(".jsonl")).sort().reverse().slice(0, 3);
|
|
245291
245291
|
for (const file of files) {
|
|
245292
|
-
const lines =
|
|
245292
|
+
const lines = readFileSync49(join24(trajDir, file), "utf8").split("\n").filter((l2) => l2.trim());
|
|
245293
245293
|
for (const line of lines) {
|
|
245294
245294
|
try {
|
|
245295
245295
|
const entry = JSON.parse(line);
|
|
@@ -245673,14 +245673,14 @@ ${issues.map((i2) => ` - ${i2}`).join("\n")}` : " No issues found."),
|
|
|
245673
245673
|
* Optionally filter by task type for phase-aware context (FSM paper insight).
|
|
245674
245674
|
*/
|
|
245675
245675
|
getTopMemoriesSync(k = 5, taskType) {
|
|
245676
|
-
const { readFileSync:
|
|
245676
|
+
const { readFileSync: readFileSync49, existsSync: existsSync62 } = __require("node:fs");
|
|
245677
245677
|
const metaDir = join24(this.cwd, ".oa", "memory", "metabolism");
|
|
245678
245678
|
const storeFile = join24(metaDir, "store.json");
|
|
245679
245679
|
if (!existsSync62(storeFile))
|
|
245680
245680
|
return "";
|
|
245681
245681
|
let store2 = [];
|
|
245682
245682
|
try {
|
|
245683
|
-
store2 = JSON.parse(
|
|
245683
|
+
store2 = JSON.parse(readFileSync49(storeFile, "utf8"));
|
|
245684
245684
|
} catch {
|
|
245685
245685
|
return "";
|
|
245686
245686
|
}
|
|
@@ -245702,14 +245702,14 @@ ${issues.map((i2) => ` - ${i2}`).join("\n")}` : " No issues found."),
|
|
|
245702
245702
|
/** Update memory scores based on task outcome. Called after task completion.
|
|
245703
245703
|
* Memories used in successful tasks get boosted. Memories present during failures get decayed. */
|
|
245704
245704
|
updateFromOutcomeSync(surfacedMemoryText, succeeded) {
|
|
245705
|
-
const { readFileSync:
|
|
245705
|
+
const { readFileSync: readFileSync49, writeFileSync: writeFileSync33, existsSync: existsSync62, mkdirSync: mkdirSync35 } = __require("node:fs");
|
|
245706
245706
|
const metaDir = join24(this.cwd, ".oa", "memory", "metabolism");
|
|
245707
245707
|
const storeFile = join24(metaDir, "store.json");
|
|
245708
245708
|
if (!existsSync62(storeFile))
|
|
245709
245709
|
return;
|
|
245710
245710
|
let store2 = [];
|
|
245711
245711
|
try {
|
|
245712
|
-
store2 = JSON.parse(
|
|
245712
|
+
store2 = JSON.parse(readFileSync49(storeFile, "utf8"));
|
|
245713
245713
|
} catch {
|
|
245714
245714
|
return;
|
|
245715
245715
|
}
|
|
@@ -246156,13 +246156,13 @@ Recommendation: Strategy ${scored[0].index + 1} scores highest.`;
|
|
|
246156
246156
|
// Per EvoSkill (arXiv:2603.02766): retrieve relevant strategies from archive.
|
|
246157
246157
|
/** Retrieve top-K strategies for context injection. Returns "" if none. */
|
|
246158
246158
|
getRelevantStrategiesSync(k = 3, taskType) {
|
|
246159
|
-
const { readFileSync:
|
|
246159
|
+
const { readFileSync: readFileSync49, existsSync: existsSync62 } = __require("node:fs");
|
|
246160
246160
|
const archiveFile = join26(this.cwd, ".oa", "arche", "variants.json");
|
|
246161
246161
|
if (!existsSync62(archiveFile))
|
|
246162
246162
|
return "";
|
|
246163
246163
|
let variants = [];
|
|
246164
246164
|
try {
|
|
246165
|
-
variants = JSON.parse(
|
|
246165
|
+
variants = JSON.parse(readFileSync49(archiveFile, "utf8"));
|
|
246166
246166
|
} catch {
|
|
246167
246167
|
return "";
|
|
246168
246168
|
}
|
|
@@ -246180,13 +246180,13 @@ Recommendation: Strategy ${scored[0].index + 1} scores highest.`;
|
|
|
246180
246180
|
}
|
|
246181
246181
|
/** Archive a strategy variant synchronously (for task completion path) */
|
|
246182
246182
|
archiveVariantSync(strategy, outcome, tags = []) {
|
|
246183
|
-
const { readFileSync:
|
|
246183
|
+
const { readFileSync: readFileSync49, writeFileSync: writeFileSync33, existsSync: existsSync62, mkdirSync: mkdirSync35 } = __require("node:fs");
|
|
246184
246184
|
const dir = join26(this.cwd, ".oa", "arche");
|
|
246185
246185
|
const archiveFile = join26(dir, "variants.json");
|
|
246186
246186
|
let variants = [];
|
|
246187
246187
|
try {
|
|
246188
246188
|
if (existsSync62(archiveFile))
|
|
246189
|
-
variants = JSON.parse(
|
|
246189
|
+
variants = JSON.parse(readFileSync49(archiveFile, "utf8"));
|
|
246190
246190
|
} catch {
|
|
246191
246191
|
}
|
|
246192
246192
|
variants.push({
|
|
@@ -260068,7 +260068,7 @@ ${transcript}`
|
|
|
260068
260068
|
let resizedBase64 = null;
|
|
260069
260069
|
try {
|
|
260070
260070
|
const { execSync: execSync37 } = await import("node:child_process");
|
|
260071
|
-
const { writeFileSync: writeFileSync33, readFileSync:
|
|
260071
|
+
const { writeFileSync: writeFileSync33, readFileSync: readFileSync49, unlinkSync: unlinkSync13 } = await import("node:fs");
|
|
260072
260072
|
const { join: join83 } = await import("node:path");
|
|
260073
260073
|
const { tmpdir: tmpdir11 } = await import("node:os");
|
|
260074
260074
|
const tmpIn = join83(tmpdir11(), `oa_img_in_${Date.now()}.png`);
|
|
@@ -260078,7 +260078,7 @@ ${transcript}`
|
|
|
260078
260078
|
const escapedIn = tmpIn.replace(/\\/g, "\\\\");
|
|
260079
260079
|
const escapedOut = tmpOut.replace(/\\/g, "\\\\");
|
|
260080
260080
|
execSync37(`${pyBin} -c "from PIL import Image; img = Image.open('${escapedIn}'); img.thumbnail((512, 512), Image.LANCZOS); img = img.convert('RGB'); img.save('${escapedOut}', 'JPEG', quality=75)"`, { timeout: 1e4, stdio: "pipe" });
|
|
260081
|
-
const resizedBuf =
|
|
260081
|
+
const resizedBuf = readFileSync49(tmpOut);
|
|
260082
260082
|
resizedBase64 = `data:image/jpeg;base64,${resizedBuf.toString("base64")}`;
|
|
260083
260083
|
try {
|
|
260084
260084
|
unlinkSync13(tmpIn);
|
|
@@ -271080,7 +271080,7 @@ async function fetchOpenAIModels(baseUrl, apiKey) {
|
|
|
271080
271080
|
async function fetchPeerModels(peerId, authKey) {
|
|
271081
271081
|
try {
|
|
271082
271082
|
const { NexusTool: NexusTool2 } = await Promise.resolve().then(() => (init_dist4(), dist_exports));
|
|
271083
|
-
const { existsSync: existsSync62, readFileSync:
|
|
271083
|
+
const { existsSync: existsSync62, readFileSync: readFileSync49 } = await import("node:fs");
|
|
271084
271084
|
const { join: join83 } = await import("node:path");
|
|
271085
271085
|
const cwd4 = process.cwd();
|
|
271086
271086
|
const nexusTool = new NexusTool2(cwd4);
|
|
@@ -271089,7 +271089,7 @@ async function fetchPeerModels(peerId, authKey) {
|
|
|
271089
271089
|
try {
|
|
271090
271090
|
const statusPath = join83(nexusDir, "status.json");
|
|
271091
271091
|
if (existsSync62(statusPath)) {
|
|
271092
|
-
const status = JSON.parse(
|
|
271092
|
+
const status = JSON.parse(readFileSync49(statusPath, "utf8"));
|
|
271093
271093
|
if (status.peerId === peerId)
|
|
271094
271094
|
isLocalPeer = true;
|
|
271095
271095
|
}
|
|
@@ -271099,7 +271099,7 @@ async function fetchPeerModels(peerId, authKey) {
|
|
|
271099
271099
|
const pricingPath = join83(nexusDir, "pricing.json");
|
|
271100
271100
|
if (existsSync62(pricingPath)) {
|
|
271101
271101
|
try {
|
|
271102
|
-
const pricing = JSON.parse(
|
|
271102
|
+
const pricing = JSON.parse(readFileSync49(pricingPath, "utf8"));
|
|
271103
271103
|
const localModels = (pricing.models || []).map((m2) => ({
|
|
271104
271104
|
name: m2.model || "unknown",
|
|
271105
271105
|
size: m2.parameterSize || "",
|
|
@@ -271116,7 +271116,7 @@ async function fetchPeerModels(peerId, authKey) {
|
|
|
271116
271116
|
const cachePath = join83(nexusDir, "peer-models-cache.json");
|
|
271117
271117
|
if (existsSync62(cachePath)) {
|
|
271118
271118
|
try {
|
|
271119
|
-
const cache7 = JSON.parse(
|
|
271119
|
+
const cache7 = JSON.parse(readFileSync49(cachePath, "utf8"));
|
|
271120
271120
|
if (cache7.peerId === peerId && cache7.models?.length > 0) {
|
|
271121
271121
|
const age = Date.now() - new Date(cache7.cachedAt).getTime();
|
|
271122
271122
|
if (age < 5 * 60 * 1e3) {
|
|
@@ -271234,7 +271234,7 @@ async function fetchPeerModels(peerId, authKey) {
|
|
|
271234
271234
|
const pricingPath = join83(nexusDir, "pricing.json");
|
|
271235
271235
|
if (existsSync62(pricingPath)) {
|
|
271236
271236
|
try {
|
|
271237
|
-
const pricing = JSON.parse(
|
|
271237
|
+
const pricing = JSON.parse(readFileSync49(pricingPath, "utf8"));
|
|
271238
271238
|
return (pricing.models || []).map((m2) => ({
|
|
271239
271239
|
name: m2.model || "unknown",
|
|
271240
271240
|
size: m2.parameterSize || "",
|
|
@@ -284997,9 +284997,9 @@ async function handlePeerEndpoint(peerId, authKey, ctx3, local) {
|
|
|
284997
284997
|
if (models.length > 0) {
|
|
284998
284998
|
try {
|
|
284999
284999
|
const { writeFileSync: writeFileSync33, mkdirSync: mkdirSync35 } = await import("node:fs");
|
|
285000
|
-
const { join: join83, dirname:
|
|
285000
|
+
const { join: join83, dirname: dirname26 } = await import("node:path");
|
|
285001
285001
|
const cachePath = join83(ctx3.repoRoot || process.cwd(), ".oa", "nexus", "peer-models-cache.json");
|
|
285002
|
-
mkdirSync35(
|
|
285002
|
+
mkdirSync35(dirname26(cachePath), { recursive: true });
|
|
285003
285003
|
writeFileSync33(cachePath, JSON.stringify({
|
|
285004
285004
|
peerId,
|
|
285005
285005
|
cachedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -285198,11 +285198,11 @@ async function handleUpdate(subcommand, ctx3) {
|
|
|
285198
285198
|
let currentVersion = "0.0.0";
|
|
285199
285199
|
try {
|
|
285200
285200
|
const { createRequire: createRequire7 } = await import("node:module");
|
|
285201
|
-
const { fileURLToPath:
|
|
285202
|
-
const { dirname:
|
|
285201
|
+
const { fileURLToPath: fileURLToPath18 } = await import("node:url");
|
|
285202
|
+
const { dirname: dirname26, join: join83 } = await import("node:path");
|
|
285203
285203
|
const { existsSync: existsSync62 } = await import("node:fs");
|
|
285204
285204
|
const req2 = createRequire7(import.meta.url);
|
|
285205
|
-
const thisDir =
|
|
285205
|
+
const thisDir = dirname26(fileURLToPath18(import.meta.url));
|
|
285206
285206
|
const candidates = [
|
|
285207
285207
|
join83(thisDir, "..", "package.json"),
|
|
285208
285208
|
join83(thisDir, "..", "..", "package.json"),
|
|
@@ -299158,9 +299158,24 @@ var init_profiles = __esm({
|
|
|
299158
299158
|
|
|
299159
299159
|
// packages/cli/dist/docker.js
|
|
299160
299160
|
import { execSync as execSync35, spawn as spawn21 } from "node:child_process";
|
|
299161
|
-
import { existsSync as existsSync57,
|
|
299162
|
-
import { join as join75, resolve as resolve32 } from "node:path";
|
|
299161
|
+
import { existsSync as existsSync57, mkdirSync as mkdirSync30, writeFileSync as writeFileSync28 } from "node:fs";
|
|
299162
|
+
import { join as join75, resolve as resolve32, dirname as dirname22 } from "node:path";
|
|
299163
299163
|
import { homedir as homedir20 } from "node:os";
|
|
299164
|
+
import { fileURLToPath as fileURLToPath14 } from "node:url";
|
|
299165
|
+
function getDockerDir() {
|
|
299166
|
+
try {
|
|
299167
|
+
if (typeof __dirname !== "undefined") {
|
|
299168
|
+
return join75(__dirname, "..", "..", "..", "docker");
|
|
299169
|
+
}
|
|
299170
|
+
} catch {
|
|
299171
|
+
}
|
|
299172
|
+
try {
|
|
299173
|
+
const thisDir = dirname22(fileURLToPath14(import.meta.url));
|
|
299174
|
+
return join75(thisDir, "..", "..", "..", "docker");
|
|
299175
|
+
} catch {
|
|
299176
|
+
}
|
|
299177
|
+
return join75(process.cwd(), "docker");
|
|
299178
|
+
}
|
|
299164
299179
|
function isDockerAvailable() {
|
|
299165
299180
|
try {
|
|
299166
299181
|
execSync35("docker info", { stdio: "pipe", timeout: 1e4 });
|
|
@@ -299185,8 +299200,9 @@ async function ensureOaImage(force = false) {
|
|
|
299185
299200
|
return { ok: true, message: `Image ${OA_IMAGE}:${OA_IMAGE_TAG} already exists` };
|
|
299186
299201
|
}
|
|
299187
299202
|
let buildContext;
|
|
299188
|
-
|
|
299189
|
-
|
|
299203
|
+
const dockerDir = getDockerDir();
|
|
299204
|
+
if (existsSync57(join75(dockerDir, "Dockerfile"))) {
|
|
299205
|
+
buildContext = dockerDir;
|
|
299190
299206
|
} else {
|
|
299191
299207
|
buildContext = join75(homedir20(), ".oa", "docker-build");
|
|
299192
299208
|
mkdirSync30(buildContext, { recursive: true });
|
|
@@ -299325,13 +299341,12 @@ function runInContainer(opts) {
|
|
|
299325
299341
|
stdio: ["ignore", "pipe", "pipe"]
|
|
299326
299342
|
});
|
|
299327
299343
|
}
|
|
299328
|
-
var OA_IMAGE, OA_IMAGE_TAG
|
|
299344
|
+
var OA_IMAGE, OA_IMAGE_TAG;
|
|
299329
299345
|
var init_docker = __esm({
|
|
299330
299346
|
"packages/cli/dist/docker.js"() {
|
|
299331
299347
|
"use strict";
|
|
299332
299348
|
OA_IMAGE = "open-agents";
|
|
299333
299349
|
OA_IMAGE_TAG = "latest";
|
|
299334
|
-
DOCKER_DIR = join75(__dirname, "..", "..", "..", "docker");
|
|
299335
299350
|
}
|
|
299336
299351
|
});
|
|
299337
299352
|
|
|
@@ -299344,15 +299359,15 @@ __export(serve_exports, {
|
|
|
299344
299359
|
import * as http5 from "node:http";
|
|
299345
299360
|
import * as https3 from "node:https";
|
|
299346
299361
|
import { createRequire as createRequire4 } from "node:module";
|
|
299347
|
-
import { fileURLToPath as
|
|
299348
|
-
import { dirname as
|
|
299362
|
+
import { fileURLToPath as fileURLToPath15 } from "node:url";
|
|
299363
|
+
import { dirname as dirname23, join as join76, resolve as resolve33 } from "node:path";
|
|
299349
299364
|
import { spawn as spawn22 } from "node:child_process";
|
|
299350
|
-
import { mkdirSync as mkdirSync31, writeFileSync as writeFileSync29, readFileSync as
|
|
299365
|
+
import { mkdirSync as mkdirSync31, writeFileSync as writeFileSync29, readFileSync as readFileSync46, readdirSync as readdirSync22, existsSync as existsSync58 } from "node:fs";
|
|
299351
299366
|
import { randomBytes as randomBytes19, randomUUID as randomUUID5 } from "node:crypto";
|
|
299352
299367
|
function getVersion3() {
|
|
299353
299368
|
try {
|
|
299354
299369
|
const require3 = createRequire4(import.meta.url);
|
|
299355
|
-
const thisDir =
|
|
299370
|
+
const thisDir = dirname23(fileURLToPath15(import.meta.url));
|
|
299356
299371
|
const candidates = [
|
|
299357
299372
|
join76(thisDir, "..", "package.json"),
|
|
299358
299373
|
join76(thisDir, "..", "..", "package.json"),
|
|
@@ -299670,7 +299685,7 @@ function loadJob(id) {
|
|
|
299670
299685
|
if (!existsSync58(file))
|
|
299671
299686
|
return null;
|
|
299672
299687
|
try {
|
|
299673
|
-
return JSON.parse(
|
|
299688
|
+
return JSON.parse(readFileSync46(file, "utf-8"));
|
|
299674
299689
|
} catch {
|
|
299675
299690
|
return null;
|
|
299676
299691
|
}
|
|
@@ -299683,7 +299698,7 @@ function listJobs() {
|
|
|
299683
299698
|
const jobs = [];
|
|
299684
299699
|
for (const file of files) {
|
|
299685
299700
|
try {
|
|
299686
|
-
jobs.push(JSON.parse(
|
|
299701
|
+
jobs.push(JSON.parse(readFileSync46(join76(dir, file), "utf-8")));
|
|
299687
299702
|
} catch {
|
|
299688
299703
|
}
|
|
299689
299704
|
}
|
|
@@ -301055,7 +301070,7 @@ function startApiServer(options2 = {}) {
|
|
|
301055
301070
|
continue;
|
|
301056
301071
|
try {
|
|
301057
301072
|
const jobPath = join76(jobsDir3, f2);
|
|
301058
|
-
const job = JSON.parse(
|
|
301073
|
+
const job = JSON.parse(readFileSync46(jobPath, "utf-8"));
|
|
301059
301074
|
const jobTime = new Date(job.startedAt ?? job.completedAt ?? 0).getTime();
|
|
301060
301075
|
if (jobTime > 0 && jobTime < cutoff && job.status !== "running") {
|
|
301061
301076
|
const { unlinkSync: unlinkSync13 } = __require("node:fs");
|
|
@@ -301075,8 +301090,8 @@ function startApiServer(options2 = {}) {
|
|
|
301075
301090
|
if (useTls) {
|
|
301076
301091
|
try {
|
|
301077
301092
|
tlsOpts = {
|
|
301078
|
-
cert:
|
|
301079
|
-
key:
|
|
301093
|
+
cert: readFileSync46(resolve33(tlsCert)),
|
|
301094
|
+
key: readFileSync46(resolve33(tlsKey))
|
|
301080
301095
|
};
|
|
301081
301096
|
} catch (e2) {
|
|
301082
301097
|
log22(`
|
|
@@ -301251,10 +301266,10 @@ var init_serve = __esm({
|
|
|
301251
301266
|
|
|
301252
301267
|
// packages/cli/dist/tui/interactive.js
|
|
301253
301268
|
import { cwd } from "node:process";
|
|
301254
|
-
import { resolve as resolve34, join as join77, dirname as
|
|
301269
|
+
import { resolve as resolve34, join as join77, dirname as dirname24, extname as extname11 } from "node:path";
|
|
301255
301270
|
import { createRequire as createRequire5 } from "node:module";
|
|
301256
|
-
import { fileURLToPath as
|
|
301257
|
-
import { readFileSync as
|
|
301271
|
+
import { fileURLToPath as fileURLToPath16 } from "node:url";
|
|
301272
|
+
import { readFileSync as readFileSync47, writeFileSync as writeFileSync30, appendFileSync as appendFileSync6, rmSync as rmSync3, readdirSync as readdirSync23, mkdirSync as mkdirSync32 } from "node:fs";
|
|
301258
301273
|
import { existsSync as existsSync59 } from "node:fs";
|
|
301259
301274
|
import { execSync as execSync36 } from "node:child_process";
|
|
301260
301275
|
import { homedir as homedir21 } from "node:os";
|
|
@@ -301274,7 +301289,7 @@ function formatTimeAgo(date) {
|
|
|
301274
301289
|
function getVersion4() {
|
|
301275
301290
|
try {
|
|
301276
301291
|
const require3 = createRequire5(import.meta.url);
|
|
301277
|
-
const thisDir =
|
|
301292
|
+
const thisDir = dirname24(fileURLToPath16(import.meta.url));
|
|
301278
301293
|
const candidates = [
|
|
301279
301294
|
join77(thisDir, "..", "package.json"),
|
|
301280
301295
|
join77(thisDir, "..", "..", "package.json"),
|
|
@@ -301529,7 +301544,7 @@ function gatherMemorySnippets(root) {
|
|
|
301529
301544
|
continue;
|
|
301530
301545
|
try {
|
|
301531
301546
|
for (const f2 of readdirSync23(dir).filter((f3) => f3.endsWith(".json"))) {
|
|
301532
|
-
const data = JSON.parse(
|
|
301547
|
+
const data = JSON.parse(readFileSync47(join77(dir, f2), "utf-8"));
|
|
301533
301548
|
for (const val of Object.values(data)) {
|
|
301534
301549
|
const v = typeof val === "object" && val !== null && "value" in val ? String(val.value) : String(val);
|
|
301535
301550
|
if (v.length > 10)
|
|
@@ -301688,7 +301703,7 @@ ${metabolismMemories}
|
|
|
301688
301703
|
try {
|
|
301689
301704
|
const archeFile = join77(repoRoot, ".oa", "arche", "variants.json");
|
|
301690
301705
|
if (existsSync59(archeFile)) {
|
|
301691
|
-
const variants = JSON.parse(
|
|
301706
|
+
const variants = JSON.parse(readFileSync47(archeFile, "utf8"));
|
|
301692
301707
|
if (variants.length > 0) {
|
|
301693
301708
|
let filtered = variants;
|
|
301694
301709
|
if (taskType) {
|
|
@@ -301859,7 +301874,7 @@ RULES:
|
|
|
301859
301874
|
try {
|
|
301860
301875
|
const ikStateFile = join77(repoRoot, ".oa", "identity", "self-state.json");
|
|
301861
301876
|
if (existsSync59(ikStateFile)) {
|
|
301862
|
-
const selfState = JSON.parse(
|
|
301877
|
+
const selfState = JSON.parse(readFileSync47(ikStateFile, "utf8"));
|
|
301863
301878
|
const lines = [
|
|
301864
301879
|
`[Identity State v${selfState.version}]`,
|
|
301865
301880
|
`Self: ${selfState.narrative_summary}`,
|
|
@@ -302514,7 +302529,7 @@ When done, either call task_complete with your answer, or use FINAL_VAR(variable
|
|
|
302514
302529
|
const ikFile = join77(ikDir, "self-state.json");
|
|
302515
302530
|
let ikState;
|
|
302516
302531
|
if (existsSync59(ikFile)) {
|
|
302517
|
-
ikState = JSON.parse(
|
|
302532
|
+
ikState = JSON.parse(readFileSync47(ikFile, "utf8"));
|
|
302518
302533
|
} else {
|
|
302519
302534
|
mkdirSync32(ikDir, { recursive: true });
|
|
302520
302535
|
const machineId = Date.now().toString(36) + Math.random().toString(36).slice(2, 8);
|
|
@@ -302559,7 +302574,7 @@ When done, either call task_complete with your answer, or use FINAL_VAR(variable
|
|
|
302559
302574
|
try {
|
|
302560
302575
|
const ikFile = join77(repoRoot, ".oa", "identity", "self-state.json");
|
|
302561
302576
|
if (existsSync59(ikFile)) {
|
|
302562
|
-
const ikState = JSON.parse(
|
|
302577
|
+
const ikState = JSON.parse(readFileSync47(ikFile, "utf8"));
|
|
302563
302578
|
ikState.homeostasis.uncertainty = Math.min(1, ikState.homeostasis.uncertainty + 0.1);
|
|
302564
302579
|
ikState.homeostasis.coherence = Math.max(0, ikState.homeostasis.coherence - 0.05);
|
|
302565
302580
|
ikState.session_count = (ikState.session_count || 0) + 1;
|
|
@@ -302664,7 +302679,7 @@ async function startInteractive(config, repoPath) {
|
|
|
302664
302679
|
const oaDir = join77(repoRoot, ".oa");
|
|
302665
302680
|
const nexusPidFile = join77(oaDir, "nexus", "daemon.pid");
|
|
302666
302681
|
if (existsSync59(nexusPidFile)) {
|
|
302667
|
-
const pid = parseInt(
|
|
302682
|
+
const pid = parseInt(readFileSync47(nexusPidFile, "utf8").trim(), 10);
|
|
302668
302683
|
if (pid > 0) {
|
|
302669
302684
|
try {
|
|
302670
302685
|
process.kill(pid, 0);
|
|
@@ -303230,7 +303245,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
303230
303245
|
let savedHistory = [];
|
|
303231
303246
|
try {
|
|
303232
303247
|
if (existsSync59(HISTORY_FILE)) {
|
|
303233
|
-
const raw =
|
|
303248
|
+
const raw = readFileSync47(HISTORY_FILE, "utf8").trim();
|
|
303234
303249
|
if (raw)
|
|
303235
303250
|
savedHistory = raw.split("\n").reverse();
|
|
303236
303251
|
}
|
|
@@ -303336,7 +303351,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
303336
303351
|
mkdirSync32(HISTORY_DIR, { recursive: true });
|
|
303337
303352
|
appendFileSync6(HISTORY_FILE, line + "\n", "utf8");
|
|
303338
303353
|
if (Math.random() < 0.02) {
|
|
303339
|
-
const all2 =
|
|
303354
|
+
const all2 = readFileSync47(HISTORY_FILE, "utf8").trim().split("\n");
|
|
303340
303355
|
if (all2.length > MAX_HISTORY_LINES) {
|
|
303341
303356
|
writeFileSync30(HISTORY_FILE, all2.slice(-MAX_HISTORY_LINES).join("\n") + "\n", "utf8");
|
|
303342
303357
|
}
|
|
@@ -303532,7 +303547,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
303532
303547
|
try {
|
|
303533
303548
|
const nexusPidFile = join77(repoRoot, ".oa", "nexus", "daemon.pid");
|
|
303534
303549
|
if (existsSync59(nexusPidFile)) {
|
|
303535
|
-
const nPid = parseInt(
|
|
303550
|
+
const nPid = parseInt(readFileSync47(nexusPidFile, "utf8").trim(), 10);
|
|
303536
303551
|
if (nPid > 0 && !registry2.daemons.has("Nexus")) {
|
|
303537
303552
|
registry2.register({ name: "Nexus", pid: nPid, startedAt: Date.now(), status: "running" });
|
|
303538
303553
|
statusBar.ensureMonitorTimer();
|
|
@@ -303650,7 +303665,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
303650
303665
|
let agName = "";
|
|
303651
303666
|
try {
|
|
303652
303667
|
if (existsSync59(globalNamePath))
|
|
303653
|
-
agName =
|
|
303668
|
+
agName = readFileSync47(globalNamePath, "utf8").trim();
|
|
303654
303669
|
} catch {
|
|
303655
303670
|
}
|
|
303656
303671
|
if (!agName) {
|
|
@@ -303683,7 +303698,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
303683
303698
|
let savedSponsors = [];
|
|
303684
303699
|
try {
|
|
303685
303700
|
if (existsSync59(savedSponsorsPath)) {
|
|
303686
|
-
savedSponsors = JSON.parse(
|
|
303701
|
+
savedSponsors = JSON.parse(readFileSync47(savedSponsorsPath, "utf8"));
|
|
303687
303702
|
const oneHourAgo = Date.now() - 36e5;
|
|
303688
303703
|
savedSponsors = savedSponsors.filter((s2) => (s2.lastVerified || 0) > oneHourAgo);
|
|
303689
303704
|
}
|
|
@@ -304778,7 +304793,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
304778
304793
|
try {
|
|
304779
304794
|
const nexusPidFile = join77(repoRoot, ".oa", "nexus", "daemon.pid");
|
|
304780
304795
|
if (existsSync59(nexusPidFile)) {
|
|
304781
|
-
const pid = parseInt(
|
|
304796
|
+
const pid = parseInt(readFileSync47(nexusPidFile, "utf8").trim(), 10);
|
|
304782
304797
|
if (pid > 0) {
|
|
304783
304798
|
registry2.register({
|
|
304784
304799
|
name: "Nexus",
|
|
@@ -304977,7 +304992,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
304977
304992
|
const nexusDir = join77(repoRoot, OA_DIR, "nexus");
|
|
304978
304993
|
const pidFile = join77(nexusDir, "daemon.pid");
|
|
304979
304994
|
if (existsSync59(pidFile)) {
|
|
304980
|
-
const pid = parseInt(
|
|
304995
|
+
const pid = parseInt(readFileSync47(pidFile, "utf8").trim(), 10);
|
|
304981
304996
|
if (pid > 0) {
|
|
304982
304997
|
try {
|
|
304983
304998
|
if (process.platform === "win32") {
|
|
@@ -305005,7 +305020,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
305005
305020
|
const pidPath = join77(voiceDir2, pf);
|
|
305006
305021
|
if (existsSync59(pidPath)) {
|
|
305007
305022
|
try {
|
|
305008
|
-
const pid = parseInt(
|
|
305023
|
+
const pid = parseInt(readFileSync47(pidPath, "utf8").trim(), 10);
|
|
305009
305024
|
if (pid > 0) {
|
|
305010
305025
|
if (process.platform === "win32") {
|
|
305011
305026
|
try {
|
|
@@ -305116,8 +305131,8 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
305116
305131
|
const ppPidFile = join77(homedir21(), ".open-agents", "voice", "personaplex", "daemon.pid");
|
|
305117
305132
|
const ppPortFile = join77(homedir21(), ".open-agents", "voice", "personaplex", "daemon.port");
|
|
305118
305133
|
if (existsSync59(ppPidFile)) {
|
|
305119
|
-
const ppPid = parseInt(
|
|
305120
|
-
const ppPort = existsSync59(ppPortFile) ? parseInt(
|
|
305134
|
+
const ppPid = parseInt(readFileSync47(ppPidFile, "utf8").trim(), 10);
|
|
305135
|
+
const ppPort = existsSync59(ppPortFile) ? parseInt(readFileSync47(ppPortFile, "utf8").trim(), 10) : void 0;
|
|
305121
305136
|
if (ppPid > 0 && !registry2.daemons.has("PersonaPlex")) {
|
|
305122
305137
|
registry2.register({ name: "PersonaPlex", pid: ppPid, port: ppPort, startedAt: Date.now(), status: "running" });
|
|
305123
305138
|
}
|
|
@@ -305125,7 +305140,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
305125
305140
|
}
|
|
305126
305141
|
const nexusPidFile = join77(repoRoot, ".oa", "nexus", "daemon.pid");
|
|
305127
305142
|
if (existsSync59(nexusPidFile)) {
|
|
305128
|
-
const nPid = parseInt(
|
|
305143
|
+
const nPid = parseInt(readFileSync47(nexusPidFile, "utf8").trim(), 10);
|
|
305129
305144
|
if (nPid > 0 && !registry2.daemons.has("Nexus")) {
|
|
305130
305145
|
try {
|
|
305131
305146
|
process.kill(nPid, 0);
|
|
@@ -305477,7 +305492,7 @@ Execute this skill now. Follow the behavioral guidance above.`;
|
|
|
305477
305492
|
if (isImage) {
|
|
305478
305493
|
try {
|
|
305479
305494
|
const imgPath = resolve34(repoRoot, cleanPath);
|
|
305480
|
-
const imgBuffer =
|
|
305495
|
+
const imgBuffer = readFileSync47(imgPath);
|
|
305481
305496
|
const base642 = imgBuffer.toString("base64");
|
|
305482
305497
|
const ext = extname11(cleanPath).toLowerCase();
|
|
305483
305498
|
const mime = ext === ".png" ? "image/png" : ext === ".gif" ? "image/gif" : ext === ".webp" ? "image/webp" : "image/jpeg";
|
|
@@ -306014,7 +306029,7 @@ async function runWithTUI(task, config, repoPath, callbacks) {
|
|
|
306014
306029
|
const ikFile = join77(ikDir, "self-state.json");
|
|
306015
306030
|
let ikState;
|
|
306016
306031
|
if (existsSync59(ikFile)) {
|
|
306017
|
-
ikState = JSON.parse(
|
|
306032
|
+
ikState = JSON.parse(readFileSync47(ikFile, "utf8"));
|
|
306018
306033
|
} else {
|
|
306019
306034
|
mkdirSync32(ikDir, { recursive: true });
|
|
306020
306035
|
ikState = {
|
|
@@ -306052,7 +306067,7 @@ async function runWithTUI(task, config, repoPath, callbacks) {
|
|
|
306052
306067
|
let variants = [];
|
|
306053
306068
|
try {
|
|
306054
306069
|
if (existsSync59(archeFile))
|
|
306055
|
-
variants = JSON.parse(
|
|
306070
|
+
variants = JSON.parse(readFileSync47(archeFile, "utf8"));
|
|
306056
306071
|
} catch {
|
|
306057
306072
|
}
|
|
306058
306073
|
variants.push({
|
|
@@ -306075,7 +306090,7 @@ async function runWithTUI(task, config, repoPath, callbacks) {
|
|
|
306075
306090
|
try {
|
|
306076
306091
|
const metaFile = join77(repoRoot, ".oa", "memory", "metabolism", "store.json");
|
|
306077
306092
|
if (existsSync59(metaFile)) {
|
|
306078
|
-
const store2 = JSON.parse(
|
|
306093
|
+
const store2 = JSON.parse(readFileSync47(metaFile, "utf8"));
|
|
306079
306094
|
const surfaced = store2.filter((m2) => m2.type !== "quarantine" && m2.scores?.confidence > 0.15).sort((a2, b) => b.scores.utility * b.scores.confidence - a2.scores.utility * a2.scores.confidence).slice(0, 5);
|
|
306080
306095
|
let updated = false;
|
|
306081
306096
|
for (const item of surfaced) {
|
|
@@ -306161,7 +306176,7 @@ Rules:
|
|
|
306161
306176
|
let store2 = [];
|
|
306162
306177
|
try {
|
|
306163
306178
|
if (existsSync59(storeFile))
|
|
306164
|
-
store2 = JSON.parse(
|
|
306179
|
+
store2 = JSON.parse(readFileSync47(storeFile, "utf8"));
|
|
306165
306180
|
} catch {
|
|
306166
306181
|
}
|
|
306167
306182
|
store2.push({
|
|
@@ -306188,7 +306203,7 @@ Rules:
|
|
|
306188
306203
|
let cohereActive = false;
|
|
306189
306204
|
try {
|
|
306190
306205
|
if (existsSync59(cohereSettingsFile)) {
|
|
306191
|
-
const settings = JSON.parse(
|
|
306206
|
+
const settings = JSON.parse(readFileSync47(cohereSettingsFile, "utf8"));
|
|
306192
306207
|
cohereActive = settings.cohere === true;
|
|
306193
306208
|
}
|
|
306194
306209
|
} catch {
|
|
@@ -306196,7 +306211,7 @@ Rules:
|
|
|
306196
306211
|
if (cohereActive) {
|
|
306197
306212
|
const metaFile = join77(repoRoot, ".oa", "memory", "metabolism", "store.json");
|
|
306198
306213
|
if (existsSync59(metaFile)) {
|
|
306199
|
-
const store2 = JSON.parse(
|
|
306214
|
+
const store2 = JSON.parse(readFileSync47(metaFile, "utf8"));
|
|
306200
306215
|
const latest = store2.filter((m2) => m2.sourceTrace === "trajectory-extraction" || m2.sourceTrace === "llm-trajectory-extraction").slice(-1)[0];
|
|
306201
306216
|
if (latest && latest.scores?.confidence >= 0.6) {
|
|
306202
306217
|
try {
|
|
@@ -306223,7 +306238,7 @@ Rules:
|
|
|
306223
306238
|
try {
|
|
306224
306239
|
const ikFile = join77(repoRoot, ".oa", "identity", "self-state.json");
|
|
306225
306240
|
if (existsSync59(ikFile)) {
|
|
306226
|
-
const ikState = JSON.parse(
|
|
306241
|
+
const ikState = JSON.parse(readFileSync47(ikFile, "utf8"));
|
|
306227
306242
|
ikState.homeostasis.uncertainty = Math.min(1, ikState.homeostasis.uncertainty + 0.1);
|
|
306228
306243
|
ikState.homeostasis.coherence = Math.max(0, ikState.homeostasis.coherence - 0.05);
|
|
306229
306244
|
ikState.session_count = (ikState.session_count || 0) + 1;
|
|
@@ -306232,7 +306247,7 @@ Rules:
|
|
|
306232
306247
|
}
|
|
306233
306248
|
const metaFile = join77(repoRoot, ".oa", "memory", "metabolism", "store.json");
|
|
306234
306249
|
if (existsSync59(metaFile)) {
|
|
306235
|
-
const store2 = JSON.parse(
|
|
306250
|
+
const store2 = JSON.parse(readFileSync47(metaFile, "utf8"));
|
|
306236
306251
|
const surfaced = store2.filter((m2) => m2.type !== "quarantine" && m2.scores?.confidence > 0.15).sort((a2, b) => b.scores.utility * b.scores.confidence - a2.scores.utility * a2.scores.confidence).slice(0, 5);
|
|
306237
306252
|
for (const item of surfaced) {
|
|
306238
306253
|
item.accessCount = (item.accessCount || 0) + 1;
|
|
@@ -306248,7 +306263,7 @@ Rules:
|
|
|
306248
306263
|
let variants = [];
|
|
306249
306264
|
try {
|
|
306250
306265
|
if (existsSync59(archeFile))
|
|
306251
|
-
variants = JSON.parse(
|
|
306266
|
+
variants = JSON.parse(readFileSync47(archeFile, "utf8"));
|
|
306252
306267
|
} catch {
|
|
306253
306268
|
}
|
|
306254
306269
|
variants.push({
|
|
@@ -306335,7 +306350,7 @@ __export(run_exports, {
|
|
|
306335
306350
|
});
|
|
306336
306351
|
import { resolve as resolve35 } from "node:path";
|
|
306337
306352
|
import { spawn as spawn23 } from "node:child_process";
|
|
306338
|
-
import { mkdirSync as mkdirSync33, writeFileSync as writeFileSync31, readFileSync as
|
|
306353
|
+
import { mkdirSync as mkdirSync33, writeFileSync as writeFileSync31, readFileSync as readFileSync48, readdirSync as readdirSync24, existsSync as existsSync60 } from "node:fs";
|
|
306339
306354
|
import { randomBytes as randomBytes20 } from "node:crypto";
|
|
306340
306355
|
import { join as join78 } from "node:path";
|
|
306341
306356
|
function jobsDir2(repoPath) {
|
|
@@ -306490,7 +306505,7 @@ function statusCommand(jobId, repoPath) {
|
|
|
306490
306505
|
console.log(`Available jobs: oa jobs`);
|
|
306491
306506
|
process.exit(1);
|
|
306492
306507
|
}
|
|
306493
|
-
const job = JSON.parse(
|
|
306508
|
+
const job = JSON.parse(readFileSync48(file, "utf-8"));
|
|
306494
306509
|
const runtime = job.completedAt ? `${((new Date(job.completedAt).getTime() - new Date(job.startedAt).getTime()) / 1e3).toFixed(0)}s` : `${((Date.now() - new Date(job.startedAt).getTime()) / 1e3).toFixed(0)}s`;
|
|
306495
306510
|
const icon = job.status === "completed" ? "\u2713" : job.status === "failed" ? "\u2717" : "\u25CF";
|
|
306496
306511
|
console.log(`${icon} ${job.id} [${job.status}] ${runtime}`);
|
|
@@ -306513,7 +306528,7 @@ function jobsCommand(repoPath) {
|
|
|
306513
306528
|
console.log("Jobs:");
|
|
306514
306529
|
for (const file of files) {
|
|
306515
306530
|
try {
|
|
306516
|
-
const job = JSON.parse(
|
|
306531
|
+
const job = JSON.parse(readFileSync48(join78(dir, file), "utf-8"));
|
|
306517
306532
|
const icon = job.status === "completed" ? "\u2713" : job.status === "failed" ? "\u2717" : "\u25CF";
|
|
306518
306533
|
const runtime = job.completedAt ? `${((new Date(job.completedAt).getTime() - new Date(job.startedAt).getTime()) / 1e3).toFixed(0)}s` : `${((Date.now() - new Date(job.startedAt).getTime()) / 1e3).toFixed(0)}s`;
|
|
306519
306534
|
console.log(` ${icon} ${job.id} [${job.status}] ${runtime} \u2014 ${job.task.slice(0, 60)}`);
|
|
@@ -307431,8 +307446,8 @@ init_output();
|
|
|
307431
307446
|
init_updater();
|
|
307432
307447
|
import { parseArgs as nodeParseArgs2 } from "node:util";
|
|
307433
307448
|
import { createRequire as createRequire6 } from "node:module";
|
|
307434
|
-
import { fileURLToPath as
|
|
307435
|
-
import { dirname as
|
|
307449
|
+
import { fileURLToPath as fileURLToPath17 } from "node:url";
|
|
307450
|
+
import { dirname as dirname25, join as join82 } from "node:path";
|
|
307436
307451
|
|
|
307437
307452
|
// packages/cli/dist/cli.js
|
|
307438
307453
|
import { createInterface } from "node:readline";
|
|
@@ -307539,7 +307554,7 @@ init_output();
|
|
|
307539
307554
|
function getVersion5() {
|
|
307540
307555
|
try {
|
|
307541
307556
|
const require3 = createRequire6(import.meta.url);
|
|
307542
|
-
const pkgPath = join82(
|
|
307557
|
+
const pkgPath = join82(dirname25(fileURLToPath17(import.meta.url)), "..", "package.json");
|
|
307543
307558
|
const pkg = require3(pkgPath);
|
|
307544
307559
|
return pkg.version;
|
|
307545
307560
|
} catch {
|
package/package.json
CHANGED