mirror of
https://github.com/PR0M3TH3AN/bitgate.git
synced 2026-10-27 08:31:00 +00:00
Stores (Phase 4): admin, trust graph, reports, trusted mutes, policy, and overrides. Each owns one slice of state and emits only when effective state changes, so a consumer can treat every emission as a real invalidation. - report storage is keyed target -> reporter -> category, making deduplication structural: relays redeliver constantly and a redelivery must not inflate a count - contribution lists replace by (actor, kind) and ignore out-of-order older documents, so a late delivery cannot resurrect removed entries - mute lists prune against an injected clock - viewer switching clears blocks, mutes, and overrides but keeps operator seeds, which are configuration rather than viewer data Runtime: event routing, chunked report subscriptions (200 per filter, not one per target), viewer lifecycle, evaluation, diagnostics, idempotent teardown. Transport, signer, and storage are injected; in-memory doubles ship for tests. Commands (Phase 5): every mutation checks capability locally before the signer is invoked, so an unauthorized actor cannot produce a signed event at all. Protected actors are refused at the command boundary as well as during reduction. Partial relay acceptance succeeds while keeping failures visible. Also fixes the type build: every package's "types" field pointed at a path the build never produced, so consumers got no types at all. Declarations now emit per package and resolve. 103 runtime tests; 505 total.
29 lines
1.0 KiB
JSON
29 lines
1.0 KiB
JSON
{
|
|
"name": "nostr-governance",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Headless Nostr governance SDK for decentralized moderation and access control",
|
|
"scripts": {
|
|
"test": "npm run test:unit && npm run test:conformance",
|
|
"test:unit": "vitest run --passWithNoTests",
|
|
"test:conformance": "vitest run tests/conformance --passWithNoTests",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"build:types": "tsc -p packages/core/tsconfig.types.json && tsc -p packages/nostr/tsconfig.types.json && tsc -p packages/runtime/tsconfig.types.json && tsc -p packages/bitvid-compat/tsconfig.types.json && tsc -p packages/testing/tsconfig.types.json",
|
|
"lint": "npm run check:references && npm run check:types",
|
|
"check:references": "node scripts/verify-no-reference-imports.mjs",
|
|
"check:types": "npm run typecheck"
|
|
},
|
|
"engines": {
|
|
"node": ">=22"
|
|
},
|
|
"workspaces": [
|
|
"packages/*"
|
|
],
|
|
"devDependencies": {
|
|
"@types/node": "^22.10.0",
|
|
"typescript": "^5.4.5",
|
|
"vitest": "^1.6.0"
|
|
}
|
|
}
|