@code-yeongyu/senpi 2026.8.16 → 2026.8.17
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/CHANGELOG.md +51 -0
- package/dist/bun/cli.js +1 -0
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-cursor-agent.d.ts +2 -0
- package/dist/bun/register-cursor-agent.d.ts.map +1 -0
- package/dist/bun/register-cursor-agent.js +4 -0
- package/dist/bun/register-cursor-agent.js.map +1 -0
- package/dist/core/agent-session-services.js +2 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +48 -5
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +239 -61
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/cursor-exec-bridge-session.d.ts +11 -0
- package/dist/core/cursor-exec-bridge-session.d.ts.map +1 -0
- package/dist/core/cursor-exec-bridge-session.js +17 -0
- package/dist/core/cursor-exec-bridge-session.js.map +1 -0
- package/dist/core/cursor-exec-bridge.d.ts +52 -0
- package/dist/core/cursor-exec-bridge.d.ts.map +1 -0
- package/dist/core/cursor-exec-bridge.js +196 -0
- package/dist/core/cursor-exec-bridge.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.d.ts +28 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js +278 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.d.ts +38 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.js +75 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.d.ts +24 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.js +64 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.d.ts +139 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.js +362 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/errors.d.ts +19 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/errors.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/errors.js +122 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/errors.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/executable.d.ts +30 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/executable.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/executable.js +117 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/executable.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/failover.d.ts +39 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/failover.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/failover.js +155 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/failover.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts +89 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js +147 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.d.ts +20 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.js +99 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.d.ts +25 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.js +67 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts +27 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +242 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.d.ts +73 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js +330 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.d.ts +94 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.js +248 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.d.ts +35 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.js +186 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.d.ts +11 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.js +17 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.d.ts +104 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.js +301 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.d.ts +26 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js +587 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/transport.d.ts +43 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/transport.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/transport.js +196 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/transport.js.map +1 -0
- package/dist/core/extensions/builtin/goal/channel-state-subscriptions.d.ts +9 -0
- package/dist/core/extensions/builtin/goal/channel-state-subscriptions.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/channel-state-subscriptions.js +18 -0
- package/dist/core/extensions/builtin/goal/channel-state-subscriptions.js.map +1 -0
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.js +10 -9
- package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +5 -2
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/detectors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/detectors.js +21 -3
- package/dist/core/extensions/builtin/loop-guard/detectors.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/escalation.d.ts +24 -0
- package/dist/core/extensions/builtin/loop-guard/escalation.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/escalation.js +77 -0
- package/dist/core/extensions/builtin/loop-guard/escalation.js.map +1 -0
- package/dist/core/extensions/builtin/loop-guard/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/index.js +98 -3
- package/dist/core/extensions/builtin/loop-guard/index.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/notice.d.ts +9 -0
- package/dist/core/extensions/builtin/loop-guard/notice.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/notice.js +17 -0
- package/dist/core/extensions/builtin/loop-guard/notice.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/policy.d.ts +4 -0
- package/dist/core/extensions/builtin/loop-guard/policy.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/policy.js +4 -0
- package/dist/core/extensions/builtin/loop-guard/policy.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/renderer.d.ts +2 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/renderer.js +11 -0
- package/dist/core/extensions/builtin/loop-guard/renderer.js.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/tracker.d.ts +1 -1
- package/dist/core/extensions/builtin/loop-guard/tracker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/loop-guard/tracker.js +3 -1
- package/dist/core/extensions/builtin/loop-guard/tracker.js.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.d.ts +6 -0
- package/dist/core/extensions/builtin/monitor-state-event.d.ts.map +1 -1
- package/dist/core/extensions/builtin/monitor-state-event.js +10 -0
- package/dist/core/extensions/builtin/monitor-state-event.js.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +7 -2
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +14 -2
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +5 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +8 -9
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +1 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +6 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/modes/interactive/editor-paste-transfer.d.ts +10 -0
- package/dist/modes/interactive/editor-paste-transfer.d.ts.map +1 -1
- package/dist/modes/interactive/editor-paste-transfer.js +16 -0
- package/dist/modes/interactive/editor-paste-transfer.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +2 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
- package/dist/modes/rpc/connection-handler.js +32 -27
- package/dist/modes/rpc/connection-handler.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts +6 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js +47 -14
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/multi-session-host.d.ts.map +1 -1
- package/dist/modes/rpc/multi-session-host.js +26 -4
- package/dist/modes/rpc/multi-session-host.js.map +1 -1
- package/dist/modes/rpc/rpc-command-invocation.d.ts +5 -0
- package/dist/modes/rpc/rpc-command-invocation.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-command-invocation.js +2 -0
- package/dist/modes/rpc/rpc-command-invocation.js.map +1 -0
- package/dist/modes/rpc/rpc-command-surface.d.ts +49 -0
- package/dist/modes/rpc/rpc-command-surface.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-command-surface.js +40 -0
- package/dist/modes/rpc/rpc-command-surface.js.map +1 -0
- package/dist/modes/rpc/rpc-input-validation.d.ts +4 -0
- package/dist/modes/rpc/rpc-input-validation.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-input-validation.js +20 -0
- package/dist/modes/rpc/rpc-input-validation.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +12 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +12 -12
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/docs/providers.md +50 -1
- package/docs/rpc.md +78 -6
- package/docs/skills.md +14 -3
- package/node_modules/@bufbuild/protobuf/README.md +44 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.d.ts +6 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.d.ts +140 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.d.ts +79 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.d.ts +63 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.d.ts +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.d.ts +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.d.ts +145 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.d.ts +85 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +259 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.d.ts +634 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.d.ts +46 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.d.ts +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.d.ts +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +247 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.d.ts +73 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +739 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.d.ts +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +131 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.d.ts +20 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.d.ts +30 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.d.ts +107 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +268 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.d.ts +217 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +546 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +945 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.d.ts +24 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +199 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.d.ts +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +391 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.d.ts +34 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.d.ts +76 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.d.ts +135 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +156 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.d.ts +268 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +530 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +34 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.d.ts +69 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +61 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.d.ts +70 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +322 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.d.ts +38 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +68 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +892 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +126 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +106 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +59 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +27 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +242 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.d.ts +21 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.d.ts +6 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.d.ts +1 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.d.ts +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.d.ts +79 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.d.ts +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.d.ts +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.d.ts +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.d.ts +145 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.d.ts +85 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +256 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.d.ts +634 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.d.ts +46 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.d.ts +60 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.d.ts +48 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +241 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.d.ts +73 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +731 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.d.ts +7 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.d.ts +16 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/package.json +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +128 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.d.ts +20 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.d.ts +8 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.d.ts +30 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.d.ts +107 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +262 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.d.ts +217 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +541 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.d.ts +98 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +939 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.d.ts +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.d.ts +67 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +386 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.d.ts +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.d.ts +34 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.d.ts +76 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.d.ts +135 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.d.ts +10 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.d.ts +23 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +152 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +268 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +525 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.d.ts +5 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.d.ts +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.d.ts +13 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.d.ts +70 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +313 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.d.ts +38 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.d.ts +9 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +35 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +36 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +65 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +888 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +123 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +103 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +56 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +24 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +239 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +64 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.d.ts +19 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.d.ts +21 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.d.ts +25 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
- package/node_modules/@bufbuild/protobuf/package.json +147 -0
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-runtime.ts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/render.ts +43 -6
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +59 -17
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +14 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +14 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +12 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/README.md +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.d.ts +17 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.js +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.d.ts +13 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.js +33 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.d.ts +79 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.js +360 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts +16797 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.js +3828 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.d.ts +55 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.js +76 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.d.ts +116 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.js +16 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +191 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +3316 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.d.ts +29 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.js +33 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/compat.js +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/compat.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.d.ts +11 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.js +11 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +6 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts +6 -9
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +42 -9
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.d.ts +57 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.js +57 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +10 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +3 -2
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +21 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.d.ts +9 -0
- package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.js +82 -0
- package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +11 -8
|
@@ -0,0 +1,739 @@
|
|
|
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.fromJsonString = fromJsonString;
|
|
17
|
+
exports.mergeFromJsonString = mergeFromJsonString;
|
|
18
|
+
exports.fromJson = fromJson;
|
|
19
|
+
exports.mergeFromJson = mergeFromJson;
|
|
20
|
+
exports.enumFromJson = enumFromJson;
|
|
21
|
+
exports.isEnumJson = isEnumJson;
|
|
22
|
+
const descriptors_js_1 = require("./descriptors.js");
|
|
23
|
+
const proto_int64_js_1 = require("./proto-int64.js");
|
|
24
|
+
const create_js_1 = require("./create.js");
|
|
25
|
+
const reflect_js_1 = require("./reflect/reflect.js");
|
|
26
|
+
const error_js_1 = require("./reflect/error.js");
|
|
27
|
+
const reflect_check_js_1 = require("./reflect/reflect-check.js");
|
|
28
|
+
const names_js_1 = require("./reflect/names.js");
|
|
29
|
+
const base64_encoding_js_1 = require("./wire/base64-encoding.js");
|
|
30
|
+
const index_js_1 = require("./wkt/index.js");
|
|
31
|
+
const extensions_js_1 = require("./extensions.js");
|
|
32
|
+
function makeReadContext(options) {
|
|
33
|
+
return Object.assign(Object.assign({ ignoreUnknownFields: false, recursionLimit: 100 }, options), { depth: 0 });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Parse a message from a JSON string.
|
|
37
|
+
*
|
|
38
|
+
* Duplicate keys are rejected.
|
|
39
|
+
*/
|
|
40
|
+
function fromJsonString(schema, json, options) {
|
|
41
|
+
return fromJson(schema, parseJsonString(json, schema.typeName), options);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Parse a message from a JSON string, merging fields into the target.
|
|
45
|
+
*
|
|
46
|
+
* Repeated fields are appended. Map entries are added, overwriting
|
|
47
|
+
* existing keys.
|
|
48
|
+
*
|
|
49
|
+
* If a message field is already present, it will be merged with the
|
|
50
|
+
* new data.
|
|
51
|
+
*
|
|
52
|
+
* Duplicate keys in the JSON are rejected, as in `fromJsonString`.
|
|
53
|
+
*/
|
|
54
|
+
function mergeFromJsonString(schema, target, json, options) {
|
|
55
|
+
return mergeFromJson(schema, target, parseJsonString(json, schema.typeName), options);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Parse a message from a JSON value.
|
|
59
|
+
*
|
|
60
|
+
* Duplicate keys are rejected, but a value parsed by JSON.parse has already
|
|
61
|
+
* dropped duplicates (the last one wins). Use `fromJsonString` for strict
|
|
62
|
+
* duplicate-key checking.
|
|
63
|
+
*/
|
|
64
|
+
function fromJson(schema, json, options) {
|
|
65
|
+
const msg = (0, reflect_js_1.reflect)(schema);
|
|
66
|
+
try {
|
|
67
|
+
readMessage(msg, json, makeReadContext(options));
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
if ((0, error_js_1.isFieldError)(e)) {
|
|
71
|
+
// @ts-expect-error we use the ES2022 error CTOR option "cause" for better stack traces
|
|
72
|
+
throw new Error(`cannot decode ${e.field()} from JSON: ${e.message}`, {
|
|
73
|
+
cause: e,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
throw e;
|
|
77
|
+
}
|
|
78
|
+
return msg.message;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Parse a message from a JSON value, merging fields into the target.
|
|
82
|
+
*
|
|
83
|
+
* Repeated fields are appended. Map entries are added, overwriting
|
|
84
|
+
* existing keys.
|
|
85
|
+
*
|
|
86
|
+
* If a message field is already present, it will be merged with the
|
|
87
|
+
* new data.
|
|
88
|
+
*
|
|
89
|
+
* Duplicate keys are rejected as in `fromJson`; use `mergeFromJsonString`
|
|
90
|
+
* for strict checking.
|
|
91
|
+
*/
|
|
92
|
+
function mergeFromJson(schema, target, json, options) {
|
|
93
|
+
try {
|
|
94
|
+
readMessage((0, reflect_js_1.reflect)(schema, target), json, makeReadContext(options));
|
|
95
|
+
}
|
|
96
|
+
catch (e) {
|
|
97
|
+
if ((0, error_js_1.isFieldError)(e)) {
|
|
98
|
+
// @ts-expect-error we use the ES2022 error CTOR option "cause" for better stack traces
|
|
99
|
+
throw new Error(`cannot decode ${e.field()} from JSON: ${e.message}`, {
|
|
100
|
+
cause: e,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
throw e;
|
|
104
|
+
}
|
|
105
|
+
return target;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Parses an enum value from JSON.
|
|
109
|
+
*/
|
|
110
|
+
function enumFromJson(descEnum, json) {
|
|
111
|
+
return readEnum(descEnum, json, false);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Is the given value a JSON enum value?
|
|
115
|
+
*/
|
|
116
|
+
function isEnumJson(descEnum, value) {
|
|
117
|
+
return undefined !== descEnum.values.find((v) => v.name === value);
|
|
118
|
+
}
|
|
119
|
+
const messageJsonFields = new WeakMap();
|
|
120
|
+
function getJsonField(desc, jsonKey) {
|
|
121
|
+
var _a;
|
|
122
|
+
if (!messageJsonFields.has(desc)) {
|
|
123
|
+
const jsonNames = new Map();
|
|
124
|
+
for (const field of desc.fields) {
|
|
125
|
+
jsonNames.set(field.name, field).set(field.jsonName, field);
|
|
126
|
+
}
|
|
127
|
+
messageJsonFields.set(desc, jsonNames);
|
|
128
|
+
}
|
|
129
|
+
return (_a = messageJsonFields.get(desc)) === null || _a === void 0 ? void 0 : _a.get(jsonKey);
|
|
130
|
+
}
|
|
131
|
+
function readMessage(msg, json, ctx) {
|
|
132
|
+
var _a;
|
|
133
|
+
if (++ctx.depth > ctx.recursionLimit) {
|
|
134
|
+
throw new Error(`cannot decode ${msg.desc} from JSON: maximum recursion depth of ${ctx.recursionLimit} reached`);
|
|
135
|
+
}
|
|
136
|
+
if (tryWktFromJson(msg, json, ctx)) {
|
|
137
|
+
ctx.depth--;
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (json == null || Array.isArray(json) || typeof json != "object") {
|
|
141
|
+
throw new Error(`cannot decode ${msg.desc} from JSON: ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
142
|
+
}
|
|
143
|
+
const oneofSeen = new Map();
|
|
144
|
+
const fieldSeen = new Set();
|
|
145
|
+
for (const [jsonKey, jsonValue] of Object.entries(json)) {
|
|
146
|
+
const field = getJsonField(msg.desc, jsonKey);
|
|
147
|
+
if (field) {
|
|
148
|
+
if (fieldSeen.has(field)) {
|
|
149
|
+
// The same field may be set by its proto name and its JSON name, or by
|
|
150
|
+
// a duplicate or unicode-escaped key that JSON.parse already collapsed.
|
|
151
|
+
// Checked before the null-skip below so that a null entry still counts.
|
|
152
|
+
throw new error_js_1.FieldError(field, "set multiple times");
|
|
153
|
+
}
|
|
154
|
+
fieldSeen.add(field);
|
|
155
|
+
if (field.oneof && jsonValue === null && field.fieldKind == "scalar") {
|
|
156
|
+
// see conformance test Required.Proto3.JsonInput.OneofFieldNull{First,Second}
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
if (field.oneof) {
|
|
160
|
+
const seen = oneofSeen.get(field.oneof);
|
|
161
|
+
if (seen !== undefined) {
|
|
162
|
+
throw new error_js_1.FieldError(field.oneof, `oneof set multiple times by ${seen.name} and ${field.name}`);
|
|
163
|
+
}
|
|
164
|
+
oneofSeen.set(field.oneof, field);
|
|
165
|
+
}
|
|
166
|
+
readField(msg, field, jsonValue, ctx);
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
let extension = undefined;
|
|
170
|
+
if (jsonKey.startsWith("[") &&
|
|
171
|
+
jsonKey.endsWith("]") &&
|
|
172
|
+
// biome-ignore lint/suspicious/noAssignInExpressions: no
|
|
173
|
+
(extension = (_a = ctx.registry) === null || _a === void 0 ? void 0 : _a.getExtension(jsonKey.substring(1, jsonKey.length - 1))) &&
|
|
174
|
+
extension.extendee.typeName === msg.desc.typeName) {
|
|
175
|
+
const [container, field, get] = (0, extensions_js_1.createExtensionContainer)(extension);
|
|
176
|
+
readField(container, field, jsonValue, ctx);
|
|
177
|
+
(0, extensions_js_1.setExtension)(msg.message, extension, get());
|
|
178
|
+
}
|
|
179
|
+
if (!extension && !ctx.ignoreUnknownFields) {
|
|
180
|
+
throw new Error(`cannot decode ${msg.desc} from JSON: key "${jsonKey}" is unknown`);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
ctx.depth--;
|
|
185
|
+
}
|
|
186
|
+
function readField(msg, field, json, ctx) {
|
|
187
|
+
switch (field.fieldKind) {
|
|
188
|
+
case "scalar":
|
|
189
|
+
readScalarField(msg, field, json);
|
|
190
|
+
break;
|
|
191
|
+
case "enum":
|
|
192
|
+
readEnumField(msg, field, json, ctx);
|
|
193
|
+
break;
|
|
194
|
+
case "message":
|
|
195
|
+
readMessageField(msg, field, json, ctx);
|
|
196
|
+
break;
|
|
197
|
+
case "list":
|
|
198
|
+
readListField(msg.get(field), json, ctx);
|
|
199
|
+
break;
|
|
200
|
+
case "map":
|
|
201
|
+
readMapField(msg.get(field), json, ctx);
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
function readListOrMapItem(field, json, ctx) {
|
|
206
|
+
if (field.scalar && json !== null) {
|
|
207
|
+
return scalarFromJson(field, json);
|
|
208
|
+
}
|
|
209
|
+
if (field.message && !isResetSentinelNullValue(field, json)) {
|
|
210
|
+
const msgValue = (0, reflect_js_1.reflect)(field.message);
|
|
211
|
+
readMessage(msgValue, json, ctx);
|
|
212
|
+
return msgValue;
|
|
213
|
+
}
|
|
214
|
+
if (field.enum && !isResetSentinelNullValue(field, json)) {
|
|
215
|
+
return readEnum(field.enum, json, ctx.ignoreUnknownFields);
|
|
216
|
+
}
|
|
217
|
+
throw new error_js_1.FieldError(field, `${field.fieldKind === "list" ? "list item" : "map value"} must not be null`);
|
|
218
|
+
}
|
|
219
|
+
function readMapField(map, json, ctx) {
|
|
220
|
+
if (json === null) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const field = map.field();
|
|
224
|
+
if (typeof json != "object" || Array.isArray(json)) {
|
|
225
|
+
throw new error_js_1.FieldError(field, "expected object, got " + (0, reflect_check_js_1.formatVal)(json));
|
|
226
|
+
}
|
|
227
|
+
const seen = new Set();
|
|
228
|
+
for (const [jsonMapKey, jsonMapValue] of Object.entries(json)) {
|
|
229
|
+
const key = mapKeyFromJson(field.mapKey, jsonMapKey);
|
|
230
|
+
if (seen.has(key)) {
|
|
231
|
+
throw new error_js_1.FieldError(field, `duplicate map key "${jsonMapKey}"`);
|
|
232
|
+
}
|
|
233
|
+
seen.add(key);
|
|
234
|
+
const value = readListOrMapItem(field, jsonMapValue, ctx);
|
|
235
|
+
if (value !== tokenIgnoredUnknownEnum) {
|
|
236
|
+
map.set(key, value);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function readListField(list, json, ctx) {
|
|
241
|
+
if (json === null) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const field = list.field();
|
|
245
|
+
if (!Array.isArray(json)) {
|
|
246
|
+
throw new error_js_1.FieldError(field, "expected Array, got " + (0, reflect_check_js_1.formatVal)(json));
|
|
247
|
+
}
|
|
248
|
+
for (const jsonItem of json) {
|
|
249
|
+
const value = readListOrMapItem(field, jsonItem, ctx);
|
|
250
|
+
if (value !== tokenIgnoredUnknownEnum) {
|
|
251
|
+
list.add(value);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function readMessageField(msg, field, json, ctx) {
|
|
256
|
+
if (isResetSentinelNullValue(field, json)) {
|
|
257
|
+
msg.clear(field);
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
const msgValue = msg.isSet(field) ? msg.get(field) : (0, reflect_js_1.reflect)(field.message);
|
|
261
|
+
readMessage(msgValue, json, ctx);
|
|
262
|
+
msg.set(field, msgValue);
|
|
263
|
+
}
|
|
264
|
+
function readEnumField(msg, field, json, ctx) {
|
|
265
|
+
if (isResetSentinelNullValue(field, json)) {
|
|
266
|
+
msg.clear(field);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const enumValue = readEnum(field.enum, json, ctx.ignoreUnknownFields);
|
|
270
|
+
if (enumValue !== tokenIgnoredUnknownEnum) {
|
|
271
|
+
msg.set(field, enumValue);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
function readScalarField(msg, field, json) {
|
|
275
|
+
if (json === null) {
|
|
276
|
+
msg.clear(field);
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
msg.set(field, scalarFromJson(field, json));
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Indicates whether a value is a sentinel for reseting a field.
|
|
284
|
+
*
|
|
285
|
+
* For this to be true, the value must be a JSON null and the field must not
|
|
286
|
+
* permit a present, Protobuf-serializable null.
|
|
287
|
+
*
|
|
288
|
+
* Only message google.protobuf.Value and enum google.protobuf.NullValue fields
|
|
289
|
+
* permit Protobuf-serializable nulls.
|
|
290
|
+
*
|
|
291
|
+
* Note that field-resetting sentinel nulls are not permitted in lists and maps.
|
|
292
|
+
*/
|
|
293
|
+
function isResetSentinelNullValue(field, json) {
|
|
294
|
+
var _a, _b;
|
|
295
|
+
return (json === null &&
|
|
296
|
+
((_a = field.message) === null || _a === void 0 ? void 0 : _a.typeName) != "google.protobuf.Value" &&
|
|
297
|
+
((_b = field.enum) === null || _b === void 0 ? void 0 : _b.typeName) != "google.protobuf.NullValue");
|
|
298
|
+
}
|
|
299
|
+
const tokenIgnoredUnknownEnum = Symbol();
|
|
300
|
+
function readEnum(desc, json, ignoreUnknownFields) {
|
|
301
|
+
if (json === null) {
|
|
302
|
+
return desc.values[0].number;
|
|
303
|
+
}
|
|
304
|
+
switch (typeof json) {
|
|
305
|
+
case "number":
|
|
306
|
+
if (Number.isInteger(json)) {
|
|
307
|
+
return json;
|
|
308
|
+
}
|
|
309
|
+
break;
|
|
310
|
+
case "string":
|
|
311
|
+
const value = desc.values.find((ev) => ev.name === json);
|
|
312
|
+
if (value !== undefined) {
|
|
313
|
+
return value.number;
|
|
314
|
+
}
|
|
315
|
+
if (ignoreUnknownFields) {
|
|
316
|
+
return tokenIgnoredUnknownEnum;
|
|
317
|
+
}
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
throw new Error(`cannot decode ${desc} from JSON: ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Try to parse a JSON value to a scalar value for the reflect API.
|
|
324
|
+
*
|
|
325
|
+
* Returns the input if the JSON value cannot be converted. Raises a FieldError
|
|
326
|
+
* if conversion would be ambiguous.
|
|
327
|
+
*/
|
|
328
|
+
function scalarFromJson(field, json) {
|
|
329
|
+
// int64, sfixed64, sint64, fixed64, uint64: Reflect supports string and number.
|
|
330
|
+
// string, bool: Supported by reflect.
|
|
331
|
+
switch (field.scalar) {
|
|
332
|
+
// float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
|
|
333
|
+
// Either numbers or strings are accepted. Exponent notation is also accepted.
|
|
334
|
+
case descriptors_js_1.ScalarType.DOUBLE:
|
|
335
|
+
case descriptors_js_1.ScalarType.FLOAT:
|
|
336
|
+
if (json === "NaN")
|
|
337
|
+
return NaN;
|
|
338
|
+
if (json === "Infinity")
|
|
339
|
+
return Number.POSITIVE_INFINITY;
|
|
340
|
+
if (json === "-Infinity")
|
|
341
|
+
return Number.NEGATIVE_INFINITY;
|
|
342
|
+
if (typeof json == "number") {
|
|
343
|
+
if (Number.isNaN(json)) {
|
|
344
|
+
// NaN must be encoded with string constants
|
|
345
|
+
throw new error_js_1.FieldError(field, "unexpected NaN number");
|
|
346
|
+
}
|
|
347
|
+
if (!Number.isFinite(json)) {
|
|
348
|
+
// Infinity must be encoded with string constants
|
|
349
|
+
throw new error_js_1.FieldError(field, "unexpected infinite number");
|
|
350
|
+
}
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
if (typeof json == "string") {
|
|
354
|
+
if (json === "") {
|
|
355
|
+
// empty string is not a number
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
if (json.trim().length !== json.length) {
|
|
359
|
+
// extra whitespace
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
362
|
+
const float = Number(json);
|
|
363
|
+
if (!Number.isFinite(float)) {
|
|
364
|
+
// Infinity and NaN must be encoded with string constants
|
|
365
|
+
break;
|
|
366
|
+
}
|
|
367
|
+
return float;
|
|
368
|
+
}
|
|
369
|
+
break;
|
|
370
|
+
// int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
|
|
371
|
+
case descriptors_js_1.ScalarType.INT32:
|
|
372
|
+
case descriptors_js_1.ScalarType.FIXED32:
|
|
373
|
+
case descriptors_js_1.ScalarType.SFIXED32:
|
|
374
|
+
case descriptors_js_1.ScalarType.SINT32:
|
|
375
|
+
case descriptors_js_1.ScalarType.UINT32:
|
|
376
|
+
return int32FromJson(json);
|
|
377
|
+
// bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
|
|
378
|
+
// Either standard or URL-safe base64 encoding with/without paddings are accepted.
|
|
379
|
+
case descriptors_js_1.ScalarType.BYTES:
|
|
380
|
+
if (typeof json == "string") {
|
|
381
|
+
if (json === "") {
|
|
382
|
+
return new Uint8Array(0);
|
|
383
|
+
}
|
|
384
|
+
try {
|
|
385
|
+
return (0, base64_encoding_js_1.base64Decode)(json);
|
|
386
|
+
}
|
|
387
|
+
catch (e) {
|
|
388
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
389
|
+
throw new error_js_1.FieldError(field, message);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
return json;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Try to parse a JSON value to a map key for the reflect API.
|
|
398
|
+
* Canonicalizes 64-bit integers given as string, so that "01 and "1" are one
|
|
399
|
+
* key, and duplicates can raise an error.
|
|
400
|
+
* Returns the input if the JSON value cannot be converted.
|
|
401
|
+
*/
|
|
402
|
+
function mapKeyFromJson(type, jsonString) {
|
|
403
|
+
switch (type) {
|
|
404
|
+
case descriptors_js_1.ScalarType.BOOL:
|
|
405
|
+
switch (jsonString) {
|
|
406
|
+
case "true":
|
|
407
|
+
return true;
|
|
408
|
+
case "false":
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
return jsonString;
|
|
412
|
+
case descriptors_js_1.ScalarType.INT32:
|
|
413
|
+
case descriptors_js_1.ScalarType.FIXED32:
|
|
414
|
+
case descriptors_js_1.ScalarType.UINT32:
|
|
415
|
+
case descriptors_js_1.ScalarType.SFIXED32:
|
|
416
|
+
case descriptors_js_1.ScalarType.SINT32:
|
|
417
|
+
return int32FromJson(jsonString);
|
|
418
|
+
case descriptors_js_1.ScalarType.INT64:
|
|
419
|
+
case descriptors_js_1.ScalarType.SINT64:
|
|
420
|
+
case descriptors_js_1.ScalarType.SFIXED64:
|
|
421
|
+
case descriptors_js_1.ScalarType.UINT64:
|
|
422
|
+
case descriptors_js_1.ScalarType.FIXED64:
|
|
423
|
+
return /^-?0+$/.test(jsonString)
|
|
424
|
+
? "0"
|
|
425
|
+
: jsonString.replace(/^(-?)0+(?=\d)/, "$1");
|
|
426
|
+
default:
|
|
427
|
+
return jsonString;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Try to parse a JSON value to a 32-bit integer for the reflect API.
|
|
432
|
+
*
|
|
433
|
+
* Returns the input if the JSON value cannot be converted.
|
|
434
|
+
*/
|
|
435
|
+
function int32FromJson(json) {
|
|
436
|
+
if (typeof json == "string") {
|
|
437
|
+
if (json === "") {
|
|
438
|
+
// empty string is not a number
|
|
439
|
+
return json;
|
|
440
|
+
}
|
|
441
|
+
if (json.trim().length !== json.length) {
|
|
442
|
+
// extra whitespace
|
|
443
|
+
return json;
|
|
444
|
+
}
|
|
445
|
+
const num = Number(json);
|
|
446
|
+
if (Number.isNaN(num)) {
|
|
447
|
+
// not a number
|
|
448
|
+
return json;
|
|
449
|
+
}
|
|
450
|
+
return num;
|
|
451
|
+
}
|
|
452
|
+
return json;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Parse a JSON string, rejecting duplicate object keys (which JSON.parse would
|
|
456
|
+
* otherwise silently merge).
|
|
457
|
+
*/
|
|
458
|
+
function parseJsonString(jsonString, typeName) {
|
|
459
|
+
let json;
|
|
460
|
+
try {
|
|
461
|
+
json = JSON.parse(jsonString);
|
|
462
|
+
}
|
|
463
|
+
catch (e) {
|
|
464
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
465
|
+
throw new Error(`cannot decode message ${typeName} from JSON: ${message}`,
|
|
466
|
+
// @ts-expect-error we use the ES2022 error CTOR option "cause" for better stack traces
|
|
467
|
+
{ cause: e });
|
|
468
|
+
}
|
|
469
|
+
checkDuplicateKeys(jsonString, typeName);
|
|
470
|
+
return json;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Scan a JSON string for duplicate object member names at any depth, throwing
|
|
474
|
+
* if any are found. JSON.parse() silently keeps the last of duplicate keys, so
|
|
475
|
+
* this raw-string scan is the only way to reject them. It must only be called
|
|
476
|
+
* with a string that JSON.parse() has already accepted, so it can assume the
|
|
477
|
+
* input is well-formed.
|
|
478
|
+
*/
|
|
479
|
+
function checkDuplicateKeys(jsonString, typeName) {
|
|
480
|
+
// One Set of seen member names for each open object; arrays push null.
|
|
481
|
+
const stack = [];
|
|
482
|
+
// Whether the next string token is an object member name.
|
|
483
|
+
let expectKey = false;
|
|
484
|
+
let i = 0;
|
|
485
|
+
while (i < jsonString.length) {
|
|
486
|
+
switch (jsonString[i]) {
|
|
487
|
+
case "{":
|
|
488
|
+
stack.push(new Set());
|
|
489
|
+
expectKey = true;
|
|
490
|
+
i++;
|
|
491
|
+
break;
|
|
492
|
+
case "[":
|
|
493
|
+
stack.push(null);
|
|
494
|
+
expectKey = false;
|
|
495
|
+
i++;
|
|
496
|
+
break;
|
|
497
|
+
case "}":
|
|
498
|
+
case "]":
|
|
499
|
+
stack.pop();
|
|
500
|
+
expectKey = false;
|
|
501
|
+
i++;
|
|
502
|
+
break;
|
|
503
|
+
case ",":
|
|
504
|
+
expectKey = stack[stack.length - 1] != null;
|
|
505
|
+
i++;
|
|
506
|
+
break;
|
|
507
|
+
case ":":
|
|
508
|
+
expectKey = false;
|
|
509
|
+
i++;
|
|
510
|
+
break;
|
|
511
|
+
case '"': {
|
|
512
|
+
const open = i++;
|
|
513
|
+
let escaped = false;
|
|
514
|
+
while (i < jsonString.length) {
|
|
515
|
+
if (jsonString[i] == "\\") {
|
|
516
|
+
escaped = true;
|
|
517
|
+
i += 2; // skip the backslash and the character it escapes
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
if (jsonString[i] == '"') {
|
|
521
|
+
break;
|
|
522
|
+
}
|
|
523
|
+
i++;
|
|
524
|
+
}
|
|
525
|
+
const close = i++;
|
|
526
|
+
const seen = stack[stack.length - 1];
|
|
527
|
+
if (expectKey && seen) {
|
|
528
|
+
// Decode escapes (rare) so that, for example, a key written with a
|
|
529
|
+
// unicode escape collides with the same key written literally.
|
|
530
|
+
const name = escaped
|
|
531
|
+
? JSON.parse(jsonString.substring(open, close + 1))
|
|
532
|
+
: jsonString.substring(open + 1, close);
|
|
533
|
+
if (seen.has(name)) {
|
|
534
|
+
throw new Error(`cannot decode message ${typeName} from JSON: duplicate object key "${name}"`);
|
|
535
|
+
}
|
|
536
|
+
seen.add(name);
|
|
537
|
+
}
|
|
538
|
+
expectKey = false;
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
default:
|
|
542
|
+
i++;
|
|
543
|
+
break;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
function tryWktFromJson(msg, jsonValue, ctx) {
|
|
548
|
+
if (!msg.desc.typeName.startsWith("google.protobuf.")) {
|
|
549
|
+
return false;
|
|
550
|
+
}
|
|
551
|
+
switch (msg.desc.typeName) {
|
|
552
|
+
case "google.protobuf.Any":
|
|
553
|
+
anyFromJson(msg.message, jsonValue, ctx);
|
|
554
|
+
return true;
|
|
555
|
+
case "google.protobuf.Timestamp":
|
|
556
|
+
timestampFromJson(msg.message, jsonValue);
|
|
557
|
+
return true;
|
|
558
|
+
case "google.protobuf.Duration":
|
|
559
|
+
durationFromJson(msg.message, jsonValue);
|
|
560
|
+
return true;
|
|
561
|
+
case "google.protobuf.FieldMask":
|
|
562
|
+
fieldMaskFromJson(msg.message, jsonValue);
|
|
563
|
+
return true;
|
|
564
|
+
case "google.protobuf.Struct":
|
|
565
|
+
structFromJson(msg.message, jsonValue, ctx);
|
|
566
|
+
return true;
|
|
567
|
+
case "google.protobuf.Value":
|
|
568
|
+
valueFromJson(msg.message, jsonValue, ctx);
|
|
569
|
+
return true;
|
|
570
|
+
case "google.protobuf.ListValue":
|
|
571
|
+
listValueFromJson(msg.message, jsonValue, ctx);
|
|
572
|
+
return true;
|
|
573
|
+
default:
|
|
574
|
+
if ((0, index_js_1.isWrapperDesc)(msg.desc)) {
|
|
575
|
+
const valueField = msg.desc.fields[0];
|
|
576
|
+
if (jsonValue === null) {
|
|
577
|
+
msg.clear(valueField);
|
|
578
|
+
}
|
|
579
|
+
else {
|
|
580
|
+
msg.set(valueField, scalarFromJson(valueField, jsonValue));
|
|
581
|
+
}
|
|
582
|
+
return true;
|
|
583
|
+
}
|
|
584
|
+
return false;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
function anyFromJson(any, json, ctx) {
|
|
588
|
+
var _a;
|
|
589
|
+
if (json === null || Array.isArray(json) || typeof json != "object") {
|
|
590
|
+
throw new Error(`cannot decode message ${any.$typeName} from JSON: expected object but got ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
591
|
+
}
|
|
592
|
+
if (Object.keys(json).length == 0) {
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
const typeUrl = json["@type"];
|
|
596
|
+
if (typeof typeUrl != "string" || typeUrl == "") {
|
|
597
|
+
throw new Error(`cannot decode message ${any.$typeName} from JSON: "@type" is empty`);
|
|
598
|
+
}
|
|
599
|
+
const typeName = typeUrl.includes("/")
|
|
600
|
+
? typeUrl.substring(typeUrl.lastIndexOf("/") + 1)
|
|
601
|
+
: typeUrl;
|
|
602
|
+
if (!typeName.length) {
|
|
603
|
+
throw new Error(`cannot decode message ${any.$typeName} from JSON: "@type" is invalid`);
|
|
604
|
+
}
|
|
605
|
+
const desc = (_a = ctx.registry) === null || _a === void 0 ? void 0 : _a.getMessage(typeName);
|
|
606
|
+
if (!desc) {
|
|
607
|
+
throw new Error(`cannot decode message ${any.$typeName} from JSON: ${typeUrl} is not in the type registry`);
|
|
608
|
+
}
|
|
609
|
+
const msg = (0, reflect_js_1.reflect)(desc);
|
|
610
|
+
if ((0, index_js_1.hasCustomJsonRepresentation)(desc) &&
|
|
611
|
+
Object.prototype.hasOwnProperty.call(json, "value")) {
|
|
612
|
+
const value = json.value;
|
|
613
|
+
readMessage(msg, value, ctx);
|
|
614
|
+
}
|
|
615
|
+
else {
|
|
616
|
+
const copy = Object.assign({}, json);
|
|
617
|
+
// biome-ignore lint/performance/noDelete: <explanation>
|
|
618
|
+
delete copy["@type"];
|
|
619
|
+
readMessage(msg, copy, ctx);
|
|
620
|
+
}
|
|
621
|
+
(0, index_js_1.anyPack)(msg.desc, msg.message, any);
|
|
622
|
+
}
|
|
623
|
+
function timestampFromJson(timestamp, json) {
|
|
624
|
+
if (typeof json !== "string") {
|
|
625
|
+
throw new Error(`cannot decode message ${timestamp.$typeName} from JSON: ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
626
|
+
}
|
|
627
|
+
const matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:\.([0-9]{1,9}))?(?:Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
|
|
628
|
+
if (!matches) {
|
|
629
|
+
throw new Error(`cannot decode message ${timestamp.$typeName} from JSON: invalid RFC 3339 string`);
|
|
630
|
+
}
|
|
631
|
+
const ms = Date.parse(
|
|
632
|
+
// biome-ignore format: want this to read well
|
|
633
|
+
matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
|
|
634
|
+
if (Number.isNaN(ms)) {
|
|
635
|
+
throw new Error(`cannot decode message ${timestamp.$typeName} from JSON: invalid RFC 3339 string`);
|
|
636
|
+
}
|
|
637
|
+
if (ms < Date.parse("0001-01-01T00:00:00Z") ||
|
|
638
|
+
ms > Date.parse("9999-12-31T23:59:59Z")) {
|
|
639
|
+
throw new Error(`cannot decode message ${timestamp.$typeName} from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
|
|
640
|
+
}
|
|
641
|
+
timestamp.seconds = proto_int64_js_1.protoInt64.parse(ms / 1000);
|
|
642
|
+
timestamp.nanos = 0;
|
|
643
|
+
if (matches[7]) {
|
|
644
|
+
timestamp.nanos =
|
|
645
|
+
parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) -
|
|
646
|
+
1000000000;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
function durationFromJson(duration, json) {
|
|
650
|
+
if (typeof json !== "string") {
|
|
651
|
+
throw new Error(`cannot decode message ${duration.$typeName} from JSON: ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
652
|
+
}
|
|
653
|
+
const match = json.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);
|
|
654
|
+
if (match === null) {
|
|
655
|
+
throw new Error(`cannot decode message ${duration.$typeName} from JSON: ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
656
|
+
}
|
|
657
|
+
const longSeconds = Number(match[1]);
|
|
658
|
+
if (longSeconds > 315576000000 || longSeconds < -315576000000) {
|
|
659
|
+
throw new Error(`cannot decode message ${duration.$typeName} from JSON: ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
660
|
+
}
|
|
661
|
+
duration.seconds = proto_int64_js_1.protoInt64.parse(longSeconds);
|
|
662
|
+
if (typeof match[2] !== "string") {
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
const nanosStr = match[2] + "0".repeat(9 - match[2].length);
|
|
666
|
+
duration.nanos = parseInt(nanosStr);
|
|
667
|
+
if (longSeconds < 0 || Object.is(longSeconds, -0)) {
|
|
668
|
+
duration.nanos = -duration.nanos;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
function fieldMaskFromJson(fieldMask, json) {
|
|
672
|
+
if (typeof json !== "string") {
|
|
673
|
+
throw new Error(`cannot decode message ${fieldMask.$typeName} from JSON: ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
674
|
+
}
|
|
675
|
+
if (json === "") {
|
|
676
|
+
return;
|
|
677
|
+
}
|
|
678
|
+
fieldMask.paths = json.split(",").map((path) => {
|
|
679
|
+
if (path.includes("_")) {
|
|
680
|
+
throw new Error(`cannot decode message ${fieldMask.$typeName} from JSON: path names must be lowerCamelCase`);
|
|
681
|
+
}
|
|
682
|
+
return (0, names_js_1.protoSnakeCase)(path);
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
function structFromJson(struct, json, ctx) {
|
|
686
|
+
if (typeof json != "object" || json == null || Array.isArray(json)) {
|
|
687
|
+
throw new Error(`cannot decode message ${struct.$typeName} from JSON ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
688
|
+
}
|
|
689
|
+
for (const [k, v] of Object.entries(json)) {
|
|
690
|
+
const parsedV = (0, create_js_1.create)(index_js_1.ValueSchema);
|
|
691
|
+
valueFromJson(parsedV, v, ctx);
|
|
692
|
+
struct.fields[k] = parsedV;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
function valueFromJson(value, json, ctx) {
|
|
696
|
+
if (++ctx.depth > ctx.recursionLimit) {
|
|
697
|
+
throw new Error(`cannot decode ${value.$typeName} from JSON: maximum recursion depth of ${ctx.recursionLimit} reached`);
|
|
698
|
+
}
|
|
699
|
+
switch (typeof json) {
|
|
700
|
+
case "number":
|
|
701
|
+
value.kind = { case: "numberValue", value: json };
|
|
702
|
+
break;
|
|
703
|
+
case "string":
|
|
704
|
+
value.kind = { case: "stringValue", value: json };
|
|
705
|
+
break;
|
|
706
|
+
case "boolean":
|
|
707
|
+
value.kind = { case: "boolValue", value: json };
|
|
708
|
+
break;
|
|
709
|
+
case "object":
|
|
710
|
+
if (json === null) {
|
|
711
|
+
value.kind = { case: "nullValue", value: index_js_1.NullValue.NULL_VALUE };
|
|
712
|
+
}
|
|
713
|
+
else if (Array.isArray(json)) {
|
|
714
|
+
const listValue = (0, create_js_1.create)(index_js_1.ListValueSchema);
|
|
715
|
+
listValueFromJson(listValue, json, ctx);
|
|
716
|
+
value.kind = { case: "listValue", value: listValue };
|
|
717
|
+
}
|
|
718
|
+
else {
|
|
719
|
+
const struct = (0, create_js_1.create)(index_js_1.StructSchema);
|
|
720
|
+
structFromJson(struct, json, ctx);
|
|
721
|
+
value.kind = { case: "structValue", value: struct };
|
|
722
|
+
}
|
|
723
|
+
break;
|
|
724
|
+
default:
|
|
725
|
+
throw new Error(`cannot decode message ${value.$typeName} from JSON ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
726
|
+
}
|
|
727
|
+
ctx.depth--;
|
|
728
|
+
return value;
|
|
729
|
+
}
|
|
730
|
+
function listValueFromJson(listValue, json, ctx) {
|
|
731
|
+
if (!Array.isArray(json)) {
|
|
732
|
+
throw new Error(`cannot decode message ${listValue.$typeName} from JSON ${(0, reflect_check_js_1.formatVal)(json)}`);
|
|
733
|
+
}
|
|
734
|
+
for (const e of json) {
|
|
735
|
+
const value = (0, create_js_1.create)(index_js_1.ValueSchema);
|
|
736
|
+
valueFromJson(value, e, ctx);
|
|
737
|
+
listValue.values.push(value);
|
|
738
|
+
}
|
|
739
|
+
}
|