@eyeoverthink/sva-gate 2.0.0 → 2.0.1
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/package.json +21 -6
- package/src/index.d.ts +29 -4
- package/src/lib/binder-induction.d.ts +14 -0
- package/src/lib/judge-verify.d.ts +15 -0
- package/src/mcp-server.d.ts +7 -0
- package/src/membrane.d.ts +14 -0
- package/src/receipt.d.ts +20 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eyeoverthink/sva-gate",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Zero-dependency 3-layer verification SDK, CLI, and stdio MCP server for AI agents: SVA-ER/1 & IETF AER-1 receipts, OPEG/1 execution gates, StreamSealGuard split-token privacy membrane, SVA-JEV/1 calibrated epistemic judge, and zero-LLM skill crystallization.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -11,11 +11,26 @@
|
|
|
11
11
|
"types": "./src/index.d.ts",
|
|
12
12
|
"import": "./src/index.js"
|
|
13
13
|
},
|
|
14
|
-
"./receipt":
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"./
|
|
14
|
+
"./receipt": {
|
|
15
|
+
"types": "./src/receipt.d.ts",
|
|
16
|
+
"import": "./src/receipt.js"
|
|
17
|
+
},
|
|
18
|
+
"./judge": {
|
|
19
|
+
"types": "./src/lib/judge-verify.d.ts",
|
|
20
|
+
"import": "./src/lib/judge-verify.js"
|
|
21
|
+
},
|
|
22
|
+
"./membrane": {
|
|
23
|
+
"types": "./src/membrane.d.ts",
|
|
24
|
+
"import": "./src/membrane.js"
|
|
25
|
+
},
|
|
26
|
+
"./skill": {
|
|
27
|
+
"types": "./src/lib/binder-induction.d.ts",
|
|
28
|
+
"import": "./src/lib/binder-induction.js"
|
|
29
|
+
},
|
|
30
|
+
"./mcp": {
|
|
31
|
+
"types": "./src/mcp-server.d.ts",
|
|
32
|
+
"import": "./src/mcp-server.js"
|
|
33
|
+
}
|
|
19
34
|
},
|
|
20
35
|
"bin": {
|
|
21
36
|
"sva-gate": "bin/sva-gate.js"
|
package/src/index.d.ts
CHANGED
|
@@ -75,23 +75,48 @@ export function evaluateOpeg1(doc: Record<string, unknown>, opts?: TrustOptions)
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
export const JEV_SEMANTICS: 'stability-signal-not-correctness';
|
|
78
|
+
export const JEV_CHOICES: Set<'decide' | 'noise' | 'settled'>;
|
|
78
79
|
export function wilsonLower95(right: number, total: number, z?: number): number;
|
|
79
80
|
export function flatText(text: string): string;
|
|
80
81
|
export function extractFactualTerms(text: string): Set<string>;
|
|
81
82
|
export function evaluateSvaJev1(doc: Record<string, unknown>): { ok: boolean; mode: string; reason?: string; [k: string]: unknown };
|
|
82
83
|
|
|
83
|
-
export function detect(text: string): Array<{ type: string; value: string; start: number; end: number }>;
|
|
84
|
+
export function detect(text: string, opts?: { terms?: string[] }): Array<{ type: string; value: string; start: number; end: number }>;
|
|
84
85
|
export class SealSession {
|
|
86
|
+
readonly size: number;
|
|
87
|
+
placeholder(type: string, value: string): string;
|
|
85
88
|
apply(text: string, findings: unknown[]): string;
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
values(): Array<{ type: string; value: string }>;
|
|
90
|
+
unseal(text: string, opts?: { json?: boolean }): string;
|
|
91
|
+
audit(outbound: string): { clean: boolean; leaks: string[] };
|
|
88
92
|
}
|
|
93
|
+
export class MembraneLeak extends Error {
|
|
94
|
+
leaks: string[];
|
|
95
|
+
constructor(leaks: string[], message?: string | null);
|
|
96
|
+
}
|
|
97
|
+
export const MEMBRANE_NOTE: string;
|
|
98
|
+
export const SECRET_PREFIXES: string[];
|
|
99
|
+
export function tailHoldLength(text: string): number;
|
|
89
100
|
export class StreamSealGuard {
|
|
90
101
|
session: SealSession;
|
|
102
|
+
constructor(opts?: { session?: SealSession | null; mode?: 'seal' | 'redact'; maxBuffer?: number });
|
|
91
103
|
push(chunk: string): string;
|
|
92
104
|
flush(): string;
|
|
93
105
|
}
|
|
94
|
-
export function scanInjection(text: string): {
|
|
106
|
+
export function scanInjection(text: string): { score: number; flags: string[]; suspicious: boolean };
|
|
107
|
+
export function stripHidden(text: string): string;
|
|
108
|
+
export function redactSecrets(text: string): string;
|
|
109
|
+
export function wrapUntrusted(
|
|
110
|
+
source: string,
|
|
111
|
+
content: string,
|
|
112
|
+
evidence?: { sha256: string; bytes: number } | null,
|
|
113
|
+
): { text: string; scan: { score: number; flags: string[]; suspicious: boolean } };
|
|
114
|
+
export function screenGoal(goal: string): {
|
|
115
|
+
ok: boolean;
|
|
116
|
+
reason?: string;
|
|
117
|
+
notes?: string[];
|
|
118
|
+
scan?: { score: number; flags: string[]; suspicious: boolean };
|
|
119
|
+
};
|
|
95
120
|
|
|
96
121
|
export function induce(
|
|
97
122
|
pos: Array<{ task: string; input: Record<string, unknown> }>,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
induce,
|
|
3
|
+
leaveOneOut,
|
|
4
|
+
applySpec,
|
|
5
|
+
novelWording,
|
|
6
|
+
} from '../index.js';
|
|
7
|
+
|
|
8
|
+
export function numberTokens(task: string): Array<Record<string, unknown>>;
|
|
9
|
+
export const shapeOf: (toks: Array<{ kind: string }>) => string;
|
|
10
|
+
export function questionWords(task: string): string[];
|
|
11
|
+
export function learnBlocks(pos: Array<{ task: string }>, neg: Array<{ task: string }>): unknown[];
|
|
12
|
+
export function contested(pos: Array<{ task: string }>, task: string): boolean;
|
|
13
|
+
export function wordingOf(task: string, kinds: string[]): string;
|
|
14
|
+
export function compileSpec(spec: Record<string, unknown>): (task: string) => Record<string, unknown> | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export {
|
|
2
|
+
JEV_SEMANTICS,
|
|
3
|
+
JEV_CHOICES,
|
|
4
|
+
wilsonLower95,
|
|
5
|
+
flatText,
|
|
6
|
+
extractFactualTerms,
|
|
7
|
+
evaluateSvaJev1,
|
|
8
|
+
} from '../index.js';
|
|
9
|
+
|
|
10
|
+
export const MIN_CALIBRATION_SAMPLES: number;
|
|
11
|
+
export const CALIBRATION_BASELINE: number;
|
|
12
|
+
export const MIN_RECALL: number;
|
|
13
|
+
export const VOTE_THRESHOLD: number;
|
|
14
|
+
export const MIN_INDEPENDENT_VOTERS: number;
|
|
15
|
+
export const MIN_QUOTE_CHARS: number;
|
package/src/receipt.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export {
|
|
2
|
+
canonical,
|
|
3
|
+
sha256Hex,
|
|
4
|
+
isValidRfc3339,
|
|
5
|
+
generateEd25519Keypair,
|
|
6
|
+
keypairFromSeedHex,
|
|
7
|
+
mintSvaEr1,
|
|
8
|
+
evaluateSvaEr1,
|
|
9
|
+
evaluateAer1V04,
|
|
10
|
+
verifyAnyReceipt,
|
|
11
|
+
evaluateOpeg1,
|
|
12
|
+
isSmallOrderKey,
|
|
13
|
+
} from './index.js';
|
|
14
|
+
export type {
|
|
15
|
+
Ed25519Keypair,
|
|
16
|
+
MintOptions,
|
|
17
|
+
MintResult,
|
|
18
|
+
TrustOptions,
|
|
19
|
+
SvaEr1Outcome,
|
|
20
|
+
} from './index.js';
|