evidential-protocol 1.1.0 → 3.0.0

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.
Files changed (65) hide show
  1. package/dist/attestation.d.ts +80 -0
  2. package/dist/attestation.d.ts.map +1 -0
  3. package/dist/attestation.js +115 -0
  4. package/dist/attestation.js.map +1 -0
  5. package/dist/audit-ledger.d.ts +96 -0
  6. package/dist/audit-ledger.d.ts.map +1 -0
  7. package/dist/audit-ledger.js +152 -0
  8. package/dist/audit-ledger.js.map +1 -0
  9. package/dist/content.d.ts +83 -0
  10. package/dist/content.d.ts.map +1 -0
  11. package/dist/content.js +218 -0
  12. package/dist/content.js.map +1 -0
  13. package/dist/dashboard.d.ts +47 -0
  14. package/dist/dashboard.d.ts.map +1 -0
  15. package/dist/dashboard.js +264 -0
  16. package/dist/dashboard.js.map +1 -0
  17. package/dist/dormant.d.ts +59 -0
  18. package/dist/dormant.d.ts.map +1 -0
  19. package/dist/dormant.js +256 -0
  20. package/dist/dormant.js.map +1 -0
  21. package/dist/ergative.d.ts +75 -0
  22. package/dist/ergative.d.ts.map +1 -0
  23. package/dist/ergative.js +203 -0
  24. package/dist/ergative.js.map +1 -0
  25. package/dist/fingerprint.d.ts +126 -0
  26. package/dist/fingerprint.d.ts.map +1 -0
  27. package/dist/fingerprint.js +315 -0
  28. package/dist/fingerprint.js.map +1 -0
  29. package/dist/index.d.ts +15 -3
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +28 -3
  32. package/dist/index.js.map +1 -1
  33. package/dist/provenance.d.ts +101 -0
  34. package/dist/provenance.d.ts.map +1 -0
  35. package/dist/provenance.js +197 -0
  36. package/dist/provenance.js.map +1 -0
  37. package/dist/purity.d.ts +85 -0
  38. package/dist/purity.d.ts.map +1 -0
  39. package/dist/purity.js +124 -0
  40. package/dist/purity.js.map +1 -0
  41. package/dist/resilience.d.ts +63 -0
  42. package/dist/resilience.d.ts.map +1 -0
  43. package/dist/resilience.js +241 -0
  44. package/dist/resilience.js.map +1 -0
  45. package/dist/scoring.d.ts +87 -0
  46. package/dist/scoring.d.ts.map +1 -0
  47. package/dist/scoring.js +202 -0
  48. package/dist/scoring.js.map +1 -0
  49. package/dist/self-describing.d.ts +71 -0
  50. package/dist/self-describing.d.ts.map +1 -0
  51. package/dist/self-describing.js +153 -0
  52. package/dist/self-describing.js.map +1 -0
  53. package/dist/tests/content.test.d.ts +2 -0
  54. package/dist/tests/content.test.d.ts.map +1 -0
  55. package/dist/tests/content.test.js +122 -0
  56. package/dist/tests/content.test.js.map +1 -0
  57. package/dist/tests/dashboard.test.d.ts +2 -0
  58. package/dist/tests/dashboard.test.d.ts.map +1 -0
  59. package/dist/tests/dashboard.test.js +104 -0
  60. package/dist/tests/dashboard.test.js.map +1 -0
  61. package/dist/tests/kusunda.test.d.ts +2 -0
  62. package/dist/tests/kusunda.test.d.ts.map +1 -0
  63. package/dist/tests/kusunda.test.js +342 -0
  64. package/dist/tests/kusunda.test.js.map +1 -0
  65. package/package.json +57 -3
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Content Attestation (Kusunda isolate identity + Coldstar integration)
3
+ *
4
+ * Proves content is original, not derived. Designed to work with
5
+ * Coldstar's air-gapped signing flow: content is hashed here, the hash
6
+ * is signed on the cold device, and the signature is attached back.
7
+ */
8
+ /** A complete attestation record for a piece of content. */
9
+ export interface ContentAttestation {
10
+ /** SHA-256 hash of the content. */
11
+ content_hash: string;
12
+ /** Hash algorithm used. */
13
+ algorithm: "sha256";
14
+ /** Identifier of the entity that produced the content. */
15
+ producer: string;
16
+ /** ISO 8601 timestamp of attestation creation. */
17
+ timestamp: string;
18
+ /** Cryptographic signature (added after external signing). */
19
+ signature?: string;
20
+ /** Blockchain target for on-chain anchoring. */
21
+ chain?: "solana-devnet" | "solana-mainnet";
22
+ /** On-chain transaction hash after anchoring. */
23
+ tx_hash?: string;
24
+ /** Hash of the associated claims array, if any. */
25
+ claims_hash?: string;
26
+ }
27
+ /**
28
+ * Builds unsigned content attestations. The signing step is deliberately
29
+ * decoupled so it can happen on an air-gapped Coldstar device.
30
+ */
31
+ export declare class AttestationBuilder {
32
+ private readonly producer;
33
+ constructor(producer: string);
34
+ /** Compute the SHA-256 hash of arbitrary content. Returns hex string. */
35
+ hashContent(content: string): string;
36
+ /**
37
+ * Hash an array of claims (claim text + evidence class pairs).
38
+ * The claims are JSON-serialised in a deterministic order before hashing.
39
+ */
40
+ hashClaims(claims: Array<{
41
+ claim: string;
42
+ evidence_class: string;
43
+ }>): string;
44
+ /**
45
+ * Build an unsigned `ContentAttestation`.
46
+ *
47
+ * @param content - The raw content to attest.
48
+ * @param claims - Optional claims to bind into the attestation via hash.
49
+ */
50
+ build(content: string, claims?: Array<{
51
+ claim: string;
52
+ evidence_class: string;
53
+ }>): ContentAttestation;
54
+ /**
55
+ * Attach a signature to an attestation. Returns a new object;
56
+ * the original is not mutated.
57
+ */
58
+ sign(attestation: ContentAttestation, signature: string): ContentAttestation;
59
+ /**
60
+ * Verify that an attestation's `content_hash` matches the given content.
61
+ * Does NOT verify the cryptographic signature — that requires the
62
+ * signer's public key which lives on-chain or in the Coldstar vault.
63
+ */
64
+ verify(attestation: ContentAttestation, content: string): boolean;
65
+ }
66
+ /**
67
+ * Produce a canonical string representation of an attestation suitable
68
+ * for external signing (e.g. on a Coldstar air-gapped device).
69
+ *
70
+ * Format: deterministic, line-delimited, no optional fields unless present.
71
+ */
72
+ export declare function formatForSigning(attestation: ContentAttestation): string;
73
+ /**
74
+ * Format an attestation as compact data suitable for a Solana memo
75
+ * instruction. Memo programs accept arbitrary UTF-8 up to ~566 bytes.
76
+ *
77
+ * Format: pipe-delimited, minimal field names.
78
+ */
79
+ export declare function attestationToMemo(attestation: ContentAttestation): string;
80
+ //# sourceMappingURL=attestation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attestation.d.ts","sourceRoot":"","sources":["../src/attestation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,4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BAAiB,CAAC,WAAW,EAAE,kBAAkB,GAAG,MAAM,CAiBzE"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Content Attestation (Kusunda isolate identity + Coldstar integration)
3
+ *
4
+ * Proves content is original, not derived. Designed to work with
5
+ * Coldstar's air-gapped signing flow: content is hashed here, the hash
6
+ * is signed on the cold device, and the signature is attached back.
7
+ */
8
+ import { createHash } from "node:crypto";
9
+ // ---------------------------------------------------------------------------
10
+ // AttestationBuilder
11
+ // ---------------------------------------------------------------------------
12
+ /**
13
+ * Builds unsigned content attestations. The signing step is deliberately
14
+ * decoupled so it can happen on an air-gapped Coldstar device.
15
+ */
16
+ export class AttestationBuilder {
17
+ producer;
18
+ constructor(producer) {
19
+ this.producer = producer;
20
+ }
21
+ /** Compute the SHA-256 hash of arbitrary content. Returns hex string. */
22
+ hashContent(content) {
23
+ return createHash("sha256").update(content, "utf-8").digest("hex");
24
+ }
25
+ /**
26
+ * Hash an array of claims (claim text + evidence class pairs).
27
+ * The claims are JSON-serialised in a deterministic order before hashing.
28
+ */
29
+ hashClaims(claims) {
30
+ // Sort by claim text for deterministic ordering.
31
+ const sorted = [...claims].sort((a, b) => a.claim.localeCompare(b.claim));
32
+ const canonical = JSON.stringify(sorted);
33
+ return createHash("sha256").update(canonical, "utf-8").digest("hex");
34
+ }
35
+ /**
36
+ * Build an unsigned `ContentAttestation`.
37
+ *
38
+ * @param content - The raw content to attest.
39
+ * @param claims - Optional claims to bind into the attestation via hash.
40
+ */
41
+ build(content, claims) {
42
+ const attestation = {
43
+ content_hash: this.hashContent(content),
44
+ algorithm: "sha256",
45
+ producer: this.producer,
46
+ timestamp: new Date().toISOString(),
47
+ };
48
+ if (claims && claims.length > 0) {
49
+ attestation.claims_hash = this.hashClaims(claims);
50
+ }
51
+ return attestation;
52
+ }
53
+ /**
54
+ * Attach a signature to an attestation. Returns a new object;
55
+ * the original is not mutated.
56
+ */
57
+ sign(attestation, signature) {
58
+ return { ...attestation, signature };
59
+ }
60
+ /**
61
+ * Verify that an attestation's `content_hash` matches the given content.
62
+ * Does NOT verify the cryptographic signature — that requires the
63
+ * signer's public key which lives on-chain or in the Coldstar vault.
64
+ */
65
+ verify(attestation, content) {
66
+ const expected = this.hashContent(content);
67
+ return attestation.content_hash === expected;
68
+ }
69
+ }
70
+ // ---------------------------------------------------------------------------
71
+ // Standalone utilities
72
+ // ---------------------------------------------------------------------------
73
+ /**
74
+ * Produce a canonical string representation of an attestation suitable
75
+ * for external signing (e.g. on a Coldstar air-gapped device).
76
+ *
77
+ * Format: deterministic, line-delimited, no optional fields unless present.
78
+ */
79
+ export function formatForSigning(attestation) {
80
+ const lines = [
81
+ `ep-attest:v1`,
82
+ `hash:${attestation.algorithm}:${attestation.content_hash}`,
83
+ `producer:${attestation.producer}`,
84
+ `ts:${attestation.timestamp}`,
85
+ ];
86
+ if (attestation.claims_hash) {
87
+ lines.push(`claims:${attestation.claims_hash}`);
88
+ }
89
+ if (attestation.chain) {
90
+ lines.push(`chain:${attestation.chain}`);
91
+ }
92
+ return lines.join("\n");
93
+ }
94
+ /**
95
+ * Format an attestation as compact data suitable for a Solana memo
96
+ * instruction. Memo programs accept arbitrary UTF-8 up to ~566 bytes.
97
+ *
98
+ * Format: pipe-delimited, minimal field names.
99
+ */
100
+ export function attestationToMemo(attestation) {
101
+ const parts = [
102
+ "EP1",
103
+ attestation.content_hash,
104
+ attestation.producer,
105
+ attestation.timestamp,
106
+ ];
107
+ if (attestation.claims_hash) {
108
+ parts.push(`c:${attestation.claims_hash}`);
109
+ }
110
+ if (attestation.signature) {
111
+ parts.push(`s:${attestation.signature}`);
112
+ }
113
+ return parts.join("|");
114
+ }
115
+ //# sourceMappingURL=attestation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attestation.js","sourceRoot":"","sources":["../src/attestation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA2BzC,8EAA8E;AAC9E,q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CAAC,IAAI,CAAC,KAAK,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * EP-2: Bilateral Audit Ledger (Kusunda dual-person marking)
3
+ *
4
+ * Every action records WHO called and WHAT was affected in a single
5
+ * fused record. Provides query, cross-reference, and hot-spot analysis.
6
+ */
7
+ import type { EvidenceClass } from "./types.js";
8
+ /** Allowed actions in the audit ledger. */
9
+ export type AuditAction = "read" | "write" | "delete" | "invoke";
10
+ /** A single bilateral audit record. */
11
+ export interface AuditEntry {
12
+ /** Unique entry identifier. */
13
+ id: string;
14
+ /** Agent identity that initiated the action. */
15
+ caller: string;
16
+ /** Resource identifier that was affected. */
17
+ target: string;
18
+ /** What kind of action was performed. */
19
+ action: AuditAction;
20
+ /** MCP tool name used for the action. */
21
+ tool: string;
22
+ /** Evidence class of the action's output. */
23
+ evidence_class: EvidenceClass;
24
+ /** ISO 8601 timestamp of when the action occurred. */
25
+ timestamp: string;
26
+ /** Duration of the action in milliseconds. */
27
+ duration_ms: number;
28
+ /** Whether the action completed successfully. */
29
+ success: boolean;
30
+ }
31
+ /** Serialized form of the audit ledger for persistence. */
32
+ export interface AuditLedgerSnapshot {
33
+ version: "1.0";
34
+ entries: AuditEntry[];
35
+ created_at: string;
36
+ }
37
+ /**
38
+ * In-memory bilateral audit ledger.
39
+ *
40
+ * Records every caller-target interaction and supports multidimensional
41
+ * querying: by caller, target, time range, tool, and cross-references.
42
+ */
43
+ export declare class AuditLedger {
44
+ private entries;
45
+ private byCallerIndex;
46
+ private byTargetIndex;
47
+ private byToolIndex;
48
+ /** Total number of entries in the ledger. */
49
+ get size(): number;
50
+ /**
51
+ * Record a new audit entry.
52
+ *
53
+ * @returns The created AuditEntry with generated id and timestamp.
54
+ */
55
+ record(params: {
56
+ caller: string;
57
+ target: string;
58
+ action: AuditAction;
59
+ tool: string;
60
+ evidence_class: EvidenceClass;
61
+ duration_ms: number;
62
+ success: boolean;
63
+ timestamp?: string;
64
+ }): AuditEntry;
65
+ /** Append a pre-built entry (used by fromJSON). */
66
+ private append;
67
+ /** Query all entries by caller identity. */
68
+ queryCaller(name: string): AuditEntry[];
69
+ /** Query all entries by target resource. */
70
+ queryTarget(resource: string): AuditEntry[];
71
+ /** Query entries within a time range (inclusive). */
72
+ queryTimeRange(from: Date, to: Date): AuditEntry[];
73
+ /** Query all entries by tool name. */
74
+ queryTool(toolName: string): AuditEntry[];
75
+ /**
76
+ * Get the N most-touched resources (by total interaction count).
77
+ * Returns [target, count] pairs sorted descending.
78
+ */
79
+ getHotTargets(n: number): Array<[string, number]>;
80
+ /**
81
+ * Get the N most-active callers (by total interaction count).
82
+ * Returns [caller, count] pairs sorted descending.
83
+ */
84
+ getActiveCallers(n: number): Array<[string, number]>;
85
+ /**
86
+ * Cross-reference: all interactions between a specific caller and target.
87
+ */
88
+ crossReference(caller: string, target: string): AuditEntry[];
89
+ /** Serialize the ledger to a JSON-safe snapshot. */
90
+ toJSON(): AuditLedgerSnapshot;
91
+ /** Restore a ledger from a serialized snapshot. */
92
+ static fromJSON(snapshot: AuditLedgerSnapshot): AuditLedger;
93
+ private indexPush;
94
+ private topN;
95
+ }
96
+ //# sourceMappingURL=audit-ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-ledger.d.ts","sourceRoot":"","sources":["../src/audit-ledger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,2CAA2C;AAC3C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjE,uCAAuC;AACvC,MAAM,WAAW,UAAU;IACzB,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,gDAAgD;IAChD,MAAM,EAAE,MAAM,CA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IAAI,GAAG,UAAU,EAAE;IASlD,sCAAsC;IACtC,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,EAAE;IAMzC;;;OAGG;IACH,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAIjD;;;OAGG;IACH,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAIpD;;OAEG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE;IAU5D,oDAAoD;IACpD,MAAM,IAAI,mBAAmB;IAQ7B,mDAAmD;IACnD,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,GAAG,WAAW;IAU3D,OAAO,CAAC,SAAS;IAajB,OAAO,CAAC,IAAI;CAWb"}
@@ -0,0 +1,152 @@
1
+ /**
2
+ * EP-2: Bilateral Audit Ledger (Kusunda dual-person marking)
3
+ *
4
+ * Every action records WHO called and WHAT was affected in a single
5
+ * fused record. Provides query, cross-reference, and hot-spot analysis.
6
+ */
7
+ /** Generate a compact unique ID. */
8
+ function generateId() {
9
+ const ts = Date.now().toString(36);
10
+ const rand = Math.random().toString(36).slice(2, 8);
11
+ return `aud_${ts}_${rand}`;
12
+ }
13
+ /**
14
+ * In-memory bilateral audit ledger.
15
+ *
16
+ * Records every caller-target interaction and supports multidimensional
17
+ * querying: by caller, target, time range, tool, and cross-references.
18
+ */
19
+ export class AuditLedger {
20
+ entries = [];
21
+ byCallerIndex = new Map();
22
+ byTargetIndex = new Map();
23
+ byToolIndex = new Map();
24
+ /** Total number of entries in the ledger. */
25
+ get size() {
26
+ return this.entries.length;
27
+ }
28
+ /**
29
+ * Record a new audit entry.
30
+ *
31
+ * @returns The created AuditEntry with generated id and timestamp.
32
+ */
33
+ record(params) {
34
+ const entry = {
35
+ id: generateId(),
36
+ caller: params.caller,
37
+ target: params.target,
38
+ action: params.action,
39
+ tool: params.tool,
40
+ evidence_class: params.evidence_class,
41
+ timestamp: params.timestamp ?? new Date().toISOString(),
42
+ duration_ms: params.duration_ms,
43
+ success: params.success,
44
+ };
45
+ const idx = this.entries.length;
46
+ this.entries.push(entry);
47
+ // Update indexes
48
+ this.indexPush(this.byCallerIndex, entry.caller, idx);
49
+ this.indexPush(this.byTargetIndex, entry.target, idx);
50
+ this.indexPush(this.byToolIndex, entry.tool, idx);
51
+ return entry;
52
+ }
53
+ /** Append a pre-built entry (used by fromJSON). */
54
+ append(entry) {
55
+ const idx = this.entries.length;
56
+ this.entries.push(entry);
57
+ this.indexPush(this.byCallerIndex, entry.caller, idx);
58
+ this.indexPush(this.byTargetIndex, entry.target, idx);
59
+ this.indexPush(this.byToolIndex, entry.tool, idx);
60
+ }
61
+ /** Query all entries by caller identity. */
62
+ queryCaller(name) {
63
+ const indices = this.byCallerIndex.get(name);
64
+ if (!indices)
65
+ return [];
66
+ return indices.map((i) => this.entries[i]);
67
+ }
68
+ /** Query all entries by target resource. */
69
+ queryTarget(resource) {
70
+ const indices = this.byTargetIndex.get(resource);
71
+ if (!indices)
72
+ return [];
73
+ return indices.map((i) => this.entries[i]);
74
+ }
75
+ /** Query entries within a time range (inclusive). */
76
+ queryTimeRange(from, to) {
77
+ const fromMs = from.getTime();
78
+ const toMs = to.getTime();
79
+ return this.entries.filter((e) => {
80
+ const ts = new Date(e.timestamp).getTime();
81
+ return ts >= fromMs && ts <= toMs;
82
+ });
83
+ }
84
+ /** Query all entries by tool name. */
85
+ queryTool(toolName) {
86
+ const indices = this.byToolIndex.get(toolName);
87
+ if (!indices)
88
+ return [];
89
+ return indices.map((i) => this.entries[i]);
90
+ }
91
+ /**
92
+ * Get the N most-touched resources (by total interaction count).
93
+ * Returns [target, count] pairs sorted descending.
94
+ */
95
+ getHotTargets(n) {
96
+ return this.topN(this.byTargetIndex, n);
97
+ }
98
+ /**
99
+ * Get the N most-active callers (by total interaction count).
100
+ * Returns [caller, count] pairs sorted descending.
101
+ */
102
+ getActiveCallers(n) {
103
+ return this.topN(this.byCallerIndex, n);
104
+ }
105
+ /**
106
+ * Cross-reference: all interactions between a specific caller and target.
107
+ */
108
+ crossReference(caller, target) {
109
+ const callerIndices = this.byCallerIndex.get(caller);
110
+ if (!callerIndices)
111
+ return [];
112
+ const targetSet = new Set(this.byTargetIndex.get(target) ?? []);
113
+ return callerIndices
114
+ .filter((i) => targetSet.has(i))
115
+ .map((i) => this.entries[i]);
116
+ }
117
+ /** Serialize the ledger to a JSON-safe snapshot. */
118
+ toJSON() {
119
+ return {
120
+ version: "1.0",
121
+ entries: [...this.entries],
122
+ created_at: new Date().toISOString(),
123
+ };
124
+ }
125
+ /** Restore a ledger from a serialized snapshot. */
126
+ static fromJSON(snapshot) {
127
+ const ledger = new AuditLedger();
128
+ for (const entry of snapshot.entries) {
129
+ ledger.append(entry);
130
+ }
131
+ return ledger;
132
+ }
133
+ // ---- Internal helpers ----
134
+ indexPush(index, key, value) {
135
+ const arr = index.get(key);
136
+ if (arr) {
137
+ arr.push(value);
138
+ }
139
+ else {
140
+ index.set(key, [value]);
141
+ }
142
+ }
143
+ topN(index, n) {
144
+ const pairs = [];
145
+ for (const [key, indices] of index) {
146
+ pairs.push([key, indices.length]);
147
+ }
148
+ pairs.sort((a, b) => b[1] - a[1]);
149
+ return pairs.slice(0, n);
150
+ }
151
+ }
152
+ //# sourceMappingURL=audit-ledger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-ledger.js","sourceRoot":"","sources":["../src/audit-ledger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoCH,oCAAoC;AACpC,SAAS,UAAU;IACjB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAA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CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC;CACF"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * EP-1 Phase 4: Content Pipeline Integration
3
+ *
4
+ * Tags generated content with inline evidence markers,
5
+ * computes content trust scores, and gates publishing.
6
+ */
7
+ import { type EvidenceClass, type ContentEvidenceMarker, type TrustScore } from "./types.js";
8
+ /** A tagged sentence within content. */
9
+ export interface TaggedSentence {
10
+ /** Original sentence text. */
11
+ text: string;
12
+ /** Evidence marker if tagged. */
13
+ marker?: ContentEvidenceMarker;
14
+ /** Whether this sentence makes a claim that should be tagged. */
15
+ isClaim: boolean;
16
+ }
17
+ /** Result of content analysis. */
18
+ export interface ContentAnalysis {
19
+ /** All sentences in the content. */
20
+ sentences: TaggedSentence[];
21
+ /** Extracted evidence markers. */
22
+ markers: ContentEvidenceMarker[];
23
+ /** Trust score based on markers. */
24
+ trust: TrustScore;
25
+ /** Display string. */
26
+ display: string;
27
+ /** Sentences that appear to be claims but lack markers. */
28
+ untagged_claims: string[];
29
+ /** Content with markers stripped (clean version). */
30
+ clean_text: string;
31
+ /** Whether content passes the publish gate. */
32
+ publishable: boolean;
33
+ }
34
+ /**
35
+ * Detect if a sentence contains a factual claim that should be evidentially tagged.
36
+ */
37
+ export declare function isClaim(sentence: string): boolean;
38
+ /**
39
+ * Strip evidence markers from content, returning clean text.
40
+ */
41
+ export declare function stripMarkers(content: string): string;
42
+ /**
43
+ * Analyze content for evidential completeness.
44
+ */
45
+ export declare function analyzeContent(content: string): ContentAnalysis;
46
+ /**
47
+ * Tag a sentence with an evidence marker.
48
+ */
49
+ export declare function tagSentence(sentence: string, cls: EvidenceClass, source: string, confidence?: number): string;
50
+ /**
51
+ * Auto-tag content by applying evidence markers to detected claims.
52
+ * Uses a default classification function to guess the evidence class.
53
+ */
54
+ export declare function autoTag(content: string, classifier: (sentence: string) => ContentEvidenceMarker | null): string;
55
+ /** Publish gate result. */
56
+ export interface PublishGateResult {
57
+ /** Whether content is approved for publishing. */
58
+ approved: boolean;
59
+ /** Reason if blocked. */
60
+ reason?: string;
61
+ /** Trust score. */
62
+ trust: TrustScore;
63
+ /** Number of untagged claims (claims without evidence). */
64
+ untagged_claims: number;
65
+ /** Recommendations for improvement. */
66
+ recommendations: string[];
67
+ }
68
+ /**
69
+ * Check if content passes the publish gate.
70
+ *
71
+ * Rules:
72
+ * 1. Trust score must be >= threshold (default 0.5)
73
+ * 2. No more than max_untagged claims without evidence markers
74
+ * 3. No conjecture claims without explicit reasoning
75
+ */
76
+ export declare function publishGate(content: string, opts?: {
77
+ trust_threshold?: number;
78
+ max_untagged?: number;
79
+ require_all_tagged?: boolean;
80
+ }): PublishGateResult;
81
+ /** Render content with visual evidence indicators for human review. */
82
+ export declare function renderForReview(content: string): string;
83
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../src/content.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EAGhB,MAAM,YAAY,CAAC;AAepB,wCAAwC;AACxC,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,kCAAkC;AAClC,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,kCAAkC;IAClC,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,oCAAoC;IACpC,KAAK,EAAE,UAAU,CAAC;IAClB,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,e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