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/bin/lurq.js +135 -5
- package/dist/bin/lurq.js.map +1 -1
- package/dist/index.d.ts +19 -3
- package/dist/index.js +135 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/bin/lurq.js
CHANGED
|
@@ -18,15 +18,119 @@ var init_esm_shims = __esm({
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
+
// package.json
|
|
22
|
+
var package_default;
|
|
23
|
+
var init_package = __esm({
|
|
24
|
+
"package.json"() {
|
|
25
|
+
package_default = {
|
|
26
|
+
name: "lurqrun",
|
|
27
|
+
version: "0.1.0",
|
|
28
|
+
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.",
|
|
29
|
+
type: "module",
|
|
30
|
+
license: "Apache-2.0",
|
|
31
|
+
author: "jadenryu",
|
|
32
|
+
repository: {
|
|
33
|
+
type: "git",
|
|
34
|
+
url: "git+https://github.com/jadenryu/lurq.git"
|
|
35
|
+
},
|
|
36
|
+
homepage: "https://github.com/jadenryu/lurq#readme",
|
|
37
|
+
bugs: {
|
|
38
|
+
url: "https://github.com/jadenryu/lurq/issues"
|
|
39
|
+
},
|
|
40
|
+
keywords: [
|
|
41
|
+
"mcp",
|
|
42
|
+
"model-context-protocol",
|
|
43
|
+
"npm",
|
|
44
|
+
"dependencies",
|
|
45
|
+
"recommendations",
|
|
46
|
+
"claude-code",
|
|
47
|
+
"ai-coding"
|
|
48
|
+
],
|
|
49
|
+
bin: {
|
|
50
|
+
lurq: "dist/bin/lurq.js"
|
|
51
|
+
},
|
|
52
|
+
workspaces: [
|
|
53
|
+
"apps/*"
|
|
54
|
+
],
|
|
55
|
+
files: [
|
|
56
|
+
"dist",
|
|
57
|
+
"src/data/seed.json",
|
|
58
|
+
"templates",
|
|
59
|
+
"drizzle",
|
|
60
|
+
"README.md"
|
|
61
|
+
],
|
|
62
|
+
engines: {
|
|
63
|
+
node: ">=20"
|
|
64
|
+
},
|
|
65
|
+
scripts: {
|
|
66
|
+
build: "tsup",
|
|
67
|
+
dev: "tsx src/bin/lurq.ts",
|
|
68
|
+
lurq: "tsx src/bin/lurq.ts",
|
|
69
|
+
"dev:apps": "npm run dev --workspace @lurq/docs & npm run dev --workspace @lurq/web",
|
|
70
|
+
"benchmark:validate": "tsx src/bin/benchmark.ts validate",
|
|
71
|
+
"benchmark:run": "tsx src/bin/benchmark.ts run",
|
|
72
|
+
start: "node dist/bin/lurq.js",
|
|
73
|
+
test: "vitest run",
|
|
74
|
+
"test:watch": "vitest",
|
|
75
|
+
typecheck: "tsc --noEmit",
|
|
76
|
+
lint: "eslint .",
|
|
77
|
+
format: "prettier --write .",
|
|
78
|
+
"format:check": "prettier --check .",
|
|
79
|
+
"db:generate": "drizzle-kit generate",
|
|
80
|
+
"db:migrate": "tsx src/bin/operator.ts db migrate",
|
|
81
|
+
operator: "tsx src/bin/operator.ts",
|
|
82
|
+
"operator:prod": "LURQ_ENV_FILE=.env.production tsx src/bin/operator.ts",
|
|
83
|
+
prepublishOnly: "npm test && npm run build",
|
|
84
|
+
"content:drift": "tsx scripts/gen-drift.ts"
|
|
85
|
+
},
|
|
86
|
+
dependencies: {
|
|
87
|
+
"@inquirer/prompts": "^8.5.2",
|
|
88
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
89
|
+
commander: "^12.1.0",
|
|
90
|
+
dotenv: "^16.4.5",
|
|
91
|
+
"drizzle-orm": "^0.45.2",
|
|
92
|
+
express: "^5.2.1",
|
|
93
|
+
"express-rate-limit": "^8.5.2",
|
|
94
|
+
helmet: "^8.2.0",
|
|
95
|
+
ioredis: "^5.11.1",
|
|
96
|
+
postgres: "^3.4.9",
|
|
97
|
+
"rate-limit-redis": "^4.3.1",
|
|
98
|
+
semver: "^7.8.5",
|
|
99
|
+
typescript: "^5.5.4",
|
|
100
|
+
"update-notifier": "^7.3.1",
|
|
101
|
+
zod: "^3.23.8"
|
|
102
|
+
},
|
|
103
|
+
devDependencies: {
|
|
104
|
+
"@eslint/js": "^9.9.0",
|
|
105
|
+
"@types/express": "^5.0.6",
|
|
106
|
+
"@types/node": "^22.5.0",
|
|
107
|
+
"@types/semver": "^7.7.1",
|
|
108
|
+
"drizzle-kit": "^0.31.10",
|
|
109
|
+
e2b: "^2.31.0",
|
|
110
|
+
eslint: "^9.9.0",
|
|
111
|
+
marked: "^18.0.9",
|
|
112
|
+
"pdfjs-dist": "^6.2.108",
|
|
113
|
+
playwright: "^1.62.1",
|
|
114
|
+
prettier: "^3.3.3",
|
|
115
|
+
tsup: "^8.2.4",
|
|
116
|
+
tsx: "^4.19.0",
|
|
117
|
+
"typescript-eslint": "^8.3.0",
|
|
118
|
+
vitest: "^2.0.5"
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
21
124
|
// src/core/constants.ts
|
|
22
125
|
var SERVER_NAME, PACKAGE_NAME, VERSION, DEFAULT_ENDPOINT, API_KEY_PREFIX, EMBEDDING_DIM, STALENESS_DAYS, HOUR, DAY, CACHE_TTL;
|
|
23
126
|
var init_constants = __esm({
|
|
24
127
|
"src/core/constants.ts"() {
|
|
25
128
|
"use strict";
|
|
26
129
|
init_esm_shims();
|
|
130
|
+
init_package();
|
|
27
131
|
SERVER_NAME = "lurq";
|
|
28
132
|
PACKAGE_NAME = "lurqrun";
|
|
29
|
-
VERSION =
|
|
133
|
+
VERSION = package_default.version;
|
|
30
134
|
DEFAULT_ENDPOINT = "https://api.lurq.run/mcp";
|
|
31
135
|
API_KEY_PREFIX = "lurq_live_";
|
|
32
136
|
EMBEDDING_DIM = 1536;
|
|
@@ -193,16 +297,17 @@ __export(installSkill_exports, {
|
|
|
193
297
|
installAgent: () => installAgent,
|
|
194
298
|
installInstructions: () => installInstructions,
|
|
195
299
|
installInstructionsFile: () => installInstructionsFile,
|
|
300
|
+
lurqInvocation: () => lurqInvocation,
|
|
196
301
|
printInstallReport: () => printInstallReport,
|
|
197
302
|
resolveAgents: () => resolveAgents,
|
|
198
303
|
runInstallSkill: () => runInstallSkill,
|
|
199
304
|
stripTomlBlock: () => stripTomlBlock,
|
|
200
305
|
upsertMarkedBlock: () => upsertMarkedBlock
|
|
201
306
|
});
|
|
202
|
-
import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
307
|
+
import { accessSync, constants, existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
203
308
|
import { copyFileSync } from "fs";
|
|
204
309
|
import { homedir as homedir3 } from "os";
|
|
205
|
-
import { dirname as dirname3, join as join3 } from "path";
|
|
310
|
+
import { delimiter, dirname as dirname3, join as join3 } from "path";
|
|
206
311
|
function home(...p) {
|
|
207
312
|
return join3(homedir3(), ...p);
|
|
208
313
|
}
|
|
@@ -495,6 +600,20 @@ function resolveAgents(target) {
|
|
|
495
600
|
}
|
|
496
601
|
return [spec];
|
|
497
602
|
}
|
|
603
|
+
function lurqInvocation() {
|
|
604
|
+
const candidates = process.platform === "win32" ? [".cmd", ".exe", ""] : [""];
|
|
605
|
+
for (const dir of (process.env.PATH ?? "").split(delimiter)) {
|
|
606
|
+
if (!dir) continue;
|
|
607
|
+
for (const ext of candidates) {
|
|
608
|
+
try {
|
|
609
|
+
accessSync(join3(dir, `lurq${ext}`), constants.X_OK);
|
|
610
|
+
return { command: "lurq", onPath: true };
|
|
611
|
+
} catch {
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
return { command: `npx ${PACKAGE_NAME}`, onPath: false };
|
|
616
|
+
}
|
|
498
617
|
function printInstallReport(results, instructionsPath, mode) {
|
|
499
618
|
const specs = agentSpecs();
|
|
500
619
|
const short = (p) => p.startsWith(homedir3()) ? `~${p.slice(homedir3().length)}` : p;
|
|
@@ -524,7 +643,15 @@ Full guide: ${short(instructionsPath)}`);
|
|
|
524
643
|
console.log(" 1. Restart the agent so it picks up the new MCP server.");
|
|
525
644
|
}
|
|
526
645
|
console.log(" \u2022 Ask it to recommend a library. It should call lurq.");
|
|
527
|
-
|
|
646
|
+
const { command, onPath } = lurqInvocation();
|
|
647
|
+
console.log(` \u2022 Or use the terminal directly: \`${command} recommend "a form library for React"\`.`);
|
|
648
|
+
if (!onPath) {
|
|
649
|
+
console.log(`
|
|
650
|
+
There is no \`lurq\` command on this machine yet. Everything above`);
|
|
651
|
+
console.log(" worked and your agents are wired up; only the terminal shortcut is");
|
|
652
|
+
console.log(` missing, so use \`npx ${PACKAGE_NAME} <command>\`. To get \`lurq\` itself:`);
|
|
653
|
+
console.log(` npm install -g ${PACKAGE_NAME}`);
|
|
654
|
+
}
|
|
528
655
|
}
|
|
529
656
|
async function runInstallSkill(opts) {
|
|
530
657
|
const selected = resolveAgents(opts.agent ?? "claude-code");
|
|
@@ -832,7 +959,10 @@ ${green("\u2713")} API key saved to ${configPath} ${dim("(mode 0600)")}`);
|
|
|
832
959
|
console.log(
|
|
833
960
|
`${green("\u2713")} Pointed at ${remote.url}${remote.url === DEFAULT_ENDPOINT ? "" : dim(" (your own server)")}`
|
|
834
961
|
);
|
|
835
|
-
|
|
962
|
+
const { command } = lurqInvocation();
|
|
963
|
+
console.log(
|
|
964
|
+
dim(` \`${command} recommend\`, \`evaluate\`, \`compare\`, \`verify\`, \`usage\` now work anywhere.`)
|
|
965
|
+
);
|
|
836
966
|
if (selected.length === 0) {
|
|
837
967
|
console.log(
|
|
838
968
|
"\nNo agents selected or detected. Re-run `lurq setup --agent <id>` once your assistant is installed."
|