@cynodia/axiom-compiler 0.13.1-alpha.1 → 0.14.0-alpha.2

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.
Files changed (2) hide show
  1. package/dist/server.js +10 -1
  2. package/package.json +3 -3
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { actionAuthority, actionGuards, authorityContext, expressionDefsIn, isObservable, maxContract, requiredServerContract, schemaFingerprint, stripAuthoringMetadata, serverIRExpressions, serverStateClosure, stateAuthority, usesExternalIOVocabulary, usesIntegrationVocabulary, usesInvocationVocabulary, usesMigrationVocabulary, usesQueryVocabulary, usesV4Semantics, validateGraph, } from '@cynodia/axiom-core';
1
+ import { actionAuthority, actionGuards, authorityContext, expressionDefsIn, isObservable, maxContract, requiredServerContract, schemaFingerprint, stripAuthoringMetadata, serverIRExpressions, serverStateClosure, stateAuthority, usesExternalIOVocabulary, usesIntegrationVocabulary, usesInvocationVocabulary, usesMigrationVocabulary, usesQueryVocabulary, usesWorkflowVocabulary, usesV4Semantics, validateGraph, } from '@cynodia/axiom-core';
2
2
  import { GraphValidationError } from './normalize.js';
3
3
  /**
4
4
  * Compiles the authoritative half of a graph.
@@ -34,6 +34,7 @@ export function compileToServerIR(graph, options = {}) {
34
34
  const relationships = [];
35
35
  const readPolicies = [];
36
36
  const migrations = [];
37
+ const workflows = [];
37
38
  for (const node of nodes) {
38
39
  if (node.kind === 'entity') {
39
40
  entities.push(node);
@@ -76,6 +77,12 @@ export function compileToServerIR(graph, options = {}) {
76
77
  else if (node.kind === 'read-policy') {
77
78
  readPolicies.push(node);
78
79
  }
80
+ else if (node.kind === 'workflow') {
81
+ // A workflow is authority-side by construction: only the authoritative runtime owns
82
+ // durable orchestration state, leases and fencing (spec14 §87). It never reaches a
83
+ // client. Authoring markers are stripped like any other trust-boundary payload.
84
+ workflows.push(stripAuthoringMetadata(node));
85
+ }
79
86
  else if (node.kind === 'migration') {
80
87
  // A migration is authority-side by construction: only the authoritative runtime
81
88
  // executes a schema evolution, and only against persisted canonical data (spec11
@@ -168,6 +175,7 @@ export function compileToServerIR(graph, options = {}) {
168
175
  ...(queries.length > 0 ? { queries } : {}),
169
176
  ...(relationships.length > 0 ? { relationships } : {}),
170
177
  ...(readPolicies.length > 0 ? { readPolicies } : {}),
178
+ ...(workflows.length > 0 ? { workflows } : {}),
171
179
  };
172
180
  // Only the definitions the authority's own rules reach. A calculation used by the client
173
181
  // alone decides nothing here, and the Server IR carries nothing that decides nothing.
@@ -199,6 +207,7 @@ export function compileToServerIR(graph, options = {}) {
199
207
  usesExternalIOVocabulary(document) ? 'axiom.server.v5' : 'axiom.server.v1',
200
208
  usesQueryVocabulary(document) ? 'axiom.server.v6' : 'axiom.server.v1',
201
209
  usesMigrationVocabulary(document) ? 'axiom.server.v7' : 'axiom.server.v1',
210
+ usesWorkflowVocabulary(document) ? 'axiom.server.v8' : 'axiom.server.v1',
202
211
  ];
203
212
  const contract = contractCandidates.reduce(maxContract);
204
213
  return { contract, ...document };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cynodia/axiom-compiler",
3
- "version": "0.13.1-alpha.1",
3
+ "version": "0.14.0-alpha.2",
4
4
  "description": "Normalizes an Axiom application graph and emits a self-contained page.",
5
5
  "license": "MIT",
6
6
  "author": "AskTech AS",
@@ -31,8 +31,8 @@
31
31
  }
32
32
  },
33
33
  "dependencies": {
34
- "@cynodia/axiom-core": "0.13.1-alpha.1",
35
- "@cynodia/axiom-runtime": "0.13.1-alpha.1"
34
+ "@cynodia/axiom-core": "0.14.0-alpha.2",
35
+ "@cynodia/axiom-runtime": "0.14.0-alpha.2"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "tsc -b tsconfig.json tsconfig.test.json",