@cynodia/axiom 0.15.0-alpha.3 → 0.16.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 +6 -4
- package/docs/ACTIONS_TRANSACTIONS.md +1 -1
- package/docs/AGENT_API.md +167 -1
- package/docs/AGENT_REFERENCE.md +59 -9
- package/docs/ANTI_PATTERNS.md +1 -1
- package/docs/AUTHORITY.md +3 -3
- package/docs/AUTHORIZATION.md +3 -3
- package/docs/CONSTRAINTS.md +1 -1
- package/docs/DISTRIBUTED_AUTHORITY.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/LIVE_QUERIES.md +1 -1
- package/docs/LOCATIONS.md +1 -1
- package/docs/MIGRATIONS.md +1 -1
- package/docs/PRESENTATION.md +1 -1
- package/docs/QUERIES.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 +1 -1
- package/docs/VALIDATION.md +11 -2
- package/docs/WORKFLOWS.md +2 -2
- package/llms.txt +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ Shorter forms of the same routing: [`AGENTS.md`](AGENTS.md) and [`llms.txt`](llm
|
|
|
33
33
|
at this package's root.
|
|
34
34
|
|
|
35
35
|
**Status: experimental / alpha.** The API may change between alpha releases. The
|
|
36
|
-
documentation in `docs/` describes this exact version, `0.
|
|
36
|
+
documentation in `docs/` describes this exact version, `0.16.0-alpha.2`.
|
|
37
37
|
|
|
38
38
|
## Installation
|
|
39
39
|
|
|
@@ -47,10 +47,12 @@ Every release of this project is a pre-release and npm's `latest` tag points at
|
|
|
47
47
|
plain command above installs the current version. **There is no `alpha` dist-tag** — the tag
|
|
48
48
|
was removed once it stopped tracking releases, and `npm install @cynodia/axiom@alpha` now
|
|
49
49
|
fails with a 404. Pin the exact version instead when one is needed:
|
|
50
|
-
`npm install @cynodia/axiom@0.
|
|
50
|
+
`npm install @cynodia/axiom@0.16.0-alpha.2`.
|
|
51
51
|
|
|
52
|
-
These are ES modules compiled to ES2022; import them with `import`, not `require`.
|
|
53
|
-
|
|
52
|
+
These are ES modules compiled to ES2022; import them with `import`, not `require`.
|
|
53
|
+
`@cynodia/axiom-cli` (`npm install -g @cynodia/axiom-cli`) publishes the `axiom` executable
|
|
54
|
+
— `explain` / `analyze` / `diff` over `AgentAPI`, plus `inspect` / `validate` / `build` /
|
|
55
|
+
`serve` — see that package's README. `@cynodia/axiom-server`'s SQLite persistence adapter additionally
|
|
54
56
|
needs a Node build that provides `node:sqlite` (Node 22 or newer); `isSqliteAvailable()`
|
|
55
57
|
reports its absence rather than failing at import.
|
|
56
58
|
|
package/docs/AGENT_API.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent API
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.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
|
|
@@ -31,6 +31,15 @@ agent.referencedBy(expression) // ids an expression references
|
|
|
31
31
|
Edge kinds: `contains` `reads` `writes` `invokes` `renders` `binds` `depends-on`
|
|
32
32
|
`derives-from` `constrains` `routes-to` `references`.
|
|
33
33
|
|
|
34
|
+
`getDependencies`/`getDependents` return **dependency edges resolved to nodes, not a
|
|
35
|
+
deduplicated node set**: if two distinct edges of the requested kinds connect the same pair
|
|
36
|
+
of nodes — an action that both reads and writes the same state, with no `kinds` filter
|
|
37
|
+
narrowing it to one — the target node appears once per edge (spec16pt2 §112, intentional:
|
|
38
|
+
provenance would otherwise be lost). De-duplicate by `id` where a unique node set is what
|
|
39
|
+
you actually want. `getTransitiveDependencies`/`Dependents` (spec16) are the exception —
|
|
40
|
+
they return a deduplicated id set by construction, since "reachable at all" is what a
|
|
41
|
+
transitive closure answers.
|
|
42
|
+
|
|
34
43
|
## Dependency queries
|
|
35
44
|
|
|
36
45
|
```ts
|
|
@@ -257,6 +266,158 @@ diff**.
|
|
|
257
266
|
|
|
258
267
|
Change sets are in memory and per `AgentAPI` instance. There is no semantic version control.
|
|
259
268
|
|
|
269
|
+
## Semantic inventory, dependencies and explanation (spec16)
|
|
270
|
+
|
|
271
|
+
Everything in this section is **static**: it answers what the graph represents, never what a
|
|
272
|
+
running authority has observed. It requires no repository source, no runtime internals and
|
|
273
|
+
no credential — see [`AGENT_REFERENCE.md`](AGENT_REFERENCE.md#explainability--ai-authoring-spec16)
|
|
274
|
+
for the compressed reference and the discoverability contract.
|
|
275
|
+
|
|
276
|
+
```ts
|
|
277
|
+
agent.inventory({ kinds?, cursor?, limit? })
|
|
278
|
+
// { countsByKind, entries: [{ id, kind, name?, dependencyCount, dependentCount }], nextCursor? }
|
|
279
|
+
|
|
280
|
+
agent.getTransitiveDependencies(id, edgeKinds?) // { root, ids: [...] } — cycle-safe
|
|
281
|
+
agent.getTransitiveDependents(id, edgeKinds?)
|
|
282
|
+
agent.explainDependency(fromId, toId) // { edges, reasons } — why the edge exists, or undefined
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
`inventory()` covers every graph-model kind and every UI kind. `kinds` restricts it; `limit` +
|
|
286
|
+
`cursor` page through a large graph deterministically (canonical order is by id).
|
|
287
|
+
|
|
288
|
+
### Explaining one node
|
|
289
|
+
|
|
290
|
+
```ts
|
|
291
|
+
agent.explainAction(actionId)
|
|
292
|
+
// { actionId, parameters, reads, writes, invokesActions, integrationQueries, integrationEffects,
|
|
293
|
+
// runsQueries, storages, nativeOperations, authorization, constraintsThatMayBlock, invokedBy,
|
|
294
|
+
// clientInvocable, systemOnly, destructive, analysisComplete, analysisGaps }
|
|
295
|
+
|
|
296
|
+
agent.explainState(stateId)
|
|
297
|
+
// { stateId, valueType, derived, draft, ephemeral, authority, serverOnly, persistence,
|
|
298
|
+
// hasInitialValue, readers, writers, entities, constraints, transitionConstraints }
|
|
299
|
+
|
|
300
|
+
agent.explainQuery(queryId) // explainQuery(id) + { authorization, liveCapability }
|
|
301
|
+
agent.explainWorkflow(workflowId) // analyzeWorkflow(id) + { startPolicyId, instanceAccessPolicyId,
|
|
302
|
+
// actionAuthorization, privilegeReviewActions }
|
|
303
|
+
agent.explainGraph()
|
|
304
|
+
// { nodeCountsByKind, executableRoots, securityBoundaries, externalCapabilities, opaqueBoundaries }
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
`explainAction` returning `analysisComplete: false` means a `NativeOperation` with no
|
|
308
|
+
declared effects prevents a complete answer — `analysisGaps` says which one. Never read the
|
|
309
|
+
absence of a listed effect as proof no such effect exists past that boundary (spec16 §29,
|
|
310
|
+
§102, §173).
|
|
311
|
+
|
|
312
|
+
### Capabilities and the NativeOperation boundary
|
|
313
|
+
|
|
314
|
+
```ts
|
|
315
|
+
agent.analyzeCapabilities()
|
|
316
|
+
// { requirements: [{ capability, required, reasons }], requiredCapabilities }
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
`capability` is one of `REQUIRED_CAPABILITIES`: `persistence` `coordination`
|
|
320
|
+
`mutation-observation` `live-queries` `workflow-store` `event-journal` `scheduler`
|
|
321
|
+
`effect-execution` `provider-transaction` `blob-storage` `subscription-adapter`. Each
|
|
322
|
+
requirement carries `reasons` — which graph nodes make it necessary — never a bare list
|
|
323
|
+
(spec16 §31). This names capability *domains*, never a provider brand (spec16 §51).
|
|
324
|
+
|
|
325
|
+
```ts
|
|
326
|
+
agent.listNativeOperations() // every NativeOperation, with its action and declared effects
|
|
327
|
+
agent.summarizeNativeOperations() // { count, opaqueCount, occurrences }
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
`opaque: true` on an occurrence means it declares no effects at all — static analysis cannot
|
|
331
|
+
see past it. Long-term framework direction is zero (spec16 §49).
|
|
332
|
+
|
|
333
|
+
### Authorization decision explanation
|
|
334
|
+
|
|
335
|
+
```ts
|
|
336
|
+
agent.explainAuthorizationDecision({ actionId | queryId, principal?, resource? })
|
|
337
|
+
// { operation, decision: 'ALLOW' | 'DENY', reason, policyId, policyResult, legacyResult } | undefined
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Evaluated through the **same** evaluator the authority uses (`evaluateAuthorizationExpression`
|
|
341
|
+
/ `decideAuthorization`, spec15pt3) — never a second interpretation. Performs zero mutation,
|
|
342
|
+
zero effect, zero provider call. It is advisory: the real operation always re-authorizes on
|
|
343
|
+
the authority, and a prior result here is never a token (spec16 §26, §136-138). A missing
|
|
344
|
+
`PRINCIPAL`/`RESOURCE` field can never manufacture `ALLOW` — see [`AUTHORIZATION.md`](AUTHORIZATION.md).
|
|
345
|
+
|
|
346
|
+
### Semantic diff
|
|
347
|
+
|
|
348
|
+
```ts
|
|
349
|
+
agent.semanticDiff(otherGraph)
|
|
350
|
+
// {
|
|
351
|
+
// entries: [{ changeKind: 'added'|'removed'|'changed', nodeId, nodeKind, categories, message }],
|
|
352
|
+
// schema: SchemaDiff, // the spec11 field-level diff — entities/states/relationships/read-policies
|
|
353
|
+
// compatibility: {
|
|
354
|
+
// semanticFingerprintChanged, schemaFingerprintChanged, authorityCompatibilityAffected,
|
|
355
|
+
// serverContractBefore, serverContractAfter, serverContractChanged, migrationRequired,
|
|
356
|
+
// },
|
|
357
|
+
// byCategory, isNoOp,
|
|
358
|
+
// }
|
|
359
|
+
agent.requiredServerContract() // the Server IR contract this graph currently requires
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
`entries` covers every non-schema-owned node kind (actions, queries, workflows,
|
|
363
|
+
authorization policies, triggers, UI, …); entity/field/state/relationship/read-policy changes
|
|
364
|
+
are in `schema` instead — the one place spec11 already classifies them, not duplicated here
|
|
365
|
+
(spec16 §159). `categories` is one or more of `semantic` `authorization` `schema` `provider`
|
|
366
|
+
`workflow` `query` `presentation` `metadata` — a rename is `metadata` only, never
|
|
367
|
+
`semantic` (spec16 §35, §154-155); attaching/detaching/editing a policy is always tagged
|
|
368
|
+
`authorization`, even on an `ActionDef`/`QueryDef`/`WorkflowDef` node (spec16 §156). Diffing
|
|
369
|
+
is pure: it reads both graphs and mutates neither.
|
|
370
|
+
|
|
371
|
+
### Candidate graph edits
|
|
372
|
+
|
|
373
|
+
```ts
|
|
374
|
+
const result = agent.proposeEdit({ changes: GraphChange[], preconditions?: EditPrecondition[] });
|
|
375
|
+
// { applied, conflict?, applyError?, validation?, diff?, candidate? }
|
|
376
|
+
agent.acceptEdit(result, { reason?, actor? }); // commits a validated candidate; throws otherwise
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
`changes` is the same portable `GraphChange[]` vocabulary `Transaction` already records —
|
|
380
|
+
`add-node` `remove-node` `update-node` `add-field` `remove-field` `add-edge` `remove-edge`
|
|
381
|
+
`set-theme` — so a proposal is plain, serializable data, not a TypeScript closure (spec16
|
|
382
|
+
§79-80, §184). `proposeGraphEdit`/`applyGraphChanges` (free functions, also exported) never
|
|
383
|
+
touch the graph passed in: every change is replayed onto a private clone, which is then
|
|
384
|
+
validated and diffed against the original (spec16 §81-83, §133, §145).
|
|
385
|
+
|
|
386
|
+
`preconditions` (`{ nodeId, expect: 'exists' | 'absent' | { field, equals } }`) are checked
|
|
387
|
+
**before** any change is applied; a stale one is reported as `conflict`, not silently merged
|
|
388
|
+
or overwritten (spec16 §85-86). `applyError` means a change referenced something that does
|
|
389
|
+
not exist or is the wrong kind — distinct from `conflict` (a stale precondition) and from an
|
|
390
|
+
invalid `validation` result (a change set that applied but produced an invalid graph, e.g. an
|
|
391
|
+
unresolved reference — `candidate` is still returned for inspection, per spec16 §100).
|
|
392
|
+
Because only the **final** candidate is validated, an atomic multi-change set may pass through
|
|
393
|
+
an intermediate state that would not validate on its own (spec16 §84).
|
|
394
|
+
|
|
395
|
+
### Machine-readable authoring schema
|
|
396
|
+
|
|
397
|
+
```ts
|
|
398
|
+
import { authoringSchema, describeAuthoringKind, listAuthorableKinds } from '@cynodia/axiom';
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
One descriptor per graph-model semantic node kind (`entity` … `authorization-policy` — the
|
|
402
|
+
eighteen `SEMANTIC_NODE_KINDS`): `purpose`, `fields` (name, required, type, reference
|
|
403
|
+
targets, closed enum, description), and a minimal-valid `template`. A template is not a set
|
|
404
|
+
of defaults — it never assigns security-sensitive semantics an author did not ask for
|
|
405
|
+
(spec16 §69-78). UI node kinds are deliberately **not** duplicated here: `@cynodia/axiom-ui`'s
|
|
406
|
+
generated `PATTERN_CATALOG.json` (`npm run toolkit:catalog`) and [`UI.md`](UI.md) already own
|
|
407
|
+
that authoring contract.
|
|
408
|
+
|
|
409
|
+
### Conformance
|
|
410
|
+
|
|
411
|
+
`axiom.conformance.v10` (`runToolingConformanceFixture` / `runToolingConformanceSuite`,
|
|
412
|
+
`packages/agent-api/src/tooling-conformance.ts`) checks the canonical inspection/analysis/
|
|
413
|
+
authoring/editing entry points above against independently hand-specified expected results
|
|
414
|
+
(spec16 §123-126) — inventory, dependencies, explain-action, explain-query,
|
|
415
|
+
authorization-analysis, capabilities, semantic-diff, diagnostics, authoring-schema,
|
|
416
|
+
graph-edit and the native-operation boundary. This is a separate, smaller tier from the
|
|
417
|
+
Server-IR execution conformance (`axiom.conformance.v1`-`v9`, `packages/server/conformance/`):
|
|
418
|
+
AgentAPI carries no execution semantics of its own to check against a persistence backend
|
|
419
|
+
(spec16 §121).
|
|
420
|
+
|
|
260
421
|
## Scale of change
|
|
261
422
|
|
|
262
423
|
Prefer the smallest semantic change that expresses the intent.
|
|
@@ -276,3 +437,8 @@ State these to yourself before acting on an answer:
|
|
|
276
437
|
- Type inference is partial, so a type-dependent question may have no answer rather than a wrong one.
|
|
277
438
|
- `getOpaquePresentationNodes()` lists nodes whose renderer-specific presentation is **not** analyzed. Semantic analysis makes no claim about them.
|
|
278
439
|
- Change history is per instance and in memory.
|
|
440
|
+
- `explainAuthorizationDecision` is advisory static analysis, never a token: it does not accept or produce a resolved principal identity, does not authenticate anyone, and the real operation always re-authorizes on the authority (spec16 §26, §138).
|
|
441
|
+
- `analyzeCapabilities` names capability *domains* a runtime would need, derived from graph structure — it does not know which concrete provider a deployment will choose, and never should (spec16 §51).
|
|
442
|
+
- `semanticDiff`'s `.entries` covers every node kind except entities, states, relationships and read policies, which are the already-detailed `.schema` sub-object instead — do not expect an entity/field change to appear in `.entries` too.
|
|
443
|
+
- `authoringSchema()` covers the eighteen graph-model semantic node kinds only. UI node authoring remains `@cynodia/axiom-ui`'s job — see [`UI.md`](UI.md).
|
|
444
|
+
- Axiom provides deterministic semantic validation and analysis of *represented* semantics. It does not prove an AI-authored graph is safe merely because it validates, and it cannot see past a `NativeOperation` that declares no effects (spec16 §221).
|
package/docs/AGENT_REFERENCE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent reference
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.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:
|
|
@@ -663,9 +663,9 @@ await serveAxiomApplication({
|
|
|
663
663
|
```
|
|
664
664
|
|
|
665
665
|
`GET /` is the page, `POST /axiom` the semantic endpoint. No route, controller, handler, SQL
|
|
666
|
-
or client JavaScript is authored.
|
|
667
|
-
separately: `serveOverHttp({ server, port })` is the bare
|
|
668
|
-
`createDirectTransport(server)` drives one in-process for tests.
|
|
666
|
+
or client JavaScript is authored. `@cynodia/axiom-cli`'s `axiom serve` runs this same path
|
|
667
|
+
ad hoc. The halves also run separately: `serveOverHttp({ server, port })` is the bare
|
|
668
|
+
authority, and `createDirectTransport(server)` drives one in-process for tests.
|
|
669
669
|
|
|
670
670
|
A remote invocation returns `{ ok: false, pending: true }` and its outcome arrives later,
|
|
671
671
|
through the same action-outcome lifecycle a local refusal uses — so a `diagnostic` node
|
|
@@ -949,12 +949,12 @@ Providers: `createMemoryRowStore` + `createMemoryMigrationStore` (deterministic
|
|
|
949
949
|
`runMigrationConformanceFixture` over the `axiom.conformance.v5` fixtures in
|
|
950
950
|
`conformance/migrations/`.
|
|
951
951
|
|
|
952
|
-
|
|
953
|
-
|
|
952
|
+
Every schema/migration operation is also a public library function —
|
|
953
|
+
`inspectSchema`, `diffSchema`, `explainSchemaDiff`, `migrationImpact` (from
|
|
954
954
|
`@cynodia/axiom-agent-api`); `planMigration`, `explainMigration`, `executeMigration`,
|
|
955
|
-
`getMigrationStatus` (from `@cynodia/axiom-server`)
|
|
956
|
-
them.
|
|
957
|
-
|
|
955
|
+
`getMigrationStatus` (from `@cynodia/axiom-server`) — for a host that builds its own
|
|
956
|
+
command around them. `@cynodia/axiom-cli` publishes `axiom schema status` / `schema diff` /
|
|
957
|
+
`migrate plan` / `migrate` / `migrate status` over the same functions.
|
|
958
958
|
|
|
959
959
|
Diagnostics: `SCHEMA_MIGRATION_REQUIRED` `SCHEMA_INCOMPATIBLE` `MIGRATION_IN_PROGRESS`
|
|
960
960
|
`MIGRATION_STATE_CORRUPTED` `MIGRATION_PATH_NOT_FOUND` `MIGRATION_APPROVAL_REQUIRED`
|
|
@@ -1323,6 +1323,56 @@ inside an action surfaces as `QUERY_OPERATION_FAILED` with `details.code =
|
|
|
1323
1323
|
'AUTHORIZATION_DENIED'` and rolls the action back. A denied `workflow.inspect` /
|
|
1324
1324
|
`workflow.history` returns `undefined` / `[]` (no existence leak).
|
|
1325
1325
|
|
|
1326
|
+
## EXPLAINABILITY & AI AUTHORING (spec16)
|
|
1327
|
+
|
|
1328
|
+
Full model: [`AGENT_API.md`](AGENT_API.md#semantic-inventory-dependencies-and-explanation-spec16).
|
|
1329
|
+
No new graph/IR vocabulary; Server IR stays `axiom.server.v9` — 0.16 adds inspection,
|
|
1330
|
+
analysis and authoring-metadata APIs over the existing graph, never new execution semantics.
|
|
1331
|
+
Everything below is **static**: it reads the graph, never a running authority, and performs
|
|
1332
|
+
zero mutation / zero effect / zero provider call (spec16 §133).
|
|
1333
|
+
|
|
1334
|
+
```ts
|
|
1335
|
+
agent.inventory({ kinds?, cursor?, limit? }) // every node, dependency/dependent counts
|
|
1336
|
+
agent.getTransitiveDependencies(id, edgeKinds?) / agent.getTransitiveDependents(id, edgeKinds?)
|
|
1337
|
+
agent.explainDependency(fromId, toId) // { edges, reasons } | undefined
|
|
1338
|
+
|
|
1339
|
+
agent.explainAction(actionId) // reads/writes/effects/authorization/invokedBy/analysisComplete
|
|
1340
|
+
agent.explainState(stateId) // type/persistence/authority/readers/writers/constraints
|
|
1341
|
+
agent.explainQuery(queryId) // explainQuery + { authorization, liveCapability }
|
|
1342
|
+
agent.explainWorkflow(workflowId) // analyzeWorkflow + { startPolicyId, instanceAccessPolicyId, … }
|
|
1343
|
+
agent.explainGraph() // structural summary: counts, executable roots, security, opaque boundaries
|
|
1344
|
+
|
|
1345
|
+
agent.analyzeCapabilities() // { requirements: [{ capability, required, reasons }], requiredCapabilities }
|
|
1346
|
+
agent.listNativeOperations() / agent.summarizeNativeOperations() // the one opaque boundary, made discoverable
|
|
1347
|
+
|
|
1348
|
+
agent.explainAuthorizationDecision({ actionId | queryId, principal?, resource? })
|
|
1349
|
+
// same evaluator the authority uses; ALLOW/DENY + which mechanism decided it. Advisory only.
|
|
1350
|
+
|
|
1351
|
+
agent.semanticDiff(otherGraph) // { entries, schema, compatibility, byCategory, isNoOp }
|
|
1352
|
+
agent.requiredServerContract() // the Server IR contract this graph currently needs
|
|
1353
|
+
|
|
1354
|
+
agent.proposeEdit({ changes, preconditions? }) // { applied, conflict?, applyError?, validation?, diff?, candidate? }
|
|
1355
|
+
agent.acceptEdit(result, { reason?, actor? }) // commits a validated candidate
|
|
1356
|
+
|
|
1357
|
+
authoringSchema() / describeAuthoringKind(kind) / listAuthorableKinds() // free functions, core
|
|
1358
|
+
```
|
|
1359
|
+
|
|
1360
|
+
`REQUIRED_CAPABILITIES`: `persistence` `coordination` `mutation-observation` `live-queries`
|
|
1361
|
+
`workflow-store` `event-journal` `scheduler` `effect-execution` `provider-transaction`
|
|
1362
|
+
`blob-storage` `subscription-adapter`. `SEMANTIC_DIFF_CATEGORIES`: `semantic` `authorization`
|
|
1363
|
+
`schema` `provider` `workflow` `query` `presentation` `metadata`.
|
|
1364
|
+
|
|
1365
|
+
`explainAction`/`listNativeOperations`: a `NativeOperation` with no declared effects makes
|
|
1366
|
+
`analysisComplete: false` — never silently treated as "no further effects" (spec16 §29,
|
|
1367
|
+
§102). `explainAuthorizationDecision` runs through the same `evaluateAuthorizationExpression`
|
|
1368
|
+
/ `decideAuthorization` the authority uses (spec15pt3) — it is not a second evaluator, and a
|
|
1369
|
+
prior result is never a token; the real operation always re-authorizes (spec16 §138).
|
|
1370
|
+
`semanticDiff` reuses `diffSchema` for entity/state/relationship/read-policy changes (`.schema`)
|
|
1371
|
+
and classifies everything else (`.entries`) — a rename is `metadata` only, attaching/editing a
|
|
1372
|
+
policy is always tagged `authorization` even on an `ActionDef`/`QueryDef`/`WorkflowDef`.
|
|
1373
|
+
`proposeEdit` replays a portable `GraphChange[]` onto a private clone — the graph passed in is
|
|
1374
|
+
never mutated, whether or not the candidate validates.
|
|
1375
|
+
|
|
1326
1376
|
## Metadata classes
|
|
1327
1377
|
|
|
1328
1378
|
```ts
|
package/docs/ANTI_PATTERNS.md
CHANGED
package/docs/AUTHORITY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Authority
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.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
|
|
@@ -596,8 +596,8 @@ The two halves also run separately. `serveOverHttp({ server, port })` is the bar
|
|
|
596
596
|
and `createAxiomServer({ ir, persistence, host })` is the authority with no transport at all —
|
|
597
597
|
which is what `createDirectTransport` drives in tests.
|
|
598
598
|
|
|
599
|
-
|
|
600
|
-
|
|
599
|
+
`@cynodia/axiom-cli` publishes an `axiom serve` command over this same API for ad hoc use;
|
|
600
|
+
the API above remains the supported way to run an application from your own Node process.
|
|
601
601
|
|
|
602
602
|
## Conformance
|
|
603
603
|
|
package/docs/AUTHORIZATION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Authorization
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.0-alpha.2. The operational contract for **authorization completeness** — the 0.15
|
|
4
4
|
milestone (spec15). Whether a principal may perform a semantic operation is part of the
|
|
5
5
|
graph's executable meaning — not a runtime concern, not UI visibility, not something that
|
|
6
6
|
varies by transport, provider, process, retry path or authority topology. `axiom.server.v9`
|
|
@@ -11,8 +11,8 @@ prior contract.
|
|
|
11
11
|
> outside portable application semantics. **Authorization** answers *may this principal
|
|
12
12
|
> perform this semantic operation?* — that is what this document defines.
|
|
13
13
|
|
|
14
|
-
0.15 landed in nine phases (A–I);
|
|
15
|
-
|
|
14
|
+
0.15 landed in nine phases (A–I); spec15pt2 and spec15pt3 are corrective passes that
|
|
15
|
+
followed. **spec15pt2**: authorization **absent-value safety** (a
|
|
16
16
|
missing PRINCIPAL / RESOURCE field never grants authority), `validateGraph` totality over a
|
|
17
17
|
malformed `allow` tree, a fail-closed `host.authenticate` exception boundary. **spec15pt3**:
|
|
18
18
|
the same fail-closed absent-value semantics now also cover the **legacy
|
package/docs/CONSTRAINTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Distributed authority
|
|
2
2
|
|
|
3
|
-
*This document describes Axiom `0.
|
|
3
|
+
*This document describes Axiom `0.16.0-alpha.2`.*
|
|
4
4
|
|
|
5
5
|
The authoritative runtime (`docs/AUTHORITY.md`) may run as **more than one process at the
|
|
6
6
|
same time**, over one shared persistence provider, without any change to the
|
package/docs/EFFECTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Effects
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.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.
|
|
3
|
+
Axiom 0.16.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.
|
|
3
|
+
Axiom 0.16.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.
|
|
3
|
+
Axiom 0.16.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.
|
|
3
|
+
Axiom 0.16.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/LIVE_QUERIES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Realtime — live canonical queries
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.0-alpha.2. The operational contract for **observing a `QueryDef` result over
|
|
4
4
|
time**: subscribe once, receive an initial coherent result, then receive canonical changes
|
|
5
5
|
as authoritative committed state moves — through any compatible authority, across
|
|
6
6
|
reconnects. `axiom.server.v7` (0.13 adds no IR vocabulary).
|
package/docs/LOCATIONS.md
CHANGED
package/docs/MIGRATIONS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Schema evolution & semantic migrations
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.0-alpha.2. The operational contract for evolving a deployed application's
|
|
4
4
|
semantic model and its persisted canonical data over time — adding a required field,
|
|
5
5
|
splitting one field into two, removing an obsolete one, migrating millions of
|
|
6
6
|
provider-backed rows — **without** an application-authored SQL migration, an ORM migration,
|
package/docs/PRESENTATION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Presentation
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.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/QUERIES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Semantic data access & the query layer
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.0-alpha.2. The operational contract for demand-driven reads over authoritative
|
|
4
4
|
data that is too large to materialize as a `StateDef` — 500,000 orders, 5,000,000 order
|
|
5
5
|
lines, years of audit rows. `axiom.server.v6`.
|
|
6
6
|
|
package/docs/RUNTIME.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Semantic contract
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.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.
|
|
3
|
+
Axiom 0.16.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.
|
|
3
|
+
Axiom 0.16.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.
|
|
3
|
+
Axiom 0.16.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.
|
|
3
|
+
Axiom 0.16.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.
|
|
3
|
+
Axiom 0.16.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
|
|
|
@@ -70,7 +70,7 @@ non-numeric collections, and obviously incompatible assignments.
|
|
|
70
70
|
|
|
71
71
|
| Code | Raised when |
|
|
72
72
|
| --- | --- |
|
|
73
|
-
| `UNKNOWN_STATE_REF` | A location naming a state that does not exist,
|
|
73
|
+
| `UNKNOWN_STATE_REF` | A location naming a state that does not exist, an unknown location kind, or a location/selector that is not even a plain object (spec16pt2 F2). |
|
|
74
74
|
| `DERIVED_STATE_WRITE` | A write target rooted in derived state. |
|
|
75
75
|
| `FIELD_ON_NON_ENTITY` | A field selected on a value that has no fields. |
|
|
76
76
|
| `FIELD_NOT_ON_ENTITY` | A field that belongs to a different entity than the one addressed. |
|
|
@@ -107,6 +107,15 @@ Recursive, with a `path` naming the position.
|
|
|
107
107
|
| `UNSUPPORTED_OPERATION` | An operation kind outside `OPERATION_KINDS`, or a `for-each` containing something other than a mutation. |
|
|
108
108
|
| `INVALID_ACTION_REF` | A button or form naming something that is not an action. |
|
|
109
109
|
| `INVALID_STATE_REF` | A reference that must be a state but is not. |
|
|
110
|
+
| `INVALID_OPERATION_COLLECTION` | `ActionDef.operations`, or a `for-each`'s nested `operations`, is present but not an array (spec16pt2 F1). |
|
|
111
|
+
| `INVALID_OPERATION` | An operation array entry that is not a plain object with a recognized `kind` — `null`, a primitive, or a malformed object (spec16pt2 F1/F2). |
|
|
112
|
+
|
|
113
|
+
A candidate graph can arrive from AI generation, deserialization or hand-tampering, so
|
|
114
|
+
`validateGraph` establishes shape before it ever traverses an action's operations or a
|
|
115
|
+
location — `{}` where `operations` should be an array, or `null` where a `set`/`insert`/
|
|
116
|
+
`remove` target should be a `Location`, is a structured diagnostic (`INVALID_OPERATION_COLLECTION`,
|
|
117
|
+
`INVALID_OPERATION`, or `UNKNOWN_STATE_REF` for a malformed location/selector), never a
|
|
118
|
+
native exception.
|
|
110
119
|
|
|
111
120
|
### Constraints
|
|
112
121
|
|
package/docs/WORKFLOWS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Durable workflows
|
|
2
2
|
|
|
3
|
-
Axiom 0.
|
|
3
|
+
Axiom 0.16.0-alpha.2. The operational contract for **long-running semantic computations with
|
|
4
4
|
a durable control position** — orchestration that survives process death, authority
|
|
5
5
|
failover, retries, timer delivery, event delivery and ordinary distributed contention
|
|
6
6
|
without application-owned infrastructure. `axiom.server.v8`.
|
|
@@ -255,7 +255,7 @@ step's argument expressions / `retry` policy, a `wait-event` step's `where` / `b
|
|
|
255
255
|
or binding migration, and none is inferred ("closest step" recovery never happens).
|
|
256
256
|
- A graph with **no** `WorkflowDef` compiles to the byte-identical `axiom.server.v1`–`v7`
|
|
257
257
|
document it always did, and its `semanticFingerprint` / `schemaFingerprint` are unchanged.
|
|
258
|
-
- Pre-`0.
|
|
258
|
+
- Pre-`0.16.0-alpha.2` instances carry a compatibility key computed before `WorkflowDef`
|
|
259
259
|
participated; a corrected authority treats them as incompatible and fails closed (these
|
|
260
260
|
are pre-freeze alpha releases — silent reinterpretation is the only unacceptable
|
|
261
261
|
outcome).
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Axiom
|
|
2
2
|
|
|
3
|
-
> AI-native semantic application framework, version 0.
|
|
3
|
+
> AI-native semantic application framework, version 0.16.0-alpha.2. An Axiom application is a
|
|
4
4
|
> typed semantic graph — state, behavior, constraints, UI structure, presentation and
|
|
5
5
|
> authority as structured data — executed by generic runtimes. The JavaScript, HTML and CSS
|
|
6
6
|
> that reach a browser are compiler output and are never authored or edited. The primary
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cynodia/axiom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0-alpha.2",
|
|
4
4
|
"description": "AI-native semantic web application framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "AskTech AS",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@cynodia/axiom-core": "0.
|
|
38
|
-
"@cynodia/axiom-runtime": "0.
|
|
39
|
-
"@cynodia/axiom-compiler": "0.
|
|
40
|
-
"@cynodia/axiom-agent-api": "0.
|
|
37
|
+
"@cynodia/axiom-core": "0.16.0-alpha.2",
|
|
38
|
+
"@cynodia/axiom-runtime": "0.16.0-alpha.2",
|
|
39
|
+
"@cynodia/axiom-compiler": "0.16.0-alpha.2",
|
|
40
|
+
"@cynodia/axiom-agent-api": "0.16.0-alpha.2"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "tsc -b tsconfig.json"
|