@mrciphersmith/keryx 0.2.95 → 0.2.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +26 -6
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -47249,7 +47249,7 @@ import path43 from "path";
47249
47249
  // package.json
47250
47250
  var package_default = {
47251
47251
  name: "@mrciphersmith/keryx",
47252
- version: "0.2.95",
47252
+ version: "0.2.96",
47253
47253
  description: "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
47254
47254
  private: false,
47255
47255
  publishConfig: {
@@ -71332,7 +71332,20 @@ function buildMcpChildEnv(input) {
71332
71332
  // src/mcp-servers/runtime.ts
71333
71333
  var CLOSE_GRACE_MS = 750;
71334
71334
  var KILL_GRACE_MS = 4500;
71335
- var delay2 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
71335
+ async function within(work, ms) {
71336
+ let timer;
71337
+ try {
71338
+ await Promise.race([
71339
+ work,
71340
+ new Promise((resolve) => {
71341
+ timer = setTimeout(resolve, ms);
71342
+ })
71343
+ ]);
71344
+ } finally {
71345
+ if (timer !== undefined)
71346
+ clearTimeout(timer);
71347
+ }
71348
+ }
71336
71349
  function createMcpRuntime(options) {
71337
71350
  const dialling = new AbortController;
71338
71351
  const config = loadMcpServers({
@@ -71377,6 +71390,7 @@ function createMcpRuntime(options) {
71377
71390
  }
71378
71391
  await closeServers(fresh);
71379
71392
  };
71393
+ let closing;
71380
71394
  return {
71381
71395
  catalog: () => catalog,
71382
71396
  servers: () => states,
@@ -71386,14 +71400,17 @@ function createMcpRuntime(options) {
71386
71400
  ready: async () => {
71387
71401
  await settled;
71388
71402
  },
71389
- close: async () => {
71403
+ close: () => closing ??= closeNow()
71404
+ };
71405
+ async function closeNow() {
71406
+ {
71390
71407
  dialling.abort();
71391
- await Promise.race([settled, delay2(CLOSE_GRACE_MS)]);
71408
+ await within(settled, CLOSE_GRACE_MS);
71392
71409
  await closeOnce(states);
71393
- await Promise.race([Promise.all(kills), delay2(KILL_GRACE_MS)]);
71410
+ await within(Promise.all(kills), KILL_GRACE_MS);
71394
71411
  settled.then(() => closeOnce(states)).catch(() => {});
71395
71412
  }
71396
- };
71413
+ }
71397
71414
  }
71398
71415
  function handshakeBudgetMs(server) {
71399
71416
  const configured = server.startup_timeout_sec;
@@ -96960,6 +96977,9 @@ Example: keryx shell --provider ollama --model llama3.1:latest`);
96960
96977
  });
96961
96978
  }
96962
96979
  } finally {
96980
+ try {
96981
+ await readlineMcp?.close();
96982
+ } catch {}
96963
96983
  destroy();
96964
96984
  rl.close();
96965
96985
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/keryx",
3
- "version": "0.2.95",
3
+ "version": "0.2.96",
4
4
  "description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
5
5
  "private": false,
6
6
  "publishConfig": {