@sdxc/kit 2026.10.20 → 2026.10.23

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.
Files changed (138) hide show
  1. package/README.md +178 -93
  2. package/changelog.jsonl +97 -0
  3. package/config.schema.json +160 -0
  4. package/dist/architecture/complexity.d.ts +73 -0
  5. package/dist/architecture/complexity.js +185 -0
  6. package/dist/architecture/crap.d.ts +62 -0
  7. package/dist/architecture/crap.js +121 -0
  8. package/dist/architecture/graph.d.ts +55 -0
  9. package/dist/architecture/graph.js +194 -0
  10. package/dist/architecture/layers.d.ts +29 -0
  11. package/dist/architecture/layers.js +81 -0
  12. package/dist/architecture/mermaid.d.ts +20 -0
  13. package/dist/architecture/mermaid.js +51 -0
  14. package/dist/cli.js +9 -0
  15. package/dist/commands/create.js +4 -3
  16. package/dist/commands/deploy.js +10 -9
  17. package/dist/commands/destroy.d.ts +1 -1
  18. package/dist/commands/diagram.d.ts +17 -0
  19. package/dist/commands/diagram.js +45 -0
  20. package/dist/commands/fix.d.ts +69 -0
  21. package/dist/commands/fix.js +102 -0
  22. package/dist/commands/make.d.ts +77 -2
  23. package/dist/commands/make.js +53 -1
  24. package/dist/commands/run.d.ts +15 -11
  25. package/dist/commands/run.js +21 -16
  26. package/dist/commands/scaffold.d.ts +2 -1
  27. package/dist/commands/scaffold.js +1 -0
  28. package/dist/commands/setup.d.ts +26 -0
  29. package/dist/commands/setup.js +33 -0
  30. package/dist/config.d.ts +54 -0
  31. package/dist/config.js +92 -1
  32. package/dist/contract.d.ts +56 -3
  33. package/dist/contract.js +140 -7
  34. package/dist/dependencies.d.ts +2 -1
  35. package/dist/dependencies.js +11 -2
  36. package/dist/deploy/plan.d.ts +5 -0
  37. package/dist/deploy/plan.js +10 -0
  38. package/dist/destroy.d.ts +4 -4
  39. package/dist/destroy.js +24 -11
  40. package/dist/diagram.d.ts +32 -0
  41. package/dist/diagram.js +47 -0
  42. package/dist/doctor/checks.d.ts +2 -1
  43. package/dist/doctor/checks.js +26 -1
  44. package/dist/doctor/complexity.d.ts +13 -0
  45. package/dist/doctor/complexity.js +52 -0
  46. package/dist/doctor/crap.d.ts +14 -0
  47. package/dist/doctor/crap.js +67 -0
  48. package/dist/doctor/dependencies.d.ts +13 -0
  49. package/dist/doctor/dependencies.js +42 -0
  50. package/dist/doctor/duplication.d.ts +19 -0
  51. package/dist/doctor/duplication.js +106 -0
  52. package/dist/doctor/fan-out.d.ts +12 -0
  53. package/dist/doctor/fan-out.js +42 -0
  54. package/dist/doctor/feature-scatter.d.ts +15 -0
  55. package/dist/doctor/feature-scatter.js +84 -0
  56. package/dist/doctor/jsdoc.d.ts +44 -0
  57. package/dist/doctor/jsdoc.js +201 -0
  58. package/dist/doctor/module-size.d.ts +13 -0
  59. package/dist/doctor/module-size.js +50 -0
  60. package/dist/doctor/mutation.d.ts +20 -0
  61. package/dist/doctor/mutation.js +97 -0
  62. package/dist/doctor/orphans.d.ts +13 -0
  63. package/dist/doctor/orphans.js +50 -0
  64. package/dist/doctor/project.js +8 -5
  65. package/dist/doctor/result-throws.d.ts +17 -0
  66. package/dist/doctor/result-throws.js +72 -0
  67. package/dist/doctor/test-ratio.d.ts +12 -0
  68. package/dist/doctor/test-ratio.js +31 -0
  69. package/dist/fix/commands.d.ts +37 -0
  70. package/dist/fix/commands.js +63 -0
  71. package/dist/fix/emails.d.ts +21 -0
  72. package/dist/fix/emails.js +159 -0
  73. package/dist/fix/env.d.ts +29 -0
  74. package/dist/fix/env.js +58 -0
  75. package/dist/fix/index.d.ts +11 -0
  76. package/dist/fix/index.js +11 -0
  77. package/dist/fix/models.d.ts +20 -0
  78. package/dist/fix/models.js +95 -0
  79. package/dist/lock.js +12 -2
  80. package/dist/make/binding.d.ts +42 -0
  81. package/dist/make/binding.js +237 -0
  82. package/dist/make/generate.d.ts +11 -2
  83. package/dist/make/generate.js +47 -16
  84. package/dist/make/imports.js +7 -5
  85. package/dist/make/index.d.ts +4 -2
  86. package/dist/make/index.js +4 -1
  87. package/dist/make/kinds.d.ts +5 -0
  88. package/dist/make/kinds.js +14 -2
  89. package/dist/make/schema-diff.js +8 -1
  90. package/dist/make/stubs.d.ts +7 -2
  91. package/dist/make/stubs.js +8 -3
  92. package/dist/make/test.js +1 -0
  93. package/dist/models.js +7 -7
  94. package/dist/routes/modules.js +8 -5
  95. package/dist/routes/parse.js +8 -7
  96. package/dist/routes/routers.js +9 -5
  97. package/dist/scaffold/index.d.ts +2 -0
  98. package/dist/scaffold/index.js +13 -4
  99. package/dist/scaffold/render.d.ts +11 -1
  100. package/dist/scaffold/render.js +86 -1
  101. package/dist/setup/auth.d.ts +12 -0
  102. package/dist/setup/auth.js +209 -0
  103. package/dist/setup/billing.d.ts +11 -0
  104. package/dist/setup/billing.js +116 -0
  105. package/dist/setup/catalog.d.ts +25 -0
  106. package/dist/setup/catalog.js +34 -0
  107. package/dist/setup/credit.d.ts +13 -0
  108. package/dist/setup/credit.js +21 -0
  109. package/dist/setup/flags.d.ts +11 -0
  110. package/dist/setup/flags.js +62 -0
  111. package/dist/setup/index.d.ts +25 -0
  112. package/dist/setup/index.js +53 -0
  113. package/dist/setup/plan.d.ts +38 -0
  114. package/dist/setup/plan.js +62 -0
  115. package/dist/testing.js +3 -3
  116. package/dist/ui/layout.js +1 -1
  117. package/dist/ui/registry.d.ts +2 -2
  118. package/dist/upgrade/project.d.ts +2 -2
  119. package/dist/upgrade/prompt.js +7 -5
  120. package/package.json +10 -7
  121. package/registry/ui/attachment.json +2 -2
  122. package/registry/ui/sidebar.json +3 -3
  123. package/registry/ui/typeset.json +3 -3
  124. package/stubs/command.spec.stub +15 -0
  125. package/stubs/controller.api.spec.stub +15 -0
  126. package/stubs/controller.spec.stub +15 -0
  127. package/stubs/mcp.spec.stub +16 -0
  128. package/stubs/scaffold.migration.stub +2 -1
  129. package/stubs/scaffold.spec.stub +7 -0
  130. package/templates/app/AGENTS.md +21 -4
  131. package/templates/app/README.md +6 -3
  132. package/templates/app/app/commands/typegen.test.ts +20 -1
  133. package/templates/app/app/commands/typegen.ts +16 -2
  134. package/templates/app/app/initializers/cli.ts +7 -0
  135. package/templates/app/app/initializers/mail-transport.test.ts +8 -2
  136. package/templates/app/app/test/cloudflare-workers.ts +2 -0
  137. package/templates/app/package.json +1 -0
  138. package/templates/app/spec/config.jsonc +16 -0
package/changelog.jsonl CHANGED
@@ -19,6 +19,7 @@
19
19
  {"release":"2026.9.7","package":"@sdxc/auth","type":"feat","breaking":false,"title":"Take the classes off Remix, with the wiring under remix/","body":"The relying party, resource server, and session read a Request plus one\nAuthSession.Store seam a remix/session Session satisfies as it is, so the\nprotocol classes run under any router. What was rp.scheme and api.scheme\nbecomes rp.renew and api.verifyRequest, and the Remix wiring moves to\n@sdxc/auth/remix/{context,schemes,authorization}: contextOf(ctx) hands a\nroute's context to the three flow methods, sessionScheme and bearerScheme\nbuild the middleware schemes, and createAuthorization moves whole.\n\nValidation reads @remix-run/data-schema directly and remix becomes an\noptional peer dependency. Every consumer is on the adapters; the\nblog-engine call sites landed with the previous commit. ADR-048 records\nthe split."}
20
20
  {"release":"2026.9.7","package":"@sdxc/billing","type":"feat","breaking":false,"title":"Record webhook deliveries on the invocation's log","body":"The endpoint writes through @sdxc/logger's currentLog() instead of reading a duck-typed\ncontext.logger: the event type and whether it was handled become fields, a replay or an\nunreadable body warns, and a handler that threw fails the log while the delivery is\nstill acknowledged. The logger option and the WebhookLogger interface are gone (ADR-033)."}
21
21
  {"release":"2026.9.7","package":"@sdxc/feed","type":"feat","breaking":false,"title":"Add one feed API over RSS and Atom","body":"A reader is handed a URL by someone who neither knows nor cares which format is\nbehind it. This sniffs the root element, parses with the matching package, and\nnormalizes both into one shape, so a consumer never branches on format.\n\nIt depends on the two parsers rather than re-implementing either. `RSS.fromXML`\nis already the parse-from-an-already-parsed-document seam, so the XML is parsed\nonce and handed to whichever backend the sniff picked, and the RSS package needs\nno change at all.\n\nIt also owns the two capabilities that belong to fetching rather than to either\nformat, and so could live in neither. `fetch` sends stored validators as\npreconditions and reports a 304 through a union discriminated on `notModified`,\nso an unchanged feed costs no parse and no write — and it pointedly sets no cache\ndirective, since asking an origin for a fresh copy is exactly what would stop it\nanswering 304. `discover` follows a page's `<link rel=\"alternate\">` to the feed\nit advertises, resolving against any declared base, and answers from one request\nwhen the URL is already a feed.\n\nSniffing reads the root element, never `Content-Type`: feeds are served as\n`text/xml`, `application/octet-stream` and worse, so the header is not evidence.\nDiscovery accepts only the two syndication media types, because `text/xml` and\n`application/xml` appear on sitemaps and stylesheets.\n\nDates are normalized to `Date`, and an unparseable one reads as absent rather\nthan as an invalid date a consumer has to test for. Nothing is sanitized:\n`contentHtml` holds what the publisher wrote, and escaping it belongs to whatever\nrenders it.\n\nSee docs/adr/ADR-052-feed-facade-package.md"}
22
+ {"release":"2026.9.7","package":"@sdxc/iife","type":"chore","breaking":false,"title":"Drop the arrays and iife helpers","body":"Neither package was ever imported: no file in the repository's history has\ndepended on either, and the two full app rewrites reached for native syntax\nat every opportunity instead. Their exports lose to the expressions they\nwrap, so there is nothing to migrate."}
22
23
  {"release":"2026.9.7","package":"@sdxc/jobs","type":"feat","breaking":false,"title":"Record each cron trigger, queue batch, and job run as a wide event","body":"The dispatcher takes the worker's logger and opens a cron log per trigger (with\njobs.enqueued), a queue log per batch (with per-ending jobs.* counters), and a job log\nper message carrying job.name, job.id, job.attempts, job.batch_size, job.ending, and\nthe outcome the ending implies. Refused and dead-lettered messages are job logs too, so\none query over kind: job covers every delivery that did not end well. Handlers read the\njob's log as ctx.log; ctx.logger stays until every handler has moved (ADR-033)."}
23
24
  {"release":"2026.9.7","package":"@sdxc/jobs","type":"refactor","breaking":false,"title":"Drop the batched logger now every handler writes to ctx.log","body":"The job context carried a BatchedLogger alongside the log while handlers moved over.\nEvery handler in every app now writes fields and notes to ctx.log, so the shim, its\ninit.logger option, and the per-run flush go away."}
24
25
  {"release":"2026.9.7","package":"@sdxc/lazy-route","type":"feat","breaking":false,"title":"Defer a route's module until a request reaches it","body":"`lazy(() => import(\"./bookmarks\"))` maps a route without importing its\ncontroller, so a cold start loads only the modules the routes it actually\nserves need. The stand-in keeps the module's own type, so params, request\ncontext and route/module mismatches are still checked at the map call.\n\nWorks for both handler shapes, since the router picks between them from the\nmap target rather than the module: a single route reads `handler`, a route\nmap reads `actions`. The middleware an action or controller declares is\nassembled after the module loads and runs ahead of the handler, in the order\nthe router would have run it.\n\nValidating a controller's actions against its route map moves from startup\nto the first request to that route, since the actions are not there any\nearlier. See ADR-049."}
@@ -501,6 +502,7 @@
501
502
  {"release":"2026.10.2","package":"@sdxc/icalendar","type":"chore","breaking":false,"title":"Update Remix to 3.0.0","body":"Remix 3 is stable. Every workspace now pins `remix@3.0.0`, and\n`@remix-run/data-schema` moves to `^1.0.0`.\n\nThe component runtime moved from `remix/ui` to `remix/component`, along with\nits subpaths (`remix/component/server`, `remix/component/test`, the JSX\nruntimes), so every import and every `jsxImportSource` now points there.\n\nThe headless primitives (`anchor`, `combobox`, `listbox`, `tabs`) are no\nlonger part of `remix`. They ship in the standalone `@remix-run/ui` package,\npinned at 0.12.1, which `@sdxc/ui` and the sdxc app now depend on directly."}
502
503
  {"release":"2026.10.2","package":"@sdxc/icons","type":"chore","breaking":false,"title":"Update Remix to 3.0.0","body":"Remix 3 is stable. Every workspace now pins `remix@3.0.0`, and\n`@remix-run/data-schema` moves to `^1.0.0`.\n\nThe component runtime moved from `remix/ui` to `remix/component`, along with\nits subpaths (`remix/component/server`, `remix/component/test`, the JSX\nruntimes), so every import and every `jsxImportSource` now points there.\n\nThe headless primitives (`anchor`, `combobox`, `listbox`, `tabs`) are no\nlonger part of `remix`. They ship in the standalone `@remix-run/ui` package,\npinned at 0.12.1, which `@sdxc/ui` and the sdxc app now depend on directly."}
503
504
  {"release":"2026.10.2","package":"@sdxc/idempotency","type":"chore","breaking":false,"title":"Update Remix to 3.0.0","body":"Remix 3 is stable. Every workspace now pins `remix@3.0.0`, and\n`@remix-run/data-schema` moves to `^1.0.0`.\n\nThe component runtime moved from `remix/ui` to `remix/component`, along with\nits subpaths (`remix/component/server`, `remix/component/test`, the JSX\nruntimes), so every import and every `jsxImportSource` now points there.\n\nThe headless primitives (`anchor`, `combobox`, `listbox`, `tabs`) are no\nlonger part of `remix`. They ship in the standalone `@remix-run/ui` package,\npinned at 0.12.1, which `@sdxc/ui` and the sdxc app now depend on directly."}
505
+ {"release":"2026.10.2","package":"@sdxc/iife","type":"chore","breaking":false,"title":"Update Remix to 3.0.0","body":"Remix 3 is stable. Every workspace now pins `remix@3.0.0`, and\n`@remix-run/data-schema` moves to `^1.0.0`.\n\nThe component runtime moved from `remix/ui` to `remix/component`, along with\nits subpaths (`remix/component/server`, `remix/component/test`, the JSX\nruntimes), so every import and every `jsxImportSource` now points there.\n\nThe headless primitives (`anchor`, `combobox`, `listbox`, `tabs`) are no\nlonger part of `remix`. They ship in the standalone `@remix-run/ui` package,\npinned at 0.12.1, which `@sdxc/ui` and the sdxc app now depend on directly."}
504
506
  {"release":"2026.10.2","package":"@sdxc/ip","type":"chore","breaking":false,"title":"Update Remix to 3.0.0","body":"Remix 3 is stable. Every workspace now pins `remix@3.0.0`, and\n`@remix-run/data-schema` moves to `^1.0.0`.\n\nThe component runtime moved from `remix/ui` to `remix/component`, along with\nits subpaths (`remix/component/server`, `remix/component/test`, the JSX\nruntimes), so every import and every `jsxImportSource` now points there.\n\nThe headless primitives (`anchor`, `combobox`, `listbox`, `tabs`) are no\nlonger part of `remix`. They ship in the standalone `@remix-run/ui` package,\npinned at 0.12.1, which `@sdxc/ui` and the sdxc app now depend on directly."}
505
507
  {"release":"2026.10.2","package":"@sdxc/jobs","type":"docs","breaking":false,"title":"Enqueue examples carry a complete payload","body":"Both examples passed a partial payload for a job whose schema needs more\nfields, so copying one produced code that fails the type check the examples\nare there to advertise."}
506
508
  {"release":"2026.10.2","package":"@sdxc/jobs","type":"chore","breaking":false,"title":"Update Remix to 3.0.0","body":"Remix 3 is stable. Every workspace now pins `remix@3.0.0`, and\n`@remix-run/data-schema` moves to `^1.0.0`.\n\nThe component runtime moved from `remix/ui` to `remix/component`, along with\nits subpaths (`remix/component/server`, `remix/component/test`, the JSX\nruntimes), so every import and every `jsxImportSource` now points there.\n\nThe headless primitives (`anchor`, `combobox`, `listbox`, `tabs`) are no\nlonger part of `remix`. They ship in the standalone `@remix-run/ui` package,\npinned at 0.12.1, which `@sdxc/ui` and the sdxc app now depend on directly."}
@@ -1163,3 +1165,98 @@
1163
1165
  {"release":"2026.10.20","package":"@sdxc/mail","type":"fix","breaking":false,"title":"Trim a previews path's trailing slashes in time linear in its length","body":"Before: `previews(mail, { path })` trimmed trailing slashes from `path` with a regular expression\nthat backtracks, so a path holding a long run of `/` not at its end took seconds to set up the\nmiddleware (1.7s for 50,000 slashes). After: the slashes are removed by walking back from the\nend, so any path is handled in time linear in its length, and `/inbox///` still serves at\n`/inbox`. No action is needed."}
1164
1166
  {"release":"2026.10.20","package":"@sdxc/u","type":"fix","breaking":false,"title":"Read import.meta.env through optional chaining","body":"`when()` and the a11y debug helper read `import.meta.env.DEV` directly. A project's Vitest run\nleaves installed packages untransformed, where `import.meta.env` is undefined, so calling either\nfrom a test threw `TypeError: Cannot read properties of undefined (reading 'DEV')`. Both now read\n`import.meta.env?.DEV`: under a bundler they behave as before, and where nothing defines\n`import.meta.env` they run as production. Consumers need not change anything."}
1165
1167
  {"release":"2026.10.20","package":"@sdxc/ui","type":"fix","breaking":false,"title":"Render components in tests that leave @sdxc/ui untransformed","body":"Components and mixins checked `import.meta.env.DEV` for their dev-mode warnings. Vitest leaves\ninstalled packages untransformed, where `import.meta.env` is undefined, so a project's test\nrendering a `Button` (or any component with a dev warning) threw\n`TypeError: Cannot read properties of undefined (reading 'DEV')`. Every read is now\n`import.meta.env?.DEV`: apps built with Vite still warn in development, and where nothing defines\n`import.meta.env` the components render without the warnings. A project that added\n`test.server.deps.inline: [\"@sdxc/ui\"]` to work around it can remove that line."}
1168
+ {"release":"2026.10.21","package":"@sdxc/crypto","type":"feat","breaking":false,"title":"Add alphabet-based `randomString`","body":"`randomString({ length, alphabet })` draws a cryptographically strong string\nby rejection-sampling `crypto.getRandomValues` over a caller-chosen alphabet,\nso every index is equally likely.\n\nUse it when an existing format needs a custom character set (CSRF cookies,\nhoneypot field names). Prefer `randomToken` for new URL-safe secrets.\n\n```ts\nimport { randomString } from \"@sdxc/crypto\";\n\nlet csrf = randomString({\n length: 32,\n alphabet: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+\",\n});\n```\n\nDefault length is 32; default alphabet is A–Z a–z 0–9. Throws `RangeError` for\nan invalid length (not an integer in 0..65536) or an empty / oversize alphabet."}
1169
+ {"release":"2026.10.21","package":"@sdxc/kit","type":"fix","breaking":false,"title":"Type command handlers, mock the queue and clear stale typegen in new apps","body":"Three fixes to the app `sdxc create` writes, and one to `sdxc scaffold`:\n\n- `app/initializers/cli.ts` now declares the `CLITypes` augmentation, so a command handler in\n its own file reads `ctx.db`, `ctx.models`, `ctx.email` and `ctx.intl` with their types.\n Before, `ctx.models` failed to type check (TS2339) until the augmentation was added by hand.\n- `app/test/cloudflare-workers.ts` now mocks the `QUEUE` binding with `createQueue()` from\n `@sdxc/cloudflare-mocks`, so a test that enqueues a job or calls `ctx.email.queue()` runs\n and can read the queued messages from `env.QUEUE`. Before, such a test failed.\n- `sdxc run typegen` now stamps `.cloudflare/types/index.d.ts` with the current time after\n `cf workers types` succeeds. `cf` leaves an unchanged file alone, so after a config edit that\n adds no binding (a cron trigger from `sdxc make job --cron`, say) `sdxc doctor` kept warning\n that the types were stale; it now passes once typegen runs.\n- `sdxc scaffold` writes its migration header in the form `sdxc make model` and `sdxc make\n migration` use: `-- CreatePosts: creates the posts table.`, then a blank line.\n\nExisting apps can take the first three by hand: add to the end of `app/initializers/cli.ts`\n\n declare module \"@sdxc/cli\" {\n \tinterface CLITypes {\n \t\tcli: typeof cli;\n \t}\n }\n\nadd `QUEUE: createQueue()` to the `env` in `app/test/cloudflare-workers.ts`, and after the\n`cf workers types` call in `app/commands/typegen.ts` call\n`utimes(\".cloudflare/types/index.d.ts\", now, now)` from `node:fs/promises`. A project stub\nfor `scaffold.migration.stub` keeps its own header."}
1170
+ {"release":"2026.10.21","package":"@sdxc/kit","type":"feat","breaking":false,"title":"Enforce JSDoc shape in sdxc doctor","body":"`sdxc doctor` gains a `jsdoc` check that walks app source and warns when a\ncomment is not JSDoc, when a description runs past three prose lines, when\n`@description` appears, or when `@param` / `@returns` / `@throws` spill onto\na second line. Tooling directives stay allowed.\n\n```bash\nsdxc doctor --only jsdoc\n```\n\nA finding names the file and line; the fix is to rewrite the comment within\nthose limits. Tags other than the one-line set do not count toward the\ndescription budget."}
1171
+ {"release":"2026.10.21","package":"@sdxc/kit","type":"docs","breaking":false,"title":"Widen the command table for the JSDoc doctor line","body":"The `sdxc doctor` row now mentions JSDoc beside layout, which lengthens the\ncolumn; oxfmt reflows the whole commands table to match.\n\nNo consumer-facing behavior change."}
1172
+ {"release":"2026.10.21","package":"@sdxc/kit","type":"feat","breaking":false,"title":"Generate pairing .spec files for controllers, commands, MCP and scaffolds","body":"`sdxc make controller`, `command` and `mcp` now write a black-box `.spec` under\n`spec/` beside the Vitest test, and `sdxc scaffold` writes one feature suite for\nthe whole resource. Pages use `browser`, API routes use `http`, commands use\n`cli`, and MCP tools use `mcp`. Scaffold mixes whichever surfaces it wrote.\n\n```sh\nsdxc make controller about # also writes spec/about.spec\nsdxc make controller keys --routes api # http .spec\nsdxc make command users/grant # spec/commands/users/grant.spec\nsdxc make mcp get-post # spec/mcp/get-post.spec\nsdxc scaffold post title body --mcp # spec/posts.spec with browser + mcp\n```\n\n`make.specs` (default true) and `--spec` / `--no-spec` control it; `sdxc destroy`\nremoves the pairing file. Writing a `.spec` adds `@sdxc/spec` when missing. The\napp template ships `@sdxc/spec` and a starter `spec/config.jsonc`."}
1173
+ {"release":"2026.10.21","package":"@sdxc/spec","type":"feat","breaking":false,"title":"Add an mcp capability for Streamable HTTP tool calls","body":"Call a Streamable HTTP MCP server from a `.spec` without spelling JSON-RPC.\n`mcp.discover`, `mcp.list_tools` and `mcp.call` POST through `fetch` with the\nheaders and `_meta` the protocol requires, resolve targets through bases like\n`http`, and reuse `--allow-net`.\n\n```text\nuse mcp\n\nwhen {\n\tlet tools = mcp.list_tools \"/mcp\" on \"web\"\n\tlet result = mcp.call \"/mcp\" \"search_jobs\" { query: \"Remix\" } on \"web\"\n}\nthen {\n\texpect result.ok true\n\texpect result.is_error false\n\texpect result.text …\n}\n```\n\n`ok` is HTTP 2xx with no JSON-RPC error; a tool-level `isError` surfaces as\n`is_error` so the suite can assert it. `text` is the first text content block\nand `json` prefers `structuredContent`. The Workers entry exports the same\nfactory — MCP is fetch-only."}
1174
+ {"release":"2026.10.21","package":"@sdxc/spec","type":"feat","breaking":false,"title":"Collect Chrome DevTools Protocol traces from browser specs","body":"`.spec` files that `use browser` can record a Performance timeline, read\nChrome metrics, and send one-shot CDP commands:\n\n```\nuse browser\nuse fs\n\ntest \"checkout leaves a Performance trace\" {\n\tgiven {\n\t\tbrowser.trace.start\n\t\tbrowser.open \"/checkout\" on \"web\"\n\t}\n\twhen {\n\t\tbrowser.click button \"Pay\"\n\t\tlet trace = browser.trace.stop \"checkout.json\"\n\t}\n\tthen {\n\t\texpect trace.path \"checkout.json\"\n\t\texpect file \"checkout.json\" exists\n\t}\n}\n```\n\n`browser.trace.start` / `browser.trace.stop` write chrome://tracing JSON\ninto the test workspace and return `{ path, event_count }`.\n`browser.metrics` returns `Performance.getMetrics` as a name→number\nobject. `browser.cdp \"Domain.method\" [params]` is the escape hatch for\nany other one-shot CDP command.\n\nBoth the local `agent-browser` backend and the Cloudflare Browser Run\nbackend implement the same four tools (ADR-019)."}
1175
+ {"release":"2026.10.21","package":"@sdxc/spec","type":"feat","breaking":false,"title":"Store Performance traces through artifacts without a filesystem","body":"`browser.trace.stop` already writes chrome://tracing JSON into the test\nworkspace. Hosts that run specs without a filesystem — Cloudflare Workers\nwith `createNoFilesystemWorkspace` — had nowhere for that file to land.\n\nWhen `workspace.resolve` refuses the path and the run supplies\n`context.artifacts`, the tool now writes the JSON through the artifact\nstore and still returns `{ path, event_count }`. A missing store fails\nwith a clear error instead of a filesystem exception.\n\n```ts\nawait runTests({\n suite,\n createWorkspace: createNoFilesystemWorkspace,\n artifacts: {\n directory: \"flow-traces\",\n write: async (name, contents) => { /* upload or buffer */ return name; },\n },\n});\n```"}
1176
+ {"release":"2026.10.21","package":"@sdxc/spec","type":"refactor","breaking":false,"title":"Drop the ADR citation from the Browser Run module comment","body":"The module header already states that the binding is injected so this\npackage never owns the remote browser service. No API change."}
1177
+ {"release":"2026.10.21","package":"@sdxc/ui","type":"fix","breaking":false,"title":"Animate the Sidebar's collapse in both directions","body":"Before, collapsing a `Sidebar` with `collapsible=\"offcanvas\"` or `\"icon\"`\nleft it at full width: the collapse rules lost to the rail's own size, so\n`inline-size` and the slide-out transform never applied and nothing animated.\nNow the rail shrinks and slides out together when collapsing and back in when\nexpanding, using its existing 200ms transition.\n\nConsumers who worked around it, for example with a negative\n`margin-inline-start` on the collapsed rail, should remove that override, or\nthe rail will be offset twice."}
1178
+ {"release":"2026.10.21","package":"@sdxc/ui","type":"feat","breaking":false,"title":"Set long-form Typeset body copy at 18px and 20px","body":"`Typeset` used to set body copy at 16px for the `docs` preset (the default) and 18px for `reading`. `docs` is now `1.125rem` (18px on a 16px root) and `reading` is `1.25rem` (20px), so a documentation page or an article is large enough to read. `chat` stays at 15px.\n\nNo call-site change is required. Headings, code and tables still scale from `--ui-typeset-size`. To keep a 16px body, set that property on the host:\n\n```tsx\nimport { css } from \"remix/component\";\nimport { Typeset } from \"@sdxc/ui\";\n\n<Typeset mix={css({ \"--ui-typeset-size\": \"1rem\" })}>{article}</Typeset>\n```"}
1179
+ {"release":"2026.10.23","package":"@sdxc/billing","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1180
+ {"release":"2026.10.23","package":"@sdxc/billing","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1181
+ {"release":"2026.10.23","package":"@sdxc/cli","type":"fix","breaking":false,"title":"Satisfy Oxlint shape rules without API changes","body":"No consumer effect: parameter reassignment, nested ternaries, bare returns, Promise constructor names, and accumulating spreads are rewritten so `vp lint` passes under the new deny rules."}
1182
+ {"release":"2026.10.23","package":"@sdxc/cli","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1183
+ {"release":"2026.10.23","package":"@sdxc/cli","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1184
+ {"release":"2026.10.23","package":"@sdxc/cli","type":"fix","breaking":false,"title":"Print ExecError stderr on command failure","body":"A failed child kept its stderr on the error while the run only printed\nthe exit summary, so CI saw \"exited with 1\" without wrangler or cf's\nauthentication lines. Failure output now includes that stderr.\n\n```ts\n// before: stderr was only \"bunx wrangler … exited with 1\"\n// after: that line, then wrangler's Authentication error body\n```"}
1185
+ {"release":"2026.10.23","package":"@sdxc/codemod","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1186
+ {"release":"2026.10.23","package":"@sdxc/codemod","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1187
+ {"release":"2026.10.23","package":"@sdxc/cron","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1188
+ {"release":"2026.10.23","package":"@sdxc/crypto","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1189
+ {"release":"2026.10.23","package":"@sdxc/crypto","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1190
+ {"release":"2026.10.23","package":"@sdxc/data-model","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1191
+ {"release":"2026.10.23","package":"@sdxc/data-model","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1192
+ {"release":"2026.10.23","package":"@sdxc/diagram","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1193
+ {"release":"2026.10.23","package":"@sdxc/diagram","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1194
+ {"release":"2026.10.23","package":"@sdxc/epub","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1195
+ {"release":"2026.10.23","package":"@sdxc/epub","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1196
+ {"release":"2026.10.23","package":"@sdxc/feed","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1197
+ {"release":"2026.10.23","package":"@sdxc/feed","type":"fix","breaking":false,"title":"Restore author-list typing after nested-ternary rewrite","body":"Callers are unaffected. The nested-ternary rewrite left `source` untyped, so typecheck rejected the JSON Feed author fallback; the array is annotated as `JSONFeed.Author[]` again."}
1198
+ {"release":"2026.10.23","package":"@sdxc/feed","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1199
+ {"release":"2026.10.23","package":"@sdxc/flags","type":"fix","breaking":false,"title":"Satisfy Oxlint shape rules without API changes","body":"No consumer effect: parameter reassignment, nested ternaries, bare returns, Promise constructor names, and accumulating spreads are rewritten so `vp lint` passes under the new deny rules."}
1200
+ {"release":"2026.10.23","package":"@sdxc/flags","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1201
+ {"release":"2026.10.23","package":"@sdxc/flags","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1202
+ {"release":"2026.10.23","package":"@sdxc/html","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1203
+ {"release":"2026.10.23","package":"@sdxc/html","type":"fix","breaking":false,"title":"Type selected option list in embeddedValue","body":"Callers are unaffected. The nested-ternary rewrite left `chosen` as an implicit any[]; it is typed as the option NodeList result so `.map` typechecks."}
1204
+ {"release":"2026.10.23","package":"@sdxc/html","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1205
+ {"release":"2026.10.23","package":"@sdxc/iife","type":"feat","breaking":false,"title":"Restore the expression control-flow helper","body":"Import `{ iife }` from `@sdxc/iife` and wrap short statement-only branches\nthat compute one value: `let x = iife(() => { if (a) return b; return c; })`,\nor `await iife(async () => …)` when the callback is async. Prefer that over an\nouter mutable `let` filled by `if`/`else` when rewriting nested ternaries\n(ADR-171, ADR-172)."}
1206
+ {"release":"2026.10.23","package":"@sdxc/json-schema","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1207
+ {"release":"2026.10.23","package":"@sdxc/json-schema","type":"fix","breaking":false,"title":"Type nullable schema type list","body":"Callers are unaffected. The nested-ternary rewrite left `types` as an implicit any[]; it is annotated as `JSONSchema.TypeName[]` so `withNull` typechecks."}
1208
+ {"release":"2026.10.23","package":"@sdxc/json-schema","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1209
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"feat","breaking":false,"title":"Let sdxc run start a configurable entry module","body":"Projects set run.entry in .config/sdxc.jsonc (default bootstrap/cli.ts)\nso a non-app repo can point sdxc run at cli/index.ts without inventing\na bootstrap/ tree. sdxc deploy uses the same entry. Schema and README\nreference regenerated.\n\nConsumers: leave the default for apps; set \"run\": { \"entry\": \"cli/index.ts\" }\nin .config/sdxc.jsonc when the command line lives elsewhere."}
1210
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"feat","breaking":false,"title":"Add setup, fix, and binding generators with project author credit","body":"`sdxc setup` installs auth, billing and flags from a printed plan (`-y` writes);\n`sdxc fix` repairs commands, `.env.example` secrets, models and emails; `make\nsecret` / `make binding` / `make do` declare Worker bindings. Setup-written\nfiles close their module JSDoc with `@author` / `@copyright` from the project's\n`package.json` author or git `user.name`, the same path `make` stubs use.\n\n```\nsdxc setup auth -y\nsdxc fix env\nsdxc make binding kv CACHE\n```\n\nConsumers must act only to fill the secrets a plan names and map new routes."}
1211
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"fix","breaking":false,"title":"Sync README reference and help snapshot with new commands","body":"Adding setup, fix, and make secret/binding/do left the README command\nreference and the --help snapshot behind the contract. Regenerate with\n`bun run kit:reference` and list the new top-level commands in the help\ntest so CI matches what `createSDXC()` describes.\n\nNo consumer action; docs and test expectations only."}
1212
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"feat","breaking":false,"title":"Add architecture diagram and clean-code doctor checks","body":"`sdxc diagram` prints a Mermaid flowchart of app-layout layer imports\n(and optional SVG via `@sdxc/diagram` / `--json` for agents).\n\n`sdxc doctor` gains `complexity`, `module-size`, `dependencies` and\n`crap` checks — project-level metrics oxlint does not cover. Defaults\n(cyclomatic 4, module 200 lines, CRAP 12) live under\n`doctor.complexity` and are tuned for agent-written code.\n\n```bash\nsdxc diagram\nsdxc diagram --svg architecture.svg\nsdxc doctor --only complexity,dependencies,crap\n```\n\nConfigure thresholds in `.config/sdxc.jsonc` under `doctor.complexity`."}
1213
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"fix","breaking":false,"title":"Give each doctor check its own config group","body":"Split the shared `doctor.complexity` object so `complexity`,\n`module-size` and `crap` each read a sibling group\n(`doctor.complexity`, `doctor.moduleSize`, `doctor.crap`), matching\n`doctor.migrations`. There is no shared clean-code config bucket.\n\n```jsonc\n{\n \"doctor\": {\n \"complexity\": { \"max\": 4 },\n \"moduleSize\": { \"maxLines\": 200 },\n \"crap\": { \"max\": 12, \"coverage\": \"coverage/coverage-final.json\" }\n }\n}\n```"}
1214
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"fix","breaking":false,"title":"Satisfy Oxlint shape rules without API changes","body":"No consumer effect: parameter reassignment, nested ternaries, bare returns, Promise constructor names, and accumulating spreads are rewritten so `vp lint` passes under the new deny rules."}
1215
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1216
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"fix","breaking":false,"title":"Flatten doctor positive-integer schema nesting","body":"Callers are unaffected. `unicorn/max-nested-calls` rejected `s.integer().pipe(checks.min(1))` inside the doctor complexity, module-size and CRAP leaves; those leaves share a module-level `POSITIVE_INTEGER` schema instead."}
1217
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1218
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"feat","breaking":false,"title":"Add fan-out, orphans, duplication and related doctor checks","body":"`sdxc doctor` now warns on fan-out, orphan modules, feature-folder\nscatter, duplicated blocks, bare `throw`, low test/code ratio, and\nsurviving mutants (skip without a report). Each threshold lives under\nits own `doctor.*` group (`testRatio`, `fanOut`, `duplication`,\n`mutation`). ADR-173."}
1219
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"docs","breaking":false,"title":"Drop ADR citation from feature-scatter module comment","body":"Comments state the contract on their own terms; ADR numbers belong under\ndocs/adr/, not in JSDoc."}
1220
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"fix","breaking":false,"title":"Format doctor config leaves under nested-call ceiling","body":"Rebase left packages/kit/src/config.ts unformatted, which failed CI\nbun check. Extract NON_NEGATIVE_INTEGER, INTEGER_AT_LEAST_TWO and\nNON_NEGATIVE_NUMBER beside POSITIVE_INTEGER so the new doctor leaves\nstay under unicorn/max-nested-calls after formatting."}
1221
+ {"release":"2026.10.23","package":"@sdxc/kit","type":"fix","breaking":false,"title":"Surface migrate child stderr when deploy listing fails","body":"`sdxc deploy` wrapped a failed `db migrate --remote --pending` with only\nthe ExecError message, dropping the child's stderr. The failure now\nincludes that detail so a missing D1 permission shows wrangler/cf's\nreason in the deploy log.\n\nBefore: Listing pending migrations … exited with 1\nAfter: the same line plus the child's Authentication error (or similar)\nstderr. No consumer action required beyond reading the clearer log."}
1222
+ {"release":"2026.10.23","package":"@sdxc/mail","type":"fix","breaking":false,"title":"Satisfy Oxlint shape rules without API changes","body":"No consumer effect: parameter reassignment, nested ternaries, bare returns, Promise constructor names, and accumulating spreads are rewritten so `vp lint` passes under the new deny rules."}
1223
+ {"release":"2026.10.23","package":"@sdxc/mail","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1224
+ {"release":"2026.10.23","package":"@sdxc/mail","type":"fix","breaking":false,"title":"Narrow failed-preview subject for empty-state title","body":"Callers are unaffected. Assigning `selected.subject` into a `string` empty-state title after the nested-ternary rewrite needed a `?? \"\"` fallback when the subject is missing."}
1225
+ {"release":"2026.10.23","package":"@sdxc/mail","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1226
+ {"release":"2026.10.23","package":"@sdxc/markdown","type":"fix","breaking":false,"title":"Satisfy Oxlint shape rules without API changes","body":"No consumer effect: parameter reassignment, nested ternaries, bare returns, Promise constructor names, and accumulating spreads are rewritten so `vp lint` passes under the new deny rules."}
1227
+ {"release":"2026.10.23","package":"@sdxc/markdown","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1228
+ {"release":"2026.10.23","package":"@sdxc/markdown","type":"fix","breaking":false,"title":"Type emphasis nodes before insertAfter","body":"Callers are unaffected. The nested-ternary rewrite widened the emphasis local so `insertAfter` rejected it; the local is typed as Emphasis | Strong | Strikethrough again."}
1229
+ {"release":"2026.10.23","package":"@sdxc/markdown","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1230
+ {"release":"2026.10.23","package":"@sdxc/math","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1231
+ {"release":"2026.10.23","package":"@sdxc/math","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1232
+ {"release":"2026.10.23","package":"@sdxc/messageformat","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1233
+ {"release":"2026.10.23","package":"@sdxc/messageformat","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1234
+ {"release":"2026.10.23","package":"@sdxc/messaging","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1235
+ {"release":"2026.10.23","package":"@sdxc/messaging","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1236
+ {"release":"2026.10.23","package":"@sdxc/microformats","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1237
+ {"release":"2026.10.23","package":"@sdxc/microformats","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1238
+ {"release":"2026.10.23","package":"@sdxc/newsletter","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1239
+ {"release":"2026.10.23","package":"@sdxc/newsletter","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1240
+ {"release":"2026.10.23","package":"@sdxc/openapi","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1241
+ {"release":"2026.10.23","package":"@sdxc/openapi","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1242
+ {"release":"2026.10.23","package":"@sdxc/opml","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1243
+ {"release":"2026.10.23","package":"@sdxc/png","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1244
+ {"release":"2026.10.23","package":"@sdxc/png","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1245
+ {"release":"2026.10.23","package":"@sdxc/qr","type":"fix","breaking":false,"title":"Satisfy Oxlint shape rules without API changes","body":"No consumer effect: parameter reassignment, nested ternaries, bare returns, Promise constructor names, and accumulating spreads are rewritten so `vp lint` passes under the new deny rules."}
1246
+ {"release":"2026.10.23","package":"@sdxc/qr","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1247
+ {"release":"2026.10.23","package":"@sdxc/qr","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1248
+ {"release":"2026.10.23","package":"@sdxc/raster","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1249
+ {"release":"2026.10.23","package":"@sdxc/raster","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1250
+ {"release":"2026.10.23","package":"@sdxc/sample","type":"fix","breaking":false,"title":"Satisfy Oxlint shape rules without API changes","body":"No consumer effect: parameter reassignment, nested ternaries, bare returns, Promise constructor names, and accumulating spreads are rewritten so `vp lint` passes under the new deny rules."}
1251
+ {"release":"2026.10.23","package":"@sdxc/scim","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1252
+ {"release":"2026.10.23","package":"@sdxc/scim","type":"fix","breaking":false,"title":"Type multi-valued patch incoming values","body":"Callers are unaffected. The nested-ternary rewrite left `incoming` as an implicit any[]; it is annotated as `unknown[]` so filter and iteration typecheck."}
1253
+ {"release":"2026.10.23","package":"@sdxc/scim","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1254
+ {"release":"2026.10.23","package":"@sdxc/spec","type":"fix","breaking":false,"title":"Satisfy Oxlint shape rules without API changes","body":"No consumer effect: parameter reassignment, nested ternaries, bare returns, Promise constructor names, and accumulating spreads are rewritten so `vp lint` passes under the new deny rules."}
1255
+ {"release":"2026.10.23","package":"@sdxc/spec","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1256
+ {"release":"2026.10.23","package":"@sdxc/spec","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1257
+ {"release":"2026.10.23","package":"@sdxc/u","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1258
+ {"release":"2026.10.23","package":"@sdxc/u","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
1259
+ {"release":"2026.10.23","package":"@sdxc/ui","type":"fix","breaking":false,"title":"Satisfy Oxlint shape rules without API changes","body":"No consumer effect: parameter reassignment, nested ternaries, bare returns, Promise constructor names, and accumulating spreads are rewritten so `vp lint` passes under the new deny rules."}
1260
+ {"release":"2026.10.23","package":"@sdxc/ui","type":"fix","breaking":false,"title":"Rewrite nested ternaries for eslint/no-nested-ternary","body":"No consumer effect: nested `? :` chains are rewritten to `if`/`else` or named locals so `eslint/no-nested-ternary` can stay denied without suppressions."}
1261
+ {"release":"2026.10.23","package":"@sdxc/ui","type":"fix","breaking":false,"title":"Narrow Attachment.Trigger inferred role","body":"Callers are unaffected. The nested-ternary rewrite left `inferredRole` as string | undefined; it is typed as \"link\" | \"button\" | undefined so the trigger `role` prop typechecks."}
1262
+ {"release":"2026.10.23","package":"@sdxc/ui","type":"refactor","breaking":false,"title":"Prefer iife for expression-shaped branches","body":"Call sites that used an outer `let` filled by `if`/`else` after the nested-ternary\nrewrite now use `iife` so the binding stays an expression. Consumers take\n`@sdxc/iife` as a workspace dependency; runtime behavior is unchanged."}
@@ -54,6 +54,11 @@
54
54
  "default": true,
55
55
  "description": "Write a test beside every generated file except migrations and factories"
56
56
  },
57
+ "specs": {
58
+ "type": "boolean",
59
+ "default": true,
60
+ "description": "Write a pairing .spec under spec/ for controllers, commands, MCP tools and scaffolds"
61
+ },
57
62
  "stubs": {
58
63
  "type": "string",
59
64
  "default": ".config/sdxc/stubs",
@@ -67,6 +72,7 @@
67
72
  "default": "database/migrations"
68
73
  },
69
74
  "tests": true,
75
+ "specs": true,
70
76
  "stubs": ".config/sdxc/stubs"
71
77
  }
72
78
  },
@@ -106,6 +112,123 @@
106
112
  "default": {
107
113
  "accept": []
108
114
  }
115
+ },
116
+ "complexity": {
117
+ "type": "object",
118
+ "properties": {
119
+ "max": {
120
+ "type": "integer",
121
+ "minimum": 1,
122
+ "default": 4,
123
+ "description": "Maximum cyclomatic complexity per function; the complexity check warns above it"
124
+ }
125
+ },
126
+ "additionalProperties": false,
127
+ "default": {
128
+ "max": 4
129
+ }
130
+ },
131
+ "moduleSize": {
132
+ "type": "object",
133
+ "properties": {
134
+ "maxLines": {
135
+ "type": "integer",
136
+ "minimum": 1,
137
+ "default": 200,
138
+ "description": "Maximum code lines per module; the module-size check warns above it"
139
+ }
140
+ },
141
+ "additionalProperties": false,
142
+ "default": {
143
+ "maxLines": 200
144
+ }
145
+ },
146
+ "crap": {
147
+ "type": "object",
148
+ "properties": {
149
+ "max": {
150
+ "type": "integer",
151
+ "minimum": 1,
152
+ "default": 12,
153
+ "description": "Maximum CRAP score per function; the crap check warns above it"
154
+ },
155
+ "coverage": {
156
+ "type": "string",
157
+ "default": "coverage/coverage-final.json",
158
+ "description": "Istanbul coverage-final.json the crap check reads, relative to the project root"
159
+ }
160
+ },
161
+ "additionalProperties": false,
162
+ "default": {
163
+ "max": 12,
164
+ "coverage": "coverage/coverage-final.json"
165
+ }
166
+ },
167
+ "testRatio": {
168
+ "type": "object",
169
+ "properties": {
170
+ "min": {
171
+ "type": "number",
172
+ "minimum": 0,
173
+ "default": 0.3,
174
+ "description": "Minimum tests/code ratio from sdxc stats; the test-ratio check warns below it"
175
+ }
176
+ },
177
+ "additionalProperties": false,
178
+ "default": {
179
+ "min": 0.3
180
+ }
181
+ },
182
+ "fanOut": {
183
+ "type": "object",
184
+ "properties": {
185
+ "max": {
186
+ "type": "integer",
187
+ "minimum": 1,
188
+ "default": 15,
189
+ "description": "Maximum distinct modules one file may import; the fan-out check warns above it"
190
+ }
191
+ },
192
+ "additionalProperties": false,
193
+ "default": {
194
+ "max": 15
195
+ }
196
+ },
197
+ "duplication": {
198
+ "type": "object",
199
+ "properties": {
200
+ "minLines": {
201
+ "type": "integer",
202
+ "minimum": 2,
203
+ "default": 8,
204
+ "description": "Minimum consecutive code lines that count as a duplicated block"
205
+ }
206
+ },
207
+ "additionalProperties": false,
208
+ "default": {
209
+ "minLines": 8
210
+ }
211
+ },
212
+ "mutation": {
213
+ "type": "object",
214
+ "properties": {
215
+ "report": {
216
+ "type": "string",
217
+ "default": "reports/mutation/mutation.json",
218
+ "description": "Mutation report JSON the mutation check reads, relative to the project root"
219
+ },
220
+ "maxSurvived": {
221
+ "type": "integer",
222
+ "minimum": 0,
223
+ "default": 0,
224
+ "description": "Maximum surviving mutants the mutation check allows"
225
+ }
226
+ },
227
+ "additionalProperties": false,
228
+ "default": {
229
+ "report": "reports/mutation/mutation.json",
230
+ "maxSurvived": 0
231
+ }
109
232
  }
110
233
  },
111
234
  "additionalProperties": false,
@@ -113,9 +236,46 @@
113
236
  "checks": ".config/sdxc/checks",
114
237
  "migrations": {
115
238
  "accept": []
239
+ },
240
+ "complexity": {
241
+ "max": 4
242
+ },
243
+ "moduleSize": {
244
+ "maxLines": 200
245
+ },
246
+ "crap": {
247
+ "max": 12,
248
+ "coverage": "coverage/coverage-final.json"
249
+ },
250
+ "testRatio": {
251
+ "min": 0.3
252
+ },
253
+ "fanOut": {
254
+ "max": 15
255
+ },
256
+ "duplication": {
257
+ "minLines": 8
258
+ },
259
+ "mutation": {
260
+ "report": "reports/mutation/mutation.json",
261
+ "maxSurvived": 0
116
262
  }
117
263
  }
118
264
  },
265
+ "run": {
266
+ "type": "object",
267
+ "properties": {
268
+ "entry": {
269
+ "type": "string",
270
+ "default": "bootstrap/cli.ts",
271
+ "description": "Module `sdxc run` starts, relative to the project root; apps keep the default"
272
+ }
273
+ },
274
+ "additionalProperties": false,
275
+ "default": {
276
+ "entry": "bootstrap/cli.ts"
277
+ }
278
+ },
119
279
  "format": {
120
280
  "type": "array",
121
281
  "items": {
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Cyclomatic complexity per function, from an oxc AST walk: each decision point adds one to a
3
+ * base of one, so a straight-line function scores 1 and an `if` raises it to 2. Doctor and CRAP
4
+ * both read this so the same function never gets two answers.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ /** One function (or method) and the cyclomatic complexity of its body. */
10
+ export interface FunctionComplexity {
11
+ /** Human-readable name: `name`, `Class.method`, or `(anonymous)`. */
12
+ name: string;
13
+ /** 1-based line the function starts on. */
14
+ line: number;
15
+ /** McCabe cyclomatic complexity of the function body. */
16
+ complexity: number;
17
+ }
18
+ /** A node the walker recognises as holding a nested AST. */
19
+ interface AstNode {
20
+ type: string;
21
+ start?: number;
22
+ end?: number;
23
+ name?: string;
24
+ key?: AstNode | null;
25
+ id?: AstNode | null;
26
+ value?: AstNode | null;
27
+ body?: AstNode | AstNode[] | null;
28
+ params?: AstNode[];
29
+ operator?: string;
30
+ test?: AstNode | null;
31
+ consequent?: AstNode | null;
32
+ alternate?: AstNode | null;
33
+ expression?: AstNode | null;
34
+ callee?: AstNode | null;
35
+ object?: AstNode | null;
36
+ property?: AstNode | null;
37
+ left?: AstNode | null;
38
+ right?: AstNode | null;
39
+ argument?: AstNode | null;
40
+ arguments?: AstNode[];
41
+ elements?: Array<AstNode | null>;
42
+ properties?: AstNode[];
43
+ declarations?: AstNode[];
44
+ init?: AstNode | null;
45
+ update?: AstNode | null;
46
+ discriminant?: AstNode | null;
47
+ cases?: AstNode[];
48
+ block?: AstNode | null;
49
+ handler?: AstNode | null;
50
+ finalizer?: AstNode | null;
51
+ superClass?: AstNode | null;
52
+ declaration?: AstNode | null;
53
+ specifiers?: AstNode[];
54
+ source?: AstNode | null;
55
+ kind?: string;
56
+ static?: boolean;
57
+ computed?: boolean;
58
+ [key: string]: unknown;
59
+ }
60
+ /**
61
+ * Every function in `source` with its cyclomatic complexity. A file oxc cannot parse yields an
62
+ * empty list so the type checker, not doctor, names the syntax error.
63
+ *
64
+ * @param filename - Path reported for language detection (`.ts` / `.tsx`).
65
+ * @param source - Module text.
66
+ */
67
+ export declare function measureComplexity(filename: string, source: string): FunctionComplexity[];
68
+ /**
69
+ * McCabe complexity of `node`'s own body: nested functions contribute their entry edge only
70
+ * through separate records, not through this count.
71
+ */
72
+ export declare function complexityOf(node: AstNode): number;
73
+ export {};