@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 +27 -4
- package/docs/ACTIONS_TRANSACTIONS.md +1 -1
- package/docs/AGENT_API.md +1 -1
- package/docs/AGENT_REFERENCE.md +2 -2
- package/docs/ANTI_PATTERNS.md +1 -1
- package/docs/AUTHORITY.md +1 -1
- package/docs/CONSTRAINTS.md +1 -1
- package/docs/EXPRESSIONS.md +1 -1
- package/docs/GRAPH_MODEL.md +2 -2
- package/docs/LOCATIONS.md +1 -1
- package/docs/PRESENTATION.md +1 -1
- package/docs/RUNTIME.md +1 -1
- package/docs/SEMANTIC_CONTRACT.md +1 -1
- package/docs/STATE.md +1 -1
- package/docs/UI.md +1 -1
- package/docs/VALIDATION.md +1 -1
- package/package.json +5 -5
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.
|
|
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
|
|
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
|
package/docs/AGENT_API.md
CHANGED
package/docs/AGENT_REFERENCE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent reference
|
|
2
2
|
|
|
3
|
-
Axiom 0.7.0-alpha.
|
|
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.
|
|
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
|
package/docs/ANTI_PATTERNS.md
CHANGED
package/docs/AUTHORITY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Authority
|
|
2
2
|
|
|
3
|
-
Axiom 0.7.0-alpha.
|
|
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
|
package/docs/CONSTRAINTS.md
CHANGED
package/docs/EXPRESSIONS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Expressions
|
|
2
2
|
|
|
3
|
-
Axiom 0.7.0-alpha.
|
|
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
|
|
package/docs/GRAPH_MODEL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Graph model
|
|
2
2
|
|
|
3
|
-
Axiom 0.7.0-alpha.
|
|
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.
|
|
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
package/docs/PRESENTATION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Presentation
|
|
2
2
|
|
|
3
|
-
Axiom 0.7.0-alpha.
|
|
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
|
# Semantic contract
|
|
2
2
|
|
|
3
|
-
Axiom 0.7.0-alpha.
|
|
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
package/docs/UI.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# UI
|
|
2
2
|
|
|
3
|
-
Axiom 0.7.0-alpha.
|
|
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`:
|
package/docs/VALIDATION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Validation
|
|
2
2
|
|
|
3
|
-
Axiom 0.7.0-alpha.
|
|
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.
|
|
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.
|
|
36
|
-
"@cynodia/axiom-runtime": "0.7.0-alpha.
|
|
37
|
-
"@cynodia/axiom-compiler": "0.7.0-alpha.
|
|
38
|
-
"@cynodia/axiom-agent-api": "0.7.0-alpha.
|
|
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"
|