@fortemi/core 2026.7.11 → 2026.7.13
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 +52 -2
- package/dist/aiwg-index-shard-BhF8kKAU.d.ts +1210 -0
- package/dist/aiwg-index-shard.d.ts +2 -0
- package/dist/aiwg-index-shard.js +9999 -0
- package/dist/aiwg-index-shard.js.map +1 -0
- package/dist/aiwg-index.d.ts +16 -55
- package/dist/aiwg-index.js +11 -20
- package/dist/aiwg-index.js.map +1 -1
- package/dist/index.d.ts +59 -1188
- package/dist/index.js +16831 -2471
- package/dist/index.js.map +1 -1
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -123,8 +123,58 @@ const results = controller.query('deployment', {
|
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
Use this subpath for Pagenary-style command palettes, static docs search, and
|
|
126
|
-
vanilla JavaScript review surfaces.
|
|
127
|
-
|
|
126
|
+
vanilla JavaScript review surfaces. Its published `dist/aiwg-index.js` artifact
|
|
127
|
+
is dependency-free, contains no import statements, and is kept below 50 KB so
|
|
128
|
+
no-bundler consumers can vendor it verbatim.
|
|
129
|
+
|
|
130
|
+
Knowledge Shard conversion intentionally lives on the build-oriented subpath:
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
import {
|
|
134
|
+
aiwgFortemiIndexFromKnowledgeShard,
|
|
135
|
+
aiwgFortemiIndexToKnowledgeShard,
|
|
136
|
+
aiwgFortemiIndexToKnowledgeShardWithReport,
|
|
137
|
+
} from '@fortemi/core/aiwg-index-shard'
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
That subpath owns the schema, tar/gzip, checksum, and UUID dependencies. The
|
|
141
|
+
top-level `@fortemi/core` export also remains available for full archive/runtime
|
|
142
|
+
integrations.
|
|
143
|
+
|
|
144
|
+
`aiwgFortemiIndexToKnowledgeShard` retains the reversible schema 1.2.0
|
|
145
|
+
`core-v1` adapter. Native conversion uses the report-bearing entry point and
|
|
146
|
+
the exact `2.0.0/full-v1` tuple:
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
const result = await aiwgFortemiIndexToKnowledgeShardWithReport(index)
|
|
150
|
+
|
|
151
|
+
if (!result.success) {
|
|
152
|
+
console.table(result.losses)
|
|
153
|
+
throw new Error('AIWG input cannot be represented as full-v1')
|
|
154
|
+
}
|
|
155
|
+
await importShard(db, result.archive!, { blobStore, conflictStrategy: 'replace' })
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The full converter emits all 33 authority files and native note, relationship,
|
|
159
|
+
SKOS, provenance, embedding, and graph records when the AIWG source is fully
|
|
160
|
+
representable. Derived, defaulted, or omitted source information returns
|
|
161
|
+
`archive: null` with typed `losses`; lossy output is never labeled `full-v1`.
|
|
162
|
+
|
|
163
|
+
PGlite uses the same rule for `2.0.0/full-v1`. A previously imported full
|
|
164
|
+
snapshot re-exports its complete logical file set; otherwise the exporter
|
|
165
|
+
materializes all 33 files from live domain tables, requires every referenced
|
|
166
|
+
attachment byte, and can add an Ed25519 publisher signature. Live values that
|
|
167
|
+
cannot satisfy the authority schema, including non-768-dimensional embedding
|
|
168
|
+
vectors, return `archive: null` with a typed capability loss.
|
|
169
|
+
|
|
170
|
+
Knowledge Shard 2.0 treats absent, `null`, empty, and non-empty values as
|
|
171
|
+
distinct authority states. PGlite persists `core-v1` field presence in a
|
|
172
|
+
transactional sidecar, while RecordStore carries its `record-v1` projection and
|
|
173
|
+
manifest state in the same atomic batch. Wildcard fields are tracked per array
|
|
174
|
+
member, such as `/attachments/0/reason`. Import rejects unsupported states
|
|
175
|
+
before mutation, and export rejects legacy rows whose original presence is
|
|
176
|
+
indeterminate. The pinned local matrix receipt is
|
|
177
|
+
`schemas/knowledge-shard-v2.presence.receipt.json`.
|
|
128
178
|
|
|
129
179
|
The AIWG index adapter accepts both `aiwg.fortemi.index.export.v1` and
|
|
130
180
|
`aiwg.fortemi.index.export.v2` envelopes. The v1 record contract keeps the
|