lurqrun 0.0.9 → 0.1.0

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.d.ts CHANGED
@@ -296,13 +296,29 @@ interface VerifyOutput {
296
296
  advisoryCount: number;
297
297
  }
298
298
 
299
- /** Static identifiers shared across the CLI and MCP server. */
300
299
  declare const SERVER_NAME = "lurq";
301
300
  /** Published npm package name (the CLI command and MCP nickname stay `lurq`).
302
301
  * Keep in sync with package.json "name". */
303
302
  declare const PACKAGE_NAME = "lurqrun";
304
- /** Keep in sync with package.json "version". */
305
- declare const VERSION = "0.0.8";
303
+ /**
304
+ * Read from package.json rather than restated, so a release bump cannot leave
305
+ * it behind. This used to be a literal under a "keep in sync" comment, and it
306
+ * drifted the moment someone bumped package.json alone: 0.0.9 shipped to npm
307
+ * announcing itself as 0.0.8.
308
+ *
309
+ * That is not only cosmetic. github/workflow.ts defaults `cliSpec()` to this
310
+ * value and bakes it into the `npx lurqrun@<v>` line of every workflow lurq
311
+ * generates, so a stale constant writes users a CI job pinned to a version
312
+ * other than the one that wrote it.
313
+ *
314
+ * The import is resolved at build time — esbuild inlines the JSON, so there is
315
+ * no file read at runtime and no dependence on where the bundle sits on disk.
316
+ * That last part is why this is an import and not a `readFileSync` of a path
317
+ * relative to `import.meta.url`: the public bin lands at dist/bin/lurq.js and
318
+ * the library entry at dist/index.js, so any relative path correct for one is
319
+ * wrong for the other.
320
+ */
321
+ declare const VERSION: string;
306
322
  /** Default hosted endpoint the install wizard writes into agent configs. The
307
323
  * marketing site is `lurq.run`; the MCP service lives on the `api.` subdomain.
308
324
  * Overridable per-invocation with `lurq install --url …` or `LURQ_ENDPOINT`. */
package/dist/index.js CHANGED
@@ -75,15 +75,119 @@ var init_types = __esm({
75
75
  }
76
76
  });
77
77
 
78
+ // package.json
79
+ var package_default;
80
+ var init_package = __esm({
81
+ "package.json"() {
82
+ package_default = {
83
+ name: "lurqrun",
84
+ version: "0.1.0",
85
+ description: "A continuously-updated, evidence-scored index of JS/TS frameworks and libraries, exposed as an MCP server, CLI, and agent skill \u2014 so AI coding assistants get fresh, objective dependency recommendations.",
86
+ type: "module",
87
+ license: "Apache-2.0",
88
+ author: "jadenryu",
89
+ repository: {
90
+ type: "git",
91
+ url: "git+https://github.com/jadenryu/lurq.git"
92
+ },
93
+ homepage: "https://github.com/jadenryu/lurq#readme",
94
+ bugs: {
95
+ url: "https://github.com/jadenryu/lurq/issues"
96
+ },
97
+ keywords: [
98
+ "mcp",
99
+ "model-context-protocol",
100
+ "npm",
101
+ "dependencies",
102
+ "recommendations",
103
+ "claude-code",
104
+ "ai-coding"
105
+ ],
106
+ bin: {
107
+ lurq: "dist/bin/lurq.js"
108
+ },
109
+ workspaces: [
110
+ "apps/*"
111
+ ],
112
+ files: [
113
+ "dist",
114
+ "src/data/seed.json",
115
+ "templates",
116
+ "drizzle",
117
+ "README.md"
118
+ ],
119
+ engines: {
120
+ node: ">=20"
121
+ },
122
+ scripts: {
123
+ build: "tsup",
124
+ dev: "tsx src/bin/lurq.ts",
125
+ lurq: "tsx src/bin/lurq.ts",
126
+ "dev:apps": "npm run dev --workspace @lurq/docs & npm run dev --workspace @lurq/web",
127
+ "benchmark:validate": "tsx src/bin/benchmark.ts validate",
128
+ "benchmark:run": "tsx src/bin/benchmark.ts run",
129
+ start: "node dist/bin/lurq.js",
130
+ test: "vitest run",
131
+ "test:watch": "vitest",
132
+ typecheck: "tsc --noEmit",
133
+ lint: "eslint .",
134
+ format: "prettier --write .",
135
+ "format:check": "prettier --check .",
136
+ "db:generate": "drizzle-kit generate",
137
+ "db:migrate": "tsx src/bin/operator.ts db migrate",
138
+ operator: "tsx src/bin/operator.ts",
139
+ "operator:prod": "LURQ_ENV_FILE=.env.production tsx src/bin/operator.ts",
140
+ prepublishOnly: "npm test && npm run build",
141
+ "content:drift": "tsx scripts/gen-drift.ts"
142
+ },
143
+ dependencies: {
144
+ "@inquirer/prompts": "^8.5.2",
145
+ "@modelcontextprotocol/sdk": "^1.29.0",
146
+ commander: "^12.1.0",
147
+ dotenv: "^16.4.5",
148
+ "drizzle-orm": "^0.45.2",
149
+ express: "^5.2.1",
150
+ "express-rate-limit": "^8.5.2",
151
+ helmet: "^8.2.0",
152
+ ioredis: "^5.11.1",
153
+ postgres: "^3.4.9",
154
+ "rate-limit-redis": "^4.3.1",
155
+ semver: "^7.8.5",
156
+ typescript: "^5.5.4",
157
+ "update-notifier": "^7.3.1",
158
+ zod: "^3.23.8"
159
+ },
160
+ devDependencies: {
161
+ "@eslint/js": "^9.9.0",
162
+ "@types/express": "^5.0.6",
163
+ "@types/node": "^22.5.0",
164
+ "@types/semver": "^7.7.1",
165
+ "drizzle-kit": "^0.31.10",
166
+ e2b: "^2.31.0",
167
+ eslint: "^9.9.0",
168
+ marked: "^18.0.9",
169
+ "pdfjs-dist": "^6.2.108",
170
+ playwright: "^1.62.1",
171
+ prettier: "^3.3.3",
172
+ tsup: "^8.2.4",
173
+ tsx: "^4.19.0",
174
+ "typescript-eslint": "^8.3.0",
175
+ vitest: "^2.0.5"
176
+ }
177
+ };
178
+ }
179
+ });
180
+
78
181
  // src/core/constants.ts
79
182
  var SERVER_NAME, PACKAGE_NAME, VERSION, DEFAULT_ENDPOINT, API_KEY_PREFIX, EMBEDDING_DIM, STALENESS_DAYS, HOUR, DAY, CACHE_TTL;
80
183
  var init_constants = __esm({
81
184
  "src/core/constants.ts"() {
82
185
  "use strict";
83
186
  init_esm_shims();
187
+ init_package();
84
188
  SERVER_NAME = "lurq";
85
189
  PACKAGE_NAME = "lurqrun";
86
- VERSION = "0.0.8";
190
+ VERSION = package_default.version;
87
191
  DEFAULT_ENDPOINT = "https://api.lurq.run/mcp";
88
192
  API_KEY_PREFIX = "lurq_live_";
89
193
  EMBEDDING_DIM = 1536;
@@ -356,16 +460,17 @@ __export(installSkill_exports, {
356
460
  installAgent: () => installAgent,
357
461
  installInstructions: () => installInstructions,
358
462
  installInstructionsFile: () => installInstructionsFile,
463
+ lurqInvocation: () => lurqInvocation,
359
464
  printInstallReport: () => printInstallReport,
360
465
  resolveAgents: () => resolveAgents,
361
466
  runInstallSkill: () => runInstallSkill,
362
467
  stripTomlBlock: () => stripTomlBlock,
363
468
  upsertMarkedBlock: () => upsertMarkedBlock
364
469
  });
365
- import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
470
+ import { accessSync, constants, existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
366
471
  import { copyFileSync } from "fs";
367
472
  import { homedir as homedir3 } from "os";
368
- import { dirname as dirname3, join as join3 } from "path";
473
+ import { delimiter, dirname as dirname3, join as join3 } from "path";
369
474
  function home(...p) {
370
475
  return join3(homedir3(), ...p);
371
476
  }
@@ -658,6 +763,20 @@ function resolveAgents(target) {
658
763
  }
659
764
  return [spec];
660
765
  }
766
+ function lurqInvocation() {
767
+ const candidates = process.platform === "win32" ? [".cmd", ".exe", ""] : [""];
768
+ for (const dir of (process.env.PATH ?? "").split(delimiter)) {
769
+ if (!dir) continue;
770
+ for (const ext of candidates) {
771
+ try {
772
+ accessSync(join3(dir, `lurq${ext}`), constants.X_OK);
773
+ return { command: "lurq", onPath: true };
774
+ } catch {
775
+ }
776
+ }
777
+ }
778
+ return { command: `npx ${PACKAGE_NAME}`, onPath: false };
779
+ }
661
780
  function printInstallReport(results, instructionsPath, mode) {
662
781
  const specs = agentSpecs();
663
782
  const short = (p) => p.startsWith(homedir3()) ? `~${p.slice(homedir3().length)}` : p;
@@ -687,7 +806,15 @@ Full guide: ${short(instructionsPath)}`);
687
806
  console.log(" 1. Restart the agent so it picks up the new MCP server.");
688
807
  }
689
808
  console.log(" \u2022 Ask it to recommend a library. It should call lurq.");
690
- console.log(' \u2022 Or use the terminal directly: `lurq recommend "a form library for React"`.');
809
+ const { command, onPath } = lurqInvocation();
810
+ console.log(` \u2022 Or use the terminal directly: \`${command} recommend "a form library for React"\`.`);
811
+ if (!onPath) {
812
+ console.log(`
813
+ There is no \`lurq\` command on this machine yet. Everything above`);
814
+ console.log(" worked and your agents are wired up; only the terminal shortcut is");
815
+ console.log(` missing, so use \`npx ${PACKAGE_NAME} <command>\`. To get \`lurq\` itself:`);
816
+ console.log(` npm install -g ${PACKAGE_NAME}`);
817
+ }
691
818
  }
692
819
  async function runInstallSkill(opts) {
693
820
  const selected = resolveAgents(opts.agent ?? "claude-code");
@@ -995,7 +1122,10 @@ ${green("\u2713")} API key saved to ${configPath} ${dim("(mode 0600)")}`);
995
1122
  console.log(
996
1123
  `${green("\u2713")} Pointed at ${remote.url}${remote.url === DEFAULT_ENDPOINT ? "" : dim(" (your own server)")}`
997
1124
  );
998
- console.log(dim(" `lurq recommend`, `evaluate`, `compare`, `verify`, `usage` now work anywhere."));
1125
+ const { command } = lurqInvocation();
1126
+ console.log(
1127
+ dim(` \`${command} recommend\`, \`evaluate\`, \`compare\`, \`verify\`, \`usage\` now work anywhere.`)
1128
+ );
999
1129
  if (selected.length === 0) {
1000
1130
  console.log(
1001
1131
  "\nNo agents selected or detected. Re-run `lurq setup --agent <id>` once your assistant is installed."