human-to-code 0.0.1 → 0.1.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/Readme.md +366 -38
- package/SECURITY.md +175 -11
- package/dist/adapters/node.d.ts +8 -0
- package/dist/adapters/node.d.ts.map +1 -0
- package/dist/adapters/node.js +1071 -0
- package/dist/adapters/node.js.map +1 -0
- package/dist/adapters/python.d.ts +7 -0
- package/dist/adapters/python.d.ts.map +1 -0
- package/dist/adapters/python.js +540 -0
- package/dist/adapters/python.js.map +1 -0
- package/dist/adapters/rust.d.ts +7 -0
- package/dist/adapters/rust.d.ts.map +1 -0
- package/dist/adapters/rust.js +517 -0
- package/dist/adapters/rust.js.map +1 -0
- package/dist/analyzer-types.d.ts +153 -0
- package/dist/analyzer-types.d.ts.map +1 -0
- package/dist/analyzer-types.js +8 -0
- package/dist/analyzer-types.js.map +1 -0
- package/dist/analyzer-utils.d.ts +40 -0
- package/dist/analyzer-utils.d.ts.map +1 -0
- package/dist/analyzer-utils.js +591 -0
- package/dist/analyzer-utils.js.map +1 -0
- package/dist/analyzer.d.ts +21 -0
- package/dist/analyzer.d.ts.map +1 -0
- package/dist/analyzer.js +103 -0
- package/dist/analyzer.js.map +1 -0
- package/dist/certification.d.ts +102 -0
- package/dist/certification.d.ts.map +1 -0
- package/dist/certification.js +193 -0
- package/dist/certification.js.map +1 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +562 -0
- package/dist/cli.js.map +1 -0
- package/dist/compiler-skills.d.ts +25 -0
- package/dist/compiler-skills.d.ts.map +1 -0
- package/dist/compiler-skills.js +158 -0
- package/dist/compiler-skills.js.map +1 -0
- package/dist/compiler-tools.d.ts +29 -0
- package/dist/compiler-tools.d.ts.map +1 -0
- package/dist/compiler-tools.js +337 -0
- package/dist/compiler-tools.js.map +1 -0
- package/dist/config.d.ts +122 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +704 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +153 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +772 -0
- package/dist/context.js.map +1 -0
- package/dist/contracts.d.ts +196 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +721 -0
- package/dist/contracts.js.map +1 -0
- package/dist/discovery.d.ts +34 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +312 -0
- package/dist/discovery.js.map +1 -0
- package/dist/documentation.d.ts +44 -0
- package/dist/documentation.d.ts.map +1 -0
- package/dist/documentation.js +418 -0
- package/dist/documentation.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/patch.d.ts +71 -0
- package/dist/patch.d.ts.map +1 -0
- package/dist/patch.js +394 -0
- package/dist/patch.js.map +1 -0
- package/dist/pinned-http.d.ts +15 -0
- package/dist/pinned-http.d.ts.map +1 -0
- package/dist/pinned-http.js +170 -0
- package/dist/pinned-http.js.map +1 -0
- package/dist/planner.d.ts +30 -0
- package/dist/planner.d.ts.map +1 -0
- package/dist/planner.js +228 -0
- package/dist/planner.js.map +1 -0
- package/dist/provider.d.ts +168 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +512 -0
- package/dist/provider.js.map +1 -0
- package/dist/providers.d.ts +41 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +954 -0
- package/dist/providers.js.map +1 -0
- package/dist/run-store.d.ts +24 -0
- package/dist/run-store.d.ts.map +1 -0
- package/dist/run-store.js +285 -0
- package/dist/run-store.js.map +1 -0
- package/dist/schemas.d.ts +18 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +228 -0
- package/dist/schemas.js.map +1 -0
- package/dist/secret-scan.d.ts +30 -0
- package/dist/secret-scan.d.ts.map +1 -0
- package/dist/secret-scan.js +122 -0
- package/dist/secret-scan.js.map +1 -0
- package/dist/snapshot.d.ts +33 -0
- package/dist/snapshot.d.ts.map +1 -0
- package/dist/snapshot.js +136 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/support-matrix.d.ts +23 -0
- package/dist/support-matrix.d.ts.map +1 -0
- package/dist/support-matrix.js +187 -0
- package/dist/support-matrix.js.map +1 -0
- package/dist/types.d.ts +63 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/validation.d.ts +25 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +388 -0
- package/dist/validation.js.map +1 -0
- package/dist/workflow.d.ts +65 -0
- package/dist/workflow.d.ts.map +1 -0
- package/dist/workflow.js +1623 -0
- package/dist/workflow.js.map +1 -0
- package/package.json +37 -9
- package/.claude/settings.local.json +0 -12
- package/.github/workflows/ci.yml +0 -18
- package/CONTRIBUTING.md +0 -40
- package/src/cli.ts +0 -218
- package/src/config.ts +0 -186
- package/src/discovery.ts +0 -186
- package/src/index.ts +0 -22
- package/src/types.ts +0 -74
- package/test/config.test.ts +0 -97
- package/test/discovery.test.ts +0 -91
- package/tsconfig.json +0 -17
package/dist/analyzer.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic, static project analysis.
|
|
3
|
+
*
|
|
4
|
+
* This module never imports application modules, evaluates config files, or
|
|
5
|
+
* invokes project commands. It only inventories regular files and delegates
|
|
6
|
+
* bounded text inspection to static ecosystem adapters.
|
|
7
|
+
*/
|
|
8
|
+
import { PROJECT_PROFILE_SCHEMA_VERSION } from "./analyzer-types.js";
|
|
9
|
+
import { compareDiagnostics, createAnalyzerContext, fingerprint, scanProject, } from "./analyzer-utils.js";
|
|
10
|
+
import { nodeEcosystemAdapter } from "./adapters/node.js";
|
|
11
|
+
import { fastApiEcosystemAdapter } from "./adapters/python.js";
|
|
12
|
+
import { rustEcosystemAdapter } from "./adapters/rust.js";
|
|
13
|
+
export const DEFAULT_ECOSYSTEM_ADAPTERS = [
|
|
14
|
+
nodeEcosystemAdapter,
|
|
15
|
+
fastApiEcosystemAdapter,
|
|
16
|
+
rustEcosystemAdapter,
|
|
17
|
+
];
|
|
18
|
+
function diagnosticKey(diagnostic) {
|
|
19
|
+
return `${diagnostic.severity}\u0000${diagnostic.code}\u0000${diagnostic.message}\u0000${diagnostic.paths.join("\u0000")}`;
|
|
20
|
+
}
|
|
21
|
+
function uniqueDiagnostics(diagnostics) {
|
|
22
|
+
const result = new Map();
|
|
23
|
+
for (const diagnostic of diagnostics) {
|
|
24
|
+
const normalized = { ...diagnostic, paths: [...diagnostic.paths].sort() };
|
|
25
|
+
result.set(diagnosticKey(normalized), normalized);
|
|
26
|
+
}
|
|
27
|
+
return [...result.values()].sort(compareDiagnostics);
|
|
28
|
+
}
|
|
29
|
+
function analysisStatus(workspaces, diagnostics) {
|
|
30
|
+
const all = [...diagnostics, ...workspaces.flatMap((workspace) => workspace.diagnostics)];
|
|
31
|
+
if (all.some((diagnostic) => diagnostic.severity === "partial-scan"))
|
|
32
|
+
return "PARTIAL_SCAN";
|
|
33
|
+
if (all.some((diagnostic) => diagnostic.severity === "needs-input"))
|
|
34
|
+
return "NEEDS_INPUT";
|
|
35
|
+
if (workspaces.length === 0 ||
|
|
36
|
+
all.some((diagnostic) => diagnostic.severity === "unsupported") ||
|
|
37
|
+
workspaces.some((workspace) => workspace.support.tier === "unsupported")) {
|
|
38
|
+
return "UNSUPPORTED";
|
|
39
|
+
}
|
|
40
|
+
return "SUPPORTED";
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Analyze a project root using the built-in React/NestJS, FastAPI, and Cargo
|
|
44
|
+
* adapters. Custom adapters are useful for downstream/private ecosystems, but
|
|
45
|
+
* are held to the same read-only context boundary.
|
|
46
|
+
*/
|
|
47
|
+
export async function analyzeProject(root, options = {}, adapters = DEFAULT_ECOSYSTEM_ADAPTERS) {
|
|
48
|
+
const scanned = await scanProject(root, options);
|
|
49
|
+
const analyzerDiagnostics = [...scanned.diagnostics];
|
|
50
|
+
const context = createAnalyzerContext(scanned.inventory, analyzerDiagnostics, options);
|
|
51
|
+
const adapterResults = await Promise.all(adapters.map(async (adapter) => {
|
|
52
|
+
try {
|
|
53
|
+
return await adapter.analyze(context);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
context.addDiagnostic({
|
|
57
|
+
code: "ADAPTER_ANALYSIS_FAILED",
|
|
58
|
+
message: `The ${adapter.ecosystem} static adapter failed safely: ${String(error)}`,
|
|
59
|
+
severity: "partial-scan",
|
|
60
|
+
paths: ["."],
|
|
61
|
+
});
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
const workspaces = adapterResults
|
|
66
|
+
.flat()
|
|
67
|
+
.sort((left, right) => left.id.localeCompare(right.id));
|
|
68
|
+
const diagnostics = uniqueDiagnostics([
|
|
69
|
+
...analyzerDiagnostics,
|
|
70
|
+
...workspaces.flatMap((workspace) => workspace.diagnostics),
|
|
71
|
+
]);
|
|
72
|
+
if (workspaces.length === 0 && !diagnostics.some((item) => item.severity === "partial-scan")) {
|
|
73
|
+
diagnostics.push({
|
|
74
|
+
code: "NO_SUPPORTED_WORKSPACE",
|
|
75
|
+
message: "No statically recognizable React, NestJS, FastAPI, or Cargo workspace was found.",
|
|
76
|
+
severity: "unsupported",
|
|
77
|
+
paths: ["."],
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const finalDiagnostics = uniqueDiagnostics(diagnostics);
|
|
81
|
+
const status = analysisStatus(workspaces, finalDiagnostics);
|
|
82
|
+
const fingerprintInput = {
|
|
83
|
+
schemaVersion: PROJECT_PROFILE_SCHEMA_VERSION,
|
|
84
|
+
status,
|
|
85
|
+
workspaces: workspaces.map((workspace) => ({ id: workspace.id, fingerprint: workspace.fingerprint })),
|
|
86
|
+
diagnostics: finalDiagnostics,
|
|
87
|
+
scan: scanned.inventory.scan,
|
|
88
|
+
};
|
|
89
|
+
return {
|
|
90
|
+
schemaVersion: PROJECT_PROFILE_SCHEMA_VERSION,
|
|
91
|
+
root: scanned.inventory.root,
|
|
92
|
+
status,
|
|
93
|
+
workspaces,
|
|
94
|
+
diagnostics: finalDiagnostics,
|
|
95
|
+
scan: scanned.inventory.scan,
|
|
96
|
+
fingerprint: fingerprint(fingerprintInput),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export { SUPPORT_MATRIX, SUPPORT_MATRIX_VERSION, supportFor } from "./support-matrix.js";
|
|
100
|
+
export { NodeEcosystemAdapter, nodeEcosystemAdapter } from "./adapters/node.js";
|
|
101
|
+
export { FastApiEcosystemAdapter, fastApiEcosystemAdapter } from "./adapters/python.js";
|
|
102
|
+
export { RustEcosystemAdapter, rustEcosystemAdapter } from "./adapters/rust.js";
|
|
103
|
+
//# sourceMappingURL=analyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyzer.js","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,CAAC,MAAM,0BAA0B,GAAgC;IACrE,oBAAoB;IACpB,uBAAuB;IACvB,oBAAoB;CACZ,CAAC;AAEX,SAAS,aAAa,CAAC,UAA8B;IACnD,OAAO,GAAG,UAAU,CAAC,QAAQ,SAAS,UAAU,CAAC,IAAI,SAAS,UAAU,CAAC,OAAO,SAAS,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;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xF,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Certification harness: the WRITE gate that decides whether a
|
|
3
|
+
* (provider-profile, support-matrix-entry) pair may reach VERIFIED.
|
|
4
|
+
*
|
|
5
|
+
* The reliability contract forbids turning model confidence into certification.
|
|
6
|
+
* Certification therefore comes exclusively from stored, host-owned benchmark
|
|
7
|
+
* evidence that this module re-scores deterministically. Evidence is shipped as
|
|
8
|
+
* frozen package data — never read from the analyzed repository, which is
|
|
9
|
+
* untrusted — and the shipped registry is intentionally EMPTY until a real
|
|
10
|
+
* benchmark corpus has actually run. With no evidence, nothing is certified and
|
|
11
|
+
* VERIFIED stays unreachable, exactly as the preview requires.
|
|
12
|
+
*/
|
|
13
|
+
import type { Ecosystem } from "./analyzer-types.ts";
|
|
14
|
+
/**
|
|
15
|
+
* Fail-closed thresholds from the reliability contract: a large per-ecosystem
|
|
16
|
+
* corpus, repeated runs, and a high pass rate. These are policy constants and
|
|
17
|
+
* are never relaxed by a caller, model, or repository.
|
|
18
|
+
*/
|
|
19
|
+
export declare const CERTIFICATION_POLICY: Readonly<{
|
|
20
|
+
minTasksPerEcosystem: 25;
|
|
21
|
+
runsPerTask: 3;
|
|
22
|
+
minPassRate: 0.95;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* A benchmark run "passes" only when the generated candidate reached a
|
|
26
|
+
* validated strong sandbox for that task's own oracle. It is deliberately NOT
|
|
27
|
+
* the production VERIFIED status, which requires certification and would make
|
|
28
|
+
* this gate circular.
|
|
29
|
+
*/
|
|
30
|
+
export type BenchmarkRunOutcome = "validated" | "failed" | "inconclusive";
|
|
31
|
+
export interface CertificationTaskResultV1 {
|
|
32
|
+
/** Stable identifier of the benchmark task within the corpus. */
|
|
33
|
+
taskId: string;
|
|
34
|
+
/** Exactly `runsPerTask` independent outcomes for this task. */
|
|
35
|
+
runs: readonly BenchmarkRunOutcome[];
|
|
36
|
+
}
|
|
37
|
+
export interface CertificationEvidenceV1 {
|
|
38
|
+
schemaVersion: 1;
|
|
39
|
+
/** Evidence is invalidated when the support matrix it was produced against changes. */
|
|
40
|
+
supportMatrixVersion: string;
|
|
41
|
+
ecosystem: Ecosystem;
|
|
42
|
+
/** Exact support-matrix entry key this evidence certifies. */
|
|
43
|
+
matrixKey: string;
|
|
44
|
+
/** Exact provider/model profile that produced the runs (see providerProfileId). */
|
|
45
|
+
providerProfileId: string;
|
|
46
|
+
/** sha256 of the benchmark corpus used; recorded for provenance. */
|
|
47
|
+
corpusHash: string;
|
|
48
|
+
producedAt: string;
|
|
49
|
+
tasks: readonly CertificationTaskResultV1[];
|
|
50
|
+
}
|
|
51
|
+
export interface CertificationScore {
|
|
52
|
+
certified: boolean;
|
|
53
|
+
passRate: number;
|
|
54
|
+
taskCount: number;
|
|
55
|
+
runCount: number;
|
|
56
|
+
reasons: string[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Deterministic profile identity for a provider/model combination. Moving
|
|
60
|
+
* aliases and tags are not immutable digests, so this proves which label ran,
|
|
61
|
+
* not a reproducible snapshot. Evidence and live runs must match exactly.
|
|
62
|
+
*/
|
|
63
|
+
export declare function providerProfileId(name: string, resolvedModel: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* Strictly validate one evidence document. Throws on any deviation so a corrupt
|
|
66
|
+
* or over-broad evidence file can never contribute silent trust.
|
|
67
|
+
*/
|
|
68
|
+
export declare function validateCertificationEvidenceV1(value: unknown): CertificationEvidenceV1;
|
|
69
|
+
/**
|
|
70
|
+
* Re-score already-validated evidence against the fail-closed policy. Every
|
|
71
|
+
* failing condition is collected so the diagnostics explain exactly why a
|
|
72
|
+
* profile is not certified. `certified` is true only when nothing failed.
|
|
73
|
+
*/
|
|
74
|
+
export declare function scoreCertificationEvidence(evidence: CertificationEvidenceV1): CertificationScore;
|
|
75
|
+
export interface CertificationEvaluation {
|
|
76
|
+
matrixKey: string;
|
|
77
|
+
certified: boolean;
|
|
78
|
+
passRate: number;
|
|
79
|
+
reasons: string[];
|
|
80
|
+
}
|
|
81
|
+
export interface ProviderCertificationResult {
|
|
82
|
+
providerProfileId: string;
|
|
83
|
+
/** Support-matrix keys with passing evidence for this exact provider profile. */
|
|
84
|
+
certifiedMatrixKeys: string[];
|
|
85
|
+
/** One evaluation per evidence document matching this provider profile. */
|
|
86
|
+
evaluations: CertificationEvaluation[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Resolve every support-matrix key a provider profile has passing evidence for.
|
|
90
|
+
* Only evidence whose `providerProfileId` matches exactly is considered, and
|
|
91
|
+
* each document must independently clear the fail-closed score.
|
|
92
|
+
*/
|
|
93
|
+
export declare function evaluateProviderCertification(profileId: string, evidence?: readonly CertificationEvidenceV1[]): ProviderCertificationResult;
|
|
94
|
+
/**
|
|
95
|
+
* Shipped, host-owned certification evidence. Deliberately EMPTY: no
|
|
96
|
+
* 25-task-per-ecosystem, three-run, 95% benchmark has been executed and
|
|
97
|
+
* archived for this preview, so no provider/model/profile is certified and
|
|
98
|
+
* VERIFIED remains unreachable. Adding a real, scored corpus here — and nowhere
|
|
99
|
+
* else — is the only way to make a profile certifiable.
|
|
100
|
+
*/
|
|
101
|
+
export declare const CERTIFIED_EVIDENCE: readonly CertificationEvidenceV1[];
|
|
102
|
+
//# sourceMappingURL=certification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"certification.d.ts","sourceRoot":"","sources":["../src/certification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;EAI/B,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,QAAQ,GAAG,cAAc,CAAC;AAQ1E,MAAM,WA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WAAW,EAAE,uBAAuB,EAAE,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,MAAM,EACjB,QAAQ,GAAE,SAAS,uBAAuB,EAAuB,GAChE,2BAA2B,CAmB7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,uBAAuB,EAAsB,CAAC"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Certification harness: the WRITE gate that decides whether a
|
|
3
|
+
* (provider-profile, support-matrix-entry) pair may reach VERIFIED.
|
|
4
|
+
*
|
|
5
|
+
* The reliability contract forbids turning model confidence into certification.
|
|
6
|
+
* Certification therefore comes exclusively from stored, host-owned benchmark
|
|
7
|
+
* evidence that this module re-scores deterministically. Evidence is shipped as
|
|
8
|
+
* frozen package data — never read from the analyzed repository, which is
|
|
9
|
+
* untrusted — and the shipped registry is intentionally EMPTY until a real
|
|
10
|
+
* benchmark corpus has actually run. With no evidence, nothing is certified and
|
|
11
|
+
* VERIFIED stays unreachable, exactly as the preview requires.
|
|
12
|
+
*/
|
|
13
|
+
import { SUPPORT_MATRIX, SUPPORT_MATRIX_VERSION } from "./support-matrix.js";
|
|
14
|
+
/**
|
|
15
|
+
* Fail-closed thresholds from the reliability contract: a large per-ecosystem
|
|
16
|
+
* corpus, repeated runs, and a high pass rate. These are policy constants and
|
|
17
|
+
* are never relaxed by a caller, model, or repository.
|
|
18
|
+
*/
|
|
19
|
+
export const CERTIFICATION_POLICY = Object.freeze({
|
|
20
|
+
minTasksPerEcosystem: 25,
|
|
21
|
+
runsPerTask: 3,
|
|
22
|
+
minPassRate: 0.95,
|
|
23
|
+
});
|
|
24
|
+
const BENCHMARK_OUTCOMES = new Set([
|
|
25
|
+
"validated",
|
|
26
|
+
"failed",
|
|
27
|
+
"inconclusive",
|
|
28
|
+
]);
|
|
29
|
+
/**
|
|
30
|
+
* Deterministic profile identity for a provider/model combination. Moving
|
|
31
|
+
* aliases and tags are not immutable digests, so this proves which label ran,
|
|
32
|
+
* not a reproducible snapshot. Evidence and live runs must match exactly.
|
|
33
|
+
*/
|
|
34
|
+
export function providerProfileId(name, resolvedModel) {
|
|
35
|
+
const clean = (value) => value.trim().toLowerCase();
|
|
36
|
+
return `${clean(name)}::${clean(resolvedModel)}`;
|
|
37
|
+
}
|
|
38
|
+
const HEX64 = /^[0-9a-f]{64}$/u;
|
|
39
|
+
function isEvidenceShape(value) {
|
|
40
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Strictly validate one evidence document. Throws on any deviation so a corrupt
|
|
44
|
+
* or over-broad evidence file can never contribute silent trust.
|
|
45
|
+
*/
|
|
46
|
+
export function validateCertificationEvidenceV1(value) {
|
|
47
|
+
if (!isEvidenceShape(value))
|
|
48
|
+
throw new Error("Certification evidence must be an object.");
|
|
49
|
+
const allowed = new Set([
|
|
50
|
+
"schemaVersion",
|
|
51
|
+
"supportMatrixVersion",
|
|
52
|
+
"ecosystem",
|
|
53
|
+
"matrixKey",
|
|
54
|
+
"providerProfileId",
|
|
55
|
+
"corpusHash",
|
|
56
|
+
"producedAt",
|
|
57
|
+
"tasks",
|
|
58
|
+
]);
|
|
59
|
+
for (const key of Object.keys(value)) {
|
|
60
|
+
if (!allowed.has(key))
|
|
61
|
+
throw new Error(`Certification evidence has an unexpected field: ${key}.`);
|
|
62
|
+
}
|
|
63
|
+
const record = value;
|
|
64
|
+
if (record.schemaVersion !== 1)
|
|
65
|
+
throw new Error("Certification evidence schemaVersion must be 1.");
|
|
66
|
+
if (typeof record.supportMatrixVersion !== "string" || record.supportMatrixVersion.length === 0) {
|
|
67
|
+
throw new Error("Certification evidence supportMatrixVersion must be a non-empty string.");
|
|
68
|
+
}
|
|
69
|
+
if (record.ecosystem !== "react" && record.ecosystem !== "nestjs"
|
|
70
|
+
&& record.ecosystem !== "fastapi" && record.ecosystem !== "rust") {
|
|
71
|
+
throw new Error("Certification evidence ecosystem is not a recognized ecosystem.");
|
|
72
|
+
}
|
|
73
|
+
if (typeof record.matrixKey !== "string" || record.matrixKey.length === 0) {
|
|
74
|
+
throw new Error("Certification evidence matrixKey must be a non-empty string.");
|
|
75
|
+
}
|
|
76
|
+
if (typeof record.providerProfileId !== "string" || record.providerProfileId.length === 0) {
|
|
77
|
+
throw new Error("Certification evidence providerProfileId must be a non-empty string.");
|
|
78
|
+
}
|
|
79
|
+
if (typeof record.corpusHash !== "string" || !HEX64.test(record.corpusHash)) {
|
|
80
|
+
throw new Error("Certification evidence corpusHash must be a sha256 hex digest.");
|
|
81
|
+
}
|
|
82
|
+
if (typeof record.producedAt !== "string" || !Number.isFinite(Date.parse(record.producedAt))) {
|
|
83
|
+
throw new Error("Certification evidence producedAt must be an ISO timestamp.");
|
|
84
|
+
}
|
|
85
|
+
if (!Array.isArray(record.tasks))
|
|
86
|
+
throw new Error("Certification evidence tasks must be an array.");
|
|
87
|
+
const taskIds = new Set();
|
|
88
|
+
const tasks = record.tasks.map((raw, index) => {
|
|
89
|
+
if (!isEvidenceShape(raw))
|
|
90
|
+
throw new Error(`Certification task ${index} must be an object.`);
|
|
91
|
+
for (const key of Object.keys(raw)) {
|
|
92
|
+
if (key !== "taskId" && key !== "runs")
|
|
93
|
+
throw new Error(`Certification task ${index} has an unexpected field: ${key}.`);
|
|
94
|
+
}
|
|
95
|
+
const taskId = raw.taskId;
|
|
96
|
+
if (typeof taskId !== "string" || taskId.length === 0)
|
|
97
|
+
throw new Error(`Certification task ${index} taskId must be a non-empty string.`);
|
|
98
|
+
if (taskIds.has(taskId))
|
|
99
|
+
throw new Error(`Certification task ${index} repeats taskId ${taskId}.`);
|
|
100
|
+
taskIds.add(taskId);
|
|
101
|
+
if (!Array.isArray(raw.runs))
|
|
102
|
+
throw new Error(`Certification task ${taskId} runs must be an array.`);
|
|
103
|
+
const runs = raw.runs.map((outcome) => {
|
|
104
|
+
if (typeof outcome !== "string" || !BENCHMARK_OUTCOMES.has(outcome)) {
|
|
105
|
+
throw new Error(`Certification task ${taskId} has an invalid run outcome.`);
|
|
106
|
+
}
|
|
107
|
+
return outcome;
|
|
108
|
+
});
|
|
109
|
+
return { taskId, runs };
|
|
110
|
+
});
|
|
111
|
+
return {
|
|
112
|
+
schemaVersion: 1,
|
|
113
|
+
supportMatrixVersion: record.supportMatrixVersion,
|
|
114
|
+
ecosystem: record.ecosystem,
|
|
115
|
+
matrixKey: record.matrixKey,
|
|
116
|
+
providerProfileId: record.providerProfileId,
|
|
117
|
+
corpusHash: record.corpusHash,
|
|
118
|
+
producedAt: record.producedAt,
|
|
119
|
+
tasks,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Re-score already-validated evidence against the fail-closed policy. Every
|
|
124
|
+
* failing condition is collected so the diagnostics explain exactly why a
|
|
125
|
+
* profile is not certified. `certified` is true only when nothing failed.
|
|
126
|
+
*/
|
|
127
|
+
export function scoreCertificationEvidence(evidence) {
|
|
128
|
+
const reasons = [];
|
|
129
|
+
if (evidence.supportMatrixVersion !== SUPPORT_MATRIX_VERSION) {
|
|
130
|
+
reasons.push(`Evidence was produced against support matrix ${evidence.supportMatrixVersion}, not ${SUPPORT_MATRIX_VERSION}.`);
|
|
131
|
+
}
|
|
132
|
+
const entry = SUPPORT_MATRIX.find((candidate) => candidate.key === evidence.matrixKey);
|
|
133
|
+
if (!entry) {
|
|
134
|
+
reasons.push(`Evidence references unknown support-matrix key ${evidence.matrixKey}.`);
|
|
135
|
+
}
|
|
136
|
+
else if (entry.ecosystem !== evidence.ecosystem) {
|
|
137
|
+
reasons.push(`Evidence ecosystem ${evidence.ecosystem} does not match matrix key ${evidence.matrixKey}.`);
|
|
138
|
+
}
|
|
139
|
+
const taskCount = evidence.tasks.length;
|
|
140
|
+
if (taskCount < CERTIFICATION_POLICY.minTasksPerEcosystem) {
|
|
141
|
+
reasons.push(`Corpus has ${taskCount} tasks; certification requires at least ${CERTIFICATION_POLICY.minTasksPerEcosystem}.`);
|
|
142
|
+
}
|
|
143
|
+
let runCount = 0;
|
|
144
|
+
let passing = 0;
|
|
145
|
+
for (const task of evidence.tasks) {
|
|
146
|
+
if (task.runs.length !== CERTIFICATION_POLICY.runsPerTask) {
|
|
147
|
+
reasons.push(`Task ${task.taskId} has ${task.runs.length} runs; certification requires exactly ${CERTIFICATION_POLICY.runsPerTask}.`);
|
|
148
|
+
}
|
|
149
|
+
runCount += task.runs.length;
|
|
150
|
+
passing += task.runs.filter((outcome) => outcome === "validated").length;
|
|
151
|
+
}
|
|
152
|
+
const passRate = runCount === 0 ? 0 : passing / runCount;
|
|
153
|
+
if (passRate < CERTIFICATION_POLICY.minPassRate) {
|
|
154
|
+
reasons.push(`Corpus pass rate ${(passRate * 100).toFixed(1)}% is below the required ${(CERTIFICATION_POLICY.minPassRate * 100).toFixed(0)}%.`);
|
|
155
|
+
}
|
|
156
|
+
return { certified: reasons.length === 0, passRate, taskCount, runCount, reasons };
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Resolve every support-matrix key a provider profile has passing evidence for.
|
|
160
|
+
* Only evidence whose `providerProfileId` matches exactly is considered, and
|
|
161
|
+
* each document must independently clear the fail-closed score.
|
|
162
|
+
*/
|
|
163
|
+
export function evaluateProviderCertification(profileId, evidence = CERTIFIED_EVIDENCE) {
|
|
164
|
+
const certifiedMatrixKeys = new Set();
|
|
165
|
+
const evaluations = [];
|
|
166
|
+
for (const document of evidence) {
|
|
167
|
+
if (document.providerProfileId !== profileId)
|
|
168
|
+
continue;
|
|
169
|
+
const score = scoreCertificationEvidence(document);
|
|
170
|
+
evaluations.push({
|
|
171
|
+
matrixKey: document.matrixKey,
|
|
172
|
+
certified: score.certified,
|
|
173
|
+
passRate: score.passRate,
|
|
174
|
+
reasons: score.reasons,
|
|
175
|
+
});
|
|
176
|
+
if (score.certified)
|
|
177
|
+
certifiedMatrixKeys.add(document.matrixKey);
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
providerProfileId: profileId,
|
|
181
|
+
certifiedMatrixKeys: [...certifiedMatrixKeys],
|
|
182
|
+
evaluations,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Shipped, host-owned certification evidence. Deliberately EMPTY: no
|
|
187
|
+
* 25-task-per-ecosystem, three-run, 95% benchmark has been executed and
|
|
188
|
+
* archived for this preview, so no provider/model/profile is certified and
|
|
189
|
+
* VERIFIED remains unreachable. Adding a real, scored corpus here — and nowhere
|
|
190
|
+
* else — is the only way to make a profile certifiable.
|
|
191
|
+
*/
|
|
192
|
+
export const CERTIFIED_EVIDENCE = Object.freeze([]);
|
|
193
|
+
//# sourceMappingURL=certification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"certification.js","sourceRoot":"","sources":["../src/certification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7E;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,oBAAoB,EAAE,EAAE;IACxB,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,IAAI;CAClB,CAAC,CAAC;AAUH,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAsB;IAC3E,WAAW;IACX,QAAQ;IACR,cAAc;CACf,CAAC,CAAC;AAgCH;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,aAAqB;IACnE,MAAM,KAAK,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACpE,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;AACnD,CAAC;AAED,MAAM,KAAK,GAAG,iBAAiB,CAAC;AAEhC,SAAS,eAAe,CAA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