lurqrun 0.0.8 → 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,124 +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.
37
+
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.
16
42
 
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.
43
+ ---
44
+
45
+ ## Quick start
19
46
 
20
- lurq is a **hosted service**: you don't run a database or a sync. one command,
21
- once per machine:
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
- npx lurqrun
52
+ npx lurqrun install
53
+ ```
54
+
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
+ }
25
64
  ```
26
65
 
27
- that runs setup. it offers to install `lurqrun` globally first, so `lurq` works
28
- in any terminal without npx, then opens the dashboard so you can grab an api key,
29
- validates it, and does everything else in one pass:
66
+ **No database credentials ever touch your machine.** Restart your agent afterward.
67
+
68
+ <details>
69
+ <summary><b>Supported assistants</b></summary>
30
70
 
31
- - **stores the key** in `~/.lurq/config.json` (mode 0600), so `lurq recommend`,
32
- `verify`, `compare`, `usage` and the rest work in any directory, with no
33
- `LURQ_API_KEY` to export
34
- - **registers the mcp server** in every assistant it finds (claude code, cursor,
35
- windsurf, vscode/copilot, codex, gemini cli, antigravity, kiro), as a keyed
36
- remote entry:
37
- `{ "type": "http", "url": "https://api.lurq.run/mcp", "headers": { "Authorization": "Bearer …" } }`
38
- - **installs the agent skill**, so the model reaches for lurq on its own instead of
39
- answering about a package from memory: a real skill at
40
- `~/.claude/skills/lurq/SKILL.md` for claude code, and the equivalent rules or
41
- steering file for the others
71
+ Claude Code · Cursor · Windsurf · VS Code / Copilot · Codex · Gemini CLI ·
72
+ Antigravity · Kiro
42
73
 
43
- **no database credentials ever touch your machine.** restart your agent afterward.
44
- one machine, one setup: there's no per-project step and nothing to re-run.
74
+ Target one explicitly with `npx lurqrun install-skill --agent <name>`, or
75
+ self-host against your own database with `--local`.
45
76
 
46
- re-run the wizard anytime with `lurq setup`, after installing a new editor or to
47
- swap in a different key. `lurq install` and `lurq login` are aliases for it.
77
+ </details>
48
78
 
49
- our servers are the default, not the only option. running your own `lurq
50
- serve-http`? point setup at it with `lurq setup --url https://your.host/mcp`, and
51
- issue the key on that machine with `lurq keys create`. the endpoint is stored
52
- alongside the key, so later re-runs stay on your server.
79
+ ---
53
80
 
54
- ## what your agent gets (mcp tools)
81
+ ## MCP tools
55
82
 
56
- once installed, the agent can call these over mcp. every response is compact and
83
+ Once installed, your agent can call these over MCP. Every response is compact and
57
84
  carries a `dataAsOf` timestamp.
58
85
 
59
- - **`recommend`**: best current packages for a described need (≤5, scored, with confidence)
60
- - **`evaluate`**: full evidence read for one package (scores, advisories, usage guide)
61
- - **`compare`**: 2 to 5 packages ranked head-to-head
62
- - **`verify`**: is a package real, healthy, and not risky? (anti-hallucination guard)
63
- - **`compat`**: will these packages actually install together? (peer/engine constraints)
64
- - **`plan`**: source every slot in a stack at once, checked for cross-slot coherence
65
- - **`diagram`**: a reference-architecture mermaid diagram for a stack
66
- - **`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.
67
- - **`report_outcome`**: what happened after a pick shipped, whether it installed clean, broke the build, or 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.
103
+
104
+ ---
68
105
 
69
- ## cli
106
+ ## CLI
70
107
 
71
- the same hosted index, scriptable. no database, and no key to pass once setup has
72
- stored it. every capability is a subcommand:
108
+ The same index, scriptable. Every capability is a subcommand.
73
109
 
74
110
  ```bash
111
+ # Discovery
75
112
  lurq recommend "a form library for react"
76
- lurq verify jsonwebtoken
113
+ lurq evaluate zod
77
114
  lurq compare date-fns dayjs moment
78
- lurq compat next react react-dom # do these install together?
79
- lurq usage zod --known 3.22.4 # what changed in the api since? (--target pins a version)
80
- lurq plan ./project.md # a description in, a scored stack out
81
- lurq serve-http # run it as a rate-limited service of your own
82
- 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
83
133
  ```
84
134
 
85
- ## where the evidence comes from
135
+ Every read command takes `--json`.
136
+
137
+ ---
138
+
139
+ ## Autopilot
86
140
 
87
- two sources, and the distinction is the whole point.
141
+ lurq also keeps a repository's dependencies current **and rewrites the code an
142
+ upgrade breaks.**
88
143
 
89
- **readable**: npm, github, deps.dev, and osv, re-synced daily. downloads, release
90
- cadence, maintenance, advisories, deprecations, license, bundle cost. this is what
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
91
197
  scoring runs on.
92
198
 
93
- **executed**: an isolated sandbox (e2b, with a local driver for trusted work) that
94
- 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
95
201
  set is how compatibility is established: a successful co-install is positive proof
96
202
  two versions coexist, a failure is proof they conflict, and the error is kept as
97
203
  evidence. `compat` and `plan` read those edges, which is why lurq can tell you a
98
204
  *stack* holds together rather than only that each package looks fine alone.
99
205
 
100
- 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
101
207
  they go stale unless someone keeps re-running the experiment.
102
208
 
103
- ## how the ranking works
209
+ ---
104
210
 
105
- deterministic, and public. no model sits in the ranking path. `recommend` is hybrid
106
- vector + full-text search over precomputed scores, which is why it's fast, cheap, and
107
- reproducible.
211
+ ## How ranking works
108
212
 
109
- - **health** = maintenance `0.35` · adoption `0.30` · reliability `0.25` · efficiency `0.10`
110
- - **quality** is a separate, adoption-independent axis (types, tests, docs, changelog,
111
- dependency count, license, provenance) so a well-built new package isn't buried by an
112
- old popular one
113
- - the two blend at a single tunable λ for the default sort
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.
114
216
 
115
- every weight lives in [`src/scoring/weights.ts`](src/scoring/weights.ts) and is printable with
116
- `lurq weights`. an answer an agent acts on is worth nothing if it can't be audited.
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
+ ```
222
+
223
+ `quality` is a separate, **adoption-independent** axis, so a well-built new package
224
+ isn't buried by an old popular one.
225
+
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.
229
+
230
+ ---
117
231
 
118
- ## outreach
232
+ ## Contact
119
233
 
120
- for any inquiries, partnerships, or proposals, contact jaden ryu at jadenryu@gmail.com.
234
+ Inquiries, partnerships, or proposals: **jadenryu@gmail.com**
121
235
 
122
- ## license
236
+ ## License
123
237
 
124
- Apache License 2.0
238
+ [Apache-2.0](LICENSE)