@consiliency/contract 0.1.0 → 0.2.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/README.md +3 -1
- package/conformance/vectors/adoption-absent-ungoverned.json +16 -0
- package/conformance/vectors/adoption-adopted-governed.json +18 -0
- package/conformance/vectors/adoption-declared-false-ungoverned.json +17 -0
- package/conformance/vectors/adoption-partial-scope.json +18 -0
- package/conformance/vectors/coordination-announce-intent-does-not-lease.json +38 -0
- package/conformance/vectors/coordination-done-does-not-release-lease.json +38 -0
- package/conformance/vectors/coordination-handoff-does-not-transfer-holder.json +38 -0
- package/conformance/vectors/coordination-message-does-not-mutate-lease.json +38 -0
- package/conformance/vectors/doc-label-foreign-governed-false.json +19 -0
- package/conformance/vectors/doc-label-present-nonconforming.json +19 -0
- package/conformance/vectors/edge-label-unmanaged-cross-repo.json +30 -0
- package/conformance/vectors/governed-set-undeclared-ungoverned.json +18 -0
- package/conformance/vectors/ignore-set-nested-path-any-depth.json +19 -0
- package/conformance/vectors/ignore-set-scratch-never-governed.json +19 -0
- package/conformance/vectors/interface-valid-realized-and-promised.json +1 -1
- package/conformance/vectors/lease-acquire.json +35 -0
- package/conformance/vectors/lease-event-carries-lease.json +28 -0
- package/conformance/vectors/lease-expire.json +25 -0
- package/conformance/vectors/lease-expiry-boundary.json +25 -0
- package/conformance/vectors/lease-hard-degrades-to-soft.json +35 -0
- package/conformance/vectors/lease-hard-mode-atomic.json +35 -0
- package/conformance/vectors/lease-release.json +26 -0
- package/conformance/vectors/lease-renew.json +36 -0
- package/conformance/vectors/manifest-invalid-absolute-path.json +1 -1
- package/conformance/vectors/manifest-invalid-certified-maturity.json +1 -1
- package/conformance/vectors/manifest-invalid-path-and-ref.json +1 -1
- package/conformance/vectors/manifest-invalid-unknown-archetype.json +1 -1
- package/conformance/vectors/manifest-valid-baseline-only.json +1 -1
- package/conformance/vectors/manifest-valid-product.json +1 -1
- package/conformance/vectors/version-skew-compatible.json +3 -3
- package/conformance/vectors/version-skew-incompatible-warns.json +2 -2
- package/core/contract.json +16 -6
- package/core/registries/default-ignore-set.json +30 -0
- package/core/registries/maturity-labels.json +26 -0
- package/core/schemas/coordination-channel-protocol.schema.json +53 -0
- package/core/schemas/coordination-scenario.schema.json +67 -0
- package/core/schemas/decision.schema.json +5 -0
- package/core/schemas/governance-scope-scenario.schema.json +62 -0
- package/core/schemas/interface-declaration.schema.json +2 -0
- package/core/schemas/lease-event.schema.json +17 -0
- package/core/schemas/lease-store-protocol.schema.json +117 -0
- package/core/schemas/lease.schema.json +42 -0
- package/core/schemas/manifest.schema.json +44 -1
- package/core/schemas/version-skew-protocol.schema.json +3 -3
- package/package.json +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "lease-renew",
|
|
3
|
+
"description": "A heartbeat renew extends the effective expiry (acquired_at + ttl measured from the last heartbeat), so the lease is still active past its original TTL.",
|
|
4
|
+
"input": {
|
|
5
|
+
"schema": "consiliency.coordination_scenario.v1",
|
|
6
|
+
"now": "2026-01-01T00:06:40Z",
|
|
7
|
+
"requested_mode": "soft",
|
|
8
|
+
"backend": "local-file",
|
|
9
|
+
"atomic_backend": false,
|
|
10
|
+
"events": [
|
|
11
|
+
{"event": "acquire", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:00:00Z", "ttl_seconds": 300, "mode": "soft", "scope": {"granularity": "path-set", "selector": ["src/mod/**"]}, "phase": "implement"},
|
|
12
|
+
{"event": "renew", "lease_id": "lease-src-mod", "holder": "agent-a", "at": "2026-01-01T00:04:10Z"}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"decision": {
|
|
16
|
+
"schema": "consiliency.conformance_decision.v1",
|
|
17
|
+
"status": "accepted",
|
|
18
|
+
"maturity": "presence-only",
|
|
19
|
+
"findings": [{"code": "coordination.lease_renewed", "severity": "info", "message": "Heartbeat renew extended the lease; it is active past its original TTL."}]
|
|
20
|
+
},
|
|
21
|
+
"expected": {
|
|
22
|
+
"effective_mode": "soft",
|
|
23
|
+
"changed_by_message": false,
|
|
24
|
+
"current_lease": {
|
|
25
|
+
"schema": "consiliency.lease.v1",
|
|
26
|
+
"lease_id": "lease-src-mod",
|
|
27
|
+
"holder": "agent-a",
|
|
28
|
+
"acquired_at": "2026-01-01T00:00:00Z",
|
|
29
|
+
"ttl_seconds": 300,
|
|
30
|
+
"heartbeat_at": "2026-01-01T00:04:10Z",
|
|
31
|
+
"mode": "soft",
|
|
32
|
+
"scope": {"granularity": "path-set", "selector": ["src/mod/**"]},
|
|
33
|
+
"phase": "implement"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Host absolute paths are rejected from public package data.",
|
|
4
4
|
"input": {
|
|
5
5
|
"schema": "consiliency.manifest.v1",
|
|
6
|
-
"contract_version": "0.
|
|
6
|
+
"contract_version": "0.2.0",
|
|
7
7
|
"repo": {"id": "bad", "display_name": "Bad", "default_branch": "main"},
|
|
8
8
|
"declaration": {"mode": "baseline-only"},
|
|
9
9
|
"documents": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Phase 0 vectors must not claim certified maturity.",
|
|
4
4
|
"input": {
|
|
5
5
|
"schema": "consiliency.manifest.v1",
|
|
6
|
-
"contract_version": "0.
|
|
6
|
+
"contract_version": "0.2.0",
|
|
7
7
|
"repo": {"id": "bad", "display_name": "Bad", "default_branch": "main"},
|
|
8
8
|
"declaration": {"mode": "baseline-only"},
|
|
9
9
|
"documents": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "A document declaration must use exactly one of path or ref.",
|
|
4
4
|
"input": {
|
|
5
5
|
"schema": "consiliency.manifest.v1",
|
|
6
|
-
"contract_version": "0.
|
|
6
|
+
"contract_version": "0.2.0",
|
|
7
7
|
"repo": {"id": "bad", "display_name": "Bad", "default_branch": "main"},
|
|
8
8
|
"declaration": {"mode": "baseline-only"},
|
|
9
9
|
"documents": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Unknown archetypes are rejected.",
|
|
4
4
|
"input": {
|
|
5
5
|
"schema": "consiliency.manifest.v1",
|
|
6
|
-
"contract_version": "0.
|
|
6
|
+
"contract_version": "0.2.0",
|
|
7
7
|
"repo": {"id": "bad", "display_name": "Bad", "default_branch": "main"},
|
|
8
8
|
"declaration": {"mode": "archetyped", "archetypes": ["website"], "modifiers": []},
|
|
9
9
|
"documents": [],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "A baseline-only declaration is legal and carries no archetype list.",
|
|
4
4
|
"input": {
|
|
5
5
|
"schema": "consiliency.manifest.v1",
|
|
6
|
-
"contract_version": "0.
|
|
6
|
+
"contract_version": "0.2.0",
|
|
7
7
|
"repo": {"id": "notes", "display_name": "Notes", "default_branch": "main"},
|
|
8
8
|
"declaration": {"mode": "baseline-only"},
|
|
9
9
|
"documents": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "An archetyped product manifest with repo-relative documents is accepted at L0.",
|
|
4
4
|
"input": {
|
|
5
5
|
"schema": "consiliency.manifest.v1",
|
|
6
|
-
"contract_version": "0.
|
|
6
|
+
"contract_version": "0.2.0",
|
|
7
7
|
"repo": {"id": "portal", "display_name": "Consiliency Portal", "default_branch": "main"},
|
|
8
8
|
"declaration": {"mode": "archetyped", "archetypes": ["product"], "modifiers": ["user-facing"]},
|
|
9
9
|
"documents": [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "version-skew-compatible",
|
|
3
|
-
"description": "Contract and package versions in the 0.
|
|
3
|
+
"description": "Contract and package versions in the 0.2 range are compatible.",
|
|
4
4
|
"input": {
|
|
5
5
|
"schema": "consiliency.version_skew_scenario.v1",
|
|
6
|
-
"contract_version": "0.
|
|
7
|
-
"package_version": "0.
|
|
6
|
+
"contract_version": "0.2.0",
|
|
7
|
+
"package_version": "0.2.0"
|
|
8
8
|
},
|
|
9
9
|
"decision": {
|
|
10
10
|
"schema": "consiliency.conformance_decision.v1",
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"description": "Version skew emits a warning by default during Phase 0.",
|
|
4
4
|
"input": {
|
|
5
5
|
"schema": "consiliency.version_skew_scenario.v1",
|
|
6
|
-
"contract_version": "0.
|
|
7
|
-
"package_version": "0.
|
|
6
|
+
"contract_version": "0.1.0",
|
|
7
|
+
"package_version": "0.2.0"
|
|
8
8
|
},
|
|
9
9
|
"decision": {
|
|
10
10
|
"schema": "consiliency.conformance_decision.v1",
|
package/core/contract.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"contract_id": "consiliency.contract.v1",
|
|
3
|
-
"contract_version": "0.
|
|
3
|
+
"contract_version": "0.2.0",
|
|
4
4
|
"package_names": {
|
|
5
5
|
"npm": "@consiliency/contract",
|
|
6
6
|
"pypi": "consiliency-contract"
|
|
7
7
|
},
|
|
8
|
-
"summary": "Normative Consiliency Phase-0 L0 contract data for .consiliency layout, document requirements, interface declarations, loop gates, canonical_html.v1,
|
|
8
|
+
"summary": "Normative Consiliency Phase-0 L0 contract data for .consiliency layout, document requirements, interface declarations, loop gates, canonical_html.v1, version skew, adoption + governance-scoping (CS-0.12), and lease + inbox coordination (CS-0.10b).",
|
|
9
9
|
"phase_posture": {
|
|
10
|
-
"phase": "CS-0.
|
|
10
|
+
"phase": "CS-0.12",
|
|
11
|
+
"content_phases": ["CS-0.2", "CS-0.10b", "CS-0.12"],
|
|
11
12
|
"level": "L0",
|
|
12
13
|
"default_gate_severity": "warn",
|
|
13
14
|
"certified_claims_allowed": false,
|
|
@@ -22,17 +23,26 @@
|
|
|
22
23
|
"loop_gate_scenario": "core/schemas/loop-gate-scenario.schema.json",
|
|
23
24
|
"version_skew_protocol": "core/schemas/version-skew-protocol.schema.json",
|
|
24
25
|
"version_skew_scenario": "core/schemas/version-skew-scenario.schema.json",
|
|
25
|
-
"canonical_html_v1": "core/schemas/canonical-html-v1.schema.json"
|
|
26
|
+
"canonical_html_v1": "core/schemas/canonical-html-v1.schema.json",
|
|
27
|
+
"governance_scope_scenario": "core/schemas/governance-scope-scenario.schema.json",
|
|
28
|
+
"lease": "core/schemas/lease.schema.json",
|
|
29
|
+
"lease_event": "core/schemas/lease-event.schema.json",
|
|
30
|
+
"lease_store_protocol": "core/schemas/lease-store-protocol.schema.json",
|
|
31
|
+
"coordination_channel_protocol": "core/schemas/coordination-channel-protocol.schema.json",
|
|
32
|
+
"coordination_scenario": "core/schemas/coordination-scenario.schema.json"
|
|
26
33
|
},
|
|
27
34
|
"registries": {
|
|
28
35
|
"document_classes": "core/registries/document-classes.json",
|
|
29
36
|
"archetypes": "core/registries/archetypes.json",
|
|
30
37
|
"required_documents": "core/registries/required-documents.json",
|
|
31
|
-
"maturity_labels": "core/registries/maturity-labels.json"
|
|
38
|
+
"maturity_labels": "core/registries/maturity-labels.json",
|
|
39
|
+
"default_ignore_set": "core/registries/default-ignore-set.json"
|
|
32
40
|
},
|
|
33
41
|
"protocols": {
|
|
34
42
|
"loop_gate": "core/schemas/loop-gate-protocol.schema.json",
|
|
35
|
-
"version_skew": "core/schemas/version-skew-protocol.schema.json"
|
|
43
|
+
"version_skew": "core/schemas/version-skew-protocol.schema.json",
|
|
44
|
+
"lease_store": "core/schemas/lease-store-protocol.schema.json",
|
|
45
|
+
"coordination_channel": "core/schemas/coordination-channel-protocol.schema.json"
|
|
36
46
|
},
|
|
37
47
|
"canonical_html": {
|
|
38
48
|
"contract": "core/canonical-html/contract-v1.json",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "consiliency.default_ignore_set.v1",
|
|
3
|
+
"summary": "The shipped default set of tool, harness, and scratch namespaces that contract ingestion must never touch. These are ungoverned by construction: they are never candidates for the governed set even if a governed_set selector would otherwise match them.",
|
|
4
|
+
"namespaces": [
|
|
5
|
+
".git/",
|
|
6
|
+
".phase-loop/",
|
|
7
|
+
".pipeline/",
|
|
8
|
+
".claude/",
|
|
9
|
+
".codex/",
|
|
10
|
+
".opencode/",
|
|
11
|
+
".gemini/",
|
|
12
|
+
".pi/",
|
|
13
|
+
".agents/",
|
|
14
|
+
".cursor/",
|
|
15
|
+
"node_modules/",
|
|
16
|
+
".venv/",
|
|
17
|
+
"scratch/",
|
|
18
|
+
"**/*.wip.md",
|
|
19
|
+
"**/transcripts/",
|
|
20
|
+
"**/*.transcript/"
|
|
21
|
+
],
|
|
22
|
+
"matching": {
|
|
23
|
+
"bare_dir_matches_at_any_depth": true,
|
|
24
|
+
"metachar_entries_are_globs": true,
|
|
25
|
+
"rule": "An entry with no glob metacharacter that ends in '/' (a bare directory name, e.g. '.claude/') matches that directory at ANY depth, so both '.claude/x.md' and 'tools/.claude/x.md' are ignored. An entry containing a glob metacharacter ('*', '?', '[') is a glob evaluated against the repo-relative path (e.g. '**/*.wip.md')."
|
|
26
|
+
},
|
|
27
|
+
"precedence": "ignore-set-overrides-governed-set",
|
|
28
|
+
"extensible_per_repo": true,
|
|
29
|
+
"rule": "A path matching any ignore-set namespace is ungoverned regardless of adoption or governed_set declarations. The ignore-set is the safety floor: it wins over the allowlist so scratchpads and other-harness docs (Claude, Codex, OpenCode, Gemini/Antigravity, PI, Cursor, and the .agents shared root) are never governed or ingested."
|
|
30
|
+
}
|
|
@@ -3,20 +3,46 @@
|
|
|
3
3
|
"labels": [
|
|
4
4
|
{
|
|
5
5
|
"id": "presence-only",
|
|
6
|
+
"kind": "evidence",
|
|
6
7
|
"description": "The artifact or edge is declared and can be checked for existence only."
|
|
7
8
|
},
|
|
8
9
|
{
|
|
9
10
|
"id": "hash-checked",
|
|
11
|
+
"kind": "evidence",
|
|
10
12
|
"description": "The artifact bytes are checked against a recorded digest."
|
|
11
13
|
},
|
|
12
14
|
{
|
|
13
15
|
"id": "realized-edge-observed",
|
|
16
|
+
"kind": "evidence",
|
|
14
17
|
"description": "The edge was observed from a declared pin, package coordinate, copied literal, or repo-relative source reference."
|
|
15
18
|
},
|
|
16
19
|
{
|
|
17
20
|
"id": "certified",
|
|
21
|
+
"kind": "evidence",
|
|
18
22
|
"description": "Reserved for post-XG-1 evidence attested by the certificate path; invalid for CS-0.2 Phase 0 vectors."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "present-nonconforming",
|
|
26
|
+
"kind": "governance",
|
|
27
|
+
"governed": true,
|
|
28
|
+
"description": "The artifact is declared in the governed set and is present, but does not conform to its declared class or contract shape."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "foreign",
|
|
32
|
+
"kind": "governance",
|
|
33
|
+
"governed": false,
|
|
34
|
+
"description": "A present artifact that is not declared in the governed set (governed:false). Ingestion must never treat it as authoritative or governed; it is neither owed nor checked."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "unmanaged",
|
|
38
|
+
"kind": "governance",
|
|
39
|
+
"governed": false,
|
|
40
|
+
"description": "A cross-repo edge whose counterpart repo has not adopted the contract (governed:false at the far end). The edge may be observed locally, but the far end is ungoverned and carries no adoption profile."
|
|
19
41
|
}
|
|
20
42
|
],
|
|
43
|
+
"label_kinds": {
|
|
44
|
+
"evidence": "Evidence-strength axis: how strongly the artifact/edge is attested (presence -> hash -> realized -> certified).",
|
|
45
|
+
"governance": "Governance-status axis: whether and how an artifact/edge is governed. Orthogonal to evidence strength."
|
|
46
|
+
},
|
|
21
47
|
"phase0_disallowed": ["certified"]
|
|
22
48
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://consiliency.io/contracts/coordination-channel-protocol.schema.json",
|
|
4
|
+
"title": "Consiliency coordination channel protocol",
|
|
5
|
+
"description": "The CoordinationChannel (inbox) interface. GUARDRAIL: the inbox is NEVER authoritative for lock state. Lease state is defined solely by projecting the LeaseStore event stream: current_lease = project(LeaseStore events, now), computed independently of inbox contents. A coordination message is not a lease event and never becomes one: it may PROMPT an actor to CALL a LeaseStore operation (acquire/renew/release), but the message itself never mutates, transfers, or transitions a lease. Excluding messages from the projection is normative, not incidental.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "operations", "message_types", "delivery", "authority", "lease_state_projection"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {"const": "consiliency.coordination_channel_protocol.v1"},
|
|
11
|
+
"lease_state_projection": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": ["formula", "inbox_included_in_projection"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"formula": {"const": "current_lease = project(lease-store events, now)"},
|
|
17
|
+
"inbox_included_in_projection": {"const": false}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"operations": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"uniqueItems": true,
|
|
23
|
+
"items": {"enum": ["send", "subscribe"]}
|
|
24
|
+
},
|
|
25
|
+
"message_types": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"uniqueItems": true,
|
|
28
|
+
"items": {"enum": ["request-yield", "announce-intent", "handoff", "done"]}
|
|
29
|
+
},
|
|
30
|
+
"delivery": {"const": "append-only"},
|
|
31
|
+
"authority": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"required": ["inbox_authoritative", "message_may_mutate_lease", "message_prompts_actor_to_call_store_op"],
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"properties": {
|
|
36
|
+
"inbox_authoritative": {"const": false},
|
|
37
|
+
"message_may_mutate_lease": {"const": false},
|
|
38
|
+
"message_prompts_actor_to_call_store_op": {
|
|
39
|
+
"const": true,
|
|
40
|
+
"description": "A message may cause an actor (a human or agent) to CALL a LeaseStore operation. It does not itself become or trigger a store mutation; the actor's explicit acquire/renew/release is the only thing that changes lease state."
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"omniagent_plus_mapping": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"properties": {
|
|
48
|
+
"worktree_lease": {"const": "consiliency.lease.v1"},
|
|
49
|
+
"handoff_packet": {"const": "handoff"}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://consiliency.io/contracts/coordination-scenario.schema.json",
|
|
4
|
+
"title": "Consiliency coordination conformance scenario",
|
|
5
|
+
"description": "A lease/inbox scenario: an ordered append-only lease-event stream, optional advisory inbox messages, and the evaluation clock. The current-lease VIEW is the projection of the event stream evaluated at `now`. Inbox messages are advisory and MUST NOT change the projected lease state.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "now", "events"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {"const": "consiliency.coordination_scenario.v1"},
|
|
11
|
+
"now": {"$ref": "#/$defs/isoTimestamp"},
|
|
12
|
+
"requested_mode": {"enum": ["soft", "hard"]},
|
|
13
|
+
"backend": {"enum": ["local-file", "portal", "coordinator", "none"]},
|
|
14
|
+
"atomic_backend": {"type": "boolean"},
|
|
15
|
+
"events": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {"$ref": "#/$defs/event"}
|
|
18
|
+
},
|
|
19
|
+
"messages": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {"$ref": "#/$defs/message"}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"$defs": {
|
|
25
|
+
"isoTimestamp": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
|
|
28
|
+
},
|
|
29
|
+
"event": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": ["event", "lease_id", "holder", "at"],
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"properties": {
|
|
34
|
+
"event": {"enum": ["acquire", "renew", "release", "expire"]},
|
|
35
|
+
"lease_id": {"type": "string", "pattern": "^[a-z0-9][a-z0-9_.:-]*$"},
|
|
36
|
+
"holder": {"type": "string", "minLength": 1},
|
|
37
|
+
"at": {"$ref": "#/$defs/isoTimestamp"},
|
|
38
|
+
"ttl_seconds": {"type": "integer", "minimum": 1, "maximum": 7200},
|
|
39
|
+
"mode": {"enum": ["soft", "hard"]},
|
|
40
|
+
"scope": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"required": ["granularity", "selector"],
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"properties": {
|
|
45
|
+
"granularity": {"enum": ["repo", "path-set", "symbol"]},
|
|
46
|
+
"selector": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"uniqueItems": true,
|
|
49
|
+
"items": {"type": "string", "minLength": 1}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"phase": {"type": "string", "minLength": 1}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"message": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"required": ["type", "from", "target_lease"],
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"properties": {
|
|
61
|
+
"type": {"enum": ["request-yield", "announce-intent", "handoff", "done"]},
|
|
62
|
+
"from": {"type": "string", "minLength": 1},
|
|
63
|
+
"target_lease": {"type": "string", "pattern": "^[a-z0-9][a-z0-9_.:-]*$"}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"schema": {"const": "consiliency.conformance_decision.v1"},
|
|
10
10
|
"status": {"enum": ["accepted", "rejected", "warn"]},
|
|
11
11
|
"maturity": {"enum": ["presence-only", "hash-checked", "realized-edge-observed"]},
|
|
12
|
+
"labels": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"uniqueItems": true,
|
|
15
|
+
"items": {"type": "string", "pattern": "^[a-z0-9][a-z0-9_.-]*$"}
|
|
16
|
+
},
|
|
12
17
|
"findings": {
|
|
13
18
|
"type": "array",
|
|
14
19
|
"items": {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://consiliency.io/contracts/governance-scope-scenario.schema.json",
|
|
4
|
+
"title": "Consiliency governance scope conformance scenario",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schema", "subject"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": {"const": "consiliency.governance_scope_scenario.v1"},
|
|
10
|
+
"adoption": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["adopted", "adopted_scope"],
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"properties": {
|
|
15
|
+
"adopted": {"type": "boolean"},
|
|
16
|
+
"adopted_scope": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"uniqueItems": true,
|
|
19
|
+
"items": {"enum": ["layout", "gates", "projections", "cert"]}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"governed_set": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"uniqueItems": true,
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["by", "value"],
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"properties": {
|
|
31
|
+
"by": {"enum": ["path", "glob", "class"]},
|
|
32
|
+
"value": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1,
|
|
35
|
+
"not": {"anyOf": [{"pattern": "^/"}, {"pattern": "(^|/)\\.\\.(/|$)"}, {"pattern": "^[A-Za-z]:[\\\\/]"}]}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"ignore_set": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"uniqueItems": true,
|
|
43
|
+
"items": {"type": "string", "minLength": 1}
|
|
44
|
+
},
|
|
45
|
+
"facet": {"enum": ["layout", "gates", "projections", "cert"]},
|
|
46
|
+
"subject": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": ["kind", "path"],
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"properties": {
|
|
51
|
+
"kind": {"const": "doc"},
|
|
52
|
+
"path": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"not": {"anyOf": [{"pattern": "^/"}, {"pattern": "(^|/)\\.\\.(/|$)"}, {"pattern": "^[A-Za-z]:[\\\\/]"}]}
|
|
56
|
+
},
|
|
57
|
+
"class": {"enum": ["intent-ground", "intent-plan", "proj-S", "proj-code", "ops-fact", "static", "index"]},
|
|
58
|
+
"observed_label": {"type": "string"}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -59,6 +59,8 @@
|
|
|
59
59
|
"interface_id": {"type": "string", "pattern": "^[a-z0-9][a-z0-9_.-]*$"},
|
|
60
60
|
"ref": {"$ref": "#/$defs/ref"},
|
|
61
61
|
"maturity": {"enum": ["presence-only", "hash-checked", "realized-edge-observed"]},
|
|
62
|
+
"governed": {"type": "boolean"},
|
|
63
|
+
"governance_label": {"enum": ["unmanaged", "foreign"]},
|
|
62
64
|
"evidence": {"type": "array", "items": {"$ref": "#/$defs/evidence"}},
|
|
63
65
|
"upstream_pin": {"type": "string"}
|
|
64
66
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://consiliency.io/contracts/lease-event.schema.json",
|
|
4
|
+
"title": "Consiliency lease event",
|
|
5
|
+
"description": "One entry in the append-only lease-event stream. The current-lease VIEW is a projection of this stream; the lease store is the sole source of truth for lease state.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "event", "lease_id", "holder", "at"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {"const": "consiliency.lease_event.v1"},
|
|
11
|
+
"event": {"enum": ["acquire", "renew", "release", "expire"]},
|
|
12
|
+
"lease_id": {"type": "string", "pattern": "^[a-z0-9][a-z0-9_.:-]*$"},
|
|
13
|
+
"holder": {"type": "string", "minLength": 1},
|
|
14
|
+
"at": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"},
|
|
15
|
+
"lease": {"$ref": "https://consiliency.io/contracts/lease.schema.json"}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://consiliency.io/contracts/lease-store-protocol.schema.json",
|
|
4
|
+
"title": "Consiliency lease store protocol",
|
|
5
|
+
"description": "The LeaseStore interface contract. The store is the SOLE source of truth for lease state; the coordination channel (inbox) is never authoritative. A lease is not a lock: it carries a TTL, a heartbeat, and auto-expiry.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "operations", "operation_semantics", "failure_modes", "source_of_truth", "atomicity", "expiry", "granularity_ladder", "backends"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {"const": "consiliency.lease_store_protocol.v1"},
|
|
11
|
+
"operations": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"uniqueItems": true,
|
|
14
|
+
"items": {"enum": ["acquire", "renew", "release", "query"]}
|
|
15
|
+
},
|
|
16
|
+
"source_of_truth": {"const": "lease-store"},
|
|
17
|
+
"atomicity": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["hard_requires_atomic_acquire", "degrade_without_atomic_backend"],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"hard_requires_atomic_acquire": {"const": true},
|
|
23
|
+
"degrade_without_atomic_backend": {"const": "soft"}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"expiry": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["ttl_authoritative", "heartbeat_renews", "auto_expiry", "expires_at_formula", "boundary"],
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"properties": {
|
|
31
|
+
"ttl_authoritative": {"const": true},
|
|
32
|
+
"heartbeat_renews": {"const": true},
|
|
33
|
+
"auto_expiry": {"const": true},
|
|
34
|
+
"expires_at_formula": {"const": "heartbeat_at + ttl_seconds"},
|
|
35
|
+
"boundary": {
|
|
36
|
+
"const": "exclusive",
|
|
37
|
+
"description": "A lease is held over [acquired_at, expires_at); the expires_at instant itself is NOT held. A lease is expired iff now >= heartbeat_at + ttl_seconds. This makes the contention instant deterministic across vendoring consumers."
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"operation_semantics": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"required": ["acquire", "renew", "release", "query"],
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"properties": {
|
|
46
|
+
"acquire": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": ["request", "response", "idempotent", "holder_only", "rejects"],
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"properties": {
|
|
51
|
+
"request": {"const": "lease_id, holder, ttl_seconds, mode, scope, phase"},
|
|
52
|
+
"response": {"const": "granted-lease | conflict"},
|
|
53
|
+
"idempotent": {"const": false},
|
|
54
|
+
"holder_only": {"const": false},
|
|
55
|
+
"rejects": {"type": "array", "uniqueItems": true, "items": {"enum": ["conflict", "not-holder", "not-found", "expired"]}}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"renew": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": ["request", "response", "idempotent", "holder_only", "rejects"],
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"properties": {
|
|
63
|
+
"request": {"const": "lease_id, holder"},
|
|
64
|
+
"response": {"const": "renewed-lease | rejected"},
|
|
65
|
+
"idempotent": {"const": true},
|
|
66
|
+
"holder_only": {"const": true},
|
|
67
|
+
"rejects": {"type": "array", "uniqueItems": true, "items": {"enum": ["conflict", "not-holder", "not-found", "expired"]}}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"release": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"required": ["request", "response", "idempotent", "holder_only", "rejects"],
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"properties": {
|
|
75
|
+
"request": {"const": "lease_id, holder"},
|
|
76
|
+
"response": {"const": "released | rejected"},
|
|
77
|
+
"idempotent": {"const": true},
|
|
78
|
+
"holder_only": {"const": true},
|
|
79
|
+
"rejects": {"type": "array", "uniqueItems": true, "items": {"enum": ["conflict", "not-holder", "not-found", "expired"]}}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"query": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"required": ["request", "response", "idempotent", "holder_only", "rejects"],
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"properties": {
|
|
87
|
+
"request": {"const": "lease_id | scope"},
|
|
88
|
+
"response": {"const": "current-lease | empty"},
|
|
89
|
+
"idempotent": {"const": true},
|
|
90
|
+
"holder_only": {"const": false},
|
|
91
|
+
"rejects": {"type": "array", "uniqueItems": true, "items": {"enum": ["conflict", "not-holder", "not-found", "expired"]}}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"failure_modes": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"uniqueItems": true,
|
|
99
|
+
"items": {"enum": ["conflict", "not-holder", "not-found", "expired"]}
|
|
100
|
+
},
|
|
101
|
+
"granularity_ladder": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"required": ["default", "opt_in", "out_of_scope"],
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"properties": {
|
|
106
|
+
"default": {"const": "path-set"},
|
|
107
|
+
"opt_in": {"const": "symbol"},
|
|
108
|
+
"out_of_scope": {"const": "line"}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"backends": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"uniqueItems": true,
|
|
114
|
+
"items": {"enum": ["local-file", "portal", "coordinator"]}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://consiliency.io/contracts/lease.schema.json",
|
|
4
|
+
"title": "Consiliency coordination lease",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schema", "lease_id", "holder", "acquired_at", "ttl_seconds", "heartbeat_at", "mode", "scope", "phase"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": {"const": "consiliency.lease.v1"},
|
|
10
|
+
"lease_id": {"type": "string", "pattern": "^[a-z0-9][a-z0-9_.:-]*$"},
|
|
11
|
+
"holder": {"type": "string", "minLength": 1},
|
|
12
|
+
"acquired_at": {"$ref": "#/$defs/isoTimestamp"},
|
|
13
|
+
"ttl_seconds": {"type": "integer", "minimum": 1, "maximum": 7200},
|
|
14
|
+
"heartbeat_at": {"$ref": "#/$defs/isoTimestamp"},
|
|
15
|
+
"mode": {"enum": ["soft", "hard"]},
|
|
16
|
+
"scope": {"$ref": "#/$defs/scope"},
|
|
17
|
+
"phase": {"type": "string", "minLength": 1}
|
|
18
|
+
},
|
|
19
|
+
"$defs": {
|
|
20
|
+
"isoTimestamp": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
|
|
23
|
+
},
|
|
24
|
+
"scope": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": ["granularity", "selector"],
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"properties": {
|
|
29
|
+
"granularity": {"enum": ["repo", "path-set", "symbol"]},
|
|
30
|
+
"selector": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"uniqueItems": true,
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"not": {"anyOf": [{"pattern": "^/"}, {"pattern": "(^|/)\\.\\.(/|$)"}, {"pattern": "^[A-Za-z]:[\\\\/]"}]}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|