lurqrun 0.0.1 → 0.0.2

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
@@ -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,8 +26,12 @@ 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
- /** Evidence-trustworthiness label, independent of the numeric score (§10). */
20
- type Confidence = 'proven' | 'emerging' | 'unproven';
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';
22
36
  type AdvisorySeverity = 'critical' | 'high' | 'moderate' | 'low' | 'info';
23
37
  interface Advisory {
@@ -26,12 +40,16 @@ interface Advisory {
26
40
  summary: string;
27
41
  }
28
42
  /** Sub-scores composing the health score (§10). `efficiency` is null when not
29
- * size-based (backend categories) — its weight is redistributed. */
43
+ * size-based (backend categories) — its weight is redistributed.
44
+ * `quality` (§1) is a standalone, adoption-independent axis — it does NOT feed
45
+ * the health composite; it blends with health only at ranking time. Null when
46
+ * no manifest signals were available. */
30
47
  interface ScoreBreakdown {
31
48
  maintenance: number;
32
49
  adoption: number;
33
50
  reliability: number;
34
51
  efficiency: number | null;
52
+ quality: number | null;
35
53
  }
36
54
  /**
37
55
  * Structured usage guide generated at ingest (product refinement: lurq explains,
@@ -51,6 +69,7 @@ interface Candidate {
51
69
  name: string;
52
70
  category: Category | null;
53
71
  healthScore: number;
72
+ qualityScore: number | null;
54
73
  confidence: Confidence;
55
74
  why: string;
56
75
  latestVersion: string | null;
@@ -65,6 +84,7 @@ interface EvaluateOutput {
65
84
  name: string;
66
85
  category: Category | null;
67
86
  healthScore: number;
87
+ qualityScore: number | null;
68
88
  confidence: Confidence;
69
89
  scoreBreakdown: ScoreBreakdown;
70
90
  latestVersion: string | null;
@@ -100,7 +120,13 @@ declare const SERVER_NAME = "lurq";
100
120
  * Keep in sync with package.json "name". */
101
121
  declare const PACKAGE_NAME = "lurqrun";
102
122
  /** Keep in sync with package.json "version". */
103
- declare const VERSION = "0.0.1";
123
+ declare const VERSION = "0.0.2";
124
+ /** Default hosted endpoint the install wizard writes into agent configs. The
125
+ * marketing site is `lurq.run`; the MCP service lives on the `api.` subdomain.
126
+ * Overridable per-invocation with `lurq install --url …` or `LURQ_ENDPOINT`. */
127
+ declare const DEFAULT_ENDPOINT = "https://api.lurq.run/mcp";
128
+ /** Prefix for issued API keys (the rest is high-entropy random). */
129
+ declare const API_KEY_PREFIX = "lurq_live_";
104
130
  /** Embedding vector dimensionality (OpenAI text-embedding-3-small). The local
105
131
  * fallback embedder produces vectors of the same length so the DB column and
106
132
  * pgvector index never need to change. */
@@ -130,6 +156,15 @@ declare const EnvSchema: z.ZodObject<{
130
156
  SUMMARY_MODEL: z.ZodDefault<z.ZodString>;
131
157
  LURQ_SYNC_CONCURRENCY: z.ZodDefault<z.ZodNumber>;
132
158
  LOG_LEVEL: z.ZodDefault<z.ZodEnum<["error", "warn", "info", "debug"]>>;
159
+ PORT: z.ZodDefault<z.ZodNumber>;
160
+ /** Per-API-key rate limit: max requests per window. */
161
+ LURQ_RATE_LIMIT_MAX: z.ZodDefault<z.ZodNumber>;
162
+ /** Coarser per-IP rate limit (blunts unauthenticated floods before auth). */
163
+ LURQ_IP_RATE_LIMIT_MAX: z.ZodDefault<z.ZodNumber>;
164
+ /** Rate-limit window, milliseconds (applies to both limiters). */
165
+ LURQ_RATE_LIMIT_WINDOW_MS: z.ZodDefault<z.ZodNumber>;
166
+ LURQ_ENDPOINT: z.ZodOptional<z.ZodString>;
167
+ LURQ_API_KEY: z.ZodOptional<z.ZodString>;
133
168
  }, "strip", z.ZodTypeAny, {
134
169
  EMBEDDING_PROVIDER: "openai" | "local";
135
170
  EMBEDDING_MODEL: string;
@@ -137,10 +172,16 @@ declare const EnvSchema: z.ZodObject<{
137
172
  SUMMARY_MODEL: string;
138
173
  LURQ_SYNC_CONCURRENCY: number;
139
174
  LOG_LEVEL: "info" | "error" | "warn" | "debug";
175
+ PORT: number;
176
+ LURQ_RATE_LIMIT_MAX: number;
177
+ LURQ_IP_RATE_LIMIT_MAX: number;
178
+ LURQ_RATE_LIMIT_WINDOW_MS: number;
140
179
  DATABASE_URL?: string | undefined;
141
180
  GITHUB_TOKEN?: string | undefined;
142
181
  EMBEDDING_API_KEY?: string | undefined;
143
182
  SUMMARY_API_KEY?: string | undefined;
183
+ LURQ_ENDPOINT?: string | undefined;
184
+ LURQ_API_KEY?: string | undefined;
144
185
  }, {
145
186
  DATABASE_URL?: string | undefined;
146
187
  GITHUB_TOKEN?: string | undefined;
@@ -152,6 +193,12 @@ declare const EnvSchema: z.ZodObject<{
152
193
  SUMMARY_MODEL?: string | undefined;
153
194
  LURQ_SYNC_CONCURRENCY?: number | undefined;
154
195
  LOG_LEVEL?: "info" | "error" | "warn" | "debug" | undefined;
196
+ PORT?: number | undefined;
197
+ LURQ_RATE_LIMIT_MAX?: number | undefined;
198
+ LURQ_IP_RATE_LIMIT_MAX?: number | undefined;
199
+ LURQ_RATE_LIMIT_WINDOW_MS?: number | undefined;
200
+ LURQ_ENDPOINT?: string | undefined;
201
+ LURQ_API_KEY?: string | undefined;
155
202
  }>;
156
203
  type Config = z.infer<typeof EnvSchema>;
157
204
  declare class ConfigError extends Error {
@@ -182,4 +229,4 @@ declare const logger: {
182
229
 
183
230
  declare function buildProgram(): Command;
184
231
 
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 };
232
+ export { API_KEY_PREFIX, type Advisory, type AdvisorySeverity, CACHE_TTL, CATEGORIES, type Candidate, type Category, type CategorySource, type Confidence, type Config, ConfigError, DEFAULT_ENDPOINT, type DiscoverySource, type DiscoveryStatus, 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 };