lurqrun 0.0.1 → 0.0.3
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 +18 -78
- package/dist/bin/lurq.js +3509 -440
- package/dist/bin/lurq.js.map +1 -1
- package/dist/index.d.ts +102 -6
- package/dist/index.js +3428 -433
- package/dist/index.js.map +1 -1
- package/drizzle/0001_aspiring_timeslip.sql +15 -0
- package/drizzle/0002_lyrical_lila_cheney.sql +14 -0
- package/drizzle/0003_violet_giant_girl.sql +14 -0
- package/drizzle/0004_slim_valeria_richards.sql +15 -0
- package/drizzle/0005_petite_luke_cage.sql +12 -0
- package/drizzle/0006_calm_nighthawk.sql +3 -0
- package/drizzle/0007_slimy_naoko.sql +1 -0
- package/drizzle/0008_peaceful_tigra.sql +1 -0
- package/drizzle/meta/0001_snapshot.json +482 -0
- package/drizzle/meta/0002_snapshot.json +575 -0
- package/drizzle/meta/0003_snapshot.json +667 -0
- package/drizzle/meta/0004_snapshot.json +769 -0
- package/drizzle/meta/0005_snapshot.json +864 -0
- package/drizzle/meta/0006_snapshot.json +882 -0
- package/drizzle/meta/0007_snapshot.json +876 -0
- package/drizzle/meta/0008_snapshot.json +882 -0
- package/drizzle/meta/_journal.json +56 -0
- package/package.json +10 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,16 @@ import { Command } from 'commander';
|
|
|
9
9
|
declare const CATEGORIES: readonly ["framework", "meta-framework", "state-management", "routing", "orm", "database-client", "ui-component-library", "styling", "forms", "validation", "data-fetching", "http-client", "auth", "testing", "build-tool", "bundler", "linting", "date-time", "animation", "charts", "i18n", "utility", "other"];
|
|
10
10
|
type Category = (typeof CATEGORIES)[number];
|
|
11
11
|
declare function isCategory(value: string): value is Category;
|
|
12
|
+
/** Provenance of a package's stored category (§2A). `curated` comes from the
|
|
13
|
+
* seed file or a manual arg; `inferred` was assigned automatically at ingest
|
|
14
|
+
* and is safe for a later curation pass to override. */
|
|
15
|
+
type CategorySource = 'curated' | 'inferred';
|
|
16
|
+
/** How a candidate entered the discovery queue (§2B). `dependency-graph` and
|
|
17
|
+
* `recent` are the long-tail channels; `category-search` is keyword-seeded;
|
|
18
|
+
* `reactive` is an on-demand query that wasn't tracked yet. */
|
|
19
|
+
type DiscoverySource = 'dependency-graph' | 'category-search' | 'recent' | 'reactive';
|
|
20
|
+
/** Lifecycle of a discovery-queue candidate (§2B). */
|
|
21
|
+
type DiscoveryStatus = 'pending' | 'ingested' | 'rejected';
|
|
12
22
|
/**
|
|
13
23
|
* Categories for which bundle size is meaningful and Bundlephobia is consulted
|
|
14
24
|
* (§9.5). Backend-only categories get a null bundle size, and their efficiency
|
|
@@ -16,9 +26,55 @@ declare function isCategory(value: string): value is Category;
|
|
|
16
26
|
*/
|
|
17
27
|
declare const FRONTEND_CATEGORIES: readonly ["ui-component-library", "styling", "state-management", "forms", "validation", "data-fetching", "charts", "animation", "date-time", "utility"];
|
|
18
28
|
declare function isFrontendCategory(category: Category | null | undefined): boolean;
|
|
19
|
-
/**
|
|
20
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Evidence-trustworthiness label, independent of the numeric score (§10, §1).
|
|
31
|
+
* Two-dimensional: `proven`/`emerging` are adoption ladders; `promising` is
|
|
32
|
+
* adoption-independent (high intrinsic quality, new package).
|
|
33
|
+
*/
|
|
34
|
+
type Confidence = 'proven' | 'emerging' | 'promising' | 'unproven';
|
|
21
35
|
type Runtime = 'browser' | 'node' | 'both';
|
|
36
|
+
/** Result of co-installing two package versions in the sandbox (compat matrix). */
|
|
37
|
+
type CompatStatus = 'compatible' | 'conflict';
|
|
38
|
+
/** Sandbox verdict surfaced to agents: did this version actually install + load? */
|
|
39
|
+
interface BuildVerified {
|
|
40
|
+
version: string;
|
|
41
|
+
installed: boolean;
|
|
42
|
+
loaded: boolean | null;
|
|
43
|
+
driver: string;
|
|
44
|
+
ranAt: string;
|
|
45
|
+
}
|
|
46
|
+
/** A map of dependency/peer/engine name → semver range (from a manifest). */
|
|
47
|
+
type DependencyRanges = Record<string, string>;
|
|
48
|
+
/** `peerDependenciesMeta`: per-peer flags, notably `{ optional: true }`. */
|
|
49
|
+
type PeerMeta = Record<string, {
|
|
50
|
+
optional?: boolean;
|
|
51
|
+
}>;
|
|
52
|
+
/** One incompatibility found across a set of packages. */
|
|
53
|
+
interface CompatConflict {
|
|
54
|
+
/** Where the conflict came from. `peer-deps`/`engines` are Tier-1 (metadata,
|
|
55
|
+
* instant, deterministic); `sandbox` is Tier-2 (empirical co-install). */
|
|
56
|
+
source: 'peer-deps' | 'engines' | 'sandbox';
|
|
57
|
+
/** The packages involved in the conflict. */
|
|
58
|
+
packages: string[];
|
|
59
|
+
detail: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* `compat` output: whole-architecture compatibility for a set of packages.
|
|
63
|
+
* Tier-1 peer-dependency/engine analysis + any Tier-2 sandbox conflicts.
|
|
64
|
+
*/
|
|
65
|
+
interface CompatOutput {
|
|
66
|
+
packages: string[];
|
|
67
|
+
overall: 'compatible' | 'conflict' | 'unknown';
|
|
68
|
+
conflicts: CompatConflict[];
|
|
69
|
+
/** Packages lurq has no compatibility metadata for (counted toward `unknown`). */
|
|
70
|
+
unverified: string[];
|
|
71
|
+
/** The exact members the check ran over, name + resolved version. Versions are
|
|
72
|
+
* always surfaced here, and the structure is stable for later scraping. */
|
|
73
|
+
checked: {
|
|
74
|
+
name: string;
|
|
75
|
+
version: string | null;
|
|
76
|
+
}[];
|
|
77
|
+
}
|
|
22
78
|
type AdvisorySeverity = 'critical' | 'high' | 'moderate' | 'low' | 'info';
|
|
23
79
|
interface Advisory {
|
|
24
80
|
id: string;
|
|
@@ -26,12 +82,16 @@ interface Advisory {
|
|
|
26
82
|
summary: string;
|
|
27
83
|
}
|
|
28
84
|
/** Sub-scores composing the health score (§10). `efficiency` is null when not
|
|
29
|
-
* size-based (backend categories) — its weight is redistributed.
|
|
85
|
+
* size-based (backend categories) — its weight is redistributed.
|
|
86
|
+
* `quality` (§1) is a standalone, adoption-independent axis — it does NOT feed
|
|
87
|
+
* the health composite; it blends with health only at ranking time. Null when
|
|
88
|
+
* no manifest signals were available. */
|
|
30
89
|
interface ScoreBreakdown {
|
|
31
90
|
maintenance: number;
|
|
32
91
|
adoption: number;
|
|
33
92
|
reliability: number;
|
|
34
93
|
efficiency: number | null;
|
|
94
|
+
quality: number | null;
|
|
35
95
|
}
|
|
36
96
|
/**
|
|
37
97
|
* Structured usage guide generated at ingest (product refinement: lurq explains,
|
|
@@ -51,6 +111,7 @@ interface Candidate {
|
|
|
51
111
|
name: string;
|
|
52
112
|
category: Category | null;
|
|
53
113
|
healthScore: number;
|
|
114
|
+
qualityScore: number | null;
|
|
54
115
|
confidence: Confidence;
|
|
55
116
|
why: string;
|
|
56
117
|
latestVersion: string | null;
|
|
@@ -65,13 +126,13 @@ interface EvaluateOutput {
|
|
|
65
126
|
name: string;
|
|
66
127
|
category: Category | null;
|
|
67
128
|
healthScore: number;
|
|
129
|
+
qualityScore: number | null;
|
|
68
130
|
confidence: Confidence;
|
|
69
131
|
scoreBreakdown: ScoreBreakdown;
|
|
70
132
|
latestVersion: string | null;
|
|
71
133
|
lastReleaseAt: string | null;
|
|
72
134
|
weeklyDownloads: number | null;
|
|
73
135
|
downloadGrowth90d: number | null;
|
|
74
|
-
dependentsCount: number | null;
|
|
75
136
|
scorecard: number | null;
|
|
76
137
|
bundleMinGzipKb: number | null;
|
|
77
138
|
deprecated: boolean;
|
|
@@ -80,8 +141,12 @@ interface EvaluateOutput {
|
|
|
80
141
|
summary: string | null;
|
|
81
142
|
usageGuide: UsageGuide | null;
|
|
82
143
|
repoUrl: string | null;
|
|
144
|
+
/** Latest sandbox verdict for this package, if one has been run. */
|
|
145
|
+
buildVerified?: BuildVerified | null;
|
|
83
146
|
}
|
|
84
147
|
/** `verify` output (§12.3.4). */
|
|
148
|
+
/** Supply-chain risk gate: high = review before installing (see security/risk). */
|
|
149
|
+
type RiskLevel = 'low' | 'medium' | 'high';
|
|
85
150
|
interface VerifyOutput {
|
|
86
151
|
exists: boolean;
|
|
87
152
|
tracked: boolean;
|
|
@@ -90,6 +155,10 @@ interface VerifyOutput {
|
|
|
90
155
|
latestVersion: string | null;
|
|
91
156
|
weeklyDownloads: number | null;
|
|
92
157
|
riskFlags: string[];
|
|
158
|
+
/** Overall supply-chain risk, rolled up from riskFlags. */
|
|
159
|
+
risk: RiskLevel;
|
|
160
|
+
/** Suspected typosquat target — a popular package this name closely mimics. */
|
|
161
|
+
typosquatOf: string | null;
|
|
93
162
|
confidence: Confidence | null;
|
|
94
163
|
advisoryCount: number;
|
|
95
164
|
}
|
|
@@ -100,7 +169,13 @@ declare const SERVER_NAME = "lurq";
|
|
|
100
169
|
* Keep in sync with package.json "name". */
|
|
101
170
|
declare const PACKAGE_NAME = "lurqrun";
|
|
102
171
|
/** Keep in sync with package.json "version". */
|
|
103
|
-
declare const VERSION = "0.0.
|
|
172
|
+
declare const VERSION = "0.0.2";
|
|
173
|
+
/** Default hosted endpoint the install wizard writes into agent configs. The
|
|
174
|
+
* marketing site is `lurq.run`; the MCP service lives on the `api.` subdomain.
|
|
175
|
+
* Overridable per-invocation with `lurq install --url …` or `LURQ_ENDPOINT`. */
|
|
176
|
+
declare const DEFAULT_ENDPOINT = "https://api.lurq.run/mcp";
|
|
177
|
+
/** Prefix for issued API keys (the rest is high-entropy random). */
|
|
178
|
+
declare const API_KEY_PREFIX = "lurq_live_";
|
|
104
179
|
/** Embedding vector dimensionality (OpenAI text-embedding-3-small). The local
|
|
105
180
|
* fallback embedder produces vectors of the same length so the DB column and
|
|
106
181
|
* pgvector index never need to change. */
|
|
@@ -130,6 +205,15 @@ declare const EnvSchema: z.ZodObject<{
|
|
|
130
205
|
SUMMARY_MODEL: z.ZodDefault<z.ZodString>;
|
|
131
206
|
LURQ_SYNC_CONCURRENCY: z.ZodDefault<z.ZodNumber>;
|
|
132
207
|
LOG_LEVEL: z.ZodDefault<z.ZodEnum<["error", "warn", "info", "debug"]>>;
|
|
208
|
+
PORT: z.ZodDefault<z.ZodNumber>;
|
|
209
|
+
/** Per-API-key rate limit: max requests per window. */
|
|
210
|
+
LURQ_RATE_LIMIT_MAX: z.ZodDefault<z.ZodNumber>;
|
|
211
|
+
/** Coarser per-IP rate limit (blunts unauthenticated floods before auth). */
|
|
212
|
+
LURQ_IP_RATE_LIMIT_MAX: z.ZodDefault<z.ZodNumber>;
|
|
213
|
+
/** Rate-limit window, milliseconds (applies to both limiters). */
|
|
214
|
+
LURQ_RATE_LIMIT_WINDOW_MS: z.ZodDefault<z.ZodNumber>;
|
|
215
|
+
LURQ_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
216
|
+
LURQ_API_KEY: z.ZodOptional<z.ZodString>;
|
|
133
217
|
}, "strip", z.ZodTypeAny, {
|
|
134
218
|
EMBEDDING_PROVIDER: "openai" | "local";
|
|
135
219
|
EMBEDDING_MODEL: string;
|
|
@@ -137,10 +221,16 @@ declare const EnvSchema: z.ZodObject<{
|
|
|
137
221
|
SUMMARY_MODEL: string;
|
|
138
222
|
LURQ_SYNC_CONCURRENCY: number;
|
|
139
223
|
LOG_LEVEL: "info" | "error" | "warn" | "debug";
|
|
224
|
+
PORT: number;
|
|
225
|
+
LURQ_RATE_LIMIT_MAX: number;
|
|
226
|
+
LURQ_IP_RATE_LIMIT_MAX: number;
|
|
227
|
+
LURQ_RATE_LIMIT_WINDOW_MS: number;
|
|
140
228
|
DATABASE_URL?: string | undefined;
|
|
141
229
|
GITHUB_TOKEN?: string | undefined;
|
|
142
230
|
EMBEDDING_API_KEY?: string | undefined;
|
|
143
231
|
SUMMARY_API_KEY?: string | undefined;
|
|
232
|
+
LURQ_ENDPOINT?: string | undefined;
|
|
233
|
+
LURQ_API_KEY?: string | undefined;
|
|
144
234
|
}, {
|
|
145
235
|
DATABASE_URL?: string | undefined;
|
|
146
236
|
GITHUB_TOKEN?: string | undefined;
|
|
@@ -152,6 +242,12 @@ declare const EnvSchema: z.ZodObject<{
|
|
|
152
242
|
SUMMARY_MODEL?: string | undefined;
|
|
153
243
|
LURQ_SYNC_CONCURRENCY?: number | undefined;
|
|
154
244
|
LOG_LEVEL?: "info" | "error" | "warn" | "debug" | undefined;
|
|
245
|
+
PORT?: number | undefined;
|
|
246
|
+
LURQ_RATE_LIMIT_MAX?: number | undefined;
|
|
247
|
+
LURQ_IP_RATE_LIMIT_MAX?: number | undefined;
|
|
248
|
+
LURQ_RATE_LIMIT_WINDOW_MS?: number | undefined;
|
|
249
|
+
LURQ_ENDPOINT?: string | undefined;
|
|
250
|
+
LURQ_API_KEY?: string | undefined;
|
|
155
251
|
}>;
|
|
156
252
|
type Config = z.infer<typeof EnvSchema>;
|
|
157
253
|
declare class ConfigError extends Error {
|
|
@@ -182,4 +278,4 @@ declare const logger: {
|
|
|
182
278
|
|
|
183
279
|
declare function buildProgram(): Command;
|
|
184
280
|
|
|
185
|
-
export { type Advisory, type AdvisorySeverity, CACHE_TTL, CATEGORIES, type Candidate, type Category, type Confidence, type Config, ConfigError, EMBEDDING_DIM, type EvaluateOutput, FRONTEND_CATEGORIES, PACKAGE_NAME, type Runtime, SERVER_NAME, STALENESS_DAYS, type ScoreBreakdown, type UsageGuide, VERSION, type VerifyOutput, buildProgram, getConfig, isCategory, isFrontendCategory, loadEnv, logger, requireConfig };
|
|
281
|
+
export { API_KEY_PREFIX, type Advisory, type AdvisorySeverity, type BuildVerified, CACHE_TTL, CATEGORIES, type Candidate, type Category, type CategorySource, type CompatConflict, type CompatOutput, type CompatStatus, type Confidence, type Config, ConfigError, DEFAULT_ENDPOINT, type DependencyRanges, type DiscoverySource, type DiscoveryStatus, EMBEDDING_DIM, type EvaluateOutput, FRONTEND_CATEGORIES, PACKAGE_NAME, type PeerMeta, type RiskLevel, type Runtime, SERVER_NAME, STALENESS_DAYS, type ScoreBreakdown, type UsageGuide, VERSION, type VerifyOutput, buildProgram, getConfig, isCategory, isFrontendCategory, loadEnv, logger, requireConfig };
|