engramx 1.0.0 → 1.0.1

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/cli.js CHANGED
@@ -42,7 +42,8 @@ import {
42
42
  renameSync as renameSync2
43
43
  } from "fs";
44
44
  import { dirname as dirname4, join as join10, resolve as pathResolve } from "path";
45
- import { homedir } from "os";
45
+ import { fileURLToPath as fileURLToPath2 } from "url";
46
+ import { homedir as homedir2 } from "os";
46
47
 
47
48
  // src/intercept/safety.ts
48
49
  import { existsSync } from "fs";
@@ -2738,6 +2739,7 @@ function formatInstallDiff(before, after) {
2738
2739
  // src/intercept/component-status.ts
2739
2740
  import { existsSync as existsSync8, readFileSync as readFileSync4, writeFileSync } from "fs";
2740
2741
  import { join as join8 } from "path";
2742
+ import { tmpdir as tmpdir2, homedir } from "os";
2741
2743
  function statusPath(projectRoot) {
2742
2744
  return join8(projectRoot, ".engram", "component-status.json");
2743
2745
  }
@@ -2757,9 +2759,10 @@ function checkHttp(projectRoot) {
2757
2759
  }
2758
2760
  function checkLsp(projectRoot) {
2759
2761
  if (existsSync8(join8(projectRoot, ".engram", "lsp-available"))) return true;
2762
+ const tmp = tmpdir2();
2760
2763
  const candidates = [
2761
- "/tmp/tsserver.sock",
2762
- "/tmp/typescript-language-server.sock"
2764
+ join8(tmp, "tsserver.sock"),
2765
+ join8(tmp, "typescript-language-server.sock")
2763
2766
  ];
2764
2767
  return candidates.some((c) => existsSync8(c));
2765
2768
  }
@@ -2772,11 +2775,7 @@ function countIdeAdapters(projectRoot) {
2772
2775
  if (existsSync8(join8(projectRoot, ".cursor", "rules", "engram-context.mdc"))) {
2773
2776
  count += 1;
2774
2777
  }
2775
- const continueConfig = join8(
2776
- process.env.HOME ?? "",
2777
- ".continue",
2778
- "config.json"
2779
- );
2778
+ const continueConfig = join8(homedir(), ".continue", "config.json");
2780
2779
  if (existsSync8(continueConfig)) {
2781
2780
  try {
2782
2781
  const cfg = readFileSync4(continueConfig, "utf-8");
@@ -2784,12 +2783,7 @@ function countIdeAdapters(projectRoot) {
2784
2783
  } catch {
2785
2784
  }
2786
2785
  }
2787
- const zedSettings = join8(
2788
- process.env.HOME ?? "",
2789
- ".config",
2790
- "zed",
2791
- "settings.json"
2792
- );
2786
+ const zedSettings = join8(homedir(), ".config", "zed", "settings.json");
2793
2787
  if (existsSync8(zedSettings)) {
2794
2788
  try {
2795
2789
  const cfg = readFileSync4(zedSettings, "utf-8");
@@ -2999,7 +2993,7 @@ program.command("init").description("Scan codebase and build knowledge graph (ze
2999
2993
  );
3000
2994
  }
3001
2995
  if (opts.fromCcs) {
3002
- const { importCcs } = await import("./importer-MCNFMV5O.js");
2996
+ const { importCcs } = await import("./importer-LU2YFZDY.js");
3003
2997
  const resolvedProjectPath = pathResolve(projectPath);
3004
2998
  const ccsResult = await importCcs(resolvedProjectPath);
3005
2999
  if (ccsResult.nodesCreated > 0) {
@@ -3287,7 +3281,7 @@ function resolveSettingsPath(scope, projectPath) {
3287
3281
  case "project":
3288
3282
  return join10(absProject, ".claude", "settings.json");
3289
3283
  case "user":
3290
- return join10(homedir(), ".claude", "settings.json");
3284
+ return join10(homedir2(), ".claude", "settings.json");
3291
3285
  default:
3292
3286
  return null;
3293
3287
  }
@@ -3742,7 +3736,7 @@ program.command("stress-test").description("Run stress tests: memory, concurrenc
3742
3736
  if (opts.replay) args.push("--replay", opts.replay);
3743
3737
  if (opts.limit) args.push("--limit", String(opts.limit));
3744
3738
  try {
3745
- execFileSync2("npx", ["tsx", ...args], { stdio: "inherit", cwd: join10(dirname4(import.meta.url.replace("file://", "")), "..") });
3739
+ execFileSync2("npx", ["tsx", ...args], { stdio: "inherit", shell: true, cwd: join10(dirname4(fileURLToPath2(import.meta.url)), "..") });
3746
3740
  } catch {
3747
3741
  process.exit(1);
3748
3742
  }
@@ -3756,7 +3750,8 @@ program.command("context-server").description("Start Zed-compatible context serv
3756
3750
  try {
3757
3751
  execFileSync2("npx", ["tsx", "adapters/zed/index.ts"], {
3758
3752
  stdio: "inherit",
3759
- cwd: join10(dirname4(import.meta.url.replace("file://", "")), "..")
3753
+ shell: true,
3754
+ cwd: join10(dirname4(fileURLToPath2(import.meta.url)), "..")
3760
3755
  });
3761
3756
  } catch {
3762
3757
  process.exit(1);
@@ -2,6 +2,7 @@
2
2
  import { readFileSync, existsSync } from "fs";
3
3
  import { join } from "path";
4
4
  import { randomUUID } from "crypto";
5
+ var CCS_SOURCE = "ccs:.context/index.md";
5
6
  var CCS_PATH = join(".context", "index.md");
6
7
  function headingToKind(heading) {
7
8
  const lower = heading.toLowerCase();
@@ -28,7 +29,7 @@ async function importCcs(projectRoot) {
28
29
  const store = await getStore(projectRoot);
29
30
  try {
30
31
  const raw = readFileSync(filePath, "utf-8");
31
- const lines = raw.split("\n");
32
+ const lines = raw.replace(/\r\n/g, "\n").split("\n");
32
33
  let sectionsFound = 0;
33
34
  let nodesCreated = 0;
34
35
  let currentKind = "concept";
@@ -45,7 +46,7 @@ async function importCcs(projectRoot) {
45
46
  id: randomUUID(),
46
47
  label: bulletText,
47
48
  kind: currentKind,
48
- sourceFile: `ccs:${CCS_PATH}`,
49
+ sourceFile: CCS_SOURCE,
49
50
  sourceLocation: null,
50
51
  confidence: "EXTRACTED",
51
52
  confidenceScore: 0.9,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "engramx",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "The context spine for AI coding agents. 6 providers assembled into rich context packets per Read interception. Up to 90% session-level token savings. Local SQLite, zero native deps, zero cloud.",
5
5
  "repository": {
6
6
  "type": "git",