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
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import fs from 'node:fs/promises'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { createHash } from 'node:crypto'
|
|
4
|
+
import { contextKey, contextSelection, runWithContext, resolveGateway } from './gateway.js'
|
|
5
|
+
import { policyDirectory, scopedStateDirectory } from './paths.js'
|
|
6
|
+
import { listGroups, readOrg, serializeOrgWrite } from './org.js'
|
|
7
|
+
import { listPolicies, validatePolicy } from './egress.js'
|
|
8
|
+
import { listTemplates, validateTemplate } from './policy.js'
|
|
9
|
+
import { getSetupStore } from './setups.js'
|
|
10
|
+
import { artifactFile } from './setup-packages.js'
|
|
11
|
+
import { hash } from './setup-discovery.js'
|
|
12
|
+
import { PACKAGE_PENDING } from '../shared/setup-launch.js'
|
|
13
|
+
import { composeTemplate } from '../shared/policy-templates.js'
|
|
14
|
+
|
|
15
|
+
const fail = message => Object.assign(new Error(message), { status: 409 })
|
|
16
|
+
const digest = value => createHash('sha256').update(JSON.stringify(value)).digest('hex')
|
|
17
|
+
|
|
18
|
+
// A catalog is a versioned snapshot, not a live grant. Changed local definitions
|
|
19
|
+
// get new remote identities: neither existing remote rules nor memberships are
|
|
20
|
+
// overwritten. Sandbox-specific grants and memberships never cross gateways.
|
|
21
|
+
export function planLocalCatalog(snapshot, source, architecture) {
|
|
22
|
+
// Publish a new generation when the import format changes: old snapshots
|
|
23
|
+
// remain attached to their sandboxes and are never overwritten in place.
|
|
24
|
+
const generation = digest(['local-catalog-v2', contextKey(source), snapshot])
|
|
25
|
+
const id = (kind, original) => 'local-' + digest([generation, kind, original]).slice(0, 32)
|
|
26
|
+
const setupId = original => digest([generation, 'setup', original]).slice(0, 24)
|
|
27
|
+
const groups = new Map(snapshot.groups.map(g => [g.id, id('group', g.id)]))
|
|
28
|
+
const templates = new Map(snapshot.templates.map(t => [t.id, id('template', t.id)]))
|
|
29
|
+
const setups = new Map(snapshot.setups.map(s => [s.id, setupId(s.id)]))
|
|
30
|
+
const localSource = { context: contextKey(source), generation }
|
|
31
|
+
const copiedSetups = snapshot.setups.map(original => {
|
|
32
|
+
const items = original.items.map(originalItem => {
|
|
33
|
+
const item = structuredClone(originalItem)
|
|
34
|
+
if (item.credentialRef) {
|
|
35
|
+
// GetProvider deliberately redacts secrets. Copying its output would
|
|
36
|
+
// silently replace credentials with REDACTED. Require destination login.
|
|
37
|
+
item.credentialFields = Object.keys(item.credentialRef.aliases ?? {})
|
|
38
|
+
delete item.credentialRef
|
|
39
|
+
item.issues = [...new Set([...item.issues, `Connect credentials (${item.credentialFields.join(', ')}) on this remote gateway to use this MCP.`])]
|
|
40
|
+
item.state = 'needs-attention'
|
|
41
|
+
}
|
|
42
|
+
if (item.artifact && item.artifact.arch !== architecture && item.package) {
|
|
43
|
+
delete item.artifact
|
|
44
|
+
item.config = null
|
|
45
|
+
item.issues = [...new Set([...item.issues, PACKAGE_PENDING])]
|
|
46
|
+
item.state = 'needs-attention'
|
|
47
|
+
}
|
|
48
|
+
return item
|
|
49
|
+
})
|
|
50
|
+
return { ...original, id: setups.get(original.id), items, revision: hash(JSON.stringify(items)), localSource,
|
|
51
|
+
...(original.preparedFrom ? { preparedFrom: { ...original.preparedFrom, id: setups.get(original.preparedFrom.id) ?? original.preparedFrom.id } } : {}) }
|
|
52
|
+
})
|
|
53
|
+
// Materialize composed access rules, including local edits to built-ins,
|
|
54
|
+
// rather than resolving those ids against the destination's built-ins.
|
|
55
|
+
const copiedTemplates = snapshot.templates.map(t => validateTemplate({ ...composeTemplate(t, [], snapshot.templates), id: templates.get(t.id), accessTemplates: [] }))
|
|
56
|
+
const copiedGroups = snapshot.groups.map(g => ({ ...g, id: groups.get(g.id), template: g.template ? templates.get(g.template) : null, localSource }))
|
|
57
|
+
const copiedPolicies = snapshot.policies.map(p => {
|
|
58
|
+
const appliesTo = { everyone: false, sandboxes: [], groups: p.appliesTo.everyone ? [...groups.values()] : p.appliesTo.groups.map(v => groups.get(v)).filter(Boolean), setups: p.appliesTo.setups.map(v => setups.get(v)).filter(Boolean) }
|
|
59
|
+
if (!appliesTo.groups.length && !appliesTo.setups.length) return null
|
|
60
|
+
const setup = p.setup && setups.has(p.setup.id) ? { ...p.setup, id: setups.get(p.setup.id) } : null
|
|
61
|
+
return validatePolicy({ ...p, id: setup ? `setup-${setup.id}` : id('policy', p.id), appliesTo, setup })
|
|
62
|
+
}).filter(Boolean)
|
|
63
|
+
for (let offset = 0; offset < snapshot.organization.blocked.length && copiedGroups.length; offset += 200) copiedPolicies.push(validatePolicy({
|
|
64
|
+
id: id('policy', 'organization-blocked-' + offset), name: 'Local organization restrictions', action: 'block',
|
|
65
|
+
destinations: snapshot.organization.blocked.slice(offset, offset + 200),
|
|
66
|
+
appliesTo: { everyone: false, groups: [...groups.values()], sandboxes: [], setups: [] },
|
|
67
|
+
}))
|
|
68
|
+
return { generation, groups: copiedGroups, templates: copiedTemplates, policies: copiedPolicies, setups: copiedSetups }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function writeExclusive(file, value) {
|
|
72
|
+
await fs.mkdir(path.dirname(file), { recursive: true, mode: 0o700 })
|
|
73
|
+
try { await fs.writeFile(file, JSON.stringify(value), { mode: 0o600, flag: 'wx' }) }
|
|
74
|
+
catch (error) { if (error.code !== 'EEXIST') throw error }
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export async function syncLocalCatalog(source, { architecture, target = contextSelection() } = {}) {
|
|
78
|
+
if (!source) return { groups: [], setups: [], templates: [], available: false }
|
|
79
|
+
if (contextKey(source) === contextKey(target) || resolveGateway(source.gateway).remote || !resolveGateway(target.gateway).remote) throw fail('Choose a local source and a remote destination.')
|
|
80
|
+
const snapshot = await runWithContext(source, async () => {
|
|
81
|
+
const store = getSetupStore()
|
|
82
|
+
const [groups, templates, policies, organization, setupViews] = await Promise.all([listGroups(), listTemplates(), listPolicies(), readOrg(), store.list()])
|
|
83
|
+
const setups = await Promise.all(setupViews.filter(s => !s.localSource).map(s => store.get(s.id)))
|
|
84
|
+
return { groups, templates, policies, organization, setups }
|
|
85
|
+
})
|
|
86
|
+
const plan = planLocalCatalog(snapshot, source, architecture)
|
|
87
|
+
// Verify all package archives before publishing any selectable Setup.
|
|
88
|
+
const artifacts = await runWithContext(source, async () => Promise.all(
|
|
89
|
+
[...new Map(plan.setups.flatMap(s => s.items.filter(i => i.artifact).map(i => [i.artifact.digest, i.artifact]))).values()]
|
|
90
|
+
.map(async artifact => ({ artifact, data: (await artifactFile(artifact)).data })),
|
|
91
|
+
))
|
|
92
|
+
const importedGroups = await runWithContext(target, () => serializeOrgWrite(async () => {
|
|
93
|
+
const policies = await policyDirectory(), state = scopedStateDirectory()
|
|
94
|
+
for (const { artifact, data } of artifacts) {
|
|
95
|
+
const file = path.join(state, 'setup-artifacts', artifact.digest + '.tar.gz')
|
|
96
|
+
await fs.mkdir(path.dirname(file), { recursive: true, mode: 0o700 })
|
|
97
|
+
try { await fs.writeFile(file, data, { mode: 0o600, flag: 'wx' }) } catch (error) { if (error.code !== 'EEXIST') throw error }
|
|
98
|
+
}
|
|
99
|
+
for (const template of plan.templates) await writeExclusive(path.join(policies, template.id + '.json'), template)
|
|
100
|
+
for (const group of plan.groups) await writeExclusive(path.join(policies, 'org/groups', group.id + '.json'), group)
|
|
101
|
+
for (const policy of plan.policies) await writeExclusive(path.join(policies, 'egress', policy.id + '.json'), policy)
|
|
102
|
+
for (const setup of plan.setups) await writeExclusive(path.join(state, 'setups', setup.id + '.json'), setup)
|
|
103
|
+
const groupFiles = await fs.readdir(path.join(policies, 'org/groups')).catch(error => { if (error.code === 'ENOENT') return []; throw error })
|
|
104
|
+
const imported = await Promise.all(groupFiles.filter(file => file.endsWith('.json')).map(async file => {
|
|
105
|
+
const group = JSON.parse(await fs.readFile(path.join(policies, 'org/groups', file), 'utf8'))
|
|
106
|
+
return group.localSource ? group.id : null
|
|
107
|
+
}))
|
|
108
|
+
return imported.filter(Boolean)
|
|
109
|
+
}))
|
|
110
|
+
return { available: true, generation: plan.generation, groups: plan.groups.map(g => g.id), importedGroups, setups: plan.setups.map(s => s.id), templates: plan.templates.map(t => t.id) }
|
|
111
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import fs from 'node:fs/promises'
|
|
2
|
+
import os from 'node:os'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { fileURLToPath } from 'node:url'
|
|
5
|
+
import { createHash, randomUUID } from 'node:crypto'
|
|
6
|
+
import { spawn } from 'node:child_process'
|
|
7
|
+
import { connectionView, launchNativeTerminal } from './ssh.js'
|
|
8
|
+
import { findExecutable, sshBinary, shellQuote, fail } from './openshell-cli.js'
|
|
9
|
+
import { projectOf } from '../src/lib/sandbox-session.js'
|
|
10
|
+
import { readJson, responseJson } from './remote-http.js'
|
|
11
|
+
import { validateHostKeys } from './cloud-ssh.js'
|
|
12
|
+
import { cloudOrigin } from './cloud-origin.js'
|
|
13
|
+
|
|
14
|
+
const NAME = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/
|
|
15
|
+
const EDITORS = { cursor: { label: 'Cursor', binary: 'cursor', app: 'Cursor.app' }, vscode: { label: 'VS Code', binary: 'code', app: 'Visual Studio Code.app' } }
|
|
16
|
+
const ownerId = uid => createHash('sha256').update(uid).digest('hex').slice(0, 16)
|
|
17
|
+
// SSH config quoted values and ProxyCommand percent expansion need distinct
|
|
18
|
+
// escaping; neither ever contains a grant, gateway credential, or SSH secret.
|
|
19
|
+
const configQuote = value => `"${String(value).replaceAll('\\', '\\\\').replaceAll('"', '\\"')}"`
|
|
20
|
+
const proxyQuote = value => shellQuote(String(value).replaceAll('%', '%%'))
|
|
21
|
+
const scopedTarget = (target, context) => context ? `${target}?${new URLSearchParams({ context, location: '1' })}` : target
|
|
22
|
+
|
|
23
|
+
async function readManaged(file) {
|
|
24
|
+
try {
|
|
25
|
+
const stat = await fs.lstat(file)
|
|
26
|
+
if (!stat.isFile() || stat.isSymbolicLink()) throw fail('OpenRod SSH config must be a regular file.', 409)
|
|
27
|
+
return await fs.readFile(file, 'utf8')
|
|
28
|
+
} catch (error) { if (error.code === 'ENOENT') return ''; throw error }
|
|
29
|
+
}
|
|
30
|
+
async function writeManaged(file, text) {
|
|
31
|
+
await readManaged(file)
|
|
32
|
+
const temp = `${file}.${randomUUID()}.tmp`
|
|
33
|
+
try { await fs.writeFile(temp, text, { mode: 0o600, flag: 'wx' }); await fs.rename(temp, file) }
|
|
34
|
+
finally { await fs.rm(temp, { force: true }) }
|
|
35
|
+
}
|
|
36
|
+
function launchEditor(file, args, { spawnProcess = spawn } = {}) {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
const child = spawnProcess(file, args, { shell: false, detached: true, stdio: 'ignore' })
|
|
39
|
+
child.once('error', () => reject(fail('Could not launch the editor.', 502)))
|
|
40
|
+
child.once('spawn', () => { child.unref(); resolve() })
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function createLocalCloudNative(dependencies = {}) {
|
|
45
|
+
const home = dependencies.home ?? os.homedir(), env = dependencies.env ?? process.env
|
|
46
|
+
const platform = dependencies.platform ?? process.platform
|
|
47
|
+
const directory = path.join(home, '.config/openrod'), configFile = path.join(directory, 'cloud_ssh_config'), hostsFile = path.join(directory, 'cloud_known_hosts')
|
|
48
|
+
const helper = dependencies.helper ?? fileURLToPath(new URL('./cloud-ssh-proxy.cjs', import.meta.url)), node = dependencies.node ?? process.execPath
|
|
49
|
+
let queue = Promise.resolve()
|
|
50
|
+
const serial = task => { const result = queue.then(task, task); queue = result.catch(() => {}); return result }
|
|
51
|
+
const findEditor = dependencies.findEditor ?? (id => {
|
|
52
|
+
const editor = EDITORS[id]
|
|
53
|
+
return findExecutable(editor.binary, [...(env.PATH ?? '').split(path.delimiter).filter(Boolean), ...['/Applications', path.join(home, 'Applications')].map(root => path.join(root, editor.app, 'Contents/Resources/app/bin'))])
|
|
54
|
+
})
|
|
55
|
+
const aliasFor = (uid, name, context) => `openrod-cloud-${ownerId(uid)}-${name}${context ? '-' + ownerId(context) : ''}`
|
|
56
|
+
const commandFor = alias => `${shellQuote(sshBinary(env) ?? 'ssh')} -F ${shellQuote(configFile)} ${shellQuote(alias)}`
|
|
57
|
+
|
|
58
|
+
const assertActive = (services, grant) => { if (services.connection() !== grant) throw fail('Cloud connection changed. Open the sandbox from OpenRod again.', 403) }
|
|
59
|
+
async function install(name, origin, services, grant, requestedContext) {
|
|
60
|
+
assertActive(services, grant)
|
|
61
|
+
const owner = grant.user.uid
|
|
62
|
+
const ticket = await services.call(scopedTarget(`/os/sandboxes/${name}/ssh-ticket`, requestedContext), { method: 'POST', body: {} })
|
|
63
|
+
const keys = validateHostKeys(ticket.hostKeys)
|
|
64
|
+
const context = requestedContext ?? ticket.context
|
|
65
|
+
if (requestedContext && ticket.context !== requestedContext) throw fail('Cloud workspace changed. Open the sandbox from OpenRod again.', 409)
|
|
66
|
+
const alias = aliasFor(owner, name, context)
|
|
67
|
+
assertActive(services, grant)
|
|
68
|
+
const config = [
|
|
69
|
+
`Host ${alias}`, ` HostName ${alias}`, ' User sandbox', ' StrictHostKeyChecking yes',
|
|
70
|
+
` UserKnownHostsFile ${configQuote(hostsFile)}`, ' GlobalKnownHostsFile /dev/null',
|
|
71
|
+
' CheckHostIP no', ' UpdateHostKeys no', ' IdentityAgent none', ' IdentitiesOnly yes',
|
|
72
|
+
' PubkeyAuthentication no', ' PasswordAuthentication no', ' KbdInteractiveAuthentication no',
|
|
73
|
+
' ControlMaster no', ' ServerAliveInterval 15', ' ServerAliveCountMax 3',
|
|
74
|
+
` ProxyCommand ${[node, helper, '--origin', origin, '--sandbox', name, '--owner', ownerId(owner), ...(context ? ['--context', context] : [])].map(proxyQuote).join(' ')}`,
|
|
75
|
+
].join('\n') + '\n'
|
|
76
|
+
await serial(async () => {
|
|
77
|
+
assertActive(services, grant)
|
|
78
|
+
await fs.mkdir(directory, { recursive: true, mode: 0o700 })
|
|
79
|
+
const stat = await fs.lstat(directory)
|
|
80
|
+
if (stat.isSymbolicLink() || !stat.isDirectory()) throw fail('OpenRod SSH directory must be a regular directory.', 409)
|
|
81
|
+
await fs.chmod(directory, 0o700)
|
|
82
|
+
const oldHosts = await readManaged(hostsFile)
|
|
83
|
+
assertActive(services, grant)
|
|
84
|
+
await writeManaged(hostsFile, oldHosts.split('\n').filter(line => line && !line.startsWith(`${alias} `)).concat(keys.map(key => `${alias} ${key}`)).join('\n') + '\n')
|
|
85
|
+
const begin = `# OpenRod Cloud ${alias}\n`, end = `# End OpenRod Cloud ${alias}\n`
|
|
86
|
+
let oldConfig = await readManaged(configFile)
|
|
87
|
+
const start = oldConfig.indexOf(begin), finish = start < 0 ? -1 : oldConfig.indexOf(end, start)
|
|
88
|
+
if (start >= 0 && finish < 0) throw fail('OpenRod SSH config has an incomplete managed entry.', 409)
|
|
89
|
+
if (start >= 0) oldConfig = oldConfig.slice(0, start) + oldConfig.slice(finish + end.length)
|
|
90
|
+
assertActive(services, grant)
|
|
91
|
+
await writeManaged(configFile, oldConfig + begin + config + end)
|
|
92
|
+
await fs.mkdir(path.join(home, '.ssh'), { recursive: true, mode: 0o700 })
|
|
93
|
+
const userConfig = path.join(home, '.ssh/config'), oldUser = await readManaged(userConfig)
|
|
94
|
+
const include = `Include ${configQuote(configFile)}`
|
|
95
|
+
assertActive(services, grant)
|
|
96
|
+
if (!oldUser.split('\n').includes(include)) await writeManaged(userConfig, `${include}\n${oldUser}`)
|
|
97
|
+
})
|
|
98
|
+
assertActive(services, grant)
|
|
99
|
+
return { ticket, alias, config, command: commandFor(alias) }
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return async function localCloudNative(req, res, target, services) {
|
|
103
|
+
const url = new URL(target, 'http://local'), parts = url.pathname.slice('/api/os/'.length).split('/')
|
|
104
|
+
if (req.method === 'GET' && parts.length === 1 && parts[0] === 'editors') {
|
|
105
|
+
responseJson(res, 200, Object.entries(EDITORS).map(([id, editor]) => ({ id, label: editor.label, installed: Boolean(findEditor(id)) }))); return true
|
|
106
|
+
}
|
|
107
|
+
if (parts[0] !== 'sandboxes' || parts.length !== 3 || !NAME.test(parts[1] ?? '') || !['ssh', 'ssh-open', 'ssh-config', 'ssh-ticket', 'editor'].includes(parts[2])) return false
|
|
108
|
+
const [, name, action] = parts
|
|
109
|
+
if (action === 'ssh' ? req.method !== 'GET' : req.method !== 'POST') return false
|
|
110
|
+
const input = req.method === 'POST' ? await readJson(req) : {}
|
|
111
|
+
const context = req.headers['x-openshell-context'] ?? url.searchParams.get('context') ?? input.context
|
|
112
|
+
if (context !== undefined && context !== null) {
|
|
113
|
+
let selection
|
|
114
|
+
try { selection = JSON.parse(context) } catch { throw fail('Invalid cloud workspace.') }
|
|
115
|
+
if (!Array.isArray(selection) || selection.length !== 2 || !selection.every(value => typeof value === 'string' && /^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,127}$/.test(value))) throw fail('Invalid cloud workspace.')
|
|
116
|
+
}
|
|
117
|
+
const connection = services.connection(), owner = ownerId(connection.user.uid)
|
|
118
|
+
if (input.owner !== undefined && input.owner !== owner) throw fail('This SSH alias belongs to a different Google account. Open the sandbox from OpenRod again.', 403)
|
|
119
|
+
const sandbox = await services.call(scopedTarget(`/os/sandboxes/${name}`, context))
|
|
120
|
+
assertActive(services, connection)
|
|
121
|
+
const origin = `http://${req.headers.host}`
|
|
122
|
+
if (!/^http:\/\/(localhost|127\.0\.0\.1|\[::1\])(?::[0-9]+)?$/.test(origin)) throw fail('Invalid local origin.', 403)
|
|
123
|
+
let alias = aliasFor(connection.user.uid, name, context)
|
|
124
|
+
if (action === 'ssh') {
|
|
125
|
+
const view = connectionView(sandbox, { name: 'openrod-cloud', endpoint: dependencies.origin ?? cloudOrigin(), remote: true }, { env, platform })
|
|
126
|
+
const ready = sandbox.phase === 'ready'
|
|
127
|
+
if (ready) alias = (await install(name, origin, services, connection, context)).alias
|
|
128
|
+
assertActive(services, connection)
|
|
129
|
+
responseJson(res, 200, { ...view, alias, defaultMode: 'exec', cliInstalled: true, canOpenTerminal: ready && Boolean(sshBinary(env)) && view.terminalSupported, modes: ready ? { exec: { mode: 'exec', command: commandFor(alias), argv: ['-F', configFile, alias], workdir: projectOf(sandbox) ? `/sandbox/${projectOf(sandbox)}` : '/sandbox' } } : {} }); return true
|
|
130
|
+
}
|
|
131
|
+
if (sandbox.phase !== 'ready') throw fail('This sandbox is not running.', 409)
|
|
132
|
+
if (action === 'ssh-open' && input.mode !== undefined && input.mode !== 'exec') throw fail('Cloud SSH opens a fresh shell. Use the browser terminal for attach.')
|
|
133
|
+
let editor
|
|
134
|
+
if (action === 'editor') {
|
|
135
|
+
if (!Object.hasOwn(EDITORS, input.editor ?? '')) throw fail('Unknown editor.')
|
|
136
|
+
editor = findEditor(input.editor)
|
|
137
|
+
if (!editor) throw fail(`${EDITORS[input.editor].label} is not installed on this machine.`, 409)
|
|
138
|
+
}
|
|
139
|
+
if (action === 'ssh-open' && !sshBinary(env)) throw fail('OpenSSH is not installed on this machine.', 409)
|
|
140
|
+
const installed = await install(name, origin, services, connection, context)
|
|
141
|
+
assertActive(services, connection)
|
|
142
|
+
if (action === 'ssh-ticket') responseJson(res, 200, installed.ticket)
|
|
143
|
+
else if (action === 'ssh-config') responseJson(res, 200, { config: installed.config, alias, command: installed.command })
|
|
144
|
+
else if (action === 'ssh-open') {
|
|
145
|
+
await (dependencies.launchTerminal ?? launchNativeTerminal)(installed.command, { ...dependencies, platform }); responseJson(res, 200, { ok: true, mode: 'exec' })
|
|
146
|
+
} else {
|
|
147
|
+
await (dependencies.launchEditor ?? launchEditor)(editor, ['--remote', `ssh-remote+${alias}`, projectOf(sandbox) ? `/sandbox/${projectOf(sandbox)}` : '/sandbox'], dependencies)
|
|
148
|
+
responseJson(res, 200, { ok: true, editor: input.editor })
|
|
149
|
+
}
|
|
150
|
+
return true
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import http from 'node:http'
|
|
2
|
+
import https from 'node:https'
|
|
3
|
+
import {randomBytes,randomUUID,createHash} from 'node:crypto'
|
|
4
|
+
import {isLocalApiRequest,requestPath} from './security.js'
|
|
5
|
+
import {validateLocalConnection} from './cloud-connections.js'
|
|
6
|
+
import {readJson,responseJson,remoteFail,safeWorkspaceTarget} from './remote-http.js'
|
|
7
|
+
import {cloudOrigin,CLOUD_SOON} from './cloud-origin.js'
|
|
8
|
+
const PREFIX='/api/cloud/local-connect'
|
|
9
|
+
const cloudPath=req=>{try{const path=requestPath(req);return path.startsWith('/api/local-cloud/')||path.startsWith('/api/remote/')}catch{return false}}
|
|
10
|
+
// Without a configured cloud origin every sign-in, relay and socket route refuses before any cloud request.
|
|
11
|
+
function unavailableLocalCloud(){return {close(){},setNative(){},
|
|
12
|
+
middleware(req,res,next){if(!cloudPath(req))return next();req.resume();responseJson(res,409,{error:CLOUD_SOON})},
|
|
13
|
+
upgrade(req,socket){if(!cloudPath(req))return false;socket.on('error',()=>{});socket.end(`HTTP/1.1 409 Conflict\r\nContent-Type: application/json\r\nConnection: close\r\n\r\n${JSON.stringify({error:CLOUD_SOON})}`);return true},
|
|
14
|
+
}}
|
|
15
|
+
export function createLocalCloud({origin=cloudOrigin(),allowTestHttp=false,native}={}) {
|
|
16
|
+
if(!origin)return unavailableLocalCloud()
|
|
17
|
+
const url=new URL(origin)
|
|
18
|
+
if(url.origin!==origin||url.username||url.password||(!allowTestHttp&&url.protocol!=='https:'))throw Error('Invalid cloud origin')
|
|
19
|
+
const transport=url.protocol==='https:'?https:http
|
|
20
|
+
let pending,grant,expiry,generation=0
|
|
21
|
+
const active=new Set(),exchanging=new Map()
|
|
22
|
+
function clear(){grant=null;clearTimeout(expiry);for(const stream of active)stream.destroy();active.clear()}
|
|
23
|
+
function connection(){if(!grant||grant.expires<=Date.now()){clear();throw remoteFail('Connect to OpenRod Cloud first',401)}return grant}
|
|
24
|
+
function upstream(path,{method='GET',body,token,maxBytes=64000}={}) {
|
|
25
|
+
return new Promise((resolve,reject)=>{
|
|
26
|
+
const req=transport.request(new URL(PREFIX+path,origin),{method,headers:{origin,host:url.host,'content-type':'application/json','x-openshell-console':'1',...(token?{authorization:`Bearer ${token}`}:{})}},res=>{
|
|
27
|
+
let raw='';res.on('data',c=>{raw+=c;if(Buffer.byteLength(raw)>maxBytes)req.destroy(remoteFail('Cloud response too large',502))});res.on('end',()=>{let value;try{value=JSON.parse(raw)}catch{return reject(remoteFail('Invalid cloud response',502))}if(res.statusCode>=300)return reject(remoteFail(value.error??'Cloud connection unavailable',res.statusCode));resolve(value)})
|
|
28
|
+
});req.setTimeout(30000,()=>req.destroy(remoteFail('Cloud connection timed out',503)));req.on('error',reject);req.end(body===undefined?undefined:JSON.stringify(body))
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
const call=(path,options={})=>upstream(path,{...options,token:connection().token})
|
|
32
|
+
const ownerId=uid=>createHash('sha256').update(uid).digest('hex').slice(0,16)
|
|
33
|
+
const assertOwner=req=>{const current=connection(),supplied=req.headers['x-openrod-local-owner']??new URL(req.url,'http://local').searchParams.get('owner');if(supplied!==ownerId(current.user.uid))throw Object.assign(remoteFail('This cloud connection belongs to a different account. Sign in again in this tab.',403),{code:'CLOUD_OWNER_CHANGED'});return current}
|
|
34
|
+
const status=()=>grant?{connected:true,user:grant.user,owner:ownerId(grant.user.uid),expires:grant.expires}:{connected:false}
|
|
35
|
+
function relay(req,res,target){
|
|
36
|
+
const current=connection(),headers={host:url.host,origin,'x-openshell-console':'1',authorization:`Bearer ${current.token}`}
|
|
37
|
+
for(const k of ['content-type','content-length','accept','range','x-openshell-context','x-openshell-location'])if(req.headers[k])headers[k]=req.headers[k]
|
|
38
|
+
const proxy=transport.request(new URL(PREFIX+'/os'+target.slice('/api/os'.length),origin),{method:req.method,headers},remote=>{
|
|
39
|
+
if(remote.statusCode===401&&grant===current){active.delete(res);clear()}
|
|
40
|
+
const headers={...remote.headers};for(const key of ['set-cookie','connection','transfer-encoding','location'])delete headers[key]
|
|
41
|
+
res.writeHead(remote.statusCode,headers);remote.pipe(res);remote.on('error',()=>res.destroy())
|
|
42
|
+
})
|
|
43
|
+
proxy.setTimeout(35*60000,()=>proxy.destroy());active.add(res)
|
|
44
|
+
proxy.on('error',()=>{if(!res.headersSent)responseJson(res,503,{error:'Cloud compute is unavailable. Reconnect or try again.'});else res.destroy()})
|
|
45
|
+
let bytes=0;req.on('data',c=>{bytes+=c.length;if(bytes>36*1024*1024){proxy.destroy();if(!res.headersSent)responseJson(res,413,{error:'Upload exceeds limit'})}})
|
|
46
|
+
res.on('close',()=>{active.delete(res);proxy.destroy()});req.pipe(proxy)
|
|
47
|
+
}
|
|
48
|
+
function relaySocket(req,socket,head,target){
|
|
49
|
+
const current=connection()
|
|
50
|
+
const proxy=transport.request(new URL(PREFIX+'/os'+target.slice('/api/os'.length),origin),{headers:{host:url.host,origin,authorization:`Bearer ${current.token}`,upgrade:'websocket',connection:'Upgrade','sec-websocket-key':req.headers['sec-websocket-key'],'sec-websocket-version':req.headers['sec-websocket-version']}})
|
|
51
|
+
active.add(socket)
|
|
52
|
+
proxy.once('upgrade',(response,remote,remoteHead)=>{
|
|
53
|
+
socket.write(`HTTP/1.1 101 Switching Protocols\r\n${Object.entries(response.headers).filter(([k])=>!['set-cookie'].includes(k)).map(([k,v])=>`${k}: ${v}`).join('\r\n')}\r\n\r\n`)
|
|
54
|
+
if(remoteHead.length)socket.write(remoteHead);if(head.length)remote.write(head)
|
|
55
|
+
socket.pipe(remote);remote.pipe(socket);socket.on('close',()=>remote.destroy());remote.on('close',()=>socket.destroy());remote.on('error',()=>socket.destroy());socket.on('error',()=>remote.destroy())
|
|
56
|
+
})
|
|
57
|
+
proxy.once('response',res=>{if(res.statusCode===401&&grant===current)clear();socket.end('HTTP/1.1 403 Forbidden\r\nConnection: close\r\n\r\n')})
|
|
58
|
+
proxy.once('error',()=>socket.destroy());socket.once('close',()=>{active.delete(socket);proxy.destroy()});proxy.end()
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
call,connection,close:()=>{generation++;pending=null;clear()},setNative:handler=>{native=handler},
|
|
62
|
+
async middleware(req,res,next){
|
|
63
|
+
let path
|
|
64
|
+
try{path=requestPath(req);if(!path.startsWith('/api/local-cloud/')&&!path.startsWith('/api/remote/'))return next()
|
|
65
|
+
if(!isLocalApiRequest(req))throw remoteFail('Request rejected',403)
|
|
66
|
+
if(path==='/api/local-cloud/status'&&req.method==='GET'){
|
|
67
|
+
if(grant){const current=grant;try{const result=await call('/identity');if(grant===current&&result.user?.uid===current.user.uid)current.user=result.user;return responseJson(res,200,status())}catch(error){if(grant!==current)return responseJson(res,200,status());if([401,403].includes(error.status))clear();else return responseJson(res,200,{...status(),error:error.message})}}
|
|
68
|
+
return responseJson(res,200,status())
|
|
69
|
+
}
|
|
70
|
+
if(path==='/api/local-cloud/machine'&&req.method==='GET'){const current=assertOwner(req),machine=await call('/machine');if(grant!==current)throw remoteFail('Cloud connection changed. Try again.',401);return responseJson(res,200,{...status(),machine})}
|
|
71
|
+
if(path==='/api/local-cloud/inventory'&&req.method==='GET'){const current=assertOwner(req),inventory=await call('/inventory',{maxBytes:4*1024*1024});if(grant!==current)throw remoteFail('Cloud connection changed. Try again.',401);return responseJson(res,200,inventory)}
|
|
72
|
+
if(path==='/api/local-cloud/start'&&req.method==='POST'){
|
|
73
|
+
const body=await readJson(req),verifier=randomBytes(32).toString('hex'),nonce=randomUUID(),challenge=createHash('sha256').update(verifier).digest('hex')
|
|
74
|
+
const bound=validateLocalConnection({origin:body.origin,nonce,challenge})
|
|
75
|
+
if(body.origin!==`http://${req.headers.host}`)throw remoteFail('Local origin does not match this OpenRod instance',403)
|
|
76
|
+
pending={...bound,verifier,generation:++generation,expires:Date.now()+300000}
|
|
77
|
+
return responseJson(res,200,{nonce,challenge,url:`${origin}/?handoff=1#local-connect=${Buffer.from(JSON.stringify(bound)).toString('base64url')}`})
|
|
78
|
+
}
|
|
79
|
+
if(path==='/api/local-cloud/finish'&&req.method==='POST'){
|
|
80
|
+
const body=await readJson(req),current=pending
|
|
81
|
+
if(!current||current.expires<=Date.now()||body.nonce!==current.nonce||typeof body.code!=='string')throw remoteFail('Local sign-in expired. Try again.',401)
|
|
82
|
+
pending=null;exchanging.set(current.nonce,current)
|
|
83
|
+
const result=await upstream('/exchange',{method:'POST',body:{code:body.code,verifier:current.verifier,nonce:current.nonce}}).finally(()=>exchanging.delete(current.nonce))
|
|
84
|
+
if(current.cancelled||current.generation!==generation){if(result.token)await upstream('/revoke',{method:'POST',token:result.token,body:{}}).catch(()=>{});throw remoteFail('Local connection was cancelled. Try again.',401)}
|
|
85
|
+
if(typeof result.token!=='string'||!result.user?.uid||!Number.isFinite(result.expires)||result.expires<=Date.now()||result.expires>Date.now()+3600000)throw remoteFail('Invalid cloud authorization',502)
|
|
86
|
+
clear();grant={...result,nonce:current.nonce};expiry=setTimeout(clear,Math.max(1,result.expires-Date.now()));expiry.unref?.()
|
|
87
|
+
return responseJson(res,200,status())
|
|
88
|
+
}
|
|
89
|
+
if(path==='/api/local-cloud/cancel'&&req.method==='POST'){
|
|
90
|
+
const body=await readJson(req)
|
|
91
|
+
if(typeof body.nonce!=='string')throw remoteFail('Invalid sign-in attempt')
|
|
92
|
+
if(pending?.nonce===body.nonce){pending=null;generation++}
|
|
93
|
+
const current=exchanging.get(body.nonce)
|
|
94
|
+
if(current){current.cancelled=true;if(current.generation===generation)generation++}
|
|
95
|
+
if(grant?.nonce===body.nonce){const old=grant;clear();await upstream('/revoke',{method:'POST',token:old.token,body:{}}).catch(()=>{})}
|
|
96
|
+
return responseJson(res,200,status())
|
|
97
|
+
}
|
|
98
|
+
if(path==='/api/local-cloud/disconnect'&&req.method==='POST'){
|
|
99
|
+
await readJson(req);if(grant)assertOwner(req);const old=grant;generation++;pending=null;clear()
|
|
100
|
+
if(old)await upstream('/revoke',{method:'POST',token:old.token,body:{}}).catch(()=>{})
|
|
101
|
+
return responseJson(res,200,status())
|
|
102
|
+
}
|
|
103
|
+
if(path.startsWith('/api/remote/os/')){
|
|
104
|
+
const target=safeWorkspaceTarget(req.url,'/api/remote/os'),current=assertOwner(req)
|
|
105
|
+
const boundConnection=()=>{if(connection()!==current)throw Object.assign(remoteFail('Cloud connection changed. Open this sandbox again.',403),{code:'CLOUD_OWNER_CHANGED'});return current}
|
|
106
|
+
const boundCall=async(path,options={})=>{boundConnection();const result=await upstream(path,{...options,token:current.token});boundConnection();return result}
|
|
107
|
+
if(native&&await native(req,res,target,{call:boundCall,connection:boundConnection}))return
|
|
108
|
+
boundConnection()
|
|
109
|
+
return relay(req,res,target)
|
|
110
|
+
}
|
|
111
|
+
throw remoteFail('Not found',404)
|
|
112
|
+
}catch(error){if(!res.headersSent)responseJson(res,error.status??503,{error:error.status?error.message:'Cloud connection unavailable',...(error.code?{code:error.code}:{})});else res.destroy()}
|
|
113
|
+
},
|
|
114
|
+
upgrade(req,socket,head){
|
|
115
|
+
try{if(!requestPath(req).startsWith('/api/remote/'))return false
|
|
116
|
+
if(!isLocalApiRequest(req))throw remoteFail('Request rejected',403)
|
|
117
|
+
const target=safeWorkspaceTarget(req.url,'/api/remote/os');assertOwner(req)
|
|
118
|
+
if(!['/api/os/terminal','/api/os/ssh'].includes(target.split('?')[0]))throw remoteFail('Not found',404)
|
|
119
|
+
socket.on('error',()=>{});relaySocket(req,socket,head,target);return true
|
|
120
|
+
}catch{socket.end('HTTP/1.1 403 Forbidden\r\nConnection: close\r\n\r\n');return true}
|
|
121
|
+
},
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import fs from 'node:fs/promises'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { randomUUID } from 'node:crypto'
|
|
4
|
+
import { contextKey, defaultContextSelection, runWithContext } from './gateway.js'
|
|
5
|
+
import { stateDirectory } from './paths.js'
|
|
6
|
+
|
|
7
|
+
const fail = message => Object.assign(new Error(message), { status: 409 })
|
|
8
|
+
const locationOf = (context, remote = false, host = null, connected = true, error = null) => ({
|
|
9
|
+
id: contextKey(context), context: contextKey(context), gateway: context.gateway, workspace: context.workspace,
|
|
10
|
+
label: remote ? `SSH · ${host}` : 'Local', remote, ...(remote && host ? { host } : {}), connected, ...(error ? { error } : {}),
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
export function createLocationInventory({ connections, listSandboxes, listTemplates, logger = console, directory = stateDirectory(), defaultLabel = 'Local' }) {
|
|
14
|
+
const file = path.join(directory, 'remote-gateways', 'last-inventory.json')
|
|
15
|
+
let cached = null, ready = null, writes = Promise.resolve(), refreshing = null
|
|
16
|
+
const availability = new Map()
|
|
17
|
+
const load = () => ready ??= (async () => {
|
|
18
|
+
if (!connections) return
|
|
19
|
+
try {
|
|
20
|
+
const value = JSON.parse(await fs.readFile(file, 'utf8'))
|
|
21
|
+
if (value.location?.remote && typeof value.location.context === 'string' && Array.isArray(value.sandboxes) && Array.isArray(value.templates)) cached = value
|
|
22
|
+
} catch (error) { if (error.code !== 'ENOENT') logger.warn(`Remote inventory cache unavailable: ${error.message}`) }
|
|
23
|
+
})()
|
|
24
|
+
const save = value => {
|
|
25
|
+
const data = JSON.stringify(value)
|
|
26
|
+
writes = writes.catch(() => {}).then(async () => {
|
|
27
|
+
await fs.mkdir(path.dirname(file), { recursive: true, mode: 0o700 })
|
|
28
|
+
const temporary = `${file}.${randomUUID()}.tmp`
|
|
29
|
+
await fs.writeFile(temporary, data, { mode: 0o600 })
|
|
30
|
+
await fs.rename(temporary, file)
|
|
31
|
+
})
|
|
32
|
+
return writes.catch(error => logger.warn(`Remote inventory cache could not be saved: ${error.message}`))
|
|
33
|
+
}
|
|
34
|
+
async function locations(includeAvailability = true) {
|
|
35
|
+
if (!connections) return [{ ...locationOf(defaultContextSelection()), label: defaultLabel }]
|
|
36
|
+
const { returnContext, remote } = await connections.locationSnapshot()
|
|
37
|
+
return [
|
|
38
|
+
...(returnContext && returnContext.gateway !== 'aws-eks' ? [locationOf(returnContext)] : []),
|
|
39
|
+
...(remote ? [locationOf(remote, true, remote.host,
|
|
40
|
+
remote.status === 'connected' && (!includeAvailability || availability.get(contextKey(remote))?.connected !== false),
|
|
41
|
+
remote.error || (includeAvailability ? availability.get(contextKey(remote))?.error : null))] : []),
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
async function resolve(context) {
|
|
45
|
+
const owner = (await locations()).find(location => location.context === context)
|
|
46
|
+
if (!owner) throw fail('This location is no longer available. Refresh before continuing.')
|
|
47
|
+
if (!owner.connected) throw fail('This SSH location is disconnected. Reconnect before continuing.')
|
|
48
|
+
return { gateway: owner.gateway, workspace: owner.workspace }
|
|
49
|
+
}
|
|
50
|
+
async function collect() {
|
|
51
|
+
await load()
|
|
52
|
+
const sources = await locations(false)
|
|
53
|
+
const inventories = await Promise.all(sources.map(async location => {
|
|
54
|
+
const previous = location.remote && cached?.location.context === location.context ? cached : null
|
|
55
|
+
if (!location.connected) return { location, sandboxes: previous?.sandboxes ?? [], templates: previous?.templates ?? [] }
|
|
56
|
+
const result = await runWithContext(location, () => Promise.allSettled([listSandboxes(), listTemplates()]))
|
|
57
|
+
const errors = result.filter(item => item.status === 'rejected').map(item => item.reason.rawMessage ?? item.reason.message ?? 'Inventory request failed')
|
|
58
|
+
const entry = {
|
|
59
|
+
location: { ...location, ...(errors.length ? { error: [...new Set(errors)].join('; ') } : {}) },
|
|
60
|
+
sandboxes: result[0].status === 'fulfilled' ? result[0].value : previous?.sandboxes ?? [],
|
|
61
|
+
templates: result[1].status === 'fulfilled' ? result[1].value : previous?.templates ?? [],
|
|
62
|
+
}
|
|
63
|
+
// A disconnect can race a response. Keep the rows, but never advertise
|
|
64
|
+
// the stopped gateway as usable or let a response replace a newer host.
|
|
65
|
+
if (location.remote) {
|
|
66
|
+
const current = (await locations(false)).find(item => item.context === location.context)
|
|
67
|
+
const connected = Boolean(current?.connected) && errors.length === 0
|
|
68
|
+
entry.location = { ...entry.location, connected, ...(current?.error ? { error: current.error } : {}) }
|
|
69
|
+
availability.set(location.context, { connected, error: entry.location.error ?? null })
|
|
70
|
+
if (current && result.some(item => item.status === 'fulfilled')) {
|
|
71
|
+
cached = entry
|
|
72
|
+
await save(entry)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return entry
|
|
76
|
+
}))
|
|
77
|
+
return {
|
|
78
|
+
locations: inventories.map(entry => entry.location),
|
|
79
|
+
sandboxes: inventories.flatMap(entry => entry.sandboxes.map(record => ({ ...record, location: entry.location }))),
|
|
80
|
+
templates: inventories.flatMap(entry => entry.templates.map(record => ({ ...record, location: entry.location }))),
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
locations, resolve,
|
|
85
|
+
// Drops the cached remote reading so a forgotten host leaves nothing behind.
|
|
86
|
+
async forget() {
|
|
87
|
+
await load()
|
|
88
|
+
cached = null
|
|
89
|
+
await writes.catch(() => {})
|
|
90
|
+
await fs.rm(file, { force: true })
|
|
91
|
+
},
|
|
92
|
+
refresh: () => refreshing ??= collect().finally(() => { refreshing = null }),
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import http from 'node:http'
|
|
2
|
+
import { createHash, randomBytes, randomUUID } from 'node:crypto'
|
|
3
|
+
import { signWorkerRequest } from './worker-auth.js'
|
|
4
|
+
export const MACHINE_DATABASE='openrod-cloud'
|
|
5
|
+
const fail=(message,status=503)=>Object.assign(Error(message),{status})
|
|
6
|
+
export function machineName(uid) {
|
|
7
|
+
if(typeof uid!=='string'||!uid||uid.length>128)throw fail('Invalid account',400)
|
|
8
|
+
return `openrod-user-${createHash('sha256').update(uid).digest('hex').slice(0,24)}`
|
|
9
|
+
}
|
|
10
|
+
export function createMachineStore(db,{maxMachines=10,now=()=>Date.now()}={}) {
|
|
11
|
+
if(!Number.isInteger(maxMachines)||maxMachines<1||maxMachines>100)throw Error('Fleet limit must be between 1 and 100')
|
|
12
|
+
const ref=uid=>db.collection('machines').doc(machineName(uid))
|
|
13
|
+
return {
|
|
14
|
+
async reserve(identity) {
|
|
15
|
+
const document=ref(identity.uid),fleet=db.collection('control').doc('fleet')
|
|
16
|
+
return db.runTransaction(async tx=>{
|
|
17
|
+
const current=await tx.get(document)
|
|
18
|
+
if(current.exists){const record=current.data();if(record.uid!==identity.uid)throw fail('Machine ownership mismatch',403);return record}
|
|
19
|
+
const counter=await tx.get(fleet),count=counter.exists?counter.data().count:0
|
|
20
|
+
if(!Number.isInteger(count)||count<0||count>=maxMachines)throw fail('Cloud capacity is full. Please try again later.')
|
|
21
|
+
const record={uid:identity.uid,email:identity.email??null,name:machineName(identity.uid),key:randomBytes(32).toString('hex'),requestId:randomUUID(),createdAt:now(),state:'provisioning',leaseUntil:0}
|
|
22
|
+
tx.set(document,record);tx.set(fleet,{count:count+1});return record
|
|
23
|
+
})
|
|
24
|
+
},
|
|
25
|
+
async get(uid){const result=await ref(uid).get();return result.exists?result.data():null},
|
|
26
|
+
async byName(name){if(!/^openrod-user-[a-f0-9]{24}$/.test(name))return null;const r=await db.collection('machines').doc(name).get();return r.exists?r.data():null},
|
|
27
|
+
async lease(uid){return db.runTransaction(async tx=>{const r=ref(uid),s=await tx.get(r);if(!s.exists||s.data().leaseUntil>now())return false;tx.update(r,{leaseUntil:now()+120000});return true})},
|
|
28
|
+
async update(uid,values){return db.runTransaction(async tx=>{const r=ref(uid);await tx.get(r);tx.update(r,values)})},
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function workerReady(record,address,{port=4600,host=new URL(process.env.OPENROD_PUBLIC_ORIGIN||process.env.OPENROD_CLOUD_ORIGIN||'https://localhost').host,timeoutMs=5000,requestProbe=http.request}={}) {
|
|
32
|
+
const request={method:'GET',url:'/api/os/overview'}
|
|
33
|
+
return new Promise(resolve=>{
|
|
34
|
+
let settled=false,deadline
|
|
35
|
+
const finish=ready=>{if(settled)return;settled=true;clearTimeout(deadline);resolve(ready)}
|
|
36
|
+
const probe=requestProbe({hostname:address,port,path:request.url,method:request.method,headers:{host,'x-openrod-worker-auth':signWorkerRequest(record.key,{uid:record.uid,expires:Date.now()+60000},request)}},response=>{response.resume();finish(response.statusCode===200)})
|
|
37
|
+
// Socket inactivity does not include DNS or a pending connection. Bound the
|
|
38
|
+
// entire probe so an unreachable worker cannot hold a provisioning lease.
|
|
39
|
+
deadline=setTimeout(()=>{finish(false);probe.destroy()},timeoutMs)
|
|
40
|
+
probe.setTimeout(timeoutMs,()=>{finish(false);probe.destroy()})
|
|
41
|
+
probe.on('error',()=>finish(false))
|
|
42
|
+
probe.on('close',()=>finish(false))
|
|
43
|
+
probe.end()
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
export function createMachineManager(store,compute,{ready=workerReady}={}) {
|
|
47
|
+
const inflight=new Map(),readyCache=new Map()
|
|
48
|
+
async function ensure(identity) {
|
|
49
|
+
const cached=readyCache.get(identity.uid)
|
|
50
|
+
if(cached && cached.until>Date.now())return cached.record
|
|
51
|
+
if(inflight.has(identity.uid))return inflight.get(identity.uid)
|
|
52
|
+
const task=(async()=>{
|
|
53
|
+
const record=await store.reserve(identity)
|
|
54
|
+
if(!await store.lease(identity.uid))return record
|
|
55
|
+
try{
|
|
56
|
+
const instance=await compute.get(record.name)
|
|
57
|
+
if(!instance) {
|
|
58
|
+
if(record.everReady)throw fail('Your machine is missing. Contact your OpenRod administrator.')
|
|
59
|
+
await compute.create(record)
|
|
60
|
+
await store.update(identity.uid,{state:'provisioning',error:null})
|
|
61
|
+
}else {
|
|
62
|
+
if(instance.labels?.openrod_owner!==record.name.slice(9))throw fail('Machine ownership mismatch',403)
|
|
63
|
+
const address=instance.networkInterfaces?.[0]?.networkIP
|
|
64
|
+
if(address&&!/^10\.80\.0\.\d{1,3}$/.test(address))throw fail('Unexpected worker address')
|
|
65
|
+
const isReady=instance.status==='RUNNING'&&address&&await ready(record,address)
|
|
66
|
+
const stalled=!isReady && Date.now()-record.createdAt>30*60000
|
|
67
|
+
await store.update(identity.uid,{state:isReady?'ready':stalled?'error':'provisioning',address:address??null,everReady:Boolean(record.everReady||isReady),error:stalled?'Machine startup is taking longer than expected. Contact your OpenRod administrator.':null})
|
|
68
|
+
}
|
|
69
|
+
}catch(error){await store.update(identity.uid,{state:'error',error:'Machine provisioning failed. Try again or contact your OpenRod administrator.'});console.error(JSON.stringify({event:'openrod.provision.failed',machine:record.name,error:error.message}));throw error}
|
|
70
|
+
finally{await store.update(identity.uid,{leaseUntil:0})}
|
|
71
|
+
const result=await store.get(identity.uid)
|
|
72
|
+
if(result.state==='ready')readyCache.set(identity.uid,{record:result,until:Date.now()+30000})
|
|
73
|
+
return result
|
|
74
|
+
})()
|
|
75
|
+
inflight.set(identity.uid,task)
|
|
76
|
+
try{return await task}finally{inflight.delete(identity.uid)}
|
|
77
|
+
}
|
|
78
|
+
return {store,ensure,async status(identity){const r=await ensure(identity);return {name:r.name,status:r.state,error:r.error??null}},async target(identity){const r=await ensure(identity);if(r.state!=='ready'||!r.address)throw fail('Your cloud machine is starting. Please try again shortly.');return r}}
|
|
79
|
+
}
|
|
80
|
+
export async function firebaseMachines(config) {
|
|
81
|
+
const { getApps }=await import('firebase-admin/app'),{getFirestore}=await import('firebase-admin/firestore')
|
|
82
|
+
const { createCompute }=await import('./compute.js')
|
|
83
|
+
return createMachineManager(createMachineStore(getFirestore(getApps()[0],MACHINE_DATABASE),{maxMachines:Number(process.env.OPENROD_MAX_MACHINES??10)}),await createCompute(config))
|
|
84
|
+
}
|