@opensoha/contracts 0.1.23 → 0.1.25

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 (415) hide show
  1. package/COMPATIBILITY.md +95 -0
  2. package/README.md +24 -6
  3. package/agent/environment/README.md +55 -0
  4. package/agent/environment/export.go +139 -0
  5. package/agent/environment/export_test.go +62 -0
  6. package/agent/environment/preflight.go +62 -0
  7. package/agent/environment/preflight_test.go +41 -0
  8. package/agent/environment/protocol.go +221 -0
  9. package/agent/environment/protocol_test.go +81 -0
  10. package/agent/environment-lease.schema.json +2 -2
  11. package/agent/environment-template.schema.json +1 -1
  12. package/agent/guest/browser_network.go +77 -0
  13. package/agent/guest/data.go +62 -0
  14. package/agent/guest/protocol.go +235 -0
  15. package/agent/guest/protocol_test.go +142 -0
  16. package/agent/guest/renewal.go +56 -0
  17. package/agent/guest/renewal_test.go +53 -0
  18. package/agent/guest/runtime.go +315 -0
  19. package/agent/guest/runtime_json.go +75 -0
  20. package/agent/guest/runtime_test.go +110 -0
  21. package/agent/personal-browser-network-request.schema.json +40 -0
  22. package/agent/personal-browser-network-response.schema.json +44 -0
  23. package/agent/personal-environment-export.schema.json +55 -0
  24. package/agent/personal-environment-preflight-request.schema.json +52 -0
  25. package/agent/personal-environment-preflight-result.schema.json +69 -0
  26. package/agent/personal-environment-request.schema.json +137 -0
  27. package/agent/personal-environment-result.schema.json +101 -0
  28. package/agent/personal-guest-binding.schema.json +92 -0
  29. package/agent/personal-guest-data-plan.schema.json +32 -0
  30. package/agent/personal-guest-enrollment.schema.json +21 -0
  31. package/agent/personal-guest-heartbeat.schema.json +44 -0
  32. package/agent/personal-guest-provisioning.schema.json +71 -0
  33. package/agent/personal-guest-renewal.schema.json +33 -0
  34. package/agent/personal-guest-runtime-result.schema.json +164 -0
  35. package/agent/personal-guest-runtime.schema.json +304 -0
  36. package/agent/personal-guest-tools.schema.json +75 -0
  37. package/auth/catalog_generated.go +2 -2
  38. package/auth/gateway_permissions_test.go +48 -0
  39. package/auth/permission-catalog.json +331 -1
  40. package/auth/token-claims.schema.json +5 -0
  41. package/compat/consumer-revisions.json +3 -2
  42. package/compat/json-schema-ecosystem-0.1.0.json +1 -1
  43. package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
  44. package/connectors/connector-action.schema.json +138 -0
  45. package/fixtures/json-schema/connector-action/invalid/empty-values.json +11 -0
  46. package/fixtures/json-schema/connector-action/invalid/invalid-expiry.json +16 -0
  47. package/fixtures/json-schema/connector-action/invalid/lowercase-alias.json +16 -0
  48. package/fixtures/json-schema/connector-action/invalid/unknown-entry-field.json +17 -0
  49. package/fixtures/json-schema/connector-action/invalid/unknown-frame-field.json +17 -0
  50. package/fixtures/json-schema/connector-action/invalid/unknown-version.json +16 -0
  51. package/fixtures/json-schema/connector-action/invalid/unversioned-reference.json +16 -0
  52. package/fixtures/json-schema/connector-action/invalid/zero-version.json +16 -0
  53. package/fixtures/json-schema/connector-action/valid/pinned.json +16 -0
  54. package/fixtures/json-schema/connector-definition/invalid/credential-userinfo.json +8 -0
  55. package/fixtures/json-schema/connector-definition/invalid/reference-traversal.json +8 -0
  56. package/fixtures/json-schema/connector-definition/invalid/zero-version.json +8 -0
  57. package/fixtures/json-schema/connector-definition/valid/canonical.json +8 -0
  58. package/fixtures/json-schema/connector-definition/valid/pinned.json +8 -0
  59. package/fixtures/json-schema/personal-browser-network-request/invalid/bounded.json +4 -0
  60. package/fixtures/json-schema/personal-browser-network-request/valid/bounded.json +4 -0
  61. package/fixtures/json-schema/personal-browser-network-response/invalid/bounded.json +5 -0
  62. package/fixtures/json-schema/personal-browser-network-response/valid/bounded.json +5 -0
  63. package/fixtures/json-schema/personal-environment-export/invalid/extra.json +11 -0
  64. package/fixtures/json-schema/personal-environment-export/invalid/ownerId.json +10 -0
  65. package/fixtures/json-schema/personal-environment-export/invalid/sha256.json +10 -0
  66. package/fixtures/json-schema/personal-environment-export/invalid/sizeBytes.json +10 -0
  67. package/fixtures/json-schema/personal-environment-export/valid/complete.json +10 -0
  68. package/fixtures/json-schema/personal-environment-preflight-request/invalid/disk.json +11 -0
  69. package/fixtures/json-schema/personal-environment-preflight-request/invalid/network.json +11 -0
  70. package/fixtures/json-schema/personal-environment-preflight-request/invalid/node.json +12 -0
  71. package/fixtures/json-schema/personal-environment-preflight-request/invalid/owner.json +12 -0
  72. package/fixtures/json-schema/personal-environment-preflight-request/valid/bounded.json +11 -0
  73. package/fixtures/json-schema/personal-environment-preflight-result/invalid/disk.json +15 -0
  74. package/fixtures/json-schema/personal-environment-preflight-result/invalid/network.json +15 -0
  75. package/fixtures/json-schema/personal-environment-preflight-result/invalid/no-hard-quota.json +15 -0
  76. package/fixtures/json-schema/personal-environment-preflight-result/invalid/node.json +16 -0
  77. package/fixtures/json-schema/personal-environment-preflight-result/invalid/not-ready.json +15 -0
  78. package/fixtures/json-schema/personal-environment-preflight-result/invalid/owner.json +16 -0
  79. package/fixtures/json-schema/personal-environment-preflight-result/valid/bounded.json +15 -0
  80. package/fixtures/json-schema/personal-environment-request/invalid/delete-data-argv.json +24 -0
  81. package/fixtures/json-schema/personal-environment-request/invalid/delete-data-createData.json +22 -0
  82. package/fixtures/json-schema/personal-environment-request/invalid/delete-data-taskId.json +22 -0
  83. package/fixtures/json-schema/personal-environment-request/invalid/export-argv.json +22 -0
  84. package/fixtures/json-schema/personal-environment-request/invalid/export-createData.json +22 -0
  85. package/fixtures/json-schema/personal-environment-request/invalid/export-taskId.json +22 -0
  86. package/fixtures/json-schema/personal-environment-request/invalid/extra-command.json +24 -0
  87. package/fixtures/json-schema/personal-environment-request/invalid/host-workspace.json +22 -0
  88. package/fixtures/json-schema/personal-environment-request/invalid/image-injection.json +22 -0
  89. package/fixtures/json-schema/personal-environment-request/invalid/network-egress.json +21 -0
  90. package/fixtures/json-schema/personal-environment-request/invalid/no-command.json +21 -0
  91. package/fixtures/json-schema/personal-environment-request/invalid/recreate-on-release.json +22 -0
  92. package/fixtures/json-schema/personal-environment-request/invalid/relative-command.json +24 -0
  93. package/fixtures/json-schema/personal-environment-request/invalid/released-identity.json +22 -0
  94. package/fixtures/json-schema/personal-environment-request/invalid/task-empty.json +27 -0
  95. package/fixtures/json-schema/personal-environment-request/invalid/task-host-path.json +27 -0
  96. package/fixtures/json-schema/personal-environment-request/invalid/task-noncanonical.json +27 -0
  97. package/fixtures/json-schema/personal-environment-request/invalid/task-null.json +27 -0
  98. package/fixtures/json-schema/personal-environment-request/invalid/task-on-inspection.json +22 -0
  99. package/fixtures/json-schema/personal-environment-request/invalid/unbounded-quota.json +21 -0
  100. package/fixtures/json-schema/personal-environment-request/valid/acquire.json +21 -0
  101. package/fixtures/json-schema/personal-environment-request/valid/delete-data.json +21 -0
  102. package/fixtures/json-schema/personal-environment-request/valid/execute.json +26 -0
  103. package/fixtures/json-schema/personal-environment-request/valid/export-data.json +21 -0
  104. package/fixtures/json-schema/personal-environment-request/valid/inspect.json +21 -0
  105. package/fixtures/json-schema/personal-environment-request/valid/provision.json +22 -0
  106. package/fixtures/json-schema/personal-environment-request/valid/release.json +21 -0
  107. package/fixtures/json-schema/personal-environment-request/valid/task-workspace.json +27 -0
  108. package/fixtures/json-schema/personal-environment-result/invalid/active-without-observation.json +7 -0
  109. package/fixtures/json-schema/personal-environment-result/invalid/deleted-output.json +8 -0
  110. package/fixtures/json-schema/personal-environment-result/invalid/deleted-snapshot.json +8 -0
  111. package/fixtures/json-schema/personal-environment-result/invalid/deleted-taskId.json +8 -0
  112. package/fixtures/json-schema/personal-environment-result/invalid/private-handle.json +8 -0
  113. package/fixtures/json-schema/personal-environment-result/invalid/stopped-fake-observation.json +20 -0
  114. package/fixtures/json-schema/personal-environment-result/invalid/task-empty.json +22 -0
  115. package/fixtures/json-schema/personal-environment-result/invalid/task-host-path.json +22 -0
  116. package/fixtures/json-schema/personal-environment-result/invalid/task-null.json +22 -0
  117. package/fixtures/json-schema/personal-environment-result/invalid/task-on-stopped.json +8 -0
  118. package/fixtures/json-schema/personal-environment-result/invalid/task-without-command-output.json +21 -0
  119. package/fixtures/json-schema/personal-environment-result/valid/active.json +21 -0
  120. package/fixtures/json-schema/personal-environment-result/valid/deleted.json +7 -0
  121. package/fixtures/json-schema/personal-environment-result/valid/expired.json +7 -0
  122. package/fixtures/json-schema/personal-environment-result/valid/missing.json +7 -0
  123. package/fixtures/json-schema/personal-environment-result/valid/released.json +7 -0
  124. package/fixtures/json-schema/personal-environment-result/valid/task-workspace.json +22 -0
  125. package/fixtures/json-schema/personal-guest-binding/invalid/host-path.json +17 -0
  126. package/fixtures/json-schema/personal-guest-binding/invalid/invalid-policy.json +17 -0
  127. package/fixtures/json-schema/personal-guest-binding/invalid/invalid-serial.json +17 -0
  128. package/fixtures/json-schema/personal-guest-binding/invalid/legacy-version.json +17 -0
  129. package/fixtures/json-schema/personal-guest-binding/invalid/missing-generation.json +17 -0
  130. package/fixtures/json-schema/personal-guest-binding/invalid/missing-identity.json +16 -0
  131. package/fixtures/json-schema/personal-guest-binding/invalid/missing-provider-identity.json +16 -0
  132. package/fixtures/json-schema/personal-guest-binding/invalid/raw-provider-identity.json +17 -0
  133. package/fixtures/json-schema/personal-guest-binding/valid/minimal.json +17 -0
  134. package/fixtures/json-schema/personal-guest-data-plan/invalid/quota.json +1 -0
  135. package/fixtures/json-schema/personal-guest-data-plan/valid/basic.json +1 -0
  136. package/fixtures/json-schema/personal-guest-enrollment/invalid/capabilities.json +7 -0
  137. package/fixtures/json-schema/personal-guest-enrollment/invalid/legacy-version.json +4 -0
  138. package/fixtures/json-schema/personal-guest-enrollment/invalid/missing-identity.json +3 -0
  139. package/fixtures/json-schema/personal-guest-enrollment/invalid/ownerId.json +5 -0
  140. package/fixtures/json-schema/personal-guest-enrollment/invalid/token.json +5 -0
  141. package/fixtures/json-schema/personal-guest-enrollment/valid/minimal.json +4 -0
  142. package/fixtures/json-schema/personal-guest-heartbeat/invalid/argv.json +11 -0
  143. package/fixtures/json-schema/personal-guest-heartbeat/invalid/legacy-version.json +8 -0
  144. package/fixtures/json-schema/personal-guest-heartbeat/invalid/missing-identity.json +7 -0
  145. package/fixtures/json-schema/personal-guest-heartbeat/invalid/owner.json +9 -0
  146. package/fixtures/json-schema/personal-guest-heartbeat/invalid/self-ready.json +9 -0
  147. package/fixtures/json-schema/personal-guest-heartbeat/invalid/zero-sequence.json +8 -0
  148. package/fixtures/json-schema/personal-guest-heartbeat/valid/minimal.json +8 -0
  149. package/fixtures/json-schema/personal-guest-provisioning/invalid/network.json +1 -0
  150. package/fixtures/json-schema/personal-guest-provisioning/valid/basic.json +1 -0
  151. package/fixtures/json-schema/personal-guest-renewal/invalid/unknown.json +1 -0
  152. package/fixtures/json-schema/personal-guest-renewal/valid/basic.json +1 -0
  153. package/fixtures/json-schema/personal-guest-runtime/invalid/minimal.json +45 -0
  154. package/fixtures/json-schema/personal-guest-runtime/valid/minimal.json +45 -0
  155. package/fixtures/json-schema/personal-guest-runtime-result/invalid/minimal.json +28 -0
  156. package/fixtures/json-schema/personal-guest-runtime-result/valid/minimal.json +27 -0
  157. package/fixtures/json-schema/personal-guest-tools/invalid/minimal.json +31 -0
  158. package/fixtures/json-schema/personal-guest-tools/valid/minimal.json +30 -0
  159. package/fixtures/json-schema/source-import-policy/invalid/case-variant-scope.json +4 -0
  160. package/fixtures/json-schema/source-import-policy/invalid/case-variant-version.json +4 -0
  161. package/fixtures/json-schema/source-import-policy/invalid/duplicate-grant.json +4 -0
  162. package/fixtures/json-schema/source-import-policy/invalid/empty-id.json +4 -0
  163. package/fixtures/json-schema/source-import-policy/invalid/future-version.json +4 -0
  164. package/fixtures/json-schema/source-import-policy/invalid/unknown-field.json +4 -0
  165. package/fixtures/json-schema/source-import-policy/valid/deny-all.json +4 -0
  166. package/fixtures/json-schema/source-import-policy/valid/shared.json +4 -0
  167. package/fixtures/json-schema/token-claims/invalid/authz-negative.json +23 -0
  168. package/fixtures/json-schema/token-claims/invalid/authz-string.json +23 -0
  169. package/fixtures/json-schema/token-claims/invalid/authz-zero.json +23 -0
  170. package/fixtures/json-schema/token-claims/valid/versioned-session.json +23 -0
  171. package/fixtures/openapi/AgentRunEventListEnvelope/invalid/basic.json +8 -0
  172. package/fixtures/openapi/AgentRunEventListEnvelope/valid/basic.json +8 -0
  173. package/fixtures/openapi/AgentRunEventListEnvelope/valid/native.json +1 -0
  174. package/fixtures/openapi/AgentRunResumeRequest/invalid/basic.json +3 -0
  175. package/fixtures/openapi/AgentRunResumeRequest/valid/basic.json +3 -0
  176. package/fixtures/openapi/AgentSSHCommandRequest/invalid/task51.json +24 -0
  177. package/fixtures/openapi/AgentSSHCommandRequest/valid/task51.json +23 -0
  178. package/fixtures/openapi/AgentSSHCommandResult/invalid/task51.json +8 -0
  179. package/fixtures/openapi/AgentSSHCommandResult/valid/task51.json +7 -0
  180. package/fixtures/openapi/AgentSSHSessionRequest/invalid/task51.json +20 -0
  181. package/fixtures/openapi/AgentSSHSessionRequest/valid/task51.json +19 -0
  182. package/fixtures/openapi/CapabilityTaskInput/invalid/duplicate-scope.json +36 -0
  183. package/fixtures/openapi/CapabilityTaskInput/valid/scoped.json +32 -0
  184. package/fixtures/openapi/DockerQuickCreateHostInput/invalid/guest-access.json +7 -0
  185. package/fixtures/openapi/DockerQuickCreateHostInput/valid/guest-access.json +9 -0
  186. package/fixtures/openapi/KnowledgeSourceDocument/invalid/tombstone-with-content.json +1 -0
  187. package/fixtures/openapi/KnowledgeSourceDocument/valid/tombstone.json +1 -0
  188. package/fixtures/openapi/KubernetesAgentActionCheck/invalid/unproven-state.json +6 -0
  189. package/fixtures/openapi/KubernetesAgentActionCheck/valid/configured-denied.json +9 -0
  190. package/fixtures/openapi/KubernetesAgentActionProfile/invalid/wildcard.json +1 -0
  191. package/fixtures/openapi/KubernetesAgentActionProfile/valid/workbench.json +1 -0
  192. package/fixtures/openapi/KubernetesClusterRegistrationRequest/invalid/action-profile.json +3 -0
  193. package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/action-profile.json +5 -0
  194. package/fixtures/openapi/KubernetesNodeListEnvelope/invalid/condition-status-boolean.json +17 -0
  195. package/fixtures/openapi/KubernetesNodeListEnvelope/invalid/taint-effect-missing.json +16 -0
  196. package/fixtures/openapi/KubernetesNodeListEnvelope/valid/legacy-fields-absent.json +11 -0
  197. package/fixtures/openapi/KubernetesNodeListEnvelope/valid/no-taints.json +13 -0
  198. package/fixtures/openapi/KubernetesNodeListEnvelope/valid/ready-cordoned-tainted.json +28 -0
  199. package/fixtures/openapi/KubernetesNodeListEnvelope/valid/unknown-fields-null.json +13 -0
  200. package/fixtures/openapi/KubernetesResourceUpdatePlanRequest/invalid/missing-required.json +1 -0
  201. package/fixtures/openapi/KubernetesResourceYaml/invalid/missing-required.json +1 -0
  202. package/fixtures/openapi/KubernetesTopologyCoverage/invalid/empty-as-success.json +5 -0
  203. package/fixtures/openapi/KubernetesTopologyCoverage/valid/not-installed.json +6 -0
  204. package/fixtures/openapi/KubernetesTopologyGraphEdge/invalid/negative-weight.json +8 -0
  205. package/fixtures/openapi/KubernetesTopologyGraphEdge/valid/zero-weight.json +20 -0
  206. package/fixtures/openapi/KubernetesTopologyGraphNode/invalid/fake-flow-kind.json +42 -0
  207. package/fixtures/openapi/KubernetesTopologyGraphNode/valid/rule.json +42 -0
  208. package/fixtures/openapi/KubernetesTopologySnapshot/invalid/raw-source-field.json +33 -0
  209. package/fixtures/openapi/KubernetesTopologySnapshot/valid/projected-source.json +32 -0
  210. package/fixtures/openapi/KubernetesTopologySnapshotRequest/invalid/arbitrary-gvr.json +8 -0
  211. package/fixtures/openapi/KubernetesTopologySnapshotRequest/valid/bounded-sources.json +11 -0
  212. package/fixtures/openapi/KubernetesTopologySourceQuery/invalid/cluster-namespace.json +4 -0
  213. package/fixtures/openapi/KubernetesTopologySourceQuery/valid/all-namespaces.json +4 -0
  214. package/fixtures/openapi/ObservabilityDataSource/invalid/missing-required.json +1 -0
  215. package/fixtures/openapi/PersonalAgentAccess/invalid/invalid.json +1 -0
  216. package/fixtures/openapi/PersonalAgentAccess/valid/valid.json +1 -0
  217. package/fixtures/openapi/PersonalAgentAccessDecision/invalid/invalid.json +1 -0
  218. package/fixtures/openapi/PersonalAgentAccessDecision/valid/valid.json +1 -0
  219. package/fixtures/openapi/PersonalAssistantArtifactListEnvelope/invalid/owner.json +8 -0
  220. package/fixtures/openapi/PersonalAssistantArtifactListEnvelope/valid/side-chat.json +9 -0
  221. package/fixtures/openapi/PersonalAssistantAvatarRequest/invalid/motion.json +1 -0
  222. package/fixtures/openapi/PersonalAssistantAvatarRequest/invalid/owner.json +1 -0
  223. package/fixtures/openapi/PersonalAssistantAvatarRequest/invalid/remote.json +1 -0
  224. package/fixtures/openapi/PersonalAssistantAvatarRequest/invalid/svg.json +1 -0
  225. package/fixtures/openapi/PersonalAssistantAvatarRequest/valid/raster.json +1 -0
  226. package/fixtures/openapi/PersonalAssistantAvatarRequest/valid/reset.json +1 -0
  227. package/fixtures/openapi/PersonalAssistantUpdateRequest/invalid/empty.json +1 -0
  228. package/fixtures/openapi/PersonalAssistantUpdateRequest/invalid/owner.json +1 -0
  229. package/fixtures/openapi/PersonalAssistantUpdateRequest/valid/name.json +1 -0
  230. package/fixtures/openapi/PersonalDockerEnvironmentPolicy/invalid/host-url.json +12 -0
  231. package/fixtures/openapi/PersonalDockerEnvironmentPolicy/invalid/lifetime.json +11 -0
  232. package/fixtures/openapi/PersonalDockerEnvironmentPolicy/invalid/unknown-agent.json +11 -0
  233. package/fixtures/openapi/PersonalDockerEnvironmentPolicy/valid/basic.json +11 -0
  234. package/fixtures/openapi/PersonalEnvironment/invalid/invented-state.json +6 -0
  235. package/fixtures/openapi/PersonalEnvironment/invalid/missing-state.json +5 -0
  236. package/fixtures/openapi/PersonalEnvironment/invalid/negative-generation.json +7 -0
  237. package/fixtures/openapi/PersonalEnvironment/invalid/network.json +23 -0
  238. package/fixtures/openapi/PersonalEnvironment/invalid/private-node.json +24 -0
  239. package/fixtures/openapi/PersonalEnvironment/invalid/unsupported-backend.json +7 -0
  240. package/fixtures/openapi/PersonalEnvironment/valid/deleted.json +23 -0
  241. package/fixtures/openapi/PersonalEnvironment/valid/deleting.json +23 -0
  242. package/fixtures/openapi/PersonalEnvironment/valid/deletion_unknown.json +23 -0
  243. package/fixtures/openapi/PersonalEnvironment/valid/frozen-binding.json +13 -0
  244. package/fixtures/openapi/PersonalEnvironment/valid/ready.json +23 -0
  245. package/fixtures/openapi/PersonalEnvironment/valid/unknown.json +23 -0
  246. package/fixtures/openapi/PersonalEnvironment/valid/unprovisioned.json +6 -0
  247. package/fixtures/openapi/PersonalEnvironmentActionRequest/invalid/command.json +3 -0
  248. package/fixtures/openapi/PersonalEnvironmentActionRequest/invalid/node.json +4 -0
  249. package/fixtures/openapi/PersonalEnvironmentActionRequest/invalid/owner.json +4 -0
  250. package/fixtures/openapi/PersonalEnvironmentActionRequest/invalid/quota.json +10 -0
  251. package/fixtures/openapi/PersonalEnvironmentActionRequest/valid/reconcile.json +3 -0
  252. package/fixtures/openapi/PersonalEnvironmentActionRequest/valid/sleep.json +3 -0
  253. package/fixtures/openapi/PersonalEnvironmentActionRequest/valid/wake.json +4 -0
  254. package/fixtures/openapi/PersonalEnvironmentDataDeletionRequest/invalid/empty-name.json +5 -0
  255. package/fixtures/openapi/PersonalEnvironmentDataDeletionRequest/invalid/long-name.json +5 -0
  256. package/fixtures/openapi/PersonalEnvironmentDataDeletionRequest/invalid/missing-name.json +4 -0
  257. package/fixtures/openapi/PersonalEnvironmentDataDeletionRequest/invalid/owner.json +6 -0
  258. package/fixtures/openapi/PersonalEnvironmentDataDeletionRequest/invalid/stale-version.json +5 -0
  259. package/fixtures/openapi/PersonalEnvironmentDataDeletionRequest/valid/confirmed.json +5 -0
  260. package/fixtures/openapi/PersonalEnvironmentDataExportRequest/invalid/assistantId.json +4 -0
  261. package/fixtures/openapi/PersonalEnvironmentDataExportRequest/invalid/environmentVersion.json +4 -0
  262. package/fixtures/openapi/PersonalEnvironmentDataExportRequest/invalid/ownerId.json +5 -0
  263. package/fixtures/openapi/PersonalEnvironmentDataExportRequest/valid/current.json +4 -0
  264. package/fixtures/openapi/PersonalEnvironmentEnvelope/invalid/missing-data.json +1 -0
  265. package/fixtures/openapi/PersonalEnvironmentEnvelope/valid/state.json +8 -0
  266. package/fixtures/openapi/PersonalEnvironmentQuota/invalid/cpu.json +7 -0
  267. package/fixtures/openapi/PersonalEnvironmentQuota/invalid/disk.json +7 -0
  268. package/fixtures/openapi/PersonalEnvironmentQuota/invalid/network.json +7 -0
  269. package/fixtures/openapi/PersonalEnvironmentQuota/invalid/processes.json +7 -0
  270. package/fixtures/openapi/PersonalEnvironmentQuota/valid/basic.json +7 -0
  271. package/fixtures/openapi/PersonalEnvironmentTemplate/invalid/mode.json +13 -0
  272. package/fixtures/openapi/PersonalEnvironmentTemplate/invalid/network.json +13 -0
  273. package/fixtures/openapi/PersonalEnvironmentTemplate/invalid/node.json +14 -0
  274. package/fixtures/openapi/PersonalEnvironmentTemplate/valid/template.json +13 -0
  275. package/fixtures/openapi/PersonalEnvironmentTemplateListEnvelope/invalid/missing.json +1 -0
  276. package/fixtures/openapi/PersonalEnvironmentTemplateListEnvelope/invalid/unbounded.json +1317 -0
  277. package/fixtures/openapi/PersonalEnvironmentTemplateListEnvelope/valid/choices.json +17 -0
  278. package/fixtures/openapi/PersonalEnvironmentTemplateListEnvelope/valid/empty.json +3 -0
  279. package/fixtures/openapi/PersonalEnvironmentUsage/invalid/negative.json +6 -0
  280. package/fixtures/openapi/PersonalEnvironmentUsage/valid/usage.json +6 -0
  281. package/fixtures/openapi/PersonalFeedFeedback/invalid/owner.json +4 -0
  282. package/fixtures/openapi/PersonalFeedFeedback/valid/liked.json +3 -0
  283. package/fixtures/openapi/PersonalFeedItem/invalid/no-source.json +9 -0
  284. package/fixtures/openapi/PersonalFeedItem/valid/post.json +15 -0
  285. package/fixtures/openapi/PersonalFeedSettings/invalid/owner.json +6 -0
  286. package/fixtures/openapi/PersonalFeedSettings/valid/default.json +5 -0
  287. package/fixtures/openapi/PersonalGuestPreparationInput/invalid/foreign-owner.json +5 -0
  288. package/fixtures/openapi/PersonalGuestPreparationInput/invalid/unsafe-counter.json +4 -0
  289. package/fixtures/openapi/PersonalGuestPreparationInput/valid/ed25519-csr.json +4 -0
  290. package/fixtures/openapi/PersonalGuestRuntimeEnvelope/invalid/minimal.json +10 -0
  291. package/fixtures/openapi/PersonalGuestRuntimeEnvelope/valid/minimal.json +9 -0
  292. package/fixtures/openapi/PersonalGuestRuntimeInput/invalid/minimal.json +6 -0
  293. package/fixtures/openapi/PersonalGuestRuntimeInput/valid/minimal.json +8 -0
  294. package/fixtures/openapi/PersonalGuestToolsInput/invalid/minimal.json +5 -0
  295. package/fixtures/openapi/PersonalGuestToolsInput/valid/minimal.json +4 -0
  296. package/fixtures/openapi/PersonalVMEnvironmentPolicy/invalid/device.json +15 -0
  297. package/fixtures/openapi/PersonalVMEnvironmentPolicy/invalid/fractional-size.json +15 -0
  298. package/fixtures/openapi/PersonalVMEnvironmentPolicy/invalid/network.json +15 -0
  299. package/fixtures/openapi/PersonalVMEnvironmentPolicy/invalid/owner.json +15 -0
  300. package/fixtures/openapi/PersonalVMEnvironmentPolicy/invalid/provider.json +15 -0
  301. package/fixtures/openapi/PersonalVMEnvironmentPolicy/invalid/unknown.json +16 -0
  302. package/fixtures/openapi/PersonalVMEnvironmentPolicy/valid/pve.json +15 -0
  303. package/fixtures/openapi/PersonalWorkspaceRuntime/invalid/shared.json +3 -0
  304. package/fixtures/openapi/PersonalWorkspaceRuntime/valid/shared.json +4 -0
  305. package/fixtures/openapi/PersonalWorkspaceRuntimeEnvelope/invalid/shared.json +5 -0
  306. package/fixtures/openapi/PersonalWorkspaceRuntimeEnvelope/valid/shared.json +6 -0
  307. package/fixtures/openapi/ResourceMonitoringPanel/invalid/unknown-quality.json +7 -0
  308. package/fixtures/openapi/ResourceMonitoringPanel/valid/not-collected.json +7 -0
  309. package/fixtures/openapi/ResourceMonitoringPoint/invalid/string-zero.json +4 -0
  310. package/fixtures/openapi/ResourceMonitoringPoint/valid/missing.json +4 -0
  311. package/fixtures/openapi/ResourceMonitoringPoint/valid/zero.json +4 -0
  312. package/fixtures/openapi/ResourceMonitoringView/invalid/raw-query.json +12 -0
  313. package/fixtures/openapi/ResourceMonitoringView/valid/unconfigured.json +12 -0
  314. package/fixtures/openapi/SecretGenerateSSHKeyRequest/invalid/task51.json +6 -0
  315. package/fixtures/openapi/SecretGenerateSSHKeyRequest/valid/task51.json +12 -0
  316. package/fixtures/openapi/SecretReferenceUsage/invalid/version.json +6 -0
  317. package/fixtures/openapi/SecretReferenceUsage/valid/version.json +8 -0
  318. package/fixtures/openapi/VMSSHCredentialRedemptionInput/invalid/task51.json +7 -0
  319. package/fixtures/openapi/VMSSHCredentialRedemptionInput/valid/task51.json +6 -0
  320. package/fixtures/openapi/VirtualMachineAccessBindingInput/invalid/task51.json +10 -0
  321. package/fixtures/openapi/VirtualMachineAccessBindingInput/valid/task51.json +10 -0
  322. package/fixtures/openapi/VirtualMachineActionInput/invalid/capacity-not-boolean.json +1 -0
  323. package/fixtures/openapi/VirtualMachineActionInput/valid/new-data-with-admission.json +1 -0
  324. package/fixtures/openapi/VirtualMachineCreateInput/valid/cloud-image.json +12 -0
  325. package/fixtures/openapi/VirtualMachineDiskChange/invalid/serial-config-injection.json +1 -0
  326. package/fixtures/openapi/VirtualMachineDiskChange/invalid/serial-existing-disk.json +1 -0
  327. package/fixtures/openapi/VirtualMachineDiskChange/invalid/serial-too-long.json +1 -0
  328. package/fixtures/openapi/VirtualMachineDiskChange/valid/personal-data.json +1 -0
  329. package/fixtures/openapi/VirtualMachineGuestAccessInput/invalid/task51.json +4 -0
  330. package/fixtures/openapi/VirtualMachineGuestAccessInput/valid/task51.json +6 -0
  331. package/fixtures/openapi/VirtualMachineSSHCommand/invalid/task51.json +9 -0
  332. package/fixtures/openapi/VirtualMachineSSHCommand/valid/task51.json +8 -0
  333. package/fixtures/openapi/VirtualMachineSSHCommandInput/invalid/task51.json +5 -0
  334. package/fixtures/openapi/VirtualMachineSSHCommandInput/valid/task51.json +5 -0
  335. package/fixtures/openapi/VirtualMachineSSHFrame/invalid/encoding.json +5 -0
  336. package/fixtures/openapi/VirtualMachineSSHFrame/invalid/task51.json +4 -0
  337. package/fixtures/openapi/VirtualMachineSSHFrame/valid/binary.json +5 -0
  338. package/fixtures/openapi/VirtualMachineSSHFrame/valid/task51.json +5 -0
  339. package/fixtures/openapi/VirtualMachineSSHSessionInput/invalid/task51.json +4 -0
  340. package/fixtures/openapi/VirtualMachineSSHSessionInput/valid/task51.json +5 -0
  341. package/fixtures/openapi/VirtualizationCapacityPolicyInput/invalid/task51.json +12 -0
  342. package/fixtures/openapi/VirtualizationCapacityPolicyInput/valid/task51.json +13 -0
  343. package/fixtures/openapi/VirtualizationImageInput/invalid/cloud-image-config-type.json +6 -0
  344. package/fixtures/openapi/VirtualizationImageInput/valid/cloud-image.json +11 -0
  345. package/fixtures/openapi/WorkbenchAssistantTask/invalid/kind.json +1 -0
  346. package/fixtures/openapi/WorkbenchAssistantTask/invalid/owner.json +1 -0
  347. package/fixtures/openapi/WorkbenchAssistantTask/valid/generate.json +1 -0
  348. package/fixtures/openapi/WorkbenchAssistantTask/valid/undo.json +1 -0
  349. package/fixtures/openapi/WorkbenchContextSelection/invalid/remote-image.json +1 -0
  350. package/fixtures/openapi/WorkbenchContextSelection/invalid/too-many-images.json +1 -0
  351. package/fixtures/openapi/WorkbenchContextSelection/valid/chat-image.json +9 -0
  352. package/fixtures/openapi/WorkbenchContextUsage/invalid/fractional-capacity.json +1 -0
  353. package/fixtures/openapi/WorkbenchContextUsage/invalid/negative.json +1 -0
  354. package/fixtures/openapi/WorkbenchContextUsage/valid/reported.json +1 -0
  355. package/fixtures/openapi/WorkbenchContextUsage/valid/unknown.json +1 -0
  356. package/fixtures/openapi/WorkbenchMainSessionRequest/invalid/owner.json +1 -0
  357. package/fixtures/openapi/WorkbenchMainSessionRequest/invalid/provider.json +1 -0
  358. package/fixtures/openapi/WorkbenchMainSessionRequest/valid/empty.json +1 -0
  359. package/fixtures/openapi/WorkbenchMainSessionRequest/valid/provider.json +1 -0
  360. package/fixtures/openapi/WorkbenchMessageSearchPage/invalid/role.json +12 -0
  361. package/fixtures/openapi/WorkbenchMessageSearchPage/valid/page.json +12 -0
  362. package/fixtures/openapi/WorkbenchMessageWindow/invalid/missing.json +1 -0
  363. package/fixtures/openapi/WorkbenchMessageWindow/valid/empty.json +3 -0
  364. package/fixtures/openapi/WorkbenchModelOption/invalid/zero-capacity.json +1 -0
  365. package/fixtures/openapi/WorkbenchModelOption/valid/capacity.json +1 -0
  366. package/fixtures/openapi/WorkbenchModelOption/valid/unknown.json +1 -0
  367. package/fixtures/openapi/WorkbenchProfessionalCapabilityInput/invalid/basic.json +7 -0
  368. package/fixtures/openapi/WorkbenchProfessionalCapabilityInput/valid/basic.json +11 -0
  369. package/fixtures/openapi/WorkbenchProfessionalCapabilityInput/valid/selected-profile.json +23 -0
  370. package/fixtures/openapi/WorkbenchSendMessageStreamRequest/invalid/missing-required.json +1 -0
  371. package/fixtures/openapi/WorkbenchSendMessageStreamRequest/valid/mixed-professional-task.json +22 -0
  372. package/fixtures/openapi/WorkbenchTaskIntent/invalid/basic.json +5 -0
  373. package/fixtures/openapi/WorkbenchTaskIntent/invalid/oversized-capability-source.json +3 -0
  374. package/fixtures/openapi/WorkbenchTaskIntent/valid/basic.json +9 -0
  375. package/fixtures/openapi/WorkbenchTaskIntent/valid/independent-sources.json +17 -0
  376. package/gen/go/sohaapi/client.go +1 -1
  377. package/gen/go/sohaapi/kubernetes_monitoring_test.go +67 -0
  378. package/gen/go/sohaapi/personal_environment_test.go +25 -0
  379. package/gen/go/sohaapi/types.go +3460 -433
  380. package/gen/go/sohaapi/vm_disk_test.go +21 -0
  381. package/gen/ts/sohaapi/index.ts +5454 -1397
  382. package/go.mod +61 -49
  383. package/go.sum +202 -176
  384. package/knowledge/connector-definition.schema.json +6 -1
  385. package/knowledge/source-import-policy.schema.json +32 -0
  386. package/memory/memory-record.schema.json +1 -1
  387. package/openapi/soha-api.json +24199 -16810
  388. package/openapi/soha-api.yaml +2537 -14
  389. package/openapi/spec_generated.go +3 -3
  390. package/openapi/spec_test.go +34 -0
  391. package/package.json +19 -3
  392. package/resource/agent_access.go +12 -0
  393. package/resource/agent_profiles.go +62 -0
  394. package/resource/agent_profiles_test.go +36 -0
  395. package/resource/kubernetes_kinds.go +73 -0
  396. package/resource/kubernetes_kinds_test.go +38 -0
  397. package/resource/models.go +23 -14
  398. package/resource/network_topology.go +166 -0
  399. package/resource/network_topology_projection.go +208 -0
  400. package/resource/network_topology_projection_test.go +53 -0
  401. package/resource/network_topology_test.go +51 -0
  402. package/resource/network_topology_validation.go +29 -0
  403. package/resource/node_drain.go +34 -0
  404. package/resource/resource_monitoring.go +99 -0
  405. package/resource/runtime/network_topology.go +232 -0
  406. package/resource/runtime/network_topology_test.go +62 -0
  407. package/resource/runtime/node_drain.go +124 -0
  408. package/resource/runtime/node_drain_test.go +95 -0
  409. package/resource/runtime/resource_edit.go +128 -0
  410. package/resource/runtime/resource_edit_test.go +183 -0
  411. package/resource/runtime/resource_monitoring.go +243 -0
  412. package/resource/runtime/resource_monitoring_test.go +88 -0
  413. /package/fixtures/openapi/DeliveryExecutionHistoryPage/{invalid-kind.json → invalid/invalid-kind.json} +0 -0
  414. /package/fixtures/openapi/DeliveryExecutionHistoryPage/{valid-build.json → valid/valid-build.json} +0 -0
  415. /package/fixtures/openapi/DeliveryExecutionHistoryPage/{valid-empty.json → valid/valid-empty.json} +0 -0
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensoha.dev/schemas/personal-environment-preflight-request.schema.json",
4
+ "title": "Personal Docker Node Preflight Request",
5
+ "description": "Trusted Core only. Uses an owned disposable quota probe and requires its cleanup before a ready receipt. Never provisions personal data or grants task execution.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "id",
11
+ "quota"
12
+ ],
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "const": "opensoha.dev/personal-environment-preflight-request/v1"
16
+ },
17
+ "id": {
18
+ "type": "string",
19
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
20
+ },
21
+ "quota": {
22
+ "allOf": [
23
+ {
24
+ "$ref": "https://opensoha.dev/schemas/environment-lease.schema.json#/properties/quota"
25
+ },
26
+ {
27
+ "properties": {
28
+ "diskBytes": {
29
+ "minimum": 16777216,
30
+ "maximum": 1099511627776
31
+ },
32
+ "memoryBytes": {
33
+ "minimum": 33554432,
34
+ "maximum": 17179869184
35
+ },
36
+ "cpuUnits": {
37
+ "minimum": 1,
38
+ "maximum": 8000
39
+ },
40
+ "maxProcesses": {
41
+ "minimum": 4,
42
+ "maximum": 256
43
+ },
44
+ "networkEgress": {
45
+ "const": false
46
+ }
47
+ }
48
+ }
49
+ ]
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensoha.dev/schemas/personal-environment-preflight-result.schema.json",
4
+ "title": "Personal Docker Node Preflight Result",
5
+ "description": "Trusted Core only. Uses an owned disposable quota probe and requires its cleanup before a ready receipt. Never provisions personal data or grants task execution.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "id",
11
+ "quota",
12
+ "ready",
13
+ "cgroupVersion",
14
+ "diskMechanism",
15
+ "observedAt"
16
+ ],
17
+ "properties": {
18
+ "schemaVersion": {
19
+ "const": "opensoha.dev/personal-environment-preflight-result/v1"
20
+ },
21
+ "id": {
22
+ "type": "string",
23
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
24
+ },
25
+ "quota": {
26
+ "allOf": [
27
+ {
28
+ "$ref": "https://opensoha.dev/schemas/environment-lease.schema.json#/properties/quota"
29
+ },
30
+ {
31
+ "properties": {
32
+ "diskBytes": {
33
+ "minimum": 16777216,
34
+ "maximum": 1099511627776
35
+ },
36
+ "memoryBytes": {
37
+ "minimum": 33554432,
38
+ "maximum": 17179869184
39
+ },
40
+ "cpuUnits": {
41
+ "minimum": 1,
42
+ "maximum": 8000
43
+ },
44
+ "maxProcesses": {
45
+ "minimum": 4,
46
+ "maximum": 256
47
+ },
48
+ "networkEgress": {
49
+ "const": false
50
+ }
51
+ }
52
+ }
53
+ ]
54
+ },
55
+ "ready": {
56
+ "const": true
57
+ },
58
+ "cgroupVersion": {
59
+ "const": "2"
60
+ },
61
+ "diskMechanism": {
62
+ "const": "btrfs-qgroup"
63
+ },
64
+ "observedAt": {
65
+ "type": "string",
66
+ "format": "date-time"
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,137 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "$id": "https://opensoha.dev/schemas/personal-environment-request.schema.json",
6
+ "title": "Personal Environment Agent Request",
7
+ "description": "POST /api/v1/runtime/personal-environments. Trusted Core bearer token and per-action allowlist required. Core derives owner/scope/quota and persists original lease identity. Acquire may recover the same original lease. Execute must never be automatically retried after a lost receipt; its outcome is unknown. Release stops only this lease and retains persistent data. Dispatch/observation has a 30 second deadline and cleanup an independent 30 second deadline; slow cleanup can outlast the HTTP receipt window; sandbox argv uses UTF-8 byte bounds. Export_data uses only POST /runtime/personal-environments/export: bounded framed TAR chunks and a final SHA-256 receipt; no ordinary JSON result, no extraction, no implicit wake.",
8
+ "required": [
9
+ "schemaVersion",
10
+ "action",
11
+ "lease"
12
+ ],
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "const": "opensoha.dev/personal-environment-request/v1"
16
+ },
17
+ "action": {
18
+ "enum": [
19
+ "acquire",
20
+ "inspect",
21
+ "execute",
22
+ "release",
23
+ "delete_data",
24
+ "export_data"
25
+ ]
26
+ },
27
+ "lease": {
28
+ "allOf": [
29
+ {
30
+ "$ref": "https://opensoha.dev/schemas/environment-lease.schema.json"
31
+ },
32
+ {
33
+ "properties": {
34
+ "workspacePath": {
35
+ "const": ""
36
+ },
37
+ "releasedAt": false,
38
+ "quota": {
39
+ "properties": {
40
+ "diskBytes": {
41
+ "minimum": 16777216,
42
+ "maximum": 1099511627776
43
+ },
44
+ "memoryBytes": {
45
+ "minimum": 33554432,
46
+ "maximum": 17179869184
47
+ },
48
+ "cpuUnits": {
49
+ "minimum": 1,
50
+ "maximum": 8000
51
+ },
52
+ "maxProcesses": {
53
+ "minimum": 4,
54
+ "maximum": 256
55
+ },
56
+ "networkEgress": {
57
+ "const": false
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ ]
64
+ },
65
+ "argv": {
66
+ "type": "array",
67
+ "minItems": 1,
68
+ "maxItems": 64,
69
+ "prefixItems": [
70
+ {
71
+ "type": "string",
72
+ "pattern": "^/[^\\u0000]*$",
73
+ "maxLength": 4096
74
+ }
75
+ ],
76
+ "items": {
77
+ "type": "string",
78
+ "maxLength": 4096,
79
+ "pattern": "^[^\\u0000]*$"
80
+ }
81
+ },
82
+ "taskId": {
83
+ "type": "string",
84
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
85
+ "description": "Execute-only server-owned task UUID. Selects a private temporary task directory inside /workspace; never a host path or persistent-data owner. Omission retains legacy command working directory."
86
+ },
87
+ "createData": {
88
+ "type": "boolean",
89
+ "default": false,
90
+ "description": "Core permits true only during first provisioning, before any ready receipt or task execution. Restore/restart must require existing data; a missing volume or subvolume is an error."
91
+ }
92
+ },
93
+ "allOf": [
94
+ {
95
+ "if": {
96
+ "properties": {
97
+ "action": {
98
+ "const": "execute"
99
+ }
100
+ }
101
+ },
102
+ "then": {
103
+ "required": [
104
+ "argv"
105
+ ]
106
+ },
107
+ "else": {
108
+ "properties": {
109
+ "argv": false,
110
+ "taskId": false
111
+ }
112
+ }
113
+ },
114
+ {
115
+ "if": {
116
+ "properties": {
117
+ "action": {
118
+ "enum": [
119
+ "inspect",
120
+ "execute",
121
+ "release",
122
+ "delete_data",
123
+ "export_data"
124
+ ]
125
+ }
126
+ }
127
+ },
128
+ "then": {
129
+ "properties": {
130
+ "createData": {
131
+ "const": false
132
+ }
133
+ }
134
+ }
135
+ }
136
+ ]
137
+ }
@@ -0,0 +1,101 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "$id": "https://opensoha.dev/schemas/personal-environment-result.schema.json",
6
+ "title": "Personal Environment Agent Result",
7
+ "description": "Agent API data envelope. Missing or stopped environments omit usage; no invented zero measurement. Active receipts include fresh hard-quota/cgroup observations. Docker handles, volume names, and provider failures are private.",
8
+ "required": [
9
+ "schemaVersion",
10
+ "leaseId",
11
+ "runId",
12
+ "state",
13
+ "observedAt"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "const": "opensoha.dev/personal-environment-result/v1"
18
+ },
19
+ "leaseId": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "maxLength": 128
23
+ },
24
+ "runId": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 128
28
+ },
29
+ "taskId": {
30
+ "type": "string",
31
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
32
+ "description": "Echo the exact server-owned execute task identity when supplied. A result for another task is not a receipt for this command."
33
+ },
34
+ "state": {
35
+ "enum": [
36
+ "active",
37
+ "released",
38
+ "expired",
39
+ "missing",
40
+ "quota_exceeded",
41
+ "deleted"
42
+ ]
43
+ },
44
+ "snapshot": {
45
+ "$ref": "https://opensoha.dev/schemas/environment-snapshot.schema.json"
46
+ },
47
+ "output": {
48
+ "type": "string",
49
+ "maxLength": 65536
50
+ },
51
+ "observedAt": {
52
+ "type": "string",
53
+ "format": "date-time"
54
+ },
55
+ "exitCode": {
56
+ "type": "integer",
57
+ "minimum": 0,
58
+ "maximum": 255,
59
+ "description": "Confirmed bounded sandbox process exit status; absent for non-execute results."
60
+ }
61
+ },
62
+ "allOf": [
63
+ {
64
+ "if": {
65
+ "required": [
66
+ "taskId"
67
+ ]
68
+ },
69
+ "then": {
70
+ "required": [
71
+ "output"
72
+ ]
73
+ }
74
+ },
75
+ {
76
+ "if": {
77
+ "properties": {
78
+ "state": {
79
+ "enum": [
80
+ "active",
81
+ "quota_exceeded"
82
+ ]
83
+ }
84
+ }
85
+ },
86
+ "then": {
87
+ "required": [
88
+ "snapshot"
89
+ ]
90
+ },
91
+ "else": {
92
+ "properties": {
93
+ "snapshot": false,
94
+ "output": false,
95
+ "taskId": false,
96
+ "exitCode": false
97
+ }
98
+ }
99
+ }
100
+ ]
101
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensoha.dev/schemas/personal-guest-binding.schema.json",
4
+ "title": "Personal VM Guest Frozen Binding",
5
+ "description": "Core-owned immutable binding delivered only to the registered guest over authenticated TLS. Version is the identity revision, not the environment operation CAS version. Compute/data refs are opaque resource UUIDs; no PVE credentials, node URL, host paths or provider disk handles. Runtime additionally enforces 0 < expiresAt-issuedAt <= 24 hours. Provider metadata is not proof that that provider supports personal guest execution.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "id",
11
+ "version",
12
+ "assistantId",
13
+ "ownerId",
14
+ "provider",
15
+ "computeRef",
16
+ "computeGeneration",
17
+ "providerIdentityHash",
18
+ "dataRef",
19
+ "dataDiskSerial",
20
+ "dataDiskBytes",
21
+ "policyRevision",
22
+ "issuedAt",
23
+ "expiresAt"
24
+ ],
25
+ "properties": {
26
+ "schemaVersion": {
27
+ "const": "opensoha.dev/personal-guest-binding/v1"
28
+ },
29
+ "id": {
30
+ "type": "string",
31
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
32
+ },
33
+ "version": {
34
+ "type": "integer",
35
+ "minimum": 1,
36
+ "maximum": 9007199254740991
37
+ },
38
+ "assistantId": {
39
+ "type": "string",
40
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
41
+ },
42
+ "ownerId": {
43
+ "type": "string",
44
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
45
+ },
46
+ "provider": {
47
+ "enum": [
48
+ "pve",
49
+ "kubevirt"
50
+ ]
51
+ },
52
+ "computeRef": {
53
+ "type": "string",
54
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
55
+ },
56
+ "computeGeneration": {
57
+ "type": "integer",
58
+ "minimum": 1,
59
+ "maximum": 9007199254740991
60
+ },
61
+ "dataRef": {
62
+ "type": "string",
63
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
64
+ },
65
+ "dataDiskSerial": {
66
+ "type": "string",
67
+ "pattern": "^[A-Za-z0-9_-]{1,20}$"
68
+ },
69
+ "dataDiskBytes": {
70
+ "type": "integer",
71
+ "minimum": 16777216,
72
+ "maximum": 1099511627776
73
+ },
74
+ "policyRevision": {
75
+ "type": "string",
76
+ "pattern": "^sha256:[a-f0-9]{64}$"
77
+ },
78
+ "issuedAt": {
79
+ "type": "string",
80
+ "format": "date-time"
81
+ },
82
+ "expiresAt": {
83
+ "type": "string",
84
+ "format": "date-time"
85
+ },
86
+ "providerIdentityHash": {
87
+ "type": "string",
88
+ "pattern": "^sha256:[a-f0-9]{64}$",
89
+ "description": "Core-derived SHA-256 of the provider, capacity source, provider VM ID, observed provider incarnation and exact provider data volume. Current provider and disk observation must match; the personal compute generation alone is not a provider incarnation. Provider disk handles are not disclosed."
90
+ }
91
+ }
92
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensoha.dev/schemas/personal-guest-data-plan.schema.json",
4
+ "title": "Personal Guest Data Operation",
5
+ "description": "A fixed, privileged Core operation uses this plan. Core reserves operationId durably and current authorization before provider dispatch. GET /api/personal-guest/v1/bindings/{id}/data-operations/{operationId} requires registered pinned mTLS and returns a plan only while the matching task and reservation are running. Owner, current access, frozen VM/disk identity, quota, actor permissions and resource scope are rechecked; a binding GET or heartbeat grants no data mutation. The Linux initializer accepts only a root-owned plan and formats only a positively blank independent disk once. No arbitrary command, path or provider credential is accepted. XFS project 49 covers the fixed workspace; the project hard limit must be enforced and read back before a success receipt. Completed receipts follow stable workspace identity across explicit certificate renewal. Lost format results retain the original dispatch marker and cannot cause another format.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "operationId",
11
+ "binding",
12
+ "diskQuotaBytes"
13
+ ],
14
+ "properties": {
15
+ "schemaVersion": {
16
+ "const": "opensoha.dev/personal-guest-data-plan/v1"
17
+ },
18
+ "operationId": {
19
+ "type": "string",
20
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
21
+ },
22
+ "binding": {
23
+ "$ref": "personal-guest-binding.schema.json"
24
+ },
25
+ "diskQuotaBytes": {
26
+ "type": "integer",
27
+ "minimum": 16777216,
28
+ "maximum": 1099511627775,
29
+ "multipleOf": 1024
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensoha.dev/schemas/personal-guest-enrollment.schema.json",
4
+ "title": "Personal VM Guest Enrollment",
5
+ "description": "New personal-guest/v1 protocol; never sent to Docker v1 or a Network Control enrollment route. A guest-specific mTLS certificate and a short one-time challenge in Authorization are required. Core derives assistant, owner, VM generation, data identity, policy and binding from the pending registration. Atomic one-time challenge consumption and current owner/access checks are server duties. This request grants registration and heartbeat only; no Docker/PVE/SSH/network management or task execution rights. POST /api/personal-guest/v1/bindings/{bindingId}/enroll returns 201 with the binding. Authorization is exactly Bearer followed by a canonical, unpadded base64url 32-byte crypto/rand challenge (43 characters), issued for 60–600 seconds and pinned to the binding plus certificate fingerprint; only its SHA256 hash is persisted. A consumed challenge cannot be replayed: 401. After a lost response, GET the same binding with the pinned certificate; this does not issue new authority. Missing/wrong certificate, challenge, enrollment or expired registration: 401; current owner/access, superseded binding or policy rejection: 403. Reject duplicate JSON keys and noncanonical field casing; no credential is accepted in a query or forwarded header.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "enrollmentId"
11
+ ],
12
+ "properties": {
13
+ "schemaVersion": {
14
+ "const": "opensoha.dev/personal-guest-enrollment/v1"
15
+ },
16
+ "enrollmentId": {
17
+ "type": "string",
18
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensoha.dev/schemas/personal-guest-heartbeat.schema.json",
4
+ "title": "Personal VM Guest Heartbeat",
5
+ "description": "Guest-specific mTLS certificate required. Core checks pinned credential, current owner/access, unrevoked binding, validity, identity revision, compute generation and strictly increasing sequence atomically. Observation must fall within binding validity and 30 seconds of server time. Heartbeat is liveness only: provider, data mount/UUID/hard quota, command/file/browser probes remain independent; this message has no readiness or arbitrary capabilities field. POST /api/personal-guest/v1/bindings/{bindingId}/heartbeats returns 204 only after atomic monotonic sequence storage, current authority and pinned mTLS checks. Replayed/stale sequence or mismatched binding/generation: 409; rejected current authority: 403; wrong/expired certificate registration: 401. Body is bounded to 4096 UTF-8 bytes; duplicate keys and noncanonical field casing are rejected. Heartbeat never sets environment/data/tool readiness.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "bindingId",
11
+ "bindingVersion",
12
+ "computeGeneration",
13
+ "sequence",
14
+ "observedAt"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": {
18
+ "const": "opensoha.dev/personal-guest-heartbeat/v1"
19
+ },
20
+ "bindingId": {
21
+ "type": "string",
22
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
23
+ },
24
+ "bindingVersion": {
25
+ "type": "integer",
26
+ "minimum": 1,
27
+ "maximum": 9007199254740991
28
+ },
29
+ "computeGeneration": {
30
+ "type": "integer",
31
+ "minimum": 1,
32
+ "maximum": 9007199254740991
33
+ },
34
+ "sequence": {
35
+ "type": "integer",
36
+ "minimum": 1,
37
+ "maximum": 9007199254740991
38
+ },
39
+ "observedAt": {
40
+ "type": "string",
41
+ "format": "date-time"
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensoha.dev/schemas/personal-guest-provisioning.schema.json",
4
+ "title": "Fixed Personal Guest Provisioning",
5
+ "description": "Core-derived, encrypted durable task content delivered only to the fixed QGA installer on the frozen owned VM. The private key remains in that VM at /home/soha/.soha-personal-guest/bootstrap.key. No arbitrary command or path is accepted. Artifact download requires the current dedicated mTLS identity, returns an octet stream with no-store, and is pinned to the Core configured SHA256. Certificate/private key and one-time challenge material must not enter task responses, audits or logs. The guest unit runs as soha UID1000, with frozen cgroup and network limits. A separate root oneshot only reconciles a completed protected data receipt using GET /bindings/{id}/data-lease and can never format. The data lease requires a current registered identity, current owner/access/VM mutation permissions, initialized data and no competing reservation.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "plan",
10
+ "endpoint",
11
+ "enrollmentId",
12
+ "challenge",
13
+ "certificatePEM",
14
+ "clientCAPEM",
15
+ "artifactSHA256",
16
+ "cpuQuotaMilli",
17
+ "memoryBytes",
18
+ "pidsLimit",
19
+ "network"
20
+ ],
21
+ "properties": {
22
+ "plan": {
23
+ "$ref": "personal-guest-data-plan.schema.json"
24
+ },
25
+ "endpoint": {
26
+ "type": "string",
27
+ "format": "uri",
28
+ "maxLength": 512
29
+ },
30
+ "enrollmentId": {
31
+ "type": "string",
32
+ "format": "uuid"
33
+ },
34
+ "challenge": {
35
+ "type": "string",
36
+ "pattern": "^[A-Za-z0-9_-]{43}$"
37
+ },
38
+ "certificatePEM": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "maxLength": 4096
42
+ },
43
+ "clientCAPEM": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "maxLength": 8192
47
+ },
48
+ "artifactSHA256": {
49
+ "type": "string",
50
+ "pattern": "^[a-f0-9]{64}$"
51
+ },
52
+ "cpuQuotaMilli": {
53
+ "type": "integer",
54
+ "minimum": 1,
55
+ "maximum": 8000
56
+ },
57
+ "memoryBytes": {
58
+ "type": "integer",
59
+ "minimum": 33554432,
60
+ "maximum": 17179869184
61
+ },
62
+ "pidsLimit": {
63
+ "type": "integer",
64
+ "minimum": 4,
65
+ "maximum": 256
66
+ },
67
+ "network": {
68
+ "const": false
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensoha.dev/schemas/personal-guest-renewal.schema.json",
4
+ "title": "Personal Guest Certificate Renewal",
5
+ "description": "POST /api/personal-guest/v1/bindings/{bindingId}/renewals uses the current pinned mTLS certificate and returns requestId, binding, certificatePEM and clientCAPEM and commitBefore. A durable requestId and identical CSR recover a lost response. POST /renewals/{requestId}/commit uses the pending new certificate; repeats recover a lost commit. Core rechecks current owner/access/provider identity on both steps. Only commit promotes binding version and certificate; heartbeat sequence is preserved. Expired pending requests return 410 only after authenticating the still-current certificate and owner. The client must verify the unchanged current binding before durably replacing its expired request ID. Expired certificates cannot renew. Duplicate keys, unknown fields and noncanonical casing are rejected. The new certificate grants liveness only, never data or execution readiness.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "requestId",
11
+ "bindingVersion",
12
+ "csrPEM"
13
+ ],
14
+ "properties": {
15
+ "schemaVersion": {
16
+ "const": "opensoha.dev/personal-guest-renewal/v1"
17
+ },
18
+ "requestId": {
19
+ "type": "string",
20
+ "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
21
+ },
22
+ "bindingVersion": {
23
+ "type": "integer",
24
+ "minimum": 1,
25
+ "maximum": 9007199254740990
26
+ },
27
+ "csrPEM": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "maxLength": 2048
31
+ }
32
+ }
33
+ }