open-index/open-npm huggingface dataset:
npm package: @nuasite/agent-summary
Description: Create simple summary of the project for LLM.
Latest version: 0.27.0

# @nuasite/agent-summary

`@nuasite/agent-summary` is a tiny Astro integration that turns your built site into a machine-readable catalog (`AGENTS.md`) for agentic or LLM-driven tooling. During `astro build` it walks every generated HTML page, extracts lightweight metadata, captures redirects, and keeps several machine-friendly blocks in `AGENTS.md` up to date.

## What it does

- Discovers every concrete page emitted by Astro (skipping redirect-only routes).
- Reads the built HTML, normalizes the title/description, and records prominent headings as contextual breadcrumbs.
- Serializes each page (and redirect) into JSONL blocks bounded by dedicated `<page_summary*>` markers.
- Creates `AGENTS.md` if it does not exist, or replaces only the generated blocks when they already exist.

The resulting file can be fed directly into embeddings, vector stores, or custom command palettes so an agent always has a fresh summary of your documentation surface.

## Installation

```bash
bun add -D @nuasite/agent-summary
# or: npm install -D @nuasite/agent-summary
```

## Usage

1. Ensure there is an `AGENTS.md` at the project root (the integration will create one if it is missing).
2. Register the integration in your `astro.config.mjs`:

```ts
import { agentsSummary } from '@nuasite/agent-summary'
import { defineConfig } from 'astro/config'

export default defineConfig({
	integrations: [
		agentsSummary(),
	],
})
```

3. Run your normal build (`bun run astro build`, `npm run build`, etc.). When the build finishes you should see a log similar to:

```
[agents-summary] Updated AGENTS.md with 42 page entries and 3 redirects.
```

### Generated blocks

`updateAgentsSummary` writes (or updates) sections inside `AGENTS.md`. You can keep anything you like before/between/after them; only the content between `<page_summary>` marker pair is ever rewritten.

JSONL excerpt:

```
<page_summary>
{"kind":"page","route":"/docs/getting-started","title":"Getting started","description":"Overview of the quickstart workflow.","headlines":[{"level":"h1","text":"Getting started"},{"level":"h2","text":"Install"}]}
{"kind":"redirect","route":"/old-path","to":"/docs/getting-started","status":"302"}
</page_summary>
```

## Development

The package is written in TypeScript and tested with Bun:

```bash
bun install
bun test packages/agent-summary/tests/cases/unit/utils.test.ts
```

`src/agent-summary-integration.ts` contains the integration entry point, while `src/utils.ts` focuses on parsing HTML, detecting redirects, and keeping `AGENTS.md` synchronized.

## Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.
npm package: @nuasite/build
Description: `@nuasite/build` is the build tool that powers [Astro](https://astro.build/) projects updated by [Nua Site](https://www.nuasite.com). It wraps `astro build`, automatically wires up the `@nuasite/agent-summary` integration, and prints readable stack traces
Latest version: 0.0.17
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @nuasite/build

`@nuasite/build` is the build tool that powers [Astro](https://astro.build/) projects updated by
[Nua Site](https://www.nuasite.com). It wraps `astro build`, automatically
wires up the `@nuasite/agent-summary` integration, and prints readable stack
traces when something goes wrong.

## Install

Add the package to your workspace (it is usually used as a dev dependency):

```bash
bun add -d @nuasite/build
```

The package bundles Astro and expects `typescript@^5` to be available (peer
dependency).

## CLI usage

Once installed you get the `nua-build` binary:

```bash
# run directly
bunx nua-build

# or wire it into package.json
{
  "scripts": {
    "build": "nua-build"
  }
}
```

`nua-build` runs `astro build` with the default Nua configuration (currently the
agent summary integration) and surfaces errors with inline source excerpts so
you can diagnose failures quickly.

## Programmatic usage

You can also drive the builder yourself if you need to supply a custom inline
config:

```ts
import { build } from '@nuasite/build'
import { agentsSummary } from '@nuasite/agent-summary'

await build({
  root: new URL('../site', import.meta.url),
  integrations: [agentsSummary()],
})
```

The function accepts any `AstroInlineConfig`, so you can extend or override the
defaults that the CLI uses.

## Development

If you are iterating on `@nuasite/build` itself:

```bash
cd packages/build
bun install
bunx tsx src/cli.ts
```

This recompiles the linked Astro project with your local changes while keeping
stack traces and integration behavior intact.
npm package: @nuasite/components
Description: Nua Site astro components.
Latest version: 0.27.0

# @nuasite/components

Reusable [Astro](https://astro.build/) components optimized for sites connected to
[Nua Site](https://www.nuasite.com). The package currently ships:

- `Form`: Progressive enhancement for Nua Site form submissions with friendly UI states.
- `Image`: Ergonomic Cloudflare Image Transform helper that builds `/cdn-cgi/image/<options>/<src>` URLs and responsive `srcset`.

## Install

```bash
bun add @nuasite/components
```

The package targets Astro projects and expects `typescript@^5` to be available
in your workspace (peer dependency).

## Usage

### Form

```astro
---
import { Form } from '@nuasite/components'
---

<Form
  action="/contact"
  successMessage="Thanks—we'll be in touch!"
  submittingMessage="Sending..."
  errorMessage="Something went wrong."
/>
```

Pass either a `formId` issued by Nua Site, or a custom `action` URL. You
can override the default success, error, submitting, and retry copy via props.

### Responsive image (Cloudflare)

```astro
---
import { Image } from '@nuasite/components'
---

<Image
  src="https://cdn.nuasite.com/assets/www-mangoweb-cz/vakovako-3.webp"
  alt="Abstract architectural pattern with curved windows."
  widths={[480, 768, 1024, 1400, 1920]}
  sizes="(min-width: 1024px) 60vw, 100vw"
  transformOptions={{ fit: 'cover', dpr: 1.5 }}
/>
```

Key props:

- `widths`: Breakpoints used to build `srcset` (defaults provided).
- `sizes`: `sizes` attribute string; controls browser selection.
- `transformOptions`: Cloudflare transform params (quality, fit, dpr, format, etc.).
- `deliveryBase`: Override `/cdn-cgi/image` if you proxy through another path or domain.
- `allowedDomains`: Whitelist of hostnames that should be transformed. Leave empty to allow all; when set, non-matching hosts fall back to the original `src` with no transform.

Absolute `src` values keep their origin and prepend the transform path, e.g.
`https://cdn.nuasite.com/cdn-cgi/image/.../assets/file.webp`.

## Types

TypeScript projects can import the component props to help with strongly typed
helper utilities:

```ts
import type { FormProps } from '@nuasite/components'

const defaults: FormProps = {
	formId: 'contact',
	successMessage: 'Success!',
}
```

`FormProps` ensures at least one of `formId` or `action` is provided at compile
time, catching configuration mistakes early.

## Local development

If you need to work on the components themselves:

```bash
cd packages/components
bun install
bunx tsx src/index.ts
```

During local testing you can import components directly via workspace links in
your Astro project to iterate quickly.
npm package: @nuasite/core
Description: `@nuasite/core` is the dependency manifest that keeps Nua Site projects in sync with the toolchain used by the hosted platform. It pins the versions of the Astro integrations our builders expect so your local project matches the environment that deploys i
Latest version: 0.27.0

# @nuasite/core

`@nuasite/core` is the dependency manifest that keeps Nua Site projects in sync
with the toolchain used by the hosted platform. It pins the versions of the
Astro integrations our builders expect so your local project matches the
environment that deploys it.

## Included tooling

Installing `@nuasite/core` adds the following peer dependencies to your project:

- `@astrojs/check` – type-aware diagnostics for Astro/TypeScript.
- `@astrojs/mdx` – Markdown+JSX content authoring with shared layouts.
- `@astrojs/sitemap` – sitemap generation aligned with Nua Site routing.

Keeping these packages aligned with `@nuasite/core` avoids version drift between
local dev, CI, and the Nua Site build service.

## Installation

```bash
bun add -d @nuasite/core
```

The package only ships metadata, so there is nothing to import at runtime.
Include it in `devDependencies` (or `dependencies` if you prefer) and run
`bun install`. Bun/npm/pnpm will ensure the required peer dependencies are
present—if you are missing one it will tell you exactly what to add.

When combined with `@nuasite/nua` or `@nuasite/build`, this gives you the same
stack that powers sites maintained through [Nua Site](https://www.nuasite.com).

## Updating

To pick up the latest integration versions that Nua Site supports, bump the
package and reinstall:

```bash
bun up @nuasite/core
```

Because the package is just a manifest, updates are fast and low risk—your site
continues to control its own Astro config while inheriting the vetted baseline.
npm package: @nuasite/nua
Description: `@nuasite/nua` is the meta package that mirrors the toolchain Nua Site uses during the build phase. Add it to your project to pull in the exact versions of Astro, Tailwind CSS, and the Nua Site packages that deploy your site so local runs behave exactly l
Latest version: 0.27.0

# @nuasite/nua

`@nuasite/nua` is the meta package that mirrors the toolchain Nua Site uses
during the build phase. Add it to your project to pull in the exact versions of
Astro, Tailwind CSS, and the Nua Site packages that deploy your site so local
runs behave exactly like the hosted service.

## What's included

Installing `@nuasite/nua` brings along:

- `astro` plus the Nua-specific `nua-build` wrapper (`@nuasite/build`)
- Official Astro integrations (`@astrojs/check`, `@astrojs/mdx`, `@astrojs/sitemap`)
- Tailwind CSS 4 + Flowbite, wired through `@tailwindcss/vite`
- Shared UI primitives from `@nuasite/components`
- The baseline dependency manifest from `@nuasite/core`

## Install

```bash
bun add -d @nuasite/nua
```

This ensures every developer machine and CI job installs the same stack that
Nua Site uses when publishing your project. After installing, run your normal
build command (for example `bunx nua-build` or `bun run build`) and the exact
same toolchain will execute locally.

## Usage

Use the nua config wrapper for the simplest setup:

```ts
// astro.config.ts
import { defineConfig } from '@nuasite/nua/config'

export default defineConfig()
```

This single line gives you:

- Tailwind CSS 4 via `@tailwindcss/vite`
- MDX support via `@astrojs/mdx`
- Sitemap generation via `@astrojs/sitemap`
- CMS markers via `@nuasite/cms-marker`
- Page markdown output via `@nuasite/llm-enhancements`
- Sensible defaults: `site: 'http://localhost:4321'`, `vite.build.sourcemap: true`

### Configuration options

Pass standard Astro config options, plus a `nua` key for integration settings:

```ts
import { defineConfig } from '@nuasite/nua/config'

export default defineConfig({
	site: 'https://example.com',
	nua: {
		tailwindcss: true, // Enable/disable Tailwind CSS (default: true)
		mdx: true, // Enable/disable MDX support (default: true)
		sitemap: true, // Enable/disable sitemap generation (default: true)
		cmsMarker: true, // Enable/disable CMS markers (default: true)
		pageMarkdown: true, // Enable/disable page markdown output (default: true)
	},
})
```

Pass `false` to disable a feature, or pass an options object to customize it:

```ts
import { defineConfig } from '@nuasite/nua/config'

export default defineConfig({
	nua: {
		sitemap: { filter: (page) => !page.includes('/draft/') },
		mdx: { remarkPlugins: [myRemarkPlugin] },
	},
})
```

### Using the integration directly

If you prefer more control, import the integration separately:

```ts
// astro.config.ts
import nua from '@nuasite/nua/integration'
import { defineConfig } from 'astro/config'

export default defineConfig({
	integrations: [nua()],
})
```