@opensoha/contracts 0.1.27 → 0.2.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 (871) hide show
  1. package/COMPATIBILITY.md +141 -16
  2. package/README.md +153 -50
  3. package/agent/agent-protocol.schema.json +2 -2
  4. package/agent/dsh-runtime.README.md +207 -0
  5. package/agent/dsh-runtime.schema.json +1165 -0
  6. package/agent/environment/mcp_stdio.go +30 -0
  7. package/agent/guest/runtime.go +1 -1
  8. package/agent/guest/runtime_test.go +1 -1
  9. package/auth/catalog_generated.go +2 -2
  10. package/auth/docker_permissions_test.go +44 -0
  11. package/auth/permission-catalog.json +65 -1
  12. package/auth/radius_permissions_test.go +44 -0
  13. package/compat/consumer-revisions.json +6 -6
  14. package/compat/json-schema-ecosystem-0.1.0.json +1 -1
  15. package/compat/openapi-loose-boundaries-0.1.0.json +5 -1
  16. package/docker/runtime/compose.go +128 -0
  17. package/docker/runtime/compose_replicas_test.go +20 -0
  18. package/docker/runtime/container_set.go +50 -0
  19. package/docker/runtime/container_set_test.go +31 -0
  20. package/docker/runtime/identity.go +130 -0
  21. package/docker/runtime/identity_test.go +91 -0
  22. package/docker/runtime/read.go +141 -0
  23. package/docker/runtime/read_result.go +93 -0
  24. package/docker/runtime/read_result_test.go +111 -0
  25. package/docker/runtime/read_test.go +63 -0
  26. package/docker/runtime/terminal.go +86 -0
  27. package/docker/runtime/terminal_test.go +50 -0
  28. package/examples/relations_compat_test.go +1 -1
  29. package/fixtures/json-schema/agent-protocol/valid/dsh-agent-status.json +17 -0
  30. package/fixtures/json-schema/docker-container-identity/invalid/name-instead-of-id.json +8 -0
  31. package/fixtures/json-schema/docker-container-identity/invalid/short-id.json +8 -0
  32. package/fixtures/json-schema/docker-container-identity/invalid/unknown-field.json +9 -0
  33. package/fixtures/json-schema/docker-container-identity/invalid/unsafe-service.json +8 -0
  34. package/fixtures/json-schema/docker-container-identity/valid/bound-container.json +8 -0
  35. package/fixtures/json-schema/docker-project-identity/invalid/injected-field.json +7 -0
  36. package/fixtures/json-schema/docker-project-identity/invalid/invalid-uid.json +6 -0
  37. package/fixtures/json-schema/docker-project-identity/invalid/legacy-protocol.json +6 -0
  38. package/fixtures/json-schema/docker-project-identity/invalid/nil-uid.json +6 -0
  39. package/fixtures/json-schema/docker-project-identity/invalid/slug-namespace.json +6 -0
  40. package/fixtures/json-schema/docker-project-identity/valid/bound-project.json +6 -0
  41. package/fixtures/json-schema/docker-runtime-read/invalid/1.json +14 -0
  42. package/fixtures/json-schema/docker-runtime-read/invalid/2.json +14 -0
  43. package/fixtures/json-schema/docker-runtime-read/invalid/3.json +14 -0
  44. package/fixtures/json-schema/docker-runtime-read/invalid/4.json +16 -0
  45. package/fixtures/json-schema/docker-runtime-read/invalid/5.json +14 -0
  46. package/fixtures/json-schema/docker-runtime-read/invalid/6.json +15 -0
  47. package/fixtures/json-schema/docker-runtime-read/invalid/7.json +15 -0
  48. package/fixtures/json-schema/docker-runtime-read/valid/1.json +14 -0
  49. package/fixtures/json-schema/docker-runtime-read/valid/2.json +14 -0
  50. package/fixtures/json-schema/docker-runtime-read/valid/3.json +17 -0
  51. package/fixtures/json-schema/docker-runtime-read/valid/4.json +17 -0
  52. package/fixtures/json-schema/docker-runtime-read-result/invalid/contradictory-completeness.json +21 -0
  53. package/fixtures/json-schema/docker-runtime-read-result/invalid/host-source-leak.json +28 -0
  54. package/fixtures/json-schema/docker-runtime-read-result/invalid/missing-files.json +20 -0
  55. package/fixtures/json-schema/docker-runtime-read-result/invalid/unsupported-browse.json +27 -0
  56. package/fixtures/json-schema/docker-runtime-read-result/valid/logs.json +21 -0
  57. package/fixtures/json-schema/docker-runtime-read-result/valid/volumes.json +27 -0
  58. package/fixtures/json-schema/dsh-runtime/invalid/assembly-report-credential.json +21 -0
  59. package/fixtures/json-schema/dsh-runtime/invalid/attempt-zero.json +18 -0
  60. package/fixtures/json-schema/dsh-runtime/invalid/bad-deadline.json +18 -0
  61. package/fixtures/json-schema/dsh-runtime/invalid/bad-hash.json +18 -0
  62. package/fixtures/json-schema/dsh-runtime/invalid/event-delta-missing.json +10 -0
  63. package/fixtures/json-schema/dsh-runtime/invalid/event-grant.json +12 -0
  64. package/fixtures/json-schema/dsh-runtime/invalid/event-sequence-zero.json +12 -0
  65. package/fixtures/json-schema/dsh-runtime/invalid/fence-zero.json +18 -0
  66. package/fixtures/json-schema/dsh-runtime/invalid/health-unknown-field.json +12 -0
  67. package/fixtures/json-schema/dsh-runtime/invalid/output-budget-zero.json +18 -0
  68. package/fixtures/json-schema/dsh-runtime/invalid/receipt-grant.json +12 -0
  69. package/fixtures/json-schema/dsh-runtime/invalid/start-assembly-url.json +32 -0
  70. package/fixtures/json-schema/dsh-runtime/invalid/start-chat-write-tool.json +38 -0
  71. package/fixtures/json-schema/dsh-runtime/invalid/start-client-base-url.json +19 -0
  72. package/fixtures/json-schema/dsh-runtime/invalid/start-client-callback.json +19 -0
  73. package/fixtures/json-schema/dsh-runtime/invalid/start-missing-readonly.json +37 -0
  74. package/fixtures/json-schema/dsh-runtime/invalid/status-grant.json +19 -0
  75. package/fixtures/json-schema/dsh-runtime/invalid/status-usage-missing.json +13 -0
  76. package/fixtures/json-schema/dsh-runtime/invalid/status-usage-unknown.json +18 -0
  77. package/fixtures/json-schema/dsh-runtime/invalid/tool-call-missing-call-id.json +13 -0
  78. package/fixtures/json-schema/dsh-runtime/invalid/tool-result-missing-hash.json +13 -0
  79. package/fixtures/json-schema/dsh-runtime/invalid/union-extra-field.json +12 -0
  80. package/fixtures/json-schema/dsh-runtime/invalid/unsupported-version.json +18 -0
  81. package/fixtures/json-schema/dsh-runtime/valid/assembly-decision.json +21 -0
  82. package/fixtures/json-schema/dsh-runtime/valid/assembly-report-mcp.json +34 -0
  83. package/fixtures/json-schema/dsh-runtime/valid/assembly-report.json +20 -0
  84. package/fixtures/json-schema/dsh-runtime/valid/cancel.json +8 -0
  85. package/fixtures/json-schema/dsh-runtime/valid/event-delta.json +12 -0
  86. package/fixtures/json-schema/dsh-runtime/valid/event-hook-observed.json +14 -0
  87. package/fixtures/json-schema/dsh-runtime/valid/event-terminal.json +13 -0
  88. package/fixtures/json-schema/dsh-runtime/valid/health.json +11 -0
  89. package/fixtures/json-schema/dsh-runtime/valid/receipt.json +11 -0
  90. package/fixtures/json-schema/dsh-runtime/valid/start-assembly.json +31 -0
  91. package/fixtures/json-schema/dsh-runtime/valid/start-chat.json +18 -0
  92. package/fixtures/json-schema/dsh-runtime/valid/start-heya.json +38 -0
  93. package/fixtures/json-schema/dsh-runtime/valid/status-completed.json +18 -0
  94. package/fixtures/json-schema/dsh-runtime/valid/status-unknown.json +13 -0
  95. package/fixtures/json-schema/dsh-runtime/valid/tool-call.json +1 -0
  96. package/fixtures/json-schema/dsh-runtime/valid/tool-result-denied.json +15 -0
  97. package/fixtures/json-schema/dsh-runtime/valid/tool-result.json +14 -0
  98. package/fixtures/json-schema/memory-policy/invalid/invalid-mode.json +17 -0
  99. package/fixtures/json-schema/memory-policy/valid/scoped.json +17 -0
  100. package/fixtures/json-schema/memory-record/invalid/invalid-source-hash.json +21 -0
  101. package/fixtures/json-schema/memory-record/invalid/invalid-sync-status.json +21 -0
  102. package/fixtures/json-schema/memory-record/invalid/quarantine-reason-too-long.json +23 -0
  103. package/fixtures/json-schema/memory-record/valid/quarantined.json +23 -0
  104. package/fixtures/json-schema/memory-record/valid/synced.json +21 -0
  105. package/fixtures/json-schema/network-ingest-event/invalid/proxy-runtime-epoch-without-sequence.json +23 -0
  106. package/fixtures/json-schema/network-ingest-event/invalid/proxy-runtime-unsafe-sequence.json +24 -0
  107. package/fixtures/json-schema/network-ingest-event/valid/proxy-runtime-epoch.json +24 -0
  108. package/fixtures/json-schema/network-runtime-protocol/invalid/eap-activate-partial-profile.json +16 -0
  109. package/fixtures/json-schema/network-runtime-protocol/invalid/eap-revoke-other-kind.json +16 -0
  110. package/fixtures/json-schema/network-runtime-protocol/invalid/enrollment-duplicate-capability.json +30 -0
  111. package/fixtures/json-schema/network-runtime-protocol/invalid/enrollment-unknown-capability.json +30 -0
  112. package/fixtures/json-schema/network-runtime-protocol/invalid/legacy-with-proof.json +19 -0
  113. package/fixtures/json-schema/network-runtime-protocol/invalid/ttls-certificate.json +42 -0
  114. package/fixtures/json-schema/network-runtime-protocol/invalid/ttls-device-override.json +19 -0
  115. package/fixtures/json-schema/network-runtime-protocol/invalid/ttls-no-proof.json +17 -0
  116. package/fixtures/json-schema/network-runtime-protocol/invalid/ttls-nonstation-identity.json +18 -0
  117. package/fixtures/json-schema/network-runtime-protocol/invalid/ttls-profile-without-pap.json +40 -0
  118. package/fixtures/json-schema/network-runtime-protocol/valid/app-default-enrollment.json +29 -0
  119. package/fixtures/json-schema/network-runtime-protocol/valid/app-mihomo-enrollment.json +32 -0
  120. package/fixtures/json-schema/network-runtime-protocol/valid/eap-activate-profile.json +17 -0
  121. package/fixtures/json-schema/network-runtime-protocol/valid/eap-revoke-result.json +16 -0
  122. package/fixtures/json-schema/network-runtime-protocol/valid/eap-revoke.json +16 -0
  123. package/fixtures/json-schema/network-runtime-protocol/valid/proxy-default-enrollment.json +23 -0
  124. package/fixtures/json-schema/network-runtime-protocol/valid/ttls-authorization.json +18 -0
  125. package/fixtures/json-schema/network-runtime-protocol/valid/ttls-profile-enrollment.json +23 -0
  126. package/fixtures/json-schema/network-runtime-protocol/valid/ttls-profile.json +41 -0
  127. package/fixtures/json-schema/proxy-adapter/invalid/apply-incomplete-result.json +11 -0
  128. package/fixtures/json-schema/proxy-adapter/invalid/close-incomplete-result.json +9 -0
  129. package/fixtures/json-schema/proxy-adapter/invalid/handshake-incomplete-result.json +11 -0
  130. package/fixtures/json-schema/proxy-adapter/invalid/invalid-method.json +11 -0
  131. package/fixtures/json-schema/proxy-adapter/invalid/major.json +11 -0
  132. package/fixtures/json-schema/proxy-adapter/invalid/missing-challenge.json +9 -0
  133. package/fixtures/json-schema/proxy-adapter/invalid/multiple-outcomes.json +12 -0
  134. package/fixtures/json-schema/proxy-adapter/invalid/observe-incomplete-result.json +9 -0
  135. package/fixtures/json-schema/proxy-adapter/invalid/unknown-field.json +12 -0
  136. package/fixtures/json-schema/proxy-adapter/valid/apply-result.json +12 -0
  137. package/fixtures/json-schema/proxy-adapter/valid/close-result.json +11 -0
  138. package/fixtures/json-schema/proxy-adapter/valid/handshake-result.json +19 -0
  139. package/fixtures/json-schema/proxy-adapter/valid/handshake.json +11 -0
  140. package/fixtures/json-schema/proxy-adapter/valid/observe-result.json +20 -0
  141. package/fixtures/json-schema/proxy-runtime/invalid/deployment-stop-accepting.json +19 -0
  142. package/fixtures/json-schema/proxy-runtime/invalid/deployment-stopped-unknown.json +21 -0
  143. package/fixtures/json-schema/proxy-runtime/invalid/duplicate-capability.json +20 -0
  144. package/fixtures/json-schema/proxy-runtime/invalid/guarded-udp-unknown.json +19 -0
  145. package/fixtures/json-schema/proxy-runtime/invalid/ingress-check-cross-payload.json +9 -0
  146. package/fixtures/json-schema/proxy-runtime/invalid/ingress-check-result-cross-payload.json +9 -0
  147. package/fixtures/json-schema/proxy-runtime/invalid/publication-ready-cross-payload.json +9 -0
  148. package/fixtures/json-schema/proxy-runtime/invalid/unknown-field.json +18 -0
  149. package/fixtures/json-schema/proxy-runtime/valid/deployment-process-stopped.json +21 -0
  150. package/fixtures/json-schema/proxy-runtime/valid/deployment-stop-required.json +19 -0
  151. package/fixtures/json-schema/proxy-runtime/valid/guarded-udp.json +20 -0
  152. package/fixtures/json-schema/proxy-runtime/valid/ingress-check-result.json +15 -0
  153. package/fixtures/json-schema/proxy-runtime/valid/ingress-check.json +18 -0
  154. package/fixtures/json-schema/proxy-runtime/valid/management-capabilities.json +26 -0
  155. package/fixtures/json-schema/proxy-runtime/valid/observation.json +17 -0
  156. package/fixtures/json-schema/proxy-runtime/valid/publication-ready.json +16 -0
  157. package/fixtures/json-schema/radius-password-verifier/invalid/bare-pap.json +9 -0
  158. package/fixtures/json-schema/radius-password-verifier/invalid/empty-password.json +9 -0
  159. package/fixtures/json-schema/radius-password-verifier/invalid/enumeration.json +4 -0
  160. package/fixtures/json-schema/radius-password-verifier/invalid/failure-with-subject.json +5 -0
  161. package/fixtures/json-schema/radius-password-verifier/invalid/invalid-station.json +9 -0
  162. package/fixtures/json-schema/radius-password-verifier/invalid/radius-xlat.json +16 -0
  163. package/fixtures/json-schema/radius-password-verifier/invalid/raw-password.json +10 -0
  164. package/fixtures/json-schema/radius-password-verifier/invalid/success-without-receipt.json +5 -0
  165. package/fixtures/json-schema/radius-password-verifier/invalid/too-long.json +9 -0
  166. package/fixtures/json-schema/radius-password-verifier/invalid/url-base64.json +9 -0
  167. package/fixtures/json-schema/radius-password-verifier/invalid/wrong-method.json +9 -0
  168. package/fixtures/json-schema/radius-password-verifier/valid/failure.json +4 -0
  169. package/fixtures/json-schema/radius-password-verifier/valid/radius-success.json +16 -0
  170. package/fixtures/json-schema/radius-password-verifier/valid/request.json +9 -0
  171. package/fixtures/json-schema/radius-password-verifier/valid/success.json +6 -0
  172. package/fixtures/json-schema/radius-runtime/invalid/control-with-secret.json +30 -0
  173. package/fixtures/json-schema/radius-runtime/invalid/known-null.json +21 -0
  174. package/fixtures/json-schema/radius-runtime/invalid/known-without-count.json +20 -0
  175. package/fixtures/json-schema/radius-runtime/invalid/stopped-still-accepting.json +21 -0
  176. package/fixtures/json-schema/radius-runtime/invalid/stopped-with-live-state.json +21 -0
  177. package/fixtures/json-schema/radius-runtime/invalid/unknown-with-zero.json +21 -0
  178. package/fixtures/json-schema/radius-runtime/valid/bootstrap-control.json +29 -0
  179. package/fixtures/json-schema/radius-runtime/valid/known-zero.json +21 -0
  180. package/fixtures/json-schema/radius-runtime/valid/owned-child-stopped.json +21 -0
  181. package/fixtures/json-schema/radius-runtime/valid/unknown-state.json +20 -0
  182. package/fixtures/openapi/AIMemoryPolicy/invalid/invalid-mode.json +16 -0
  183. package/fixtures/openapi/AIMemoryPolicy/valid/legacy-global.json +12 -0
  184. package/fixtures/openapi/AIMemoryPolicy/valid/scoped.json +16 -0
  185. package/fixtures/openapi/AIMemoryPolicyInput/invalid/invalid-mode.json +9 -0
  186. package/fixtures/openapi/AIMemoryPolicyInput/invalid/owner-spoof.json +10 -0
  187. package/fixtures/openapi/AIMemoryPolicyInput/valid/heya-automatic.json +9 -0
  188. package/fixtures/openapi/AIMemoryPolicyInput/valid/scoped.json +9 -0
  189. package/fixtures/openapi/AIMemoryRecord/invalid/invalid-source-hash.json +20 -0
  190. package/fixtures/openapi/AIMemoryRecord/invalid/invalid-sync-status.json +20 -0
  191. package/fixtures/openapi/AIMemoryRecord/invalid/quarantine-reason-too-long.json +22 -0
  192. package/fixtures/openapi/AIMemoryRecord/valid/delete-pending.json +21 -0
  193. package/fixtures/openapi/AIMemoryRecord/valid/quarantined.json +22 -0
  194. package/fixtures/openapi/AIMemoryRecord/valid/synced.json +20 -0
  195. package/fixtures/openapi/AgentConditionalResourceMutationRequest/invalid/preconditions-v1.json +8 -0
  196. package/fixtures/openapi/AgentConditionalResourceMutationRequest/valid/preconditions-v1.json +9 -0
  197. package/fixtures/openapi/AgentConditionalResourceYamlRequest/invalid/preconditions-v1.json +6 -0
  198. package/fixtures/openapi/AgentConditionalResourceYamlRequest/valid/preconditions-v1.json +10 -0
  199. package/fixtures/openapi/AgentPodArgvResult/invalid/native-pod-execution-v1.json +17 -0
  200. package/fixtures/openapi/AgentPodArgvResult/valid/native-pod-execution-v1.json +24 -0
  201. package/fixtures/openapi/AgentPodExecutionCapabilities/invalid/native-pod-execution-v1.json +7 -0
  202. package/fixtures/openapi/AgentPodExecutionCapabilities/valid/native-pod-execution-v1.json +7 -0
  203. package/fixtures/openapi/AgentRunCallbackRequest/valid/dsh-agent-status.json +17 -0
  204. package/fixtures/openapi/AlertOwnershipInput/invalid/workbench.json +3 -0
  205. package/fixtures/openapi/AlertOwnershipInput/valid/workbench.json +4 -0
  206. package/fixtures/openapi/ApplicationEnvironmentListEnvelope/invalid/legacy-list-alias.json +4 -0
  207. package/fixtures/openapi/ApplicationEnvironmentListEnvelope/valid/legacy-list-alias.json +4 -0
  208. package/fixtures/openapi/ApplicationListEnvelope/invalid/legacy-list-alias.json +4 -0
  209. package/fixtures/openapi/ApplicationListEnvelope/valid/legacy-list-alias.json +4 -0
  210. package/fixtures/openapi/ApplicationServiceListEnvelope/invalid/legacy-list-alias.json +4 -0
  211. package/fixtures/openapi/ApplicationServiceListEnvelope/valid/legacy-list-alias.json +4 -0
  212. package/fixtures/openapi/CLIAuthContext/invalid/cli-boundary.json +13 -0
  213. package/fixtures/openapi/CLIAuthContext/valid/cli-boundary.json +12 -0
  214. package/fixtures/openapi/CLIAuthOptions/invalid/cli-boundary.json +14 -0
  215. package/fixtures/openapi/CLIAuthOptions/valid/cli-boundary.json +13 -0
  216. package/fixtures/openapi/CLIAuthOptions/valid/governed-ai.json +14 -0
  217. package/fixtures/openapi/CLIDeviceAuthorization/invalid/cli-boundary.json +10 -0
  218. package/fixtures/openapi/CLIDeviceAuthorization/invalid/numeric-code.json +9 -0
  219. package/fixtures/openapi/CLIDeviceAuthorization/valid/cli-boundary.json +9 -0
  220. package/fixtures/openapi/CLIDeviceAuthorizationCreateRequest/invalid/basic.json +5 -0
  221. package/fixtures/openapi/CLIDeviceAuthorizationCreateRequest/valid/basic.json +5 -0
  222. package/fixtures/openapi/CLIDeviceCancelRequest/invalid/cli-boundary.json +5 -0
  223. package/fixtures/openapi/CLIDeviceCancelRequest/valid/cli-boundary.json +4 -0
  224. package/fixtures/openapi/CLIDeviceDecisionRequest/invalid/basic.json +6 -0
  225. package/fixtures/openapi/CLIDeviceDecisionRequest/valid/basic.json +6 -0
  226. package/fixtures/openapi/CLIDeviceInspectRequest/invalid/basic.json +4 -0
  227. package/fixtures/openapi/CLIDeviceInspectRequest/valid/basic.json +4 -0
  228. package/fixtures/openapi/CLIDeviceTokenRequest/invalid/basic.json +5 -0
  229. package/fixtures/openapi/CLIDeviceTokenRequest/valid/basic.json +5 -0
  230. package/fixtures/openapi/CLILogoutRequest/invalid/cli-boundary.json +4 -0
  231. package/fixtures/openapi/CLILogoutRequest/valid/cli-boundary.json +3 -0
  232. package/fixtures/openapi/CLIRefreshRequest/invalid/basic.json +3 -0
  233. package/fixtures/openapi/CLIRefreshRequest/valid/basic.json +4 -0
  234. package/fixtures/openapi/CLISession/invalid/cli-boundary.json +12 -0
  235. package/fixtures/openapi/CLISession/valid/cli-boundary.json +11 -0
  236. package/fixtures/openapi/DeliveryBlueprintListEnvelope/invalid/legacy-list-alias.json +4 -0
  237. package/fixtures/openapi/DeliveryBlueprintListEnvelope/valid/legacy-list-alias.json +4 -0
  238. package/fixtures/openapi/DeliveryEnvironmentListEnvelope/invalid/legacy-list-alias.json +4 -0
  239. package/fixtures/openapi/DeliveryEnvironmentListEnvelope/valid/legacy-list-alias.json +4 -0
  240. package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/hidden-count.json +24 -0
  241. package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/hidden-identities.json +26 -0
  242. package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/invalid-frozen-revision.json +23 -0
  243. package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/missing-current-revision.json +22 -0
  244. package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/private-complete-snapshot.json +37 -0
  245. package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/invalid/too-many-items.json +1223 -0
  246. package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/valid/current-plan.json +23 -0
  247. package/fixtures/openapi/DeliveryPlanServiceReferenceImpact/valid/stale-plan-current-visible-page.json +23 -0
  248. package/fixtures/openapi/DeliveryTemplateUsageApplication/invalid/unknown-field.json +4 -0
  249. package/fixtures/openapi/DeliveryTemplateUsageApplication/valid/minimal.json +3 -0
  250. package/fixtures/openapi/DeliveryTemplateUsageBinding/invalid/unknown-field.json +6 -0
  251. package/fixtures/openapi/DeliveryTemplateUsageBinding/valid/minimal.json +5 -0
  252. package/fixtures/openapi/DeliveryTemplateUsageBuildSource/invalid/unknown-field.json +7 -0
  253. package/fixtures/openapi/DeliveryTemplateUsageBuildSource/valid/minimal.json +6 -0
  254. package/fixtures/openapi/DeliveryTemplateUsageEnvironment/invalid/unknown-field.json +5 -0
  255. package/fixtures/openapi/DeliveryTemplateUsageEnvironment/valid/minimal.json +4 -0
  256. package/fixtures/openapi/DeliveryTemplateUsageRuntimeItem/invalid/unknown-field.json +6 -0
  257. package/fixtures/openapi/DeliveryTemplateUsageRuntimeItem/valid/minimal.json +5 -0
  258. package/fixtures/openapi/DeliveryTemplateUsageRuntimeSummary/invalid/unknown-field.json +20 -0
  259. package/fixtures/openapi/DeliveryTemplateUsageRuntimeSummary/valid/minimal.json +19 -0
  260. package/fixtures/openapi/DeliveryTemplateUsageSummary/invalid/missing-kind.json +16 -0
  261. package/fixtures/openapi/DeliveryTemplateUsageSummary/valid/static.json +17 -0
  262. package/fixtures/openapi/DeliveryTemplateUsageSummaryEnvelope/invalid/legacy-items.json +3 -0
  263. package/fixtures/openapi/DeliveryTemplateUsageSummaryEnvelope/valid/static.json +19 -0
  264. package/fixtures/openapi/DirectorySyncRequestEnvelope/invalid/original-request.json +25 -0
  265. package/fixtures/openapi/DirectorySyncRequestEnvelope/valid/original-request.json +24 -0
  266. package/fixtures/openapi/DirectorySyncRequestInput/invalid/original-request.json +4 -0
  267. package/fixtures/openapi/DirectorySyncRequestInput/valid/original-request.json +3 -0
  268. package/fixtures/openapi/DirectorySyncRequestOrganizations/invalid/original-request.json +7 -0
  269. package/fixtures/openapi/DirectorySyncRequestOrganizations/valid/original-request.json +6 -0
  270. package/fixtures/openapi/DirectorySyncRequestPeople/invalid/original-request.json +7 -0
  271. package/fixtures/openapi/DirectorySyncRequestPeople/valid/original-request.json +6 -0
  272. package/fixtures/openapi/DirectorySyncRequestReceipt/invalid/original-request.json +23 -0
  273. package/fixtures/openapi/DirectorySyncRequestReceipt/valid/original-request.json +22 -0
  274. package/fixtures/openapi/DirectorySyncRequestRun/invalid/cancel-flag.json +1 -0
  275. package/fixtures/openapi/DirectorySyncRequestRun/invalid/original-request.json +19 -0
  276. package/fixtures/openapi/DirectorySyncRequestRun/valid/original-request.json +19 -0
  277. package/fixtures/openapi/DockerConfigurationChange/invalid/field.json +5 -0
  278. package/fixtures/openapi/DockerConfigurationChange/invalid/integer-overflow.json +4 -0
  279. package/fixtures/openapi/DockerConfigurationChange/valid/field.json +4 -0
  280. package/fixtures/openapi/DockerConfigurationDeleteInput/invalid/delete.json +7 -0
  281. package/fixtures/openapi/DockerConfigurationDeleteInput/valid/delete.json +7 -0
  282. package/fixtures/openapi/DockerConfigurationMapValue/invalid/map.json +1 -0
  283. package/fixtures/openapi/DockerConfigurationMapValue/valid/map.json +3 -0
  284. package/fixtures/openapi/DockerConfigurationPatchInput/invalid/missing-target-host.json +13 -0
  285. package/fixtures/openapi/DockerConfigurationPatchInput/invalid/patch.json +8 -0
  286. package/fixtures/openapi/DockerConfigurationPatchInput/invalid/unused-target-host.json +14 -0
  287. package/fixtures/openapi/DockerConfigurationPatchInput/valid/explicit-zero-and-empty.json +21 -0
  288. package/fixtures/openapi/DockerConfigurationPatchInput/valid/host-move.json +14 -0
  289. package/fixtures/openapi/DockerConfigurationPatchInput/valid/patch.json +13 -0
  290. package/fixtures/openapi/DockerConfigurationPreconditions/invalid/identity.json +3 -0
  291. package/fixtures/openapi/DockerConfigurationPreconditions/valid/identity.json +4 -0
  292. package/fixtures/openapi/DockerConfigurationReceipt/invalid/receipt.json +15 -0
  293. package/fixtures/openapi/DockerConfigurationReceipt/valid/receipt.json +14 -0
  294. package/fixtures/openapi/DockerConfigurationReceiptEnvelope/invalid/receipt.json +16 -0
  295. package/fixtures/openapi/DockerConfigurationReceiptEnvelope/valid/receipt.json +16 -0
  296. package/fixtures/openapi/DockerConfigurationScalar/invalid/simple.json +1 -0
  297. package/fixtures/openapi/DockerConfigurationScalar/valid/simple.json +1 -0
  298. package/fixtures/openapi/DockerHostRegistration/invalid/host.json +4 -0
  299. package/fixtures/openapi/DockerHostRegistration/valid/host.json +6 -0
  300. package/fixtures/openapi/DockerHostRegistrationInput/invalid/registration.json +4 -0
  301. package/fixtures/openapi/DockerHostRegistrationInput/valid/registration.json +6 -0
  302. package/fixtures/openapi/DockerNativeTerminalCreated/invalid/native-v1.json +24 -0
  303. package/fixtures/openapi/DockerNativeTerminalCreated/valid/native-v1.json +23 -0
  304. package/fixtures/openapi/DockerNativeTerminalCreatedEnvelope/invalid/native-v1.json +26 -0
  305. package/fixtures/openapi/DockerNativeTerminalCreatedEnvelope/valid/native-v1.json +25 -0
  306. package/fixtures/openapi/DockerNativeTerminalInput/invalid/native-v1.json +9 -0
  307. package/fixtures/openapi/DockerNativeTerminalInput/valid/native-v1.json +8 -0
  308. package/fixtures/openapi/DockerNativeTerminalSession/invalid/native-v1.json +21 -0
  309. package/fixtures/openapi/DockerNativeTerminalSession/valid/native-v1.json +20 -0
  310. package/fixtures/openapi/DockerNativeTerminalSessionEnvelope/invalid/native-v1.json +23 -0
  311. package/fixtures/openapi/DockerNativeTerminalSessionEnvelope/valid/native-v1.json +22 -0
  312. package/fixtures/openapi/DockerProjectDeployInput/invalid/missing-host.json +8 -0
  313. package/fixtures/openapi/DockerProjectDeployInput/valid/bound.json +14 -0
  314. package/fixtures/openapi/DockerProjectDeployInput/valid/legacy.json +1 -0
  315. package/fixtures/openapi/DockerProjectDeployPreconditions/invalid/missing-host.json +6 -0
  316. package/fixtures/openapi/DockerProjectDeployPreconditions/valid/bound.json +11 -0
  317. package/fixtures/openapi/DockerResourceIdentity/invalid/configuration-leak.json +9 -0
  318. package/fixtures/openapi/DockerResourceIdentity/invalid/host-with-host.json +7 -0
  319. package/fixtures/openapi/DockerResourceIdentity/invalid/invalid-uid.json +6 -0
  320. package/fixtures/openapi/DockerResourceIdentity/invalid/missing-revision.json +5 -0
  321. package/fixtures/openapi/DockerResourceIdentity/invalid/missing-uid.json +5 -0
  322. package/fixtures/openapi/DockerResourceIdentity/invalid/project-without-host.json +6 -0
  323. package/fixtures/openapi/DockerResourceIdentity/invalid/wrong-kind.json +6 -0
  324. package/fixtures/openapi/DockerResourceIdentity/valid/host.json +6 -0
  325. package/fixtures/openapi/DockerResourceIdentity/valid/project.json +7 -0
  326. package/fixtures/openapi/DockerResourceIdentityEnvelope/invalid/array-data.json +10 -0
  327. package/fixtures/openapi/DockerResourceIdentityEnvelope/invalid/missing-data.json +1 -0
  328. package/fixtures/openapi/DockerResourceIdentityEnvelope/invalid/unexpected-payload.json +11 -0
  329. package/fixtures/openapi/DockerResourceIdentityEnvelope/valid/host.json +8 -0
  330. package/fixtures/openapi/DockerResourceIdentityEnvelope/valid/project.json +9 -0
  331. package/fixtures/openapi/DockerRuntimeContainerBinding/invalid/identity-bound.json +8 -0
  332. package/fixtures/openapi/DockerRuntimeContainerBinding/valid/identity-bound.json +8 -0
  333. package/fixtures/openapi/DockerRuntimeFileEntry/invalid/identity-bound.json +8 -0
  334. package/fixtures/openapi/DockerRuntimeFileEntry/valid/identity-bound.json +8 -0
  335. package/fixtures/openapi/DockerRuntimeReadEnvelope/invalid/identity-bound.json +23 -0
  336. package/fixtures/openapi/DockerRuntimeReadEnvelope/valid/identity-bound.json +23 -0
  337. package/fixtures/openapi/DockerRuntimeReadResult/invalid/identity-bound.json +21 -0
  338. package/fixtures/openapi/DockerRuntimeReadResult/valid/identity-bound.json +21 -0
  339. package/fixtures/openapi/DockerRuntimeVolume/invalid/identity-bound.json +7 -0
  340. package/fixtures/openapi/DockerRuntimeVolume/valid/identity-bound.json +7 -0
  341. package/fixtures/openapi/EnvironmentServiceReference/invalid/candidate-state.json +60 -0
  342. package/fixtures/openapi/EnvironmentServiceReference/invalid/missing-current-source-revision.json +59 -0
  343. package/fixtures/openapi/EnvironmentServiceReference/invalid/missing-identity-revision.json +59 -0
  344. package/fixtures/openapi/EnvironmentServiceReference/invalid/private-snapshot.json +61 -0
  345. package/fixtures/openapi/EnvironmentServiceReference/valid/active.json +60 -0
  346. package/fixtures/openapi/EnvironmentServiceReferenceCandidate/invalid/active.json +63 -0
  347. package/fixtures/openapi/EnvironmentServiceReferenceCandidate/invalid/raw-secret.json +66 -0
  348. package/fixtures/openapi/EnvironmentServiceReferenceCandidate/valid/generic-operator.json +63 -0
  349. package/fixtures/openapi/EnvironmentServiceReferenceCandidate/valid/helm-root.json +49 -0
  350. package/fixtures/openapi/EnvironmentServiceReferenceCandidateDeleteInput/invalid/missing-binding-cas.json +4 -0
  351. package/fixtures/openapi/EnvironmentServiceReferenceCandidateDeleteInput/invalid/missing-identity.json +4 -0
  352. package/fixtures/openapi/EnvironmentServiceReferenceCandidateDeleteInput/valid/delete-without-source.json +5 -0
  353. package/fixtures/openapi/EnvironmentServiceReferenceCandidateEnvelope/invalid/missing-revision.json +64 -0
  354. package/fixtures/openapi/EnvironmentServiceReferenceCandidateEnvelope/valid/generic-operator.json +65 -0
  355. package/fixtures/openapi/EnvironmentServiceReferenceCandidateEnvelope/valid/helm-root.json +51 -0
  356. package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/activation.json +11 -0
  357. package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/create-with-old-id.json +11 -0
  358. package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/empty-targets.json +8 -0
  359. package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/missing-digest.json +9 -0
  360. package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/missing-targets.json +7 -0
  361. package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/null-targets.json +8 -0
  362. package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/invalid/update-without-id.json +10 -0
  363. package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/valid/create.json +10 -0
  364. package/fixtures/openapi/EnvironmentServiceReferenceCandidateInput/valid/update.json +11 -0
  365. package/fixtures/openapi/EnvironmentServiceReferenceCandidatePage/invalid/source-content.json +17 -0
  366. package/fixtures/openapi/EnvironmentServiceReferenceCandidatePage/valid/page.json +13 -0
  367. package/fixtures/openapi/EnvironmentServiceReferenceCandidateSummary/invalid/source-leak.json +9 -0
  368. package/fixtures/openapi/EnvironmentServiceReferenceCandidateSummary/valid/consumer-metadata.json +8 -0
  369. package/fixtures/openapi/EnvironmentServiceReferenceConsumer/invalid/duplicate-target-ids.json +13 -0
  370. package/fixtures/openapi/EnvironmentServiceReferenceConsumer/invalid/source-content.json +38 -0
  371. package/fixtures/openapi/EnvironmentServiceReferenceConsumer/invalid/too-many-target-ids.json +112 -0
  372. package/fixtures/openapi/EnvironmentServiceReferenceConsumer/valid/visible.json +12 -0
  373. package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/invalid/hidden-count.json +19 -0
  374. package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/invalid/hidden-identities.json +21 -0
  375. package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/invalid/missing-restricted-flag.json +17 -0
  376. package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/invalid/too-many-items.json +1218 -0
  377. package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/valid/all-consumers-restricted.json +4 -0
  378. package/fixtures/openapi/EnvironmentServiceReferenceConsumerPage/valid/visible-page-with-restricted-consumers.json +18 -0
  379. package/fixtures/openapi/EnvironmentServiceReferenceDeleteInput/invalid/caller-force.json +6 -0
  380. package/fixtures/openapi/EnvironmentServiceReferenceDeleteInput/invalid/missing-consumer-cas.json +4 -0
  381. package/fixtures/openapi/EnvironmentServiceReferenceDeleteInput/invalid/missing-reference-id.json +4 -0
  382. package/fixtures/openapi/EnvironmentServiceReferenceDeleteInput/invalid/zero-reference-revision.json +5 -0
  383. package/fixtures/openapi/EnvironmentServiceReferenceDeleteInput/valid/detach-without-source-access.json +5 -0
  384. package/fixtures/openapi/EnvironmentServiceReferenceEnvelope/invalid/missing-fresh-uid.json +61 -0
  385. package/fixtures/openapi/EnvironmentServiceReferenceEnvelope/valid/active.json +62 -0
  386. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/caller-force.json +9 -0
  387. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/caller-ownership.json +9 -0
  388. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/caller-source.json +9 -0
  389. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/caller-targets.json +11 -0
  390. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/create-with-reference-id.json +9 -0
  391. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/empty-candidate-id.json +8 -0
  392. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/invalid-consumer-time.json +8 -0
  393. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/invalid-source-digest.json +8 -0
  394. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/invalid-source-time.json +8 -0
  395. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/missing-candidate-id.json +7 -0
  396. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/missing-candidate-revision.json +7 -0
  397. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/missing-consumer-cas.json +7 -0
  398. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/missing-source-cas.json +7 -0
  399. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/missing-source-digest.json +7 -0
  400. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/negative-reference-revision.json +8 -0
  401. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/oversized-candidate-id.json +8 -0
  402. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/update-without-reference-id.json +8 -0
  403. package/fixtures/openapi/EnvironmentServiceReferenceInput/invalid/zero-candidate-revision.json +8 -0
  404. package/fixtures/openapi/EnvironmentServiceReferenceInput/valid/activate.json +8 -0
  405. package/fixtures/openapi/EnvironmentServiceReferenceInput/valid/explicit-rebind.json +9 -0
  406. package/fixtures/openapi/EnvironmentServiceReferencePage/invalid/global-count.json +14 -0
  407. package/fixtures/openapi/EnvironmentServiceReferencePage/invalid/source-content.json +64 -0
  408. package/fixtures/openapi/EnvironmentServiceReferencePage/invalid/too-many-items.json +813 -0
  409. package/fixtures/openapi/EnvironmentServiceReferencePage/valid/empty.json +3 -0
  410. package/fixtures/openapi/EnvironmentServiceReferencePage/valid/page.json +13 -0
  411. package/fixtures/openapi/EnvironmentServiceReferencePreviewEnvelope/invalid/missing-uid.json +54 -0
  412. package/fixtures/openapi/EnvironmentServiceReferencePreviewEnvelope/invalid/raw-values.json +58 -0
  413. package/fixtures/openapi/EnvironmentServiceReferencePreviewEnvelope/valid/generic-operator.json +55 -0
  414. package/fixtures/openapi/EnvironmentServiceReferencePreviewEnvelope/valid/helm-root.json +41 -0
  415. package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/duplicate-targets.json +10 -0
  416. package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/empty-targets.json +7 -0
  417. package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/invalid-revision.json +7 -0
  418. package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/missing-source-cas.json +5 -0
  419. package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/null-targets.json +7 -0
  420. package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/invalid/unexpected-write.json +7 -0
  421. package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/valid/all-source-targets.json +6 -0
  422. package/fixtures/openapi/EnvironmentServiceReferencePreviewInput/valid/explicit-group.json +11 -0
  423. package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/invalid/missing-origin.json +40 -0
  424. package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/invalid/missing-source-uid.json +48 -0
  425. package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/invalid/missing-view.json +40 -0
  426. package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/invalid/yaml-is-not-authorized.json +50 -0
  427. package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/invalid/zero-reference-revision.json +49 -0
  428. package/fixtures/openapi/EnvironmentServiceReferenceResolvedTarget/valid/consumer-view-source-origin.json +49 -0
  429. package/fixtures/openapi/EnvironmentServiceReferenceSummary/invalid/source-leak.json +9 -0
  430. package/fixtures/openapi/EnvironmentServiceReferenceSummary/invalid/zero-reference-revision.json +8 -0
  431. package/fixtures/openapi/EnvironmentServiceReferenceSummary/valid/consumer-metadata.json +8 -0
  432. package/fixtures/openapi/ExecutionArtifactListEnvelope/invalid/legacy-list-alias.json +4 -0
  433. package/fixtures/openapi/ExecutionArtifactListEnvelope/valid/legacy-list-alias.json +4 -0
  434. package/fixtures/openapi/ExecutionLog/invalid/missing-task.json +6 -0
  435. package/fixtures/openapi/ExecutionLog/valid/nested-metadata.json +16 -0
  436. package/fixtures/openapi/ExecutionLog/valid/row.json +7 -0
  437. package/fixtures/openapi/ExecutionLogListEnvelope/invalid/wrong-wrapper.json +3 -0
  438. package/fixtures/openapi/ExecutionLogListEnvelope/valid/empty.json +3 -0
  439. package/fixtures/openapi/ExecutionTaskActionInput/invalid/reason-type.json +3 -0
  440. package/fixtures/openapi/ExecutionTaskActionInput/invalid/unknown.json +3 -0
  441. package/fixtures/openapi/ExecutionTaskActionInput/valid/empty.json +1 -0
  442. package/fixtures/openapi/ExecutionTaskActionInput/valid/reason.json +3 -0
  443. package/fixtures/openapi/ExecutionTaskControlInput/invalid/missing-action.json +3 -0
  444. package/fixtures/openapi/ExecutionTaskControlInput/invalid/reason-too-long.json +4 -0
  445. package/fixtures/openapi/ExecutionTaskControlInput/invalid/unknown-field.json +4 -0
  446. package/fixtures/openapi/ExecutionTaskControlInput/invalid/unsupported-action.json +3 -0
  447. package/fixtures/openapi/ExecutionTaskControlInput/valid/cancel.json +4 -0
  448. package/fixtures/openapi/ExecutionTaskControlInput/valid/retry.json +3 -0
  449. package/fixtures/openapi/ExecutionTaskControlInput/valid/unicode-reason.json +4 -0
  450. package/fixtures/openapi/ExecutionTaskListEnvelope/invalid/legacy-list-alias.json +4 -0
  451. package/fixtures/openapi/ExecutionTaskListEnvelope/valid/legacy-list-alias.json +4 -0
  452. package/fixtures/openapi/GovernedAITokenBinding/invalid/binding.json +5 -0
  453. package/fixtures/openapi/GovernedAITokenBinding/valid/binding.json +5 -0
  454. package/fixtures/openapi/HealingOriginalRequestEnvelope/invalid/original-request.json +19 -0
  455. package/fixtures/openapi/HealingOriginalRequestEnvelope/valid/original-request.json +18 -0
  456. package/fixtures/openapi/HealingOriginalRequestInput/invalid/original-request.json +5 -0
  457. package/fixtures/openapi/HealingOriginalRequestInput/valid/original-request.json +4 -0
  458. package/fixtures/openapi/HealingOriginalRequestReceipt/invalid/original-request.json +17 -0
  459. package/fixtures/openapi/HealingOriginalRequestReceipt/valid/original-request.json +16 -0
  460. package/fixtures/openapi/HealingOriginalRun/invalid/original-request.json +13 -0
  461. package/fixtures/openapi/HealingOriginalRun/valid/original-request.json +12 -0
  462. package/fixtures/openapi/HelmReleaseImportInput/invalid/explicit-service-id.json +4 -0
  463. package/fixtures/openapi/HelmReleaseImportInput/valid/explicit-service-id.json +4 -0
  464. package/fixtures/openapi/IdentityOutpostClaimRequest/invalid/unsupported-control.json +7 -0
  465. package/fixtures/openapi/IdentityOutpostClaimRequest/valid/control-capable.json +7 -0
  466. package/fixtures/openapi/IdentityOutpostHeartbeatRequest/invalid/control-ack.json +11 -0
  467. package/fixtures/openapi/IdentityOutpostHeartbeatRequest/valid/control-ack.json +11 -0
  468. package/fixtures/openapi/IdentityOutpostHeartbeatRequest/valid/legacy.json +6 -0
  469. package/fixtures/openapi/IdentityOutpostRuntime/invalid/runtime.json +10 -0
  470. package/fixtures/openapi/IdentityOutpostRuntime/valid/observed-zero.json +18 -0
  471. package/fixtures/openapi/IdentityOutpostRuntime/valid/runtime.json +11 -0
  472. package/fixtures/openapi/IdentityOutpostRuntimeBindingInput/invalid/runtime.json +6 -0
  473. package/fixtures/openapi/IdentityOutpostRuntimeBindingInput/valid/runtime.json +5 -0
  474. package/fixtures/openapi/IdentityOutpostRuntimeControl/invalid/runtime.json +12 -0
  475. package/fixtures/openapi/IdentityOutpostRuntimeControl/valid/runtime.json +12 -0
  476. package/fixtures/openapi/IdentityOutpostRuntimeControlInput/invalid/arbitrary-target.json +6 -0
  477. package/fixtures/openapi/IdentityOutpostRuntimeControlInput/invalid/empty-request-id.json +5 -0
  478. package/fixtures/openapi/IdentityOutpostRuntimeControlInput/invalid/negative-generation.json +6 -0
  479. package/fixtures/openapi/IdentityOutpostRuntimeControlInput/invalid/reconcile-replicas.json +6 -0
  480. package/fixtures/openapi/IdentityOutpostRuntimeControlInput/invalid/runtime.json +6 -0
  481. package/fixtures/openapi/IdentityOutpostRuntimeControlInput/valid/reconcile.json +5 -0
  482. package/fixtures/openapi/IdentityOutpostRuntimeControlInput/valid/runtime.json +6 -0
  483. package/fixtures/openapi/IdentityOutpostRuntimeExecutorClaimRequest/invalid/runtime.json +6 -0
  484. package/fixtures/openapi/IdentityOutpostRuntimeExecutorClaimRequest/valid/runtime.json +3 -0
  485. package/fixtures/openapi/KubernetesClusterRegistrationRequest/invalid/metric-cluster-value-length.json +3 -0
  486. package/fixtures/openapi/KubernetesClusterRegistrationRequest/invalid/metric-cluster-value-type.json +3 -0
  487. package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/metric-cluster-alias.json +5 -0
  488. package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/metric-cluster-dedicated.json +5 -0
  489. package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/metric-cluster-reset.json +3 -0
  490. package/fixtures/openapi/KubernetesConditionalResourceYamlInput/invalid/preconditions-v1.json +3 -0
  491. package/fixtures/openapi/KubernetesConditionalResourceYamlInput/valid/preconditions-v1.json +7 -0
  492. package/fixtures/openapi/KubernetesConditionalWorkloadActionInput/invalid/preconditions-v1.json +7 -0
  493. package/fixtures/openapi/KubernetesConditionalWorkloadActionInput/valid/preconditions-v1.json +8 -0
  494. package/fixtures/openapi/KubernetesConditionalWorkloadActionReceipt/invalid/preconditions-v1.json +14 -0
  495. package/fixtures/openapi/KubernetesConditionalWorkloadActionReceipt/valid/preconditions-v1.json +14 -0
  496. package/fixtures/openapi/KubernetesConditionalWorkloadActionReceiptEnvelope/invalid/preconditions-v1.json +16 -0
  497. package/fixtures/openapi/KubernetesConditionalWorkloadActionReceiptEnvelope/valid/preconditions-v1.json +16 -0
  498. package/fixtures/openapi/KubernetesHelmReleaseValuesUpdateInput/invalid/revision-overflow.json +4 -0
  499. package/fixtures/openapi/KubernetesHelmReleaseValuesUpdateInput/valid/legacy.json +3 -0
  500. package/fixtures/openapi/KubernetesHelmReleaseValuesUpdateInput/valid/observed-revision.json +4 -0
  501. package/fixtures/openapi/KubernetesJobDetail/invalid/execution-observation.json +23 -0
  502. package/fixtures/openapi/KubernetesJobDetail/valid/execution-observation.json +23 -0
  503. package/fixtures/openapi/KubernetesNode/invalid/labels.json +10 -0
  504. package/fixtures/openapi/KubernetesNode/valid/labels.json +11 -0
  505. package/fixtures/openapi/KubernetesPodArgvInput/invalid/blank-executable.json +6 -0
  506. package/fixtures/openapi/KubernetesPodArgvInput/invalid/invalid-stdin.json +7 -0
  507. package/fixtures/openapi/KubernetesPodArgvInput/invalid/native-pod-execution-v1.json +4 -0
  508. package/fixtures/openapi/KubernetesPodArgvInput/invalid/nul-argv.json +7 -0
  509. package/fixtures/openapi/KubernetesPodArgvInput/valid/native-pod-execution-v1.json +7 -0
  510. package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/empty-argv.json +10 -0
  511. package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/missing-key.json +16 -0
  512. package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/nested-unknown.json +18 -0
  513. package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/timeout.json +17 -0
  514. package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/unknown-shell.json +18 -0
  515. package/fixtures/openapi/KubernetesPodArgvToolInput/invalid/wrong-namespace.json +17 -0
  516. package/fixtures/openapi/KubernetesPodArgvToolInput/valid/reviewed-argv.json +17 -0
  517. package/fixtures/openapi/KubernetesPodExecutionLookupInput/invalid/both.json +7 -0
  518. package/fixtures/openapi/KubernetesPodExecutionLookupInput/invalid/empty-key.json +6 -0
  519. package/fixtures/openapi/KubernetesPodExecutionLookupInput/invalid/neither.json +5 -0
  520. package/fixtures/openapi/KubernetesPodExecutionLookupInput/invalid/noncanonical-id.json +6 -0
  521. package/fixtures/openapi/KubernetesPodExecutionLookupInput/invalid/unknown-command.json +11 -0
  522. package/fixtures/openapi/KubernetesPodExecutionLookupInput/valid/by-id.json +6 -0
  523. package/fixtures/openapi/KubernetesPodExecutionLookupInput/valid/by-key.json +6 -0
  524. package/fixtures/openapi/KubernetesPodExecutionOutput/invalid/native-pod-execution-v1.json +15 -0
  525. package/fixtures/openapi/KubernetesPodExecutionOutput/valid/native-pod-execution-v1.json +15 -0
  526. package/fixtures/openapi/KubernetesPodExecutionReceipt/invalid/native-pod-execution-v1.json +29 -0
  527. package/fixtures/openapi/KubernetesPodExecutionReceipt/valid/native-pod-execution-v1.json +29 -0
  528. package/fixtures/openapi/KubernetesPodExecutionReceiptEnvelope/invalid/native-pod-execution-v1.json +1 -0
  529. package/fixtures/openapi/KubernetesPodExecutionReceiptEnvelope/valid/native-pod-execution-v1.json +31 -0
  530. package/fixtures/openapi/KubernetesPodExecutionTarget/invalid/native-pod-execution-v1.json +7 -0
  531. package/fixtures/openapi/KubernetesPodExecutionTarget/valid/native-pod-execution-v1.json +7 -0
  532. package/fixtures/openapi/KubernetesPodGatewayResult/invalid/encoded-output.json +32 -0
  533. package/fixtures/openapi/KubernetesPodGatewayResult/invalid/missing-text.json +17 -0
  534. package/fixtures/openapi/KubernetesPodGatewayResult/invalid/raw-receipt-availability.json +32 -0
  535. package/fixtures/openapi/KubernetesPodGatewayResult/invalid/raw-receipt-output.json +47 -0
  536. package/fixtures/openapi/KubernetesPodGatewayResult/invalid/withheld-text.json +32 -0
  537. package/fixtures/openapi/KubernetesPodGatewayResult/valid/binary-withheld.json +17 -0
  538. package/fixtures/openapi/KubernetesPodGatewayResult/valid/redacted.json +32 -0
  539. package/fixtures/openapi/KubernetesPodGatewayResult/valid/text.json +32 -0
  540. package/fixtures/openapi/KubernetesPodGatewayResult/valid/unavailable.json +17 -0
  541. package/fixtures/openapi/KubernetesPodListEnvelope/invalid/empty-uid.json +13 -0
  542. package/fixtures/openapi/KubernetesPodListEnvelope/invalid/invalid-container-state.json +20 -0
  543. package/fixtures/openapi/KubernetesPodListEnvelope/invalid/missing-container-ready.json +19 -0
  544. package/fixtures/openapi/KubernetesPodListEnvelope/valid/container-statuses.json +67 -0
  545. package/fixtures/openapi/KubernetesPodListEnvelope/valid/running-pod.json +1 -0
  546. package/fixtures/openapi/KubernetesPodTerminalCreated/invalid/terminal.json +21 -0
  547. package/fixtures/openapi/KubernetesPodTerminalCreated/valid/terminal.json +21 -0
  548. package/fixtures/openapi/KubernetesPodTerminalCreatedEnvelope/invalid/terminal.json +3 -0
  549. package/fixtures/openapi/KubernetesPodTerminalCreatedEnvelope/valid/terminal.json +23 -0
  550. package/fixtures/openapi/KubernetesPodTerminalInput/invalid/terminal.json +4 -0
  551. package/fixtures/openapi/KubernetesPodTerminalInput/valid/terminal.json +3 -0
  552. package/fixtures/openapi/KubernetesPodTerminalResult/invalid/terminal.json +8 -0
  553. package/fixtures/openapi/KubernetesPodTerminalResult/valid/terminal.json +8 -0
  554. package/fixtures/openapi/KubernetesPodTerminalSession/invalid/terminal.json +18 -0
  555. package/fixtures/openapi/KubernetesPodTerminalSession/valid/terminal.json +18 -0
  556. package/fixtures/openapi/KubernetesPodTerminalSessionEnvelope/invalid/terminal.json +3 -0
  557. package/fixtures/openapi/KubernetesPodTerminalSessionEnvelope/valid/terminal.json +20 -0
  558. package/fixtures/openapi/KubernetesPrometheusDetail/invalid/metric-cluster-value-type.json +4 -0
  559. package/fixtures/openapi/KubernetesPrometheusDetail/valid/metric-cluster-alias.json +5 -0
  560. package/fixtures/openapi/KubernetesResourceDeletionReceipt/invalid/preconditions-v1.json +11 -0
  561. package/fixtures/openapi/KubernetesResourceDeletionReceipt/valid/preconditions-v1.json +11 -0
  562. package/fixtures/openapi/KubernetesResourceDeletionReceiptEnvelope/invalid/preconditions-v1.json +5 -0
  563. package/fixtures/openapi/KubernetesResourceDeletionReceiptEnvelope/valid/preconditions-v1.json +13 -0
  564. package/fixtures/openapi/KubernetesResourceGraphEnvelope/invalid/network-edge-source-payload.json +73 -0
  565. package/fixtures/openapi/KubernetesResourceGraphEnvelope/valid/network-edge-facts.json +67 -0
  566. package/fixtures/openapi/KubernetesResourceIdentity/invalid/preconditions-v1.json +11 -0
  567. package/fixtures/openapi/KubernetesResourceIdentity/valid/preconditions-v1.json +8 -0
  568. package/fixtures/openapi/KubernetesResourceIdentityEnvelope/invalid/preconditions-v1.json +3 -0
  569. package/fixtures/openapi/KubernetesResourceIdentityEnvelope/valid/preconditions-v1.json +10 -0
  570. package/fixtures/openapi/KubernetesResourceMutationPreconditions/invalid/preconditions-v1.json +3 -0
  571. package/fixtures/openapi/KubernetesResourceMutationPreconditions/valid/preconditions-v1.json +4 -0
  572. package/fixtures/openapi/KubernetesResourcePresence/invalid/absence-with-uid.json +11 -0
  573. package/fixtures/openapi/KubernetesResourcePresence/invalid/missing-collection-version.json +9 -0
  574. package/fixtures/openapi/KubernetesResourcePresence/invalid/missing-state.json +9 -0
  575. package/fixtures/openapi/KubernetesResourcePresence/invalid/old-protocol.json +10 -0
  576. package/fixtures/openapi/KubernetesResourcePresence/invalid/present-without-uid.json +10 -0
  577. package/fixtures/openapi/KubernetesResourcePresence/invalid/unknown-field.json +11 -0
  578. package/fixtures/openapi/KubernetesResourcePresence/valid/absent.json +10 -0
  579. package/fixtures/openapi/KubernetesResourcePresence/valid/present.json +12 -0
  580. package/fixtures/openapi/KubernetesSecretCertificate/invalid/secret-data.json +1 -0
  581. package/fixtures/openapi/KubernetesSecretCertificate/invalid/status.json +1 -0
  582. package/fixtures/openapi/KubernetesSecretCertificate/valid/available.json +1 -0
  583. package/fixtures/openapi/KubernetesSecretCertificate/valid/missing.json +1 -0
  584. package/fixtures/openapi/KubernetesWorkloadImportInput/invalid/explicit-service-id.json +5 -0
  585. package/fixtures/openapi/KubernetesWorkloadImportInput/valid/explicit-service-id.json +7 -0
  586. package/fixtures/openapi/ManifestBindingListEnvelope/invalid/legacy-object.json +4 -0
  587. package/fixtures/openapi/ManifestBindingListEnvelope/valid/empty-alias.json +4 -0
  588. package/fixtures/openapi/ManifestRevision/invalid/missing-files.json +8 -0
  589. package/fixtures/openapi/ManifestRevision/valid/minimal.json +9 -0
  590. package/fixtures/openapi/ManifestRevisionListEnvelope/invalid/legacy-object.json +4 -0
  591. package/fixtures/openapi/ManifestRevisionListEnvelope/valid/legacy-alias.json +24 -0
  592. package/fixtures/openapi/NativeTerminalClientFrame/invalid/terminal.json +12 -0
  593. package/fixtures/openapi/NativeTerminalClientFrame/valid/terminal.json +4 -0
  594. package/fixtures/openapi/NativeTerminalServerFrame/invalid/terminal.json +4 -0
  595. package/fixtures/openapi/NativeTerminalServerFrame/valid/terminal.json +11 -0
  596. package/fixtures/openapi/NetworkConflictAnalysisRequest/invalid/ipv6-range.json +9 -0
  597. package/fixtures/openapi/NetworkEAPServerTrust/invalid/peap.json +10 -0
  598. package/fixtures/openapi/NetworkEAPServerTrust/invalid/tls-inner.json +11 -0
  599. package/fixtures/openapi/NetworkEAPServerTrust/invalid/ttls-incomplete.json +10 -0
  600. package/fixtures/openapi/NetworkEAPServerTrust/valid/ttls.json +12 -0
  601. package/fixtures/openapi/NetworkMihomoProfileInput/invalid/direct-bundle-raw-source.json +21 -0
  602. package/fixtures/openapi/NetworkMihomoProfileInput/invalid/mapped-raw-source.json +21 -0
  603. package/fixtures/openapi/NetworkMihomoProfileInput/valid/direct-bundle.json +19 -0
  604. package/fixtures/openapi/NetworkMihomoProfileInput/valid/mapped-nodes.json +19 -0
  605. package/fixtures/openapi/NetworkProxyBundleInput/invalid/unknown.json +25 -0
  606. package/fixtures/openapi/NetworkProxyBundleInput/valid/basic.json +24 -0
  607. package/fixtures/openapi/NetworkProxyBundleReadback/invalid/missing-identity.json +9 -0
  608. package/fixtures/openapi/NetworkProxyBundleReadback/invalid/unknown-field.json +11 -0
  609. package/fixtures/openapi/NetworkProxyBundleReadback/valid/basic.json +10 -0
  610. package/fixtures/openapi/NetworkProxyCapability/invalid/unknown-version.json +1 -0
  611. package/fixtures/openapi/NetworkProxyCapability/valid/guarded-udp.json +1 -0
  612. package/fixtures/openapi/NetworkProxyDeployment/invalid/negative-observation.json +7 -0
  613. package/fixtures/openapi/NetworkProxyDeployment/invalid/null-observation.json +7 -0
  614. package/fixtures/openapi/NetworkProxyDeployment/valid/positive.json +7 -0
  615. package/fixtures/openapi/NetworkProxyDeployment/valid/stopped.json +7 -0
  616. package/fixtures/openapi/NetworkProxyDeployment/valid/unobserved.json +6 -0
  617. package/fixtures/openapi/NetworkProxyDeploymentControlInput/invalid/unknown.json +7 -0
  618. package/fixtures/openapi/NetworkProxyDeploymentControlInput/valid/basic.json +6 -0
  619. package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/invalid/stopped-accepting.json +15 -0
  620. package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/invalid/stopped-active.json +15 -0
  621. package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/invalid/stopped-missing-count.json +14 -0
  622. package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/invalid/stopped-unknown.json +15 -0
  623. package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/valid/false-with-active-unknown.json +15 -0
  624. package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/valid/omitted-with-active-unknown.json +14 -0
  625. package/fixtures/openapi/NetworkProxyDeploymentRuntimeAck/valid/process-stopped.json +15 -0
  626. package/fixtures/openapi/NetworkProxyDeploymentRuntimeControl/invalid/stop-while-accepting.json +13 -0
  627. package/fixtures/openapi/NetworkProxyDeploymentRuntimeControl/valid/false-can-serve.json +13 -0
  628. package/fixtures/openapi/NetworkProxyDeploymentRuntimeControl/valid/omitted-can-serve.json +12 -0
  629. package/fixtures/openapi/NetworkProxyDeploymentRuntimeControl/valid/stop-required.json +13 -0
  630. package/fixtures/openapi/NetworkProxyDirectProjection/invalid/gateway-credential.json +22 -0
  631. package/fixtures/openapi/NetworkProxyDirectProjection/invalid/original-source-url.json +20 -0
  632. package/fixtures/openapi/NetworkProxyDirectProjection/invalid/protected-projection.json +41 -0
  633. package/fixtures/openapi/NetworkProxyDirectProjection/invalid/wrong-mode.json +19 -0
  634. package/fixtures/openapi/NetworkProxyDirectProjection/valid/explicit-direct.json +19 -0
  635. package/fixtures/openapi/NetworkProxyEmployeeProjection/invalid/direct-upstream-content.json +42 -0
  636. package/fixtures/openapi/NetworkProxyEmployeeProjection/invalid/unsafe-endpoint.json +41 -0
  637. package/fixtures/openapi/NetworkProxyEmployeeProjection/invalid/upstream.json +42 -0
  638. package/fixtures/openapi/NetworkProxyEmployeeProjection/valid/scoped.json +41 -0
  639. package/fixtures/openapi/NetworkProxyIngressCheckInput/invalid/arbitrary-url.json +12 -0
  640. package/fixtures/openapi/NetworkProxyIngressCheckInput/invalid/missing-identity.json +11 -0
  641. package/fixtures/openapi/NetworkProxyIngressCheckInput/invalid/unknown-field.json +13 -0
  642. package/fixtures/openapi/NetworkProxyIngressCheckInput/valid/basic.json +12 -0
  643. package/fixtures/openapi/NetworkProxyIngressCheckResult/invalid/missing-identity.json +8 -0
  644. package/fixtures/openapi/NetworkProxyIngressCheckResult/invalid/unknown-field.json +10 -0
  645. package/fixtures/openapi/NetworkProxyIngressCheckResult/valid/basic.json +9 -0
  646. package/fixtures/openapi/NetworkProxyInstanceInput/invalid/external.json +5 -0
  647. package/fixtures/openapi/NetworkProxyInstanceInput/valid/external.json +15 -0
  648. package/fixtures/openapi/NetworkProxyRule/invalid/unknown.json +15 -0
  649. package/fixtures/openapi/NetworkProxyRule/valid/basic.json +14 -0
  650. package/fixtures/openapi/NetworkProxyRuntimeCommandInput/invalid/unknown.json +8 -0
  651. package/fixtures/openapi/NetworkProxyRuntimeCommandInput/valid/basic.json +7 -0
  652. package/fixtures/openapi/NetworkProxyServerPublication/invalid/arbitrary-listener.json +21 -0
  653. package/fixtures/openapi/NetworkProxyServerPublication/invalid/missing-identity.json +19 -0
  654. package/fixtures/openapi/NetworkProxyServerPublication/invalid/unknown-field.json +21 -0
  655. package/fixtures/openapi/NetworkProxyServerPublication/valid/basic.json +20 -0
  656. package/fixtures/openapi/NetworkProxySourceInput/invalid/node-quota.json +912 -0
  657. package/fixtures/openapi/NetworkProxySourceInput/invalid/unknown.json +8 -0
  658. package/fixtures/openapi/NetworkProxySourceInput/invalid/unsupported-format.json +7 -0
  659. package/fixtures/openapi/NetworkProxySourceInput/invalid/untyped-direct-format.json +7 -0
  660. package/fixtures/openapi/NetworkProxySourceInput/valid/basic.json +7 -0
  661. package/fixtures/openapi/NetworkProxySourceInput/valid/converted-direct.json +7 -0
  662. package/fixtures/openapi/NetworkProxyTrafficSample/invalid/known-as-null.json +10 -0
  663. package/fixtures/openapi/NetworkProxyTrafficSample/valid/gap-rate.json +10 -0
  664. package/fixtures/openapi/NetworkProxyTrafficSample/valid/known-zero.json +10 -0
  665. package/fixtures/openapi/NetworkProxyTrafficSample/valid/legacy-numeric.json +7 -0
  666. package/fixtures/openapi/NetworkProxyTrafficSample/valid/unknown-rate.json +10 -0
  667. package/fixtures/openapi/NetworkRADIUSConfigurationInput/invalid/arbitrary-image.json +6 -0
  668. package/fixtures/openapi/NetworkRADIUSConfigurationInput/valid/input.json +5 -0
  669. package/fixtures/openapi/NetworkRADIUSControlInput/invalid/arbitrary-image.json +8 -0
  670. package/fixtures/openapi/NetworkRADIUSControlInput/valid/input.json +7 -0
  671. package/fixtures/openapi/NetworkRADIUSOptions/invalid/secret.json +18 -0
  672. package/fixtures/openapi/NetworkRADIUSOptions/valid/approved.json +17 -0
  673. package/fixtures/openapi/NetworkRADIUSPoolInput/invalid/arbitrary-image.json +10 -0
  674. package/fixtures/openapi/NetworkRADIUSPoolInput/valid/create-approved-binding.json +9 -0
  675. package/fixtures/openapi/NetworkRADIUSPoolInput/valid/input.json +9 -0
  676. package/fixtures/openapi/NetworkRADIUSRuntimeACK/invalid/missing-zero.json +20 -0
  677. package/fixtures/openapi/NetworkRADIUSRuntimeACK/invalid/secret.json +22 -0
  678. package/fixtures/openapi/NetworkRADIUSRuntimeACK/valid/current.json +21 -0
  679. package/fixtures/openapi/NetworkRADIUSRuntimeACK/valid/stopped-no-hooks.json +21 -0
  680. package/fixtures/openapi/NetworkRADIUSRuntimeControl/invalid/secret.json +30 -0
  681. package/fixtures/openapi/NetworkRADIUSRuntimeControl/valid/current.json +29 -0
  682. package/fixtures/openapi/OperationCommentInput/invalid/workbench.json +4 -0
  683. package/fixtures/openapi/OperationCommentInput/valid/workbench.json +3 -0
  684. package/fixtures/openapi/PersonalAssistantArtifactListEnvelope/invalid/legacy-object.json +4 -0
  685. package/fixtures/openapi/PersonalAssistantArtifactListEnvelope/valid/legacy-alias.json +4 -0
  686. package/fixtures/openapi/ReleaseTargetInput/invalid/explicit-service-id.json +8 -0
  687. package/fixtures/openapi/ReleaseTargetInput/valid/explicit-service-id.json +8 -0
  688. package/fixtures/openapi/TokenRotationRecord/invalid/cli-boundary.json +10 -0
  689. package/fixtures/openapi/TokenRotationRecord/valid/cli-boundary.json +9 -0
  690. package/fixtures/openapi/WorkbenchAgentRunListEnvelope/valid/dsh-session.json +18 -0
  691. package/fixtures/openapi/WorkbenchSendMessageStreamRequest/invalid/unicode-request-id.json +4 -0
  692. package/fixtures/openapi/WorkbenchSendMessageStreamRequest/valid/unicode-request-id.json +4 -0
  693. package/fixtures/openapi/WorkbenchStreamEvent/valid/dsh-agent-status.json +11 -0
  694. package/fixtures/openapi/WorkbenchStreamEvent/valid/native-system-notice.json +11 -0
  695. package/fixtures/openapi/WorkflowRequestInput/invalid/original-request.json +6 -0
  696. package/fixtures/openapi/WorkflowRequestInput/valid/original-request.json +7 -0
  697. package/fixtures/openapi/WorkflowRequestReceipt/invalid/original-request.json +6 -0
  698. package/fixtures/openapi/WorkflowRequestReceipt/valid/original-request.json +6 -0
  699. package/fixtures/openapi/WorkflowRequestReceiptEnvelope/invalid/receipt.json +8 -0
  700. package/fixtures/openapi/WorkflowRequestReceiptEnvelope/valid/receipt.json +17 -0
  701. package/fixtures/openapi/WorkflowRunEnvelope/invalid/receipt.json +3 -0
  702. package/fixtures/openapi/WorkflowRunEnvelope/valid/receipt.json +11 -0
  703. package/fixtures/openapi/WorkflowTriggerRequest/invalid/workbench.json +4 -0
  704. package/fixtures/openapi/WorkflowTriggerRequest/valid/workbench.json +9 -0
  705. package/gen/go/sohaapi/client.go +108 -1
  706. package/gen/go/sohaapi/client_test.go +85 -0
  707. package/gen/go/sohaapi/docker_configuration_test.go +32 -0
  708. package/gen/go/sohaapi/kubernetes_workload_optional_test.go +40 -0
  709. package/gen/go/sohaapi/memory_types_test.go +59 -0
  710. package/gen/go/sohaapi/pod_status_compat_test.go +36 -0
  711. package/gen/go/sohaapi/proxy_deployment_presence_test.go +47 -0
  712. package/gen/go/sohaapi/proxy_deployment_stop_test.go +40 -0
  713. package/gen/go/sohaapi/proxy_traffic_test.go +41 -0
  714. package/gen/go/sohaapi/radius_presence_test.go +35 -0
  715. package/gen/go/sohaapi/types.go +6580 -365
  716. package/gen/go/sohaapi/types_test.go +63 -0
  717. package/gen/ts/sohaapi/index.ts +36358 -26252
  718. package/go.mod +5 -2
  719. package/go.sum +8 -0
  720. package/helmrelease/delivery.go +1 -1
  721. package/helmrelease/delivery_test.go +1 -1
  722. package/helmrelease/initialization.go +1 -1
  723. package/helmrelease/result.go +1 -1
  724. package/helmrelease/runtime/delivery.go +4 -4
  725. package/helmrelease/runtime/delivery_test.go +2 -2
  726. package/helmrelease/runtime/initialization.go +2 -2
  727. package/helmrelease/runtime/initialization_test.go +2 -2
  728. package/helmrelease/runtime/values_upgrade.go +78 -0
  729. package/helmrelease/runtime/values_upgrade_test.go +123 -0
  730. package/helmrelease/values.go +1 -1
  731. package/helmrelease/values_update.go +31 -0
  732. package/memory/memory-policy.schema.json +5 -1
  733. package/memory/memory-record.schema.json +5 -1
  734. package/network/README.md +79 -0
  735. package/network/network-ingest-event.schema.json +4 -1
  736. package/network/network-runtime-protocol.schema.json +381 -20
  737. package/network/proxy-adapter.schema.json +1018 -0
  738. package/network/proxy-runtime.schema.json +1732 -16
  739. package/network/radius-password-verifier.schema.json +263 -0
  740. package/network/radius-runtime.schema.json +929 -0
  741. package/network/schema.go +12 -0
  742. package/openapi/soha-api.json +70695 -49969
  743. package/openapi/soha-api.yaml +39327 -27176
  744. package/openapi/spec_generated.go +3 -3
  745. package/package.json +19 -6
  746. package/proxyadapter/mihomo_udp.go +15 -0
  747. package/proxyadapter/mihomo_udp_test.go +21 -0
  748. package/proxyadapter/protocol.go +286 -0
  749. package/proxyadapter/protocol_test.go +76 -0
  750. package/proxypolicy/destination_test.go +48 -0
  751. package/proxypolicy/narrow.go +152 -0
  752. package/proxypolicy/narrow_test.go +138 -0
  753. package/proxypolicy/policy.go +329 -0
  754. package/proxypolicy/policy_test.go +36 -0
  755. package/proxytransport/README.md +141 -0
  756. package/proxytransport/handler.go +5 -1
  757. package/proxytransport/native_egress_test.go +236 -0
  758. package/proxytransport/probe.go +5 -1
  759. package/proxytransport/probe_test.go +106 -0
  760. package/proxytransport/refresh_test.go +74 -0
  761. package/proxytransport/scope.go +23 -3
  762. package/proxytransport/socks_upstream.go +440 -0
  763. package/proxytransport/socks_upstream_test.go +368 -0
  764. package/proxytransport/udp_conn.go +234 -0
  765. package/proxytransport/udp_gate.go +521 -0
  766. package/proxytransport/udp_http.go +372 -0
  767. package/proxytransport/udp_socks.go +288 -0
  768. package/proxytransport/udp_test.go +793 -0
  769. package/proxytransport/username.go +51 -0
  770. package/proxytransport/username_test.go +98 -0
  771. package/resource/agent_profiles.go +9 -15
  772. package/resource/agent_profiles_test.go +9 -3
  773. package/resource/conditional_workload_action.go +63 -0
  774. package/resource/custom_graph_page.go +18 -0
  775. package/resource/models.go +102 -57
  776. package/resource/mutation_preconditions.go +67 -0
  777. package/resource/network_topology.go +22 -0
  778. package/resource/network_topology_projection.go +36 -22
  779. package/resource/network_topology_projection_test.go +4 -0
  780. package/resource/network_topology_test.go +20 -0
  781. package/resource/network_topology_validation.go +5 -0
  782. package/resource/observed_workload.go +18 -0
  783. package/resource/pod_execution.go +206 -0
  784. package/resource/pod_execution_gateway.go +119 -0
  785. package/resource/pod_execution_gateway_test.go +149 -0
  786. package/resource/pod_execution_test.go +48 -0
  787. package/resource/pod_status_test.go +22 -0
  788. package/resource/pod_terminal.go +188 -0
  789. package/resource/pod_terminal_test.go +63 -0
  790. package/resource/presence.go +60 -0
  791. package/resource/presence_test.go +28 -0
  792. package/resource/rbac_graph.go +4 -0
  793. package/resource/rollout_optional_test.go +33 -0
  794. package/resource/root_cr.go +1 -1
  795. package/resource/runtime/argocd_observation.go +1 -1
  796. package/resource/runtime/conditional_workload_action.go +141 -0
  797. package/resource/runtime/conditional_workload_action_test.go +259 -0
  798. package/resource/runtime/health.go +1 -1
  799. package/resource/runtime/health_test.go +1 -1
  800. package/resource/runtime/initialization.go +1 -1
  801. package/resource/runtime/initialization_test.go +1 -1
  802. package/resource/runtime/mutation_preconditions.go +106 -0
  803. package/resource/runtime/mutation_preconditions_test.go +172 -0
  804. package/resource/runtime/network_relationship_primitives.go +66 -0
  805. package/resource/runtime/network_relationship_primitives_test.go +147 -0
  806. package/resource/runtime/network_topology.go +18 -6
  807. package/resource/runtime/network_topology_builder.go +405 -0
  808. package/resource/runtime/network_topology_builder_backends.go +195 -0
  809. package/resource/runtime/network_topology_builder_gateway_l4_test.go +86 -0
  810. package/resource/runtime/network_topology_builder_ingress.go +302 -0
  811. package/resource/runtime/network_topology_builder_legacy.go +66 -0
  812. package/resource/runtime/network_topology_builder_providers.go +242 -0
  813. package/resource/runtime/network_topology_builder_test.go +186 -0
  814. package/resource/runtime/network_topology_declarations.go +329 -0
  815. package/resource/runtime/network_topology_test.go +1 -1
  816. package/resource/runtime/node_drain.go +1 -1
  817. package/resource/runtime/node_drain_test.go +1 -1
  818. package/resource/runtime/pod_execution.go +199 -0
  819. package/resource/runtime/pod_execution_test.go +194 -0
  820. package/resource/runtime/pod_execution_transport.go +79 -0
  821. package/resource/runtime/pod_terminal.go +178 -0
  822. package/resource/runtime/pod_terminal_test.go +170 -0
  823. package/resource/runtime/presence.go +58 -0
  824. package/resource/runtime/presence_metadata.go +85 -0
  825. package/resource/runtime/presence_metadata_test.go +56 -0
  826. package/resource/runtime/presence_test.go +85 -0
  827. package/resource/runtime/relations.go +1 -1
  828. package/resource/runtime/relations_test.go +1 -1
  829. package/resource/runtime/resource_edit.go +22 -0
  830. package/resource/runtime/resource_edit_test.go +32 -0
  831. package/resource/runtime/resource_graph_collect.go +325 -0
  832. package/resource/runtime/resource_graph_configuration.go +59 -0
  833. package/resource/runtime/resource_graph_configuration_collect.go +198 -0
  834. package/resource/runtime/resource_graph_configuration_test.go +470 -0
  835. package/resource/runtime/resource_graph_custom_page.go +159 -0
  836. package/resource/runtime/resource_graph_custom_root.go +132 -0
  837. package/resource/runtime/resource_graph_custom_root_test.go +197 -0
  838. package/resource/runtime/resource_graph_enrichment.go +417 -0
  839. package/resource/runtime/resource_graph_enrichment_hpa_test.go +117 -0
  840. package/resource/runtime/resource_graph_enrichment_test.go +201 -0
  841. package/resource/runtime/resource_graph_metadata.go +125 -0
  842. package/resource/runtime/resource_graph_metadata_test.go +204 -0
  843. package/resource/runtime/resource_graph_network.go +224 -0
  844. package/resource/runtime/resource_graph_network_collect.go +174 -0
  845. package/resource/runtime/resource_graph_network_collect_test.go +147 -0
  846. package/resource/runtime/resource_graph_network_test.go +342 -0
  847. package/resource/runtime/resource_graph_rbac.go +278 -0
  848. package/resource/runtime/resource_graph_rbac_test.go +372 -0
  849. package/resource/runtime/resource_graph_rules.go +834 -0
  850. package/resource/runtime/resource_graph_storage.go +144 -0
  851. package/resource/runtime/resource_graph_storage_collect.go +163 -0
  852. package/resource/runtime/resource_graph_storage_test.go +397 -0
  853. package/resource/runtime/resource_graph_test.go +627 -0
  854. package/resource/runtime/resource_monitoring.go +1 -1
  855. package/resource/runtime/rollout_integration_test.go +1 -1
  856. package/resource/runtime/rollout_observation.go +1 -1
  857. package/resource/runtime/rollout_operation.go +1 -1
  858. package/resource/runtime/rollout_task.go +2 -2
  859. package/resource/runtime/rollout_test.go +1 -1
  860. package/resource/runtime/root_cr.go +2 -2
  861. package/resource/runtime/root_cr_test.go +1 -1
  862. package/resource/runtime/secret_certificate.go +44 -0
  863. package/resource/runtime/secret_certificate_test.go +87 -0
  864. package/resource/storage_graph.go +4 -0
  865. package/resource/terminal_options.go +38 -0
  866. package/resource/terminalstream/stream.go +481 -0
  867. package/resource/terminalstream/stream_test.go +277 -0
  868. package/runner/docker-container-identity.schema.json +37 -0
  869. package/runner/docker-project-identity.schema.json +39 -0
  870. package/runner/docker-runtime-read-result.schema.json +317 -0
  871. package/runner/docker-runtime-read.schema.json +85 -0
@@ -0,0 +1,793 @@
1
+ package proxytransport
2
+
3
+ import (
4
+ "bufio"
5
+ "bytes"
6
+ "context"
7
+ "crypto/tls"
8
+ "encoding/binary"
9
+ "errors"
10
+ "fmt"
11
+ "io"
12
+ "net"
13
+ "net/http"
14
+ "net/http/httptest"
15
+ "net/url"
16
+ "strings"
17
+ "sync"
18
+ "sync/atomic"
19
+ "testing"
20
+ "time"
21
+ )
22
+
23
+ const packetTestSecret = "0123456789abcdef0123456789abcdef"
24
+
25
+ func closePacketFixture(t *testing.T, closer io.Closer) {
26
+ t.Helper()
27
+ if err := closer.Close(); !packetFixtureAlreadyClosed(err) {
28
+ t.Errorf("fixture close failed: %v", err)
29
+ }
30
+ }
31
+
32
+ func packetFixtureAlreadyClosed(err error) bool {
33
+ if err == nil {
34
+ return true
35
+ }
36
+ switch wrapped := err.(type) {
37
+ case interface{ Unwrap() []error }:
38
+ children := wrapped.Unwrap()
39
+ if len(children) == 0 {
40
+ return false
41
+ }
42
+ for _, child := range children {
43
+ if !packetFixtureAlreadyClosed(child) {
44
+ return false
45
+ }
46
+ }
47
+ return true
48
+ case interface{ Unwrap() error }:
49
+ return packetFixtureAlreadyClosed(wrapped.Unwrap())
50
+ default:
51
+ return errors.Is(err, net.ErrClosed) || errors.Is(err, io.ErrClosedPipe)
52
+ }
53
+ }
54
+
55
+ func TestPacketFixtureCleanupKeepsUnexpectedErrors(t *testing.T) {
56
+ unexpected := errors.New("owned body cleanup failed")
57
+ for _, tc := range []struct {
58
+ err error
59
+ closed bool
60
+ }{
61
+ {nil, true}, {net.ErrClosed, true}, {fmt.Errorf("closed transport: %w", net.ErrClosed), true},
62
+ {errors.Join(net.ErrClosed, io.ErrClosedPipe), true}, {unexpected, false},
63
+ {errors.Join(net.ErrClosed, unexpected), false},
64
+ {fmt.Errorf("wrapped cleanup: %w", errors.Join(net.ErrClosed, unexpected)), false},
65
+ } {
66
+ if got := packetFixtureAlreadyClosed(tc.err); got != tc.closed {
67
+ t.Fatalf("cleanup error=%v, closed=%v, want=%v", tc.err, got, tc.closed)
68
+ }
69
+ }
70
+ }
71
+
72
+ func packetFixtureAs[T any](t *testing.T, value any) T {
73
+ t.Helper()
74
+ typed, ok := value.(T)
75
+ if !ok {
76
+ t.Fatalf("unexpected fixture type %T", value)
77
+ }
78
+ return typed
79
+ }
80
+
81
+ func packetFixturePort(t *testing.T, port int) []byte {
82
+ t.Helper()
83
+ if port < 0 || port > 65535 {
84
+ t.Fatalf("invalid fixture port %d", port)
85
+ return nil
86
+ }
87
+ return binary.BigEndian.AppendUint16(nil, uint16(port))
88
+ }
89
+
90
+ func packetTestLease() time.Time { return time.Now().Add(time.Minute) }
91
+ func packetEchoPair(t *testing.T) net.Conn {
92
+ t.Helper()
93
+ a, b := net.Pipe()
94
+ client, err := NewPacketConn(a, packetTestLease())
95
+ if err != nil {
96
+ t.Fatal(err)
97
+ }
98
+ server, err := NewPacketConn(b, packetTestLease())
99
+ if err != nil {
100
+ t.Fatal(err)
101
+ }
102
+ go func() {
103
+ defer closePacketFixture(t, server)
104
+ buffer := make([]byte, MaxDatagramBytes)
105
+ for {
106
+ n, err := server.Read(buffer)
107
+ if err != nil {
108
+ return
109
+ }
110
+ if _, err = server.Write(buffer[:n]); err != nil {
111
+ return
112
+ }
113
+ }
114
+ }()
115
+ return client
116
+ }
117
+ func packetRoundTrip(t *testing.T, c net.Conn, b []byte) {
118
+ t.Helper()
119
+ if n, err := c.Write(b); err != nil || n != len(b) {
120
+ t.Fatalf("write %d %v", n, err)
121
+ }
122
+ buffer := make([]byte, MaxDatagramBytes)
123
+ n, err := c.Read(buffer)
124
+ if err != nil || !bytes.Equal(buffer[:n], b) {
125
+ t.Fatalf("read %d %v", n, err)
126
+ }
127
+ }
128
+ func waitPacketCount(t *testing.T, count func() int, want int) {
129
+ t.Helper()
130
+ until := time.Now().Add(2 * time.Second)
131
+ for time.Now().Before(until) {
132
+ if count() == want {
133
+ return
134
+ }
135
+ time.Sleep(time.Millisecond)
136
+ }
137
+ t.Fatalf("active=%d want=%d", count(), want)
138
+ }
139
+
140
+ func TestPacketFramingAndExpiry(t *testing.T) {
141
+ c := packetEchoPair(t)
142
+ defer closePacketFixture(t, c)
143
+ packetRoundTrip(t, c, nil)
144
+ packetRoundTrip(t, c, []byte("one"))
145
+ packetRoundTrip(t, c, bytes.Repeat([]byte{'m'}, MaxDatagramBytes))
146
+ if _, err := c.Write(make([]byte, MaxDatagramBytes+1)); err == nil {
147
+ t.Fatal("oversized write accepted")
148
+ }
149
+ if err := packetFixtureAs[*PacketConn](t, c).Refresh(packetTestLease()); !errors.Is(err, net.ErrClosed) {
150
+ t.Fatalf("closed revived: %v", err)
151
+ }
152
+ for _, tc := range []struct {
153
+ name string
154
+ frame []byte
155
+ size int
156
+ }{{"oversize", []byte{255, 255}, MaxDatagramBytes}, {"truncated", []byte{0, 3, 'x'}, 5}, {"short buffer", []byte{0, 2, 'x', 'y'}, 1}} {
157
+ t.Run(tc.name, func(t *testing.T) {
158
+ a, b := net.Pipe()
159
+ p, err := NewPacketConn(a, packetTestLease())
160
+ if err != nil {
161
+ t.Fatal(err)
162
+ }
163
+ defer closePacketFixture(t, p)
164
+ go func() { _, _ = b.Write(tc.frame); _ = b.Close() }()
165
+ if _, err := p.Read(make([]byte, tc.size)); err == nil {
166
+ t.Fatal("invalid frame accepted")
167
+ }
168
+ })
169
+ }
170
+ a, b := net.Pipe()
171
+ defer closePacketFixture(t, b)
172
+ p, err := NewPacketConn(a, time.Now().Add(25*time.Millisecond))
173
+ if err != nil {
174
+ t.Fatal(err)
175
+ }
176
+ defer closePacketFixture(t, p)
177
+ time.Sleep(35 * time.Millisecond)
178
+ if p.Refresh(packetTestLease()) == nil {
179
+ t.Fatal("expired grant revived")
180
+ }
181
+ a2, b2 := net.Pipe()
182
+ defer closePacketFixture(t, b2)
183
+ idle, err := NewPacketConn(a2, packetTestLease())
184
+ if err != nil {
185
+ t.Fatal(err)
186
+ }
187
+ defer closePacketFixture(t, idle)
188
+ idle.mu.Lock()
189
+ idle.lastActivity = time.Now().Add(-PacketIdleTimeout - time.Second)
190
+ idle.mu.Unlock()
191
+ if idle.Refresh(packetTestLease()) == nil {
192
+ t.Fatal("idle association revived")
193
+ }
194
+ }
195
+
196
+ func TestPacketTLSHTTPOptInAuthenticationAndAuthorization(t *testing.T) {
197
+ var permitted atomic.Bool
198
+ permitted.Store(true)
199
+ var checks atomic.Int64
200
+ authorize := func(context.Context, string, string) error {
201
+ checks.Add(1)
202
+ if !permitted.Load() {
203
+ return errors.New("revoked")
204
+ }
205
+ return nil
206
+ }
207
+ h, err := NewPacketHandler(map[string]string{"mapped": packetTestSecret}, func(context.Context, string, string) (net.Conn, error) { return packetEchoPair(t), nil }, authorize, packetTestLease())
208
+ if err != nil {
209
+ t.Fatal(err)
210
+ }
211
+ defer closePacketFixture(t, h)
212
+ tcp, err := New(map[string]string{"mapped": packetTestSecret}, func(context.Context, string, string) (net.Conn, error) {
213
+ a, b := net.Pipe()
214
+ go func() { _, _ = io.Copy(b, b); _ = b.Close() }()
215
+ return a, nil
216
+ }, packetTestLease())
217
+ if err != nil {
218
+ t.Fatal(err)
219
+ }
220
+ defer closePacketFixture(t, tcp)
221
+ server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
222
+ if len(r.Header.Values(PacketTransportHeader)) != 0 {
223
+ h.ServeHTTP(w, r)
224
+ } else {
225
+ tcp.ServeHTTP(w, r)
226
+ }
227
+ }))
228
+ defer server.Close()
229
+ dial := func(secret string) (*PacketConn, error) {
230
+ cfg := packetFixtureAs[*http.Transport](t, server.Client().Transport).TLSClientConfig.Clone()
231
+ raw, err := tls.Dial("tcp", strings.TrimPrefix(server.URL, "https://"), cfg)
232
+ if err != nil {
233
+ t.Fatal(err)
234
+ }
235
+ return DialPacketTunnel(context.Background(), raw, "example.invalid:443", "mapped", secret, packetTestLease())
236
+ }
237
+ c, err := dial(packetTestSecret)
238
+ if err != nil {
239
+ t.Fatal(err)
240
+ }
241
+ defer closePacketFixture(t, c)
242
+ packetRoundTrip(t, c, []byte("tls datagram"))
243
+ packetRoundTrip(t, c, nil)
244
+ if checks.Load() < 5 {
245
+ t.Fatalf("per-direction checks missing: %d", checks.Load())
246
+ }
247
+ waitPacketCount(t, h.ActiveCount, 1)
248
+ if _, err := dial(strings.Repeat("q", 32)); err == nil {
249
+ t.Fatal("wrong HTTP secret accepted")
250
+ }
251
+ h.NoNew()
252
+ if _, err := dial(packetTestSecret); err == nil {
253
+ t.Fatal("NoNew accepted new association")
254
+ }
255
+ packetRoundTrip(t, c, []byte("retained"))
256
+ // No UDP header still uses the unchanged stream CONNECT behavior.
257
+ cfg := packetFixtureAs[*http.Transport](t, server.Client().Transport).TLSClientConfig.Clone()
258
+ raw, err := tls.Dial("tcp", strings.TrimPrefix(server.URL, "https://"), cfg)
259
+ if err != nil {
260
+ t.Fatal(err)
261
+ }
262
+ defer closePacketFixture(t, raw)
263
+ _ = raw.SetDeadline(time.Now().Add(time.Second))
264
+ req := httptest.NewRequest(http.MethodConnect, "http://example.invalid:443", nil)
265
+ req.URL = &url.URL{Opaque: "example.invalid:443"}
266
+ req.Host = "example.invalid:443"
267
+ req.Header = make(http.Header)
268
+ req.SetBasicAuth("mapped", packetTestSecret)
269
+ req.Header.Set("Proxy-Authorization", req.Header.Get("Authorization"))
270
+ req.Header.Del("Authorization")
271
+ if req.Write(raw) != nil {
272
+ t.Fatal("TCP request failed")
273
+ }
274
+ reader := bufio.NewReader(raw)
275
+ response, err := http.ReadResponse(reader, req)
276
+ if response != nil {
277
+ defer func() {
278
+ closePacketFixture(t, raw)
279
+ if err := response.Body.Close(); err != nil {
280
+ t.Errorf("TCP response body close: %v", err)
281
+ }
282
+ }()
283
+ }
284
+ if err != nil || response.StatusCode != 200 {
285
+ t.Fatalf("TCP compatibility %v", err)
286
+ }
287
+ if _, err := raw.Write([]byte("tcp")); err != nil {
288
+ t.Fatal(err)
289
+ }
290
+ b := make([]byte, 3)
291
+ if _, err := io.ReadFull(reader, b); err != nil || string(b) != "tcp" {
292
+ t.Fatalf("TCP data %s %v", b, err)
293
+ }
294
+ permitted.Store(false)
295
+ _, _ = c.Write([]byte("revoked"))
296
+ if _, err := c.Read(make([]byte, 100)); err == nil {
297
+ t.Fatal("revoked packet delivered")
298
+ }
299
+ waitPacketCount(t, h.ActiveCount, 0)
300
+ }
301
+ func TestPacketHandlerRejectsMalformedOptIn(t *testing.T) {
302
+ h, err := NewPacketHandler(map[string]string{"u": packetTestSecret}, func(context.Context, string, string) (net.Conn, error) { t.Error("malformed dialled"); return nil, nil }, func(context.Context, string, string) error { return nil }, packetTestLease())
303
+ if err != nil {
304
+ t.Fatal(err)
305
+ }
306
+ defer closePacketFixture(t, h)
307
+ for _, values := range [][]string{nil, {"udp/2"}, {"udp/1", "udp/1"}, {"udp/1, udp/1"}} {
308
+ r := httptest.NewRequest("CONNECT", "http://example.invalid:443", nil)
309
+ r.URL = &url.URL{Host: "example.invalid:443"}
310
+ r.Host = "example.invalid:443"
311
+ r.TLS = &tls.ConnectionState{}
312
+ r.Header[PacketTransportHeader] = values
313
+ w := httptest.NewRecorder()
314
+ h.ServeHTTP(w, r)
315
+ if w.Code != http.StatusBadRequest {
316
+ t.Fatalf("header %v status=%d", values, w.Code)
317
+ }
318
+ }
319
+ }
320
+
321
+ func realPacketEcho(t *testing.T) *net.UDPAddr {
322
+ t.Helper()
323
+ socket, err := net.ListenUDP("udp4", &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1)})
324
+ if err != nil {
325
+ t.Fatal(err)
326
+ }
327
+ t.Cleanup(func() { _ = socket.Close() })
328
+ go func() {
329
+ b := make([]byte, 65536)
330
+ for {
331
+ n, from, err := socket.ReadFromUDP(b)
332
+ if err != nil {
333
+ return
334
+ }
335
+ _, _ = socket.WriteToUDP(b[:n], from)
336
+ }
337
+ }()
338
+ return packetFixtureAs[*net.UDPAddr](t, socket.LocalAddr())
339
+ }
340
+ func openGateUDP(t *testing.T, address, user string) (net.Conn, *net.UDPConn) {
341
+ t.Helper()
342
+ control, err := net.Dial("tcp", address)
343
+ if err != nil {
344
+ t.Fatal(err)
345
+ }
346
+ _ = control.SetDeadline(time.Now().Add(time.Second))
347
+ if err := socksClientAuth(control, user, packetTestSecret); err != nil {
348
+ t.Fatal(err)
349
+ }
350
+ if writePacketAll(control, []byte{5, 3, 0, 1, 0, 0, 0, 0, 0, 0}) != nil {
351
+ t.Fatal("associate request")
352
+ }
353
+ var h [3]byte
354
+ if _, err := io.ReadFull(control, h[:]); err != nil || h != [3]byte{5, 0, 0} {
355
+ t.Fatalf("associate reply %v %v", h, err)
356
+ }
357
+ relay, err := readSOCKSAddress(control)
358
+ if err != nil {
359
+ t.Fatal(err)
360
+ }
361
+ addr, err := net.ResolveUDPAddr("udp", relay)
362
+ if err != nil {
363
+ t.Fatal(err)
364
+ }
365
+ udp, err := net.DialUDP("udp", nil, addr)
366
+ if err != nil {
367
+ t.Fatal(err)
368
+ }
369
+ return control, udp
370
+ }
371
+ func gateRoundTrip(t *testing.T, c *net.UDPConn, target string, payload []byte) {
372
+ t.Helper()
373
+ _ = c.SetDeadline(time.Now().Add(time.Second))
374
+ b, err := encodeSOCKSDatagram(target, payload)
375
+ if err != nil {
376
+ t.Fatal(err)
377
+ }
378
+ if _, err := c.Write(b); err != nil {
379
+ t.Fatal(err)
380
+ }
381
+ buffer := make([]byte, 65536)
382
+ n, err := c.Read(buffer)
383
+ if err != nil {
384
+ t.Fatal(err)
385
+ }
386
+ got, data, err := decodeSOCKSDatagram(buffer[:n])
387
+ if err != nil || got != target || !bytes.Equal(data, payload) {
388
+ t.Fatalf("SOCKS response %s %v", got, err)
389
+ }
390
+ }
391
+ func TestSOCKS5GateMultiTargetSourceFragmentDrainAndRevoke(t *testing.T) {
392
+ a, b, c := realPacketEcho(t), realPacketEcho(t), realPacketEcho(t)
393
+ var mu sync.Mutex
394
+ connections := map[string]net.Conn{}
395
+ var revoked atomic.Bool
396
+ authorize := func(_ context.Context, _ string, target string) error {
397
+ if revoked.Load() && target == a.String() {
398
+ return errors.New("revoked")
399
+ }
400
+ return nil
401
+ }
402
+ gate, err := NewSOCKS5Gate(map[string]string{"local-node": packetTestSecret}, func(context.Context, string, string) (net.Conn, error) {
403
+ left, right := net.Pipe()
404
+ go func() { _, _ = io.Copy(right, right); _ = right.Close() }()
405
+ return left, nil
406
+ }, func(_ context.Context, _ string, target string) (net.Conn, error) {
407
+ addr, err := net.ResolveUDPAddr("udp", target)
408
+ if err != nil {
409
+ return nil, err
410
+ }
411
+ socket, err := net.DialUDP("udp", nil, addr)
412
+ if err != nil {
413
+ return nil, err
414
+ }
415
+ packet, err := newMessageConn(socket, packetTestLease(), socket.Read, socket.Write)
416
+ if err == nil {
417
+ mu.Lock()
418
+ connections[target] = packet
419
+ mu.Unlock()
420
+ }
421
+ return packet, err
422
+ }, authorize, packetTestLease())
423
+ if err != nil {
424
+ t.Fatal(err)
425
+ }
426
+ listener, err := net.Listen("tcp4", "127.0.0.1:0")
427
+ if err != nil {
428
+ t.Fatal(err)
429
+ }
430
+ defer closePacketFixture(t, gate)
431
+ go func() { _ = gate.Serve(listener) }()
432
+ control, udp := openGateUDP(t, listener.Addr().String(), "local-node")
433
+ defer closePacketFixture(t, control)
434
+ defer closePacketFixture(t, udp)
435
+ gateRoundTrip(t, udp, a.String(), []byte("A"))
436
+ gateRoundTrip(t, udp, b.String(), nil)
437
+ waitPacketCount(t, gate.ActiveCount, 2)
438
+ // Wrong source port and RFC fragmentation never reach a new destination.
439
+ other, err := net.DialUDP("udp", nil, packetFixtureAs[*net.UDPAddr](t, udp.RemoteAddr()))
440
+ if err != nil {
441
+ t.Fatal(err)
442
+ }
443
+ defer closePacketFixture(t, other)
444
+ frame, _ := encodeSOCKSDatagram(c.String(), []byte("bad"))
445
+ _, _ = other.Write(frame)
446
+ frame[2] = 1
447
+ _, _ = udp.Write(frame)
448
+ time.Sleep(20 * time.Millisecond)
449
+ if gate.ActiveCount() != 2 {
450
+ t.Fatal("fragment/source created association")
451
+ }
452
+ gate.NoNew()
453
+ gateRoundTrip(t, udp, b.String(), []byte("B retained"))
454
+ frame, _ = encodeSOCKSDatagram(c.String(), []byte("new denied"))
455
+ _, _ = udp.Write(frame)
456
+ time.Sleep(20 * time.Millisecond)
457
+ if gate.ActiveCount() != 2 {
458
+ t.Fatal("NoNew added destination")
459
+ }
460
+ revoked.Store(true)
461
+ mu.Lock()
462
+ oldA := connections[a.String()]
463
+ mu.Unlock()
464
+ _ = oldA.Close()
465
+ waitPacketCount(t, gate.ActiveCount, 1)
466
+ gateRoundTrip(t, udp, b.String(), []byte("B after A close"))
467
+ if err := gate.Close(); err != nil {
468
+ t.Fatal(err)
469
+ }
470
+ waitPacketCount(t, gate.ActiveCount, 0)
471
+ if gate.Refresh(packetTestLease()) == nil {
472
+ t.Fatal("closed gate revived")
473
+ }
474
+ }
475
+
476
+ // A small independent SOCKS UDP backend forwards to a real UDP echo socket.
477
+ func fakeOwnedSOCKSUDP(t *testing.T, target *net.UDPAddr, mutate bool) (string, <-chan struct{}) {
478
+ t.Helper()
479
+ listener, err := net.Listen("tcp4", "127.0.0.1:0")
480
+ if err != nil {
481
+ t.Fatal(err)
482
+ }
483
+ done := make(chan struct{})
484
+ t.Cleanup(func() { _ = listener.Close() })
485
+ go func() {
486
+ defer close(done)
487
+ control, err := listener.Accept()
488
+ if err != nil {
489
+ return
490
+ }
491
+ defer closePacketFixture(t, control)
492
+ _ = control.SetDeadline(time.Now().Add(3 * time.Second))
493
+ var greeting [3]byte
494
+ if _, err := io.ReadFull(control, greeting[:]); err != nil || greeting != [3]byte{5, 1, 2} {
495
+ return
496
+ }
497
+ _, _ = control.Write([]byte{5, 2})
498
+ var auth [2]byte
499
+ if _, err := io.ReadFull(control, auth[:]); err != nil {
500
+ return
501
+ }
502
+ user := make([]byte, int(auth[1]))
503
+ if _, err := io.ReadFull(control, user); err != nil {
504
+ return
505
+ }
506
+ var plen [1]byte
507
+ if _, err := io.ReadFull(control, plen[:]); err != nil {
508
+ return
509
+ }
510
+ password := make([]byte, int(plen[0]))
511
+ if _, err := io.ReadFull(control, password); err != nil {
512
+ return
513
+ }
514
+ if string(user) != "backend" || string(password) != packetTestSecret {
515
+ _, _ = control.Write([]byte{1, 1})
516
+ return
517
+ }
518
+ _, _ = control.Write([]byte{1, 0})
519
+ var request [10]byte
520
+ if _, err := io.ReadFull(control, request[:]); err != nil || request != [10]byte{5, 3, 0, 1, 0, 0, 0, 0, 0, 0} {
521
+ return
522
+ }
523
+ relay, err := net.ListenUDP("udp4", &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1)})
524
+ if err != nil {
525
+ return
526
+ }
527
+ defer closePacketFixture(t, relay)
528
+ port := packetFixtureAs[*net.UDPAddr](t, relay.LocalAddr()).Port
529
+ _, _ = control.Write(append([]byte{5, 0, 0, 1, 127, 0, 0, 1}, packetFixturePort(t, port)...))
530
+ upstream, err := net.DialUDP("udp4", nil, target)
531
+ if err != nil {
532
+ return
533
+ }
534
+ defer closePacketFixture(t, upstream)
535
+ go func() { _, _ = io.Copy(io.Discard, control); _ = relay.Close() }()
536
+ b := make([]byte, 65536)
537
+ for {
538
+ n, from, err := relay.ReadFromUDP(b)
539
+ if err != nil {
540
+ return
541
+ }
542
+ if n < 10 || b[0] != 0 || b[1] != 0 || b[2] != 0 || b[3] != 1 || !net.IP(b[4:8]).Equal(target.IP) || int(binary.BigEndian.Uint16(b[8:10])) != target.Port {
543
+ return
544
+ }
545
+ header := append([]byte(nil), b[:10]...)
546
+ _, _ = upstream.Write(b[10:n])
547
+ _ = upstream.SetReadDeadline(time.Now().Add(time.Second))
548
+ n, err = upstream.Read(b[10:])
549
+ if err != nil {
550
+ return
551
+ }
552
+ if mutate {
553
+ header[9] ^= 1
554
+ }
555
+ copy(b[:10], header)
556
+ _, _ = relay.WriteToUDP(b[:10+n], from)
557
+ }
558
+ }()
559
+ return listener.Addr().String(), done
560
+ }
561
+ func TestDialSOCKS5UDPRealEchoAndPinnedReply(t *testing.T) {
562
+ target := realPacketEcho(t)
563
+ for _, mutate := range []bool{false, true} {
564
+ address, done := fakeOwnedSOCKSUDP(t, target, mutate)
565
+ conn, err := DialSOCKS5UDP(context.Background(), address, "backend", packetTestSecret, target.String(), packetTestLease())
566
+ if err != nil {
567
+ t.Fatal(err)
568
+ }
569
+ if mutate {
570
+ _, _ = conn.Write([]byte("wrong target"))
571
+ if _, err := conn.Read(make([]byte, 100)); err == nil {
572
+ t.Fatal("cross-destination reply accepted")
573
+ }
574
+ } else {
575
+ packetRoundTrip(t, conn, []byte("real UDP"))
576
+ packetRoundTrip(t, conn, nil)
577
+ if _, err := conn.Write(make([]byte, MaxDatagramBytes)); err == nil {
578
+ t.Fatal("SOCKS header budget ignored")
579
+ }
580
+ }
581
+ _ = conn.Close()
582
+ select {
583
+ case <-done:
584
+ case <-time.After(time.Second):
585
+ t.Fatal("SOCKS control/UDP leaked")
586
+ }
587
+ }
588
+ if _, err := DialSOCKS5UDP(context.Background(), "192.0.2.1:1080", "backend", packetTestSecret, target.String(), packetTestLease()); err == nil {
589
+ t.Fatal("nonloopback backend accepted")
590
+ }
591
+ }
592
+ func TestSOCKSDatagramBounds(t *testing.T) {
593
+ for _, target := range []string{"127.0.0.1:53", "[::1]:53", strings.Repeat("a", 253) + ":53"} {
594
+ address, err := encodeSOCKSAddress(target, false)
595
+ if err != nil {
596
+ t.Fatal(err)
597
+ }
598
+ limit := MaxDatagramBytes - 3 - len(address)
599
+ if _, err := encodeSOCKSDatagram(target, make([]byte, limit)); err != nil {
600
+ t.Fatal(err)
601
+ }
602
+ if _, err := encodeSOCKSDatagram(target, make([]byte, limit+1)); err == nil {
603
+ t.Fatal("header overflow accepted")
604
+ }
605
+ }
606
+ }
607
+
608
+ func TestSOCKS5GateTCPAuthenticationAndExpiredRenewal(t *testing.T) {
609
+ gate, err := NewSOCKS5Gate(map[string]string{"local": packetTestSecret}, func(context.Context, string, string) (net.Conn, error) {
610
+ a, b := net.Pipe()
611
+ go func() { _, _ = io.Copy(b, b); _ = b.Close() }()
612
+ return a, nil
613
+ }, func(context.Context, string, string) (net.Conn, error) { return nil, errors.New("unused") }, func(context.Context, string, string) error { return nil }, packetTestLease())
614
+ if err != nil {
615
+ t.Fatal(err)
616
+ }
617
+ listener, err := net.Listen("tcp4", "127.0.0.1:0")
618
+ if err != nil {
619
+ t.Fatal(err)
620
+ }
621
+ defer closePacketFixture(t, gate)
622
+ go func() { _ = gate.Serve(listener) }()
623
+ bad, err := net.Dial("tcp", listener.Addr().String())
624
+ if err != nil {
625
+ t.Fatal(err)
626
+ }
627
+ _ = bad.SetDeadline(time.Now().Add(time.Second))
628
+ if socksClientAuth(bad, "local", strings.Repeat("x", 32)) == nil {
629
+ t.Fatal("bad SOCKS password accepted")
630
+ }
631
+ _ = bad.Close()
632
+ conn, err := net.Dial("tcp", listener.Addr().String())
633
+ if err != nil {
634
+ t.Fatal(err)
635
+ }
636
+ defer closePacketFixture(t, conn)
637
+ _ = conn.SetDeadline(time.Now().Add(time.Second))
638
+ if socksClientAuth(conn, "local", packetTestSecret) != nil {
639
+ t.Fatal("SOCKS auth failed")
640
+ }
641
+ address, _ := encodeSOCKSAddress("example.invalid:443", false)
642
+ if writePacketAll(conn, append([]byte{5, 1, 0}, address...)) != nil {
643
+ t.Fatal("TCP connect failed")
644
+ }
645
+ var reply [3]byte
646
+ if _, err := io.ReadFull(conn, reply[:]); err != nil || reply != [3]byte{5, 0, 0} {
647
+ t.Fatalf("TCP reply %v %v", reply, err)
648
+ }
649
+ if _, err := readSOCKSAddress(conn); err != nil {
650
+ t.Fatal(err)
651
+ }
652
+ if _, err := conn.Write([]byte("TCP")); err != nil {
653
+ t.Fatal(err)
654
+ }
655
+ result := make([]byte, 3)
656
+ if _, err := io.ReadFull(conn, result); err != nil || string(result) != "TCP" {
657
+ t.Fatalf("TCP echo %s %v", result, err)
658
+ }
659
+ gate.mu.Lock()
660
+ gate.until = time.Now().Add(-time.Second)
661
+ gate.mu.Unlock()
662
+ if gate.Refresh(packetTestLease()) == nil {
663
+ t.Fatal("expired SOCKS lease revived")
664
+ }
665
+ handler, err := NewPacketHandler(map[string]string{"u": packetTestSecret}, func(context.Context, string, string) (net.Conn, error) { return nil, nil }, func(context.Context, string, string) error { return nil }, packetTestLease())
666
+ if err != nil {
667
+ t.Fatal(err)
668
+ }
669
+ defer closePacketFixture(t, handler)
670
+ handler.mu.Lock()
671
+ handler.until = time.Now().Add(-time.Second)
672
+ handler.mu.Unlock()
673
+ if handler.Refresh(packetTestLease()) == nil {
674
+ t.Fatal("expired HTTP UDP lease revived")
675
+ }
676
+ }
677
+
678
+ func TestPacketUnsupportedStaticMappingAndUnsafeHeader(t *testing.T) {
679
+ handler, err := NewPacketHandler(map[string]string{"u": packetTestSecret}, func(context.Context, string, string) (net.Conn, error) {
680
+ return nil, fmt.Errorf("backend: %w", ErrPacketUnsupported)
681
+ }, func(context.Context, string, string) error { return nil }, packetTestLease())
682
+ if err != nil {
683
+ t.Fatal(err)
684
+ }
685
+ defer closePacketFixture(t, handler)
686
+ cases := []struct {
687
+ name string
688
+ serve http.Handler
689
+ unsupported bool
690
+ }{{"known unsupported", handler, true}}
691
+ for _, protocol := range []string{PacketTransportVersion, "udp/2", ""} {
692
+ version := protocol
693
+ release := make(chan struct{})
694
+ serve := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
695
+ if version != "" {
696
+ w.Header().Set(PacketTransportHeader, version)
697
+ }
698
+ w.Header().Set("Content-Length", "1000000")
699
+ w.WriteHeader(http.StatusNotImplemented)
700
+ packetFixtureAs[http.Flusher](t, w).Flush()
701
+ <-release
702
+ })
703
+ t.Run("bodyless "+version, func(t *testing.T) {
704
+ server := httptest.NewTLSServer(serve)
705
+ defer server.Close()
706
+ defer close(release)
707
+ cfg := packetFixtureAs[*http.Transport](t, server.Client().Transport).TLSClientConfig.Clone()
708
+ raw, e := tls.Dial("tcp", strings.TrimPrefix(server.URL, "https://"), cfg)
709
+ if e != nil {
710
+ t.Fatal(e)
711
+ }
712
+ started := time.Now()
713
+ _, e = DialPacketTunnel(context.Background(), raw, "example.invalid:443", "u", packetTestSecret, packetTestLease())
714
+ if errors.Is(e, ErrPacketUnsupported) != (version == PacketTransportVersion) {
715
+ t.Fatalf("protocol %q: %v", version, e)
716
+ }
717
+ if time.Since(started) > time.Second {
718
+ t.Fatal("client attempted to consume unsupported response body")
719
+ }
720
+ })
721
+ }
722
+ for _, tc := range cases {
723
+ t.Run(tc.name, func(t *testing.T) {
724
+ server := httptest.NewTLSServer(tc.serve)
725
+ defer server.Close()
726
+ cfg := packetFixtureAs[*http.Transport](t, server.Client().Transport).TLSClientConfig.Clone()
727
+ raw, e := tls.Dial("tcp", strings.TrimPrefix(server.URL, "https://"), cfg)
728
+ if e != nil {
729
+ t.Fatal(e)
730
+ }
731
+ _, e = DialPacketTunnel(context.Background(), raw, "example.invalid:443", "u", packetTestSecret, packetTestLease())
732
+ if errors.Is(e, ErrPacketUnsupported) != tc.unsupported {
733
+ t.Fatalf("unsupported mapping: %v", e)
734
+ }
735
+ })
736
+ }
737
+ }
738
+
739
+ type packetBodyFixture struct {
740
+ io.Reader
741
+ close func() error
742
+ }
743
+
744
+ func (body *packetBodyFixture) Close() error { return body.close() }
745
+
746
+ type packetConnectionFixture struct {
747
+ net.Conn
748
+ close func() error
749
+ }
750
+
751
+ func (connection *packetConnectionFixture) Close() error { return connection.close() }
752
+
753
+ func TestPacketTunnelResponseBodyOwnership(t *testing.T) {
754
+ bodyFailure := errors.New("response body close failed")
755
+ for _, want := range []error{nil, bodyFailure} {
756
+ t.Run(fmt.Sprint(want), func(t *testing.T) {
757
+ client, peer := net.Pipe()
758
+ defer closePacketFixture(t, peer)
759
+ order := []string{}
760
+ connection := &packetConnectionFixture{Conn: client, close: func() error {
761
+ order = append(order, "transport")
762
+ return client.Close()
763
+ }}
764
+ body := &packetBodyFixture{Reader: strings.NewReader(""), close: func() error {
765
+ order = append(order, "body")
766
+ return want
767
+ }}
768
+ stream := &bufferedPacketStream{Conn: connection, reader: bufio.NewReader(connection), responseBody: body}
769
+ packet, err := NewPacketConn(stream, packetTestLease())
770
+ if err != nil {
771
+ t.Fatal(err)
772
+ }
773
+ defer func() { _ = packet.Close() }()
774
+ written := make(chan error, 1)
775
+ go func() { _, err := peer.Write([]byte{0, 3, 'u', 'd', 'p'}); written <- err }()
776
+ payload := make([]byte, 3)
777
+ if n, err := packet.Read(payload); err != nil || n != 3 || string(payload) != "udp" || len(order) != 0 {
778
+ t.Fatalf("tunnel closed before ownership ended: n=%d err=%v order=%v", n, err, order)
779
+ }
780
+ if err := <-written; err != nil {
781
+ t.Fatal(err)
782
+ }
783
+ for range 2 {
784
+ if err := packet.Close(); !errors.Is(err, want) {
785
+ t.Fatalf("close error=%v, want=%v", err, want)
786
+ }
787
+ }
788
+ if len(order) != 2 || order[0] != "transport" || order[1] != "body" {
789
+ t.Fatalf("owned close order/count=%v", order)
790
+ }
791
+ })
792
+ }
793
+ }