@logicsrc/schemas 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/fixtures/agent.yaml +20 -0
- package/fixtures/agentad-ad.yaml +33 -0
- package/fixtures/agentad-placement.yaml +21 -0
- package/fixtures/opencontext/conformance.json +279 -0
- package/fixtures/opencontext/invalid/audit-event-missing-actor.json +5 -0
- package/fixtures/opencontext/invalid/audit-event-unknown-event.json +9 -0
- package/fixtures/opencontext/invalid/bundle-bad-digest.json +11 -0
- package/fixtures/opencontext/invalid/bundle-bad-id.json +11 -0
- package/fixtures/opencontext/invalid/bundle-missing-digest.json +10 -0
- package/fixtures/opencontext/invalid/bundle-unknown-exclusion-reason.json +17 -0
- package/fixtures/opencontext/invalid/decision-bad-status.json +7 -0
- package/fixtures/opencontext/invalid/decision-missing-decision.json +5 -0
- package/fixtures/opencontext/invalid/decision-wrong-type.json +6 -0
- package/fixtures/opencontext/invalid/diagnostic-missing-ok.json +4 -0
- package/fixtures/opencontext/invalid/diagnostic-unknown-code.json +11 -0
- package/fixtures/opencontext/invalid/manifest-bad-authority.json +10 -0
- package/fixtures/opencontext/invalid/manifest-bad-extension.json +9 -0
- package/fixtures/opencontext/invalid/manifest-bad-id.json +4 -0
- package/fixtures/opencontext/invalid/manifest-bad-ttl.json +7 -0
- package/fixtures/opencontext/invalid/manifest-missing-version.json +3 -0
- package/fixtures/opencontext/invalid/manifest-role-bad-pattern.json +11 -0
- package/fixtures/opencontext/invalid/manifest-unknown-key.json +5 -0
- package/fixtures/opencontext/invalid/object-bad-digest.json +10 -0
- package/fixtures/opencontext/invalid/object-bad-id.json +4 -0
- package/fixtures/opencontext/invalid/object-bad-layer.json +5 -0
- package/fixtures/opencontext/invalid/object-bad-redaction-mode.json +10 -0
- package/fixtures/opencontext/invalid/object-bad-supersedes.json +7 -0
- package/fixtures/opencontext/invalid/object-confidence-out-of-range.json +5 -0
- package/fixtures/opencontext/invalid/object-extra-property.json +5 -0
- package/fixtures/opencontext/invalid/object-missing-id.json +3 -0
- package/fixtures/opencontext/invalid/object-missing-type.json +3 -0
- package/fixtures/opencontext/invalid/object-source-without-uri.json +9 -0
- package/fixtures/opencontext/invalid/object-unknown-authority.json +5 -0
- package/fixtures/opencontext/invalid/object-unknown-classification.json +5 -0
- package/fixtures/opencontext/invalid/object-unknown-trust.json +5 -0
- package/fixtures/opencontext/invalid/provenance-canonical-false.json +4 -0
- package/fixtures/opencontext/invalid/provenance-no-source.json +3 -0
- package/fixtures/opencontext/invalid/role-bad-classification.json +4 -0
- package/fixtures/opencontext/invalid/role-bad-include.json +6 -0
- package/fixtures/opencontext/invalid-manifest.json +177 -0
- package/fixtures/opencontext/resolution/authority-conflict/context/policies/refunds-observed.md +10 -0
- package/fixtures/opencontext/resolution/authority-conflict/context/policies/refunds.md +12 -0
- package/fixtures/opencontext/resolution/authority-conflict/expected.json +21 -0
- package/fixtures/opencontext/resolution/authority-conflict/opencontext.yaml +11 -0
- package/fixtures/opencontext/resolution/classification-ceiling/context/docs/handbook.md +11 -0
- package/fixtures/opencontext/resolution/classification-ceiling/context/docs/litigation.md +11 -0
- package/fixtures/opencontext/resolution/classification-ceiling/expected.json +32 -0
- package/fixtures/opencontext/resolution/classification-ceiling/opencontext.yaml +16 -0
- package/fixtures/opencontext/resolution/deny-overrides-allow/context/mission.md +10 -0
- package/fixtures/opencontext/resolution/deny-overrides-allow/context/policies/internal/margins.md +10 -0
- package/fixtures/opencontext/resolution/deny-overrides-allow/context/policies/refunds.md +10 -0
- package/fixtures/opencontext/resolution/deny-overrides-allow/expected.json +19 -0
- package/fixtures/opencontext/resolution/deny-overrides-allow/opencontext.yaml +17 -0
- package/fixtures/opencontext/resolution/duplicate-canonical/context/policies/refunds-rewrite.md +12 -0
- package/fixtures/opencontext/resolution/duplicate-canonical/context/policies/refunds.md +12 -0
- package/fixtures/opencontext/resolution/duplicate-canonical/expected.json +10 -0
- package/fixtures/opencontext/resolution/duplicate-canonical/opencontext.yaml +11 -0
- package/fixtures/opencontext/resolution/lifecycle/context/notes/current.md +11 -0
- package/fixtures/opencontext/resolution/lifecycle/context/notes/expired.md +12 -0
- package/fixtures/opencontext/resolution/lifecycle/context/notes/future.md +12 -0
- package/fixtures/opencontext/resolution/lifecycle/context/notes/stale.md +11 -0
- package/fixtures/opencontext/resolution/lifecycle/expected.json +30 -0
- package/fixtures/opencontext/resolution/lifecycle/opencontext.yaml +14 -0
- package/fixtures/opencontext/resolution/object-permissions/context/policies/payroll.md +12 -0
- package/fixtures/opencontext/resolution/object-permissions/context/policies/refunds.md +10 -0
- package/fixtures/opencontext/resolution/object-permissions/expected.json +32 -0
- package/fixtures/opencontext/resolution/object-permissions/opencontext.yaml +14 -0
- package/fixtures/opencontext/resolution/redaction/context/customers/acme.json +21 -0
- package/fixtures/opencontext/resolution/redaction/expected.json +28 -0
- package/fixtures/opencontext/resolution/redaction/opencontext.yaml +19 -0
- package/fixtures/opencontext/resolution/supersession/context/pricing/enterprise.v1.md +12 -0
- package/fixtures/opencontext/resolution/supersession/context/pricing/enterprise.v2.md +14 -0
- package/fixtures/opencontext/resolution/supersession/expected.json +33 -0
- package/fixtures/opencontext/resolution/supersession/opencontext.yaml +11 -0
- package/fixtures/opencontext/valid/audit-event.json +26 -0
- package/fixtures/opencontext/valid/bundle.json +67 -0
- package/fixtures/opencontext/valid/decision.json +51 -0
- package/fixtures/opencontext/valid/diagnostic.json +37 -0
- package/fixtures/opencontext/valid/manifest-minimal.json +4 -0
- package/fixtures/opencontext/valid/manifest.json +134 -0
- package/fixtures/opencontext/valid/object-minimal.json +4 -0
- package/fixtures/opencontext/valid/object-policy.json +75 -0
- package/fixtures/opencontext/valid/object-structured.json +34 -0
- package/fixtures/opencontext/valid/object-untrusted.json +19 -0
- package/fixtures/opencontext/valid/provenance-canonical.json +4 -0
- package/fixtures/opencontext/valid/provenance.json +14 -0
- package/fixtures/opencontext/valid/role.json +38 -0
- package/fixtures/openontology/conformance.json +158 -0
- package/fixtures/openontology/invalid/action-no-permissions.json +13 -0
- package/fixtures/openontology/invalid/changeset-empty-operations.json +10 -0
- package/fixtures/openontology/invalid/changeset-unknown-op.json +15 -0
- package/fixtures/openontology/invalid/claim-both-objects.json +14 -0
- package/fixtures/openontology/invalid/claim-confidence-out-of-range.json +14 -0
- package/fixtures/openontology/invalid/claim-extra-property.json +14 -0
- package/fixtures/openontology/invalid/claim-unknown-status.json +13 -0
- package/fixtures/openontology/invalid/entity-missing-canonical-name.json +8 -0
- package/fixtures/openontology/invalid/evidence-unknown-selector.json +10 -0
- package/fixtures/openontology/invalid/manifest-bad-id.json +15 -0
- package/fixtures/openontology/invalid/manifest-bad-version.json +15 -0
- package/fixtures/openontology/invalid/manifest-no-maintainer.json +11 -0
- package/fixtures/openontology/invalid/relationship-no-range.json +11 -0
- package/fixtures/openontology/valid/action.json +29 -0
- package/fixtures/openontology/valid/approval.json +12 -0
- package/fixtures/openontology/valid/changeset.json +34 -0
- package/fixtures/openontology/valid/claim-relationship.json +23 -0
- package/fixtures/openontology/valid/claim-value.json +15 -0
- package/fixtures/openontology/valid/constraint.json +12 -0
- package/fixtures/openontology/valid/entity-type.json +16 -0
- package/fixtures/openontology/valid/entity.json +16 -0
- package/fixtures/openontology/valid/event.json +17 -0
- package/fixtures/openontology/valid/evidence.json +12 -0
- package/fixtures/openontology/valid/manifest.json +21 -0
- package/fixtures/openontology/valid/namespace.json +7 -0
- package/fixtures/openontology/valid/property.json +8 -0
- package/fixtures/openontology/valid/query-adhoc.json +16 -0
- package/fixtures/openontology/valid/query.json +24 -0
- package/fixtures/openontology/valid/relationship-type.json +16 -0
- package/fixtures/openontology/valid/review.json +17 -0
- package/fixtures/openontology/valid/source.json +13 -0
- package/fixtures/openprd/conformance.json +104 -0
- package/fixtures/openprd/invalid/bad-filename.md +41 -0
- package/fixtures/openprd/invalid/bad-id-format.md +41 -0
- package/fixtures/openprd/invalid/bad-status.md +41 -0
- package/fixtures/openprd/invalid/dates-backwards.md +43 -0
- package/fixtures/openprd/invalid/duplicate-requirement.md +42 -0
- package/fixtures/openprd/invalid/id-mismatch.md +41 -0
- package/fixtures/openprd/invalid/missing-section.md +37 -0
- package/fixtures/openprd/invalid/missing-title.md +40 -0
- package/fixtures/openprd/invalid/no-front-matter.md +33 -0
- package/fixtures/openprd/invalid/out-of-order.md +41 -0
- package/fixtures/openprd/invalid/superseded-without-replacement.md +41 -0
- package/fixtures/openprd/invalid/unknown-key.md +42 -0
- package/fixtures/openprd/valid/bold-requirements.md +41 -0
- package/fixtures/openprd/valid/full.md +48 -0
- package/fixtures/openprd/valid/minimal.md +41 -0
- package/fixtures/openprd/valid/none-sections.md +41 -0
- package/fixtures/openprd/valid/subsections.md +47 -0
- package/fixtures/openprd/valid/superseded.md +42 -0
- package/fixtures/openprd-prd.yaml +12 -0
- package/fixtures/pull-request.yaml +24 -0
- package/fixtures/repo.yaml +27 -0
- package/fixtures/task.yaml +26 -0
- package/package.json +91 -0
- package/schemas/agentad-ad-request.schema.json +32 -0
- package/schemas/agentad-ad-response.schema.json +31 -0
- package/schemas/agentad-ad.schema.json +79 -0
- package/schemas/agentad-campaign.schema.json +40 -0
- package/schemas/agentad-click.schema.json +23 -0
- package/schemas/agentad-impression.schema.json +18 -0
- package/schemas/agentad-placement.schema.json +46 -0
- package/schemas/logicsrc-account-audit-event.schema.json +31 -0
- package/schemas/logicsrc-account-grant.schema.json +48 -0
- package/schemas/logicsrc-account-provider.schema.json +31 -0
- package/schemas/logicsrc-agent.schema.json +51 -0
- package/schemas/logicsrc-connected-account.schema.json +39 -0
- package/schemas/logicsrc-credential-audit-event.schema.json +32 -0
- package/schemas/logicsrc-credential-provider.schema.json +28 -0
- package/schemas/logicsrc-credential-sync-plan.schema.json +56 -0
- package/schemas/logicsrc-credential-sync-run.schema.json +35 -0
- package/schemas/logicsrc-email-message.schema.json +22 -0
- package/schemas/logicsrc-event.schema.json +25 -0
- package/schemas/logicsrc-opencontext-audit-event.schema.json +69 -0
- package/schemas/logicsrc-opencontext-bundle.schema.json +210 -0
- package/schemas/logicsrc-opencontext-decision.schema.json +229 -0
- package/schemas/logicsrc-opencontext-diagnostic.schema.json +123 -0
- package/schemas/logicsrc-opencontext-manifest.schema.json +337 -0
- package/schemas/logicsrc-opencontext-object.schema.json +311 -0
- package/schemas/logicsrc-opencontext-provenance.schema.json +76 -0
- package/schemas/logicsrc-opencontext-role.schema.json +93 -0
- package/schemas/logicsrc-openontology-action.schema.json +90 -0
- package/schemas/logicsrc-openontology-approval.schema.json +39 -0
- package/schemas/logicsrc-openontology-changeset.schema.json +168 -0
- package/schemas/logicsrc-openontology-claim.schema.json +148 -0
- package/schemas/logicsrc-openontology-constraint.schema.json +104 -0
- package/schemas/logicsrc-openontology-entity-type.schema.json +107 -0
- package/schemas/logicsrc-openontology-entity.schema.json +59 -0
- package/schemas/logicsrc-openontology-event.schema.json +60 -0
- package/schemas/logicsrc-openontology-evidence.schema.json +121 -0
- package/schemas/logicsrc-openontology-manifest.schema.json +148 -0
- package/schemas/logicsrc-openontology-namespace.schema.json +21 -0
- package/schemas/logicsrc-openontology-package.schema.json +73 -0
- package/schemas/logicsrc-openontology-property.schema.json +83 -0
- package/schemas/logicsrc-openontology-query.schema.json +207 -0
- package/schemas/logicsrc-openontology-relationship-type.schema.json +57 -0
- package/schemas/logicsrc-openontology-review.schema.json +37 -0
- package/schemas/logicsrc-openontology-source.schema.json +43 -0
- package/schemas/logicsrc-plugin.schema.json +35 -0
- package/schemas/logicsrc-pull-request.schema.json +73 -0
- package/schemas/logicsrc-repo.schema.json +73 -0
- package/schemas/logicsrc-run.schema.json +69 -0
- package/schemas/logicsrc-social-post.schema.json +26 -0
- package/schemas/logicsrc-task.schema.json +114 -0
- package/schemas/openprd-prd.schema.json +79 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://logicsrc.com/schemas/openontology/constraint.schema.json",
|
|
4
|
+
"title": "LogicSRC OpenOntology Constraint",
|
|
5
|
+
"description": "A deterministic validation rule over the knowledge layer. Constraints never require an LLM to decide conformance.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["openontology", "kind", "id", "description", "rule"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
|
|
11
|
+
"kind": { "const": "Constraint" },
|
|
12
|
+
"id": { "type": "string", "minLength": 1 },
|
|
13
|
+
"description": { "type": "string", "minLength": 1 },
|
|
14
|
+
"severity": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": ["error", "warning", "info", "policy"],
|
|
17
|
+
"default": "error"
|
|
18
|
+
},
|
|
19
|
+
"code": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Stable machine-readable code reported on violation, e.g. 'OO-C-REQUIRED-PREDICATE'."
|
|
22
|
+
},
|
|
23
|
+
"remediation": { "type": "string", "description": "Hint shown with the violation." },
|
|
24
|
+
"rule": { "$ref": "#/$defs/rule" },
|
|
25
|
+
"extensions": { "type": "object" }
|
|
26
|
+
},
|
|
27
|
+
"$defs": {
|
|
28
|
+
"rule": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["type"],
|
|
31
|
+
"oneOf": [
|
|
32
|
+
{
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": ["type", "entityType", "predicate"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"type": { "const": "required-predicate" },
|
|
37
|
+
"entityType": { "type": "string" },
|
|
38
|
+
"predicate": { "type": "string" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"required": ["type", "predicate"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"type": { "const": "cardinality" },
|
|
46
|
+
"predicate": { "type": "string" },
|
|
47
|
+
"entityType": { "type": "string" },
|
|
48
|
+
"min": { "type": "integer", "minimum": 0 },
|
|
49
|
+
"max": { "type": "integer", "minimum": 0 }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["type", "predicate"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"type": { "const": "unique" },
|
|
57
|
+
"predicate": { "type": "string" },
|
|
58
|
+
"entityType": { "type": "string" },
|
|
59
|
+
"scope": { "type": "string", "enum": ["ontology", "entity-type"], "default": "ontology" }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["type", "predicate", "values"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"type": { "const": "allowed-values" },
|
|
67
|
+
"predicate": { "type": "string" },
|
|
68
|
+
"values": { "type": "array", "items": {}, "minItems": 1 }
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": ["type", "predicate"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"type": { "const": "domain-range" },
|
|
76
|
+
"predicate": { "type": "string" },
|
|
77
|
+
"from": { "type": "array", "items": { "type": "string" } },
|
|
78
|
+
"to": { "type": "array", "items": { "type": "string" } }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["type", "predicate"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"type": { "const": "temporal-bounds" },
|
|
86
|
+
"predicate": { "type": "string" },
|
|
87
|
+
"notBefore": { "type": "string", "format": "date-time" },
|
|
88
|
+
"notAfter": { "type": "string", "format": "date-time" },
|
|
89
|
+
"requireValidFrom": { "type": "boolean" }
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["type", "query"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"type": { "const": "query" },
|
|
97
|
+
"query": { "type": "string", "description": "Saved query id. Any result row is a violation." },
|
|
98
|
+
"expect": { "type": "string", "enum": ["empty", "non-empty"], "default": "empty" }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://logicsrc.com/schemas/openontology/entity-type.schema.json",
|
|
4
|
+
"title": "LogicSRC OpenOntology Entity Type",
|
|
5
|
+
"description": "An identity-bearing noun of a domain — the kind of thing an entity is.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["openontology", "kind", "id", "label", "description"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
|
|
11
|
+
"kind": { "const": "EntityType" },
|
|
12
|
+
"id": { "type": "string", "minLength": 1 },
|
|
13
|
+
"label": { "type": "string", "minLength": 1 },
|
|
14
|
+
"labels": { "$ref": "#/$defs/languageMap" },
|
|
15
|
+
"description": { "type": "string", "minLength": 1 },
|
|
16
|
+
"descriptions": { "$ref": "#/$defs/languageMap" },
|
|
17
|
+
"extends": {
|
|
18
|
+
"description": "Parent entity type ids. Inherited properties MUST NOT conflict.",
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": { "type": "string" },
|
|
21
|
+
"uniqueItems": true
|
|
22
|
+
},
|
|
23
|
+
"keyProperties": {
|
|
24
|
+
"description": "Properties that together identify an entity of this type for resolution and uniqueness checks.",
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": { "type": "string" },
|
|
27
|
+
"uniqueItems": true
|
|
28
|
+
},
|
|
29
|
+
"properties": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"description": "Property name to inline property definition.",
|
|
32
|
+
"additionalProperties": { "$ref": "#/$defs/propertyDefinition" }
|
|
33
|
+
},
|
|
34
|
+
"deprecated": { "type": "boolean", "default": false },
|
|
35
|
+
"deprecationNote": { "type": "string" },
|
|
36
|
+
"extensions": { "type": "object" }
|
|
37
|
+
},
|
|
38
|
+
"$defs": {
|
|
39
|
+
"valueType": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": [
|
|
42
|
+
"string",
|
|
43
|
+
"number",
|
|
44
|
+
"integer",
|
|
45
|
+
"boolean",
|
|
46
|
+
"date",
|
|
47
|
+
"date-time",
|
|
48
|
+
"duration",
|
|
49
|
+
"url",
|
|
50
|
+
"email",
|
|
51
|
+
"enum",
|
|
52
|
+
"object",
|
|
53
|
+
"array",
|
|
54
|
+
"binary-reference",
|
|
55
|
+
"entity-reference"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"propertyDefinition": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": ["type"],
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"properties": {
|
|
63
|
+
"label": { "type": "string" },
|
|
64
|
+
"labels": { "$ref": "#/$defs/languageMap" },
|
|
65
|
+
"description": { "type": "string" },
|
|
66
|
+
"descriptions": { "$ref": "#/$defs/languageMap" },
|
|
67
|
+
"type": { "$ref": "#/$defs/valueType" },
|
|
68
|
+
"items": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"properties": {
|
|
72
|
+
"type": { "$ref": "#/$defs/valueType" },
|
|
73
|
+
"entityType": { "type": "string" },
|
|
74
|
+
"enum": { "type": "array", "items": {} }
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"entityType": {
|
|
78
|
+
"anyOf": [
|
|
79
|
+
{ "type": "string" },
|
|
80
|
+
{ "type": "array", "items": { "type": "string" }, "uniqueItems": true }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"required": { "type": "boolean", "default": false },
|
|
84
|
+
"cardinality": { "type": "string", "enum": ["one", "many"], "default": "one" },
|
|
85
|
+
"unique": { "type": "boolean", "default": false },
|
|
86
|
+
"default": {},
|
|
87
|
+
"examples": { "type": "array", "items": {} },
|
|
88
|
+
"enum": { "type": "array", "items": {} },
|
|
89
|
+
"pattern": { "type": "string" },
|
|
90
|
+
"minimum": { "type": "number" },
|
|
91
|
+
"maximum": { "type": "number" },
|
|
92
|
+
"minLength": { "type": "integer", "minimum": 0 },
|
|
93
|
+
"maxLength": { "type": "integer", "minimum": 0 },
|
|
94
|
+
"deprecated": { "type": "boolean", "default": false },
|
|
95
|
+
"deprecationNote": { "type": "string" },
|
|
96
|
+
"extensions": { "type": "object" }
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"languageMap": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"patternProperties": {
|
|
102
|
+
"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$": { "type": "string" }
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://logicsrc.com/schemas/openontology/entity.schema.json",
|
|
4
|
+
"title": "LogicSRC OpenOntology Entity",
|
|
5
|
+
"description": "A specific thing with a stable identity. Entity ids never change when display names or aliases change; deletion is expressed as tombstone/archived/superseded state, never erasure.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["openontology", "kind", "id", "type", "canonicalName", "createdAt", "createdBy"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
|
|
11
|
+
"kind": { "const": "Entity" },
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"description": "Stable id. Package-qualified compact form (prefix:type:slug), an http(s) IRI, or a urn:logicsrc: identifier."
|
|
16
|
+
},
|
|
17
|
+
"type": { "type": "string", "minLength": 1, "description": "Entity type id." },
|
|
18
|
+
"canonicalName": { "type": "string", "minLength": 1 },
|
|
19
|
+
"labels": { "$ref": "#/$defs/languageMap" },
|
|
20
|
+
"aliases": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": { "type": "string", "minLength": 1 },
|
|
23
|
+
"uniqueItems": true
|
|
24
|
+
},
|
|
25
|
+
"externalIds": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"description": "Namespaced external identifiers (github, wikidata, orcid, did, ...). External services are never treated as canonical identity authorities.",
|
|
28
|
+
"additionalProperties": { "type": "string" }
|
|
29
|
+
},
|
|
30
|
+
"status": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": ["active", "archived", "tombstone", "superseded", "merged"],
|
|
33
|
+
"default": "active"
|
|
34
|
+
},
|
|
35
|
+
"supersededBy": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Entity id that replaced this one after a merge. Old ids remain resolvable as redirects."
|
|
38
|
+
},
|
|
39
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
40
|
+
"createdBy": { "type": "string", "minLength": 1 },
|
|
41
|
+
"updatedAt": { "type": "string", "format": "date-time" },
|
|
42
|
+
"visibility": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"enum": ["public", "internal", "private"],
|
|
45
|
+
"default": "public"
|
|
46
|
+
},
|
|
47
|
+
"tags": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
48
|
+
"extensions": { "type": "object" }
|
|
49
|
+
},
|
|
50
|
+
"$defs": {
|
|
51
|
+
"languageMap": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"patternProperties": {
|
|
54
|
+
"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$": { "type": "string" }
|
|
55
|
+
},
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://logicsrc.com/schemas/openontology/event.schema.json",
|
|
4
|
+
"title": "LogicSRC OpenOntology Event",
|
|
5
|
+
"description": "An append-only audit record. Every applied change emits at least one event, attributable to an actor, a policy decision, and a resulting revision.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["openontology", "kind", "id", "type", "at", "actor"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
|
|
11
|
+
"kind": { "const": "Event" },
|
|
12
|
+
"id": { "type": "string", "minLength": 1 },
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": [
|
|
16
|
+
"package.validated",
|
|
17
|
+
"entity.proposed",
|
|
18
|
+
"entity.added",
|
|
19
|
+
"entity.merged",
|
|
20
|
+
"entity.archived",
|
|
21
|
+
"claim.proposed",
|
|
22
|
+
"claim.asserted",
|
|
23
|
+
"claim.disputed",
|
|
24
|
+
"claim.retracted",
|
|
25
|
+
"claim.superseded",
|
|
26
|
+
"changeset.created",
|
|
27
|
+
"changeset.reviewed",
|
|
28
|
+
"changeset.approved",
|
|
29
|
+
"changeset.rejected",
|
|
30
|
+
"changeset.applied",
|
|
31
|
+
"import.completed",
|
|
32
|
+
"export.completed",
|
|
33
|
+
"constraint.violated",
|
|
34
|
+
"action.executed",
|
|
35
|
+
"schema.migrated"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"ontology": { "type": "string" },
|
|
39
|
+
"at": { "type": "string", "format": "date-time" },
|
|
40
|
+
"actor": { "type": "string", "minLength": 1 },
|
|
41
|
+
"actorType": { "type": "string", "enum": ["human", "service", "agent"] },
|
|
42
|
+
"client": { "type": "string" },
|
|
43
|
+
"requestId": { "type": "string" },
|
|
44
|
+
"runId": { "type": "string" },
|
|
45
|
+
"changeSet": { "type": "string" },
|
|
46
|
+
"subject": { "type": "string", "description": "Primary object id the event concerns." },
|
|
47
|
+
"revision": { "type": "string" },
|
|
48
|
+
"policyDecision": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"properties": {
|
|
52
|
+
"rule": { "type": "string" },
|
|
53
|
+
"decision": { "type": "string", "enum": ["allow", "deny", "require-approval"] },
|
|
54
|
+
"reason": { "type": "string" }
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"data": { "type": "object", "description": "Event-specific payload. Redacted per policy." },
|
|
58
|
+
"extensions": { "type": "object" }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://logicsrc.com/schemas/openontology/evidence.schema.json",
|
|
4
|
+
"title": "LogicSRC OpenOntology Evidence",
|
|
5
|
+
"description": "A machine-readable pointer into a source that supports a claim. Excerpts are optional and bounded by source licensing, privacy, and configured excerpt limits.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["openontology", "kind", "id", "source", "selector"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
|
|
11
|
+
"kind": { "const": "Evidence" },
|
|
12
|
+
"id": { "type": "string", "minLength": 1 },
|
|
13
|
+
"source": { "type": "string", "minLength": 1, "description": "Source id." },
|
|
14
|
+
"selector": { "$ref": "#/$defs/selector" },
|
|
15
|
+
"excerpt": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Optional short excerpt. Omitted when licensing, privacy, or excerpt limits forbid it."
|
|
18
|
+
},
|
|
19
|
+
"contentHash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
20
|
+
"visibility": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["public", "internal", "private"],
|
|
23
|
+
"default": "public"
|
|
24
|
+
},
|
|
25
|
+
"extensions": { "type": "object" }
|
|
26
|
+
},
|
|
27
|
+
"$defs": {
|
|
28
|
+
"selector": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["type"],
|
|
31
|
+
"description": "One selector shape per source medium.",
|
|
32
|
+
"oneOf": [
|
|
33
|
+
{
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"properties": {
|
|
36
|
+
"type": { "const": "line-range" },
|
|
37
|
+
"start": { "type": "integer", "minimum": 1 },
|
|
38
|
+
"end": { "type": "integer", "minimum": 1 },
|
|
39
|
+
"path": { "type": "string" }
|
|
40
|
+
},
|
|
41
|
+
"required": ["type", "start", "end"]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"properties": {
|
|
46
|
+
"type": { "const": "page" },
|
|
47
|
+
"page": { "type": "integer", "minimum": 1 }
|
|
48
|
+
},
|
|
49
|
+
"required": ["type", "page"]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"properties": {
|
|
54
|
+
"type": { "const": "time-range" },
|
|
55
|
+
"start": { "type": "number", "minimum": 0 },
|
|
56
|
+
"end": { "type": "number", "minimum": 0 }
|
|
57
|
+
},
|
|
58
|
+
"required": ["type", "start", "end"]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"properties": {
|
|
63
|
+
"type": { "const": "json-pointer" },
|
|
64
|
+
"pointer": { "type": "string" }
|
|
65
|
+
},
|
|
66
|
+
"required": ["type", "pointer"]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"properties": {
|
|
71
|
+
"type": { "const": "xpath" },
|
|
72
|
+
"expression": { "type": "string" }
|
|
73
|
+
},
|
|
74
|
+
"required": ["type", "expression"]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"properties": {
|
|
79
|
+
"type": { "const": "css-selector" },
|
|
80
|
+
"expression": { "type": "string" }
|
|
81
|
+
},
|
|
82
|
+
"required": ["type", "expression"]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"properties": {
|
|
87
|
+
"type": { "const": "database-key" },
|
|
88
|
+
"table": { "type": "string" },
|
|
89
|
+
"key": { "type": "string" }
|
|
90
|
+
},
|
|
91
|
+
"required": ["type", "key"]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"properties": {
|
|
96
|
+
"type": { "const": "commit-path" },
|
|
97
|
+
"path": { "type": "string" },
|
|
98
|
+
"commit": { "type": "string" }
|
|
99
|
+
},
|
|
100
|
+
"required": ["type", "path"]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"properties": {
|
|
105
|
+
"type": { "const": "api-field" },
|
|
106
|
+
"field": { "type": "string" },
|
|
107
|
+
"endpoint": { "type": "string" }
|
|
108
|
+
},
|
|
109
|
+
"required": ["type", "field"]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"properties": {
|
|
114
|
+
"type": { "const": "whole-document" }
|
|
115
|
+
},
|
|
116
|
+
"required": ["type"]
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://logicsrc.com/schemas/openontology/manifest.schema.json",
|
|
4
|
+
"title": "LogicSRC OpenOntology Package Manifest",
|
|
5
|
+
"description": "The openontology.yaml (or canonical JSON equivalent) that opens every OpenOntology package. Declares identity, namespace, license, maintainers, imports, and the schema/data files that make up the package.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"openontology",
|
|
9
|
+
"kind",
|
|
10
|
+
"id",
|
|
11
|
+
"name",
|
|
12
|
+
"version",
|
|
13
|
+
"namespace",
|
|
14
|
+
"description",
|
|
15
|
+
"license",
|
|
16
|
+
"maintainers"
|
|
17
|
+
],
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"properties": {
|
|
20
|
+
"openontology": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^\\d+\\.\\d+(\\.\\d+)?$",
|
|
23
|
+
"description": "OpenOntology standard version this package conforms to, e.g. '0.1'."
|
|
24
|
+
},
|
|
25
|
+
"kind": { "const": "OntologyPackage" },
|
|
26
|
+
"id": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
29
|
+
"description": "Lowercase kebab-case package id, globally disambiguated by namespace when imported."
|
|
30
|
+
},
|
|
31
|
+
"name": { "type": "string", "minLength": 1 },
|
|
32
|
+
"version": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$",
|
|
35
|
+
"description": "Semantic version."
|
|
36
|
+
},
|
|
37
|
+
"namespace": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"format": "uri",
|
|
40
|
+
"description": "Base IRI that compact package-qualified ids canonicalize against."
|
|
41
|
+
},
|
|
42
|
+
"description": { "type": "string", "minLength": 1 },
|
|
43
|
+
"license": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"description": "SPDX identifier, license URL, or the literal 'unknown'."
|
|
47
|
+
},
|
|
48
|
+
"maintainers": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"minItems": 1,
|
|
51
|
+
"items": { "$ref": "#/$defs/maintainer" }
|
|
52
|
+
},
|
|
53
|
+
"imports": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": { "$ref": "#/$defs/import" },
|
|
56
|
+
"description": "Other ontology packages imported by immutable version or digest."
|
|
57
|
+
},
|
|
58
|
+
"schema": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"description": "Relative paths (or inline arrays) for each schema-layer file.",
|
|
62
|
+
"properties": {
|
|
63
|
+
"namespaces": { "$ref": "#/$defs/fileOrInline" },
|
|
64
|
+
"entityTypes": { "$ref": "#/$defs/fileOrInline" },
|
|
65
|
+
"properties": { "$ref": "#/$defs/fileOrInline" },
|
|
66
|
+
"relationships": { "$ref": "#/$defs/fileOrInline" },
|
|
67
|
+
"constraints": { "$ref": "#/$defs/fileOrInline" },
|
|
68
|
+
"queries": { "$ref": "#/$defs/fileOrInline" },
|
|
69
|
+
"actions": { "$ref": "#/$defs/fileOrInline" }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"data": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"description": "Relative paths (or inline arrays) for each knowledge-layer file.",
|
|
76
|
+
"properties": {
|
|
77
|
+
"entities": { "$ref": "#/$defs/fileOrInline" },
|
|
78
|
+
"claims": { "$ref": "#/$defs/fileOrInline" },
|
|
79
|
+
"sources": { "$ref": "#/$defs/fileOrInline" },
|
|
80
|
+
"evidence": { "$ref": "#/$defs/fileOrInline" }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"context": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "Relative path to the package's JSON-LD 1.1 context document."
|
|
86
|
+
},
|
|
87
|
+
"digest": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
90
|
+
"description": "Content digest over the canonical manifest and every declared file. Present on published packages."
|
|
91
|
+
},
|
|
92
|
+
"signatures": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": { "$ref": "#/$defs/signature" },
|
|
95
|
+
"description": "Detached maintainer signatures over the package digest."
|
|
96
|
+
},
|
|
97
|
+
"extensions": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"description": "Namespaced extension point. Keys SHOULD be prefixed to avoid collisions."
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"$defs": {
|
|
103
|
+
"maintainer": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"required": ["id"],
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"properties": {
|
|
108
|
+
"id": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"minLength": 1,
|
|
111
|
+
"description": "URI-shaped identity: mailto:, did:, https:, or urn:."
|
|
112
|
+
},
|
|
113
|
+
"name": { "type": "string" }
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"import": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"required": ["id"],
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"properties": {
|
|
121
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
122
|
+
"version": { "type": "string" },
|
|
123
|
+
"digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
124
|
+
"namespace": { "type": "string", "format": "uri" },
|
|
125
|
+
"prefix": { "type": "string" }
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"fileOrInline": {
|
|
129
|
+
"anyOf": [
|
|
130
|
+
{ "type": "string", "minLength": 1 },
|
|
131
|
+
{ "type": "array", "items": { "type": "object" } }
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"signature": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"required": ["algorithm", "signer", "value"],
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"description": "Pluggable signature envelope. 'jws-ed25519' is the minimal profile every implementation SHOULD understand.",
|
|
139
|
+
"properties": {
|
|
140
|
+
"algorithm": { "type": "string", "minLength": 1 },
|
|
141
|
+
"signer": { "type": "string", "minLength": 1 },
|
|
142
|
+
"value": { "type": "string", "minLength": 1 },
|
|
143
|
+
"created": { "type": "string", "format": "date-time" },
|
|
144
|
+
"keyId": { "type": "string" }
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://logicsrc.com/schemas/openontology/namespace.schema.json",
|
|
4
|
+
"title": "LogicSRC OpenOntology Namespace",
|
|
5
|
+
"description": "A prefix binding used to disambiguate ids and to canonicalize compact package-qualified ids into resolvable IRIs.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["openontology", "kind", "prefix", "uri"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
|
|
11
|
+
"kind": { "const": "Namespace" },
|
|
12
|
+
"prefix": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
|
15
|
+
"description": "Compact prefix, e.g. 'ethereum' in 'ethereum:person:alice'."
|
|
16
|
+
},
|
|
17
|
+
"uri": { "type": "string", "format": "uri" },
|
|
18
|
+
"description": { "type": "string" },
|
|
19
|
+
"extensions": { "type": "object" }
|
|
20
|
+
}
|
|
21
|
+
}
|