@tiangong-lca/tidas-sdk 0.2.1 → 0.3.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.
Files changed (25) hide show
  1. package/README.md +24 -11
  2. package/dist/contracts/public-rules-assets/public-rules.source.v1.json +9 -0
  3. package/dist/contracts/public-rules-assets/public-rules.v1.json +97 -0
  4. package/dist/contracts/public-rules-assets/public-rules.v1.schema.json +56 -0
  5. package/dist/contracts/tidas-contract.d.ts +59 -5
  6. package/dist/contracts/tidas-contract.d.ts.map +1 -1
  7. package/dist/contracts/tidas-contract.js +70 -41
  8. package/dist/contracts/tidas-contract.js.map +1 -1
  9. package/dist/data/bundled-methodologies.json +6 -5
  10. package/dist/runtime-assets/asset-lock.v1.json +9 -13
  11. package/dist/runtime-assets/tidas/methodologies/tidas_processes.yaml +5 -4
  12. package/dist/runtime-assets/tidas/schema.lock.json +19 -19
  13. package/dist/runtime-assets/tidas/schemas/tidas_lciamethods.json +1 -2
  14. package/dist/runtime-assets/tidas/schemas/tidas_processes.json +1 -2
  15. package/dist/runtime-assets/tidas/schemas_zh/tidas_lciamethods.json +1 -2
  16. package/dist/runtime-assets/tidas/schemas_zh/tidas_processes.json +1 -2
  17. package/dist/schemas/tidas_lciamethods.schema.d.ts.map +1 -1
  18. package/dist/schemas/tidas_lciamethods.schema.js +0 -1
  19. package/dist/schemas/tidas_lciamethods.schema.js.map +1 -1
  20. package/dist/schemas/tidas_processes.schema.d.ts.map +1 -1
  21. package/dist/schemas/tidas_processes.schema.js +0 -1
  22. package/dist/schemas/tidas_processes.schema.js.map +1 -1
  23. package/package.json +3 -1
  24. package/dist/runtime-assets/tidas/methodologies/runtime_rulesets.json +0 -378
  25. package/dist/runtime-assets/tidas/methodologies/runtime_rulesets.schema.json +0 -90
package/README.md CHANGED
@@ -17,21 +17,34 @@ pnpm add @tiangong-lca/tidas-sdk
17
17
 
18
18
  ## Public entry points
19
19
 
20
- | Entry point | Purpose |
21
- | --- | --- |
22
- | `@tiangong-lca/tidas-sdk` | Combined public API |
23
- | `@tiangong-lca/tidas-sdk/core` | Entity classes and current factory functions |
24
- | `@tiangong-lca/tidas-sdk/types` | Generated TIDAS TypeScript types |
25
- | `@tiangong-lca/tidas-sdk/schemas` | Generated Zod schemas and validation helpers |
26
- | `@tiangong-lca/tidas-sdk/contracts` | TIDAS context and methodology contracts |
27
- | `@tiangong-lca/tidas-sdk/parity` | Package-directory JSON Schema validation |
28
- | `@tiangong-lca/tidas-sdk/xml` | XML parsing and serialization |
29
- | `@tiangong-lca/tidas-sdk/tools` | Directory conversion and runtime assets |
30
- | `@tiangong-lca/tidas-sdk/utils` | General SDK utilities |
20
+ | Entry point | Purpose |
21
+ | ----------------------------------- | -------------------------------------------- |
22
+ | `@tiangong-lca/tidas-sdk` | Combined public API |
23
+ | `@tiangong-lca/tidas-sdk/core` | Entity classes and current factory functions |
24
+ | `@tiangong-lca/tidas-sdk/types` | Generated TIDAS TypeScript types |
25
+ | `@tiangong-lca/tidas-sdk/schemas` | Generated Zod schemas and validation helpers |
26
+ | `@tiangong-lca/tidas-sdk/contracts` | TIDAS context and methodology contracts |
27
+ | `@tiangong-lca/tidas-sdk/parity` | Package-directory JSON Schema validation |
28
+ | `@tiangong-lca/tidas-sdk/xml` | XML parsing and serialization |
29
+ | `@tiangong-lca/tidas-sdk/tools` | Directory conversion and runtime assets |
30
+ | `@tiangong-lca/tidas-sdk/utils` | General SDK utilities |
31
31
 
32
32
  Every entry point is exercised through CJS, ESM, and TypeScript declaration
33
33
  consumer tests before release.
34
34
 
35
+ ### Public rule definitions
36
+
37
+ ```typescript
38
+ import { getTidasPublicRules } from '@tiangong-lca/tidas-sdk/contracts';
39
+
40
+ const selection = getTidasPublicRules('flow');
41
+ if (selection.status === 'covered') {
42
+ for (const rule of selection.rules) console.log(rule.id, rule.locations);
43
+ }
44
+ ```
45
+
46
+ The result is the versioned public-definition layer: stable identity, dataset/location, applicability, normative level, source references, and examples. It intentionally excludes product profiles, severity/phase policy, blocker defaults, waivers, and action authorization. Valid dataset kinds without reviewed public definitions return `not-covered`. The former `getTidasRuntimeRuleset` compatibility API and its two `runtime_rulesets` files are not part of this SDK package; execution policy belongs to consumers such as CLI.
47
+
35
48
  ## Current factory API
36
49
 
37
50
  The maintained entity factories are:
@@ -0,0 +1,9 @@
1
+ {
2
+ "schema_version": "tidas.public-rules-source.v1",
3
+ "repository": "https://github.com/tiangong-lca/tidas-spec.git",
4
+ "commit": "d4cb089c753ffd20b173db2e56fb553a364f48f4",
5
+ "rules_version": "2026.09.20",
6
+ "status": "released",
7
+ "index_sha256": "d8f1e90777fe0c675d1e24cbd7f1141ee776d3ebda9d8b24c91f714779540dec",
8
+ "schema_sha256": "552a8c5fb87300dbe4ff5021d3d09a2b2d369999e887c223bc5c9738a99549f5"
9
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "public-rules.v1.schema.json",
3
+ "schema_version": 1,
4
+ "rules_version": "2026.09.20",
5
+ "rules": [
6
+ {
7
+ "id": "tidas.flow.classification.elementary.valid",
8
+ "dataset_type": "flow",
9
+ "normative_level": "requirement",
10
+ "statement": "Elementary-flow classification uses valid controlled category identifiers with continuous levels and no skipped intermediate level.",
11
+ "locations": ["flowDataSet.flowInformation.dataSetInformation.classificationInformation.common:elementaryFlowCategorization"],
12
+ "applicability": { "scope": "Flow datasets whose type is Elementary flow and that provide elementary-flow categorization." },
13
+ "source_refs": [{ "asset": "tidas_flows.yaml", "path": "flowDataSet.flowInformation.dataSetInformation.classificationInformation.common:elementaryFlowCategorization.<rules>" }],
14
+ "cases": { "positive": ["Levels 0, 1, and 2 use identifiers present in the shipped controlled category hierarchy."], "negative": ["A level-2 category is supplied without level 1, or an identifier is absent from the shipped hierarchy."] }
15
+ },
16
+ {
17
+ "id": "tidas.flow.flow-property.mean-value.positive",
18
+ "dataset_type": "flow",
19
+ "normative_level": "requirement",
20
+ "statement": "Every flow-property mean value is a positive real number and the referenced quantitative property has mean value 1.0 relative to itself.",
21
+ "locations": ["flowDataSet.flowProperties.flowProperty[*].meanValue"],
22
+ "applicability": { "scope": "Every flow-property entry; the 1.0 condition applies to the entry selected by the quantitative reference." },
23
+ "source_refs": [{ "asset": "tidas_flows.yaml", "path": "flowDataSet.flowProperties.flowProperty.meanValue.<rules>" }],
24
+ "cases": { "positive": ["The selected reference property has meanValue 1.0 and every additional property has a positive conversion ratio."], "negative": ["A flow property has meanValue 0, a negative value, or the selected reference property differs from 1.0."] }
25
+ },
26
+ {
27
+ "id": "tidas.flow.name.base-name.technical",
28
+ "dataset_type": "flow",
29
+ "normative_level": "requirement",
30
+ "statement": "The flow base name uses technical terminology and keeps geography, time, and quantitative qualifiers in their dedicated fields.",
31
+ "locations": ["flowDataSet.flowInformation.dataSetInformation.name.baseName"],
32
+ "applicability": { "scope": "Every flow dataset." },
33
+ "source_refs": [{ "asset": "tidas_flows.yaml", "path": "flowDataSet.flowInformation.dataSetInformation.name.baseName.<rules>" }],
34
+ "cases": { "positive": ["The base name identifies the technical flow and records geography in location metadata."], "negative": ["The base name embeds a year or location instead of using the dedicated metadata field."] }
35
+ },
36
+ {
37
+ "id": "tidas.flow.reference-property-unit.required",
38
+ "dataset_type": "flow",
39
+ "normative_level": "requirement",
40
+ "statement": "A flow identifies an existing reference flow-property entry and that entry references the maintained flow-property dataset defining its quantity and unit.",
41
+ "locations": ["flowDataSet.flowInformation.quantitativeReference.referenceToReferenceFlowProperty", "flowDataSet.flowProperties.flowProperty[*].referenceToFlowPropertyDataSet"],
42
+ "applicability": { "scope": "Every flow dataset." },
43
+ "source_refs": [{ "asset": "tidas_flows.yaml", "path": "flowDataSet.flowInformation.quantitativeReference.referenceToReferenceFlowProperty.<rules>" }, { "asset": "tidas_flows.yaml", "path": "flowDataSet.flowProperties.flowProperty.referenceToFlowPropertyDataSet.<rules>" }],
44
+ "cases": { "positive": ["The quantitative reference points to an existing local flow-property ID whose global reference identifies the intended physical quantity."], "negative": ["The quantitative reference points to a missing local ID or the selected property lacks its flow-property dataset reference."] }
45
+ },
46
+ {
47
+ "id": "tidas.flow.type.required",
48
+ "dataset_type": "flow",
49
+ "normative_level": "requirement",
50
+ "statement": "A flow declares exactly one allowed dataset type: Elementary flow, Product flow, or Waste flow.",
51
+ "locations": ["flowDataSet.modellingAndValidation.LCIMethod.typeOfDataSet"],
52
+ "applicability": { "scope": "Every flow dataset." },
53
+ "source_refs": [{ "asset": "tidas_flows.yaml", "path": "flowDataSet.modellingAndValidation.LCIMethod.typeOfDataSet.<rules>" }],
54
+ "cases": { "positive": ["typeOfDataSet is Product flow and its classification and reference property are consistent with that choice."], "negative": ["typeOfDataSet is absent, custom text, or inconsistent with an elementary-flow categorization."] }
55
+ },
56
+ {
57
+ "id": "tidas.process.exchange.amount.required",
58
+ "dataset_type": "process",
59
+ "normative_level": "requirement",
60
+ "statement": "Every process exchange provides the numerical amount required by the methodology and its applicable amount constraints.",
61
+ "locations": ["processDataSet.exchanges.exchange[*].meanAmount", "processDataSet.exchanges.exchange[*].resultingAmount"],
62
+ "applicability": { "scope": "Every process exchange, using the amount representation applicable to that exchange." },
63
+ "source_refs": [{ "asset": "tidas_processes.yaml", "path": "processDataSet.exchanges.exchange.meanAmount.<rules>" }],
64
+ "cases": { "positive": ["An exchange provides a finite mean amount consistent with its documented unit and source evidence."], "negative": ["An exchange provides no applicable numerical amount or supplies a non-numeric value."] }
65
+ },
66
+ {
67
+ "id": "tidas.process.name.base-name.align-reference-flow",
68
+ "dataset_type": "process",
69
+ "normative_level": "requirement",
70
+ "statement": "The process base name follows the reference-flow naming structure and excludes geography and time qualifiers owned by dedicated metadata fields.",
71
+ "locations": ["processDataSet.processInformation.dataSetInformation.name.baseName"],
72
+ "applicability": { "scope": "Every process dataset; multi-functional processes name each reference flow." },
73
+ "source_refs": [{ "asset": "tidas_processes.yaml", "path": "processDataSet.processInformation.dataSetInformation.name.baseName.<rules>" }],
74
+ "cases": { "positive": ["A single-output process reuses the technical reference-flow name and stores geography separately."], "negative": ["A multi-functional process omits one reference flow or embeds a year in baseName."] }
75
+ },
76
+ {
77
+ "id": "tidas.process.name.qualifiers.structured",
78
+ "dataset_type": "process",
79
+ "normative_level": "recommendation",
80
+ "statement": "Process-name qualifiers are separated into treatment/standards/routes, mix/location type, and quantitative-property segments according to their meaning.",
81
+ "locations": ["processDataSet.processInformation.dataSetInformation.name.treatmentStandardsRoutes", "processDataSet.processInformation.dataSetInformation.name.mixAndLocationTypes", "processDataSet.processInformation.dataSetInformation.name.functionalUnitFlowProperties"],
82
+ "applicability": { "scope": "Process datasets that have the corresponding qualifier information." },
83
+ "source_refs": [{ "asset": "tidas_processes.yaml", "path": "processDataSet.processInformation.dataSetInformation.name.treatmentStandardsRoutes.<rules>" }, { "asset": "tidas_processes.yaml", "path": "processDataSet.processInformation.dataSetInformation.name.mixAndLocationTypes.<rules>" }, { "asset": "tidas_processes.yaml", "path": "processDataSet.processInformation.dataSetInformation.name.functionalUnitFlowProperties.<rules>" }],
84
+ "cases": { "positive": ["A production mix qualifier is placed in mixAndLocationTypes and a grade standard in treatmentStandardsRoutes."], "negative": ["A location/mix qualifier is placed in treatmentStandardsRoutes or all qualifiers are flattened into baseName."] }
85
+ },
86
+ {
87
+ "id": "tidas.process.version.format",
88
+ "dataset_type": "process",
89
+ "normative_level": "requirement",
90
+ "statement": "The process dataset version uses fixed-width NN.NN notation with an optional three-digit development component (NN.NN.NNN) and increases when content changes.",
91
+ "locations": ["processDataSet.administrativeInformation.publicationAndOwnership.common:dataSetVersion"],
92
+ "applicability": { "scope": "Every versioned process dataset; monotonic comparison applies when a previous published version exists." },
93
+ "source_refs": [{ "asset": "tidas_processes.yaml", "path": "processDataSet.administrativeInformation.publicationAndOwnership.common:dataSetVersion.<rules>" }],
94
+ "cases": { "positive": ["01.02 and 01.02.003 both satisfy the Version schema; 01.02.003 follows 01.02 after a content change."], "negative": ["1.1, 01.02.03, or a version not greater than the previous published version."] }
95
+ }
96
+ ]
97
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://tiangong.earth/tidas/public-rules.v1.schema.json",
4
+ "title": "TIDAS public rule index v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["$schema", "schema_version", "rules_version", "rules"],
8
+ "properties": {
9
+ "$schema": { "const": "public-rules.v1.schema.json" },
10
+ "schema_version": { "const": 1 },
11
+ "rules_version": { "type": "string", "pattern": "^[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}$" },
12
+ "rules": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/rule" } }
13
+ },
14
+ "definitions": {
15
+ "rule": {
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "required": ["id", "dataset_type", "normative_level", "statement", "locations", "applicability", "source_refs", "cases"],
19
+ "properties": {
20
+ "id": { "type": "string", "pattern": "^tidas\\.(process|flow)\\.[a-z0-9.-]+$" },
21
+ "dataset_type": { "enum": ["process", "flow"] },
22
+ "normative_level": { "enum": ["requirement", "recommendation"] },
23
+ "statement": { "type": "string", "minLength": 1 },
24
+ "locations": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
25
+ "applicability": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["scope"],
29
+ "properties": { "scope": { "type": "string", "minLength": 1 } }
30
+ },
31
+ "source_refs": {
32
+ "type": "array",
33
+ "minItems": 1,
34
+ "items": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["asset", "path"],
38
+ "properties": {
39
+ "asset": { "enum": ["tidas_processes.yaml", "tidas_flows.yaml"] },
40
+ "path": { "type": "string", "pattern": "^[A-Za-z0-9:<_>.]+\\.<rules>$" }
41
+ }
42
+ }
43
+ },
44
+ "cases": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["positive", "negative"],
48
+ "properties": {
49
+ "positive": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
50
+ "negative": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
@@ -1,5 +1,5 @@
1
1
  export type TidasContractKind = 'contact' | 'contacts' | 'flow' | 'flows' | 'flowproperty' | 'flowproperties' | 'lciamethod' | 'lciamethods' | 'lifecyclemodel' | 'lifecyclemodels' | 'process' | 'processes' | 'source' | 'sources' | 'unitgroup' | 'unitgroups';
2
- export type TidasContractInclude = 'schema' | 'methodology' | 'ruleset';
2
+ export type TidasContractInclude = 'schema' | 'methodology' | 'public-rules';
3
3
  export type TidasContractProfile = 'default' | 'ai-import';
4
4
  export type TidasContractManifest = {
5
5
  schema_version: 1;
@@ -9,7 +9,7 @@ export type TidasContractManifest = {
9
9
  sdk_package: '@tiangong-lca/tidas-sdk';
10
10
  schema: TidasContractArtifactManifest | null;
11
11
  methodology: TidasContractArtifactManifest | null;
12
- ruleset: TidasContractArtifactManifest | null;
12
+ publicRules?: TidasContractArtifactManifest;
13
13
  };
14
14
  export type TidasContractArtifactManifest = {
15
15
  name: string;
@@ -22,7 +22,7 @@ export type TidasContractPack = {
22
22
  schemaData?: unknown;
23
23
  methodologyText?: string;
24
24
  methodologyData?: unknown;
25
- runtimeRuleset?: unknown;
25
+ publicRules?: TidasPublicRuleSelection;
26
26
  aiContext?: {
27
27
  schema_version: 1;
28
28
  kind: TidasCanonicalContractKind;
@@ -30,9 +30,53 @@ export type TidasContractPack = {
30
30
  instructions: string[];
31
31
  schema_text?: string;
32
32
  methodology_text?: string;
33
- runtime_ruleset?: unknown;
33
+ public_rules?: TidasPublicRuleSelection;
34
34
  };
35
35
  };
36
+ export type TidasPublicRuleDatasetType = 'flow' | 'process';
37
+ export type TidasPublicRuleNormativeLevel = 'requirement' | 'recommendation';
38
+ export type TidasPublicRule = {
39
+ id: string;
40
+ dataset_type: TidasPublicRuleDatasetType;
41
+ normative_level: TidasPublicRuleNormativeLevel;
42
+ statement: string;
43
+ locations: string[];
44
+ applicability: {
45
+ scope: string;
46
+ };
47
+ source_refs: Array<{
48
+ asset: 'tidas_flows.yaml' | 'tidas_processes.yaml';
49
+ path: string;
50
+ }>;
51
+ cases: {
52
+ positive: string[];
53
+ negative: string[];
54
+ };
55
+ };
56
+ export type TidasPublicRulesSource = {
57
+ schema_version: 'tidas.public-rules-source.v1';
58
+ repository: string;
59
+ commit: string;
60
+ rules_version: string;
61
+ status: 'reviewed-candidate' | 'released';
62
+ index_sha256: string;
63
+ schema_sha256: string;
64
+ };
65
+ export type TidasPublicRuleSelection = {
66
+ status: 'covered';
67
+ schema_version: 1;
68
+ rules_version: string;
69
+ dataset_type: TidasPublicRuleDatasetType;
70
+ source: TidasPublicRulesSource;
71
+ rules: TidasPublicRule[];
72
+ } | {
73
+ status: 'not-covered';
74
+ schema_version: 1;
75
+ rules_version: string;
76
+ dataset_type: TidasCanonicalContractKind;
77
+ source: TidasPublicRulesSource;
78
+ rules: [];
79
+ };
36
80
  export type TidasCanonicalContractKind = 'contact' | 'flow' | 'flowproperty' | 'lciamethod' | 'lifecyclemodel' | 'process' | 'source' | 'unitgroup';
37
81
  export declare function normalizeTidasContractKind(kind: TidasContractKind | string): TidasCanonicalContractKind;
38
82
  export declare function getAvailableTidasContractKinds(): TidasCanonicalContractKind[];
@@ -40,7 +84,17 @@ export declare function getTidasSchemaData(kind: TidasContractKind | string): un
40
84
  export declare function getTidasSchemaText(kind: TidasContractKind | string): string;
41
85
  export declare function getTidasMethodologyData(kind: TidasContractKind | string): unknown | null;
42
86
  export declare function getTidasMethodologyText(kind: TidasContractKind | string): string | null;
43
- export declare function getTidasRuntimeRuleset(kind: TidasContractKind | string): unknown | null;
87
+ /**
88
+ * Return reviewed public rule definitions for one canonical dataset kind.
89
+ *
90
+ * This API intentionally contains no product profile, phase, severity,
91
+ * blocker default, waiver, or action-authorization fields. Consumers compose
92
+ * those policies locally. A valid but uncovered TIDAS kind is represented as
93
+ * `not-covered`, rather than being collapsed into an empty success or failure.
94
+ */
95
+ export declare function getTidasPublicRules(kind: TidasContractKind | string): TidasPublicRuleSelection;
96
+ /** Return the JSON Schema that validates the complete public-rules.v1 index. */
97
+ export declare function getTidasPublicRulesSchema(): unknown;
44
98
  export declare function getTidasContractPack(kind: TidasContractKind | string, options?: {
45
99
  include?: TidasContractInclude[];
46
100
  profile?: TidasContractProfile;
@@ -1 +1 @@
1
- {"version":3,"file":"tidas-contract.d.ts","sourceRoot":"","sources":["../../src/contracts/tidas-contract.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,UAAU,GACV,MAAM,GACN,OAAO,GACP,cAAc,GACd,gBAAgB,GAChB,YAAY,GACZ,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,WAAW,GACX,YAAY,CAAC;AAEjB,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,aAAa,GAAG,SAAS,CAAC;AAExE,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,WAAW,CAAC;AAE3D,MAAM,MAAM,qBAAqB,GAAG;IAClC,cAAc,EAAE,CAAC,CAAC;IAClB,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,oBAAoB,CAAC;IAC9B,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,WAAW,EAAE,yBAAyB,CAAC;IACvC,MAAM,EAAE,6BAA6B,GAAG,IAAI,CAAC;IAC7C,WAAW,EAAE,6BAA6B,GAAG,IAAI,CAAC;IAClD,OAAO,EAAE,6BAA6B,GAAG,IAAI,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,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,IAAI,EAAE,iBAAiB,GAAG,MAAM,EAChC,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACvB,GACL,iBAAiB,CAiEnB"}
@@ -9,7 +9,8 @@ exports.getTidasSchemaData = getTidasSchemaData;
9
9
  exports.getTidasSchemaText = getTidasSchemaText;
10
10
  exports.getTidasMethodologyData = getTidasMethodologyData;
11
11
  exports.getTidasMethodologyText = getTidasMethodologyText;
12
- exports.getTidasRuntimeRuleset = getTidasRuntimeRuleset;
12
+ exports.getTidasPublicRules = getTidasPublicRules;
13
+ exports.getTidasPublicRulesSchema = getTidasPublicRulesSchema;
13
14
  exports.getTidasContractPack = getTidasContractPack;
14
15
  const bundled_methodologies_json_1 = __importDefault(require("../data/bundled-methodologies.json"));
15
16
  const tidas_contacts_json_1 = __importDefault(require("../runtime-assets/tidas/schemas/tidas_contacts.json"));
@@ -18,7 +19,9 @@ const tidas_flows_json_1 = __importDefault(require("../runtime-assets/tidas/sche
18
19
  const tidas_lciamethods_json_1 = __importDefault(require("../runtime-assets/tidas/schemas/tidas_lciamethods.json"));
19
20
  const tidas_lifecyclemodels_json_1 = __importDefault(require("../runtime-assets/tidas/schemas/tidas_lifecyclemodels.json"));
20
21
  const tidas_processes_json_1 = __importDefault(require("../runtime-assets/tidas/schemas/tidas_processes.json"));
21
- const runtime_rulesets_json_1 = __importDefault(require("../runtime-assets/tidas/methodologies/runtime_rulesets.json"));
22
+ const public_rules_v1_json_1 = __importDefault(require("./public-rules-assets/public-rules.v1.json"));
23
+ const public_rules_v1_schema_json_1 = __importDefault(require("./public-rules-assets/public-rules.v1.schema.json"));
24
+ const public_rules_source_v1_json_1 = __importDefault(require("./public-rules-assets/public-rules.source.v1.json"));
22
25
  const tidas_sources_json_1 = __importDefault(require("../runtime-assets/tidas/schemas/tidas_sources.json"));
23
26
  const tidas_unitgroups_json_1 = __importDefault(require("../runtime-assets/tidas/schemas/tidas_unitgroups.json"));
24
27
  const kindAliases = {
@@ -94,26 +97,56 @@ function getTidasMethodologyText(kind) {
94
97
  }
95
98
  return (bundled_methodologies_json_1.default.methodologyTexts?.[methodologyKey] ?? null);
96
99
  }
97
- function getTidasRuntimeRuleset(kind) {
100
+ /**
101
+ * Return reviewed public rule definitions for one canonical dataset kind.
102
+ *
103
+ * This API intentionally contains no product profile, phase, severity,
104
+ * blocker default, waiver, or action-authorization fields. Consumers compose
105
+ * those policies locally. A valid but uncovered TIDAS kind is represented as
106
+ * `not-covered`, rather than being collapsed into an empty success or failure.
107
+ */
108
+ function getTidasPublicRules(kind) {
98
109
  const canonical = normalizeTidasContractKind(kind);
99
- const source = runtime_rulesets_json_1.default;
100
- const rulesets = (source.rulesets ?? []).filter((entry) => entry.dataset_type === canonical);
101
- const rules = (source.rules ?? []).filter((entry) => entry.dataset_type === canonical);
102
- if (rulesets.length === 0 && rules.length === 0) {
103
- return null;
110
+ const index = public_rules_v1_json_1.default;
111
+ const source = { ...public_rules_source_v1_json_1.default };
112
+ const selected = index.rules
113
+ .filter((rule) => rule.dataset_type === canonical)
114
+ .map((rule) => ({
115
+ ...rule,
116
+ locations: [...rule.locations],
117
+ applicability: { ...rule.applicability },
118
+ source_refs: rule.source_refs.map((reference) => ({ ...reference })),
119
+ cases: {
120
+ positive: [...rule.cases.positive],
121
+ negative: [...rule.cases.negative],
122
+ },
123
+ }));
124
+ if (selected.length === 0) {
125
+ return {
126
+ status: 'not-covered',
127
+ schema_version: index.schema_version,
128
+ rules_version: index.rules_version,
129
+ dataset_type: canonical,
130
+ source,
131
+ rules: [],
132
+ };
104
133
  }
105
134
  return {
106
- $schema: source.$schema,
107
- schema_version: source.schema_version,
108
- ruleset_version: source.ruleset_version,
109
- purpose: source.purpose,
110
- rulesets,
111
- rules,
135
+ status: 'covered',
136
+ schema_version: index.schema_version,
137
+ rules_version: index.rules_version,
138
+ dataset_type: canonical,
139
+ source,
140
+ rules: selected,
112
141
  };
113
142
  }
143
+ /** Return the JSON Schema that validates the complete public-rules.v1 index. */
144
+ function getTidasPublicRulesSchema() {
145
+ return structuredClone(public_rules_v1_schema_json_1.default);
146
+ }
114
147
  function getTidasContractPack(kind, options = {}) {
115
148
  const canonical = normalizeTidasContractKind(kind);
116
- const includes = options.include ?? ['schema', 'methodology', 'ruleset'];
149
+ const includes = options.include ?? ['schema', 'methodology'];
117
150
  const profile = options.profile ?? 'default';
118
151
  const schemaText = includes.includes('schema')
119
152
  ? getTidasSchemaText(canonical)
@@ -122,13 +155,13 @@ function getTidasContractPack(kind, options = {}) {
122
155
  ? getTidasSchemaData(canonical)
123
156
  : undefined;
124
157
  const methodologyText = includes.includes('methodology')
125
- ? getTidasMethodologyText(canonical) ?? undefined
158
+ ? (getTidasMethodologyText(canonical) ?? undefined)
126
159
  : undefined;
127
160
  const methodologyData = includes.includes('methodology')
128
- ? getTidasMethodologyData(canonical) ?? undefined
161
+ ? (getTidasMethodologyData(canonical) ?? undefined)
129
162
  : undefined;
130
- const runtimeRuleset = includes.includes('ruleset')
131
- ? getTidasRuntimeRuleset(canonical) ?? undefined
163
+ const selectedPublicRules = includes.includes('public-rules')
164
+ ? getTidasPublicRules(canonical)
132
165
  : undefined;
133
166
  const manifest = {
134
167
  schema_version: 1,
@@ -142,17 +175,17 @@ function getTidasContractPack(kind, options = {}) {
142
175
  methodology: methodologyText
143
176
  ? artifactManifest(methodologyFileNames[canonical] ?? 'methodology.yaml', methodologyText)
144
177
  : null,
145
- ruleset: runtimeRuleset
146
- ? artifactManifest('runtime_rulesets.json', JSON.stringify(runtimeRuleset, null, 2))
147
- : null,
148
178
  };
179
+ if (selectedPublicRules) {
180
+ manifest.publicRules = artifactManifest(`public-rules.${canonical}.v1.json`, JSON.stringify(selectedPublicRules, null, 2));
181
+ }
149
182
  const pack = {
150
183
  manifest,
151
184
  schemaText,
152
185
  schemaData,
153
186
  methodologyText,
154
187
  methodologyData,
155
- runtimeRuleset,
188
+ publicRules: selectedPublicRules,
156
189
  };
157
190
  if (options.includeAiContext) {
158
191
  pack.aiContext = {
@@ -162,7 +195,7 @@ function getTidasContractPack(kind, options = {}) {
162
195
  instructions: buildAiContextInstructions(canonical, profile),
163
196
  schema_text: schemaText,
164
197
  methodology_text: methodologyText,
165
- runtime_ruleset: runtimeRuleset,
198
+ public_rules: selectedPublicRules,
166
199
  };
167
200
  }
168
201
  return pack;
@@ -179,7 +212,6 @@ function buildAiContextInstructions(kind, profile) {
179
212
  `Generate or repair only canonical TIDAS ${kind} data.`,
180
213
  'Use the JSON schema as the structural contract.',
181
214
  'Use the methodology YAML as the semantic authoring contract when present.',
182
- 'Treat runtime ruleset blocker rules as gate requirements.',
183
215
  'Return candidate data only; do not claim that database writes have happened.',
184
216
  ];
185
217
  if (profile === 'ai-import') {
@@ -194,22 +226,20 @@ function sha256(input) {
194
226
  words[bitLength >> 5] |= 0x80 << (24 - (bitLength % 32));
195
227
  words[(((bitLength + 64) >> 9) << 4) + 15] = bitLength;
196
228
  const hash = [
197
- 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f,
198
- 0x9b05688c, 0x1f83d9ab, 0x5be0cd19,
229
+ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c,
230
+ 0x1f83d9ab, 0x5be0cd19,
199
231
  ];
200
232
  const k = [
201
- 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,
202
- 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,
203
- 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,
204
- 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
205
- 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,
206
- 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
207
- 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,
208
- 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
209
- 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,
210
- 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,
211
- 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,
212
- 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
233
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,
234
+ 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
235
+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,
236
+ 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
237
+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
238
+ 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
239
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,
240
+ 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
241
+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,
242
+ 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
213
243
  0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
214
244
  ];
215
245
  const schedule = new Array(64);
@@ -225,8 +255,7 @@ function sha256(input) {
225
255
  const s1 = rotateRight(schedule[t - 2], 17) ^
226
256
  rotateRight(schedule[t - 2], 19) ^
227
257
  (schedule[t - 2] >>> 10);
228
- schedule[t] =
229
- (schedule[t - 16] + s0 + schedule[t - 7] + s1) | 0;
258
+ schedule[t] = (schedule[t - 16] + s0 + schedule[t - 7] + s1) | 0;
230
259
  }
231
260
  }
232
261
  let [a, b, c, d, e, f, g, h] = hash;
@@ -1 +1 @@
1
- {"version":3,"file":"tidas-contract.js","sourceRoot":"","sources":["../../src/contracts/tidas-contract.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oGAAsE;AACtE,8GAAgF;AAChF,0HAA2F;AAC3F,wGAA0E;AAC1E,oHAAsF;AACtF,4HAA8F;AAC9F,gHAAiF;AACjF,wHAA0F;AAC1F,4GAA8E;AAC9E,kHAAoF;AA0EpF,MAAM,WAAW,GAA+C;IAC9D,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,SAAS;IACnB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,cAAc;IAC9B,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,YAAY;IACzB,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,gBAAgB;IACjC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IACpB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,WAAW;CACxB,CAAC;AAEF,MAAM,aAAa,GAAoD;IACrE,OAAO,EAAE,EAAE,QAAQ,EAAE,qBAAqB,EAAE,IAAI,EAAE,6BAAa,EAAE;IACjE,IAAI,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,IAAI,EAAE,0BAAU,EAAE;IACxD,YAAY,EAAE;QACZ,QAAQ,EAAE,2BAA2B;QACrC,IAAI,EAAE,mCAAkB;KACzB;IACD,UAAU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