@cynodia/axiom 0.7.0-alpha.1 → 0.7.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.
package/README.md CHANGED
@@ -6,13 +6,15 @@ Axiom represents application behavior, state, UI structure and presentation as s
6
6
  semantic data executed by generic runtimes. An application is a typed graph, not source
7
7
  files: the JavaScript and HTML that reach the browser are output, and are never edited.
8
8
 
9
- **Status: experimental / alpha (0.6.0-alpha.x).** The API may change between alpha
9
+ **Status: experimental / alpha (0.7.0-alpha.x).** The API may change between alpha
10
10
  releases. The documentation in `docs/` describes this exact version.
11
11
 
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- npm install @cynodia/axiom
15
+ npm install @cynodia/axiom # the graph, compiler, runtime and agent API
16
+ npm install @cynodia/axiom-ui # semantic UI authoring patterns (build time only)
17
+ npm install @cynodia/axiom-server # only if the application has an authority
16
18
  ```
17
19
 
18
20
  ## Canonical mental model
@@ -26,15 +28,24 @@ npm install @cynodia/axiom
26
28
  | `ActionDef` | A transactional semantic operation. |
27
29
  | `ConstraintDef` | An invariant over proposed state. |
28
30
  | `TransitionConstraintDef` | An invariant over previous committed state → proposed state. |
29
- | UI nodes | Semantic interaction structure. |
31
+ | UI nodes | Semantic interaction structure (view, container, text, repeat, field-display, form, input, button, conditional, diagnostic, dialog). |
30
32
  | `Presentation` | Semantic UX intent. Roles and tokens, never CSS. |
31
33
  | `Theme` | Translation of presentation intent into visual design. |
32
34
  | Renderer | Platform-specific materialization. Not part of the graph. |
35
+ | `StateDef.authority` | Who may commit a value: the client, or the server. The one declaration the split follows from. |
36
+ | `ServerIR` | The half an authority executes. Portable JSON, frozen as `axiom.server.v1`. |
37
+ | Semantic protocol | What a client may ask for: named actions with arguments, never mutation programs. |
38
+ | `PersistenceAdapter` | Where a decided value survives. Not part of the semantics. |
33
39
 
34
40
  ```text
35
- ApplicationGraph → validateGraph → compileToIR → runtime (+ theme → renderer) → application
41
+ ApplicationGraph → validateGraph → compileToIR → runtime (+ theme → renderer) → page
42
+ → compileToServerIR → authority (+ persistence)
36
43
  ```
37
44
 
45
+ Authority is **derived, never declared twice**: an action that writes server-owned state is a
46
+ server action, so where code runs cannot disagree with what it does. Full model:
47
+ `docs/AUTHORITY.md`.
48
+
38
49
  ## Load-bearing invariants
39
50
 
40
51
  Know these before authoring an application. Each is stated in full in
@@ -53,6 +64,10 @@ Know these before authoring an application. Each is stated in full in
53
64
  11. **`null` and `[]` are distinct.** `null` fails a collection operator; `[]` does not. A collection is truthy only when non-empty.
54
65
  12. **`required(x)` asks only whether a value exists.** `required([])` is `true`.
55
66
  13. **A theme changes presentation only.**
67
+ 14. **A client cannot commit server-authoritative state**, by any path. An action that writes it executes on the authority.
68
+ 15. **The client is untrusted.** Guards, authorization and argument types are checked again on the authority.
69
+ 16. **A client requests semantic actions, never mutation programs.** The protocol carries no way to send operations.
70
+ 17. **`axiom.server.v1` is frozen and language-independent.** Its semantics are defined by `docs/AUTHORITY.md`, the published JSON Schemas and the conformance fixtures — not by this implementation.
56
71
 
57
72
  ## Minimal application
58
73
 
@@ -126,6 +141,7 @@ The complete operational contract ships with this package, in `docs/`.
126
141
  | Semantic UI nodes and bindings | `docs/UI.md` |
127
142
  | Presentation, UX intent, themes, formatting | `docs/PRESENTATION.md` |
128
143
  | Runtime API and diagnostic codes | `docs/RUNTIME.md` |
144
+ | Server authority, Server IR, the protocol and persistence | `docs/AUTHORITY.md` |
129
145
  | Machine queries and graph transformations | `docs/AGENT_API.md` |
130
146
  | Validation codes | `docs/VALIDATION.md` |
131
147
  | Mistakes that compile but are wrong | `docs/ANTI_PATTERNS.md` |
@@ -144,6 +160,13 @@ This package re-exports four, which can also be installed individually:
144
160
  | `@cynodia/axiom-runtime` | State store, evaluation, mutation engine, constraint checking, renderer, routing. |
145
161
  | `@cynodia/axiom-agent-api` | Semantic and presentation queries, mutation impact, transactional transformations. |
146
162
 
163
+ Two published packages are deliberately **not** re-exported, and are installed separately:
164
+
165
+ | Package | Why it stands apart |
166
+ | --- | --- |
167
+ | `@cynodia/axiom-server` | The authoritative runtime: Server IR execution, persistence adapters, the semantic protocol and the Node host. It imports `node:http` and `node:sqlite`, and a browser bundle must not. |
168
+ | `@cynodia/axiom-ui` | Semantic UI authoring patterns, expanded into ordinary graph nodes at **build time**. Re-exporting it would make every application carry an authoring dependency forever, and would make "this application no longer needs the toolkit" impossible to state or to test. |
169
+
147
170
  ## License
148
171
 
149
172
  MIT
@@ -1,6 +1,6 @@
1
1
  # Actions and transactions
2
2
 
3
- Axiom 0.7.0-alpha.1. An action is behavior expressed as data, executed as a transaction.
3
+ Axiom 0.7.0-alpha.2. An action is behavior expressed as data, executed as a transaction.
4
4
 
5
5
  ```ts
6
6
  {
package/docs/AGENT_API.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Agent API
2
2
 
3
- Axiom 0.7.0-alpha.1. The machine-facing interface. Agents query semantics and apply
3
+ Axiom 0.7.0-alpha.2. The machine-facing interface. Agents query semantics and apply
4
4
  structural transformations; they never edit generated code.
5
5
 
6
6
  ```ts
@@ -1,6 +1,6 @@
1
1
  # Agent reference
2
2
 
3
- Axiom 0.7.0-alpha.1. Compressed operational contract. Read this plus the `.d.ts`
3
+ Axiom 0.7.0-alpha.2. Compressed operational contract. Read this plus the `.d.ts`
4
4
  declarations before authoring or modifying an Axiom application.
5
5
 
6
6
  Formal guarantees: [`SEMANTIC_CONTRACT.md`](SEMANTIC_CONTRACT.md). Mistakes that compile:
@@ -31,7 +31,7 @@ One canonical term per concept. These are not interchangeable.
31
31
  ## Graph construction
32
32
 
33
33
  ```ts
34
- const graph = new ApplicationGraph(id, name); // version defaults to '0.6.0'
34
+ const graph = new ApplicationGraph(id, name); // version defaults to '0.7.0'
35
35
  graph.addNode<StateDef>({ id, kind: 'state', ... }); // returns NodeId; throws if id exists
36
36
  graph.getNode<StateDef>(id); // deep clone, or undefined
37
37
  graph.updateNode(node); // write a modified node back
@@ -1,6 +1,6 @@
1
1
  # Anti-patterns
2
2
 
3
- Axiom 0.7.0-alpha.1. Each of these compiles. Each is wrong. Each is followed by the correct
3
+ Axiom 0.7.0-alpha.2. Each of these compiles. Each is wrong. Each is followed by the correct
4
4
  alternative.
5
5
 
6
6
  ## 1. Field names as entity runtime keys
package/docs/AUTHORITY.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Authority
2
2
 
3
- Axiom 0.7.0-alpha.1. How an application crosses the trust boundary.
3
+ Axiom 0.7.0-alpha.2. How an application crosses the trust boundary.
4
4
 
5
5
  Until 0.5.x an Axiom application executed locally. 0.6 adds an **authority**: a generic
6
6
  runtime that owns state, decides mutations and persists them. The same semantic graph
@@ -1,6 +1,6 @@
1
1
  # Constraints
2
2
 
3
- Axiom 0.7.0-alpha.1. Two constructs, answering different questions. They are not
3
+ Axiom 0.7.0-alpha.2. Two constructs, answering different questions. They are not
4
4
  interchangeable.
5
5
 
6
6
  | | Question | Sees |
@@ -1,6 +1,6 @@
1
1
  # Expressions
2
2
 
3
- Axiom 0.7.0-alpha.1. An expression describes **what value is computed**. It is a tree of
3
+ Axiom 0.7.0-alpha.2. An expression describes **what value is computed**. It is a tree of
4
4
  plain data, never source text and never a callback. Evaluation is pure: an expression MUST
5
5
  NOT change state.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Graph model
2
2
 
3
- Axiom 0.7.0-alpha.1. The `ApplicationGraph` is the authoritative representation of an
3
+ Axiom 0.7.0-alpha.2. The `ApplicationGraph` is the authoritative representation of an
4
4
  application. Everything else — the IR, the page, the DOM — is derived from it and is never
5
5
  edited.
6
6
 
@@ -25,7 +25,7 @@ edited.
25
25
  ## API
26
26
 
27
27
  ```ts
28
- const graph = new ApplicationGraph(id, name, version?); // version defaults to '0.6.0'
28
+ const graph = new ApplicationGraph(id, name, version?); // version defaults to '0.7.0'
29
29
 
30
30
  graph.addNode<T>(node): NodeId // generates an id if omitted; throws if it exists
31
31
  graph.getNode<T>(id): T | undefined // deep clone
package/docs/LOCATIONS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Locations
2
2
 
3
- Axiom 0.7.0-alpha.1.
3
+ Axiom 0.7.0-alpha.2.
4
4
 
5
5
  ```text
6
6
  Expression = a value
@@ -1,6 +1,6 @@
1
1
  # Presentation
2
2
 
3
- Axiom 0.7.0-alpha.1. Presentation is **semantic UX intent**, expressed as data on a UI
3
+ Axiom 0.7.0-alpha.2. Presentation is **semantic UX intent**, expressed as data on a UI
4
4
  node. It names roles, tokens and device classes. It never names a colour, a length, a media
5
5
  query or a CSS property.
6
6
 
package/docs/RUNTIME.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Runtime
2
2
 
3
- Axiom 0.7.0-alpha.1. The runtime executes an `ApplicationIR`. It is domain-independent: it
3
+ Axiom 0.7.0-alpha.2. The runtime executes an `ApplicationIR`. It is domain-independent: it
4
4
  contains no knowledge of any application.
5
5
 
6
6
  ## Constructing
@@ -1,6 +1,6 @@
1
1
  # Semantic contract
2
2
 
3
- Axiom 0.7.0-alpha.1. Runtime guarantees, stated formally. This file defines behavior; it
3
+ Axiom 0.7.0-alpha.2. Runtime guarantees, stated formally. This file defines behavior; it
4
4
  does not teach. Where this file and any specification in `../specs/` disagree, this file
5
5
  describes the implementation and is authoritative.
6
6
 
package/docs/STATE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # State
2
2
 
3
- Axiom 0.7.0-alpha.1. A `StateDef` is a named application value: stored, or computed from
3
+ Axiom 0.7.0-alpha.2. A `StateDef` is a named application value: stored, or computed from
4
4
  other state.
5
5
 
6
6
  ```ts
package/docs/UI.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # UI
2
2
 
3
- Axiom 0.7.0-alpha.1. Eleven semantic UI node kinds describe **what exists and what it does**.
3
+ Axiom 0.7.0-alpha.2. Eleven semantic UI node kinds describe **what exists and what it does**.
4
4
  How it looks is [presentation](PRESENTATION.md).
5
5
 
6
6
  All eleven share `UIBase`:
@@ -1,6 +1,6 @@
1
1
  # Validation
2
2
 
3
- Axiom 0.7.0-alpha.1. Validation is authoring-time structural checking. It is not the same
3
+ Axiom 0.7.0-alpha.2. Validation is authoring-time structural checking. It is not the same
4
4
  as runtime constraint evaluation — see [`CONSTRAINTS.md`](CONSTRAINTS.md) for the four
5
5
  layers of correctness.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cynodia/axiom",
3
- "version": "0.7.0-alpha.1",
3
+ "version": "0.7.0-alpha.2",
4
4
  "description": "AI-native semantic web application framework.",
5
5
  "license": "MIT",
6
6
  "author": "AskTech AS",
@@ -32,10 +32,10 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@cynodia/axiom-core": "0.7.0-alpha.1",
36
- "@cynodia/axiom-runtime": "0.7.0-alpha.1",
37
- "@cynodia/axiom-compiler": "0.7.0-alpha.1",
38
- "@cynodia/axiom-agent-api": "0.7.0-alpha.1"
35
+ "@cynodia/axiom-core": "0.7.0-alpha.2",
36
+ "@cynodia/axiom-runtime": "0.7.0-alpha.2",
37
+ "@cynodia/axiom-compiler": "0.7.0-alpha.2",
38
+ "@cynodia/axiom-agent-api": "0.7.0-alpha.2"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsc -b tsconfig.json"