billion-context-omp 0.1.2 → 0.1.4
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 +37 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3815,7 +3815,7 @@ async function statusReport(runtime, ctx) {
|
|
|
3815
3815
|
const activeBlocksList = state.blocks.filter((b) => b.active);
|
|
3816
3816
|
const totalBlocksList = state.blocks;
|
|
3817
3817
|
const lines = [];
|
|
3818
|
-
const versionStr = "0.1.
|
|
3818
|
+
const versionStr = "0.1.4" ? `billion-context-omp@${"0.1.4"}` : "";
|
|
3819
3819
|
lines.push("\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E");
|
|
3820
3820
|
lines.push("\u2502 ACP Context Analysis \u2502");
|
|
3821
3821
|
lines.push("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F");
|
|
@@ -4248,22 +4248,41 @@ async function findExtensionDir() {
|
|
|
4248
4248
|
}
|
|
4249
4249
|
}
|
|
4250
4250
|
async function autoInstallLatest(latest) {
|
|
4251
|
-
if (!SEMVER_RE.test(latest))
|
|
4251
|
+
if (!SEMVER_RE.test(latest)) {
|
|
4252
|
+
logWarn("update", { event: "install-abort", reason: "semver", latest });
|
|
4253
|
+
return false;
|
|
4254
|
+
}
|
|
4252
4255
|
const extDir = await findExtensionDir();
|
|
4253
|
-
if (!extDir)
|
|
4256
|
+
if (!extDir) {
|
|
4257
|
+
logWarn("update", { event: "install-abort", reason: "extdir-not-found", moduleUrl: import.meta.url });
|
|
4258
|
+
return false;
|
|
4259
|
+
}
|
|
4254
4260
|
const npmDir = findNpmRoot(extDir);
|
|
4255
|
-
if (!npmDir)
|
|
4261
|
+
if (!npmDir) {
|
|
4262
|
+
logWarn("update", { event: "install-abort", reason: "npmroot-not-found", extDir });
|
|
4263
|
+
return false;
|
|
4264
|
+
}
|
|
4256
4265
|
try {
|
|
4257
|
-
const
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4266
|
+
const keepAlive = setInterval(() => {
|
|
4267
|
+
}, 500);
|
|
4268
|
+
try {
|
|
4269
|
+
const code = await new Promise((resolve2) => {
|
|
4270
|
+
execFile(
|
|
4271
|
+
"npm",
|
|
4272
|
+
["install", `${PACKAGE_NAME}@${latest}`, "--silent", "--no-audit", "--no-fund"],
|
|
4273
|
+
{ cwd: npmDir, timeout: 6e4, shell: process.platform === "win32" },
|
|
4274
|
+
(err, _stdout, stderr) => {
|
|
4275
|
+
if (err) logWarn("update", { event: "install-exec-failed", error: err.message, stderr: String(stderr).slice(0, 300) });
|
|
4276
|
+
resolve2(err ? 1 : 0);
|
|
4277
|
+
}
|
|
4278
|
+
);
|
|
4279
|
+
});
|
|
4280
|
+
return code === 0;
|
|
4281
|
+
} finally {
|
|
4282
|
+
clearInterval(keepAlive);
|
|
4283
|
+
}
|
|
4284
|
+
} catch (e) {
|
|
4285
|
+
logWarn("update", { event: "install-throw", error: e instanceof Error ? e.message : String(e) });
|
|
4267
4286
|
return false;
|
|
4268
4287
|
}
|
|
4269
4288
|
}
|
|
@@ -4291,7 +4310,7 @@ async function checkForUpdate(autoUpdate, notify) {
|
|
|
4291
4310
|
const data = await res.json();
|
|
4292
4311
|
const latest = data.version;
|
|
4293
4312
|
if (!latest) return;
|
|
4294
|
-
const current = runtimeVersion ?? "0.1.
|
|
4313
|
+
const current = runtimeVersion ?? "0.1.4";
|
|
4295
4314
|
const hasUpdate = isNewer(latest, current);
|
|
4296
4315
|
debug.event("update-check", {
|
|
4297
4316
|
current,
|
|
@@ -4579,7 +4598,7 @@ function wireCompactionDisable(pi, runtime) {
|
|
|
4579
4598
|
function wireSessionLifecycle(pi, runtime) {
|
|
4580
4599
|
pi.on("session_start", async (_event, ctx) => {
|
|
4581
4600
|
const sid = ctx.sessionManager.getSessionId();
|
|
4582
|
-
logInfo("session", { event: "start", sid, cwd: ctx.cwd, debug: runtime.adapter.debug ?? null, version: true ? "0.1.
|
|
4601
|
+
logInfo("session", { event: "start", sid, cwd: ctx.cwd, debug: runtime.adapter.debug ?? null, version: true ? "0.1.4" : null });
|
|
4583
4602
|
try {
|
|
4584
4603
|
const user = await loadUserConfig(ctx.cwd);
|
|
4585
4604
|
runtime.setAdapter(applyUserConfig(runtime.adapter, user));
|
|
@@ -4594,7 +4613,7 @@ function wireSessionLifecycle(pi, runtime) {
|
|
|
4594
4613
|
runtime.setPrompts(defaultPrompts);
|
|
4595
4614
|
}
|
|
4596
4615
|
runtime.primeFold(ctx);
|
|
4597
|
-
|
|
4616
|
+
await checkForUpdate(runtime.adapter.autoUpdate ?? true, (msg) => {
|
|
4598
4617
|
if (ctx.hasUI) ctx.ui.notify(msg);
|
|
4599
4618
|
});
|
|
4600
4619
|
});
|
|
@@ -4698,7 +4717,7 @@ ${rendered.text}${example}`);
|
|
|
4698
4717
|
injected: turn.nudge?.shouldInject ?? false,
|
|
4699
4718
|
emergency: turn.nudge?.breakdown?.emergencyOverride === 1
|
|
4700
4719
|
});
|
|
4701
|
-
|
|
4720
|
+
await checkForUpdate(runtime.adapter.autoUpdate ?? true, (msg) => {
|
|
4702
4721
|
if (ctx.hasUI) ctx.ui.notify(msg);
|
|
4703
4722
|
});
|
|
4704
4723
|
return { messages: rebuilt };
|