@fortemi/core 2026.7.2 → 2026.7.4
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 +3 -3
- package/dist/aiwg-index-C2G7iy-b.d.ts +826 -0
- package/dist/aiwg-index.d.ts +1 -464
- package/dist/aiwg-index.js +1118 -89
- package/dist/aiwg-index.js.map +1 -1
- package/dist/index.d.ts +213 -300
- package/dist/index.js +2914 -222
- package/dist/index.js.map +1 -1
- package/package.json +15 -3
- package/tools/verify-fortemi-compatibility.mjs +82 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fortemi/core",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.4",
|
|
4
4
|
"description": "Browser-only knowledge management core: PGlite (PostgreSQL WASM) data layer, single-writer worker, MCP tools, job queue, capability system, SKOS taxonomy, hybrid search. 100% JSON format parity with the fortemi Rust server.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fortemi",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"browser-database"
|
|
15
15
|
],
|
|
16
16
|
"type": "module",
|
|
17
|
+
"sideEffects": false,
|
|
17
18
|
"license": "AGPL-3.0-only",
|
|
18
19
|
"author": "Joseph Magly <joe@magly.net>",
|
|
19
20
|
"homepage": "https://github.com/Fortemi/fortemi-react",
|
|
@@ -31,6 +32,9 @@
|
|
|
31
32
|
"main": "./dist/index.js",
|
|
32
33
|
"module": "./dist/index.js",
|
|
33
34
|
"types": "./dist/index.d.ts",
|
|
35
|
+
"bin": {
|
|
36
|
+
"fortemi-compatibility": "./tools/verify-fortemi-compatibility.mjs"
|
|
37
|
+
},
|
|
34
38
|
"exports": {
|
|
35
39
|
".": {
|
|
36
40
|
"types": "./dist/index.d.ts",
|
|
@@ -46,16 +50,20 @@
|
|
|
46
50
|
},
|
|
47
51
|
"files": [
|
|
48
52
|
"dist",
|
|
53
|
+
"tools",
|
|
49
54
|
"README.md",
|
|
50
55
|
"LICENSE"
|
|
51
56
|
],
|
|
52
57
|
"dependencies": {
|
|
53
|
-
"@electric-sql/pglite": "^0.4.1",
|
|
54
58
|
"@noble/hashes": "^1.7.2",
|
|
59
|
+
"ajv": "^8.17.1",
|
|
55
60
|
"fflate": "^0.8.2",
|
|
56
61
|
"uuid": "^13.0.0",
|
|
57
62
|
"zod": "^3.24.0"
|
|
58
63
|
},
|
|
64
|
+
"optionalDependencies": {
|
|
65
|
+
"@electric-sql/pglite": "^0.4.1"
|
|
66
|
+
},
|
|
59
67
|
"devDependencies": {
|
|
60
68
|
"@types/node": "^22.0.0",
|
|
61
69
|
"@vitest/coverage-v8": "^4.1.1",
|
|
@@ -67,6 +75,10 @@
|
|
|
67
75
|
"build": "tsup",
|
|
68
76
|
"typecheck": "tsc --noEmit",
|
|
69
77
|
"test": "vitest run",
|
|
70
|
-
"test:
|
|
78
|
+
"test:db-table-parity": "vitest run src/__tests__/db-table-parity",
|
|
79
|
+
"test:portable-contract": "vitest run src/__tests__/aiwg-index.test.ts src/__tests__/shard/shard-conformance.spike.test.ts src/__tests__/shard/schema-validator.test.ts",
|
|
80
|
+
"shard:refresh-golden": "node scripts/refresh-knowledge-shard-golden.mjs",
|
|
81
|
+
"test:watch": "vitest",
|
|
82
|
+
"verify:fortemi-compatibility": "node tools/verify-fortemi-compatibility.mjs"
|
|
71
83
|
}
|
|
72
84
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
fetchAndValidateFortemiCompatibility,
|
|
4
|
+
formatFortemiCompatibilitySummary,
|
|
5
|
+
} from '../dist/index.js'
|
|
6
|
+
|
|
7
|
+
function usage() {
|
|
8
|
+
return `Usage: verify-fortemi-compatibility [--base-url URL] [--json]
|
|
9
|
+
|
|
10
|
+
Validates a local Fortemi /api/v1/system/compatibility response using @fortemi/core.
|
|
11
|
+
|
|
12
|
+
Environment:
|
|
13
|
+
FORTEMI_COMPATIBILITY_BASE_URL Base URL or full compatibility endpoint URL
|
|
14
|
+
HOTM_FORTEMI_BASE_URL HotM-compatible fallback base URL
|
|
15
|
+
|
|
16
|
+
This is local compatibility evidence only. It is not hosted/mobile production proof.`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function parseArgs(argv) {
|
|
20
|
+
const parsed = {
|
|
21
|
+
baseUrl: process.env.FORTEMI_COMPATIBILITY_BASE_URL || process.env.HOTM_FORTEMI_BASE_URL || 'http://localhost:3000',
|
|
22
|
+
json: false,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
26
|
+
const arg = argv[index]
|
|
27
|
+
if (arg === '--help' || arg === '-h') {
|
|
28
|
+
console.log(usage())
|
|
29
|
+
process.exit(0)
|
|
30
|
+
}
|
|
31
|
+
if (arg === '--json') {
|
|
32
|
+
parsed.json = true
|
|
33
|
+
continue
|
|
34
|
+
}
|
|
35
|
+
if (arg === '--base-url') {
|
|
36
|
+
const value = argv[index + 1]
|
|
37
|
+
if (!value) {
|
|
38
|
+
throw new Error('--base-url requires a value')
|
|
39
|
+
}
|
|
40
|
+
parsed.baseUrl = value
|
|
41
|
+
index += 1
|
|
42
|
+
continue
|
|
43
|
+
}
|
|
44
|
+
if (arg.startsWith('--base-url=')) {
|
|
45
|
+
parsed.baseUrl = arg.slice('--base-url='.length)
|
|
46
|
+
continue
|
|
47
|
+
}
|
|
48
|
+
throw new Error(`unknown argument: ${arg}`)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return parsed
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function main() {
|
|
55
|
+
const args = parseArgs(process.argv.slice(2))
|
|
56
|
+
const result = await fetchAndValidateFortemiCompatibility({ baseUrl: args.baseUrl })
|
|
57
|
+
|
|
58
|
+
if (args.json) {
|
|
59
|
+
console.log(JSON.stringify(result, null, 2))
|
|
60
|
+
} else if (result.ok && result.response) {
|
|
61
|
+
console.log(`Fortemi compatibility check passed: ${result.url}`)
|
|
62
|
+
console.log(formatFortemiCompatibilitySummary(result.response))
|
|
63
|
+
for (const warning of result.warnings) {
|
|
64
|
+
console.warn(`WARN: ${warning}`)
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
console.error(`Fortemi compatibility check failed: ${result.url}`)
|
|
68
|
+
for (const error of result.errors) {
|
|
69
|
+
console.error(`FAIL: ${error}`)
|
|
70
|
+
}
|
|
71
|
+
for (const warning of result.warnings) {
|
|
72
|
+
console.error(`WARN: ${warning}`)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
process.exit(result.ok ? 0 : 1)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
main().catch((error) => {
|
|
80
|
+
console.error(error instanceof Error ? error.message : String(error))
|
|
81
|
+
process.exit(1)
|
|
82
|
+
})
|