lurqrun 0.0.2 → 0.0.4

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
@@ -33,6 +33,52 @@ declare function isFrontendCategory(category: Category | null | undefined): bool
33
33
  */
34
34
  type Confidence = 'proven' | 'emerging' | 'promising' | 'unproven';
35
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
+ /** Coarse post-install result an agent reports back via `report_outcome` — never
39
+ * source code, just whether the recommended package installed / compiled /
40
+ * passed tests, or failed. Feeds the recommendation→outcome flywheel (§3.1). */
41
+ type BuildSignal = 'installed' | 'compiled' | 'tests_passed' | 'failed';
42
+ /** Sandbox verdict surfaced to agents: did this version actually install + load? */
43
+ interface BuildVerified {
44
+ version: string;
45
+ installed: boolean;
46
+ loaded: boolean | null;
47
+ driver: string;
48
+ ranAt: string;
49
+ }
50
+ /** A map of dependency/peer/engine name → semver range (from a manifest). */
51
+ type DependencyRanges = Record<string, string>;
52
+ /** `peerDependenciesMeta`: per-peer flags, notably `{ optional: true }`. */
53
+ type PeerMeta = Record<string, {
54
+ optional?: boolean;
55
+ }>;
56
+ /** One incompatibility found across a set of packages. */
57
+ interface CompatConflict {
58
+ /** Where the conflict came from. `peer-deps`/`engines` are Tier-1 (metadata,
59
+ * instant, deterministic); `sandbox` is Tier-2 (empirical co-install). */
60
+ source: 'peer-deps' | 'engines' | 'sandbox';
61
+ /** The packages involved in the conflict. */
62
+ packages: string[];
63
+ detail: string;
64
+ }
65
+ /**
66
+ * `compat` output: whole-architecture compatibility for a set of packages.
67
+ * Tier-1 peer-dependency/engine analysis + any Tier-2 sandbox conflicts.
68
+ */
69
+ interface CompatOutput {
70
+ packages: string[];
71
+ overall: 'compatible' | 'conflict' | 'unknown';
72
+ conflicts: CompatConflict[];
73
+ /** Packages lurq has no compatibility metadata for (counted toward `unknown`). */
74
+ unverified: string[];
75
+ /** The exact members the check ran over, name + resolved version. Versions are
76
+ * always surfaced here, and the structure is stable for later scraping. */
77
+ checked: {
78
+ name: string;
79
+ version: string | null;
80
+ }[];
81
+ }
36
82
  type AdvisorySeverity = 'critical' | 'high' | 'moderate' | 'low' | 'info';
37
83
  interface Advisory {
38
84
  id: string;
@@ -91,7 +137,6 @@ interface EvaluateOutput {
91
137
  lastReleaseAt: string | null;
92
138
  weeklyDownloads: number | null;
93
139
  downloadGrowth90d: number | null;
94
- dependentsCount: number | null;
95
140
  scorecard: number | null;
96
141
  bundleMinGzipKb: number | null;
97
142
  deprecated: boolean;
@@ -100,8 +145,17 @@ interface EvaluateOutput {
100
145
  summary: string | null;
101
146
  usageGuide: UsageGuide | null;
102
147
  repoUrl: string | null;
148
+ /** If this package is superseded, the recommended migration target (§1.2). */
149
+ replacedBy?: {
150
+ name: string;
151
+ reason: string;
152
+ } | null;
153
+ /** Latest sandbox verdict for this package, if one has been run. */
154
+ buildVerified?: BuildVerified | null;
103
155
  }
104
156
  /** `verify` output (§12.3.4). */
157
+ /** Supply-chain risk gate: high = review before installing (see security/risk). */
158
+ type RiskLevel = 'low' | 'medium' | 'high';
105
159
  interface VerifyOutput {
106
160
  exists: boolean;
107
161
  tracked: boolean;
@@ -110,6 +164,10 @@ interface VerifyOutput {
110
164
  latestVersion: string | null;
111
165
  weeklyDownloads: number | null;
112
166
  riskFlags: string[];
167
+ /** Overall supply-chain risk, rolled up from riskFlags. */
168
+ risk: RiskLevel;
169
+ /** Suspected typosquat target — a popular package this name closely mimics. */
170
+ typosquatOf: string | null;
113
171
  confidence: Confidence | null;
114
172
  advisoryCount: number;
115
173
  }
@@ -120,7 +178,7 @@ declare const SERVER_NAME = "lurq";
120
178
  * Keep in sync with package.json "name". */
121
179
  declare const PACKAGE_NAME = "lurqrun";
122
180
  /** Keep in sync with package.json "version". */
123
- declare const VERSION = "0.0.2";
181
+ declare const VERSION = "0.0.4";
124
182
  /** Default hosted endpoint the install wizard writes into agent configs. The
125
183
  * marketing site is `lurq.run`; the MCP service lives on the `api.` subdomain.
126
184
  * Overridable per-invocation with `lurq install --url …` or `LURQ_ENDPOINT`. */
@@ -151,9 +209,11 @@ declare const EnvSchema: z.ZodObject<{
151
209
  EMBEDDING_PROVIDER: z.ZodDefault<z.ZodEnum<["openai", "local"]>>;
152
210
  EMBEDDING_API_KEY: z.ZodOptional<z.ZodString>;
153
211
  EMBEDDING_MODEL: z.ZodDefault<z.ZodString>;
212
+ EMBEDDING_BASE_URL: z.ZodDefault<z.ZodString>;
154
213
  SUMMARY_PROVIDER: z.ZodDefault<z.ZodEnum<["openai", "none"]>>;
155
214
  SUMMARY_API_KEY: z.ZodOptional<z.ZodString>;
156
215
  SUMMARY_MODEL: z.ZodDefault<z.ZodString>;
216
+ SUMMARY_BASE_URL: z.ZodDefault<z.ZodString>;
157
217
  LURQ_SYNC_CONCURRENCY: z.ZodDefault<z.ZodNumber>;
158
218
  LOG_LEVEL: z.ZodDefault<z.ZodEnum<["error", "warn", "info", "debug"]>>;
159
219
  PORT: z.ZodDefault<z.ZodNumber>;
@@ -163,13 +223,23 @@ declare const EnvSchema: z.ZodObject<{
163
223
  LURQ_IP_RATE_LIMIT_MAX: z.ZodDefault<z.ZodNumber>;
164
224
  /** Rate-limit window, milliseconds (applies to both limiters). */
165
225
  LURQ_RATE_LIMIT_WINDOW_MS: z.ZodDefault<z.ZodNumber>;
226
+ /** Bearer token guarding `/metrics`. Unset → the endpoint is disabled (404). */
227
+ LURQ_METRICS_TOKEN: z.ZodOptional<z.ZodString>;
228
+ /** Shared secret for self-serve key issuance (`POST /keys`). The Clerk-
229
+ * authenticated web app presents it to mint a key for a signed-in user. Unset
230
+ * → the endpoint is disabled (404). Keep it server-side, never in the client. */
231
+ LURQ_ISSUER_SECRET: z.ZodOptional<z.ZodString>;
166
232
  LURQ_ENDPOINT: z.ZodOptional<z.ZodString>;
167
233
  LURQ_API_KEY: z.ZodOptional<z.ZodString>;
234
+ E2B_API_KEY: z.ZodOptional<z.ZodString>;
235
+ E2B_TEMPLATE: z.ZodOptional<z.ZodString>;
168
236
  }, "strip", z.ZodTypeAny, {
169
237
  EMBEDDING_PROVIDER: "openai" | "local";
170
238
  EMBEDDING_MODEL: string;
239
+ EMBEDDING_BASE_URL: string;
171
240
  SUMMARY_PROVIDER: "openai" | "none";
172
241
  SUMMARY_MODEL: string;
242
+ SUMMARY_BASE_URL: string;
173
243
  LURQ_SYNC_CONCURRENCY: number;
174
244
  LOG_LEVEL: "info" | "error" | "warn" | "debug";
175
245
  PORT: number;
@@ -180,25 +250,35 @@ declare const EnvSchema: z.ZodObject<{
180
250
  GITHUB_TOKEN?: string | undefined;
181
251
  EMBEDDING_API_KEY?: string | undefined;
182
252
  SUMMARY_API_KEY?: string | undefined;
253
+ LURQ_METRICS_TOKEN?: string | undefined;
254
+ LURQ_ISSUER_SECRET?: string | undefined;
183
255
  LURQ_ENDPOINT?: string | undefined;
184
256
  LURQ_API_KEY?: string | undefined;
257
+ E2B_API_KEY?: string | undefined;
258
+ E2B_TEMPLATE?: string | undefined;
185
259
  }, {
186
260
  DATABASE_URL?: string | undefined;
187
261
  GITHUB_TOKEN?: string | undefined;
188
262
  EMBEDDING_PROVIDER?: "openai" | "local" | undefined;
189
263
  EMBEDDING_API_KEY?: string | undefined;
190
264
  EMBEDDING_MODEL?: string | undefined;
265
+ EMBEDDING_BASE_URL?: string | undefined;
191
266
  SUMMARY_PROVIDER?: "openai" | "none" | undefined;
192
267
  SUMMARY_API_KEY?: string | undefined;
193
268
  SUMMARY_MODEL?: string | undefined;
269
+ SUMMARY_BASE_URL?: string | undefined;
194
270
  LURQ_SYNC_CONCURRENCY?: number | undefined;
195
271
  LOG_LEVEL?: "info" | "error" | "warn" | "debug" | undefined;
196
272
  PORT?: number | undefined;
197
273
  LURQ_RATE_LIMIT_MAX?: number | undefined;
198
274
  LURQ_IP_RATE_LIMIT_MAX?: number | undefined;
199
275
  LURQ_RATE_LIMIT_WINDOW_MS?: number | undefined;
276
+ LURQ_METRICS_TOKEN?: string | undefined;
277
+ LURQ_ISSUER_SECRET?: string | undefined;
200
278
  LURQ_ENDPOINT?: string | undefined;
201
279
  LURQ_API_KEY?: string | undefined;
280
+ E2B_API_KEY?: string | undefined;
281
+ E2B_TEMPLATE?: string | undefined;
202
282
  }>;
203
283
  type Config = z.infer<typeof EnvSchema>;
204
284
  declare class ConfigError extends Error {
@@ -229,4 +309,4 @@ declare const logger: {
229
309
 
230
310
  declare function buildProgram(): Command;
231
311
 
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 };
312
+ export { API_KEY_PREFIX, type Advisory, type AdvisorySeverity, type BuildSignal, 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 };