@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/docs/CLI.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# CLI
|
|
2
|
+
|
|
3
|
+
`@aionis/substrate` publishes a small CLI for local store operations, validation, and sidecar integration work.
|
|
4
|
+
|
|
5
|
+
It is intentionally narrow:
|
|
6
|
+
|
|
7
|
+
- it inspects, previews, backs up, restores, and compacts Substrate stores;
|
|
8
|
+
- it imports Runtime Lite SQLite snapshots into separate Substrate stores;
|
|
9
|
+
- it runs read-only checks over existing Runtime evidence;
|
|
10
|
+
- it writes reports to local files;
|
|
11
|
+
- it does not start Aionis Runtime unless you explicitly use the separate repository script `check:runtime-dual-write`;
|
|
12
|
+
- it does not mutate Runtime source code or replace Runtime storage.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
Run without installing permanently:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx @aionis/substrate --help
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Install into a project:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install @aionis/substrate
|
|
26
|
+
npx aionis-substrate --help
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The CLI requires Node 24+.
|
|
30
|
+
|
|
31
|
+
## Store Commands
|
|
32
|
+
|
|
33
|
+
All store commands use explicit adapter and path arguments:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx aionis-substrate inspect --adapter sqlite --path ./substrate.sqlite --scope repo-a
|
|
37
|
+
npx aionis-substrate preview-context --adapter sqlite --path ./substrate.sqlite --scope repo-a --query "continue runtime work"
|
|
38
|
+
npx aionis-substrate backup --adapter sqlite --path ./substrate.sqlite --output ./substrate-backup.json
|
|
39
|
+
npx aionis-substrate restore --adapter sqlite --path ./restored.sqlite --input ./substrate-backup.json
|
|
40
|
+
npx aionis-substrate compact --adapter sqlite --path ./substrate.sqlite
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Use `--adapter file` with a directory path for the file-backed adapter:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx aionis-substrate inspect --adapter file --path ./substrate-store --scope repo-a
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Inspect
|
|
50
|
+
|
|
51
|
+
`inspect` prints store metadata. With `--scope`, it also prints scoped counts and memory-node summaries:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx aionis-substrate inspect \
|
|
55
|
+
--adapter sqlite \
|
|
56
|
+
--path ./substrate.sqlite \
|
|
57
|
+
--scope repo-a
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The report contract is `aionis_substrate_inspect_report_v1`.
|
|
61
|
+
|
|
62
|
+
### Preview Context
|
|
63
|
+
|
|
64
|
+
`preview-context` compiles the governed buckets without writing a `memory.decision.recorded` receipt:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx aionis-substrate preview-context \
|
|
68
|
+
--adapter sqlite \
|
|
69
|
+
--path ./substrate.sqlite \
|
|
70
|
+
--scope repo-a \
|
|
71
|
+
--query "continue the current route" \
|
|
72
|
+
--max-per-bucket 8
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The report includes `read_only: true` when event counts and sequence numbers are unchanged.
|
|
76
|
+
|
|
77
|
+
### Backup and Restore
|
|
78
|
+
|
|
79
|
+
`backup` writes a checksum-covered event backup:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx aionis-substrate backup \
|
|
83
|
+
--adapter sqlite \
|
|
84
|
+
--path ./substrate.sqlite \
|
|
85
|
+
--output ./substrate-backup.json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`restore` verifies the backup before writing an empty target:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx aionis-substrate restore \
|
|
92
|
+
--adapter sqlite \
|
|
93
|
+
--path ./restored.sqlite \
|
|
94
|
+
--input ./substrate-backup.json
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Use `--overwrite` only when replacing an existing restore target is intentional.
|
|
98
|
+
|
|
99
|
+
### Compact
|
|
100
|
+
|
|
101
|
+
`compact` rewrites the event history into one checkpoint event without changing governed state:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npx aionis-substrate compact \
|
|
105
|
+
--adapter sqlite \
|
|
106
|
+
--path ./substrate.sqlite
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Runtime Snapshot Import
|
|
110
|
+
|
|
111
|
+
Use `import-runtime-snapshot` to copy Runtime Lite SQLite evidence into a separate Substrate store:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npx aionis-substrate import-runtime-snapshot \
|
|
115
|
+
--source /path/to/aionis-runtime-lite.sqlite \
|
|
116
|
+
--target ./substrate.sqlite \
|
|
117
|
+
--adapter sqlite \
|
|
118
|
+
--scope repo-a
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The Runtime source is opened read-only. The target is a Substrate store owned by this command.
|
|
122
|
+
|
|
123
|
+
## Sidecar Check
|
|
124
|
+
|
|
125
|
+
Use `sidecar` when you already have Runtime Lite SQLite evidence and want to check whether Substrate can mirror the governed context surface from outside the Runtime boundary.
|
|
126
|
+
|
|
127
|
+
Snapshot parity:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npx aionis-substrate sidecar \
|
|
131
|
+
--source /path/to/aionis-runtime-lite.sqlite \
|
|
132
|
+
--scope repo-a \
|
|
133
|
+
--reference /path/to/runtime-guide-or-measure.json \
|
|
134
|
+
--output reports/runtime-sidecar/summary.json
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Reference corpus parity:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
npx aionis-substrate sidecar \
|
|
141
|
+
--source-root /path/to/runtime-sqlite-root \
|
|
142
|
+
--reference-root /path/to/runtime-reference-root \
|
|
143
|
+
--max-source-files all \
|
|
144
|
+
--max-scopes all \
|
|
145
|
+
--max-scopes-per-file 100 \
|
|
146
|
+
--max-references all
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Combined report:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
npx aionis-substrate sidecar \
|
|
153
|
+
--source /path/to/aionis-runtime-lite.sqlite \
|
|
154
|
+
--scope repo-a \
|
|
155
|
+
--reference /path/to/runtime-guide-or-measure.json \
|
|
156
|
+
--source-root /path/to/runtime-sqlite-root \
|
|
157
|
+
--reference-root /path/to/runtime-reference-root \
|
|
158
|
+
--output reports/runtime-sidecar/summary.json
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The report contract is `aionis_runtime_sidecar_check_report_v1`.
|
|
162
|
+
|
|
163
|
+
## What Passing Means
|
|
164
|
+
|
|
165
|
+
Passing snapshot parity means one Runtime SQLite scope can be imported into an isolated Substrate store and compiled into matching governed buckets.
|
|
166
|
+
|
|
167
|
+
Passing reference corpus parity means exported Runtime guide/measure JSON is traceable to real Runtime memory ids in the same source corpus.
|
|
168
|
+
|
|
169
|
+
Passing these checks does not mean Substrate has become the full Runtime policy engine. Runtime still owns richer product policy; Substrate owns durable evidence, lifecycle state, relations, feedback, and the minimum governed context contract.
|
|
170
|
+
|
|
171
|
+
## Common Failures
|
|
172
|
+
|
|
173
|
+
`no_matched_reference`
|
|
174
|
+
|
|
175
|
+
The reference files were scanned, but none of their memory ids overlap the discovered Runtime SQLite scopes. Point `--reference-root` at guide/measure outputs produced from the same Runtime data as `--source-root`.
|
|
176
|
+
|
|
177
|
+
`snapshot_parity failed`
|
|
178
|
+
|
|
179
|
+
The imported Substrate buckets do not match the supplied Runtime guide/measure surface. Inspect the generated `summary.json` before changing code; the mismatch may be a scope, reference, or fixture problem.
|
|
180
|
+
|
|
181
|
+
`ExperimentalWarning: SQLite is an experimental feature`
|
|
182
|
+
|
|
183
|
+
Node 24 currently marks `node:sqlite` as experimental. This is expected for the current embedded SQLite adapter.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Runtime Sidecar Stabilization
|
|
2
|
+
|
|
3
|
+
This page defines the Substrate sidecar validation path for Aionis Runtime.
|
|
4
|
+
|
|
5
|
+
The sidecar path is intentionally external:
|
|
6
|
+
|
|
7
|
+
- it does not mutate `AionisRuntime-focused` source code;
|
|
8
|
+
- it does not replace Runtime Lite SQLite, Zvec, AIFS, or product storage;
|
|
9
|
+
- it does not install a production dual-write adapter;
|
|
10
|
+
- it only proves that Substrate can mirror, import, and inspect Runtime evidence from outside the Runtime boundary.
|
|
11
|
+
|
|
12
|
+
## Sidecar Gates
|
|
13
|
+
|
|
14
|
+
### Gate 1: Read-Only Snapshot Parity
|
|
15
|
+
|
|
16
|
+
Import one Runtime Lite SQLite snapshot into an isolated Substrate store and compile context for one scope.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm run check:runtime-sidecar -- \
|
|
20
|
+
--source /path/to/aionis-runtime-lite.sqlite \
|
|
21
|
+
--scope repo-a \
|
|
22
|
+
--reference /path/to/runtime-guide-or-measure.json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Without `--reference`, this is an import smoke: Runtime SQLite is opened read-only and Substrate writes to an isolated target.
|
|
26
|
+
|
|
27
|
+
With `--reference`, the command compares the four governed buckets:
|
|
28
|
+
|
|
29
|
+
- `use_now`
|
|
30
|
+
- `inspect_before_use`
|
|
31
|
+
- `do_not_use`
|
|
32
|
+
- `rehydrate`
|
|
33
|
+
|
|
34
|
+
### Gate 2: Same-Source Reference Corpus
|
|
35
|
+
|
|
36
|
+
Scan Runtime SQLite files and Runtime guide/measure JSON references, then count only references that share concrete memory ids with a discovered Runtime scope.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm run check:runtime-sidecar -- \
|
|
40
|
+
--source-root /path/to/runtime-sqlite-root \
|
|
41
|
+
--reference-root /path/to/runtime-reference-root \
|
|
42
|
+
--max-source-files all \
|
|
43
|
+
--max-scopes all \
|
|
44
|
+
--max-scopes-per-file 100 \
|
|
45
|
+
--max-references all
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This gate rejects demo-only evidence: a reference JSON must overlap real Runtime memory ids to count.
|
|
49
|
+
|
|
50
|
+
### Gate 3: Real Runtime Dual-Write Sidecar
|
|
51
|
+
|
|
52
|
+
This stage starts focused Runtime with isolated Lite SQLite files, calls the public Runtime SDK loop, mirrors the observed memory ids and outcomes into a separate Substrate SQLite store, and compares Runtime guide surfaces against Substrate compiled context.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm run check:runtime-dual-write -- \
|
|
56
|
+
--runtime-root /Volumes/ziel/AionisRuntime-focused \
|
|
57
|
+
--generated-count 8 \
|
|
58
|
+
--chain-probe-count 4 \
|
|
59
|
+
--concurrency 4
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This command remains separate from `check:runtime-sidecar` because it starts a Runtime process. It must be explicit.
|
|
63
|
+
|
|
64
|
+
## Combined Read-Only Report
|
|
65
|
+
|
|
66
|
+
`check:runtime-sidecar` can run Gate 1 and Gate 2 in one report:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm run check:runtime-sidecar -- \
|
|
70
|
+
--source /path/to/aionis-runtime-lite.sqlite \
|
|
71
|
+
--scope repo-a \
|
|
72
|
+
--reference /path/to/runtime-guide-or-measure.json \
|
|
73
|
+
--source-root /path/to/runtime-sqlite-root \
|
|
74
|
+
--reference-root /path/to/runtime-reference-root \
|
|
75
|
+
--output reports/runtime-sidecar-manual/summary.json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The report contract is `aionis_runtime_sidecar_check_report_v1`.
|
|
79
|
+
|
|
80
|
+
It records:
|
|
81
|
+
|
|
82
|
+
- requested stages;
|
|
83
|
+
- pass/fail summary per stage;
|
|
84
|
+
- snapshot import coverage and parity;
|
|
85
|
+
- reference corpus matched/unmatched counts;
|
|
86
|
+
- notes confirming that Runtime source and Runtime storage were not replaced.
|
|
87
|
+
|
|
88
|
+
## Interpretation
|
|
89
|
+
|
|
90
|
+
Passing Gate 1 means Substrate can represent one Runtime SQLite scope as governed substrate state.
|
|
91
|
+
|
|
92
|
+
Passing Gate 2 means exported Runtime references are traceable to real Runtime SQLite memory ids, not only documentation examples.
|
|
93
|
+
|
|
94
|
+
Passing Gate 3 means an external host can mirror a small real Runtime execution loop into Substrate and preserve the same admission surface after reopen.
|
|
95
|
+
|
|
96
|
+
None of these gates mean Substrate has become the full Aionis Runtime policy engine. Runtime owns richer product policy; Substrate owns the durable evidence and minimum governed context contract.
|
package/docs/STORE_CONTRACT.md
CHANGED
|
@@ -40,6 +40,8 @@ Adapters must expose schema metadata through `getStoreInfo`:
|
|
|
40
40
|
|
|
41
41
|
The SQLite adapter persists schema metadata in `substrate_metadata` and mirrors the same version into SQLite `user_version`. Opening a store with a newer unsupported schema must fail before any mutation occurs.
|
|
42
42
|
|
|
43
|
+
SQLite schema changes are applied through an explicit adapter migration registry. Applied migrations are recorded in `substrate_schema_migrations`. The registry must stay contiguous and end at the current substrate schema version, and a tampered migration name must cause open to fail.
|
|
44
|
+
|
|
43
45
|
The file adapter writes the same schema version into `snapshot.json`. The append-only event log remains the durable evidence source; the snapshot schema is the derived read-model format.
|
|
44
46
|
|
|
45
47
|
### Backup Boundary
|
|
@@ -48,6 +50,8 @@ Backups export the append-only event log plus schema metadata and a SHA-256 chec
|
|
|
48
50
|
|
|
49
51
|
Restore must verify the backup before writing a target store. Restored stores preserve original event ids and sequence numbers, then rebuild derived read models.
|
|
50
52
|
|
|
53
|
+
Backup verification must replay event reference integrity, including lifecycle targets, relation endpoints, feedback memory ids, and decision-trace memory ids.
|
|
54
|
+
|
|
51
55
|
Payload files referenced by `payloadRef` are not embedded in the Substrate backup. They remain external artifacts and need their own retention policy.
|
|
52
56
|
|
|
53
57
|
### Checkpoint Compaction
|
|
@@ -156,12 +160,22 @@ Every compiled context must include a decision trace:
|
|
|
156
160
|
- which reason code caused the decision
|
|
157
161
|
- which relation caused the decision when applicable
|
|
158
162
|
|
|
163
|
+
Every decision entry must reference a memory node that exists in the same scope as the trace. Decision traces are receipts over known substrate evidence; they cannot introduce orphan memory ids.
|
|
164
|
+
|
|
159
165
|
The trace is for audit/debug/measure. It must not mutate admission by itself.
|
|
160
166
|
|
|
161
167
|
`previewContext` is the side-effect-free admission preview. It returns the same bucket and reason-code shape as `compileContext`, but it must not append events or insert decision rows.
|
|
162
168
|
|
|
163
169
|
`compileContext` is intentionally not a pure read. It records `memory.decision.recorded` so every exported context has an auditable receipt. Tools that need a side-effect-free view must use `previewContext` instead of treating `compileContext` as read-only.
|
|
164
170
|
|
|
171
|
+
Decision and evidence records must also be inspectable without creating new events:
|
|
172
|
+
|
|
173
|
+
- `listRelations(scope, memoryId?)`
|
|
174
|
+
- `listFeedback({ scope, memoryId? })`
|
|
175
|
+
- `listDecisions(scope)`
|
|
176
|
+
|
|
177
|
+
These read APIs are for audit, debug, and measure surfaces. They do not compile context and do not mutate lifecycle, relation, feedback, decision, or checkpoint state.
|
|
178
|
+
|
|
165
179
|
## Adapter Requirements
|
|
166
180
|
|
|
167
181
|
Every adapter must satisfy the same observable contract:
|
|
@@ -172,8 +186,10 @@ Every adapter must satisfy the same observable contract:
|
|
|
172
186
|
4. Compile the same admission buckets from the same node/relation state.
|
|
173
187
|
5. Return the same scoped search results from the same node state.
|
|
174
188
|
6. Record decision traces as events.
|
|
175
|
-
7.
|
|
176
|
-
8.
|
|
189
|
+
7. Return the same scoped audit reads from the same relation, feedback, and decision state.
|
|
190
|
+
8. Reopen cleanly and recover the same read model.
|
|
191
|
+
9. Reject corrupt lifecycle, relation, feedback, decision, and checkpoint references before persisting invalid events.
|
|
192
|
+
10. If compaction is supported, compact only through a validated checkpoint event.
|
|
177
193
|
|
|
178
194
|
Current adapters:
|
|
179
195
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Aionis Substrate v0.2 Roadmap
|
|
2
|
+
|
|
3
|
+
This roadmap freezes the intended scope for the next Substrate release.
|
|
4
|
+
|
|
5
|
+
Substrate remains an independent storage-contract layer. It is not the full Aionis Runtime policy engine, not a vector database, and not an Agent framework.
|
|
6
|
+
|
|
7
|
+
## v0.2 Principles
|
|
8
|
+
|
|
9
|
+
- Keep append-only evidence as the source of truth.
|
|
10
|
+
- Keep lifecycle, relation, feedback, and decision receipts inspectable.
|
|
11
|
+
- Preserve file and SQLite adapter parity for every public API.
|
|
12
|
+
- Add product hardening only where it improves durability, auditability, or Runtime sidecar integration.
|
|
13
|
+
- Do not encode task-specific benchmark fixtures or one-off Runtime policies in Substrate.
|
|
14
|
+
|
|
15
|
+
## Included
|
|
16
|
+
|
|
17
|
+
### 1. Migration Scaffold
|
|
18
|
+
|
|
19
|
+
Add a small schema-migration boundary for future SQLite changes:
|
|
20
|
+
|
|
21
|
+
- explicit migration registry;
|
|
22
|
+
- current schema guard remains strict;
|
|
23
|
+
- migration tests for already-created stores;
|
|
24
|
+
- no best-effort reads of unsupported future schemas.
|
|
25
|
+
|
|
26
|
+
Initial implementation status: SQLite now has a registry-backed v1 migration ledger. Future schema changes should add migrations through that registry instead of editing open-time schema creation ad hoc.
|
|
27
|
+
|
|
28
|
+
### 2. Read API Hardening
|
|
29
|
+
|
|
30
|
+
Expose scoped audit reads that do not mutate the event log:
|
|
31
|
+
|
|
32
|
+
- `listRelations(scope, memoryId?)`
|
|
33
|
+
- `listFeedback({ scope, memoryId? })`
|
|
34
|
+
- `listDecisions(scope)`
|
|
35
|
+
|
|
36
|
+
These APIs are for audit/debug/measure surfaces and adapter parity checks. They do not replace `compileContext`, and they do not make admission decisions.
|
|
37
|
+
|
|
38
|
+
### 3. Durability Negative Tests
|
|
39
|
+
|
|
40
|
+
Extend failure-mode coverage:
|
|
41
|
+
|
|
42
|
+
- corrupt event references;
|
|
43
|
+
- interrupted writes;
|
|
44
|
+
- relation and feedback edge cases after compaction;
|
|
45
|
+
- checkpoint reopen after mixed read/write traffic.
|
|
46
|
+
|
|
47
|
+
Initial implementation status: decision trace references are validated like relation and feedback references. File and SQLite adapters reject missing decision targets before persisting events or rows; backup verification rejects checksum-valid orphan decision receipts; checkpoint reopen rejects corrupt decision references; post-checkpoint invalid relation, feedback, and decision writes stay atomic.
|
|
48
|
+
|
|
49
|
+
### 4. Runtime Sidecar Stabilization
|
|
50
|
+
|
|
51
|
+
Keep Runtime experiments isolated:
|
|
52
|
+
|
|
53
|
+
- read-only Runtime snapshot import remains separate from Runtime source;
|
|
54
|
+
- dual-write sidecar continues to write into a separate Substrate store;
|
|
55
|
+
- no replacement of Aionis Runtime storage in v0.2.
|
|
56
|
+
|
|
57
|
+
Initial implementation status: `check:runtime-sidecar` now combines read-only Runtime snapshot parity and same-source reference corpus parity into a single report contract. Real Runtime dual-write remains an explicit separate gate through `check:runtime-dual-write` because it starts focused Runtime.
|
|
58
|
+
|
|
59
|
+
### 5. Product CLI and Docs
|
|
60
|
+
|
|
61
|
+
Make the substrate boundary easier to consume without widening policy scope:
|
|
62
|
+
|
|
63
|
+
- publish a package CLI entrypoint for read-only sidecar checks;
|
|
64
|
+
- document install, minimal API usage, and sidecar reports separately;
|
|
65
|
+
- keep repository-only Runtime process experiments explicit and separate.
|
|
66
|
+
|
|
67
|
+
Initial implementation status: the package exposes `aionis-substrate sidecar` for read-only snapshot/reference checks and store commands for inspect, preview-context, backup, restore, compact, and Runtime snapshot import. These commands do not start Runtime, mutate Runtime storage, or implement Runtime admission policy.
|
|
68
|
+
|
|
69
|
+
## Excluded
|
|
70
|
+
|
|
71
|
+
- Vector search, ANN, embeddings, or semantic recall.
|
|
72
|
+
- Full Aionis Runtime admission policy.
|
|
73
|
+
- LLM-as-judge or model-generated lifecycle policy.
|
|
74
|
+
- Agent orchestration or external Agent harnesses.
|
|
75
|
+
- SaaS tenancy, auth, billing, or cloud service behavior.
|
|
76
|
+
- Replacing `AionisRuntime-focused` storage.
|
|
77
|
+
|
|
78
|
+
## Release Gates
|
|
79
|
+
|
|
80
|
+
Before v0.2 can be tagged:
|
|
81
|
+
|
|
82
|
+
- `npm run typecheck`
|
|
83
|
+
- `npm test`
|
|
84
|
+
- `npm run bench:contract`
|
|
85
|
+
- `npm run check:release`
|
|
86
|
+
- `npm run check:scale -- --nodes 10000 --scopes 10 --relations 2000 --feedback 1000`
|
|
87
|
+
- adapter parity tests for every new public API;
|
|
88
|
+
- package install smoke from tarball;
|
|
89
|
+
- published registry smoke after release.
|
|
90
|
+
|
|
91
|
+
## v0.1 Baseline
|
|
92
|
+
|
|
93
|
+
v0.1 already provides:
|
|
94
|
+
|
|
95
|
+
- file and SQLite adapters;
|
|
96
|
+
- append-only event log;
|
|
97
|
+
- governed context buckets;
|
|
98
|
+
- decision receipts;
|
|
99
|
+
- read-only context preview;
|
|
100
|
+
- backup and restore;
|
|
101
|
+
- checkpoint compaction;
|
|
102
|
+
- deterministic scoped search;
|
|
103
|
+
- Runtime snapshot import;
|
|
104
|
+
- external admission parity;
|
|
105
|
+
- isolated Runtime dual-write sidecar experiments;
|
|
106
|
+
- npm package and registry smoke checks.
|
|
107
|
+
|
|
108
|
+
v0.2 should harden this substrate boundary instead of broadening the product surface.
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aionis/substrate",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Durable governed memory substrate for Aionis execution state.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"aionis-substrate": "dist/cli.js"
|
|
10
|
+
},
|
|
8
11
|
"exports": {
|
|
9
12
|
".": {
|
|
10
13
|
"types": "./dist/index.d.ts",
|
|
@@ -30,11 +33,14 @@
|
|
|
30
33
|
"check:runtime-snapshot": "node scripts/runtime-snapshot-parity.ts",
|
|
31
34
|
"check:runtime-corpus": "node scripts/runtime-snapshot-corpus.ts",
|
|
32
35
|
"check:runtime-reference-corpus": "node scripts/runtime-reference-corpus.ts",
|
|
36
|
+
"check:runtime-sidecar": "node scripts/runtime-sidecar-check.ts",
|
|
33
37
|
"make:runtime-product-reference": "node scripts/runtime-product-reference-fixture.ts",
|
|
34
38
|
"check:external-admission-parity": "node scripts/external-admission-parity.ts",
|
|
35
39
|
"check:runtime-dual-write": "node scripts/runtime-dual-write-experiment.ts",
|
|
36
40
|
"check:pack": "npm run build && node scripts/verify-package.ts",
|
|
37
41
|
"check:install-smoke": "npm run build && node scripts/install-smoke.ts",
|
|
42
|
+
"check:registry-install": "node scripts/registry-install-smoke.ts",
|
|
43
|
+
"check:published-runtime-smoke": "node scripts/published-runtime-smoke.ts",
|
|
38
44
|
"check:scale": "node scripts/scale-test.ts",
|
|
39
45
|
"example:basic": "npm run build && node examples/basic/index.mjs",
|
|
40
46
|
"check:release": "npm run typecheck && npm test && npm run bench:contract && npm run example:basic && npm run check:pack && npm run check:install-smoke"
|