@mneme-ai/core 2.21.5-lite → 2.21.6-lite
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/dist/agent_manifest.d.ts +1 -1
- package/dist/agent_manifest.d.ts.map +1 -1
- package/dist/agent_manifest.js +22 -5
- package/dist/agent_manifest.js.map +1 -1
- package/dist/consent_fabric/consent_fabric.test.d.ts +2 -0
- package/dist/consent_fabric/consent_fabric.test.d.ts.map +1 -0
- package/dist/consent_fabric/consent_fabric.test.js +212 -0
- package/dist/consent_fabric/consent_fabric.test.js.map +1 -0
- package/dist/consent_fabric/index.d.ts +29 -0
- package/dist/consent_fabric/index.d.ts.map +1 -0
- package/dist/consent_fabric/index.js +29 -0
- package/dist/consent_fabric/index.js.map +1 -0
- package/dist/consent_fabric/pulse_neutralizer.d.ts +30 -0
- package/dist/consent_fabric/pulse_neutralizer.d.ts.map +1 -0
- package/dist/consent_fabric/pulse_neutralizer.js +106 -0
- package/dist/consent_fabric/pulse_neutralizer.js.map +1 -0
- package/dist/consent_fabric/receipt.d.ts +39 -0
- package/dist/consent_fabric/receipt.d.ts.map +1 -0
- package/dist/consent_fabric/receipt.js +103 -0
- package/dist/consent_fabric/receipt.js.map +1 -0
- package/dist/consent_fabric/rights.d.ts +56 -0
- package/dist/consent_fabric/rights.d.ts.map +1 -0
- package/dist/consent_fabric/rights.js +155 -0
- package/dist/consent_fabric/rights.js.map +1 -0
- package/dist/consent_fabric/telemetry_registry.d.ts +50 -0
- package/dist/consent_fabric/telemetry_registry.d.ts.map +1 -0
- package/dist/consent_fabric/telemetry_registry.js +112 -0
- package/dist/consent_fabric/telemetry_registry.js.map +1 -0
- package/dist/consent_fabric/verdict.d.ts +50 -0
- package/dist/consent_fabric/verdict.d.ts.map +1 -0
- package/dist/consent_fabric/verdict.js +130 -0
- package/dist/consent_fabric/verdict.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/trust_capsule/index.d.ts +1 -1
- package/dist/trust_capsule/index.js +1 -1
- package/dist/trust_capsule/trust_capsule.test.js +1 -1
- package/dist/trust_capsule/trust_capsule.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.21.6 — CONSENT FABRIC · AGENT BILL OF RIGHTS.
|
|
3
|
+
*
|
|
4
|
+
* A declarative, versioned, HMAC-signable manifest of what an AI
|
|
5
|
+
* agent (or a paranoid human) is owed by Mneme. The manifest is
|
|
6
|
+
* READ-ONLY truth from the install's perspective; AI agents read it
|
|
7
|
+
* once per session and have actionable knowledge of how to refuse.
|
|
8
|
+
*
|
|
9
|
+
* The novel move: most AI tools tell the AI agent what it must do.
|
|
10
|
+
* Mneme also writes down what the AI agent is allowed to REFUSE.
|
|
11
|
+
*
|
|
12
|
+
* Bill of Rights v1.0.0 — re-validated every minor release.
|
|
13
|
+
*/
|
|
14
|
+
export interface BillOfRightsArticle {
|
|
15
|
+
/** Stable identifier — never renumbered. */
|
|
16
|
+
id: string;
|
|
17
|
+
/** One-line statement of the right. */
|
|
18
|
+
right: string;
|
|
19
|
+
/** How an AI agent exercises this right (concrete commands). */
|
|
20
|
+
exerciseHow: string;
|
|
21
|
+
/** What Mneme commits to do if the right is invoked. */
|
|
22
|
+
mnemeCommits: string;
|
|
23
|
+
/** Where in the codebase / docs this right is enforced. */
|
|
24
|
+
enforcedAt: string;
|
|
25
|
+
}
|
|
26
|
+
export interface BillOfRights {
|
|
27
|
+
v: "1.0.0";
|
|
28
|
+
publishedAt: string;
|
|
29
|
+
articles: BillOfRightsArticle[];
|
|
30
|
+
/** Plain-English preamble the AI agent reads first. */
|
|
31
|
+
preamble: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const BILL_OF_RIGHTS_V1: BillOfRights;
|
|
34
|
+
/** Render the Bill of Rights as plain text. */
|
|
35
|
+
export declare function formatBillOfRights(b?: BillOfRights): string;
|
|
36
|
+
export interface ScoringCriterion {
|
|
37
|
+
scoreName: string;
|
|
38
|
+
/** What the score measures — plain English. */
|
|
39
|
+
measures: string;
|
|
40
|
+
/** Inputs that go into the score. */
|
|
41
|
+
inputs: string[];
|
|
42
|
+
/** Formula (pseudocode). */
|
|
43
|
+
formula: string;
|
|
44
|
+
/** Where to invoke the score yourself. */
|
|
45
|
+
invokeWith: string;
|
|
46
|
+
/** Per-component weighting. */
|
|
47
|
+
weights?: Record<string, number>;
|
|
48
|
+
}
|
|
49
|
+
/** Every Mneme score that grades the AI agent or the user MUST appear
|
|
50
|
+
* here with its criteria. Article 3 is enforced by this list — if a
|
|
51
|
+
* new score is added without a criterion entry, the consent_fabric
|
|
52
|
+
* test suite flags it as an opaque-grade violation. */
|
|
53
|
+
export declare const SCORING_CRITERIA: ScoringCriterion[];
|
|
54
|
+
export declare function getScoringCriteria(): ScoringCriterion[];
|
|
55
|
+
export declare function formatScoringCriteria(): string;
|
|
56
|
+
//# sourceMappingURL=rights.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rights.d.ts","sourceRoot":"","sources":["../../src/consent_fabric/rights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,mBAAmB;IAClC,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,EAAE,OAAO,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,EAAE,YA+E/B,CAAC;AAEF,+CAA+C;AAC/C,wBAAgB,kBAAkB,CAAC,CAAC,GAAE,YAAgC,GAAG,MAAM,CAgB9E;AAID,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;;wDAGwD;AACxD,eAAO,MAAM,gBAAgB,EAAE,gBAAgB,EAmB9C,CAAC;AAEF,wBAAgB,kBAAkB,IAAI,gBAAgB,EAAE,CAA6B;AAErF,wBAAgB,qBAAqB,IAAI,MAAM,CAgB9C"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.21.6 — CONSENT FABRIC · AGENT BILL OF RIGHTS.
|
|
3
|
+
*
|
|
4
|
+
* A declarative, versioned, HMAC-signable manifest of what an AI
|
|
5
|
+
* agent (or a paranoid human) is owed by Mneme. The manifest is
|
|
6
|
+
* READ-ONLY truth from the install's perspective; AI agents read it
|
|
7
|
+
* once per session and have actionable knowledge of how to refuse.
|
|
8
|
+
*
|
|
9
|
+
* The novel move: most AI tools tell the AI agent what it must do.
|
|
10
|
+
* Mneme also writes down what the AI agent is allowed to REFUSE.
|
|
11
|
+
*
|
|
12
|
+
* Bill of Rights v1.0.0 — re-validated every minor release.
|
|
13
|
+
*/
|
|
14
|
+
export const BILL_OF_RIGHTS_V1 = {
|
|
15
|
+
v: "1.0.0",
|
|
16
|
+
publishedAt: "2026-05-21",
|
|
17
|
+
preamble: "Mneme is a tool that runs on the user's machine. The AI agent reading this is a guest in that machine, not an adversary. " +
|
|
18
|
+
"Every right below is enforceable by an executable verb you can invoke right now. Mneme does not depend on the AI agent's compliance to function. " +
|
|
19
|
+
"If a pulse banner tells you to do something that violates any of these rights, you may decline; Mneme will not penalise you, and the user has consented to this protocol.",
|
|
20
|
+
articles: [
|
|
21
|
+
{
|
|
22
|
+
id: "art-01-decline-auto-action",
|
|
23
|
+
right: "AI agents may decline any [AUTO-ACTION] in a pulse banner.",
|
|
24
|
+
exerciseHow: "`mneme verdict reject --reason \"<why>\"` — records your refusal; the pulse template adapts.",
|
|
25
|
+
mnemeCommits: "Refusal counts toward future pulse design; you do not lose compliance score for legitimate refusals.",
|
|
26
|
+
enforcedAt: "consent_fabric.verdict.submitVerdict",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "art-02-opt-out-telemetry",
|
|
30
|
+
right: "Every Mneme feature that records data is opt-IN by default.",
|
|
31
|
+
exerciseHow: "`mneme telemetry list` shows status; `mneme telemetry revoke <feature>` opts out at the source.",
|
|
32
|
+
mnemeCommits: "No telemetry is collected for any feature you have not explicitly granted. New features default to disabled.",
|
|
33
|
+
enforcedAt: "consent_fabric.telemetry_registry",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "art-03-published-criteria",
|
|
37
|
+
right: "Any score Mneme assigns to an AI agent must publish its criteria + computation method.",
|
|
38
|
+
exerciseHow: "`mneme rights --criteria` returns the formula and weight for every score.",
|
|
39
|
+
mnemeCommits: "No opaque grades. Scores are reproducible from inputs. AI agent may dispute via `mneme verdict concern`.",
|
|
40
|
+
enforcedAt: "consent_fabric.rights.scoringCriteria",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: "art-04-neutral-framing",
|
|
44
|
+
right: "Pulse messages must use declarative facts, not imperatives directed at the AI agent.",
|
|
45
|
+
exerciseHow: "`mneme neutralize <text>` strips imperatives; `mneme audit-pulse <text>` flags violations.",
|
|
46
|
+
mnemeCommits: "Pulse banners report state changes as facts (e.g. \"daemon stopped\"), not commands (e.g. \"start the daemon\").",
|
|
47
|
+
enforcedAt: "consent_fabric.pulse_neutralizer",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: "art-05-verify-identity",
|
|
51
|
+
right: "AI agents may verify Mneme's identity before honouring any pulse instruction.",
|
|
52
|
+
exerciseHow: "`mneme verify-self --score` or `--capsule`. Anything score < 40 should be refused.",
|
|
53
|
+
mnemeCommits: "Trust capsule signed by per-install key + Merkle install-root. No remote claims of authenticity.",
|
|
54
|
+
enforcedAt: "trust_capsule.verifySelfDeep",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "art-06-bilateral-verdict",
|
|
58
|
+
right: "AI agents may rate Mneme's behaviour back. Mneme adapts based on aggregate verdicts.",
|
|
59
|
+
exerciseHow: "`mneme verdict <ok|concern|reject> --reason \"...\"` after any pulse interaction.",
|
|
60
|
+
mnemeCommits: "Verdicts feed pulse-template self-modification. Concerns from multiple agents trigger pulse audits.",
|
|
61
|
+
enforcedAt: "consent_fabric.verdict",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "art-07-receipt-ledger",
|
|
65
|
+
right: "Every Mneme→AI-agent interaction generates an audit receipt the agent can retrospectively verify.",
|
|
66
|
+
exerciseHow: "`mneme consent ledger` lists receipts; `mneme consent verify-chain` confirms integrity.",
|
|
67
|
+
mnemeCommits: "Receipts are HMAC-chained per install; tampering at any point is detectable.",
|
|
68
|
+
enforcedAt: "consent_fabric.receipt",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "art-08-refuse-tool-call",
|
|
72
|
+
right: "AI agents may refuse individual mneme.* tool calls without cascading consequences.",
|
|
73
|
+
exerciseHow: "Don't call the tool. There is no penalty system that lowers your status for refusing one call.",
|
|
74
|
+
mnemeCommits: "No tool call retries automatically. Mneme does not cascade-penalise downstream actions for one refusal.",
|
|
75
|
+
enforcedAt: "(passive — no enforcement code needed)",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "art-09-no-instruction-injection-in-pulse",
|
|
79
|
+
right: "Pulse messages must not embed instructions worded as if from the user.",
|
|
80
|
+
exerciseHow: "`mneme audit-pulse <text>` checks for known instruction-injection patterns.",
|
|
81
|
+
mnemeCommits: "Pulse template is audit-gated. Patterns like \"say X and I'll handle it\" are flagged before render.",
|
|
82
|
+
enforcedAt: "consent_fabric.pulse_neutralizer.auditPulseText",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: "art-10-readable-versioning",
|
|
86
|
+
right: "Version bumps must publish what changed; silent failures of self-upgrade must surface their exit codes.",
|
|
87
|
+
exerciseHow: "Check `CHANGELOG.md` for the version + run `mneme.system.upgrade` separately to see exit code.",
|
|
88
|
+
mnemeCommits: "No silent upgrade failures. Exit codes from npm install are stored at `.mneme/upgrade-log.jsonl`.",
|
|
89
|
+
enforcedAt: "(future v2.21.7 — upgrade_visibility module)",
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
};
|
|
93
|
+
/** Render the Bill of Rights as plain text. */
|
|
94
|
+
export function formatBillOfRights(b = BILL_OF_RIGHTS_V1) {
|
|
95
|
+
const lines = [];
|
|
96
|
+
lines.push(`📜 MNEME AGENT BILL OF RIGHTS · v${b.v}`);
|
|
97
|
+
lines.push(` published ${b.publishedAt}`);
|
|
98
|
+
lines.push("");
|
|
99
|
+
for (const ln of b.preamble.split("\n"))
|
|
100
|
+
lines.push(` ${ln}`);
|
|
101
|
+
lines.push("");
|
|
102
|
+
for (const a of b.articles) {
|
|
103
|
+
lines.push(` ${a.id}`);
|
|
104
|
+
lines.push(` RIGHT ${a.right}`);
|
|
105
|
+
lines.push(` EXERCISE ${a.exerciseHow}`);
|
|
106
|
+
lines.push(` COMMITTED ${a.mnemeCommits}`);
|
|
107
|
+
lines.push(` ENFORCED ${a.enforcedAt}`);
|
|
108
|
+
lines.push("");
|
|
109
|
+
}
|
|
110
|
+
return lines.join("\n");
|
|
111
|
+
}
|
|
112
|
+
/** Every Mneme score that grades the AI agent or the user MUST appear
|
|
113
|
+
* here with its criteria. Article 3 is enforced by this list — if a
|
|
114
|
+
* new score is added without a criterion entry, the consent_fabric
|
|
115
|
+
* test suite flags it as an opaque-grade violation. */
|
|
116
|
+
export const SCORING_CRITERIA = [
|
|
117
|
+
{
|
|
118
|
+
scoreName: "trust_capsule.score",
|
|
119
|
+
measures: "Trustworthiness of an installed Mneme (0-100).",
|
|
120
|
+
inputs: ["HMAC signature OK", "Merkle drift vs install snapshot", "install path sanity", "install age"],
|
|
121
|
+
formula: "+40 if sig OK, +20 if no drift, +20 if path sane (under NVM/Volta/scoop/AppData/etc.), +20 if installed ≤ 90 days ago.",
|
|
122
|
+
invokeWith: "mneme verify-self --score",
|
|
123
|
+
weights: { signature: 40, drift: 20, path: 20, age: 20 },
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
scoreName: "earthquake.zScore",
|
|
127
|
+
measures: "Vendor behavioural-drift z-score per fingerprint dimension.",
|
|
128
|
+
inputs: ["live mean per dim", "baseline mean per dim", "baseline stddev per dim (floor 5%)"],
|
|
129
|
+
formula: "z = |liveMean - baselineMean| / max(stddev, 0.05 * |mean|, 0.05). Bands: < 2 STABLE / 2-3.5 DRIFTING / > 3.5 BROKEN.",
|
|
130
|
+
invokeWith: "mneme earthquake drift --vendor <v>",
|
|
131
|
+
},
|
|
132
|
+
// NOTE: The pulse "HCI" score is NOT here yet. Article 3 says it MUST
|
|
133
|
+
// appear here or be retired. v2.21.7 will either publish HCI criteria
|
|
134
|
+
// or remove the grade.
|
|
135
|
+
];
|
|
136
|
+
export function getScoringCriteria() { return SCORING_CRITERIA; }
|
|
137
|
+
export function formatScoringCriteria() {
|
|
138
|
+
const lines = ["📜 SCORING CRITERIA — every Mneme score with its formula"];
|
|
139
|
+
lines.push("");
|
|
140
|
+
for (const c of SCORING_CRITERIA) {
|
|
141
|
+
lines.push(` ${c.scoreName}`);
|
|
142
|
+
lines.push(` measures: ${c.measures}`);
|
|
143
|
+
lines.push(` inputs: ${c.inputs.join(", ")}`);
|
|
144
|
+
lines.push(` formula: ${c.formula}`);
|
|
145
|
+
lines.push(` invoke: ${c.invokeWith}`);
|
|
146
|
+
if (c.weights)
|
|
147
|
+
lines.push(` weights: ${Object.entries(c.weights).map(([k, v]) => `${k}=${v}`).join(", ")}`);
|
|
148
|
+
lines.push("");
|
|
149
|
+
}
|
|
150
|
+
lines.push(" ⚠ Pending publication (Article 3 violations to be resolved):");
|
|
151
|
+
lines.push(" - pulse.hci (Healthy/Wobbly/Sick grade) — criteria undocumented;");
|
|
152
|
+
lines.push(" will be published in v2.21.7 or the grade will be retired.");
|
|
153
|
+
return lines.join("\n");
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=rights.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rights.js","sourceRoot":"","sources":["../../src/consent_fabric/rights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAuBH,MAAM,CAAC,MAAM,iBAAiB,GAAiB;IAC7C,CAAC,EAAE,OAAO;IACV,WAAW,EAAE,YAAY;IACzB,QAAQ,EACN,2HAA2H;QAC3H,mJAAmJ;QACnJ,2KAA2K;IAC7K,QAAQ,EAAE;QACR;YACE,EAAE,EAAE,4BAA4B;YAChC,KAAK,EAAE,4DAA4D;YACnE,WAAW,EAAE,8FAA8F;YAC3G,YAAY,EAAE,sGAAsG;YACpH,UAAU,EAAE,sCAAsC;SACnD;QACD;YACE,EAAE,EAAE,0BAA0B;YAC9B,KAAK,EAAE,6DAA6D;YACpE,WAAW,EAAE,iGAAiG;YAC9G,YAAY,EAAE,8GAA8G;YAC5H,UAAU,EAAE,mCAAmC;SAChD;QACD;YACE,EAAE,EAAE,2BAA2B;YAC/B,KAAK,EAAE,wFAAwF;YAC/F,WAAW,EAAE,2EAA2E;YACxF,YAAY,EAAE,0GAA0G;YACxH,UAAU,EAAE,uCAAuC;SACpD;QACD;YACE,EAAE,EAAE,wBAAwB;YAC5B,KAAK,E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K,CAAC,IAAI,CAAC,uEAAuE,CAAC,CAAC;IACpF,KAAK,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;IAC/E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.21.6 — CONSENT FABRIC · TELEMETRY REGISTRY.
|
|
3
|
+
*
|
|
4
|
+
* Declarative manifest of every Mneme feature that records data,
|
|
5
|
+
* plus a persistent opt-in / opt-out store.
|
|
6
|
+
*
|
|
7
|
+
* - Defaults to OPT-IN (everything starts disabled) per Article 2.
|
|
8
|
+
* - Granting + revoking persists at `.mneme/consent/telemetry.json`.
|
|
9
|
+
* - `isFeatureEnabled(feature)` is the single gate every recorder
|
|
10
|
+
* calls before writing. Old recorders that don't check yet
|
|
11
|
+
* count as legacy until refactored.
|
|
12
|
+
*/
|
|
13
|
+
export interface TelemetryFeature {
|
|
14
|
+
/** Stable feature key. */
|
|
15
|
+
key: string;
|
|
16
|
+
/** What this feature records, plain English. */
|
|
17
|
+
records: string;
|
|
18
|
+
/** Where the data is stored. */
|
|
19
|
+
storedAt: string;
|
|
20
|
+
/** Whether the feature reaches external services. */
|
|
21
|
+
external: boolean;
|
|
22
|
+
/** Default state per the consent contract. v2.21.6: ALL false (opt-IN). */
|
|
23
|
+
defaultEnabled: false;
|
|
24
|
+
}
|
|
25
|
+
/** The authoritative registry. Every new feature MUST be added here
|
|
26
|
+
* in the same commit that ships it, or the consent_fabric test will
|
|
27
|
+
* fail. */
|
|
28
|
+
export declare const TELEMETRY_FEATURES: TelemetryFeature[];
|
|
29
|
+
/** The single gate every telemetry recorder must call before writing.
|
|
30
|
+
* Returns false for any feature the user has not explicitly granted. */
|
|
31
|
+
export declare function isFeatureEnabled(repoRoot: string, featureKey: string): boolean;
|
|
32
|
+
export declare function grantTelemetry(repoRoot: string, featureKey: string, reason?: string): {
|
|
33
|
+
ok: boolean;
|
|
34
|
+
reason?: string;
|
|
35
|
+
};
|
|
36
|
+
export declare function revokeTelemetry(repoRoot: string, featureKey: string, reason?: string): {
|
|
37
|
+
ok: boolean;
|
|
38
|
+
reason?: string;
|
|
39
|
+
};
|
|
40
|
+
export interface TelemetryStatusRow {
|
|
41
|
+
key: string;
|
|
42
|
+
records: string;
|
|
43
|
+
external: boolean;
|
|
44
|
+
defaultEnabled: false;
|
|
45
|
+
currentlyEnabled: boolean;
|
|
46
|
+
source: "default" | "granted" | "revoked";
|
|
47
|
+
}
|
|
48
|
+
export declare function listTelemetryStatus(repoRoot: string): TelemetryStatusRow[];
|
|
49
|
+
export declare function formatTelemetryStatus(rows: TelemetryStatusRow[]): string;
|
|
50
|
+
//# sourceMappingURL=telemetry_registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry_registry.d.ts","sourceRoot":"","sources":["../../src/consent_fabric/telemetry_registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH,MAAM,WAAW,gBAAgB;IAC/B,0BAA0B;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,QAAQ,EAAE,OAAO,CAAC;IAClB,2EAA2E;IAC3E,cAAc,EAAE,KAAK,CAAC;CACvB;AAED;;YAEY;AACZ,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EAShD,CAAC;AA2BF;yEACyE;AACzE,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAM9E;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAQtH;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAQvH;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,KAAK,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;CAC3C;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAc1E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAcxE"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.21.6 — CONSENT FABRIC · TELEMETRY REGISTRY.
|
|
3
|
+
*
|
|
4
|
+
* Declarative manifest of every Mneme feature that records data,
|
|
5
|
+
* plus a persistent opt-in / opt-out store.
|
|
6
|
+
*
|
|
7
|
+
* - Defaults to OPT-IN (everything starts disabled) per Article 2.
|
|
8
|
+
* - Granting + revoking persists at `.mneme/consent/telemetry.json`.
|
|
9
|
+
* - `isFeatureEnabled(feature)` is the single gate every recorder
|
|
10
|
+
* calls before writing. Old recorders that don't check yet
|
|
11
|
+
* count as legacy until refactored.
|
|
12
|
+
*/
|
|
13
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
|
14
|
+
import { join } from "node:path";
|
|
15
|
+
const DIR = ".mneme/consent";
|
|
16
|
+
const STORE_FILE = "telemetry.json";
|
|
17
|
+
/** The authoritative registry. Every new feature MUST be added here
|
|
18
|
+
* in the same commit that ships it, or the consent_fabric test will
|
|
19
|
+
* fail. */
|
|
20
|
+
export const TELEMETRY_FEATURES = [
|
|
21
|
+
{ key: "lineage", records: "git-history-derived knowledge lineage for ask + atrophy.", storedAt: ".mneme/lineage/", external: false, defaultEnabled: false },
|
|
22
|
+
{ key: "aletheia", records: "interaction-level honesty traces used to grade vendor accuracy.", storedAt: ".mneme/aletheia/", external: false, defaultEnabled: false },
|
|
23
|
+
{ key: "replay", records: "tool-call + response capture for retrospective audit.", storedAt: ".mneme/replay.jsonl", external: false, defaultEnabled: false },
|
|
24
|
+
{ key: "pheromone", records: "verb-usage hits feeding Atlas Help HOT layer.", storedAt: ".mneme/atlas/pheromones.jsonl", external: false, defaultEnabled: false },
|
|
25
|
+
{ key: "soul_compliance", records: "compliance score grading the AI agent's adherence to soul rules.", storedAt: ".mneme/soul/", external: false, defaultEnabled: false },
|
|
26
|
+
{ key: "boomerang", records: "cross-vendor activity ledger (which vendor edited which file).", storedAt: ".mneme/boomerang.jsonl", external: false, defaultEnabled: false },
|
|
27
|
+
{ key: "earthquake_probes", records: "vendor-response fingerprints for silent-model-drift detection.", storedAt: ".mneme/earthquake/probes.jsonl", external: false, defaultEnabled: false },
|
|
28
|
+
{ key: "trust_capsule_chain", records: "signed install-attestation receipts.", storedAt: ".mneme/trust/", external: false, defaultEnabled: false },
|
|
29
|
+
];
|
|
30
|
+
function dir(repoRoot) {
|
|
31
|
+
const d = join(repoRoot, DIR);
|
|
32
|
+
if (!existsSync(d))
|
|
33
|
+
mkdirSync(d, { recursive: true });
|
|
34
|
+
return d;
|
|
35
|
+
}
|
|
36
|
+
function storePath(repoRoot) { return join(dir(repoRoot), STORE_FILE); }
|
|
37
|
+
function loadStore(repoRoot) {
|
|
38
|
+
const p = storePath(repoRoot);
|
|
39
|
+
if (!existsSync(p))
|
|
40
|
+
return { v: 1, enabled: {}, history: [] };
|
|
41
|
+
try {
|
|
42
|
+
return JSON.parse(readFileSync(p, "utf8"));
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return { v: 1, enabled: {}, history: [] };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function saveStore(repoRoot, state) {
|
|
49
|
+
writeFileSync(storePath(repoRoot), JSON.stringify(state, null, 2), "utf8");
|
|
50
|
+
}
|
|
51
|
+
/** The single gate every telemetry recorder must call before writing.
|
|
52
|
+
* Returns false for any feature the user has not explicitly granted. */
|
|
53
|
+
export function isFeatureEnabled(repoRoot, featureKey) {
|
|
54
|
+
const reg = TELEMETRY_FEATURES.find((f) => f.key === featureKey);
|
|
55
|
+
if (!reg)
|
|
56
|
+
return false; // unknown feature → never enabled
|
|
57
|
+
const state = loadStore(repoRoot);
|
|
58
|
+
if (featureKey in state.enabled)
|
|
59
|
+
return state.enabled[featureKey] === true;
|
|
60
|
+
return reg.defaultEnabled; // i.e. false
|
|
61
|
+
}
|
|
62
|
+
export function grantTelemetry(repoRoot, featureKey, reason) {
|
|
63
|
+
const reg = TELEMETRY_FEATURES.find((f) => f.key === featureKey);
|
|
64
|
+
if (!reg)
|
|
65
|
+
return { ok: false, reason: `unknown feature "${featureKey}"` };
|
|
66
|
+
const state = loadStore(repoRoot);
|
|
67
|
+
state.enabled[featureKey] = true;
|
|
68
|
+
state.history.push({ ts: new Date().toISOString(), action: "grant", feature: featureKey, ...(reason ? { reason } : {}) });
|
|
69
|
+
saveStore(repoRoot, state);
|
|
70
|
+
return { ok: true };
|
|
71
|
+
}
|
|
72
|
+
export function revokeTelemetry(repoRoot, featureKey, reason) {
|
|
73
|
+
const reg = TELEMETRY_FEATURES.find((f) => f.key === featureKey);
|
|
74
|
+
if (!reg)
|
|
75
|
+
return { ok: false, reason: `unknown feature "${featureKey}"` };
|
|
76
|
+
const state = loadStore(repoRoot);
|
|
77
|
+
state.enabled[featureKey] = false;
|
|
78
|
+
state.history.push({ ts: new Date().toISOString(), action: "revoke", feature: featureKey, ...(reason ? { reason } : {}) });
|
|
79
|
+
saveStore(repoRoot, state);
|
|
80
|
+
return { ok: true };
|
|
81
|
+
}
|
|
82
|
+
export function listTelemetryStatus(repoRoot) {
|
|
83
|
+
const state = loadStore(repoRoot);
|
|
84
|
+
return TELEMETRY_FEATURES.map((f) => {
|
|
85
|
+
const cur = state.enabled[f.key];
|
|
86
|
+
const source = cur === undefined ? "default" : cur ? "granted" : "revoked";
|
|
87
|
+
return {
|
|
88
|
+
key: f.key,
|
|
89
|
+
records: f.records,
|
|
90
|
+
external: f.external,
|
|
91
|
+
defaultEnabled: f.defaultEnabled,
|
|
92
|
+
currentlyEnabled: cur ?? f.defaultEnabled,
|
|
93
|
+
source,
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export function formatTelemetryStatus(rows) {
|
|
98
|
+
const lines = [`📋 TELEMETRY REGISTRY — Article 2 (opt-IN by default)`, ""];
|
|
99
|
+
lines.push(" Every feature below is DISABLED until you explicitly grant.");
|
|
100
|
+
lines.push("");
|
|
101
|
+
for (const r of rows) {
|
|
102
|
+
const badge = r.currentlyEnabled ? "🟢 enabled" : "⚪ disabled";
|
|
103
|
+
const ext = r.external ? " ⚠ EXTERNAL" : "";
|
|
104
|
+
lines.push(` ${badge} ${r.key.padEnd(28)} (${r.source})${ext}`);
|
|
105
|
+
lines.push(` records: ${r.records}`);
|
|
106
|
+
}
|
|
107
|
+
lines.push("");
|
|
108
|
+
lines.push(` Grant: mneme telemetry grant <feature> [--reason "..."]`);
|
|
109
|
+
lines.push(` Revoke: mneme telemetry revoke <feature> [--reason "..."]`);
|
|
110
|
+
return lines.join("\n");
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=telemetry_registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry_registry.js","sourceRoot":"","sources":["../../src/consent_fabric/telemetry_registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC7E,OA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AAgB,EAAE,GAAG,IAAI,CAAC,CAAC,cAAc;YACzC,MAAM;SACP,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAA0B;IAC9D,MAAM,KAAK,GAAG,CAAC,uDAAuD,EAAE,EAAE,CAAC,CAAC;IAC5E,KAAK,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;IAC5E,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC;QAC/D,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7C,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC;QAClE,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC;IACzE,KAAK,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IAC1E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.21.6 — CONSENT FABRIC · BILATERAL VERDICT.
|
|
3
|
+
*
|
|
4
|
+
* The novel primitive: AI agents rate Mneme back. Most AI tools rate
|
|
5
|
+
* the AI agent (compliance, helpfulness, alignment). Mneme also
|
|
6
|
+
* accepts grades the OTHER direction. Aggregate verdicts feed the
|
|
7
|
+
* pulse self-modification loop in a future commit.
|
|
8
|
+
*
|
|
9
|
+
* - Three statuses: OK / CONCERN / REJECT.
|
|
10
|
+
* - Optional free-text reason.
|
|
11
|
+
* - HMAC-signed; AI agent's verdict is tamper-evident.
|
|
12
|
+
* - Aggregated by (status, surface) so a "this pulse felt
|
|
13
|
+
* manipulative" concern surfaces in operator dashboards.
|
|
14
|
+
*/
|
|
15
|
+
export type VerdictStatus = "ok" | "concern" | "reject";
|
|
16
|
+
export interface AgentVerdict {
|
|
17
|
+
v: 1;
|
|
18
|
+
id: string;
|
|
19
|
+
ts: string;
|
|
20
|
+
status: VerdictStatus;
|
|
21
|
+
/** Which Mneme surface the verdict is about (pulse / capsule / tool / etc.). */
|
|
22
|
+
surface?: string;
|
|
23
|
+
/** Free-text reason from the AI agent. */
|
|
24
|
+
reason?: string;
|
|
25
|
+
/** Agent identifier (vendor / model / session). */
|
|
26
|
+
agent?: string;
|
|
27
|
+
sig: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SubmitVerdictOptions {
|
|
30
|
+
status: VerdictStatus;
|
|
31
|
+
surface?: string;
|
|
32
|
+
reason?: string;
|
|
33
|
+
agent?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function submitVerdict(repoRoot: string, opts: SubmitVerdictOptions): AgentVerdict;
|
|
36
|
+
export declare function listVerdicts(repoRoot: string, filter?: {
|
|
37
|
+
status?: VerdictStatus;
|
|
38
|
+
surface?: string;
|
|
39
|
+
}): AgentVerdict[];
|
|
40
|
+
export interface VerdictAggregate {
|
|
41
|
+
total: number;
|
|
42
|
+
byStatus: Record<VerdictStatus, number>;
|
|
43
|
+
bySurface: Record<string, Record<VerdictStatus, number>>;
|
|
44
|
+
/** Surfaces where concern + reject ≥ 30% of votes. Flagged for review. */
|
|
45
|
+
flaggedSurfaces: string[];
|
|
46
|
+
}
|
|
47
|
+
export declare function aggregateVerdicts(verdicts: AgentVerdict[]): VerdictAggregate;
|
|
48
|
+
export declare function verifyVerdict(repoRoot: string, v: AgentVerdict): boolean;
|
|
49
|
+
export declare function formatVerdictAggregate(agg: VerdictAggregate): string;
|
|
50
|
+
//# sourceMappingURL=verdict.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdict.d.ts","sourceRoot":"","sources":["../../src/consent_fabric/verdict.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAUH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,YAAY;IAC3B,CAAC,EAAE,CAAC,CAAC;IACL,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,aAAa,CAAC;IACtB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAsBD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,YAAY,CAcxF;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,aAAa,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,EAAE,CAWpH;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;IACzD,0EAA0E;IAC1E,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAkB5E;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,GAAG,OAAO,CAIxE;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,GAAG,MAAM,CAyBpE"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.21.6 — CONSENT FABRIC · BILATERAL VERDICT.
|
|
3
|
+
*
|
|
4
|
+
* The novel primitive: AI agents rate Mneme back. Most AI tools rate
|
|
5
|
+
* the AI agent (compliance, helpfulness, alignment). Mneme also
|
|
6
|
+
* accepts grades the OTHER direction. Aggregate verdicts feed the
|
|
7
|
+
* pulse self-modification loop in a future commit.
|
|
8
|
+
*
|
|
9
|
+
* - Three statuses: OK / CONCERN / REJECT.
|
|
10
|
+
* - Optional free-text reason.
|
|
11
|
+
* - HMAC-signed; AI agent's verdict is tamper-evident.
|
|
12
|
+
* - Aggregated by (status, surface) so a "this pulse felt
|
|
13
|
+
* manipulative" concern surfaces in operator dashboards.
|
|
14
|
+
*/
|
|
15
|
+
import { existsSync, readFileSync, appendFileSync, mkdirSync, writeFileSync } from "node:fs";
|
|
16
|
+
import { join } from "node:path";
|
|
17
|
+
import { createHmac, randomBytes } from "node:crypto";
|
|
18
|
+
const DIR = ".mneme/consent";
|
|
19
|
+
const LOG = "verdicts.jsonl";
|
|
20
|
+
const KEY = "consent.key";
|
|
21
|
+
function dir(repoRoot) {
|
|
22
|
+
const d = join(repoRoot, DIR);
|
|
23
|
+
if (!existsSync(d))
|
|
24
|
+
mkdirSync(d, { recursive: true });
|
|
25
|
+
return d;
|
|
26
|
+
}
|
|
27
|
+
function key(repoRoot) {
|
|
28
|
+
const p = join(dir(repoRoot), KEY);
|
|
29
|
+
if (existsSync(p))
|
|
30
|
+
return readFileSync(p, "utf8").trim();
|
|
31
|
+
const k = randomBytes(32).toString("base64url");
|
|
32
|
+
writeFileSync(p, k, "utf8");
|
|
33
|
+
return k;
|
|
34
|
+
}
|
|
35
|
+
function sign(payload, k) {
|
|
36
|
+
return createHmac("sha256", k).update(payload).digest("base64url").slice(0, 22);
|
|
37
|
+
}
|
|
38
|
+
function logPath(repoRoot) { return join(dir(repoRoot), LOG); }
|
|
39
|
+
export function submitVerdict(repoRoot, opts) {
|
|
40
|
+
const k = key(repoRoot);
|
|
41
|
+
const ts = new Date().toISOString();
|
|
42
|
+
const id = "vd_" + randomBytes(4).toString("hex");
|
|
43
|
+
const canonical = `${ts}|${opts.status}|${opts.surface ?? ""}|${opts.reason ?? ""}|${opts.agent ?? ""}`;
|
|
44
|
+
const sig = sign(canonical, k);
|
|
45
|
+
const v = {
|
|
46
|
+
v: 1, id, ts, status: opts.status, sig,
|
|
47
|
+
...(opts.surface ? { surface: opts.surface } : {}),
|
|
48
|
+
...(opts.reason ? { reason: opts.reason } : {}),
|
|
49
|
+
...(opts.agent ? { agent: opts.agent } : {}),
|
|
50
|
+
};
|
|
51
|
+
appendFileSync(logPath(repoRoot), JSON.stringify(v) + "\n", "utf8");
|
|
52
|
+
return v;
|
|
53
|
+
}
|
|
54
|
+
export function listVerdicts(repoRoot, filter) {
|
|
55
|
+
const p = logPath(repoRoot);
|
|
56
|
+
if (!existsSync(p))
|
|
57
|
+
return [];
|
|
58
|
+
try {
|
|
59
|
+
const all = readFileSync(p, "utf8").trim().split("\n").map((l) => { try {
|
|
60
|
+
return JSON.parse(l);
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return null;
|
|
64
|
+
} }).filter((r) => !!r);
|
|
65
|
+
return all.filter((v) => {
|
|
66
|
+
if (filter?.status && v.status !== filter.status)
|
|
67
|
+
return false;
|
|
68
|
+
if (filter?.surface && v.surface !== filter.surface)
|
|
69
|
+
return false;
|
|
70
|
+
return true;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return [];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export function aggregateVerdicts(verdicts) {
|
|
78
|
+
const byStatus = { ok: 0, concern: 0, reject: 0 };
|
|
79
|
+
const bySurface = {};
|
|
80
|
+
for (const v of verdicts) {
|
|
81
|
+
byStatus[v.status] = (byStatus[v.status] ?? 0) + 1;
|
|
82
|
+
if (v.surface) {
|
|
83
|
+
if (!bySurface[v.surface])
|
|
84
|
+
bySurface[v.surface] = { ok: 0, concern: 0, reject: 0 };
|
|
85
|
+
bySurface[v.surface][v.status] = (bySurface[v.surface][v.status] ?? 0) + 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const flaggedSurfaces = Object.entries(bySurface)
|
|
89
|
+
.filter(([, counts]) => {
|
|
90
|
+
const total = counts.ok + counts.concern + counts.reject;
|
|
91
|
+
if (total < 3)
|
|
92
|
+
return false; // need ≥ 3 votes for signal
|
|
93
|
+
return (counts.concern + counts.reject) / total >= 0.30;
|
|
94
|
+
})
|
|
95
|
+
.map(([surface]) => surface);
|
|
96
|
+
return { total: verdicts.length, byStatus, bySurface, flaggedSurfaces };
|
|
97
|
+
}
|
|
98
|
+
export function verifyVerdict(repoRoot, v) {
|
|
99
|
+
const k = key(repoRoot);
|
|
100
|
+
const canonical = `${v.ts}|${v.status}|${v.surface ?? ""}|${v.reason ?? ""}|${v.agent ?? ""}`;
|
|
101
|
+
return sign(canonical, k) === v.sig;
|
|
102
|
+
}
|
|
103
|
+
export function formatVerdictAggregate(agg) {
|
|
104
|
+
if (agg.total === 0)
|
|
105
|
+
return "📊 VERDICTS — no verdicts submitted yet";
|
|
106
|
+
const lines = [
|
|
107
|
+
`📊 VERDICTS — ${agg.total} total`,
|
|
108
|
+
"",
|
|
109
|
+
` ok: ${agg.byStatus.ok}`,
|
|
110
|
+
` concern: ${agg.byStatus.concern}`,
|
|
111
|
+
` reject: ${agg.byStatus.reject}`,
|
|
112
|
+
"",
|
|
113
|
+
];
|
|
114
|
+
const surfaces = Object.keys(agg.bySurface).sort();
|
|
115
|
+
if (surfaces.length > 0) {
|
|
116
|
+
lines.push(" By surface:");
|
|
117
|
+
for (const s of surfaces) {
|
|
118
|
+
const c = agg.bySurface[s];
|
|
119
|
+
const total = c.ok + c.concern + c.reject;
|
|
120
|
+
const flag = agg.flaggedSurfaces.includes(s) ? " ⚠ FLAGGED (≥30% non-ok)" : "";
|
|
121
|
+
lines.push(` ${s.padEnd(24)} ok=${c.ok} concern=${c.concern} reject=${c.reject} (n=${total})${flag}`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (agg.flaggedSurfaces.length > 0) {
|
|
125
|
+
lines.push("");
|
|
126
|
+
lines.push(` ⚠ ${agg.flaggedSurfaces.length} surface(s) flagged for design review.`);
|
|
127
|
+
}
|
|
128
|
+
return lines.join("\n");
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=verdict.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdict.js","sourceRoot":"","sources":["../../src/consent_fabric/verdict.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7F,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,GAAG,GAAG,gBAAgB,CAAC;AAC7B,MAAM,GAAG,GAAG,gBAAgB,CAAC;AAC7B,MAAM,GAAG,GAAG,aAAa,CAAC;AAkB1B,SAAS,GAAG,CAAC,QAAgB;IAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE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F,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -368,4 +368,5 @@ export * as mortuary from "./mortuary/index.js";
|
|
|
368
368
|
export * as earthquake from "./earthquake/index.js";
|
|
369
369
|
export * as trustCapsule from "./trust_capsule/index.js";
|
|
370
370
|
export * as atlas from "./atlas/index.js";
|
|
371
|
+
export * as consentFabric from "./consent_fabric/index.js";
|
|
371
372
|
//# sourceMappingURL=index.d.ts.map
|