@orkastery/cli 0.2.0 → 0.3.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 (242) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +86 -65
  3. package/adapters/README.md +30 -15
  4. package/adapters/claude-code/.claude-plugin/plugin.json +11 -5
  5. package/adapters/claude-code/README.md +110 -8
  6. package/adapters/claude-code/commands/onboarding.md +21 -0
  7. package/adapters/claude-code/commands/ork.md +99 -27
  8. package/adapters/claude-code/hooks/hooks.json +6 -1
  9. package/adapters/claude-code/hooks/ork-sensor.js +66 -0
  10. package/adapters/codex/skills/ork/SKILL.md +57 -0
  11. package/adapters/hermes/README.md +163 -0
  12. package/adapters/hermes/bin/ork-abrir-thread.sh +2 -0
  13. package/adapters/hermes/bin/ork-brain.sh +4 -0
  14. package/adapters/hermes/bin/ork-hitl-answer.py +82 -0
  15. package/adapters/hermes/bin/ork-maestro.sh +6 -0
  16. package/adapters/hermes/bin/ork-master-enviar.py +84 -0
  17. package/adapters/hermes/bin/ork-objective-message.sh +17 -0
  18. package/adapters/hermes/bin/ork-objective-status.sh +12 -0
  19. package/adapters/hermes/bin/ork-pulse-enviar.py +47 -0
  20. package/adapters/hermes/hermes.plugin.json +26 -4
  21. package/adapters/hermes/hitl-ingress/__init__.py +356 -0
  22. package/adapters/hermes/hitl-ingress/plugin.yaml +4 -0
  23. package/adapters/hermes/skills/orkastery-devmaster/SKILL.md +75 -22
  24. package/adapters/openclaw/README.md +135 -26
  25. package/adapters/openclaw/bin/ork-brain.sh +4 -0
  26. package/adapters/openclaw/construir.sh +19 -0
  27. package/adapters/openclaw/dist/hitl-ingress.js +199 -0
  28. package/adapters/openclaw/dist/index.js +437 -0
  29. package/adapters/openclaw/openclaw.plugin.json +39 -134
  30. package/adapters/openclaw/package.json +26 -0
  31. package/adapters/openclaw/src/hitl-ingress.ts +180 -0
  32. package/adapters/openclaw/src/index.ts +458 -0
  33. package/adapters/openclaw/src/tipos-openclaw.d.ts +58 -0
  34. package/adapters/openclaw/tsconfig.json +15 -0
  35. package/assets/docs/markdownlint-cli2.jsonc +22 -0
  36. package/assets/docs/padroes/documentacao-de-produto.md +133 -0
  37. package/assets/docs/padroes/roadmap-de-produto.md +98 -0
  38. package/assets/docs/produto/README.md +14 -0
  39. package/assets/docs/produto/_modelo-feature.md +59 -0
  40. package/assets/docs/roadmap/README.md +14 -0
  41. package/assets/docs/roadmap/_modelo-item.md +73 -0
  42. package/assets/orkmind-native-schema.json +32 -0
  43. package/assets/orkmind_bridge.py +357 -0
  44. package/assets/orkmind_fixture.py +67 -0
  45. package/assets/orkmind_prospective.py +138 -0
  46. package/assets/reference-tariffs-i07.json +23 -0
  47. package/dist/adapters/claude-bg.js +488 -39
  48. package/dist/adapters/codex-controller-sensor.js +449 -0
  49. package/dist/adapters/codex-controller-worker.js +361 -0
  50. package/dist/adapters/codex-controller.js +252 -0
  51. package/dist/adapters/codex-events.js +205 -0
  52. package/dist/adapters/codex-question.js +26 -0
  53. package/dist/adapters/codex-runner.js +133 -0
  54. package/dist/adapters/codex.js +394 -0
  55. package/dist/agents-md.js +84 -0
  56. package/dist/auditoria.js +11 -8
  57. package/dist/auditrun.js +5 -4
  58. package/dist/board.js +173 -22
  59. package/dist/branch-de-estado.js +136 -0
  60. package/dist/canarios-hitl.js +177 -0
  61. package/dist/canarios-i43.js +543 -0
  62. package/dist/canarios-pulse.js +147 -0
  63. package/dist/canarios-sensores.js +129 -0
  64. package/dist/canarios.js +111 -2
  65. package/dist/catalogo.js +9 -0
  66. package/dist/ci.js +216 -0
  67. package/dist/ciclos.js +2 -1
  68. package/dist/claim-lint.js +64 -0
  69. package/dist/claims.js +60 -0
  70. package/dist/company-brain-capture.js +195 -0
  71. package/dist/company-brain-cli.js +123 -0
  72. package/dist/company-brain-client.js +61 -0
  73. package/dist/company-brain-contract.js +166 -0
  74. package/dist/company-brain-journal.js +192 -0
  75. package/dist/company-brain-mcp.js +33 -0
  76. package/dist/company-brain-migration.js +60 -0
  77. package/dist/company-brain-source.js +177 -0
  78. package/dist/company-brain-worker.js +18 -0
  79. package/dist/conducao-texto.js +61 -0
  80. package/dist/conducao.js +876 -0
  81. package/dist/contrato-publico.js +39 -0
  82. package/dist/creation-operation-store.js +251 -0
  83. package/dist/creation-operation.js +148 -0
  84. package/dist/decisao-autonoma.js +183 -0
  85. package/dist/delegation.js +79 -0
  86. package/dist/demo.js +120 -0
  87. package/dist/docs.js +828 -0
  88. package/dist/doctor.js +183 -24
  89. package/dist/entrega-pr.js +117 -0
  90. package/dist/escopo-escrita.js +71 -0
  91. package/dist/estado-thread.js +222 -0
  92. package/dist/evalrunner.js +12 -0
  93. package/dist/fabrica-estado.js +329 -0
  94. package/dist/fabrica-publicar.js +76 -0
  95. package/dist/fix.js +21 -0
  96. package/dist/gates.js +55 -9
  97. package/dist/handoff.js +39 -23
  98. package/dist/hitl-canais.js +333 -0
  99. package/dist/hitl-classificacao.js +131 -0
  100. package/dist/hitl-contract.js +465 -0
  101. package/dist/hitl-estado.js +136 -0
  102. package/dist/hitl-gates.js +554 -0
  103. package/dist/hitl-ingress-receipt.js +382 -0
  104. package/dist/hitl-local-atestado.js +57 -0
  105. package/dist/hitl-local-receipt.js +328 -0
  106. package/dist/hitl-local.js +143 -0
  107. package/dist/hitl-lock.js +139 -0
  108. package/dist/hitl-lote.js +223 -0
  109. package/dist/hitl-native-offer.js +97 -0
  110. package/dist/hitl-native.js +65 -0
  111. package/dist/hitl-presentation.js +209 -0
  112. package/dist/hitl-public-receipt.js +176 -0
  113. package/dist/hitl-resumo.js +209 -0
  114. package/dist/hitl-sessions.js +475 -0
  115. package/dist/hitl.js +711 -0
  116. package/dist/horario.js +269 -0
  117. package/dist/hosts.js +198 -22
  118. package/dist/index.js +1736 -93
  119. package/dist/indice.js +99 -0
  120. package/dist/init.js +28 -3
  121. package/dist/integracoes-locais.js +17 -0
  122. package/dist/leases.js +65 -21
  123. package/dist/ledger-stats.js +272 -0
  124. package/dist/ledger.js +107 -2
  125. package/dist/licoes.js +215 -0
  126. package/dist/liveness.js +218 -0
  127. package/dist/maestro-actions.js +51 -0
  128. package/dist/maestro-authority.js +152 -0
  129. package/dist/maestro-cli.js +97 -0
  130. package/dist/maestro-contract.js +55 -0
  131. package/dist/maestro-discovery.js +132 -0
  132. package/dist/maestro-runtime.js +268 -0
  133. package/dist/maestro-snapshot.js +86 -0
  134. package/dist/maestro-sources.js +224 -0
  135. package/dist/manifest.js +165 -6
  136. package/dist/maquina.js +102 -0
  137. package/dist/master-audit.js +101 -0
  138. package/dist/master-batch.js +43 -0
  139. package/dist/master-digest.js +149 -0
  140. package/dist/master-migracao.js +155 -0
  141. package/dist/master.js +361 -77
  142. package/dist/mcp-artifacts.js +234 -0
  143. package/dist/mcp-git.js +433 -0
  144. package/dist/mcp-install.js +310 -0
  145. package/dist/mcp-maestro.js +25 -0
  146. package/dist/mcp-server.js +469 -0
  147. package/dist/mcp-ship.js +436 -0
  148. package/dist/mcp-verify.js +173 -0
  149. package/dist/memoria-humana.js +207 -0
  150. package/dist/memoria.js +314 -78
  151. package/dist/memory-migration.js +279 -0
  152. package/dist/memory-prospective.js +148 -0
  153. package/dist/modos-migracao.js +191 -0
  154. package/dist/modos.js +151 -15
  155. package/dist/monitor-lock.js +110 -0
  156. package/dist/objective.js +449 -0
  157. package/dist/ocupacao.js +267 -0
  158. package/dist/onboarding.js +303 -0
  159. package/dist/orkmind.js +389 -90
  160. package/dist/orquestracao.js +96 -69
  161. package/dist/phase.js +596 -150
  162. package/dist/playbook-capabilities.js +150 -0
  163. package/dist/playbook-contracts.js +188 -0
  164. package/dist/portfolio-context.js +61 -0
  165. package/dist/portfolio.js +180 -0
  166. package/dist/preflight.js +207 -0
  167. package/dist/process-audit.js +112 -0
  168. package/dist/project-state.js +93 -0
  169. package/dist/prompts.js +25 -5
  170. package/dist/prova-minima.js +112 -0
  171. package/dist/pulse-cadencia.js +163 -0
  172. package/dist/pulse-consentimento.js +260 -0
  173. package/dist/pulse-delivery.js +323 -0
  174. package/dist/pulse-resposta.js +542 -0
  175. package/dist/pulse.js +262 -0
  176. package/dist/ratelimit.js +35 -2
  177. package/dist/recall.js +80 -3
  178. package/dist/redacao-saida.js +45 -0
  179. package/dist/redacao-url.js +66 -0
  180. package/dist/retry.js +637 -115
  181. package/dist/roadmap-reservas.js +243 -0
  182. package/dist/runtime-ambiente.js +38 -0
  183. package/dist/runtime-context.js +215 -0
  184. package/dist/runtime-profiles.js +869 -0
  185. package/dist/runtimes.js +103 -0
  186. package/dist/sandbox.js +9 -0
  187. package/dist/session-events.js +203 -0
  188. package/dist/session-watcher-claude.js +637 -0
  189. package/dist/session-watcher.js +683 -0
  190. package/dist/sessoes-adopt.js +154 -0
  191. package/dist/sessoes-inventario.js +159 -0
  192. package/dist/sessoes.js +16 -35
  193. package/dist/setup.js +691 -0
  194. package/dist/ship.js +150 -15
  195. package/dist/slug.js +1 -1
  196. package/dist/thread-close.js +115 -0
  197. package/dist/thread.js +142 -28
  198. package/dist/tokens.js +1 -1
  199. package/dist/util.js +4 -2
  200. package/dist/verify-sandbox.js +265 -0
  201. package/dist/verify.js +270 -25
  202. package/dist/versao.js +60 -0
  203. package/dist/worktree.js +31 -2
  204. package/dist/write-activation.js +291 -0
  205. package/dist/yaml.js +2 -0
  206. package/eval/casos/onboarding.json +102 -0
  207. package/eval/casos/orkastery-bootstrap.json +35 -1
  208. package/eval/casos/scope-check-capability-map.json +45 -7
  209. package/eval/casos/ship-release.json +2 -2
  210. package/eval/fixtures/b0-slug-e-modos/caso.json +35 -22
  211. package/eval/fixtures/b2-master-log/caso.json +1 -1
  212. package/eval/fixtures/fx-adapter-editado-detectado/caso.json +19 -0
  213. package/eval/fixtures/fx-auto-quiet/caso.json +11 -0
  214. package/eval/fixtures/fx-blanket-approve/caso.json +10 -0
  215. package/eval/fixtures/fx-check-runtime-cruzado/caso.json +20 -0
  216. package/eval/fixtures/fx-codex-dry/caso.json +18 -0
  217. package/eval/fixtures/fx-donewhen-executavel/caso.json +15 -0
  218. package/eval/fixtures/fx-estado-dividido/caso.json +15 -0
  219. package/eval/fixtures/fx-fase-orfa/caso.json +116 -0
  220. package/eval/fixtures/fx-happy/caso.json +6 -4
  221. package/eval/fixtures/fx-hitl-latency/caso.json +20 -0
  222. package/eval/fixtures/fx-indice-reversao/caso.json +25 -0
  223. package/eval/fixtures/fx-listagem-abertas/caso.json +16 -0
  224. package/eval/fixtures/fx-maestro-bootstrap/caso.json +21 -0
  225. package/eval/fixtures/fx-modo-aposentado-escritor/caso.json +21 -0
  226. package/eval/fixtures/fx-modo-aposentado-leitor/caso.json +16 -0
  227. package/eval/fixtures/fx-objective-oscillation/caso.json +14 -0
  228. package/eval/fixtures/fx-omnicanal/caso.json +17 -0
  229. package/eval/fixtures/fx-sensores-runtime/caso.json +17 -0
  230. package/monitor/company-brain.cjs +17 -0
  231. package/monitor/pulse-scope.cjs +45 -0
  232. package/monitor/pulse.cron +18 -0
  233. package/monitor/varredura-pulse.sh +27 -0
  234. package/package.json +25 -4
  235. package/schemas/claims.schema.json +25 -0
  236. package/schemas/company-brain.schema.json +1158 -0
  237. package/schemas/creation-operation.schema.json +365 -0
  238. package/schemas/maestro-snapshot.schema.json +2716 -0
  239. package/skills/core/onboarding/SKILL.md +50 -0
  240. package/skills/core/orkastery-bootstrap/SKILL.md +95 -65
  241. package/skills/core/thread-state/SKILL.md +3 -1
  242. package/skills/governance/scope-check-capability-map/SKILL.md +17 -7
@@ -0,0 +1,1158 @@
1
+ {
2
+ "$defs": {
3
+ "Alias": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "system": {
7
+ "maxLength": 160,
8
+ "minLength": 1,
9
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
10
+ "title": "System",
11
+ "type": "string"
12
+ },
13
+ "instance": {
14
+ "maxLength": 160,
15
+ "minLength": 1,
16
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
17
+ "title": "Instance",
18
+ "type": "string"
19
+ },
20
+ "id": {
21
+ "maxLength": 160,
22
+ "minLength": 1,
23
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
24
+ "title": "Id",
25
+ "type": "string"
26
+ }
27
+ },
28
+ "required": [
29
+ "system",
30
+ "instance",
31
+ "id"
32
+ ],
33
+ "title": "Alias",
34
+ "type": "object"
35
+ },
36
+ "Assertion": {
37
+ "additionalProperties": false,
38
+ "properties": {
39
+ "schema": {
40
+ "const": "orkmind.company-brain-assertion/v1",
41
+ "title": "Schema",
42
+ "type": "string"
43
+ },
44
+ "tenant_id": {
45
+ "maxLength": 160,
46
+ "minLength": 1,
47
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
48
+ "title": "Tenant Id",
49
+ "type": "string"
50
+ },
51
+ "id": {
52
+ "maxLength": 160,
53
+ "minLength": 1,
54
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
55
+ "title": "Id",
56
+ "type": "string"
57
+ },
58
+ "version": {
59
+ "maximum": 9007199254740991,
60
+ "minimum": 1,
61
+ "title": "Version",
62
+ "type": "integer"
63
+ },
64
+ "subject": {
65
+ "maxLength": 160,
66
+ "minLength": 1,
67
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
68
+ "title": "Subject",
69
+ "type": "string"
70
+ },
71
+ "predicate": {
72
+ "maxLength": 160,
73
+ "minLength": 1,
74
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
75
+ "title": "Predicate",
76
+ "type": "string"
77
+ },
78
+ "object_id": {
79
+ "anyOf": [
80
+ {
81
+ "maxLength": 160,
82
+ "minLength": 1,
83
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
84
+ "type": "string"
85
+ },
86
+ {
87
+ "type": "null"
88
+ }
89
+ ],
90
+ "title": "Object Id"
91
+ },
92
+ "value": {
93
+ "anyOf": [
94
+ {
95
+ "type": "string"
96
+ },
97
+ {
98
+ "type": "integer"
99
+ },
100
+ {
101
+ "type": "boolean"
102
+ },
103
+ {
104
+ "type": "null"
105
+ }
106
+ ],
107
+ "title": "Value"
108
+ },
109
+ "source": {
110
+ "$ref": "#/$defs/Source"
111
+ },
112
+ "producer_id": {
113
+ "maxLength": 160,
114
+ "minLength": 1,
115
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
116
+ "title": "Producer Id",
117
+ "type": "string"
118
+ },
119
+ "actor_id": {
120
+ "anyOf": [
121
+ {
122
+ "maxLength": 160,
123
+ "minLength": 1,
124
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
125
+ "type": "string"
126
+ },
127
+ {
128
+ "type": "null"
129
+ }
130
+ ],
131
+ "title": "Actor Id"
132
+ },
133
+ "method": {
134
+ "const": "deterministic",
135
+ "title": "Method",
136
+ "type": "string"
137
+ },
138
+ "observed_at": {
139
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
140
+ "title": "Observed At",
141
+ "type": "string"
142
+ },
143
+ "recorded_at": {
144
+ "anyOf": [
145
+ {
146
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
147
+ "type": "string"
148
+ },
149
+ {
150
+ "type": "null"
151
+ }
152
+ ],
153
+ "title": "Recorded At"
154
+ },
155
+ "occurred_at": {
156
+ "anyOf": [
157
+ {
158
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
159
+ "type": "string"
160
+ },
161
+ {
162
+ "type": "null"
163
+ }
164
+ ],
165
+ "title": "Occurred At"
166
+ },
167
+ "valid_from": {
168
+ "anyOf": [
169
+ {
170
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
171
+ "type": "string"
172
+ },
173
+ {
174
+ "type": "null"
175
+ }
176
+ ],
177
+ "title": "Valid From"
178
+ },
179
+ "valid_to": {
180
+ "anyOf": [
181
+ {
182
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
183
+ "type": "string"
184
+ },
185
+ {
186
+ "type": "null"
187
+ }
188
+ ],
189
+ "title": "Valid To"
190
+ },
191
+ "precision": {
192
+ "enum": [
193
+ "instant",
194
+ "unknown"
195
+ ],
196
+ "title": "Precision",
197
+ "type": "string"
198
+ },
199
+ "state": {
200
+ "enum": [
201
+ "candidate",
202
+ "accepted",
203
+ "contested",
204
+ "superseded",
205
+ "retracted",
206
+ "archived"
207
+ ],
208
+ "title": "State",
209
+ "type": "string"
210
+ },
211
+ "acl_ref": {
212
+ "maxLength": 160,
213
+ "minLength": 1,
214
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
215
+ "title": "Acl Ref",
216
+ "type": "string"
217
+ }
218
+ },
219
+ "required": [
220
+ "schema",
221
+ "tenant_id",
222
+ "id",
223
+ "version",
224
+ "subject",
225
+ "predicate",
226
+ "object_id",
227
+ "value",
228
+ "source",
229
+ "producer_id",
230
+ "actor_id",
231
+ "method",
232
+ "observed_at",
233
+ "recorded_at",
234
+ "occurred_at",
235
+ "valid_from",
236
+ "valid_to",
237
+ "precision",
238
+ "state",
239
+ "acl_ref"
240
+ ],
241
+ "title": "Assertion",
242
+ "type": "object"
243
+ },
244
+ "Cycle": {
245
+ "additionalProperties": false,
246
+ "properties": {
247
+ "thread_id": {
248
+ "maxLength": 160,
249
+ "minLength": 1,
250
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
251
+ "title": "Thread Id",
252
+ "type": "string"
253
+ },
254
+ "objective_id": {
255
+ "anyOf": [
256
+ {
257
+ "maxLength": 160,
258
+ "minLength": 1,
259
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
260
+ "type": "string"
261
+ },
262
+ {
263
+ "type": "null"
264
+ }
265
+ ],
266
+ "title": "Objective Id"
267
+ },
268
+ "objective_hash": {
269
+ "anyOf": [
270
+ {
271
+ "pattern": "^[a-f0-9]{64}$",
272
+ "type": "string"
273
+ },
274
+ {
275
+ "type": "null"
276
+ }
277
+ ],
278
+ "title": "Objective Hash"
279
+ },
280
+ "project_id": {
281
+ "anyOf": [
282
+ {
283
+ "maxLength": 160,
284
+ "minLength": 1,
285
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
286
+ "type": "string"
287
+ },
288
+ {
289
+ "type": "null"
290
+ }
291
+ ],
292
+ "title": "Project Id"
293
+ },
294
+ "initiative_ids": {
295
+ "items": {
296
+ "maxLength": 160,
297
+ "minLength": 1,
298
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
299
+ "type": "string"
300
+ },
301
+ "maxItems": 1000,
302
+ "title": "Initiative Ids",
303
+ "type": "array"
304
+ },
305
+ "phase": {
306
+ "anyOf": [
307
+ {
308
+ "enum": [
309
+ "GOAL",
310
+ "PLAN",
311
+ "GO",
312
+ "CHECK",
313
+ "SHIP",
314
+ "MASTER"
315
+ ],
316
+ "type": "string"
317
+ },
318
+ {
319
+ "type": "null"
320
+ }
321
+ ],
322
+ "title": "Phase"
323
+ },
324
+ "session_id": {
325
+ "anyOf": [
326
+ {
327
+ "maxLength": 160,
328
+ "minLength": 1,
329
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
330
+ "type": "string"
331
+ },
332
+ {
333
+ "type": "null"
334
+ }
335
+ ],
336
+ "title": "Session Id"
337
+ },
338
+ "context_hash": {
339
+ "anyOf": [
340
+ {
341
+ "pattern": "^[a-f0-9]{64}$",
342
+ "type": "string"
343
+ },
344
+ {
345
+ "type": "null"
346
+ }
347
+ ],
348
+ "title": "Context Hash"
349
+ }
350
+ },
351
+ "required": [
352
+ "thread_id",
353
+ "objective_id",
354
+ "objective_hash",
355
+ "project_id",
356
+ "initiative_ids",
357
+ "phase",
358
+ "session_id",
359
+ "context_hash"
360
+ ],
361
+ "title": "Cycle",
362
+ "type": "object"
363
+ },
364
+ "Entity": {
365
+ "additionalProperties": false,
366
+ "properties": {
367
+ "schema": {
368
+ "const": "orkmind.company-brain-entity/v1",
369
+ "title": "Schema",
370
+ "type": "string"
371
+ },
372
+ "tenant_id": {
373
+ "maxLength": 160,
374
+ "minLength": 1,
375
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
376
+ "title": "Tenant Id",
377
+ "type": "string"
378
+ },
379
+ "id": {
380
+ "maxLength": 160,
381
+ "minLength": 1,
382
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
383
+ "title": "Id",
384
+ "type": "string"
385
+ },
386
+ "kind": {
387
+ "enum": [
388
+ "prod",
389
+ "proj",
390
+ "init"
391
+ ],
392
+ "title": "Kind",
393
+ "type": "string"
394
+ },
395
+ "version": {
396
+ "maximum": 9007199254740991,
397
+ "minimum": 1,
398
+ "title": "Version",
399
+ "type": "integer"
400
+ },
401
+ "parent_id": {
402
+ "anyOf": [
403
+ {
404
+ "maxLength": 160,
405
+ "minLength": 1,
406
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
407
+ "type": "string"
408
+ },
409
+ {
410
+ "type": "null"
411
+ }
412
+ ],
413
+ "title": "Parent Id"
414
+ },
415
+ "workspace_ids": {
416
+ "items": {
417
+ "maxLength": 160,
418
+ "minLength": 1,
419
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
420
+ "type": "string"
421
+ },
422
+ "maxItems": 1000,
423
+ "title": "Workspace Ids",
424
+ "type": "array"
425
+ },
426
+ "depends_on": {
427
+ "items": {
428
+ "maxLength": 160,
429
+ "minLength": 1,
430
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
431
+ "type": "string"
432
+ },
433
+ "maxItems": 1000,
434
+ "title": "Depends On",
435
+ "type": "array"
436
+ },
437
+ "aliases": {
438
+ "items": {
439
+ "$ref": "#/$defs/Alias"
440
+ },
441
+ "maxItems": 1000,
442
+ "title": "Aliases",
443
+ "type": "array"
444
+ },
445
+ "title": {
446
+ "maxLength": 160,
447
+ "minLength": 1,
448
+ "title": "Title",
449
+ "type": "string"
450
+ },
451
+ "description": {
452
+ "maxLength": 20000,
453
+ "title": "Description",
454
+ "type": "string"
455
+ },
456
+ "status": {
457
+ "enum": [
458
+ "idea",
459
+ "planned",
460
+ "ready",
461
+ "in_progress",
462
+ "validating",
463
+ "delivered",
464
+ "blocked",
465
+ "cancelled"
466
+ ],
467
+ "title": "Status",
468
+ "type": "string"
469
+ },
470
+ "acceptance_criteria": {
471
+ "items": {
472
+ "maxLength": 2000,
473
+ "type": "string"
474
+ },
475
+ "maxItems": 100,
476
+ "title": "Acceptance Criteria",
477
+ "type": "array"
478
+ },
479
+ "owner": {
480
+ "$ref": "#/$defs/Owner"
481
+ },
482
+ "source": {
483
+ "$ref": "#/$defs/Source"
484
+ },
485
+ "acl_ref": {
486
+ "maxLength": 160,
487
+ "minLength": 1,
488
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
489
+ "title": "Acl Ref",
490
+ "type": "string"
491
+ },
492
+ "observed_at": {
493
+ "anyOf": [
494
+ {
495
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
496
+ "type": "string"
497
+ },
498
+ {
499
+ "type": "null"
500
+ }
501
+ ],
502
+ "title": "Observed At"
503
+ },
504
+ "recorded_at": {
505
+ "anyOf": [
506
+ {
507
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
508
+ "type": "string"
509
+ },
510
+ {
511
+ "type": "null"
512
+ }
513
+ ],
514
+ "title": "Recorded At"
515
+ }
516
+ },
517
+ "required": [
518
+ "schema",
519
+ "tenant_id",
520
+ "id",
521
+ "kind",
522
+ "version",
523
+ "parent_id",
524
+ "workspace_ids",
525
+ "depends_on",
526
+ "aliases",
527
+ "title",
528
+ "description",
529
+ "status",
530
+ "acceptance_criteria",
531
+ "owner",
532
+ "source",
533
+ "acl_ref",
534
+ "observed_at",
535
+ "recorded_at"
536
+ ],
537
+ "title": "Entity",
538
+ "type": "object"
539
+ },
540
+ "Event": {
541
+ "additionalProperties": false,
542
+ "properties": {
543
+ "schema": {
544
+ "const": "orkmind.company-brain-event/v1",
545
+ "title": "Schema",
546
+ "type": "string"
547
+ },
548
+ "tenant_id": {
549
+ "maxLength": 160,
550
+ "minLength": 1,
551
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
552
+ "title": "Tenant Id",
553
+ "type": "string"
554
+ },
555
+ "id": {
556
+ "maxLength": 160,
557
+ "minLength": 1,
558
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
559
+ "title": "Id",
560
+ "type": "string"
561
+ },
562
+ "producer_id": {
563
+ "maxLength": 160,
564
+ "minLength": 1,
565
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
566
+ "title": "Producer Id",
567
+ "type": "string"
568
+ },
569
+ "aggregate_id": {
570
+ "maxLength": 160,
571
+ "minLength": 1,
572
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
573
+ "title": "Aggregate Id",
574
+ "type": "string"
575
+ },
576
+ "sequence": {
577
+ "maximum": 9007199254740991,
578
+ "minimum": 1,
579
+ "title": "Sequence",
580
+ "type": "integer"
581
+ },
582
+ "source_event_id": {
583
+ "maxLength": 160,
584
+ "minLength": 1,
585
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
586
+ "title": "Source Event Id",
587
+ "type": "string"
588
+ },
589
+ "source": {
590
+ "$ref": "#/$defs/Source"
591
+ },
592
+ "operation": {
593
+ "enum": [
594
+ "upsert",
595
+ "assert",
596
+ "tombstone"
597
+ ],
598
+ "title": "Operation",
599
+ "type": "string"
600
+ },
601
+ "payload": {
602
+ "anyOf": [
603
+ {
604
+ "$ref": "#/$defs/Entity"
605
+ },
606
+ {
607
+ "$ref": "#/$defs/Assertion"
608
+ },
609
+ {
610
+ "type": "null"
611
+ }
612
+ ],
613
+ "title": "Payload"
614
+ },
615
+ "payload_hash": {
616
+ "pattern": "^[a-f0-9]{64}$",
617
+ "title": "Payload Hash",
618
+ "type": "string"
619
+ },
620
+ "cycle": {
621
+ "anyOf": [
622
+ {
623
+ "$ref": "#/$defs/Cycle"
624
+ },
625
+ {
626
+ "type": "null"
627
+ }
628
+ ]
629
+ },
630
+ "evidence_refs": {
631
+ "items": {
632
+ "maxLength": 512,
633
+ "minLength": 1,
634
+ "pattern": "^[a-zA-Z0-9._/#:-]+$",
635
+ "type": "string"
636
+ },
637
+ "maxItems": 1000,
638
+ "title": "Evidence Refs",
639
+ "type": "array"
640
+ },
641
+ "occurred_at": {
642
+ "anyOf": [
643
+ {
644
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
645
+ "type": "string"
646
+ },
647
+ {
648
+ "type": "null"
649
+ }
650
+ ],
651
+ "title": "Occurred At"
652
+ },
653
+ "observed_at": {
654
+ "anyOf": [
655
+ {
656
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
657
+ "type": "string"
658
+ },
659
+ {
660
+ "type": "null"
661
+ }
662
+ ],
663
+ "title": "Observed At"
664
+ },
665
+ "acl_ref": {
666
+ "maxLength": 160,
667
+ "minLength": 1,
668
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
669
+ "title": "Acl Ref",
670
+ "type": "string"
671
+ }
672
+ },
673
+ "required": [
674
+ "schema",
675
+ "tenant_id",
676
+ "id",
677
+ "producer_id",
678
+ "aggregate_id",
679
+ "sequence",
680
+ "source_event_id",
681
+ "source",
682
+ "operation",
683
+ "payload",
684
+ "payload_hash",
685
+ "cycle",
686
+ "evidence_refs",
687
+ "occurred_at",
688
+ "observed_at",
689
+ "acl_ref"
690
+ ],
691
+ "title": "Event",
692
+ "type": "object"
693
+ },
694
+ "Facets": {
695
+ "additionalProperties": false,
696
+ "properties": {
697
+ "ids": {
698
+ "items": {
699
+ "maxLength": 160,
700
+ "minLength": 1,
701
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
702
+ "type": "string"
703
+ },
704
+ "maxItems": 1000,
705
+ "title": "Ids",
706
+ "type": "array"
707
+ },
708
+ "kinds": {
709
+ "items": {
710
+ "enum": [
711
+ "prod",
712
+ "proj",
713
+ "init",
714
+ "assertion"
715
+ ],
716
+ "type": "string"
717
+ },
718
+ "title": "Kinds",
719
+ "type": "array"
720
+ },
721
+ "workspace_ids": {
722
+ "items": {
723
+ "maxLength": 160,
724
+ "minLength": 1,
725
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
726
+ "type": "string"
727
+ },
728
+ "maxItems": 1000,
729
+ "title": "Workspace Ids",
730
+ "type": "array"
731
+ },
732
+ "source_instances": {
733
+ "items": {
734
+ "maxLength": 160,
735
+ "minLength": 1,
736
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
737
+ "type": "string"
738
+ },
739
+ "maxItems": 1000,
740
+ "title": "Source Instances",
741
+ "type": "array"
742
+ }
743
+ },
744
+ "required": [
745
+ "ids",
746
+ "kinds",
747
+ "workspace_ids",
748
+ "source_instances"
749
+ ],
750
+ "title": "Facets",
751
+ "type": "object"
752
+ },
753
+ "Migration": {
754
+ "additionalProperties": false,
755
+ "properties": {
756
+ "schema": {
757
+ "const": "orkmind.company-brain-migration/v1",
758
+ "title": "Schema",
759
+ "type": "string"
760
+ },
761
+ "tenant_id": {
762
+ "maxLength": 160,
763
+ "minLength": 1,
764
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
765
+ "title": "Tenant Id",
766
+ "type": "string"
767
+ },
768
+ "batch_id": {
769
+ "maxLength": 160,
770
+ "minLength": 1,
771
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
772
+ "title": "Batch Id",
773
+ "type": "string"
774
+ },
775
+ "source_hash": {
776
+ "pattern": "^[a-f0-9]{64}$",
777
+ "title": "Source Hash",
778
+ "type": "string"
779
+ },
780
+ "operations": {
781
+ "items": {
782
+ "$ref": "#/$defs/MigrationOperation"
783
+ },
784
+ "maxItems": 1000,
785
+ "title": "Operations",
786
+ "type": "array"
787
+ },
788
+ "observed_at": {
789
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
790
+ "title": "Observed At",
791
+ "type": "string"
792
+ }
793
+ },
794
+ "required": [
795
+ "schema",
796
+ "tenant_id",
797
+ "batch_id",
798
+ "source_hash",
799
+ "operations",
800
+ "observed_at"
801
+ ],
802
+ "title": "Migration",
803
+ "type": "object"
804
+ },
805
+ "MigrationOperation": {
806
+ "additionalProperties": false,
807
+ "properties": {
808
+ "id": {
809
+ "maxLength": 160,
810
+ "minLength": 1,
811
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
812
+ "title": "Id",
813
+ "type": "string"
814
+ },
815
+ "operation": {
816
+ "enum": [
817
+ "insert",
818
+ "update",
819
+ "unchanged",
820
+ "conflict"
821
+ ],
822
+ "title": "Operation",
823
+ "type": "string"
824
+ },
825
+ "expected_version": {
826
+ "anyOf": [
827
+ {
828
+ "maximum": 9007199254740991,
829
+ "minimum": 1,
830
+ "type": "integer"
831
+ },
832
+ {
833
+ "type": "null"
834
+ }
835
+ ],
836
+ "title": "Expected Version"
837
+ },
838
+ "before_hash": {
839
+ "anyOf": [
840
+ {
841
+ "pattern": "^[a-f0-9]{64}$",
842
+ "type": "string"
843
+ },
844
+ {
845
+ "type": "null"
846
+ }
847
+ ],
848
+ "title": "Before Hash"
849
+ },
850
+ "after": {
851
+ "$ref": "#/$defs/Entity"
852
+ },
853
+ "gaps": {
854
+ "items": {
855
+ "maxLength": 160,
856
+ "minLength": 1,
857
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
858
+ "type": "string"
859
+ },
860
+ "maxItems": 1000,
861
+ "title": "Gaps",
862
+ "type": "array"
863
+ }
864
+ },
865
+ "required": [
866
+ "id",
867
+ "operation",
868
+ "expected_version",
869
+ "before_hash",
870
+ "after",
871
+ "gaps"
872
+ ],
873
+ "title": "MigrationOperation",
874
+ "type": "object"
875
+ },
876
+ "Owner": {
877
+ "additionalProperties": false,
878
+ "properties": {
879
+ "raw": {
880
+ "anyOf": [
881
+ {
882
+ "maxLength": 160,
883
+ "type": "string"
884
+ },
885
+ {
886
+ "type": "null"
887
+ }
888
+ ],
889
+ "title": "Raw"
890
+ },
891
+ "state": {
892
+ "enum": [
893
+ "legacy-label",
894
+ "unknown"
895
+ ],
896
+ "title": "State",
897
+ "type": "string"
898
+ },
899
+ "principal": {
900
+ "title": "Principal",
901
+ "type": "null"
902
+ }
903
+ },
904
+ "required": [
905
+ "raw",
906
+ "state",
907
+ "principal"
908
+ ],
909
+ "title": "Owner",
910
+ "type": "object"
911
+ },
912
+ "Receipt": {
913
+ "additionalProperties": false,
914
+ "properties": {
915
+ "schema": {
916
+ "const": "orkmind.company-brain-receipt/v1",
917
+ "title": "Schema",
918
+ "type": "string"
919
+ },
920
+ "tenant_id": {
921
+ "maxLength": 160,
922
+ "minLength": 1,
923
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
924
+ "title": "Tenant Id",
925
+ "type": "string"
926
+ },
927
+ "id": {
928
+ "maxLength": 160,
929
+ "minLength": 1,
930
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
931
+ "title": "Id",
932
+ "type": "string"
933
+ },
934
+ "event_id": {
935
+ "maxLength": 160,
936
+ "minLength": 1,
937
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
938
+ "title": "Event Id",
939
+ "type": "string"
940
+ },
941
+ "stage": {
942
+ "enum": [
943
+ "observed",
944
+ "received",
945
+ "validated",
946
+ "materialized",
947
+ "indexed",
948
+ "retrievable"
949
+ ],
950
+ "title": "Stage",
951
+ "type": "string"
952
+ },
953
+ "result": {
954
+ "enum": [
955
+ "ok",
956
+ "conflict",
957
+ "forbidden",
958
+ "unavailable",
959
+ "withheld"
960
+ ],
961
+ "title": "Result",
962
+ "type": "string"
963
+ },
964
+ "attempt": {
965
+ "maximum": 9007199254740991,
966
+ "minimum": 1,
967
+ "title": "Attempt",
968
+ "type": "integer"
969
+ },
970
+ "materialized_version": {
971
+ "anyOf": [
972
+ {
973
+ "maximum": 9007199254740991,
974
+ "minimum": 1,
975
+ "type": "integer"
976
+ },
977
+ {
978
+ "type": "null"
979
+ }
980
+ ],
981
+ "title": "Materialized Version"
982
+ },
983
+ "recorded_at": {
984
+ "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d{1,6})?Z$",
985
+ "title": "Recorded At",
986
+ "type": "string"
987
+ },
988
+ "previous_receipt_id": {
989
+ "anyOf": [
990
+ {
991
+ "maxLength": 160,
992
+ "minLength": 1,
993
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
994
+ "type": "string"
995
+ },
996
+ {
997
+ "type": "null"
998
+ }
999
+ ],
1000
+ "title": "Previous Receipt Id"
1001
+ },
1002
+ "error": {
1003
+ "anyOf": [
1004
+ {
1005
+ "maxLength": 160,
1006
+ "minLength": 1,
1007
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
1008
+ "type": "string"
1009
+ },
1010
+ {
1011
+ "type": "null"
1012
+ }
1013
+ ],
1014
+ "title": "Error"
1015
+ }
1016
+ },
1017
+ "required": [
1018
+ "schema",
1019
+ "tenant_id",
1020
+ "id",
1021
+ "event_id",
1022
+ "stage",
1023
+ "result",
1024
+ "attempt",
1025
+ "materialized_version",
1026
+ "recorded_at",
1027
+ "previous_receipt_id",
1028
+ "error"
1029
+ ],
1030
+ "title": "Receipt",
1031
+ "type": "object"
1032
+ },
1033
+ "Selection": {
1034
+ "additionalProperties": false,
1035
+ "properties": {
1036
+ "schema": {
1037
+ "const": "orkmind.company-brain-selection/v1",
1038
+ "title": "Schema",
1039
+ "type": "string"
1040
+ },
1041
+ "tenant_id": {
1042
+ "maxLength": 160,
1043
+ "minLength": 1,
1044
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
1045
+ "title": "Tenant Id",
1046
+ "type": "string"
1047
+ },
1048
+ "facets": {
1049
+ "$ref": "#/$defs/Facets"
1050
+ },
1051
+ "mode": {
1052
+ "enum": [
1053
+ "selection",
1054
+ "context"
1055
+ ],
1056
+ "title": "Mode",
1057
+ "type": "string"
1058
+ },
1059
+ "limit": {
1060
+ "maximum": 1000,
1061
+ "minimum": 1,
1062
+ "title": "Limit",
1063
+ "type": "integer"
1064
+ },
1065
+ "offset": {
1066
+ "maximum": 100000,
1067
+ "minimum": 0,
1068
+ "title": "Offset",
1069
+ "type": "integer"
1070
+ }
1071
+ },
1072
+ "required": [
1073
+ "schema",
1074
+ "tenant_id",
1075
+ "facets",
1076
+ "mode",
1077
+ "limit",
1078
+ "offset"
1079
+ ],
1080
+ "title": "Selection",
1081
+ "type": "object"
1082
+ },
1083
+ "Source": {
1084
+ "additionalProperties": false,
1085
+ "properties": {
1086
+ "authority": {
1087
+ "const": "ork",
1088
+ "title": "Authority",
1089
+ "type": "string"
1090
+ },
1091
+ "instance": {
1092
+ "maxLength": 160,
1093
+ "minLength": 1,
1094
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$",
1095
+ "title": "Instance",
1096
+ "type": "string"
1097
+ },
1098
+ "source_ref": {
1099
+ "maxLength": 512,
1100
+ "minLength": 1,
1101
+ "pattern": "^[a-zA-Z0-9._/#:-]+$",
1102
+ "title": "Source Ref",
1103
+ "type": "string"
1104
+ },
1105
+ "source_hash": {
1106
+ "pattern": "^[a-f0-9]{64}$",
1107
+ "title": "Source Hash",
1108
+ "type": "string"
1109
+ },
1110
+ "source_version": {
1111
+ "maximum": 9007199254740991,
1112
+ "minimum": 1,
1113
+ "title": "Source Version",
1114
+ "type": "integer"
1115
+ },
1116
+ "location": {
1117
+ "maxLength": 256,
1118
+ "minLength": 1,
1119
+ "title": "Location",
1120
+ "type": "string"
1121
+ }
1122
+ },
1123
+ "required": [
1124
+ "authority",
1125
+ "instance",
1126
+ "source_ref",
1127
+ "source_hash",
1128
+ "source_version",
1129
+ "location"
1130
+ ],
1131
+ "title": "Source",
1132
+ "type": "object"
1133
+ }
1134
+ },
1135
+ "$id": "orkmind.company-brain/v1",
1136
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1137
+ "anyOf": [
1138
+ {
1139
+ "$ref": "#/$defs/Entity"
1140
+ },
1141
+ {
1142
+ "$ref": "#/$defs/Assertion"
1143
+ },
1144
+ {
1145
+ "$ref": "#/$defs/Event"
1146
+ },
1147
+ {
1148
+ "$ref": "#/$defs/Receipt"
1149
+ },
1150
+ {
1151
+ "$ref": "#/$defs/Selection"
1152
+ },
1153
+ {
1154
+ "$ref": "#/$defs/Migration"
1155
+ }
1156
+ ],
1157
+ "x-semantic-validation": "company_brain.semantic and validate_catalog; D4-D7"
1158
+ }