@fortemi/core 2026.7.12 → 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 +36 -0
- package/dist/aiwg-index-shard-BhF8kKAU.d.ts +1210 -0
- package/dist/aiwg-index-shard.d.ts +2 -1
- package/dist/aiwg-index-shard.js +8107 -303
- package/dist/aiwg-index-shard.js.map +1 -1
- package/dist/index.d.ts +60 -703
- package/dist/index.js +16831 -2473
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
- package/dist/aiwg-index-shard-oG45XSCU.d.ts +0 -502
package/README.md
CHANGED
|
@@ -133,6 +133,7 @@ Knowledge Shard conversion intentionally lives on the build-oriented subpath:
|
|
|
133
133
|
import {
|
|
134
134
|
aiwgFortemiIndexFromKnowledgeShard,
|
|
135
135
|
aiwgFortemiIndexToKnowledgeShard,
|
|
136
|
+
aiwgFortemiIndexToKnowledgeShardWithReport,
|
|
136
137
|
} from '@fortemi/core/aiwg-index-shard'
|
|
137
138
|
```
|
|
138
139
|
|
|
@@ -140,6 +141,41 @@ That subpath owns the schema, tar/gzip, checksum, and UUID dependencies. The
|
|
|
140
141
|
top-level `@fortemi/core` export also remains available for full archive/runtime
|
|
141
142
|
integrations.
|
|
142
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`.
|
|
178
|
+
|
|
143
179
|
The AIWG index adapter accepts both `aiwg.fortemi.index.export.v1` and
|
|
144
180
|
`aiwg.fortemi.index.export.v2` envelopes. The v1 record contract keeps the
|
|
145
181
|
existing flat fields for filtering and search: `facets`, `tags`, `concepts`,
|