@code-yeongyu/senpi 2026.8.16 → 2026.8.18
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 +74 -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 +31 -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 +298 -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 +69 -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 +77 -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 +361 -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 +37 -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 +196 -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.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +13 -7
- 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 +52 -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 +26 -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/baseten.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/providers/data/xai.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,11 @@
|
|
|
1
|
+
import type { Agent, AgentTool, AgentToolCall, BeforeToolCallResult } from "@earendil-works/pi-agent-core";
|
|
2
|
+
type CursorBridgeAgent = Pick<Agent, "emitExternalEvent" | "signal">;
|
|
3
|
+
export interface CursorExecBridgeSession {
|
|
4
|
+
getRegisteredTool(name: string): AgentTool | undefined;
|
|
5
|
+
preflightToolCall(toolCall: AgentToolCall, args: unknown): Promise<BeforeToolCallResult | undefined>;
|
|
6
|
+
}
|
|
7
|
+
export declare function createSessionCursorExecBridge(sessionRef: {
|
|
8
|
+
current?: CursorExecBridgeSession;
|
|
9
|
+
}, getAgent: () => CursorBridgeAgent): import("@earendil-works/pi-ai").CursorExecHandlers;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=cursor-exec-bridge-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-exec-bridge-session.d.ts","sourceRoot":"","sources":["../../src/core/cursor-exec-bridge-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAc,SAAS,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGvH,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,EAAE,mBAAmB,GAAG,QAAQ,CAAC,CAAC;AAErE,MAAM,WAAW,uBAAuB;IACvC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IACvD,iBAAiB,CAAC,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAAC;CACrG;AAED,wBAAgB,6BAA6B,CAC5C,UAAU,EAAE;IAAE,OAAO,CAAC,EAAE,uBAAuB,CAAA;CAAE,EACjD,QAAQ,EAAE,MAAM,iBAAiB,sDAmBjC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createCursorExecBridge } from "./cursor-exec-bridge.js";
|
|
2
|
+
export function createSessionCursorExecBridge(sessionRef, getAgent) {
|
|
3
|
+
return createCursorExecBridge({
|
|
4
|
+
getTool: (name) => sessionRef.current?.getRegisteredTool(name),
|
|
5
|
+
preflightToolCall: async (event) => sessionRef.current?.preflightToolCall({
|
|
6
|
+
type: "toolCall",
|
|
7
|
+
id: event.toolCallId,
|
|
8
|
+
name: event.toolName,
|
|
9
|
+
arguments: event.input,
|
|
10
|
+
}, event.input),
|
|
11
|
+
emitEvent: (event) => {
|
|
12
|
+
void getAgent().emitExternalEvent(event);
|
|
13
|
+
},
|
|
14
|
+
getAbortSignal: () => getAgent().signal,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=cursor-exec-bridge-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-exec-bridge-session.js","sourceRoot":"","sources":["../../src/core/cursor-exec-bridge-session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AASjE,MAAM,UAAU,6BAA6B,CAC5C,UAAiD,EACjD,QAAiC;IAEjC,OAAO,sBAAsB,CAAC;QAC7B,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,CAAC;QAC9D,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAClC,UAAU,CAAC,OAAO,EAAE,iBAAiB,CACpC;YACC,IAAI,EAAE,UAAU;YAChB,EAAE,EAAE,KAAK,CAAC,UAAU;YACpB,IAAI,EAAE,KAAK,CAAC,QAAQ;YACpB,SAAS,EAAE,KAAK,CAAC,KAAK;SACtB,EACD,KAAK,CAAC,KAAK,CACX;QACF,SAAS,EAAE,CAAC,KAAiB,EAAE,EAAE;YAChC,KAAK,QAAQ,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC;QACD,cAAc,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM;KACvC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import type { Agent, AgentEvent, AgentTool, AgentToolCall, BeforeToolCallResult } from \"@earendil-works/pi-agent-core\";\nimport { createCursorExecBridge } from \"./cursor-exec-bridge.ts\";\n\ntype CursorBridgeAgent = Pick<Agent, \"emitExternalEvent\" | \"signal\">;\n\nexport interface CursorExecBridgeSession {\n\tgetRegisteredTool(name: string): AgentTool | undefined;\n\tpreflightToolCall(toolCall: AgentToolCall, args: unknown): Promise<BeforeToolCallResult | undefined>;\n}\n\nexport function createSessionCursorExecBridge(\n\tsessionRef: { current?: CursorExecBridgeSession },\n\tgetAgent: () => CursorBridgeAgent,\n) {\n\treturn createCursorExecBridge({\n\t\tgetTool: (name) => sessionRef.current?.getRegisteredTool(name),\n\t\tpreflightToolCall: async (event) =>\n\t\t\tsessionRef.current?.preflightToolCall(\n\t\t\t\t{\n\t\t\t\t\ttype: \"toolCall\",\n\t\t\t\t\tid: event.toolCallId,\n\t\t\t\t\tname: event.toolName,\n\t\t\t\t\targuments: event.input,\n\t\t\t\t},\n\t\t\t\tevent.input,\n\t\t\t),\n\t\temitEvent: (event: AgentEvent) => {\n\t\t\tvoid getAgent().emitExternalEvent(event);\n\t\t},\n\t\tgetAbortSignal: () => getAgent().signal,\n\t});\n}\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor exec-channel → local tool bridge.
|
|
3
|
+
*
|
|
4
|
+
* Cursor's agent protocol executes tools server-drivenly: mid-stream, the
|
|
5
|
+
* server sends exec frames and blocks until the client answers in band. The
|
|
6
|
+
* `cursor-agent` API dispatches those frames onto this bridge, which maps
|
|
7
|
+
* each frame's args onto the session's real tools (`read`, `bash`, `edit`,
|
|
8
|
+
* `write`, `grep`, `find`, `ls`, plus MCP/extension tools by name) and runs
|
|
9
|
+
* them through the same wrapped `AgentTool.execute` path model-issued calls
|
|
10
|
+
* use — so approvals, sandboxing, truncation, and rendering behavior stay
|
|
11
|
+
* identical.
|
|
12
|
+
*
|
|
13
|
+
* The arg translations here MUST mirror the display blocks the API
|
|
14
|
+
* synthesizes (`synthesizeCursorExecToolCall` call sites): the transcript
|
|
15
|
+
* shows one operation, so a different one must not run.
|
|
16
|
+
*/
|
|
17
|
+
import type { AgentEvent, AgentTool } from "@earendil-works/pi-agent-core";
|
|
18
|
+
import { type CursorExecHandlers } from "@earendil-works/pi-ai";
|
|
19
|
+
import type { ToolCallEvent, ToolCallEventResult } from "./extensions/types.ts";
|
|
20
|
+
export interface CursorExecBridgeOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Resolve an executable tool by name. Backed by the session's full tool
|
|
23
|
+
* registry (builtin + extension tools), not only the active set: Cursor
|
|
24
|
+
* drives its native tools (read/bash/grep/ls/write) over the exec channel
|
|
25
|
+
* regardless of which tools the request advertised.
|
|
26
|
+
*/
|
|
27
|
+
getTool: (name: string) => AgentTool | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Surface tool lifecycle events to the host UI. Bridge-run tools bypass
|
|
30
|
+
* the agent loop's executor, so without these the live tool card for a
|
|
31
|
+
* synthesized call never resolves.
|
|
32
|
+
*/
|
|
33
|
+
emitEvent?: (event: AgentEvent) => void;
|
|
34
|
+
/** Run the session's vetoable extension preflight before tool execution. */
|
|
35
|
+
preflightToolCall?: (event: ToolCallEvent) => Promise<ToolCallEventResult | undefined>;
|
|
36
|
+
/** Abort signal for in-flight bridge executions (the active run's signal). */
|
|
37
|
+
getAbortSignal?: () => AbortSignal | undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Build the exec handlers passed to the `cursor-agent` API through the agent
|
|
41
|
+
* loop config. Handlers return bare `ToolResultMessage`s; the API derives the
|
|
42
|
+
* wire protobuf answer from them and pairs the transcript result.
|
|
43
|
+
*
|
|
44
|
+
* Deliberately absent handlers (the API answers with a typed refusal):
|
|
45
|
+
* - `delete`: senpi has no delete tool and the bridge must not mutate the
|
|
46
|
+
* filesystem outside the tool/approval path.
|
|
47
|
+
* - `diagnostics`: no LSP tool in this fork.
|
|
48
|
+
* - `mcpApprovalPreflight`: approval decisions cannot be resolved without an
|
|
49
|
+
* interactive prompt, so smart-mode probes are conservatively refused.
|
|
50
|
+
*/
|
|
51
|
+
export declare function createCursorExecBridge(options: CursorExecBridgeOptions): CursorExecHandlers;
|
|
52
|
+
//# sourceMappingURL=cursor-exec-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-exec-bridge.d.ts","sourceRoot":"","sources":["../../src/core/cursor-exec-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAiB,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EACN,KAAK,kBAAkB,EASvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,MAAM,WAAW,uBAAuB;IACvC;;;;;OAKG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,CAAC;IACjD;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAAC;IACvF,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,WAAW,GAAG,SAAS,CAAC;CAC/C;AA4GD;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,uBAAuB,GAAG,kBAAkB,CA0F3F"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor exec-channel → local tool bridge.
|
|
3
|
+
*
|
|
4
|
+
* Cursor's agent protocol executes tools server-drivenly: mid-stream, the
|
|
5
|
+
* server sends exec frames and blocks until the client answers in band. The
|
|
6
|
+
* `cursor-agent` API dispatches those frames onto this bridge, which maps
|
|
7
|
+
* each frame's args onto the session's real tools (`read`, `bash`, `edit`,
|
|
8
|
+
* `write`, `grep`, `find`, `ls`, plus MCP/extension tools by name) and runs
|
|
9
|
+
* them through the same wrapped `AgentTool.execute` path model-issued calls
|
|
10
|
+
* use — so approvals, sandboxing, truncation, and rendering behavior stay
|
|
11
|
+
* identical.
|
|
12
|
+
*
|
|
13
|
+
* The arg translations here MUST mirror the display blocks the API
|
|
14
|
+
* synthesizes (`synthesizeCursorExecToolCall` call sites): the transcript
|
|
15
|
+
* shows one operation, so a different one must not run.
|
|
16
|
+
*/
|
|
17
|
+
import { composeCursorShellCommand, cursorPiLimit, cursorPiLsPath, cursorPiReadArgs, cursorPiTimeout, omitUndefinedCursorArgs, validateToolArguments, } from "@earendil-works/pi-ai";
|
|
18
|
+
function isRecord(value) {
|
|
19
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20
|
+
}
|
|
21
|
+
function errorResult(toolCallId, toolName, text) {
|
|
22
|
+
return {
|
|
23
|
+
role: "toolResult",
|
|
24
|
+
toolCallId,
|
|
25
|
+
toolName,
|
|
26
|
+
content: [{ type: "text", text }],
|
|
27
|
+
isError: true,
|
|
28
|
+
timestamp: Date.now(),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function emptyResult(toolCallId, toolName) {
|
|
32
|
+
return {
|
|
33
|
+
role: "toolResult",
|
|
34
|
+
toolCallId,
|
|
35
|
+
toolName,
|
|
36
|
+
content: [{ type: "text", text: "" }],
|
|
37
|
+
isError: false,
|
|
38
|
+
timestamp: Date.now(),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
async function executeTool(options, toolName, toolCallId, args) {
|
|
42
|
+
const tool = options.getTool(toolName);
|
|
43
|
+
if (!tool) {
|
|
44
|
+
return errorResult(toolCallId, toolName, `Tool "${toolName}" is not available in this session`);
|
|
45
|
+
}
|
|
46
|
+
// Exec-frame translators write forms like `path: args.path || undefined`;
|
|
47
|
+
// a present `undefined` fails schema validation on optional fields even
|
|
48
|
+
// though omitting the key is valid.
|
|
49
|
+
const cleanArgs = omitUndefinedCursorArgs(args);
|
|
50
|
+
const toolCall = {
|
|
51
|
+
type: "toolCall",
|
|
52
|
+
id: toolCallId,
|
|
53
|
+
name: toolName,
|
|
54
|
+
arguments: cleanArgs,
|
|
55
|
+
};
|
|
56
|
+
let params;
|
|
57
|
+
try {
|
|
58
|
+
params = validateToolArguments(tool, toolCall);
|
|
59
|
+
if (tool.prepareArguments) {
|
|
60
|
+
params = tool.prepareArguments(params);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
return errorResult(toolCallId, toolName, error instanceof Error ? error.message : String(error));
|
|
65
|
+
}
|
|
66
|
+
options.emitEvent?.({ type: "tool_execution_start", toolCallId, toolName, args: cleanArgs });
|
|
67
|
+
try {
|
|
68
|
+
if (!isRecord(params)) {
|
|
69
|
+
throw new Error(`Tool "${toolName}" prepared non-object arguments`);
|
|
70
|
+
}
|
|
71
|
+
const preflight = await options.preflightToolCall?.({
|
|
72
|
+
type: "tool_call",
|
|
73
|
+
toolCallId,
|
|
74
|
+
toolName,
|
|
75
|
+
input: params,
|
|
76
|
+
});
|
|
77
|
+
if (preflight?.block) {
|
|
78
|
+
const message = preflight.reason || "Tool execution was blocked";
|
|
79
|
+
options.emitEvent?.({
|
|
80
|
+
type: "tool_execution_end",
|
|
81
|
+
toolCallId,
|
|
82
|
+
toolName,
|
|
83
|
+
result: { content: [{ type: "text", text: message }], details: undefined },
|
|
84
|
+
isError: true,
|
|
85
|
+
});
|
|
86
|
+
return errorResult(toolCallId, toolName, message);
|
|
87
|
+
}
|
|
88
|
+
const result = await tool.execute(toolCallId, params, options.getAbortSignal?.(), undefined);
|
|
89
|
+
const toolResult = {
|
|
90
|
+
role: "toolResult",
|
|
91
|
+
toolCallId,
|
|
92
|
+
toolName,
|
|
93
|
+
content: result.content ?? [],
|
|
94
|
+
details: result.details,
|
|
95
|
+
usage: result.usage,
|
|
96
|
+
isError: false,
|
|
97
|
+
timestamp: Date.now(),
|
|
98
|
+
};
|
|
99
|
+
options.emitEvent?.({ type: "tool_execution_end", toolCallId, toolName, result, isError: false });
|
|
100
|
+
return toolResult;
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
104
|
+
options.emitEvent?.({
|
|
105
|
+
type: "tool_execution_end",
|
|
106
|
+
toolCallId,
|
|
107
|
+
toolName,
|
|
108
|
+
result: { content: [{ type: "text", text: message }], details: undefined },
|
|
109
|
+
isError: true,
|
|
110
|
+
});
|
|
111
|
+
return errorResult(toolCallId, toolName, message);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Build the exec handlers passed to the `cursor-agent` API through the agent
|
|
116
|
+
* loop config. Handlers return bare `ToolResultMessage`s; the API derives the
|
|
117
|
+
* wire protobuf answer from them and pairs the transcript result.
|
|
118
|
+
*
|
|
119
|
+
* Deliberately absent handlers (the API answers with a typed refusal):
|
|
120
|
+
* - `delete`: senpi has no delete tool and the bridge must not mutate the
|
|
121
|
+
* filesystem outside the tool/approval path.
|
|
122
|
+
* - `diagnostics`: no LSP tool in this fork.
|
|
123
|
+
* - `mcpApprovalPreflight`: approval decisions cannot be resolved without an
|
|
124
|
+
* interactive prompt, so smart-mode probes are conservatively refused.
|
|
125
|
+
*/
|
|
126
|
+
export function createCursorExecBridge(options) {
|
|
127
|
+
return {
|
|
128
|
+
read: async (args) => executeTool(options, "read", args.toolCallId, {
|
|
129
|
+
path: args.path,
|
|
130
|
+
offset: args.offset,
|
|
131
|
+
limit: args.limit,
|
|
132
|
+
}),
|
|
133
|
+
ls: async (args) => executeTool(options, "ls", args.toolCallId, { path: cursorPiLsPath(args.path) }),
|
|
134
|
+
grep: async (args) => executeTool(options, "grep", args.toolCallId, {
|
|
135
|
+
pattern: args.pattern,
|
|
136
|
+
path: args.path || undefined,
|
|
137
|
+
glob: args.glob || undefined,
|
|
138
|
+
ignoreCase: args.caseInsensitive === true ? true : undefined,
|
|
139
|
+
}),
|
|
140
|
+
write: async (args) => executeTool(options, "write", args.toolCallId, {
|
|
141
|
+
path: args.path,
|
|
142
|
+
content: args.fileText ?? new TextDecoder().decode(args.fileBytes ?? new Uint8Array()),
|
|
143
|
+
}),
|
|
144
|
+
shell: async (args) => executeTool(options, "bash", args.toolCallId, {
|
|
145
|
+
command: composeCursorShellCommand(args.command, args.workingDirectory || undefined),
|
|
146
|
+
timeout: args.timeout && args.timeout > 0 ? args.timeout : undefined,
|
|
147
|
+
}),
|
|
148
|
+
mcp: async (call) => {
|
|
149
|
+
const toolName = call.toolName || call.name;
|
|
150
|
+
const tool = options.getTool(toolName);
|
|
151
|
+
if (!tool) {
|
|
152
|
+
return errorResult(call.toolCallId, toolName, `Tool "${toolName}" is not registered in this session`);
|
|
153
|
+
}
|
|
154
|
+
return executeTool(options, toolName, call.toolCallId, call.args);
|
|
155
|
+
},
|
|
156
|
+
piRead: async (call) => {
|
|
157
|
+
const readArgs = cursorPiReadArgs(call.args.path, call.args.offset, call.args.limit);
|
|
158
|
+
// A present `limit: 0` reads zero lines; answer with empty output
|
|
159
|
+
// without running the tool rather than degrading into a full read.
|
|
160
|
+
if (readArgs === null)
|
|
161
|
+
return emptyResult(call.toolCallId, "read");
|
|
162
|
+
return executeTool(options, "read", call.toolCallId, readArgs);
|
|
163
|
+
},
|
|
164
|
+
piBash: async (call) => executeTool(options, "bash", call.toolCallId, {
|
|
165
|
+
command: call.args.command,
|
|
166
|
+
timeout: cursorPiTimeout(call.args.timeout),
|
|
167
|
+
}),
|
|
168
|
+
piEdit: async (call) => executeTool(options, "edit", call.toolCallId, {
|
|
169
|
+
path: call.args.path,
|
|
170
|
+
edits: call.args.edits.map((edit) => ({ oldText: edit.oldText, newText: edit.newText })),
|
|
171
|
+
}),
|
|
172
|
+
piWrite: async (call) => executeTool(options, "write", call.toolCallId, {
|
|
173
|
+
path: call.args.path,
|
|
174
|
+
content: call.args.content,
|
|
175
|
+
}),
|
|
176
|
+
piGrep: async (call) => executeTool(options, "grep", call.toolCallId, {
|
|
177
|
+
pattern: call.args.pattern,
|
|
178
|
+
path: call.args.path || undefined,
|
|
179
|
+
glob: call.args.glob || undefined,
|
|
180
|
+
ignoreCase: call.args.ignoreCase === true ? true : undefined,
|
|
181
|
+
literal: call.args.literal === true ? true : undefined,
|
|
182
|
+
context: call.args.context,
|
|
183
|
+
limit: cursorPiLimit(call.args.limit),
|
|
184
|
+
}),
|
|
185
|
+
piFind: async (call) => executeTool(options, "find", call.toolCallId, {
|
|
186
|
+
pattern: call.args.pattern,
|
|
187
|
+
path: call.args.path || undefined,
|
|
188
|
+
limit: cursorPiLimit(call.args.limit),
|
|
189
|
+
}),
|
|
190
|
+
piLs: async (call) => executeTool(options, "ls", call.toolCallId, {
|
|
191
|
+
path: cursorPiLsPath(call.args.path),
|
|
192
|
+
limit: cursorPiLimit(call.args.limit),
|
|
193
|
+
}),
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=cursor-exec-bridge.js.map
|
|
@@ -0,0 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AE,IAAI,CAAC,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;YAC5D,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;YACtD,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO;YAC1B,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;SACrC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CACtB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE;YAC7C,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO;YAC1B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,SAAS;YACjC,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;SACrC,CAAC;QAEH,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CACpB,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE;YAC3C,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACpC,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;SACrC,CAAC;KACH,CAAC;AACH,CAAC","sourcesContent":["/**\n * Cursor exec-channel → local tool bridge.\n *\n * Cursor's agent protocol executes tools server-drivenly: mid-stream, the\n * server sends exec frames and blocks until the client answers in band. The\n * `cursor-agent` API dispatches those frames onto this bridge, which maps\n * each frame's args onto the session's real tools (`read`, `bash`, `edit`,\n * `write`, `grep`, `find`, `ls`, plus MCP/extension tools by name) and runs\n * them through the same wrapped `AgentTool.execute` path model-issued calls\n * use — so approvals, sandboxing, truncation, and rendering behavior stay\n * identical.\n *\n * The arg translations here MUST mirror the display blocks the API\n * synthesizes (`synthesizeCursorExecToolCall` call sites): the transcript\n * shows one operation, so a different one must not run.\n */\n\nimport type { AgentEvent, AgentTool, AgentToolCall } from \"@earendil-works/pi-agent-core\";\nimport {\n\ttype CursorExecHandlers,\n\tcomposeCursorShellCommand,\n\tcursorPiLimit,\n\tcursorPiLsPath,\n\tcursorPiReadArgs,\n\tcursorPiTimeout,\n\tomitUndefinedCursorArgs,\n\ttype ToolResultMessage,\n\tvalidateToolArguments,\n} from \"@earendil-works/pi-ai\";\nimport type { ToolCallEvent, ToolCallEventResult } from \"./extensions/types.ts\";\n\nexport interface CursorExecBridgeOptions {\n\t/**\n\t * Resolve an executable tool by name. Backed by the session's full tool\n\t * registry (builtin + extension tools), not only the active set: Cursor\n\t * drives its native tools (read/bash/grep/ls/write) over the exec channel\n\t * regardless of which tools the request advertised.\n\t */\n\tgetTool: (name: string) => AgentTool | undefined;\n\t/**\n\t * Surface tool lifecycle events to the host UI. Bridge-run tools bypass\n\t * the agent loop's executor, so without these the live tool card for a\n\t * synthesized call never resolves.\n\t */\n\temitEvent?: (event: AgentEvent) => void;\n\t/** Run the session's vetoable extension preflight before tool execution. */\n\tpreflightToolCall?: (event: ToolCallEvent) => Promise<ToolCallEventResult | undefined>;\n\t/** Abort signal for in-flight bridge executions (the active run's signal). */\n\tgetAbortSignal?: () => AbortSignal | undefined;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction errorResult(toolCallId: string, toolName: string, text: string): ToolResultMessage {\n\treturn {\n\t\trole: \"toolResult\",\n\t\ttoolCallId,\n\t\ttoolName,\n\t\tcontent: [{ type: \"text\", text }],\n\t\tisError: true,\n\t\ttimestamp: Date.now(),\n\t};\n}\n\nfunction emptyResult(toolCallId: string, toolName: string): ToolResultMessage {\n\treturn {\n\t\trole: \"toolResult\",\n\t\ttoolCallId,\n\t\ttoolName,\n\t\tcontent: [{ type: \"text\", text: \"\" }],\n\t\tisError: false,\n\t\ttimestamp: Date.now(),\n\t};\n}\n\nasync function executeTool(\n\toptions: CursorExecBridgeOptions,\n\ttoolName: string,\n\ttoolCallId: string,\n\targs: Record<string, unknown>,\n): Promise<ToolResultMessage> {\n\tconst tool = options.getTool(toolName);\n\tif (!tool) {\n\t\treturn errorResult(toolCallId, toolName, `Tool \"${toolName}\" is not available in this session`);\n\t}\n\n\t// Exec-frame translators write forms like `path: args.path || undefined`;\n\t// a present `undefined` fails schema validation on optional fields even\n\t// though omitting the key is valid.\n\tconst cleanArgs = omitUndefinedCursorArgs(args);\n\tconst toolCall: AgentToolCall = {\n\t\ttype: \"toolCall\",\n\t\tid: toolCallId,\n\t\tname: toolName,\n\t\targuments: cleanArgs,\n\t};\n\n\tlet params: unknown;\n\ttry {\n\t\tparams = validateToolArguments(tool, toolCall);\n\t\tif (tool.prepareArguments) {\n\t\t\tparams = tool.prepareArguments(params);\n\t\t}\n\t} catch (error) {\n\t\treturn errorResult(toolCallId, toolName, error instanceof Error ? error.message : String(error));\n\t}\n\n\toptions.emitEvent?.({ type: \"tool_execution_start\", toolCallId, toolName, args: cleanArgs });\n\ttry {\n\t\tif (!isRecord(params)) {\n\t\t\tthrow new Error(`Tool \"${toolName}\" prepared non-object arguments`);\n\t\t}\n\t\tconst preflight = await options.preflightToolCall?.({\n\t\t\ttype: \"tool_call\",\n\t\t\ttoolCallId,\n\t\t\ttoolName,\n\t\t\tinput: params,\n\t\t});\n\t\tif (preflight?.block) {\n\t\t\tconst message = preflight.reason || \"Tool execution was blocked\";\n\t\t\toptions.emitEvent?.({\n\t\t\t\ttype: \"tool_execution_end\",\n\t\t\t\ttoolCallId,\n\t\t\t\ttoolName,\n\t\t\t\tresult: { content: [{ type: \"text\", text: message }], details: undefined },\n\t\t\t\tisError: true,\n\t\t\t});\n\t\t\treturn errorResult(toolCallId, toolName, message);\n\t\t}\n\t\tconst result = await tool.execute(toolCallId, params, options.getAbortSignal?.(), undefined);\n\t\tconst toolResult: ToolResultMessage = {\n\t\t\trole: \"toolResult\",\n\t\t\ttoolCallId,\n\t\t\ttoolName,\n\t\t\tcontent: result.content ?? [],\n\t\t\tdetails: result.details,\n\t\t\tusage: result.usage,\n\t\t\tisError: false,\n\t\t\ttimestamp: Date.now(),\n\t\t};\n\t\toptions.emitEvent?.({ type: \"tool_execution_end\", toolCallId, toolName, result, isError: false });\n\t\treturn toolResult;\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\toptions.emitEvent?.({\n\t\t\ttype: \"tool_execution_end\",\n\t\t\ttoolCallId,\n\t\t\ttoolName,\n\t\t\tresult: { content: [{ type: \"text\", text: message }], details: undefined },\n\t\t\tisError: true,\n\t\t});\n\t\treturn errorResult(toolCallId, toolName, message);\n\t}\n}\n\n/**\n * Build the exec handlers passed to the `cursor-agent` API through the agent\n * loop config. Handlers return bare `ToolResultMessage`s; the API derives the\n * wire protobuf answer from them and pairs the transcript result.\n *\n * Deliberately absent handlers (the API answers with a typed refusal):\n * - `delete`: senpi has no delete tool and the bridge must not mutate the\n * filesystem outside the tool/approval path.\n * - `diagnostics`: no LSP tool in this fork.\n * - `mcpApprovalPreflight`: approval decisions cannot be resolved without an\n * interactive prompt, so smart-mode probes are conservatively refused.\n */\nexport function createCursorExecBridge(options: CursorExecBridgeOptions): CursorExecHandlers {\n\treturn {\n\t\tread: async (args) =>\n\t\t\texecuteTool(options, \"read\", args.toolCallId, {\n\t\t\t\tpath: args.path,\n\t\t\t\toffset: args.offset,\n\t\t\t\tlimit: args.limit,\n\t\t\t}),\n\n\t\tls: async (args) => executeTool(options, \"ls\", args.toolCallId, { path: cursorPiLsPath(args.path) }),\n\n\t\tgrep: async (args) =>\n\t\t\texecuteTool(options, \"grep\", args.toolCallId, {\n\t\t\t\tpattern: args.pattern,\n\t\t\t\tpath: args.path || undefined,\n\t\t\t\tglob: args.glob || undefined,\n\t\t\t\tignoreCase: args.caseInsensitive === true ? true : undefined,\n\t\t\t}),\n\n\t\twrite: async (args) =>\n\t\t\texecuteTool(options, \"write\", args.toolCallId, {\n\t\t\t\tpath: args.path,\n\t\t\t\tcontent: args.fileText ?? new TextDecoder().decode(args.fileBytes ?? new Uint8Array()),\n\t\t\t}),\n\n\t\tshell: async (args) =>\n\t\t\texecuteTool(options, \"bash\", args.toolCallId, {\n\t\t\t\tcommand: composeCursorShellCommand(args.command, args.workingDirectory || undefined),\n\t\t\t\ttimeout: args.timeout && args.timeout > 0 ? args.timeout : undefined,\n\t\t\t}),\n\n\t\tmcp: async (call) => {\n\t\t\tconst toolName = call.toolName || call.name;\n\t\t\tconst tool = options.getTool(toolName);\n\t\t\tif (!tool) {\n\t\t\t\treturn errorResult(call.toolCallId, toolName, `Tool \"${toolName}\" is not registered in this session`);\n\t\t\t}\n\t\t\treturn executeTool(options, toolName, call.toolCallId, call.args);\n\t\t},\n\n\t\tpiRead: async (call) => {\n\t\t\tconst readArgs = cursorPiReadArgs(call.args.path, call.args.offset, call.args.limit);\n\t\t\t// A present `limit: 0` reads zero lines; answer with empty output\n\t\t\t// without running the tool rather than degrading into a full read.\n\t\t\tif (readArgs === null) return emptyResult(call.toolCallId, \"read\");\n\t\t\treturn executeTool(options, \"read\", call.toolCallId, readArgs);\n\t\t},\n\n\t\tpiBash: async (call) =>\n\t\t\texecuteTool(options, \"bash\", call.toolCallId, {\n\t\t\t\tcommand: call.args.command,\n\t\t\t\ttimeout: cursorPiTimeout(call.args.timeout),\n\t\t\t}),\n\n\t\tpiEdit: async (call) =>\n\t\t\texecuteTool(options, \"edit\", call.toolCallId, {\n\t\t\t\tpath: call.args.path,\n\t\t\t\tedits: call.args.edits.map((edit) => ({ oldText: edit.oldText, newText: edit.newText })),\n\t\t\t}),\n\n\t\tpiWrite: async (call) =>\n\t\t\texecuteTool(options, \"write\", call.toolCallId, {\n\t\t\t\tpath: call.args.path,\n\t\t\t\tcontent: call.args.content,\n\t\t\t}),\n\n\t\tpiGrep: async (call) =>\n\t\t\texecuteTool(options, \"grep\", call.toolCallId, {\n\t\t\t\tpattern: call.args.pattern,\n\t\t\t\tpath: call.args.path || undefined,\n\t\t\t\tglob: call.args.glob || undefined,\n\t\t\t\tignoreCase: call.args.ignoreCase === true ? true : undefined,\n\t\t\t\tliteral: call.args.literal === true ? true : undefined,\n\t\t\t\tcontext: call.args.context,\n\t\t\t\tlimit: cursorPiLimit(call.args.limit),\n\t\t\t}),\n\n\t\tpiFind: async (call) =>\n\t\t\texecuteTool(options, \"find\", call.toolCallId, {\n\t\t\t\tpattern: call.args.pattern,\n\t\t\t\tpath: call.args.path || undefined,\n\t\t\t\tlimit: cursorPiLimit(call.args.limit),\n\t\t\t}),\n\n\t\tpiLs: async (call) =>\n\t\t\texecuteTool(options, \"ls\", call.toolCallId, {\n\t\t\t\tpath: cursorPiLsPath(call.args.path),\n\t\t\t\tlimit: cursorPiLimit(call.args.limit),\n\t\t\t}),\n\t};\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Credential } from "@earendil-works/pi-ai";
|
|
2
|
+
import type { ExtensionAPI } from "../../types.ts";
|
|
3
|
+
import { type CursorCliGenerationGuard } from "./diagnostics.ts";
|
|
4
|
+
import { importLocalCursorCredential, importNativeCursorCredential, type LocalCursorImportDeps } from "./oauth-login.ts";
|
|
5
|
+
import { type CursorCliSessionRouter } from "./session-router.ts";
|
|
6
|
+
import { type CursorCliOauthProviderSettings } from "./settings.ts";
|
|
7
|
+
/** Injectable seams; every default resolves real on-disk state at invocation time. */
|
|
8
|
+
export type CursorCliAccountCommandDeps = {
|
|
9
|
+
readonly loadSettings?: (cwd: string) => CursorCliOauthProviderSettings;
|
|
10
|
+
readonly router?: CursorCliSessionRouter;
|
|
11
|
+
readonly resolveExecutable?: (settings: CursorCliOauthProviderSettings) => string;
|
|
12
|
+
readonly probeVersion?: (executable: string) => Promise<string>;
|
|
13
|
+
readonly readNativeCredential?: () => Credential | undefined | Promise<Credential | undefined>;
|
|
14
|
+
readonly importCredential?: typeof importLocalCursorCredential;
|
|
15
|
+
readonly importNativeCredential?: typeof importNativeCursorCredential;
|
|
16
|
+
readonly importDeps?: LocalCursorImportDeps;
|
|
17
|
+
/** Acknowledgement persistence seam; the default read-modify-writes the global settings file. */
|
|
18
|
+
readonly persistAcknowledgement?: (cwd: string, acknowledgedAt: string) => void;
|
|
19
|
+
/** Enablement persistence seam; explicit login/import actions activate the fallback lane. */
|
|
20
|
+
readonly persistEnabled?: (cwd: string, enabled: boolean) => void;
|
|
21
|
+
readonly now?: () => number;
|
|
22
|
+
readonly generation?: CursorCliGenerationGuard;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Registers `/cursor-account` plus the reload/shutdown teardown for this
|
|
26
|
+
* extension generation: the command reads account state fresh from the
|
|
27
|
+
* credential store on every invocation, and every deferred continuation is
|
|
28
|
+
* fenced so a retired generation is never touched after a reload.
|
|
29
|
+
*/
|
|
30
|
+
export declare function registerCursorCliAccountCommand(pi: ExtensionAPI, deps?: CursorCliAccountCommandDeps): void;
|
|
31
|
+
//# sourceMappingURL=account-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-command.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/cursor-cli-oauth/account-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAA2B,MAAM,gBAAgB,CAAC;AAW5E,OAAO,EACN,KAAK,wBAAwB,EAK7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGN,2BAA2B,EAC3B,4BAA4B,EAC5B,KAAK,qBAAqB,EAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,sBAAsB,EAA0B,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EACN,KAAK,8BAA8B,EAInC,MAAM,eAAe,CAAC;AAEvB,sFAAsF;AACtF,MAAM,MAAM,2BAA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