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.
23 lines
402 B
JSON
23 lines
402 B
JSON
{
|
|
"name": "@nostr-governance/core",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"main": "src/index.js",
|
|
"types": "dist/types/index.d.ts",
|
|
"files": [
|
|
"src",
|
|
"dist"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/types/index.d.ts",
|
|
"import": "./src/index.js"
|
|
},
|
|
"./dist/types/*": "./dist/types/*"
|
|
},
|
|
"scripts": {
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {}
|
|
}
|