openrod 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +8 -0
- package/README.md +58 -2
- package/SETUPS.md +75 -0
- package/THIRD_PARTY_NOTICES.md +15823 -0
- package/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/assets/index-CEZ0R3YS.js +522 -0
- package/dist/assets/index-DYjVZRjW.css +1 -0
- package/dist/assets/index.esm-BVqeoYDn.js +376 -0
- package/dist/assets/index.esm-CXAOoF3i.js +16 -0
- package/dist/assets/index.esm-D0s8MSqt.js +1666 -0
- package/dist/assets/pixelify-sans-cyrillic-wght-normal-BfQLqnEI.woff2 +0 -0
- package/dist/assets/pixelify-sans-latin-ext-wght-normal-CsF3XSp0.woff2 +0 -0
- package/dist/assets/pixelify-sans-latin-wght-normal-Cbhn5ptY.woff2 +0 -0
- package/dist/assets/terminal-view-6GBZ9nXN.css +32 -0
- package/dist/assets/terminal-view-CkPFNoXi.js +40 -0
- package/dist/favicon.png +0 -0
- package/dist/index.html +16 -0
- package/dist/logos/SOURCES.md +133 -0
- package/dist/logos/agents/aider.svg +1 -0
- package/dist/logos/agents/antigravity.svg +1 -0
- package/dist/logos/agents/claudecode.svg +1 -0
- package/dist/logos/agents/codex.svg +1 -0
- package/dist/logos/agents/copilot.svg +1 -0
- package/dist/logos/agents/cursor.svg +1 -0
- package/dist/logos/agents/factory.svg +1 -0
- package/dist/logos/agents/gemini.svg +1 -0
- package/dist/logos/agents/kiro.svg +1 -0
- package/dist/logos/agents/openclaw-color.svg +1 -0
- package/dist/logos/agents/opencode.svg +1 -0
- package/dist/logos/agents/pi.svg +1 -0
- package/dist/logos/anthropic.svg +1 -0
- package/dist/logos/aws-bedrock.svg +1 -0
- package/dist/logos/aws-s3.svg +1 -0
- package/dist/logos/aws.svg +1 -0
- package/dist/logos/claude-code.svg +1 -0
- package/dist/logos/codex.svg +1 -0
- package/dist/logos/copilot.svg +1 -0
- package/dist/logos/cursor.svg +1 -0
- package/dist/logos/deepinfra.svg +1 -0
- package/dist/logos/github.svg +1 -0
- package/dist/logos/google-cloud.svg +1 -0
- package/dist/logos/google-vertex-ai.svg +1 -0
- package/dist/logos/nvidia.svg +1 -0
- package/dist/logos/openai.svg +1 -0
- package/dist/logos/openrouter.svg +1 -0
- package/dist/logos/pypi.svg +1 -0
- package/dist/logos/templates/debian.svg +1 -0
- package/dist/logos/templates/nodejs.svg +1 -0
- package/dist/logos/templates/python.svg +1 -0
- package/dist/logos/templates/ubuntu.svg +1 -0
- package/dist/logos/vscode.svg +1 -0
- package/dist/openrod.png +0 -0
- package/node_modules/@bufbuild/protobuf/README.md +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.d.ts +6 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.d.ts +140 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.d.ts +79 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.d.ts +63 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.d.ts +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.d.ts +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.d.ts +145 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.d.ts +85 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +296 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.d.ts +634 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.d.ts +46 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.d.ts +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.d.ts +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +415 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.d.ts +73 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +1037 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.d.ts +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +131 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.d.ts +20 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.d.ts +49 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +157 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.d.ts +30 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.d.ts +107 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.d.ts +45 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +292 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.d.ts +217 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +469 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +954 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +437 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.d.ts +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +625 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.d.ts +34 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.d.ts +76 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.d.ts +135 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +188 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.d.ts +286 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +726 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +37 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.d.ts +69 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.d.ts +53 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.d.ts +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +334 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.d.ts +38 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +68 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +892 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +126 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +59 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +242 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.d.ts +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.d.ts +6 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.d.ts +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.d.ts +79 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.d.ts +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.d.ts +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.d.ts +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.d.ts +145 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.d.ts +85 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +293 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.d.ts +634 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.d.ts +46 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.d.ts +60 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.d.ts +48 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +409 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.d.ts +73 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +1029 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.d.ts +16 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +128 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.d.ts +20 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.d.ts +49 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +152 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.d.ts +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.d.ts +107 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.d.ts +45 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +284 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.d.ts +217 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +464 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +948 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +433 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.d.ts +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +620 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.d.ts +34 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.d.ts +76 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.d.ts +135 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +184 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +286 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +721 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.d.ts +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.d.ts +53 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.d.ts +70 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +325 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.d.ts +38 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +65 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +888 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +123 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +103 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +56 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +64 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.d.ts +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
- package/node_modules/@bufbuild/protobuf/package.json +147 -0
- package/node_modules/@connectrpc/connect/README.md +62 -0
- package/node_modules/@connectrpc/connect/dist/cjs/any-client.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/any-client.js +33 -0
- package/node_modules/@connectrpc/connect/dist/cjs/call-options.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/cjs/call-options.js +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/callback-client.d.ts +31 -0
- package/node_modules/@connectrpc/connect/dist/cjs/callback-client.js +116 -0
- package/node_modules/@connectrpc/connect/dist/cjs/code.d.ts +75 -0
- package/node_modules/@connectrpc/connect/dist/cjs/code.js +92 -0
- package/node_modules/@connectrpc/connect/dist/cjs/connect-error.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/cjs/connect-error.js +141 -0
- package/node_modules/@connectrpc/connect/dist/cjs/context-values.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/cjs/context-values.js +41 -0
- package/node_modules/@connectrpc/connect/dist/cjs/cors.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/cjs/cors.js +82 -0
- package/node_modules/@connectrpc/connect/dist/cjs/http-headers.d.ts +37 -0
- package/node_modules/@connectrpc/connect/dist/cjs/http-headers.js +63 -0
- package/node_modules/@connectrpc/connect/dist/cjs/implementation.d.ts +159 -0
- package/node_modules/@connectrpc/connect/dist/cjs/implementation.js +78 -0
- package/node_modules/@connectrpc/connect/dist/cjs/index.d.ts +22 -0
- package/node_modules/@connectrpc/connect/dist/cjs/index.js +46 -0
- package/node_modules/@connectrpc/connect/dist/cjs/interceptor.d.ts +170 -0
- package/node_modules/@connectrpc/connect/dist/cjs/interceptor.js +30 -0
- package/node_modules/@connectrpc/connect/dist/cjs/package.json +1 -0
- package/node_modules/@connectrpc/connect/dist/cjs/promise-client.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/cjs/promise-client.js +135 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/async-iterable.d.ts +527 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/async-iterable.js +913 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/compression.d.ts +48 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/compression.js +75 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/content-type-matcher.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/content-type-matcher.js +43 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/create-method-url.d.ts +17 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/create-method-url.js +36 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/envelope.d.ts +90 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/envelope.js +214 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/index.d.ts +25 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/index.js +95 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/invoke-implementation.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/invoke-implementation.js +178 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/limit-io.d.ts +24 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/limit-io.js +80 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/normalize.d.ts +11 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/normalize.js +55 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-handler-factory.d.ts +18 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-handler-factory.js +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-headers.d.ts +9 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/protocol-headers.js +67 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/run-call.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/run-call.js +125 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/serialization.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/serialization.js +149 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/signals.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/signals.js +100 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/transport-options.d.ts +98 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/transport-options.js +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-fetch.d.ts +35 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-fetch.js +150 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler-client.d.ts +7 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler-client.js +88 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler.d.ts +167 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal-handler.js +130 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal.d.ts +102 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol/universal.js +78 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/code-string.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/code-string.js +52 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/content-type.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/content-type.js +71 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/end-stream.d.ts +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/end-stream.js +137 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/error-json.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/error-json.js +166 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/get-request.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/get-request.js +66 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/handler-factory.js +296 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/headers.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/headers.js +32 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/http-status.d.ts +15 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/http-status.js +90 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/index.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/index.js +81 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/parse-timeout.js +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/query-params.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/query-params.js +24 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/request-header.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/request-header.js +70 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/trailer-mux.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/trailer-mux.js +53 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/transport.js +210 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/validate-response.d.ts +30 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/validate-response.js +71 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/version.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-connect/version.js +58 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/content-type.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/content-type.js +38 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/gen/status_pb.d.ts +91 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/gen/status_pb.js +27 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/handler-factory.js +124 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/headers.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/headers.js +29 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/http-status.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/http-status.js +46 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/index.d.ts +10 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/index.js +61 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/parse-timeout.js +53 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/request-header.js +56 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/trailer-status.d.ts +28 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/trailer-status.js +118 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/transport.js +185 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-response.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-response.js +75 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-trailer.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc/validate-trailer.js +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/content-type.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/content-type.js +41 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/handler-factory.js +130 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/headers.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/headers.js +44 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/index.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/index.js +61 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/request-header.js +59 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/trailer.d.ts +27 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/trailer.js +71 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/transport.js +234 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/validate-response.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/cjs/protocol-grpc-web/validate-response.js +73 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router-transport.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router-transport.js +32 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router.d.ts +81 -0
- package/node_modules/@connectrpc/connect/dist/cjs/router.js +68 -0
- package/node_modules/@connectrpc/connect/dist/cjs/transport.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/cjs/transport.js +15 -0
- package/node_modules/@connectrpc/connect/dist/esm/any-client.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/any-client.js +30 -0
- package/node_modules/@connectrpc/connect/dist/esm/call-options.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/call-options.js +14 -0
- package/node_modules/@connectrpc/connect/dist/esm/callback-client.d.ts +31 -0
- package/node_modules/@connectrpc/connect/dist/esm/callback-client.js +113 -0
- package/node_modules/@connectrpc/connect/dist/esm/code.d.ts +75 -0
- package/node_modules/@connectrpc/connect/dist/esm/code.js +89 -0
- package/node_modules/@connectrpc/connect/dist/esm/connect-error.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/esm/connect-error.js +137 -0
- package/node_modules/@connectrpc/connect/dist/esm/context-values.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/context-values.js +37 -0
- package/node_modules/@connectrpc/connect/dist/esm/cors.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/esm/cors.js +79 -0
- package/node_modules/@connectrpc/connect/dist/esm/http-headers.d.ts +37 -0
- package/node_modules/@connectrpc/connect/dist/esm/http-headers.js +58 -0
- package/node_modules/@connectrpc/connect/dist/esm/implementation.d.ts +159 -0
- package/node_modules/@connectrpc/connect/dist/esm/implementation.js +73 -0
- package/node_modules/@connectrpc/connect/dist/esm/index.d.ts +22 -0
- package/node_modules/@connectrpc/connect/dist/esm/index.js +27 -0
- package/node_modules/@connectrpc/connect/dist/esm/interceptor.d.ts +170 -0
- package/node_modules/@connectrpc/connect/dist/esm/interceptor.js +27 -0
- package/node_modules/@connectrpc/connect/dist/esm/promise-client.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/esm/promise-client.js +128 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/async-iterable.d.ts +527 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/async-iterable.js +891 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/compression.d.ts +48 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/compression.js +71 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/content-type-matcher.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/content-type-matcher.js +40 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/create-method-url.d.ts +17 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/create-method-url.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/envelope.d.ts +90 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/envelope.js +206 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/index.d.ts +25 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/index.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/invoke-implementation.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/invoke-implementation.js +173 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/limit-io.d.ts +24 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/limit-io.js +75 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/normalize.d.ts +11 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/normalize.js +51 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-handler-factory.d.ts +18 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-handler-factory.js +14 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-headers.d.ts +9 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/protocol-headers.js +64 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/run-call.d.ts +45 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/run-call.js +121 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/serialization.d.ts +104 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/serialization.js +141 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/signals.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/signals.js +95 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/transport-options.d.ts +98 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/transport-options.js +14 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-fetch.d.ts +35 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-fetch.js +142 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler-client.d.ts +7 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler-client.js +85 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler.d.ts +167 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal-handler.js +124 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal.d.ts +102 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol/universal.js +74 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/code-string.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/code-string.js +48 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/content-type.d.ts +40 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/content-type.js +66 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/end-stream.d.ts +44 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/end-stream.js +131 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/error-json.d.ts +36 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/error-json.js +160 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/get-request.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/get-request.js +63 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/handler-factory.js +293 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/headers.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/headers.js +29 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/http-status.d.ts +15 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/http-status.js +86 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/index.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/index.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/parse-timeout.js +41 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/query-params.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/query-params.js +21 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/request-header.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/request-header.js +66 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/trailer-mux.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/trailer-mux.js +49 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/transport.js +207 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/validate-response.d.ts +30 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/validate-response.js +67 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/version.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-connect/version.js +53 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/content-type.d.ts +16 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/content-type.js +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/gen/status_pb.d.ts +91 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/gen/status_pb.js +24 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/handler-factory.js +121 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/headers.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/headers.js +26 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/http-status.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/http-status.js +43 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/index.d.ts +10 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/index.js +28 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/parse-timeout.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/parse-timeout.js +50 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/request-header.js +52 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/trailer-status.d.ts +28 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/trailer-status.js +113 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/transport.js +182 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-response.d.ts +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-response.js +71 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-trailer.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-trailer.js +41 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/content-type.d.ts +19 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/content-type.js +37 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/handler-factory.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/handler-factory.js +127 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/headers.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/headers.js +33 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/index.d.ts +8 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/index.js +26 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/request-header.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/request-header.js +55 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/trailer.d.ts +27 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/trailer.js +65 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/transport.d.ts +6 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/transport.js +231 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/validate-response.d.ts +34 -0
- package/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/validate-response.js +69 -0
- package/node_modules/@connectrpc/connect/dist/esm/router-transport.d.ts +13 -0
- package/node_modules/@connectrpc/connect/dist/esm/router-transport.js +29 -0
- package/node_modules/@connectrpc/connect/dist/esm/router.d.ts +81 -0
- package/node_modules/@connectrpc/connect/dist/esm/router.js +65 -0
- package/node_modules/@connectrpc/connect/dist/esm/transport.d.ts +20 -0
- package/node_modules/@connectrpc/connect/dist/esm/transport.js +14 -0
- package/node_modules/@connectrpc/connect/package.json +67 -0
- package/node_modules/@connectrpc/connect-node/README.md +144 -0
- package/node_modules/@connectrpc/connect-node/buf.gen.yaml +10 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/compression.d.ts +15 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/compression.js +96 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-node-adapter.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-node-adapter.js +60 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-transport.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/connect-transport.js +25 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-transport.d.ts +95 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-transport.js +24 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-web-transport.d.ts +96 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/grpc-web-transport.js +25 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/http2-session-manager.d.ts +146 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/http2-session-manager.js +543 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/index.d.ts +14 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/index.js +34 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-error.d.ts +45 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-error.js +153 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-transport-options.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-transport-options.js +58 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-client.d.ts +54 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-client.js +347 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-handler.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-handler.js +225 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-header.d.ts +20 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/node-universal-header.js +117 -0
- package/node_modules/@connectrpc/connect-node/dist/cjs/package.json +1 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/compression.d.ts +15 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/compression.js +93 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-node-adapter.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-node-adapter.js +57 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-transport.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/connect-transport.js +22 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-transport.d.ts +95 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-transport.js +21 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-web-transport.d.ts +96 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/grpc-web-transport.js +22 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/http2-session-manager.d.ts +146 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/http2-session-manager.js +539 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/index.d.ts +14 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/index.js +21 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-error.d.ts +45 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-error.js +146 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-transport-options.d.ts +100 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-transport-options.js +55 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-client.d.ts +54 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-client.js +344 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-handler.d.ts +42 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-handler.js +221 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-header.d.ts +20 -0
- package/node_modules/@connectrpc/connect-node/dist/esm/node-universal-header.js +113 -0
- package/node_modules/@connectrpc/connect-node/package.json +44 -0
- package/node_modules/@nvidia/openshell-sdk/README.md +303 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.d.ts +1243 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.js +1321 -0
- package/node_modules/@nvidia/openshell-sdk/dist/client.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.d.ts +35 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.js +79 -0
- package/node_modules/@nvidia/openshell-sdk/dist/errors.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.d.ts +301 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.js +69 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/datamodel_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.d.ts +581 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.js +90 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/google/rpc/error_details_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.d.ts +9131 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.js +1898 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/openshell_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.d.ts +58 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.js +24 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/options_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.d.ts +1203 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.js +277 -0
- package/node_modules/@nvidia/openshell-sdk/dist/gen/sandbox_pb.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.d.ts +7 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.js +6 -0
- package/node_modules/@nvidia/openshell-sdk/dist/index.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.d.ts +14 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.js +177 -0
- package/node_modules/@nvidia/openshell-sdk/dist/oidc.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.d.ts +6 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.js +15 -0
- package/node_modules/@nvidia/openshell-sdk/dist/raw.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.d.ts +11 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.js +58 -0
- package/node_modules/@nvidia/openshell-sdk/dist/ssh-validate.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.d.ts +35 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.d.ts.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.js +97 -0
- package/node_modules/@nvidia/openshell-sdk/dist/transport.js.map +1 -0
- package/node_modules/@nvidia/openshell-sdk/package.json +58 -0
- package/package.json +93 -4
- package/server/activity-delivery.js +143 -0
- package/server/activity-store.js +168 -0
- package/server/agent-inventory.js +76 -0
- package/server/agent-resources.py +60 -0
- package/server/api.js +648 -0
- package/server/cli.js +168 -0
- package/server/cloud-connections.js +56 -0
- package/server/cloud-origin.js +11 -0
- package/server/cloud-proxy.js +122 -0
- package/server/cloud-ssh-proxy.cjs +73 -0
- package/server/cloud-ssh.js +135 -0
- package/server/cloud-transfer.js +221 -0
- package/server/compute.js +50 -0
- package/server/editor.js +114 -0
- package/server/egress.js +204 -0
- package/server/files.js +489 -0
- package/server/gateway-install.js +64 -0
- package/server/gateway.js +415 -0
- package/server/image-templates.js +393 -0
- package/server/ingress.js +185 -0
- package/server/launch-token.js +55 -0
- package/server/local-catalog.js +111 -0
- package/server/local-cloud-native.js +152 -0
- package/server/local-cloud.js +123 -0
- package/server/location-inventory.js +94 -0
- package/server/machines.js +84 -0
- package/server/openshell-cli.js +144 -0
- package/server/org.js +536 -0
- package/server/orphan-processes.js +42 -0
- package/server/paths.js +28 -0
- package/server/policy-template-store.js +92 -0
- package/server/policy.js +583 -0
- package/server/remote-gateway-state.js +123 -0
- package/server/remote-gateway.js +420 -0
- package/server/remote-hosts.js +354 -0
- package/server/remote-http.js +14 -0
- package/server/remote-image-engine.js +47 -0
- package/server/remote-runtime.js +65 -0
- package/server/remote-runtime.py +162 -0
- package/server/sandbox-identity.js +14 -0
- package/server/security.js +139 -0
- package/server/session-revocations.js +20 -0
- package/server/setup-artifact-installer.py +54 -0
- package/server/setup-artifacts.js +23 -0
- package/server/setup-auth-discovery.js +24 -0
- package/server/setup-credentials.js +54 -0
- package/server/setup-deployment.js +299 -0
- package/server/setup-discovery.js +289 -0
- package/server/setup-egress.js +133 -0
- package/server/setup-http.js +47 -0
- package/server/setup-installer.py +289 -0
- package/server/setup-json.py +8 -0
- package/server/setup-members.js +77 -0
- package/server/setup-packages.js +214 -0
- package/server/setup-preparation.js +144 -0
- package/server/setup-python.js +8 -0
- package/server/setup-remote-check.js +35 -0
- package/server/setup-transfer.js +17 -0
- package/server/setup-verifier.cjs +43 -0
- package/server/setups.js +172 -0
- package/server/ssh-hosts.js +184 -0
- package/server/ssh.js +153 -0
- package/server/start.js +71 -0
- package/server/terminal.js +173 -0
- package/server/worker-auth.js +18 -0
- package/shared/agent-access.js +103 -0
- package/shared/antigravity-network-guidance.js +9 -0
- package/shared/group-membership.js +33 -0
- package/shared/group-network.js +29 -0
- package/shared/policy-templates.js +79 -0
- package/shared/secret-fields.js +35 -0
- package/shared/setup-launch.js +25 -0
- package/shared/setup-targets.js +11 -0
- package/shared/setup-targets.json +12 -0
- package/src/lib/activity-export.js +52 -0
- package/src/lib/activity-inventory.js +45 -0
- package/src/lib/agents.js +41 -0
- package/src/lib/api.js +173 -0
- package/src/lib/cloud-machine.js +9 -0
- package/src/lib/cloud-origin.js +6 -0
- package/src/lib/cloud-transfer.js +22 -0
- package/src/lib/compute-target.js +46 -0
- package/src/lib/delete-network-policies.js +15 -0
- package/src/lib/egress-groups.js +24 -0
- package/src/lib/egress.js +28 -0
- package/src/lib/files.js +24 -0
- package/src/lib/fleet.js +100 -0
- package/src/lib/format.js +24 -0
- package/src/lib/groups.js +16 -0
- package/src/lib/image-templates.js +139 -0
- package/src/lib/import-setup.js +36 -0
- package/src/lib/local-cloud.js +118 -0
- package/src/lib/location-inventory.js +20 -0
- package/src/lib/locations.js +5 -0
- package/src/lib/placement.js +9 -0
- package/src/lib/policy-editor.js +58 -0
- package/src/lib/policy-sources.js +33 -0
- package/src/lib/quick-setup.js +110 -0
- package/src/lib/sandbox-creations.js +59 -0
- package/src/lib/sandbox-images.js +38 -0
- package/src/lib/sandbox-session.js +140 -0
- package/src/lib/sandboxes.js +78 -0
- package/src/lib/secret-inventory.js +26 -0
- package/src/lib/services.js +41 -0
- package/src/lib/setup-import-jobs.js +62 -0
- package/src/lib/setup-imports.js +4 -0
- package/src/lib/setup-network.js +39 -0
- package/src/lib/setup-template-build.js +17 -0
- package/src/lib/utils.js +6 -0
- package/vendor/OPENSHELL-LICENSE +203 -0
- package/vendor/nvidia-openshell-sdk-0.0.0.tgz +0 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import fs from 'node:fs/promises'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import os from 'node:os'
|
|
4
|
+
import { randomBytes } from 'node:crypto'
|
|
5
|
+
import { spawn } from 'node:child_process'
|
|
6
|
+
import { gateway, contextSelection, runWithContext, sandboxView } from './gateway.js'
|
|
7
|
+
import { imageTemplateRoute, listImageTemplates, templateView } from './image-templates.js'
|
|
8
|
+
import { newRecipe, recipeErrors, NAME_PATTERN } from '../src/lib/image-templates.js'
|
|
9
|
+
import { defaultSession, isSession } from '../src/lib/sandbox-session.js'
|
|
10
|
+
import { IMAGE_TEMPLATE_NAME } from '../src/lib/sandbox-images.js'
|
|
11
|
+
import { groupIds } from '../shared/group-membership.js'
|
|
12
|
+
import { assertSandboxGroup } from '../shared/group-network.js'
|
|
13
|
+
import { cloudOrigin, cloudUnavailable } from './cloud-origin.js'
|
|
14
|
+
import { agentAccessRules } from '../shared/agent-access.js'
|
|
15
|
+
import { listGroups, planSandbox } from './org.js'
|
|
16
|
+
import { listPolicies } from './egress.js'
|
|
17
|
+
|
|
18
|
+
export const CLOUD_TRANSFER_LIMIT = 25 * 1024 * 1024
|
|
19
|
+
export const CLOUD_TRANSFER_BODY_LIMIT = 36 * 1024 * 1024
|
|
20
|
+
const MAX_FILES = 2000
|
|
21
|
+
const fail = (message, status = 400) => Object.assign(new Error(message), { status })
|
|
22
|
+
const excludedDirectories = ['.git', '.openshell', 'node_modules', '.cache', '__pycache__', '.venv', 'venv', '.ssh', '.aws', '.azure', '.config', '.local', '.npm', '.npm-global', '.claude', '.codex', '.cursor', '.opencode', '.kiro', '.docker', '.gnupg', '.kube', '.terraform', '.pytest_cache', '.mypy_cache', '.ruff_cache', '.turbo']
|
|
23
|
+
const excluded = new Set(excludedDirectories)
|
|
24
|
+
const secretName = /^(?:\.env(?:\..*)?|id_(?:rsa|dsa|ecdsa|ed25519)(?:\.pub)?|\.npmrc|\.pypirc|\.netrc|credentials(?:\..*)?|secrets?(?:\..*)?|auth\.json|\.claude\.json|\.git-credentials|\.(?:bash|zsh|python|sqlite)_history|.+\.(?:pem|key|p12|pfx|jks|keystore|tfstate)(?:\.backup)?)$/i
|
|
25
|
+
const privateKey = /-----BEGIN (?:[A-Z ]*PRIVATE KEY|OPENSSH PRIVATE KEY)-----/
|
|
26
|
+
|
|
27
|
+
export function transferPathAllowed(value) {
|
|
28
|
+
if (typeof value !== 'string' || !value || value.length > 1024 || /[\\\0\x01-\x1f\x7f]/.test(value)) return false
|
|
29
|
+
const parts = value.split('/')
|
|
30
|
+
if (parts.length > 64 || parts.some((part) => !part || part === '.' || part === '..' || Buffer.byteLength(part) > 255 || excluded.has(part.toLowerCase()))) return false
|
|
31
|
+
return parts.every((part) => !secretName.test(part) || /^\.env\.(?:example|sample|template)$/i.test(part))
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function validateTransfer(value) {
|
|
35
|
+
if (!value || value.version !== 1 || !Array.isArray(value.files) || value.files.length > MAX_FILES) throw fail('Invalid cloud transfer bundle.')
|
|
36
|
+
const launch = value.launch
|
|
37
|
+
if (!launch || Object.keys(launch).some((key) => !['name', 'image', 'session'].includes(key)) || !NAME_PATTERN.test(launch.name ?? '') || typeof launch.image !== 'string' || !/^[\w./:@-]{1,256}$/.test(launch.image) || !isSession(launch.session)) throw fail('Invalid cloud launch settings.')
|
|
38
|
+
let recipe
|
|
39
|
+
if (value.recipe !== undefined) {
|
|
40
|
+
if (!value.recipe || typeof value.recipe !== 'object' || !Array.isArray(value.recipe.environment) || value.recipe.environment.length) throw fail('Template environment is never transferred.')
|
|
41
|
+
recipe = newRecipe(Object.fromEntries(Object.keys(newRecipe()).filter((key) => key in value.recipe).map((key) => [key, value.recipe[key]])))
|
|
42
|
+
if (recipe.source !== 'build' || Object.keys(recipeErrors(recipe)).length || privateKey.test(JSON.stringify(recipe))) throw fail('Invalid cloud rebuild recipe.')
|
|
43
|
+
}
|
|
44
|
+
const seen = new Set()
|
|
45
|
+
let bytes = 0
|
|
46
|
+
const files = value.files.map((file) => {
|
|
47
|
+
if (!file || !transferPathAllowed(file.path)) throw fail('Invalid or sensitive transfer path.')
|
|
48
|
+
if (seen.has(file.path)) throw fail('Duplicate transfer path.')
|
|
49
|
+
seen.add(file.path)
|
|
50
|
+
if (typeof file.data !== 'string' || /[^A-Za-z0-9+/=]/.test(file.data) || file.data.length % 4 !== 0) throw fail('Invalid file encoding.')
|
|
51
|
+
// Check length before allocating the decoded buffer.
|
|
52
|
+
bytes += Buffer.byteLength(file.data, 'base64')
|
|
53
|
+
if (bytes > CLOUD_TRANSFER_LIMIT) throw fail('Cloud transfer supports up to 25 MiB of workspace files.', 413)
|
|
54
|
+
const content = Buffer.from(file.data, 'base64')
|
|
55
|
+
if (content.toString('base64') !== file.data || privateKey.test(content.toString('utf8'))) throw fail('A file contains a private key or invalid encoding.')
|
|
56
|
+
return { path: file.path, content, executable: file.executable === true }
|
|
57
|
+
})
|
|
58
|
+
// A file cannot also be a parent directory of another file.
|
|
59
|
+
for (const name of seen) { const parts = name.split('/'); parts.pop(); while (parts.length) { if (seen.has(parts.join('/'))) throw fail('Conflicting transfer paths.'); parts.pop() } }
|
|
60
|
+
return { launch: { ...launch }, recipe, files, bytes }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function collect(client, workspace, name, script, limit) {
|
|
64
|
+
const chunks = []
|
|
65
|
+
let bytes = 0, exit = null
|
|
66
|
+
const controller = new AbortController()
|
|
67
|
+
try {
|
|
68
|
+
for await (const event of client.sandbox.execStream(name, ['/bin/sh', '-c', script], { workspace, noLoginShell: true, timeoutSecs: 300, signal: controller.signal })) {
|
|
69
|
+
if (event.stream === 'stdout') {
|
|
70
|
+
bytes += event.data.length
|
|
71
|
+
if (bytes > limit) throw fail('Cloud transfer supports up to 25 MiB and 2,000 files.', 413)
|
|
72
|
+
chunks.push(Buffer.from(event.data))
|
|
73
|
+
} else if (event.type === 'exit') exit = event.exitCode
|
|
74
|
+
}
|
|
75
|
+
} catch (error) { controller.abort(); throw error }
|
|
76
|
+
if (exit !== 0) throw fail('Could not read workspace files safely. Retry after file writes finish.', 502)
|
|
77
|
+
return Buffer.concat(chunks).toString('utf8')
|
|
78
|
+
}
|
|
79
|
+
const quote = (value) => "'" + value.replaceAll("'", "'\\''") + "'"
|
|
80
|
+
|
|
81
|
+
// A source's memberships have no authority on another destination. Reuse the
|
|
82
|
+
// destination's sole eligible group, or require a deliberate choice when its
|
|
83
|
+
// policies offer multiple groups. Creation validates the policy again atomically.
|
|
84
|
+
export async function resolveDestinationGroups({ destinationGroups, name, recipe }, dependencies = {}) {
|
|
85
|
+
const [groups, policies] = await Promise.all([(dependencies.listGroups ?? listGroups)(), (dependencies.listPolicies ?? listPolicies)()])
|
|
86
|
+
let selected
|
|
87
|
+
if (destinationGroups !== undefined) {
|
|
88
|
+
try { selected = groupIds(destinationGroups) } catch (error) { throw fail(error.message) }
|
|
89
|
+
} else {
|
|
90
|
+
const eligible = groups.filter(group => {
|
|
91
|
+
try { assertSandboxGroup([group.id], groups, policies); return true } catch { return false }
|
|
92
|
+
})
|
|
93
|
+
if (!eligible.length) throw fail('Add a network rule to a destination group before importing this workspace.', 409)
|
|
94
|
+
if (eligible.length !== 1) throw fail('Choose a destination group before importing this workspace.', 409)
|
|
95
|
+
selected = [eligible[0].id]
|
|
96
|
+
}
|
|
97
|
+
try { assertSandboxGroup(selected, groups, policies) } catch (error) { throw fail(error.message) }
|
|
98
|
+
const plan = await (dependencies.planSandbox ?? planSandbox)({ name, groups: selected, requireGroup: true, agentRules: recipe ? agentAccessRules(recipe) : [] })
|
|
99
|
+
return plan.groups
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export async function exportTransfer(input, options = {}) {
|
|
103
|
+
if (!NAME_PATTERN.test(input?.name ?? '')) throw fail('Invalid workspace transfer request.')
|
|
104
|
+
const { client, workspace, workspaceScope } = await (options.connect ?? gateway)()
|
|
105
|
+
const sandbox = sandboxView((await client.raw.getSandbox({ name: input.name, workspaceScope })).sandbox)
|
|
106
|
+
if (sandbox.phase !== 'ready') throw fail('Start this sandbox before transferring its workspace.', 409)
|
|
107
|
+
const listed = await collect(client, workspace, input.name, `[ "$(realpath /sandbox)" = /sandbox ] || exit 1\nfind /sandbox \\( -type d \\( ${excludedDirectories.map((name) => '-iname ' + quote(name)).join(' -o ')} \\) -prune \\) -o \\( -type f -print0 \\)`, 512 * 1024)
|
|
108
|
+
const paths = listed.split('\0').filter(Boolean).filter((value) => value.startsWith('/sandbox/') && transferPathAllowed(value.slice(9)))
|
|
109
|
+
if (paths.length > MAX_FILES) throw fail('Cloud transfer supports up to 2,000 files.', 413)
|
|
110
|
+
// Recheck every path immediately before reading. find never follows links;
|
|
111
|
+
// realpath equality also refuses a parent replaced with a symlink.
|
|
112
|
+
const script = paths.length ? `set -eu\nfor f in ${paths.map(quote).join(' ')}; do\n[ -f "$f" ] && [ ! -L "$f" ] && [ "$(realpath "$f")" = "$f" ] || exit 1\nprintf '%s\\0' "\${f#/sandbox/}"\nbase64 < "$f"\nprintf '\\0'\nif [ -x "$f" ]; then printf 'true\\0'; else printf 'false\\0'; fi\ndone` : 'true'
|
|
113
|
+
const fields = (await collect(client, workspace, input.name, script, CLOUD_TRANSFER_BODY_LIMIT)).split('\0')
|
|
114
|
+
const files = []
|
|
115
|
+
for (let i = 0; i + 2 < fields.length; i += 3) files.push({ path: fields[i], data: fields[i + 1].replace(/\s/g, ''), executable: fields[i + 2] === 'true' })
|
|
116
|
+
if (fields.length !== files.length * 3 + 1 || fields.at(-1) !== '') throw fail('Incomplete workspace transfer.', 502)
|
|
117
|
+
let recipe, warning
|
|
118
|
+
const templateName = sandbox.workloadTemplate || sandbox.labels?.[IMAGE_TEMPLATE_NAME]
|
|
119
|
+
if (templateName) {
|
|
120
|
+
let template
|
|
121
|
+
try { template = templateView(await client.sandboxTemplates.get(templateName, { workspace })) } catch (error) { if (error.code !== 'not_found') throw error }
|
|
122
|
+
if (template?.managed && template.recipe.source === 'build') {
|
|
123
|
+
recipe = { ...template.recipe, environment: [], command: isSession(template.recipe.command) ? template.recipe.command : '', setups: [], setupRevisions: {} }
|
|
124
|
+
if (template.recipe.setups?.length) warning = 'Workspace and image recipe copied. Reconnect saved MCP and skill Setups, and agent credentials on the destination.'
|
|
125
|
+
}
|
|
126
|
+
else warning = 'Files copied into a fresh Ubuntu shell. Reinstall your custom image tools and reconnect credentials at the destination.'
|
|
127
|
+
}
|
|
128
|
+
const localImage = !sandbox.image || sandbox.image.startsWith('openshell-template/') || !sandbox.image.includes('/') && !/^(ubuntu|debian|alpine|node|python|busybox)(:|$)/.test(sandbox.image)
|
|
129
|
+
if (!recipe && localImage) warning ??= 'Files copied into a fresh Ubuntu shell. Rebuild your custom image and reconnect credentials at the destination.'
|
|
130
|
+
const value = { version: 1, launch: { name: sandbox.name, image: recipe || warning ? 'ubuntu:24.04' : sandbox.image, session: warning && !recipe ? 'shell' : defaultSession(sandbox) }, files, ...(recipe ? { recipe } : {}) }
|
|
131
|
+
validateTransfer(value)
|
|
132
|
+
return { bundle: value, ...(warning ? { warning } : {}) }
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export async function localTransfer(input, options = {}) {
|
|
136
|
+
const origin = options.origin ?? cloudOrigin()
|
|
137
|
+
if (!origin) throw cloudUnavailable()
|
|
138
|
+
if (typeof input?.ticket !== 'string' || !/^openrod-user-[a-f0-9]{24}\.[a-f0-9]{64}$/.test(input.ticket)) throw fail('Invalid cloud transfer request.')
|
|
139
|
+
const { bundle, warning } = await exportTransfer(input, options)
|
|
140
|
+
if (input.destinationGroups !== undefined) {
|
|
141
|
+
try { bundle.destinationGroups = groupIds(input.destinationGroups) } catch (error) { throw fail(error.message) }
|
|
142
|
+
}
|
|
143
|
+
const response = await (options.fetch ?? fetch)(`${origin}/api/cloud/import`, {
|
|
144
|
+
method: 'POST', headers: { 'content-type': 'application/json', authorization: `Bearer ${input.ticket}` }, body: JSON.stringify(bundle), redirect: 'error', signal: AbortSignal.timeout(35 * 60_000),
|
|
145
|
+
})
|
|
146
|
+
const result = await response.json().catch(() => ({}))
|
|
147
|
+
if (!response.ok) throw fail(result.error || 'Cloud import failed. Your local workspace is unchanged.', response.status)
|
|
148
|
+
return { ...result, ...(warning ? { warning } : {}) }
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
async function rebuild(recipe) {
|
|
152
|
+
const name = `handoff-${randomBytes(5).toString('hex')}`
|
|
153
|
+
await imageTemplateRoute('POST', ['image-templates'], { recipe: { ...recipe, name, environment: [] } })
|
|
154
|
+
const deadline = Date.now() + 20 * 60_000
|
|
155
|
+
while (Date.now() < deadline) {
|
|
156
|
+
const template = (await listImageTemplates()).find((item) => item.name === name)
|
|
157
|
+
if (template?.status === 'ready') return name
|
|
158
|
+
if (template?.status === 'failed') throw fail(`Image rebuild failed. Open Templates on the destination and inspect ${name}.`, 502)
|
|
159
|
+
await new Promise((resolve) => setTimeout(resolve, 1000))
|
|
160
|
+
}
|
|
161
|
+
await imageTemplateRoute('POST', ['image-templates', name, 'cancel'], {}).catch(() => {})
|
|
162
|
+
throw fail('Image rebuild timed out. Check Docker on the destination and retry.', 504)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async function waitReady(name) {
|
|
166
|
+
const { client, workspaceScope } = await gateway()
|
|
167
|
+
const deadline = Date.now() + 180_000
|
|
168
|
+
while (Date.now() < deadline) {
|
|
169
|
+
const sandbox = sandboxView((await client.raw.getSandbox({ name, workspaceScope })).sandbox)
|
|
170
|
+
if (sandbox.phase === 'ready') return
|
|
171
|
+
if (['error', 'deleting', 'completed'].includes(sandbox.phase)) throw fail(`Sandbox ${name} did not start. Review its status on the destination.`, 502)
|
|
172
|
+
await new Promise((resolve) => setTimeout(resolve, 1000))
|
|
173
|
+
}
|
|
174
|
+
throw fail(`Sandbox ${name} startup timed out. Review its status on the destination.`, 504)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
async function upload(name, root) {
|
|
178
|
+
const { target, client, workspace } = await gateway()
|
|
179
|
+
const relatives = []
|
|
180
|
+
const walk = async (folder, prefix = '') => { for (const entry of await fs.readdir(folder, { withFileTypes: true })) { const relative = prefix + entry.name; relatives.push('/sandbox/' + relative); if (entry.isDirectory()) await walk(path.join(folder, entry.name), relative + '/') } }
|
|
181
|
+
await walk(root)
|
|
182
|
+
const check = await client.sandbox.exec(name, ['/bin/sh', '-c', `set -eu\n[ \"$(realpath /sandbox)\" = /sandbox ] || exit 1\nfor p in ${relatives.map(quote).join(' ')}; do [ ! -L \"$p\" ] || exit 1; done`], { workspace, noLoginShell: true, timeoutSecs: 30 })
|
|
183
|
+
if (check.exitCode !== 0) throw fail('The destination contains a symlink. Review the template before transferring.', 409)
|
|
184
|
+
await new Promise((resolve, reject) => {
|
|
185
|
+
const child = spawn(process.env.OPENSHELL_BIN || 'openshell', ['--gateway', target.name, '--workspace', workspace, 'sandbox', 'upload', '--no-git-ignore', name, '.', '/sandbox'], { cwd: root, shell: false, stdio: ['ignore', 'ignore', 'ignore'] })
|
|
186
|
+
const timer = setTimeout(() => child.kill('SIGKILL'), 10 * 60_000)
|
|
187
|
+
child.once('error', () => { clearTimeout(timer); reject(fail('The workspace upload could not start on the destination.', 502)) })
|
|
188
|
+
child.once('close', (code) => { clearTimeout(timer); code === 0 ? resolve() : reject(fail('Workspace upload failed. Your source workspace is unchanged.', 502)) })
|
|
189
|
+
})
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// createSandbox is injected by the router to avoid a circular API dependency.
|
|
193
|
+
export async function importTransfer(req, options) {
|
|
194
|
+
return runWithContext(contextSelection(), async () => {
|
|
195
|
+
const chunks = []
|
|
196
|
+
let bytes = 0
|
|
197
|
+
for await (const chunk of req) { bytes += Buffer.byteLength(chunk); if (bytes > CLOUD_TRANSFER_BODY_LIMIT) throw fail('Cloud transfer request too large.', 413); chunks.push(Buffer.from(chunk)) }
|
|
198
|
+
let value
|
|
199
|
+
try { value = JSON.parse(Buffer.concat(chunks).toString('utf8')) } catch { throw fail('Invalid cloud transfer JSON.') }
|
|
200
|
+
const transfer = validateTransfer(value)
|
|
201
|
+
const name = `${transfer.launch.name.slice(0, 10).replace(/-+$/, '')}-${randomBytes(4).toString('hex')}`
|
|
202
|
+
const groups = await (options.resolveGroups ?? resolveDestinationGroups)({ destinationGroups: value.destinationGroups, name, recipe: transfer.recipe })
|
|
203
|
+
const temp = await fs.mkdtemp(path.join(os.tmpdir(), 'openrod-cloud-transfer-'))
|
|
204
|
+
try {
|
|
205
|
+
const root = path.join(temp, 'workspace')
|
|
206
|
+
await fs.mkdir(root, { mode: 0o755 })
|
|
207
|
+
for (const file of transfer.files) {
|
|
208
|
+
const target = path.join(root, ...file.path.split('/'))
|
|
209
|
+
await fs.mkdir(path.dirname(target), { recursive: true, mode: 0o755 })
|
|
210
|
+
await fs.writeFile(target, file.content, { flag: 'wx', mode: file.executable ? 0o755 : 0o644 })
|
|
211
|
+
}
|
|
212
|
+
const template = transfer.recipe ? await (options.rebuild ?? rebuild)(transfer.recipe) : null
|
|
213
|
+
// Each handoff creates a separate copy, including a return to the computer
|
|
214
|
+
// where the original workspace still exists. Never replace that sandbox.
|
|
215
|
+
const sandbox = await options.createSandbox(template ? { name, imageTemplate: template, session: transfer.launch.session, groups } : { ...transfer.launch, name, groups })
|
|
216
|
+
await (options.waitReady ?? waitReady)(sandbox.name)
|
|
217
|
+
if (transfer.files.length) await (options.upload ?? upload)(sandbox.name, root)
|
|
218
|
+
return { name: sandbox.name, files: transfer.files.length, bytes: transfer.bytes, reconnectCredentials: true }
|
|
219
|
+
} finally { await fs.rm(temp, { recursive: true, force: true }) }
|
|
220
|
+
})
|
|
221
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { getApps } from 'firebase-admin/app'
|
|
4
|
+
export async function createCompute(config) {
|
|
5
|
+
const project=config.firebase.projectId,zone=process.env.OPENROD_WORKER_ZONE??'us-east1-b',subnet=process.env.OPENROD_WORKER_SUBNET
|
|
6
|
+
const artifactOrigin=process.env.OPENROD_WORKER_ARTIFACT_ORIGIN,artifactHash=process.env.OPENROD_WORKER_ARTIFACT_SHA256
|
|
7
|
+
if(!/^[a-z0-9-]+$/.test(zone)||!subnet?.startsWith(`projects/${project}/regions/`)||!/^http:\/\/10\.80\.0\.\d{1,3}:8080$/.test(artifactOrigin??'')||!/^[a-f0-9]{64}$/.test(artifactHash??''))throw Error('Worker deployment configuration is incomplete')
|
|
8
|
+
const source=fs.readFileSync(path.resolve(import.meta.dirname,'../../deploy/gcp/worker-startup.sh'),'utf8')
|
|
9
|
+
const base=`https://compute.googleapis.com/compute/v1/projects/${project}/zones/${zone}`
|
|
10
|
+
async function request(method,url,body) {
|
|
11
|
+
const token=await getApps()[0].options.credential.getAccessToken()
|
|
12
|
+
const response=await fetch(url,{method,headers:{Authorization:`Bearer ${token.access_token}`,'Content-Type':'application/json'},body:body?JSON.stringify(body):undefined,signal:AbortSignal.timeout(30000)})
|
|
13
|
+
if(response.status===404)return null
|
|
14
|
+
const value=await response.json()
|
|
15
|
+
if(!response.ok || value.error){const e=Error(value.error?.message??value.error?.errors?.[0]?.message??'Compute request failed');e.code=response.status;throw e}
|
|
16
|
+
return value
|
|
17
|
+
}
|
|
18
|
+
return {get:name=>request('GET',`${base}/instances/${name}`),async create(record){
|
|
19
|
+
const settings=Buffer.from(JSON.stringify({key:record.key,uid:record.uid,origin:config.origin,artifactOrigin,artifactHash,name:record.name})).toString('base64')
|
|
20
|
+
const script=Buffer.from(source.replace('__OPENROD_WORKER_SETTINGS__',settings)).toString('base64')
|
|
21
|
+
const startup=`#!/usr/bin/env bash
|
|
22
|
+
set -euo pipefail
|
|
23
|
+
umask 077
|
|
24
|
+
printf '%s' '${script}' | base64 -d > /usr/local/sbin/openrod-worker-bootstrap
|
|
25
|
+
chmod 700 /usr/local/sbin/openrod-worker-bootstrap
|
|
26
|
+
cat > /etc/systemd/system/openrod-worker-bootstrap.service <<'UNIT'
|
|
27
|
+
[Unit]
|
|
28
|
+
Description=OpenRod private worker bootstrap
|
|
29
|
+
After=network-online.target
|
|
30
|
+
Wants=network-online.target
|
|
31
|
+
StartLimitIntervalSec=7200
|
|
32
|
+
StartLimitBurst=5
|
|
33
|
+
[Service]
|
|
34
|
+
Type=oneshot
|
|
35
|
+
ExecStart=/usr/local/sbin/openrod-worker-bootstrap
|
|
36
|
+
Restart=on-failure
|
|
37
|
+
RestartSec=30
|
|
38
|
+
TimeoutStartSec=2400
|
|
39
|
+
[Install]
|
|
40
|
+
WantedBy=multi-user.target
|
|
41
|
+
UNIT
|
|
42
|
+
systemctl daemon-reload
|
|
43
|
+
systemctl enable --now openrod-worker-bootstrap
|
|
44
|
+
`
|
|
45
|
+
const body={name:record.name,machineType:`zones/${zone}/machineTypes/e2-standard-2`,labels:{application:'openrod',managed_by:'openrod-console',openrod_owner:record.name.slice(9)},tags:{items:['openrod-user-worker']},serviceAccounts:[],canIpForward:false,
|
|
46
|
+
disks:[{boot:true,autoDelete:true,initializeParams:{sourceImage:'projects/ubuntu-os-cloud/global/images/family/ubuntu-2404-lts-amd64',diskSizeGb:'30',diskType:`zones/${zone}/diskTypes/pd-balanced`}},{boot:false,autoDelete:false,deviceName:'openrod-state',initializeParams:{diskName:`${record.name}-state`,diskSizeGb:'100',diskType:`zones/${zone}/diskTypes/pd-balanced`}}],
|
|
47
|
+
networkInterfaces:[{subnetwork:subnet,stackType:'IPV4_ONLY'}],metadata:{items:[{key:'enable-oslogin',value:'TRUE'},{key:'block-project-ssh-keys',value:'TRUE'},{key:'disable-legacy-endpoints',value:'TRUE'},{key:'startup-script',value:startup}]},shieldedInstanceConfig:{enableSecureBoot:true,enableVtpm:true,enableIntegrityMonitoring:true}}
|
|
48
|
+
try{return await request('POST',`${base}/instances?requestId=${record.requestId}`,body)}catch(error){if(error.code!==409)throw error;return request('GET',`${base}/instances/${record.name}`)}
|
|
49
|
+
}}
|
|
50
|
+
}
|
package/server/editor.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import os from 'node:os'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { findExecutable, reasonFrom, runCli, runOpenShell, serializeCli } from './openshell-cli.js'
|
|
4
|
+
import { gateway } from './gateway.js'
|
|
5
|
+
import { agentAccessRules } from '../shared/agent-access.js'
|
|
6
|
+
import { policyRoute } from './policy.js'
|
|
7
|
+
import { OPENSHELL_CA_BUNDLE } from '../src/lib/image-templates.js'
|
|
8
|
+
|
|
9
|
+
// "Open in Cursor / VS Code" runs the command the CLI documents for it,
|
|
10
|
+
// `openshell sandbox connect <name> --editor <editor>`. OpenShell installs its
|
|
11
|
+
// managed SSH config (one Include line in ~/.ssh/config plus a Host block in
|
|
12
|
+
// ~/.config/openshell/ssh_config) and starts the editor's Remote-SSH session.
|
|
13
|
+
// The console runs on the operator's machine, so the editor opens there.
|
|
14
|
+
|
|
15
|
+
const EDITORS = {
|
|
16
|
+
cursor: { label: 'Cursor', binary: 'cursor', app: 'Cursor.app', remoteSsh: 'anysphere.remote-ssh' },
|
|
17
|
+
vscode: { label: 'VS Code', binary: 'code', app: 'Visual Studio Code.app', remoteSsh: 'ms-vscode-remote.remote-ssh' },
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const NAME = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/
|
|
21
|
+
const fail = (message, status = 400) => Object.assign(new Error(message), { status })
|
|
22
|
+
// On macOS the editor's command lives inside the app bundle and is only on
|
|
23
|
+
// PATH after "Install 'cursor' command in PATH", so look there too. The
|
|
24
|
+
// bundle comes first: Cursor installs a `code` command of its own, so a bare
|
|
25
|
+
// `code` on PATH can be Cursor, not VS Code.
|
|
26
|
+
export function editorDirs(id, { home = os.homedir(), pathValue = process.env.PATH ?? '' } = {}) {
|
|
27
|
+
const { app } = EDITORS[id]
|
|
28
|
+
const bundles = ['/Applications', path.join(home, 'Applications')].map((root) => path.join(root, app, 'Contents/Resources/app/bin'))
|
|
29
|
+
return [...bundles, ...pathValue.split(path.delimiter).filter(Boolean)]
|
|
30
|
+
}
|
|
31
|
+
function editorBinary(id) {
|
|
32
|
+
return findExecutable(EDITORS[id].binary, editorDirs(id))
|
|
33
|
+
}
|
|
34
|
+
function listEditors() {
|
|
35
|
+
return Object.entries(EDITORS).map(([id, editor]) => ({ id, label: editor.label, installed: Boolean(editorBinary(id)) }))
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Neither editor ships its Remote - SSH extension. Without it the editor opens
|
|
39
|
+
// and then fails with "No remote extension installed to resolve ssh-remote".
|
|
40
|
+
export async function ensureRemoteSsh(binary, { label, remoteSsh }, env, run = runCli) {
|
|
41
|
+
const listed = await run(binary, ['--list-extensions'], { env, timeoutMs: 30_000 })
|
|
42
|
+
if (listed.code === 0 && listed.stdout.split('\n').some((line) => line.trim().toLowerCase() === remoteSsh)) return
|
|
43
|
+
const installed = await run(binary, ['--install-extension', remoteSsh], { env, timeoutMs: 120_000 })
|
|
44
|
+
if (installed.code !== 0 || installed.timedOut) throw fail(`${label} needs its Remote - SSH extension (${remoteSsh}). Install it from ${label}’s Extensions view, then try again.`, 502)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// VS Code's Remote - SSH downloads its server from inside the sandbox, which
|
|
48
|
+
// sandboxes block by default. Make sure this sandbox has the reviewed
|
|
49
|
+
// GET-only rule for VS Code's two download hosts before opening it, whichever
|
|
50
|
+
// way the sandbox was created. Idempotent, so it costs one read once present.
|
|
51
|
+
const VSCODE_RULE = 'tool-vscode-server'
|
|
52
|
+
// The download needs curl or wget inside the sandbox; the editor's fallback of
|
|
53
|
+
// sending the archive over scp does not work through OpenShell's SSH proxy, so
|
|
54
|
+
// without either tool it waits forever. wget is tried first and ignores the CA
|
|
55
|
+
// variables curl uses. The sandbox user cannot write /etc, so trust the CA in
|
|
56
|
+
// ~/.wgetrc, and only where wget exists. Prints which downloaders exist.
|
|
57
|
+
const prepareScript = `d=''
|
|
58
|
+
command -v curl >/dev/null 2>&1 && d="$d curl"
|
|
59
|
+
if command -v wget >/dev/null 2>&1; then
|
|
60
|
+
d="$d wget"
|
|
61
|
+
grep -qs '^[[:space:]]*ca_certificate' /etc/wgetrc "$HOME/.wgetrc" 2>/dev/null || printf 'ca_certificate = %s\\n' '${OPENSHELL_CA_BUNDLE}' >> "$HOME/.wgetrc"
|
|
62
|
+
fi
|
|
63
|
+
echo "downloaders:$d"`
|
|
64
|
+
export async function ensureVscodeAccess(name, { policy = policyRoute, exec } = {}) {
|
|
65
|
+
// Best effort: if the sandbox can't be asked, let the editor try anyway.
|
|
66
|
+
const found = await Promise.resolve(exec?.(prepareScript)).then((out) => /downloaders:(.*)/.exec(String(out ?? ''))?.[1], () => undefined)
|
|
67
|
+
if (found !== undefined && !found.trim()) throw fail(`${name} has neither curl nor wget, which VS Code needs to install its server in the sandbox. Use an image that includes curl or wget, such as any template built in OpenRod.`, 409)
|
|
68
|
+
const view = await policy('GET', ['policy', name])
|
|
69
|
+
if (!(view?.effective?.rules ?? []).some((rule) => rule.name === VSCODE_RULE)) {
|
|
70
|
+
const [rule] = agentAccessRules({ source: 'build', agents: [], runtimes: ['vscode'] })
|
|
71
|
+
await policy('POST', ['policy', name, 'ops'], { ops: [{ kind: 'addRule', rule }] })
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function openEditor(name, input) {
|
|
76
|
+
const id = String(input?.editor ?? '')
|
|
77
|
+
if (!Object.hasOwn(EDITORS, id)) throw fail('Unknown editor.')
|
|
78
|
+
const { label } = EDITORS[id]
|
|
79
|
+
const binary = editorBinary(id)
|
|
80
|
+
if (!binary) throw fail(`${label} is not installed on this machine.`, 409)
|
|
81
|
+
const args = ['sandbox', 'connect', name, '--editor', id]
|
|
82
|
+
// The editor app can start from this process tree and inherit its
|
|
83
|
+
// environment, so change nothing unless the CLI can't find the editor.
|
|
84
|
+
const dir = path.dirname(binary)
|
|
85
|
+
const pathDirs = (process.env.PATH ?? '').split(path.delimiter).filter(Boolean)
|
|
86
|
+
const env = pathDirs.includes(dir) ? process.env : { ...process.env, PATH: [dir, process.env.PATH].filter(Boolean).join(path.delimiter) }
|
|
87
|
+
const { target, workspace } = await gateway()
|
|
88
|
+
// The editor only reports an unreachable sandbox as a generic SSH failure,
|
|
89
|
+
// so check the sandbox answers first and show the gateway's reason here.
|
|
90
|
+
const probe = await runOpenShell(['sandbox', 'exec', '-n', name, '--timeout', '15', '--no-tty', '--', 'true'], { gateway: target.name, workspace, timeoutMs: 20_000 })
|
|
91
|
+
if (probe.timedOut) throw fail(`${name} did not respond.`, 504)
|
|
92
|
+
if (probe.code !== 0) throw fail(reasonFrom(probe.stderr) || `${name} is not reachable.`, 409)
|
|
93
|
+
if (id === 'vscode') {
|
|
94
|
+
await ensureVscodeAccess(name, {
|
|
95
|
+
exec: async (script) => (await runOpenShell(['sandbox', 'exec', '-n', name, '--timeout', '15', '--no-tty', '--', 'sh', '-c', script], { gateway: target.name, workspace, timeoutMs: 20_000 })).stdout,
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
const result = await serializeCli(async () => {
|
|
99
|
+
await ensureRemoteSsh(binary, EDITORS[id], env)
|
|
100
|
+
return runOpenShell(args, { env, gateway: target.name, workspace })
|
|
101
|
+
})
|
|
102
|
+
if (result.timedOut) throw fail(`Opening ${label} timed out.`, 504)
|
|
103
|
+
if (result.outputExceeded) throw fail(`Opening ${label} produced too much output.`, 502)
|
|
104
|
+
if (result.code !== 0) throw fail(reasonFrom(result.stderr) || `Could not open ${label}.`, 502)
|
|
105
|
+
return { ok: true, editor: id }
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export async function editorRoute(method, parts, input) {
|
|
109
|
+
if (method === 'GET' && parts.length === 1 && parts[0] === 'editors') return listEditors()
|
|
110
|
+
if (method === 'POST' && parts[0] === 'sandboxes' && parts.length === 3 && NAME.test(parts[1]) && parts[2] === 'editor') {
|
|
111
|
+
return openEditor(parts[1], input)
|
|
112
|
+
}
|
|
113
|
+
return undefined
|
|
114
|
+
}
|
package/server/egress.js
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import fs from 'node:fs/promises'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { randomUUID } from 'node:crypto'
|
|
4
|
+
import { ruleToProto } from './policy.js'
|
|
5
|
+
import { appliesTo, blockHosts } from '../src/lib/egress.js'
|
|
6
|
+
import { policyDirectory } from './paths.js'
|
|
7
|
+
|
|
8
|
+
export { appliesTo, blockHosts }
|
|
9
|
+
|
|
10
|
+
const fail = (message, status = 400) => Object.assign(new Error(message), { status })
|
|
11
|
+
|
|
12
|
+
// ---- egress policies ---------------------------------------------------------
|
|
13
|
+
//
|
|
14
|
+
// A policy is a name, some destinations, and an action: allow or block. It
|
|
15
|
+
// applies to everyone, to groups, to named sandboxes, or to the sandboxes that
|
|
16
|
+
// use an MCPs & Skills setup (server/setup-egress.js). Sandboxes start
|
|
17
|
+
// locked down, so nothing leaves one until an allow policy covers it, and a
|
|
18
|
+
// block (a block policy or the organization's blocked hosts) beats every allow.
|
|
19
|
+
//
|
|
20
|
+
// OpenShell has no host-level deny, so a block is an inspected endpoint whose
|
|
21
|
+
// deny rules match every request. It answers HTTP with policy_denied and
|
|
22
|
+
// refuses anything that is not HTTP. It has to cover every port the sandbox's
|
|
23
|
+
// other rules open, or a blocked host would stay open on the others.
|
|
24
|
+
//
|
|
25
|
+
// Stored as JSON in policies/egress/<id>.json, reviewed like code.
|
|
26
|
+
|
|
27
|
+
const directory = async () => path.join(await policyDirectory(), 'egress')
|
|
28
|
+
const ID = /^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$/
|
|
29
|
+
const HOST = /^(\*\*?\.)?[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i
|
|
30
|
+
const SANDBOX = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/
|
|
31
|
+
const SETUP = /^[a-f0-9]{24}$/
|
|
32
|
+
const BINARY = /^\/[\w.+@*?/[\]-]{1,255}$/
|
|
33
|
+
const CIDR = /^[0-9a-f:.]+(\/\d{1,3})?$/i
|
|
34
|
+
const REQUESTS = ['any', 'read-only', 'read-write', 'custom']
|
|
35
|
+
const METHODS = ['GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE', '*']
|
|
36
|
+
|
|
37
|
+
export const PREFIX = 'egress_'
|
|
38
|
+
export const BLOCK_ALL = [{ method: '*', path: '/' }, { method: '*', path: '/**' }]
|
|
39
|
+
export const DEFAULT_ADVANCED = { ports: [443, 80], programs: [], requests: 'any', allow: [], deny: [], enforcement: 'enforce', privateIps: [] }
|
|
40
|
+
const WEB_PORTS = [443, 80]
|
|
41
|
+
|
|
42
|
+
const list = (v) => (Array.isArray(v) ? v : [])
|
|
43
|
+
const uniq = (items) => [...new Set(items)]
|
|
44
|
+
|
|
45
|
+
function requestList(input, where) {
|
|
46
|
+
return list(input).map((r) => {
|
|
47
|
+
const method = String(r?.method ?? '').toUpperCase()
|
|
48
|
+
const p = String(r?.path ?? '').trim()
|
|
49
|
+
if (!METHODS.includes(method)) throw fail(`${where}: unsupported method "${r?.method}".`)
|
|
50
|
+
if (!p.startsWith('/') || p.length > 512) throw fail(`${where}: a path must start with "/".`)
|
|
51
|
+
return { method, path: p }
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function validateAdvanced(input) {
|
|
56
|
+
const a = { ...DEFAULT_ADVANCED, ...(input ?? {}) }
|
|
57
|
+
const ports = uniq(list(a.ports).map(Number))
|
|
58
|
+
if (!ports.length || ports.some((p) => !Number.isInteger(p) || p < 1 || p > 65535)) throw fail('Ports must be 1–65535.')
|
|
59
|
+
const programs = uniq(list(a.programs).map((p) => String(p).trim()).filter(Boolean))
|
|
60
|
+
for (const p of programs) if (!BINARY.test(p)) throw fail(`"${p}" is not an absolute program path.`)
|
|
61
|
+
if (!REQUESTS.includes(a.requests)) throw fail('Unknown request setting.')
|
|
62
|
+
const allow = a.requests === 'custom' ? requestList(a.allow, 'Allowed request') : []
|
|
63
|
+
if (a.requests === 'custom' && !allow.length) throw fail('Add at least one allowed request, or allow any request.')
|
|
64
|
+
const deny = requestList(a.deny, 'Blocked request')
|
|
65
|
+
const privateIps = uniq(list(a.privateIps).map((ip) => String(ip).trim()).filter(Boolean))
|
|
66
|
+
for (const ip of privateIps) if (!CIDR.test(ip)) throw fail(`"${ip}" is not an IP or CIDR.`)
|
|
67
|
+
return { ports, programs, requests: a.requests, allow, deny, enforcement: a.enforcement === 'audit' ? 'audit' : 'enforce', privateIps }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function validatePolicy(input) {
|
|
71
|
+
const name = String(input?.name ?? '').trim().slice(0, 80)
|
|
72
|
+
if (!name) throw fail('Give the rule a name.')
|
|
73
|
+
const id = String(input?.id ?? '').trim()
|
|
74
|
+
if (!ID.test(id)) throw fail('Rule ids use lowercase letters, digits and dashes (up to 40).')
|
|
75
|
+
const action = input?.action === 'block' ? 'block' : input?.action === 'allow' ? 'allow' : null
|
|
76
|
+
if (!action) throw fail('Choose allow or block.')
|
|
77
|
+
const destinations = hostList(input.destinations)
|
|
78
|
+
if (!destinations.length) throw fail('Add at least one destination.')
|
|
79
|
+
const to = input.appliesTo ?? {}
|
|
80
|
+
const appliesTo = {
|
|
81
|
+
everyone: Boolean(to.everyone),
|
|
82
|
+
groups: uniq(list(to.groups).map(String)),
|
|
83
|
+
sandboxes: uniq(list(to.sandboxes).map(String)),
|
|
84
|
+
setups: uniq(list(to.setups).map(String)),
|
|
85
|
+
}
|
|
86
|
+
for (const s of appliesTo.sandboxes) if (!SANDBOX.test(s)) throw fail(`"${s}" is not a sandbox name.`)
|
|
87
|
+
for (const s of appliesTo.setups) if (!SETUP.test(s)) throw fail(`"${s}" is not an MCPs & Skills setup.`)
|
|
88
|
+
const policy = { id, name, action, destinations, appliesTo }
|
|
89
|
+
if (action === 'allow') policy.advanced = validateAdvanced(input.advanced)
|
|
90
|
+
if (input.setup != null) policy.setup = setupMarker(input.setup)
|
|
91
|
+
return policy
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function hostList(input) {
|
|
95
|
+
const hosts = uniq(list(input).map((h) => String(h).trim().toLowerCase().replace(/\.$/, '')).filter(Boolean))
|
|
96
|
+
if (hosts.length > 200) throw fail('Too many destinations. Split them into several rules.')
|
|
97
|
+
for (const h of hosts) {
|
|
98
|
+
if (h === '*' || h === '**') throw fail('"All destinations" needs OpenShell support that does not exist yet. List the hosts instead.')
|
|
99
|
+
if (!HOST.test(h)) throw fail(`"${h}" is not a host (wildcards: *.example.com or **.example.com).`)
|
|
100
|
+
if (/^\*\*?\./.test(h) && h.split('.').length < 3) throw fail(`"${h}" is too broad. OpenShell needs at least two labels after the wildcard.`)
|
|
101
|
+
}
|
|
102
|
+
return hosts
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// The console keeps one allow policy per MCPs & Skills setup. The marker names
|
|
106
|
+
// the setup and the hosts and ports it needs, so a recompute keeps the ones
|
|
107
|
+
// people added.
|
|
108
|
+
function setupMarker(input) {
|
|
109
|
+
const id = String(input?.id ?? '')
|
|
110
|
+
if (!SETUP.test(id)) throw fail('Unknown MCPs & Skills setup.')
|
|
111
|
+
const name = String(input.name ?? '').trim().slice(0, 80)
|
|
112
|
+
if (/[\x00-\x1f\x7f]/.test(name)) throw fail('The setup name has control characters.')
|
|
113
|
+
const ports = uniq(list(input.ports).map(Number))
|
|
114
|
+
if (ports.some((p) => !Number.isInteger(p) || p < 1 || p > 65535)) throw fail('Ports must be 1–65535.')
|
|
115
|
+
return { id, name, required: hostList(input.required), ports }
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// ---- storage -----------------------------------------------------------------
|
|
119
|
+
|
|
120
|
+
async function readJson(file) {
|
|
121
|
+
try { return JSON.parse(await fs.readFile(file, 'utf8')) } catch (error) { if (error.code === 'ENOENT') return null; throw error }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// `dir` is for tests.
|
|
125
|
+
export async function listPolicies(dir) {
|
|
126
|
+
dir ??= await directory()
|
|
127
|
+
let files = []
|
|
128
|
+
try { files = (await fs.readdir(dir)).filter((f) => f.endsWith('.json')) } catch (error) { if (error.code !== 'ENOENT') throw error }
|
|
129
|
+
const policies = await Promise.all(files.map(async (f) => { try { return validatePolicy(await readJson(path.join(dir, f))) } catch { return null } }))
|
|
130
|
+
return policies.filter(Boolean).sort((a, b) => a.name.localeCompare(b.name))
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export async function writePolicy(policy, dir) {
|
|
134
|
+
dir ??= await directory()
|
|
135
|
+
await fs.mkdir(dir, { recursive: true })
|
|
136
|
+
const file = path.join(dir, `${policy.id}.json`), temporary = `${file}.${randomUUID()}.tmp`
|
|
137
|
+
try {
|
|
138
|
+
await fs.writeFile(temporary, `${JSON.stringify(policy, null, 2)}\n`, { flag: 'wx', mode: 0o600 })
|
|
139
|
+
await fs.rename(temporary, file)
|
|
140
|
+
} finally { await fs.rm(temporary, { force: true }) }
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export async function removePolicy(id, dir) {
|
|
144
|
+
if (!ID.test(String(id))) throw fail('Unknown rule.')
|
|
145
|
+
dir ??= await directory()
|
|
146
|
+
await fs.rm(path.join(dir, `${id}.json`), { force: true })
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// ---- compile -----------------------------------------------------------------
|
|
150
|
+
|
|
151
|
+
function allowSpec(policy) {
|
|
152
|
+
const a = policy.advanced
|
|
153
|
+
// "Any request" with nothing blocked needs no inspection at all.
|
|
154
|
+
const inspect = a.requests !== 'any' || a.deny.length > 0
|
|
155
|
+
return {
|
|
156
|
+
name: PREFIX + policy.id,
|
|
157
|
+
binaries: a.programs.length ? a.programs : ['/**'],
|
|
158
|
+
endpoints: policy.destinations.map((host) => ({
|
|
159
|
+
host,
|
|
160
|
+
ports: a.ports,
|
|
161
|
+
protocol: inspect ? 'rest' : 'tcp',
|
|
162
|
+
access: !inspect ? null : a.requests === 'any' ? 'full' : a.requests === 'custom' ? null : a.requests,
|
|
163
|
+
allow: a.requests === 'custom' ? a.allow : [],
|
|
164
|
+
deny: inspect ? a.deny : [],
|
|
165
|
+
enforcement: a.enforcement,
|
|
166
|
+
allowedIps: a.privateIps,
|
|
167
|
+
})),
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function blockSpec(name, hosts, ports) {
|
|
172
|
+
return {
|
|
173
|
+
name,
|
|
174
|
+
binaries: ['/**'],
|
|
175
|
+
endpoints: uniq(hosts.flatMap(blockHosts)).map((host) => ({ host, ports, protocol: 'rest', access: 'full', deny: BLOCK_ALL, enforcement: 'enforce' })),
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// The console-owned rules for one sandbox, keyed by policy name: every allow
|
|
180
|
+
// and block policy that applies to it, plus the organization's blocked hosts.
|
|
181
|
+
// `openPorts` are the ports the sandbox's other rules (template, one-off,
|
|
182
|
+
// provider) open, so a block covers those as well as the allows' ports.
|
|
183
|
+
export function compileFor(sandbox, policies, orgBlocked = [], openPorts = []) {
|
|
184
|
+
const mine = policies.filter((p) => appliesTo(p, sandbox))
|
|
185
|
+
const allows = mine.filter((p) => p.action === 'allow')
|
|
186
|
+
const ports = uniq([...WEB_PORTS, ...allows.flatMap((p) => p.advanced.ports), ...openPorts.map(Number)]).sort((a, b) => a - b)
|
|
187
|
+
const specs = [
|
|
188
|
+
...allows.map(allowSpec),
|
|
189
|
+
...mine.filter((p) => p.action === 'block').map((p) => blockSpec(PREFIX + p.id, p.destinations, ports)),
|
|
190
|
+
...(orgBlocked.length ? [blockSpec('org_blocked', orgBlocked, ports)] : []),
|
|
191
|
+
]
|
|
192
|
+
const out = {}
|
|
193
|
+
for (const spec of specs) { const { rule } = ruleToProto(spec); out[spec.name] = { ...rule, name: spec.name } }
|
|
194
|
+
return out
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// A request is settled by a block policy when one of its hosts is covered.
|
|
198
|
+
export function blockedByPolicy(policies, sandbox, hosts, matches) {
|
|
199
|
+
for (const p of policies) {
|
|
200
|
+
if (p.action !== 'block' || !appliesTo(p, sandbox)) continue
|
|
201
|
+
for (const host of hosts) if (p.destinations.flatMap(blockHosts).some((d) => matches(d, host))) return { host, policy: p }
|
|
202
|
+
}
|
|
203
|
+
return null
|
|
204
|
+
}
|