@aionis/substrate 0.1.0 → 0.1.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/CHANGELOG.md +33 -0
- package/README.md +91 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +712 -0
- package/dist/cli.js.map +1 -0
- package/dist/event-log.d.ts.map +1 -1
- package/dist/event-log.js +13 -2
- package/dist/event-log.js.map +1 -1
- package/dist/file-substrate.d.ts.map +1 -1
- package/dist/file-substrate.js +46 -2
- package/dist/file-substrate.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/runtime-sidecar-check.d.ts +30 -0
- package/dist/runtime-sidecar-check.d.ts.map +1 -0
- package/dist/runtime-sidecar-check.js +101 -0
- package/dist/runtime-sidecar-check.js.map +1 -0
- package/dist/sqlite-substrate.d.ts.map +1 -1
- package/dist/sqlite-substrate.js +156 -21
- package/dist/sqlite-substrate.js.map +1 -1
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/docs/ADAPTER_CONTRACT.md +23 -3
- package/docs/API_USAGE.md +25 -0
- package/docs/CLI.md +183 -0
- package/docs/RUNTIME_SIDECAR_STABILIZATION.md +96 -0
- package/docs/STORE_CONTRACT.md +18 -2
- package/docs/V0_2_ROADMAP.md +108 -0
- package/package.json +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Aionis Substrate are documented here.
|
|
4
4
|
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
## 0.1.2 - 2026-06-26
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- CLI commands for `inspect`, `preview-context`, `backup`, `restore`, `compact`, and `import-runtime-snapshot`.
|
|
12
|
+
- CLI integration tests that run the store commands against real SQLite stores and Runtime Lite snapshot fixtures.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- CLI documentation now covers store operations, Runtime snapshot import, and sidecar checks as separate surfaces.
|
|
17
|
+
|
|
18
|
+
## 0.1.1 - 2026-06-26
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- v0.2 roadmap that freezes Substrate hardening scope and excludes Runtime policy, vector recall, Agent harnesses, and SaaS concerns.
|
|
23
|
+
- Scoped audit read APIs for relations, feedback, and decision receipts.
|
|
24
|
+
- SQLite schema migration registry with durable applied-migration records.
|
|
25
|
+
- Durability negative controls for orphan decision receipts, checksum-valid corrupt backups, and post-compaction invalid writes.
|
|
26
|
+
- Runtime sidecar stabilization report that combines read-only snapshot parity and same-source reference corpus parity.
|
|
27
|
+
- Published package CLI `aionis-substrate` with a `sidecar` command for read-only Runtime sidecar stabilization checks.
|
|
28
|
+
- CLI documentation covering install, sidecar reports, and common failure interpretation.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Documented audit reads as side-effect-free adapter parity surfaces.
|
|
33
|
+
- Documented SQLite migrations as explicit adapter-scoped schema changes.
|
|
34
|
+
- Decision traces now require every decision memory id to reference an existing node in the same scope.
|
|
35
|
+
- Documented Runtime sidecar validation as staged gates, keeping real dual-write explicit and isolated.
|
|
36
|
+
- README now separates package install, minimal API usage, and Runtime sidecar validation paths.
|
|
37
|
+
|
|
5
38
|
## 0.1.0 - 2026-06-26
|
|
6
39
|
|
|
7
40
|
### Added
|
package/README.md
CHANGED
|
@@ -17,6 +17,34 @@ It is not Aionis Runtime core, not an Agent framework, and not a vector database
|
|
|
17
17
|
|
|
18
18
|
The project is intentionally independent from `AionisRuntime-focused`. It can import real Runtime Lite SQLite snapshots for validation and run isolated sidecar dual-write experiments, but it does not mutate Runtime source code or replace Runtime storage.
|
|
19
19
|
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install @aionis/substrate
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Run the published CLI without adding a dependency:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx @aionis/substrate --help
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
After installing into a project:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx aionis-substrate --help
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Common CLI operations:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx aionis-substrate inspect --adapter sqlite --path ./substrate.sqlite --scope repo-a
|
|
42
|
+
npx aionis-substrate preview-context --adapter sqlite --path ./substrate.sqlite --scope repo-a
|
|
43
|
+
npx aionis-substrate backup --adapter sqlite --path ./substrate.sqlite --output ./backup.json
|
|
44
|
+
npx aionis-substrate restore --adapter sqlite --path ./restored.sqlite --input ./backup.json
|
|
45
|
+
npx aionis-substrate compact --adapter sqlite --path ./substrate.sqlite
|
|
46
|
+
```
|
|
47
|
+
|
|
20
48
|
## Goal
|
|
21
49
|
|
|
22
50
|
Define the storage semantics Aionis needs before choosing or building a storage engine:
|
|
@@ -49,7 +77,7 @@ This first version ships two embedded adapters:
|
|
|
49
77
|
- every write is serialized and persisted.
|
|
50
78
|
- reopening the store rebuilds the same state from disk.
|
|
51
79
|
- every store reports its substrate schema version through `getStoreInfo`.
|
|
52
|
-
- the SQLite adapter persists schema metadata and rejects stores created by a newer unsupported schema.
|
|
80
|
+
- the SQLite adapter persists schema metadata, records applied schema migrations, and rejects stores created by a newer unsupported schema.
|
|
53
81
|
- event-log backups can be exported, checksum-verified, and restored to either file or SQLite stores.
|
|
54
82
|
- checkpoint compaction can rewrite a store event log to one checksum-covered checkpoint event without changing governed state.
|
|
55
83
|
- `searchNodes` provides scoped deterministic lexical/structured search over memory nodes without mutating events or admission state. It is not ANN, vector recall, semantic retrieval, or a Recall Engine.
|
|
@@ -63,8 +91,12 @@ See [docs/STORE_CONTRACT.md](docs/STORE_CONTRACT.md).
|
|
|
63
91
|
|
|
64
92
|
API usage is documented in [docs/API_USAGE.md](docs/API_USAGE.md).
|
|
65
93
|
|
|
94
|
+
CLI usage is documented in [docs/CLI.md](docs/CLI.md).
|
|
95
|
+
|
|
66
96
|
Adapter consistency requirements are documented in [docs/ADAPTER_CONTRACT.md](docs/ADAPTER_CONTRACT.md).
|
|
67
97
|
|
|
98
|
+
The v0.2 roadmap is documented in [docs/V0_2_ROADMAP.md](docs/V0_2_ROADMAP.md).
|
|
99
|
+
|
|
68
100
|
Backup and restore are documented in [docs/BACKUP_RESTORE.md](docs/BACKUP_RESTORE.md).
|
|
69
101
|
|
|
70
102
|
Checkpoint compaction is documented in [docs/CHECKPOINT_COMPACTION.md](docs/CHECKPOINT_COMPACTION.md).
|
|
@@ -73,6 +105,8 @@ Runtime snapshot import is documented in [docs/RUNTIME_SNAPSHOT_IMPORT.md](docs/
|
|
|
73
105
|
|
|
74
106
|
Runtime reference corpus parity is documented in [docs/RUNTIME_REFERENCE_CORPUS.md](docs/RUNTIME_REFERENCE_CORPUS.md).
|
|
75
107
|
|
|
108
|
+
Runtime sidecar stabilization is documented in [docs/RUNTIME_SIDECAR_STABILIZATION.md](docs/RUNTIME_SIDECAR_STABILIZATION.md).
|
|
109
|
+
|
|
76
110
|
External admission parity is documented in [docs/EXTERNAL_ADMISSION_PARITY.md](docs/EXTERNAL_ADMISSION_PARITY.md).
|
|
77
111
|
|
|
78
112
|
Runtime dual-write experimentation is documented in [docs/RUNTIME_DUAL_WRITE_EXPERIMENT.md](docs/RUNTIME_DUAL_WRITE_EXPERIMENT.md).
|
|
@@ -95,6 +129,39 @@ npm run example:basic
|
|
|
95
129
|
|
|
96
130
|
Node 24+ is required because the project runs TypeScript directly.
|
|
97
131
|
|
|
132
|
+
## Minimal API Loop
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
import { openSqliteAionisSubstrate } from "@aionis/substrate";
|
|
136
|
+
|
|
137
|
+
const store = await openSqliteAionisSubstrate({
|
|
138
|
+
path: "./aionis-substrate.sqlite",
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
await store.putNode({
|
|
142
|
+
id: "current-route",
|
|
143
|
+
scope: "repo-a",
|
|
144
|
+
kind: "procedure",
|
|
145
|
+
summary: "Use src/runtime.ts after verifier passed.",
|
|
146
|
+
lifecycle: "active",
|
|
147
|
+
authority: "trusted",
|
|
148
|
+
confidence: 0.95,
|
|
149
|
+
targetFiles: ["src/runtime.ts"],
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
const context = await store.compileContext({
|
|
153
|
+
scope: "repo-a",
|
|
154
|
+
query: "continue the runtime implementation",
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
console.log(context.use_now.map((node) => node.id));
|
|
158
|
+
console.log(context.decision_trace);
|
|
159
|
+
|
|
160
|
+
await store.close();
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Use `previewContext` when you need the same governed buckets without writing a decision receipt.
|
|
164
|
+
|
|
98
165
|
## Contract Benchmark
|
|
99
166
|
|
|
100
167
|
```bash
|
|
@@ -152,6 +219,20 @@ npm run check:runtime-reference-corpus -- \
|
|
|
152
219
|
|
|
153
220
|
This scans Runtime `agent_context` / `memory_decision_trace` JSON and only counts a reference when its memory ids overlap a real Runtime SQLite scope. Unmatched demo/export files are reported separately.
|
|
154
221
|
|
|
222
|
+
Runtime sidecar stabilization report:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
npm run check:runtime-sidecar -- \
|
|
226
|
+
--source /path/to/aionis-runtime-lite.sqlite \
|
|
227
|
+
--scope repo-a \
|
|
228
|
+
--reference /path/to/runtime-guide-or-measure.json \
|
|
229
|
+
--source-root /path/to/AionisRuntime-focused/.tmp \
|
|
230
|
+
--reference-root /path/to/runtime-references \
|
|
231
|
+
--output reports/runtime-sidecar-manual/summary.json
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
This combines read-only snapshot parity and same-source reference corpus parity into one sidecar report. It does not start Runtime and does not replace Runtime storage.
|
|
235
|
+
|
|
155
236
|
External admission parity against focused Runtime:
|
|
156
237
|
|
|
157
238
|
```bash
|
|
@@ -209,6 +290,15 @@ npm run check:release
|
|
|
209
290
|
|
|
210
291
|
`check:install-smoke` packs the built package, installs that tarball into a fresh temporary project, imports `@aionis/substrate`, and runs real file/SQLite store operations from the installed package.
|
|
211
292
|
|
|
293
|
+
After publishing to npm, run the registry package checks:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
npm run check:registry-install
|
|
297
|
+
npm run check:published-runtime-smoke
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
These commands install `@aionis/substrate@<package.json version>` from the npm registry into a fresh temporary project. `check:published-runtime-smoke` also creates a Runtime Lite SQLite fixture and verifies published-package snapshot import into a separate Substrate store.
|
|
301
|
+
|
|
212
302
|
## Scale Smoke
|
|
213
303
|
|
|
214
304
|
```bash
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAiqBA,wBAAsB,MAAM,CAAC,IAAI,WAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCxE"}
|