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,144 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process'
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import os from 'node:os'
|
|
4
|
+
import path from 'node:path'
|
|
5
|
+
import { resolveGateway, workspaceName } from './gateway.js'
|
|
6
|
+
|
|
7
|
+
const DEFAULT_TIMEOUT_MS = 60_000
|
|
8
|
+
const DEFAULT_OUTPUT_LIMIT = 64 * 1024
|
|
9
|
+
const SEARCH_DIRS = ['/opt/homebrew/bin', '/usr/local/bin', path.join(os.homedir(), '.local/bin')]
|
|
10
|
+
|
|
11
|
+
export const fail = (message, status = 400) => Object.assign(new Error(message), { status })
|
|
12
|
+
const pathDirs = (env = process.env) => (env.PATH ?? '').split(path.delimiter).filter(Boolean)
|
|
13
|
+
|
|
14
|
+
export function findExecutable(binary, dirs = [...pathDirs(), ...SEARCH_DIRS]) {
|
|
15
|
+
if (!binary) return null
|
|
16
|
+
if (binary.includes(path.sep)) {
|
|
17
|
+
try { fs.accessSync(binary, fs.constants.X_OK); return binary } catch { return null }
|
|
18
|
+
}
|
|
19
|
+
for (const dir of dirs) {
|
|
20
|
+
const file = path.join(dir, binary)
|
|
21
|
+
try { fs.accessSync(file, fs.constants.X_OK); return file } catch { /* next */ }
|
|
22
|
+
}
|
|
23
|
+
return null
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function openshellBinary(env = process.env) {
|
|
27
|
+
return findExecutable(env.OPENSHELL_BIN || 'openshell', [...pathDirs(env), ...SEARCH_DIRS])
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const sshBinary = (env = process.env) => findExecutable('ssh', pathDirs(env))
|
|
31
|
+
export const shellQuote = (value) => `'${String(value).replaceAll("'", "'\\''")}'`
|
|
32
|
+
export const commandText = (executable, args) => [executable, ...args].map(shellQuote).join(' ')
|
|
33
|
+
|
|
34
|
+
function stop(child, signal) {
|
|
35
|
+
try {
|
|
36
|
+
if (child.pid && process.platform !== 'win32') process.kill(-child.pid, signal)
|
|
37
|
+
else child.kill(signal)
|
|
38
|
+
} catch { /* already gone */ }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Run without a shell. Output is bounded, and a timeout stops the process group
|
|
42
|
+
// so ssh/ssh-proxy children cannot survive their openshell parent.
|
|
43
|
+
export function runCli(executable, args, {
|
|
44
|
+
cwd,
|
|
45
|
+
env = process.env,
|
|
46
|
+
timeoutMs = DEFAULT_TIMEOUT_MS,
|
|
47
|
+
outputLimit = DEFAULT_OUTPUT_LIMIT,
|
|
48
|
+
} = {}) {
|
|
49
|
+
return new Promise((resolve, reject) => {
|
|
50
|
+
const child = spawn(executable, args, {
|
|
51
|
+
cwd,
|
|
52
|
+
env,
|
|
53
|
+
detached: process.platform !== 'win32',
|
|
54
|
+
shell: false,
|
|
55
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
56
|
+
})
|
|
57
|
+
const stdout = []
|
|
58
|
+
const stderr = []
|
|
59
|
+
let bytes = 0
|
|
60
|
+
let timedOut = false
|
|
61
|
+
let outputExceeded = false
|
|
62
|
+
let settled = false
|
|
63
|
+
let hardKill
|
|
64
|
+
|
|
65
|
+
const append = (target, chunk) => {
|
|
66
|
+
const remaining = outputLimit - bytes
|
|
67
|
+
if (remaining > 0) target.push(chunk.subarray(0, remaining))
|
|
68
|
+
bytes += chunk.length
|
|
69
|
+
if (bytes > outputLimit && !outputExceeded) {
|
|
70
|
+
outputExceeded = true
|
|
71
|
+
stop(child, 'SIGTERM')
|
|
72
|
+
hardKill = setTimeout(() => stop(child, 'SIGKILL'), 500)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
child.stdout.on('data', (chunk) => append(stdout, chunk))
|
|
76
|
+
child.stderr.on('data', (chunk) => append(stderr, chunk))
|
|
77
|
+
|
|
78
|
+
const timer = setTimeout(() => {
|
|
79
|
+
timedOut = true
|
|
80
|
+
stop(child, 'SIGTERM')
|
|
81
|
+
hardKill = setTimeout(() => stop(child, 'SIGKILL'), 500)
|
|
82
|
+
}, timeoutMs)
|
|
83
|
+
|
|
84
|
+
child.once('error', (error) => {
|
|
85
|
+
if (settled) return
|
|
86
|
+
settled = true
|
|
87
|
+
clearTimeout(timer)
|
|
88
|
+
clearTimeout(hardKill)
|
|
89
|
+
reject(error)
|
|
90
|
+
})
|
|
91
|
+
child.once('close', (code, signal) => {
|
|
92
|
+
if (settled) return
|
|
93
|
+
settled = true
|
|
94
|
+
clearTimeout(timer)
|
|
95
|
+
clearTimeout(hardKill)
|
|
96
|
+
resolve({
|
|
97
|
+
code,
|
|
98
|
+
signal,
|
|
99
|
+
stdout: Buffer.concat(stdout).toString('utf8'),
|
|
100
|
+
stderr: Buffer.concat(stderr).toString('utf8'),
|
|
101
|
+
timedOut,
|
|
102
|
+
outputExceeded,
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export async function runOpenShell(args, options = {}) {
|
|
109
|
+
const env = options.env ?? process.env
|
|
110
|
+
const executable = openshellBinary(env)
|
|
111
|
+
if (!executable) throw fail('The openshell CLI is not installed on this machine.', 409)
|
|
112
|
+
const gateway = options.gateway ?? resolveGateway().name
|
|
113
|
+
const workspace = options.workspace ?? workspaceName()
|
|
114
|
+
const result = await runCli(executable, ['--gateway', gateway, '--workspace', workspace, ...args], { ...options, env: { ...env, NO_COLOR: '1' } })
|
|
115
|
+
return { ...result, executable, gateway, workspace }
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Only CLI operations that install managed SSH config use this queue.
|
|
119
|
+
let queue = Promise.resolve()
|
|
120
|
+
export function serializeCli(task) {
|
|
121
|
+
const run = queue.then(task, task)
|
|
122
|
+
queue = run.catch(() => {})
|
|
123
|
+
return run
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// miette may emit either a structured gateway message or a boxed error.
|
|
127
|
+
export function reasonFrom(output) {
|
|
128
|
+
const text = String(output ?? '').replace(/\x1b\[[0-9;]*[A-Za-z]/g, '')
|
|
129
|
+
const gateway = text.match(/message: "([^"]+)"/)?.[1]
|
|
130
|
+
if (gateway) return gateway
|
|
131
|
+
const lines = text.split('\n')
|
|
132
|
+
const start = lines.findIndex((line) => line.includes('×'))
|
|
133
|
+
if (start >= 0) {
|
|
134
|
+
const message = [lines[start].slice(lines[start].indexOf('×') + 1)]
|
|
135
|
+
for (const line of lines.slice(start + 1)) {
|
|
136
|
+
const more = /^\s*│(.*)$/.exec(line)
|
|
137
|
+
if (!more) break
|
|
138
|
+
message.push(more[1])
|
|
139
|
+
}
|
|
140
|
+
return message.map((part) => part.trim()).filter(Boolean).join(' ')
|
|
141
|
+
}
|
|
142
|
+
const clean = lines.map((line) => line.trim()).filter(Boolean)
|
|
143
|
+
return (clean.find((line) => /^error:/i.test(line)) ?? clean.at(-1))?.replace(/^error:\s*/i, '') || 'The openshell CLI failed.'
|
|
144
|
+
}
|
package/server/org.js
ADDED
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
import { groupIds, groupsOf, labelsForGroups, changeGroups } from '../shared/group-membership.js'
|
|
2
|
+
export { GROUP_LABEL, groupsOf } from '../shared/group-membership.js'
|
|
3
|
+
import { assertPolicyGroup, assertSandboxGroup, assertPolicyCoverage } from '../shared/group-network.js'
|
|
4
|
+
import { BUILTIN_TEMPLATES, composeTemplate } from '../shared/policy-templates.js'
|
|
5
|
+
import fs from 'node:fs/promises'
|
|
6
|
+
import path from 'node:path'
|
|
7
|
+
import { randomUUID } from 'node:crypto'
|
|
8
|
+
import { create, equals } from '@bufbuild/protobuf'
|
|
9
|
+
import { NetworkPolicyRuleSchema } from '@nvidia/openshell-sdk/raw'
|
|
10
|
+
import { gateway, sandboxView, contextSelection, runWithContext } from './gateway.js'
|
|
11
|
+
import { policyDirectory } from './paths.js'
|
|
12
|
+
import { findTemplate, listTemplates, ruleToProto, templateToPolicy } from './policy.js'
|
|
13
|
+
import { appliesTo, blockHosts, blockedByPolicy, compileFor, listPolicies, removePolicy, validatePolicy, writePolicy } from './egress.js'
|
|
14
|
+
import { hostMatches } from '../src/lib/egress.js'
|
|
15
|
+
import { readSetupMembers, sandboxSetups } from './setup-members.js'
|
|
16
|
+
|
|
17
|
+
export { hostMatches }
|
|
18
|
+
|
|
19
|
+
const fail = (message, status = 400) => Object.assign(new Error(message), { status })
|
|
20
|
+
|
|
21
|
+
// ---- organization → group → sandbox ------------------------------------------
|
|
22
|
+
//
|
|
23
|
+
// The gateway holds one policy per sandbox, and its global policy replaces a
|
|
24
|
+
// sandbox's policy rather than adding to it. So the layering lives here: the
|
|
25
|
+
// console writes the egress policies that apply to a sandbox (everyone, its
|
|
26
|
+
// group, the sandbox by name, or a setup it uses) and the organization's
|
|
27
|
+
// blocked hosts into every sandbox's own policy, under reserved name prefixes,
|
|
28
|
+
// and leaves the sandbox's other rules alone.
|
|
29
|
+
//
|
|
30
|
+
// Group membership is stored here rather than in the sandbox: the gateway
|
|
31
|
+
// fixes labels at creation, and people change group memberships. A
|
|
32
|
+
// sandbox with no stored membership falls back to the group labels it was
|
|
33
|
+
// created with, so sandboxes from before membership was stored keep theirs.
|
|
34
|
+
// Setup membership is bound to gateway and immutable sandbox id (setup-members.js).
|
|
35
|
+
//
|
|
36
|
+
// Stored as JSON next to the templates, so policy is reviewed and committed
|
|
37
|
+
// like code: policies/org/organization.json, policies/org/groups/<id>.json,
|
|
38
|
+
// policies/org/members.json and policies/egress/<id>.json.
|
|
39
|
+
|
|
40
|
+
const orgDirectory = async () => path.join(await policyDirectory(), 'org')
|
|
41
|
+
const groupDirectory = async () => path.join(await orgDirectory(), 'groups')
|
|
42
|
+
const membersFile = async () => path.join(await orgDirectory(), 'members.json')
|
|
43
|
+
const SANDBOX_NAME = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/
|
|
44
|
+
const GROUP_ID = /^[a-z0-9]([a-z0-9-]{0,46}[a-z0-9])?$/
|
|
45
|
+
const HOST_PATTERN = /^(\*\*?\.)?[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i
|
|
46
|
+
|
|
47
|
+
// Connections outside configured policy always stay blocked. `group_` rules
|
|
48
|
+
// predate egress policies; the next sync removes them.
|
|
49
|
+
export const PREFIX = { org: 'org_', group: 'group_', egress: 'egress_' }
|
|
50
|
+
export const isManaged = (key) => Object.values(PREFIX).some((prefix) => key.startsWith(prefix))
|
|
51
|
+
|
|
52
|
+
const EMPTY_ORG = { blocked: [], outside: 'block' }
|
|
53
|
+
|
|
54
|
+
function validateBlocked(input) {
|
|
55
|
+
const hosts = [...new Set((Array.isArray(input) ? input : []).map((h) => String(h).trim().toLowerCase()).filter(Boolean))]
|
|
56
|
+
for (const h of hosts) if (!HOST_PATTERN.test(h)) throw fail(`"${h}" is not a host (wildcards: *.example.com or **.example.com).`)
|
|
57
|
+
if (hosts.length > 500) throw fail('Too many blocked hosts.')
|
|
58
|
+
return hosts
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// A rule host collides with a blocked pattern when either one covers the other:
|
|
62
|
+
// `**.example.com` in a rule would open a blocked `api.example.com`.
|
|
63
|
+
function overlapsBlocked(blocked, ruleHost) {
|
|
64
|
+
const bare = (p) => p.replace(/^\*\*?\./, '')
|
|
65
|
+
return blocked.find((b) => hostMatches(b, ruleHost) || hostMatches(ruleHost, bare(b)) || (ruleHost.startsWith('*') && bare(ruleHost) === bare(b))) ?? null
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// The blocked host (or its subdomains) a rule host would reach, or null. The
|
|
69
|
+
// same overlap savePolicy checks, so a generated allow never opens a block.
|
|
70
|
+
export const blockOverlap = (blocked, ruleHost) => blocked.find((b) => blockHosts(b).some((pattern) => overlapsBlocked([pattern], ruleHost))) ?? null
|
|
71
|
+
|
|
72
|
+
export function blockedBy(org, hosts) {
|
|
73
|
+
for (const host of hosts) {
|
|
74
|
+
const hit = org.blocked.find((b) => blockHosts(b).some((pattern) => hostMatches(pattern, host)))
|
|
75
|
+
if (hit) return { host, pattern: hit }
|
|
76
|
+
}
|
|
77
|
+
return null
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function assertNotBlocked(org, rules, where) {
|
|
81
|
+
for (const r of rules) for (const e of r.endpoints ?? []) {
|
|
82
|
+
const hit = overlapsBlocked(org.blocked, String(e.host ?? '').toLowerCase())
|
|
83
|
+
if (hit) throw fail(`${where}: rule "${r.name}" reaches ${e.host}, which the organization blocks (${hit}).`)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// OpenShell rejects a block and an allow on the same host when they disagree
|
|
88
|
+
// on audit mode or private addresses. Say so here rather than per sandbox.
|
|
89
|
+
function assertCompatible(org, policies) {
|
|
90
|
+
const blocks = [
|
|
91
|
+
...org.blocked.map((host) => ({ host, by: 'the organization' })),
|
|
92
|
+
...policies.filter((p) => p.action === 'block').flatMap((p) => p.destinations.map((host) => ({ host, by: `"${p.name}"` }))),
|
|
93
|
+
].flatMap((b) => blockHosts(b.host).map((host) => ({ ...b, host })))
|
|
94
|
+
for (const p of policies) {
|
|
95
|
+
if (p.action !== 'allow' || (p.advanced.enforcement !== 'audit' && !p.advanced.privateIps.length)) continue
|
|
96
|
+
for (const d of p.destinations) {
|
|
97
|
+
const hit = blocks.find((b) => overlapsBlocked([b.host], d))
|
|
98
|
+
if (hit) throw fail(`"${p.name}" allows ${d} in audit mode or on private addresses, and ${hit.by} blocks ${hit.host}. OpenShell can't combine the two. Use Enforce and no private addresses, or drop the block.`)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// ---- storage ----------------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
async function readJson(file) {
|
|
106
|
+
try { return JSON.parse(await fs.readFile(file, 'utf8')) } catch (error) { if (error.code === 'ENOENT') return null; throw error }
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export async function readOrg() {
|
|
110
|
+
const raw = await readJson(path.join(await orgDirectory(), 'organization.json'))
|
|
111
|
+
if (!raw) return { ...EMPTY_ORG }
|
|
112
|
+
return { blocked: validateBlocked(raw.blocked), outside: 'block' }
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function validateGroup(input) {
|
|
116
|
+
const id = String(input.id ?? '').trim()
|
|
117
|
+
if (!GROUP_ID.test(id)) throw fail('Group ids use lowercase letters, digits and dashes.')
|
|
118
|
+
const outside = 'block'
|
|
119
|
+
return {
|
|
120
|
+
id,
|
|
121
|
+
name: String(input.name ?? id).trim().slice(0, 80) || id,
|
|
122
|
+
description: String(input.description ?? '').slice(0, 400),
|
|
123
|
+
// A group may pin the policy (template) of sandboxes created in it. Groups
|
|
124
|
+
// made in the console leave it to the launch dialog.
|
|
125
|
+
template: input.template ? String(input.template) : null,
|
|
126
|
+
outside,
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Read old scalar memberships as arrays; explicit empty membership overrides labels.
|
|
131
|
+
export async function readMembers() {
|
|
132
|
+
const raw = await readJson(await membersFile())
|
|
133
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return {}
|
|
134
|
+
const out = {}
|
|
135
|
+
for (const [name, value] of Object.entries(raw)) {
|
|
136
|
+
if (!SANDBOX_NAME.test(name)) continue
|
|
137
|
+
try { out[name] = groupIds(value).filter((id) => GROUP_ID.test(id)) } catch { /* invalid saved entry */ }
|
|
138
|
+
}
|
|
139
|
+
return out
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Network rule changes check coverage against memberships, and membership
|
|
143
|
+
// changes check it against network rules. Each check and its write run one at
|
|
144
|
+
// a time, so a concurrent change always sees the other's result.
|
|
145
|
+
let orgWrite = Promise.resolve()
|
|
146
|
+
export function serializeOrgWrite(work) {
|
|
147
|
+
const context = contextSelection()
|
|
148
|
+
const run = () => runWithContext(context, work)
|
|
149
|
+
const result = orgWrite.then(run, run)
|
|
150
|
+
orgWrite = result.catch(() => {})
|
|
151
|
+
return result
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function assignGroup(...args) {
|
|
155
|
+
return serializeOrgWrite(() => writeGroupAssignment(...args))
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Plans a sandbox, creates it with `create(plan)` and records its groups as
|
|
159
|
+
// one step, so a network rule can't be removed between the check and the
|
|
160
|
+
// membership it allowed.
|
|
161
|
+
export function createInGroups(input, create) {
|
|
162
|
+
return serializeOrgWrite(async () => {
|
|
163
|
+
const plan = await planSandbox(input)
|
|
164
|
+
const ref = await create(plan)
|
|
165
|
+
// A new sandbox starts in the group it was created in, even if an older
|
|
166
|
+
// sandbox of the same name was moved elsewhere.
|
|
167
|
+
await writeGroupAssignment([ref.name], plan.groups)
|
|
168
|
+
return { plan, ref }
|
|
169
|
+
})
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
async function writeGroupAssignment(names, group, { forget = false } = {}) {
|
|
173
|
+
const members = await readMembers()
|
|
174
|
+
for (const name of names) {
|
|
175
|
+
if (forget) delete members[name]
|
|
176
|
+
else members[name] = groupIds(group)
|
|
177
|
+
}
|
|
178
|
+
await write(await membersFile(), Object.fromEntries(Object.entries(members).sort(([a], [b]) => a.localeCompare(b))))
|
|
179
|
+
return members
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export async function listGroups() {
|
|
183
|
+
const GROUP_DIR = await groupDirectory()
|
|
184
|
+
let files = []
|
|
185
|
+
try { files = (await fs.readdir(GROUP_DIR)).filter((f) => f.endsWith('.json')) } catch (error) { if (error.code !== 'ENOENT') throw error }
|
|
186
|
+
const groups = await Promise.all(files.map(async (f) => { try { return validateGroup(await readJson(path.join(GROUP_DIR, f))) } catch { return null } }))
|
|
187
|
+
return groups.filter(Boolean).sort((a, b) => a.name.localeCompare(b.name))
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export async function findGroup(id) {
|
|
191
|
+
if (!GROUP_ID.test(String(id ?? ''))) return null
|
|
192
|
+
const raw = await readJson(path.join(await groupDirectory(), `${id}.json`))
|
|
193
|
+
return raw ? validateGroup(raw) : null
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const write = async (file, value) => {
|
|
197
|
+
await fs.mkdir(path.dirname(file), { recursive: true })
|
|
198
|
+
await fs.writeFile(file, `${JSON.stringify(value, null, 2)}\n`)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// ---- composition -------------------------------------------------------------
|
|
202
|
+
|
|
203
|
+
export const effectiveOutside = () => 'block'
|
|
204
|
+
|
|
205
|
+
// The rules the console owns in a sandbox's policy, keyed by their policy name.
|
|
206
|
+
const managedRules = (org, policies, sandbox, openPorts) => compileFor(sandbox, policies, org.blocked, openPorts)
|
|
207
|
+
|
|
208
|
+
// The ports a sandbox's own rules open (template, one-off, provider). A block
|
|
209
|
+
// has to cover them, or a blocked host would stay reachable there.
|
|
210
|
+
const openPorts = (networkPolicies) => Object.entries(networkPolicies ?? {}).filter(([key]) => !isManaged(key))
|
|
211
|
+
.flatMap(([, rule]) => (rule.endpoints ?? []).flatMap((e) => (e.ports?.length ? e.ports : e.port ? [e.port] : [])))
|
|
212
|
+
|
|
213
|
+
// An agent's reviewed destinations, as sandbox rules named agent-<id>. They
|
|
214
|
+
// are not managed rules: the pass leaves them alone, and a block still wins.
|
|
215
|
+
export function addAgentAccess(policy, agentRules, org) {
|
|
216
|
+
assertNotBlocked(org, agentRules, 'Agent access')
|
|
217
|
+
for (const spec of agentRules) {
|
|
218
|
+
const { name, rule } = ruleToProto(spec)
|
|
219
|
+
if (policy.networkPolicies[name]) throw fail(`The policy's rule "${name}" conflicts with required agent access. Rename that rule.`)
|
|
220
|
+
policy.networkPolicies[name] = rule
|
|
221
|
+
}
|
|
222
|
+
return policy
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Everything a new sandbox needs from its group, resolved before it exists.
|
|
226
|
+
export async function planSandbox({ name, group: legacyGroup, groups: selectedGroups, template: templateId, accessTemplates = [], agentRules = [], systemBaseline = false, requireGroup = false, setups = [] }) {
|
|
227
|
+
const [org, policies] = await Promise.all([readOrg(), listPolicies()])
|
|
228
|
+
let ids
|
|
229
|
+
try { ids = groupIds(selectedGroups ?? legacyGroup) } catch (error) { throw fail(error.message) }
|
|
230
|
+
if (requireGroup) {
|
|
231
|
+
try { assertSandboxGroup(ids, await listGroups(), policies) } catch (error) { throw fail(error.message) }
|
|
232
|
+
}
|
|
233
|
+
const selected = await Promise.all(ids.map(findGroup))
|
|
234
|
+
if (selected.some((g) => !g)) throw fail('Unknown group.')
|
|
235
|
+
const pinned = [...new Set(selected.map((g) => g.template).filter(Boolean))]
|
|
236
|
+
if (pinned.length > 1) throw fail('These groups pin different base policies. Use groups with the same base policy.')
|
|
237
|
+
const base = systemBaseline ? BUILTIN_TEMPLATES[0] : await findTemplate(pinned[0] || templateId || 'locked-down')
|
|
238
|
+
if (!base) throw fail('Unknown policy template.')
|
|
239
|
+
let template
|
|
240
|
+
try { template = composeTemplate(base, accessTemplates, systemBaseline ? BUILTIN_TEMPLATES : await listTemplates()) } catch (error) { throw fail(error.message) }
|
|
241
|
+
assertNotBlocked(org, template.rules, 'Template')
|
|
242
|
+
const policy = templateToPolicy(template)
|
|
243
|
+
addAgentAccess(policy, agentRules, org)
|
|
244
|
+
Object.assign(policy.networkPolicies, managedRules(org, policies, { name, groups: ids, setups: Array.isArray(setups) ? setups.map(String) : [] }, openPorts(policy.networkPolicies)))
|
|
245
|
+
return {
|
|
246
|
+
policy,
|
|
247
|
+
template,
|
|
248
|
+
groups: ids,
|
|
249
|
+
labels: labelsForGroups(ids),
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Gateway settings take precedence over sandbox overrides, including old auto settings.
|
|
254
|
+
export async function enforcePolicyOnly(client) {
|
|
255
|
+
const current = await client.raw.getGatewayConfig({})
|
|
256
|
+
for (const [key, kind, value] of [
|
|
257
|
+
['proposal_approval_mode', 'stringValue', 'manual'],
|
|
258
|
+
['agent_policy_proposals_enabled', 'boolValue', false],
|
|
259
|
+
]) {
|
|
260
|
+
if (current.settings?.[key]?.value?.value === value) continue
|
|
261
|
+
await client.raw.updateConfig({ global: true, settingKey: key, settingValue: { value: { case: kind, value } }, requestId: randomUUID() })
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// The operations that bring one sandbox's managed rules in line with the
|
|
266
|
+
// stored policies. `extraPorts` are ports the same update is about to open.
|
|
267
|
+
async function managedOps(client, workspaceScope, sandbox, org, groups, policies, members, setupMembers, endpoint, extraPorts = []) {
|
|
268
|
+
const ids = groupsOf(sandbox, members, groups)
|
|
269
|
+
const status = await client.raw.getSandboxPolicyStatus({ sandbox: sandbox.name, workspaceScope })
|
|
270
|
+
const rules = status.revision?.policy?.networkPolicies ?? {}
|
|
271
|
+
const desired = managedRules(org, policies, { name: sandbox.name, groups: ids, setups: sandboxSetups(setupMembers, sandbox, endpoint) }, [...openPorts(rules), ...extraPorts])
|
|
272
|
+
const current = Object.keys(rules).filter(isManaged)
|
|
273
|
+
// Compare wire-normalized contents too: a failed update can leave the same
|
|
274
|
+
// rule name with stale destinations. Proto defaults must not cause churn.
|
|
275
|
+
const same = current.length === Object.keys(desired).length && current.every((k) => k in desired
|
|
276
|
+
&& equals(NetworkPolicyRuleSchema, create(NetworkPolicyRuleSchema, rules[k]), create(NetworkPolicyRuleSchema, desired[k])))
|
|
277
|
+
const ops = [
|
|
278
|
+
...current.map((ruleName) => ({ operation: { case: 'removeRule', value: { ruleName } } })),
|
|
279
|
+
...Object.entries(desired).map(([ruleName, rule]) => ({ operation: { case: 'addRule', value: { ruleName, rule } } })),
|
|
280
|
+
]
|
|
281
|
+
return { ops, same, groups: ids }
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// For a one-off rule edit that opens new ports: the managed rules recomputed
|
|
285
|
+
// with those ports, to go in the same update as the edit.
|
|
286
|
+
export async function managedOpsFor(client, workspaceScope, name, extraPorts, endpoint) {
|
|
287
|
+
const [org, groups, policies, members, setupMembers, sandbox] = await Promise.all([readOrg(), listGroups(), listPolicies(), readMembers(), readSetupMembers(), client.raw.getSandbox({ name, workspaceScope })])
|
|
288
|
+
return (await managedOps(client, workspaceScope, sandboxView(sandbox.sandbox), org, groups, policies, members, setupMembers, endpoint, extraPorts)).ops
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Rewrites the managed rules of one sandbox to match the stored policy. The
|
|
292
|
+
// sandbox's own rules are never touched.
|
|
293
|
+
async function syncOne(client, workspaceScope, sandbox, org, groups, policies, members, setupMembers, endpoint, { force = true } = {}) {
|
|
294
|
+
const { ops, same, groups: ids } = await managedOps(client, workspaceScope, sandbox, org, groups, policies, members, setupMembers, endpoint)
|
|
295
|
+
if (!force && same) return { changed: false }
|
|
296
|
+
let version = null
|
|
297
|
+
if (ops.length) {
|
|
298
|
+
const response = await client.raw.updateConfig({
|
|
299
|
+
sandbox: sandbox.name, workspaceScope, global: false, mergeOperations: ops,
|
|
300
|
+
annotations: { 'console.openshell/change': `org-sync:${ids.length ? `groups=${ids.join(',')}` : 'org'}` },
|
|
301
|
+
requestId: randomUUID(),
|
|
302
|
+
})
|
|
303
|
+
version = response.version
|
|
304
|
+
}
|
|
305
|
+
return { changed: true, version }
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
async function liveSandboxes(client, workspaceScope) {
|
|
309
|
+
const response = await client.raw.listSandboxes({ workspaceScope: workspaceScope })
|
|
310
|
+
return response.sandboxes.map(sandboxView).filter((s) => s.phase !== 'deleting')
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// `only` narrows the pass to the sandboxes a change can reach.
|
|
314
|
+
export function syncAll(options) {
|
|
315
|
+
return serializeOrgWrite(() => syncAllWhileLocked(options))
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Only callers already holding serializeOrgWrite may use this variant. A
|
|
319
|
+
// snapshot and its gateway effects must finish before another policy mutation.
|
|
320
|
+
export async function syncAllWhileLocked({ group: onlyGroup = null, only = null, force = true } = {}) {
|
|
321
|
+
const { client, target, workspaceScope } = await gateway()
|
|
322
|
+
const [org, groups, policies, members, setupMembers, live] = await Promise.all([readOrg(), listGroups(), listPolicies(), readMembers(), readSetupMembers(), liveSandboxes(client, workspaceScope)])
|
|
323
|
+
const sandboxes = live.map((s) => ({ ...s, groups: groupsOf(s, members, groups), setups: sandboxSetups(setupMembers, s, target?.endpoint) }))
|
|
324
|
+
const targets = sandboxes.filter((s) => (!onlyGroup || s.groups.includes(onlyGroup)) && (!only || only(s)))
|
|
325
|
+
const results = await Promise.all(targets.map(async (s) => {
|
|
326
|
+
try { return { sandbox: s.name, ...(await syncOne(client, workspaceScope, s, org, groups, policies, members, setupMembers, target?.endpoint, { force })) } } catch (error) { return { sandbox: s.name, error: error.rawMessage ?? error.message } }
|
|
327
|
+
}))
|
|
328
|
+
return {
|
|
329
|
+
applied: results.filter((r) => r.changed).map((r) => r.sandbox),
|
|
330
|
+
failed: results.filter((r) => r.error).map(({ sandbox, error }) => ({ sandbox, error })),
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Whether policy settles this request without a person, and why.
|
|
335
|
+
export function settledBy(org, group, hosts, sandbox = null, policies = [], setups = []) {
|
|
336
|
+
const hit = blockedBy(org, hosts)
|
|
337
|
+
if (hit) return `Blocked by organization policy (${hit.pattern}).`
|
|
338
|
+
const byPolicy = sandbox && blockedByPolicy(policies, { name: sandbox, groups: Array.isArray(group) ? group.map((g) => typeof g === 'string' ? g : g.id) : group?.id ? [group.id] : [], setups }, hosts, hostMatches)
|
|
339
|
+
if (byPolicy) return `Blocked by network rule "${byPolicy.policy.name}".`
|
|
340
|
+
if (effectiveOutside(org, group) === 'block') return 'No network rule allows it. Add one on the Network page to allow it.'
|
|
341
|
+
return null
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// Reconcile configured rules. Legacy proposals are rejected, never approved;
|
|
345
|
+
// historical grants to explicitly blocked hosts are revoked as before.
|
|
346
|
+
async function sweep(log) {
|
|
347
|
+
const { client, target, workspaceScope } = await gateway()
|
|
348
|
+
await enforcePolicyOnly(client)
|
|
349
|
+
const [org, groups, policies, members, sandboxes] = await Promise.all([readOrg(), listGroups(), listPolicies(), readMembers(), liveSandboxes(client, workspaceScope)])
|
|
350
|
+
for (const s of sandboxes) {
|
|
351
|
+
const group = groupsOf(s, members, groups)
|
|
352
|
+
// Read for each sandbox: a setup enabled during the pass adds its rule, and an older list would take it back out.
|
|
353
|
+
let setupMembers
|
|
354
|
+
try { setupMembers = await readSetupMembers() } catch { continue }
|
|
355
|
+
try {
|
|
356
|
+
const result = await syncOne(client, workspaceScope, s, org, groups, policies, members, setupMembers, target?.endpoint, { force: false })
|
|
357
|
+
if (result.changed) log(`applied organization policy to ${s.name}`)
|
|
358
|
+
} catch { /* retried next pass */ }
|
|
359
|
+
let draft
|
|
360
|
+
try { draft = await client.raw.getDraftPolicy({ sandbox: s.name, workspaceScope: workspaceScope }) } catch { continue }
|
|
361
|
+
for (const chunk of draft.chunks) {
|
|
362
|
+
const hosts = (chunk.proposedRule?.endpoints ?? []).map((e) => e.host)
|
|
363
|
+
const hit = blockedBy(org, hosts)
|
|
364
|
+
const reason = settledBy(org, group, hosts, s.name, policies, sandboxSetups(setupMembers, s, target?.endpoint))
|
|
365
|
+
const common = { sandbox: s.name, chunkId: chunk.id, workspaceScope, requestId: randomUUID() }
|
|
366
|
+
try {
|
|
367
|
+
if (chunk.status === 'pending' && reason) {
|
|
368
|
+
await client.raw.rejectDraftChunk({ ...common, reason })
|
|
369
|
+
log(`rejected ${hosts[0] ?? chunk.ruleName} for ${s.name}: ${reason}`)
|
|
370
|
+
} else if (chunk.status === 'approved' && hit) {
|
|
371
|
+
await client.raw.undoDraftChunk(common)
|
|
372
|
+
log(`revoked ${hit.host} for ${s.name}: blocked by organization`)
|
|
373
|
+
}
|
|
374
|
+
} catch { /* the chunk changed under us; next pass */ }
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export function startOrgSweeper(log) {
|
|
380
|
+
let running = false
|
|
381
|
+
const tick = async () => {
|
|
382
|
+
if (running) return
|
|
383
|
+
running = true
|
|
384
|
+
try { await runWithContext(contextSelection(), () => serializeOrgWrite(() => sweep(log))) } catch { /* gateway unreachable; next pass */ } finally { running = false }
|
|
385
|
+
}
|
|
386
|
+
tick()
|
|
387
|
+
const timer = setInterval(tick, 15000)
|
|
388
|
+
timer.unref?.()
|
|
389
|
+
return () => clearInterval(timer)
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// ---- routes -----------------------------------------------------------------
|
|
393
|
+
|
|
394
|
+
async function overview() {
|
|
395
|
+
const { client, target, workspaceScope } = await gateway()
|
|
396
|
+
const [org, groups, policies, stored, storedSetups, sandboxes] = await Promise.all([readOrg(), listGroups(), listPolicies(), readMembers(), readSetupMembers(), liveSandboxes(client, workspaceScope)])
|
|
397
|
+
const members = Object.fromEntries(groups.map((g) => [g.id, []]))
|
|
398
|
+
const assignments = {}
|
|
399
|
+
const ungrouped = []
|
|
400
|
+
// Sandbox name → setup ids, for the live sandboxes that use any.
|
|
401
|
+
const setupMembers = {}
|
|
402
|
+
for (const s of sandboxes) {
|
|
403
|
+
const ids = groupsOf(s, stored, groups)
|
|
404
|
+
assignments[s.name] = ids
|
|
405
|
+
for (const id of ids) members[id].push(s.name)
|
|
406
|
+
if (!ids.length) ungrouped.push(s.name)
|
|
407
|
+
const setups = sandboxSetups(storedSetups, s, target?.endpoint)
|
|
408
|
+
if (setups.length) setupMembers[s.name] = setups
|
|
409
|
+
}
|
|
410
|
+
return { org, groups, policies, members, assignments, ungrouped, setupMembers, total: sandboxes.length }
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// Replace, add, or remove memberships without overwriting unrelated groups.
|
|
414
|
+
async function setMembers(input) {
|
|
415
|
+
const assignments = await serializeOrgWrite(() => updateMembers(input))
|
|
416
|
+
return { assignments, ...(await syncAll({ only: (s) => s.name in assignments })) }
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
async function updateMembers(input) {
|
|
420
|
+
const names = [...new Set((Array.isArray(input.sandboxes) ? input.sandboxes : []).map(String))]
|
|
421
|
+
if (!names.length) throw fail('Pick at least one sandbox.')
|
|
422
|
+
for (const n of names) if (!SANDBOX_NAME.test(n)) throw fail(`"${n}" is not a sandbox name.`)
|
|
423
|
+
let requested
|
|
424
|
+
try { requested = groupIds(input.groups ?? input.group) } catch (error) { throw fail(error.message) }
|
|
425
|
+
const mode = input.mode ?? 'replace'
|
|
426
|
+
if (!['replace', 'add', 'remove'].includes(mode)) throw fail('Unknown membership operation.')
|
|
427
|
+
if (!requested.length) throw fail('Choose at least one group for this sandbox.')
|
|
428
|
+
const [groups, policies, stored] = await Promise.all([listGroups(), listPolicies(), readMembers()])
|
|
429
|
+
if (requested.some((id) => !groups.some((g) => g.id === id))) throw fail('Unknown group.')
|
|
430
|
+
const { client, workspaceScope } = await gateway()
|
|
431
|
+
const live = await liveSandboxes(client, workspaceScope)
|
|
432
|
+
// Validate every result before writing any membership in a bulk operation.
|
|
433
|
+
for (const name of names) {
|
|
434
|
+
const sandbox = live.find((s) => s.name === name)
|
|
435
|
+
if (!sandbox) throw fail(`Unknown sandbox "${name}".`)
|
|
436
|
+
const ids = changeGroups(groupsOf(sandbox, stored, groups), requested, mode)
|
|
437
|
+
try { assertSandboxGroup(ids, groups, policies) } catch (error) { throw fail(`${name}: ${error.message}`) }
|
|
438
|
+
stored[name] = ids
|
|
439
|
+
}
|
|
440
|
+
await write(await membersFile(), Object.fromEntries(Object.entries(stored).sort(([a], [b]) => a.localeCompare(b))))
|
|
441
|
+
return Object.fromEntries(names.map((name) => [name, stored[name]]))
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
async function saveOrg(input) {
|
|
445
|
+
const org = { blocked: validateBlocked(input.blocked), outside: 'block' }
|
|
446
|
+
await serializeOrgWrite(async () => {
|
|
447
|
+
assertCompatible(org, await listPolicies())
|
|
448
|
+
await write(path.join(await orgDirectory(), 'organization.json'), org)
|
|
449
|
+
})
|
|
450
|
+
return { org, ...(await syncAll()) }
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
async function saveGroup(input) {
|
|
454
|
+
const group = validateGroup(input)
|
|
455
|
+
await serializeOrgWrite(async () => {
|
|
456
|
+
if (input.isNew && (await findGroup(group.id))) throw fail(`A group with the id "${group.id}" already exists. Pick another name.`)
|
|
457
|
+
if (group.template && !(await findTemplate(group.template))) throw fail('Unknown policy template.')
|
|
458
|
+
await write(path.join(await groupDirectory(), `${group.id}.json`), group)
|
|
459
|
+
})
|
|
460
|
+
return { group, ...(await syncAll({ group: group.id })) }
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
async function savePolicy(input) {
|
|
464
|
+
const policy = validatePolicy(input)
|
|
465
|
+
const before = await serializeOrgWrite(() => writeCheckedPolicy(policy, input))
|
|
466
|
+
return { policy, ...(await syncAll({ only: covers([before, policy]) })) }
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
async function writeCheckedPolicy(policy, input) {
|
|
470
|
+
const [org, groups, policies] = await Promise.all([readOrg(), listGroups(), listPolicies()])
|
|
471
|
+
if (input.isNew && policies.some((p) => p.id === policy.id)) throw fail(`A policy with the id "${policy.id}" already exists. Pick another name.`)
|
|
472
|
+
const before = policies.find((p) => p.id === policy.id)
|
|
473
|
+
// A setup's policy stays the setup's, even when an edit leaves the scope out.
|
|
474
|
+
if (before && !input.isNew) {
|
|
475
|
+
if (!Array.isArray(input.appliesTo?.setups)) policy.appliesTo.setups = before.appliesTo.setups
|
|
476
|
+
if (input.setup == null && before.setup) policy.setup = before.setup
|
|
477
|
+
}
|
|
478
|
+
// Setup policies reach the sandboxes that use the setup; groups are optional.
|
|
479
|
+
const forSetup = policy.setup && policy.appliesTo.setups.length && !policy.appliesTo.everyone && !policy.appliesTo.sandboxes.length
|
|
480
|
+
try { if (!forSetup) assertPolicyGroup(policy, groups) } catch (error) { throw fail(error.message) }
|
|
481
|
+
await protectCoverage(policies, [...policies.filter((p) => p.id !== policy.id), policy])
|
|
482
|
+
const unknown = policy.appliesTo.groups.find((g) => !groups.some((x) => x.id === g))
|
|
483
|
+
if (unknown) throw fail(`Unknown group "${unknown}".`)
|
|
484
|
+
assertCompatible(org, [...policies.filter((p) => p.id !== policy.id), policy])
|
|
485
|
+
await writePolicy(policy)
|
|
486
|
+
return policies.find((p) => p.id === policy.id)
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export async function protectCoverage(before, after) {
|
|
490
|
+
const affected = [...new Set(before.flatMap((p) => p.appliesTo.groups))]
|
|
491
|
+
.filter((id) => !after.some((p) => !p.appliesTo.everyone && p.appliesTo.groups.includes(id)))
|
|
492
|
+
if (!affected.length) return
|
|
493
|
+
const { assignments } = await overview()
|
|
494
|
+
try { assertPolicyCoverage(before, after, Object.values(assignments)) } catch (error) { throw fail(error.message) }
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
async function deletePolicy(id) {
|
|
498
|
+
const before = await serializeOrgWrite(async () => {
|
|
499
|
+
const policies = await listPolicies()
|
|
500
|
+
await protectCoverage(policies, policies.filter((p) => p.id !== id))
|
|
501
|
+
await removePolicy(id)
|
|
502
|
+
return policies.find((p) => p.id === id)
|
|
503
|
+
})
|
|
504
|
+
return { ok: true, ...(await syncAll({ only: covers([before]) })) }
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// The sandboxes an old or new version of a policy applies to.
|
|
508
|
+
export const covers = (versions) => (s) => versions.some((p) => p && appliesTo(p, { name: s.name, groups: s.groups, setups: s.setups ?? [] }))
|
|
509
|
+
|
|
510
|
+
async function deleteGroup(id) {
|
|
511
|
+
if (!GROUP_ID.test(id)) throw fail('Unknown group.')
|
|
512
|
+
const { members } = await overview()
|
|
513
|
+
const left = members[id] ?? []
|
|
514
|
+
if (left.length) throw fail('Move this group’s sandboxes to another group before deleting it.')
|
|
515
|
+
if ((await listPolicies()).some((p) => p.appliesTo.groups.includes(id))) throw fail('Move or delete this group’s network rules before deleting it.')
|
|
516
|
+
await fs.rm(path.join(await groupDirectory(), `${id}.json`), { force: true })
|
|
517
|
+
return { ok: true, applied: [], failed: [] }
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export async function orgRoute(method, parts, input) {
|
|
521
|
+
const [area, a, b, c] = parts
|
|
522
|
+
if (area === 'egress' && method === 'POST' && a === 'policies') {
|
|
523
|
+
if (!b) return savePolicy(input)
|
|
524
|
+
if (c === 'delete') return deletePolicy(b)
|
|
525
|
+
return undefined
|
|
526
|
+
}
|
|
527
|
+
if (area !== 'org') return undefined
|
|
528
|
+
if (method === 'GET' && !a) return overview()
|
|
529
|
+
if (method !== 'POST') return undefined
|
|
530
|
+
if (!a) return saveOrg(input)
|
|
531
|
+
if (a === 'sync') return syncAll()
|
|
532
|
+
if (a === 'groups' && !b) return saveGroup(input)
|
|
533
|
+
if (a === 'members') return setMembers(input)
|
|
534
|
+
if (a === 'groups' && b && c === 'delete') return serializeOrgWrite(() => deleteGroup(b))
|
|
535
|
+
return undefined
|
|
536
|
+
}
|