@plasius/gpu-shader 0.1.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.
- package/LICENSE +203 -0
- package/README.md +434 -0
- package/dist/cli.cjs +12742 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +4 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.js +12718 -0
- package/dist/cli.js.map +1 -0
- package/dist/contracts-C4eel8MT.d.cts +1220 -0
- package/dist/contracts-C4eel8MT.d.ts +1220 -0
- package/dist/index.cjs +2512 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +88 -0
- package/dist/index.d.ts +88 -0
- package/dist/index.js +2456 -0
- package/dist/index.js.map +1 -0
- package/dist/node.cjs +10131 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.cts +50 -0
- package/dist/node.d.ts +50 -0
- package/dist/node.js +10099 -0
- package/dist/node.js.map +1 -0
- package/dist/testing.cjs +1927 -0
- package/dist/testing.cjs.map +1 -0
- package/dist/testing.d.cts +82 -0
- package/dist/testing.d.ts +82 -0
- package/dist/testing.js +1888 -0
- package/dist/testing.js.map +1 -0
- package/matrices/stable-webgpu-2026-07-13.json +545 -0
- package/package.json +100 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ay as ShaderCompileUnitManifest, j as ShaderResult, ax as ShaderCompileUnitInventory, b6 as StableWebGpuMatrixManifest, aH as ShaderQualificationBundleManifest, aL as ShaderQualificationFixtureManifest, S as Sha256Hex, aQ as ShaderQualificationPreflightManifest, au as ShaderCellEvidence, aX as ShaderRunnerCellPreflightEvidence, aE as ShaderNonQualifyingWorkflowDiagnostic, a$ as ShaderValidationEvidence, aI as ShaderQualificationCandidateSubject, aZ as ShaderTrustedWorkflowProvenance, b0 as ShaderValidationEvidenceAttestationRef } from './contracts-C4eel8MT.cjs';
|
|
2
|
+
|
|
3
|
+
/** Identity helper that makes compile-unit declarations readonly at the call site. */
|
|
4
|
+
declare function defineShaderCompileUnit<const T extends ShaderCompileUnitManifest>(unit: T): T;
|
|
5
|
+
/** Validates that every declared WGSL fragment belongs to at least one concrete compile unit. */
|
|
6
|
+
declare function validateCompileUnitInventory(value: unknown): ShaderResult<ShaderCompileUnitInventory>;
|
|
7
|
+
|
|
8
|
+
/** Strictly validates the versioned 16-cell stable WebGPU support matrix. */
|
|
9
|
+
declare function validateStableWebGpuMatrix(value: unknown): ShaderResult<StableWebGpuMatrixManifest>;
|
|
10
|
+
|
|
11
|
+
/** Strictly validates the bounded, declarative (never executable) fixture DSL. */
|
|
12
|
+
declare function validateQualificationFixture(value: unknown, unit?: ShaderCompileUnitManifest): ShaderResult<ShaderQualificationFixtureManifest>;
|
|
13
|
+
/** Validates the non-self-referential, data-only candidate bundle envelope. */
|
|
14
|
+
declare function validateQualificationBundleManifest(value: unknown): ShaderResult<ShaderQualificationBundleManifest>;
|
|
15
|
+
|
|
16
|
+
interface EvidenceArtifact<T> {
|
|
17
|
+
readonly value: T;
|
|
18
|
+
readonly bytes: Uint8Array;
|
|
19
|
+
readonly sha256: Sha256Hex;
|
|
20
|
+
}
|
|
21
|
+
declare function parseTrustedWorkflowProvenance(value: unknown, path?: string): ShaderTrustedWorkflowProvenance;
|
|
22
|
+
declare function computeQualificationInventorySha256(bundle: ShaderQualificationBundleManifest): Promise<Sha256Hex>;
|
|
23
|
+
declare function computeQualificationSubjectBinding(input: {
|
|
24
|
+
readonly subject: ShaderQualificationCandidateSubject;
|
|
25
|
+
readonly dataBundleSha256: Sha256Hex;
|
|
26
|
+
readonly compileUnitInventorySha256: Sha256Hex;
|
|
27
|
+
readonly matrixSha256: Sha256Hex;
|
|
28
|
+
readonly harnessSha256: Sha256Hex;
|
|
29
|
+
}): Promise<Sha256Hex>;
|
|
30
|
+
/** Creates the trusted prepare artifact without persisting an OIDC token. */
|
|
31
|
+
declare function createQualificationPreflight(input: {
|
|
32
|
+
readonly qualificationId: string;
|
|
33
|
+
readonly bundle: ShaderQualificationBundleManifest;
|
|
34
|
+
readonly matrix: StableWebGpuMatrixManifest;
|
|
35
|
+
readonly matrixBytes: Uint8Array;
|
|
36
|
+
readonly sourceUri: string;
|
|
37
|
+
readonly dataBundleSha256: Sha256Hex;
|
|
38
|
+
readonly matrixSha256: Sha256Hex;
|
|
39
|
+
readonly harnessSha256: Sha256Hex;
|
|
40
|
+
readonly provenance: ShaderTrustedWorkflowProvenance;
|
|
41
|
+
}): Promise<ShaderQualificationPreflightManifest>;
|
|
42
|
+
interface AggregateShaderValidationEvidenceInput {
|
|
43
|
+
readonly bundle: ShaderQualificationBundleManifest;
|
|
44
|
+
readonly matrix: StableWebGpuMatrixManifest;
|
|
45
|
+
readonly matrixBytes: Uint8Array;
|
|
46
|
+
readonly preflight: EvidenceArtifact<ShaderQualificationPreflightManifest>;
|
|
47
|
+
readonly cellEvidence: readonly EvidenceArtifact<ShaderCellEvidence>[];
|
|
48
|
+
readonly runnerPreflights: readonly EvidenceArtifact<ShaderRunnerCellPreflightEvidence>[];
|
|
49
|
+
readonly workflowDiagnostics: readonly EvidenceArtifact<ShaderNonQualifyingWorkflowDiagnostic>[];
|
|
50
|
+
readonly harness: {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly version: string;
|
|
53
|
+
readonly sha256: Sha256Hex;
|
|
54
|
+
};
|
|
55
|
+
readonly packageVersion: string;
|
|
56
|
+
readonly generatedAt?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Aggregates exactly one immutable result for every compile-unit × matrix-cell pair. */
|
|
59
|
+
declare function aggregateShaderValidationEvidence(input: AggregateShaderValidationEvidenceInput): Promise<ShaderValidationEvidence>;
|
|
60
|
+
/** Validates final aggregate identities and exact Cartesian coverage. */
|
|
61
|
+
declare function validateShaderValidationEvidence(input: {
|
|
62
|
+
readonly evidence: unknown;
|
|
63
|
+
readonly bundle: ShaderQualificationBundleManifest;
|
|
64
|
+
readonly matrix: StableWebGpuMatrixManifest;
|
|
65
|
+
readonly matrixBytes: Uint8Array;
|
|
66
|
+
readonly dataBundleSha256?: Sha256Hex;
|
|
67
|
+
readonly requirePassed?: boolean;
|
|
68
|
+
}): Promise<ShaderResult<ShaderValidationEvidence>>;
|
|
69
|
+
/** Strictly parses an external attestation reference; cryptographic verification remains mandatory. */
|
|
70
|
+
declare function parseShaderValidationEvidenceAttestationRef(value: unknown): ShaderValidationEvidenceAttestationRef;
|
|
71
|
+
declare function verifyShaderValidationEvidenceAttestation(input: {
|
|
72
|
+
readonly ref: unknown;
|
|
73
|
+
readonly evidenceBytes: Uint8Array;
|
|
74
|
+
readonly bundleBytes: Uint8Array;
|
|
75
|
+
readonly verifyCryptographicBundle: (context: {
|
|
76
|
+
readonly ref: ShaderValidationEvidenceAttestationRef;
|
|
77
|
+
readonly evidenceBytes: Uint8Array;
|
|
78
|
+
readonly bundleBytes: Uint8Array;
|
|
79
|
+
}) => Promise<boolean>;
|
|
80
|
+
}): Promise<ShaderResult<ShaderValidationEvidenceAttestationRef>>;
|
|
81
|
+
|
|
82
|
+
export { type AggregateShaderValidationEvidenceInput, type EvidenceArtifact, aggregateShaderValidationEvidence, computeQualificationInventorySha256, computeQualificationSubjectBinding, createQualificationPreflight, defineShaderCompileUnit, parseShaderValidationEvidenceAttestationRef, parseTrustedWorkflowProvenance, validateCompileUnitInventory, validateQualificationBundleManifest, validateQualificationFixture, validateShaderValidationEvidence, validateStableWebGpuMatrix, verifyShaderValidationEvidenceAttestation };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ay as ShaderCompileUnitManifest, j as ShaderResult, ax as ShaderCompileUnitInventory, b6 as StableWebGpuMatrixManifest, aH as ShaderQualificationBundleManifest, aL as ShaderQualificationFixtureManifest, S as Sha256Hex, aQ as ShaderQualificationPreflightManifest, au as ShaderCellEvidence, aX as ShaderRunnerCellPreflightEvidence, aE as ShaderNonQualifyingWorkflowDiagnostic, a$ as ShaderValidationEvidence, aI as ShaderQualificationCandidateSubject, aZ as ShaderTrustedWorkflowProvenance, b0 as ShaderValidationEvidenceAttestationRef } from './contracts-C4eel8MT.js';
|
|
2
|
+
|
|
3
|
+
/** Identity helper that makes compile-unit declarations readonly at the call site. */
|
|
4
|
+
declare function defineShaderCompileUnit<const T extends ShaderCompileUnitManifest>(unit: T): T;
|
|
5
|
+
/** Validates that every declared WGSL fragment belongs to at least one concrete compile unit. */
|
|
6
|
+
declare function validateCompileUnitInventory(value: unknown): ShaderResult<ShaderCompileUnitInventory>;
|
|
7
|
+
|
|
8
|
+
/** Strictly validates the versioned 16-cell stable WebGPU support matrix. */
|
|
9
|
+
declare function validateStableWebGpuMatrix(value: unknown): ShaderResult<StableWebGpuMatrixManifest>;
|
|
10
|
+
|
|
11
|
+
/** Strictly validates the bounded, declarative (never executable) fixture DSL. */
|
|
12
|
+
declare function validateQualificationFixture(value: unknown, unit?: ShaderCompileUnitManifest): ShaderResult<ShaderQualificationFixtureManifest>;
|
|
13
|
+
/** Validates the non-self-referential, data-only candidate bundle envelope. */
|
|
14
|
+
declare function validateQualificationBundleManifest(value: unknown): ShaderResult<ShaderQualificationBundleManifest>;
|
|
15
|
+
|
|
16
|
+
interface EvidenceArtifact<T> {
|
|
17
|
+
readonly value: T;
|
|
18
|
+
readonly bytes: Uint8Array;
|
|
19
|
+
readonly sha256: Sha256Hex;
|
|
20
|
+
}
|
|
21
|
+
declare function parseTrustedWorkflowProvenance(value: unknown, path?: string): ShaderTrustedWorkflowProvenance;
|
|
22
|
+
declare function computeQualificationInventorySha256(bundle: ShaderQualificationBundleManifest): Promise<Sha256Hex>;
|
|
23
|
+
declare function computeQualificationSubjectBinding(input: {
|
|
24
|
+
readonly subject: ShaderQualificationCandidateSubject;
|
|
25
|
+
readonly dataBundleSha256: Sha256Hex;
|
|
26
|
+
readonly compileUnitInventorySha256: Sha256Hex;
|
|
27
|
+
readonly matrixSha256: Sha256Hex;
|
|
28
|
+
readonly harnessSha256: Sha256Hex;
|
|
29
|
+
}): Promise<Sha256Hex>;
|
|
30
|
+
/** Creates the trusted prepare artifact without persisting an OIDC token. */
|
|
31
|
+
declare function createQualificationPreflight(input: {
|
|
32
|
+
readonly qualificationId: string;
|
|
33
|
+
readonly bundle: ShaderQualificationBundleManifest;
|
|
34
|
+
readonly matrix: StableWebGpuMatrixManifest;
|
|
35
|
+
readonly matrixBytes: Uint8Array;
|
|
36
|
+
readonly sourceUri: string;
|
|
37
|
+
readonly dataBundleSha256: Sha256Hex;
|
|
38
|
+
readonly matrixSha256: Sha256Hex;
|
|
39
|
+
readonly harnessSha256: Sha256Hex;
|
|
40
|
+
readonly provenance: ShaderTrustedWorkflowProvenance;
|
|
41
|
+
}): Promise<ShaderQualificationPreflightManifest>;
|
|
42
|
+
interface AggregateShaderValidationEvidenceInput {
|
|
43
|
+
readonly bundle: ShaderQualificationBundleManifest;
|
|
44
|
+
readonly matrix: StableWebGpuMatrixManifest;
|
|
45
|
+
readonly matrixBytes: Uint8Array;
|
|
46
|
+
readonly preflight: EvidenceArtifact<ShaderQualificationPreflightManifest>;
|
|
47
|
+
readonly cellEvidence: readonly EvidenceArtifact<ShaderCellEvidence>[];
|
|
48
|
+
readonly runnerPreflights: readonly EvidenceArtifact<ShaderRunnerCellPreflightEvidence>[];
|
|
49
|
+
readonly workflowDiagnostics: readonly EvidenceArtifact<ShaderNonQualifyingWorkflowDiagnostic>[];
|
|
50
|
+
readonly harness: {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly version: string;
|
|
53
|
+
readonly sha256: Sha256Hex;
|
|
54
|
+
};
|
|
55
|
+
readonly packageVersion: string;
|
|
56
|
+
readonly generatedAt?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Aggregates exactly one immutable result for every compile-unit × matrix-cell pair. */
|
|
59
|
+
declare function aggregateShaderValidationEvidence(input: AggregateShaderValidationEvidenceInput): Promise<ShaderValidationEvidence>;
|
|
60
|
+
/** Validates final aggregate identities and exact Cartesian coverage. */
|
|
61
|
+
declare function validateShaderValidationEvidence(input: {
|
|
62
|
+
readonly evidence: unknown;
|
|
63
|
+
readonly bundle: ShaderQualificationBundleManifest;
|
|
64
|
+
readonly matrix: StableWebGpuMatrixManifest;
|
|
65
|
+
readonly matrixBytes: Uint8Array;
|
|
66
|
+
readonly dataBundleSha256?: Sha256Hex;
|
|
67
|
+
readonly requirePassed?: boolean;
|
|
68
|
+
}): Promise<ShaderResult<ShaderValidationEvidence>>;
|
|
69
|
+
/** Strictly parses an external attestation reference; cryptographic verification remains mandatory. */
|
|
70
|
+
declare function parseShaderValidationEvidenceAttestationRef(value: unknown): ShaderValidationEvidenceAttestationRef;
|
|
71
|
+
declare function verifyShaderValidationEvidenceAttestation(input: {
|
|
72
|
+
readonly ref: unknown;
|
|
73
|
+
readonly evidenceBytes: Uint8Array;
|
|
74
|
+
readonly bundleBytes: Uint8Array;
|
|
75
|
+
readonly verifyCryptographicBundle: (context: {
|
|
76
|
+
readonly ref: ShaderValidationEvidenceAttestationRef;
|
|
77
|
+
readonly evidenceBytes: Uint8Array;
|
|
78
|
+
readonly bundleBytes: Uint8Array;
|
|
79
|
+
}) => Promise<boolean>;
|
|
80
|
+
}): Promise<ShaderResult<ShaderValidationEvidenceAttestationRef>>;
|
|
81
|
+
|
|
82
|
+
export { type AggregateShaderValidationEvidenceInput, type EvidenceArtifact, aggregateShaderValidationEvidence, computeQualificationInventorySha256, computeQualificationSubjectBinding, createQualificationPreflight, defineShaderCompileUnit, parseShaderValidationEvidenceAttestationRef, parseTrustedWorkflowProvenance, validateCompileUnitInventory, validateQualificationBundleManifest, validateQualificationFixture, validateShaderValidationEvidence, validateStableWebGpuMatrix, verifyShaderValidationEvidenceAttestation };
|