@songtonyli/dsh-cli 0.1.14 → 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-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 +14 -12
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +14 -12
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +508 -74
- 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,296 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.create = create;
|
|
17
|
+
const is_message_js_1 = require("./is-message.js");
|
|
18
|
+
const descriptors_js_1 = require("./descriptors.js");
|
|
19
|
+
const scalar_js_1 = require("./reflect/scalar.js");
|
|
20
|
+
const guard_js_1 = require("./reflect/guard.js");
|
|
21
|
+
const wrappers_js_1 = require("./wkt/wrappers.js");
|
|
22
|
+
// bootstrap-inject google.protobuf.Edition.EDITION_PROTO3: const $name = $number;
|
|
23
|
+
const EDITION_PROTO3 = 999;
|
|
24
|
+
// bootstrap-inject google.protobuf.Edition.EDITION_PROTO2: const $name = $number;
|
|
25
|
+
const EDITION_PROTO2 = 998;
|
|
26
|
+
// bootstrap-inject google.protobuf.FeatureSet.FieldPresence.IMPLICIT: const $name = $number;
|
|
27
|
+
const IMPLICIT = 2;
|
|
28
|
+
/**
|
|
29
|
+
* Create a new message instance.
|
|
30
|
+
*
|
|
31
|
+
* The second argument is an optional initializer object, where all fields are
|
|
32
|
+
* optional.
|
|
33
|
+
*/
|
|
34
|
+
function create(schema, init) {
|
|
35
|
+
if ((0, is_message_js_1.isMessage)(init, schema)) {
|
|
36
|
+
return init;
|
|
37
|
+
}
|
|
38
|
+
return compiledCreate(schema)(init);
|
|
39
|
+
}
|
|
40
|
+
const compiledCreates = new WeakMap();
|
|
41
|
+
/**
|
|
42
|
+
* Return the compiled create function for a message, compiling it on first use. */
|
|
43
|
+
function compiledCreate(desc) {
|
|
44
|
+
let compiled = compiledCreates.get(desc);
|
|
45
|
+
if (compiled === undefined) {
|
|
46
|
+
compiled = compileCreate(desc);
|
|
47
|
+
compiledCreates.set(desc, compiled);
|
|
48
|
+
}
|
|
49
|
+
return compiled;
|
|
50
|
+
}
|
|
51
|
+
/** Singular field: scalar, enum, or message. */
|
|
52
|
+
const INIT_SINGULAR = 0;
|
|
53
|
+
/** List field: a zero message has a fresh empty array. */
|
|
54
|
+
const INIT_LIST = 1;
|
|
55
|
+
/** Map field: a zero message has a fresh empty object. */
|
|
56
|
+
const INIT_MAP = 2;
|
|
57
|
+
/** Oneof group: the ADT is always stored, cases convert by case name. */
|
|
58
|
+
const INIT_ONEOF = 3;
|
|
59
|
+
/* Compile the create function for this message type. */
|
|
60
|
+
function compileCreate(desc) {
|
|
61
|
+
const typeName = desc.typeName;
|
|
62
|
+
const { properties, prototype } = compileInitMessage(desc);
|
|
63
|
+
return (init) => {
|
|
64
|
+
let message;
|
|
65
|
+
if (prototype !== undefined) {
|
|
66
|
+
message = Object.create(prototype);
|
|
67
|
+
message.$typeName = typeName;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
message = { $typeName: typeName };
|
|
71
|
+
}
|
|
72
|
+
for (let i = 0; i < properties.length; i++) {
|
|
73
|
+
const property = properties[i];
|
|
74
|
+
const name = property.name;
|
|
75
|
+
const initValue = init === null || init === void 0 ? void 0 : init[name];
|
|
76
|
+
switch (property.kind) {
|
|
77
|
+
case INIT_SINGULAR:
|
|
78
|
+
if (initValue != null) {
|
|
79
|
+
message[name] =
|
|
80
|
+
property.convert !== undefined
|
|
81
|
+
? property.convert(initValue)
|
|
82
|
+
: initValue;
|
|
83
|
+
}
|
|
84
|
+
else if (property.constant !== undefined) {
|
|
85
|
+
message[name] = property.constant;
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
case INIT_LIST:
|
|
89
|
+
message[name] =
|
|
90
|
+
property.convert !== undefined && Array.isArray(initValue)
|
|
91
|
+
? initValue.map(property.convert)
|
|
92
|
+
: (initValue !== null && initValue !== void 0 ? initValue : []);
|
|
93
|
+
break;
|
|
94
|
+
case INIT_MAP:
|
|
95
|
+
// Object.create(null) would be desirable for the fresh map, but is
|
|
96
|
+
// unsupported by React:
|
|
97
|
+
// https://react.dev/reference/react/use-server#serializable-parameters-and-return-values
|
|
98
|
+
if (property.convert === undefined || !(0, guard_js_1.isObject)(initValue)) {
|
|
99
|
+
message[name] = initValue !== null && initValue !== void 0 ? initValue : {};
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
const converted = {};
|
|
103
|
+
const keys = Object.keys(initValue);
|
|
104
|
+
for (let k = 0; k < keys.length; k++) {
|
|
105
|
+
converted[keys[k]] = property.convert(initValue[keys[k]]);
|
|
106
|
+
}
|
|
107
|
+
message[name] = converted;
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
case INIT_ONEOF: {
|
|
111
|
+
const oneofValue = initValue;
|
|
112
|
+
if ((oneofValue === null || oneofValue === void 0 ? void 0 : oneofValue.case) != null) {
|
|
113
|
+
const convert = property.convert.get(oneofValue.case);
|
|
114
|
+
if (convert !== undefined) {
|
|
115
|
+
message[name] = {
|
|
116
|
+
case: oneofValue.case,
|
|
117
|
+
value: convert(oneofValue.value),
|
|
118
|
+
};
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
message[name] = { case: undefined };
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return message;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Classify every member once, so that creating a message is a walk over a
|
|
132
|
+
* compact list instead of a walk over the descriptor.
|
|
133
|
+
*/
|
|
134
|
+
function compileInitMessage(desc) {
|
|
135
|
+
var _a, _b;
|
|
136
|
+
const properties = [];
|
|
137
|
+
const prototype = {};
|
|
138
|
+
const usePrototype = needsPrototypeChain(desc);
|
|
139
|
+
for (const member of desc.members) {
|
|
140
|
+
const name = member.localName;
|
|
141
|
+
if (member.kind == "oneof") {
|
|
142
|
+
properties.push({
|
|
143
|
+
name,
|
|
144
|
+
kind: INIT_ONEOF,
|
|
145
|
+
constant: undefined,
|
|
146
|
+
convert: compileConvertOneof(member),
|
|
147
|
+
});
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
switch (member.fieldKind) {
|
|
151
|
+
case "message": {
|
|
152
|
+
// Singular message fields are absent from a zero message.
|
|
153
|
+
properties.push({
|
|
154
|
+
name,
|
|
155
|
+
kind: INIT_SINGULAR,
|
|
156
|
+
constant: undefined,
|
|
157
|
+
convert: compileConvertMessage(member),
|
|
158
|
+
});
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
case "list": {
|
|
162
|
+
properties.push({
|
|
163
|
+
name,
|
|
164
|
+
kind: INIT_LIST,
|
|
165
|
+
constant: undefined,
|
|
166
|
+
convert: member.listKind == "message"
|
|
167
|
+
? ((_a = compileConvertMessage(member)) !== null && _a !== void 0 ? _a : ((value) => value))
|
|
168
|
+
: member.scalar == descriptors_js_1.ScalarType.BYTES
|
|
169
|
+
? toU8Arr
|
|
170
|
+
: undefined,
|
|
171
|
+
});
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
case "map": {
|
|
175
|
+
properties.push({
|
|
176
|
+
name,
|
|
177
|
+
kind: INIT_MAP,
|
|
178
|
+
constant: undefined,
|
|
179
|
+
convert: member.mapKind == "message"
|
|
180
|
+
? ((_b = compileConvertMessage(member)) !== null && _b !== void 0 ? _b : ((value) => value))
|
|
181
|
+
: member.scalar == descriptors_js_1.ScalarType.BYTES
|
|
182
|
+
? toU8Arr
|
|
183
|
+
: undefined,
|
|
184
|
+
});
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
default: {
|
|
188
|
+
const zeroValue = createZeroValue(member);
|
|
189
|
+
properties.push({
|
|
190
|
+
name,
|
|
191
|
+
kind: INIT_SINGULAR,
|
|
192
|
+
constant: member.presence == IMPLICIT ? zeroValue : undefined,
|
|
193
|
+
convert: member.fieldKind == "scalar" && member.scalar == descriptors_js_1.ScalarType.BYTES
|
|
194
|
+
? toU8Arr
|
|
195
|
+
: undefined,
|
|
196
|
+
});
|
|
197
|
+
if (usePrototype) {
|
|
198
|
+
prototype[name] = zeroValue;
|
|
199
|
+
}
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
properties,
|
|
206
|
+
prototype: usePrototype ? prototype : undefined,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Compile the conversion of each case of a oneof group, keyed by case name.
|
|
211
|
+
*/
|
|
212
|
+
function compileConvertOneof(oneof) {
|
|
213
|
+
const converters = new Map();
|
|
214
|
+
for (const field of oneof.fields) {
|
|
215
|
+
let convert;
|
|
216
|
+
if (field.fieldKind == "message") {
|
|
217
|
+
convert = compileConvertMessage(field);
|
|
218
|
+
}
|
|
219
|
+
else if (field.fieldKind == "scalar" &&
|
|
220
|
+
field.scalar == descriptors_js_1.ScalarType.BYTES) {
|
|
221
|
+
convert = toU8Arr;
|
|
222
|
+
}
|
|
223
|
+
converters.set(field.localName, convert !== null && convert !== void 0 ? convert : ((value) => value));
|
|
224
|
+
}
|
|
225
|
+
return converters;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Compile the conversion of an init value for a message field, a message
|
|
229
|
+
* list item, or a message map value. Returns undefined if values are used
|
|
230
|
+
* as-is.
|
|
231
|
+
*/
|
|
232
|
+
function compileConvertMessage(field) {
|
|
233
|
+
if (field.fieldKind == "message" &&
|
|
234
|
+
!field.oneof &&
|
|
235
|
+
(0, wrappers_js_1.isWrapperDesc)(field.message)) {
|
|
236
|
+
// Types from google/protobuf/wrappers.proto are unwrapped when used in
|
|
237
|
+
// a singular field that is not part of a oneof group.
|
|
238
|
+
return field.message.fields[0].scalar == descriptors_js_1.ScalarType.BYTES
|
|
239
|
+
? toU8Arr
|
|
240
|
+
: undefined;
|
|
241
|
+
}
|
|
242
|
+
if (field.message.typeName == "google.protobuf.Struct" &&
|
|
243
|
+
field.parent.typeName !== "google.protobuf.Value") {
|
|
244
|
+
// google.protobuf.Struct is represented with JsonObject when used in a
|
|
245
|
+
// field, except when used in google.protobuf.Value.
|
|
246
|
+
return undefined;
|
|
247
|
+
}
|
|
248
|
+
const messageDesc = field.message;
|
|
249
|
+
// Resolved on first use, not here: the message type can be this very field's
|
|
250
|
+
// parent, whose create function is still being compiled.
|
|
251
|
+
let compiled;
|
|
252
|
+
return (value) => {
|
|
253
|
+
if (!(0, guard_js_1.isObject)(value) || (0, is_message_js_1.isMessage)(value, messageDesc)) {
|
|
254
|
+
return value;
|
|
255
|
+
}
|
|
256
|
+
compiled !== null && compiled !== void 0 ? compiled : (compiled = compiledCreate(messageDesc));
|
|
257
|
+
return compiled(value);
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
// converts any ArrayLike<number> to Uint8Array if necessary.
|
|
261
|
+
function toU8Arr(value) {
|
|
262
|
+
return Array.isArray(value) ? new Uint8Array(value) : value;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Do we need the prototype chain to track field presence?
|
|
266
|
+
*/
|
|
267
|
+
function needsPrototypeChain(desc) {
|
|
268
|
+
switch (desc.file.edition) {
|
|
269
|
+
case EDITION_PROTO3:
|
|
270
|
+
// proto3 always uses implicit presence, we never need the prototype chain.
|
|
271
|
+
return false;
|
|
272
|
+
case EDITION_PROTO2:
|
|
273
|
+
// proto2 never uses implicit presence, we always need the prototype chain.
|
|
274
|
+
return true;
|
|
275
|
+
default:
|
|
276
|
+
// If a message uses scalar or enum fields with explicit presence, we need
|
|
277
|
+
// the prototype chain to track presence. This rule does not apply to fields
|
|
278
|
+
// in a oneof group - they use a different mechanism to track presence.
|
|
279
|
+
return desc.fields.some((f) => f.presence != IMPLICIT && f.fieldKind != "message" && !f.oneof);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Returns the zero value for a scalar or enum field. Scalar and enum fields
|
|
284
|
+
* can have default values.
|
|
285
|
+
*/
|
|
286
|
+
function createZeroValue(field) {
|
|
287
|
+
const defaultValue = field.getDefaultValue();
|
|
288
|
+
if (defaultValue !== undefined) {
|
|
289
|
+
return field.fieldKind == "scalar" && field.longAsString
|
|
290
|
+
? defaultValue.toString()
|
|
291
|
+
: defaultValue;
|
|
292
|
+
}
|
|
293
|
+
return field.fieldKind == "scalar"
|
|
294
|
+
? (0, scalar_js_1.scalarZeroValue)(field.scalar, field.longAsString)
|
|
295
|
+
: field.enum.values[0].number;
|
|
296
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ScalarType = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Scalar value types. This is a subset of field types declared by protobuf
|
|
19
|
+
* enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE
|
|
20
|
+
* are omitted, but the numerical values are identical.
|
|
21
|
+
*/
|
|
22
|
+
var ScalarType;
|
|
23
|
+
(function (ScalarType) {
|
|
24
|
+
// 0 is reserved for errors.
|
|
25
|
+
// Order is weird for historical reasons.
|
|
26
|
+
ScalarType[ScalarType["DOUBLE"] = 1] = "DOUBLE";
|
|
27
|
+
ScalarType[ScalarType["FLOAT"] = 2] = "FLOAT";
|
|
28
|
+
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
|
|
29
|
+
// negative values are likely.
|
|
30
|
+
ScalarType[ScalarType["INT64"] = 3] = "INT64";
|
|
31
|
+
ScalarType[ScalarType["UINT64"] = 4] = "UINT64";
|
|
32
|
+
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
|
|
33
|
+
// negative values are likely.
|
|
34
|
+
ScalarType[ScalarType["INT32"] = 5] = "INT32";
|
|
35
|
+
ScalarType[ScalarType["FIXED64"] = 6] = "FIXED64";
|
|
36
|
+
ScalarType[ScalarType["FIXED32"] = 7] = "FIXED32";
|
|
37
|
+
ScalarType[ScalarType["BOOL"] = 8] = "BOOL";
|
|
38
|
+
ScalarType[ScalarType["STRING"] = 9] = "STRING";
|
|
39
|
+
// Tag-delimited aggregate.
|
|
40
|
+
// Group type is deprecated and not supported in proto3. However, Proto3
|
|
41
|
+
// implementations should still be able to parse the group wire format and
|
|
42
|
+
// treat group fields as unknown fields.
|
|
43
|
+
// TYPE_GROUP = 10,
|
|
44
|
+
// TYPE_MESSAGE = 11, // Length-delimited aggregate.
|
|
45
|
+
// New in version 2.
|
|
46
|
+
ScalarType[ScalarType["BYTES"] = 12] = "BYTES";
|
|
47
|
+
ScalarType[ScalarType["UINT32"] = 13] = "UINT32";
|
|
48
|
+
// TYPE_ENUM = 14,
|
|
49
|
+
ScalarType[ScalarType["SFIXED32"] = 15] = "SFIXED32";
|
|
50
|
+
ScalarType[ScalarType["SFIXED64"] = 16] = "SFIXED64";
|
|
51
|
+
ScalarType[ScalarType["SINT32"] = 17] = "SINT32";
|
|
52
|
+
ScalarType[ScalarType["SINT64"] = 18] = "SINT64";
|
|
53
|
+
})(ScalarType || (exports.ScalarType = ScalarType = {}));
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021-2026 Buf Technologies, Inc.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.equals = equals;
|
|
17
|
+
const scalar_js_1 = require("./reflect/scalar.js");
|
|
18
|
+
const reflect_js_1 = require("./reflect/reflect.js");
|
|
19
|
+
const descriptors_js_1 = require("./descriptors.js");
|
|
20
|
+
const index_js_1 = require("./wkt/index.js");
|
|
21
|
+
const extensions_js_1 = require("./extensions.js");
|
|
22
|
+
/**
|
|
23
|
+
* Compare two messages of the same type for equality.
|
|
24
|
+
*
|
|
25
|
+
* Fields are compared one by one, but only when set: a field set in one message
|
|
26
|
+
* but not the other makes them unequal, while fields set in both are compared
|
|
27
|
+
* by value. Extensions and unknown fields are disregarded by default.
|
|
28
|
+
*
|
|
29
|
+
* Float and double values are compared with IEEE semantics: NaN does not equal
|
|
30
|
+
* NaN, and -0 equals 0 (with the exception for singular fields with implicit
|
|
31
|
+
* presence: -0 is set, +0 is unset).
|
|
32
|
+
*/
|
|
33
|
+
function equals(schema, a, b, options) {
|
|
34
|
+
if (a.$typeName != schema.typeName || b.$typeName != schema.typeName) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
if (a === b) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
return reflectEquals((0, reflect_js_1.reflect)(schema, a), (0, reflect_js_1.reflect)(schema, b), options);
|
|
41
|
+
}
|
|
42
|
+
function reflectEquals(a, b, opts) {
|
|
43
|
+
if (a.desc.typeName === "google.protobuf.Any" && (opts === null || opts === void 0 ? void 0 : opts.unpackAny) == true) {
|
|
44
|
+
return anyUnpackedEquals(a.message, b.message, opts);
|
|
45
|
+
}
|
|
46
|
+
for (const f of a.fields) {
|
|
47
|
+
if (!fieldEquals(f, a, b, opts)) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.unknown) == true && !unknownEquals(a, b, opts.registry)) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.extensions) == true && !extensionsEquals(a, b, opts)) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
// TODO(tstamm) add an option to consider NaN equal to NaN?
|
|
60
|
+
function fieldEquals(f, a, b, opts) {
|
|
61
|
+
if (!a.isSet(f) && !b.isSet(f)) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
if (!a.isSet(f) || !b.isSet(f)) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
switch (f.fieldKind) {
|
|
68
|
+
case "scalar":
|
|
69
|
+
return (0, scalar_js_1.scalarEquals)(f.scalar, a.get(f), b.get(f));
|
|
70
|
+
case "enum":
|
|
71
|
+
return a.get(f) === b.get(f);
|
|
72
|
+
case "message":
|
|
73
|
+
return reflectEquals(a.get(f), b.get(f), opts);
|
|
74
|
+
case "map": {
|
|
75
|
+
// TODO(tstamm) can't we compare sizes first?
|
|
76
|
+
const mapA = a.get(f);
|
|
77
|
+
const mapB = b.get(f);
|
|
78
|
+
const keys = [];
|
|
79
|
+
for (const k of mapA.keys()) {
|
|
80
|
+
if (!mapB.has(k)) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
keys.push(k);
|
|
84
|
+
}
|
|
85
|
+
for (const k of mapB.keys()) {
|
|
86
|
+
if (!mapA.has(k)) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
for (const key of keys) {
|
|
91
|
+
const va = mapA.get(key);
|
|
92
|
+
const vb = mapB.get(key);
|
|
93
|
+
if (va === vb) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
switch (f.mapKind) {
|
|
97
|
+
case "enum":
|
|
98
|
+
return false;
|
|
99
|
+
case "message":
|
|
100
|
+
if (!reflectEquals(va, vb, opts)) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
case "scalar":
|
|
105
|
+
if (!(0, scalar_js_1.scalarEquals)(f.scalar, va, vb)) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
case "list": {
|
|
114
|
+
const listA = a.get(f);
|
|
115
|
+
const listB = b.get(f);
|
|
116
|
+
if (listA.size != listB.size) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
for (let i = 0; i < listA.size; i++) {
|
|
120
|
+
const va = listA.get(i);
|
|
121
|
+
const vb = listB.get(i);
|
|
122
|
+
if (va === vb) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
switch (f.listKind) {
|
|
126
|
+
case "enum":
|
|
127
|
+
return false;
|
|
128
|
+
case "message":
|
|
129
|
+
if (!reflectEquals(va, vb, opts)) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
break;
|
|
133
|
+
case "scalar":
|
|
134
|
+
if (!(0, scalar_js_1.scalarEquals)(f.scalar, va, vb)) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
function anyUnpackedEquals(a, b, opts) {
|
|
146
|
+
if (a.typeUrl !== b.typeUrl) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
const unpackedA = (0, index_js_1.anyUnpack)(a, opts.registry);
|
|
150
|
+
const unpackedB = (0, index_js_1.anyUnpack)(b, opts.registry);
|
|
151
|
+
if (unpackedA && unpackedB) {
|
|
152
|
+
const schema = opts.registry.getMessage(unpackedA.$typeName);
|
|
153
|
+
if (schema) {
|
|
154
|
+
return equals(schema, unpackedA, unpackedB, opts);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return (0, scalar_js_1.scalarEquals)(descriptors_js_1.ScalarType.BYTES, a.value, b.value);
|
|
158
|
+
}
|
|
159
|
+
function unknownEquals(a, b, registry) {
|
|
160
|
+
function getTrulyUnknown(msg, registry) {
|
|
161
|
+
var _a;
|
|
162
|
+
const u = (_a = msg.getUnknown()) !== null && _a !== void 0 ? _a : [];
|
|
163
|
+
return registry
|
|
164
|
+
? u.filter((uf) => !registry.getExtensionFor(msg.desc, uf.no))
|
|
165
|
+
: u;
|
|
166
|
+
}
|
|
167
|
+
const unknownA = getTrulyUnknown(a, registry);
|
|
168
|
+
const unknownB = getTrulyUnknown(b, registry);
|
|
169
|
+
if (unknownA.length != unknownB.length) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
for (let i = 0; i < unknownA.length; i++) {
|
|
173
|
+
const a = unknownA[i];
|
|
174
|
+
const b = unknownB[i];
|
|
175
|
+
if (a.no != b.no) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
if (a.wireType != b.wireType) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
if (!(0, scalar_js_1.scalarEquals)(descriptors_js_1.ScalarType.BYTES, a.data, b.data)) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return true;
|
|
186
|
+
}
|
|
187
|
+
function extensionsEquals(a, b, opts) {
|
|
188
|
+
function getSetExtensions(msg, registry) {
|
|
189
|
+
var _a;
|
|
190
|
+
return ((_a = msg.getUnknown()) !== null && _a !== void 0 ? _a : [])
|
|
191
|
+
.map((uf) => registry.getExtensionFor(msg.desc, uf.no))
|
|
192
|
+
.filter((e) => e != undefined)
|
|
193
|
+
.filter((e, index, arr) => arr.indexOf(e) === index);
|
|
194
|
+
}
|
|
195
|
+
const extensionsA = getSetExtensions(a, opts.registry);
|
|
196
|
+
const extensionsB = getSetExtensions(b, opts.registry);
|
|
197
|
+
if (extensionsA.length != extensionsB.length ||
|
|
198
|
+
extensionsA.some((e) => !extensionsB.includes(e))) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
for (const extension of extensionsA) {
|
|
202
|
+
const [containerA, field] = (0, extensions_js_1.createExtensionContainer)(extension, (0, extensions_js_1.getExtension)(a.message, extension));
|
|
203
|
+
const [containerB] = (0, extensions_js_1.createExtensionContainer)(extension, (0, extensions_js_1.getExtension)(b.message, extension));
|
|
204
|
+
if (!fieldEquals(field, containerA, containerB, opts)) {
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return true;
|
|
209
|
+
}
|