openrod 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (898) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +8 -0
  3. package/README.md +58 -2
  4. package/SETUPS.md +75 -0
  5. package/THIRD_PARTY_NOTICES.md +15823 -0
  6. package/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  7. package/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  8. package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  9. package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  10. package/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  11. package/dist/assets/index-CEZ0R3YS.js +522 -0
  12. package/dist/assets/index-DYjVZRjW.css +1 -0
  13. package/dist/assets/index.esm-BVqeoYDn.js +376 -0
  14. package/dist/assets/index.esm-CXAOoF3i.js +16 -0
  15. package/dist/assets/index.esm-D0s8MSqt.js +1666 -0
  16. package/dist/assets/pixelify-sans-cyrillic-wght-normal-BfQLqnEI.woff2 +0 -0
  17. package/dist/assets/pixelify-sans-latin-ext-wght-normal-CsF3XSp0.woff2 +0 -0
  18. package/dist/assets/pixelify-sans-latin-wght-normal-Cbhn5ptY.woff2 +0 -0
  19. package/dist/assets/terminal-view-6GBZ9nXN.css +32 -0
  20. package/dist/assets/terminal-view-CkPFNoXi.js +40 -0
  21. package/dist/favicon.png +0 -0
  22. package/dist/index.html +16 -0
  23. package/dist/logos/SOURCES.md +133 -0
  24. package/dist/logos/agents/aider.svg +1 -0
  25. package/dist/logos/agents/antigravity.svg +1 -0
  26. package/dist/logos/agents/claudecode.svg +1 -0
  27. package/dist/logos/agents/codex.svg +1 -0
  28. package/dist/logos/agents/copilot.svg +1 -0
  29. package/dist/logos/agents/cursor.svg +1 -0
  30. package/dist/logos/agents/factory.svg +1 -0
  31. package/dist/logos/agents/gemini.svg +1 -0
  32. package/dist/logos/agents/kiro.svg +1 -0
  33. package/dist/logos/agents/openclaw-color.svg +1 -0
  34. package/dist/logos/agents/opencode.svg +1 -0
  35. package/dist/logos/agents/pi.svg +1 -0
  36. package/dist/logos/anthropic.svg +1 -0
  37. package/dist/logos/aws-bedrock.svg +1 -0
  38. package/dist/logos/aws-s3.svg +1 -0
  39. package/dist/logos/aws.svg +1 -0
  40. package/dist/logos/claude-code.svg +1 -0
  41. package/dist/logos/codex.svg +1 -0
  42. package/dist/logos/copilot.svg +1 -0
  43. package/dist/logos/cursor.svg +1 -0
  44. package/dist/logos/deepinfra.svg +1 -0
  45. package/dist/logos/github.svg +1 -0
  46. package/dist/logos/google-cloud.svg +1 -0
  47. package/dist/logos/google-vertex-ai.svg +1 -0
  48. package/dist/logos/nvidia.svg +1 -0
  49. package/dist/logos/openai.svg +1 -0
  50. package/dist/logos/openrouter.svg +1 -0
  51. package/dist/logos/pypi.svg +1 -0
  52. package/dist/logos/templates/debian.svg +1 -0
  53. package/dist/logos/templates/nodejs.svg +1 -0
  54. package/dist/logos/templates/python.svg +1 -0
  55. package/dist/logos/templates/ubuntu.svg +1 -0
  56. package/dist/logos/vscode.svg +1 -0
  57. package/dist/openrod.png +0 -0
  58. package/node_modules/@bufbuild/protobuf/README.md +41 -0
  59. package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.d.ts +6 -0
  60. package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
  61. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.d.ts +1 -0
  62. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
  63. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.d.ts +10 -0
  64. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
  65. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.d.ts +9 -0
  66. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
  67. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.d.ts +1 -0
  68. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
  69. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.d.ts +10 -0
  70. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
  71. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.d.ts +10 -0
  72. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
  73. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.d.ts +8 -0
  74. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
  75. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.d.ts +140 -0
  76. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
  77. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.d.ts +79 -0
  78. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
  79. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.d.ts +63 -0
  80. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
  81. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.d.ts +43 -0
  82. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
  83. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.d.ts +29 -0
  84. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
  85. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.d.ts +9 -0
  86. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
  87. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.d.ts +7 -0
  88. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
  89. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.d.ts +10 -0
  90. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
  91. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.d.ts +15 -0
  92. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
  93. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.d.ts +5 -0
  94. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
  95. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.d.ts +9 -0
  96. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
  97. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.d.ts +8 -0
  98. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
  99. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.d.ts +145 -0
  100. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
  101. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.d.ts +85 -0
  102. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
  103. package/node_modules/@bufbuild/protobuf/dist/commonjs/create.d.ts +9 -0
  104. package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +296 -0
  105. package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.d.ts +634 -0
  106. package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
  107. package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.d.ts +46 -0
  108. package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
  109. package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.d.ts +60 -0
  110. package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
  111. package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.d.ts +23 -0
  112. package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
  113. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.d.ts +48 -0
  114. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +415 -0
  115. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.d.ts +73 -0
  116. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +1037 -0
  117. package/node_modules/@bufbuild/protobuf/dist/commonjs/index.d.ts +19 -0
  118. package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
  119. package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.d.ts +7 -0
  120. package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
  121. package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.d.ts +16 -0
  122. package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -0
  123. package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.d.ts +13 -0
  124. package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +70 -0
  125. package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +4 -0
  126. package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.d.ts +98 -0
  127. package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +131 -0
  128. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.d.ts +9 -0
  129. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
  130. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.d.ts +20 -0
  131. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
  132. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.d.ts +8 -0
  133. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
  134. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.d.ts +49 -0
  135. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +157 -0
  136. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.d.ts +30 -0
  137. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
  138. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.d.ts +35 -0
  139. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
  140. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.d.ts +107 -0
  141. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
  142. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.d.ts +45 -0
  143. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +292 -0
  144. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.d.ts +217 -0
  145. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
  146. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.d.ts +43 -0
  147. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +469 -0
  148. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.d.ts +43 -0
  149. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
  150. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.d.ts +39 -0
  151. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
  152. package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.d.ts +98 -0
  153. package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +954 -0
  154. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.d.ts +28 -0
  155. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +437 -0
  156. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.d.ts +67 -0
  157. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +625 -0
  158. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.d.ts +35 -0
  159. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
  160. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.d.ts +4 -0
  161. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
  162. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.d.ts +19 -0
  163. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
  164. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.d.ts +91 -0
  165. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
  166. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.d.ts +34 -0
  167. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
  168. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.d.ts +76 -0
  169. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
  170. package/node_modules/@bufbuild/protobuf/dist/commonjs/types.d.ts +135 -0
  171. package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
  172. package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.d.ts +10 -0
  173. package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
  174. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.d.ts +25 -0
  175. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +188 -0
  176. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.d.ts +286 -0
  177. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +726 -0
  178. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.d.ts +5 -0
  179. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +37 -0
  180. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.d.ts +69 -0
  181. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
  182. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.d.ts +53 -0
  183. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +106 -0
  184. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.d.ts +13 -0
  185. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
  186. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.d.ts +70 -0
  187. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +334 -0
  188. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.d.ts +38 -0
  189. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -0
  190. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.d.ts +9 -0
  191. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +39 -0
  192. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
  193. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +27 -0
  194. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
  195. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +39 -0
  196. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
  197. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +68 -0
  198. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
  199. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
  200. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
  201. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +892 -0
  202. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
  203. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +27 -0
  204. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
  205. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +27 -0
  206. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
  207. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +27 -0
  208. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
  209. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +126 -0
  210. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
  211. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +106 -0
  212. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
  213. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +27 -0
  214. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
  215. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +59 -0
  216. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
  217. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +27 -0
  218. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
  219. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +242 -0
  220. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
  221. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +67 -0
  222. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.d.ts +19 -0
  223. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
  224. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.d.ts +28 -0
  225. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +44 -0
  226. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.d.ts +21 -0
  227. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
  228. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.d.ts +25 -0
  229. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
  230. package/node_modules/@bufbuild/protobuf/dist/esm/clone.d.ts +6 -0
  231. package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
  232. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.d.ts +1 -0
  233. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
  234. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.d.ts +10 -0
  235. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
  236. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.d.ts +9 -0
  237. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
  238. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.d.ts +1 -0
  239. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
  240. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.d.ts +10 -0
  241. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
  242. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.d.ts +10 -0
  243. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
  244. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.d.ts +8 -0
  245. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
  246. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.d.ts +140 -0
  247. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
  248. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.d.ts +79 -0
  249. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
  250. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.d.ts +63 -0
  251. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
  252. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.d.ts +43 -0
  253. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
  254. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.d.ts +29 -0
  255. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
  256. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.d.ts +9 -0
  257. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
  258. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.d.ts +7 -0
  259. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
  260. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.d.ts +10 -0
  261. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
  262. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.d.ts +15 -0
  263. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
  264. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.d.ts +5 -0
  265. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
  266. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.d.ts +9 -0
  267. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
  268. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.d.ts +8 -0
  269. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
  270. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.d.ts +145 -0
  271. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
  272. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.d.ts +85 -0
  273. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
  274. package/node_modules/@bufbuild/protobuf/dist/esm/create.d.ts +9 -0
  275. package/node_modules/@bufbuild/protobuf/dist/esm/create.js +293 -0
  276. package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.d.ts +634 -0
  277. package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
  278. package/node_modules/@bufbuild/protobuf/dist/esm/equals.d.ts +46 -0
  279. package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
  280. package/node_modules/@bufbuild/protobuf/dist/esm/extensions.d.ts +60 -0
  281. package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
  282. package/node_modules/@bufbuild/protobuf/dist/esm/fields.d.ts +23 -0
  283. package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
  284. package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.d.ts +48 -0
  285. package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +409 -0
  286. package/node_modules/@bufbuild/protobuf/dist/esm/from-json.d.ts +73 -0
  287. package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +1029 -0
  288. package/node_modules/@bufbuild/protobuf/dist/esm/index.d.ts +19 -0
  289. package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
  290. package/node_modules/@bufbuild/protobuf/dist/esm/is-message.d.ts +7 -0
  291. package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
  292. package/node_modules/@bufbuild/protobuf/dist/esm/json-value.d.ts +16 -0
  293. package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -0
  294. package/node_modules/@bufbuild/protobuf/dist/esm/merge.d.ts +13 -0
  295. package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +67 -0
  296. package/node_modules/@bufbuild/protobuf/dist/esm/package.json +4 -0
  297. package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.d.ts +98 -0
  298. package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +128 -0
  299. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.d.ts +9 -0
  300. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
  301. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.d.ts +20 -0
  302. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
  303. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.d.ts +8 -0
  304. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
  305. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.d.ts +49 -0
  306. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +152 -0
  307. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.d.ts +30 -0
  308. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
  309. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.d.ts +35 -0
  310. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
  311. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.d.ts +107 -0
  312. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
  313. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.d.ts +45 -0
  314. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +284 -0
  315. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.d.ts +217 -0
  316. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
  317. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.d.ts +43 -0
  318. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +464 -0
  319. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.d.ts +43 -0
  320. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
  321. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.d.ts +39 -0
  322. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
  323. package/node_modules/@bufbuild/protobuf/dist/esm/registry.d.ts +98 -0
  324. package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +948 -0
  325. package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.d.ts +28 -0
  326. package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +433 -0
  327. package/node_modules/@bufbuild/protobuf/dist/esm/to-json.d.ts +67 -0
  328. package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +620 -0
  329. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.d.ts +35 -0
  330. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
  331. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.d.ts +4 -0
  332. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
  333. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.d.ts +19 -0
  334. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
  335. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.d.ts +91 -0
  336. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
  337. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.d.ts +34 -0
  338. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
  339. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.d.ts +76 -0
  340. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
  341. package/node_modules/@bufbuild/protobuf/dist/esm/types.d.ts +135 -0
  342. package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
  343. package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.d.ts +10 -0
  344. package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
  345. package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.d.ts +25 -0
  346. package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +184 -0
  347. package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +286 -0
  348. package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +721 -0
  349. package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.d.ts +5 -0
  350. package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
  351. package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.d.ts +69 -0
  352. package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
  353. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.d.ts +53 -0
  354. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +101 -0
  355. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.d.ts +13 -0
  356. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
  357. package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.d.ts +70 -0
  358. package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +325 -0
  359. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.d.ts +38 -0
  360. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -0
  361. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.d.ts +9 -0
  362. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +35 -0
  363. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
  364. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +24 -0
  365. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
  366. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +36 -0
  367. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
  368. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +65 -0
  369. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
  370. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
  371. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
  372. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +888 -0
  373. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
  374. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +24 -0
  375. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
  376. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +24 -0
  377. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
  378. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +24 -0
  379. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
  380. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +123 -0
  381. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
  382. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +103 -0
  383. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
  384. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +24 -0
  385. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
  386. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +56 -0
  387. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
  388. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +24 -0
  389. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
  390. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +239 -0
  391. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
  392. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +64 -0
  393. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.d.ts +19 -0
  394. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
  395. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.d.ts +28 -0
  396. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +41 -0
  397. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.d.ts +21 -0
  398. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
  399. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.d.ts +25 -0
  400. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
  401. package/node_modules/@bufbuild/protobuf/package.json +147 -0
  402. package/node_modules/@connectrpc/connect/README.md +62 -0
  403. package/node_modules/@connectrpc/connect/dist/cjs/any-client.d.ts +19 -0
  404. package/node_modules/@connectrpc/connect/dist/cjs/any-client.js +33 -0
  405. package/node_modules/@connectrpc/connect/dist/cjs/call-options.d.ts +34 -0
  406. package/node_modules/@connectrpc/connect/dist/cjs/call-options.js +15 -0
  407. package/node_modules/@connectrpc/connect/dist/cjs/callback-client.d.ts +31 -0
  408. package/node_modules/@connectrpc/connect/dist/cjs/callback-client.js +116 -0
  409. package/node_modules/@connectrpc/connect/dist/cjs/code.d.ts +75 -0
  410. package/node_modules/@connectrpc/connect/dist/cjs/code.js +92 -0
  411. package/node_modules/@connectrpc/connect/dist/cjs/connect-error.d.ts +104 -0
  412. package/node_modules/@connectrpc/connect/dist/cjs/connect-error.js +141 -0
  413. package/node_modules/@connectrpc/connect/dist/cjs/context-values.d.ts +34 -0
  414. package/node_modules/@connectrpc/connect/dist/cjs/context-values.js +41 -0
  415. package/node_modules/@connectrpc/connect/dist/cjs/cors.d.ts +45 -0
  416. package/node_modules/@connectrpc/connect/dist/cjs/cors.js +82 -0
  417. package/node_modules/@connectrpc/connect/dist/cjs/http-headers.d.ts +37 -0
  418. package/node_modules/@connectrpc/connect/dist/cjs/http-headers.js +63 -0
  419. package/node_modules/@connectrpc/connect/dist/cjs/implementation.d.ts +159 -0
  420. package/node_modules/@connectrpc/connect/dist/cjs/implementation.js +78 -0
  421. package/node_modules/@connectrpc/connect/dist/cjs/index.d.ts +22 -0
  422. package/node_modules/@connectrpc/connect/dist/cjs/index.js +46 -0
  423. package/node_modules/@connectrpc/connect/dist/cjs/interceptor.d.ts +170 -0
  424. package/node_modules/@connectrpc/connect/dist/cjs/interceptor.js +30 -0
  425. package/node_modules/@connectrpc/connect/dist/cjs/package.json +1 -0
  426. package/node_modules/@connectrpc/connect/dist/cjs/promise-client.d.ts +40 -0
  427. package/node_modules/@connectrpc/connect/dist/cjs/promise-client.js +135 -0
  428. package/node_modules/@connectrpc/connect/dist/cjs/protocol/async-iterable.d.ts +527 -0
  429. package/node_modules/@connectrpc/connect/dist/cjs/protocol/async-iterable.js +913 -0
  430. package/node_modules/@connectrpc/connect/dist/cjs/protocol/compression.d.ts +48 -0
  431. package/node_modules/@connectrpc/connect/dist/cjs/protocol/compression.js +75 -0
  432. package/node_modules/@connectrpc/connect/dist/cjs/protocol/content-type-matcher.d.ts +16 -0
  433. package/node_modules/@connectrpc/connect/dist/cjs/protocol/content-type-matcher.js +43 -0
  434. package/node_modules/@connectrpc/connect/dist/cjs/protocol/create-method-url.d.ts +17 -0
  435. package/node_modules/@connectrpc/connect/dist/cjs/protocol/create-method-url.js +36 -0
  436. package/node_modules/@connectrpc/connect/dist/cjs/protocol/envelope.d.ts +90 -0
  437. package/node_modules/@connectrpc/connect/dist/cjs/protocol/envelope.js +214 -0
  438. package/node_modules/@connectrpc/connect/dist/cjs/protocol/index.d.ts +25 -0
  439. package/node_modules/@connectrpc/connect/dist/cjs/protocol/index.js +95 -0
  440. package/node_modules/@connectrpc/connect/dist/cjs/protocol/invoke-implementation.d.ts +33 -0
  441. package/node_modules/@connectrpc/connect/dist/cjs/protocol/invoke-implementation.js +178 -0
  442. package/node_modules/@connectrpc/connect/dist/cjs/protocol/limit-io.d.ts +24 -0
  443. package/node_modules/@connectrpc/connect/dist/cjs/protocol/limit-io.js +80 -0
  444. package/node_modules/@connectrpc/connect/dist/cjs/protocol/normalize.d.ts +11 -0
  445. package/node_modules/@connectrpc/connect/dist/cjs/protocol/normalize.js +55 -0
  446. package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-handler-factory.d.ts +18 -0
  447. package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-handler-factory.js +15 -0
  448. package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-headers.d.ts +9 -0
  449. package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-headers.js +67 -0
  450. package/node_modules/@connectrpc/connect/dist/cjs/protocol/run-call.d.ts +45 -0
  451. package/node_modules/@connectrpc/connect/dist/cjs/protocol/run-call.js +125 -0
  452. package/node_modules/@connectrpc/connect/dist/cjs/protocol/serialization.d.ts +104 -0
  453. package/node_modules/@connectrpc/connect/dist/cjs/protocol/serialization.js +149 -0
  454. package/node_modules/@connectrpc/connect/dist/cjs/protocol/signals.d.ts +36 -0
  455. package/node_modules/@connectrpc/connect/dist/cjs/protocol/signals.js +100 -0
  456. package/node_modules/@connectrpc/connect/dist/cjs/protocol/transport-options.d.ts +98 -0
  457. package/node_modules/@connectrpc/connect/dist/cjs/protocol/transport-options.js +15 -0
  458. package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-fetch.d.ts +35 -0
  459. package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-fetch.js +150 -0
  460. package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler-client.d.ts +7 -0
  461. package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler-client.js +88 -0
  462. package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler.d.ts +167 -0
  463. package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler.js +130 -0
  464. package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal.d.ts +102 -0
  465. package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal.js +78 -0
  466. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/code-string.d.ts +16 -0
  467. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/code-string.js +52 -0
  468. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/content-type.d.ts +40 -0
  469. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/content-type.js +71 -0
  470. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/end-stream.d.ts +44 -0
  471. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/end-stream.js +137 -0
  472. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/error-json.d.ts +36 -0
  473. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/error-json.js +166 -0
  474. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/get-request.d.ts +6 -0
  475. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/get-request.js +66 -0
  476. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/handler-factory.d.ts +6 -0
  477. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/handler-factory.js +296 -0
  478. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/headers.d.ts +16 -0
  479. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/headers.js +32 -0
  480. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/http-status.d.ts +15 -0
  481. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/http-status.js +90 -0
  482. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/index.d.ts +16 -0
  483. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/index.js +81 -0
  484. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/parse-timeout.d.ts +13 -0
  485. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/parse-timeout.js +44 -0
  486. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/query-params.d.ts +8 -0
  487. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/query-params.js +24 -0
  488. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/request-header.d.ts +19 -0
  489. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/request-header.js +70 -0
  490. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/trailer-mux.d.ts +19 -0
  491. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/trailer-mux.js +53 -0
  492. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/transport.d.ts +6 -0
  493. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/transport.js +210 -0
  494. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/validate-response.d.ts +30 -0
  495. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/validate-response.js +71 -0
  496. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/version.d.ts +20 -0
  497. package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/version.js +58 -0
  498. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/content-type.d.ts +16 -0
  499. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/content-type.js +38 -0
  500. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/gen/status_pb.d.ts +91 -0
  501. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/gen/status_pb.js +27 -0
  502. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/handler-factory.d.ts +6 -0
  503. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/handler-factory.js +124 -0
  504. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/headers.d.ts +13 -0
  505. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/headers.js +29 -0
  506. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/http-status.d.ts +8 -0
  507. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/http-status.js +46 -0
  508. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/index.d.ts +10 -0
  509. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/index.js +61 -0
  510. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/parse-timeout.d.ts +13 -0
  511. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/parse-timeout.js +53 -0
  512. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/request-header.d.ts +13 -0
  513. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/request-header.js +56 -0
  514. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/trailer-status.d.ts +28 -0
  515. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/trailer-status.js +118 -0
  516. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/transport.d.ts +6 -0
  517. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/transport.js +185 -0
  518. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-response.d.ts +33 -0
  519. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-response.js +75 -0
  520. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-trailer.d.ts +13 -0
  521. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-trailer.js +44 -0
  522. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/content-type.d.ts +19 -0
  523. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/content-type.js +41 -0
  524. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/handler-factory.d.ts +6 -0
  525. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/handler-factory.js +130 -0
  526. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/headers.d.ts +20 -0
  527. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/headers.js +44 -0
  528. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/index.d.ts +8 -0
  529. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/index.js +61 -0
  530. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/request-header.d.ts +13 -0
  531. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/request-header.js +59 -0
  532. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/trailer.d.ts +27 -0
  533. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/trailer.js +71 -0
  534. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/transport.d.ts +6 -0
  535. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/transport.js +234 -0
  536. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/validate-response.d.ts +34 -0
  537. package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/validate-response.js +73 -0
  538. package/node_modules/@connectrpc/connect/dist/cjs/router-transport.d.ts +13 -0
  539. package/node_modules/@connectrpc/connect/dist/cjs/router-transport.js +32 -0
  540. package/node_modules/@connectrpc/connect/dist/cjs/router.d.ts +81 -0
  541. package/node_modules/@connectrpc/connect/dist/cjs/router.js +68 -0
  542. package/node_modules/@connectrpc/connect/dist/cjs/transport.d.ts +20 -0
  543. package/node_modules/@connectrpc/connect/dist/cjs/transport.js +15 -0
  544. package/node_modules/@connectrpc/connect/dist/esm/any-client.d.ts +19 -0
  545. package/node_modules/@connectrpc/connect/dist/esm/any-client.js +30 -0
  546. package/node_modules/@connectrpc/connect/dist/esm/call-options.d.ts +34 -0
  547. package/node_modules/@connectrpc/connect/dist/esm/call-options.js +14 -0
  548. package/node_modules/@connectrpc/connect/dist/esm/callback-client.d.ts +31 -0
  549. package/node_modules/@connectrpc/connect/dist/esm/callback-client.js +113 -0
  550. package/node_modules/@connectrpc/connect/dist/esm/code.d.ts +75 -0
  551. package/node_modules/@connectrpc/connect/dist/esm/code.js +89 -0
  552. package/node_modules/@connectrpc/connect/dist/esm/connect-error.d.ts +104 -0
  553. package/node_modules/@connectrpc/connect/dist/esm/connect-error.js +137 -0
  554. package/node_modules/@connectrpc/connect/dist/esm/context-values.d.ts +34 -0
  555. package/node_modules/@connectrpc/connect/dist/esm/context-values.js +37 -0
  556. package/node_modules/@connectrpc/connect/dist/esm/cors.d.ts +45 -0
  557. package/node_modules/@connectrpc/connect/dist/esm/cors.js +79 -0
  558. package/node_modules/@connectrpc/connect/dist/esm/http-headers.d.ts +37 -0
  559. package/node_modules/@connectrpc/connect/dist/esm/http-headers.js +58 -0
  560. package/node_modules/@connectrpc/connect/dist/esm/implementation.d.ts +159 -0
  561. package/node_modules/@connectrpc/connect/dist/esm/implementation.js +73 -0
  562. package/node_modules/@connectrpc/connect/dist/esm/index.d.ts +22 -0
  563. package/node_modules/@connectrpc/connect/dist/esm/index.js +27 -0
  564. package/node_modules/@connectrpc/connect/dist/esm/interceptor.d.ts +170 -0
  565. package/node_modules/@connectrpc/connect/dist/esm/interceptor.js +27 -0
  566. package/node_modules/@connectrpc/connect/dist/esm/promise-client.d.ts +40 -0
  567. package/node_modules/@connectrpc/connect/dist/esm/promise-client.js +128 -0
  568. package/node_modules/@connectrpc/connect/dist/esm/protocol/async-iterable.d.ts +527 -0
  569. package/node_modules/@connectrpc/connect/dist/esm/protocol/async-iterable.js +891 -0
  570. package/node_modules/@connectrpc/connect/dist/esm/protocol/compression.d.ts +48 -0
  571. package/node_modules/@connectrpc/connect/dist/esm/protocol/compression.js +71 -0
  572. package/node_modules/@connectrpc/connect/dist/esm/protocol/content-type-matcher.d.ts +16 -0
  573. package/node_modules/@connectrpc/connect/dist/esm/protocol/content-type-matcher.js +40 -0
  574. package/node_modules/@connectrpc/connect/dist/esm/protocol/create-method-url.d.ts +17 -0
  575. package/node_modules/@connectrpc/connect/dist/esm/protocol/create-method-url.js +33 -0
  576. package/node_modules/@connectrpc/connect/dist/esm/protocol/envelope.d.ts +90 -0
  577. package/node_modules/@connectrpc/connect/dist/esm/protocol/envelope.js +206 -0
  578. package/node_modules/@connectrpc/connect/dist/esm/protocol/index.d.ts +25 -0
  579. package/node_modules/@connectrpc/connect/dist/esm/protocol/index.js +33 -0
  580. package/node_modules/@connectrpc/connect/dist/esm/protocol/invoke-implementation.d.ts +33 -0
  581. package/node_modules/@connectrpc/connect/dist/esm/protocol/invoke-implementation.js +173 -0
  582. package/node_modules/@connectrpc/connect/dist/esm/protocol/limit-io.d.ts +24 -0
  583. package/node_modules/@connectrpc/connect/dist/esm/protocol/limit-io.js +75 -0
  584. package/node_modules/@connectrpc/connect/dist/esm/protocol/normalize.d.ts +11 -0
  585. package/node_modules/@connectrpc/connect/dist/esm/protocol/normalize.js +51 -0
  586. package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-handler-factory.d.ts +18 -0
  587. package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-handler-factory.js +14 -0
  588. package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-headers.d.ts +9 -0
  589. package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-headers.js +64 -0
  590. package/node_modules/@connectrpc/connect/dist/esm/protocol/run-call.d.ts +45 -0
  591. package/node_modules/@connectrpc/connect/dist/esm/protocol/run-call.js +121 -0
  592. package/node_modules/@connectrpc/connect/dist/esm/protocol/serialization.d.ts +104 -0
  593. package/node_modules/@connectrpc/connect/dist/esm/protocol/serialization.js +141 -0
  594. package/node_modules/@connectrpc/connect/dist/esm/protocol/signals.d.ts +36 -0
  595. package/node_modules/@connectrpc/connect/dist/esm/protocol/signals.js +95 -0
  596. package/node_modules/@connectrpc/connect/dist/esm/protocol/transport-options.d.ts +98 -0
  597. package/node_modules/@connectrpc/connect/dist/esm/protocol/transport-options.js +14 -0
  598. package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-fetch.d.ts +35 -0
  599. package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-fetch.js +142 -0
  600. package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler-client.d.ts +7 -0
  601. package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler-client.js +85 -0
  602. package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler.d.ts +167 -0
  603. package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler.js +124 -0
  604. package/node_modules/@connectrpc/connect/dist/esm/protocol/universal.d.ts +102 -0
  605. package/node_modules/@connectrpc/connect/dist/esm/protocol/universal.js +74 -0
  606. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/code-string.d.ts +16 -0
  607. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/code-string.js +48 -0
  608. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/content-type.d.ts +40 -0
  609. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/content-type.js +66 -0
  610. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/end-stream.d.ts +44 -0
  611. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/end-stream.js +131 -0
  612. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/error-json.d.ts +36 -0
  613. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/error-json.js +160 -0
  614. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/get-request.d.ts +6 -0
  615. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/get-request.js +63 -0
  616. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/handler-factory.d.ts +6 -0
  617. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/handler-factory.js +293 -0
  618. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/headers.d.ts +16 -0
  619. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/headers.js +29 -0
  620. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/http-status.d.ts +15 -0
  621. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/http-status.js +86 -0
  622. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/index.d.ts +16 -0
  623. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/index.js +33 -0
  624. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/parse-timeout.d.ts +13 -0
  625. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/parse-timeout.js +41 -0
  626. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/query-params.d.ts +8 -0
  627. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/query-params.js +21 -0
  628. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/request-header.d.ts +19 -0
  629. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/request-header.js +66 -0
  630. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/trailer-mux.d.ts +19 -0
  631. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/trailer-mux.js +49 -0
  632. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/transport.d.ts +6 -0
  633. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/transport.js +207 -0
  634. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/validate-response.d.ts +30 -0
  635. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/validate-response.js +67 -0
  636. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/version.d.ts +20 -0
  637. package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/version.js +53 -0
  638. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/content-type.d.ts +16 -0
  639. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/content-type.js +34 -0
  640. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/gen/status_pb.d.ts +91 -0
  641. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/gen/status_pb.js +24 -0
  642. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/handler-factory.d.ts +6 -0
  643. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/handler-factory.js +121 -0
  644. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/headers.d.ts +13 -0
  645. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/headers.js +26 -0
  646. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/http-status.d.ts +8 -0
  647. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/http-status.js +43 -0
  648. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/index.d.ts +10 -0
  649. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/index.js +28 -0
  650. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/parse-timeout.d.ts +13 -0
  651. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/parse-timeout.js +50 -0
  652. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/request-header.d.ts +13 -0
  653. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/request-header.js +52 -0
  654. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/trailer-status.d.ts +28 -0
  655. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/trailer-status.js +113 -0
  656. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/transport.d.ts +6 -0
  657. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/transport.js +182 -0
  658. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-response.d.ts +33 -0
  659. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-response.js +71 -0
  660. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-trailer.d.ts +13 -0
  661. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-trailer.js +41 -0
  662. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/content-type.d.ts +19 -0
  663. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/content-type.js +37 -0
  664. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/handler-factory.d.ts +6 -0
  665. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/handler-factory.js +127 -0
  666. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/headers.d.ts +20 -0
  667. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/headers.js +33 -0
  668. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/index.d.ts +8 -0
  669. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/index.js +26 -0
  670. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/request-header.d.ts +13 -0
  671. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/request-header.js +55 -0
  672. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/trailer.d.ts +27 -0
  673. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/trailer.js +65 -0
  674. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/transport.d.ts +6 -0
  675. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/transport.js +231 -0
  676. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/validate-response.d.ts +34 -0
  677. package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/validate-response.js +69 -0
  678. package/node_modules/@connectrpc/connect/dist/esm/router-transport.d.ts +13 -0
  679. package/node_modules/@connectrpc/connect/dist/esm/router-transport.js +29 -0
  680. package/node_modules/@connectrpc/connect/dist/esm/router.d.ts +81 -0
  681. package/node_modules/@connectrpc/connect/dist/esm/router.js +65 -0
  682. package/node_modules/@connectrpc/connect/dist/esm/transport.d.ts +20 -0
  683. package/node_modules/@connectrpc/connect/dist/esm/transport.js +14 -0
  684. package/node_modules/@connectrpc/connect/package.json +67 -0
  685. package/node_modules/@connectrpc/connect-node/README.md +144 -0
  686. package/node_modules/@connectrpc/connect-node/buf.gen.yaml +10 -0
  687. package/node_modules/@connectrpc/connect-node/dist/cjs/compression.d.ts +15 -0
  688. package/node_modules/@connectrpc/connect-node/dist/cjs/compression.js +96 -0
  689. package/node_modules/@connectrpc/connect-node/dist/cjs/connect-node-adapter.d.ts +42 -0
  690. package/node_modules/@connectrpc/connect-node/dist/cjs/connect-node-adapter.js +60 -0
  691. package/node_modules/@connectrpc/connect-node/dist/cjs/connect-transport.d.ts +100 -0
  692. package/node_modules/@connectrpc/connect-node/dist/cjs/connect-transport.js +25 -0
  693. package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-transport.d.ts +95 -0
  694. package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-transport.js +24 -0
  695. package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-web-transport.d.ts +96 -0
  696. package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-web-transport.js +25 -0
  697. package/node_modules/@connectrpc/connect-node/dist/cjs/http2-session-manager.d.ts +146 -0
  698. package/node_modules/@connectrpc/connect-node/dist/cjs/http2-session-manager.js +543 -0
  699. package/node_modules/@connectrpc/connect-node/dist/cjs/index.d.ts +14 -0
  700. package/node_modules/@connectrpc/connect-node/dist/cjs/index.js +34 -0
  701. package/node_modules/@connectrpc/connect-node/dist/cjs/node-error.d.ts +45 -0
  702. package/node_modules/@connectrpc/connect-node/dist/cjs/node-error.js +153 -0
  703. package/node_modules/@connectrpc/connect-node/dist/cjs/node-transport-options.d.ts +100 -0
  704. package/node_modules/@connectrpc/connect-node/dist/cjs/node-transport-options.js +58 -0
  705. package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-client.d.ts +54 -0
  706. package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-client.js +347 -0
  707. package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-handler.d.ts +42 -0
  708. package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-handler.js +225 -0
  709. package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-header.d.ts +20 -0
  710. package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-header.js +117 -0
  711. package/node_modules/@connectrpc/connect-node/dist/cjs/package.json +1 -0
  712. package/node_modules/@connectrpc/connect-node/dist/esm/compression.d.ts +15 -0
  713. package/node_modules/@connectrpc/connect-node/dist/esm/compression.js +93 -0
  714. package/node_modules/@connectrpc/connect-node/dist/esm/connect-node-adapter.d.ts +42 -0
  715. package/node_modules/@connectrpc/connect-node/dist/esm/connect-node-adapter.js +57 -0
  716. package/node_modules/@connectrpc/connect-node/dist/esm/connect-transport.d.ts +100 -0
  717. package/node_modules/@connectrpc/connect-node/dist/esm/connect-transport.js +22 -0
  718. package/node_modules/@connectrpc/connect-node/dist/esm/grpc-transport.d.ts +95 -0
  719. package/node_modules/@connectrpc/connect-node/dist/esm/grpc-transport.js +21 -0
  720. package/node_modules/@connectrpc/connect-node/dist/esm/grpc-web-transport.d.ts +96 -0
  721. package/node_modules/@connectrpc/connect-node/dist/esm/grpc-web-transport.js +22 -0
  722. package/node_modules/@connectrpc/connect-node/dist/esm/http2-session-manager.d.ts +146 -0
  723. package/node_modules/@connectrpc/connect-node/dist/esm/http2-session-manager.js +539 -0
  724. package/node_modules/@connectrpc/connect-node/dist/esm/index.d.ts +14 -0
  725. package/node_modules/@connectrpc/connect-node/dist/esm/index.js +21 -0
  726. package/node_modules/@connectrpc/connect-node/dist/esm/node-error.d.ts +45 -0
  727. package/node_modules/@connectrpc/connect-node/dist/esm/node-error.js +146 -0
  728. package/node_modules/@connectrpc/connect-node/dist/esm/node-transport-options.d.ts +100 -0
  729. package/node_modules/@connectrpc/connect-node/dist/esm/node-transport-options.js +55 -0
  730. package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-client.d.ts +54 -0
  731. package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-client.js +344 -0
  732. package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-handler.d.ts +42 -0
  733. package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-handler.js +221 -0
  734. package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-header.d.ts +20 -0
  735. package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-header.js +113 -0
  736. package/node_modules/@connectrpc/connect-node/package.json +44 -0
  737. package/node_modules/@nvidia/openshell-sdk/README.md +303 -0
  738. package/node_modules/@nvidia/openshell-sdk/dist/client.d.ts +1243 -0
  739. package/node_modules/@nvidia/openshell-sdk/dist/client.d.ts.map +1 -0
  740. package/node_modules/@nvidia/openshell-sdk/dist/client.js +1321 -0
  741. package/node_modules/@nvidia/openshell-sdk/dist/client.js.map +1 -0
  742. package/node_modules/@nvidia/openshell-sdk/dist/errors.d.ts +35 -0
  743. package/node_modules/@nvidia/openshell-sdk/dist/errors.d.ts.map +1 -0
  744. package/node_modules/@nvidia/openshell-sdk/dist/errors.js +79 -0
  745. package/node_modules/@nvidia/openshell-sdk/dist/errors.js.map +1 -0
  746. package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.d.ts +301 -0
  747. package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.d.ts.map +1 -0
  748. package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.js +69 -0
  749. package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.js.map +1 -0
  750. package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.d.ts +581 -0
  751. package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.d.ts.map +1 -0
  752. package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.js +90 -0
  753. package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.js.map +1 -0
  754. package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.d.ts +9131 -0
  755. package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.d.ts.map +1 -0
  756. package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.js +1898 -0
  757. package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.js.map +1 -0
  758. package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.d.ts +58 -0
  759. package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.d.ts.map +1 -0
  760. package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.js +24 -0
  761. package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.js.map +1 -0
  762. package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.d.ts +1203 -0
  763. package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.d.ts.map +1 -0
  764. package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.js +277 -0
  765. package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.js.map +1 -0
  766. package/node_modules/@nvidia/openshell-sdk/dist/index.d.ts +7 -0
  767. package/node_modules/@nvidia/openshell-sdk/dist/index.d.ts.map +1 -0
  768. package/node_modules/@nvidia/openshell-sdk/dist/index.js +6 -0
  769. package/node_modules/@nvidia/openshell-sdk/dist/index.js.map +1 -0
  770. package/node_modules/@nvidia/openshell-sdk/dist/oidc.d.ts +14 -0
  771. package/node_modules/@nvidia/openshell-sdk/dist/oidc.d.ts.map +1 -0
  772. package/node_modules/@nvidia/openshell-sdk/dist/oidc.js +177 -0
  773. package/node_modules/@nvidia/openshell-sdk/dist/oidc.js.map +1 -0
  774. package/node_modules/@nvidia/openshell-sdk/dist/raw.d.ts +6 -0
  775. package/node_modules/@nvidia/openshell-sdk/dist/raw.d.ts.map +1 -0
  776. package/node_modules/@nvidia/openshell-sdk/dist/raw.js +15 -0
  777. package/node_modules/@nvidia/openshell-sdk/dist/raw.js.map +1 -0
  778. package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.d.ts +11 -0
  779. package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.d.ts.map +1 -0
  780. package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.js +58 -0
  781. package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.js.map +1 -0
  782. package/node_modules/@nvidia/openshell-sdk/dist/transport.d.ts +35 -0
  783. package/node_modules/@nvidia/openshell-sdk/dist/transport.d.ts.map +1 -0
  784. package/node_modules/@nvidia/openshell-sdk/dist/transport.js +97 -0
  785. package/node_modules/@nvidia/openshell-sdk/dist/transport.js.map +1 -0
  786. package/node_modules/@nvidia/openshell-sdk/package.json +58 -0
  787. package/package.json +93 -4
  788. package/server/activity-delivery.js +143 -0
  789. package/server/activity-store.js +168 -0
  790. package/server/agent-inventory.js +76 -0
  791. package/server/agent-resources.py +60 -0
  792. package/server/api.js +648 -0
  793. package/server/cli.js +168 -0
  794. package/server/cloud-connections.js +56 -0
  795. package/server/cloud-origin.js +11 -0
  796. package/server/cloud-proxy.js +122 -0
  797. package/server/cloud-ssh-proxy.cjs +73 -0
  798. package/server/cloud-ssh.js +135 -0
  799. package/server/cloud-transfer.js +221 -0
  800. package/server/compute.js +50 -0
  801. package/server/editor.js +114 -0
  802. package/server/egress.js +204 -0
  803. package/server/files.js +489 -0
  804. package/server/gateway-install.js +64 -0
  805. package/server/gateway.js +415 -0
  806. package/server/image-templates.js +393 -0
  807. package/server/ingress.js +185 -0
  808. package/server/launch-token.js +55 -0
  809. package/server/local-catalog.js +111 -0
  810. package/server/local-cloud-native.js +152 -0
  811. package/server/local-cloud.js +123 -0
  812. package/server/location-inventory.js +94 -0
  813. package/server/machines.js +84 -0
  814. package/server/openshell-cli.js +144 -0
  815. package/server/org.js +536 -0
  816. package/server/orphan-processes.js +42 -0
  817. package/server/paths.js +28 -0
  818. package/server/policy-template-store.js +92 -0
  819. package/server/policy.js +583 -0
  820. package/server/remote-gateway-state.js +123 -0
  821. package/server/remote-gateway.js +420 -0
  822. package/server/remote-hosts.js +354 -0
  823. package/server/remote-http.js +14 -0
  824. package/server/remote-image-engine.js +47 -0
  825. package/server/remote-runtime.js +65 -0
  826. package/server/remote-runtime.py +162 -0
  827. package/server/sandbox-identity.js +14 -0
  828. package/server/security.js +139 -0
  829. package/server/session-revocations.js +20 -0
  830. package/server/setup-artifact-installer.py +54 -0
  831. package/server/setup-artifacts.js +23 -0
  832. package/server/setup-auth-discovery.js +24 -0
  833. package/server/setup-credentials.js +54 -0
  834. package/server/setup-deployment.js +299 -0
  835. package/server/setup-discovery.js +289 -0
  836. package/server/setup-egress.js +133 -0
  837. package/server/setup-http.js +47 -0
  838. package/server/setup-installer.py +289 -0
  839. package/server/setup-json.py +8 -0
  840. package/server/setup-members.js +77 -0
  841. package/server/setup-packages.js +214 -0
  842. package/server/setup-preparation.js +144 -0
  843. package/server/setup-python.js +8 -0
  844. package/server/setup-remote-check.js +35 -0
  845. package/server/setup-transfer.js +17 -0
  846. package/server/setup-verifier.cjs +43 -0
  847. package/server/setups.js +172 -0
  848. package/server/ssh-hosts.js +184 -0
  849. package/server/ssh.js +153 -0
  850. package/server/start.js +71 -0
  851. package/server/terminal.js +173 -0
  852. package/server/worker-auth.js +18 -0
  853. package/shared/agent-access.js +103 -0
  854. package/shared/antigravity-network-guidance.js +9 -0
  855. package/shared/group-membership.js +33 -0
  856. package/shared/group-network.js +29 -0
  857. package/shared/policy-templates.js +79 -0
  858. package/shared/secret-fields.js +35 -0
  859. package/shared/setup-launch.js +25 -0
  860. package/shared/setup-targets.js +11 -0
  861. package/shared/setup-targets.json +12 -0
  862. package/src/lib/activity-export.js +52 -0
  863. package/src/lib/activity-inventory.js +45 -0
  864. package/src/lib/agents.js +41 -0
  865. package/src/lib/api.js +173 -0
  866. package/src/lib/cloud-machine.js +9 -0
  867. package/src/lib/cloud-origin.js +6 -0
  868. package/src/lib/cloud-transfer.js +22 -0
  869. package/src/lib/compute-target.js +46 -0
  870. package/src/lib/delete-network-policies.js +15 -0
  871. package/src/lib/egress-groups.js +24 -0
  872. package/src/lib/egress.js +28 -0
  873. package/src/lib/files.js +24 -0
  874. package/src/lib/fleet.js +100 -0
  875. package/src/lib/format.js +24 -0
  876. package/src/lib/groups.js +16 -0
  877. package/src/lib/image-templates.js +139 -0
  878. package/src/lib/import-setup.js +36 -0
  879. package/src/lib/local-cloud.js +118 -0
  880. package/src/lib/location-inventory.js +20 -0
  881. package/src/lib/locations.js +5 -0
  882. package/src/lib/placement.js +9 -0
  883. package/src/lib/policy-editor.js +58 -0
  884. package/src/lib/policy-sources.js +33 -0
  885. package/src/lib/quick-setup.js +110 -0
  886. package/src/lib/sandbox-creations.js +59 -0
  887. package/src/lib/sandbox-images.js +38 -0
  888. package/src/lib/sandbox-session.js +140 -0
  889. package/src/lib/sandboxes.js +78 -0
  890. package/src/lib/secret-inventory.js +26 -0
  891. package/src/lib/services.js +41 -0
  892. package/src/lib/setup-import-jobs.js +62 -0
  893. package/src/lib/setup-imports.js +4 -0
  894. package/src/lib/setup-network.js +39 -0
  895. package/src/lib/setup-template-build.js +17 -0
  896. package/src/lib/utils.js +6 -0
  897. package/vendor/OPENSHELL-LICENSE +203 -0
  898. package/vendor/nvidia-openshell-sdk-0.0.0.tgz +0 -0
package/server/api.js ADDED
@@ -0,0 +1,648 @@
1
+ import {createLocalCloudNative} from './local-cloud-native.js'
2
+ import {cloudSshRoute,cloudSshUpgrade} from './cloud-ssh.js'
3
+ import {createLocalCloud} from './local-cloud.js'
4
+ import { cloudOrigin, CLOUD_SOON } from './cloud-origin.js'
5
+ import { setupTargetsFor, validateSetupTargets } from '../shared/setup-targets.js'
6
+ import { localTransfer, importTransfer, exportTransfer } from './cloud-transfer.js'
7
+ import path from 'node:path'
8
+ import { Readable } from 'node:stream'
9
+ import { scopedStateDirectory } from './paths.js'
10
+ import { createActivityStore } from './activity-store.js'
11
+ import { createActivityDelivery } from './activity-delivery.js'
12
+ import { exportEvent } from '../src/lib/activity-export.js'
13
+ import { agentInventory } from './agent-inventory.js'
14
+ import { randomUUID } from 'node:crypto'
15
+ import { imageTemplateLabels, nameSandboxImages } from '../src/lib/sandbox-images.js'
16
+ import { PROJECT_LABEL, templateSession, isSession, sessionLaunch, persistentTerminalPolicy, persistentGateway, PERSISTENT_TERMINAL_LABEL } from '../src/lib/sandbox-session.js'
17
+ import { sandboxIdentityLabels } from './sandbox-identity.js'
18
+ import { consoleContext, contextConfigured, contextKey, contextSelection, gateway, iso, logView, policyView, providerView, runWithContext, sandboxView, selectConsoleContext } from './gateway.js'
19
+ import { createRemoteConnections } from './remote-gateway.js'
20
+ import { createSshHostStore } from './ssh-hosts.js'
21
+ import { createLocationInventory } from './location-inventory.js'
22
+ import { policyRoute } from './policy.js'
23
+ import { orgRoute, createInGroups, enforcePolicyOnly, startOrgSweeper, assignGroup } from './org.js'
24
+ import { expose, ingressRoute, startSweeper } from './ingress.js'
25
+ import { imageTemplateRoute, imageTemplateForLaunch, listImageTemplates } from './image-templates.js'
26
+ import { editorRoute } from './editor.js'
27
+ import { terminalRoute, terminalUpgrade } from './terminal.js'
28
+ import { assertPackagesPrepared } from '../shared/setup-launch.js'
29
+ import { setupRoute, resolveSetups } from './setups.js'
30
+ import { deploymentRoute, startSetupInstall, launchSetupAccess, setupJobsForSandbox } from './setup-deployment.js'
31
+ import { setSandboxSetups, forgetSandbox } from './setup-members.js'
32
+ import { sshRoute } from './ssh.js'
33
+ import { agentAccessRules } from '../shared/agent-access.js'
34
+ import { filesRoute, planSeed, receiveUpload, serveDownload, startSeed } from './files.js'
35
+
36
+ // These routes act with the operator's gateway certificate. A loopback Host
37
+ // header alone is not proof of a local caller when Vite is bound to a LAN
38
+ // address, so check the socket, the Host and the browser's own origin claims.
39
+ export { isLocalApiRequest } from './security.js'
40
+ import { createSecurity, cloudConfig, assertCloudOperation, requestPath } from './security.js'
41
+ import { createLaunchToken, createTokenGate, tokenUrl } from './launch-token.js'
42
+
43
+ // A mutation must also carry a JSON body and a custom header, which a
44
+ // cross-site form or image tag cannot send without a CORS preflight we never grant.
45
+ function isMutation(req, security) {
46
+ return req.method === 'POST'
47
+ && req.headers.origin === security.originFor(req)
48
+ && (req.headers['content-type'] ?? '').startsWith('application/json')
49
+ && req.headers['x-openshell-console'] === '1'
50
+ }
51
+
52
+ const NAME = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/
53
+ const IMAGE = /^[\w./:@-]{1,256}$/
54
+
55
+ async function body(req, limit = 65536) {
56
+ let raw = ''
57
+ for await (const chunk of req) {
58
+ raw += chunk
59
+ if (Buffer.byteLength(raw) > limit) throw Object.assign(new Error('Request too large'), { status: 413 })
60
+ }
61
+ return raw ? JSON.parse(raw) : {}
62
+ }
63
+
64
+ function send(res, status, payload) {
65
+ res.writeHead(status, { 'Content-Type': 'application/json', 'Cache-Control': 'no-store' })
66
+ res.end(JSON.stringify(payload))
67
+ }
68
+
69
+ const fail = (message, status = 400) => Object.assign(new Error(message), { status })
70
+
71
+ // ---- reads ------------------------------------------------------------------
72
+
73
+ async function listSandboxes(current) {
74
+ const { client, workspaceScope } = current ?? await gateway()
75
+ const response = await client.raw.listSandboxes({ workspaceScope })
76
+ return nameSandboxImages(response.sandboxes.map(sandboxView), await listImageTemplates().catch(() => [])).sort((a, b) => (b.createdAt ?? '').localeCompare(a.createdAt ?? ''))
77
+ }
78
+
79
+ // Deleted sandboxes have no draft or log buffer worth asking for.
80
+ const live = (sandboxes) => sandboxes.filter((s) => s.phase !== 'deleting')
81
+
82
+ async function overview() {
83
+ const current = await gateway()
84
+ const { client, target, workspace, workspaceScope } = current
85
+ const [health, info, providers, sandboxes] = await Promise.all([
86
+ client.health(),
87
+ client.raw.getGatewayInfo({}),
88
+ client.raw.listProviders({ workspaceScope }),
89
+ listSandboxes(current),
90
+ ])
91
+ return {
92
+ gateway: {
93
+ name: target.name,
94
+ endpoint: target.endpoint,
95
+ authMode: target.authMode,
96
+ remote: target.remote,
97
+ workspace,
98
+ status: health.status,
99
+ version: health.version,
100
+ drivers: (info.computeDrivers ?? []).map((d) => ({
101
+ name: d.name,
102
+ driver: d.capabilities?.driverName ?? d.name,
103
+ version: d.capabilities?.driverVersion ?? null,
104
+ })),
105
+ },
106
+ providers: providers.providers.map(providerView),
107
+ sandboxes,
108
+ }
109
+ }
110
+
111
+ async function sandboxDetail(name) {
112
+ const { client, target, workspace, workspaceScope } = await gateway()
113
+ const [sandbox, config] = await Promise.all([
114
+ client.raw.getSandbox({ name, workspaceScope }),
115
+ client.sandbox.getConfig(name, { workspace }).catch(() => null),
116
+ ])
117
+ const templates = await listImageTemplates().catch(() => [])
118
+ const [view] = nameSandboxImages([sandboxView(sandbox.sandbox)], templates)
119
+ const setupJobs = setupJobsForSandbox(name, view.createdAt)
120
+ const inventory = await agentInventory(client, view, target.endpoint, JSON.stringify(setupJobs.map(job => [job.setup, job.status, job.at])))
121
+ const setupIds = [...new Set([...(templates.find(t => t.name === view.workloadTemplate)?.recipe?.setups ?? []), ...(inventory.installedSetupIds ?? []), ...setupJobs.filter(job => job.status !== 'removed').map(job => job.setup)])]
122
+ const installing = setupJobs.some(job => job.status === 'waiting')
123
+ return {
124
+ ...view,
125
+ setupJobs,
126
+ setupIds,
127
+ agentInventory: installing ? { ...inventory, resources: null } : inventory,
128
+ policy: policyView(config?.policy),
129
+ policySource: config?.policySource ?? null,
130
+ policyHash: config?.policyHash ?? null,
131
+ policyVersionNumber: config?.version ?? null,
132
+ }
133
+ }
134
+
135
+ // ---- writes -----------------------------------------------------------------
136
+
137
+ export async function createSandbox(input, { sessionOverride = false } = {}) {
138
+ const { client, target, workspace } = await gateway()
139
+ // An image template is an OpenShell sandbox template: the gateway supplies
140
+ // its image and environment; the console adds how the sandbox starts.
141
+ const saved = input.imageTemplate ? await imageTemplateForLaunch(String(input.imageTemplate)) : null
142
+ const imageLabels = imageTemplateLabels(saved)
143
+ // A built template's agents get their sign-in and model destinations from
144
+ // the reviewed table in shared/agent-access.js, never from the recipe.
145
+ let agentRules = []
146
+ if (saved?.managed) { try { agentRules = agentAccessRules(saved.recipe) } catch (error) { throw fail(error.message) } }
147
+ if (saved) {
148
+ const start = sessionOverride && input.session !== undefined ? String(input.session) : saved.recipe.command.trim()
149
+ let selectedSession
150
+ try { selectedSession = templateSession(saved, input.session) } catch (error) { throw fail(error.message) }
151
+ input = { ...input, image: '', session: selectedSession, command: start ? ['/bin/bash', '-lc', start] : [] }
152
+ }
153
+ const setupIds = [...new Set([...(saved?.recipe?.setups ?? []), ...(Array.isArray(input.setups) ? input.setups : [])])]
154
+ const setupTargets = input.setupTargets ?? setupTargetsFor(saved?.recipe?.agents ?? [])
155
+ const selectedSetups = await resolveSetups(setupIds)
156
+ assertPackagesPrepared(selectedSetups)
157
+ // A Setup's egress policy reaches sandboxes that use it, or a Quick-setup snapshot of it.
158
+ const setupMembers = [...new Set(selectedSetups.flatMap((s) => [s.id, s.preparedFrom?.id].filter(Boolean)))]
159
+ const approvedSetupRevisions = launchSetupAccess(selectedSetups, saved?.recipe, input.setupAccessReview, input.includeTemplateAccess === true)
160
+ if (setupIds.length) { try { validateSetupTargets(setupTargets) } catch (error) { throw fail(error.message) } }
161
+ if (setupIds.length) input = { ...input, session: 'shell', command: [] }
162
+ const name = String(input.name ?? '').trim()
163
+ const image = String(input.image ?? '').trim()
164
+ const providers = Array.isArray(input.providers) ? input.providers.map(String) : []
165
+ const command = Array.isArray(input.command) ? input.command.map(String).filter(Boolean) : []
166
+ const session = input.session ?? (command.length === 1 && command[0] === 'claude' ? 'claude' : command.length === 0 ? 'shell' : null)
167
+ if (session != null && !isSession(session)) throw fail('Unknown session type.')
168
+ const launch = sessionLaunch(session, command)
169
+ // OpenShell caps sandbox names at 19 characters.
170
+ if (!NAME.test(name) || name.length > 19) throw fail('Use lowercase letters, digits and dashes for the name, up to 19 characters.')
171
+ if (image && !IMAGE.test(image)) throw fail('That image reference is not valid.')
172
+ if (!providers.every((p) => NAME.test(p))) throw fail('Unknown provider name.')
173
+ if (command.length > 32 || command.some((part) => part.length > 512)) throw fail('Command is too long.')
174
+ // A folder or repository to start from is checked before anything is created.
175
+ const seed = await planSeed({ folder: input.folder ? String(input.folder) : null, repository: input.repository ? String(input.repository) : null })
176
+ // Files, Landlock and process identity are fixed at creation, and so is the
177
+ // group label. The whole policy (template + organization + group rules) is
178
+ // resolved here from stored policy, never accepted raw from the browser.
179
+ let labels
180
+ const { plan, ref } = await createInGroups({ name: String(input.name ?? ''), groups: input.groups ?? input.group, template: input.template ? String(input.template) : null, accessTemplates: input.accessTemplates, agentRules, requireGroup: true, setups: setupMembers }, async (plan) => {
181
+ labels = { ...plan.labels, ...launch.labels, ...imageLabels, ...sandboxIdentityLabels(), ...(seed?.project ? { [PROJECT_LABEL]: seed.project } : {}), ...(persistentGateway(target) ? { [PERSISTENT_TERMINAL_LABEL]: '1' } : {}) }
182
+ await enforcePolicyOnly(client)
183
+ const spec = {
184
+ policy: persistentGateway(target) ? persistentTerminalPolicy(plan.policy) : plan.policy,
185
+ labels,
186
+ name,
187
+ providers,
188
+ command: launch.command,
189
+ // Interactive sessions run through exec, independently of the main process.
190
+ tty: launch.tty,
191
+ }
192
+ const created = saved
193
+ ? await client.sandbox.createFromTemplate({ ...spec, workloadTemplate: saved.name, workspace })
194
+ : await client.sandbox.create({ ...spec, workspace, ...(image ? { image } : {}) })
195
+ // Labels are fixed at creation, so Setup membership is bound to the
196
+ // gateway and immutable id returned for this new sandbox.
197
+ await setSandboxSetups({ name: created.name, id: created.id, gateway: target.endpoint }, setupMembers)
198
+ return created
199
+ })
200
+ const template = plan.template
201
+
202
+ // Services a template opens at start go through the same path as opening
203
+ // one by hand, so they get the same auto-close deadline.
204
+ const opened = []
205
+ for (const door of template?.ingress ?? []) {
206
+ try { opened.push({ ...door, ...(await expose({ sandbox: ref.name, name: door.name, port: door.port, closeAfterMinutes: door.closeAfterMinutes ?? null })) }) } catch { /* a door that failed to open is simply missing from `opened` */ }
207
+ }
208
+ // Files arrive once the sandbox is ready, as with `sandbox create --upload`.
209
+ // Console sessions start through exec, so an agent opened later finds them.
210
+ if (seed) startSeed(ref.name, seed)
211
+ if (setupIds.length) await startSetupInstall(ref.name, setupIds, setupTargets, ref.id, approvedSetupRevisions, target.endpoint)
212
+ return { name: ref.name, phase: ref.phase, opened, labels, setups: setupIds, seed: seed ? { kind: seed.kind, source: seed.source, dest: seed.dest } : null }
213
+ }
214
+
215
+ async function lifecycle(name, action) {
216
+ const { client, target, workspace, workspaceScope } = await gateway()
217
+ if (action === 'stop') await client.raw.stopSandbox({ name, workspaceScope, requestId: randomUUID() })
218
+ else if (action === 'start') await client.raw.startSandbox({ name, workspaceScope, requestId: randomUUID() })
219
+ else if (action === 'delete') {
220
+ const sandbox = sandboxView((await client.raw.getSandbox({ name, workspaceScope })).sandbox)
221
+ const result = await client.sandbox.delete(name, { workspace })
222
+ // A later sandbox with this name must not inherit its group.
223
+ await assignGroup([name], null, { forget: true })
224
+ try { await forgetSandbox({ ...sandbox, gateway: target.endpoint }) } catch { /* the sandbox is deleted either way */ }
225
+ return result
226
+ }
227
+ return { ok: true }
228
+ }
229
+
230
+ // ---- live stream ------------------------------------------------------------
231
+
232
+ // One upstream watch per sandbox, shared by every open browser tab. The list
233
+ // itself has no watch RPC, so it is re-read on a short timer and on any status
234
+ // snapshot from a watched sandbox.
235
+ export function createHub(store, { connect = gateway, list = listSandboxes, interval = 5000 } = {}) {
236
+ const clients = new Set(), watches = new Map()
237
+ let timer = null, healthTimer = null, lastList = '', stopped = false, refreshing = false
238
+ const emit = (event, data) => {
239
+ const frame = `event: ${event}\ndata: ${JSON.stringify(data)}\n\n`
240
+ for (const res of clients) { if (res.destroyed) clients.delete(res); else if (!res.write(frame)) { clients.delete(res); res.destroy() } }
241
+ }
242
+ const health = () => { if (!clients.size || healthTimer || stopped) return; healthTimer = setTimeout(() => { healthTimer = null; if (!stopped) emit('collection', store.coverage()) }, 250) }
243
+ const status = (id, patch) => { store.source(id, patch); health() }
244
+ async function refresh() {
245
+ if (refreshing || stopped) return
246
+ refreshing = true
247
+ try {
248
+ const current = await connect()
249
+ const { client, target, workspaceScope } = current
250
+ const sandboxes = await list(current)
251
+ if (stopped) return
252
+ const serialized = JSON.stringify(sandboxes)
253
+ if (serialized !== lastList) { lastList = serialized; emit('sandboxes', sandboxes) }
254
+ const wanted = new Set(live(sandboxes).map((s) => `${target.endpoint}|${s.id || s.name}|${s.createdAt || ''}`))
255
+ for (const old of store.coverage().sources) if (!wanted.has(old.id) && old.status !== 'inactive') store.source(old.id, { status: 'inactive', stoppedAt: new Date().toISOString() })
256
+ for (const [id, controller] of watches) if (!wanted.has(id)) { controller.abort(); watches.delete(id); status(id, { status: 'inactive', stoppedAt: new Date().toISOString() }) }
257
+ for (const sandbox of live(sandboxes)) {
258
+ const id = `${target.endpoint}|${sandbox.id || sandbox.name}|${sandbox.createdAt || ''}`
259
+ if (!watches.has(id)) watch(client, sandbox, id, workspaceScope).catch((error) => emit('gateway-error', { message: `Collection failed: ${error.message}` }))
260
+ }
261
+ emit('gateway-health', { status: 'connected' })
262
+ health()
263
+ } catch (error) { emit('gateway-error', { message: error.message }) }
264
+ finally { refreshing = false }
265
+ }
266
+ async function watch(client, sandbox, id, workspaceScope) {
267
+ const controller = new AbortController()
268
+ watches.set(id, controller)
269
+ const previous = store.getSource(id)
270
+ status(id, { sandbox: sandbox.name, status: 'connecting', connectedAt: null, gapSince: previous?.gapSince || new Date().toISOString(), gapPossible: true })
271
+ let cursor = previous?.cursor || ''
272
+ const save = (line, sourceCursor) => {
273
+ if (stopped) return
274
+ const event = store.ingest({ ...logView(sandbox.name, line), ...(sourceCursor ? { sourceCursor } : {}) }, id)
275
+ if (event) emit('log', event)
276
+ if (event) store.source(id, { lastEventAt: event.at, lastReceivedAt: new Date().toISOString() })
277
+ }
278
+ // Subscribe first with bounded replay. A separate history read confirms source reachability.
279
+ try {
280
+ const stream = client.raw.watchSandbox({ sandbox: sandbox.name, workspaceScope, followStatus: true, followLogs: true, followEvents: true, logTailLines: 400, eventTail: 400, resumeAfterCursor: cursor }, { signal: controller.signal })
281
+ const recovery = (async () => {
282
+ try {
283
+ const logs = await client.raw.getSandboxLogs({ sandbox: sandbox.name, lines: 400, workspaceScope }, { signal: controller.signal })
284
+ if (stopped || controller.signal.aborted) return
285
+ for (const line of logs.logs) save(line)
286
+ status(id, { lastHistoryAt: new Date().toISOString(), historyError: null, replayLines: logs.logs.length, replayMayBeTruncated: logs.logs.length >= 400 })
287
+ } catch (error) { if (!stopped && !controller.signal.aborted) status(id, { historyError: error.message }) }
288
+ })()
289
+ for await (const event of stream) {
290
+ if (stopped || controller.signal.aborted) break
291
+ store.source(id, { status: 'watching', error: null, lastContactAt: new Date().toISOString() })
292
+ const payload = event.payload
293
+ if (payload.case === 'log') save(payload.value, event.cursor)
294
+ else if (payload.case === 'sandbox') refresh()
295
+ else if (payload.case) {
296
+ const original = JSON.parse(JSON.stringify(payload.value, (_, v) => typeof v === 'bigint' ? v.toString() : v))
297
+ const saved = store.ingest({ ...(payload.case === 'warning' ? { id: randomUUID() } : {}), sandbox: sandbox.name, kind: 'event', category: 'EVENT', source: original.source || 'gateway-watch', action: payload.case === 'warning' ? 'STREAM_WARNING' : original.reason || payload.case, severity: original.type || (payload.case === 'warning' ? 'WARN' : null), original, message: original.message || JSON.stringify(original), at: iso(original.eventTime), sourceCursor: event.cursor || null }, id)
298
+ if (payload.case === 'warning') status(id, { gapPossible: true, warning: original.message, gapSince: new Date().toISOString() })
299
+ if (saved) emit('log', saved)
300
+ }
301
+ // Advance only after the corresponding evidence has been persisted.
302
+ if (event.cursor && event.cursor > cursor) { cursor = event.cursor; store.source(id, { cursor }) }
303
+ }
304
+ await recovery
305
+ if (!stopped && !controller.signal.aborted) status(id, { status: 'disconnected', gapSince: new Date().toISOString(), gapPossible: true })
306
+ } catch (error) {
307
+ if (!stopped && !controller.signal.aborted) {
308
+ const code = error.connectCode ?? error.code ?? error.cause?.code
309
+ const invalidCursor = Boolean(cursor) && [3, 11].includes(code)
310
+ status(id, { status: 'disconnected', error: error.message, gapSince: new Date().toISOString(), gapPossible: true, ...(invalidCursor ? { cursor: '', warning: 'Saved cursor is no longer available. Falling back to bounded history replay.' } : {}) })
311
+ const gap = store.ingest({ id: randomUUID(), sandbox: sandbox.name, at: new Date().toISOString(), kind: 'event', category: 'EVENT', action: 'COLLECTION_INTERRUPTED', severity: 'WARN', source: 'console-collector', message: error.message, reason: invalidCursor ? 'Resume cursor rejected; history may be incomplete' : 'Source stream interrupted; resume will be attempted' }, id)
312
+ if (gap) emit('log', gap)
313
+ }
314
+ }
315
+ if (watches.get(id) === controller) watches.delete(id)
316
+ }
317
+ return {
318
+ start() {
319
+ if (timer) return
320
+ stopped = false
321
+ for (const source of store.coverage().sources) store.source(source.id, { status: 'unverified', gapPossible: true })
322
+ refresh(); timer = setInterval(refresh, interval)
323
+ },
324
+ stop() { stopped = true; clearInterval(timer); clearTimeout(healthTimer); timer = null; healthTimer = null; for (const controller of watches.values()) controller.abort(); watches.clear() },
325
+ add(res) { clients.add(res); if (lastList) res.write(`event: sandboxes\ndata: ${lastList}\n\n`); res.write(`event: collection\ndata: ${JSON.stringify(store.coverage())}\n\n`) },
326
+ remove(res) { clients.delete(res) },
327
+ logsDeleted(result) { emit('activity-deleted', result); health() },
328
+ contextChanged() { emit('context-changed', {}); for (const res of clients) res.end(); clients.clear() },
329
+ }
330
+ }
331
+
332
+ // ---- router -----------------------------------------------------------------
333
+
334
+ export function openshellApi(security = createSecurity(cloudConfig()), token = createLaunchToken()) {
335
+ const configure = (server) => {
336
+ const logger = server.config.logger
337
+ const api = createOpenShellApi({ httpServer: server.httpServer, logger, security, token })
338
+ server.middlewares.use(api.middleware)
339
+ if (security.config.mode !== 'local') return
340
+ const link = () => { const { address, port } = server.httpServer.address(); return tokenUrl(address, port, token) }
341
+ const printUrls = server.printUrls?.bind(server)
342
+ if (printUrls) server.printUrls = () => { printUrls(); logger.info(` ➜ Console: ${link()} (open this link)`) }
343
+ else server.httpServer?.once('listening', () => logger.info(`OpenRod console (open this link): ${link()}`))
344
+ }
345
+ return { name: 'openshell-console-api', configureServer: configure, configurePreviewServer: configure }
346
+ }
347
+
348
+ // Both Vite and the installed CLI use this exact HTTP/WebSocket lifecycle.
349
+ export function createOpenShellApi({ httpServer, logger = console, security = createSecurity(cloudConfig()), token = createLaunchToken() } = {}) {
350
+ const gate = security.config.mode === 'local' ? createTokenGate(token) : null
351
+ const runtimes = new Map(), streams = new Set(), sockets = new Set(), pending = new Set(), responses = new Set()
352
+ const localCloud = security.config.mode === 'local' ? createLocalCloud({ native: createLocalCloudNative() }) : null
353
+ const cloudOff = security.config.mode === 'local' && !cloudOrigin()
354
+ const initialContext = contextSelection()
355
+ const initialKey = contextKey(initialContext)
356
+ let stopSweeper = null
357
+ let active = null, closed = false, closing
358
+ function runtimeFor(context) {
359
+ return runWithContext(context, () => {
360
+ const key = contextKey()
361
+ if (!runtimes.has(key)) {
362
+ const directory = scopedStateDirectory()
363
+ const store = createActivityStore(path.join(directory, 'activity.sqlite'))
364
+ let delivery
365
+ try { delivery = createActivityDelivery(path.join(directory, 'activity-delivery.sqlite'), store) }
366
+ catch (error) { store.close(); throw error }
367
+ const hub = createHub(store, { connect: () => gateway(context) })
368
+ delivery.start()
369
+ // Reapplying organization policy is opt-in and stays on the startup
370
+ // scope. Merely opening or switching consoles must not rewrite policy.
371
+ const stopOrgSweeper = process.env.OPENSHELL_CONSOLE_SWEEP === '1' && key === initialKey
372
+ ? startOrgSweeper((message) => logger.info(`[org] ${message}`)) : () => {}
373
+ runtimes.set(key, { store, delivery, hub, context, stopOrgSweeper })
374
+ }
375
+ return runtimes.get(key)
376
+ })
377
+ }
378
+ function activate(context) {
379
+ if (closed) return
380
+ stopSweeper ??= startSweeper((message) => logger.info(`[ingress] ${message}`))
381
+ const next = runtimeFor(context)
382
+ if (active !== next) {
383
+ if (active) { active.hub.contextChanged(); active.hub.stop() }
384
+ active = next
385
+ if (httpServer?.listening) runWithContext(next.context, () => next.hub.start())
386
+ }
387
+ return next
388
+ }
389
+ const sshHosts = security.config.mode === 'local' ? createSshHostStore() : null
390
+ const remoteConnections = security.config.mode === 'local' ? createRemoteConnections({
391
+ onSelected: activate,
392
+ onDeselected: () => {
393
+ if (active) { active.hub.contextChanged(); active.hub.stop(); active = null }
394
+ },
395
+ logger,
396
+ }) : null
397
+ const inventory = createLocationInventory({
398
+ connections: remoteConnections, listSandboxes, listTemplates: listImageTemplates, logger,
399
+ defaultLabel: security.config.mode === 'local' ? 'Local' : 'Cloud',
400
+ })
401
+ const start = async () => {
402
+ if (closed || (security.config.mode === 'local' && !contextConfigured())) return
403
+ if (remoteConnections && /^console-ssh-[a-f0-9]{24}$/.test(initialContext.gateway)) {
404
+ const remote = (await remoteConnections.locationSnapshot()).remote
405
+ if (remote?.gateway !== initialContext.gateway || remote.status !== 'connected') return
406
+ }
407
+ if (!closed) activate(initialContext)
408
+ }
409
+ const upgrade = async (req, socket, head) => {
410
+ if (closed) { socket.destroy(); return }
411
+ try {
412
+ if (gate?.upgrade(req, socket)) return
413
+ if (localCloud?.upgrade(req, socket, head)) return
414
+ const pathname = requestPath(req)
415
+ if (!['/api/os/terminal', '/api/os/ssh'].includes(pathname)) return
416
+ const identity = await security.authenticate(req)
417
+ if (socket.destroyed || closed) { socket.destroy(); return }
418
+ if (identity) security.watch(req, socket, identity)
419
+ const locations = remoteConnections ? await inventory.locations() : null
420
+ if (socket.destroyed || closed) { socket.destroy(); return }
421
+ const allowContext = plan => locations
422
+ ? locations.some(location => location.connected && location.context === contextKey(plan))
423
+ : contextKey(plan) === contextKey()
424
+ const handled = pathname === '/api/os/ssh'
425
+ ? cloudSshUpgrade(req, socket, head, security.isAllowed, identity, { allowContext })
426
+ : terminalUpgrade(req, socket, head, security.isAllowed, identity?.uid, allowContext)
427
+ if (handled) {
428
+ sockets.add(socket)
429
+ socket.once('close', () => sockets.delete(socket))
430
+ }
431
+ } catch (error) { socket.end(`HTTP/1.1 ${error.status === 400 ? '400 Bad Request' : '403 Forbidden'}\r\nConnection: close\r\n\r\n`) }
432
+ }
433
+ function close() {
434
+ if (closed) return closing
435
+ closed = true
436
+ localCloud?.close()
437
+ httpServer?.off('listening', start)
438
+ httpServer?.off('upgrade', upgrade)
439
+ httpServer?.off('close', close)
440
+ for (const res of streams) res.end()
441
+ for (const socket of sockets) socket.destroy()
442
+ stopSweeper?.()
443
+ for (const runtime of runtimes.values()) { runtime.hub.stop(); runtime.stopOrgSweeper() }
444
+ const drain = [remoteConnections?.close(), ...pending, ...[...responses].filter((res) => !res.destroyed && !res.writableFinished)
445
+ .map((res) => new Promise((resolve) => res.once('close', resolve)))]
446
+ closing = Promise.allSettled(drain).then(() => {
447
+ for (const runtime of runtimes.values()) { runtime.delivery.stop(); runtime.store.close() }
448
+ streams.clear(); sockets.clear(); runtimes.clear()
449
+ })
450
+ return closing
451
+ }
452
+ httpServer?.on('upgrade', upgrade)
453
+ httpServer?.once('close', close)
454
+ if (httpServer?.listening) start()
455
+ else httpServer?.once('listening', start)
456
+ const route = (req, res, next = () => res.writeHead(404).end()) => {
457
+ let pathname
458
+ try { pathname = requestPath(req) } catch { res.writeHead(400).end(); return }
459
+ if (pathname !== '/api/os' && !pathname.startsWith('/api/os/')) return next()
460
+ if (!security.isAllowed(req)) { res.writeHead(403).end(); return }
461
+ if (closed) { res.writeHead(503).end(); return }
462
+ responses.add(res)
463
+ res.once('close', () => responses.delete(res))
464
+ const operation = runWithContext(contextSelection(), async () => {
465
+ try {
466
+ const url = new URL(req.url, 'http://local')
467
+ const parts = url.pathname.slice('/api/os'.length).split('/').filter(Boolean)
468
+ assertCloudOperation(parts)
469
+ if (cloudOff && ['cloud-export', 'cloud-import', 'cloud-transfer'].includes(parts[0])) return send(res, 409, { error: CLOUD_SOON })
470
+ if (security.config.mode !== 'local' && (parts[0] === 'connections' || (parts[0] === 'context' && req.method !== 'GET') || (parts[0] === 'sandboxes' && ['ssh', 'ssh-open', 'ssh-config'].includes(parts[2])))) throw fail('Host-local actions are unavailable in OpenRod Cloud.', 403)
471
+ const requestedContext = req.headers['x-openshell-context'] ?? url.searchParams.get('context')
472
+ let owner = contextSelection()
473
+ const explicitLocation = req.headers['x-openshell-location'] === '1' || url.searchParams.get('location') === '1'
474
+ if (explicitLocation && security.config.mode === 'local') owner = await inventory.resolve(requestedContext)
475
+ else if (requestedContext != null && requestedContext !== contextKey() && !(req.method === 'GET' && parts[0] === 'connections')) return send(res, 409, { error: 'Console context changed. Reload before continuing.' })
476
+ return await runWithContext(owner, async () => {
477
+ // Connection discovery is available before any gateway is selected.
478
+ // Job reads remain available after that job changes the context.
479
+ if (parts[0] === 'connections') {
480
+ if (req.method === 'GET' && parts.length === 1) {
481
+ const overview = await remoteConnections.overview()
482
+ const saved = new Map((await sshHosts.list()).map(host => [host.alias, host]))
483
+ return send(res, 200, { ...overview, hosts: overview.hosts.map(host => saved.has(host.name) ? { ...host, managed: true, label: saved.get(host.name).name, address: `${saved.get(host.name).user ? saved.get(host.name).user + '@' : ''}${saved.get(host.name).host}${saved.get(host.name).port ? ':' + saved.get(host.name).port : ''}` } : host) })
484
+ }
485
+ if (req.method === 'GET' && parts.length === 3 && parts[1] === 'jobs') return send(res, 200, remoteConnections.job(parts[2]))
486
+ if (req.method === 'POST' && parts.length === 4 && parts[1] === 'jobs' && parts[3] === 'package') {
487
+ if (req.headers.origin !== security.originFor(req) || req.headers['content-type'] !== 'application/octet-stream' || req.headers['x-openshell-console'] !== '1') return send(res, 403, { error: 'Request rejected' })
488
+ return send(res, 200, await remoteConnections.upload(parts[2], req))
489
+ }
490
+ if (!isMutation(req, security)) return send(res, 403, { error: 'Request rejected' })
491
+ const input = await body(req)
492
+ if (parts.length === 2 && parts[1] === 'connect') return send(res, 200, remoteConnections.begin(input))
493
+ if (parts.length === 3 && parts[1] === 'hosts' && parts[2] === 'scan') return send(res, 200, await sshHosts.scan(input))
494
+ if (parts.length === 2 && parts[1] === 'hosts') return send(res, 201, await sshHosts.add(input.token))
495
+ if (parts.length === 3 && parts[1] === 'hosts' && parts[2] === 'remove') {
496
+ const current = (await remoteConnections.overview()).active
497
+ if (current?.host === input.alias && ['connected', 'connecting'].includes(current.status)) throw fail('Disconnect from this machine before removing it.', 409)
498
+ return send(res, 200, await sshHosts.remove(input.alias))
499
+ }
500
+ if (parts.length === 2 && parts[1] === 'disconnect') return send(res, 200, await remoteConnections.disconnect())
501
+ if (parts.length === 2 && parts[1] === 'forget') {
502
+ const result = await remoteConnections.forget()
503
+ await inventory.forget()
504
+ return send(res, 200, result)
505
+ }
506
+ if (parts.length === 4 && parts[1] === 'jobs' && parts[3] === 'docker') return send(res, 200, remoteConnections.installDocker(parts[2], input.approve))
507
+ if (parts.length === 4 && parts[1] === 'jobs' && parts[3] === 'install') {
508
+ if (input.method !== 'download') throw fail('Choose remote download or upload a runtime package.')
509
+ return send(res, 200, remoteConnections.download(parts[2]))
510
+ }
511
+ return send(res, 404, { error: 'Not found' })
512
+ }
513
+ if (req.method === 'GET' && parts.length === 1) {
514
+ if (parts[0] === 'context') {
515
+ const remote = remoteConnections ? (await remoteConnections.locationSnapshot()).remote : null
516
+ const disconnected = remote?.gateway === contextSelection().gateway && remote.status !== 'connected'
517
+ return send(res, 200, {
518
+ ...await consoleContext({ probe: !disconnected }),
519
+ ...(disconnected ? { workspaceError: remote.error || 'This SSH location is disconnected.' } : {}),
520
+ ...(security.config.mode !== 'local' ? { configured: true } : {}),
521
+ })
522
+ }
523
+ }
524
+ if (req.method === 'GET' && parts.length === 1 && parts[0] === 'inventory') return send(res, 200, await inventory.refresh())
525
+ if (isMutation(req, security)) {
526
+ if (parts[0] === 'local-catalog' && parts.length === 1) {
527
+ if (!remoteConnections) throw fail('Local catalogs are available only through a local SSH console.', 403)
528
+ const snapshot = await remoteConnections.locationSnapshot()
529
+ if (snapshot.remote?.status !== 'connected' || snapshot.remote.gateway !== owner.gateway) throw fail('Connect the SSH destination before loading local settings.', 409)
530
+ const { syncLocalCatalog } = await import('./local-catalog.js')
531
+ const architecture = remoteConnections.architecture()
532
+ if (!architecture) throw fail('Reconnect the SSH destination before loading local settings.', 409)
533
+ return send(res, 200, await syncLocalCatalog(snapshot.returnContext, { architecture: architecture === 'amd64' ? 'x64' : 'arm64' }))
534
+ }
535
+ if (parts[0] === 'context' && parts.length === 1) {
536
+ if (remoteConnections.changing()) throw fail('Wait for the connection operation before changing workspace.', 409)
537
+ const input = await body(req)
538
+ const remote = (await remoteConnections.locationSnapshot()).remote
539
+ if (remote?.gateway === (input.gateway ?? contextSelection().gateway)) await inventory.resolve(contextKey(remote))
540
+ const result = await selectConsoleContext(input)
541
+ await remoteConnections.locationSnapshot()
542
+ activate({ gateway: result.gateway, workspace: result.workspace })
543
+ return send(res, 200, result)
544
+ }
545
+ }
546
+ if (security.config.mode === 'local' && !contextConfigured() && !explicitLocation) return send(res, 428, { error: 'Choose Local or an SSH host and connect before accessing sandboxes.', setupRequired: true })
547
+ if (remoteConnections && !explicitLocation && !['context', 'connections'].includes(parts[0])) {
548
+ const remote = (await remoteConnections.locationSnapshot()).remote
549
+ if (remote?.gateway === contextSelection().gateway) await inventory.resolve(contextKey())
550
+ }
551
+ const { store, delivery, hub } = runtimeFor(contextSelection())
552
+ if (req.method === 'GET') {
553
+ if (parts[0] === 'stream') {
554
+ res.writeHead(200, { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-store', Connection: 'keep-alive' })
555
+ res.write(': connected\n\n')
556
+ const ping = setInterval(() => res.write(': ping\n\n'), 15000)
557
+ streams.add(res)
558
+ hub.add(res)
559
+ res.on('close', () => { clearInterval(ping); streams.delete(res); hub.remove(res) })
560
+ return
561
+ }
562
+ if (parts[0] === 'cloud-export') return send(res, 200, await exportTransfer({ name: url.searchParams.get('name') }))
563
+ if (parts[0] === 'overview') return send(res, 200, await overview())
564
+ if (parts[0] === 'sandboxes' && parts.length === 1) return send(res, 200, await listSandboxes())
565
+ if (parts[0] === 'sandboxes' && parts.length === 2 && NAME.test(parts[1])) return send(res, 200, await sandboxDetail(parts[1]))
566
+ if (parts[0] === 'activity-destinations' && parts.length === 1) return send(res, 200, delivery.list())
567
+ if (parts[0] === 'activity' && (parts.length === 1 || (parts.length === 2 && parts[1] === 'export'))) {
568
+ const only = url.searchParams.get('sandbox')
569
+ if (only && !NAME.test(only)) throw fail('Unknown sandbox.')
570
+ const options = JSON.parse(url.searchParams.get('query') || '{}')
571
+ if (only) options.sandboxes = [only]
572
+ if (parts[1] === 'export') {
573
+ const format = url.searchParams.get('format') || 'json'
574
+ if (!['json', 'ocsf'].includes(format)) throw fail('Unknown export format')
575
+ const first = store.query({ ...options, limit: 500, offset: 0, snapshot: undefined })
576
+ res.writeHead(200, { 'Content-Type': 'application/json', 'Content-Disposition': `attachment; filename="openshell-activity${format === 'ocsf' ? '-ocsf' : ''}.json"`, 'Cache-Control': 'no-store' })
577
+ function* chunks() {
578
+ yield format === 'ocsf' ? '[' : JSON.stringify({ exportedAt: new Date().toISOString(), query: options, coverage: first.coverage, total: first.total }).slice(0, -1) + ',"events":['
579
+ let page = first, comma = ''
580
+ while (true) {
581
+ for (const event of page.events) { yield comma + JSON.stringify(exportEvent(event, format, options.columns)); comma = ',' }
582
+ if (page.nextOffset === null) break
583
+ page = store.query({ ...options, limit: 500, snapshot: first.snapshot, offset: page.nextOffset, now: first.now })
584
+ }
585
+ yield format === 'ocsf' ? ']' : ']}'
586
+ }
587
+ const stream = Readable.from(chunks())
588
+ stream.on('error', (error) => res.destroy(error))
589
+ res.on('close', () => stream.destroy())
590
+ stream.pipe(res)
591
+ return
592
+ }
593
+ return send(res, 200, store.query(options))
594
+ }
595
+ if (parts[0] === 'downloads' && parts.length === 2) return serveDownload(res, parts[1])
596
+ const routed = (await sshRoute('GET', parts)) ?? (await setupRoute('GET', parts)) ?? (await deploymentRoute('GET', parts)) ?? (await editorRoute('GET', parts)) ?? (await filesRoute('GET', parts, undefined, url)) ?? (await imageTemplateRoute('GET', parts)) ?? (await ingressRoute('GET', parts)) ?? (await orgRoute('GET', parts)) ?? (await policyRoute('GET', parts))
597
+ if (routed !== undefined) return send(res, 200, routed)
598
+ return send(res, 404, { error: 'Not found' })
599
+ }
600
+ // One dropped file per request, streamed to a staging folder.
601
+ if (req.method === 'POST' && parts[0] === 'files' && parts[2] === 'uploads' && parts.length === 4 && NAME.test(parts[1])) {
602
+ if (req.headers.origin !== security.originFor(req) || req.headers['content-type'] !== 'application/octet-stream' || req.headers['x-openshell-console'] !== '1') return send(res, 403, { error: 'Request rejected' })
603
+ return send(res, 200, await receiveUpload(req, parts[1], parts[3], url.searchParams.get('path')))
604
+ }
605
+ if (!isMutation(req, security)) return send(res, 403, { error: 'Request rejected' })
606
+ if (parts[0] === 'cloud-import' && ['worker', 'local'].includes(security.config.mode)) return send(res, 200, await importTransfer(req, { createSandbox: input => createSandbox(input, { sessionOverride: true }) }))
607
+ const input = await body(req, ['image-templates', 'activity'].includes(parts[0]) ? 512 * 1024 : parts[0] === 'setups' ? 128 * 1024 : 65536)
608
+ assertCloudOperation(parts, input)
609
+ if (parts[0] === 'cloud-transfer' && security.config.mode === 'local') return send(res, 200, await localTransfer(input))
610
+ if (parts[0] === 'activity' && parts.length === 2) {
611
+ if (parts[1] === 'delete-preview') return send(res, 200, store.previewDeletion(input))
612
+ if (parts[1] === 'delete') {
613
+ const result = store.deleteLogs(input.token)
614
+ delivery.logsDeleted()
615
+ hub.logsDeleted(result)
616
+ return send(res, 200, result)
617
+ }
618
+ }
619
+ if (parts[0] === 'activity-destinations') {
620
+ if (parts.length === 1) return send(res, 200, delivery.create(input))
621
+ if (parts.length === 3) return send(res, 200, parts[2] === 'test' ? await delivery.test(parts[1]) : delivery.change(parts[1], parts[2]))
622
+ }
623
+ if (parts[0] === 'sandboxes' && parts.length === 1) return send(res, 200, await createSandbox(input))
624
+ if (parts[0] === 'sandboxes' && parts.length === 3 && NAME.test(parts[1]) && ['stop', 'start', 'delete'].includes(parts[2])) {
625
+ return send(res, 200, await lifecycle(parts[1], parts[2]))
626
+ }
627
+ const routed = (await cloudSshRoute('POST',parts,input)) ?? (await sshRoute('POST', parts, input)) ?? (await setupRoute('POST', parts, input)) ?? (await deploymentRoute('POST', parts, input)) ?? (await editorRoute('POST', parts, input)) ?? (await terminalRoute('POST', parts, input)) ?? (await filesRoute('POST', parts, input)) ?? (await imageTemplateRoute('POST', parts, input)) ?? (await ingressRoute('POST', parts, input)) ?? (await orgRoute('POST', parts, input)) ?? (await policyRoute('POST', parts, input))
628
+ if (routed !== undefined) return send(res, 200, routed)
629
+ return send(res, 404, { error: 'Not found' })
630
+ })
631
+ } catch (error) {
632
+ // Gateway errors carry a readable message; nothing here includes credentials.
633
+ if (res.headersSent) res.destroy(error)
634
+ else send(res, error.status ?? 502, { error: error.rawMessage ?? error.message ?? 'Gateway request failed', ...(error.code === 'TEMPLATE_IN_USE' ? { code: error.code, sandboxes: error.sandboxes } : {}) })
635
+ }
636
+ })
637
+ pending.add(operation)
638
+ operation.then(() => pending.delete(operation), () => pending.delete(operation))
639
+ return operation
640
+ }
641
+ const middleware = (req, res, next) => {
642
+ if (closed) { res.writeHead(503).end(); return }
643
+ if (gate?.http(req, res)) return
644
+ const authenticate = () => security.middleware(req, res, () => route(req, res, next))
645
+ return localCloud ? localCloud.middleware(req, res, authenticate) : authenticate()
646
+ }
647
+ return { middleware, close, token }
648
+ }