@consiliency/contract 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,7 +19,18 @@ The Consiliency cross-repo **contract package** — the single, neutral rulebook
19
19
 
20
20
  Dual-published: **npm** [`@consiliency/contract`](https://www.npmjs.com/package/@consiliency/contract) + **PyPI** [`consiliency-contract`](https://pypi.org/project/consiliency-contract/), from shared JSON data + conformance vectors so the two language readers stay byte-identical.
21
21
 
22
- > **Status — `0.6.4` distributes the frozen parity `certificate` schema and
22
+ > **Status — `0.6.5` defines the canonical `protected_source_category`
23
+ > vocabulary (the protocol's first producer↔consumer conformance boundary) as a
24
+ > two-level scheme: a required coarse `category` (seven execution-flow buckets —
25
+ > the pre-existing six plus a new `governance_contracts` bucket for producer-side
26
+ > governance sources) plus an optional free-form `subtype` carrying the
27
+ > producer's fine granularity. The `protected_source_categories` registry pins
28
+ > the coarse enum, the registered fine set, and the canonical fine→coarse map
29
+ > for all ~14 governed-pipeline fine categories; the
30
+ > `protected_source_category` schema validates a `{category, subtype}`
31
+ > descriptor. SoT definition only — additive, no existing schema semantics
32
+ > change; governed-pipeline and phase-loop conform in later phases.
33
+ > `0.6.4` distributes the frozen parity `certificate` schema and
23
34
  > its `result-state` `$ref` closure (verbatim from spec, digest-pinned in
24
35
  > `core/spec-parity/provenance.json`) so external consumers (e.g. greenfield
25
36
  > XG-6) validate against the real parity-cert schema instead of a hand-rolled,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "contract_id": "consiliency.contract.v1",
3
- "contract_version": "0.6.4",
3
+ "contract_version": "0.6.5",
4
4
  "package_names": {
5
5
  "npm": "@consiliency/contract",
6
6
  "pypi": "consiliency-contract"
@@ -38,7 +38,8 @@
38
38
  "git_discipline_protocol": "core/schemas/git-discipline-protocol.schema.json",
39
39
  "authority_event_protocol": "core/schemas/authority-event-protocol.schema.json",
40
40
  "certificate": "core/schemas/certificate.schema.json",
41
- "result_state": "core/schemas/result-state.schema.json"
41
+ "result_state": "core/schemas/result-state.schema.json",
42
+ "protected_source_category": "core/schemas/protected-source-category.schema.json"
42
43
  },
43
44
  "registries": {
44
45
  "document_classes": "core/registries/document-classes.json",
@@ -48,7 +49,8 @@
48
49
  "default_ignore_set": "core/registries/default-ignore-set.json",
49
50
  "pipeline_ref_classes": "core/registries/pipeline-ref-classes.json",
50
51
  "authority_key_registry": "core/registries/authority-key-registry.json",
51
- "gate_posture_registry": "core/registries/gate-posture-registry.json"
52
+ "gate_posture_registry": "core/registries/gate-posture-registry.json",
53
+ "protected_source_categories": "core/registries/protected-source-categories.json"
52
54
  },
53
55
  "protocols": {
54
56
  "loop_gate": "core/schemas/loop-gate-protocol.schema.json",
@@ -0,0 +1,86 @@
1
+ {
2
+ "schema": "consiliency.protected_source_categories.v1",
3
+ "$comment": "The canonical protected_source_category vocabulary -- the protocol's FIRST producer<->consumer conformance boundary. A TWO-LEVEL scheme: a COARSE required category (the consumer's execution-flow bucket, what phase-loop keys its protected-source handling on) plus an OPTIONAL fine `subtype` (the producer's governance granularity, what governed-pipeline emits). Both governed-pipeline (producer) and phase-loop (consumer) validate against THIS distributed registry -- they conform to the contract, not to each other, so the vocabulary is never defined implicitly in a codebase (the 'conform to each other, not the contract' anti-pattern the open protocol exists to eliminate). SoT ONLY at this version: gp emits coarse+subtype and phase-loop validates against `coarse_categories` in LATER phases (PSCAT-GP / PSCAT-PL); this version neither changes gp's emit nor phase-loop's accept. WHY coarse is the hard contract and subtype is free-form: the coarse enum is the cross-repo agreement both runtimes gate on; enum-gating the FINE level in the distributed schema would re-couple the fine granularity across repos -- the exact anti-pattern this boundary avoids. The registered fine set below is therefore a DATA map (fine -> coarse), not a schema-enforced enum; a later boundary validator MAY check an emitted subtype against `fine_subtypes` as a soft/warn signal, never a schema hard-fail. Resolves #155; unblocks the R2 bake (#146).",
4
+ "level_scheme": {
5
+ "coarse": {
6
+ "role": "required",
7
+ "owner": "consumer",
8
+ "description": "The execution-flow bucket the consumer (phase-loop) keys its protected-source handling on. Every emitted protected_source_category MUST carry one of these coarse ids."
9
+ },
10
+ "subtype": {
11
+ "role": "optional",
12
+ "owner": "producer",
13
+ "value_space": "free-form string",
14
+ "description": "The producer's (governed-pipeline's) fine governance granularity, carried alongside the coarse category. Free-form at the schema level (any string) so the fine vocabulary is NOT re-coupled across repos; the `fine_subtypes` registered set + `fine_to_coarse` map below are the canonical fine names for tooling/diagnostics, checkable by a later validator as a soft signal only."
15
+ }
16
+ },
17
+ "coarse_categories": [
18
+ {
19
+ "id": "specs",
20
+ "pre_existing": true,
21
+ "description": "Canonical specification sources and their archive/mirror manifests -- the spec surface the loop treats as protected input."
22
+ },
23
+ {
24
+ "id": "diagrams",
25
+ "pre_existing": true,
26
+ "description": "Diagram sources treated as protected input to the loop."
27
+ },
28
+ {
29
+ "id": "adapter_config",
30
+ "pre_existing": true,
31
+ "description": "Runtime adapter configuration and execution profiles that parameterize how the loop runs."
32
+ },
33
+ {
34
+ "id": "definition_files",
35
+ "pre_existing": true,
36
+ "description": "Pipeline/definition source files (e.g. the pipeline definition JSON and the code that validates it)."
37
+ },
38
+ {
39
+ "id": "portal_contracts",
40
+ "pre_existing": true,
41
+ "description": "Portal-facing contract surfaces the loop treats as protected input."
42
+ },
43
+ {
44
+ "id": "phase_artifacts",
45
+ "pre_existing": true,
46
+ "description": "Per-phase artifacts (current-phase source bundle) the loop protects across iterations."
47
+ },
48
+ {
49
+ "id": "governance_contracts",
50
+ "pre_existing": false,
51
+ "description": "NEW coarse bucket (0.6.5) for producer-side governance sources that do not map onto any of the six execution-flow buckets above: adoption contracts, the phase-loop bridge contract files, skill manifests, and instruction surfaces. These are governance-of-the-loop inputs rather than spec/definition/adapter/portal/phase-artifact inputs; the panel chose a SINGLE minimal coarse bucket (rather than splitting) and lets `subtype` carry the fine distinction, keeping coarse growth minimal."
52
+ }
53
+ ],
54
+ "fine_subtypes": [
55
+ "active_canonical_specs",
56
+ "canonical_specs",
57
+ "canonical_spec_archive_manifests",
58
+ "canonical_spec_mirror_manifests",
59
+ "adoption_contracts",
60
+ "current_phase_artifacts",
61
+ "definition_validation_code",
62
+ "execution_profiles",
63
+ "phase_loop_bridge_contract_files",
64
+ "pipeline_definition_json",
65
+ "portal_contracts",
66
+ "runtime_adapter_config",
67
+ "skill_manifests",
68
+ "instruction_surfaces"
69
+ ],
70
+ "fine_to_coarse": {
71
+ "active_canonical_specs": { "coarse": "specs", "subtype": "active_canonical_specs" },
72
+ "canonical_specs": { "coarse": "specs", "subtype": "canonical_specs" },
73
+ "canonical_spec_archive_manifests": { "coarse": "specs", "subtype": "canonical_spec_archive_manifests" },
74
+ "canonical_spec_mirror_manifests": { "coarse": "specs", "subtype": "canonical_spec_mirror_manifests" },
75
+ "runtime_adapter_config": { "coarse": "adapter_config", "subtype": "runtime_adapter_config" },
76
+ "execution_profiles": { "coarse": "adapter_config", "subtype": "execution_profiles" },
77
+ "pipeline_definition_json": { "coarse": "definition_files", "subtype": "pipeline_definition_json" },
78
+ "definition_validation_code": { "coarse": "definition_files", "subtype": "definition_validation_code" },
79
+ "current_phase_artifacts": { "coarse": "phase_artifacts", "subtype": "current_phase_artifacts" },
80
+ "portal_contracts": { "coarse": "portal_contracts", "subtype": "portal_contracts" },
81
+ "adoption_contracts": { "coarse": "governance_contracts", "subtype": "adoption_contracts" },
82
+ "phase_loop_bridge_contract_files": { "coarse": "governance_contracts", "subtype": "phase_loop_bridge_contract_files" },
83
+ "skill_manifests": { "coarse": "governance_contracts", "subtype": "skill_manifests" },
84
+ "instruction_surfaces": { "coarse": "governance_contracts", "subtype": "instruction_surfaces" }
85
+ }
86
+ }
@@ -18,7 +18,7 @@
18
18
  "additionalProperties": false,
19
19
  "properties": {
20
20
  "schema": {"const": "consiliency.git_discipline_protocol.v1"},
21
- "contract_version": {"const": "0.6.4"},
21
+ "contract_version": {"const": "0.6.5"},
22
22
  "ref_class_registry": {
23
23
  "const": "pipeline-ref-classes",
24
24
  "description": "loadRegistry('pipeline_ref_classes') enumerates the pipeline-owned ref families and the human default. Both runtimes (harness + gp) read it to agree on ownership."
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://consiliency.io/contracts/protected-source-category.schema.json",
4
+ "title": "Consiliency protected_source_category descriptor",
5
+ "description": "Validates a two-level protected_source_category descriptor emitted by the producer (governed-pipeline) and validated by the consumer (phase-loop): a REQUIRED coarse `category` (one of the canonical execution-flow buckets) plus an OPTIONAL free-form `subtype` carrying the producer's fine governance granularity. The coarse enum below is the hard cross-repo contract; it MUST equal the ids in the `protected_source_categories` registry's `coarse_categories` (a contract test pins this so the two never drift). `subtype` is intentionally a free-form string here -- enum-gating the fine level in the distributed schema would re-couple the fine vocabulary across repos, the anti-pattern this boundary avoids; the registry's `fine_subtypes` list is the canonical fine set for tooling and a later soft/warn validator, not a schema hard-fail.",
6
+ "type": "object",
7
+ "required": ["category"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "category": {
11
+ "description": "The REQUIRED coarse execution-flow bucket. MUST equal one of the ids in loadRegistry('protected_source_categories').coarse_categories.",
12
+ "type": "string",
13
+ "enum": [
14
+ "specs",
15
+ "diagrams",
16
+ "adapter_config",
17
+ "definition_files",
18
+ "portal_contracts",
19
+ "phase_artifacts",
20
+ "governance_contracts"
21
+ ]
22
+ },
23
+ "subtype": {
24
+ "description": "OPTIONAL fine governance granularity from the producer. Free-form string (the registry's fine_subtypes list is the canonical set, checkable by a later validator as a soft signal only, not enforced here).",
25
+ "type": "string",
26
+ "minLength": 1
27
+ }
28
+ }
29
+ }
@@ -7,7 +7,7 @@
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
9
  "schema": {"const": "consiliency.version_skew_protocol.v1"},
10
- "contract_version": {"const": "0.6.4"},
10
+ "contract_version": {"const": "0.6.5"},
11
11
  "compatible_ranges": {
12
12
  "type": "object",
13
13
  "required": ["contract", "package"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consiliency/contract",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Consiliency cross-repo contract package: shared JSON contract data, conformance vectors, thin npm/PyPI readers, and the canonical_html.v1 public contract surface.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export declare const CONTRACT_PACKAGE: "@consiliency/contract";
2
- export declare const CONTRACT_VERSION: "0.6.4";
2
+ export declare const CONTRACT_VERSION: "0.6.5";
3
3
  export declare const CONTRACT: Record<string, unknown>;
4
4
  export declare function loadContract(): Record<string, unknown>;
5
5
  export declare function loadSchema(name: string): Record<string, unknown>;
package/src/index.js CHANGED
@@ -3,7 +3,7 @@ import { dirname, join } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
 
5
5
  export const CONTRACT_PACKAGE = "@consiliency/contract";
6
- export const CONTRACT_VERSION = "0.6.4";
6
+ export const CONTRACT_VERSION = "0.6.5";
7
7
 
8
8
  export {
9
9
  AuthorityCanonicalError,