openrod 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +8 -0
- package/README.md +58 -2
- package/SETUPS.md +75 -0
- package/THIRD_PARTY_NOTICES.md +15823 -0
- package/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/assets/index-CEZ0R3YS.js +522 -0
- package/dist/assets/index-DYjVZRjW.css +1 -0
- package/dist/assets/index.esm-BVqeoYDn.js +376 -0
- package/dist/assets/index.esm-CXAOoF3i.js +16 -0
- package/dist/assets/index.esm-D0s8MSqt.js +1666 -0
- package/dist/assets/pixelify-sans-cyrillic-wght-normal-BfQLqnEI.woff2 +0 -0
- package/dist/assets/pixelify-sans-latin-ext-wght-normal-CsF3XSp0.woff2 +0 -0
- package/dist/assets/pixelify-sans-latin-wght-normal-Cbhn5ptY.woff2 +0 -0
- package/dist/assets/terminal-view-6GBZ9nXN.css +32 -0
- package/dist/assets/terminal-view-CkPFNoXi.js +40 -0
- package/dist/favicon.png +0 -0
- package/dist/index.html +16 -0
- package/dist/logos/SOURCES.md +133 -0
- package/dist/logos/agents/aider.svg +1 -0
- package/dist/logos/agents/antigravity.svg +1 -0
- package/dist/logos/agents/claudecode.svg +1 -0
- package/dist/logos/agents/codex.svg +1 -0
- package/dist/logos/agents/copilot.svg +1 -0
- package/dist/logos/agents/cursor.svg +1 -0
- package/dist/logos/agents/factory.svg +1 -0
- package/dist/logos/agents/gemini.svg +1 -0
- package/dist/logos/agents/kiro.svg +1 -0
- package/dist/logos/agents/openclaw-color.svg +1 -0
- package/dist/logos/agents/opencode.svg +1 -0
- package/dist/logos/agents/pi.svg +1 -0
- package/dist/logos/anthropic.svg +1 -0
- package/dist/logos/aws-bedrock.svg +1 -0
- package/dist/logos/aws-s3.svg +1 -0
- package/dist/logos/aws.svg +1 -0
- package/dist/logos/claude-code.svg +1 -0
- package/dist/logos/codex.svg +1 -0
- package/dist/logos/copilot.svg +1 -0
- package/dist/logos/cursor.svg +1 -0
- package/dist/logos/deepinfra.svg +1 -0
- package/dist/logos/github.svg +1 -0
- package/dist/logos/google-cloud.svg +1 -0
- package/dist/logos/google-vertex-ai.svg +1 -0
- package/dist/logos/nvidia.svg +1 -0
- package/dist/logos/openai.svg +1 -0
- package/dist/logos/openrouter.svg +1 -0
- package/dist/logos/pypi.svg +1 -0
- package/dist/logos/templates/debian.svg +1 -0
- package/dist/logos/templates/nodejs.svg +1 -0
- package/dist/logos/templates/python.svg +1 -0
- package/dist/logos/templates/ubuntu.svg +1 -0
- package/dist/logos/vscode.svg +1 -0
- package/dist/openrod.png +0 -0
- package/node_modules/@bufbuild/protobuf/README.md +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.d.ts +6 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.d.ts +140 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.d.ts +79 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.d.ts +63 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.d.ts +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.d.ts +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.d.ts +145 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.d.ts +85 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +296 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.d.ts +634 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.d.ts +46 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.d.ts +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.d.ts +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +415 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.d.ts +73 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +1037 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.d.ts +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +131 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.d.ts +20 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.d.ts +49 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +157 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.d.ts +30 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.d.ts +107 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.d.ts +45 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +292 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.d.ts +217 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +469 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +954 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +437 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.d.ts +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +625 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.d.ts +34 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.d.ts +76 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.d.ts +135 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +188 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.d.ts +286 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +726 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +37 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.d.ts +69 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.d.ts +53 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.d.ts +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +334 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.d.ts +38 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +68 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +892 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +126 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +59 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +242 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.d.ts +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.d.ts +6 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.d.ts +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.d.ts +79 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.d.ts +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.d.ts +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.d.ts +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.d.ts +145 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.d.ts +85 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +293 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.d.ts +634 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.d.ts +46 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.d.ts +60 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.d.ts +48 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +409 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.d.ts +73 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +1029 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.d.ts +16 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +128 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.d.ts +20 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.d.ts +49 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +152 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.d.ts +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.d.ts +107 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.d.ts +45 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +284 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.d.ts +217 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +464 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +948 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +433 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.d.ts +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +620 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.d.ts +34 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.d.ts +76 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.d.ts +135 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +184 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +286 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +721 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.d.ts +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.d.ts +53 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.d.ts +70 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +325 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.d.ts +38 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +65 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +888 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +123 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +103 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +56 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +64 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.d.ts +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
- package/node_modules/@bufbuild/protobuf/package.json +147 -0
- package/node_modules/@connectrpc/connect/README.md +62 -0
- package/node_modules/@connectrpc/connect/dist/cjs/any-client.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/any-client.js +33 -0
- package/node_modules/@connectrpc/connect/dist/cjs/call-options.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/cjs/call-options.js +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/callback-client.d.ts +31 -0
- package/node_modules/@connectrpc/connect/dist/cjs/callback-client.js +116 -0
- package/node_modules/@connectrpc/connect/dist/cjs/code.d.ts +75 -0
- package/node_modules/@connectrpc/connect/dist/cjs/code.js +92 -0
- package/node_modules/@connectrpc/connect/dist/cjs/connect-error.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/cjs/connect-error.js +141 -0
- package/node_modules/@connectrpc/connect/dist/cjs/context-values.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/cjs/context-values.js +41 -0
- package/node_modules/@connectrpc/connect/dist/cjs/cors.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/cjs/cors.js +82 -0
- package/node_modules/@connectrpc/connect/dist/cjs/http-headers.d.ts +37 -0
- package/node_modules/@connectrpc/connect/dist/cjs/http-headers.js +63 -0
- package/node_modules/@connectrpc/connect/dist/cjs/implementation.d.ts +159 -0
- package/node_modules/@connectrpc/connect/dist/cjs/implementation.js +78 -0
- package/node_modules/@connectrpc/connect/dist/cjs/index.d.ts +22 -0
- package/node_modules/@connectrpc/connect/dist/cjs/index.js +46 -0
- package/node_modules/@connectrpc/connect/dist/cjs/interceptor.d.ts +170 -0
- package/node_modules/@connectrpc/connect/dist/cjs/interceptor.js +30 -0
- package/node_modules/@connectrpc/connect/dist/cjs/package.json +1 -0
- package/node_modules/@connectrpc/connect/dist/cjs/promise-client.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/cjs/promise-client.js +135 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/async-iterable.d.ts +527 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/async-iterable.js +913 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/compression.d.ts +48 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/compression.js +75 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/content-type-matcher.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/content-type-matcher.js +43 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/create-method-url.d.ts +17 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/create-method-url.js +36 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/envelope.d.ts +90 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/envelope.js +214 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/index.d.ts +25 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/index.js +95 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/invoke-implementation.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/invoke-implementation.js +178 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/limit-io.d.ts +24 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/limit-io.js +80 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/normalize.d.ts +11 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/normalize.js +55 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-handler-factory.d.ts +18 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-handler-factory.js +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-headers.d.ts +9 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-headers.js +67 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/run-call.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/run-call.js +125 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/serialization.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/serialization.js +149 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/signals.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/signals.js +100 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/transport-options.d.ts +98 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/transport-options.js +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-fetch.d.ts +35 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-fetch.js +150 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler-client.d.ts +7 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler-client.js +88 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler.d.ts +167 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler.js +130 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal.d.ts +102 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal.js +78 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/code-string.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/code-string.js +52 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/content-type.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/content-type.js +71 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/end-stream.d.ts +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/end-stream.js +137 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/error-json.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/error-json.js +166 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/get-request.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/get-request.js +66 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/handler-factory.js +296 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/headers.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/headers.js +32 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/http-status.d.ts +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/http-status.js +90 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/index.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/index.js +81 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/parse-timeout.js +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/query-params.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/query-params.js +24 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/request-header.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/request-header.js +70 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/trailer-mux.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/trailer-mux.js +53 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/transport.js +210 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/validate-response.d.ts +30 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/validate-response.js +71 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/version.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/version.js +58 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/content-type.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/content-type.js +38 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/gen/status_pb.d.ts +91 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/gen/status_pb.js +27 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/handler-factory.js +124 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/headers.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/headers.js +29 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/http-status.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/http-status.js +46 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/index.d.ts +10 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/index.js +61 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/parse-timeout.js +53 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/request-header.js +56 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/trailer-status.d.ts +28 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/trailer-status.js +118 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/transport.js +185 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-response.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-response.js +75 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-trailer.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-trailer.js +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/content-type.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/content-type.js +41 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/handler-factory.js +130 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/headers.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/headers.js +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/index.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/index.js +61 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/request-header.js +59 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/trailer.d.ts +27 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/trailer.js +71 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/transport.js +234 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/validate-response.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/validate-response.js +73 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router-transport.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router-transport.js +32 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router.d.ts +81 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router.js +68 -0
- package/node_modules/@connectrpc/connect/dist/cjs/transport.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/cjs/transport.js +15 -0
- package/node_modules/@connectrpc/connect/dist/esm/any-client.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/any-client.js +30 -0
- package/node_modules/@connectrpc/connect/dist/esm/call-options.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/call-options.js +14 -0
- package/node_modules/@connectrpc/connect/dist/esm/callback-client.d.ts +31 -0
- package/node_modules/@connectrpc/connect/dist/esm/callback-client.js +113 -0
- package/node_modules/@connectrpc/connect/dist/esm/code.d.ts +75 -0
- package/node_modules/@connectrpc/connect/dist/esm/code.js +89 -0
- package/node_modules/@connectrpc/connect/dist/esm/connect-error.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/esm/connect-error.js +137 -0
- package/node_modules/@connectrpc/connect/dist/esm/context-values.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/context-values.js +37 -0
- package/node_modules/@connectrpc/connect/dist/esm/cors.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/esm/cors.js +79 -0
- package/node_modules/@connectrpc/connect/dist/esm/http-headers.d.ts +37 -0
- package/node_modules/@connectrpc/connect/dist/esm/http-headers.js +58 -0
- package/node_modules/@connectrpc/connect/dist/esm/implementation.d.ts +159 -0
- package/node_modules/@connectrpc/connect/dist/esm/implementation.js +73 -0
- package/node_modules/@connectrpc/connect/dist/esm/index.d.ts +22 -0
- package/node_modules/@connectrpc/connect/dist/esm/index.js +27 -0
- package/node_modules/@connectrpc/connect/dist/esm/interceptor.d.ts +170 -0
- package/node_modules/@connectrpc/connect/dist/esm/interceptor.js +27 -0
- package/node_modules/@connectrpc/connect/dist/esm/promise-client.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/esm/promise-client.js +128 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/async-iterable.d.ts +527 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/async-iterable.js +891 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/compression.d.ts +48 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/compression.js +71 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/content-type-matcher.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/content-type-matcher.js +40 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/create-method-url.d.ts +17 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/create-method-url.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/envelope.d.ts +90 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/envelope.js +206 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/index.d.ts +25 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/index.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/invoke-implementation.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/invoke-implementation.js +173 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/limit-io.d.ts +24 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/limit-io.js +75 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/normalize.d.ts +11 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/normalize.js +51 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-handler-factory.d.ts +18 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-handler-factory.js +14 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-headers.d.ts +9 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-headers.js +64 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/run-call.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/run-call.js +121 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/serialization.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/serialization.js +141 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/signals.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/signals.js +95 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/transport-options.d.ts +98 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/transport-options.js +14 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-fetch.d.ts +35 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-fetch.js +142 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler-client.d.ts +7 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler-client.js +85 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler.d.ts +167 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler.js +124 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal.d.ts +102 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal.js +74 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/code-string.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/code-string.js +48 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/content-type.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/content-type.js +66 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/end-stream.d.ts +44 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/end-stream.js +131 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/error-json.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/error-json.js +160 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/get-request.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/get-request.js +63 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/handler-factory.js +293 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/headers.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/headers.js +29 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/http-status.d.ts +15 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/http-status.js +86 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/index.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/index.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/parse-timeout.js +41 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/query-params.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/query-params.js +21 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/request-header.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/request-header.js +66 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/trailer-mux.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/trailer-mux.js +49 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/transport.js +207 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/validate-response.d.ts +30 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/validate-response.js +67 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/version.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/version.js +53 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/content-type.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/content-type.js +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/gen/status_pb.d.ts +91 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/gen/status_pb.js +24 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/handler-factory.js +121 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/headers.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/headers.js +26 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/http-status.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/http-status.js +43 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/index.d.ts +10 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/index.js +28 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/parse-timeout.js +50 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/request-header.js +52 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/trailer-status.d.ts +28 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/trailer-status.js +113 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/transport.js +182 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-response.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-response.js +71 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-trailer.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-trailer.js +41 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/content-type.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/content-type.js +37 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/handler-factory.js +127 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/headers.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/headers.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/index.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/index.js +26 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/request-header.js +55 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/trailer.d.ts +27 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/trailer.js +65 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/transport.js +231 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/validate-response.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/validate-response.js +69 -0
- package/node_modules/@connectrpc/connect/dist/esm/router-transport.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/router-transport.js +29 -0
- package/node_modules/@connectrpc/connect/dist/esm/router.d.ts +81 -0
- package/node_modules/@connectrpc/connect/dist/esm/router.js +65 -0
- package/node_modules/@connectrpc/connect/dist/esm/transport.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/esm/transport.js +14 -0
- package/node_modules/@connectrpc/connect/package.json +67 -0
- package/node_modules/@connectrpc/connect-node/README.md +144 -0
- package/node_modules/@connectrpc/connect-node/buf.gen.yaml +10 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/compression.d.ts +15 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/compression.js +96 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-node-adapter.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-node-adapter.js +60 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-transport.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-transport.js +25 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-transport.d.ts +95 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-transport.js +24 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-web-transport.d.ts +96 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-web-transport.js +25 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/http2-session-manager.d.ts +146 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/http2-session-manager.js +543 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/index.d.ts +14 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/index.js +34 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-error.d.ts +45 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-error.js +153 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-transport-options.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-transport-options.js +58 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-client.d.ts +54 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-client.js +347 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-handler.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-handler.js +225 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-header.d.ts +20 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-header.js +117 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/package.json +1 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/compression.d.ts +15 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/compression.js +93 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-node-adapter.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-node-adapter.js +57 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-transport.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-transport.js +22 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-transport.d.ts +95 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-transport.js +21 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-web-transport.d.ts +96 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-web-transport.js +22 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/http2-session-manager.d.ts +146 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/http2-session-manager.js +539 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/index.d.ts +14 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/index.js +21 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-error.d.ts +45 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-error.js +146 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-transport-options.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-transport-options.js +55 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-client.d.ts +54 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-client.js +344 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-handler.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-handler.js +221 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-header.d.ts +20 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-header.js +113 -0
- package/node_modules/@connectrpc/connect-node/package.json +44 -0
- package/node_modules/@nvidia/openshell-sdk/README.md +303 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.d.ts +1243 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.js +1321 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.d.ts +35 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.js +79 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.d.ts +301 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.js +69 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.d.ts +581 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.js +90 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.d.ts +9131 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.js +1898 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.d.ts +58 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.js +24 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.d.ts +1203 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.js +277 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.d.ts +7 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.js +6 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.d.ts +14 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.js +177 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.d.ts +6 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.js +15 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.d.ts +11 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.js +58 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.d.ts +35 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.js +97 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/package.json +58 -0
- package/package.json +93 -4
- package/server/activity-delivery.js +143 -0
- package/server/activity-store.js +168 -0
- package/server/agent-inventory.js +76 -0
- package/server/agent-resources.py +60 -0
- package/server/api.js +648 -0
- package/server/cli.js +168 -0
- package/server/cloud-connections.js +56 -0
- package/server/cloud-origin.js +11 -0
- package/server/cloud-proxy.js +122 -0
- package/server/cloud-ssh-proxy.cjs +73 -0
- package/server/cloud-ssh.js +135 -0
- package/server/cloud-transfer.js +221 -0
- package/server/compute.js +50 -0
- package/server/editor.js +114 -0
- package/server/egress.js +204 -0
- package/server/files.js +489 -0
- package/server/gateway-install.js +64 -0
- package/server/gateway.js +415 -0
- package/server/image-templates.js +393 -0
- package/server/ingress.js +185 -0
- package/server/launch-token.js +55 -0
- package/server/local-catalog.js +111 -0
- package/server/local-cloud-native.js +152 -0
- package/server/local-cloud.js +123 -0
- package/server/location-inventory.js +94 -0
- package/server/machines.js +84 -0
- package/server/openshell-cli.js +144 -0
- package/server/org.js +536 -0
- package/server/orphan-processes.js +42 -0
- package/server/paths.js +28 -0
- package/server/policy-template-store.js +92 -0
- package/server/policy.js +583 -0
- package/server/remote-gateway-state.js +123 -0
- package/server/remote-gateway.js +420 -0
- package/server/remote-hosts.js +354 -0
- package/server/remote-http.js +14 -0
- package/server/remote-image-engine.js +47 -0
- package/server/remote-runtime.js +65 -0
- package/server/remote-runtime.py +162 -0
- package/server/sandbox-identity.js +14 -0
- package/server/security.js +139 -0
- package/server/session-revocations.js +20 -0
- package/server/setup-artifact-installer.py +54 -0
- package/server/setup-artifacts.js +23 -0
- package/server/setup-auth-discovery.js +24 -0
- package/server/setup-credentials.js +54 -0
- package/server/setup-deployment.js +299 -0
- package/server/setup-discovery.js +289 -0
- package/server/setup-egress.js +133 -0
- package/server/setup-http.js +47 -0
- package/server/setup-installer.py +289 -0
- package/server/setup-json.py +8 -0
- package/server/setup-members.js +77 -0
- package/server/setup-packages.js +214 -0
- package/server/setup-preparation.js +144 -0
- package/server/setup-python.js +8 -0
- package/server/setup-remote-check.js +35 -0
- package/server/setup-transfer.js +17 -0
- package/server/setup-verifier.cjs +43 -0
- package/server/setups.js +172 -0
- package/server/ssh-hosts.js +184 -0
- package/server/ssh.js +153 -0
- package/server/start.js +71 -0
- package/server/terminal.js +173 -0
- package/server/worker-auth.js +18 -0
- package/shared/agent-access.js +103 -0
- package/shared/antigravity-network-guidance.js +9 -0
- package/shared/group-membership.js +33 -0
- package/shared/group-network.js +29 -0
- package/shared/policy-templates.js +79 -0
- package/shared/secret-fields.js +35 -0
- package/shared/setup-launch.js +25 -0
- package/shared/setup-targets.js +11 -0
- package/shared/setup-targets.json +12 -0
- package/src/lib/activity-export.js +52 -0
- package/src/lib/activity-inventory.js +45 -0
- package/src/lib/agents.js +41 -0
- package/src/lib/api.js +173 -0
- package/src/lib/cloud-machine.js +9 -0
- package/src/lib/cloud-origin.js +6 -0
- package/src/lib/cloud-transfer.js +22 -0
- package/src/lib/compute-target.js +46 -0
- package/src/lib/delete-network-policies.js +15 -0
- package/src/lib/egress-groups.js +24 -0
- package/src/lib/egress.js +28 -0
- package/src/lib/files.js +24 -0
- package/src/lib/fleet.js +100 -0
- package/src/lib/format.js +24 -0
- package/src/lib/groups.js +16 -0
- package/src/lib/image-templates.js +139 -0
- package/src/lib/import-setup.js +36 -0
- package/src/lib/local-cloud.js +118 -0
- package/src/lib/location-inventory.js +20 -0
- package/src/lib/locations.js +5 -0
- package/src/lib/placement.js +9 -0
- package/src/lib/policy-editor.js +58 -0
- package/src/lib/policy-sources.js +33 -0
- package/src/lib/quick-setup.js +110 -0
- package/src/lib/sandbox-creations.js +59 -0
- package/src/lib/sandbox-images.js +38 -0
- package/src/lib/sandbox-session.js +140 -0
- package/src/lib/sandboxes.js +78 -0
- package/src/lib/secret-inventory.js +26 -0
- package/src/lib/services.js +41 -0
- package/src/lib/setup-import-jobs.js +62 -0
- package/src/lib/setup-imports.js +4 -0
- package/src/lib/setup-network.js +39 -0
- package/src/lib/setup-template-build.js +17 -0
- package/src/lib/utils.js +6 -0
- package/vendor/OPENSHELL-LICENSE +203 -0
- package/vendor/nvidia-openshell-sdk-0.0.0.tgz +0 -0
package/server/files.js
ADDED
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
import fs from 'node:fs/promises'
|
|
2
|
+
import { createReadStream, createWriteStream } from 'node:fs'
|
|
3
|
+
import { finished } from 'node:stream/promises'
|
|
4
|
+
import zlib from 'node:zlib'
|
|
5
|
+
import os from 'node:os'
|
|
6
|
+
import path from 'node:path'
|
|
7
|
+
import { randomUUID } from 'node:crypto'
|
|
8
|
+
import { spawn } from 'node:child_process'
|
|
9
|
+
import { CONFIG_DIR, gateway, contextKey, contextSelection, runWithContext } from './gateway.js'
|
|
10
|
+
import { SANDBOX_ROOT, TRANSFER_LIMIT, downloadCommand, formatBytes } from '../src/lib/files.js'
|
|
11
|
+
import { reasonFrom, runOpenShell } from './openshell-cli.js'
|
|
12
|
+
|
|
13
|
+
const fail = (message, status = 400) => Object.assign(new Error(message), { status })
|
|
14
|
+
const NAME = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/
|
|
15
|
+
const ID = /^[a-f0-9-]{36}$/
|
|
16
|
+
// Gateway label values: the folder name becomes one when it fits.
|
|
17
|
+
const LABEL_VALUE = /^[A-Za-z0-9]([A-Za-z0-9._-]{0,61}[A-Za-z0-9])?$/
|
|
18
|
+
const MAX_FILES = 50_000
|
|
19
|
+
const MAX_ENTRIES = 2000
|
|
20
|
+
const HOME = os.homedir()
|
|
21
|
+
|
|
22
|
+
// Vite reloads server modules during development; transfers in flight must survive that.
|
|
23
|
+
const state = globalThis[Symbol.for('openshell.console.files')] ??= { seeds: new Map(), batches: new Map(), downloads: new Map() }
|
|
24
|
+
const seedKey = (name) => JSON.stringify([contextKey(), name])
|
|
25
|
+
|
|
26
|
+
// ---- processes --------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
function run(command, args, { cwd, env } = {}) {
|
|
29
|
+
return new Promise((resolve, reject) => {
|
|
30
|
+
const child = spawn(command, args, { cwd, env, shell: false, stdio: ['ignore', 'pipe', 'pipe'] })
|
|
31
|
+
const out = []
|
|
32
|
+
let err = ''
|
|
33
|
+
child.stdout.on('data', (chunk) => out.push(chunk))
|
|
34
|
+
child.stderr.on('data', (chunk) => { err = (err + chunk).slice(-4000) })
|
|
35
|
+
child.once('error', reject)
|
|
36
|
+
child.once('close', (code) => (code === 0 ? resolve(Buffer.concat(out).toString('utf8')) : reject(fail(err.trim() || `${command} exited with ${code}.`, 500))))
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Uploads go through the `openshell` CLI: tar over the gateway's SSH relay,
|
|
41
|
+
// with its .gitignore filter. The SDK's exec takes at most 4 MiB of stdin, so
|
|
42
|
+
// it never carries an upload. Downloads stream out of exec instead (below):
|
|
43
|
+
// the CLI's download needs GNU `realpath -e` inside the sandbox, which the
|
|
44
|
+
// busybox images, OpenShell's default among them, do not have.
|
|
45
|
+
async function openshell(args, { cwd, timeout = 15 * 60_000, context } = {}) {
|
|
46
|
+
const { target, workspace } = context ?? await gateway()
|
|
47
|
+
const result = await runOpenShell(args, { cwd, gateway: target.name, workspace, timeoutMs: timeout, outputLimit: 20_000 })
|
|
48
|
+
const output = `${result.stdout}${result.stderr}`
|
|
49
|
+
if (result.timedOut) throw fail('The transfer timed out.', 504)
|
|
50
|
+
if (result.outputExceeded) throw fail('The openshell CLI produced too much output.', 502)
|
|
51
|
+
if (result.code !== 0) throw fail(reasonFrom(output), 502)
|
|
52
|
+
return output
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// ---- inside the sandbox -------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
export function sandboxPath(input) {
|
|
58
|
+
const raw = typeof input === 'string' && input ? input : SANDBOX_ROOT
|
|
59
|
+
if (!raw.startsWith('/') || raw.length > 4096 || raw.includes('\0')) throw fail('Use an absolute path under /sandbox.')
|
|
60
|
+
const clean = path.posix.normalize(raw).replace(/(.)\/+$/, '$1')
|
|
61
|
+
if (clean !== SANDBOX_ROOT && !clean.startsWith(`${SANDBOX_ROOT}/`)) throw fail('Only /sandbox is available here.')
|
|
62
|
+
return clean
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Follow symlinks inside the sandbox and refuse anything that lands outside
|
|
66
|
+
// /sandbox, the same check `openshell sandbox download` makes. Only what
|
|
67
|
+
// busybox has too: Alpine images (OpenShell's default) lack GNU's realpath -e,
|
|
68
|
+
// find -printf and head -z. The path is absolute, so no option can hide in it.
|
|
69
|
+
const RESOLVE = `[ -e "$1" ] || exit 3
|
|
70
|
+
r=$(realpath "$1" 2>/dev/null) || exit 3
|
|
71
|
+
case "$r" in /sandbox|/sandbox/*) ;; *) exit 4 ;; esac`
|
|
72
|
+
const EXITS = { 3: ['That path does not exist.', 404], 4: ['That path leads outside /sandbox.', 403], 5: ['That is not a folder.', 400] }
|
|
73
|
+
|
|
74
|
+
async function inSandbox(name, script, arg) {
|
|
75
|
+
const { client, workspace } = await gateway()
|
|
76
|
+
const result = await client.sandbox.exec(name, ['/bin/sh', '-c', `${RESOLVE}\n${script}`, 'sh', arg], { workspace, noLoginShell: true, timeoutSecs: 30 })
|
|
77
|
+
if (EXITS[result.exitCode]) throw fail(...EXITS[result.exitCode])
|
|
78
|
+
if (result.exitCode !== 0) throw fail(result.stderr.toString().trim().slice(-400) || `The sandbox command exited with ${result.exitCode}.`, 502)
|
|
79
|
+
return result.stdout.toString('utf8').split('\0').slice(0, -1)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Free space in KiB; awk would print large byte counts in exponent form.
|
|
83
|
+
const FREE = `printf '%s\\0' "$(df -Pk "$r" | awk 'NR == 2 { print $4 }')"`
|
|
84
|
+
const LIST_CAP = 1024 * 1024
|
|
85
|
+
|
|
86
|
+
// One stat call for the folder (batched by find), then one small loop for its
|
|
87
|
+
// symlinks. Names may hold anything but NUL and "/", so they come last on
|
|
88
|
+
// their line and a line that is not an entry continues the previous name.
|
|
89
|
+
const LIST = `[ -d "$r" ] || exit 5
|
|
90
|
+
printf '%s\\0' "$r"
|
|
91
|
+
${FREE}
|
|
92
|
+
find "$r" -mindepth 1 -maxdepth 1 -exec stat -c '%F|%s|%Y|%n' {} + 2>/dev/null | head -c ${LIST_CAP}
|
|
93
|
+
printf '\\0'
|
|
94
|
+
find "$r" -mindepth 1 -maxdepth 1 -type l -exec sh -c 'for f; do printf "%s\\0%s\\0%s\\0" "$f" "$(readlink "$f")" "$(stat -L -c %F "$f" 2>/dev/null || echo missing)"; done' sh {} + 2>/dev/null`
|
|
95
|
+
const kindOf = (text) => (text.startsWith('regular') ? 'file' : text === 'directory' ? 'dir' : text === 'symbolic link' ? 'link' : text === 'missing' ? 'missing' : 'other')
|
|
96
|
+
const ENTRY = /^(regular file|regular empty file|directory|symbolic link|character special file|block special file|fifo|socket)\|(\d+)\|(\d+)\|(.*)$/
|
|
97
|
+
|
|
98
|
+
// The fields inSandbox returns for LIST: the folder, its free KiB, the stat
|
|
99
|
+
// lines, then a (path, target, target kind) triple per symlink.
|
|
100
|
+
export function parseListing(fields) {
|
|
101
|
+
const [resolved, free, stat = '', ...links] = fields
|
|
102
|
+
const entries = []
|
|
103
|
+
// stat ends its output with one newline, which is not part of the last name.
|
|
104
|
+
for (const line of stat.replace(/\n$/, '').split('\n')) {
|
|
105
|
+
const m = ENTRY.exec(line)
|
|
106
|
+
if (m && m[4].startsWith(`${resolved}/`)) {
|
|
107
|
+
const type = kindOf(m[1])
|
|
108
|
+
entries.push({ name: m[4].slice(resolved.length + 1), type, target: null, targetType: null, size: type === 'file' ? Number(m[2]) : null, modifiedAt: new Date(Number(m[3]) * 1000).toISOString() })
|
|
109
|
+
} else if (entries.length) entries.at(-1).name += `\n${line}`
|
|
110
|
+
}
|
|
111
|
+
for (let i = 0; i + 2 < links.length; i += 3) {
|
|
112
|
+
const entry = entries.find((e) => e.type === 'link' && `${resolved}/${e.name}` === links[i])
|
|
113
|
+
if (entry) { entry.target = links[i + 1]; entry.targetType = kindOf(links[i + 2]) }
|
|
114
|
+
}
|
|
115
|
+
const folder = (e) => e.type === 'dir' || e.targetType === 'dir'
|
|
116
|
+
entries.sort((a, b) => Number(folder(b)) - Number(folder(a)) || a.name.localeCompare(b.name))
|
|
117
|
+
return { path: resolved, free: Number(free) * 1024, truncated: entries.length > MAX_ENTRIES || stat.length >= LIST_CAP, entries: entries.slice(0, MAX_ENTRIES) }
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async function list(name, input) {
|
|
121
|
+
return parseListing(await inSandbox(name, LIST, sandboxPath(input)))
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// ---- download -----------------------------------------------------------------
|
|
125
|
+
|
|
126
|
+
// Streams a command's stdout out of the sandbox into a local file, gzipped
|
|
127
|
+
// for a tar stream. Only what busybox has: `cat` for a file, `tar cf -` for
|
|
128
|
+
// a folder, whose symlinks travel as links.
|
|
129
|
+
async function pull(name, argv, file, { gzip = false } = {}) {
|
|
130
|
+
const { client, workspace } = await gateway()
|
|
131
|
+
const out = createWriteStream(file, { mode: 0o600 })
|
|
132
|
+
const sink = gzip ? zlib.createGzip() : out
|
|
133
|
+
if (gzip) sink.pipe(out)
|
|
134
|
+
const write = (chunk) => new Promise((resolve, reject) => sink.write(chunk, (error) => (error ? reject(error) : resolve())))
|
|
135
|
+
let stderr = ''
|
|
136
|
+
let exit = null
|
|
137
|
+
try {
|
|
138
|
+
for await (const event of client.sandbox.execStream(name, argv, { workspace, noLoginShell: true, timeoutSecs: 900 })) {
|
|
139
|
+
if (event.stream === 'stdout') await write(event.data)
|
|
140
|
+
else if (event.stream === 'stderr') stderr = (stderr + event.data.toString()).slice(-400)
|
|
141
|
+
else if (event.type === 'exit') exit = event.exitCode
|
|
142
|
+
}
|
|
143
|
+
} finally {
|
|
144
|
+
sink.end()
|
|
145
|
+
await finished(out).catch(() => {})
|
|
146
|
+
}
|
|
147
|
+
if (exit !== 0) throw fail(stderr.trim() || `The sandbox command exited with ${exit}.`, 502)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// The file or folder is staged in a temporary folder here; the browser then
|
|
151
|
+
// fetches it once by token, and the folder is removed.
|
|
152
|
+
async function prepareDownload(name, input) {
|
|
153
|
+
const target = sandboxPath(input)
|
|
154
|
+
const [resolved, kind, size] = await inSandbox(name, `printf '%s\\0' "$r"
|
|
155
|
+
if [ -d "$r" ]; then printf 'dir\\0'; else printf 'file\\0'; fi
|
|
156
|
+
printf '%s\\0' "$(du -sb "$r" | cut -f1)"`, target)
|
|
157
|
+
if (Number(size) > TRANSFER_LIMIT) throw fail(`That is ${formatBytes(Number(size))}; the console moves up to ${formatBytes(TRANSFER_LIMIT)}. From a terminal: ${downloadCommand(name, target)}`, 413)
|
|
158
|
+
// Named after what was clicked; a link is read through its real path.
|
|
159
|
+
const base = target === SANDBOX_ROOT ? 'sandbox' : path.posix.basename(target)
|
|
160
|
+
const temp = await fs.mkdtemp(path.join(os.tmpdir(), 'openshell-download-'))
|
|
161
|
+
try {
|
|
162
|
+
const filename = kind === 'dir' ? `${base}.tar.gz` : base
|
|
163
|
+
const file = path.join(temp, filename)
|
|
164
|
+
if (kind === 'dir') {
|
|
165
|
+
const entry = path.posix.basename(resolved)
|
|
166
|
+
await pull(name, ['tar', 'cf', '-', '-C', path.posix.dirname(resolved), entry.startsWith('-') ? `./${entry}` : entry], file, { gzip: true })
|
|
167
|
+
} else await pull(name, ['cat', resolved], file)
|
|
168
|
+
const { size: bytes } = await fs.stat(file)
|
|
169
|
+
const token = randomUUID()
|
|
170
|
+
const timer = setTimeout(() => discardDownload(token), 10 * 60_000)
|
|
171
|
+
timer.unref?.()
|
|
172
|
+
state.downloads.set(token, { file, filename, temp, bytes, timer, scope: contextKey() })
|
|
173
|
+
return { token, filename, bytes }
|
|
174
|
+
} catch (error) {
|
|
175
|
+
await fs.rm(temp, { recursive: true, force: true })
|
|
176
|
+
throw error
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function discardDownload(token) {
|
|
181
|
+
const item = state.downloads.get(token)
|
|
182
|
+
if (!item) return
|
|
183
|
+
state.downloads.delete(token)
|
|
184
|
+
clearTimeout(item.timer)
|
|
185
|
+
fs.rm(item.temp, { recursive: true, force: true }).catch(() => {})
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const disposition = (filename) => `attachment; filename="${filename.replace(/[^\x20-\x7e]|["\\]/g, '_')}"; filename*=UTF-8''${encodeURIComponent(filename)}`
|
|
189
|
+
|
|
190
|
+
export function serveDownload(res, token) {
|
|
191
|
+
const item = ID.test(token ?? '') ? state.downloads.get(token) : null
|
|
192
|
+
if (!item || item.scope !== contextKey()) {
|
|
193
|
+
res.writeHead(404, { 'Content-Type': 'text/plain', 'Cache-Control': 'no-store' })
|
|
194
|
+
res.end('This download has expired. Start it again from the Files tab.')
|
|
195
|
+
return
|
|
196
|
+
}
|
|
197
|
+
state.downloads.delete(token)
|
|
198
|
+
clearTimeout(item.timer)
|
|
199
|
+
res.writeHead(200, {
|
|
200
|
+
'Content-Type': 'application/octet-stream',
|
|
201
|
+
'Content-Length': item.bytes,
|
|
202
|
+
'Content-Disposition': disposition(item.filename),
|
|
203
|
+
'Cache-Control': 'no-store',
|
|
204
|
+
'X-Content-Type-Options': 'nosniff',
|
|
205
|
+
})
|
|
206
|
+
createReadStream(item.file).once('error', () => res.destroy()).pipe(res)
|
|
207
|
+
res.once('close', () => fs.rm(item.temp, { recursive: true, force: true }).catch(() => {}))
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// ---- upload from the browser ----------------------------------------------------
|
|
211
|
+
|
|
212
|
+
// Dropped files are staged one request per file, then sent with one CLI call.
|
|
213
|
+
async function startUpload(name) {
|
|
214
|
+
const temp = await fs.mkdtemp(path.join(os.tmpdir(), 'openshell-upload-'))
|
|
215
|
+
// Uploading "." extracts the staged entries flat into the target folder,
|
|
216
|
+
// and the archive's "./" entry carries this folder's mode, so keep it 755.
|
|
217
|
+
const root = path.join(temp, 'files')
|
|
218
|
+
await fs.mkdir(root)
|
|
219
|
+
await fs.chmod(root, 0o755)
|
|
220
|
+
const id = randomUUID()
|
|
221
|
+
state.batches.set(id, { sandbox: name, scope: contextKey(), context: contextSelection(), temp, root, files: 0, bytes: 0, touched: Date.now(), committing: false })
|
|
222
|
+
return { id }
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function batchFor(name, id) {
|
|
226
|
+
const batch = ID.test(id ?? '') ? state.batches.get(id) : null
|
|
227
|
+
if (!batch || batch.sandbox !== name || batch.scope !== contextKey()) throw fail('That upload has expired or belongs to another gateway/workspace. Drop the files again.', 404)
|
|
228
|
+
if (batch.committing) throw fail('That upload is already being sent.', 409)
|
|
229
|
+
batch.touched = Date.now()
|
|
230
|
+
return batch
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function relativeParts(value) {
|
|
234
|
+
const parts = String(value ?? '').split('/')
|
|
235
|
+
if (!value || value.length > 1024 || parts.length > 64 || parts.some((p) => !p || p === '.' || p === '..' || p.length > 255 || p.includes('\0'))) throw fail('Invalid file name.')
|
|
236
|
+
return parts
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export async function receiveUpload(req, name, id, relative) {
|
|
240
|
+
const batch = batchFor(name, id)
|
|
241
|
+
const parts = relativeParts(relative)
|
|
242
|
+
if (batch.files >= MAX_FILES) throw fail(`Upload up to ${MAX_FILES.toLocaleString()} files at a time.`, 413)
|
|
243
|
+
if (batch.bytes + (Number(req.headers['content-length']) || 0) > TRANSFER_LIMIT) throw fail(`The console uploads up to ${formatBytes(TRANSFER_LIMIT)} at a time. Use the terminal command for more.`, 413)
|
|
244
|
+
const file = path.join(batch.root, ...parts)
|
|
245
|
+
await fs.mkdir(path.dirname(file), { recursive: true })
|
|
246
|
+
let handle
|
|
247
|
+
try {
|
|
248
|
+
handle = await fs.open(file, 'wx', 0o644)
|
|
249
|
+
batch.files += 1
|
|
250
|
+
for await (const chunk of req) {
|
|
251
|
+
batch.bytes += chunk.length
|
|
252
|
+
if (batch.bytes > TRANSFER_LIMIT) throw fail(`The console uploads up to ${formatBytes(TRANSFER_LIMIT)} at a time. Use the terminal command for more.`, 413)
|
|
253
|
+
await handle.write(chunk)
|
|
254
|
+
}
|
|
255
|
+
} catch (error) {
|
|
256
|
+
if (error.code === 'EEXIST') throw fail(`${relative} was dropped twice.`, 409)
|
|
257
|
+
throw error
|
|
258
|
+
} finally {
|
|
259
|
+
await handle?.close()
|
|
260
|
+
}
|
|
261
|
+
return { ok: true }
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
async function commitUpload(name, id, input) {
|
|
265
|
+
const batch = batchFor(name, id)
|
|
266
|
+
if (!batch.files) throw fail('Nothing was uploaded.')
|
|
267
|
+
batch.committing = true
|
|
268
|
+
try {
|
|
269
|
+
// Upload into the real folder, never through a link that leaves /sandbox.
|
|
270
|
+
return await runWithContext(batch.context, async () => {
|
|
271
|
+
const [dest, free] = await inSandbox(name, `[ -d "$r" ] || exit 5
|
|
272
|
+
printf '%s\\0' "$r"
|
|
273
|
+
${FREE}`, sandboxPath(input?.dir))
|
|
274
|
+
if (batch.bytes > Number(free) * 1024) throw fail(`The sandbox has ${formatBytes(Number(free) * 1024)} free; this upload is ${formatBytes(batch.bytes)}.`, 413)
|
|
275
|
+
await openshell(['sandbox', 'upload', '--no-git-ignore', name, '.', dest], { cwd: batch.root })
|
|
276
|
+
return { files: batch.files, bytes: batch.bytes, dest }
|
|
277
|
+
})
|
|
278
|
+
} finally {
|
|
279
|
+
discardBatch(id)
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function discardBatch(id) {
|
|
284
|
+
const batch = state.batches.get(id)
|
|
285
|
+
if (!batch) return
|
|
286
|
+
state.batches.delete(id)
|
|
287
|
+
fs.rm(batch.temp, { recursive: true, force: true }).catch(() => {})
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Abandoned uploads (a closed tab mid-drop) are cleared after an hour.
|
|
291
|
+
if (!state.sweeper) {
|
|
292
|
+
state.sweeper = setInterval(() => {
|
|
293
|
+
for (const [id, batch] of state.batches) if (!batch.committing && Date.now() - batch.touched > 60 * 60_000) discardBatch(id)
|
|
294
|
+
}, 10 * 60_000)
|
|
295
|
+
state.sweeper.unref?.()
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// ---- a local folder, for New sandbox -------------------------------------------
|
|
299
|
+
|
|
300
|
+
// Files the agent can read once uploaded; worth a second look before sending.
|
|
301
|
+
const SECRETISH = /^(\.env(\.(?!example$|sample$|template$)[\w.-]+)?|id_(rsa|dsa|ecdsa|ed25519)|\.npmrc|\.pypirc|\.netrc|credentials(\.json)?|.+\.(pem|key|p12|pfx|jks|keystore|tfstate))$/i
|
|
302
|
+
const gitEnv = () => Object.fromEntries(Object.entries(process.env).filter(([key]) => !key.startsWith('GIT_')))
|
|
303
|
+
|
|
304
|
+
// Counts what the CLI will send, without following symlinks. Stops early once
|
|
305
|
+
// a limit is passed; `over` then says the total is at least that much.
|
|
306
|
+
async function measure(base, relatives, totals) {
|
|
307
|
+
for (let i = 0; i < relatives.length && !totals.over; i += 256) {
|
|
308
|
+
const stats = await Promise.all(relatives.slice(i, i + 256).map((rel) => fs.lstat(path.join(base, rel)).then((stat) => [rel, stat], () => null)))
|
|
309
|
+
for (const [rel, stat] of stats.filter(Boolean)) {
|
|
310
|
+
if (stat.isDirectory()) {
|
|
311
|
+
const children = (await fs.readdir(path.join(base, rel))).map((child) => path.join(rel, child))
|
|
312
|
+
await measure(base, children, totals)
|
|
313
|
+
} else {
|
|
314
|
+
totals.files += 1
|
|
315
|
+
if (stat.isSymbolicLink()) totals.links += 1
|
|
316
|
+
else totals.bytes += stat.size
|
|
317
|
+
if (totals.secrets.length < 50 && SECRETISH.test(path.basename(rel))) totals.secrets.push(rel)
|
|
318
|
+
}
|
|
319
|
+
if (totals.bytes > TRANSFER_LIMIT || totals.files > MAX_FILES) { totals.over = true; return totals }
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return totals
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export async function localFolder(input) {
|
|
326
|
+
let raw = typeof input === 'string' ? input.trim() : ''
|
|
327
|
+
if (!raw) throw fail('Enter a folder path.')
|
|
328
|
+
if (raw === '~' || raw.startsWith('~/')) raw = path.join(HOME, raw.slice(1))
|
|
329
|
+
if (!path.isAbsolute(raw)) throw fail('Use a full path, or one starting with ~/.')
|
|
330
|
+
let real
|
|
331
|
+
try { real = await fs.realpath(raw) } catch { throw fail('That folder does not exist on this computer.') }
|
|
332
|
+
if (!(await fs.stat(real)).isDirectory()) throw fail('Choose a folder, not a file.')
|
|
333
|
+
const home = await fs.realpath(HOME)
|
|
334
|
+
const relative = path.relative(home, real)
|
|
335
|
+
if (!relative || relative.startsWith('..') || path.isAbsolute(relative)) throw fail('Choose a folder inside your home folder.')
|
|
336
|
+
// Keys and tokens live in hidden folders (~/.ssh, ~/.aws, ~/.config holds
|
|
337
|
+
// this gateway's certificate) and, on a Mac, in ~/Library.
|
|
338
|
+
const parts = relative.split(path.sep)
|
|
339
|
+
if (parts.some((part) => part.startsWith('.')) || (process.platform === 'darwin' && parts[0] === 'Library')) throw fail('Hidden folders (such as ~/.ssh or ~/.config) and ~/Library are never uploaded.')
|
|
340
|
+
const config = await fs.realpath(CONFIG_DIR).catch(() => null)
|
|
341
|
+
if (config && (config === real || config.startsWith(real + path.sep) || real.startsWith(config + path.sep))) throw fail('This folder holds the gateway certificate.')
|
|
342
|
+
|
|
343
|
+
// Mirror the CLI: inside a git work tree it sends `git ls-files -co
|
|
344
|
+
// --exclude-standard` (tracked plus untracked, minus ignored); elsewhere, everything.
|
|
345
|
+
const totals = { files: 0, bytes: 0, links: 0, secrets: [], over: false }
|
|
346
|
+
let filter = 'none'
|
|
347
|
+
let git = 'none'
|
|
348
|
+
let gitBytes = 0
|
|
349
|
+
const root = await run('git', ['-C', real, 'rev-parse', '--show-toplevel'], { env: gitEnv() }).then((out) => out.trim(), () => null)
|
|
350
|
+
if (root) {
|
|
351
|
+
const repo = await fs.realpath(root)
|
|
352
|
+
const inRepo = path.relative(repo, real)
|
|
353
|
+
const listed = (await run('git', ['ls-files', '-co', '--exclude-standard', '-z', ...(inRepo ? ['--', inRepo] : [])], { cwd: repo, env: gitEnv() }))
|
|
354
|
+
.split('\0').filter(Boolean).map((file) => (inRepo ? path.relative(inRepo, file) : file)).filter(Boolean)
|
|
355
|
+
filter = listed.length ? 'gitignore' : 'gitignore-empty'
|
|
356
|
+
await measure(real, listed.length ? listed : await fs.readdir(real), totals)
|
|
357
|
+
// The filter never lists .git itself, so history is sent separately.
|
|
358
|
+
const dotGit = inRepo ? null : await fs.lstat(path.join(real, '.git')).catch(() => null)
|
|
359
|
+
git = inRepo ? 'subfolder' : dotGit?.isDirectory() ? 'included' : 'worktree'
|
|
360
|
+
if (git === 'included' && !totals.over) {
|
|
361
|
+
const history = await measure(real, ['.git'], { files: 0, bytes: 0, links: 0, secrets: [], over: false })
|
|
362
|
+
gitBytes = history.bytes
|
|
363
|
+
totals.over = history.over || totals.bytes + gitBytes > TRANSFER_LIMIT
|
|
364
|
+
}
|
|
365
|
+
} else {
|
|
366
|
+
await measure(real, await fs.readdir(real), totals)
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
const name = path.basename(real)
|
|
370
|
+
return {
|
|
371
|
+
path: real,
|
|
372
|
+
display: `~/${relative}`,
|
|
373
|
+
name,
|
|
374
|
+
dest: `${SANDBOX_ROOT}/${name}`,
|
|
375
|
+
// The folder a session opens in, when its name can be a gateway label.
|
|
376
|
+
project: LABEL_VALUE.test(name) ? name : null,
|
|
377
|
+
files: totals.files,
|
|
378
|
+
bytes: totals.bytes,
|
|
379
|
+
links: totals.links,
|
|
380
|
+
filter,
|
|
381
|
+
git,
|
|
382
|
+
gitBytes,
|
|
383
|
+
secrets: totals.secrets.slice(0, 5),
|
|
384
|
+
secretCount: totals.secrets.length,
|
|
385
|
+
over: totals.over,
|
|
386
|
+
limit: TRANSFER_LIMIT,
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function repository(input) {
|
|
391
|
+
let url
|
|
392
|
+
try { url = new URL(String(input ?? '').trim()) } catch { throw fail('Enter an https:// git URL.') }
|
|
393
|
+
if (url.protocol !== 'https:' || !url.hostname) throw fail('Enter an https:// git URL.')
|
|
394
|
+
if (url.username || url.password) throw fail('Keep credentials out of the URL. Only public repositories can be cloned for now.')
|
|
395
|
+
if (url.search || url.hash) throw fail('Remove the ? or # part of the URL.')
|
|
396
|
+
const segment = url.pathname.split('/').filter(Boolean).pop()?.replace(/\.git$/, '') ?? ''
|
|
397
|
+
if (!segment) throw fail('That URL has no repository name.')
|
|
398
|
+
const name = LABEL_VALUE.test(segment) ? segment : 'repo'
|
|
399
|
+
return { url: url.href, name, project: name, dest: `${SANDBOX_ROOT}/${name}` }
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// ---- starting a sandbox with files ----------------------------------------------
|
|
403
|
+
|
|
404
|
+
// Checked before the sandbox is created, so a bad path never leaves a sandbox behind.
|
|
405
|
+
export async function planSeed(input) {
|
|
406
|
+
if (input.folder && input.repository) throw fail('Choose a folder or a repository, not both.')
|
|
407
|
+
if (input.folder) {
|
|
408
|
+
const plan = await localFolder(input.folder)
|
|
409
|
+
if (plan.over) throw fail(`${plan.display} is over ${formatBytes(TRANSFER_LIMIT)}. Add a .gitignore, or upload it from a terminal.`, 413)
|
|
410
|
+
return { kind: 'folder', source: plan.display, dest: plan.dest, project: plan.project, folder: plan }
|
|
411
|
+
}
|
|
412
|
+
if (input.repository) {
|
|
413
|
+
const repo = repository(input.repository)
|
|
414
|
+
return { kind: 'repository', source: repo.url, dest: repo.dest, project: repo.project, repo }
|
|
415
|
+
}
|
|
416
|
+
return null
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
function cloneError(stderr, exitCode) {
|
|
420
|
+
const text = stderr.trim()
|
|
421
|
+
if (exitCode === 127) return 'This image has no git. Pick an image with git installed, or upload a local folder instead.'
|
|
422
|
+
if (/could not read Username|Authentication failed|terminal prompts disabled/i.test(text)) return 'The repository asks for credentials. Only public repositories can be cloned for now.'
|
|
423
|
+
if (/\b403\b|CONNECT tunnel failed|Failed to connect|Could not resolve (host|proxy)|Connection refused|Proxy/i.test(text)) {
|
|
424
|
+
return 'The network policy blocked the clone. Allow git to reach the host in Egress (cloning also needs POST to /git-upload-pack), then retry.'
|
|
425
|
+
}
|
|
426
|
+
return text.split('\n').slice(-3).join(' ') || 'git clone failed.'
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
async function runSeed(name, seed) {
|
|
430
|
+
const job = { kind: seed.kind, source: seed.source, dest: seed.dest, state: 'waiting', error: null, startedAt: new Date().toISOString(), finishedAt: null, seed }
|
|
431
|
+
state.seeds.set(seedKey(name), job)
|
|
432
|
+
try {
|
|
433
|
+
const context = await gateway()
|
|
434
|
+
const { client, workspace } = context
|
|
435
|
+
await client.sandbox.waitReady(name, 600, { workspace })
|
|
436
|
+
if (seed.kind === 'folder') {
|
|
437
|
+
job.state = 'uploading'
|
|
438
|
+
// Re-read the folder: a retry may come long after the first attempt.
|
|
439
|
+
const plan = seed.folder = await localFolder(seed.folder.path)
|
|
440
|
+
if (plan.over) throw fail(`${plan.display} is now over ${formatBytes(TRANSFER_LIMIT)}.`, 413)
|
|
441
|
+
await openshell(['sandbox', 'upload', name, plan.path, SANDBOX_ROOT], { context })
|
|
442
|
+
if (plan.git === 'included') await openshell(['sandbox', 'upload', '--no-git-ignore', name, path.join(plan.path, '.git'), `${plan.dest}/`], { context })
|
|
443
|
+
job.files = plan.files
|
|
444
|
+
job.bytes = plan.bytes + plan.gitBytes
|
|
445
|
+
} else {
|
|
446
|
+
job.state = 'cloning'
|
|
447
|
+
const result = await client.sandbox.exec(name, ['git', 'clone', '--', seed.repo.url, seed.repo.dest], { workspace, timeoutSecs: 900, environment: { GIT_TERMINAL_PROMPT: '0' } })
|
|
448
|
+
if (result.exitCode !== 0) throw fail(cloneError(result.stderr.toString(), result.exitCode))
|
|
449
|
+
}
|
|
450
|
+
job.state = 'done'
|
|
451
|
+
} catch (error) {
|
|
452
|
+
job.state = 'failed'
|
|
453
|
+
job.error = error.rawMessage ?? error.message
|
|
454
|
+
}
|
|
455
|
+
job.finishedAt = new Date().toISOString()
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export function startSeed(name, seed) {
|
|
459
|
+
void runWithContext(contextSelection(), () => runSeed(name, seed))
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
const seedView = ({ seed, ...job }) => job
|
|
463
|
+
|
|
464
|
+
// ---- routes -----------------------------------------------------------------------
|
|
465
|
+
|
|
466
|
+
export async function filesRoute(method, parts, input, url) {
|
|
467
|
+
if (method === 'POST' && parts[0] === 'local-folder' && parts.length === 1) {
|
|
468
|
+
return localFolder(input?.path)
|
|
469
|
+
}
|
|
470
|
+
if (parts[0] !== 'files' || !NAME.test(parts[1] ?? '')) return undefined
|
|
471
|
+
const [, name, area, id, action] = parts
|
|
472
|
+
if (method === 'GET') {
|
|
473
|
+
if (!area) return list(name, url.searchParams.get('path'))
|
|
474
|
+
if (area === 'seed' && !id) { const job = state.seeds.get(seedKey(name)); return job ? seedView(job) : null }
|
|
475
|
+
return undefined
|
|
476
|
+
}
|
|
477
|
+
if (area === 'download' && !id) return prepareDownload(name, input?.path)
|
|
478
|
+
if (area === 'uploads' && !id) return startUpload(name)
|
|
479
|
+
if (area === 'uploads' && action === 'commit') return commitUpload(name, id, input)
|
|
480
|
+
if (area === 'uploads' && action === 'cancel') { batchFor(name, id); discardBatch(id); return { ok: true } }
|
|
481
|
+
if (area === 'seed' && id === 'retry') {
|
|
482
|
+
const job = state.seeds.get(seedKey(name))
|
|
483
|
+
if (!job) throw fail('This sandbox was not started with files by this console.', 404)
|
|
484
|
+
if (job.state !== 'failed') throw fail('Only a failed start can be retried.', 409)
|
|
485
|
+
startSeed(name, job.seed)
|
|
486
|
+
return seedView(state.seeds.get(seedKey(name)))
|
|
487
|
+
}
|
|
488
|
+
return undefined
|
|
489
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import fs from 'node:fs/promises'
|
|
2
|
+
import { createWriteStream } from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { createHash } from 'node:crypto'
|
|
5
|
+
import { Transform } from 'node:stream'
|
|
6
|
+
import { pipeline } from 'node:stream/promises'
|
|
7
|
+
import { stateDirectory } from './paths.js'
|
|
8
|
+
import { fail, findExecutable, runCli } from './openshell-cli.js'
|
|
9
|
+
|
|
10
|
+
const VERSION = '0.1.2'
|
|
11
|
+
// Pinned official NVIDIA/OpenShell v0.1.2 release digests, not a mutable latest release.
|
|
12
|
+
const RELEASES = {
|
|
13
|
+
'darwin-arm64': ['aarch64-apple-darwin', '640068efa16e446d5f4f9ffaec0af769dbab04d686473d2a7bd6bafeb4ef7f45'],
|
|
14
|
+
'linux-arm64': ['aarch64-unknown-linux-gnu', '8ec1b6ca5b71ef5085fa51f3244d719a541e8f0d58cc569c7a0d6705b6204397'],
|
|
15
|
+
'linux-x64': ['x86_64-unknown-linux-gnu', '218d887845b3a020ab7535c9985eb9c666d6938f144044957f8b82b42892aadb'],
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export async function ensureGateway({
|
|
19
|
+
signal, onProgress = () => {},
|
|
20
|
+
directory = path.join(stateDirectory(), 'tools', `openshell-gateway-${VERSION}`),
|
|
21
|
+
find = findExecutable,
|
|
22
|
+
} = {}) {
|
|
23
|
+
signal?.throwIfAborted()
|
|
24
|
+
const installed = find('openshell-gateway')
|
|
25
|
+
if (installed) return installed
|
|
26
|
+
const cached = path.join(directory, 'openshell-gateway')
|
|
27
|
+
try { await fs.access(cached, fs.constants.X_OK); return cached } catch (error) { if (error.code !== 'ENOENT') throw error }
|
|
28
|
+
const release = RELEASES[`${process.platform}-${process.arch}`]
|
|
29
|
+
if (!release) throw fail('Automatic gateway installation supports Apple Silicon macOS and arm64/x64 Linux. Install openshell-gateway for this platform manually.', 409)
|
|
30
|
+
const tar = find('tar')
|
|
31
|
+
if (!tar) throw fail('tar is required to install the local OpenShell gateway.', 409)
|
|
32
|
+
onProgress(`Installing OpenShell gateway ${VERSION} on this computer`)
|
|
33
|
+
await fs.mkdir(directory, { recursive: true, mode: 0o700 })
|
|
34
|
+
const staging = await fs.mkdtemp(path.join(directory, '.install-'))
|
|
35
|
+
try {
|
|
36
|
+
const archive = path.join(staging, 'gateway.tar.gz')
|
|
37
|
+
const url = `https://github.com/NVIDIA/OpenShell/releases/download/v${VERSION}/openshell-gateway-${release[0]}.tar.gz`
|
|
38
|
+
const downloadSignal = AbortSignal.any([...(signal ? [signal] : []), AbortSignal.timeout(120_000)])
|
|
39
|
+
const response = await fetch(url, { signal: downloadSignal })
|
|
40
|
+
if (!response.ok || !response.body) throw fail(`Gateway download failed: HTTP ${response.status}`, 502)
|
|
41
|
+
const hash = createHash('sha256')
|
|
42
|
+
let bytes = 0
|
|
43
|
+
const verify = new Transform({ transform(chunk, _encoding, callback) {
|
|
44
|
+
bytes += chunk.length
|
|
45
|
+
if (bytes > 64 * 1024 * 1024) return callback(fail('Gateway download exceeded its size limit.', 502))
|
|
46
|
+
hash.update(chunk); callback(null, chunk)
|
|
47
|
+
} })
|
|
48
|
+
await pipeline(response.body, verify, createWriteStream(archive, { flags: 'wx', mode: 0o600 }), { signal: downloadSignal })
|
|
49
|
+
if (hash.digest('hex') !== release[1]) throw fail('Gateway download checksum did not match the pinned release. Nothing was installed.', 502)
|
|
50
|
+
signal?.throwIfAborted()
|
|
51
|
+
const extracted = await runCli(tar, ['-xzf', archive, '-C', staging, 'openshell-gateway'], { timeoutMs: 30_000 })
|
|
52
|
+
if (extracted.code !== 0) throw fail(`Could not unpack the gateway: ${extracted.stderr.trim()}`, 502)
|
|
53
|
+
const binary = path.join(staging, 'openshell-gateway')
|
|
54
|
+
if (!(await fs.lstat(binary)).isFile()) throw fail('Gateway package did not contain a regular executable.', 502)
|
|
55
|
+
await fs.chmod(binary, 0o700)
|
|
56
|
+
const checked = await runCli(binary, ['--version'], { timeoutMs: 5000 })
|
|
57
|
+
if (checked.code !== 0 || checked.stdout.trim() !== `openshell-gateway ${VERSION}`) throw fail(`The downloaded gateway cannot run on this computer: ${checked.stderr.trim()}`, 502)
|
|
58
|
+
signal?.throwIfAborted()
|
|
59
|
+
await fs.rename(binary, cached)
|
|
60
|
+
return cached
|
|
61
|
+
} finally {
|
|
62
|
+
await fs.rm(staging, { recursive: true, force: true })
|
|
63
|
+
}
|
|
64
|
+
}
|