@x12i/graphenix-execute-envelope 1.1.0 → 1.1.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/README.md CHANGED
@@ -51,21 +51,36 @@ npm install @x12i/graphenix-execute-envelope
51
51
 
52
52
  ### Studio execute request (shape)
53
53
 
54
+ Use `createContentPipelineReferenceGraph()` for real node ids — not an empty `"graph": {}` placeholder.
55
+
54
56
  ```json
55
57
  {
56
- "authoringGraph": { "id": "graph:content-pipeline", "formatVersion": "2.0.0", "graph": {} },
57
- "input": {
58
- "brief": "Launch campaign for eco-friendly water bottles",
59
- "priority": "normal"
58
+ "mode": "graph",
59
+ "jobId": "job-001",
60
+ "graph": {
61
+ "id": "graph:content-pipeline",
62
+ "formatVersion": "2.0.0",
63
+ "graph": {
64
+ "id": "graph:content-pipeline",
65
+ "nodes": [
66
+ { "id": "node:audience-insights", "type": "task" },
67
+ { "id": "node:competitor-angles", "type": "task" },
68
+ { "id": "node:seo-keywords", "type": "task" },
69
+ { "id": "node:content-package", "type": "finalizer" }
70
+ ]
71
+ }
60
72
  },
61
- "options": {
62
- "jobId": "job-001",
63
- "mode": "live",
64
- "environment": "prod"
73
+ "runtime": {
74
+ "input": {
75
+ "brief": "Launch campaign for eco-friendly water bottles",
76
+ "priority": "normal"
77
+ }
65
78
  }
66
79
  }
67
80
  ```
68
81
 
82
+ Full authoring JSON: `packages/authoring-format/fixtures/graph-content-pipeline.authoring.json`.
83
+
69
84
  Credentials stay on the request boundary — never copied into `GraphRuntimeObject`.
70
85
 
71
86
  ### Runtime object (compile input)
@@ -109,10 +124,20 @@ Embedded normalized graph in the plan has **no** `node.layout` — stripped at c
109
124
  ## Example (API)
110
125
 
111
126
  ```ts
127
+ import { createContentPipelineReferenceGraph } from "@x12i/graphenix-authoring-format";
112
128
  import { buildGraphExecutionRequestFromStudioExecute } from "@x12i/graphenix-execute-envelope";
113
129
 
114
- const { plan, runtime } = buildGraphExecutionRequestFromStudioExecute(request);
115
- // forward to engine engine never sees the raw Studio request
130
+ const authoring = createContentPipelineReferenceGraph();
131
+ const { plan, runtime } = buildGraphExecutionRequestFromStudioExecute(
132
+ {
133
+ mode: "graph",
134
+ jobId: "job-001",
135
+ graph: authoring,
136
+ runtime: { input: { priority: "normal" } }
137
+ },
138
+ { profileRegistry: { version: "3.2.0", registryHash: "sha256:profiles-cp" } }
139
+ );
140
+ // forward { plan, runtime } to engine
116
141
  ```
117
142
 
118
143
  ### Lower-level building blocks
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=content-pipeline-envelope.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-pipeline-envelope.test.d.ts","sourceRoot":"","sources":["../../src/test/content-pipeline-envelope.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ import assert from "node:assert/strict";
2
+ import { describe, it } from "node:test";
3
+ import { createContentPipelineReferenceGraph } from "@x12i/graphenix-authoring-format";
4
+ import { buildGraphExecutionRequestFromStudioExecute } from "../adapter/build-graph-execution-request-from-studio-execute.js";
5
+ import { EXECUTABLE_PLAN_FORMAT_V2 } from "@x12i/graphenix-executable-contracts";
6
+ const PROFILE_REGISTRY = {
7
+ version: "3.2.0",
8
+ registryHash: "sha256:profiles-cp-envelope"
9
+ };
10
+ describe("execute-envelope content pipeline", () => {
11
+ it("buildGraphExecutionRequestFromStudioExecute compiles CP graph to v2 plan", () => {
12
+ const authoring = createContentPipelineReferenceGraph();
13
+ const { plan, runtime } = buildGraphExecutionRequestFromStudioExecute({
14
+ mode: "graph",
15
+ jobId: "job-cp-envelope",
16
+ graph: authoring,
17
+ runtime: { input: { priority: "normal" } }
18
+ }, { profileRegistry: PROFILE_REGISTRY });
19
+ assert.equal(plan.format, EXECUTABLE_PLAN_FORMAT_V2);
20
+ assert.equal(plan.source.graphId, "graph:content-pipeline");
21
+ assert.equal(runtime.jobId, "job-cp-envelope");
22
+ assert.ok(plan.nodePlans["node:audience-insights"]);
23
+ assert.equal(runtime.input?.priority, "normal");
24
+ });
25
+ });
26
+ //# sourceMappingURL=content-pipeline-envelope.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-pipeline-envelope.test.js","sourceRoot":"","sources":["../../src/test/content-pipeline-envelope.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,2CAA2C,EAAE,MAAM,iEAAiE,CAAC;AAC9H,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAEjF,MAAM,gBAAgB,GAAG;IACvB,OAAO,EAAE,OAAO;IAChB,YAAY,EAAE,6BAA6B;CAC5C,CAAC;AAEF,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,EAAE,CAAC,0EAA0E,EAAE,GAAG,EAAE;QAClF,MAAM,SAAS,GAAG,mCAAmC,EAAE,CAAC;QACxD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,2CAA2C,CACnE;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,iBAAiB;YACxB,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE;SAC3C,EACD,EAAE,eAAe,EAAE,gBAAgB,EAAE,CACtC,CAAC;QAEF,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;QACrD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,wBAAwB,CAAC,CAAC;QAC5D,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;QAC/C,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC,CAAC;QACpD,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x12i/graphenix-execute-envelope",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Execute request envelope: runtime building and graph execution request adaptation.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,7 +15,8 @@
15
15
  },
16
16
  "scripts": {
17
17
  "build": "tsc -p tsconfig.json",
18
- "clean": "rimraf dist"
18
+ "clean": "rimraf dist",
19
+ "test": "npm run build && node --test dist/test/*.test.js"
19
20
  },
20
21
  "files": [
21
22
  "dist",
@@ -41,10 +42,10 @@
41
42
  "registry": "https://registry.npmjs.org/"
42
43
  },
43
44
  "dependencies": {
44
- "@x12i/graphenix-authoring-format": "^1.1.0",
45
+ "@x12i/graphenix-authoring-format": "^1.2.1",
45
46
  "@x12i/graphenix-executable-contracts": "^1.1.0",
46
- "@x12i/graphenix-plan-compiler": "^1.1.0",
47
- "@x12i/graphenix-plan-format": "^1.1.0"
47
+ "@x12i/graphenix-plan-compiler": "^1.1.1",
48
+ "@x12i/graphenix-plan-format": "^1.1.1"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@types/node": "^22.10.1",