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/setups.js
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import fs from 'node:fs/promises'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import os from 'node:os'
|
|
4
|
+
import { randomUUID } from 'node:crypto'
|
|
5
|
+
import { discover, readSkill, publicItem, hash, fail } from './setup-discovery.js'
|
|
6
|
+
import { scopedStateDirectory } from './paths.js'
|
|
7
|
+
|
|
8
|
+
export const usableSetup = (setup) => ({ ...setup, items: setup.items.filter(i => !i.disabled && !i.issues.length && (i.kind === 'skill' || i.config)) })
|
|
9
|
+
export const SETUP_ID = /^[a-f0-9]{24}$/
|
|
10
|
+
const TTL = 15 * 60_000
|
|
11
|
+
export const MAX_SELECTION = 64 * 1024 * 1024
|
|
12
|
+
// Tokens pin the reviewed snapshot. The browser cannot submit arbitrary paths,
|
|
13
|
+
// executable configuration or replacement skill contents to the save endpoint.
|
|
14
|
+
export function createSetupStore({ home = os.homedir(), dir = path.join(scopedStateDirectory(), 'setups'), now = Date.now, maxSelection = MAX_SELECTION, state = { scans: new Map(), previews: new Map(), edits: Promise.resolve() } } = {}) {
|
|
15
|
+
const { scans, previews } = state
|
|
16
|
+
const expire = (map) => { for (const [key, value] of map) if (value.expires < now()) map.delete(key); if (map.size >= 20) throw fail('Too many pending imports. Finish one or wait 15 minutes.', 429) }
|
|
17
|
+
const token = (map, id) => { const value = map.get(id); if (!value || value.expires < now()) throw fail('This preview expired. Scan and review again.', 409); return value }
|
|
18
|
+
const filename = (id) => { if (!SETUP_ID.test(id)) throw fail('Setup not found.', 404); return path.join(dir, id + '.json') }
|
|
19
|
+
async function get(id) { try { const setup = JSON.parse(await fs.readFile(filename(id), 'utf8')); if (hash(JSON.stringify(setup.items)) !== setup.revision) throw fail('Setup integrity check failed.', 409); return setup } catch (e) { if (e.code === 'ENOENT') throw fail('Setup not found.', 404); if (e instanceof SyntaxError) throw fail('Saved Setup is invalid. Restore it or import a new snapshot.', 409); throw e } }
|
|
20
|
+
const view = (s) => ({ ...s, items: s.items.map(publicItem) })
|
|
21
|
+
return {
|
|
22
|
+
get,
|
|
23
|
+
preview(id) { return token(previews, id) },
|
|
24
|
+
removeReviewItem(previewToken, itemId) {
|
|
25
|
+
const preview = token(previews, previewToken)
|
|
26
|
+
if (!preview.items.some(item => item.id === itemId)) throw fail('Import item not found.', 404)
|
|
27
|
+
const items = preview.items.filter(item => item.id !== itemId)
|
|
28
|
+
const credentials = Object.fromEntries(Object.entries(preview.credentials || {}).filter(([id]) => id !== itemId))
|
|
29
|
+
const review = this.stage(items, credentials)
|
|
30
|
+
previews.delete(previewToken)
|
|
31
|
+
return review
|
|
32
|
+
},
|
|
33
|
+
stage(items, credentials = {}) {
|
|
34
|
+
expire(previews)
|
|
35
|
+
const id = randomUUID(), revision = hash(JSON.stringify(items))
|
|
36
|
+
previews.set(id, { items, credentials, revision, expires: now() + TTL })
|
|
37
|
+
return { token: id, revision, items: items.map(publicItem) }
|
|
38
|
+
},
|
|
39
|
+
delete(id, revision, beforeDelete = async () => {}) {
|
|
40
|
+
const edit = state.edits.then(async () => {
|
|
41
|
+
const setup = await get(id)
|
|
42
|
+
if (revision !== setup.revision) throw fail('This Setup changed. Refresh the list before deleting it.', 409)
|
|
43
|
+
// Keep the setup retryable if policy cleanup or coverage validation fails.
|
|
44
|
+
await beforeDelete(setup)
|
|
45
|
+
await fs.unlink(filename(id))
|
|
46
|
+
return { deleted: id }
|
|
47
|
+
})
|
|
48
|
+
state.edits = edit.catch(() => {})
|
|
49
|
+
return edit
|
|
50
|
+
},
|
|
51
|
+
deleteItem(id, itemId, revision, beforeWrite = async () => {}) {
|
|
52
|
+
const edit = state.edits.then(async () => {
|
|
53
|
+
const setup = await get(id)
|
|
54
|
+
if (revision !== setup.revision) throw fail('This Setup changed. Close and reopen it before deleting a row.', 409)
|
|
55
|
+
if (!setup.items.some((item) => item.id === itemId)) throw fail('Setup item not found.', 404)
|
|
56
|
+
const items = setup.items.filter((item) => item.id !== itemId)
|
|
57
|
+
const updated = { ...setup, items, revision: hash(JSON.stringify(items)) }
|
|
58
|
+
const temporary = filename(id) + '.' + randomUUID() + '.tmp'
|
|
59
|
+
try {
|
|
60
|
+
await fs.writeFile(temporary, JSON.stringify(updated), { flag: 'wx', mode: 0o600 })
|
|
61
|
+
await beforeWrite(updated)
|
|
62
|
+
await fs.rename(temporary, filename(id))
|
|
63
|
+
} finally { await fs.rm(temporary, { force: true }) }
|
|
64
|
+
return view(updated)
|
|
65
|
+
})
|
|
66
|
+
state.edits = edit.catch(() => {})
|
|
67
|
+
return edit
|
|
68
|
+
},
|
|
69
|
+
async list() { const files = await fs.readdir(dir).catch((e) => { if (e.code === 'ENOENT') return []; throw e }); return Promise.all(files.filter((n) => /^[a-f0-9]{24}\.json$/.test(n)).map(async (n) => view(await get(n.slice(0, -5))))) },
|
|
70
|
+
async scan(sources) { expire(scans); const result = await discover({ sources, home }); const id = randomUUID(); scans.set(id, { ...result, expires: now() + TTL }); return { token: id, items: result.items.map(publicItem), warnings: result.warnings } },
|
|
71
|
+
async review(scanToken, ids) {
|
|
72
|
+
const scan = token(scans, scanToken)
|
|
73
|
+
if (!Array.isArray(ids) || !ids.length || ids.length > scan.items.length || new Set(ids).size !== ids.length) throw fail('Select one or more unique discovered items.')
|
|
74
|
+
const selected = ids.map((id) => { const item = scan.items.find((i) => i.id === id); if (!item) throw fail('Unknown discovery item.'); return item })
|
|
75
|
+
const items = [], credentials = {}
|
|
76
|
+
let selectionBytes = 2
|
|
77
|
+
for (const selectedItem of selected) {
|
|
78
|
+
const { root, _sourceCredentials, ...item } = selectedItem
|
|
79
|
+
if (_sourceCredentials) { credentials[item.id] = _sourceCredentials; item.sourceCredentialFields = Object.keys(_sourceCredentials) }
|
|
80
|
+
if (item.kind === 'skill') {
|
|
81
|
+
try { Object.assign(item, await readSkill(root, home)) } catch (e) { item.issues = [e.status ? e.message : 'Skill could not be read safely.']; item.files = [] }
|
|
82
|
+
}
|
|
83
|
+
selectionBytes += Buffer.byteLength(JSON.stringify(item)) + (items.length ? 1 : 0)
|
|
84
|
+
if (selectionBytes > maxSelection) throw fail(`This selection exceeds ${maxSelection / 1024 / 1024} MB. Select fewer skills and import the rest as a second setup.`)
|
|
85
|
+
items.push(item)
|
|
86
|
+
}
|
|
87
|
+
expire(previews); const id = randomUUID(); const revision = hash(JSON.stringify(items))
|
|
88
|
+
previews.set(id, { items, credentials, revision, expires: now() + TTL })
|
|
89
|
+
return { token: id, revision, items: items.map(publicItem) }
|
|
90
|
+
},
|
|
91
|
+
async file(previewToken, itemId, filename) {
|
|
92
|
+
const preview = token(previews, previewToken)
|
|
93
|
+
const f = preview.items.find((i) => i.id === itemId)?.files?.find((f) => f.path === filename)
|
|
94
|
+
if (!f) throw fail('Preview file not found.', 404)
|
|
95
|
+
return f.encoding === 'base64' ? { content: 'ZIP archive · copied as-is, not extracted or executed.\n\n' + (f.archiveEntries || []).map(entry => `${entry.path} · ${entry.bytes} B`).join('\n') } : { content: f.content }
|
|
96
|
+
},
|
|
97
|
+
buildSnapshot(source, items) {
|
|
98
|
+
const edit = state.edits.then(async () => {
|
|
99
|
+
const current = await get(source.id)
|
|
100
|
+
if (current.revision !== source.revision) throw fail('Setup changed during preparation. Review it and retry.', 409)
|
|
101
|
+
const id = hash('quick-setup:' + source.id + ':' + source.revision).slice(0, 24)
|
|
102
|
+
const setup = { id, name: source.name.slice(0, 65) + ' (prepared)', revision: hash(JSON.stringify(items)), createdAt: new Date(now()).toISOString(), owner: 'local operator', preparedFrom: { id: source.id, revision: source.revision }, items }
|
|
103
|
+
await fs.mkdir(dir, { recursive: true, mode: 0o700 })
|
|
104
|
+
try { await fs.writeFile(filename(id), JSON.stringify(setup), { flag: 'wx', mode: 0o600 }) }
|
|
105
|
+
catch (e) { if (e.code !== 'EEXIST') throw e }
|
|
106
|
+
return view(await get(id))
|
|
107
|
+
})
|
|
108
|
+
state.edits = edit.catch(() => {})
|
|
109
|
+
return edit
|
|
110
|
+
},
|
|
111
|
+
async save(previewToken, name, acknowledged) {
|
|
112
|
+
if (acknowledged !== true) throw fail('Review the selected files and acknowledge the import.')
|
|
113
|
+
if (typeof name !== 'string' || !name.trim() || name.length > 80 || /[\x00-\x1f]/.test(name)) throw fail('Enter a Setup name, up to 80 characters.')
|
|
114
|
+
const preview = token(previews, previewToken)
|
|
115
|
+
const setup = { id: randomUUID().replaceAll('-', '').slice(0, 24), name: name.trim(), revision: preview.revision, createdAt: new Date(now()).toISOString(), owner: 'local operator', items: preview.items }
|
|
116
|
+
await fs.mkdir(dir, { recursive: true, mode: 0o700 })
|
|
117
|
+
await fs.writeFile(filename(setup.id), JSON.stringify(setup), { flag: 'wx', mode: 0o600 })
|
|
118
|
+
previews.delete(previewToken)
|
|
119
|
+
return view(setup)
|
|
120
|
+
},
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// Keep import tokens and the edit queue across reloads, but always recreate methods.
|
|
124
|
+
const stateKey = Symbol.for('openshell.console.setup-store-contexts.v1')
|
|
125
|
+
const states = globalThis[stateKey] ??= new Map()
|
|
126
|
+
export function getSetupStore() {
|
|
127
|
+
const dir = path.join(scopedStateDirectory(), 'setups')
|
|
128
|
+
let state = states.get(dir)
|
|
129
|
+
if (!state) {
|
|
130
|
+
state = { scans: new Map(), previews: new Map(), edits: Promise.resolve() }
|
|
131
|
+
states.set(dir, state)
|
|
132
|
+
}
|
|
133
|
+
return createSetupStore({ dir, state })
|
|
134
|
+
}
|
|
135
|
+
export async function resolveSetups(ids = []) {
|
|
136
|
+
if (!Array.isArray(ids) || ids.length > 8 || new Set(ids).size !== ids.length) throw fail('Choose up to eight unique Setups.')
|
|
137
|
+
const setupStore = getSetupStore()
|
|
138
|
+
return Promise.all(ids.map((id) => setupStore.get(id)))
|
|
139
|
+
}
|
|
140
|
+
// Each saved Setup keeps one managed egress policy in step with its items.
|
|
141
|
+
// A policy problem is reported, never undoes the Setup change.
|
|
142
|
+
async function syncEgress(setupStore, id) {
|
|
143
|
+
try { const { syncSetupPolicy } = await import('./setup-egress.js'); return { egressPolicy: await syncSetupPolicy(await setupStore.get(id)) } }
|
|
144
|
+
catch (e) { return { egressPolicy: null, egressPolicyError: e.status ? e.message : 'The policy file could not be written.' } }
|
|
145
|
+
}
|
|
146
|
+
export async function setupRoute(method, parts, input) {
|
|
147
|
+
if (parts[0] !== 'setups') return undefined
|
|
148
|
+
const setupStore = getSetupStore()
|
|
149
|
+
if (method === 'GET' && parts.length === 3 && parts[1] === 'preparations') return (await import('./setup-preparation.js')).preparationStatus(parts[2])
|
|
150
|
+
if (method === 'POST' && parts.length === 4 && parts[1] === 'preparations' && parts[3] === 'cancel') return (await import('./setup-preparation.js')).cancelPreparation(parts[2])
|
|
151
|
+
if (method === 'POST' && parts.length === 3 && parts[2] === 'prepare-launch') return (await import('./setup-preparation.js')).prepareLaunch(setupStore, parts[1], input)
|
|
152
|
+
if (method === 'GET' && parts.length === 1) return setupStore.list()
|
|
153
|
+
if (method === 'POST' && parts.length === 3 && parts[2] === 'prepare') return setupStore.stage((await setupStore.get(parts[1])).items)
|
|
154
|
+
if (method === 'POST' && parts.length === 3 && parts[2] === 'delete') {
|
|
155
|
+
return setupStore.delete(parts[1], input.revision, async () => {
|
|
156
|
+
await (await import('./setup-egress.js')).removeSetupPolicy(parts[1])
|
|
157
|
+
})
|
|
158
|
+
}
|
|
159
|
+
if (method === 'POST' && parts.length === 3 && parts[2] === 'delete-item') {
|
|
160
|
+
return setupStore.deleteItem(parts[1], input.item, input.revision, async (updated) => {
|
|
161
|
+
await (await import('./setup-egress.js')).syncSetupPolicy(updated)
|
|
162
|
+
})
|
|
163
|
+
}
|
|
164
|
+
if (method !== 'POST' || parts.length !== 2) return undefined
|
|
165
|
+
if (parts[1] === 'prepare') return (await import('./setup-preparation.js')).prepareImport(setupStore, input)
|
|
166
|
+
if (parts[1] === 'scan') return setupStore.scan(input.sources)
|
|
167
|
+
if (parts[1] === 'review') return setupStore.review(input.token, input.ids)
|
|
168
|
+
if (parts[1] === 'remove-review-item') return setupStore.removeReviewItem(input.token, input.item)
|
|
169
|
+
if (parts[1] === 'file') return setupStore.file(input.token, input.item, input.path)
|
|
170
|
+
if (parts[1] === 'save') { const view = await setupStore.save(input.token, input.name, input.acknowledged); return { ...view, ...(await syncEgress(setupStore, view.id)) } }
|
|
171
|
+
return undefined
|
|
172
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import fs from 'node:fs/promises'
|
|
2
|
+
import os from 'node:os'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { createHash, randomBytes, randomUUID } from 'node:crypto'
|
|
5
|
+
import { fail, findExecutable, runCli } from './openshell-cli.js'
|
|
6
|
+
import { listSshHosts } from './remote-hosts.js'
|
|
7
|
+
|
|
8
|
+
const DNS = /^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?$/
|
|
9
|
+
const IPV6 = /^(?=(?:[^:]*:){2})[0-9A-Fa-f:]{2,45}$/
|
|
10
|
+
const USER = /^[A-Za-z_][A-Za-z0-9._-]{0,31}$/
|
|
11
|
+
const KEY_TYPE = /^(ssh-ed25519|ecdsa-sha2-nistp(?:256|384|521)|ssh-rsa|sk-ssh-ed25519@openssh\.com|sk-ecdsa-sha2-nistp256@openssh\.com)$/
|
|
12
|
+
const BASE64 = /^[A-Za-z0-9+/]+={0,2}$/
|
|
13
|
+
const TOKEN_TTL_MS = 5 * 60_000
|
|
14
|
+
|
|
15
|
+
// Config values are written between quotes; reject anything that could end the
|
|
16
|
+
// value or start another directive.
|
|
17
|
+
const plain = value => typeof value === 'string' && !/[\0-\x1f\x7f"\\]/.test(value)
|
|
18
|
+
const configQuote = value => `"${value}"`
|
|
19
|
+
|
|
20
|
+
export const slugify = value => String(value ?? '').toLowerCase().normalize('NFKD').replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 40).replace(/-+$/, '')
|
|
21
|
+
|
|
22
|
+
export const fingerprint = blob => `SHA256:${createHash('sha256').update(Buffer.from(blob, 'base64')).digest('base64').replace(/=+$/, '')}`
|
|
23
|
+
|
|
24
|
+
// "host" or "user@host" -> { user, host }. Hostnames never start with "-", so
|
|
25
|
+
// they cannot be read as ssh options.
|
|
26
|
+
export function parseTarget(value) {
|
|
27
|
+
if (typeof value !== 'string') throw fail('Enter a hostname.')
|
|
28
|
+
const text = value.trim()
|
|
29
|
+
const at = text.lastIndexOf('@')
|
|
30
|
+
const user = at < 0 ? null : text.slice(0, at)
|
|
31
|
+
const host = (at < 0 ? text : text.slice(at + 1)).replace(/^\[(.*)\]$/, '$1')
|
|
32
|
+
if (user !== null && !USER.test(user)) throw fail('The user name before @ is not valid.')
|
|
33
|
+
if (!host) throw fail('Enter a hostname.')
|
|
34
|
+
if (!DNS.test(host) && !IPV6.test(host)) throw fail('The hostname is not valid. Use a name like host.example.com or an IP address.')
|
|
35
|
+
return { user, host }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function createSshHostStore({ home = os.homedir(), keyscan, now = Date.now, existingHosts = () => listSshHosts({ homeDirectory: home }) } = {}) {
|
|
39
|
+
const directory = path.join(home, '.config/openrod')
|
|
40
|
+
const configFile = path.join(directory, 'ssh_config'), hostsFile = path.join(directory, 'known_hosts'), dataFile = path.join(directory, 'ssh_hosts.json')
|
|
41
|
+
const pending = new Map()
|
|
42
|
+
let queue = Promise.resolve()
|
|
43
|
+
const serial = task => { const result = queue.then(task, task); queue = result.catch(() => {}); return result }
|
|
44
|
+
|
|
45
|
+
async function readText(file) {
|
|
46
|
+
try {
|
|
47
|
+
const stat = await fs.lstat(file)
|
|
48
|
+
if (!stat.isFile() || stat.isSymbolicLink()) throw fail(`${path.basename(file)} must be a regular file.`, 409)
|
|
49
|
+
return await fs.readFile(file, 'utf8')
|
|
50
|
+
} catch (error) { if (error.code === 'ENOENT') return ''; throw error }
|
|
51
|
+
}
|
|
52
|
+
async function writeText(file, text) {
|
|
53
|
+
await readText(file)
|
|
54
|
+
const temp = `${file}.${randomUUID()}.tmp`
|
|
55
|
+
try { await fs.writeFile(temp, text, { mode: 0o600, flag: 'wx' }); await fs.rename(temp, file) } finally { await fs.rm(temp, { force: true }) }
|
|
56
|
+
}
|
|
57
|
+
async function load() {
|
|
58
|
+
const text = await readText(dataFile)
|
|
59
|
+
if (!text) return []
|
|
60
|
+
try {
|
|
61
|
+
const value = JSON.parse(text)
|
|
62
|
+
return Array.isArray(value) ? value.filter(item => item && typeof item.alias === 'string') : []
|
|
63
|
+
} catch { throw fail('Saved SSH hosts are unreadable. Remove ~/.config/openrod/ssh_hosts.json to start over.', 409) }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const render = hosts => hosts.map(({ alias, host, user, port, identityFile }) => [
|
|
67
|
+
`Host ${alias}`, ` HostName ${host}`, ...(user ? [` User ${user}`] : []), ...(port ? [` Port ${port}`] : []),
|
|
68
|
+
` HostKeyAlias ${alias}`, ` UserKnownHostsFile ${configQuote(hostsFile)}`, ' GlobalKnownHostsFile /dev/null',
|
|
69
|
+
' CheckHostIP no', ' UpdateHostKeys no',
|
|
70
|
+
...(identityFile ? [` IdentityFile ${configQuote(identityFile)}`, ' IdentitiesOnly yes'] : []),
|
|
71
|
+
' PasswordAuthentication no', ' KbdInteractiveAuthentication no',
|
|
72
|
+
].join('\n') + '\n').join('\n')
|
|
73
|
+
|
|
74
|
+
async function validate(input) {
|
|
75
|
+
if (!input || typeof input !== 'object') throw fail('Enter the connection details.')
|
|
76
|
+
const name = typeof input.name === 'string' ? input.name.trim() : ''
|
|
77
|
+
if (!name || name.length > 60) throw fail('Enter a display name of up to 60 characters.')
|
|
78
|
+
const alias = slugify(name)
|
|
79
|
+
if (!alias) throw fail('The display name needs at least one letter or number.')
|
|
80
|
+
const { user, host } = parseTarget(input.hostname)
|
|
81
|
+
let port = null
|
|
82
|
+
if (input.port !== undefined && input.port !== null && String(input.port).trim() !== '') {
|
|
83
|
+
port = Number(input.port)
|
|
84
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) throw fail('The SSH port must be a number from 1 to 65535.')
|
|
85
|
+
}
|
|
86
|
+
let identityFile = null
|
|
87
|
+
if (input.auth === 'identity') {
|
|
88
|
+
const raw = typeof input.identityFile === 'string' ? input.identityFile.trim() : ''
|
|
89
|
+
if (!raw) throw fail('Choose the private key file to use.')
|
|
90
|
+
const resolved = raw === '~' || raw.startsWith('~/') ? path.join(home, raw.slice(1)) : raw
|
|
91
|
+
if (!path.isAbsolute(resolved) || !plain(resolved)) throw fail('Enter the full path to a private key, for example ~/.ssh/id_ed25519.')
|
|
92
|
+
if (resolved.endsWith('.pub')) throw fail('That is a public key. Choose the matching private key file.')
|
|
93
|
+
let stat
|
|
94
|
+
try { stat = await fs.stat(resolved) } catch { throw fail('That key file does not exist.') }
|
|
95
|
+
if (!stat.isFile()) throw fail('That path is not a key file.')
|
|
96
|
+
identityFile = resolved
|
|
97
|
+
} else if (input.auth !== undefined && input.auth !== 'default') throw fail('Choose how to authenticate.')
|
|
98
|
+
return { name, alias, host, user, port, identityFile, auth: identityFile ? 'identity' : 'default' }
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
async function assertFree(alias) {
|
|
102
|
+
if ((await load()).some(item => item.alias === alias)) throw fail(`You already saved a connection called “${alias}”. Choose another name.`, 409)
|
|
103
|
+
if ((await existingHosts()).some(item => item.name === alias)) throw fail(`“${alias}” is already a host in your SSH configuration. Choose another name.`, 409)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function scanKeys({ host, port }) {
|
|
107
|
+
const run = keyscan ?? (async args => {
|
|
108
|
+
const executable = findExecutable('ssh-keyscan')
|
|
109
|
+
if (!executable) throw fail('The ssh-keyscan tool is missing. Install the OpenSSH client and try again.', 409)
|
|
110
|
+
return runCli(executable, args, { timeoutMs: 15_000, outputLimit: 64 * 1024 })
|
|
111
|
+
})
|
|
112
|
+
const result = await run(['-T', '8', '-t', 'ed25519,ecdsa,rsa', ...(port ? ['-p', String(port)] : []), '--', host])
|
|
113
|
+
if (result.timedOut) throw fail(`Timed out reaching ${host}. Check the hostname, the port and your network.`, 504)
|
|
114
|
+
const keys = []
|
|
115
|
+
for (const line of String(result.stdout).split('\n')) {
|
|
116
|
+
if (!line || line.startsWith('#')) continue
|
|
117
|
+
const [, type, blob] = line.trim().split(/\s+/)
|
|
118
|
+
if (KEY_TYPE.test(type ?? '') && BASE64.test(blob ?? '') && !keys.some(key => key.type === type)) keys.push({ type, blob, fingerprint: fingerprint(blob) })
|
|
119
|
+
}
|
|
120
|
+
if (!keys.length) throw fail(`Couldn’t read a host key from ${host}. Check the hostname and port, and that SSH is running there.`, 502)
|
|
121
|
+
return keys
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
directory, configFile, hostsFile,
|
|
126
|
+
list: async () => (await load()).map(({ alias, name, host, user, port, identityFile }) => ({ alias, name, host, user, port, identityFile })),
|
|
127
|
+
// Step 1: validate, read the host's keys and hold them until the user confirms.
|
|
128
|
+
async scan(input) {
|
|
129
|
+
const value = await validate(input)
|
|
130
|
+
await assertFree(value.alias)
|
|
131
|
+
const keys = await scanKeys(value)
|
|
132
|
+
for (const [token, entry] of pending) if (entry.expires <= now()) pending.delete(token)
|
|
133
|
+
const token = randomBytes(24).toString('base64url')
|
|
134
|
+
pending.set(token, { value, keys, expires: now() + TOKEN_TTL_MS })
|
|
135
|
+
return { token, alias: value.alias, host: value.host, user: value.user, port: value.port, fingerprints: keys.map(({ type, fingerprint }) => ({ type, fingerprint })) }
|
|
136
|
+
},
|
|
137
|
+
// Step 2: the user trusted exactly the keys shown in step 1.
|
|
138
|
+
add: token => serial(async () => {
|
|
139
|
+
const entry = pending.get(token)
|
|
140
|
+
if (!entry || entry.expires <= now()) { pending.delete(token); throw fail('This confirmation expired. Start again.', 409) }
|
|
141
|
+
const { value, keys } = entry
|
|
142
|
+
await assertFree(value.alias)
|
|
143
|
+
// The user's ~/.ssh/config is checked and updated before OpenRod's own files,
|
|
144
|
+
// so a config we cannot edit leaves no half-saved host behind. It is handled
|
|
145
|
+
// as bytes: it need not be UTF-8 and is kept unchanged after the Include.
|
|
146
|
+
await fs.mkdir(path.join(home, '.ssh'), { recursive: true, mode: 0o700 })
|
|
147
|
+
const userConfig = path.join(home, '.ssh/config'), include = `Include ${configQuote(configFile)}`
|
|
148
|
+
const current = await fs.readFile(userConfig).catch(error => {
|
|
149
|
+
if (error.code === 'ENOENT') return Buffer.alloc(0)
|
|
150
|
+
throw fail(`OpenRod can't read ~/.ssh/config (${error.code ?? error.message}).`, 409)
|
|
151
|
+
})
|
|
152
|
+
const hasInclude = current.toString('latin1').split('\n').some(line => line.replace(/\r$/, '') === Buffer.from(include).toString('latin1'))
|
|
153
|
+
if (!hasInclude) {
|
|
154
|
+
const stat = await fs.lstat(userConfig).catch(error => { if (error.code === 'ENOENT') return null; throw error })
|
|
155
|
+
if (stat && !stat.isFile()) throw fail(`~/.ssh/config is a symlink or not a regular file, so OpenRod won't edit it. Add this line at the top of the file it points to, then try again: ${include}`, 409)
|
|
156
|
+
}
|
|
157
|
+
await fs.mkdir(directory, { recursive: true, mode: 0o700 })
|
|
158
|
+
const stat = await fs.lstat(directory)
|
|
159
|
+
if (stat.isSymbolicLink() || !stat.isDirectory()) throw fail('~/.config/openrod must be a regular directory.', 409)
|
|
160
|
+
await fs.chmod(directory, 0o700)
|
|
161
|
+
const hosts = [...await load(), { alias: value.alias, name: value.name, host: value.host, user: value.user, port: value.port, identityFile: value.identityFile }]
|
|
162
|
+
const known = (await readText(hostsFile)).split('\n').filter(line => line && !line.startsWith(`${value.alias} `))
|
|
163
|
+
// An Include after a Host line would only apply to that Host, so it goes first.
|
|
164
|
+
// Including a file that does not exist yet is harmless to ssh.
|
|
165
|
+
if (!hasInclude) await writeText(userConfig, Buffer.concat([Buffer.from(`${include}\n`), current])).catch(error => {
|
|
166
|
+
throw error.status ? error : fail(`OpenRod can't update ~/.ssh/config (${error.code ?? error.message}). Add this line at its top yourself, then try again: ${include}`, 409)
|
|
167
|
+
})
|
|
168
|
+
await writeText(hostsFile, [...known, ...keys.map(key => `${value.alias} ${key.type} ${key.blob}`)].join('\n') + '\n')
|
|
169
|
+
await writeText(dataFile, JSON.stringify(hosts, null, 2) + '\n')
|
|
170
|
+
await writeText(configFile, render(hosts))
|
|
171
|
+
pending.delete(token)
|
|
172
|
+
return { alias: value.alias, name: value.name }
|
|
173
|
+
}),
|
|
174
|
+
remove: alias => serial(async () => {
|
|
175
|
+
const hosts = await load()
|
|
176
|
+
if (!hosts.some(item => item.alias === alias)) throw fail('That connection is not saved here.', 404)
|
|
177
|
+
const rest = hosts.filter(item => item.alias !== alias)
|
|
178
|
+
await writeText(dataFile, JSON.stringify(rest, null, 2) + '\n')
|
|
179
|
+
await writeText(configFile, render(rest))
|
|
180
|
+
await writeText(hostsFile, (await readText(hostsFile)).split('\n').filter(line => line && !line.startsWith(`${alias} `)).map(line => `${line}\n`).join(''))
|
|
181
|
+
return { alias }
|
|
182
|
+
}),
|
|
183
|
+
}
|
|
184
|
+
}
|
package/server/ssh.js
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { execFile, spawn } from 'node:child_process'
|
|
2
|
+
import { rmSync } from 'node:fs'
|
|
3
|
+
import { chmod, mkdtemp, rm, writeFile } from 'node:fs/promises'
|
|
4
|
+
import os from 'node:os'
|
|
5
|
+
import path from 'node:path'
|
|
6
|
+
import { connectionPlan, nativeSshCommand, persistentSessionArgv, persistentTerminals } from '../src/lib/sandbox-session.js'
|
|
7
|
+
import { CONFIG_DIR, gateway, sandboxView } from './gateway.js'
|
|
8
|
+
import { fail, openshellBinary, reasonFrom, runOpenShell, shellQuote, sshBinary } from './openshell-cli.js'
|
|
9
|
+
|
|
10
|
+
const NAME = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/
|
|
11
|
+
const MODES = new Set(['ssh', 'exec', 'attach'])
|
|
12
|
+
|
|
13
|
+
async function loadContext(name) {
|
|
14
|
+
const { client, target, workspace, workspaceScope } = await gateway()
|
|
15
|
+
const sandbox = sandboxView((await client.raw.getSandbox({ name, workspaceScope })).sandbox)
|
|
16
|
+
return { sandbox, target, workspace }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function connectionView(sandbox, target, {
|
|
20
|
+
env = process.env,
|
|
21
|
+
platform = process.platform,
|
|
22
|
+
workspace = sandbox.workspace || 'default',
|
|
23
|
+
} = {}) {
|
|
24
|
+
const cli = openshellBinary(env)
|
|
25
|
+
const ssh = sshBinary(env)
|
|
26
|
+
const terminalSupported = platform === 'darwin' || platform === 'linux'
|
|
27
|
+
const executable = cli ?? env.OPENSHELL_BIN ?? 'openshell'
|
|
28
|
+
const ready = sandbox.phase === 'ready'
|
|
29
|
+
const configHome = env.XDG_CONFIG_HOME ?? path.dirname(CONFIG_DIR)
|
|
30
|
+
const modes = ready ? {
|
|
31
|
+
ssh: connectionPlan(sandbox, { gateway: target.name, workspace, executable, configHome, remote: persistentTerminals(target, sandbox), ssh: ssh ?? 'ssh', mode: 'ssh' }),
|
|
32
|
+
exec: connectionPlan(sandbox, { gateway: target.name, workspace, executable, configHome, remote: persistentTerminals(target, sandbox) }),
|
|
33
|
+
...(sandbox.tty ? { attach: connectionPlan(sandbox, { gateway: target.name, workspace, executable, configHome, mode: 'attach' }) } : {}),
|
|
34
|
+
} : {}
|
|
35
|
+
return {
|
|
36
|
+
ready,
|
|
37
|
+
gateway: { name: target.name, endpoint: target.endpoint, remote: target.remote, workspace },
|
|
38
|
+
cliInstalled: Boolean(cli),
|
|
39
|
+
sshInstalled: Boolean(ssh),
|
|
40
|
+
terminalSupported,
|
|
41
|
+
canOpenTerminal: ready && Boolean(cli) && Boolean(ssh) && terminalSupported,
|
|
42
|
+
alias: `openshell-${sandbox.name}.${workspace}`,
|
|
43
|
+
defaultMode: 'ssh',
|
|
44
|
+
modes,
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function launchNativeTerminal(command, {
|
|
49
|
+
platform = process.platform,
|
|
50
|
+
exec = execFile,
|
|
51
|
+
spawnProcess = spawn,
|
|
52
|
+
onFailure,
|
|
53
|
+
} = {}) {
|
|
54
|
+
if (platform === 'darwin') {
|
|
55
|
+
const escaped = command.replace(/[\\"]/g, '\\$&')
|
|
56
|
+
const script = `tell application "Terminal" to do script "${escaped}"`
|
|
57
|
+
return new Promise((resolve, reject) => exec('osascript', ['-e', script, '-e', 'tell application "Terminal" to activate'], { timeout: 10_000 },
|
|
58
|
+
(error) => error
|
|
59
|
+
? reject(fail('Could not open Terminal. Allow the console to control Terminal in System Settings → Privacy & Security → Automation.', 502))
|
|
60
|
+
: resolve()))
|
|
61
|
+
}
|
|
62
|
+
if (platform === 'linux') {
|
|
63
|
+
return new Promise((resolve, reject) => {
|
|
64
|
+
const child = spawnProcess('x-terminal-emulator', ['-e', 'sh', '-c', command], { detached: true, shell: false, stdio: 'ignore' })
|
|
65
|
+
child.once('error', () => reject(fail('No terminal emulator found. Copy the command instead.', 501)))
|
|
66
|
+
child.once('exit', (code) => { if (code !== 0) onFailure?.() })
|
|
67
|
+
child.once('spawn', () => { child.unref(); resolve() })
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
throw fail('Opening a terminal is supported on macOS and Linux only.', 501)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function requireReady(sandbox) {
|
|
74
|
+
if (sandbox.phase !== 'ready') throw fail('This sandbox is not running.', 409)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async function generateConfig(name, target, workspace, dependencies) {
|
|
78
|
+
const result = await (dependencies.runOpenShell ?? runOpenShell)(['sandbox', 'ssh-config', name], {
|
|
79
|
+
gateway: target.name,
|
|
80
|
+
workspace,
|
|
81
|
+
timeoutMs: 15_000,
|
|
82
|
+
outputLimit: 128 * 1024,
|
|
83
|
+
env: dependencies.env,
|
|
84
|
+
})
|
|
85
|
+
if (result.timedOut) throw fail('Generating SSH config timed out.', 504)
|
|
86
|
+
if (result.outputExceeded) throw fail('The generated SSH config is too large.', 502)
|
|
87
|
+
if (result.code !== 0) throw fail(reasonFrom(`${result.stderr}${result.stdout}`), 502)
|
|
88
|
+
const config = result.stdout.trim()
|
|
89
|
+
if (!config) throw fail('The openshell CLI returned an empty SSH config.', 502)
|
|
90
|
+
return `${config}\n`
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async function openDirectSsh(sandbox, target, workspace, dependencies) {
|
|
94
|
+
const config = await generateConfig(sandbox.name, target, workspace, dependencies)
|
|
95
|
+
const directory = await mkdtemp(path.join(dependencies.tempDirectory ?? os.tmpdir(), 'openshell-ssh-'))
|
|
96
|
+
try {
|
|
97
|
+
await chmod(directory, 0o700)
|
|
98
|
+
await writeFile(path.join(directory, 'config'), config, { mode: 0o600, flag: 'wx' })
|
|
99
|
+
const command = nativeSshCommand({
|
|
100
|
+
alias: `openshell-${sandbox.name}.${workspace}`,
|
|
101
|
+
ssh: sshBinary(dependencies.env),
|
|
102
|
+
directory,
|
|
103
|
+
configHome: dependencies.env?.XDG_CONFIG_HOME ?? path.dirname(CONFIG_DIR),
|
|
104
|
+
remoteArgv: persistentTerminals(target, sandbox) ? persistentSessionArgv('shell') : null,
|
|
105
|
+
})
|
|
106
|
+
await (dependencies.launchTerminal ?? launchNativeTerminal)(command, {
|
|
107
|
+
...dependencies,
|
|
108
|
+
// Some Linux emulators spawn successfully, then fail before running sh.
|
|
109
|
+
onFailure: () => rmSync(directory, { recursive: true, force: true }),
|
|
110
|
+
})
|
|
111
|
+
} catch (error) {
|
|
112
|
+
await rm(directory, { recursive: true, force: true })
|
|
113
|
+
throw error
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export async function sshRoute(method, parts, input, dependencies = {}) {
|
|
118
|
+
if (parts[0] !== 'sandboxes' || parts.length !== 3 || !NAME.test(parts[1] ?? '')) return undefined
|
|
119
|
+
const [, name, action] = parts
|
|
120
|
+
if (!['ssh', 'ssh-open', 'ssh-config'].includes(action)) return undefined
|
|
121
|
+
|
|
122
|
+
const context = dependencies.loadSandbox
|
|
123
|
+
? { sandbox: await dependencies.loadSandbox(name), target: dependencies.target }
|
|
124
|
+
: await (dependencies.loadContext ?? loadContext)(name)
|
|
125
|
+
const { sandbox, target, workspace = sandbox.workspace || 'default' } = context
|
|
126
|
+
|
|
127
|
+
if (method === 'GET' && action === 'ssh') return connectionView(sandbox, target, { ...dependencies, workspace })
|
|
128
|
+
if (method !== 'POST') return undefined
|
|
129
|
+
requireReady(sandbox)
|
|
130
|
+
|
|
131
|
+
if (action === 'ssh-open') {
|
|
132
|
+
const mode = String(input?.mode ?? 'ssh')
|
|
133
|
+
if (!MODES.has(mode)) throw fail('Unknown connection mode.')
|
|
134
|
+
const view = connectionView(sandbox, target, { ...dependencies, workspace })
|
|
135
|
+
const plan = view.modes[mode]
|
|
136
|
+
if (!plan) throw fail('This sandbox has no canonical TTY session to attach.', 409)
|
|
137
|
+
if (!view.cliInstalled) throw fail('The openshell CLI is not installed on this machine.', 409)
|
|
138
|
+
if (!view.sshInstalled) throw fail('OpenSSH is not installed on this machine.', 409)
|
|
139
|
+
if (!view.terminalSupported) throw fail('Opening a terminal is supported on macOS and Linux only.', 501)
|
|
140
|
+
if (mode === 'ssh') await openDirectSsh(sandbox, target, workspace, dependencies)
|
|
141
|
+
else await (dependencies.launchTerminal ?? launchNativeTerminal)(plan.command, dependencies)
|
|
142
|
+
return { ok: true, mode }
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (action === 'ssh-config') {
|
|
146
|
+
const config = await generateConfig(name, target, workspace, dependencies)
|
|
147
|
+
const alias = `openshell-${sandbox.name}.${workspace}`
|
|
148
|
+
const configHome = dependencies.env?.XDG_CONFIG_HOME ?? path.dirname(CONFIG_DIR)
|
|
149
|
+
return { config, alias, command: `env ${shellQuote(`XDG_CONFIG_HOME=${configHome}`)} ssh ${shellQuote(alias)}` }
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return undefined
|
|
153
|
+
}
|
package/server/start.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {createCloudConnections} from './cloud-connections.js'
|
|
2
|
+
import { firebaseMachines, MACHINE_DATABASE } from './machines.js'
|
|
3
|
+
import { createHandoffs, cloudRouter } from './cloud-proxy.js'
|
|
4
|
+
import http from 'node:http'
|
|
5
|
+
import path from 'node:path'
|
|
6
|
+
import { fileURLToPath } from 'node:url'
|
|
7
|
+
import fs from 'node:fs'
|
|
8
|
+
import connect from 'connect'
|
|
9
|
+
import serveStatic from 'serve-static'
|
|
10
|
+
import { createSessionRevocations } from './session-revocations.js'
|
|
11
|
+
import { openshellApi } from './api.js'
|
|
12
|
+
import { cloudConfig, createSecurity, firebaseAuth, requestPath } from './security.js'
|
|
13
|
+
|
|
14
|
+
export async function createConsoleServer({ config = cloudConfig(), auth, machines, handoffs, connections, dist = path.resolve(import.meta.dirname, '../dist') } = {}) {
|
|
15
|
+
if (!fs.existsSync(path.join(dist, 'index.html'))) throw Error('Build the UI with npm run build before starting the server')
|
|
16
|
+
const revocations = config.mode === 'cloud' ? createSessionRevocations(path.resolve(import.meta.dirname, '../.state/sessions.sqlite')) : undefined
|
|
17
|
+
auth ??= config.mode === 'cloud' ? await firebaseAuth(config) : undefined
|
|
18
|
+
const security = createSecurity(config, auth, revocations)
|
|
19
|
+
const app = connect()
|
|
20
|
+
const server = http.createServer(app)
|
|
21
|
+
app.use((req, res, next) => {
|
|
22
|
+
res.setHeader('X-Content-Type-Options', 'nosniff')
|
|
23
|
+
res.setHeader('Referrer-Policy', 'no-referrer')
|
|
24
|
+
res.setHeader('X-Frame-Options', 'DENY')
|
|
25
|
+
if (config.mode === 'cloud') {
|
|
26
|
+
res.setHeader('Strict-Transport-Security', 'max-age=31536000')
|
|
27
|
+
res.setHeader('Cross-Origin-Opener-Policy', new URL(req.url, 'http://local').searchParams.get('handoff') === '1' ? 'unsafe-none' : 'same-origin-allow-popups')
|
|
28
|
+
res.setHeader('Content-Security-Policy', `default-src 'self'; script-src 'self' https://apis.google.com; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data:; connect-src 'self' wss://${new URL(config.origin).host} https://identitytoolkit.googleapis.com https://securetoken.googleapis.com https://www.googleapis.com https://${config.firebase.authDomain}; frame-src https://${config.firebase.authDomain}; object-src 'none'; base-uri 'self'; frame-ancestors 'none'`)
|
|
29
|
+
}
|
|
30
|
+
next()
|
|
31
|
+
})
|
|
32
|
+
if (config.mode === 'cloud') {
|
|
33
|
+
if (!handoffs || !connections) {
|
|
34
|
+
const {getApps} = await import('firebase-admin/app'), {getFirestore} = await import('firebase-admin/firestore')
|
|
35
|
+
const db=getFirestore(getApps()[0], MACHINE_DATABASE)
|
|
36
|
+
handoffs ??= createHandoffs(db)
|
|
37
|
+
connections ??= createCloudConnections(db,auth,{org:config.org,isSessionRevoked:security.isSessionRevoked})
|
|
38
|
+
}
|
|
39
|
+
const routes = cloudRouter(security, machines ?? await firebaseMachines(config), handoffs, auth, {connections})
|
|
40
|
+
app.use(routes.publicRoutes)
|
|
41
|
+
app.use(security.middleware)
|
|
42
|
+
app.use(routes.protectedRoutes)
|
|
43
|
+
server.on('upgrade', routes.upgrade)
|
|
44
|
+
} else openshellApi(security).configureServer({ middlewares: app, httpServer: server, config: { logger: { info: console.info } } })
|
|
45
|
+
app.use('/healthz', (req, res) => { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('ready') })
|
|
46
|
+
const upgradePaths = config.mode === 'cloud'
|
|
47
|
+
? ['/api/os/terminal', '/api/cloud/local-connect/os/terminal', '/api/cloud/local-connect/os/ssh']
|
|
48
|
+
: config.mode === 'local' ? ['/api/os/terminal', '/api/os/ssh', '/api/remote/os/terminal', '/api/remote/os/ssh'] : ['/api/os/terminal', '/api/os/ssh']
|
|
49
|
+
server.on('upgrade', (req, socket) => {
|
|
50
|
+
try { if (!upgradePaths.includes(requestPath(req))) socket.end('HTTP/1.1 404 Not Found\r\nConnection: close\r\n\r\n') }
|
|
51
|
+
catch { /* The API upgrade handler rejects malformed targets. */ }
|
|
52
|
+
})
|
|
53
|
+
app.use(serveStatic(dist, { index: 'index.html', dotfiles: 'deny', maxAge: 0 }))
|
|
54
|
+
app.use((req, res) => { res.writeHead(404); res.end('Not found') })
|
|
55
|
+
server.once('close', () => revocations?.close())
|
|
56
|
+
server.requestTimeout = 35 * 60000
|
|
57
|
+
server.headersTimeout = 15000
|
|
58
|
+
return server
|
|
59
|
+
}
|
|
60
|
+
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
61
|
+
try {
|
|
62
|
+
const server = await createConsoleServer()
|
|
63
|
+
const port = Number(process.env.OPENROD_PORT ?? 4600)
|
|
64
|
+
if (!Number.isInteger(port) || port < 1024 || port > 65535) throw Error('OPENROD_PORT must be between 1024 and 65535')
|
|
65
|
+
const address = process.env.OPENROD_MODE === 'worker' ? '0.0.0.0' : '127.0.0.1'
|
|
66
|
+
// Local mode prints only the tokened link (from the API plugin); a bare URL would just hit the token wall.
|
|
67
|
+
const mode = process.env.OPENROD_MODE ?? 'local'
|
|
68
|
+
server.listen(port, address, () => { if (mode !== 'local') console.info(`OpenRod ${mode} console listening on ${address}:${port}`) })
|
|
69
|
+
for (const signal of ['SIGTERM', 'SIGINT']) process.on(signal, () => { server.closeAllConnections(); server.close(() => process.exit(0)); setTimeout(() => process.exit(1), 5000).unref() })
|
|
70
|
+
} catch (error) { console.error(error.message); process.exitCode = 1 }
|
|
71
|
+
}
|