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.
- package/LICENSE +201 -0
- package/NOTICE +8 -0
- package/README.md +58 -2
- package/SETUPS.md +75 -0
- package/THIRD_PARTY_NOTICES.md +15823 -0
- package/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/assets/index-CEZ0R3YS.js +522 -0
- package/dist/assets/index-DYjVZRjW.css +1 -0
- package/dist/assets/index.esm-BVqeoYDn.js +376 -0
- package/dist/assets/index.esm-CXAOoF3i.js +16 -0
- package/dist/assets/index.esm-D0s8MSqt.js +1666 -0
- package/dist/assets/pixelify-sans-cyrillic-wght-normal-BfQLqnEI.woff2 +0 -0
- package/dist/assets/pixelify-sans-latin-ext-wght-normal-CsF3XSp0.woff2 +0 -0
- package/dist/assets/pixelify-sans-latin-wght-normal-Cbhn5ptY.woff2 +0 -0
- package/dist/assets/terminal-view-6GBZ9nXN.css +32 -0
- package/dist/assets/terminal-view-CkPFNoXi.js +40 -0
- package/dist/favicon.png +0 -0
- package/dist/index.html +16 -0
- package/dist/logos/SOURCES.md +133 -0
- package/dist/logos/agents/aider.svg +1 -0
- package/dist/logos/agents/antigravity.svg +1 -0
- package/dist/logos/agents/claudecode.svg +1 -0
- package/dist/logos/agents/codex.svg +1 -0
- package/dist/logos/agents/copilot.svg +1 -0
- package/dist/logos/agents/cursor.svg +1 -0
- package/dist/logos/agents/factory.svg +1 -0
- package/dist/logos/agents/gemini.svg +1 -0
- package/dist/logos/agents/kiro.svg +1 -0
- package/dist/logos/agents/openclaw-color.svg +1 -0
- package/dist/logos/agents/opencode.svg +1 -0
- package/dist/logos/agents/pi.svg +1 -0
- package/dist/logos/anthropic.svg +1 -0
- package/dist/logos/aws-bedrock.svg +1 -0
- package/dist/logos/aws-s3.svg +1 -0
- package/dist/logos/aws.svg +1 -0
- package/dist/logos/claude-code.svg +1 -0
- package/dist/logos/codex.svg +1 -0
- package/dist/logos/copilot.svg +1 -0
- package/dist/logos/cursor.svg +1 -0
- package/dist/logos/deepinfra.svg +1 -0
- package/dist/logos/github.svg +1 -0
- package/dist/logos/google-cloud.svg +1 -0
- package/dist/logos/google-vertex-ai.svg +1 -0
- package/dist/logos/nvidia.svg +1 -0
- package/dist/logos/openai.svg +1 -0
- package/dist/logos/openrouter.svg +1 -0
- package/dist/logos/pypi.svg +1 -0
- package/dist/logos/templates/debian.svg +1 -0
- package/dist/logos/templates/nodejs.svg +1 -0
- package/dist/logos/templates/python.svg +1 -0
- package/dist/logos/templates/ubuntu.svg +1 -0
- package/dist/logos/vscode.svg +1 -0
- package/dist/openrod.png +0 -0
- package/node_modules/@bufbuild/protobuf/README.md +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.d.ts +6 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.d.ts +140 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.d.ts +79 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.d.ts +63 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.d.ts +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.d.ts +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.d.ts +145 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.d.ts +85 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +296 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.d.ts +634 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.d.ts +46 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.d.ts +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.d.ts +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +415 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.d.ts +73 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +1037 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.d.ts +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +131 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.d.ts +20 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.d.ts +49 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +157 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.d.ts +30 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.d.ts +107 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.d.ts +45 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +292 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.d.ts +217 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +469 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +954 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +437 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.d.ts +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +625 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.d.ts +34 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.d.ts +76 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.d.ts +135 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +188 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.d.ts +286 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +726 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +37 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.d.ts +69 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.d.ts +53 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.d.ts +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +334 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.d.ts +38 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +68 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +892 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +126 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +59 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +242 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.d.ts +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.d.ts +6 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.d.ts +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.d.ts +79 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.d.ts +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.d.ts +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.d.ts +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.d.ts +145 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.d.ts +85 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +293 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.d.ts +634 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.d.ts +46 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.d.ts +60 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.d.ts +48 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +409 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.d.ts +73 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +1029 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.d.ts +16 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +128 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.d.ts +20 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.d.ts +49 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +152 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.d.ts +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.d.ts +107 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.d.ts +45 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +284 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.d.ts +217 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +464 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +948 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +433 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.d.ts +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +620 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.d.ts +34 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.d.ts +76 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.d.ts +135 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +184 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +286 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +721 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.d.ts +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.d.ts +53 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.d.ts +70 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +325 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.d.ts +38 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +65 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +888 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +123 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +103 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +56 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +64 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.d.ts +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
- package/node_modules/@bufbuild/protobuf/package.json +147 -0
- package/node_modules/@connectrpc/connect/README.md +62 -0
- package/node_modules/@connectrpc/connect/dist/cjs/any-client.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/any-client.js +33 -0
- package/node_modules/@connectrpc/connect/dist/cjs/call-options.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/cjs/call-options.js +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/callback-client.d.ts +31 -0
- package/node_modules/@connectrpc/connect/dist/cjs/callback-client.js +116 -0
- package/node_modules/@connectrpc/connect/dist/cjs/code.d.ts +75 -0
- package/node_modules/@connectrpc/connect/dist/cjs/code.js +92 -0
- package/node_modules/@connectrpc/connect/dist/cjs/connect-error.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/cjs/connect-error.js +141 -0
- package/node_modules/@connectrpc/connect/dist/cjs/context-values.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/cjs/context-values.js +41 -0
- package/node_modules/@connectrpc/connect/dist/cjs/cors.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/cjs/cors.js +82 -0
- package/node_modules/@connectrpc/connect/dist/cjs/http-headers.d.ts +37 -0
- package/node_modules/@connectrpc/connect/dist/cjs/http-headers.js +63 -0
- package/node_modules/@connectrpc/connect/dist/cjs/implementation.d.ts +159 -0
- package/node_modules/@connectrpc/connect/dist/cjs/implementation.js +78 -0
- package/node_modules/@connectrpc/connect/dist/cjs/index.d.ts +22 -0
- package/node_modules/@connectrpc/connect/dist/cjs/index.js +46 -0
- package/node_modules/@connectrpc/connect/dist/cjs/interceptor.d.ts +170 -0
- package/node_modules/@connectrpc/connect/dist/cjs/interceptor.js +30 -0
- package/node_modules/@connectrpc/connect/dist/cjs/package.json +1 -0
- package/node_modules/@connectrpc/connect/dist/cjs/promise-client.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/cjs/promise-client.js +135 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/async-iterable.d.ts +527 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/async-iterable.js +913 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/compression.d.ts +48 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/compression.js +75 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/content-type-matcher.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/content-type-matcher.js +43 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/create-method-url.d.ts +17 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/create-method-url.js +36 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/envelope.d.ts +90 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/envelope.js +214 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/index.d.ts +25 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/index.js +95 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/invoke-implementation.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/invoke-implementation.js +178 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/limit-io.d.ts +24 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/limit-io.js +80 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/normalize.d.ts +11 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/normalize.js +55 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-handler-factory.d.ts +18 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-handler-factory.js +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-headers.d.ts +9 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-headers.js +67 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/run-call.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/run-call.js +125 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/serialization.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/serialization.js +149 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/signals.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/signals.js +100 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/transport-options.d.ts +98 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/transport-options.js +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-fetch.d.ts +35 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-fetch.js +150 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler-client.d.ts +7 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler-client.js +88 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler.d.ts +167 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler.js +130 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal.d.ts +102 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal.js +78 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/code-string.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/code-string.js +52 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/content-type.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/content-type.js +71 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/end-stream.d.ts +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/end-stream.js +137 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/error-json.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/error-json.js +166 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/get-request.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/get-request.js +66 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/handler-factory.js +296 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/headers.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/headers.js +32 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/http-status.d.ts +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/http-status.js +90 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/index.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/index.js +81 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/parse-timeout.js +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/query-params.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/query-params.js +24 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/request-header.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/request-header.js +70 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/trailer-mux.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/trailer-mux.js +53 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/transport.js +210 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/validate-response.d.ts +30 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/validate-response.js +71 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/version.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/version.js +58 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/content-type.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/content-type.js +38 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/gen/status_pb.d.ts +91 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/gen/status_pb.js +27 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/handler-factory.js +124 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/headers.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/headers.js +29 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/http-status.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/http-status.js +46 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/index.d.ts +10 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/index.js +61 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/parse-timeout.js +53 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/request-header.js +56 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/trailer-status.d.ts +28 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/trailer-status.js +118 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/transport.js +185 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-response.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-response.js +75 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-trailer.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-trailer.js +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/content-type.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/content-type.js +41 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/handler-factory.js +130 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/headers.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/headers.js +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/index.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/index.js +61 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/request-header.js +59 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/trailer.d.ts +27 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/trailer.js +71 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/transport.js +234 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/validate-response.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/validate-response.js +73 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router-transport.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router-transport.js +32 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router.d.ts +81 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router.js +68 -0
- package/node_modules/@connectrpc/connect/dist/cjs/transport.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/cjs/transport.js +15 -0
- package/node_modules/@connectrpc/connect/dist/esm/any-client.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/any-client.js +30 -0
- package/node_modules/@connectrpc/connect/dist/esm/call-options.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/call-options.js +14 -0
- package/node_modules/@connectrpc/connect/dist/esm/callback-client.d.ts +31 -0
- package/node_modules/@connectrpc/connect/dist/esm/callback-client.js +113 -0
- package/node_modules/@connectrpc/connect/dist/esm/code.d.ts +75 -0
- package/node_modules/@connectrpc/connect/dist/esm/code.js +89 -0
- package/node_modules/@connectrpc/connect/dist/esm/connect-error.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/esm/connect-error.js +137 -0
- package/node_modules/@connectrpc/connect/dist/esm/context-values.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/context-values.js +37 -0
- package/node_modules/@connectrpc/connect/dist/esm/cors.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/esm/cors.js +79 -0
- package/node_modules/@connectrpc/connect/dist/esm/http-headers.d.ts +37 -0
- package/node_modules/@connectrpc/connect/dist/esm/http-headers.js +58 -0
- package/node_modules/@connectrpc/connect/dist/esm/implementation.d.ts +159 -0
- package/node_modules/@connectrpc/connect/dist/esm/implementation.js +73 -0
- package/node_modules/@connectrpc/connect/dist/esm/index.d.ts +22 -0
- package/node_modules/@connectrpc/connect/dist/esm/index.js +27 -0
- package/node_modules/@connectrpc/connect/dist/esm/interceptor.d.ts +170 -0
- package/node_modules/@connectrpc/connect/dist/esm/interceptor.js +27 -0
- package/node_modules/@connectrpc/connect/dist/esm/promise-client.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/esm/promise-client.js +128 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/async-iterable.d.ts +527 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/async-iterable.js +891 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/compression.d.ts +48 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/compression.js +71 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/content-type-matcher.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/content-type-matcher.js +40 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/create-method-url.d.ts +17 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/create-method-url.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/envelope.d.ts +90 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/envelope.js +206 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/index.d.ts +25 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/index.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/invoke-implementation.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/invoke-implementation.js +173 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/limit-io.d.ts +24 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/limit-io.js +75 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/normalize.d.ts +11 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/normalize.js +51 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-handler-factory.d.ts +18 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-handler-factory.js +14 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-headers.d.ts +9 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-headers.js +64 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/run-call.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/run-call.js +121 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/serialization.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/serialization.js +141 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/signals.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/signals.js +95 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/transport-options.d.ts +98 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/transport-options.js +14 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-fetch.d.ts +35 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-fetch.js +142 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler-client.d.ts +7 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler-client.js +85 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler.d.ts +167 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler.js +124 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal.d.ts +102 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal.js +74 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/code-string.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/code-string.js +48 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/content-type.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/content-type.js +66 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/end-stream.d.ts +44 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/end-stream.js +131 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/error-json.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/error-json.js +160 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/get-request.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/get-request.js +63 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/handler-factory.js +293 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/headers.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/headers.js +29 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/http-status.d.ts +15 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/http-status.js +86 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/index.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/index.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/parse-timeout.js +41 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/query-params.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/query-params.js +21 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/request-header.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/request-header.js +66 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/trailer-mux.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/trailer-mux.js +49 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/transport.js +207 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/validate-response.d.ts +30 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/validate-response.js +67 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/version.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/version.js +53 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/content-type.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/content-type.js +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/gen/status_pb.d.ts +91 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/gen/status_pb.js +24 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/handler-factory.js +121 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/headers.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/headers.js +26 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/http-status.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/http-status.js +43 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/index.d.ts +10 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/index.js +28 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/parse-timeout.js +50 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/request-header.js +52 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/trailer-status.d.ts +28 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/trailer-status.js +113 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/transport.js +182 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-response.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-response.js +71 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-trailer.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-trailer.js +41 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/content-type.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/content-type.js +37 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/handler-factory.js +127 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/headers.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/headers.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/index.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/index.js +26 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/request-header.js +55 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/trailer.d.ts +27 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/trailer.js +65 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/transport.js +231 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/validate-response.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/validate-response.js +69 -0
- package/node_modules/@connectrpc/connect/dist/esm/router-transport.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/router-transport.js +29 -0
- package/node_modules/@connectrpc/connect/dist/esm/router.d.ts +81 -0
- package/node_modules/@connectrpc/connect/dist/esm/router.js +65 -0
- package/node_modules/@connectrpc/connect/dist/esm/transport.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/esm/transport.js +14 -0
- package/node_modules/@connectrpc/connect/package.json +67 -0
- package/node_modules/@connectrpc/connect-node/README.md +144 -0
- package/node_modules/@connectrpc/connect-node/buf.gen.yaml +10 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/compression.d.ts +15 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/compression.js +96 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-node-adapter.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-node-adapter.js +60 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-transport.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-transport.js +25 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-transport.d.ts +95 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-transport.js +24 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-web-transport.d.ts +96 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-web-transport.js +25 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/http2-session-manager.d.ts +146 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/http2-session-manager.js +543 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/index.d.ts +14 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/index.js +34 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-error.d.ts +45 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-error.js +153 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-transport-options.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-transport-options.js +58 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-client.d.ts +54 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-client.js +347 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-handler.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-handler.js +225 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-header.d.ts +20 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-header.js +117 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/package.json +1 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/compression.d.ts +15 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/compression.js +93 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-node-adapter.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-node-adapter.js +57 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-transport.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-transport.js +22 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-transport.d.ts +95 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-transport.js +21 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-web-transport.d.ts +96 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-web-transport.js +22 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/http2-session-manager.d.ts +146 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/http2-session-manager.js +539 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/index.d.ts +14 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/index.js +21 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-error.d.ts +45 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-error.js +146 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-transport-options.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-transport-options.js +55 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-client.d.ts +54 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-client.js +344 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-handler.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-handler.js +221 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-header.d.ts +20 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-header.js +113 -0
- package/node_modules/@connectrpc/connect-node/package.json +44 -0
- package/node_modules/@nvidia/openshell-sdk/README.md +303 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.d.ts +1243 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.js +1321 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.d.ts +35 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.js +79 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.d.ts +301 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.js +69 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.d.ts +581 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.js +90 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.d.ts +9131 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.js +1898 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.d.ts +58 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.js +24 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.d.ts +1203 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.js +277 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.d.ts +7 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.js +6 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.d.ts +14 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.js +177 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.d.ts +6 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.js +15 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.d.ts +11 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.js +58 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.d.ts +35 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.js +97 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/package.json +58 -0
- package/package.json +93 -4
- package/server/activity-delivery.js +143 -0
- package/server/activity-store.js +168 -0
- package/server/agent-inventory.js +76 -0
- package/server/agent-resources.py +60 -0
- package/server/api.js +648 -0
- package/server/cli.js +168 -0
- package/server/cloud-connections.js +56 -0
- package/server/cloud-origin.js +11 -0
- package/server/cloud-proxy.js +122 -0
- package/server/cloud-ssh-proxy.cjs +73 -0
- package/server/cloud-ssh.js +135 -0
- package/server/cloud-transfer.js +221 -0
- package/server/compute.js +50 -0
- package/server/editor.js +114 -0
- package/server/egress.js +204 -0
- package/server/files.js +489 -0
- package/server/gateway-install.js +64 -0
- package/server/gateway.js +415 -0
- package/server/image-templates.js +393 -0
- package/server/ingress.js +185 -0
- package/server/launch-token.js +55 -0
- package/server/local-catalog.js +111 -0
- package/server/local-cloud-native.js +152 -0
- package/server/local-cloud.js +123 -0
- package/server/location-inventory.js +94 -0
- package/server/machines.js +84 -0
- package/server/openshell-cli.js +144 -0
- package/server/org.js +536 -0
- package/server/orphan-processes.js +42 -0
- package/server/paths.js +28 -0
- package/server/policy-template-store.js +92 -0
- package/server/policy.js +583 -0
- package/server/remote-gateway-state.js +123 -0
- package/server/remote-gateway.js +420 -0
- package/server/remote-hosts.js +354 -0
- package/server/remote-http.js +14 -0
- package/server/remote-image-engine.js +47 -0
- package/server/remote-runtime.js +65 -0
- package/server/remote-runtime.py +162 -0
- package/server/sandbox-identity.js +14 -0
- package/server/security.js +139 -0
- package/server/session-revocations.js +20 -0
- package/server/setup-artifact-installer.py +54 -0
- package/server/setup-artifacts.js +23 -0
- package/server/setup-auth-discovery.js +24 -0
- package/server/setup-credentials.js +54 -0
- package/server/setup-deployment.js +299 -0
- package/server/setup-discovery.js +289 -0
- package/server/setup-egress.js +133 -0
- package/server/setup-http.js +47 -0
- package/server/setup-installer.py +289 -0
- package/server/setup-json.py +8 -0
- package/server/setup-members.js +77 -0
- package/server/setup-packages.js +214 -0
- package/server/setup-preparation.js +144 -0
- package/server/setup-python.js +8 -0
- package/server/setup-remote-check.js +35 -0
- package/server/setup-transfer.js +17 -0
- package/server/setup-verifier.cjs +43 -0
- package/server/setups.js +172 -0
- package/server/ssh-hosts.js +184 -0
- package/server/ssh.js +153 -0
- package/server/start.js +71 -0
- package/server/terminal.js +173 -0
- package/server/worker-auth.js +18 -0
- package/shared/agent-access.js +103 -0
- package/shared/antigravity-network-guidance.js +9 -0
- package/shared/group-membership.js +33 -0
- package/shared/group-network.js +29 -0
- package/shared/policy-templates.js +79 -0
- package/shared/secret-fields.js +35 -0
- package/shared/setup-launch.js +25 -0
- package/shared/setup-targets.js +11 -0
- package/shared/setup-targets.json +12 -0
- package/src/lib/activity-export.js +52 -0
- package/src/lib/activity-inventory.js +45 -0
- package/src/lib/agents.js +41 -0
- package/src/lib/api.js +173 -0
- package/src/lib/cloud-machine.js +9 -0
- package/src/lib/cloud-origin.js +6 -0
- package/src/lib/cloud-transfer.js +22 -0
- package/src/lib/compute-target.js +46 -0
- package/src/lib/delete-network-policies.js +15 -0
- package/src/lib/egress-groups.js +24 -0
- package/src/lib/egress.js +28 -0
- package/src/lib/files.js +24 -0
- package/src/lib/fleet.js +100 -0
- package/src/lib/format.js +24 -0
- package/src/lib/groups.js +16 -0
- package/src/lib/image-templates.js +139 -0
- package/src/lib/import-setup.js +36 -0
- package/src/lib/local-cloud.js +118 -0
- package/src/lib/location-inventory.js +20 -0
- package/src/lib/locations.js +5 -0
- package/src/lib/placement.js +9 -0
- package/src/lib/policy-editor.js +58 -0
- package/src/lib/policy-sources.js +33 -0
- package/src/lib/quick-setup.js +110 -0
- package/src/lib/sandbox-creations.js +59 -0
- package/src/lib/sandbox-images.js +38 -0
- package/src/lib/sandbox-session.js +140 -0
- package/src/lib/sandboxes.js +78 -0
- package/src/lib/secret-inventory.js +26 -0
- package/src/lib/services.js +41 -0
- package/src/lib/setup-import-jobs.js +62 -0
- package/src/lib/setup-imports.js +4 -0
- package/src/lib/setup-network.js +39 -0
- package/src/lib/setup-template-build.js +17 -0
- package/src/lib/utils.js +6 -0
- package/vendor/OPENSHELL-LICENSE +203 -0
- package/vendor/nvidia-openshell-sdk-0.0.0.tgz +0 -0
package/server/cli.js
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createServer } from 'node:http'
|
|
3
|
+
import fs from 'node:fs/promises'
|
|
4
|
+
import { createReadStream } from 'node:fs'
|
|
5
|
+
import path from 'node:path'
|
|
6
|
+
import { pathToFileURL } from 'node:url'
|
|
7
|
+
import { spawn } from 'node:child_process'
|
|
8
|
+
import { parseArgs } from 'node:util'
|
|
9
|
+
|
|
10
|
+
const HELP = `Usage: openrod [--host 127.0.0.1] [--port 4600] [--open | --no-open]
|
|
11
|
+
|
|
12
|
+
Serve OpenRod locally for local sandboxes or configured SSH hosts.
|
|
13
|
+
Open the printed link: it carries a secret that changes on every start.
|
|
14
|
+
|
|
15
|
+
--host <host> Loopback only: 127.0.0.1, localhost, or ::1
|
|
16
|
+
--port <port> HTTP port from 1 to 65535 (default: 4600)
|
|
17
|
+
--open Open the console in your default browser
|
|
18
|
+
--no-open Do not open a browser (default)
|
|
19
|
+
--help, -h Show this help
|
|
20
|
+
--version, -v Show the installed version
|
|
21
|
+
|
|
22
|
+
Mutable data: OPENSHELL_CONSOLE_DATA_DIR, or
|
|
23
|
+
$XDG_STATE_HOME/openshell-console (~/.local/state/openshell-console).
|
|
24
|
+
Requires Node.js >=22.13.0. SSH hosts need local OpenSSH and OpenSSL,
|
|
25
|
+
plus a running Docker Engine on the remote Linux host. A missing local
|
|
26
|
+
gateway executable is downloaded and checksum-verified on supported platforms.
|
|
27
|
+
`
|
|
28
|
+
|
|
29
|
+
export function parseOptions(args = process.argv.slice(2)) {
|
|
30
|
+
const { values } = parseArgs({ args, options: {
|
|
31
|
+
host: { type: 'string', default: '127.0.0.1' },
|
|
32
|
+
port: { type: 'string', default: '4600' },
|
|
33
|
+
open: { type: 'boolean' }, 'no-open': { type: 'boolean' },
|
|
34
|
+
help: { type: 'boolean', short: 'h' }, version: { type: 'boolean', short: 'v' },
|
|
35
|
+
} })
|
|
36
|
+
if (!['127.0.0.1', 'localhost', '::1'].includes(values.host)) throw new Error('--host must be a loopback address: 127.0.0.1, localhost, or ::1.')
|
|
37
|
+
if (!/^\d+$/.test(values.port) || Number(values.port) < 1 || Number(values.port) > 65535) throw new Error('--port must be an integer from 1 to 65535.')
|
|
38
|
+
if (values.open && values['no-open']) throw new Error('Choose either --open or --no-open, not both.')
|
|
39
|
+
return { host: values.host, port: Number(values.port), open: Boolean(values.open), help: Boolean(values.help), version: Boolean(values.version) }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const TYPES = {
|
|
43
|
+
'.html': 'text/html; charset=utf-8', '.js': 'text/javascript; charset=utf-8', '.css': 'text/css; charset=utf-8',
|
|
44
|
+
'.json': 'application/json; charset=utf-8', '.svg': 'image/svg+xml', '.png': 'image/png', '.jpg': 'image/jpeg',
|
|
45
|
+
'.jpeg': 'image/jpeg', '.gif': 'image/gif', '.webp': 'image/webp', '.avif': 'image/avif', '.ico': 'image/x-icon',
|
|
46
|
+
'.woff': 'font/woff', '.woff2': 'font/woff2', '.ttf': 'font/ttf', '.otf': 'font/otf', '.txt': 'text/plain; charset=utf-8',
|
|
47
|
+
'.wasm': 'application/wasm', '.map': 'application/json; charset=utf-8',
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function staticMiddleware(directory) {
|
|
51
|
+
return async (req, res) => {
|
|
52
|
+
if (!['GET', 'HEAD'].includes(req.method)) { res.writeHead(405, { Allow: 'GET, HEAD' }).end(); return }
|
|
53
|
+
let pathname
|
|
54
|
+
try { pathname = decodeURIComponent((req.url ?? '/').split('?', 1)[0]) }
|
|
55
|
+
catch { res.writeHead(400).end(); return }
|
|
56
|
+
if (!pathname.startsWith('/') || pathname.includes('\\') || pathname.includes('\0') || pathname.split('/').some((part) => part.startsWith('.'))) {
|
|
57
|
+
res.writeHead(400).end(); return
|
|
58
|
+
}
|
|
59
|
+
const resolveFile = async (relative) => {
|
|
60
|
+
const file = await fs.realpath(path.join(directory, relative))
|
|
61
|
+
if (!file.startsWith(`${directory}${path.sep}`)) return null
|
|
62
|
+
const stat = await fs.stat(file)
|
|
63
|
+
return stat.isFile() ? { file, stat } : null
|
|
64
|
+
}
|
|
65
|
+
let entry
|
|
66
|
+
try { entry = await resolveFile(pathname === '/' ? 'index.html' : pathname.slice(1)) }
|
|
67
|
+
catch (error) { if (!['ENOENT', 'ENOTDIR'].includes(error.code)) throw error }
|
|
68
|
+
if (!entry && !path.extname(pathname) && !pathname.startsWith('/assets/') && (req.headers.accept ?? '').includes('text/html')) entry = await resolveFile('index.html')
|
|
69
|
+
if (!entry) { res.writeHead(404).end(); return }
|
|
70
|
+
const { file, stat } = entry
|
|
71
|
+
const etag = `W/"${stat.size.toString(16)}-${Math.trunc(stat.mtimeMs).toString(16)}"`
|
|
72
|
+
const immutable = /^\/assets\/[^/]+-[\w-]{8,}\.[a-z\d]+$/i.test(pathname)
|
|
73
|
+
const headers = {
|
|
74
|
+
'Content-Type': TYPES[path.extname(file).toLowerCase()] || 'application/octet-stream',
|
|
75
|
+
'Cache-Control': immutable ? 'public, max-age=31536000, immutable' : 'no-cache',
|
|
76
|
+
'X-Content-Type-Options': 'nosniff', ETag: etag,
|
|
77
|
+
}
|
|
78
|
+
if (req.headers['if-none-match'] === etag) { res.writeHead(304, headers).end(); return }
|
|
79
|
+
res.writeHead(200, { ...headers, 'Content-Length': stat.size })
|
|
80
|
+
if (req.method === 'HEAD') { res.end(); return }
|
|
81
|
+
const stream = createReadStream(file)
|
|
82
|
+
stream.on('error', (error) => res.destroy(error))
|
|
83
|
+
res.on('close', () => stream.destroy())
|
|
84
|
+
stream.pipe(res)
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function openBrowser(url, logger) {
|
|
89
|
+
const command = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'rundll32' : 'xdg-open'
|
|
90
|
+
const args = process.platform === 'win32' ? ['url.dll,FileProtocolHandler', url] : [url]
|
|
91
|
+
const child = spawn(command, args, { stdio: 'ignore', detached: true })
|
|
92
|
+
child.once('error', (error) => logger.warn(`Could not open a browser: ${error.message}. Open ${url} manually.`))
|
|
93
|
+
child.once('exit', (code) => { if (code) logger.warn(`Browser opener exited with status ${code}. Open ${url} manually.`) })
|
|
94
|
+
child.unref()
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export async function startConsole(options = parseOptions([]), logger = console) {
|
|
98
|
+
const { host, port } = parseOptions(['--host', options.host ?? '127.0.0.1', '--port', String(options.port ?? 4600)])
|
|
99
|
+
let directory
|
|
100
|
+
try {
|
|
101
|
+
directory = await fs.realpath(path.resolve(import.meta.dirname, '../dist'))
|
|
102
|
+
await fs.access(path.join(directory, 'index.html'))
|
|
103
|
+
} catch { throw new Error('Built frontend is missing. Run npm run build from the source checkout before starting or packaging the console.') }
|
|
104
|
+
const { createOpenShellApi, isLocalApiRequest } = await import('./api.js')
|
|
105
|
+
const { createLaunchToken, tokenUrl } = await import('./launch-token.js')
|
|
106
|
+
const token = createLaunchToken()
|
|
107
|
+
const serveStatic = staticMiddleware(directory)
|
|
108
|
+
const connections = new Set()
|
|
109
|
+
let api
|
|
110
|
+
const server = createServer((req, res) => {
|
|
111
|
+
if (!isLocalApiRequest(req)) { res.writeHead(403).end(); return }
|
|
112
|
+
const failed = (error) => {
|
|
113
|
+
logger.error(`Request failed: ${error.message}`)
|
|
114
|
+
if (res.headersSent) res.destroy(error)
|
|
115
|
+
else res.writeHead(500, { 'Content-Type': 'text/plain' }).end('Request failed')
|
|
116
|
+
}
|
|
117
|
+
Promise.resolve(api.middleware(req, res, () => serveStatic(req, res))).catch(failed)
|
|
118
|
+
})
|
|
119
|
+
server.on('connection', (socket) => { connections.add(socket); socket.once('close', () => connections.delete(socket)) })
|
|
120
|
+
// Bind before starting collectors, so a port collision has no side effects.
|
|
121
|
+
await new Promise((resolve, reject) => {
|
|
122
|
+
const error = (error) => {
|
|
123
|
+
if (error.code === 'EADDRINUSE') reject(new Error(`Port ${port} is already in use on ${host}. Stop the other console or choose --port <port>.`))
|
|
124
|
+
else reject(error)
|
|
125
|
+
}
|
|
126
|
+
server.once('error', error)
|
|
127
|
+
server.listen(port, host === 'localhost' ? '127.0.0.1' : host, () => { server.off('error', error); resolve() })
|
|
128
|
+
})
|
|
129
|
+
try { api = createOpenShellApi({ httpServer: server, logger, token }) }
|
|
130
|
+
catch (error) { server.close(); throw error }
|
|
131
|
+
server.on('upgrade', (req, socket) => { if ((req.url ?? '').split('?', 1)[0] !== '/api/os/terminal') socket.destroy() })
|
|
132
|
+
let closing
|
|
133
|
+
const close = () => {
|
|
134
|
+
if (closing) return closing
|
|
135
|
+
closing = (async () => {
|
|
136
|
+
const apiClosed = api.close()
|
|
137
|
+
const timer = setTimeout(() => { for (const socket of connections) socket.destroy() }, 5000)
|
|
138
|
+
timer.unref()
|
|
139
|
+
try { await Promise.all([apiClosed, new Promise((resolve, reject) => server.close((error) => error ? reject(error) : resolve()))]) }
|
|
140
|
+
finally { clearTimeout(timer) }
|
|
141
|
+
})()
|
|
142
|
+
return closing
|
|
143
|
+
}
|
|
144
|
+
// The link carries this launch's secret; it changes on every restart.
|
|
145
|
+
const url = tokenUrl(host, port, token)
|
|
146
|
+
logger.info(`OpenRod console (open this link): ${url}`)
|
|
147
|
+
if (options.open) openBrowser(url, logger)
|
|
148
|
+
return { server, url, close }
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
async function main() {
|
|
152
|
+
const options = parseOptions()
|
|
153
|
+
if (options.help) { process.stdout.write(HELP); return }
|
|
154
|
+
if (options.version) { console.log(JSON.parse(await fs.readFile(new URL('../package.json', import.meta.url), 'utf8')).version); return }
|
|
155
|
+
const runtime = await startConsole(options)
|
|
156
|
+
let stopping = false
|
|
157
|
+
const shutdown = () => {
|
|
158
|
+
if (stopping) return
|
|
159
|
+
stopping = true
|
|
160
|
+
runtime.close().catch((error) => { console.error(`Shutdown failed: ${error.message}`); process.exitCode = 1 })
|
|
161
|
+
}
|
|
162
|
+
process.on('SIGINT', shutdown)
|
|
163
|
+
process.on('SIGTERM', shutdown)
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(await fs.realpath(process.argv[1])).href) {
|
|
167
|
+
main().catch((error) => { console.error(`openrod: ${error.message}`); process.exitCode = 1 })
|
|
168
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {createHash,randomBytes} from 'node:crypto'
|
|
2
|
+
const digest=value=>createHash('sha256').update(value).digest('hex')
|
|
3
|
+
const fail=(message,status=401)=>Object.assign(Error(message),{status})
|
|
4
|
+
const TOKEN=/^[a-f0-9]{64}\.[a-f0-9]{64}$/
|
|
5
|
+
const NONCE=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
|
|
6
|
+
export function validateLocalConnection(value={}) {
|
|
7
|
+
let url
|
|
8
|
+
try{url=new URL(value.origin)}catch{throw fail('Invalid local connection',400)}
|
|
9
|
+
if(url.origin!==value.origin||url.protocol!=='http:'||!['localhost','127.0.0.1','[::1]'].includes(url.hostname)||!url.port||Number(url.port)<1||Number(url.port)>65535||!NONCE.test(value.nonce??'')||!/^[a-f0-9]{64}$/.test(value.challenge??''))throw fail('Invalid local connection',400)
|
|
10
|
+
return {origin:value.origin,nonce:value.nonce,challenge:value.challenge}
|
|
11
|
+
}
|
|
12
|
+
export function createCloudConnections(db,auth,{org,now=Date.now,isSessionRevoked=()=>false}={}) {
|
|
13
|
+
const records=db.collection('localConnections')
|
|
14
|
+
const refFor=token=>{if(typeof token!=='string'||!TOKEN.test(token))throw fail('Cloud connection expired. Reconnect local OpenRod.');return records.doc(token.split('.')[0])}
|
|
15
|
+
async function identity(row){
|
|
16
|
+
if(!row||row.revoked||row.expires<=now()||isSessionRevoked(row.sessionHash))throw fail('Cloud connection expired. Reconnect local OpenRod.')
|
|
17
|
+
const user=await auth.getUser(row.uid)
|
|
18
|
+
if(user.uid!==row.uid||user.disabled||!user.emailVerified||!user.providerData?.some(p=>p.providerId==='google.com'))throw fail('Google account unavailable',403)
|
|
19
|
+
return {uid:user.uid,email:user.email,org,role:'member',expires:row.expires}
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
async authorize(owner,input,sessionHash){
|
|
23
|
+
const bound=validateLocalConnection(input)
|
|
24
|
+
if(!owner?.uid||!Number.isFinite(owner.expires)||owner.expires<=now()||!/^[a-f0-9]{64}$/.test(sessionHash??''))throw fail('Sign in to connect local OpenRod')
|
|
25
|
+
const id=digest(owner.uid),code=`${id}.${randomBytes(32).toString('hex')}`
|
|
26
|
+
const pending={...bound,uid:owner.uid,sessionHash,codeHash:digest(code),codeExpires:Math.min(owner.expires,now()+300000),expires:Math.min(owner.expires,now()+3600000),used:false,revoked:false}
|
|
27
|
+
// An unredeemed browser sign-in must not replace a working local grant.
|
|
28
|
+
// Keep the active record until verifier and account checks both succeed.
|
|
29
|
+
await db.runTransaction(async tx=>{const ref=records.doc(id),snap=await tx.get(ref);tx.set(ref,{...(snap.exists?snap.data():{expires:pending.expires}),pending})})
|
|
30
|
+
return code
|
|
31
|
+
},
|
|
32
|
+
async redeem(code,verifier,nonce){
|
|
33
|
+
const ref=refFor(code),token=`${ref.id}.${randomBytes(32).toString('hex')}`
|
|
34
|
+
if(typeof verifier!=='string'||verifier.length>256)throw fail('Invalid local connection verifier')
|
|
35
|
+
const user=await db.runTransaction(async tx=>{
|
|
36
|
+
const snap=await tx.get(ref),stored=snap.exists?snap.data():null
|
|
37
|
+
// Accept pre-upgrade pending codes as well as the nested pending format.
|
|
38
|
+
const row=stored?.pending??stored
|
|
39
|
+
if(!row||row.used||row.revoked||row.codeExpires<=now()||row.codeHash!==digest(code)||row.challenge!==digest(verifier)||row.nonce!==nonce)throw fail('Local sign-in code expired or already used')
|
|
40
|
+
const user=await identity(row)
|
|
41
|
+
tx.set(ref,{...row,used:true,codeHash:null,challenge:null,grantHash:digest(token)})
|
|
42
|
+
return user
|
|
43
|
+
})
|
|
44
|
+
return {token,expires:user.expires,user:{uid:user.uid,email:user.email}}
|
|
45
|
+
},
|
|
46
|
+
async authenticate(token){
|
|
47
|
+
const snap=await refFor(token).get(),row=snap.exists?snap.data():null
|
|
48
|
+
if(!row?.used||row.grantHash!==digest(token))throw fail('Cloud connection expired. Reconnect local OpenRod.')
|
|
49
|
+
return identity(row)
|
|
50
|
+
},
|
|
51
|
+
async revoke(token){
|
|
52
|
+
const ref=refFor(token)
|
|
53
|
+
await db.runTransaction(async tx=>{const snap=await tx.get(ref),row=snap.exists?snap.data():null;if(row?.grantHash===digest(token))tx.update(ref,{revoked:true})})
|
|
54
|
+
},
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Cloud is unavailable unless OPENROD_CLOUD_ORIGIN names an HTTPS origin; local endpoints then refuse before contacting any cloud service.
|
|
2
|
+
export const CLOUD_SOON = 'Cloud is coming soon.'
|
|
3
|
+
export function cloudOrigin(env = process.env) {
|
|
4
|
+
const value = env.OPENROD_CLOUD_ORIGIN?.trim()
|
|
5
|
+
if (!value) return null
|
|
6
|
+
let url
|
|
7
|
+
try { url = new URL(value) } catch { throw Error('OPENROD_CLOUD_ORIGIN must be an HTTPS origin without a path') }
|
|
8
|
+
if (url.protocol !== 'https:' || url.origin !== value || url.username || url.password) throw Error('OPENROD_CLOUD_ORIGIN must be an HTTPS origin without a path')
|
|
9
|
+
return value
|
|
10
|
+
}
|
|
11
|
+
export const cloudUnavailable = () => Object.assign(new Error(CLOUD_SOON), { status: 409 })
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import http from 'node:http'
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import { createHash, randomBytes, timingSafeEqual } from 'node:crypto'
|
|
4
|
+
import { identityContext, requestPath } from './security.js'
|
|
5
|
+
import {readJson,safeWorkspaceTarget} from './remote-http.js'
|
|
6
|
+
import { signWorkerRequest } from './worker-auth.js'
|
|
7
|
+
const fail=(message,status=503)=>Object.assign(Error(message),{status})
|
|
8
|
+
const json=(res,status,value)=>{res.writeHead(status,{'Content-Type':'application/json','Cache-Control':'no-store'});res.end(JSON.stringify(value))}
|
|
9
|
+
const hash=value=>createHash('sha256').update(value).digest('hex')
|
|
10
|
+
export function createHandoffs(db,now=()=>Date.now()) {
|
|
11
|
+
return {
|
|
12
|
+
async issue(identity,name){const token=`${name}.${randomBytes(32).toString('hex')}`;await db.collection('handoffs').doc(name).set({uid:identity.uid,hash:hash(token),expires:Math.min(identity.expires,now()+300000),used:false});return token},
|
|
13
|
+
async consume(token){
|
|
14
|
+
if(typeof token!=='string'||!/^openrod-user-[a-f0-9]{24}\.[a-f0-9]{64}$/.test(token))throw fail('Invalid cloud transfer ticket',401)
|
|
15
|
+
return db.runTransaction(async tx=>{const ref=db.collection('handoffs').doc(token.split('.')[0]),s=await tx.get(ref),r=s.exists?s.data():null;if(!r||r.used||r.expires<=now()||r.hash!==hash(token))throw fail('Cloud transfer ticket expired or already used',401);tx.update(ref,{used:true});return r.uid})
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export function proxyWorker(req,res,record,identity,config,{target=req.url,maxBytes=36*1024*1024}={}) {
|
|
20
|
+
const headers={host:config.host,origin:config.origin,'x-openshell-console':'1','x-openrod-worker-auth':signWorkerRequest(record.key,identity,{method:req.method,url:target})}
|
|
21
|
+
for(const key of ['content-type','content-length','accept','range','x-openshell-context','x-openshell-location'])if(req.headers[key])headers[key]=req.headers[key]
|
|
22
|
+
return new Promise(resolve=>{
|
|
23
|
+
const upstream=http.request({hostname:record.address,port:record.port??4600,path:target,method:req.method,headers},response=>{
|
|
24
|
+
const safe={...response.headers};delete safe['set-cookie'];delete safe['connection'];delete safe['transfer-encoding']
|
|
25
|
+
res.writeHead(response.statusCode,safe);response.pipe(res);response.once('end',resolve);response.once('error',()=>{res.destroy();resolve()})
|
|
26
|
+
})
|
|
27
|
+
upstream.setTimeout(35*60000,()=>upstream.destroy())
|
|
28
|
+
let bytes=0
|
|
29
|
+
req.on('data',chunk=>{bytes+=chunk.length;if(bytes>maxBytes){upstream.destroy();if(!res.headersSent)json(res,413,{error:'Transfer exceeds the upload limit'});else res.destroy()}})
|
|
30
|
+
upstream.once('error',()=>{if(!res.headersSent)json(res,503,{error:'Your cloud machine is unavailable. Try again shortly.'});else res.destroy();resolve()})
|
|
31
|
+
res.once('close',()=>upstream.destroy());req.pipe(upstream)
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
export function proxyWorkerSocket(req,socket,head,record,identity,config,{target=req.url}={}) {
|
|
35
|
+
const upstream=http.request({hostname:record.address,port:record.port??4600,path:target,method:'GET',headers:{host:config.host,origin:config.origin,upgrade:'websocket',connection:'Upgrade','sec-websocket-key':req.headers['sec-websocket-key'],'sec-websocket-version':req.headers['sec-websocket-version'],'x-openrod-worker-auth':signWorkerRequest(record.key,identity,{method:'GET',url:target})}})
|
|
36
|
+
upstream.once('upgrade',(response,remote,remoteHead)=>{
|
|
37
|
+
socket.write(`HTTP/1.1 101 Switching Protocols\r\n${Object.entries(response.headers).map(([k,v])=>`${k}: ${v}`).join('\r\n')}\r\n\r\n`)
|
|
38
|
+
if(remoteHead.length)socket.write(remoteHead);if(head.length)remote.write(head)
|
|
39
|
+
socket.pipe(remote);remote.pipe(socket);socket.once('close',()=>remote.destroy());remote.once('close',()=>socket.destroy());remote.once('error',()=>socket.destroy());socket.once('error',()=>remote.destroy())
|
|
40
|
+
})
|
|
41
|
+
upstream.once('response',()=>socket.end('HTTP/1.1 403 Forbidden\r\nConnection: close\r\n\r\n'))
|
|
42
|
+
upstream.once('error',()=>socket.destroy());socket.once('close',()=>upstream.destroy());upstream.end()
|
|
43
|
+
}
|
|
44
|
+
export function cloudRouter(security,machines,handoffs,auth,{artifact=process.env.OPENROD_WORKER_ARTIFACT,connections,connectionCheckMs=60000}={}) {
|
|
45
|
+
async function publicRoutes(req,res,next) {
|
|
46
|
+
try {
|
|
47
|
+
const pathname=requestPath(req)
|
|
48
|
+
if(pathname==='/internal/worker-artifact') {
|
|
49
|
+
if(req.method!=='GET')throw fail('Not found',404)
|
|
50
|
+
const record=await machines.store.byName(req.headers['x-openrod-worker'])
|
|
51
|
+
const supplied=req.headers.authorization?.replace(/^Bearer /,'')??''
|
|
52
|
+
if(!record||supplied.length!==record.key.length||!timingSafeEqual(Buffer.from(supplied),Buffer.from(record.key))||!artifact)throw fail('Not found',404)
|
|
53
|
+
res.writeHead(200,{'Content-Type':'application/gzip','Cache-Control':'no-store'});const file=fs.createReadStream(artifact);file.on('error',()=>res.destroy());res.once('close',()=>file.destroy());file.pipe(res);return
|
|
54
|
+
}
|
|
55
|
+
if(connections && pathname.startsWith('/api/cloud/local-connect/') && pathname!=='/api/cloud/local-connect/authorize') {
|
|
56
|
+
if(req.headers.host!==security.config.host||(req.headers.origin&&req.headers.origin!==security.config.origin)||(req.headers['sec-fetch-site']&&!['same-origin','none'].includes(req.headers['sec-fetch-site'])))throw fail('Request rejected',403)
|
|
57
|
+
if(pathname==='/api/cloud/local-connect/exchange'&&req.method==='POST'){
|
|
58
|
+
const body=await readJson(req);return json(res,200,await connections.redeem(body.code,body.verifier,body.nonce))
|
|
59
|
+
}
|
|
60
|
+
const token=req.headers.authorization?.replace(/^Bearer /,'')
|
|
61
|
+
let identity;try{identity=await connections.authenticate(token)}catch(error){if(error.status===403)throw fail('Cloud connection unavailable. Sign in again.',401);throw error}
|
|
62
|
+
if(pathname==='/api/cloud/local-connect/revoke'&&req.method==='POST'){await readJson(req);await connections.revoke(token);return json(res,200,{ok:true})}
|
|
63
|
+
if(pathname==='/api/cloud/local-connect/identity'&&req.method==='GET')return json(res,200,{user:{uid:identity.uid,email:identity.email},expires:identity.expires})
|
|
64
|
+
if(pathname==='/api/cloud/local-connect/inventory'&&req.method==='GET'){
|
|
65
|
+
const record=await machines.store.get(identity.uid)
|
|
66
|
+
if(record&&record.uid!==identity.uid)throw fail('Machine ownership mismatch',403)
|
|
67
|
+
if(!record||record.state!=='ready'||!record.address)return json(res,200,{sandboxes:[],templates:[],locations:[],machine:{status:record?.state??'none',error:record?.error??null}})
|
|
68
|
+
watchConnection(token,res,identity)
|
|
69
|
+
return await proxyWorker(req,res,record,identity,security.config,{target:'/api/os/inventory'})
|
|
70
|
+
}
|
|
71
|
+
if(pathname==='/api/cloud/local-connect/machine'&&req.method==='GET')return json(res,200,await machines.status(identity))
|
|
72
|
+
if(pathname.startsWith('/api/cloud/local-connect/os/')&&['GET','POST'].includes(req.method)){
|
|
73
|
+
const target=safeWorkspaceTarget(req.url,'/api/cloud/local-connect/os')
|
|
74
|
+
if(req.method!=='GET'&&req.headers['x-openshell-console']!=='1')throw fail('Request rejected',403)
|
|
75
|
+
watchConnection(token,res,identity)
|
|
76
|
+
return await proxyWorker(req,res,await machines.target(identity),identity,security.config,{target})
|
|
77
|
+
}
|
|
78
|
+
throw fail('Not found',404)
|
|
79
|
+
}
|
|
80
|
+
if(pathname==='/api/cloud/import') {
|
|
81
|
+
if(req.method!=='POST'||req.headers['content-type']!=='application/json')throw fail('Invalid cloud transfer',400)
|
|
82
|
+
const uid=await handoffs.consume(req.headers.authorization?.replace(/^Bearer /,''))
|
|
83
|
+
const user=await auth.getUser(uid)
|
|
84
|
+
if(user.disabled||!user.emailVerified||!user.providerData?.some(p=>p.providerId==='google.com'))throw fail('Account unavailable',403)
|
|
85
|
+
const identity={uid,email:user.email,org:security.config.org,role:'member',expires:Date.now()+3600000}
|
|
86
|
+
return await proxyWorker(req,res,await machines.target(identity),identity,security.config,{target:'/api/os/cloud-import'})
|
|
87
|
+
}
|
|
88
|
+
next()
|
|
89
|
+
}catch(error){json(res,error.status??503,{error:error.status?error.message:'Cloud service unavailable. Try again shortly.'})}
|
|
90
|
+
}
|
|
91
|
+
async function protectedRoutes(req,res,next) {
|
|
92
|
+
try {
|
|
93
|
+
const identity=identityContext.getStore(),pathname=requestPath(req)
|
|
94
|
+
if(connections&&pathname==='/api/cloud/local-connect/authorize'&&req.method==='POST'){const body=await readJson(req);return json(res,200,{code:await connections.authorize(identity,body,security.sessionHash(req))})}
|
|
95
|
+
if(pathname==='/api/cloud/machine'&&req.method==='GET')return json(res,200,await machines.status(identity))
|
|
96
|
+
if(pathname==='/api/cloud/handoff'&&req.method==='POST'){
|
|
97
|
+
if(req.headers['x-openshell-console']!=='1')throw fail('Request rejected',403)
|
|
98
|
+
const record=await machines.target(identity);return json(res,200,{ticket:await handoffs.issue(identity,record.name)})
|
|
99
|
+
}
|
|
100
|
+
if(pathname.startsWith('/api/os/'))return await proxyWorker(req,res,await machines.target(identity),identity,security.config)
|
|
101
|
+
next()
|
|
102
|
+
}catch(error){json(res,error.status??503,{error:error.status?error.message:'Cloud service unavailable. Try again shortly.'})}
|
|
103
|
+
}
|
|
104
|
+
function watchConnection(token,target,identity){
|
|
105
|
+
const expiry=setTimeout(()=>target.destroy(),Math.max(1,identity.expires-Date.now())),check=setInterval(()=>connections.authenticate(token).catch(()=>target.destroy()),connectionCheckMs)
|
|
106
|
+
expiry.unref?.();check.unref?.();target.once('close',()=>{clearTimeout(expiry);clearInterval(check)})
|
|
107
|
+
}
|
|
108
|
+
return {publicRoutes,protectedRoutes,upgrade:async(req,socket,head)=>{
|
|
109
|
+
try{
|
|
110
|
+
const pathname=requestPath(req)
|
|
111
|
+
if(connections&&pathname.startsWith('/api/cloud/local-connect/os/')){
|
|
112
|
+
if(req.headers.host!==security.config.host||req.headers.origin!==security.config.origin)throw fail('Request rejected',403)
|
|
113
|
+
const target=safeWorkspaceTarget(req.url,'/api/cloud/local-connect/os')
|
|
114
|
+
if(!['/api/os/terminal','/api/os/ssh'].includes(target.split('?')[0]))throw fail('Not found',404)
|
|
115
|
+
const token=req.headers.authorization?.replace(/^Bearer /,''),identity=await connections.authenticate(token)
|
|
116
|
+
watchConnection(token,socket,identity);proxyWorkerSocket(req,socket,head,await machines.target(identity),identity,security.config,{target});return
|
|
117
|
+
}
|
|
118
|
+
if(pathname!=='/api/os/terminal')return
|
|
119
|
+
const identity=await security.authenticate(req);security.watch(req,socket,identity);proxyWorkerSocket(req,socket,head,await machines.target(identity),identity,security.config)
|
|
120
|
+
}catch{socket.end('HTTP/1.1 403 Forbidden\r\nConnection: close\r\n\r\n')}
|
|
121
|
+
}}
|
|
122
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict'
|
|
3
|
+
// OpenSSH invokes this helper locally. Grants remain inside OpenRod's local server;
|
|
4
|
+
// this process obtains only a single-use, account-scoped SSH stream ticket.
|
|
5
|
+
const { WebSocket, createWebSocketStream } = require('ws')
|
|
6
|
+
|
|
7
|
+
function validate(options) {
|
|
8
|
+
const url = new URL(options.origin)
|
|
9
|
+
if (url.protocol !== 'http:' || !['localhost', '127.0.0.1', '[::1]'].includes(url.hostname) || url.origin !== options.origin || url.username || url.password || !/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/.test(options.sandbox ?? '') || !/^[a-f0-9]{16}$/.test(options.owner ?? '')) throw Error('Invalid local OpenRod SSH target')
|
|
10
|
+
if (options.context !== undefined) {
|
|
11
|
+
let context
|
|
12
|
+
try { context = JSON.parse(options.context) } catch { throw Error('Invalid OpenRod SSH workspace') }
|
|
13
|
+
if (!Array.isArray(context) || context.length !== 2 || !context.every(value => typeof value === 'string' && /^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,127}$/.test(value))) throw Error('Invalid OpenRod SSH workspace')
|
|
14
|
+
}
|
|
15
|
+
return options
|
|
16
|
+
}
|
|
17
|
+
function parseProxyArgs(args) {
|
|
18
|
+
const options = {}
|
|
19
|
+
for (let i = 0; i < args.length; i += 2) {
|
|
20
|
+
const flag = args[i]
|
|
21
|
+
if (!['--origin', '--sandbox', '--owner', '--context'].includes(flag) || !args[i + 1] || Object.hasOwn(options, flag.slice(2))) throw Error('Invalid OpenRod SSH proxy arguments')
|
|
22
|
+
options[flag.slice(2)] = args[i + 1]
|
|
23
|
+
}
|
|
24
|
+
return validate(options)
|
|
25
|
+
}
|
|
26
|
+
async function runProxy(options, { input = process.stdin, output = process.stdout, fetchRequest = fetch, signal } = {}) {
|
|
27
|
+
validate(options)
|
|
28
|
+
const response = await fetchRequest(`${options.origin}/api/remote/os/sandboxes/${options.sandbox}/ssh-ticket`, {
|
|
29
|
+
method: 'POST', headers: { 'x-openrod-local-owner': options.owner, Origin: options.origin, 'content-type': 'application/json', 'x-openshell-console': '1' },
|
|
30
|
+
body: JSON.stringify({ owner: options.owner, ...(options.context ? { context: options.context } : {}) }), redirect: 'error', signal: signal ? AbortSignal.any([signal, AbortSignal.timeout(30000)]) : AbortSignal.timeout(30000),
|
|
31
|
+
})
|
|
32
|
+
if (!response.ok) throw Error(`Local OpenRod SSH authorization failed (${response.status}). Reconnect to OpenRod Cloud.`)
|
|
33
|
+
const body = await response.json()
|
|
34
|
+
if (typeof body.ticket !== 'string' || !/^[A-Za-z0-9-]{1,100}$/.test(body.ticket)) throw Error('Invalid SSH ticket from local OpenRod')
|
|
35
|
+
const url = new URL('/api/remote/os/ssh', options.origin); url.protocol = 'ws:'; url.searchParams.set('ticket', body.ticket); url.searchParams.set('owner', options.owner)
|
|
36
|
+
if (options.context) url.searchParams.set('context', options.context)
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
const ws = new WebSocket(url, { origin: options.origin, handshakeTimeout: 30000, maxPayload: 1024 * 1024 })
|
|
39
|
+
let stream, settled = false
|
|
40
|
+
const abort = () => { ws.terminate(); finish(Error('OpenRod SSH connection canceled')) }
|
|
41
|
+
const finish = error => {
|
|
42
|
+
if (settled) return; settled = true
|
|
43
|
+
signal?.removeEventListener('abort', abort)
|
|
44
|
+
input.off('error', inputError); output.off('error', outputError)
|
|
45
|
+
if (stream) { input.unpipe(stream); stream.unpipe(output); stream.destroy() }
|
|
46
|
+
if (error) { ws.terminate(); reject(error) } else resolve()
|
|
47
|
+
}
|
|
48
|
+
const inputError = () => finish(Error('SSH input closed unexpectedly'))
|
|
49
|
+
const outputError = () => finish(Error('SSH output closed unexpectedly'))
|
|
50
|
+
input.on('error', inputError); output.on('error', outputError)
|
|
51
|
+
signal?.addEventListener('abort', abort, { once: true })
|
|
52
|
+
if (signal?.aborted) return abort()
|
|
53
|
+
ws.once('open', () => {
|
|
54
|
+
stream = createWebSocketStream(ws)
|
|
55
|
+
stream.on('error', () => finish(Error('OpenRod SSH stream disconnected')))
|
|
56
|
+
stream.pipe(output, { end: false }); input.pipe(stream)
|
|
57
|
+
})
|
|
58
|
+
ws.on('message', (_data, binary) => { if (!binary) finish(Error('Invalid SSH stream frame')) })
|
|
59
|
+
ws.once('error', () => finish(Error('Could not connect to the OpenRod SSH stream. Reconnect to OpenRod Cloud.')))
|
|
60
|
+
ws.once('close', code => {
|
|
61
|
+
const error = [1000, 1005].includes(code) ? undefined : Error('OpenRod SSH connection ended. Reconnect to OpenRod Cloud.')
|
|
62
|
+
if (error || !stream || stream.readableEnded) finish(error)
|
|
63
|
+
else stream.once('end', () => finish())
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
module.exports = { parseProxyArgs, runProxy }
|
|
68
|
+
if (require.main === module) {
|
|
69
|
+
const abort = new AbortController()
|
|
70
|
+
process.once('SIGINT', () => abort.abort()); process.once('SIGTERM', () => abort.abort())
|
|
71
|
+
Promise.resolve().then(() => runProxy(parseProxyArgs(process.argv.slice(2)), { signal: abort.signal }))
|
|
72
|
+
.catch(error => { process.stderr.write(`OpenRod SSH: ${error.message}\n`); process.exitCode = 1 })
|
|
73
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto'
|
|
2
|
+
import { STATUS_CODES } from 'node:http'
|
|
3
|
+
import { createServer } from 'node:net'
|
|
4
|
+
import { spawn } from 'node:child_process'
|
|
5
|
+
import { WebSocketServer, createWebSocketStream } from 'ws'
|
|
6
|
+
import { contextKey, gateway, sandboxView } from './gateway.js'
|
|
7
|
+
import { identityContext } from './security.js'
|
|
8
|
+
import { fail, runCli } from './openshell-cli.js'
|
|
9
|
+
|
|
10
|
+
const NAME = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/
|
|
11
|
+
export const SSH_PATH = '/api/os/ssh'
|
|
12
|
+
const TTL = 60_000
|
|
13
|
+
const proxyArgs = plan => ['ssh-proxy', '--gateway-name', plan.target.name, '--name', plan.name, '--workspace', plan.workspace]
|
|
14
|
+
|
|
15
|
+
export function validateHostKeys(keys) {
|
|
16
|
+
if (!Array.isArray(keys) || !keys.length || keys.length > 8) throw fail('No verified SSH host key is available.', 502)
|
|
17
|
+
return [...new Set(keys.map(key => {
|
|
18
|
+
if (typeof key !== 'string' || key.length > 8192 || !/^(ssh-ed25519|ssh-rsa|ecdsa-sha2-nistp(?:256|384|521)) [A-Za-z0-9+/]+={0,2}$/.test(key)) throw fail('Invalid SSH host key.', 502)
|
|
19
|
+
const [type, encoded] = key.split(' '), bytes = Buffer.from(encoded, 'base64')
|
|
20
|
+
if (bytes.length < 16 || bytes.readUInt32BE(0) !== type.length || bytes.subarray(4, 4 + type.length).toString() !== type) throw fail('Invalid SSH host key.', 502)
|
|
21
|
+
return key
|
|
22
|
+
}))]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function createSshTickets({ now = Date.now, ttl = TTL } = {}) {
|
|
26
|
+
const values = new Map()
|
|
27
|
+
return {
|
|
28
|
+
issue(plan) {
|
|
29
|
+
const ticket = randomUUID(), expires = Math.min(now() + ttl, plan.sessionExpires)
|
|
30
|
+
values.set(ticket, { ...plan, expires })
|
|
31
|
+
setTimeout(() => values.delete(ticket), ttl).unref?.()
|
|
32
|
+
return ticket
|
|
33
|
+
},
|
|
34
|
+
claim(ticket, principal) {
|
|
35
|
+
const plan = values.get(ticket); values.delete(ticket)
|
|
36
|
+
return plan && plan.expires > now() && plan.principal === principal ? plan : null
|
|
37
|
+
},
|
|
38
|
+
expires(ticket) { return values.get(ticket)?.expires },
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const tickets = createSshTickets()
|
|
42
|
+
|
|
43
|
+
async function loadContext(name) {
|
|
44
|
+
const { client, target, workspace, workspaceScope } = await gateway()
|
|
45
|
+
const sandbox = sandboxView((await client.raw.getSandbox({ name, workspaceScope })).sandbox)
|
|
46
|
+
return { sandbox, target, workspace }
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function stopProxy(child) {
|
|
50
|
+
try {
|
|
51
|
+
if (child.pid && process.platform !== 'win32') process.kill(-child.pid, 'SIGTERM')
|
|
52
|
+
else child.kill('SIGTERM')
|
|
53
|
+
} catch {}
|
|
54
|
+
const hardKill = setTimeout(() => {
|
|
55
|
+
try { if (child.pid && process.platform !== 'win32') process.kill(-child.pid, 'SIGKILL'); else child.kill('SIGKILL') } catch {}
|
|
56
|
+
}, 1000)
|
|
57
|
+
hardKill.unref?.()
|
|
58
|
+
child.once('close', () => clearTimeout(hardKill))
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ssh-proxy authenticates the gateway with the worker's own mTLS bundle. A
|
|
62
|
+
// loopback-only keyscan through that trusted stream obtains the actual SSH key
|
|
63
|
+
// (OpenShell terminates SSH, so sandbox /etc/ssh keys are not authoritative).
|
|
64
|
+
export async function discoverHostKeys({ sandbox, target, workspace }, dependencies = {}) {
|
|
65
|
+
const spawnProcess = dependencies.spawnProcess ?? spawn
|
|
66
|
+
const peers = new Set(), children = new Set()
|
|
67
|
+
const server = createServer(socket => {
|
|
68
|
+
peers.add(socket)
|
|
69
|
+
const child = spawnProcess('/usr/bin/openshell', proxyArgs({ name: sandbox.name, target, workspace }), { shell: false, detached: process.platform !== 'win32', stdio: ['pipe', 'pipe', 'pipe'] })
|
|
70
|
+
children.add(child); child.stderr.resume()
|
|
71
|
+
child.on('error', () => socket.destroy()); child.stdin.on('error', () => socket.destroy()); child.stdout.on('error', () => socket.destroy())
|
|
72
|
+
socket.on('error', () => {}); socket.pipe(child.stdin); child.stdout.pipe(socket)
|
|
73
|
+
socket.once('close', () => { peers.delete(socket); stopProxy(child) })
|
|
74
|
+
child.once('close', () => { children.delete(child); socket.destroy() })
|
|
75
|
+
})
|
|
76
|
+
try {
|
|
77
|
+
await new Promise((resolve, reject) => { server.once('error', reject); server.listen(0, '127.0.0.1', resolve) })
|
|
78
|
+
const result = await (dependencies.runCli ?? runCli)('/usr/bin/ssh-keyscan', ['-T', '5', '-p', String(server.address().port), '127.0.0.1'], { timeoutMs: 10_000, outputLimit: 64 * 1024 })
|
|
79
|
+
if (result.timedOut || result.outputExceeded || result.code !== 0) throw fail('Could not verify the sandbox SSH host key.', 502)
|
|
80
|
+
return validateHostKeys(result.stdout.split('\n').filter(line => line && !line.startsWith('#')).map(line => line.trim().split(/\s+/).slice(1, 3).join(' ')))
|
|
81
|
+
} finally {
|
|
82
|
+
for (const socket of peers) socket.destroy()
|
|
83
|
+
for (const child of children) stopProxy(child)
|
|
84
|
+
if (server.listening) await new Promise(resolve => server.close(resolve))
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export async function cloudSshRoute(method, parts, input, dependencies = {}) {
|
|
89
|
+
if (method !== 'POST' || parts[0] !== 'sandboxes' || parts.length !== 3 || parts[2] !== 'ssh-ticket' || !NAME.test(parts[1] ?? '')) return undefined
|
|
90
|
+
const principal = dependencies.principal ?? identityContext.getStore()
|
|
91
|
+
if (!principal?.uid || !Number.isFinite(principal.expires) || principal.expires <= (dependencies.now ?? Date.now)()) throw fail('Authenticated SSH owner required.', 403)
|
|
92
|
+
const context = await (dependencies.loadContext ?? loadContext)(parts[1])
|
|
93
|
+
if (context.sandbox.phase !== 'ready') throw fail('This sandbox is not running.', 409)
|
|
94
|
+
const hostKeys = validateHostKeys(await (dependencies.hostKeys ?? discoverHostKeys)(context))
|
|
95
|
+
const store = dependencies.tickets ?? tickets
|
|
96
|
+
const plan = { name: context.sandbox.name, target: context.target, gateway: context.target.name, workspace: context.workspace, principal: principal.uid, sessionExpires: principal.expires }
|
|
97
|
+
const ticket = store.issue(plan)
|
|
98
|
+
return { ticket, expires: store.expires(ticket), hostKeys, user: 'sandbox', context: contextKey(plan) }
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const wss = new WebSocketServer({ noServer: true, maxPayload: 1024 * 1024 })
|
|
102
|
+
function refuse(socket, status) { socket.end(`HTTP/1.1 ${status} ${STATUS_CODES[status]}\r\nConnection: close\r\n\r\n`) }
|
|
103
|
+
export function cloudSshUpgrade(req, socket, head, isAllowed, principal, dependencies = {}) {
|
|
104
|
+
const url = new URL(req.url ?? '/', 'http://local')
|
|
105
|
+
if (url.pathname !== SSH_PATH) return false
|
|
106
|
+
if (!isAllowed(req)) { refuse(socket, 403); return true }
|
|
107
|
+
const uid = typeof principal === 'string' ? principal : principal?.uid
|
|
108
|
+
const plan = (dependencies.tickets ?? tickets).claim(url.searchParams.get('ticket'), uid)
|
|
109
|
+
if (!plan || !uid) { refuse(socket, 403); return true }
|
|
110
|
+
const requestedContext = url.searchParams.get('context')
|
|
111
|
+
if (!(dependencies.allowContext ?? (() => true))(plan) || (requestedContext != null && requestedContext !== contextKey(plan))) { refuse(socket, 409); return true }
|
|
112
|
+
wss.handleUpgrade(req, socket, head, ws => {
|
|
113
|
+
let child
|
|
114
|
+
try { child = (dependencies.spawnProcess ?? spawn)('/usr/bin/openshell', proxyArgs(plan), { shell: false, detached: process.platform !== 'win32', stdio: ['pipe', 'pipe', 'pipe'] }) }
|
|
115
|
+
catch { ws.close(1011); return }
|
|
116
|
+
// stream APIs preserve binary bytes and propagate backpressure in both
|
|
117
|
+
// directions. SSH control/errors never share this binary stream.
|
|
118
|
+
const stream = createWebSocketStream(ws, { encoding: null })
|
|
119
|
+
let cleaned = false
|
|
120
|
+
const expiry = setTimeout(() => { ws.close(1008, 'Cloud authorization expired'); cleanup() }, Math.max(1, Math.min(plan.sessionExpires, principal?.expires ?? Infinity) - Date.now()))
|
|
121
|
+
expiry.unref?.()
|
|
122
|
+
const cleanup = () => { if (cleaned) return; cleaned = true; clearTimeout(expiry); stopProxy(child); stream.destroy() }
|
|
123
|
+
child.stderr.resume()
|
|
124
|
+
child.on('error', () => ws.close(1011)); child.stdin.on('error', () => ws.close(1011)); child.stdout.on('error', () => ws.close(1011))
|
|
125
|
+
child.once('close', code => {
|
|
126
|
+
// stdout.pipe(stream) finishes all queued writes before its finalizer
|
|
127
|
+
// closes the WebSocket. Closing here would discard the writable queue.
|
|
128
|
+
if (code !== 0) { if (ws.readyState === ws.OPEN) ws.close(1011); cleanup() }
|
|
129
|
+
})
|
|
130
|
+
stream.on('error', cleanup); ws.on('error', cleanup); ws.once('close', cleanup)
|
|
131
|
+
stream.pipe(child.stdin); child.stdout.pipe(stream)
|
|
132
|
+
ws.on('message', (_data, binary) => { if (!binary) ws.close(1003, 'Binary SSH frames required') })
|
|
133
|
+
})
|
|
134
|
+
return true
|
|
135
|
+
}
|