@x12i/graphenix-authoring-analysis
v2.16.0
Published
Authoring project envelope validation, graph purity checks, and model-config merge-on-save for Graphs Studio.
Maintainers
Readme
@x12i/graphenix-authoring-analysis
Studio-facing save/import analysis for the Graphenix authoring phase:
GraphProjectDocumentenvelope validation (graphenix.project/v1)- Authoring graph purity — rejects sidecars and forbidden embeds on persist
- Model config merge-on-save — partial editor drafts → complete
profileChoiceshapes
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
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.0Quick start
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/ for envelope, purity, and model-config semantics.
Related packages
@x12i/graphenix-authoring-format— design-time validation and CRUD@x12i/graphenix-executable-contracts— shared types includingGraphProjectDocument@x12i/graphenix-execute-envelope— Run-time execute request adapter
