@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,104 @@
|
|
|
1
|
+
export type CursorCliSystemInitEvent = {
|
|
2
|
+
type: "system";
|
|
3
|
+
subtype: "init";
|
|
4
|
+
session_id: string;
|
|
5
|
+
model: string;
|
|
6
|
+
apiKeySource: string;
|
|
7
|
+
permissionMode: string;
|
|
8
|
+
cwd: string;
|
|
9
|
+
};
|
|
10
|
+
export type CursorCliThinkingEvent = {
|
|
11
|
+
type: "thinking";
|
|
12
|
+
subtype: "delta" | "completed";
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
export type CursorCliAssistantEvent = {
|
|
16
|
+
type: "assistant";
|
|
17
|
+
message: {
|
|
18
|
+
content: Array<{
|
|
19
|
+
type: "text";
|
|
20
|
+
text: string;
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type CursorCliToolSuccess = {
|
|
25
|
+
success: {
|
|
26
|
+
exitCode: number;
|
|
27
|
+
stdout: string;
|
|
28
|
+
stderr: string;
|
|
29
|
+
executionTime: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type CursorCliToolRejection = {
|
|
33
|
+
rejected: {
|
|
34
|
+
command: string;
|
|
35
|
+
reason: string;
|
|
36
|
+
isReadonly: boolean;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type CursorCliToolResult = CursorCliToolSuccess | CursorCliToolRejection;
|
|
40
|
+
export type CursorCliToolCallDetails = {
|
|
41
|
+
args?: Record<string, unknown>;
|
|
42
|
+
result?: CursorCliToolResult;
|
|
43
|
+
};
|
|
44
|
+
export type CursorCliToolCallEvent = {
|
|
45
|
+
type: "tool_call";
|
|
46
|
+
subtype: "started" | "completed";
|
|
47
|
+
call_id: string;
|
|
48
|
+
tool_call: Partial<Record<`${string}ToolCall`, CursorCliToolCallDetails>>;
|
|
49
|
+
};
|
|
50
|
+
export type CursorCliUsage = {
|
|
51
|
+
inputTokens: number;
|
|
52
|
+
outputTokens: number;
|
|
53
|
+
cacheReadTokens: number;
|
|
54
|
+
cacheWriteTokens: number;
|
|
55
|
+
};
|
|
56
|
+
export type CursorCliResultEvent = {
|
|
57
|
+
type: "result";
|
|
58
|
+
subtype: "success" | "error";
|
|
59
|
+
result: unknown;
|
|
60
|
+
usage: CursorCliUsage;
|
|
61
|
+
request_id: string;
|
|
62
|
+
duration_ms: number;
|
|
63
|
+
is_error: boolean;
|
|
64
|
+
};
|
|
65
|
+
export type CursorCliMalformedStreamReason = "invalid_json" | "invalid_event" | "line_overflow" | "truncated_tail" | "incomplete_stream";
|
|
66
|
+
export type CursorCliMalformedStreamEvent = {
|
|
67
|
+
type: "malformed_stream";
|
|
68
|
+
kind: "malformed_stream";
|
|
69
|
+
reason: CursorCliMalformedStreamReason;
|
|
70
|
+
message: string;
|
|
71
|
+
};
|
|
72
|
+
export type CursorCliStreamEvent = CursorCliSystemInitEvent | CursorCliThinkingEvent | CursorCliAssistantEvent | CursorCliToolCallEvent | CursorCliResultEvent | CursorCliMalformedStreamEvent;
|
|
73
|
+
export type CursorCliStreamParserOptions = {
|
|
74
|
+
maxPendingBytes?: number;
|
|
75
|
+
maxDiagnostics?: number;
|
|
76
|
+
maxDiagnosticCharacters?: number;
|
|
77
|
+
};
|
|
78
|
+
/** Incrementally parses cursor-agent's stream-json NDJSON stdout dialect. */
|
|
79
|
+
export declare class CursorCliStreamParser {
|
|
80
|
+
readonly maxPendingBytes: number;
|
|
81
|
+
readonly maxDiagnostics: number;
|
|
82
|
+
readonly maxDiagnosticCharacters: number;
|
|
83
|
+
private decoder;
|
|
84
|
+
private readonly byteCounter;
|
|
85
|
+
private pending;
|
|
86
|
+
private pendingBytes;
|
|
87
|
+
private discardingOverflowLine;
|
|
88
|
+
private finalized;
|
|
89
|
+
private sawResult;
|
|
90
|
+
private diagnosticsRing;
|
|
91
|
+
private unknownCount;
|
|
92
|
+
constructor(options?: CursorCliStreamParserOptions);
|
|
93
|
+
get diagnostics(): readonly string[];
|
|
94
|
+
get unknownEventCount(): number;
|
|
95
|
+
push(chunk: Uint8Array): CursorCliStreamEvent[];
|
|
96
|
+
finish(): CursorCliStreamEvent[];
|
|
97
|
+
reset(): void;
|
|
98
|
+
private consumeDecoded;
|
|
99
|
+
private appendPending;
|
|
100
|
+
private parseLine;
|
|
101
|
+
private recordDiagnostic;
|
|
102
|
+
private clearPending;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=stream-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-parser.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/cursor-cli-oauth/stream-parser.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,OAAO,GAAG,WAAW,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE;QACR,OAAO,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAA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AG,oBAAoB,EAAE;IAS/C,MAAM,IAAI,oBAAoB,EAAE;IAwBhC,KAAK,IAAI,IAAI;IAUb,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,SAAS;IA0CjB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,YAAY;CAIpB"}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
const DEFAULT_MAX_PENDING_BYTES = 1024 * 1024;
|
|
2
|
+
const DEFAULT_MAX_DIAGNOSTICS = 20;
|
|
3
|
+
const DEFAULT_MAX_DIAGNOSTIC_CHARACTERS = 2048;
|
|
4
|
+
function record(value) {
|
|
5
|
+
return value !== null && typeof value === "object" && !Array.isArray(value)
|
|
6
|
+
? value
|
|
7
|
+
: undefined;
|
|
8
|
+
}
|
|
9
|
+
function stringValue(value) {
|
|
10
|
+
return typeof value === "string" ? value : undefined;
|
|
11
|
+
}
|
|
12
|
+
function numberValue(value) {
|
|
13
|
+
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
14
|
+
}
|
|
15
|
+
function booleanValue(value) {
|
|
16
|
+
return typeof value === "boolean" ? value : undefined;
|
|
17
|
+
}
|
|
18
|
+
function positiveInteger(value, fallback) {
|
|
19
|
+
return value === undefined || !Number.isFinite(value) || value < 1 ? fallback : Math.floor(value);
|
|
20
|
+
}
|
|
21
|
+
function malformed(reason, message) {
|
|
22
|
+
return { type: "malformed_stream", kind: "malformed_stream", reason, message };
|
|
23
|
+
}
|
|
24
|
+
function parseSystem(value) {
|
|
25
|
+
if (value.subtype !== "init")
|
|
26
|
+
return undefined;
|
|
27
|
+
const sessionId = stringValue(value.session_id);
|
|
28
|
+
const model = stringValue(value.model);
|
|
29
|
+
const apiKeySource = stringValue(value.apiKeySource);
|
|
30
|
+
const permissionMode = stringValue(value.permissionMode);
|
|
31
|
+
const cwd = stringValue(value.cwd);
|
|
32
|
+
if (sessionId === undefined ||
|
|
33
|
+
model === undefined ||
|
|
34
|
+
apiKeySource === undefined ||
|
|
35
|
+
permissionMode === undefined ||
|
|
36
|
+
cwd === undefined) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
return { type: "system", subtype: "init", session_id: sessionId, model, apiKeySource, permissionMode, cwd };
|
|
40
|
+
}
|
|
41
|
+
function parseThinking(value) {
|
|
42
|
+
if (value.subtype !== "delta" && value.subtype !== "completed")
|
|
43
|
+
return undefined;
|
|
44
|
+
const text = value.text === undefined ? "" : stringValue(value.text);
|
|
45
|
+
return text === undefined ? undefined : { type: "thinking", subtype: value.subtype, text };
|
|
46
|
+
}
|
|
47
|
+
function parseAssistant(value) {
|
|
48
|
+
const message = record(value.message);
|
|
49
|
+
if (!message || !Array.isArray(message.content))
|
|
50
|
+
return undefined;
|
|
51
|
+
const content = [];
|
|
52
|
+
for (const item of message.content) {
|
|
53
|
+
const block = record(item);
|
|
54
|
+
if (block?.type !== "text" || typeof block.text !== "string")
|
|
55
|
+
return undefined;
|
|
56
|
+
content.push({ type: "text", text: block.text });
|
|
57
|
+
}
|
|
58
|
+
return { type: "assistant", message: { content } };
|
|
59
|
+
}
|
|
60
|
+
function parseToolResult(value) {
|
|
61
|
+
const result = record(value);
|
|
62
|
+
const success = record(result?.success);
|
|
63
|
+
if (success) {
|
|
64
|
+
const exitCode = numberValue(success.exitCode);
|
|
65
|
+
const stdout = stringValue(success.stdout);
|
|
66
|
+
const stderr = stringValue(success.stderr);
|
|
67
|
+
const executionTime = numberValue(success.executionTime);
|
|
68
|
+
if (exitCode !== undefined && stdout !== undefined && stderr !== undefined && executionTime !== undefined) {
|
|
69
|
+
return { success: { exitCode, stdout, stderr, executionTime } };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const rejected = record(result?.rejected);
|
|
73
|
+
if (rejected) {
|
|
74
|
+
const command = stringValue(rejected.command);
|
|
75
|
+
const reason = stringValue(rejected.reason);
|
|
76
|
+
const isReadonly = booleanValue(rejected.isReadonly);
|
|
77
|
+
if (command !== undefined && reason !== undefined && isReadonly !== undefined) {
|
|
78
|
+
return { rejected: { command, reason, isReadonly } };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
function parseToolCall(value) {
|
|
84
|
+
if (value.subtype !== "started" && value.subtype !== "completed")
|
|
85
|
+
return undefined;
|
|
86
|
+
const callId = stringValue(value.call_id);
|
|
87
|
+
const source = record(value.tool_call);
|
|
88
|
+
if (callId === undefined || !source)
|
|
89
|
+
return undefined;
|
|
90
|
+
const entry = Object.entries(source).find(([key, details]) => key.endsWith("ToolCall") && record(details));
|
|
91
|
+
if (!entry)
|
|
92
|
+
return undefined;
|
|
93
|
+
const [kind, rawDetails] = entry;
|
|
94
|
+
const details = record(rawDetails);
|
|
95
|
+
if (!details)
|
|
96
|
+
return undefined;
|
|
97
|
+
const args = record(details.args);
|
|
98
|
+
const result = parseToolResult(details.result);
|
|
99
|
+
const normalized = {
|
|
100
|
+
...(args ? { args } : {}),
|
|
101
|
+
...(result ? { result } : {}),
|
|
102
|
+
};
|
|
103
|
+
return {
|
|
104
|
+
type: "tool_call",
|
|
105
|
+
subtype: value.subtype,
|
|
106
|
+
call_id: callId,
|
|
107
|
+
tool_call: { [kind]: normalized },
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function parseUsage(value) {
|
|
111
|
+
const usage = record(value);
|
|
112
|
+
if (!usage)
|
|
113
|
+
return undefined;
|
|
114
|
+
const inputTokens = numberValue(usage.inputTokens);
|
|
115
|
+
const outputTokens = numberValue(usage.outputTokens);
|
|
116
|
+
const cacheReadTokens = numberValue(usage.cacheReadTokens);
|
|
117
|
+
const cacheWriteTokens = numberValue(usage.cacheWriteTokens);
|
|
118
|
+
if (inputTokens === undefined ||
|
|
119
|
+
outputTokens === undefined ||
|
|
120
|
+
cacheReadTokens === undefined ||
|
|
121
|
+
cacheWriteTokens === undefined) {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
return { inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens };
|
|
125
|
+
}
|
|
126
|
+
function parseResult(value) {
|
|
127
|
+
if (value.subtype !== "success" && value.subtype !== "error")
|
|
128
|
+
return undefined;
|
|
129
|
+
const usage = parseUsage(value.usage);
|
|
130
|
+
const requestId = stringValue(value.request_id);
|
|
131
|
+
const durationMs = numberValue(value.duration_ms);
|
|
132
|
+
const isError = booleanValue(value.is_error);
|
|
133
|
+
if (usage === undefined || requestId === undefined || durationMs === undefined || isError === undefined) {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
type: "result",
|
|
138
|
+
subtype: value.subtype,
|
|
139
|
+
result: value.result,
|
|
140
|
+
usage,
|
|
141
|
+
request_id: requestId,
|
|
142
|
+
duration_ms: durationMs,
|
|
143
|
+
is_error: isError,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/** Incrementally parses cursor-agent's stream-json NDJSON stdout dialect. */
|
|
147
|
+
export class CursorCliStreamParser {
|
|
148
|
+
constructor(options = {}) {
|
|
149
|
+
this.decoder = new TextDecoder("utf-8", { fatal: false });
|
|
150
|
+
this.byteCounter = new TextEncoder();
|
|
151
|
+
this.pending = "";
|
|
152
|
+
this.pendingBytes = 0;
|
|
153
|
+
this.discardingOverflowLine = false;
|
|
154
|
+
this.finalized = false;
|
|
155
|
+
this.sawResult = false;
|
|
156
|
+
this.diagnosticsRing = [];
|
|
157
|
+
this.unknownCount = 0;
|
|
158
|
+
this.maxPendingBytes = positiveInteger(options.maxPendingBytes, DEFAULT_MAX_PENDING_BYTES);
|
|
159
|
+
this.maxDiagnostics = positiveInteger(options.maxDiagnostics, DEFAULT_MAX_DIAGNOSTICS);
|
|
160
|
+
this.maxDiagnosticCharacters = positiveInteger(options.maxDiagnosticCharacters, DEFAULT_MAX_DIAGNOSTIC_CHARACTERS);
|
|
161
|
+
}
|
|
162
|
+
get diagnostics() {
|
|
163
|
+
return this.diagnosticsRing;
|
|
164
|
+
}
|
|
165
|
+
get unknownEventCount() {
|
|
166
|
+
return this.unknownCount;
|
|
167
|
+
}
|
|
168
|
+
push(chunk) {
|
|
169
|
+
if (this.finalized)
|
|
170
|
+
this.reset();
|
|
171
|
+
try {
|
|
172
|
+
return this.consumeDecoded(this.decoder.decode(chunk, { stream: true }));
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
return [malformed("invalid_event", error instanceof Error ? error.message : "Unable to decode stream chunk")];
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
finish() {
|
|
179
|
+
if (this.finalized)
|
|
180
|
+
return [];
|
|
181
|
+
const events = [];
|
|
182
|
+
try {
|
|
183
|
+
events.push(...this.consumeDecoded(this.decoder.decode()));
|
|
184
|
+
if (this.discardingOverflowLine) {
|
|
185
|
+
this.discardingOverflowLine = false;
|
|
186
|
+
}
|
|
187
|
+
else if (this.pending.length > 0) {
|
|
188
|
+
const tail = this.pending;
|
|
189
|
+
this.clearPending();
|
|
190
|
+
events.push(...this.parseLine(tail, true));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
events.push(malformed("truncated_tail", error instanceof Error ? error.message : "Unable to finalize stream tail"));
|
|
195
|
+
}
|
|
196
|
+
if (!this.sawResult) {
|
|
197
|
+
events.push(malformed("incomplete_stream", "cursor-agent stream ended without a result event"));
|
|
198
|
+
}
|
|
199
|
+
this.finalized = true;
|
|
200
|
+
return events;
|
|
201
|
+
}
|
|
202
|
+
reset() {
|
|
203
|
+
this.decoder = new TextDecoder("utf-8", { fatal: false });
|
|
204
|
+
this.clearPending();
|
|
205
|
+
this.discardingOverflowLine = false;
|
|
206
|
+
this.finalized = false;
|
|
207
|
+
this.sawResult = false;
|
|
208
|
+
this.diagnosticsRing = [];
|
|
209
|
+
this.unknownCount = 0;
|
|
210
|
+
}
|
|
211
|
+
consumeDecoded(decoded) {
|
|
212
|
+
const events = [];
|
|
213
|
+
let start = 0;
|
|
214
|
+
while (start < decoded.length) {
|
|
215
|
+
const newline = decoded.indexOf("\n", start);
|
|
216
|
+
if (newline === -1) {
|
|
217
|
+
this.appendPending(decoded.slice(start), events);
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
this.appendPending(decoded.slice(start, newline), events);
|
|
221
|
+
if (this.discardingOverflowLine) {
|
|
222
|
+
this.discardingOverflowLine = false;
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
const line = this.pending.endsWith("\r") ? this.pending.slice(0, -1) : this.pending;
|
|
226
|
+
this.clearPending();
|
|
227
|
+
events.push(...this.parseLine(line, false));
|
|
228
|
+
}
|
|
229
|
+
start = newline + 1;
|
|
230
|
+
}
|
|
231
|
+
return events;
|
|
232
|
+
}
|
|
233
|
+
appendPending(fragment, events) {
|
|
234
|
+
if (fragment.length === 0 || this.discardingOverflowLine)
|
|
235
|
+
return;
|
|
236
|
+
const fragmentBytes = this.byteCounter.encode(fragment).byteLength;
|
|
237
|
+
if (this.pendingBytes + fragmentBytes > this.maxPendingBytes) {
|
|
238
|
+
this.recordDiagnostic(`${this.pending}${fragment}`);
|
|
239
|
+
this.clearPending();
|
|
240
|
+
this.discardingOverflowLine = true;
|
|
241
|
+
events.push(malformed("line_overflow", `stream line exceeded ${this.maxPendingBytes} bytes`));
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
this.pending += fragment;
|
|
245
|
+
this.pendingBytes += fragmentBytes;
|
|
246
|
+
}
|
|
247
|
+
parseLine(line, tail) {
|
|
248
|
+
if (line.trim().length === 0)
|
|
249
|
+
return [];
|
|
250
|
+
let parsed;
|
|
251
|
+
try {
|
|
252
|
+
parsed = JSON.parse(line);
|
|
253
|
+
}
|
|
254
|
+
catch {
|
|
255
|
+
this.recordDiagnostic(line);
|
|
256
|
+
return [
|
|
257
|
+
malformed(tail ? "truncated_tail" : "invalid_json", tail ? "truncated JSON tail" : "non-JSON stream line"),
|
|
258
|
+
];
|
|
259
|
+
}
|
|
260
|
+
const value = record(parsed);
|
|
261
|
+
if (!value || typeof value.type !== "string") {
|
|
262
|
+
return [malformed("invalid_event", "stream line is not an event object")];
|
|
263
|
+
}
|
|
264
|
+
let event;
|
|
265
|
+
switch (value.type) {
|
|
266
|
+
case "system":
|
|
267
|
+
event = parseSystem(value);
|
|
268
|
+
break;
|
|
269
|
+
case "thinking":
|
|
270
|
+
event = parseThinking(value);
|
|
271
|
+
break;
|
|
272
|
+
case "assistant":
|
|
273
|
+
event = parseAssistant(value);
|
|
274
|
+
break;
|
|
275
|
+
case "tool_call":
|
|
276
|
+
event = parseToolCall(value);
|
|
277
|
+
break;
|
|
278
|
+
case "result":
|
|
279
|
+
event = parseResult(value);
|
|
280
|
+
if (event)
|
|
281
|
+
this.sawResult = true;
|
|
282
|
+
break;
|
|
283
|
+
case "user":
|
|
284
|
+
return [];
|
|
285
|
+
default:
|
|
286
|
+
this.unknownCount++;
|
|
287
|
+
return [];
|
|
288
|
+
}
|
|
289
|
+
return event ? [event] : [malformed("invalid_event", `invalid ${value.type} event`)];
|
|
290
|
+
}
|
|
291
|
+
recordDiagnostic(line) {
|
|
292
|
+
this.diagnosticsRing.push(line.slice(0, this.maxDiagnosticCharacters));
|
|
293
|
+
if (this.diagnosticsRing.length > this.maxDiagnostics)
|
|
294
|
+
this.diagnosticsRing.shift();
|
|
295
|
+
}
|
|
296
|
+
clearPending() {
|
|
297
|
+
this.pending = "";
|
|
298
|
+
this.pendingBytes = 0;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
//# sourceMappingURL=stream-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-parser.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/cursor-cli-oauth/stream-parser.ts"],"names":[],"mappings":"AAmGA,MAAM,yBAAyB,GAAG,IAAI,GAAG,IAAI,CAAC;AAC9C,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,iCAAiC,GAAG,IAAI,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gBACf,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;gBAC7B,MAAM;YACP,KAAK,QAAQ;gBACZ,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;gBAC3B,IAAI,KAAK;oBAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACjC,MAAM;YACP,KAAK,MAAM;gBACV,OAAO,EAAE,CAAC;YACX;gBACC,IAAI,CAAC,YAAY,EAAE,CAAC;gBACpB,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,EAAE,WAAW,KAAK,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;IACtF,CAAC;IAEO,gBAAgB,CAAC,IAAY;QACpC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC;QACvE,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc;YAAE,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IACrF,CAAC;IAEO,YAAY;QACnB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;IACvB,CAAC;CACD","sourcesContent":["export type CursorCliSystemInitEvent = {\n\ttype: \"system\";\n\tsubtype: \"init\";\n\tsession_id: string;\n\tmodel: string;\n\tapiKeySource: string;\n\tpermissionMode: string;\n\tcwd: string;\n};\n\nexport type CursorCliThinkingEvent = {\n\ttype: \"thinking\";\n\tsubtype: \"delta\" | \"completed\";\n\ttext: string;\n};\n\nexport type CursorCliAssistantEvent = {\n\ttype: \"assistant\";\n\tmessage: {\n\t\tcontent: Array<{ type: \"text\"; text: string }>;\n\t};\n};\n\nexport type CursorCliToolSuccess = {\n\tsuccess: {\n\t\texitCode: number;\n\t\tstdout: string;\n\t\tstderr: string;\n\t\texecutionTime: number;\n\t};\n};\n\nexport type CursorCliToolRejection = {\n\trejected: {\n\t\tcommand: string;\n\t\treason: string;\n\t\tisReadonly: boolean;\n\t};\n};\n\nexport type CursorCliToolResult = CursorCliToolSuccess | CursorCliToolRejection;\n\nexport type CursorCliToolCallDetails = {\n\targs?: Record<string, unknown>;\n\tresult?: CursorCliToolResult;\n};\n\nexport type CursorCliToolCallEvent = {\n\ttype: \"tool_call\";\n\tsubtype: \"started\" | \"completed\";\n\tcall_id: string;\n\ttool_call: Partial<Record<`${string}ToolCall`, CursorCliToolCallDetails>>;\n};\n\nexport type CursorCliUsage = {\n\tinputTokens: number;\n\toutputTokens: number;\n\tcacheReadTokens: number;\n\tcacheWriteTokens: number;\n};\n\nexport type CursorCliResultEvent = {\n\ttype: \"result\";\n\tsubtype: \"success\" | \"error\";\n\tresult: unknown;\n\tusage: CursorCliUsage;\n\trequest_id: string;\n\tduration_ms: number;\n\tis_error: boolean;\n};\n\nexport type CursorCliMalformedStreamReason =\n\t| \"invalid_json\"\n\t| \"invalid_event\"\n\t| \"line_overflow\"\n\t| \"truncated_tail\"\n\t| \"incomplete_stream\";\n\nexport type CursorCliMalformedStreamEvent = {\n\ttype: \"malformed_stream\";\n\tkind: \"malformed_stream\";\n\treason: CursorCliMalformedStreamReason;\n\tmessage: string;\n};\n\nexport type CursorCliStreamEvent =\n\t| CursorCliSystemInitEvent\n\t| CursorCliThinkingEvent\n\t| CursorCliAssistantEvent\n\t| CursorCliToolCallEvent\n\t| CursorCliResultEvent\n\t| CursorCliMalformedStreamEvent;\n\nexport type CursorCliStreamParserOptions = {\n\tmaxPendingBytes?: number;\n\tmaxDiagnostics?: number;\n\tmaxDiagnosticCharacters?: number;\n};\n\nconst DEFAULT_MAX_PENDING_BYTES = 1024 * 1024;\nconst DEFAULT_MAX_DIAGNOSTICS = 20;\nconst DEFAULT_MAX_DIAGNOSTIC_CHARACTERS = 2048;\n\nfunction record(value: unknown): Record<string, unknown> | undefined {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value)\n\t\t? (value as Record<string, unknown>)\n\t\t: undefined;\n}\n\nfunction stringValue(value: unknown): string | undefined {\n\treturn typeof value === \"string\" ? value : undefined;\n}\n\nfunction numberValue(value: unknown): number | undefined {\n\treturn typeof value === \"number\" && Number.isFinite(value) ? value : undefined;\n}\n\nfunction booleanValue(value: unknown): boolean | undefined {\n\treturn typeof value === \"boolean\" ? value : undefined;\n}\n\nfunction positiveInteger(value: number | undefined, fallback: number): number {\n\treturn value === undefined || !Number.isFinite(value) || value < 1 ? fallback : Math.floor(value);\n}\n\nfunction malformed(reason: CursorCliMalformedStreamReason, message: string): CursorCliMalformedStreamEvent {\n\treturn { type: \"malformed_stream\", kind: \"malformed_stream\", reason, message };\n}\n\nfunction parseSystem(value: Record<string, unknown>): CursorCliSystemInitEvent | undefined {\n\tif (value.subtype !== \"init\") return undefined;\n\tconst sessionId = stringValue(value.session_id);\n\tconst model = stringValue(value.model);\n\tconst apiKeySource = stringValue(value.apiKeySource);\n\tconst permissionMode = stringValue(value.permissionMode);\n\tconst cwd = stringValue(value.cwd);\n\tif (\n\t\tsessionId === undefined ||\n\t\tmodel === undefined ||\n\t\tapiKeySource === undefined ||\n\t\tpermissionMode === undefined ||\n\t\tcwd === undefined\n\t) {\n\t\treturn undefined;\n\t}\n\treturn { type: \"system\", subtype: \"init\", session_id: sessionId, model, apiKeySource, permissionMode, cwd };\n}\n\nfunction parseThinking(value: Record<string, unknown>): CursorCliThinkingEvent | undefined {\n\tif (value.subtype !== \"delta\" && value.subtype !== \"completed\") return undefined;\n\tconst text = value.text === undefined ? \"\" : stringValue(value.text);\n\treturn text === undefined ? undefined : { type: \"thinking\", subtype: value.subtype, text };\n}\n\nfunction parseAssistant(value: Record<string, unknown>): CursorCliAssistantEvent | undefined {\n\tconst message = record(value.message);\n\tif (!message || !Array.isArray(message.content)) return undefined;\n\tconst content: Array<{ type: \"text\"; text: string }> = [];\n\tfor (const item of message.content) {\n\t\tconst block = record(item);\n\t\tif (block?.type !== \"text\" || typeof block.text !== \"string\") return undefined;\n\t\tcontent.push({ type: \"text\", text: block.text });\n\t}\n\treturn { type: \"assistant\", message: { content } };\n}\n\nfunction parseToolResult(value: unknown): CursorCliToolResult | undefined {\n\tconst result = record(value);\n\tconst success = record(result?.success);\n\tif (success) {\n\t\tconst exitCode = numberValue(success.exitCode);\n\t\tconst stdout = stringValue(success.stdout);\n\t\tconst stderr = stringValue(success.stderr);\n\t\tconst executionTime = numberValue(success.executionTime);\n\t\tif (exitCode !== undefined && stdout !== undefined && stderr !== undefined && executionTime !== undefined) {\n\t\t\treturn { success: { exitCode, stdout, stderr, executionTime } };\n\t\t}\n\t}\n\tconst rejected = record(result?.rejected);\n\tif (rejected) {\n\t\tconst command = stringValue(rejected.command);\n\t\tconst reason = stringValue(rejected.reason);\n\t\tconst isReadonly = booleanValue(rejected.isReadonly);\n\t\tif (command !== undefined && reason !== undefined && isReadonly !== undefined) {\n\t\t\treturn { rejected: { command, reason, isReadonly } };\n\t\t}\n\t}\n\treturn undefined;\n}\n\nfunction parseToolCall(value: Record<string, unknown>): CursorCliToolCallEvent | undefined {\n\tif (value.subtype !== \"started\" && value.subtype !== \"completed\") return undefined;\n\tconst callId = stringValue(value.call_id);\n\tconst source = record(value.tool_call);\n\tif (callId === undefined || !source) return undefined;\n\tconst entry = Object.entries(source).find(([key, details]) => key.endsWith(\"ToolCall\") && record(details));\n\tif (!entry) return undefined;\n\tconst [kind, rawDetails] = entry;\n\tconst details = record(rawDetails);\n\tif (!details) return undefined;\n\tconst args = record(details.args);\n\tconst result = parseToolResult(details.result);\n\tconst normalized: CursorCliToolCallDetails = {\n\t\t...(args ? { args } : {}),\n\t\t...(result ? { result } : {}),\n\t};\n\treturn {\n\t\ttype: \"tool_call\",\n\t\tsubtype: value.subtype,\n\t\tcall_id: callId,\n\t\ttool_call: { [kind]: normalized },\n\t};\n}\n\nfunction parseUsage(value: unknown): CursorCliUsage | undefined {\n\tconst usage = record(value);\n\tif (!usage) return undefined;\n\tconst inputTokens = numberValue(usage.inputTokens);\n\tconst outputTokens = numberValue(usage.outputTokens);\n\tconst cacheReadTokens = numberValue(usage.cacheReadTokens);\n\tconst cacheWriteTokens = numberValue(usage.cacheWriteTokens);\n\tif (\n\t\tinputTokens === undefined ||\n\t\toutputTokens === undefined ||\n\t\tcacheReadTokens === undefined ||\n\t\tcacheWriteTokens === undefined\n\t) {\n\t\treturn undefined;\n\t}\n\treturn { inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens };\n}\n\nfunction parseResult(value: Record<string, unknown>): CursorCliResultEvent | undefined {\n\tif (value.subtype !== \"success\" && value.subtype !== \"error\") return undefined;\n\tconst usage = parseUsage(value.usage);\n\tconst requestId = stringValue(value.request_id);\n\tconst durationMs = numberValue(value.duration_ms);\n\tconst isError = booleanValue(value.is_error);\n\tif (usage === undefined || requestId === undefined || durationMs === undefined || isError === undefined) {\n\t\treturn undefined;\n\t}\n\treturn {\n\t\ttype: \"result\",\n\t\tsubtype: value.subtype,\n\t\tresult: value.result,\n\t\tusage,\n\t\trequest_id: requestId,\n\t\tduration_ms: durationMs,\n\t\tis_error: isError,\n\t};\n}\n\n/** Incrementally parses cursor-agent's stream-json NDJSON stdout dialect. */\nexport class CursorCliStreamParser {\n\treadonly maxPendingBytes: number;\n\treadonly maxDiagnostics: number;\n\treadonly maxDiagnosticCharacters: number;\n\tprivate decoder = new TextDecoder(\"utf-8\", { fatal: false });\n\tprivate readonly byteCounter = new TextEncoder();\n\tprivate pending = \"\";\n\tprivate pendingBytes = 0;\n\tprivate discardingOverflowLine = false;\n\tprivate finalized = false;\n\tprivate sawResult = false;\n\tprivate diagnosticsRing: string[] = [];\n\tprivate unknownCount = 0;\n\n\tconstructor(options: CursorCliStreamParserOptions = {}) {\n\t\tthis.maxPendingBytes = positiveInteger(options.maxPendingBytes, DEFAULT_MAX_PENDING_BYTES);\n\t\tthis.maxDiagnostics = positiveInteger(options.maxDiagnostics, DEFAULT_MAX_DIAGNOSTICS);\n\t\tthis.maxDiagnosticCharacters = positiveInteger(\n\t\t\toptions.maxDiagnosticCharacters,\n\t\t\tDEFAULT_MAX_DIAGNOSTIC_CHARACTERS,\n\t\t);\n\t}\n\n\tget diagnostics(): readonly string[] {\n\t\treturn this.diagnosticsRing;\n\t}\n\n\tget unknownEventCount(): number {\n\t\treturn this.unknownCount;\n\t}\n\n\tpush(chunk: Uint8Array): CursorCliStreamEvent[] {\n\t\tif (this.finalized) this.reset();\n\t\ttry {\n\t\t\treturn this.consumeDecoded(this.decoder.decode(chunk, { stream: true }));\n\t\t} catch (error: unknown) {\n\t\t\treturn [malformed(\"invalid_event\", error instanceof Error ? error.message : \"Unable to decode stream chunk\")];\n\t\t}\n\t}\n\n\tfinish(): CursorCliStreamEvent[] {\n\t\tif (this.finalized) return [];\n\t\tconst events: CursorCliStreamEvent[] = [];\n\t\ttry {\n\t\t\tevents.push(...this.consumeDecoded(this.decoder.decode()));\n\t\t\tif (this.discardingOverflowLine) {\n\t\t\t\tthis.discardingOverflowLine = false;\n\t\t\t} else if (this.pending.length > 0) {\n\t\t\t\tconst tail = this.pending;\n\t\t\t\tthis.clearPending();\n\t\t\t\tevents.push(...this.parseLine(tail, true));\n\t\t\t}\n\t\t} catch (error: unknown) {\n\t\t\tevents.push(\n\t\t\t\tmalformed(\"truncated_tail\", error instanceof Error ? error.message : \"Unable to finalize stream tail\"),\n\t\t\t);\n\t\t}\n\t\tif (!this.sawResult) {\n\t\t\tevents.push(malformed(\"incomplete_stream\", \"cursor-agent stream ended without a result event\"));\n\t\t}\n\t\tthis.finalized = true;\n\t\treturn events;\n\t}\n\n\treset(): void {\n\t\tthis.decoder = new TextDecoder(\"utf-8\", { fatal: false });\n\t\tthis.clearPending();\n\t\tthis.discardingOverflowLine = false;\n\t\tthis.finalized = false;\n\t\tthis.sawResult = false;\n\t\tthis.diagnosticsRing = [];\n\t\tthis.unknownCount = 0;\n\t}\n\n\tprivate consumeDecoded(decoded: string): CursorCliStreamEvent[] {\n\t\tconst events: CursorCliStreamEvent[] = [];\n\t\tlet start = 0;\n\t\twhile (start < decoded.length) {\n\t\t\tconst newline = decoded.indexOf(\"\\n\", start);\n\t\t\tif (newline === -1) {\n\t\t\t\tthis.appendPending(decoded.slice(start), events);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.appendPending(decoded.slice(start, newline), events);\n\t\t\tif (this.discardingOverflowLine) {\n\t\t\t\tthis.discardingOverflowLine = false;\n\t\t\t} else {\n\t\t\t\tconst line = this.pending.endsWith(\"\\r\") ? this.pending.slice(0, -1) : this.pending;\n\t\t\t\tthis.clearPending();\n\t\t\t\tevents.push(...this.parseLine(line, false));\n\t\t\t}\n\t\t\tstart = newline + 1;\n\t\t}\n\t\treturn events;\n\t}\n\n\tprivate appendPending(fragment: string, events: CursorCliStreamEvent[]): void {\n\t\tif (fragment.length === 0 || this.discardingOverflowLine) return;\n\t\tconst fragmentBytes = this.byteCounter.encode(fragment).byteLength;\n\t\tif (this.pendingBytes + fragmentBytes > this.maxPendingBytes) {\n\t\t\tthis.recordDiagnostic(`${this.pending}${fragment}`);\n\t\t\tthis.clearPending();\n\t\t\tthis.discardingOverflowLine = true;\n\t\t\tevents.push(malformed(\"line_overflow\", `stream line exceeded ${this.maxPendingBytes} bytes`));\n\t\t\treturn;\n\t\t}\n\t\tthis.pending += fragment;\n\t\tthis.pendingBytes += fragmentBytes;\n\t}\n\n\tprivate parseLine(line: string, tail: boolean): CursorCliStreamEvent[] {\n\t\tif (line.trim().length === 0) return [];\n\t\tlet parsed: unknown;\n\t\ttry {\n\t\t\tparsed = JSON.parse(line);\n\t\t} catch {\n\t\t\tthis.recordDiagnostic(line);\n\t\t\treturn [\n\t\t\t\tmalformed(tail ? \"truncated_tail\" : \"invalid_json\", tail ? \"truncated JSON tail\" : \"non-JSON stream line\"),\n\t\t\t];\n\t\t}\n\t\tconst value = record(parsed);\n\t\tif (!value || typeof value.type !== \"string\") {\n\t\t\treturn [malformed(\"invalid_event\", \"stream line is not an event object\")];\n\t\t}\n\t\tlet event: CursorCliStreamEvent | undefined;\n\t\tswitch (value.type) {\n\t\t\tcase \"system\":\n\t\t\t\tevent = parseSystem(value);\n\t\t\t\tbreak;\n\t\t\tcase \"thinking\":\n\t\t\t\tevent = parseThinking(value);\n\t\t\t\tbreak;\n\t\t\tcase \"assistant\":\n\t\t\t\tevent = parseAssistant(value);\n\t\t\t\tbreak;\n\t\t\tcase \"tool_call\":\n\t\t\t\tevent = parseToolCall(value);\n\t\t\t\tbreak;\n\t\t\tcase \"result\":\n\t\t\t\tevent = parseResult(value);\n\t\t\t\tif (event) this.sawResult = true;\n\t\t\t\tbreak;\n\t\t\tcase \"user\":\n\t\t\t\treturn [];\n\t\t\tdefault:\n\t\t\t\tthis.unknownCount++;\n\t\t\t\treturn [];\n\t\t}\n\t\treturn event ? [event] : [malformed(\"invalid_event\", `invalid ${value.type} event`)];\n\t}\n\n\tprivate recordDiagnostic(line: string): void {\n\t\tthis.diagnosticsRing.push(line.slice(0, this.maxDiagnosticCharacters));\n\t\tif (this.diagnosticsRing.length > this.maxDiagnostics) this.diagnosticsRing.shift();\n\t}\n\n\tprivate clearPending(): void {\n\t\tthis.pending = \"\";\n\t\tthis.pendingBytes = 0;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Api, type AssistantMessageEventStream, type Context, type CredentialStore, type Model, type SimpleStreamOptions } from "@earendil-works/pi-ai";
|
|
2
|
+
import { type CursorAgentExecutableDeps } from "./executable.ts";
|
|
3
|
+
import { type CursorCliOauthConfig } from "./oauth-login.ts";
|
|
4
|
+
import { type CursorCliSessionRouter } from "./session-router.ts";
|
|
5
|
+
import { type CursorCliOauthProviderSettings } from "./settings.ts";
|
|
6
|
+
export { CURSOR_CLI_OAUTH_PROVIDER_ID } from "./oauth-login.ts";
|
|
7
|
+
/** Injectable seams so tests stay hermetic; every default is re-resolved per turn. */
|
|
8
|
+
export type CursorCliStreamDeps = {
|
|
9
|
+
readonly cwd?: string;
|
|
10
|
+
readonly agentDir?: string;
|
|
11
|
+
readonly store?: CredentialStore;
|
|
12
|
+
readonly settings?: CursorCliOauthProviderSettings;
|
|
13
|
+
readonly router?: CursorCliSessionRouter;
|
|
14
|
+
readonly oauth?: Pick<CursorCliOauthConfig, "refreshToken">;
|
|
15
|
+
readonly now?: () => number;
|
|
16
|
+
/** Credential-home log line sink; receives byte lengths only, never token material. */
|
|
17
|
+
readonly log?: (line: string) => void;
|
|
18
|
+
readonly executableDeps?: CursorAgentExecutableDeps;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Streams one Cursor CLI print-mode turn onto senpi's assistant event stream.
|
|
22
|
+
* The CLI owns tool execution; senpi owns the context and reports only its own
|
|
23
|
+
* token estimates, so no CLI-side number ever feeds compaction accounting.
|
|
24
|
+
*/
|
|
25
|
+
export declare function streamCursorCliOauth(model: Model<Api>, context: Context, options?: SimpleStreamOptions, deps?: CursorCliStreamDeps): AssistantMessageEventStream;
|
|
26
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/cursor-cli-oauth/stream.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,GAAG,EAER,KAAK,2BAA2B,EAChC,KAAK,OAAO,EACZ,KAAK,eAAe,EAIpB,KAAK,KAAK,EACV,KAAK,mBAAmB,EACxB,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EACN,KAAK,yBAAyB,EAG9B,MAAM,iBAAiB,CAAC;AASzB,OAAO,EAEN,KAAK,oBAAoB,EAGzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGN,KAAK,sBAAsB,EAG3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,8BAA8B,EAA8C,MAAM,eAAe,CAAC;AAIhH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