# @x12i/graphenix-authoring-analysis

> Authoring project envelope validation, graph purity checks, and model-config merge-on-save for Graphs Studio.

Latest version **2.17.0** (published 2026-07-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @x12i/graphenix-authoring-analysis
pnpm add @x12i/graphenix-authoring-analysis
yarn add @x12i/graphenix-authoring-analysis
bun add @x12i/graphenix-authoring-analysis
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.17.0 |
| Published | 2026-07-10 |
| First published | 2026-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 69.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | x12i |
| Keywords | graph, graphenix, authoring, validation, project, studio |

## Links

- npm: https://www.npmjs.com/package/@x12i/graphenix-authoring-analysis
- Repository: https://github.com/x12i/graphenix-format
- Homepage: https://github.com/x12i/graphenix-format/tree/master/packages/authoring-analysis#readme
- Issues: https://github.com/x12i/graphenix-format/issues
- npm.io page: https://npm.io/package/@x12i/graphenix-authoring-analysis

## Dependencies (4)

- [@x12i/graphenix-core](https://npm.io/package/@x12i/graphenix-core.md) ^2.17.0
- [@x12i/graphenix-authoring-format](https://npm.io/package/@x12i/graphenix-authoring-format.md) ^2.17.0
- [@x12i/graphenix-executable-contracts](https://npm.io/package/@x12i/graphenix-executable-contracts.md) ^2.17.0
- [@x12i/graphenix-executable-profile-format](https://npm.io/package/@x12i/graphenix-executable-profile-format.md) ^2.17.0

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 2.17.0 (latest) — 2026-07-10
- 2.16.0 — 2026-06-29
- 2.15.0 — 2026-06-29
- 2.14.0 — 2026-06-28
- 2.12.5 — 2026-06-28
- 2.12.4 — 2026-06-28
- 2.12.3 — 2026-06-27
- 2.12.2 — 2026-06-27
- 2.11.0 — 2026-06-24
- 2.10.0 — 2026-06-24
- 2.9.0 — 2026-06-23
- 2.8.1 — 2026-06-21
- 2.8.0 — 2026-06-21
- 2.7.3 — 2026-06-20
- 2.7.2 — 2026-06-20
- … 11 more at https://npm.io/package/@x12i/graphenix-authoring-analysis/versions

## README

# @x12i/graphenix-authoring-analysis

Studio-facing **save/import analysis** for the Graphenix authoring phase:

- **`GraphProjectDocument`** envelope validation (`graphenix.project/v1`)
- **Authoring graph purity** — rejects sidecars and forbidden embeds on persist
- **Model config merge-on-save** — partial editor drafts → complete `profileChoice` shapes

Design-time CRUD and base validators remain in `@x12i/graphenix-authoring-format`.

**v1.2.0:** `mergeModelConfigForPersist` and related merge helpers re-export from `@x12i/graphenix-authoring-format` (canonical model-config module). This package owns envelope validation and save-time graph purity only.

**v1.1.0:** No supported public legacy-import API.

## Install

```bash
npm install @x12i/graphenix-authoring-analysis@^1.2.0 \
  @x12i/graphenix-authoring-format@^1.2.0 \
  @x12i/graphenix-executable-contracts@^1.1.0 \
  @x12i/graphenix-core@^2.3.0
```

## Quick start

```typescript
import {
  createGraphProjectReference,
  validateGraphProject,
  mergeModelConfigForPersist,
  applyModelConfigMergeToGraph,
  stripAuthoringGraphForPersist
} from "@x12i/graphenix-authoring-analysis";

const project = createGraphProjectReference();
const saveCheck = validateGraphProject(project);
if (!saveCheck.valid) throw new Error(saveCheck.errors[0]?.message);

const { graphModelConfig, nodeModelConfigs } = mergeModelConfigForPersist(
  {
    preActionModel: "cheap/default",
    skillModel: "pro/default",
    postActionModel: "cheap/default"
  },
  { "node:research:audience": { skillModel: "cheap/default" } }
);

const graphForSave = stripAuthoringGraphForPersist(
  applyModelConfigMergeToGraph(project.graph, graphModelConfig, nodeModelConfigs)
);
```

## APIs

| API | Purpose |
| --- | --- |
| `validateGraphProject` | Catalox `graphs` row save validation |
| `validateAuthoringGraphForPersist` | Stricter authoring graph check (no sidecars) |
| `stripAuthoringGraphForPersist` | Remove forbidden embeds before save |
| `stripAuthoringGraphForExport` | Persist strip + remove `node.layout` for JSON tab |
| `mergeModelConfigForPersist` | Re-export from authoring-format — merge partial editor state for persist |
| `createGraphProjectReference` | Reference fixture (content-pipeline + concept) |

## Docs

See [docs/format/guides/](../../docs/format/guides/README.md) for envelope, purity, and model-config semantics.

## Related packages

- `@x12i/graphenix-authoring-format` — design-time validation and CRUD
- `@x12i/graphenix-executable-contracts` — shared types including `GraphProjectDocument`
- `@x12i/graphenix-execute-envelope` — Run-time execute request adapter

---
_Source: https://npm.io/package/@x12i/graphenix-authoring-analysis · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
