lurqrun 0.0.7 → 0.0.9

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/README.md CHANGED
@@ -1,103 +1,238 @@
1
+ <div align="center">
2
+
1
3
  # lurq
2
4
 
3
- > execution-verified answers for AI coding agents. a live index of npm scored from public signals, plus a sandbox that settles the questions metadata can't — exposed as an mcp server, a cli, an http api, and an installable agent skill, compatible with claude code, cursor, windsurf, vscode/copilot, codex, gemini cli, antigravity, and kiro.
5
+ **Execution-verified dependency intelligence for AI coding agents.**
4
6
 
5
- your agent picks the dependencies now, and it picks them from training data frozen at its cutoff and ranked by how often a name appeared in text — not by whether the package is healthy today. so agents install libraries that are abandoned, carry open advisories, or don't exist at all.
7
+ A live index of npm scored from public signals, plus a sandbox that settles the
8
+ questions metadata can't — exposed as an MCP server, a CLI, an HTTP API, and an
9
+ installable agent skill.
6
10
 
7
- lurq is what the agent checks first. most of what matters is readable — release cadence, advisories, deprecations, types/tests/docs, bundle cost — and lurq ingests all of it daily. the rest isn't readable at all. whether a package installs cleanly, whether it imports without throwing, whether two versions can coexist in one tree: those are only knowable by running them, so lurq runs them in an isolated sandbox and keeps the result.
11
+ [![npm version](https://img.shields.io/npm/v/lurqrun?color=%230b7285&label=npm)](https://www.npmjs.com/package/lurqrun)
12
+ [![npm downloads](https://img.shields.io/npm/dm/lurqrun?color=%230b7285)](https://www.npmjs.com/package/lurqrun)
13
+ [![license](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
14
+ [![node](https://img.shields.io/badge/node-%3E%3D20-339933?logo=node.js&logoColor=white)](https://nodejs.org)
15
+ [![MCP](https://img.shields.io/badge/MCP-compatible-6E56CF)](https://modelcontextprotocol.io)
8
16
 
9
- lurq recommends and explains packages; your agent writes the code. responses are compact and token-budgeted, built for an agent's context window rather than a human's screen.
17
+ [Quick start](#quick-start) · [MCP tools](#mcp-tools) · [CLI](#cli) · [Autopilot](#autopilot) · [How ranking works](#how-ranking-works) · [Docs](https://lurq.run/docs)
10
18
 
11
- **v1 scope:** the javascript/typescript web stack (npm) only.
19
+ </div>
12
20
 
13
21
  ---
14
22
 
15
- ## quick start: connect your agent
23
+ ## Why
24
+
25
+ Your agent picks the dependencies now, and it picks them from training data frozen
26
+ at its cutoff, ranked by how often a name appeared in text — not by whether the
27
+ package is healthy today. So agents install libraries that are abandoned, carry
28
+ open advisories, or don't exist at all.
29
+
30
+ lurq is what the agent checks first.
31
+
32
+ Most of what matters is readable — release cadence, advisories, deprecations,
33
+ types/tests/docs, bundle cost — and lurq ingests all of it daily. The rest isn't
34
+ readable at all. Whether a package installs cleanly, whether it imports without
35
+ throwing, whether two versions can coexist in one tree: those are only knowable by
36
+ running them, so lurq runs them in an isolated sandbox and keeps the result.
16
37
 
17
- > **lurq is live.** [create a free account](https://lurq.run/sign-up) to generate
18
- > your API key, then connect your coding agent with the guided installer below.
38
+ lurq recommends and explains packages; your agent writes the code. Responses are
39
+ compact and token-budgeted, built for a context window rather than a screen.
40
+
41
+ > **Scope:** the JavaScript/TypeScript web stack (npm) only.
42
+
43
+ ---
19
44
 
20
- lurq is a **hosted service**: you don't run a database or a sync. get an API key,
21
- then run the guided installer:
45
+ ## Quick start
46
+
47
+ lurq is a **hosted service** — you don't run a database or a sync.
48
+ [Create a free account](https://lurq.run/sign-up) to generate an API key, then run
49
+ the guided installer:
22
50
 
23
51
  ```bash
24
52
  npx lurqrun install
25
53
  ```
26
54
 
27
- it prompts for your key, validates it, detects your installed assistants
28
- (claude code, cursor, windsurf, vscode/copilot, codex, gemini cli, antigravity,
29
- kiro), and writes a keyed
30
- remote mcp entry:
31
- `{ "type": "http", "url": "https://api.lurq.run/mcp", "headers": { "Authorization": "Bearer …" } }`.
32
- **no database credentials ever touch your machine.** restart your agent afterward.
55
+ It prompts for your key, validates it, detects your installed assistants, and
56
+ writes a keyed remote MCP entry:
57
+
58
+ ```json
59
+ {
60
+ "type": "http",
61
+ "url": "https://api.lurq.run/mcp",
62
+ "headers": { "Authorization": "Bearer ..." }
63
+ }
64
+ ```
65
+
66
+ **No database credentials ever touch your machine.** Restart your agent afterward.
67
+
68
+ <details>
69
+ <summary><b>Supported assistants</b></summary>
70
+
71
+ Claude Code · Cursor · Windsurf · VS Code / Copilot · Codex · Gemini CLI ·
72
+ Antigravity · Kiro
33
73
 
34
- ## what your agent gets (mcp tools)
74
+ Target one explicitly with `npx lurqrun install-skill --agent <name>`, or
75
+ self-host against your own database with `--local`.
35
76
 
36
- once installed, the agent can call these over mcp. every response is compact and
77
+ </details>
78
+
79
+ ---
80
+
81
+ ## MCP tools
82
+
83
+ Once installed, your agent can call these over MCP. Every response is compact and
37
84
  carries a `dataAsOf` timestamp.
38
85
 
39
- - **`recommend`**: best current packages for a described need (≤5, scored, with confidence)
40
- - **`evaluate`**: full evidence read for one package (scores, advisories, usage guide)
41
- - **`compare`**: 2 to 5 packages ranked head-to-head
42
- - **`verify`**: is a package real, healthy, and not risky? (anti-hallucination guard)
43
- - **`compat`**: will these packages actually install together? (peer/engine constraints)
44
- - **`plan`**: source every slot in a stack at once, checked for cross-slot coherence
45
- - **`diagram`**: a reference-architecture mermaid diagram for a stack
46
- - **`usage`**: a package version's *real* public api — exported symbols and signatures extracted from its shipped `.d.ts`, exact to the version and absent from any model's training data. pass the version your model knows and get the precise delta: what was added, removed, renamed, or changed.
47
- - **`report_outcome`**: what happened after a pick shipped — installed clean, broke the build, resolved the task. the signal only exists for whatever sits inside the decision, so it feeds back into scoring.
86
+ | Tool | What it answers |
87
+ |---|---|
88
+ | `recommend` | Best current packages for a described need (≤5, scored, with confidence) |
89
+ | `evaluate` | Full evidence read for one package — scores, advisories, usage guide |
90
+ | `compare` | 2–5 packages ranked head-to-head |
91
+ | `verify` | Is this package real, healthy, and not risky? *(anti-hallucination guard)* |
92
+ | `compat` | Will these packages actually install together? (peer/engine constraints) |
93
+ | `plan` | Source every slot in a stack at once, checked for cross-slot coherence |
94
+ | `diagram` | A reference-architecture Mermaid diagram for a stack |
95
+ | `usage` | A version's *real* public API — symbols and signatures from its shipped `.d.ts` |
96
+ | `resolve_surface` | The exact export surface of one package version |
97
+ | `diff_surface` | What a version bump adds, removes, renames, or changes arity on |
98
+ | `report_outcome` | What happened after a pick shipped — installed clean, broke the build, resolved the task |
99
+
100
+ `usage` is the one worth calling out: pass the version your model *thinks* it knows
101
+ and get the precise delta to the version you're actually installing. That fact
102
+ exists in no changelog and no model's training data.
48
103
 
49
- ## cli
104
+ ---
105
+
106
+ ## CLI
50
107
 
51
- the same index, scriptable. every capability is a subcommand:
108
+ The same index, scriptable. Every capability is a subcommand.
52
109
 
53
110
  ```bash
111
+ # Discovery
54
112
  lurq recommend "a form library for react"
55
- lurq verify jsonwebtoken
113
+ lurq evaluate zod
56
114
  lurq compare date-fns dayjs moment
57
- lurq compat next react react-dom # do these install together?
58
- lurq usage zod --known 3.22.4 # what changed in the api since? (--target pins a version)
59
- lurq plan ./project.md # a description in, a scored stack out
60
- lurq serve-http # run it as a rate-limited service of your own
61
- lurq weights # the exact ranking weights, printed
115
+ lurq verify jsonwebtoken
116
+
117
+ # API surfaces
118
+ lurq usage zod --known 3.22.4 # what changed since the version you know
119
+ lurq versions react # stored version timeline
120
+
121
+ # Stacks
122
+ lurq compat next react react-dom # do these install together?
123
+ lurq plan ./project.md # a description in, a scored stack out
124
+
125
+ # Upgrades
126
+ lurq upgrade-plan . # what's behind, and what each upgrade removes
127
+ lurq check-upgrade . --plan lurq-plan.json --exit-code
128
+
129
+ # Configuration & serving
130
+ lurq weights # the exact ranking weights, printed
131
+ lurq edit-weights --set composite.lambda=0.5
132
+ lurq serve-http # run it as a rate-limited service of your own
62
133
  ```
63
134
 
64
- ## where the evidence comes from
135
+ Every read command takes `--json`.
65
136
 
66
- two sources, and the distinction is the whole point.
137
+ ---
67
138
 
68
- **readable** — npm, github, deps.dev, and osv, re-synced daily. downloads, release
69
- cadence, maintenance, advisories, deprecations, license, bundle cost. this is what
139
+ ## Autopilot
140
+
141
+ lurq also keeps a repository's dependencies current **and rewrites the code an
142
+ upgrade breaks.**
143
+
144
+ Renovate and Dependabot open a PR that says *"bumped react-router 6→8"* and gate it
145
+ on your test suite. If coverage misses the affected path, the PR merges green and
146
+ breaks in production.
147
+
148
+ lurq opens a PR that says *"bumped react-router 6→8, and rewrote the 14 call sites
149
+ that used `useHistory`, which no longer exists"* — because it holds the
150
+ symbol-level surface diff and intersects it with what your code references.
151
+
152
+ **The gate needs no tests at all.**
153
+
154
+ ```
155
+ blocking a referenced symbol disappears → the code will throw
156
+ warning a referenced symbol changed arity → it may silently misbehave
157
+ ok nothing referenced is affected
158
+ unverified could not be established → never counted as safe
159
+ ```
160
+
161
+ ### The loop
162
+
163
+ | Step | Runs on | Needs |
164
+ |---|---|---|
165
+ | 1. `lurq upgrade-plan` — drift + what each upgrade removes | your runner | lurq key |
166
+ | 2. `lurq check-upgrade` — intersect with your source, `file:line` | your runner | nothing |
167
+ | 3. `claude-code-action` — rewrite the named call sites, run your tests | your runner | Anthropic credential |
168
+ | 4. `create-pull-request` — one branch, one PR | your runner | `GITHUB_TOKEN` |
169
+ | 5. Outcomes post back — names and counts, never source | lurq | — |
170
+
171
+ Steps 1–2 are the default. The generated workflow starts in `comment` mode: it
172
+ plans, checks, and writes the brief to the run summary, changing nothing. Editing
173
+ is opt-in per repository.
174
+
175
+ ### Trust model
176
+
177
+ - **lurq's GitHub App is `Contents: read-only` and stays that way.** It cannot
178
+ write to any repository, ever.
179
+ - **Every write uses your own `GITHUB_TOKEN`** — ephemeral, scoped to one repo,
180
+ limited to what the `permissions:` block in a file *you* committed declares.
181
+ - **The agent cannot touch version control.** Its allowlist is
182
+ `Read,Edit,Write,Bash(<pkg-manager>:*)` — no `git`, no network. The model edits
183
+ files; the *workflow* commits. A prompt injection in a dependency's changelog
184
+ cannot push a branch.
185
+ - **Revoking it is `git rm .github/workflows/lurq-upgrade.yml`.**
186
+
187
+ Architecture and limits: [`docs/lurq-autopilot.md`](docs/lurq-autopilot.md).
188
+
189
+ ---
190
+
191
+ ## Where the evidence comes from
192
+
193
+ Two sources, and the distinction is the whole point.
194
+
195
+ **Readable** — npm, GitHub, deps.dev, and OSV, re-synced daily. Downloads, release
196
+ cadence, maintenance, advisories, deprecations, license, bundle cost. This is what
70
197
  scoring runs on.
71
198
 
72
- **executed** — an isolated sandbox (e2b, with a local driver for trusted work) that
73
- installs a package version, imports it, and records what happened. co-installing a
199
+ **Executed** — an isolated sandbox (E2B, with a local driver for trusted work) that
200
+ installs a package version, imports it, and records what happened. Co-installing a
74
201
  set is how compatibility is established: a successful co-install is positive proof
75
202
  two versions coexist, a failure is proof they conflict, and the error is kept as
76
203
  evidence. `compat` and `plan` read those edges, which is why lurq can tell you a
77
204
  *stack* holds together rather than only that each package looks fine alone.
78
205
 
79
- facts of the second kind appear in no changelog and no model's training data, and
206
+ Facts of the second kind appear in no changelog and no model's training data, and
80
207
  they go stale unless someone keeps re-running the experiment.
81
208
 
82
- ## how the ranking works
209
+ ---
210
+
211
+ ## How ranking works
212
+
213
+ Deterministic, and public. **No model sits in the ranking path** — `recommend` is
214
+ hybrid vector + full-text search over precomputed scores, which is why it's fast,
215
+ cheap, and reproducible.
216
+
217
+ ```
218
+ health = maintenance 0.35 · adoption 0.30 · reliability 0.25 · efficiency 0.10
219
+ quality = types · tests · docs · changelog · dep count · license · provenance
220
+ composite = blend at a single tunable λ (default 0.35)
221
+ ```
83
222
 
84
- deterministic, and public. no model sits in the ranking path — `recommend` is hybrid
85
- vector + full-text search over precomputed scores, which is why it's fast, cheap, and
86
- reproducible.
223
+ `quality` is a separate, **adoption-independent** axis, so a well-built new package
224
+ isn't buried by an old popular one.
87
225
 
88
- - **health** = maintenance `0.35` · adoption `0.30` · reliability `0.25` · efficiency `0.10`
89
- - **quality** is a separate, adoption-independent axis — types, tests, docs, changelog,
90
- dependency count, license, provenance — so a well-built new package isn't buried by an
91
- old popular one
92
- - the two blend at a single tunable λ for the default sort
226
+ Every weight lives in [`src/scoring/weights.ts`](src/scoring/weights.ts) and is
227
+ printable with `lurq weights`. An answer an agent acts on is worth nothing if it
228
+ can't be audited.
93
229
 
94
- every weight lives in [`src/scoring/weights.ts`](src/scoring/weights.ts) and is printable with
95
- `lurq weights`. an answer an agent acts on is worth nothing if it can't be audited.
230
+ ---
96
231
 
97
- ## outreach
232
+ ## Contact
98
233
 
99
- for any inquiries, partnerships, or proposals, contact jaden ryu at jadenryu@gmail.com.
234
+ Inquiries, partnerships, or proposals: **jadenryu@gmail.com**
100
235
 
101
- ## license
236
+ ## License
102
237
 
103
- Apache License 2.0
238
+ [Apache-2.0](LICENSE)