@cynodia/axiom 0.9.0-alpha.1 → 0.9.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/AGENTS.md +68 -0
- package/README.md +71 -25
- package/docs/ACTIONS_TRANSACTIONS.md +1 -1
- package/docs/AGENT_API.md +1 -1
- package/docs/AGENT_REFERENCE.md +59 -2
- package/docs/ANTI_PATTERNS.md +1 -1
- package/docs/AUTHORITY.md +1 -1
- package/docs/CONSTRAINTS.md +1 -1
- package/docs/EFFECTS.md +1 -1
- package/docs/EVENTS.md +1 -1
- package/docs/EXPRESSIONS.md +1 -1
- package/docs/GRAPH_MODEL.md +1 -1
- package/docs/INTEGRATIONS.md +1 -1
- 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/STORAGE.md +1 -1
- package/docs/SUBSCRIPTIONS.md +1 -1
- package/docs/TRIGGERS.md +1 -1
- package/docs/UI.md +5 -3
- package/docs/VALIDATION.md +1 -1
- package/llms.txt +65 -0
- package/package.json +7 -5
package/AGENTS.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Instructions for AI coding agents
|
|
2
|
+
|
|
3
|
+
You are consuming **Axiom** as an application framework. This file is routing only; the
|
|
4
|
+
contract lives in `docs/`.
|
|
5
|
+
|
|
6
|
+
## Read this first
|
|
7
|
+
|
|
8
|
+
**Read [`docs/AGENT_REFERENCE.md`](docs/AGENT_REFERENCE.md), in full, before writing any
|
|
9
|
+
application code.** It is the compressed operational contract for application authors and it
|
|
10
|
+
ships inside this package.
|
|
11
|
+
|
|
12
|
+
Then escalate in this order, and only as far as the question requires:
|
|
13
|
+
|
|
14
|
+
1. **`docs/AGENT_REFERENCE.md`** — the contract. Start here, every time.
|
|
15
|
+
2. **The `.d.ts` declarations in `dist/`** — the API contract. Signatures, unions and
|
|
16
|
+
branded types are authoritative there.
|
|
17
|
+
3. **The focused document in `docs/`** for the topic — the full contract for one area. See
|
|
18
|
+
the map in [`README.md`](README.md#documentation-map).
|
|
19
|
+
4. **A minimal public-API probe** — build the smallest graph that isolates the question,
|
|
20
|
+
call `validateGraph` and read the returned codes. Diagnostics are structured and name
|
|
21
|
+
what is wrong.
|
|
22
|
+
|
|
23
|
+
Only if all four leave the question open is reading framework implementation source
|
|
24
|
+
justified. That is framework debugging, not application authoring.
|
|
25
|
+
|
|
26
|
+
## Do not
|
|
27
|
+
|
|
28
|
+
- **Do not clone or reverse-engineer the Axiom repository to learn normal usage.** Everything
|
|
29
|
+
needed to author an application is in this package. There is no published Axiom CLI.
|
|
30
|
+
- **Do not search the web or scrape npm for documentation.** This package is the primary
|
|
31
|
+
source, and it describes this exact version.
|
|
32
|
+
- **Do not read, edit or patch generated output.** The emitted JavaScript, HTML and CSS are
|
|
33
|
+
build products. Nothing is authored there.
|
|
34
|
+
- **Do not guess the API from React, Vue, Angular, Svelte or Express conventions.** Axiom has
|
|
35
|
+
no component, no hook, no JSX, no route handler, no ORM and no callback anywhere in the
|
|
36
|
+
graph. Guessing from those conventions produces graphs `validateGraph` rejects.
|
|
37
|
+
- **Do not reach for an escape hatch.** There is no `formatter: fn`, no `validator: fn`, no
|
|
38
|
+
raw-CSS channel and no stored closure. If a capability seems missing, it is expressed as a
|
|
39
|
+
graph node; look it up rather than working around it.
|
|
40
|
+
|
|
41
|
+
## Prefer canonical Axiom semantics
|
|
42
|
+
|
|
43
|
+
Each row is a pointer, not the rule. The rule itself lives in
|
|
44
|
+
[`docs/AGENT_REFERENCE.md`](docs/AGENT_REFERENCE.md) and in the topic document; read it
|
|
45
|
+
there rather than treating this table as a specification.
|
|
46
|
+
|
|
47
|
+
| Instead of | Use |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| Mutating an object an expression returned | A `Location`, addressing the writable position |
|
|
50
|
+
| A field name key in a record | The `FieldId` — runtime records are keyed by field id |
|
|
51
|
+
| A hand-written validation function | A `ConstraintDef` or `TransitionConstraintDef` |
|
|
52
|
+
| A hidden control to forbid an operation | A guard or a transition constraint. `hidden` is not `forbidden` |
|
|
53
|
+
| CSS, a colour or a length | A presentation role or token, and a `Theme` |
|
|
54
|
+
| A route handler, controller or SQL statement | `StateDef.authority` plus an `ActionDef` |
|
|
55
|
+
| A callback for new capability | The graph node that expresses it |
|
|
56
|
+
|
|
57
|
+
## When something fails
|
|
58
|
+
|
|
59
|
+
`validateGraph` and the runtime both report structured diagnostics with a code and a path.
|
|
60
|
+
Match on the code, never on the message, and look the code up:
|
|
61
|
+
[`docs/VALIDATION.md`](docs/VALIDATION.md) for authoring-time codes,
|
|
62
|
+
[`docs/RUNTIME.md`](docs/RUNTIME.md) for runtime codes. A construct that validates and then
|
|
63
|
+
does nothing is a framework defect, not something to work around — report it.
|
|
64
|
+
|
|
65
|
+
Mistakes that compile but are wrong are collected in
|
|
66
|
+
[`docs/ANTI_PATTERNS.md`](docs/ANTI_PATTERNS.md). Read it before the **first** attempt, not the
|
|
67
|
+
second: collection nulls, how a `repeat` binds its current item, and addressing a collection
|
|
68
|
+
member by identity rather than index all shape a first draft rather than repairing it.
|
package/README.md
CHANGED
|
@@ -1,13 +1,39 @@
|
|
|
1
1
|
# Axiom
|
|
2
2
|
|
|
3
|
-
AI-native semantic application framework.
|
|
3
|
+
AI-native semantic application framework. An application is a typed semantic graph, not
|
|
4
|
+
source files.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
## AI agents: read this first
|
|
7
|
+
|
|
8
|
+
**Read [`docs/AGENT_REFERENCE.md`](docs/AGENT_REFERENCE.md) before writing any Axiom code.**
|
|
9
|
+
It ships inside this package, so no repository access, web search or framework source
|
|
10
|
+
inspection is needed to obtain the contract.
|
|
11
|
+
|
|
12
|
+
| | |
|
|
13
|
+
| --- | --- |
|
|
14
|
+
| **What** | A semantic application framework. State, behavior, constraints, UI structure, presentation and authority are structured data executed by generic runtimes. |
|
|
15
|
+
| **Who for** | AI-authored applications. The primary author of an Axiom application is a coding agent; human readability is explicitly not the optimization target. |
|
|
16
|
+
| **Start** | [`docs/AGENT_REFERENCE.md`](docs/AGENT_REFERENCE.md) — the compressed operational contract for application authors. |
|
|
17
|
+
| **API contract** | The published `.d.ts` declarations in `dist/`. Authoritative for signatures, unions and branded types. |
|
|
18
|
+
| **Deeper semantics** | The focused documents in `docs/` — [map below](#documentation-map). |
|
|
19
|
+
| **Escalation** | `docs/AGENT_REFERENCE.md` → `.d.ts` → the focused `docs/` document for the topic → a minimal public-API probe. |
|
|
20
|
+
|
|
21
|
+
Axiom's vocabulary is deliberately unlike React, Vue, Angular, Svelte or Express: there is no
|
|
22
|
+
component, no hook, no JSX, no route handler, no ORM and no callback anywhere in the graph.
|
|
23
|
+
Guessing the API from those conventions produces graphs `validateGraph` rejects, so reading
|
|
24
|
+
the reference first is cheaper than any number of attempts.
|
|
25
|
+
|
|
26
|
+
**Reading the framework's implementation source should not be necessary to author an
|
|
27
|
+
application.** `docs/` plus the `.d.ts` declarations are intended to be sufficient on their
|
|
28
|
+
own. Source inspection is a legitimate tool for debugging Axiom itself; it is not the way to
|
|
29
|
+
discover normal consumer usage, and cloning the repository for that purpose is a sign the
|
|
30
|
+
documentation above was missed.
|
|
31
|
+
|
|
32
|
+
Shorter forms of the same routing: [`AGENTS.md`](AGENTS.md) and [`llms.txt`](llms.txt), both
|
|
33
|
+
at this package's root.
|
|
8
34
|
|
|
9
35
|
**Status: experimental / alpha.** The API may change between alpha releases. The
|
|
10
|
-
documentation in `docs/` describes this exact version.
|
|
36
|
+
documentation in `docs/` describes this exact version, `0.9.0-alpha.2`.
|
|
11
37
|
|
|
12
38
|
## Installation
|
|
13
39
|
|
|
@@ -17,6 +43,17 @@ npm install @cynodia/axiom-ui # semantic UI authoring patterns (build ti
|
|
|
17
43
|
npm install @cynodia/axiom-server # only if the application has an authority
|
|
18
44
|
```
|
|
19
45
|
|
|
46
|
+
Every release of this project is a pre-release and npm's `latest` tag points at it, so the
|
|
47
|
+
plain command above installs the current version. **There is no `alpha` dist-tag** — the tag
|
|
48
|
+
was removed once it stopped tracking releases, and `npm install @cynodia/axiom@alpha` now
|
|
49
|
+
fails with a 404. Pin the exact version instead when one is needed:
|
|
50
|
+
`npm install @cynodia/axiom@0.9.0-alpha.2`.
|
|
51
|
+
|
|
52
|
+
These are ES modules compiled to ES2022; import them with `import`, not `require`. There is
|
|
53
|
+
no published Axiom CLI. `@cynodia/axiom-server`'s SQLite persistence adapter additionally
|
|
54
|
+
needs a Node build that provides `node:sqlite` (Node 22 or newer); `isSqliteAvailable()`
|
|
55
|
+
reports its absence rather than failing at import.
|
|
56
|
+
|
|
20
57
|
## Canonical mental model
|
|
21
58
|
|
|
22
59
|
| Concept | Is |
|
|
@@ -124,30 +161,39 @@ console.log(app.getState(COUNT)); // 1
|
|
|
124
161
|
|
|
125
162
|
`compileToHtml(graph)` emits the same application as one self-contained page.
|
|
126
163
|
|
|
127
|
-
## Documentation
|
|
164
|
+
## Documentation map
|
|
128
165
|
|
|
129
|
-
The complete operational contract ships with this package, in `docs/`.
|
|
166
|
+
The complete operational contract ships with this package, in `docs/`. Every path below
|
|
167
|
+
resolves inside the installed package. Read `docs/AGENT_REFERENCE.md` first; reach for a
|
|
168
|
+
focused document when the reference is not specific enough for the question at hand.
|
|
130
169
|
|
|
131
170
|
| Need to understand | Read |
|
|
132
171
|
| --- | --- |
|
|
133
|
-
| Compressed
|
|
134
|
-
| Exact runtime guarantees | `docs/SEMANTIC_CONTRACT.md` |
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
172
|
+
| **Compressed contract for authoring or modifying an app — start here** | [`docs/AGENT_REFERENCE.md`](docs/AGENT_REFERENCE.md) |
|
|
173
|
+
| Exact runtime guarantees, stated formally | [`docs/SEMANTIC_CONTRACT.md`](docs/SEMANTIC_CONTRACT.md) |
|
|
174
|
+
| Mistakes that compile but are wrong | [`docs/ANTI_PATTERNS.md`](docs/ANTI_PATTERNS.md) |
|
|
175
|
+
| Graph, node kinds, ids, types, entity value representation | [`docs/GRAPH_MODEL.md`](docs/GRAPH_MODEL.md) |
|
|
176
|
+
| Every expression kind, builtin, scope, presence and null rule | [`docs/EXPRESSIONS.md`](docs/EXPRESSIONS.md) |
|
|
177
|
+
| Addressing writable positions | [`docs/LOCATIONS.md`](docs/LOCATIONS.md) |
|
|
178
|
+
| Stored, derived, draft and ephemeral state | [`docs/STATE.md`](docs/STATE.md) |
|
|
179
|
+
| Actions, operations, guards, transactions, iteration | [`docs/ACTIONS_TRANSACTIONS.md`](docs/ACTIONS_TRANSACTIONS.md) |
|
|
180
|
+
| Constraints and transition constraints | [`docs/CONSTRAINTS.md`](docs/CONSTRAINTS.md) |
|
|
181
|
+
| Semantic UI nodes, interaction primitives and bindings | [`docs/UI.md`](docs/UI.md) |
|
|
182
|
+
| Presentation, UX intent, themes, value formatting | [`docs/PRESENTATION.md`](docs/PRESENTATION.md) |
|
|
183
|
+
| Runtime API, startup lifecycle and diagnostic codes | [`docs/RUNTIME.md`](docs/RUNTIME.md) |
|
|
184
|
+
| Validation codes and what rejects a graph | [`docs/VALIDATION.md`](docs/VALIDATION.md) |
|
|
185
|
+
| Server authority, the trust boundary, Server IR, the protocol, persistence, deployment | [`docs/AUTHORITY.md`](docs/AUTHORITY.md) |
|
|
186
|
+
| External systems: integration definitions, query operations, adapters, secrets | [`docs/INTEGRATIONS.md`](docs/INTEGRATIONS.md) |
|
|
187
|
+
| External effects: the outbox, retries, delivery guarantees, outcomes | [`docs/EFFECTS.md`](docs/EFFECTS.md) |
|
|
188
|
+
| Typed events, webhooks, the dispatch pipeline | [`docs/EVENTS.md`](docs/EVENTS.md) |
|
|
189
|
+
| Timed and lifecycle execution, event-invoked actions | [`docs/TRIGGERS.md`](docs/TRIGGERS.md) |
|
|
190
|
+
| Live inbound streams: lifecycle, delivery, deduplication, backpressure | [`docs/SUBSCRIPTIONS.md`](docs/SUBSCRIPTIONS.md) |
|
|
191
|
+
| Binary data: `BlobRef`, upload, download, authorization, orphans | [`docs/STORAGE.md`](docs/STORAGE.md) |
|
|
192
|
+
| Machine queries, mutation impact and graph transformations | [`docs/AGENT_API.md`](docs/AGENT_API.md) |
|
|
193
|
+
|
|
194
|
+
`docs/AGENT_REFERENCE.md` plus the `.d.ts` declarations are intended to be sufficient on
|
|
195
|
+
their own. If they are not, that is a documentation defect worth reporting rather than a
|
|
196
|
+
reason to read framework source.
|
|
151
197
|
|
|
152
198
|
## What is in the box
|
|
153
199
|
|
package/docs/AGENT_API.md
CHANGED
package/docs/AGENT_REFERENCE.md
CHANGED
|
@@ -1,11 +1,45 @@
|
|
|
1
1
|
# Agent reference
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.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:
|
|
7
7
|
[`ANTI_PATTERNS.md`](ANTI_PATTERNS.md).
|
|
8
8
|
|
|
9
|
+
## Start here
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @cynodia/axiom # graph, compiler, runtime, agent API
|
|
13
|
+
npm install @cynodia/axiom-ui # semantic UI authoring patterns, build time only
|
|
14
|
+
npm install @cynodia/axiom-server # only if a StateDef declares server authority
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Everything is imported from `@cynodia/axiom`; the four re-exported packages need not be
|
|
18
|
+
installed individually. There is no published CLI.
|
|
19
|
+
|
|
20
|
+
A complete runnable skeleton — graph, state, action, UI, route, compile, run — is the
|
|
21
|
+
minimal application in [`../README.md`](../README.md). Read this document for the rules;
|
|
22
|
+
copy that for the shape.
|
|
23
|
+
|
|
24
|
+
**Escalation order.** This document → the `.d.ts` declarations → the focused document for the
|
|
25
|
+
topic → a minimal public-API probe: build the smallest graph that isolates the question, call
|
|
26
|
+
`validateGraph`, read the returned codes. Reading Axiom's own implementation source is for
|
|
27
|
+
debugging the framework, not for authoring an application.
|
|
28
|
+
|
|
29
|
+
**How much of this to read.** Everything up to and including
|
|
30
|
+
[Agent API](#agent-api) applies to every Axiom application. If no `StateDef` declares
|
|
31
|
+
`authority: 'server'`, the application is client-only and
|
|
32
|
+
[SERVER AUTHORITY](#server-authority) onwards — authority, integrations, effects, triggers,
|
|
33
|
+
subscriptions, storage — describes capability it does not use; skim the headings and stop.
|
|
34
|
+
Read [`ANTI_PATTERNS.md`](ANTI_PATTERNS.md) **before** the first attempt, not the second:
|
|
35
|
+
collection nulls, repeat scope binding and identity-over-index selectors all shape a first
|
|
36
|
+
draft.
|
|
37
|
+
|
|
38
|
+
**Do not guess from React, Vue, Angular, Svelte or Express.** Axiom has no component, no hook,
|
|
39
|
+
no JSX, no route handler, no ORM and no callback in the graph. There is no `formatter: fn`, no
|
|
40
|
+
`validator: fn`, no raw-CSS channel and no stored closure anywhere; new capability arrives as
|
|
41
|
+
an inspectable node, never as a function you supply.
|
|
42
|
+
|
|
9
43
|
## Glossary
|
|
10
44
|
|
|
11
45
|
One canonical term per concept. These are not interchangeable.
|
|
@@ -31,7 +65,7 @@ One canonical term per concept. These are not interchangeable.
|
|
|
31
65
|
## Graph construction
|
|
32
66
|
|
|
33
67
|
```ts
|
|
34
|
-
const graph = new ApplicationGraph(id, name); // version defaults to '0.
|
|
68
|
+
const graph = new ApplicationGraph(id, name); // version defaults to '0.9.0'
|
|
35
69
|
graph.addNode<StateDef>({ id, kind: 'state', ... }); // returns NodeId; throws if id exists
|
|
36
70
|
graph.getNode<StateDef>(id); // deep clone, or undefined
|
|
37
71
|
graph.updateNode(node); // write a modified node back
|
|
@@ -323,6 +357,13 @@ boolean types (`TYPE_MISMATCH`).
|
|
|
323
357
|
Every kind is in `UI_NODE_KINDS`: `view` `container` `text` `repeat` `field-display` `form`
|
|
324
358
|
`input` `button` `conditional` `diagnostic` `dialog`. Detail: [`UI.md`](UI.md).
|
|
325
359
|
|
|
360
|
+
Every kind carries the same base, and `visibleWhen` lives here rather than in
|
|
361
|
+
`presentation`:
|
|
362
|
+
|
|
363
|
+
```ts
|
|
364
|
+
{ id, kind, name?, visibleWhen?: Expression, presentation?: Presentation, metadata? }
|
|
365
|
+
```
|
|
366
|
+
|
|
326
367
|
- `RepeatNode` binds the current item to **the repeat node's own id**; the template refers to it as `ref(repeatNodeId)`.
|
|
327
368
|
- `InputNode.binding` is `{ location }` — no expression, no field id. An input write goes through the same mutation engine and transaction as an action.
|
|
328
369
|
- `ButtonNode.arguments` is keyed by **action parameter id**.
|
|
@@ -412,6 +453,22 @@ presentation: {
|
|
|
412
453
|
}
|
|
413
454
|
```
|
|
414
455
|
|
|
456
|
+
Every value is a closed vocabulary, exported as an array; a token outside it is a validation
|
|
457
|
+
**error**, never a silently ignored value. The four an application reaches for constantly:
|
|
458
|
+
|
|
459
|
+
| Property | Vocabulary | Array |
|
|
460
|
+
| --- | --- | --- |
|
|
461
|
+
| `layout` | `vertical` `horizontal` `grid` `stack` | `LAYOUT_KINDS` |
|
|
462
|
+
| `gap`, `padding` | `none` `xsmall` `small` `medium` `large` `xlarge` | `SPACING_TOKENS` |
|
|
463
|
+
| `textRole` | `body` `caption` `label` `heading` `title` `display` | `TEXT_ROLES` |
|
|
464
|
+
| `density` | `compact` `comfortable` `spacious` | `DENSITIES` |
|
|
465
|
+
|
|
466
|
+
`layout: 'horizontal'` is shorthand for `layout: { kind: 'horizontal', gap?, align?, justify?,
|
|
467
|
+
wrap?, columns? }` — a bare token or the object, never a third form. `stack` is a tight
|
|
468
|
+
vertical column, not overlapping children. Every other vocabulary — roles, UX roles, surfaces,
|
|
469
|
+
treatments, icons, control variants, sizing, value formats, device classes —
|
|
470
|
+
is in [`PRESENTATION.md`](PRESENTATION.md); read it before guessing a token.
|
|
471
|
+
|
|
415
472
|
Resolution precedence, lowest first:
|
|
416
473
|
|
|
417
474
|
```text
|
package/docs/ANTI_PATTERNS.md
CHANGED
package/docs/AUTHORITY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Authority
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.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/EFFECTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Effects
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.0-alpha.2. External effects are not rollback-capable state mutations. This file
|
|
4
4
|
is the delivery model; [`AUTHORITY.md`](AUTHORITY.md#external-effects) is the load-bearing
|
|
5
5
|
statement of why, and [`INTEGRATIONS.md`](INTEGRATIONS.md) is the operation vocabulary this
|
|
6
6
|
builds on.
|
package/docs/EVENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Events
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.0-alpha.2. An event is a typed fact — something that happened — never work
|
|
4
4
|
itself. [`AUTHORITY.md`](AUTHORITY.md#external-events) is the load-bearing statement;
|
|
5
5
|
this file is the vocabulary and the webhook delivery mechanism. A **subscription** is the
|
|
6
6
|
other way an external fact becomes an `EventDef` payload — see
|
package/docs/EXPRESSIONS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Expressions
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.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.9.0-alpha.
|
|
3
|
+
Axiom 0.9.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
|
|
package/docs/INTEGRATIONS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Integrations
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.0-alpha.2. How an application declares and calls an external system, without
|
|
4
4
|
embedding a transport, an SDK or a secret in the graph. The authority boundary this
|
|
5
5
|
depends on is [`AUTHORITY.md`](AUTHORITY.md#external-systems); this file is the vocabulary.
|
|
6
6
|
|
package/docs/LOCATIONS.md
CHANGED
package/docs/PRESENTATION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Presentation
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.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.9.0-alpha.
|
|
3
|
+
Axiom 0.9.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/STORAGE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Storage and blobs
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.0-alpha.2. How an application stores, references, serves and deletes binary data —
|
|
4
4
|
an attachment, a document, a photograph, a diagnostic log — with no filesystem path, no
|
|
5
5
|
upload route and no download route anywhere in it.
|
|
6
6
|
|
package/docs/SUBSCRIPTIONS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Subscriptions
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.0-alpha.2. How an application receives a stream of external events — an MQTT
|
|
4
4
|
topic, a WebSocket feed, a queue consumer, a filesystem watcher, a serial port — without a
|
|
5
5
|
client, a socket or a callback anywhere in the graph.
|
|
6
6
|
|
package/docs/TRIGGERS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Triggers
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.0-alpha.2. A `TriggerDef` says **when** an action should be invoked, without
|
|
4
4
|
embedding callback code. `docs/AUTHORITY.md`
|
|
5
5
|
[§ Triggers](AUTHORITY.md#triggers) is the load-bearing statement of the execution model;
|
|
6
6
|
this file is the vocabulary.
|
package/docs/UI.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# UI
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.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`:
|
|
@@ -326,8 +326,10 @@ A pattern is an authoring abstraction and nothing else: after expansion the appl
|
|
|
326
326
|
ordinary Axiom application, and `validateGraph`, `compileToIR`, `AgentAPI` and the runtime know
|
|
327
327
|
nothing about patterns. Ownership defaults to the **declaration**, so editing a generated node
|
|
328
328
|
is drift rather than an edit. The contract travels with the package rather than being restated here: install
|
|
329
|
-
`@cynodia/axiom-ui` and read
|
|
330
|
-
|
|
329
|
+
`@cynodia/axiom-ui` and read, inside **that** package,
|
|
330
|
+
`@cynodia/axiom-ui/docs/TOOLKIT_AGENT_REFERENCE.md`, its `README.md` and
|
|
331
|
+
`@cynodia/axiom-ui/docs/PATTERN_CATALOG.json` — the last is addressable as
|
|
332
|
+
`@cynodia/axiom-ui/catalog`. None of the three is in this package.
|
|
331
333
|
|
|
332
334
|
## Containment
|
|
333
335
|
|
package/docs/VALIDATION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Validation
|
|
2
2
|
|
|
3
|
-
Axiom 0.9.0-alpha.
|
|
3
|
+
Axiom 0.9.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/llms.txt
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Axiom
|
|
2
|
+
|
|
3
|
+
> AI-native semantic application framework, version 0.9.0-alpha.2. An Axiom application is a
|
|
4
|
+
> typed semantic graph — state, behavior, constraints, UI structure, presentation and
|
|
5
|
+
> authority as structured data — executed by generic runtimes. The JavaScript, HTML and CSS
|
|
6
|
+
> that reach a browser are compiler output and are never authored or edited. The primary
|
|
7
|
+
> author of an Axiom application is an AI coding agent.
|
|
8
|
+
|
|
9
|
+
Start with docs/AGENT_REFERENCE.md. Every path below is relative to this package root and
|
|
10
|
+
resolves inside the installed package: no repository access, web search or framework source
|
|
11
|
+
inspection is required to obtain the contract.
|
|
12
|
+
|
|
13
|
+
Escalation order: docs/AGENT_REFERENCE.md → the `.d.ts` declarations in dist/ → the focused
|
|
14
|
+
document for the topic → a minimal public-API probe (build the smallest graph, call
|
|
15
|
+
`validateGraph`, read the codes). Framework implementation source is for debugging Axiom
|
|
16
|
+
itself, not for authoring an application.
|
|
17
|
+
|
|
18
|
+
## Start here
|
|
19
|
+
|
|
20
|
+
- [docs/AGENT_REFERENCE.md](docs/AGENT_REFERENCE.md): The compressed operational contract for application authors. Read first, in full.
|
|
21
|
+
- [AGENTS.md](AGENTS.md): Short routing and prohibition list for coding agents.
|
|
22
|
+
- [README.md](README.md): Mental model, load-bearing invariants, one runnable minimal application, the documentation map.
|
|
23
|
+
- [docs/ANTI_PATTERNS.md](docs/ANTI_PATTERNS.md): Mistakes that compile but are wrong. Read before a second attempt.
|
|
24
|
+
|
|
25
|
+
## API contract
|
|
26
|
+
|
|
27
|
+
- dist/index.d.ts: The public TypeScript declarations. Authoritative for signatures, unions and branded types.
|
|
28
|
+
- [docs/SEMANTIC_CONTRACT.md](docs/SEMANTIC_CONTRACT.md): The runtime guarantees, stated formally.
|
|
29
|
+
- [docs/VALIDATION.md](docs/VALIDATION.md): Every authoring-time validation code and what rejects a graph.
|
|
30
|
+
- [docs/RUNTIME.md](docs/RUNTIME.md): The runtime API, startup lifecycle and every runtime diagnostic code.
|
|
31
|
+
|
|
32
|
+
## Semantics
|
|
33
|
+
|
|
34
|
+
- [docs/GRAPH_MODEL.md](docs/GRAPH_MODEL.md): Graph, node kinds, ids, structured types, entity value representation.
|
|
35
|
+
- [docs/EXPRESSIONS.md](docs/EXPRESSIONS.md): Every expression kind, builtin, scope rule, presence and collection-null semantics.
|
|
36
|
+
- [docs/LOCATIONS.md](docs/LOCATIONS.md): Addressing writable positions. Expressions produce values; locations name where a value lives.
|
|
37
|
+
- [docs/STATE.md](docs/STATE.md): Stored, derived, draft and ephemeral state.
|
|
38
|
+
- [docs/ACTIONS_TRANSACTIONS.md](docs/ACTIONS_TRANSACTIONS.md): Actions, operations, guards, transactions, `for-each` iteration.
|
|
39
|
+
- [docs/CONSTRAINTS.md](docs/CONSTRAINTS.md): Constraints over proposed state and transition constraints over a change.
|
|
40
|
+
|
|
41
|
+
## UI and presentation
|
|
42
|
+
|
|
43
|
+
- [docs/UI.md](docs/UI.md): Semantic UI node kinds, interaction primitives, input bindings, pattern authoring.
|
|
44
|
+
- [docs/PRESENTATION.md](docs/PRESENTATION.md): Semantic UX intent, roles, tokens, device classes, themes, value formatting. No CSS in the graph.
|
|
45
|
+
|
|
46
|
+
## Server, external world, tooling
|
|
47
|
+
|
|
48
|
+
- [docs/AUTHORITY.md](docs/AUTHORITY.md): State authority, the trust boundary, Server IR, the semantic protocol, persistence, authorization, deployment, conformance.
|
|
49
|
+
- [docs/INTEGRATIONS.md](docs/INTEGRATIONS.md): Integration definitions, query operations, adapters, secrets.
|
|
50
|
+
- [docs/EFFECTS.md](docs/EFFECTS.md): Post-commit effects, the transactional outbox, retries, delivery guarantees, effect outcomes.
|
|
51
|
+
- [docs/EVENTS.md](docs/EVENTS.md): Typed event definitions, webhooks, the event dispatch pipeline.
|
|
52
|
+
- [docs/TRIGGERS.md](docs/TRIGGERS.md): Interval, delay, lifecycle and event triggers invoking actions under a system principal.
|
|
53
|
+
- [docs/SUBSCRIPTIONS.md](docs/SUBSCRIPTIONS.md): Live inbound streams, the six-state lifecycle, at-least-once delivery, deduplication, backpressure.
|
|
54
|
+
- [docs/STORAGE.md](docs/STORAGE.md): Portable binary object storage, `BlobRef`, staged-then-committed uploads, read and upload authorization, orphans.
|
|
55
|
+
- [docs/AGENT_API.md](docs/AGENT_API.md): Machine queries over a graph, mutation-impact analysis, transactional graph transformations.
|
|
56
|
+
|
|
57
|
+
## Packages
|
|
58
|
+
|
|
59
|
+
- @cynodia/axiom: This package. Re-exports the graph, compiler, runtime and agent API. Installing it is normally enough.
|
|
60
|
+
- @cynodia/axiom-server: The authoritative runtime. Install separately, only if the application declares server-owned state.
|
|
61
|
+
- @cynodia/axiom-ui: Semantic UI authoring patterns, expanded into canonical nodes at build time. Install separately, needed only while authoring.
|
|
62
|
+
|
|
63
|
+
## Optional
|
|
64
|
+
|
|
65
|
+
- [docs/AGENT_REFERENCE.md](docs/AGENT_REFERENCE.md): Also the index of the vocabulary tables — expression kinds, operation kinds, diagnostic codes, presentation tokens.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cynodia/axiom",
|
|
3
|
-
"version": "0.9.0-alpha.
|
|
3
|
+
"version": "0.9.0-alpha.2",
|
|
4
4
|
"description": "AI-native semantic web application framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "AskTech AS",
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
"dist/**/*.d.ts",
|
|
22
22
|
"docs/*.md",
|
|
23
23
|
"README.md",
|
|
24
|
+
"AGENTS.md",
|
|
25
|
+
"llms.txt",
|
|
24
26
|
"LICENSE"
|
|
25
27
|
],
|
|
26
28
|
"main": "./dist/index.js",
|
|
@@ -32,10 +34,10 @@
|
|
|
32
34
|
}
|
|
33
35
|
},
|
|
34
36
|
"dependencies": {
|
|
35
|
-
"@cynodia/axiom-core": "0.9.0-alpha.
|
|
36
|
-
"@cynodia/axiom-runtime": "0.9.0-alpha.
|
|
37
|
-
"@cynodia/axiom-compiler": "0.9.0-alpha.
|
|
38
|
-
"@cynodia/axiom-agent-api": "0.9.0-alpha.
|
|
37
|
+
"@cynodia/axiom-core": "0.9.0-alpha.2",
|
|
38
|
+
"@cynodia/axiom-runtime": "0.9.0-alpha.2",
|
|
39
|
+
"@cynodia/axiom-compiler": "0.9.0-alpha.2",
|
|
40
|
+
"@cynodia/axiom-agent-api": "0.9.0-alpha.2"
|
|
39
41
|
},
|
|
40
42
|
"scripts": {
|
|
41
43
|
"build": "tsc -b tsconfig.json"
|