@ai.all/ds 0.1.0-beta.0 → 0.1.0-beta.1

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/ALL.md CHANGED
@@ -27,3 +27,6 @@
27
27
  - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md): package modules and data flow.
28
28
  - [docs/STATIC-SITES.md](docs/STATIC-SITES.md): static generation and post-processing.
29
29
  - [docs/CRITICAL-CSS.md](docs/CRITICAL-CSS.md): supported CSS inlining modes and limits.
30
+ - [docs/CONFIG.md](docs/CONFIG.md): every config key, defaults and errors.
31
+ - [docs/INTEGRATION.md](docs/INTEGRATION.md): DS7, UI, Nuxt module options and the Node API.
32
+ - [docs/DELIVERY.md](docs/DELIVERY.md): serving pre-compressed files.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to DS are recorded here. Format: [Keep a Changelog](https://
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.1.0-beta.1] - 2026-12-03
8
+
9
+ ### Added
10
+ - `docs/CONFIG.md`: every config key with type and default, what HTML minification changes, common errors.
11
+ - `docs/INTEGRATION.md`: use from DS7, UI and Nuxt sites, Nuxt module options, Node API signatures and return values.
12
+ - `docs/DELIVERY.md`: serving the `.br` and `.gz` sidecars with nginx, Caddy and CDNs.
13
+
14
+ ### Changed
15
+ - Docs list 0.1.0-beta.0 as published on npm `next`.
16
+
7
17
  ## [0.1.0-beta.0] - 2026-12-03
8
18
 
9
19
  ### Added
package/README.md CHANGED
@@ -23,6 +23,9 @@ npx ds init
23
23
  | If you need to | Start with |
24
24
  | ---------------------------------------------- | --------------------------------------------------- |
25
25
  | Configure and use the CLI | [Quick start](#quick-start) · [Commands](#commands) |
26
+ | Look up every config key and error | [Configuration](docs/CONFIG.md) |
27
+ | Use DS from DS7, UI or a Nuxt site | [Integration and Node API](docs/INTEGRATION.md) |
28
+ | Serve the `.br` and `.gz` files | [Delivery](docs/DELIVERY.md) |
26
29
  | Prepare or publish a beta release | [Release process](docs/RELEASE.md) |
27
30
  | Choose a generator and output flow | [Static sites](docs/STATIC-SITES.md) |
28
31
  | Configure critical CSS safely | [Critical CSS](docs/CRITICAL-CSS.md) |
@@ -35,12 +38,12 @@ npx ds init
35
38
  <!-- ecosystem:begin -->
36
39
  ### Product boundaries
37
40
 
38
- | Product | Responsibility | Release status |
39
- | --- | --- | --- |
40
- | [AI.ALL](https://github.com/ai-all-ai/aiall) ([`@ai.all/aiall`](https://www.npmjs.com/package/@ai.all/aiall)) | AI agent instructions, pack routing, entrypoint synchronization, and ecosystem registry. | Published on npm `latest` |
41
- | [DS7](https://github.com/ai-all-ai/ds7) ([`@ai.all/ds7`](https://www.npmjs.com/package/@ai.all/ds7)) | Framework-independent web standards, architecture guidance, templates, and quality checks. | Published on npm `latest` |
42
- | [UI](https://github.com/ai-all-ai/ui) ([`@ai.all/ui`](https://www.npmjs.com/package/@ai.all/ui)) | Vue components, design tokens, a living Brandbook, developer tools, and the Media Engine. | Pre-release on npm `next` |
43
- | [DS](https://github.com/ai-all-ai/ds) (`@ai.all/ds`, not published) | Working beta package repository for static build orchestration, safe HTML optimization, optional document-matched CSS inlining, compression and size reporting; 0.1.0-beta.0 is prepared, npm publication pending. | Pre-release candidate; not yet published |
41
+ | Product | npm `latest` | npm `next` | GitHub release | Responsibility |
42
+ | --- | --- | --- | --- | --- |
43
+ | [AI.ALL](https://github.com/ai-all-ai/aiall) ([`@ai.all/aiall`](https://www.npmjs.com/package/@ai.all/aiall)) | [![npm latest](https://img.shields.io/npm/v/@ai.all/aiall?label=latest)](https://www.npmjs.com/package/@ai.all/aiall) | [![npm next](https://img.shields.io/npm/v/@ai.all/aiall/next?label=next)](https://www.npmjs.com/package/@ai.all/aiall?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/aiall?include_prereleases&label=release)](https://github.com/ai-all-ai/aiall/releases) | AI agent instructions, pack routing, entrypoint synchronization, and ecosystem registry. |
44
+ | [DS7](https://github.com/ai-all-ai/ds7) ([`@ai.all/ds7`](https://www.npmjs.com/package/@ai.all/ds7)) | [![npm latest](https://img.shields.io/npm/v/@ai.all/ds7?label=latest)](https://www.npmjs.com/package/@ai.all/ds7) | [![npm next](https://img.shields.io/npm/v/@ai.all/ds7/next?label=next)](https://www.npmjs.com/package/@ai.all/ds7?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/ds7?include_prereleases&label=release)](https://github.com/ai-all-ai/ds7/releases) | Framework-independent web standards, architecture guidance, templates, and quality checks. |
45
+ | [UI](https://github.com/ai-all-ai/ui) ([`@ai.all/ui`](https://www.npmjs.com/package/@ai.all/ui)) | [![npm latest](https://img.shields.io/npm/v/@ai.all/ui?label=latest)](https://www.npmjs.com/package/@ai.all/ui) | [![npm next](https://img.shields.io/npm/v/@ai.all/ui/next?label=next)](https://www.npmjs.com/package/@ai.all/ui?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/ui?include_prereleases&label=release)](https://github.com/ai-all-ai/ui/releases) | Vue components, design tokens, a living Brandbook, developer tools, and the Media Engine. |
46
+ | [DS](https://github.com/ai-all-ai/ds) ([`@ai.all/ds`](https://www.npmjs.com/package/@ai.all/ds)) | [![npm latest](https://img.shields.io/npm/v/@ai.all/ds?label=latest)](https://www.npmjs.com/package/@ai.all/ds) | [![npm next](https://img.shields.io/npm/v/@ai.all/ds/next?label=next)](https://www.npmjs.com/package/@ai.all/ds?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/ds?include_prereleases&label=release)](https://github.com/ai-all-ai/ds/releases) | Static build orchestration, safe HTML optimization, optional document-matched CSS inlining, compression and size reporting, as a CLI, a Node API and a Nuxt module. |
44
47
 
45
48
  See [ecosystem boundaries, dependencies, compatibility and verified versions](docs/ECOSYSTEM.md).
46
49
  <!-- ecosystem:end -->
@@ -60,7 +63,33 @@ DS orchestrates a static build and applies carefully scoped processing to its ge
60
63
 
61
64
  - Node.js 20.19 or newer.
62
65
  - A static generator that writes an output directory.
63
- - A static server or CDN configured to negotiate and serve `.gz` and `.br` sidecars when using pre-compression.
66
+ - A static server or CDN configured to negotiate and serve `.gz` and `.br` sidecars when using pre-compression ([Delivery](docs/DELIVERY.md)).
67
+
68
+ ## Install
69
+
70
+ <!-- install:begin -->
71
+ Requires Node.js 20.19 or newer. Run the commands in the root folder of your project.
72
+
73
+ **macOS** (Terminal):
74
+
75
+ ```bash
76
+ brew install node # once, only if Node.js is missing
77
+ npm install --save-dev @ai.all/ds@next
78
+ npx ds init
79
+ ```
80
+
81
+ **Windows** (PowerShell):
82
+
83
+ ```powershell
84
+ winget install OpenJS.NodeJS.LTS # once, only if Node.js is missing; then open a new window
85
+ npm install --save-dev @ai.all/ds@next
86
+ npx ds init
87
+ ```
88
+
89
+ If PowerShell says that running scripts is disabled, run `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned` once, or type `npm.cmd` and `npx.cmd` instead of `npm` and `npx`.
90
+
91
+ On macOS the `ds` command is also available outside a project through Homebrew: `brew install ai-all-ai/tap/ds`.
92
+ <!-- install:end -->
64
93
 
65
94
  ## Quick start
66
95
 
@@ -81,7 +110,7 @@ export default defineNuxtConfig({
81
110
  });
82
111
  ```
83
112
 
84
- The module enables production Vite JavaScript/CSS minification and Nitro gzip/Brotli defaults only when the project has not set those options explicitly. The active framework build owns bundle generation and filenames.
113
+ The module enables production Vite JavaScript/CSS minification and Nitro gzip/Brotli defaults only when the project has not set those options explicitly. The active framework build owns bundle generation and filenames. Options (`ds: { minify, compression }`) and how to switch them off: [Integration](docs/INTEGRATION.md#nuxt-module-options).
85
114
 
86
115
  Run the optimized build when the script is available:
87
116
 
@@ -129,7 +158,7 @@ const result = await optimizeOutput(dir, config.optimization);
129
158
  console.log(formatReport(result.report, config.generator.outputDir));
130
159
  ```
131
160
 
132
- The root export also provides `DEFAULT_CONFIG`, `validateConfig`, `runGenerator`, `analyzeOutput` and `applyProductionDefaults`.
161
+ The root export also provides `DEFAULT_CONFIG`, `validateConfig`, `runGenerator`, `analyzeOutput` and `applyProductionDefaults`. Signatures and return values: [Node API](docs/INTEGRATION.md#node-api).
133
162
 
134
163
  Generator commands are configured as an executable and argument array; DS does not run them through a shell. Output directories must stay inside the project root.
135
164
 
@@ -29,6 +29,8 @@ The optimizer does not rewrite hashed JavaScript or CSS. Compression sidecars ar
29
29
 
30
30
  ## Configuration and paths
31
31
 
32
+ Every key and its default: [CONFIG.md](CONFIG.md). Consumers and the Node API: [INTEGRATION.md](INTEGRATION.md).
33
+
32
34
  `ds.config.json` belongs to the project root. Output paths must resolve to a directory inside that root; the project root itself and paths that escape it are rejected. The generator is an executable plus arguments, never a shell command string.
33
35
 
34
36
  ## Beta boundary
package/docs/CONFIG.md ADDED
@@ -0,0 +1,50 @@
1
+ # Configuration
2
+
3
+ `ds init` writes `ds.config.json` in the project root. Every key is validated before any file is written; an unknown key, a wrong type or a missing value stops the command with a non-zero exit. Keys left out take the defaults below. The JSON Schema is [`ds.config.schema.json`](../ds.config.schema.json).
4
+
5
+ ```json
6
+ {
7
+ "$schema": "https://raw.githubusercontent.com/ai-all-ai/ds/main/ds.config.schema.json",
8
+ "schemaVersion": 1,
9
+ "generator": {
10
+ "command": ["npm", "run", "generate"],
11
+ "outputDir": ".output/public"
12
+ },
13
+ "optimization": {
14
+ "html": { "minify": false },
15
+ "criticalCss": { "enabled": false, "routes": [], "allowRules": [], "preload": "body" },
16
+ "compression": { "gzip": true, "brotli": true }
17
+ }
18
+ }
19
+ ```
20
+
21
+ | Key | Type | Default | Meaning |
22
+ | --- | --- | --- | --- |
23
+ | `schemaVersion` | `1` | `1` | Config format version. Required. |
24
+ | `generator.command` | string array | `["npm", "run", "generate"]` | Executable and arguments that `ds build` runs. Never passed through a shell. |
25
+ | `generator.outputDir` | string | `.output/public` | Generated site, relative to the project root. Must resolve inside the project, also through symbolic links. |
26
+ | `optimization.html.minify` | boolean | `false` | Minify generated HTML (see below). |
27
+ | `optimization.criticalCss.enabled` | boolean | `false` | Inline document-matched CSS with Beasties. Needs at least one route. |
28
+ | `optimization.criticalCss.routes` | string array | `[]` | Exact `.html` paths relative to `outputDir`, for example `index.html`, `es/index.html`. No `..`, no absolute paths; every path must exist in the output. |
29
+ | `optimization.criticalCss.allowRules` | string array | `[]` | Selectors to keep although they are absent from the prerendered markup (states added by JavaScript). |
30
+ | `optimization.criticalCss.preload` | `"body"` or `false` | `"body"` | How the remaining stylesheets load. `false` keeps the original render-blocking links. |
31
+ | `optimization.compression.gzip` | boolean | `true` | Write `.gz` next to every compressible file. |
32
+ | `optimization.compression.brotli` | boolean | `true` | Write `.br` next to every compressible file. |
33
+
34
+ Compressible files: `.html`, `.htm`, `.css`, `.js`, `.mjs`, `.cjs`, `.json`, `.map`, `.svg`, `.txt`, `.wasm`, `.webmanifest`, `.xml`. Gzip uses level 9, Brotli quality 11. When a compressor is switched off, existing sidecars of an HTML file that DS changed are still refreshed, so no stale `.gz` or `.br` is left behind.
35
+
36
+ ## What HTML minification changes
37
+
38
+ It is conservative on purpose: whitespace is collapsed but one space is kept where the browser would render one (`conservativeCollapse`), comments are kept (frameworks use them as hydration markers), optional tags are kept, and inline `<style>` and `<script>` are not touched, because the framework has already minified them. Check hydration and rendered text after switching it on.
39
+
40
+ ## Common errors
41
+
42
+ | Message | Fix |
43
+ | --- | --- |
44
+ | `Configuration not found … Run "ds init" first.` | Run `npx ds init`, or pass `--config <file>`. |
45
+ | `The output directory must be a child of the project directory.` | Point `generator.outputDir` (or `--dir`) at a folder inside the project, not the project root. |
46
+ | `Output path is not a directory` / `ENOENT` | Run the generator first, or check `outputDir`. |
47
+ | `Critical CSS route does not exist in the output: …` | Fix the path in `criticalCss.routes`; it is relative to `outputDir` and ends in `.html`. |
48
+ | `List at least one path in optimization.criticalCss.routes …` | Add a route or set `criticalCss.enabled` to `false`. |
49
+ | `Generator failed with exit code N.` | The framework build failed; its own output above the message says why. |
50
+ | `Unknown … option: …` | Remove or correct the key; DS rejects unknown keys so typos do not pass silently. |
@@ -0,0 +1,43 @@
1
+ # Serving pre-compressed files
2
+
3
+ DS writes `index.html.br` and `index.html.gz` next to `index.html`. The sidecars only help if the web server or CDN sends them to browsers that accept them, with the right headers.
4
+
5
+ Requirements for the server:
6
+
7
+ - Pick `.br` when the request has `Accept-Encoding: br`, otherwise `.gz` for `gzip`, otherwise the original file.
8
+ - Send `Content-Encoding: br` or `gzip`, the original `Content-Type` (not `application/gzip`) and `Vary: Accept-Encoding`.
9
+ - Do not compress the same response again on the fly.
10
+
11
+ ## nginx
12
+
13
+ Needs `ngx_brotli` for `.br`; `gzip_static` is built in.
14
+
15
+ ```nginx
16
+ gzip_static on;
17
+ brotli_static on; # ngx_brotli
18
+ gzip_vary on;
19
+ ```
20
+
21
+ ## Caddy
22
+
23
+ ```caddy
24
+ file_server {
25
+ precompressed br gzip
26
+ }
27
+ ```
28
+
29
+ ## CDN and object storage
30
+
31
+ Managed hosts such as Netlify, Cloudflare Pages and Vercel usually compress responses themselves; check whether yours serves the sidecars, and switch `compression` off if it does not, to save build time. S3 or similar storage behind a CDN needs one object per encoding with `Content-Encoding` set at upload.
32
+
33
+ ## DS7 templates
34
+
35
+ DS7 ships tested configurations for both servers, with cache headers per file type and security headers: `templates/nginx.conf` and `templates/Caddyfile` in [`@ai.all/ds7`](https://github.com/ai-all-ai/ds7), explained in its `03-performance-web-vitals/DELIVERY-AND-CACHING.md`. `ds7 audit perf` reports compressible files without a `.br` or `.gz` variant.
36
+
37
+ ## Check
38
+
39
+ ```bash
40
+ curl -sI -H 'Accept-Encoding: br' https://example.com/ | grep -i -E 'content-encoding|vary|content-type'
41
+ ```
42
+
43
+ The answer should contain `content-encoding: br`, `vary: Accept-Encoding` and `content-type: text/html`.
package/docs/ECOSYSTEM.md CHANGED
@@ -2,25 +2,36 @@
2
2
 
3
3
  <!-- Generated from src/ecosystem.json by scripts/sync-ecosystem.mjs. -->
4
4
 
5
- **Registry snapshot checked:** 2026-12-02<br>
5
+ **Registry snapshot checked:** 2026-12-03<br>
6
6
  **Canonical registry:** [AI.ALL ecosystem guide](https://github.com/ai-all-ai/aiall/blob/main/docs/ECOSYSTEM.md)
7
7
 
8
8
  This generated summary describes current package boundaries. The AI.ALL guide is the single source for the full dependency matrix, version sources and coordinated release order.
9
9
 
10
10
  ## Products
11
11
 
12
- | Product | Responsibility | Release status |
13
- | --- | --- | --- |
14
- | [AI.ALL](https://github.com/ai-all-ai/aiall) ([`@ai.all/aiall`](https://www.npmjs.com/package/@ai.all/aiall)) | AI agent instructions, pack routing, entrypoint synchronization, and ecosystem registry. | Published on npm `latest` |
15
- | [DS7](https://github.com/ai-all-ai/ds7) ([`@ai.all/ds7`](https://www.npmjs.com/package/@ai.all/ds7)) | Framework-independent web standards, architecture guidance, templates, and quality checks. | Published on npm `latest` |
16
- | [UI](https://github.com/ai-all-ai/ui) ([`@ai.all/ui`](https://www.npmjs.com/package/@ai.all/ui)) | Vue components, design tokens, a living Brandbook, developer tools, and the Media Engine. | Pre-release on npm `next` |
17
- | [DS](https://github.com/ai-all-ai/ds) (`@ai.all/ds`, not published) | Working beta package repository for static build orchestration, safe HTML optimization, optional document-matched CSS inlining, compression and size reporting; 0.1.0-beta.0 is prepared, npm publication pending. | Pre-release candidate; not yet published |
12
+ | Product | npm `latest` | npm `next` | GitHub release | Responsibility |
13
+ | --- | --- | --- | --- | --- |
14
+ | [AI.ALL](https://github.com/ai-all-ai/aiall) ([`@ai.all/aiall`](https://www.npmjs.com/package/@ai.all/aiall)) | [![npm latest](https://img.shields.io/npm/v/@ai.all/aiall?label=latest)](https://www.npmjs.com/package/@ai.all/aiall) | [![npm next](https://img.shields.io/npm/v/@ai.all/aiall/next?label=next)](https://www.npmjs.com/package/@ai.all/aiall?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/aiall?include_prereleases&label=release)](https://github.com/ai-all-ai/aiall/releases) | AI agent instructions, pack routing, entrypoint synchronization, and ecosystem registry. |
15
+ | [DS7](https://github.com/ai-all-ai/ds7) ([`@ai.all/ds7`](https://www.npmjs.com/package/@ai.all/ds7)) | [![npm latest](https://img.shields.io/npm/v/@ai.all/ds7?label=latest)](https://www.npmjs.com/package/@ai.all/ds7) | [![npm next](https://img.shields.io/npm/v/@ai.all/ds7/next?label=next)](https://www.npmjs.com/package/@ai.all/ds7?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/ds7?include_prereleases&label=release)](https://github.com/ai-all-ai/ds7/releases) | Framework-independent web standards, architecture guidance, templates, and quality checks. |
16
+ | [UI](https://github.com/ai-all-ai/ui) ([`@ai.all/ui`](https://www.npmjs.com/package/@ai.all/ui)) | [![npm latest](https://img.shields.io/npm/v/@ai.all/ui?label=latest)](https://www.npmjs.com/package/@ai.all/ui) | [![npm next](https://img.shields.io/npm/v/@ai.all/ui/next?label=next)](https://www.npmjs.com/package/@ai.all/ui?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/ui?include_prereleases&label=release)](https://github.com/ai-all-ai/ui/releases) | Vue components, design tokens, a living Brandbook, developer tools, and the Media Engine. |
17
+ | [DS](https://github.com/ai-all-ai/ds) ([`@ai.all/ds`](https://www.npmjs.com/package/@ai.all/ds)) | [![npm latest](https://img.shields.io/npm/v/@ai.all/ds?label=latest)](https://www.npmjs.com/package/@ai.all/ds) | [![npm next](https://img.shields.io/npm/v/@ai.all/ds/next?label=next)](https://www.npmjs.com/package/@ai.all/ds?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/ds?include_prereleases&label=release)](https://github.com/ai-all-ai/ds/releases) | Static build orchestration, safe HTML optimization, optional document-matched CSS inlining, compression and size reporting, as a CLI, a Node API and a Nuxt module. |
18
+
19
+ ## Versions
20
+
21
+ Release versions come from the checked-out manifests; npm and GitHub columns are live badges and update on their own.
22
+
23
+ | Product | Release version | npm `latest` | npm `next` | Latest GitHub release | Tested version |
24
+ | --- | --- | --- | --- | --- | --- |
25
+ | AI.ALL | 1.3.0 | [![npm latest](https://img.shields.io/npm/v/@ai.all/aiall?label=latest)](https://www.npmjs.com/package/@ai.all/aiall) | [![npm next](https://img.shields.io/npm/v/@ai.all/aiall/next?label=next)](https://www.npmjs.com/package/@ai.all/aiall?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/aiall?include_prereleases&label=release)](https://github.com/ai-all-ai/aiall/releases) | 1.3.0 |
26
+ | DS7 | 2.12.0 | [![npm latest](https://img.shields.io/npm/v/@ai.all/ds7?label=latest)](https://www.npmjs.com/package/@ai.all/ds7) | [![npm next](https://img.shields.io/npm/v/@ai.all/ds7/next?label=next)](https://www.npmjs.com/package/@ai.all/ds7?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/ds7?include_prereleases&label=release)](https://github.com/ai-all-ai/ds7/releases) | 2.12.0 |
27
+ | UI | 1.0.0 | [![npm latest](https://img.shields.io/npm/v/@ai.all/ui?label=latest)](https://www.npmjs.com/package/@ai.all/ui) | [![npm next](https://img.shields.io/npm/v/@ai.all/ui/next?label=next)](https://www.npmjs.com/package/@ai.all/ui?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/ui?include_prereleases&label=release)](https://github.com/ai-all-ai/ui/releases) | 1.0.0 |
28
+ | DS | 0.1.0-beta.1 | [![npm latest](https://img.shields.io/npm/v/@ai.all/ds?label=latest)](https://www.npmjs.com/package/@ai.all/ds) | [![npm next](https://img.shields.io/npm/v/@ai.all/ds/next?label=next)](https://www.npmjs.com/package/@ai.all/ds?activeTab=versions) | [![GitHub release](https://img.shields.io/github/v/release/ai-all-ai/ds?include_prereleases&label=release)](https://github.com/ai-all-ai/ds/releases) | 0.1.0-beta.1 |
18
29
 
19
30
  ## DS ownership
20
31
 
21
32
  - Owns static-output post-processing and build-size analysis; framework-specific generators remain responsible for rendering and bundling.
22
33
  - Its working beta package wraps existing generator commands, optionally optimizes prerendered HTML and document-used CSS, and writes compression sidecars.
23
- - The prerelease is prepared in the active repository but not yet published; its API remains experimental.
34
+ - 0.1.0-beta.0 is published on npm `next` (`npm i -D @ai.all/ds@next`); its API remains experimental.
24
35
 
25
36
  ## Dependencies
26
37
 
@@ -32,6 +43,6 @@ This generated summary describes current package boundaries. The AI.ALL guide is
32
43
  - DS7 depends on UI because its current initializer creates a Nuxt application that consumes UI components, styles, and the Brandbook. Removing that dependency requires an explicit UI-free initializer profile and an integration migration.
33
44
  - UI can be used without AI.ALL or DS7. Its AI.ALL pack is optional.
34
45
  - DS7 currently provides responsive image generation as well as media validation. Moving generation to UI is a target, not a completed migration; keep the DS7 command until UI feature parity and consumer migration are verified.
35
- - DS is an active repository with a working, tested beta package and a prepared 0.1.0-beta.0 prerelease; npm publication is pending and its API remains experimental.
46
+ - DS 0.1.0-beta.0 is a tested beta on npm `next`. DS7 and UI can consume it through its Node API or Nuxt module; its API remains experimental.
36
47
 
37
48
  Refresh this summary from the canonical AI.ALL repository with `npm run ecosystem:sync -- --require-all`.
@@ -0,0 +1,79 @@
1
+ # Using DS from DS7 and UI
2
+
3
+ DS is the build-output layer of the AI.ALL ecosystem. DS7 and UI depend on it; DS depends on neither.
4
+
5
+ | Consumer | Uses | For |
6
+ | --- | --- | --- |
7
+ | DS7 | CLI `ds build`, Node API, Nuxt module | `generate:optimized` in initialized projects, size reports next to `ds7 audit perf`. |
8
+ | UI | Nuxt module, Node API | Production minification and compression defaults for the brandbook and Nuxt sites using UI. |
9
+ | A site | CLI or Nuxt module | Optimized static output without extra tooling. |
10
+
11
+ ## In a Nuxt site
12
+
13
+ ```bash
14
+ npm install --save-dev @ai.all/ds@next
15
+ npx ds init
16
+ ```
17
+
18
+ ```ts
19
+ // nuxt.config.ts
20
+ export default defineNuxtConfig({
21
+ modules: ['@ai.all/ds/nuxt'],
22
+ });
23
+ ```
24
+
25
+ ```bash
26
+ npm run generate:optimized # nuxt generate, then ds optimize on .output/public
27
+ ```
28
+
29
+ ## Nuxt module options
30
+
31
+ The module only acts in production builds and never overrides a value the project set itself.
32
+
33
+ ```ts
34
+ export default defineNuxtConfig({
35
+ modules: ['@ai.all/ds/nuxt'],
36
+ ds: {
37
+ minify: true, // vite.build.minify and cssMinify, when unset
38
+ compression: { gzip: true, brotli: true }, // nitro.compressPublicAssets, when unset
39
+ },
40
+ });
41
+ ```
42
+
43
+ | Option | Default | Effect | Off |
44
+ | --- | --- | --- | --- |
45
+ | `minify` | `true` | Sets `vite.build.minify` and `vite.build.cssMinify` to `true` if the project left them unset. | `minify: false` |
46
+ | `compression.gzip` / `compression.brotli` | `true` | Sets `nitro.compressPublicAssets` (or its missing keys). | `compression: false`, or set the key to `false` |
47
+
48
+ ## Node API
49
+
50
+ ```js
51
+ import { loadConfig, resolveOutputDirectory, runGenerator, optimizeOutput, analyzeOutput, formatReport } from '@ai.all/ds';
52
+ ```
53
+
54
+ | Export | Signature | Returns / throws |
55
+ | --- | --- | --- |
56
+ | `DEFAULT_CONFIG` | object | The config `ds init` writes. |
57
+ | `loadConfig(root, file = 'ds.config.json')` | async | Validated config merged with defaults. Throws when the file is missing, not JSON or invalid. |
58
+ | `validateConfig(object)` | sync | A normalized copy. Throws on the first invalid key. |
59
+ | `resolveOutputDirectory(root, dir)` | async | Real path of `dir`. Throws when it is not a directory inside `root`. |
60
+ | `runGenerator(command, cwd)` | async | Resolves when the command exits with 0, rejects otherwise. No shell. |
61
+ | `optimizeOutput(dir, config.optimization)` | async | `{ htmlFiles, changedHtmlFiles, criticalCssFiles, gzipFiles, brotliFiles, addedOrUpdatedSidecars, initialFileCount, report }` |
62
+ | `analyzeOutput(dir)` | async | `report`: `{ fileCount, totalRawBytes, compressible: { files, rawBytes, gzipBytes, brotliBytes }, groups: { html, css, javascript, other } }`. `.gz` and `.br` files are not counted. |
63
+ | `formatReport(report, label)` | sync | The text table `ds analyze` prints. |
64
+ | `applyProductionDefaults(nuxt, options)` | sync | What the Nuxt module runs; for tools that configure Nuxt themselves. |
65
+
66
+ Typical use from another tool:
67
+
68
+ ```js
69
+ const root = process.cwd();
70
+ const config = await loadConfig(root);
71
+ await runGenerator(config.generator.command, root);
72
+ const dir = await resolveOutputDirectory(root, config.generator.outputDir);
73
+ const result = await optimizeOutput(dir, config.optimization);
74
+ console.log(formatReport(result.report, config.generator.outputDir));
75
+ ```
76
+
77
+ ## Versions
78
+
79
+ DS is a beta on npm `next`. Consumers pin a range such as `^0.1.0-beta.0` and update DS before DS7 and UI, so the ecosystem moves in the order DS, AI.ALL, UI, DS7.
package/docs/RELEASE.md CHANGED
@@ -8,7 +8,7 @@ DS is an experimental package. Pre-releases use the npm `next` dist-tag; they mu
8
8
 
9
9
  ## How a release runs
10
10
 
11
- Pushing a `vX.Y.Z` tag runs `.github/workflows/release.yml`, the same flow as DS7 and UI: it creates the GitHub Release from the matching `CHANGELOG.md` section, runs `npm run verify`, and publishes with provenance through npm trusted publishing (environment `npm`). A tag with a pre-release suffix (`-beta.N`) is marked as a GitHub pre-release and published to npm `next`; a final tag goes to `latest` and then asks `ai-all-ai/homebrew-tap` to update the `ds` formula. **Pushing a tag publishes the package**, so push it only when the release is approved.
11
+ Pushing a `vX.Y.Z` tag runs `.github/workflows/publish.yml`, the workflow shared by all AI.ALL packages: it checks the tag against `package.json` and `CHANGELOG.md`, runs `npm run verify`, publishes to npm with provenance through trusted publishing (environment `npm`; final versions go to `latest`, `-beta.N` pre-releases to `next`), then creates the GitHub Release from the matching `CHANGELOG.md` section and, for final versions, asks `ai-all-ai/homebrew-tap` to update the formula. **Pushing a tag publishes the package**, so push it only when the release is approved.
12
12
 
13
13
  ## Before publishing a pre-release
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai.all/ds",
3
- "version": "0.1.0-beta.0",
3
+ "version": "0.1.0-beta.1",
4
4
  "description": "Static-site build and delivery optimization engine for AI.ALL",
5
5
  "keywords": [
6
6
  "ai.all",