@gate-forge/core 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 +202 -0
- package/dist/baselines/adoption.d.ts +76 -0
- package/dist/baselines/adoption.d.ts.map +1 -0
- package/dist/baselines/adoption.js +163 -0
- package/dist/baselines/adoption.js.map +1 -0
- package/dist/baselines/index.d.ts +102 -0
- package/dist/baselines/index.d.ts.map +1 -0
- package/dist/baselines/index.js +186 -0
- package/dist/baselines/index.js.map +1 -0
- package/dist/canonical-json.d.ts +51 -0
- package/dist/canonical-json.d.ts.map +1 -0
- package/dist/canonical-json.js +112 -0
- package/dist/canonical-json.js.map +1 -0
- package/dist/classifier/bind.d.ts +64 -0
- package/dist/classifier/bind.d.ts.map +1 -0
- package/dist/classifier/bind.js +188 -0
- package/dist/classifier/bind.js.map +1 -0
- package/dist/classifier/classify.d.ts +154 -0
- package/dist/classifier/classify.d.ts.map +1 -0
- package/dist/classifier/classify.js +1207 -0
- package/dist/classifier/classify.js.map +1 -0
- package/dist/classifier/glob.d.ts +48 -0
- package/dist/classifier/glob.d.ts.map +1 -0
- package/dist/classifier/glob.js +104 -0
- package/dist/classifier/glob.js.map +1 -0
- package/dist/classifier/index.d.ts +10 -0
- package/dist/classifier/index.d.ts.map +1 -0
- package/dist/classifier/index.js +21 -0
- package/dist/classifier/index.js.map +1 -0
- package/dist/classifier/schema.d.ts +150 -0
- package/dist/classifier/schema.d.ts.map +1 -0
- package/dist/classifier/schema.js +139 -0
- package/dist/classifier/schema.js.map +1 -0
- package/dist/config/index.d.ts +259 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +523 -0
- package/dist/config/index.js.map +1 -0
- package/dist/fingerprints.d.ts +56 -0
- package/dist/fingerprints.d.ts.map +1 -0
- package/dist/fingerprints.js +59 -0
- package/dist/fingerprints.js.map +1 -0
- package/dist/graph/build.d.ts +16 -0
- package/dist/graph/build.d.ts.map +1 -0
- package/dist/graph/build.js +423 -0
- package/dist/graph/build.js.map +1 -0
- package/dist/graph/index.d.ts +12 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +10 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/schema.d.ts +448 -0
- package/dist/graph/schema.d.ts.map +1 -0
- package/dist/graph/schema.js +237 -0
- package/dist/graph/schema.js.map +1 -0
- package/dist/graph/symbols.d.ts +129 -0
- package/dist/graph/symbols.d.ts.map +1 -0
- package/dist/graph/symbols.js +177 -0
- package/dist/graph/symbols.js.map +1 -0
- package/dist/graph/util.d.ts +40 -0
- package/dist/graph/util.d.ts.map +1 -0
- package/dist/graph/util.js +41 -0
- package/dist/graph/util.js.map +1 -0
- package/dist/index.d.ts +683 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +563 -0
- package/dist/index.js.map +1 -0
- package/dist/mapping/resolve.d.ts +177 -0
- package/dist/mapping/resolve.d.ts.map +1 -0
- package/dist/mapping/resolve.js +523 -0
- package/dist/mapping/resolve.js.map +1 -0
- package/dist/policy/coverage.d.ts +79 -0
- package/dist/policy/coverage.d.ts.map +1 -0
- package/dist/policy/coverage.js +119 -0
- package/dist/policy/coverage.js.map +1 -0
- package/dist/policy/evaluate.d.ts +275 -0
- package/dist/policy/evaluate.d.ts.map +1 -0
- package/dist/policy/evaluate.js +382 -0
- package/dist/policy/evaluate.js.map +1 -0
- package/dist/policy/index.d.ts +15 -0
- package/dist/policy/index.d.ts.map +1 -0
- package/dist/policy/index.js +14 -0
- package/dist/policy/index.js.map +1 -0
- package/dist/policy/trusted.d.ts +59 -0
- package/dist/policy/trusted.d.ts.map +1 -0
- package/dist/policy/trusted.js +96 -0
- package/dist/policy/trusted.js.map +1 -0
- package/dist/provenance.d.ts +170 -0
- package/dist/provenance.d.ts.map +1 -0
- package/dist/provenance.js +306 -0
- package/dist/provenance.js.map +1 -0
- package/dist/receipt/index.d.ts +74 -0
- package/dist/receipt/index.d.ts.map +1 -0
- package/dist/receipt/index.js +154 -0
- package/dist/receipt/index.js.map +1 -0
- package/dist/report/index.d.ts +100 -0
- package/dist/report/index.d.ts.map +1 -0
- package/dist/report/index.js +355 -0
- package/dist/report/index.js.map +1 -0
- package/dist/schemas/adoption.d.ts +40 -0
- package/dist/schemas/adoption.d.ts.map +1 -0
- package/dist/schemas/adoption.js +87 -0
- package/dist/schemas/adoption.js.map +1 -0
- package/dist/schemas/baseline.d.ts +19 -0
- package/dist/schemas/baseline.d.ts.map +1 -0
- package/dist/schemas/baseline.js +45 -0
- package/dist/schemas/baseline.js.map +1 -0
- package/dist/schemas/claim.d.ts +32 -0
- package/dist/schemas/claim.d.ts.map +1 -0
- package/dist/schemas/claim.js +34 -0
- package/dist/schemas/claim.js.map +1 -0
- package/dist/schemas/classification-policy.d.ts +84 -0
- package/dist/schemas/classification-policy.d.ts.map +1 -0
- package/dist/schemas/classification-policy.js +130 -0
- package/dist/schemas/classification-policy.js.map +1 -0
- package/dist/schemas/classification-signal.d.ts +125 -0
- package/dist/schemas/classification-signal.d.ts.map +1 -0
- package/dist/schemas/classification-signal.js +126 -0
- package/dist/schemas/classification-signal.js.map +1 -0
- package/dist/schemas/classification.d.ts +120 -0
- package/dist/schemas/classification.d.ts.map +1 -0
- package/dist/schemas/classification.js +154 -0
- package/dist/schemas/classification.js.map +1 -0
- package/dist/schemas/common.d.ts +73 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +60 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/coverage-policy.d.ts +89 -0
- package/dist/schemas/coverage-policy.d.ts.map +1 -0
- package/dist/schemas/coverage-policy.js +81 -0
- package/dist/schemas/coverage-policy.js.map +1 -0
- package/dist/schemas/evidence.d.ts +65 -0
- package/dist/schemas/evidence.d.ts.map +1 -0
- package/dist/schemas/evidence.js +64 -0
- package/dist/schemas/evidence.js.map +1 -0
- package/dist/schemas/execution-result.d.ts +214 -0
- package/dist/schemas/execution-result.d.ts.map +1 -0
- package/dist/schemas/execution-result.js +240 -0
- package/dist/schemas/execution-result.js.map +1 -0
- package/dist/schemas/gate-receipt.d.ts +86 -0
- package/dist/schemas/gate-receipt.d.ts.map +1 -0
- package/dist/schemas/gate-receipt.js +193 -0
- package/dist/schemas/gate-receipt.js.map +1 -0
- package/dist/schemas/index.d.ts +22 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +22 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/obligation.d.ts +37 -0
- package/dist/schemas/obligation.d.ts.map +1 -0
- package/dist/schemas/obligation.js +46 -0
- package/dist/schemas/obligation.js.map +1 -0
- package/dist/schemas/plugin.d.ts +19 -0
- package/dist/schemas/plugin.d.ts.map +1 -0
- package/dist/schemas/plugin.js +20 -0
- package/dist/schemas/plugin.js.map +1 -0
- package/dist/schemas/policy.d.ts +73 -0
- package/dist/schemas/policy.d.ts.map +1 -0
- package/dist/schemas/policy.js +46 -0
- package/dist/schemas/policy.js.map +1 -0
- package/dist/schemas/resource.d.ts +26 -0
- package/dist/schemas/resource.d.ts.map +1 -0
- package/dist/schemas/resource.js +29 -0
- package/dist/schemas/resource.js.map +1 -0
- package/dist/schemas/run-manifest.d.ts +72 -0
- package/dist/schemas/run-manifest.d.ts.map +1 -0
- package/dist/schemas/run-manifest.js +125 -0
- package/dist/schemas/run-manifest.js.map +1 -0
- package/dist/schemas/runner-adapter.d.ts +169 -0
- package/dist/schemas/runner-adapter.d.ts.map +1 -0
- package/dist/schemas/runner-adapter.js +2 -0
- package/dist/schemas/runner-adapter.js.map +1 -0
- package/dist/schemas/test-catalog.d.ts +472 -0
- package/dist/schemas/test-catalog.d.ts.map +1 -0
- package/dist/schemas/test-catalog.js +311 -0
- package/dist/schemas/test-catalog.js.map +1 -0
- package/dist/schemas/test-map.d.ts +99 -0
- package/dist/schemas/test-map.d.ts.map +1 -0
- package/dist/schemas/test-map.js +103 -0
- package/dist/schemas/test-map.js.map +1 -0
- package/dist/schemas/verdict.d.ts +73 -0
- package/dist/schemas/verdict.d.ts.map +1 -0
- package/dist/schemas/verdict.js +92 -0
- package/dist/schemas/verdict.js.map +1 -0
- package/dist/schemas/waiver.d.ts +36 -0
- package/dist/schemas/waiver.d.ts.map +1 -0
- package/dist/schemas/waiver.js +42 -0
- package/dist/schemas/waiver.js.map +1 -0
- package/dist/supervision/index.d.ts +170 -0
- package/dist/supervision/index.d.ts.map +1 -0
- package/dist/supervision/index.js +354 -0
- package/dist/supervision/index.js.map +1 -0
- package/dist/testing/clock.d.ts +50 -0
- package/dist/testing/clock.d.ts.map +1 -0
- package/dist/testing/clock.js +75 -0
- package/dist/testing/clock.js.map +1 -0
- package/dist/testing/env.d.ts +66 -0
- package/dist/testing/env.d.ts.map +1 -0
- package/dist/testing/env.js +106 -0
- package/dist/testing/env.js.map +1 -0
- package/dist/testing/gate-runner.d.ts +141 -0
- package/dist/testing/gate-runner.d.ts.map +1 -0
- package/dist/testing/gate-runner.js +173 -0
- package/dist/testing/gate-runner.js.map +1 -0
- package/dist/testing/gf19.d.ts +106 -0
- package/dist/testing/gf19.d.ts.map +1 -0
- package/dist/testing/gf19.js +282 -0
- package/dist/testing/gf19.js.map +1 -0
- package/dist/testing/index.d.ts +20 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +14 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/red-probe.d.ts +138 -0
- package/dist/testing/red-probe.d.ts.map +1 -0
- package/dist/testing/red-probe.js +251 -0
- package/dist/testing/red-probe.js.map +1 -0
- package/dist/testing/temp-repo.d.ts +126 -0
- package/dist/testing/temp-repo.d.ts.map +1 -0
- package/dist/testing/temp-repo.js +214 -0
- package/dist/testing/temp-repo.js.map +1 -0
- package/dist/verdict/cause.d.ts +99 -0
- package/dist/verdict/cause.d.ts.map +1 -0
- package/dist/verdict/cause.js +206 -0
- package/dist/verdict/cause.js.map +1 -0
- package/dist/verdict/evaluate.d.ts +135 -0
- package/dist/verdict/evaluate.d.ts.map +1 -0
- package/dist/verdict/evaluate.js +1513 -0
- package/dist/verdict/evaluate.js.map +1 -0
- package/dist/verdict/index.d.ts +21 -0
- package/dist/verdict/index.d.ts.map +1 -0
- package/dist/verdict/index.js +20 -0
- package/dist/verdict/index.js.map +1 -0
- package/dist/verdict/pack-verifiers.d.ts +97 -0
- package/dist/verdict/pack-verifiers.d.ts.map +1 -0
- package/dist/verdict/pack-verifiers.js +763 -0
- package/dist/verdict/pack-verifiers.js.map +1 -0
- package/dist/verdict/registry.d.ts +180 -0
- package/dist/verdict/registry.d.ts.map +1 -0
- package/dist/verdict/registry.js +67 -0
- package/dist/verdict/registry.js.map +1 -0
- package/dist/waivers/index.d.ts +103 -0
- package/dist/waivers/index.d.ts.map +1 -0
- package/dist/waivers/index.js +192 -0
- package/dist/waivers/index.js.map +1 -0
- package/package.json +40 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @gate-forge/core — the frozen public surface of the gateforge engine.
|
|
3
|
+
*
|
|
4
|
+
* STABILITY CONTRACT: every export here is a stable name. Later waves
|
|
5
|
+
* (graph, policy, verdict, baselines, waivers, reports, harness) add to
|
|
6
|
+
* this file; existing exports are never renamed or reshaped. Each export
|
|
7
|
+
* below is documented; if you need a new primitive, add it — do not
|
|
8
|
+
* repurpose an existing one.
|
|
9
|
+
*
|
|
10
|
+
* Layers:
|
|
11
|
+
* - canonical JSON + hashing (pin #1) — the substrate for ALL hashes
|
|
12
|
+
* - artifact schemas (zod) + inferred types — the frozen data ontology
|
|
13
|
+
* (ADR 0001; pins #2-#6, #9, #11)
|
|
14
|
+
* - fingerprints (pin #2) — baseline identity
|
|
15
|
+
* - config loading (pin #6) — fail-closed `.gateforge.yml` handling
|
|
16
|
+
*
|
|
17
|
+
* @module @gate-forge/core
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Any JSON-representable value; the input domain of canonical hashing.
|
|
21
|
+
*/
|
|
22
|
+
export type { JsonValue } from './canonical-json.js';
|
|
23
|
+
/**
|
|
24
|
+
* Type predicate narrowing an unknown value to {@link JsonValue}.
|
|
25
|
+
*/
|
|
26
|
+
export { isJsonValue } from './canonical-json.js';
|
|
27
|
+
/**
|
|
28
|
+
* Serializes a value to GF-canonical-JSON (pin #1): UTF-8, recursively
|
|
29
|
+
* key-sorted, no whitespace, integers plain. Array order is preserved.
|
|
30
|
+
* Throws on NaN/Infinity (no canonical representation).
|
|
31
|
+
*/
|
|
32
|
+
export { canonicalJson } from './canonical-json.js';
|
|
33
|
+
/**
|
|
34
|
+
* Lowercase hex sha256 of a string or byte buffer.
|
|
35
|
+
*/
|
|
36
|
+
export { sha256Hex } from './canonical-json.js';
|
|
37
|
+
/**
|
|
38
|
+
* `sha256(canonicalJson(value))` — the single primitive behind
|
|
39
|
+
* fingerprints, GPP/3 digests, and witness record ids (pin #1).
|
|
40
|
+
*/
|
|
41
|
+
export { sha256Canonical } from './canonical-json.js';
|
|
42
|
+
/**
|
|
43
|
+
* Derives the service-issued witness record id: sha256 over the
|
|
44
|
+
* GF-canonical JSON of `{runId, obligationId, kind, testId, origin,
|
|
45
|
+
* payload}`. The single source of truth shared by the witness
|
|
46
|
+
* (issuance) and every verifier (checking).
|
|
47
|
+
*/
|
|
48
|
+
export { recordIdOf, type RecordIdentity } from './provenance.js';
|
|
49
|
+
/**
|
|
50
|
+
* Lenient provenance check (never throws): a record is provenanced only
|
|
51
|
+
* when its 64-hex recordId recomputes from its own contents. Records
|
|
52
|
+
* failing it demote to claimed tier (GF-23).
|
|
53
|
+
*/
|
|
54
|
+
export { isProvenancedRecord, isWitnessedRecord } from './provenance.js';
|
|
55
|
+
/**
|
|
56
|
+
* Witness-ledger attestation (pin #7): HMAC-SHA256 over the canonical
|
|
57
|
+
* `{runId, recordIds}` set, keyed by the verifier key the tested suite
|
|
58
|
+
* never receives. Makes the suite-writable manifest append tamper-
|
|
59
|
+
* evident; `GET /ledger-attestation` serves the same authenticated set
|
|
60
|
+
* live.
|
|
61
|
+
*/
|
|
62
|
+
export { ledgerMac, verifyLedgerMac } from './provenance.js';
|
|
63
|
+
/**
|
|
64
|
+
* V2 evidence attestation (plan §11.3): HMAC-SHA256 over the canonical
|
|
65
|
+
* `{domain: 'gateforge.ledger.v2', attestationVersion: 2, runId,
|
|
66
|
+
* invocationId, inputDigest, recordIds}` set, keyed by the verifier key
|
|
67
|
+
* the tested suite never receives. Binds issued evidence to the tested
|
|
68
|
+
* source/policy inputs and the fresh invocation identity. A legacy v1
|
|
69
|
+
* `{runId, recordIds}` MAC can never verify here (different signed
|
|
70
|
+
* bytes) and never authorizes evidence.
|
|
71
|
+
*/
|
|
72
|
+
export { ATTESTATION_DOMAIN, ATTESTATION_VERSION, attestationMac, verifyAttestationMac, type AttestationBody, } from './provenance.js';
|
|
73
|
+
/**
|
|
74
|
+
* The only accepted `schemaVersion` on any artifact (currently `1`).
|
|
75
|
+
* Unknown versions are rejected everywhere; gateforge never migrates.
|
|
76
|
+
*/
|
|
77
|
+
export { GATEFORGE_SCHEMA_VERSION } from './schemas/common.js';
|
|
78
|
+
/**
|
|
79
|
+
* Source location shape (file, 1-based line, 0-based col) used by
|
|
80
|
+
* unresolved reasons and detector provenance.
|
|
81
|
+
*/
|
|
82
|
+
export { LocationSchema } from './schemas/common.js';
|
|
83
|
+
export type { Location } from './schemas/common.js';
|
|
84
|
+
/** Contract-name grammar: interior colons legal (`crud:update`), no leading colon. */
|
|
85
|
+
export { ContractNameSchema } from './schemas/common.js';
|
|
86
|
+
/** Inferred contract-name type. */
|
|
87
|
+
export type { ContractName } from './schemas/common.js';
|
|
88
|
+
/** Exposure enum schema: `user-facing | internal`. */
|
|
89
|
+
export { ExposureSchema } from './schemas/common.js';
|
|
90
|
+
/** Inferred exposure type. */
|
|
91
|
+
export type { Exposure } from './schemas/common.js';
|
|
92
|
+
/** Plane enum schema: `tenant | master | global`. */
|
|
93
|
+
export { PlaneSchema } from './schemas/common.js';
|
|
94
|
+
/** Inferred plane type. */
|
|
95
|
+
export type { Plane } from './schemas/common.js';
|
|
96
|
+
/** Transport enum schema: `subprocess | in-process` (ADR 0002). */
|
|
97
|
+
export { TransportSchema } from './schemas/common.js';
|
|
98
|
+
/** Inferred transport type. */
|
|
99
|
+
export type { Transport } from './schemas/common.js';
|
|
100
|
+
/** Trust-tier enum schema: `claimed | witnessed` (ADR 0001). */
|
|
101
|
+
export { TrustTierSchema } from './schemas/common.js';
|
|
102
|
+
/** Inferred trust-tier type. */
|
|
103
|
+
export type { TrustTier } from './schemas/common.js';
|
|
104
|
+
/**
|
|
105
|
+
* Resource (plan §4.2): stable code-derived object discovered by a
|
|
106
|
+
* detector — id, kind, source, location, detector version, attributes.
|
|
107
|
+
*/
|
|
108
|
+
export { ResourceSchema } from './schemas/resource.js';
|
|
109
|
+
/** Inferred resource type. */
|
|
110
|
+
export type { Resource } from './schemas/resource.js';
|
|
111
|
+
/**
|
|
112
|
+
* Classification (plan §4.3): exposure, plane, lifecycle, ordered
|
|
113
|
+
* `primaryKey`, evidence adapter. User-facing entries require an
|
|
114
|
+
* adapter; internal entries default to no CRUD obligations.
|
|
115
|
+
*/
|
|
116
|
+
export { ClassificationSchema, ClassificationFileSchema, LifecycleSchema } from './schemas/classification.js';
|
|
117
|
+
/** Inferred per-resource classification type. */
|
|
118
|
+
export type { Classification } from './schemas/classification.js';
|
|
119
|
+
/** Inferred classifications-document type. */
|
|
120
|
+
export type { ClassificationFile } from './schemas/classification.js';
|
|
121
|
+
/** Inferred lifecycle type (create/read/update/delete + semantics). */
|
|
122
|
+
export type { Lifecycle } from './schemas/classification.js';
|
|
123
|
+
/**
|
|
124
|
+
* Policy (plan §4.4): declarative when/require mapping from resource
|
|
125
|
+
* attributes to required contracts. Pure data, no code escape hatch.
|
|
126
|
+
*/
|
|
127
|
+
export { PolicySchema, PolicyFileSchema, PolicyWhenSchema } from './schemas/policy.js';
|
|
128
|
+
/** Inferred single-policy type. */
|
|
129
|
+
export type { Policy } from './schemas/policy.js';
|
|
130
|
+
/** Inferred policies-document type. */
|
|
131
|
+
export type { PolicyFile } from './schemas/policy.js';
|
|
132
|
+
/** Inferred policy-matcher type. */
|
|
133
|
+
export type { PolicyWhen } from './schemas/policy.js';
|
|
134
|
+
/**
|
|
135
|
+
* Obligation (plan §4.5): `<resourceId>:<contract>` requirement with
|
|
136
|
+
* policyId and relevant lifecycle (fingerprint identity inputs).
|
|
137
|
+
*/
|
|
138
|
+
export { ObligationSchema } from './schemas/obligation.js';
|
|
139
|
+
/** Inferred obligation type. */
|
|
140
|
+
export type { Obligation } from './schemas/obligation.js';
|
|
141
|
+
/**
|
|
142
|
+
* Claim (plan §4.6): a test's declared coverage of one obligation via
|
|
143
|
+
* native framework metadata. Claims are not proof.
|
|
144
|
+
*/
|
|
145
|
+
export { ClaimSchema, ObligationIdSchema } from './schemas/claim.js';
|
|
146
|
+
/** Inferred claim type. */
|
|
147
|
+
export type { Claim } from './schemas/claim.js';
|
|
148
|
+
/** Inferred `<resourceId>:<contract>` id type. */
|
|
149
|
+
export type { ObligationId } from './schemas/claim.js';
|
|
150
|
+
/**
|
|
151
|
+
* EvidenceRecord (plan §4.7, pins #7/#11): witness-issued trusted
|
|
152
|
+
* record — recordId, runId, trust tier, obligation, kind, optional
|
|
153
|
+
* bulk scope. Only `witnessed` can satisfy (GF-23).
|
|
154
|
+
*/
|
|
155
|
+
export { EvidenceRecordSchema, BulkScopeSchema, RecordOriginSchema, type RecordOrigin, } from './schemas/evidence.js';
|
|
156
|
+
/** Inferred evidence-record type. */
|
|
157
|
+
export type { EvidenceRecord } from './schemas/evidence.js';
|
|
158
|
+
/** Inferred bulk-scope type (pin #11). */
|
|
159
|
+
export type { BulkScope } from './schemas/evidence.js';
|
|
160
|
+
/**
|
|
161
|
+
* Waiver (ADR 0001): ALL FIVE mandatory fields — owner,
|
|
162
|
+
* justificationUrl, approver, exact scope (resourceId + fingerprint),
|
|
163
|
+
* expiresAt. Missing any = config error. Expiry ⇒ `invalid`, not
|
|
164
|
+
* `waived`.
|
|
165
|
+
*/
|
|
166
|
+
export { WaiverSchema, WaiverScopeSchema } from './schemas/waiver.js';
|
|
167
|
+
/** Inferred waiver type. */
|
|
168
|
+
export type { Waiver } from './schemas/waiver.js';
|
|
169
|
+
/** Inferred waiver-scope type. */
|
|
170
|
+
export type { WaiverScope } from './schemas/waiver.js';
|
|
171
|
+
/**
|
|
172
|
+
* Baseline (pin #3): `.gateforge/baselines/obligations.json` —
|
|
173
|
+
* `{schemaVersion, fingerprints}` with a sorted, duplicate-free list.
|
|
174
|
+
*/
|
|
175
|
+
export { BaselineSchema, FingerprintHexSchema } from './schemas/baseline.js';
|
|
176
|
+
/** Inferred baseline-document type. */
|
|
177
|
+
export type { Baseline } from './schemas/baseline.js';
|
|
178
|
+
/** Inferred fingerprint-hex string type. */
|
|
179
|
+
export type { FingerprintHex } from './schemas/baseline.js';
|
|
180
|
+
/**
|
|
181
|
+
* RunManifest (pin #4): runId, injected-clock startedAt, gitSha (or
|
|
182
|
+
* null), provider, plugin set, attestationScope. Every verdict and
|
|
183
|
+
* witnessed record references its run.
|
|
184
|
+
*/
|
|
185
|
+
export { RunManifestSchema, ChangedProviderSchema, AttestationSchema } from './schemas/run-manifest.js';
|
|
186
|
+
/** Inferred run-manifest type. */
|
|
187
|
+
export type { RunManifest, Attestation } from './schemas/run-manifest.js';
|
|
188
|
+
/** Inferred changed-provider type. */
|
|
189
|
+
export type { ChangedProvider } from './schemas/run-manifest.js';
|
|
190
|
+
/**
|
|
191
|
+
* Verdict (ADR 0001): the seven verdicts — satisfied, missing, invalid,
|
|
192
|
+
* unclassified, unresolved, waived, stale. Blocking verdicts are all
|
|
193
|
+
* except `satisfied` and `waived`.
|
|
194
|
+
*/
|
|
195
|
+
export { VerdictSchema } from './schemas/verdict.js';
|
|
196
|
+
/** Inferred verdict union type. */
|
|
197
|
+
export type { Verdict } from './schemas/verdict.js';
|
|
198
|
+
/**
|
|
199
|
+
* CauseCode (plan 2026-09-13 §5.4, ADR 0005): stable blocking-obligation
|
|
200
|
+
* cause codes plus the three advisory `DIAGNOSTIC_*` result causes. The
|
|
201
|
+
* seven verdict VALUES are unchanged; causes enrich the shared report
|
|
202
|
+
* model (text, JSON, and SARIF all carry them).
|
|
203
|
+
*/
|
|
204
|
+
export { CauseCodeSchema, CAUSE_NEXT_ACTIONS } from './schemas/verdict.js';
|
|
205
|
+
/** Inferred cause-code union type. */
|
|
206
|
+
export type { CauseCode } from './schemas/verdict.js';
|
|
207
|
+
/**
|
|
208
|
+
* CoveragePolicy (plan 2026-09-13 §3.6, ADR 0005 D5): the tracked,
|
|
209
|
+
* owner-owned `coveragePolicy` config section — user-facing tables,
|
|
210
|
+
* required real-UI operations, and owner dispositions. Absent/empty =
|
|
211
|
+
* feature off (opt-in); agent edits never self-approve a disposition.
|
|
212
|
+
*/
|
|
213
|
+
export { COVERAGE_OPERATIONS, CoverageOperationSchema, CoveragePolicySchema, CoverageTableSchema, CoverageDispositionSchema, } from './schemas/coverage-policy.js';
|
|
214
|
+
/** Inferred coverage-policy types. */
|
|
215
|
+
export type { CoverageOperation, CoveragePolicy, CoverageTable, CoverageDisposition, } from './schemas/coverage-policy.js';
|
|
216
|
+
/**
|
|
217
|
+
* UnresolvedReason (pin #5): `{code, detail, location{file,line,col}}` —
|
|
218
|
+
* single-cause, machine-readable, no stack dumps.
|
|
219
|
+
*/
|
|
220
|
+
export { UnresolvedReasonSchema } from './schemas/verdict.js';
|
|
221
|
+
/** Inferred unresolved-reason type. */
|
|
222
|
+
export type { UnresolvedReason } from './schemas/verdict.js';
|
|
223
|
+
/**
|
|
224
|
+
* TestCatalog (plan 2026-09-13 §5.1 row 1 + §5.2): the derived inventory
|
|
225
|
+
* of a repository's existing tests. Logical keys are the stable mapping
|
|
226
|
+
* identity (line numbers are diagnostics); duplicate keys are a typed
|
|
227
|
+
* parse error listing both sources; unresolved rows are first-class data
|
|
228
|
+
* so a failed scan is never misread as "no tests".
|
|
229
|
+
*/
|
|
230
|
+
export { SUPPORTED_TEST_RUNNERS, TestRunnerSchema, TestKindSchema, DiscoveryStatusSchema, ReconciliationStatusSchema, RuleEvidenceSchema, KindSignalSchema, WeakSignalSchema, CategorySignalSchema, SuppressionSignalKindSchema, SuppressionSignalSchema, TestCatalogEntrySchema, CatalogParseErrorSchema, RunnerSummarySchema, TestCatalogSchema, deriveLogicalKey, } from './schemas/test-catalog.js';
|
|
231
|
+
/** Inferred test-catalog types. */
|
|
232
|
+
export type { TestRunner, TestKind, DiscoveryStatus, ReconciliationStatus, RuleEvidence, KindSignal, WeakSignal, CategorySignal, SuppressionSignalKind, SuppressionSignal, TestCatalogEntry, CatalogParseError, RunnerSummary, TestCatalog, CatalogUnresolved, } from './schemas/test-catalog.js';
|
|
233
|
+
/**
|
|
234
|
+
* Runner-adapter contract (plan 2026-09-13 phase 2 item 6): the small
|
|
235
|
+
* interface every test-runner adapter implements. Types only — adapters
|
|
236
|
+
* live in their packs; capabilities are declared, never implied.
|
|
237
|
+
*/
|
|
238
|
+
export type { RunnerCapability, RunnerCapabilities, RunnerTestInstance, RunnerSelection, RunnerExecutionEnv, RunnerInstanceOutcome, RunnerExecutionEnvelope, TestRunnerAdapter, } from './schemas/runner-adapter.js';
|
|
239
|
+
/**
|
|
240
|
+
* PluginRegistration: pinned plugin identity `{id, version, transport}`
|
|
241
|
+
* shared by run manifests (pin #4) and the GPP/3 handshake (pin #5).
|
|
242
|
+
*/
|
|
243
|
+
export { PluginRegistrationSchema } from './schemas/plugin.js';
|
|
244
|
+
/** Inferred plugin-registration type. */
|
|
245
|
+
export type { PluginRegistration } from './schemas/plugin.js';
|
|
246
|
+
/**
|
|
247
|
+
* Obligation fingerprint (pin #2):
|
|
248
|
+
* `sha256(canonical({resourceId, contract, policyId, lifecycle}))`.
|
|
249
|
+
* Key-order independent; this is the identity baselines store.
|
|
250
|
+
*/
|
|
251
|
+
export { fingerprint, FingerprintInputSchema } from './fingerprints.js';
|
|
252
|
+
/** Blocking-entry fingerprint (phase 8 C): baseline identity for gate red
|
|
253
|
+
* that is not an obligation (findings, unclassified, stale references). */
|
|
254
|
+
export { blockingEntryFingerprint } from './fingerprints.js';
|
|
255
|
+
/** Inferred fingerprint-input type. */
|
|
256
|
+
export type { FingerprintInput } from './fingerprints.js';
|
|
257
|
+
/**
|
|
258
|
+
* `.gateforge.yml` document schema (pin #6): project paths, plugins,
|
|
259
|
+
* policies/classifications/adapters/waivers/baselines paths, changed
|
|
260
|
+
* provider, witness bounds, clock mode, optional enforcement modes, and
|
|
261
|
+
* optional coverage policy. Unknown keys and unknown schemaVersion are
|
|
262
|
+
* rejected.
|
|
263
|
+
*/
|
|
264
|
+
export { GateforgeConfigSchema, ConfigPluginSchema, EnforcementConfigSchema } from './config/index.js';
|
|
265
|
+
/** Inferred `.gateforge.yml` type. */
|
|
266
|
+
export type { GateforgeConfig } from './config/index.js';
|
|
267
|
+
/** Inferred config-plugin-entry type. */
|
|
268
|
+
export type { ConfigPlugin } from './config/index.js';
|
|
269
|
+
/** Inferred enforcement-section type (mode + strictE2E; off by default). */
|
|
270
|
+
export type { EnforcementConfig } from './config/index.js';
|
|
271
|
+
/**
|
|
272
|
+
* Diagnostics config (plan 2026-09-13 §3.5): explicitly registered
|
|
273
|
+
* diagnostic suites (pytest today). Absent = feature off; gateforge
|
|
274
|
+
* never scans for or launches unregistered suites.
|
|
275
|
+
*/
|
|
276
|
+
export { DiagnosticsConfigSchema, DiagnosticSuiteSchema } from './config/index.js';
|
|
277
|
+
/** Inferred diagnostics-section type. */
|
|
278
|
+
export type { DiagnosticsConfig, DiagnosticSuite } from './config/index.js';
|
|
279
|
+
/** One actionable config diagnostic (file, jsonPath, expected vs got). */
|
|
280
|
+
export type { ConfigDiagnostic } from './config/index.js';
|
|
281
|
+
/** Error for any fail-closed config problem; carries `.diagnostics`. */
|
|
282
|
+
export { GateforgeConfigError } from './config/index.js';
|
|
283
|
+
/**
|
|
284
|
+
* Validates an already-parsed config document; throws
|
|
285
|
+
* {@link GateforgeConfigError} with actionable diagnostics on failure.
|
|
286
|
+
*/
|
|
287
|
+
export { parseConfig } from './config/index.js';
|
|
288
|
+
/**
|
|
289
|
+
* Loads and validates `.gateforge.yml` from disk (default
|
|
290
|
+
* `.gateforge.yml` in cwd); fail-closed on missing/unparsable/invalid.
|
|
291
|
+
*/
|
|
292
|
+
export { loadConfig } from './config/index.js';
|
|
293
|
+
/**
|
|
294
|
+
* Diagnostics helpers: `diagnosticsFromZodError` converts zod issues,
|
|
295
|
+
* `jsonPathFor` renders JSON paths, `formatDiagnostics` renders the
|
|
296
|
+
* human-readable multi-line listing used in error messages.
|
|
297
|
+
*/
|
|
298
|
+
export { diagnosticsFromZodError, jsonPathFor, formatDiagnostics } from './config/index.js';
|
|
299
|
+
/**
|
|
300
|
+
* Detector finding (discovery-spike lineage, e.g.
|
|
301
|
+
* `DUPLICATE_TABLE_NAME`): a non-resource observation about scanned
|
|
302
|
+
* sources. Canonical home of the shape; the plugin protocol carries a
|
|
303
|
+
* wire-compatible copy.
|
|
304
|
+
*/
|
|
305
|
+
export { FindingSchema } from './graph/index.js';
|
|
306
|
+
/** Inferred finding type. */
|
|
307
|
+
export type { Finding } from './graph/index.js';
|
|
308
|
+
/**
|
|
309
|
+
* Finding with detector provenance: graph-issued findings carry
|
|
310
|
+
* detectorId `gateforge.graph`.
|
|
311
|
+
*/
|
|
312
|
+
export { GraphFindingSchema } from './graph/index.js';
|
|
313
|
+
/** Inferred graph-finding type. */
|
|
314
|
+
export type { GraphFinding } from './graph/index.js';
|
|
315
|
+
/**
|
|
316
|
+
* One detector's contribution: pinned identity (pluginId + version)
|
|
317
|
+
* plus the pinned discovery shape (`resources`, `unresolved`,
|
|
318
|
+
* `findings`).
|
|
319
|
+
*/
|
|
320
|
+
export { DetectorOutputSchema } from './graph/index.js';
|
|
321
|
+
/** Inferred detector-contribution type. */
|
|
322
|
+
export type { DetectorOutput } from './graph/index.js';
|
|
323
|
+
/** Reserved resource `kind` for symbol-table class declarations. */
|
|
324
|
+
export { CLASS_SYMBOL_KIND, EVIDENCE_ONLY_RESOURCE_KINDS, HTTP_ENDPOINT_RESOURCE_KIND, isEvidenceOnlyKind } from './graph/index.js';
|
|
325
|
+
/** Attribute payload of a class-symbol resource. */
|
|
326
|
+
export { ClassSymbolAttributesSchema } from './graph/index.js';
|
|
327
|
+
/** Inferred class-symbol attribute type. */
|
|
328
|
+
export type { ClassSymbolAttributes } from './graph/index.js';
|
|
329
|
+
/** Canonical detector attribute carrying a resource's identity name. */
|
|
330
|
+
export { RESOURCE_NAME_ATTRIBUTE } from './graph/index.js';
|
|
331
|
+
/**
|
|
332
|
+
* Normalized graph resource: plane-qualified `plane.name` id (D5.3),
|
|
333
|
+
* repo-root-relative source, bound classification (or `null` while
|
|
334
|
+
* unclassified), and detector provenance.
|
|
335
|
+
*/
|
|
336
|
+
export { GraphResourceSchema } from './graph/index.js';
|
|
337
|
+
/** Inferred normalized-resource type. */
|
|
338
|
+
export type { GraphResource } from './graph/index.js';
|
|
339
|
+
/** Gate-visible unresolved entry with detector provenance. */
|
|
340
|
+
export { GraphUnresolvedSchema } from './graph/index.js';
|
|
341
|
+
/** Inferred graph-unresolved type. */
|
|
342
|
+
export type { GraphUnresolved } from './graph/index.js';
|
|
343
|
+
/** A reference to a removed/renamed resource (invariant 9, GF-06). */
|
|
344
|
+
export { StaleReferenceSchema, StaleReferenceKindSchema } from './graph/index.js';
|
|
345
|
+
/** Inferred stale-reference type. */
|
|
346
|
+
export type { StaleReference } from './graph/index.js';
|
|
347
|
+
/** Inferred stale-reference-kind type. */
|
|
348
|
+
export type { StaleReferenceKind } from './graph/index.js';
|
|
349
|
+
/** Inferred resource-graph input type (detectors + watched artifacts). */
|
|
350
|
+
export type { ResourceGraphInput } from './graph/index.js';
|
|
351
|
+
/** The built resource graph: deterministic, fully sorted. */
|
|
352
|
+
export { ResourceGraphSchema } from './graph/index.js';
|
|
353
|
+
/** Inferred resource-graph type. */
|
|
354
|
+
export type { ResourceGraph } from './graph/index.js';
|
|
355
|
+
/**
|
|
356
|
+
* Builds the resource graph from detector contributions +
|
|
357
|
+
* classifications + watched claim/adapter/waiver populations. Pure:
|
|
358
|
+
* same inputs → identical graph byte-for-byte. Throws (fail closed)
|
|
359
|
+
* on an invalid classifications document.
|
|
360
|
+
*/
|
|
361
|
+
export { buildResourceGraph } from './graph/index.js';
|
|
362
|
+
/** The repo-wide class-symbol table and base-chain resolution. */
|
|
363
|
+
export { buildSymbolTable, resolveInheritedName, sortUnresolved } from './graph/index.js';
|
|
364
|
+
/** Inferred class-symbol type. */
|
|
365
|
+
export type { ClassSymbol } from './graph/index.js';
|
|
366
|
+
/** Inferred inheritance-resolution outcome type. */
|
|
367
|
+
export type { InheritanceResolution } from './graph/index.js';
|
|
368
|
+
/** Codepoint-wise deterministic comparison helpers (never localeCompare). */
|
|
369
|
+
export { compareStrings, compareLocations } from './graph/index.js';
|
|
370
|
+
/**
|
|
371
|
+
* ClassificationSignal (ADR 0003 D1): a source-located, detector-
|
|
372
|
+
* versioned FACT a detector emits about one classification dimension.
|
|
373
|
+
* Signals carry a `basis`, never a confidence score; only
|
|
374
|
+
* `code-negative-closed-world` can ever suppress, and only over a
|
|
375
|
+
* complete scan.
|
|
376
|
+
*/
|
|
377
|
+
export { ClassificationSignalSchema, signalId, SignalTargetSchema, SignalDimensionSchema, SignalBasisSchema, SignalAssertionSchema, SIGNAL_DIMENSIONS } from './schemas/classification-signal.js';
|
|
378
|
+
/** Inferred classification-signal type. */
|
|
379
|
+
export type { ClassificationSignal, SignalTarget, SignalDimension, SignalBasis, SignalAssertion } from './schemas/classification-signal.js';
|
|
380
|
+
/**
|
|
381
|
+
* ClassificationPolicy: the `classification-policy.yml` document —
|
|
382
|
+
* scan roots, trusted internal entry-point categories, organization
|
|
383
|
+
* internal rules (certificate inputs, never overrides), supported
|
|
384
|
+
* declaration syntax, and volatile fields.
|
|
385
|
+
*/
|
|
386
|
+
export { ClassificationPolicySchema, InternalEntryPointCategorySchema, InternalRuleSchema, InternalRuleMatchSchema, } from './schemas/classification-policy.js';
|
|
387
|
+
/** Inferred classification-policy type. */
|
|
388
|
+
export type { ClassificationPolicy, InternalEntryPointCategory, InternalRule, InternalRuleMatch } from './schemas/classification-policy.js';
|
|
389
|
+
/**
|
|
390
|
+
* The deterministic conservative classifier (ADR 0003 D2):
|
|
391
|
+
* `classifyResources()` resolves signals into effective classifications
|
|
392
|
+
* or typed machine-actionable blocks; uncertainty adds obligations and
|
|
393
|
+
* never removes them.
|
|
394
|
+
*/
|
|
395
|
+
export { RULES, classifyResources, ClassifierBlockSchema, ClassifierBlockCodeSchema, CLASSIFIER_BLOCK_CODES, BLOCK_DIMENSIONS, ClassifierContradictionSchema, ClassificationDecisionTraceSchema, EffectiveClassificationSchema, compileGlob, globMatch, pathInScope, classifierBlocking, resourceRef, runClassification, } from './classifier/index.js';
|
|
396
|
+
/** Inferred classifier types. */
|
|
397
|
+
export type { ClassifierResourceRef, ClassificationDecision, ClassificationResult, ClassifierScanInput, ClassifyResourcesInput, ClassifierBlock, ClassifierBlockCode, ClassifierContradiction, ClassificationDecisionTrace, EffectiveClassification, } from './classifier/index.js';
|
|
398
|
+
/** The lifecycle-gated CRUD contract namespace (`crud:create`, …). */
|
|
399
|
+
export { CRUD_CONTRACT_PREFIX } from './policy/index.js';
|
|
400
|
+
/**
|
|
401
|
+
* Why a resource currently generates no obligations: `unclassified` or
|
|
402
|
+
* `unresolved` — gate-visible blocking entries (invariants 1, 8).
|
|
403
|
+
*/
|
|
404
|
+
export { BlockingEntrySchema } from './policy/index.js';
|
|
405
|
+
/** Inferred blocking-entry type. */
|
|
406
|
+
export type { BlockingEntry } from './policy/index.js';
|
|
407
|
+
/**
|
|
408
|
+
* The adopted identity of a classification-blocked resource (two-layer
|
|
409
|
+
* adoption) — the canonical string `adopt` records and `check` matches.
|
|
410
|
+
*/
|
|
411
|
+
export { classificationBlockedIdentity } from './policy/index.js';
|
|
412
|
+
/** Assessment of one claim against the generated obligations. */
|
|
413
|
+
export { ClaimAssessmentSchema } from './policy/index.js';
|
|
414
|
+
/** Inferred claim-assessment type. */
|
|
415
|
+
export type { ClaimAssessment } from './policy/index.js';
|
|
416
|
+
/** The complete policy-engine result: obligations + blocking + claims. */
|
|
417
|
+
export { PolicyEvaluationResultSchema } from './policy/index.js';
|
|
418
|
+
/** Inferred policy-evaluation-result type. */
|
|
419
|
+
export type { PolicyEvaluationResult } from './policy/index.js';
|
|
420
|
+
/** Fail-closed policy-engine error (invalid policy document / contract). */
|
|
421
|
+
export { PolicyEvaluationError } from './policy/index.js';
|
|
422
|
+
/**
|
|
423
|
+
* Evaluates policies against a built graph: lifecycle-gated obligation
|
|
424
|
+
* generation (plan §5.2), no CRUD obligations for internal resources
|
|
425
|
+
* (ADR 0001), blocking entries for unclassified/unresolved resources,
|
|
426
|
+
* and claim assessment. Pure; deterministic.
|
|
427
|
+
*/
|
|
428
|
+
export { evaluatePolicies, lifecycleAllowsContract } from './policy/index.js';
|
|
429
|
+
/**
|
|
430
|
+
* Closed-world CRUD coverage evaluator (plan 2026-09-13 §3.6, ADR 0005
|
|
431
|
+
* D5): pure; returns typed blocking `CRUD_COVERAGE_MISSING` findings per
|
|
432
|
+
* uncovered/undispositioned required operation and CONFIG-ERROR results
|
|
433
|
+
* for policy tables absent from the caller-provided resource inventory.
|
|
434
|
+
*/
|
|
435
|
+
export { evaluateCoveragePolicy } from './policy/index.js';
|
|
436
|
+
/** Coverage-evaluator input/result types. */
|
|
437
|
+
export type { CoverageInventoryTable, MappedCoverage, CoverageConfigError, CoverageBlockingFinding, CoveragePolicyResult, } from './policy/index.js';
|
|
438
|
+
/**
|
|
439
|
+
* Protected policy ownership foundation (plan 2026-09-13 Phase 0 item 5,
|
|
440
|
+
* ADR 0005 D6): the domain-separated trusted policy/config digest for
|
|
441
|
+
* later receipt binding, plus the pure weakening check — a candidate
|
|
442
|
+
* whose policy revision differs from the trusted one is a weakening
|
|
443
|
+
* candidate until a separate trusted update is accepted. Enforcement
|
|
444
|
+
* lands in Phases 4-5.
|
|
445
|
+
*/
|
|
446
|
+
export { TRUSTED_POLICY_DOMAIN, trustedPolicyDigest, policyWeakenedCandidate } from './policy/index.js';
|
|
447
|
+
/** Trusted-policy ownership types. */
|
|
448
|
+
export type { TrustedPolicyInput, PolicyWeakeningCheck } from './policy/index.js';
|
|
449
|
+
/**
|
|
450
|
+
* Evaluates ONE obligation against claims, records, waivers,
|
|
451
|
+
* classification, and the injected clock: pure `evaluateObligation(
|
|
452
|
+
* obligation, {claims, records, waivers, classification, now})`
|
|
453
|
+
* → `{verdict, reason, recordIds}` (pin #9). `satisfied` requires
|
|
454
|
+
* complete witnessed evidence (D2, GF-23); same-entity enforcement is
|
|
455
|
+
* column-keyed for composite identity (D3); expired waivers yield
|
|
456
|
+
* `invalid` (D4).
|
|
457
|
+
*/
|
|
458
|
+
export { evaluateObligation } from './verdict/index.js';
|
|
459
|
+
/**
|
|
460
|
+
* Batch wrapper: evaluates obligations against one context and returns
|
|
461
|
+
* report-ready entries (obligation + verdict + trustTier), sorted by
|
|
462
|
+
* obligation id.
|
|
463
|
+
*/
|
|
464
|
+
export { evaluateObligations } from './verdict/index.js';
|
|
465
|
+
/** The five gate-blocking verdicts (`satisfied`/`waived` are clean). */
|
|
466
|
+
export { BLOCKING_VERDICTS } from './verdict/index.js';
|
|
467
|
+
export { registerContractVerifier, verifierFor, registeredNamespaces, type ClaimEvidenceInput, type ClaimOutcome, type ContractVerifier, type HttpRouteCandidate, } from './verdict/index.js';
|
|
468
|
+
/**
|
|
469
|
+
* Verifier capability metadata (plan 2026-09-13 Phase 0 item 3, ADR
|
|
470
|
+
* 0005): the single source of truth for what each contract namespace can
|
|
471
|
+
* honestly prove, its required observer channel, supported test kinds,
|
|
472
|
+
* and availability. First-wins/no-override, like verifier registration.
|
|
473
|
+
*/
|
|
474
|
+
export { registerContractCapabilities, capabilityFor, allCapabilities, type ContractCapability, type ContractAvailability, } from './verdict/index.js';
|
|
475
|
+
/**
|
|
476
|
+
* Cause mapping + strict preflight (plan 2026-09-13 §5.4 / Phase 0 item
|
|
477
|
+
* 4): derives stable cause codes and next actions for blocking verdicts,
|
|
478
|
+
* and computes the precise capability gaps a strict setup fails closed
|
|
479
|
+
* on (VERIFIER_UNSUPPORTED).
|
|
480
|
+
*/
|
|
481
|
+
export { causeForVerdict, capabilityGap, strictCapabilityGaps, type VerdictCause, type CapabilityGap, } from './verdict/index.js';
|
|
482
|
+
/**
|
|
483
|
+
* Deterministic runtime route attribution (plan §9, D2): the single
|
|
484
|
+
* path interpretation plus the complete-inventory resolver the HTTP
|
|
485
|
+
* transport verifier grades against. No literal-precedence shortcut;
|
|
486
|
+
* ambiguity blocks.
|
|
487
|
+
*/
|
|
488
|
+
export { interpretObservedPath, resolveHttpRoute, pathMatchesShape } from './verdict/index.js';
|
|
489
|
+
/** Fail-closed verdict-engine error (malformed obligation / clock). */
|
|
490
|
+
export { GateforgeVerdictError } from './verdict/index.js';
|
|
491
|
+
/** Normalizes the injected clock (`Date | string`) to a `Date`. */
|
|
492
|
+
export { parseInstant } from './verdict/index.js';
|
|
493
|
+
/** The pinned pin-#9 result shape: `{verdict, reason, recordIds}`. */
|
|
494
|
+
export type { VerdictOutcome } from './verdict/index.js';
|
|
495
|
+
/** Report-ready per-obligation verdict (adds obligation + trustTier). */
|
|
496
|
+
export type { ObligationVerdict } from './verdict/index.js';
|
|
497
|
+
/** The pin-#9 evaluation context. */
|
|
498
|
+
export type { VerdictContext } from './verdict/index.js';
|
|
499
|
+
/** A waiver plus the engine-only `ownerStale` flag (GF-17). */
|
|
500
|
+
export type { WaiverRef } from './verdict/index.js';
|
|
501
|
+
/**
|
|
502
|
+
* TestMap (plan 2026-09-13 §5.3): the versioned `.gateforge/test-map.yml`
|
|
503
|
+
* sidecar an agent (or `tests mark`) writes to connect an EXISTING test
|
|
504
|
+
* to obligations without rewriting a test body. Claims non-empty, kind a
|
|
505
|
+
* supported TestKind, reason required, duplicate keys rejected naming
|
|
506
|
+
* both entries; `'*'` wildcards never parse (not obligation ids).
|
|
507
|
+
*/
|
|
508
|
+
export { TestMapSchema, TestMapEntrySchema, TestSelectorSchema } from './schemas/test-map.js';
|
|
509
|
+
/** Inferred test-map types. */
|
|
510
|
+
export type { TestMap, TestMapEntry, TestSelector } from './schemas/test-map.js';
|
|
511
|
+
/**
|
|
512
|
+
* The ONE mapping resolver (plan §5.3, Phase 3): normalizes native
|
|
513
|
+
* claims, sidecar declarations, prior-run hints, and inference into one
|
|
514
|
+
* resolved surface. Deterministic; contradictions/staleness become typed
|
|
515
|
+
* problems naming both locations; inference never auto-writes a mapping;
|
|
516
|
+
* projections into grading claims carry intent only — no evidence — so a
|
|
517
|
+
* mapped-but-unexecuted obligation still blocks.
|
|
518
|
+
*/
|
|
519
|
+
export { resolveTestMappings, mappingSuggestions, mappingGradingClaims, } from './mapping/resolve.js';
|
|
520
|
+
/** Inferred mapping-resolver types. */
|
|
521
|
+
export type { ResolveMappingsInput, ResolvedMappings, ObligationBindings, ResolvedClaimBinding, MappingProblem, MappingProblemCause, MappingOrigin, TestInstanceRef, PriorRunHint, MappingSuggestionsInput, MappingSuggestion, MappingSuggestionCause, SuggestionCandidate, } from './mapping/resolve.js';
|
|
522
|
+
/**
|
|
523
|
+
* Execution result (plan 2026-09-13 §5.1, ADR 0005 D2, Phase 4): the
|
|
524
|
+
* trusted supervisor's sealed run record — planned versus executed
|
|
525
|
+
* instances, outcomes/attempts, runner exit, fixture/teardown outcome,
|
|
526
|
+
* shard completeness, selection + catalog digests, engines, and
|
|
527
|
+
* environment identity — plus the domain-separated selection digest.
|
|
528
|
+
* Reporter data is input here, never signature authority.
|
|
529
|
+
*/
|
|
530
|
+
export { EXECUTION_RESULT_DOMAIN, SELECTION_DOMAIN, ExecutionResultSchema, PlannedInstanceSchema, ExecutedOutcomeSchema, InstanceStatusSchema, SupervisionFindingSchema, TracedSessionSchema, TracedTestSchema, executionResultDigestOf, selectionDigestOf, } from './schemas/execution-result.js';
|
|
531
|
+
/** Inferred execution-result types. */
|
|
532
|
+
export type { ExecutionResult, PlannedInstance, ExecutedOutcome, InstanceStatus, SupervisionFinding, TracedSession, TracedTest, } from './schemas/execution-result.js';
|
|
533
|
+
/**
|
|
534
|
+
* Gate receipt (plan 2026-09-13 §5.1, ADR 0005 D3, Phase 4): the NEW
|
|
535
|
+
* versioned, domain-separated envelope issued only after complete run
|
|
536
|
+
* success and evidence grading. Signed by the same authority as witness
|
|
537
|
+
* records (the verifier key, HMAC over GF-canonical JSON, domain
|
|
538
|
+
* `gateforge.receipt.v1`) — never a repurposed v2 attestation.
|
|
539
|
+
*/
|
|
540
|
+
export { RECEIPT_DOMAIN, RECEIPT_VERSION, gateReceiptMac, verifyGateReceipt, } from './receipt/index.js';
|
|
541
|
+
/** Receipt types. */
|
|
542
|
+
export type { GateReceipt } from './schemas/gate-receipt.js';
|
|
543
|
+
export type { GateReceiptBody } from './receipt/index.js';
|
|
544
|
+
export { GateReceiptSchema, ReceiptVerdictSummarySchema, ReceiptScopeSchema } from './schemas/gate-receipt.js';
|
|
545
|
+
export type { ReceiptVerdictSummary, ReceiptScope } from './schemas/gate-receipt.js';
|
|
546
|
+
export type { ReceiptRejection, ReceiptVerification } from './receipt/index.js';
|
|
547
|
+
/**
|
|
548
|
+
* Trusted runner supervision (plan Phase 4 item 4, ADR 0005 D2): the
|
|
549
|
+
* pure expected-set enforcement — planned versus executed instances,
|
|
550
|
+
* retries, skips/only/fixme, expected failures, teardown errors, shards,
|
|
551
|
+
* and runner exit, each a typed §5.4 run cause. Any finding fails the
|
|
552
|
+
* whole run; there is no selective pass out of a failed required suite.
|
|
553
|
+
*/
|
|
554
|
+
export { superviseExecution, enumerationDigestOf, ENUMERATION_DOMAIN } from './supervision/index.js';
|
|
555
|
+
/** Supervision types. */
|
|
556
|
+
export type { PlannedInstanceInput, ExecutedOutcomeInput, SupervisionEnvelopeInput, SupervisionFinding as SupervisionFindingInput, SupervisionResult, TracedSession as TracedSessionInput, TracedTest as TracedTestInput, ExpectedTestInput, } from './supervision/index.js';
|
|
557
|
+
/**
|
|
558
|
+
* Loads and validates every `*.json` waiver file in a directory against
|
|
559
|
+
* the injected clock: all five fields mandatory (GF-15), expiry judged
|
|
560
|
+
* by `now` (GF-16), optional stale-owner hook (GF-17). Synchronous.
|
|
561
|
+
*/
|
|
562
|
+
export { loadWaivers } from './waivers/index.js';
|
|
563
|
+
/**
|
|
564
|
+
* Waiver writers (the `waive` CLI's storage path): `serializeWaiver`
|
|
565
|
+
* renders the reviewable 2-space-JSON + trailing-newline house style,
|
|
566
|
+
* `writeWaiver` writes it creating parent directories as needed.
|
|
567
|
+
* The only sanctioned programmatic waiver write — renewal/removal stays
|
|
568
|
+
* a hand-edit (there is deliberately no overwrite).
|
|
569
|
+
*/
|
|
570
|
+
export { serializeWaiver, writeWaiver } from './waivers/index.js';
|
|
571
|
+
/** Fail-closed waiver-configuration error; carries every problem found. */
|
|
572
|
+
export { GateforgeWaiverError } from './waivers/index.js';
|
|
573
|
+
/** One file-scoped waiver-loading problem. */
|
|
574
|
+
export type { WaiverProblem } from './waivers/index.js';
|
|
575
|
+
/** Loader result partitions: valid / stale-owner / expired. */
|
|
576
|
+
export type { WaiverLoadResult, WaiverLoadOptions } from './waivers/index.js';
|
|
577
|
+
/** Loads and validates `.gateforge/baselines/obligations.json` (pin #3). */
|
|
578
|
+
export { loadBaseline } from './baselines/index.js';
|
|
579
|
+
/**
|
|
580
|
+
* Whether a baseline update is a strict subset (invariant 4): only
|
|
581
|
+
* removals allowed — `[A, B] → [A, NEW]` fails (GF-07), `[A, B] → [A]`
|
|
582
|
+
* passes (GF-08).
|
|
583
|
+
*/
|
|
584
|
+
export { canUpdate } from './baselines/index.js';
|
|
585
|
+
/** Builds the next baseline, enforcing the strict-subset rule. */
|
|
586
|
+
export { updateBaseline } from './baselines/index.js';
|
|
587
|
+
/** Serializes a baseline to reviewable 2-space JSON with newline. */
|
|
588
|
+
export { serializeBaseline } from './baselines/index.js';
|
|
589
|
+
/** Writes a baseline, creating parent directories as needed. */
|
|
590
|
+
export { writeBaseline } from './baselines/index.js';
|
|
591
|
+
/** Fail-closed baseline error (load, validation, or update rejection). */
|
|
592
|
+
export { GateforgeBaselineError } from './baselines/index.js';
|
|
593
|
+
/**
|
|
594
|
+
* THE ONE SANCTIONED BULK-ADD (phase 8 workstream C): builds the
|
|
595
|
+
* adoption baseline without the subset check — `gateforge adopt` is the
|
|
596
|
+
* only caller; `updateBaseline` stays shrink-only (GF-07/08 unchanged).
|
|
597
|
+
*/
|
|
598
|
+
export { adoptBaseline } from './baselines/index.js';
|
|
599
|
+
/** The adoption record (phase 8 C): the loud, one-time bulk-add receipt. */
|
|
600
|
+
export { AdoptionRecordSchema, ClassificationBlockedIdsSchema } from './schemas/adoption.js';
|
|
601
|
+
/** Inferred adoption-record type. */
|
|
602
|
+
export type { AdoptionRecord } from './schemas/adoption.js';
|
|
603
|
+
/** Loads `.gateforge/baselines/adoption.json` (null = pre-adoption). */
|
|
604
|
+
export { loadAdoptionRecord, ADOPTION_RECORD_FILENAME } from './baselines/adoption.js';
|
|
605
|
+
/** Writes the adoption record, creating parent directories as needed. */
|
|
606
|
+
export { writeAdoptionRecord } from './baselines/adoption.js';
|
|
607
|
+
/**
|
|
608
|
+
* The classification layer of the adoption (two-layer adoption):
|
|
609
|
+
* `adoptClassificationBlocked` normalizes the captured ids for the
|
|
610
|
+
* receipt; `shrinkClassificationBlocked` is the set's ONLY post-adoption
|
|
611
|
+
* mutation — strict-subset, shrink-only (GF-07/08 mirrored).
|
|
612
|
+
*/
|
|
613
|
+
export { adoptClassificationBlocked, shrinkClassificationBlocked } from './baselines/adoption.js';
|
|
614
|
+
/**
|
|
615
|
+
* Renders per-obligation verdicts: `json` (GF-canonical JSON),
|
|
616
|
+
* `sarif` (SARIF 2.1.0 projection, pin #10), or `text` (the
|
|
617
|
+
* invariant-8 detector → policy → obligation → evidence-gap trace plus
|
|
618
|
+
* waiver counts). Deterministic; identical inputs serialize identically.
|
|
619
|
+
*/
|
|
620
|
+
export { renderRun } from './report/index.js';
|
|
621
|
+
/** Exit codes (contract 4): 0 clean/waived, 1 unresolved, 2 config. */
|
|
622
|
+
export { runExitCode } from './report/index.js';
|
|
623
|
+
/** The run exit-code union. */
|
|
624
|
+
export type { RunExitCode } from './report/index.js';
|
|
625
|
+
/** Waiver-population counts for report summaries. */
|
|
626
|
+
export type { WaiverCounts } from './report/index.js';
|
|
627
|
+
/** Options for renderRun (format, blocking entries, counts, manifest). */
|
|
628
|
+
export type { RenderRunOptions } from './report/index.js';
|
|
629
|
+
/** Effective evaluation scope carried by run reports (plan §12.4). */
|
|
630
|
+
export type { ScopeMetadata } from './report/index.js';
|
|
631
|
+
/**
|
|
632
|
+
* Temporary git repository under the OS tmpdir with pinned
|
|
633
|
+
* author/committer identity and dates: identical file-tree specs yield
|
|
634
|
+
* identical commit SHAs. `withTempRepo` wraps a fixture body with
|
|
635
|
+
* guaranteed cleanup.
|
|
636
|
+
*/
|
|
637
|
+
export { FIXED_GIT_DATE, TempRepo, withTempRepo } from './testing/index.js';
|
|
638
|
+
/** Inferred git-invocation result type. */
|
|
639
|
+
export type { GitResult, TempRepoOptions } from './testing/index.js';
|
|
640
|
+
/**
|
|
641
|
+
* Injected clocks: `{fixedAt}` constant, `{sequence}` ordered instants
|
|
642
|
+
* (exhaustion throws — no silent repetition), or `{startAt, stepMs}`
|
|
643
|
+
* stepping. `now()` always returns canonical ISO-8601.
|
|
644
|
+
*/
|
|
645
|
+
export { makeClock, toIso } from './testing/index.js';
|
|
646
|
+
/** Inferred clock types. */
|
|
647
|
+
export type { ClockSpec, TestClock } from './testing/index.js';
|
|
648
|
+
/**
|
|
649
|
+
* Injected environment (`withEnv`) and changed-file provider stubs:
|
|
650
|
+
* `fakeProvider` impersonates any provider identity from an explicit
|
|
651
|
+
* list; `localStagedProvider` reads a temp repo's real index — the two
|
|
652
|
+
* halves of GF-09 parity.
|
|
653
|
+
*/
|
|
654
|
+
export { fakeProvider, localStagedProvider, normalizeChangedFiles, withEnv, } from './testing/index.js';
|
|
655
|
+
/** Inferred changed-file-provider type. */
|
|
656
|
+
export type { ChangedFileProvider } from './testing/index.js';
|
|
657
|
+
/**
|
|
658
|
+
* The GF-19 rule: malformed source ⇒ guaranteed `PARSE_ERROR` finding
|
|
659
|
+
* with a line number, no crash, no silent resources. `stubDetector` is
|
|
660
|
+
* the in-process toy-parser detector fixtures use; G5 reuses the rule
|
|
661
|
+
* with its real detector audit.
|
|
662
|
+
*/
|
|
663
|
+
export { PARSE_ERROR_FINDING, applyParseErrorRule, hasParseErrors, stubDetector, } from './testing/index.js';
|
|
664
|
+
/** Inferred parse-audit and rule types. */
|
|
665
|
+
export type { ParseAudit, ParseAuditEntry, ParseErrorRuleInput, ParseErrorRuleResult, StubDetectorOptions, StubDetectorResult, } from './testing/index.js';
|
|
666
|
+
/**
|
|
667
|
+
* Gate-runner helper: discover → obligations → evaluate over a temp repo
|
|
668
|
+
* with injected clock/env/provider and a pin-#9 evaluator (fixtures use
|
|
669
|
+
* a local double; the real verdict engine conforms structurally).
|
|
670
|
+
*/
|
|
671
|
+
export { runGates } from './testing/index.js';
|
|
672
|
+
/** Inferred gate-runner types. */
|
|
673
|
+
export type { DetectorContribution, EvaluatorVerdict, GateRunResult, ObligationEvaluator, ObligationEvaluatorInput, GateRunVerdict, RunGatesInput, } from './testing/index.js';
|
|
674
|
+
/**
|
|
675
|
+
* RED-PROBE discipline: run the same guard against correct and
|
|
676
|
+
* deliberately-broken behavior; a broken probe that passes is a fake
|
|
677
|
+
* green and fails loudly. Suite-level proof spawns vitest twice
|
|
678
|
+
* (`spawnVitest` + `writeProbeSuite`); see docs/testing/RED_PROBE.md.
|
|
679
|
+
*/
|
|
680
|
+
export { RedProbeFailure, RedProbeSuiteError, cleanupProbeSuite, formatProbeRecords, runRedProbe, runRedProbes, spawnVitest, writeProbeRecords, writeProbeSuite, } from './testing/index.js';
|
|
681
|
+
/** Inferred red-probe types. */
|
|
682
|
+
export type { RedProbe, RedProbeRecord, VitestRunOptions, VitestRunResult, } from './testing/index.js';
|
|
683
|
+
//# sourceMappingURL=index.d.ts.map
|