core-runtime-engine 11.5.1__py3-none-any.whl

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 (96) hide show
  1. core_runtime/__init__.py +10 -0
  2. core_runtime/__version__.py +17 -0
  3. core_runtime/cli/__init__.py +7 -0
  4. core_runtime/cli/__main__.py +22 -0
  5. core_runtime/cli/bump_version.py +176 -0
  6. core_runtime/cli/contract_preflight.py +69 -0
  7. core_runtime/cli/create_domain.py +66 -0
  8. core_runtime/cli/doctor.py +44 -0
  9. core_runtime/cli/inventory.py +85 -0
  10. core_runtime/cli/lint.py +8 -0
  11. core_runtime/cli/main.py +579 -0
  12. core_runtime/cli/release_check.py +65 -0
  13. core_runtime/cli/repair_artifact_paths.py +48 -0
  14. core_runtime/cli/sync_template.py +67 -0
  15. core_runtime/cli/validate.py +73 -0
  16. core_runtime/core/__init__.py +34 -0
  17. core_runtime/core/audit_event.py +760 -0
  18. core_runtime/core/audit_trail_index.py +100 -0
  19. core_runtime/core/canonicalization.py +55 -0
  20. core_runtime/core/contract_evaluator.py +945 -0
  21. core_runtime/core/contract_executability.py +307 -0
  22. core_runtime/core/contract_loader.py +57 -0
  23. core_runtime/core/contract_probes.py +630 -0
  24. core_runtime/core/contract_program.py +131 -0
  25. core_runtime/core/contract_program_registry.py +104 -0
  26. core_runtime/core/contract_program_v2.py +126 -0
  27. core_runtime/core/dsk_v3.py +142 -0
  28. core_runtime/core/explainability.py +2115 -0
  29. core_runtime/core/numeric_normalization.py +120 -0
  30. core_runtime/core/rule_anchor.py +1388 -0
  31. core_runtime/core/schema_fingerprint.py +69 -0
  32. core_runtime/core/sensor_evidence.py +548 -0
  33. core_runtime/data/contracts/CoreAnchor.sol +109 -0
  34. core_runtime/data/contracts/CoreRuleAnchor.abi.json +111 -0
  35. core_runtime/data/contracts/CoreRuleAnchor.bin +1 -0
  36. core_runtime/data/contracts/CoreRuleAnchor.build.json +20 -0
  37. core_runtime/data/contracts/CoreRuleAnchor.runtime.bin +1 -0
  38. core_runtime/data/contracts/CoreRuleAnchor.sol +74 -0
  39. core_runtime/data/package_data_manifest.v1.json +173 -0
  40. core_runtime/data/schemas/core/causal_trace.v1.json +141 -0
  41. core_runtime/data/schemas/core/context_gate.v1.json +38 -0
  42. core_runtime/data/schemas/core/context_threshold.v1.json +46 -0
  43. core_runtime/data/schemas/core/contract_program.v1.json +186 -0
  44. core_runtime/data/schemas/core/contract_program.v2.json +187 -0
  45. core_runtime/data/schemas/core/control_decision.v1.json +114 -0
  46. core_runtime/data/schemas/core/dsk.v3.json +105 -0
  47. core_runtime/data/schemas/core/effect_result.v1.json +39 -0
  48. core_runtime/data/schemas/core/entropy_signal.v1.json +108 -0
  49. core_runtime/data/schemas/core/execution_receipt.v1.json +93 -0
  50. core_runtime/data/schemas/core/frozen_release_manifest.v1.json +87 -0
  51. core_runtime/data/schemas/core/frozen_release_manifest.v2.json +72 -0
  52. core_runtime/data/schemas/core/frozen_release_manifest.v3.json +38 -0
  53. core_runtime/data/schemas/core/frozen_release_manifest.v4.json +72 -0
  54. core_runtime/data/schemas/core/frozen_release_manifest.v5.json +38 -0
  55. core_runtime/data/schemas/core/frozen_release_manifest.v6.json +116 -0
  56. core_runtime/data/schemas/core/frozen_release_manifest.v7.json +37 -0
  57. core_runtime/data/schemas/core/frozen_release_manifest.v8.json +114 -0
  58. core_runtime/data/schemas/core/frozen_rule_set.v1.json +282 -0
  59. core_runtime/data/schemas/core/memory_artifact.v1.json +120 -0
  60. core_runtime/data/schemas/core/memory_generation_result.v1.json +37 -0
  61. core_runtime/data/schemas/core/operational_learning_event.v1.json +63 -0
  62. core_runtime/data/schemas/core/pattern_candidate.v1.json +114 -0
  63. core_runtime/data/schemas/core/physical_safety_assurance_case.v1.json +676 -0
  64. core_runtime/data/schemas/core/policy_lifecycle.v1.json +99 -0
  65. core_runtime/data/schemas/core/retention_manifest.v1.json +53 -0
  66. core_runtime/data/schemas/core/reversibility_policy.v1.json +107 -0
  67. core_runtime/data/schemas/core/rule_anchor_batch.v1.json +93 -0
  68. core_runtime/data/schemas/core/rule_anchor_chain_evidence.v1.json +56 -0
  69. core_runtime/data/schemas/core/rule_approval.v1.json +49 -0
  70. core_runtime/data/schemas/core/rule_approval_request.v1.json +42 -0
  71. core_runtime/data/schemas/core/state_transition.v1.json +115 -0
  72. core_runtime/data/schemas/core/task_closeout.v1.json +47 -0
  73. core_runtime/data/schemas/core/template_promotion_candidate.v1.json +83 -0
  74. core_runtime/data/schemas/core/unsigned_rule_anchor_deployment.v1.json +106 -0
  75. core_runtime/data/schemas/core/unsigned_rule_anchor_transaction.v1.json +116 -0
  76. core_runtime/tooling/__init__.py +48 -0
  77. core_runtime/tooling/bump_version.py +900 -0
  78. core_runtime/tooling/contract_preflight.py +293 -0
  79. core_runtime/tooling/create_domain.py +254 -0
  80. core_runtime/tooling/diagnostics.py +129 -0
  81. core_runtime/tooling/doctor.py +482 -0
  82. core_runtime/tooling/file_inventory.py +182 -0
  83. core_runtime/tooling/json_checks.py +100 -0
  84. core_runtime/tooling/release_check.py +1017 -0
  85. core_runtime/tooling/repair_artifact_paths.py +458 -0
  86. core_runtime/tooling/report_writer.py +176 -0
  87. core_runtime/tooling/repository_inventory.py +399 -0
  88. core_runtime/tooling/safety_checks.py +172 -0
  89. core_runtime/tooling/sync_template.py +303 -0
  90. core_runtime/tooling/validation.py +507 -0
  91. core_runtime/tooling/version_inventory.py +256 -0
  92. core_runtime_engine-11.5.1.dist-info/METADATA +35 -0
  93. core_runtime_engine-11.5.1.dist-info/RECORD +96 -0
  94. core_runtime_engine-11.5.1.dist-info/WHEEL +5 -0
  95. core_runtime_engine-11.5.1.dist-info/entry_points.txt +2 -0
  96. core_runtime_engine-11.5.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,99 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://core-runtime-engine.local/schemas/core/policy_lifecycle.v1.json",
4
+ "title": "PolicyLifecycle.v1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema_version",
9
+ "type",
10
+ "policy_id",
11
+ "policy_version",
12
+ "status",
13
+ "effective_from",
14
+ "effective_to",
15
+ "supersedes",
16
+ "scope",
17
+ "change_reason",
18
+ "approval_refs",
19
+ "fingerprint"
20
+ ],
21
+ "properties": {
22
+ "schema_version": {
23
+ "type": "string",
24
+ "const": "core.policy_lifecycle.v1"
25
+ },
26
+ "type": {
27
+ "type": "string",
28
+ "const": "policy_lifecycle"
29
+ },
30
+ "policy_id": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "policy_version": {
35
+ "type": "string",
36
+ "minLength": 1
37
+ },
38
+ "status": {
39
+ "type": "string",
40
+ "enum": ["draft", "active", "superseded", "retired"]
41
+ },
42
+ "effective_from": {
43
+ "type": "string",
44
+ "minLength": 1
45
+ },
46
+ "effective_to": {
47
+ "type": ["string", "null"],
48
+ "minLength": 1
49
+ },
50
+ "supersedes": {
51
+ "type": ["string", "null"],
52
+ "minLength": 1,
53
+ "pattern": "^(?!/).+"
54
+ },
55
+ "scope": {
56
+ "type": "object",
57
+ "additionalProperties": true
58
+ },
59
+ "change_reason": {
60
+ "type": "string",
61
+ "minLength": 1
62
+ },
63
+ "approval_refs": {
64
+ "type": "array",
65
+ "minItems": 1,
66
+ "items": {
67
+ "type": "string",
68
+ "minLength": 1,
69
+ "pattern": "^(?!/).+"
70
+ }
71
+ },
72
+ "source_refs": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string",
76
+ "minLength": 1,
77
+ "pattern": "^(?!/).+"
78
+ }
79
+ },
80
+ "evidence_refs": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "string",
84
+ "minLength": 1,
85
+ "pattern": "^(?!/).+"
86
+ }
87
+ },
88
+ "fingerprint": {
89
+ "type": "string",
90
+ "minLength": 1
91
+ },
92
+ "warnings": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "string"
96
+ }
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://core-runtime-engine.local/schemas/core/retention_manifest.v1.json",
4
+ "title": "RetentionManifest.v1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schema_version", "entries"],
8
+ "properties": {
9
+ "schema_version": {
10
+ "type": "string",
11
+ "const": "core.retention_manifest.v1"
12
+ },
13
+ "entries": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "object",
17
+ "required": ["source_type", "source_id", "artifact_ref", "retention_class", "reason"],
18
+ "properties": {
19
+ "source_type": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "source_id": {
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "artifact_ref": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "retention_class": {
32
+ "type": "string",
33
+ "enum": ["keep", "compress", "forget", "quarantine"]
34
+ },
35
+ "reason": {
36
+ "type": "string",
37
+ "minLength": 1
38
+ },
39
+ "checksum": {
40
+ "type": "string"
41
+ },
42
+ "action": {
43
+ "type": "string"
44
+ },
45
+ "restore_ref": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "additionalProperties": true
50
+ }
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://core-runtime-engine.local/schemas/core/reversibility_policy.v1.json",
4
+ "title": "ReversibilityPolicy.v1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema_version",
9
+ "type",
10
+ "policy_id",
11
+ "action_family",
12
+ "reversibility_class",
13
+ "compensation_required",
14
+ "human_approval_required",
15
+ "stop_conditions",
16
+ "evidence_required",
17
+ "notes",
18
+ "source_refs",
19
+ "evidence_refs",
20
+ "created_at",
21
+ "fingerprint"
22
+ ],
23
+ "properties": {
24
+ "schema_version": {
25
+ "type": "string",
26
+ "const": "core.reversibility_policy.v1"
27
+ },
28
+ "type": {
29
+ "type": "string",
30
+ "const": "reversibility_policy"
31
+ },
32
+ "policy_id": {
33
+ "type": "string",
34
+ "minLength": 1
35
+ },
36
+ "action_family": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "reversibility_class": {
41
+ "type": "string",
42
+ "enum": ["reversible", "compensable", "irreversible", "unknown"]
43
+ },
44
+ "compensation_required": {
45
+ "type": "boolean"
46
+ },
47
+ "human_approval_required": {
48
+ "type": "boolean"
49
+ },
50
+ "stop_conditions": {
51
+ "type": "array",
52
+ "minItems": 1,
53
+ "items": {
54
+ "type": "string",
55
+ "minLength": 1
56
+ }
57
+ },
58
+ "evidence_required": {
59
+ "type": "array",
60
+ "minItems": 1,
61
+ "items": {
62
+ "type": "string",
63
+ "minLength": 1
64
+ }
65
+ },
66
+ "notes": {
67
+ "type": "array",
68
+ "minItems": 1,
69
+ "items": {
70
+ "type": "string",
71
+ "minLength": 1
72
+ }
73
+ },
74
+ "source_refs": {
75
+ "type": "array",
76
+ "minItems": 1,
77
+ "items": {
78
+ "type": "string",
79
+ "minLength": 1,
80
+ "pattern": "^(?!/).+"
81
+ }
82
+ },
83
+ "evidence_refs": {
84
+ "type": "array",
85
+ "minItems": 1,
86
+ "items": {
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "pattern": "^(?!/).+"
90
+ }
91
+ },
92
+ "created_at": {
93
+ "type": "string",
94
+ "minLength": 1
95
+ },
96
+ "fingerprint": {
97
+ "type": "string",
98
+ "minLength": 1
99
+ },
100
+ "warnings": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "string"
104
+ }
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://core.antillanca.dev/schemas/core/rule_anchor_batch.v1.json",
4
+ "title": "RuleAnchorBatch.v1",
5
+ "description": "A deterministic SHA-256 Merkle batch of approved frozen rule sets.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "type",
11
+ "batch_id",
12
+ "hash_algorithm",
13
+ "merkle_scheme",
14
+ "chain_id",
15
+ "verifying_contract",
16
+ "rule_set_count",
17
+ "visibility_mask",
18
+ "entries",
19
+ "merkle_root",
20
+ "manifest_fingerprint"
21
+ ],
22
+ "properties": {
23
+ "schema_version": {"const": "core.rule_anchor_batch.v1"},
24
+ "type": {"const": "rule_anchor_batch"},
25
+ "batch_id": {
26
+ "type": "string",
27
+ "pattern": "^rule-anchor-batch:[a-f0-9]{24}$"
28
+ },
29
+ "hash_algorithm": {"const": "sha256"},
30
+ "merkle_scheme": {"const": "core.sha256_merkle.v1"},
31
+ "chain_id": {"type": "integer", "minimum": 1},
32
+ "verifying_contract": {"$ref": "#/definitions/address"},
33
+ "rule_set_count": {
34
+ "type": "integer",
35
+ "minimum": 1,
36
+ "maximum": 4294967295
37
+ },
38
+ "visibility_mask": {"type": "integer", "minimum": 1, "maximum": 3},
39
+ "entries": {
40
+ "type": "array",
41
+ "minItems": 1,
42
+ "items": {"$ref": "#/definitions/entry"}
43
+ },
44
+ "merkle_root": {"$ref": "#/definitions/fingerprint"},
45
+ "manifest_fingerprint": {"$ref": "#/definitions/fingerprint"}
46
+ },
47
+ "definitions": {
48
+ "fingerprint": {
49
+ "type": "string",
50
+ "pattern": "^sha256:[a-f0-9]{64}$"
51
+ },
52
+ "address": {
53
+ "type": "string",
54
+ "pattern": "^0x[a-fA-F0-9]{40}$"
55
+ },
56
+ "proof_node": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["position", "hash"],
60
+ "properties": {
61
+ "position": {"enum": ["left", "right"]},
62
+ "hash": {"$ref": "#/definitions/fingerprint"}
63
+ }
64
+ },
65
+ "entry": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "rule_set_fingerprint",
70
+ "rule_class",
71
+ "visibility",
72
+ "approval_fingerprints",
73
+ "leaf_hash",
74
+ "proof"
75
+ ],
76
+ "properties": {
77
+ "rule_set_fingerprint": {"$ref": "#/definitions/fingerprint"},
78
+ "rule_class": {"enum": ["general", "personal"]},
79
+ "visibility": {"enum": ["public", "private_commitment"]},
80
+ "approval_fingerprints": {
81
+ "type": "array",
82
+ "minItems": 1,
83
+ "items": {"$ref": "#/definitions/fingerprint"}
84
+ },
85
+ "leaf_hash": {"$ref": "#/definitions/fingerprint"},
86
+ "proof": {
87
+ "type": "array",
88
+ "items": {"$ref": "#/definitions/proof_node"}
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://core.antillanca.dev/schemas/core/rule_anchor_chain_evidence.v1.json",
4
+ "title": "RuleAnchorChainEvidence.v1",
5
+ "description": "Read-only evidence that an exact frozen-rule batch was confirmed by CoreRuleAnchor.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "type",
11
+ "batch_manifest_fingerprint",
12
+ "merkle_root",
13
+ "chain_id",
14
+ "contract_address",
15
+ "transaction_hash",
16
+ "block_number",
17
+ "block_hash",
18
+ "anchorer",
19
+ "block_timestamp",
20
+ "confirmations",
21
+ "required_confirmations",
22
+ "contract_state_verified",
23
+ "calldata_verified",
24
+ "event_verified",
25
+ "fingerprint"
26
+ ],
27
+ "properties": {
28
+ "schema_version": {"const": "core.rule_anchor_chain_evidence.v1"},
29
+ "type": {"const": "rule_anchor_chain_evidence"},
30
+ "batch_manifest_fingerprint": {"$ref": "#/definitions/fingerprint"},
31
+ "merkle_root": {"$ref": "#/definitions/fingerprint"},
32
+ "chain_id": {"type": "integer", "minimum": 1},
33
+ "contract_address": {"$ref": "#/definitions/address"},
34
+ "transaction_hash": {"type": "string", "pattern": "^0x[a-fA-F0-9]{64}$"},
35
+ "block_number": {"type": "integer", "minimum": 0},
36
+ "block_hash": {"type": "string", "pattern": "^0x[a-fA-F0-9]{64}$"},
37
+ "anchorer": {"$ref": "#/definitions/address"},
38
+ "block_timestamp": {"type": "integer", "minimum": 1},
39
+ "confirmations": {"type": "integer", "minimum": 1},
40
+ "required_confirmations": {"type": "integer", "minimum": 1},
41
+ "contract_state_verified": {"const": true},
42
+ "calldata_verified": {"const": true},
43
+ "event_verified": {"const": true},
44
+ "fingerprint": {"$ref": "#/definitions/fingerprint"}
45
+ },
46
+ "definitions": {
47
+ "fingerprint": {
48
+ "type": "string",
49
+ "pattern": "^sha256:[a-f0-9]{64}$"
50
+ },
51
+ "address": {
52
+ "type": "string",
53
+ "pattern": "^0x[a-fA-F0-9]{40}$"
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://core.antillanca.dev/schemas/core/rule_approval.v1.json",
4
+ "title": "RuleApproval.v1",
5
+ "description": "A cryptographically verifiable approval produced by an external EVM wallet.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "type",
11
+ "approval_request_fingerprint",
12
+ "rule_set_fingerprint",
13
+ "chain_id",
14
+ "verifying_contract",
15
+ "signer",
16
+ "signature_scheme",
17
+ "decision",
18
+ "message",
19
+ "signature",
20
+ "fingerprint"
21
+ ],
22
+ "properties": {
23
+ "schema_version": {"const": "core.rule_approval.v1"},
24
+ "type": {"const": "rule_approval"},
25
+ "approval_request_fingerprint": {"$ref": "#/definitions/fingerprint"},
26
+ "rule_set_fingerprint": {"$ref": "#/definitions/fingerprint"},
27
+ "chain_id": {"type": "integer", "minimum": 1},
28
+ "verifying_contract": {"$ref": "#/definitions/address"},
29
+ "signer": {"$ref": "#/definitions/address"},
30
+ "signature_scheme": {"const": "eip191_secp256k1"},
31
+ "decision": {"const": "approve_frozen_rule_set"},
32
+ "message": {"type": "string", "minLength": 1, "maxLength": 1024},
33
+ "signature": {
34
+ "type": "string",
35
+ "pattern": "^0x[a-fA-F0-9]{130}$"
36
+ },
37
+ "fingerprint": {"$ref": "#/definitions/fingerprint"}
38
+ },
39
+ "definitions": {
40
+ "fingerprint": {
41
+ "type": "string",
42
+ "pattern": "^sha256:[a-f0-9]{64}$"
43
+ },
44
+ "address": {
45
+ "type": "string",
46
+ "pattern": "^0x[a-fA-F0-9]{40}$"
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://core.antillanca.dev/schemas/core/rule_approval_request.v1.json",
4
+ "title": "RuleApprovalRequest.v1",
5
+ "description": "A public message for an external wallet to review and sign. It never contains signing secrets.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "type",
11
+ "rule_set_fingerprint",
12
+ "chain_id",
13
+ "verifying_contract",
14
+ "signer",
15
+ "signature_scheme",
16
+ "decision",
17
+ "message",
18
+ "fingerprint"
19
+ ],
20
+ "properties": {
21
+ "schema_version": {"const": "core.rule_approval_request.v1"},
22
+ "type": {"const": "rule_approval_request"},
23
+ "rule_set_fingerprint": {"$ref": "#/definitions/fingerprint"},
24
+ "chain_id": {"type": "integer", "minimum": 1},
25
+ "verifying_contract": {"$ref": "#/definitions/address"},
26
+ "signer": {"$ref": "#/definitions/address"},
27
+ "signature_scheme": {"const": "eip191_secp256k1"},
28
+ "decision": {"const": "approve_frozen_rule_set"},
29
+ "message": {"type": "string", "minLength": 1, "maxLength": 1024},
30
+ "fingerprint": {"$ref": "#/definitions/fingerprint"}
31
+ },
32
+ "definitions": {
33
+ "fingerprint": {
34
+ "type": "string",
35
+ "pattern": "^sha256:[a-f0-9]{64}$"
36
+ },
37
+ "address": {
38
+ "type": "string",
39
+ "pattern": "^0x[a-fA-F0-9]{40}$"
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,115 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://core-runtime-engine.local/schemas/core/state_transition.v1.json",
4
+ "title": "StateTransition.v1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "schema_version",
9
+ "type",
10
+ "transition_id",
11
+ "source_type",
12
+ "source_id",
13
+ "before_ref",
14
+ "after_ref",
15
+ "cause_refs",
16
+ "effect_refs",
17
+ "actor_kind",
18
+ "timestamp",
19
+ "reversibility_class",
20
+ "source_refs",
21
+ "evidence_refs",
22
+ "fingerprint"
23
+ ],
24
+ "properties": {
25
+ "schema_version": {
26
+ "type": "string",
27
+ "const": "core.state_transition.v1"
28
+ },
29
+ "type": {
30
+ "type": "string",
31
+ "const": "state_transition"
32
+ },
33
+ "transition_id": {
34
+ "type": "string",
35
+ "minLength": 1
36
+ },
37
+ "source_type": {
38
+ "type": "string",
39
+ "minLength": 1
40
+ },
41
+ "source_id": {
42
+ "type": "string",
43
+ "minLength": 1
44
+ },
45
+ "before_ref": {
46
+ "type": "string",
47
+ "minLength": 1,
48
+ "pattern": "^(?!/).+"
49
+ },
50
+ "after_ref": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "pattern": "^(?!/).+"
54
+ },
55
+ "cause_refs": {
56
+ "type": "array",
57
+ "minItems": 1,
58
+ "items": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "pattern": "^(?!/).+"
62
+ }
63
+ },
64
+ "effect_refs": {
65
+ "type": "array",
66
+ "minItems": 1,
67
+ "items": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "pattern": "^(?!/).+"
71
+ }
72
+ },
73
+ "actor_kind": {
74
+ "type": "string",
75
+ "minLength": 1
76
+ },
77
+ "timestamp": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ },
81
+ "reversibility_class": {
82
+ "type": "string",
83
+ "enum": ["reversible", "compensable", "irreversible", "unknown"]
84
+ },
85
+ "source_refs": {
86
+ "type": "array",
87
+ "minItems": 1,
88
+ "items": {
89
+ "type": "string",
90
+ "minLength": 1,
91
+ "pattern": "^(?!/).+"
92
+ }
93
+ },
94
+ "evidence_refs": {
95
+ "type": "array",
96
+ "minItems": 1,
97
+ "items": {
98
+ "type": "string",
99
+ "minLength": 1,
100
+ "pattern": "^(?!/).+"
101
+ }
102
+ },
103
+ "fingerprint": {
104
+ "type": "string",
105
+ "minLength": 1
106
+ },
107
+ "notes": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "string",
111
+ "minLength": 1
112
+ }
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://core-runtime-engine.local/schemas/core/task_closeout.v1.json",
4
+ "title": "TaskCloseout.v1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schema_version", "status", "source_type", "source_id", "summary"],
8
+ "properties": {
9
+ "schema_version": {
10
+ "type": "string",
11
+ "const": "core.task_closeout.v1"
12
+ },
13
+ "status": {
14
+ "type": "string"
15
+ },
16
+ "source_type": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "source_id": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "summary": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "report_ref": {
29
+ "type": "string"
30
+ },
31
+ "next_context_action": {
32
+ "type": "string"
33
+ },
34
+ "memory_generation_result": {
35
+ "type": "object"
36
+ },
37
+ "context_threshold_result": {
38
+ "type": "object"
39
+ },
40
+ "effect_results": {
41
+ "type": "array"
42
+ },
43
+ "events_ref": {
44
+ "type": "string"
45
+ }
46
+ }
47
+ }