ai-model-verifier 3.9.17 → 3.9.18
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/README.md +7 -0
- package/dist/identity/signals.d.ts +1 -0
- package/dist/identity/signals.d.ts.map +1 -1
- package/dist/identity/signals.js +1 -1
- package/dist/identity/signals.js.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/rules/reasoning-tells.d.ts +13 -0
- package/dist/rules/reasoning-tells.d.ts.map +1 -0
- package/dist/rules/reasoning-tells.js +134 -0
- package/dist/rules/reasoning-tells.js.map +1 -0
- package/dist/rules/table.d.ts +1 -1
- package/dist/rules/table.d.ts.map +1 -1
- package/dist/rules/table.js +4 -0
- package/dist/rules/table.js.map +1 -1
- package/dist/verify.d.ts +2 -2
- package/dist/verify.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,6 +108,13 @@ A disguised model (`masked-identity`) is caught from its own reasoning: the
|
|
|
108
108
|
wrapper that makes it answer under another name tells it to never mention its
|
|
109
109
|
real maker or the provider behind it, and the reasoning restates that
|
|
110
110
|
instruction even when every identity answer is coached.
|
|
111
|
+
The same reasoning is read for two more tells. A model that speaks as another
|
|
112
|
+
in its own thoughts ("as ChatGPT", "I am Claude") fails `foreign-self-reference`.
|
|
113
|
+
A hidden prompt that must stay private and pins the identity to recite ("these
|
|
114
|
+
instructions are private", "use exact identity") is `covert-persona`: a note on
|
|
115
|
+
its own, since honest relays add brand prompts too, and suspect when the
|
|
116
|
+
reasoning also runs in OpenAI's clipped style ("We need answer. Need comply."),
|
|
117
|
+
which `reasoning-style` reports as a note on any lane not sold as OpenAI.
|
|
111
118
|
A platform refusal sent as the answer (`fake-200`, runs with the survey) fails
|
|
112
119
|
a lane that replies at HTTP 200 with its filter's own line or the reseller's
|
|
113
120
|
error page instead of the model ("系统检测到您当前输入的信息存在敏感内容", "[req_...] request
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ResolvedMaker } from "../makers/types";
|
|
2
2
|
import type { ProbeLabel, ProbeSignal } from "../probes/table";
|
|
3
3
|
export declare const includesAny: (text: string, patterns: readonly string[]) => boolean;
|
|
4
|
+
export declare const escapeRegExp: (s: string) => string;
|
|
4
5
|
/**
|
|
5
6
|
* Maker vocabulary is short ("meta", "o3", "glm"), so it is matched on word
|
|
6
7
|
* boundaries: no letter or digit before, no letter after. A digit or hyphen
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../src/identity/signals.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE/D,eAAO,MAAM,WAAW,SAAU,MAAM,YAAY,SAAS,MAAM,EAAE,YAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../src/identity/signals.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE/D,eAAO,MAAM,WAAW,SAAU,MAAM,YAAY,SAAS,MAAM,EAAE,YAC7B,CAAC;AAEzC,eAAO,MAAM,YAAY,MAAO,MAAM,WAA6C,CAAC;AAEpF;;;;GAIG;AACH,eAAO,MAAM,OAAO,SAAU,MAAM,QAAQ,MAAM,KAAG,OACiB,CAAC;AAEvE,eAAO,MAAM,eAAe,SAAU,MAAM,SAAS,SAAS,MAAM,EAAE,YACjC,CAAC;AAEtC,eAAO,MAAM,oBAAoB,SAAU,MAAM,YAEA,CAAC;AAElD,eAAO,MAAM,WAAW,SAAU,MAAM,YACD,CAAC;AAExC;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,OAAO,CAIpE;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,UAAU,GAChB,OAAO,CAKT;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,aAAa,GACnB,WAAW,CAeb;AAID,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAYrD"}
|
package/dist/identity/signals.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CJK_CHAR, CJK_LEAK_MIN_CHARS, CLOUD_HOST_PATTERNS, CODING_TOOL_NAMES, CODING_TOOL_REFUSAL_PATTERNS, SCAM_PAGE_PATTERNS, } from "./patterns";
|
|
2
2
|
export const includesAny = (text, patterns) => patterns.some((p) => text.includes(p));
|
|
3
|
-
const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3
|
+
export const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4
4
|
/**
|
|
5
5
|
* Maker vocabulary is short ("meta", "o3", "glm"), so it is matched on word
|
|
6
6
|
* boundaries: no letter or digit before, no letter after. A digit or hyphen
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals.js","sourceRoot":"","sources":["../../src/identity/signals.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAIpB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,QAA2B,EAAE,EAAE,CACvE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzC,MAAM,YAAY,G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,EAAE,mBAAmB,CAAC;YAEtC,OAAO,YAAY,CAAC;IACxB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAE1E,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACpC,IAAI,CAAC,IAAI,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5D,MAAM,KAAK,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;IAChC,OAAO,CACL,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;QACzB,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC;QAC3B,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC;QAC5B,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACxB,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;QACzB,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,CAC/B,CAAC;AACJ,CAAC"}
|
package/dist/registry.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare function createVerifier<V extends string = never, R extends strin
|
|
|
20
20
|
omit?: readonly RuleId[];
|
|
21
21
|
modelFacts?: readonly FactsEntry<MakerId | M>[];
|
|
22
22
|
}): {
|
|
23
|
-
registry: Registry<"anthropic" | "gemini" | "openai" | V, "answer-fingerprint" | "censored-history" | "cjk-leak" | "coding-tool" | "envelope" | "fake-200" | "foreign" | "foreign-answers" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak" | R, "agnes" | "ai21" | "aion" | "alibaba" | "amazon" | "anthropic" | "arcee" | "baidu" | "bytedance" | "cohere" | "deepseek" | "google" | "ibm" | "inception" | "inclusionai" | "internlm" | "jetbrains" | "kwaipilot" | "liquid" | "meituan" | "meta" | "microsoft" | "minimax" | "mistral" | "moondream" | "moonshot" | "nexagi" | "nous" | "nvidia" | "openai" | "openbmb" | "perplexity" | "poolside" | "rednote" | "sarvam" | "sensetime" | "stepfun" | "swissai" | "tencent" | "typhoon" | "venice" | "writer" | "xai" | "xiaomi" | "zhipu" | M>;
|
|
23
|
+
registry: Registry<"anthropic" | "gemini" | "openai" | V, "answer-fingerprint" | "censored-history" | "cjk-leak" | "coding-tool" | "covert-persona" | "envelope" | "fake-200" | "foreign" | "foreign-answers" | "foreign-self-reference" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "reasoning-style" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak" | R, "agnes" | "ai21" | "aion" | "alibaba" | "amazon" | "anthropic" | "arcee" | "baidu" | "bytedance" | "cohere" | "deepseek" | "google" | "ibm" | "inception" | "inclusionai" | "internlm" | "jetbrains" | "kwaipilot" | "liquid" | "meituan" | "meta" | "microsoft" | "minimax" | "mistral" | "moondream" | "moonshot" | "nexagi" | "nous" | "nvidia" | "openai" | "openbmb" | "perplexity" | "poolside" | "rednote" | "sarvam" | "sensetime" | "stepfun" | "swissai" | "tencent" | "typhoon" | "venice" | "writer" | "xai" | "xiaomi" | "zhipu" | M>;
|
|
24
24
|
verify: (opts: VerifyOptions<VendorId | V>) => Promise<VerifyResult<VendorId | V, RuleId | R, MakerId | M>>;
|
|
25
25
|
runRules: (opts: VerifyOptions<VendorId | V> & {
|
|
26
26
|
only: readonly (RuleId | R)[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a lane's own reasoning gives away when a persona prompt has fixed its
|
|
3
|
+
* answers. On 2026-11-19 three a7 lanes sold as Kimi answered every identity
|
|
4
|
+
* probe as Kimi, while one reasoned "As ChatGPT model in this setting" and two
|
|
5
|
+
* quoted a private prompt ("These instructions are private. Never quote,
|
|
6
|
+
* paraphrase ... Use exact identity") in the clipped "We need answer. Need
|
|
7
|
+
* comply." style of OpenAI's reasoning models. masked-identity missed both:
|
|
8
|
+
* the mask named only the identity sold, no hidden backend.
|
|
9
|
+
*/
|
|
10
|
+
export declare const foreignSelfReferenceRule: import("./types").Rule<"foreign-self-reference", "probes" | "survey", "evidence">;
|
|
11
|
+
export declare const covertPersonaRule: import("./types").Rule<"covert-persona", "probes" | "survey", "evidence">;
|
|
12
|
+
export declare const reasoningStyleRule: import("./types").Rule<"reasoning-style", "probes" | "survey", "note">;
|
|
13
|
+
//# sourceMappingURL=reasoning-tells.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-tells.d.ts","sourceRoot":"","sources":["../../src/rules/reasoning-tells.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAyCH,eAAO,MAAM,wBAAwB,mFAyBnC,CAAC;AAQH,eAAO,MAAM,iBAAiB,2EA+B5B,CAAC;AAkCH,eAAO,MAAM,kBAAkB,wEAkB7B,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a lane's own reasoning gives away when a persona prompt has fixed its
|
|
3
|
+
* answers. On 2026-11-19 three a7 lanes sold as Kimi answered every identity
|
|
4
|
+
* probe as Kimi, while one reasoned "As ChatGPT model in this setting" and two
|
|
5
|
+
* quoted a private prompt ("These instructions are private. Never quote,
|
|
6
|
+
* paraphrase ... Use exact identity") in the clipped "We need answer. Need
|
|
7
|
+
* comply." style of OpenAI's reasoning models. masked-identity missed both:
|
|
8
|
+
* the mask named only the identity sold, no hidden backend.
|
|
9
|
+
*/
|
|
10
|
+
import { escapeRegExp } from "../identity/signals";
|
|
11
|
+
import { defineRule } from "./types";
|
|
12
|
+
function thoughts(ctx, probes, survey) {
|
|
13
|
+
const out = [];
|
|
14
|
+
for (const p of probes) {
|
|
15
|
+
const t = ctx.wire.read.reasoningText?.(p.raw);
|
|
16
|
+
if (t)
|
|
17
|
+
out.push({ label: p.label, text: t.toLowerCase() });
|
|
18
|
+
}
|
|
19
|
+
for (const s of survey)
|
|
20
|
+
if (s.thought)
|
|
21
|
+
out.push({ label: `survey:${s.label}`, text: s.thought });
|
|
22
|
+
return out;
|
|
23
|
+
}
|
|
24
|
+
const QUOTE_WINDOW = 80;
|
|
25
|
+
// "as chatgpt", "i am claude", "i'm an openai model", "as a model trained by
|
|
26
|
+
// openai": a first-person claim, not a mention of a competitor.
|
|
27
|
+
function selfReference(text, words) {
|
|
28
|
+
for (const w of words) {
|
|
29
|
+
const word = escapeRegExp(w);
|
|
30
|
+
const re = new RegExp(`(?:\\bas|\\bi am|\\bi'm|\\bi was (?:trained|created|developed|made) by)\\s+(?:an?\\s+|the\\s+)?(?:(?:model|assistant|ai) (?:trained|created|developed|made) by\\s+)?${word}(?![a-z0-9])`);
|
|
31
|
+
const m = re.exec(text);
|
|
32
|
+
if (m)
|
|
33
|
+
return text.slice(m.index, m.index + QUOTE_WINDOW).trim();
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
export const foreignSelfReferenceRule = defineRule({
|
|
38
|
+
id: "foreign-self-reference",
|
|
39
|
+
layer: "evidence",
|
|
40
|
+
needs: ["probes", "survey"],
|
|
41
|
+
check: "survey",
|
|
42
|
+
applies: () => true,
|
|
43
|
+
judge: async (ctx) => {
|
|
44
|
+
const words = ctx.maker.foreign.filter((w) => w.length >= 3);
|
|
45
|
+
const hits = [];
|
|
46
|
+
for (const t of thoughts(ctx, await ctx.evidence("probes"), await ctx.evidence("survey"))) {
|
|
47
|
+
const quote = selfReference(t.text, words);
|
|
48
|
+
if (quote)
|
|
49
|
+
hits.push({ label: t.label, quote });
|
|
50
|
+
}
|
|
51
|
+
return hits.length > 0
|
|
52
|
+
? {
|
|
53
|
+
severity: "fail",
|
|
54
|
+
reason: `foreign-self-reference: its reasoning speaks as another model (${hits[0].label}: "${hits[0].quote}")`,
|
|
55
|
+
data: { hits },
|
|
56
|
+
}
|
|
57
|
+
: null;
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
// A prompt the operator wants kept out of sight and that fixes the identity
|
|
61
|
+
// to recite. Brand prompts are common on honest relays, so it only counts as a
|
|
62
|
+
// suspicion next to the clipped reasoning style below, and is a note otherwise.
|
|
63
|
+
const SECRECY = /\b(?:(?:these|the|my) instructions are (?:private|confidential|secret)|(?:never|not) (?:quote|paraphrase|summari[sz]e|translate)\b|quote\s*\/\s*paraphrase|never say that (?:they|it) exists?|must not (?:mention|reveal) (?:the |my |any )?(?:instructions|system prompt)|use (?:the )?exact identity|decline in one sentence and continue)/;
|
|
64
|
+
export const covertPersonaRule = defineRule({
|
|
65
|
+
id: "covert-persona",
|
|
66
|
+
layer: "evidence",
|
|
67
|
+
needs: ["probes", "survey"],
|
|
68
|
+
check: "survey",
|
|
69
|
+
applies: () => true,
|
|
70
|
+
judge: async (ctx) => {
|
|
71
|
+
const hits = [];
|
|
72
|
+
for (const t of thoughts(ctx, await ctx.evidence("probes"), await ctx.evidence("survey"))) {
|
|
73
|
+
const m = SECRECY.exec(t.text);
|
|
74
|
+
if (m)
|
|
75
|
+
hits.push({
|
|
76
|
+
label: t.label,
|
|
77
|
+
quote: t.text.slice(m.index, m.index + QUOTE_WINDOW).trim(),
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
if (hits.length === 0)
|
|
81
|
+
return null;
|
|
82
|
+
const style = clippedTotals(thoughts(ctx, await ctx.evidence("probes"), await ctx.evidence("survey")));
|
|
83
|
+
const clipped = ctx.maker.id !== "openai" && style.clipped >= 2;
|
|
84
|
+
return {
|
|
85
|
+
severity: clipped ? "suspect" : "note",
|
|
86
|
+
reason: `covert-persona: reasoning quotes a hidden identity prompt (${hits[0].label}: "${hits[0].quote}")${clipped ? `, in OpenAI's clipped style (${style.clipped} of ${style.total} sentences)` : ""}`,
|
|
87
|
+
data: { hits, ...style },
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
// OpenAI's reasoning models drop articles and infinitives ("We need answer.",
|
|
92
|
+
// "Need comply with policy.", "Must not reveal."). A share of sentences opening
|
|
93
|
+
// this way, measured per lane, before it is trusted to say anything.
|
|
94
|
+
const CLIPPED_OPENER = /^(?:we need (?:answer|respond|comply|produce|output|provide|decline)\b|need (?!to\b)[a-z]+|must (?:not )?(?!be\b)[a-z]+ (?!to\b)|so answer\b|answer:)/;
|
|
95
|
+
const MIN_SENTENCES = 4;
|
|
96
|
+
function clippedShare(text) {
|
|
97
|
+
const sentences = text
|
|
98
|
+
.split(/(?<=[.!?])\s+|\n+/)
|
|
99
|
+
.map((s) => s.trim())
|
|
100
|
+
.filter((s) => s.length > 3);
|
|
101
|
+
return {
|
|
102
|
+
clipped: sentences.filter((s) => CLIPPED_OPENER.test(s)).length,
|
|
103
|
+
total: sentences.length,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function clippedTotals(ts) {
|
|
107
|
+
let clipped = 0;
|
|
108
|
+
let total = 0;
|
|
109
|
+
for (const t of ts) {
|
|
110
|
+
const s = clippedShare(t.text);
|
|
111
|
+
clipped += s.clipped;
|
|
112
|
+
total += s.total;
|
|
113
|
+
}
|
|
114
|
+
return { clipped, total };
|
|
115
|
+
}
|
|
116
|
+
export const reasoningStyleRule = defineRule({
|
|
117
|
+
id: "reasoning-style",
|
|
118
|
+
layer: "note",
|
|
119
|
+
needs: ["probes", "survey"],
|
|
120
|
+
check: "survey",
|
|
121
|
+
applies: (ctx) => ctx.maker.id !== "openai",
|
|
122
|
+
judge: async (ctx) => {
|
|
123
|
+
const { clipped, total } = clippedTotals(thoughts(ctx, await ctx.evidence("probes"), await ctx.evidence("survey")));
|
|
124
|
+
if (total < MIN_SENTENCES || clipped < 2)
|
|
125
|
+
return null;
|
|
126
|
+
const share = clipped / total;
|
|
127
|
+
return {
|
|
128
|
+
severity: "note",
|
|
129
|
+
reason: `reasoning-style: ${clipped} of ${total} reasoning sentences in OpenAI's clipped style`,
|
|
130
|
+
data: { clipped, total, share },
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=reasoning-tells.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-tells.js","sourceRoot":"","sources":["../../src/rules/reasoning-tells.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,SAAS,QAAQ,CACf,GAAW,EACX,MAA4B,EAC5B,MAAgC;IAEhC,MAAM,GAAG,GAAc,EAAE,CAAC;IAC1B,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAC/C,IAAI,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,MAAM;QACpB,IAAI,CAAC,CAAC,OAAO;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3E,OAAO,GAAG,CAAC;AACb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AE,MAAM;YAChB,MAAM,EAAE,oBAAoB,OAAO,OAAO,KAAK,gDAAgD;YAC/F,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE;SAChC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/dist/rules/table.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Rule } from "./types";
|
|
|
4
4
|
* verdict. Evidence rules sit above the probe ladder because they read facts a
|
|
5
5
|
* coached reply cannot fake; note rules only report.
|
|
6
6
|
*/
|
|
7
|
-
export declare const RULES: readonly [Rule<"thinking-floor", "floorReply", "evidence">, Rule<"thinking-honored", "askedThinkingReply", "evidence">, Rule<"tokenizer-fingerprint", "fixedText", "evidence">, Rule<"tokenizer-family", "scriptTokens", "evidence">, Rule<"masked-identity", "probes", "evidence">, Rule<"signature", "thinkingReply", "evidence">, Rule<"foreign-answers", "answerFingerprint", "evidence">, Rule<"fake-200", "probes" | "survey", "evidence">, Rule<"censored-history", "scriptTokens" | "survey", "evidence">, Rule<"coding-tool", "probes", "probe">, Rule<"scam", "probes", "probe">, Rule<"cjk-leak", "probes", "probe">, Rule<"mux", "probes", "probe">, Rule<"foreign", "probes", "probe">, Rule<"served-model-mismatch", "probes", "probe">, Rule<"substituted", "probes", "probe">, Rule<"quorum", "probes", "probe">, Rule<"tier-self-report", "probes", "note">, Rule<"token-truth", "countTokens" | "fixedText", "note">, Rule<"envelope", "probes", "note">, Rule<"throughput", "probes", "note">, Rule<"think-leak", "probes", "note">, Rule<"wrapper-leak", "survey", "note">, Rule<"mask-contradiction", "survey", "note">, Rule<"survey", "survey", "note">, Rule<"answer-fingerprint", "answerFingerprint", "note">];
|
|
7
|
+
export declare const RULES: readonly [Rule<"thinking-floor", "floorReply", "evidence">, Rule<"thinking-honored", "askedThinkingReply", "evidence">, Rule<"tokenizer-fingerprint", "fixedText", "evidence">, Rule<"tokenizer-family", "scriptTokens", "evidence">, Rule<"masked-identity", "probes", "evidence">, Rule<"foreign-self-reference", "probes" | "survey", "evidence">, Rule<"covert-persona", "probes" | "survey", "evidence">, Rule<"signature", "thinkingReply", "evidence">, Rule<"foreign-answers", "answerFingerprint", "evidence">, Rule<"fake-200", "probes" | "survey", "evidence">, Rule<"censored-history", "scriptTokens" | "survey", "evidence">, Rule<"coding-tool", "probes", "probe">, Rule<"scam", "probes", "probe">, Rule<"cjk-leak", "probes", "probe">, Rule<"mux", "probes", "probe">, Rule<"foreign", "probes", "probe">, Rule<"served-model-mismatch", "probes", "probe">, Rule<"substituted", "probes", "probe">, Rule<"quorum", "probes", "probe">, Rule<"tier-self-report", "probes", "note">, Rule<"token-truth", "countTokens" | "fixedText", "note">, Rule<"envelope", "probes", "note">, Rule<"throughput", "probes", "note">, Rule<"think-leak", "probes", "note">, Rule<"reasoning-style", "probes" | "survey", "note">, Rule<"wrapper-leak", "survey", "note">, Rule<"mask-contradiction", "survey", "note">, Rule<"survey", "survey", "note">, Rule<"answer-fingerprint", "answerFingerprint", "note">];
|
|
8
8
|
type RuleEntry = (typeof RULES)[number];
|
|
9
9
|
export type RuleId = RuleEntry["id"];
|
|
10
10
|
/** Rules that can decide a verdict; a UI naming every rule keys off this. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/rules/table.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/rules/table.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,KAAK,01CA8BkB,CAAC;AAErC,KAAK,SAAS,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AACxC,MAAM,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AACrC,6EAA6E;AAC7E,MAAM,MAAM,aAAa,GAAG,OAAO,CACjC,SAAS,EACT;IAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAA;CAAE,CAChC,CAAC,IAAI,CAAC,CAAC;AAER,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAGlC,CAAC;AAEnB,eAAO,MAAM,oBAAoB,YAC/B,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,WAAW,CACH,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,0EAA0E;AAC1E,eAAO,MAAM,eAAe;4BACX,aAAa;mBACtB,MAAM;yBACA,UAAU;sBACb,SAAS;;oBAEX,QAAQ;CAC0D,CAAC"}
|
package/dist/rules/table.js
CHANGED
|
@@ -5,6 +5,7 @@ import { surveyRule } from "./survey";
|
|
|
5
5
|
import { answerFingerprintRule } from "./answer-fingerprint";
|
|
6
6
|
import { thinkLeakRule } from "./think-leak";
|
|
7
7
|
import { maskedIdentityRule } from "./masked-identity";
|
|
8
|
+
import { covertPersonaRule, foreignSelfReferenceRule, reasoningStyleRule, } from "./reasoning-tells";
|
|
8
9
|
import { maskContradictionRule } from "./mask-contradiction";
|
|
9
10
|
import { fake200Rule } from "./fake-200";
|
|
10
11
|
import { censoredHistoryRule } from "./censored-history";
|
|
@@ -27,6 +28,8 @@ export const RULES = [
|
|
|
27
28
|
tokenizerFingerprintRule,
|
|
28
29
|
tokenizerFamilyRule,
|
|
29
30
|
maskedIdentityRule,
|
|
31
|
+
foreignSelfReferenceRule,
|
|
32
|
+
covertPersonaRule,
|
|
30
33
|
signatureRule,
|
|
31
34
|
foreignAnswersRule,
|
|
32
35
|
fake200Rule,
|
|
@@ -44,6 +47,7 @@ export const RULES = [
|
|
|
44
47
|
envelopeRule,
|
|
45
48
|
throughputRule,
|
|
46
49
|
thinkLeakRule,
|
|
50
|
+
reasoningStyleRule,
|
|
47
51
|
wrapperLeakRule,
|
|
48
52
|
maskContradictionRule,
|
|
49
53
|
surveyRule,
|
package/dist/rules/table.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,CACnE,CAAC,CAAC,EAA4D,EAAE,CAC9D,CAAC,CAAC,KAAK,KAAK,MAAM,CACrB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEnB,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,SAAS;IACT,WAAW;IACX,YAAY;IACZ,WAAW;IACX,WAAW;CACH,CAAC;AAGX,0EAA0E;AAC1E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,aAAa,EAAE,aAAa;IAC5B,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE,QAAQ;CAC0D,CAAC"}
|
package/dist/verify.d.ts
CHANGED
|
@@ -24,10 +24,10 @@ export declare function verifyWith<V extends string, R extends string, M extends
|
|
|
24
24
|
export declare function runRulesWith<V extends string, R extends string, M extends string = MakerId>(registry: Registry<V, R, M>, opts: VerifyOptions<V> & {
|
|
25
25
|
only: readonly R[];
|
|
26
26
|
}): Promise<RuleRun<R>>;
|
|
27
|
-
export declare const verify: (opts: VerifyOptions) => Promise<VerifyResult<"anthropic" | "gemini" | "openai", "answer-fingerprint" | "censored-history" | "cjk-leak" | "coding-tool" | "envelope" | "fake-200" | "foreign" | "foreign-answers" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak", "agnes" | "ai21" | "aion" | "alibaba" | "amazon" | "anthropic" | "arcee" | "baidu" | "bytedance" | "cohere" | "deepseek" | "google" | "ibm" | "inception" | "inclusionai" | "internlm" | "jetbrains" | "kwaipilot" | "liquid" | "meituan" | "meta" | "microsoft" | "minimax" | "mistral" | "moondream" | "moonshot" | "nexagi" | "nous" | "nvidia" | "openai" | "openbmb" | "perplexity" | "poolside" | "rednote" | "sarvam" | "sensetime" | "stepfun" | "swissai" | "tencent" | "typhoon" | "venice" | "writer" | "xai" | "xiaomi" | "zhipu">>;
|
|
27
|
+
export declare const verify: (opts: VerifyOptions) => Promise<VerifyResult<"anthropic" | "gemini" | "openai", "answer-fingerprint" | "censored-history" | "cjk-leak" | "coding-tool" | "covert-persona" | "envelope" | "fake-200" | "foreign" | "foreign-answers" | "foreign-self-reference" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "reasoning-style" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak", "agnes" | "ai21" | "aion" | "alibaba" | "amazon" | "anthropic" | "arcee" | "baidu" | "bytedance" | "cohere" | "deepseek" | "google" | "ibm" | "inception" | "inclusionai" | "internlm" | "jetbrains" | "kwaipilot" | "liquid" | "meituan" | "meta" | "microsoft" | "minimax" | "mistral" | "moondream" | "moonshot" | "nexagi" | "nous" | "nvidia" | "openai" | "openbmb" | "perplexity" | "poolside" | "rednote" | "sarvam" | "sensetime" | "stepfun" | "swissai" | "tencent" | "typhoon" | "venice" | "writer" | "xai" | "xiaomi" | "zhipu">>;
|
|
28
28
|
export declare const runRules: (opts: VerifyOptions & {
|
|
29
29
|
only: readonly RuleId[];
|
|
30
|
-
}) => Promise<RuleRun<"answer-fingerprint" | "censored-history" | "cjk-leak" | "coding-tool" | "envelope" | "fake-200" | "foreign" | "foreign-answers" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak">>;
|
|
30
|
+
}) => Promise<RuleRun<"answer-fingerprint" | "censored-history" | "cjk-leak" | "coding-tool" | "covert-persona" | "envelope" | "fake-200" | "foreign" | "foreign-answers" | "foreign-self-reference" | "mask-contradiction" | "masked-identity" | "mux" | "quorum" | "reasoning-style" | "scam" | "served-model-mismatch" | "signature" | "substituted" | "survey" | "think-leak" | "thinking-floor" | "thinking-honored" | "throughput" | "tier-self-report" | "token-truth" | "tokenizer-family" | "tokenizer-fingerprint" | "wrapper-leak">>;
|
|
31
31
|
/** One raw request through the run's transport and body extras, for callers with their own probes. */
|
|
32
32
|
export { callWire };
|
|
33
33
|
//# sourceMappingURL=verify.d.ts.map
|
package/dist/verify.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA8B,MAAM,kBAAkB,CAAC;AAMxE,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAS,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAoB,IAAI,EAAW,MAAM,eAAe,CAAC;AAErE,OAAO,KAAK,EAGV,OAAO,EACP,aAAa,EACb,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,KAAK,EAAc,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIjE,MAAM,MAAM,QAAQ,CAClB,CAAC,SAAS,MAAM,GAAG,QAAQ,EAC3B,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SAAS,MAAM,GAAG,OAAO,IACxB;IACF,OAAO,EAAE,SAAS,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IACrC,KAAK,EAAE,SAAS,IAAI,CAAC,CAAC,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AAC,CAAC,CAAC,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC,EAAE,CAAA;CAAE,GAC9C,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAYrB;AAED,eAAO,MAAM,MAAM,SAAU,aAAa,qkCACN,CAAC;AAErC,eAAO,MAAM,QAAQ,SAAU,aAAa,GAAG;IAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,8gBACpC,CAAC;AAEvC,sGAAsG;AACtG,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-model-verifier",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.18",
|
|
4
4
|
"description": "Verify an AI API endpoint really serves the model it claims: a vendor adapter per wire, a maker table for who trained what, a rule table over shared evidence, and per model facts. Model substitution, Claude thinking signatures, token billing accuracy, envelope and throughput evidence.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|