@songtonyli/dsh-cli 0.1.15 → 0.1.16
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/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@bufbuild/protobuf/README.md +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +296 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +415 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +1037 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -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.js +131 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +157 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +292 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +469 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +954 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +437 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +625 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +188 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +726 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +37 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +334 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -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.js +27 -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.js +68 -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.js +892 -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.js +27 -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.js +126 -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.js +27 -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.js +27 -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.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +293 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +409 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +1029 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -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.js +128 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +152 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +284 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +464 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +948 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +433 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +620 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +184 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +721 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +325 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -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.js +24 -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.js +65 -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.js +888 -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.js +24 -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.js +123 -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.js +24 -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.js +24 -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.js +64 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
- package/node_modules/@bufbuild/protobuf/package.json +136 -0
- package/node_modules/@deepseek-ai/dsh-base/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-base/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-base/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +9 -3
- package/node_modules/@deepseek-ai/dsh-base/package.json +1 -0
- package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +61 -61
- package/node_modules/@deepseek-ai/dsh-client-ui-approval/lib/client.js +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +55 -55
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +182 -182
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +151 -151
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +74 -74
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +76 -76
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +39 -39
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +23 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +27 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +22 -22
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +115 -115
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +40 -40
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.zh.md +4 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +97 -87
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +35 -35
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +61 -61
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/README.md +6 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/README.zh.md +6 -5
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/lib/client.js +36 -35
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-unarchive-sessions/lib/client.js +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +41 -41
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/lib/client.js +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +68 -68
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.pdf.js +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +21 -21
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +24 -24
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.js +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/lib/client.terminal.js +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +19 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +38 -38
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +25 -25
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +70 -70
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +198 -198
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +50 -50
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +24 -24
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +81 -81
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/lib/client.js +25 -25
- package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-llm/README.md +2 -1
- package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +2 -1
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.i18n.yaml +6 -0
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.md +136 -0
- package/node_modules/@deepseek-ai/dsh-llm-cursor/README.zh.md +136 -0
- package/node_modules/@deepseek-ai/dsh-llm-cursor/lib/index.js +2511 -0
- package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +62 -0
- package/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +3 -3
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-web-app/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-web-app/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-web-app/README.zh.md +1 -1
- package/package.json +5 -1
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/queue-mirror.js +0 -61
- package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner-launch-UEJ3Ntqn.js +0 -1511
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export { fileDesc } from "../codegenv2/file.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export * from "../codegenv2/boot.js";
|
|
15
|
+
export * from "../codegenv2/embed.js";
|
|
16
|
+
export * from "./enum.js";
|
|
17
|
+
export * from "./extension.js";
|
|
18
|
+
export * from "./file.js";
|
|
19
|
+
export * from "./message.js";
|
|
20
|
+
export * from "./service.js";
|
|
21
|
+
export * from "./symbols.js";
|
|
22
|
+
export * from "../codegenv2/scalar.js";
|
|
23
|
+
export * from "./types.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
/**
|
|
15
|
+
* Hydrate a message descriptor.
|
|
16
|
+
*
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export function messageDesc(file, path, ...paths) {
|
|
20
|
+
return paths.reduce((acc, cur) => acc.nestedMessages[cur], file.messages[path]);
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
/**
|
|
15
|
+
* Hydrate a service descriptor.
|
|
16
|
+
*
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export function serviceDesc(file, path, ...paths) {
|
|
20
|
+
if (paths.length > 0) {
|
|
21
|
+
throw new Error();
|
|
22
|
+
}
|
|
23
|
+
return file.services[path];
|
|
24
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { symbols as symbolsV2, packageName as packageNameV1, wktPublicImportPaths as wktPublicImportPathsV2, } from "../codegenv2/symbols.js";
|
|
15
|
+
/**
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
export const packageName = packageNameV1;
|
|
19
|
+
/**
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
export const wktPublicImportPaths = wktPublicImportPathsV2;
|
|
23
|
+
/**
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
// biome-ignore format: want this to read well
|
|
27
|
+
export const symbols = Object.assign(Object.assign({}, symbolsV2), { codegen: {
|
|
28
|
+
boot: { typeOnly: false, bootstrapWktFrom: "../../codegenv1/boot.js", from: packageName + "/codegenv1" },
|
|
29
|
+
fileDesc: { typeOnly: false, bootstrapWktFrom: "../../codegenv1/file.js", from: packageName + "/codegenv1" },
|
|
30
|
+
enumDesc: { typeOnly: false, bootstrapWktFrom: "../../codegenv1/enum.js", from: packageName + "/codegenv1" },
|
|
31
|
+
extDesc: { typeOnly: false, bootstrapWktFrom: "../../codegenv1/extension.js", from: packageName + "/codegenv1" },
|
|
32
|
+
messageDesc: { typeOnly: false, bootstrapWktFrom: "../../codegenv1/message.js", from: packageName + "/codegenv1" },
|
|
33
|
+
serviceDesc: { typeOnly: false, bootstrapWktFrom: "../../codegenv1/service.js", from: packageName + "/codegenv1" },
|
|
34
|
+
tsEnum: { typeOnly: false, bootstrapWktFrom: "../../codegenv1/enum.js", from: packageName + "/codegenv1" },
|
|
35
|
+
GenFile: { typeOnly: true, bootstrapWktFrom: "../../codegenv1/types.js", from: packageName + "/codegenv1" },
|
|
36
|
+
GenEnum: { typeOnly: true, bootstrapWktFrom: "../../codegenv1/types.js", from: packageName + "/codegenv1" },
|
|
37
|
+
GenExtension: { typeOnly: true, bootstrapWktFrom: "../../codegenv1/types.js", from: packageName + "/codegenv1" },
|
|
38
|
+
GenMessage: { typeOnly: true, bootstrapWktFrom: "../../codegenv1/types.js", from: packageName + "/codegenv1" },
|
|
39
|
+
GenService: { typeOnly: true, bootstrapWktFrom: "../../codegenv1/types.js", from: packageName + "/codegenv1" },
|
|
40
|
+
} });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { restoreJsonNames } from "./restore-json-names.js";
|
|
15
|
+
import { createFileRegistry } from "../registry.js";
|
|
16
|
+
/**
|
|
17
|
+
* Hydrate a file descriptor for google/protobuf/descriptor.proto from a plain
|
|
18
|
+
* object.
|
|
19
|
+
*
|
|
20
|
+
* See createFileDescriptorProtoBoot() for details.
|
|
21
|
+
*
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export function boot(boot) {
|
|
25
|
+
const root = bootFileDescriptorProto(boot);
|
|
26
|
+
root.messageType.forEach(restoreJsonNames);
|
|
27
|
+
const reg = createFileRegistry(root, () => undefined);
|
|
28
|
+
// biome-ignore lint/style/noNonNullAssertion: non-null assertion because we just created the registry from the file we look up
|
|
29
|
+
return reg.getFile(root.name);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates the message google.protobuf.FileDescriptorProto from an object literal.
|
|
33
|
+
*
|
|
34
|
+
* See createFileDescriptorProtoBoot() for details.
|
|
35
|
+
*
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
export function bootFileDescriptorProto(init) {
|
|
39
|
+
const proto = Object.create({
|
|
40
|
+
syntax: "",
|
|
41
|
+
edition: 0,
|
|
42
|
+
});
|
|
43
|
+
return Object.assign(proto, Object.assign(Object.assign({ $typeName: "google.protobuf.FileDescriptorProto", dependency: [], publicDependency: [], weakDependency: [], optionDependency: [], service: [], extension: [] }, init), { messageType: init.messageType.map(bootDescriptorProto), enumType: init.enumType.map(bootEnumDescriptorProto) }));
|
|
44
|
+
}
|
|
45
|
+
function bootDescriptorProto(init) {
|
|
46
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
47
|
+
const proto = Object.create({
|
|
48
|
+
visibility: 0,
|
|
49
|
+
});
|
|
50
|
+
return Object.assign(proto, {
|
|
51
|
+
$typeName: "google.protobuf.DescriptorProto",
|
|
52
|
+
name: init.name,
|
|
53
|
+
field: (_b = (_a = init.field) === null || _a === void 0 ? void 0 : _a.map(bootFieldDescriptorProto)) !== null && _b !== void 0 ? _b : [],
|
|
54
|
+
extension: [],
|
|
55
|
+
nestedType: (_d = (_c = init.nestedType) === null || _c === void 0 ? void 0 : _c.map(bootDescriptorProto)) !== null && _d !== void 0 ? _d : [],
|
|
56
|
+
enumType: (_f = (_e = init.enumType) === null || _e === void 0 ? void 0 : _e.map(bootEnumDescriptorProto)) !== null && _f !== void 0 ? _f : [],
|
|
57
|
+
extensionRange: (_h = (_g = init.extensionRange) === null || _g === void 0 ? void 0 : _g.map((e) => (Object.assign({ $typeName: "google.protobuf.DescriptorProto.ExtensionRange" }, e)))) !== null && _h !== void 0 ? _h : [],
|
|
58
|
+
oneofDecl: [],
|
|
59
|
+
reservedRange: [],
|
|
60
|
+
reservedName: [],
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function bootFieldDescriptorProto(init) {
|
|
64
|
+
const proto = Object.create({
|
|
65
|
+
label: 1,
|
|
66
|
+
typeName: "",
|
|
67
|
+
extendee: "",
|
|
68
|
+
defaultValue: "",
|
|
69
|
+
oneofIndex: 0,
|
|
70
|
+
jsonName: "",
|
|
71
|
+
proto3Optional: false,
|
|
72
|
+
});
|
|
73
|
+
return Object.assign(proto, Object.assign(Object.assign({ $typeName: "google.protobuf.FieldDescriptorProto" }, init), { options: init.options ? bootFieldOptions(init.options) : undefined }));
|
|
74
|
+
}
|
|
75
|
+
function bootFieldOptions(init) {
|
|
76
|
+
var _a, _b, _c;
|
|
77
|
+
const proto = Object.create({
|
|
78
|
+
ctype: 0,
|
|
79
|
+
packed: false,
|
|
80
|
+
jstype: 0,
|
|
81
|
+
lazy: false,
|
|
82
|
+
unverifiedLazy: false,
|
|
83
|
+
deprecated: false,
|
|
84
|
+
weak: false,
|
|
85
|
+
debugRedact: false,
|
|
86
|
+
retention: 0,
|
|
87
|
+
});
|
|
88
|
+
return Object.assign(proto, Object.assign(Object.assign({ $typeName: "google.protobuf.FieldOptions" }, init), { targets: (_a = init.targets) !== null && _a !== void 0 ? _a : [], editionDefaults: (_c = (_b = init.editionDefaults) === null || _b === void 0 ? void 0 : _b.map((e) => (Object.assign({ $typeName: "google.protobuf.FieldOptions.EditionDefault" }, e)))) !== null && _c !== void 0 ? _c : [], uninterpretedOption: [] }));
|
|
89
|
+
}
|
|
90
|
+
function bootEnumDescriptorProto(init) {
|
|
91
|
+
const proto = Object.create({
|
|
92
|
+
visibility: 0,
|
|
93
|
+
});
|
|
94
|
+
return Object.assign(proto, {
|
|
95
|
+
$typeName: "google.protobuf.EnumDescriptorProto",
|
|
96
|
+
name: init.name,
|
|
97
|
+
reservedName: [],
|
|
98
|
+
reservedRange: [],
|
|
99
|
+
value: init.value.map((e) => (Object.assign({ $typeName: "google.protobuf.EnumValueDescriptorProto" }, e))),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { protoCamelCase } from "../reflect/names.js";
|
|
15
|
+
import { isFieldSet, clearField } from "../fields.js";
|
|
16
|
+
import { base64Encode } from "../wire/base64-encoding.js";
|
|
17
|
+
import { toBinary } from "../to-binary.js";
|
|
18
|
+
import { clone } from "../clone.js";
|
|
19
|
+
import { Edition, FieldDescriptorProtoSchema, FieldOptionsSchema, FileDescriptorProtoSchema, DescriptorProtoSchema, EnumDescriptorProtoSchema, } from "../wkt/gen/google/protobuf/descriptor_pb.js";
|
|
20
|
+
/**
|
|
21
|
+
* Create necessary information to embed a file descriptor in
|
|
22
|
+
* generated code.
|
|
23
|
+
*
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
export function embedFileDesc(file) {
|
|
27
|
+
const embed = {
|
|
28
|
+
bootable: false,
|
|
29
|
+
proto() {
|
|
30
|
+
const stripped = clone(FileDescriptorProtoSchema, file);
|
|
31
|
+
clearField(stripped, FileDescriptorProtoSchema.field.dependency);
|
|
32
|
+
clearField(stripped, FileDescriptorProtoSchema.field.sourceCodeInfo);
|
|
33
|
+
stripped.messageType.map(stripJsonNames);
|
|
34
|
+
return stripped;
|
|
35
|
+
},
|
|
36
|
+
base64() {
|
|
37
|
+
const bytes = toBinary(FileDescriptorProtoSchema, this.proto());
|
|
38
|
+
return base64Encode(bytes, "std_raw");
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
return file.name == "google/protobuf/descriptor.proto"
|
|
42
|
+
? Object.assign(Object.assign({}, embed), { bootable: true, boot() {
|
|
43
|
+
return createFileDescriptorProtoBoot(this.proto());
|
|
44
|
+
} }) : embed;
|
|
45
|
+
}
|
|
46
|
+
function stripJsonNames(d) {
|
|
47
|
+
for (const f of d.field) {
|
|
48
|
+
if (f.jsonName === protoCamelCase(f.name)) {
|
|
49
|
+
clearField(f, FieldDescriptorProtoSchema.field.jsonName);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
for (const n of d.nestedType) {
|
|
53
|
+
stripJsonNames(n);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Compute the path to a message, enumeration, extension, or service in a
|
|
58
|
+
* file descriptor.
|
|
59
|
+
*
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
export function pathInFileDesc(desc) {
|
|
63
|
+
if (desc.kind == "service") {
|
|
64
|
+
return [desc.file.services.indexOf(desc)];
|
|
65
|
+
}
|
|
66
|
+
const parent = desc.parent;
|
|
67
|
+
if (parent == undefined) {
|
|
68
|
+
switch (desc.kind) {
|
|
69
|
+
case "enum":
|
|
70
|
+
return [desc.file.enums.indexOf(desc)];
|
|
71
|
+
case "message":
|
|
72
|
+
return [desc.file.messages.indexOf(desc)];
|
|
73
|
+
case "extension":
|
|
74
|
+
return [desc.file.extensions.indexOf(desc)];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function findPath(cur) {
|
|
78
|
+
const nested = [];
|
|
79
|
+
for (let parent = cur.parent; parent;) {
|
|
80
|
+
const idx = parent.nestedMessages.indexOf(cur);
|
|
81
|
+
nested.unshift(idx);
|
|
82
|
+
cur = parent;
|
|
83
|
+
parent = cur.parent;
|
|
84
|
+
}
|
|
85
|
+
nested.unshift(cur.file.messages.indexOf(cur));
|
|
86
|
+
return nested;
|
|
87
|
+
}
|
|
88
|
+
const path = findPath(parent);
|
|
89
|
+
switch (desc.kind) {
|
|
90
|
+
case "extension":
|
|
91
|
+
return [...path, parent.nestedExtensions.indexOf(desc)];
|
|
92
|
+
case "message":
|
|
93
|
+
return [...path, parent.nestedMessages.indexOf(desc)];
|
|
94
|
+
case "enum":
|
|
95
|
+
return [...path, parent.nestedEnums.indexOf(desc)];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The file descriptor for google/protobuf/descriptor.proto cannot be embedded
|
|
100
|
+
* in serialized form, since it is required to parse itself.
|
|
101
|
+
*
|
|
102
|
+
* This function takes an instance of the message, and returns a plain object
|
|
103
|
+
* that can be hydrated to the message again via bootFileDescriptorProto().
|
|
104
|
+
*
|
|
105
|
+
* This function only works with a message google.protobuf.FileDescriptorProto
|
|
106
|
+
* for google/protobuf/descriptor.proto, and only supports features that are
|
|
107
|
+
* relevant for the specific use case. For example, it discards file options,
|
|
108
|
+
* reserved ranges and reserved names, and field options that are unused in
|
|
109
|
+
* descriptor.proto.
|
|
110
|
+
*
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
export function createFileDescriptorProtoBoot(proto) {
|
|
114
|
+
var _a;
|
|
115
|
+
assert(proto.name == "google/protobuf/descriptor.proto");
|
|
116
|
+
assert(proto.package == "google.protobuf");
|
|
117
|
+
assert(!proto.dependency.length);
|
|
118
|
+
assert(!proto.publicDependency.length);
|
|
119
|
+
assert(!proto.weakDependency.length);
|
|
120
|
+
assert(!proto.optionDependency.length);
|
|
121
|
+
assert(!proto.service.length);
|
|
122
|
+
assert(!proto.extension.length);
|
|
123
|
+
assert(proto.sourceCodeInfo === undefined);
|
|
124
|
+
assert(proto.syntax == "" || proto.syntax == "proto2");
|
|
125
|
+
assert(!((_a = proto.options) === null || _a === void 0 ? void 0 : _a.features)); // we're dropping file options
|
|
126
|
+
assert(proto.edition === Edition.EDITION_UNKNOWN);
|
|
127
|
+
return {
|
|
128
|
+
name: proto.name,
|
|
129
|
+
package: proto.package,
|
|
130
|
+
messageType: proto.messageType.map(createDescriptorBoot),
|
|
131
|
+
enumType: proto.enumType.map(createEnumDescriptorBoot),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function createDescriptorBoot(proto) {
|
|
135
|
+
assert(proto.extension.length == 0);
|
|
136
|
+
assert(!proto.oneofDecl.length);
|
|
137
|
+
assert(!proto.options);
|
|
138
|
+
assert(!isFieldSet(proto, DescriptorProtoSchema.field.visibility));
|
|
139
|
+
const b = {
|
|
140
|
+
name: proto.name,
|
|
141
|
+
};
|
|
142
|
+
if (proto.field.length) {
|
|
143
|
+
b.field = proto.field.map(createFieldDescriptorBoot);
|
|
144
|
+
}
|
|
145
|
+
if (proto.nestedType.length) {
|
|
146
|
+
b.nestedType = proto.nestedType.map(createDescriptorBoot);
|
|
147
|
+
}
|
|
148
|
+
if (proto.enumType.length) {
|
|
149
|
+
b.enumType = proto.enumType.map(createEnumDescriptorBoot);
|
|
150
|
+
}
|
|
151
|
+
if (proto.extensionRange.length) {
|
|
152
|
+
b.extensionRange = proto.extensionRange.map((r) => {
|
|
153
|
+
assert(!r.options);
|
|
154
|
+
return { start: r.start, end: r.end };
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return b;
|
|
158
|
+
}
|
|
159
|
+
function createFieldDescriptorBoot(proto) {
|
|
160
|
+
assert(isFieldSet(proto, FieldDescriptorProtoSchema.field.name));
|
|
161
|
+
assert(isFieldSet(proto, FieldDescriptorProtoSchema.field.number));
|
|
162
|
+
assert(isFieldSet(proto, FieldDescriptorProtoSchema.field.type));
|
|
163
|
+
assert(!isFieldSet(proto, FieldDescriptorProtoSchema.field.oneofIndex));
|
|
164
|
+
assert(!isFieldSet(proto, FieldDescriptorProtoSchema.field.jsonName) ||
|
|
165
|
+
proto.jsonName === protoCamelCase(proto.name));
|
|
166
|
+
const b = {
|
|
167
|
+
name: proto.name,
|
|
168
|
+
number: proto.number,
|
|
169
|
+
type: proto.type,
|
|
170
|
+
};
|
|
171
|
+
if (isFieldSet(proto, FieldDescriptorProtoSchema.field.label)) {
|
|
172
|
+
b.label = proto.label;
|
|
173
|
+
}
|
|
174
|
+
if (isFieldSet(proto, FieldDescriptorProtoSchema.field.typeName)) {
|
|
175
|
+
b.typeName = proto.typeName;
|
|
176
|
+
}
|
|
177
|
+
if (isFieldSet(proto, FieldDescriptorProtoSchema.field.extendee)) {
|
|
178
|
+
b.extendee = proto.extendee;
|
|
179
|
+
}
|
|
180
|
+
if (isFieldSet(proto, FieldDescriptorProtoSchema.field.defaultValue)) {
|
|
181
|
+
b.defaultValue = proto.defaultValue;
|
|
182
|
+
}
|
|
183
|
+
if (proto.options) {
|
|
184
|
+
b.options = createFieldOptionsBoot(proto.options);
|
|
185
|
+
}
|
|
186
|
+
return b;
|
|
187
|
+
}
|
|
188
|
+
function createFieldOptionsBoot(proto) {
|
|
189
|
+
const b = {};
|
|
190
|
+
assert(!isFieldSet(proto, FieldOptionsSchema.field.ctype));
|
|
191
|
+
if (isFieldSet(proto, FieldOptionsSchema.field.packed)) {
|
|
192
|
+
b.packed = proto.packed;
|
|
193
|
+
}
|
|
194
|
+
assert(!isFieldSet(proto, FieldOptionsSchema.field.jstype));
|
|
195
|
+
assert(!isFieldSet(proto, FieldOptionsSchema.field.lazy));
|
|
196
|
+
assert(!isFieldSet(proto, FieldOptionsSchema.field.unverifiedLazy));
|
|
197
|
+
if (isFieldSet(proto, FieldOptionsSchema.field.deprecated)) {
|
|
198
|
+
b.deprecated = proto.deprecated;
|
|
199
|
+
}
|
|
200
|
+
assert(!isFieldSet(proto, FieldOptionsSchema.field.weak));
|
|
201
|
+
assert(!isFieldSet(proto, FieldOptionsSchema.field.debugRedact));
|
|
202
|
+
if (isFieldSet(proto, FieldOptionsSchema.field.retention)) {
|
|
203
|
+
b.retention = proto.retention;
|
|
204
|
+
}
|
|
205
|
+
if (proto.targets.length) {
|
|
206
|
+
b.targets = proto.targets;
|
|
207
|
+
}
|
|
208
|
+
if (proto.editionDefaults.length) {
|
|
209
|
+
b.editionDefaults = proto.editionDefaults.map((d) => ({
|
|
210
|
+
value: d.value,
|
|
211
|
+
edition: d.edition,
|
|
212
|
+
}));
|
|
213
|
+
}
|
|
214
|
+
assert(!isFieldSet(proto, FieldOptionsSchema.field.features));
|
|
215
|
+
assert(!isFieldSet(proto, FieldOptionsSchema.field.uninterpretedOption));
|
|
216
|
+
return b;
|
|
217
|
+
}
|
|
218
|
+
function createEnumDescriptorBoot(proto) {
|
|
219
|
+
assert(!proto.options);
|
|
220
|
+
assert(!isFieldSet(proto, EnumDescriptorProtoSchema.field.visibility));
|
|
221
|
+
return {
|
|
222
|
+
name: proto.name,
|
|
223
|
+
value: proto.value.map((v) => {
|
|
224
|
+
assert(!v.options);
|
|
225
|
+
return {
|
|
226
|
+
name: v.name,
|
|
227
|
+
number: v.number,
|
|
228
|
+
};
|
|
229
|
+
}),
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Assert that condition is truthy or throw error.
|
|
234
|
+
*/
|
|
235
|
+
function assert(condition) {
|
|
236
|
+
if (!condition) {
|
|
237
|
+
throw new Error();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
/**
|
|
15
|
+
* Hydrate an enum descriptor.
|
|
16
|
+
*
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export function enumDesc(file, path, ...paths) {
|
|
20
|
+
if (paths.length == 0) {
|
|
21
|
+
return file.enums[path];
|
|
22
|
+
}
|
|
23
|
+
const e = paths.pop(); // we checked length above
|
|
24
|
+
return paths.reduce((acc, cur) => acc.nestedMessages[cur], file.messages[path]).nestedEnums[e];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Construct a TypeScript enum object at runtime from a descriptor.
|
|
28
|
+
*
|
|
29
|
+
* The returned object is identical to a transpiled TS enum and includes the
|
|
30
|
+
* reverse mapping, see https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings
|
|
31
|
+
*/
|
|
32
|
+
export function tsEnum(desc) {
|
|
33
|
+
const enumObject = {};
|
|
34
|
+
for (const value of desc.values) {
|
|
35
|
+
enumObject[value.localName] = value.number;
|
|
36
|
+
enumObject[value.number] = value.localName;
|
|
37
|
+
}
|
|
38
|
+
return enumObject;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Construct an object enum at runtime from a descriptor.
|
|
42
|
+
*
|
|
43
|
+
* The returned object is a record of enum value name to integer value. It's
|
|
44
|
+
* a subset of transpiled TS enums - it does not include the reverse mapping,
|
|
45
|
+
* and only supports lookup by value name.
|
|
46
|
+
*/
|
|
47
|
+
export function objEnum(desc) {
|
|
48
|
+
const enumObject = {};
|
|
49
|
+
for (const value of desc.values) {
|
|
50
|
+
enumObject[value.localName] = value.number;
|
|
51
|
+
}
|
|
52
|
+
return enumObject;
|
|
53
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
/**
|
|
15
|
+
* Hydrate an extension descriptor.
|
|
16
|
+
*
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export function extDesc(file, path, ...paths) {
|
|
20
|
+
if (paths.length == 0) {
|
|
21
|
+
return file.extensions[path];
|
|
22
|
+
}
|
|
23
|
+
const e = paths.pop(); // we checked length above
|
|
24
|
+
return paths.reduce((acc, cur) => acc.nestedMessages[cur], file.messages[path]).nestedExtensions[e];
|
|
25
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { base64Decode } from "../wire/base64-encoding.js";
|
|
15
|
+
import { FileDescriptorProtoSchema } from "../wkt/gen/google/protobuf/descriptor_pb.js";
|
|
16
|
+
import { createFileRegistry } from "../registry.js";
|
|
17
|
+
import { restoreJsonNames } from "./restore-json-names.js";
|
|
18
|
+
import { fromBinary } from "../from-binary.js";
|
|
19
|
+
/**
|
|
20
|
+
* Hydrate a file descriptor.
|
|
21
|
+
*
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export function fileDesc(b64, imports) {
|
|
25
|
+
var _a;
|
|
26
|
+
const root = fromBinary(FileDescriptorProtoSchema, base64Decode(b64));
|
|
27
|
+
root.messageType.forEach(restoreJsonNames);
|
|
28
|
+
root.dependency = (_a = imports === null || imports === void 0 ? void 0 : imports.map((f) => f.proto.name)) !== null && _a !== void 0 ? _a : [];
|
|
29
|
+
const reg = createFileRegistry(root, (protoFileName) => imports === null || imports === void 0 ? void 0 : imports.find((f) => f.proto.name === protoFileName));
|
|
30
|
+
// biome-ignore lint/style/noNonNullAssertion: non-null assertion because we just created the registry from the file we look up
|
|
31
|
+
return reg.getFile(root.name);
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
export * from "./boot.js";
|
|
15
|
+
export * from "./embed.js";
|
|
16
|
+
export * from "./enum.js";
|
|
17
|
+
export * from "./extension.js";
|
|
18
|
+
export * from "./file.js";
|
|
19
|
+
export * from "./message.js";
|
|
20
|
+
export * from "./service.js";
|
|
21
|
+
export * from "./symbols.js";
|
|
22
|
+
export * from "./scalar.js";
|
|
23
|
+
export * from "./types.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
/**
|
|
15
|
+
* Hydrate a message descriptor.
|
|
16
|
+
*
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export function messageDesc(file, path, ...paths) {
|
|
20
|
+
return paths.reduce((acc, cur) => acc.nestedMessages[cur], file.messages[path]);
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { protoCamelCase } from "../reflect/names.js";
|
|
15
|
+
import { unsafeIsSetExplicit } from "../reflect/unsafe.js";
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export function restoreJsonNames(message) {
|
|
20
|
+
for (const f of message.field) {
|
|
21
|
+
if (!unsafeIsSetExplicit(f, "jsonName")) {
|
|
22
|
+
f.jsonName = protoCamelCase(f.name);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
message.nestedType.forEach(restoreJsonNames);
|
|
26
|
+
}
|