2026-05-30 00:39:39 +01:00
|
|
|
{
|
|
|
|
|
"name": "cultnet-ts",
|
2026-10-19 21:13:33 +02:00
|
|
|
"version": "0.3.0",
|
2026-05-30 00:39:39 +01:00
|
|
|
"description": "CultNet-style typed direct-pipe messaging and state replication for TypeScript runtimes.",
|
|
|
|
|
"main": "dist/index.js",
|
|
|
|
|
"types": "dist/index.d.ts",
|
2026-07-13 23:47:38 +01:00
|
|
|
"exports": {
|
|
|
|
|
".": {
|
|
|
|
|
"types": "./dist/index.d.ts",
|
|
|
|
|
"require": "./dist/index.js",
|
|
|
|
|
"default": "./dist/index.js"
|
2026-08-18 00:05:57 +02:00
|
|
|
},
|
|
|
|
|
"./contracts": {
|
|
|
|
|
"types": "./dist/contracts.d.ts",
|
|
|
|
|
"require": "./dist/contracts.js",
|
|
|
|
|
"default": "./dist/contracts.js"
|
Add the shared CultMesh route verifier to cultnet-ts
Cut 1 of the TypeScript QUIC realtime plane: one TypeScript
implementation of Odin root lookup, the validity window, the canonical
route and session transcripts, P-256/P1363 verification, loopback
detection and the protected-scheme rule, published as
`cultnet-ts/authority`. Browser-safe by construction: WebCrypto,
TextEncoder, atob/btoa, URL, DataView; no node: import, and a test that
says so.
The protected-scheme rule is the C# rule (wss, https, any scheme
containing "quic") rather than wss-only, so the module is not wrong for
QUIC routes; the browser client still refuses non-ws(s) endpoints itself.
The transcript bytes are pinned by contracts/cultmesh/authority-route-
vectors.json, written by the C# reference under CULTMESH_WRITE_VECTORS=1
with fixed test keys and otherwise re-verified by both runtimes. The
vector carries a route certificate and a provider session proof.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 15:59:09 +02:00
|
|
|
},
|
2026-10-11 10:25:29 +02:00
|
|
|
"./wire": {
|
|
|
|
|
"types": "./dist/wire-value.d.ts",
|
|
|
|
|
"require": "./dist/wire-value.js",
|
|
|
|
|
"default": "./dist/wire-value.js"
|
|
|
|
|
},
|
2026-09-29 03:13:37 +02:00
|
|
|
"./idunn-runtime": {
|
|
|
|
|
"types": "./dist/idunn-runtime-authority.d.ts",
|
|
|
|
|
"require": "./dist/idunn-runtime-authority.js",
|
|
|
|
|
"default": "./dist/idunn-runtime-authority.js"
|
|
|
|
|
},
|
Add the shared CultMesh route verifier to cultnet-ts
Cut 1 of the TypeScript QUIC realtime plane: one TypeScript
implementation of Odin root lookup, the validity window, the canonical
route and session transcripts, P-256/P1363 verification, loopback
detection and the protected-scheme rule, published as
`cultnet-ts/authority`. Browser-safe by construction: WebCrypto,
TextEncoder, atob/btoa, URL, DataView; no node: import, and a test that
says so.
The protected-scheme rule is the C# rule (wss, https, any scheme
containing "quic") rather than wss-only, so the module is not wrong for
QUIC routes; the browser client still refuses non-ws(s) endpoints itself.
The transcript bytes are pinned by contracts/cultmesh/authority-route-
vectors.json, written by the C# reference under CULTMESH_WRITE_VECTORS=1
with fixed test keys and otherwise re-verified by both runtimes. The
vector carries a route certificate and a provider session proof.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 15:59:09 +02:00
|
|
|
"./authority": {
|
|
|
|
|
"types": "./dist/cultmesh-authority.d.ts",
|
|
|
|
|
"require": "./dist/cultmesh-authority.js",
|
|
|
|
|
"default": "./dist/cultmesh-authority.js"
|
cultnet-ts/content: the TypeScript CDN manifest, codec, hashing, record keys and packer
One browser-safe module owns the manifest and chunk-ref shapes, their MessagePack form (positional ten-array, metadata as
ordered entries, duplicate keys and unsafe integers refused, payload depth through cultcache-ts's own checkPayloadDepth),
normalizeHash/parseSha256Hex, both record-key grammars (StableToken per UTF-16 unit), WebCrypto sha256Hex and packContent.
cultcache-ts/document re-exports checkPayloadDepth. scripts/write-cultmesh-content-vectors.mjs writes the TypeScript
manifest vectors for the C# reference to judge.
Builds. Co-Authored-By below.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:35:15 +02:00
|
|
|
},
|
|
|
|
|
"./content": {
|
|
|
|
|
"types": "./dist/content.d.ts",
|
|
|
|
|
"require": "./dist/content.js",
|
|
|
|
|
"default": "./dist/content.js"
|
2026-07-13 23:47:38 +01:00
|
|
|
}
|
|
|
|
|
},
|
2026-05-30 00:39:39 +01:00
|
|
|
"files": [
|
|
|
|
|
"dist",
|
|
|
|
|
"contracts"
|
|
|
|
|
],
|
|
|
|
|
"scripts": {
|
|
|
|
|
"contracts:generate": "node tools/generate-swarm-contracts.mjs",
|
2026-07-13 23:47:38 +01:00
|
|
|
"build": "node tools/generate-swarm-contracts.mjs && node ../../node_modules/typescript/bin/tsc -p tsconfig.json",
|
|
|
|
|
"prepack": "node tools/generate-swarm-contracts.mjs && node ../../node_modules/typescript/bin/tsc -p tsconfig.json",
|
|
|
|
|
"typecheck": "node tools/generate-swarm-contracts.mjs && node ../../node_modules/typescript/bin/tsc -p tsconfig.json --pretty false",
|
|
|
|
|
"test": "node tools/generate-swarm-contracts.mjs && node ../../node_modules/typescript/bin/tsc -p tsconfig.json && node ../../node_modules/typescript/bin/tsc -p tsconfig.test.json && node --test dist-test/test/*.test.js",
|
Stop the interop harness leaking peers and hanging after it passes
The suite finished its work in about 60 seconds and then never exited. Four runs
were left alive for hours, holding 11 node and 2 dotnet peers, and a stranded
peer holding cultnet_interop_peer.exe is what made two unrelated cargo builds
fail with LNK1104. In CI this is a job that burns its whole timeout on green
tests.
Two real defects, found by asking the stuck process what it was waiting on
rather than by guessing. process.getActiveResourcesInfo reported four UDPWraps
and two PipeWraps still held after the last test.
The four UDP sockets: eight tests bind a server socket with bindUdpSocket and
close only the transport wrapper in their finally, never the socket itself. Four
leaked per run, matching the four Python lanes that fail on a machine without
msgpack -- the wrapper is built inside the try, so when the peer's readiness
rejects it never exists to be closed, and the raw socket is orphaned. Now closed
through a guarded helper that tolerates a transport having adopted it.
The teardown registration: t.after was registered after every `await ready`, so
a peer whose readiness rejected skipped the registration entirely and stranded
every peer already spawned. Moved ahead of the spawns at all four sites.
With those fixed the suite still does not drain on its own, so test:interop now
passes --test-force-exit. That is safe only because cleanup demonstrably
completes first: a forced run now leaves zero peers behind, where before it left
nine. Forcing the exit without the fixes above would have guaranteed orphans
rather than prevented them.
Verified: 65 seconds, exit 1, the expected 15 pass and 12 fail, no surviving
processes. The 12 failures are the Python lanes, which cannot run on this
machine and are unrelated.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 16:32:10 +02:00
|
|
|
"test:interop": "node tools/generate-swarm-contracts.mjs && node ../../node_modules/typescript/bin/tsc -p tsconfig.json && node ../../node_modules/typescript/bin/tsc -p tsconfig.test.json && node --test --test-force-exit dist-test/test/interop/*.test.js"
|
2026-05-30 00:39:39 +01:00
|
|
|
},
|
|
|
|
|
"keywords": [
|
|
|
|
|
"messagepack",
|
|
|
|
|
"networking",
|
|
|
|
|
"pipes",
|
|
|
|
|
"cultcache",
|
|
|
|
|
"gamecult",
|
|
|
|
|
"typescript"
|
|
|
|
|
],
|
|
|
|
|
"author": "metacratic",
|
|
|
|
|
"license": "MIT",
|
2026-07-13 23:47:38 +01:00
|
|
|
"repository": {
|
|
|
|
|
"type": "git",
|
|
|
|
|
"url": "git+https://github.com/GameCult/CultLib.git",
|
|
|
|
|
"directory": "packages/cultnet-ts"
|
|
|
|
|
},
|
|
|
|
|
"bugs": {
|
|
|
|
|
"url": "https://github.com/GameCult/CultLib/issues"
|
|
|
|
|
},
|
|
|
|
|
"homepage": "https://github.com/GameCult/CultLib/tree/main/packages/cultnet-ts#readme",
|
|
|
|
|
"engines": {
|
2026-09-29 01:21:18 +02:00
|
|
|
"node": ">=20"
|
2026-07-13 23:47:38 +01:00
|
|
|
},
|
2026-05-30 00:39:39 +01:00
|
|
|
"dependencies": {
|
|
|
|
|
"@msgpack/msgpack": "^3.1.3",
|
|
|
|
|
"ajv": "^8.17.1",
|
2026-10-19 21:13:33 +02:00
|
|
|
"@gamecult/cultcache-ts": "^0.14.1"
|
2026-05-30 00:39:39 +01:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
|
|
|
|
"@types/node": "^24.0.0",
|
|
|
|
|
"json-schema-to-typescript": "^15.0.4",
|
|
|
|
|
"typescript": "^5.9.0",
|
|
|
|
|
"zod": "^3.25.76"
|
|
|
|
|
}
|
|
|
|
|
}
|