rebilder 0.2.1 → 0.4.0

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
@@ -87,11 +87,13 @@ interface CliRuntime {
87
87
  }
88
88
  /**
89
89
  * The §3.3 request set is 5 requests for a cold URL (robots.txt, agent, browser,
90
- * /llms.txt, /.well-known/ucp) and the probe does not cache across calls, so a
91
- * multi-URL run needs a budget proportional to the URL count. `createLimiter`'s
92
- * default of 20 is a floor chosen for a single-shot caller; raising it is
93
- * supposed to be a decision someone made on purpose, and this is that decision,
94
- * written down: six per URL (five plus the robots retry) and four of slack.
90
+ * /llms.txt, /.well-known/ucp), plus one more since ARS 0.3 when the page links
91
+ * a Markdown copy instead of sending one. The probe does not cache across calls,
92
+ * so a multi-URL run needs a budget proportional to the URL count.
93
+ * `createLimiter`'s default of 20 is a floor chosen for a single-shot caller;
94
+ * raising it is supposed to be a decision someone made on purpose, and this is
95
+ * that decision, written down: seven per URL (six plus the robots retry) and
96
+ * four of slack.
95
97
  */
96
98
  declare function budgetFor(urlCount: number): number;
97
99
  /**
@@ -127,7 +129,7 @@ declare function createNodeRuntime(): CliRuntime;
127
129
  */
128
130
 
129
131
  /** Kept in step with package.json by a test, so a stale constant cannot ship. */
130
- declare const CLI_VERSION = "0.2.1";
132
+ declare const CLI_VERSION = "0.4.0";
131
133
  declare function runCli(argv: readonly string[], runtime: CliRuntime): Promise<ExitCode>;
132
134
 
133
135
  /**
@@ -366,7 +368,7 @@ declare function detectCapabilities(environment: TermEnvironment): TermCapabilit
366
368
  * format/shared.ts — the small vocabulary every formatter needs, in one place so
367
369
  * the four of them cannot drift.
368
370
  *
369
- * THE RULE THIS FILE EXISTS TO MAKE MECHANICAL (CLAUDE.md Hard Rule 10): a
371
+ * THE RULE THIS FILE EXISTS TO MAKE MECHANICAL (scorer determinism): a
370
372
  * heuristic value never renders without its label. Not "usually", not "in the
371
373
  * detailed view" — never. So `basisLabel()` is the only way any formatter gets
372
374
  * the word, `approxTokens()` is the only way any formatter prints a token count
@@ -411,24 +413,10 @@ declare function render(payload: Payload, format: Format, caps: TermCapabilities
411
413
  declare function helpText(topic: CommandName | null): string;
412
414
 
413
415
  /**
414
- * disclosure.ts — the texts that are not ours to edit for tone.
415
- *
416
- * THE NOTICE prints on every result, in every format, including `--format json`
417
- * and `--format junit`. It is two lines because a one-line version gets read as
418
- * a tagline; ARS measures the shape of a response and nothing else, and a number
419
- * that travels without that sentence is a number people will read as a quality
420
- * score for the business. (Design §3.6.)
421
- *
422
- * The conflict-of-interest paragraph that used to print in `--help` was removed
423
- * everywhere (owner decision, Aug 2026), along with spec §0.1 and the "MUST be
424
- * printed" clause that required it here. The measurement notice above is
425
- * unaffected: spec §0 still binds every surface that shows a grade.
426
- *
427
- * They are exported as constants and asserted by tests. They are not template
428
- * strings and they take no parameters: a disclosure whose text varies by context
429
- * is a disclosure someone will tune.
416
+ * Shared measurement context for CLI reports. The current formatters include
417
+ * these lines; other interfaces can explain the scope through concise labels
418
+ * and linked methodology (ARS §0). Wording can evolve with the product.
430
419
  */
431
- /** Design §3.6. Prints on every result, every format. */
432
420
  declare const ARS_NOTICE_LINES: readonly string[];
433
421
  declare const ARS_NOTICE: string;
434
422
  /**
@@ -455,15 +443,24 @@ declare const TELEMETRY_LINES: readonly string[];
455
443
  * thirty-second fix and a wrong guess with no reason is a bug report. `--framework`
456
444
  * overrides it.
457
445
  *
446
+ * DETECTION ORDER: framework before runtime. A Hono app deployed with wrangler
447
+ * wants Hono middleware, not a Worker that replaces the app, and a SvelteKit site
448
+ * on Netlify wants the SvelteKit hook. So framework marker files come first, then
449
+ * framework dependencies, then runtime markers (wrangler, Netlify, Vercel, Deno,
450
+ * Bun). With no marker at all, the scaffold is the framework-neutral fetch
451
+ * middleware, which any `(request, next)` host can mount.
452
+ *
458
453
  * THE SCAFFOLD IS A SKELETON WITH A `TODO`, NOT A WORKING CONFIG, and it says so
459
454
  * in a comment inside the generated file. `GatewaySources` resolvers read the
460
455
  * merchant's source of truth; we cannot know what that is, and a scaffold that
461
456
  * looked complete would be a scaffold someone shipped. This is the same rule the
462
457
  * variant architecture runs on: substantive values come from source-of-truth
463
- * fields, never from something we generated (CLAUDE.md Hard Rule 2).
458
+ * fields, never from something we generated (source validation).
459
+ *
460
+ * The mounting snippets mirror the recipes at rebilder.com/docs/adapters/*.
464
461
  */
465
462
 
466
- declare const FRAMEWORKS: readonly ["next", "node", "edge", "shopify"];
463
+ declare const FRAMEWORKS: readonly ["next", "node", "edge", "shopify", "fetch", "sveltekit", "nuxt", "astro", "react-router", "remix", "hono", "bun", "deno", "netlify", "vercel"];
467
464
  type Framework = (typeof FRAMEWORKS)[number];
468
465
  interface Detection {
469
466
  framework: Framework;