eminiar 0.5.1 → 0.5.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eminiar",
3
3
  "displayName": "Eminiar",
4
- "version": "0.5.1",
4
+ "version": "0.5.2",
5
5
  "description": "Local-first context, memory and knowledge graph for Claude Code: sandboxed execution, FTS5 + vector search, session continuity, code graph.",
6
6
  "author": {
7
7
  "name": "Ryan Dick"
package/dist/cli.js CHANGED
@@ -37110,42 +37110,45 @@ function apiSignals(dir, project) {
37110
37110
  const rel = relative6(dir, file3).split("\\").join("/");
37111
37111
  const isEnv = basename(file3).startsWith(".env");
37112
37112
  const lines = text3.split("\n");
37113
+ const found = [];
37113
37114
  for (let i = 0; i < lines.length; i++) {
37114
37115
  const line = lines[i];
37115
- if (!line.includes("http")) continue;
37116
- const comment = COMMENT_RE.test(line);
37116
+ if (!line.includes("http") || PLACEHOLDER_RE.test(line)) continue;
37117
37117
  for (const m of line.matchAll(URL_RE)) {
37118
37118
  const host = m[1].toLowerCase();
37119
- const path3 = m[2] ?? "/";
37120
- if (!isApiHostCandidate(host)) continue;
37121
- const spec = SPEC_URL_RE.test(path3);
37122
- if (!spec && isDocLink(host, path3)) {
37123
- if (comment && !isEnv) continue;
37124
- const link = docLinks.get(host) ?? { host, urls: [], samples: [], project };
37125
- const full = `https://${host}${path3.replace(/[#?].*$/, "")}`;
37126
- if (!link.urls.includes(full) && link.urls.length < 3) link.urls.push(full);
37127
- if (link.samples.length < 3) link.samples.push(`${rel}:${i + 1}`);
37128
- docLinks.set(host, link);
37129
- continue;
37130
- }
37131
- const callLike = !comment && (spec || isEnv || CALL_RE.test(line) || API_PATH_RE.test(path3) || API_HOST_RE.test(host));
37132
- const cur = hits.get(host) ?? {
37133
- host,
37134
- calls: 0,
37135
- mentions: 0,
37136
- samples: [],
37137
- specUrls: [],
37138
- project
37139
- };
37140
- if (callLike) cur.calls++;
37141
- else cur.mentions++;
37142
- if (callLike && cur.samples.length < 3) cur.samples.push(`${rel}:${i + 1}`);
37143
- if (spec) {
37144
- const full = `https://${host}${path3}`;
37145
- if (!cur.specUrls.includes(full) && cur.specUrls.length < 4) cur.specUrls.push(full);
37146
- }
37147
- hits.set(host, cur);
37119
+ if (isApiHostCandidate(host)) found.push({ host, path: m[2] ?? "/", line, i });
37120
+ }
37121
+ }
37122
+ if (new Set(found.map((f) => f.host)).size >= REFERENCE_TABLE_HOSTS) continue;
37123
+ for (const { host, path: path3, line, i } of found) {
37124
+ const comment = COMMENT_RE.test(line);
37125
+ const spec = SPEC_URL_RE.test(path3);
37126
+ if (!spec && isDocLink(host, path3)) {
37127
+ if (comment && !isEnv) continue;
37128
+ const link = docLinks.get(host) ?? { host, urls: [], samples: [], project };
37129
+ const full = `https://${host}${path3.replace(/[#?].*$/, "")}`;
37130
+ if (!link.urls.includes(full) && link.urls.length < 3) link.urls.push(full);
37131
+ if (link.samples.length < 3) link.samples.push(`${rel}:${i + 1}`);
37132
+ docLinks.set(host, link);
37133
+ continue;
37134
+ }
37135
+ const callLike = !comment && (spec || isEnv || CALL_RE.test(line) || API_PATH_RE.test(path3) || API_HOST_RE.test(host));
37136
+ const cur = hits.get(host) ?? {
37137
+ host,
37138
+ calls: 0,
37139
+ mentions: 0,
37140
+ samples: [],
37141
+ specUrls: [],
37142
+ project
37143
+ };
37144
+ if (callLike) cur.calls++;
37145
+ else cur.mentions++;
37146
+ if (callLike && cur.samples.length < 3) cur.samples.push(`${rel}:${i + 1}`);
37147
+ if (spec) {
37148
+ const full = `https://${host}${path3}`;
37149
+ if (!cur.specUrls.includes(full) && cur.specUrls.length < 4) cur.specUrls.push(full);
37148
37150
  }
37151
+ hits.set(host, cur);
37149
37152
  }
37150
37153
  }
37151
37154
  return { hits, docLinks };
@@ -37587,7 +37590,7 @@ function discoverDocs(ctx, opts = {}) {
37587
37590
  providers
37588
37591
  };
37589
37592
  }
37590
- var import_fast_glob4, IGNORE, GENERIC_ENV, SKIP_EXT, VISIBLE_DOT_DIRS, CODE_GLOBS, NOT_API_HOSTS, NOT_API_SUFFIX, TWO_LEVEL_TLDS, URL_RE, CALL_RE, API_PATH_RE, API_HOST_RE, SPEC_URL_RE, TEST_PATH_RE, DOC_HOST_RE, DOC_HOST_SUFFIX, DOC_PATH_RE, COMMENT_RE;
37593
+ var import_fast_glob4, IGNORE, GENERIC_ENV, SKIP_EXT, VISIBLE_DOT_DIRS, CODE_GLOBS, NOT_API_HOSTS, NOT_API_SUFFIX, TWO_LEVEL_TLDS, URL_RE, CALL_RE, API_PATH_RE, API_HOST_RE, SPEC_URL_RE, TEST_PATH_RE, DOC_HOST_RE, DOC_HOST_SUFFIX, DOC_PATH_RE, COMMENT_RE, PLACEHOLDER_RE, REFERENCE_TABLE_HOSTS;
37591
37594
  var init_discover = __esm({
37592
37595
  "src/docs/discover.ts"() {
37593
37596
  "use strict";
@@ -37878,6 +37881,8 @@ var init_discover = __esm({
37878
37881
  DOC_HOST_SUFFIX = /\.(readthedocs\.io|gitbook\.io|github\.io|gitlab\.io|netlify\.app|vercel\.app|mintlify\.app|readme\.io|redoc\.ly|stoplight\.io)$/i;
37879
37882
  DOC_PATH_RE = /^\/(docs?|documentation|developers?|guides?|learn|reference|manual|wiki|help|en|latest|stable|v\d+(\.\d+)*\/docs)(\/|$)/i;
37880
37883
  COMMENT_RE = /^\s*(\/\/|#|\*|\/\*|<!--|--|;|'''|""")/;
37884
+ PLACEHOLDER_RE = /\bplaceholder\b/i;
37885
+ REFERENCE_TABLE_HOSTS = 15;
37881
37886
  }
37882
37887
  });
37883
37888
 
package/dist/server.js CHANGED
@@ -53494,6 +53494,8 @@ var DOC_HOST_RE = /^(docs?|developer|developers|devdocs|apidocs|api-docs|help|su
53494
53494
  var DOC_HOST_SUFFIX = /\.(readthedocs\.io|gitbook\.io|github\.io|gitlab\.io|netlify\.app|vercel\.app|mintlify\.app|readme\.io|redoc\.ly|stoplight\.io)$/i;
53495
53495
  var DOC_PATH_RE = /^\/(docs?|documentation|developers?|guides?|learn|reference|manual|wiki|help|en|latest|stable|v\d+(\.\d+)*\/docs)(\/|$)/i;
53496
53496
  var COMMENT_RE = /^\s*(\/\/|#|\*|\/\*|<!--|--|;|'''|""")/;
53497
+ var PLACEHOLDER_RE = /\bplaceholder\b/i;
53498
+ var REFERENCE_TABLE_HOSTS = 15;
53497
53499
  function isDocLink(host, path3) {
53498
53500
  return DOC_HOST_RE.test(host) || DOC_HOST_SUFFIX.test(host) || DOC_PATH_RE.test(path3) && !API_HOST_RE.test(host);
53499
53501
  }
@@ -53514,43 +53516,46 @@ function apiSignals(dir, project) {
53514
53516
  const rel = relative6(dir, file3).split("\\").join("/");
53515
53517
  const isEnv = basename(file3).startsWith(".env");
53516
53518
  const lines = text2.split("\n");
53519
+ const found = [];
53517
53520
  for (let i = 0; i < lines.length; i++) {
53518
53521
  const line = lines[i];
53519
- if (!line.includes("http")) continue;
53520
- const comment = COMMENT_RE.test(line);
53522
+ if (!line.includes("http") || PLACEHOLDER_RE.test(line)) continue;
53521
53523
  for (const m of line.matchAll(URL_RE)) {
53522
53524
  const host = m[1].toLowerCase();
53523
- const path3 = m[2] ?? "/";
53524
- if (!isApiHostCandidate(host)) continue;
53525
- const spec = SPEC_URL_RE.test(path3);
53526
- if (!spec && isDocLink(host, path3)) {
53527
- if (comment && !isEnv) continue;
53528
- const link = docLinks.get(host) ?? { host, urls: [], samples: [], project };
53529
- const full = `https://${host}${path3.replace(/[#?].*$/, "")}`;
53530
- if (!link.urls.includes(full) && link.urls.length < 3) link.urls.push(full);
53531
- if (link.samples.length < 3) link.samples.push(`${rel}:${i + 1}`);
53532
- docLinks.set(host, link);
53533
- continue;
53534
- }
53535
- const callLike = !comment && (spec || isEnv || CALL_RE.test(line) || API_PATH_RE.test(path3) || API_HOST_RE.test(host));
53536
- const cur = hits.get(host) ?? {
53537
- host,
53538
- calls: 0,
53539
- mentions: 0,
53540
- samples: [],
53541
- specUrls: [],
53542
- project
53543
- };
53544
- if (callLike) cur.calls++;
53545
- else cur.mentions++;
53546
- if (callLike && cur.samples.length < 3) cur.samples.push(`${rel}:${i + 1}`);
53547
- if (spec) {
53548
- const full = `https://${host}${path3}`;
53549
- if (!cur.specUrls.includes(full) && cur.specUrls.length < 4) cur.specUrls.push(full);
53550
- }
53551
- hits.set(host, cur);
53525
+ if (isApiHostCandidate(host)) found.push({ host, path: m[2] ?? "/", line, i });
53552
53526
  }
53553
53527
  }
53528
+ if (new Set(found.map((f) => f.host)).size >= REFERENCE_TABLE_HOSTS) continue;
53529
+ for (const { host, path: path3, line, i } of found) {
53530
+ const comment = COMMENT_RE.test(line);
53531
+ const spec = SPEC_URL_RE.test(path3);
53532
+ if (!spec && isDocLink(host, path3)) {
53533
+ if (comment && !isEnv) continue;
53534
+ const link = docLinks.get(host) ?? { host, urls: [], samples: [], project };
53535
+ const full = `https://${host}${path3.replace(/[#?].*$/, "")}`;
53536
+ if (!link.urls.includes(full) && link.urls.length < 3) link.urls.push(full);
53537
+ if (link.samples.length < 3) link.samples.push(`${rel}:${i + 1}`);
53538
+ docLinks.set(host, link);
53539
+ continue;
53540
+ }
53541
+ const callLike = !comment && (spec || isEnv || CALL_RE.test(line) || API_PATH_RE.test(path3) || API_HOST_RE.test(host));
53542
+ const cur = hits.get(host) ?? {
53543
+ host,
53544
+ calls: 0,
53545
+ mentions: 0,
53546
+ samples: [],
53547
+ specUrls: [],
53548
+ project
53549
+ };
53550
+ if (callLike) cur.calls++;
53551
+ else cur.mentions++;
53552
+ if (callLike && cur.samples.length < 3) cur.samples.push(`${rel}:${i + 1}`);
53553
+ if (spec) {
53554
+ const full = `https://${host}${path3}`;
53555
+ if (!cur.specUrls.includes(full) && cur.specUrls.length < 4) cur.specUrls.push(full);
53556
+ }
53557
+ hits.set(host, cur);
53558
+ }
53554
53559
  }
53555
53560
  return { hits, docLinks };
53556
53561
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eminiar",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Local-first context, memory and knowledge-graph plugin for Claude Code. Sandboxed execution, FTS5 + vector search, session continuity, and a code graph — nothing leaves your machine.",
5
5
  "type": "module",
6
6
  "license": "MIT",