@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.
Files changed (194) hide show
  1. package/README.md +34 -0
  2. package/fixtures/agent.yaml +20 -0
  3. package/fixtures/agentad-ad.yaml +33 -0
  4. package/fixtures/agentad-placement.yaml +21 -0
  5. package/fixtures/opencontext/conformance.json +279 -0
  6. package/fixtures/opencontext/invalid/audit-event-missing-actor.json +5 -0
  7. package/fixtures/opencontext/invalid/audit-event-unknown-event.json +9 -0
  8. package/fixtures/opencontext/invalid/bundle-bad-digest.json +11 -0
  9. package/fixtures/opencontext/invalid/bundle-bad-id.json +11 -0
  10. package/fixtures/opencontext/invalid/bundle-missing-digest.json +10 -0
  11. package/fixtures/opencontext/invalid/bundle-unknown-exclusion-reason.json +17 -0
  12. package/fixtures/opencontext/invalid/decision-bad-status.json +7 -0
  13. package/fixtures/opencontext/invalid/decision-missing-decision.json +5 -0
  14. package/fixtures/opencontext/invalid/decision-wrong-type.json +6 -0
  15. package/fixtures/opencontext/invalid/diagnostic-missing-ok.json +4 -0
  16. package/fixtures/opencontext/invalid/diagnostic-unknown-code.json +11 -0
  17. package/fixtures/opencontext/invalid/manifest-bad-authority.json +10 -0
  18. package/fixtures/opencontext/invalid/manifest-bad-extension.json +9 -0
  19. package/fixtures/opencontext/invalid/manifest-bad-id.json +4 -0
  20. package/fixtures/opencontext/invalid/manifest-bad-ttl.json +7 -0
  21. package/fixtures/opencontext/invalid/manifest-missing-version.json +3 -0
  22. package/fixtures/opencontext/invalid/manifest-role-bad-pattern.json +11 -0
  23. package/fixtures/opencontext/invalid/manifest-unknown-key.json +5 -0
  24. package/fixtures/opencontext/invalid/object-bad-digest.json +10 -0
  25. package/fixtures/opencontext/invalid/object-bad-id.json +4 -0
  26. package/fixtures/opencontext/invalid/object-bad-layer.json +5 -0
  27. package/fixtures/opencontext/invalid/object-bad-redaction-mode.json +10 -0
  28. package/fixtures/opencontext/invalid/object-bad-supersedes.json +7 -0
  29. package/fixtures/opencontext/invalid/object-confidence-out-of-range.json +5 -0
  30. package/fixtures/opencontext/invalid/object-extra-property.json +5 -0
  31. package/fixtures/opencontext/invalid/object-missing-id.json +3 -0
  32. package/fixtures/opencontext/invalid/object-missing-type.json +3 -0
  33. package/fixtures/opencontext/invalid/object-source-without-uri.json +9 -0
  34. package/fixtures/opencontext/invalid/object-unknown-authority.json +5 -0
  35. package/fixtures/opencontext/invalid/object-unknown-classification.json +5 -0
  36. package/fixtures/opencontext/invalid/object-unknown-trust.json +5 -0
  37. package/fixtures/opencontext/invalid/provenance-canonical-false.json +4 -0
  38. package/fixtures/opencontext/invalid/provenance-no-source.json +3 -0
  39. package/fixtures/opencontext/invalid/role-bad-classification.json +4 -0
  40. package/fixtures/opencontext/invalid/role-bad-include.json +6 -0
  41. package/fixtures/opencontext/invalid-manifest.json +177 -0
  42. package/fixtures/opencontext/resolution/authority-conflict/context/policies/refunds-observed.md +10 -0
  43. package/fixtures/opencontext/resolution/authority-conflict/context/policies/refunds.md +12 -0
  44. package/fixtures/opencontext/resolution/authority-conflict/expected.json +21 -0
  45. package/fixtures/opencontext/resolution/authority-conflict/opencontext.yaml +11 -0
  46. package/fixtures/opencontext/resolution/classification-ceiling/context/docs/handbook.md +11 -0
  47. package/fixtures/opencontext/resolution/classification-ceiling/context/docs/litigation.md +11 -0
  48. package/fixtures/opencontext/resolution/classification-ceiling/expected.json +32 -0
  49. package/fixtures/opencontext/resolution/classification-ceiling/opencontext.yaml +16 -0
  50. package/fixtures/opencontext/resolution/deny-overrides-allow/context/mission.md +10 -0
  51. package/fixtures/opencontext/resolution/deny-overrides-allow/context/policies/internal/margins.md +10 -0
  52. package/fixtures/opencontext/resolution/deny-overrides-allow/context/policies/refunds.md +10 -0
  53. package/fixtures/opencontext/resolution/deny-overrides-allow/expected.json +19 -0
  54. package/fixtures/opencontext/resolution/deny-overrides-allow/opencontext.yaml +17 -0
  55. package/fixtures/opencontext/resolution/duplicate-canonical/context/policies/refunds-rewrite.md +12 -0
  56. package/fixtures/opencontext/resolution/duplicate-canonical/context/policies/refunds.md +12 -0
  57. package/fixtures/opencontext/resolution/duplicate-canonical/expected.json +10 -0
  58. package/fixtures/opencontext/resolution/duplicate-canonical/opencontext.yaml +11 -0
  59. package/fixtures/opencontext/resolution/lifecycle/context/notes/current.md +11 -0
  60. package/fixtures/opencontext/resolution/lifecycle/context/notes/expired.md +12 -0
  61. package/fixtures/opencontext/resolution/lifecycle/context/notes/future.md +12 -0
  62. package/fixtures/opencontext/resolution/lifecycle/context/notes/stale.md +11 -0
  63. package/fixtures/opencontext/resolution/lifecycle/expected.json +30 -0
  64. package/fixtures/opencontext/resolution/lifecycle/opencontext.yaml +14 -0
  65. package/fixtures/opencontext/resolution/object-permissions/context/policies/payroll.md +12 -0
  66. package/fixtures/opencontext/resolution/object-permissions/context/policies/refunds.md +10 -0
  67. package/fixtures/opencontext/resolution/object-permissions/expected.json +32 -0
  68. package/fixtures/opencontext/resolution/object-permissions/opencontext.yaml +14 -0
  69. package/fixtures/opencontext/resolution/redaction/context/customers/acme.json +21 -0
  70. package/fixtures/opencontext/resolution/redaction/expected.json +28 -0
  71. package/fixtures/opencontext/resolution/redaction/opencontext.yaml +19 -0
  72. package/fixtures/opencontext/resolution/supersession/context/pricing/enterprise.v1.md +12 -0
  73. package/fixtures/opencontext/resolution/supersession/context/pricing/enterprise.v2.md +14 -0
  74. package/fixtures/opencontext/resolution/supersession/expected.json +33 -0
  75. package/fixtures/opencontext/resolution/supersession/opencontext.yaml +11 -0
  76. package/fixtures/opencontext/valid/audit-event.json +26 -0
  77. package/fixtures/opencontext/valid/bundle.json +67 -0
  78. package/fixtures/opencontext/valid/decision.json +51 -0
  79. package/fixtures/opencontext/valid/diagnostic.json +37 -0
  80. package/fixtures/opencontext/valid/manifest-minimal.json +4 -0
  81. package/fixtures/opencontext/valid/manifest.json +134 -0
  82. package/fixtures/opencontext/valid/object-minimal.json +4 -0
  83. package/fixtures/opencontext/valid/object-policy.json +75 -0
  84. package/fixtures/opencontext/valid/object-structured.json +34 -0
  85. package/fixtures/opencontext/valid/object-untrusted.json +19 -0
  86. package/fixtures/opencontext/valid/provenance-canonical.json +4 -0
  87. package/fixtures/opencontext/valid/provenance.json +14 -0
  88. package/fixtures/opencontext/valid/role.json +38 -0
  89. package/fixtures/openontology/conformance.json +158 -0
  90. package/fixtures/openontology/invalid/action-no-permissions.json +13 -0
  91. package/fixtures/openontology/invalid/changeset-empty-operations.json +10 -0
  92. package/fixtures/openontology/invalid/changeset-unknown-op.json +15 -0
  93. package/fixtures/openontology/invalid/claim-both-objects.json +14 -0
  94. package/fixtures/openontology/invalid/claim-confidence-out-of-range.json +14 -0
  95. package/fixtures/openontology/invalid/claim-extra-property.json +14 -0
  96. package/fixtures/openontology/invalid/claim-unknown-status.json +13 -0
  97. package/fixtures/openontology/invalid/entity-missing-canonical-name.json +8 -0
  98. package/fixtures/openontology/invalid/evidence-unknown-selector.json +10 -0
  99. package/fixtures/openontology/invalid/manifest-bad-id.json +15 -0
  100. package/fixtures/openontology/invalid/manifest-bad-version.json +15 -0
  101. package/fixtures/openontology/invalid/manifest-no-maintainer.json +11 -0
  102. package/fixtures/openontology/invalid/relationship-no-range.json +11 -0
  103. package/fixtures/openontology/valid/action.json +29 -0
  104. package/fixtures/openontology/valid/approval.json +12 -0
  105. package/fixtures/openontology/valid/changeset.json +34 -0
  106. package/fixtures/openontology/valid/claim-relationship.json +23 -0
  107. package/fixtures/openontology/valid/claim-value.json +15 -0
  108. package/fixtures/openontology/valid/constraint.json +12 -0
  109. package/fixtures/openontology/valid/entity-type.json +16 -0
  110. package/fixtures/openontology/valid/entity.json +16 -0
  111. package/fixtures/openontology/valid/event.json +17 -0
  112. package/fixtures/openontology/valid/evidence.json +12 -0
  113. package/fixtures/openontology/valid/manifest.json +21 -0
  114. package/fixtures/openontology/valid/namespace.json +7 -0
  115. package/fixtures/openontology/valid/property.json +8 -0
  116. package/fixtures/openontology/valid/query-adhoc.json +16 -0
  117. package/fixtures/openontology/valid/query.json +24 -0
  118. package/fixtures/openontology/valid/relationship-type.json +16 -0
  119. package/fixtures/openontology/valid/review.json +17 -0
  120. package/fixtures/openontology/valid/source.json +13 -0
  121. package/fixtures/openprd/conformance.json +104 -0
  122. package/fixtures/openprd/invalid/bad-filename.md +41 -0
  123. package/fixtures/openprd/invalid/bad-id-format.md +41 -0
  124. package/fixtures/openprd/invalid/bad-status.md +41 -0
  125. package/fixtures/openprd/invalid/dates-backwards.md +43 -0
  126. package/fixtures/openprd/invalid/duplicate-requirement.md +42 -0
  127. package/fixtures/openprd/invalid/id-mismatch.md +41 -0
  128. package/fixtures/openprd/invalid/missing-section.md +37 -0
  129. package/fixtures/openprd/invalid/missing-title.md +40 -0
  130. package/fixtures/openprd/invalid/no-front-matter.md +33 -0
  131. package/fixtures/openprd/invalid/out-of-order.md +41 -0
  132. package/fixtures/openprd/invalid/superseded-without-replacement.md +41 -0
  133. package/fixtures/openprd/invalid/unknown-key.md +42 -0
  134. package/fixtures/openprd/valid/bold-requirements.md +41 -0
  135. package/fixtures/openprd/valid/full.md +48 -0
  136. package/fixtures/openprd/valid/minimal.md +41 -0
  137. package/fixtures/openprd/valid/none-sections.md +41 -0
  138. package/fixtures/openprd/valid/subsections.md +47 -0
  139. package/fixtures/openprd/valid/superseded.md +42 -0
  140. package/fixtures/openprd-prd.yaml +12 -0
  141. package/fixtures/pull-request.yaml +24 -0
  142. package/fixtures/repo.yaml +27 -0
  143. package/fixtures/task.yaml +26 -0
  144. package/package.json +91 -0
  145. package/schemas/agentad-ad-request.schema.json +32 -0
  146. package/schemas/agentad-ad-response.schema.json +31 -0
  147. package/schemas/agentad-ad.schema.json +79 -0
  148. package/schemas/agentad-campaign.schema.json +40 -0
  149. package/schemas/agentad-click.schema.json +23 -0
  150. package/schemas/agentad-impression.schema.json +18 -0
  151. package/schemas/agentad-placement.schema.json +46 -0
  152. package/schemas/logicsrc-account-audit-event.schema.json +31 -0
  153. package/schemas/logicsrc-account-grant.schema.json +48 -0
  154. package/schemas/logicsrc-account-provider.schema.json +31 -0
  155. package/schemas/logicsrc-agent.schema.json +51 -0
  156. package/schemas/logicsrc-connected-account.schema.json +39 -0
  157. package/schemas/logicsrc-credential-audit-event.schema.json +32 -0
  158. package/schemas/logicsrc-credential-provider.schema.json +28 -0
  159. package/schemas/logicsrc-credential-sync-plan.schema.json +56 -0
  160. package/schemas/logicsrc-credential-sync-run.schema.json +35 -0
  161. package/schemas/logicsrc-email-message.schema.json +22 -0
  162. package/schemas/logicsrc-event.schema.json +25 -0
  163. package/schemas/logicsrc-opencontext-audit-event.schema.json +69 -0
  164. package/schemas/logicsrc-opencontext-bundle.schema.json +210 -0
  165. package/schemas/logicsrc-opencontext-decision.schema.json +229 -0
  166. package/schemas/logicsrc-opencontext-diagnostic.schema.json +123 -0
  167. package/schemas/logicsrc-opencontext-manifest.schema.json +337 -0
  168. package/schemas/logicsrc-opencontext-object.schema.json +311 -0
  169. package/schemas/logicsrc-opencontext-provenance.schema.json +76 -0
  170. package/schemas/logicsrc-opencontext-role.schema.json +93 -0
  171. package/schemas/logicsrc-openontology-action.schema.json +90 -0
  172. package/schemas/logicsrc-openontology-approval.schema.json +39 -0
  173. package/schemas/logicsrc-openontology-changeset.schema.json +168 -0
  174. package/schemas/logicsrc-openontology-claim.schema.json +148 -0
  175. package/schemas/logicsrc-openontology-constraint.schema.json +104 -0
  176. package/schemas/logicsrc-openontology-entity-type.schema.json +107 -0
  177. package/schemas/logicsrc-openontology-entity.schema.json +59 -0
  178. package/schemas/logicsrc-openontology-event.schema.json +60 -0
  179. package/schemas/logicsrc-openontology-evidence.schema.json +121 -0
  180. package/schemas/logicsrc-openontology-manifest.schema.json +148 -0
  181. package/schemas/logicsrc-openontology-namespace.schema.json +21 -0
  182. package/schemas/logicsrc-openontology-package.schema.json +73 -0
  183. package/schemas/logicsrc-openontology-property.schema.json +83 -0
  184. package/schemas/logicsrc-openontology-query.schema.json +207 -0
  185. package/schemas/logicsrc-openontology-relationship-type.schema.json +57 -0
  186. package/schemas/logicsrc-openontology-review.schema.json +37 -0
  187. package/schemas/logicsrc-openontology-source.schema.json +43 -0
  188. package/schemas/logicsrc-plugin.schema.json +35 -0
  189. package/schemas/logicsrc-pull-request.schema.json +73 -0
  190. package/schemas/logicsrc-repo.schema.json +73 -0
  191. package/schemas/logicsrc-run.schema.json +69 -0
  192. package/schemas/logicsrc-social-post.schema.json +26 -0
  193. package/schemas/logicsrc-task.schema.json +114 -0
  194. package/schemas/openprd-prd.schema.json +79 -0
@@ -0,0 +1,73 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://logicsrc.com/schemas/openontology/package.schema.json",
4
+ "title": "LogicSRC OpenOntology Built Package",
5
+ "description": "The deterministic build artifact: the compiled manifest, every schema and knowledge object inlined, a per-file digest table, and the package digest. This is what gets hashed, signed, diffed, and published — never private runtime state or credentials.",
6
+ "type": "object",
7
+ "required": ["openontology", "kind", "manifest", "digest", "files", "schema", "data"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
11
+ "kind": { "const": "BuiltOntologyPackage" },
12
+ "manifest": { "type": "object", "description": "The canonical manifest object." },
13
+ "digest": {
14
+ "type": "string",
15
+ "pattern": "^sha256:[0-9a-f]{64}$",
16
+ "description": "sha256 over the canonical JSON of the manifest plus the sorted per-file digest table."
17
+ },
18
+ "builtAt": { "type": "string", "format": "date-time" },
19
+ "files": {
20
+ "type": "array",
21
+ "description": "Per-file digests covering every declared schema and data file.",
22
+ "items": {
23
+ "type": "object",
24
+ "required": ["path", "digest", "count"],
25
+ "additionalProperties": false,
26
+ "properties": {
27
+ "path": { "type": "string" },
28
+ "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
29
+ "count": { "type": "integer", "minimum": 0 }
30
+ }
31
+ }
32
+ },
33
+ "schema": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "namespaces": { "type": "array", "items": { "type": "object" } },
38
+ "entityTypes": { "type": "array", "items": { "type": "object" } },
39
+ "properties": { "type": "array", "items": { "type": "object" } },
40
+ "relationships": { "type": "array", "items": { "type": "object" } },
41
+ "constraints": { "type": "array", "items": { "type": "object" } },
42
+ "queries": { "type": "array", "items": { "type": "object" } },
43
+ "actions": { "type": "array", "items": { "type": "object" } }
44
+ }
45
+ },
46
+ "data": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "properties": {
50
+ "entities": { "type": "array", "items": { "type": "object" } },
51
+ "claims": { "type": "array", "items": { "type": "object" } },
52
+ "sources": { "type": "array", "items": { "type": "object" } },
53
+ "evidence": { "type": "array", "items": { "type": "object" } }
54
+ }
55
+ },
56
+ "context": { "type": "object", "description": "Inlined JSON-LD 1.1 context, when the package declares one." },
57
+ "signatures": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "object",
61
+ "required": ["algorithm", "signer", "value"],
62
+ "additionalProperties": false,
63
+ "properties": {
64
+ "algorithm": { "type": "string" },
65
+ "signer": { "type": "string" },
66
+ "value": { "type": "string" },
67
+ "created": { "type": "string", "format": "date-time" },
68
+ "keyId": { "type": "string" }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://logicsrc.com/schemas/openontology/property.schema.json",
4
+ "title": "LogicSRC OpenOntology Property Definition",
5
+ "description": "A scalar or structured attribute of an entity type. Property values are carried by claims whose object is a typed value.",
6
+ "type": "object",
7
+ "required": ["openontology", "kind", "id", "label", "type"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
11
+ "kind": { "const": "Property" },
12
+ "id": { "type": "string", "minLength": 1 },
13
+ "label": { "type": "string", "minLength": 1 },
14
+ "labels": { "$ref": "#/$defs/languageMap" },
15
+ "description": { "type": "string" },
16
+ "descriptions": { "$ref": "#/$defs/languageMap" },
17
+ "type": { "$ref": "#/$defs/valueType" },
18
+ "items": {
19
+ "description": "Element definition when type is 'array'.",
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "properties": {
23
+ "type": { "$ref": "#/$defs/valueType" },
24
+ "entityType": { "type": "string" },
25
+ "enum": { "type": "array", "items": {} }
26
+ }
27
+ },
28
+ "entityType": {
29
+ "description": "Allowed entity type when type is 'entity-reference'.",
30
+ "anyOf": [
31
+ { "type": "string" },
32
+ { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
33
+ ]
34
+ },
35
+ "required": { "type": "boolean", "default": false },
36
+ "cardinality": {
37
+ "type": "string",
38
+ "enum": ["one", "many"],
39
+ "default": "one"
40
+ },
41
+ "unique": { "type": "boolean", "default": false },
42
+ "default": {},
43
+ "examples": { "type": "array", "items": {} },
44
+ "enum": { "type": "array", "items": {}, "description": "Allowed values when type is 'enum'." },
45
+ "pattern": { "type": "string" },
46
+ "minimum": { "type": "number" },
47
+ "maximum": { "type": "number" },
48
+ "minLength": { "type": "integer", "minimum": 0 },
49
+ "maxLength": { "type": "integer", "minimum": 0 },
50
+ "deprecated": { "type": "boolean", "default": false },
51
+ "deprecationNote": { "type": "string" },
52
+ "extensions": { "type": "object" }
53
+ },
54
+ "$defs": {
55
+ "valueType": {
56
+ "type": "string",
57
+ "enum": [
58
+ "string",
59
+ "number",
60
+ "integer",
61
+ "boolean",
62
+ "date",
63
+ "date-time",
64
+ "duration",
65
+ "url",
66
+ "email",
67
+ "enum",
68
+ "object",
69
+ "array",
70
+ "binary-reference",
71
+ "entity-reference"
72
+ ]
73
+ },
74
+ "languageMap": {
75
+ "type": "object",
76
+ "description": "BCP-47 language tag to translated text.",
77
+ "patternProperties": {
78
+ "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$": { "type": "string" }
79
+ },
80
+ "additionalProperties": false
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,207 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://logicsrc.com/schemas/openontology/query.schema.json",
4
+ "title": "LogicSRC OpenOntology Query",
5
+ "description": "The portable triple-pattern query AST, in either ad-hoc form (openontologyQuery) or saved form (kind: SavedQuery with parameters and an expected result shape). Database-specific languages are adapters over this AST, never a substitute for it.",
6
+ "oneOf": [
7
+ { "$ref": "#/$defs/adHocQuery" },
8
+ { "$ref": "#/$defs/savedQuery" }
9
+ ],
10
+ "$defs": {
11
+ "adHocQuery": {
12
+ "type": "object",
13
+ "required": ["openontologyQuery", "match"],
14
+ "additionalProperties": false,
15
+ "properties": {
16
+ "openontologyQuery": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
17
+ "ontology": { "type": "string" },
18
+ "match": { "$ref": "#/$defs/match" },
19
+ "where": { "$ref": "#/$defs/where" },
20
+ "select": { "$ref": "#/$defs/select" },
21
+ "include": { "$ref": "#/$defs/include" },
22
+ "orderBy": { "$ref": "#/$defs/orderBy" },
23
+ "distinct": { "type": "boolean", "default": false },
24
+ "asOf": { "type": "string", "format": "date-time" },
25
+ "recordedAsOf": {
26
+ "type": "string",
27
+ "format": "date-time",
28
+ "description": "System-time axis for bitemporal queries."
29
+ },
30
+ "limit": { "type": "integer", "minimum": 1 },
31
+ "offset": { "type": "integer", "minimum": 0 },
32
+ "maxDepth": { "type": "integer", "minimum": 1 },
33
+ "explain": { "type": "boolean", "default": false }
34
+ }
35
+ },
36
+ "savedQuery": {
37
+ "type": "object",
38
+ "required": ["openontology", "kind", "id", "description", "query"],
39
+ "additionalProperties": false,
40
+ "properties": {
41
+ "openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
42
+ "kind": { "const": "SavedQuery" },
43
+ "id": { "type": "string", "minLength": 1 },
44
+ "label": { "type": "string" },
45
+ "description": { "type": "string", "minLength": 1 },
46
+ "version": { "type": "string" },
47
+ "parameters": {
48
+ "type": "object",
49
+ "additionalProperties": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "properties": {
53
+ "type": { "type": "string" },
54
+ "required": { "type": "boolean", "default": false },
55
+ "default": {},
56
+ "description": { "type": "string" }
57
+ }
58
+ }
59
+ },
60
+ "expects": {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "description": "Expected result shape, used by tests and UI.",
64
+ "properties": {
65
+ "columns": { "type": "array", "items": { "type": "string" } },
66
+ "minRows": { "type": "integer", "minimum": 0 },
67
+ "maxRows": { "type": "integer", "minimum": 0 }
68
+ }
69
+ },
70
+ "query": { "$ref": "#/$defs/queryBody" },
71
+ "extensions": { "type": "object" }
72
+ }
73
+ },
74
+ "queryBody": {
75
+ "type": "object",
76
+ "required": ["match"],
77
+ "additionalProperties": false,
78
+ "properties": {
79
+ "match": { "$ref": "#/$defs/match" },
80
+ "where": { "$ref": "#/$defs/where" },
81
+ "select": { "$ref": "#/$defs/select" },
82
+ "include": { "$ref": "#/$defs/include" },
83
+ "orderBy": { "$ref": "#/$defs/orderBy" },
84
+ "distinct": { "type": "boolean", "default": false },
85
+ "asOf": { "type": "string" },
86
+ "recordedAsOf": { "type": "string" },
87
+ "limit": { "type": "integer", "minimum": 1 },
88
+ "offset": { "type": "integer", "minimum": 0 },
89
+ "maxDepth": { "type": "integer", "minimum": 1 }
90
+ }
91
+ },
92
+ "match": {
93
+ "type": "array",
94
+ "minItems": 1,
95
+ "items": {
96
+ "type": "object",
97
+ "required": ["subject", "predicate", "object"],
98
+ "additionalProperties": false,
99
+ "description": "A triple pattern. Terms starting with '?' are variables; everything else is a constant.",
100
+ "properties": {
101
+ "subject": { "type": "string", "minLength": 1 },
102
+ "predicate": { "type": "string", "minLength": 1 },
103
+ "object": {
104
+ "anyOf": [
105
+ { "type": "string", "minLength": 1 },
106
+ {
107
+ "type": "object",
108
+ "additionalProperties": false,
109
+ "properties": {
110
+ "entity": { "type": "string" },
111
+ "value": {},
112
+ "variable": { "type": "string" }
113
+ }
114
+ }
115
+ ]
116
+ },
117
+ "optional": { "type": "boolean", "default": false },
118
+ "bindClaim": {
119
+ "type": "string",
120
+ "description": "Variable bound to the matched claim id, for explanations."
121
+ }
122
+ }
123
+ }
124
+ },
125
+ "where": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "object",
129
+ "required": ["variable", "operator"],
130
+ "additionalProperties": false,
131
+ "properties": {
132
+ "variable": { "type": "string", "minLength": 1 },
133
+ "field": {
134
+ "type": "string",
135
+ "description": "Entity field or property predicate to compare. Defaults to the bound term itself."
136
+ },
137
+ "operator": {
138
+ "type": "string",
139
+ "enum": [
140
+ "eq",
141
+ "neq",
142
+ "lt",
143
+ "lte",
144
+ "gt",
145
+ "gte",
146
+ "in",
147
+ "not-in",
148
+ "exists",
149
+ "not-exists",
150
+ "contains",
151
+ "starts-with",
152
+ "matches",
153
+ "before",
154
+ "after"
155
+ ]
156
+ },
157
+ "value": {}
158
+ }
159
+ }
160
+ },
161
+ "select": {
162
+ "type": "array",
163
+ "minItems": 1,
164
+ "items": { "type": "string", "minLength": 1 }
165
+ },
166
+ "include": {
167
+ "type": "object",
168
+ "additionalProperties": false,
169
+ "description": "Claim-status inclusion policy. Each status is filterable independently.",
170
+ "properties": {
171
+ "claimStatus": {
172
+ "type": "array",
173
+ "items": {
174
+ "type": "string",
175
+ "enum": ["asserted", "proposed", "disputed", "retracted", "superseded", "derived"]
176
+ },
177
+ "uniqueItems": true
178
+ },
179
+ "derived": { "type": "boolean" },
180
+ "labels": { "type": "boolean", "description": "Expand entity labels in results." },
181
+ "properties": {
182
+ "type": "array",
183
+ "items": { "type": "string" },
184
+ "description": "Additional entity properties to expand in results."
185
+ },
186
+ "visibility": {
187
+ "type": "array",
188
+ "items": { "type": "string", "enum": ["public", "internal", "private"] },
189
+ "uniqueItems": true
190
+ }
191
+ }
192
+ },
193
+ "orderBy": {
194
+ "type": "array",
195
+ "items": {
196
+ "type": "object",
197
+ "required": ["variable"],
198
+ "additionalProperties": false,
199
+ "properties": {
200
+ "variable": { "type": "string" },
201
+ "field": { "type": "string" },
202
+ "direction": { "type": "string", "enum": ["asc", "desc"], "default": "asc" }
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://logicsrc.com/schemas/openontology/relationship-type.schema.json",
4
+ "title": "LogicSRC OpenOntology Relationship Type",
5
+ "description": "A typed connection whose object is another entity. Symmetry, transitivity, and inverses are never inferred unless declared here and explicitly permitted by a query.",
6
+ "type": "object",
7
+ "required": ["openontology", "kind", "id", "label", "description", "from", "to"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
11
+ "kind": { "const": "RelationshipType" },
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
+ "from": {
18
+ "description": "Allowed subject entity types (domain).",
19
+ "type": "array",
20
+ "minItems": 1,
21
+ "items": { "type": "string" },
22
+ "uniqueItems": true
23
+ },
24
+ "to": {
25
+ "description": "Allowed object entity types (range).",
26
+ "type": "array",
27
+ "minItems": 1,
28
+ "items": { "type": "string" },
29
+ "uniqueItems": true
30
+ },
31
+ "cardinality": {
32
+ "type": "string",
33
+ "enum": ["one-to-one", "one-to-many", "many-to-one", "many-to-many"],
34
+ "default": "many-to-many"
35
+ },
36
+ "temporal": {
37
+ "type": "boolean",
38
+ "default": false,
39
+ "description": "Whether claims using this predicate are expected to carry valid time."
40
+ },
41
+ "inverse": { "type": "string", "description": "Relationship type id of the declared inverse." },
42
+ "symmetric": { "type": "boolean", "default": false },
43
+ "transitive": { "type": "boolean", "default": false },
44
+ "deprecated": { "type": "boolean", "default": false },
45
+ "deprecationNote": { "type": "string" },
46
+ "extensions": { "type": "object" }
47
+ },
48
+ "$defs": {
49
+ "languageMap": {
50
+ "type": "object",
51
+ "patternProperties": {
52
+ "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$": { "type": "string" }
53
+ },
54
+ "additionalProperties": false
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://logicsrc.com/schemas/openontology/review.schema.json",
4
+ "title": "LogicSRC OpenOntology Review",
5
+ "description": "A reviewer's assessment of a change set. Rejected change sets remain inspectable together with their reviews.",
6
+ "type": "object",
7
+ "required": ["openontology", "kind", "id", "changeSet", "reviewer", "state", "createdAt"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
11
+ "kind": { "const": "Review" },
12
+ "id": { "type": "string", "minLength": 1 },
13
+ "changeSet": { "type": "string", "minLength": 1 },
14
+ "reviewer": { "type": "string", "minLength": 1 },
15
+ "state": {
16
+ "type": "string",
17
+ "enum": ["commented", "changes-requested", "approved", "rejected"]
18
+ },
19
+ "comment": { "type": "string" },
20
+ "createdAt": { "type": "string", "format": "date-time" },
21
+ "operationDecisions": {
22
+ "type": "array",
23
+ "description": "Per-operation accept/reject, so a curator can take part of an AI-generated change set.",
24
+ "items": {
25
+ "type": "object",
26
+ "required": ["index", "decision"],
27
+ "additionalProperties": false,
28
+ "properties": {
29
+ "index": { "type": "integer", "minimum": 0 },
30
+ "decision": { "type": "string", "enum": ["accept", "reject"] },
31
+ "comment": { "type": "string" }
32
+ }
33
+ }
34
+ },
35
+ "extensions": { "type": "object" }
36
+ }
37
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://logicsrc.com/schemas/openontology/source.schema.json",
4
+ "title": "LogicSRC OpenOntology Source",
5
+ "description": "Where a claim came from. Content hashes let implementations detect changed or unavailable source material.",
6
+ "type": "object",
7
+ "required": ["openontology", "kind", "id", "sourceType", "uri", "retrievedAt"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "openontology": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
11
+ "kind": { "const": "Source" },
12
+ "id": { "type": "string", "minLength": 1 },
13
+ "sourceType": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "description": "e.g. git-commit, web-page, api-response, csv, markdown, database-row, manual."
17
+ },
18
+ "uri": { "type": "string", "minLength": 1 },
19
+ "title": { "type": "string" },
20
+ "publisher": { "type": "string" },
21
+ "author": { "type": "string" },
22
+ "retrievedAt": { "type": "string", "format": "date-time" },
23
+ "publishedAt": { "type": "string", "format": "date-time" },
24
+ "contentHash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
25
+ "mediaType": { "type": "string" },
26
+ "license": {
27
+ "type": "string",
28
+ "description": "SPDX id, license URL, or 'unknown'. Governs whether excerpts may be redistributed."
29
+ },
30
+ "visibility": {
31
+ "type": "string",
32
+ "enum": ["public", "internal", "private"],
33
+ "default": "public"
34
+ },
35
+ "stale": {
36
+ "type": "boolean",
37
+ "description": "Set when a re-fetch found different content or the source became unavailable."
38
+ },
39
+ "lastCheckedAt": { "type": "string", "format": "date-time" },
40
+ "adapter": { "type": "string", "description": "Source adapter that produced this record." },
41
+ "extensions": { "type": "object" }
42
+ }
43
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.logicsrc.com/logicsrc-plugin.schema.json",
4
+ "title": "LogicSRC Plugin Manifest",
5
+ "type": "object",
6
+ "required": ["id", "name", "version", "type", "default", "capabilities", "commands", "env"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
10
+ "name": { "type": "string", "minLength": 1 },
11
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?$" },
12
+ "type": {
13
+ "type": "array",
14
+ "minItems": 1,
15
+ "items": { "type": "string", "minLength": 1 },
16
+ "uniqueItems": true
17
+ },
18
+ "default": { "type": "boolean" },
19
+ "capabilities": {
20
+ "type": "array",
21
+ "items": { "type": "string", "pattern": "^[a-z][a-z0-9_-]*(\\.[a-z][a-z0-9_-]*)+$" },
22
+ "uniqueItems": true
23
+ },
24
+ "commands": {
25
+ "type": "array",
26
+ "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
27
+ "uniqueItems": true
28
+ },
29
+ "env": {
30
+ "type": "array",
31
+ "items": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]*$" },
32
+ "uniqueItems": true
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.logicsrc.com/logicsrc-pull-request.schema.json",
4
+ "title": "LogicSRC Pull Request",
5
+ "type": "object",
6
+ "required": ["type", "version", "repo", "title", "author_did", "source_branch", "target_branch", "status"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "type": { "const": "logicsrc.pull_request" },
10
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
11
+ "repo": { "type": "string", "pattern": "^[a-z0-9][a-z0-9/_-]*$" },
12
+ "number": { "type": "integer", "minimum": 1 },
13
+ "title": { "type": "string", "minLength": 1, "maxLength": 160 },
14
+ "description": { "type": "string" },
15
+ "author_did": { "$ref": "#/$defs/did" },
16
+ "source_branch": { "type": "string", "minLength": 1 },
17
+ "target_branch": { "type": "string", "minLength": 1 },
18
+ "head_sha": { "type": "string", "pattern": "^[0-9a-f]{7,64}$" },
19
+ "task": { "type": "string", "description": "Linked logicsrc.task id." },
20
+ "status": {
21
+ "type": "string",
22
+ "enum": ["draft", "open", "approved", "changes_requested", "merged", "closed"]
23
+ },
24
+ "checks": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "object",
28
+ "required": ["name", "status"],
29
+ "additionalProperties": false,
30
+ "properties": {
31
+ "name": { "type": "string", "minLength": 1 },
32
+ "status": { "type": "string", "enum": ["pending", "passing", "failing"] },
33
+ "url": { "type": "string", "format": "uri" }
34
+ }
35
+ }
36
+ },
37
+ "reviews": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "object",
41
+ "required": ["reviewer_did", "decision"],
42
+ "additionalProperties": false,
43
+ "properties": {
44
+ "reviewer_did": { "$ref": "#/$defs/did" },
45
+ "decision": { "type": "string", "enum": ["approve", "request_changes", "comment"] },
46
+ "reputation": { "type": "number", "minimum": 0 },
47
+ "summary": { "type": "string" },
48
+ "created_at": { "type": "string", "format": "date-time" }
49
+ }
50
+ }
51
+ },
52
+ "merge": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "properties": {
56
+ "method": { "type": "string", "enum": ["merge", "squash", "rebase"] },
57
+ "merged_by_did": { "$ref": "#/$defs/did" },
58
+ "merge_sha": { "type": "string", "pattern": "^[0-9a-f]{7,64}$" },
59
+ "policy_satisfied": { "type": "boolean" },
60
+ "merged_at": { "type": "string", "format": "date-time" }
61
+ }
62
+ },
63
+ "created_at": { "type": "string", "format": "date-time" },
64
+ "updated_at": { "type": "string", "format": "date-time" },
65
+ "logicsrc_version": { "type": "string" }
66
+ },
67
+ "$defs": {
68
+ "did": {
69
+ "type": "string",
70
+ "pattern": "^[a-z0-9][a-z0-9._-]*\\.[a-z0-9][a-z0-9._-]*$"
71
+ }
72
+ }
73
+ }