orient-cli 0.1.0 → 0.2.0
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/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.d.ts +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.js +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.js.map +1 -1
- package/dist/orient/change-packet.d.ts +2 -1
- package/dist/orient/change-packet.js +25 -8
- package/dist/orient/change-packet.js.map +1 -1
- package/dist/orient/clarify.d.ts +114 -0
- package/dist/orient/clarify.js +186 -0
- package/dist/orient/clarify.js.map +1 -0
- package/dist/orient/clear-command.d.ts +79 -0
- package/dist/orient/clear-command.js +117 -0
- package/dist/orient/clear-command.js.map +1 -0
- package/dist/orient/mode.d.ts +70 -0
- package/dist/orient/mode.js +124 -0
- package/dist/orient/mode.js.map +1 -0
- package/dist/orient/orient-extension.d.ts +1 -1
- package/dist/orient/orient-extension.js +306 -17
- package/dist/orient/orient-extension.js.map +1 -1
- package/dist/orient/plan-execute.d.ts +137 -0
- package/dist/orient/plan-execute.js +333 -0
- package/dist/orient/plan-execute.js.map +1 -0
- package/dist/orient/tiers.d.ts +109 -0
- package/dist/orient/tiers.js +162 -0
- package/dist/orient/tiers.js.map +1 -0
- package/dist/orient/wizard.d.ts +108 -0
- package/dist/orient/wizard.js +183 -0
- package/dist/orient/wizard.js.map +1 -0
- package/docs/open-source-resources.md +1 -1
- package/node_modules/@orient-cli/agent-core/README.md +456 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts +24 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.js +404 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.d.ts +115 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.js +395 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/index.d.ts +5 -0
- package/node_modules/@orient-cli/agent-core/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/index.js +9 -0
- package/node_modules/@orient-cli/agent-core/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts +85 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.js +268 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/types.d.ts +323 -0
- package/node_modules/@orient-cli/agent-core/dist/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/types.js +2 -0
- package/node_modules/@orient-cli/agent-core/dist/types.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/package.json +44 -0
- package/node_modules/@orient-cli/ai/README.md +1315 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.d.ts +20 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.js +44 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts +5 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.js +6 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/cli.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/cli.js +116 -0
- package/node_modules/@orient-cli/ai/dist/cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.js +107 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/index.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/index.js +14 -0
- package/node_modules/@orient-cli/ai/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.d.ts +24 -0
- package/node_modules/@orient-cli/ai/dist/models.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.d.ts +14473 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.js +14241 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.js +55 -0
- package/node_modules/@orient-cli/ai/dist/models.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/oauth.d.ts +2 -0
- package/node_modules/@orient-cli/ai/dist/oauth.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/oauth.js +2 -0
- package/node_modules/@orient-cli/ai/dist/oauth.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts +20 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js +651 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts +40 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.js +749 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js +176 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts +56 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.js +367 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js +29 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts +74 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js +776 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts +65 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.js +312 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js +419 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.js +399 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts +22 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.js +501 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js +741 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js +753 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts +17 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js +470 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js +190 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts +38 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js +261 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.js +35 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js +155 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/stream.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/stream.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/stream.js +27 -0
- package/node_modules/@orient-cli/ai/dist/stream.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/types.d.ts +353 -0
- package/node_modules/@orient-cli/ai/dist/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/types.js +2 -0
- package/node_modules/@orient-cli/ai/dist/types.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts +21 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.js +81 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.js +14 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.js +29 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts +25 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js +335 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts +30 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js +292 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js +376 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js +481 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts +61 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js +131 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js +105 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts +34 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js +373 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js +31 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts +47 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js +2 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts +53 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.js +132 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts +22 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts +17 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js +21 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts +18 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.js +80 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.js.map +1 -0
- package/node_modules/@orient-cli/ai/package.json +114 -0
- package/node_modules/@orient-cli/coding-agent/README.md +618 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js +4 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts +52 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.js +326 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js +31 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js +83 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts +18 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js +92 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js +35 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.js +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.d.ts +77 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.js +229 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts +83 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js +236 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts +86 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js +116 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts +585 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js +2497 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts +132 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js +422 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js +125 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts +88 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js +243 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts +121 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js +613 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts +38 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js +153 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js +25 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts +29 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.js +75 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js +249 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts +37 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js +224 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.css +1001 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.html +55 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.js +1690 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts +40 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js +95 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/marked.min.js +6 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts +25 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js +438 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts +148 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js +700 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts +1073 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js +45 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts +48 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js +314 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.js +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts +288 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js +240 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts +77 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.js +123 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts +132 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js +612 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts +110 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js +486 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts +6 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js +59 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts +192 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js +1829 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts +51 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js +249 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js +126 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts +185 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js +720 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts +93 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js +236 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js +38 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts +333 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js +1105 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts +237 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js +708 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts +60 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.js +409 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.js +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts +18 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js +116 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.js +31 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts +73 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js +352 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts +85 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js +337 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts +53 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js +196 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js +37 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js +258 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts +56 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js +293 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts +115 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js +86 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js +172 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js +81 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js +225 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js +49 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js +32 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts +70 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js +205 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts +35 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js +216 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.d.ts +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.js +43 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.js +593 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts +33 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.js +281 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.js +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts +18 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js +107 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts +34 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js +175 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js +51 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js +44 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js +45 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts +71 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js +479 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js +70 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js +79 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js +133 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js +111 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js +61 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts +24 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts +27 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js +201 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts +31 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js +34 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts +42 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js +145 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts +47 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js +275 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js +97 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts +53 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js +204 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts +49 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js +275 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js +155 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts +95 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js +848 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts +58 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js +301 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js +39 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js +47 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js +50 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js +51 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts +58 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js +274 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts +89 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js +1084 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js +113 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js +33 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts +321 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js +4000 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/dark.json +85 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/light.json +84 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts +81 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js +979 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js +112 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js +49 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts +217 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js +402 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js +550 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts +408 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts +4 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js +234 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js +87 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js +245 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts +5 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js +158 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.js +163 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js +39 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts +36 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js +137 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js +121 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js +186 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts +5 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js +252 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/package.json +104 -0
- package/node_modules/@orient-cli/tui/README.md +767 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts +52 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.js +623 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/box.d.ts +22 -0
- package/node_modules/@orient-cli/tui/dist/components/box.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/box.js +104 -0
- package/node_modules/@orient-cli/tui/dist/components/box.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts +22 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js +35 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.d.ts +244 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.js +1861 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/image.d.ts +28 -0
- package/node_modules/@orient-cli/tui/dist/components/image.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/image.js +69 -0
- package/node_modules/@orient-cli/tui/dist/components/image.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/input.d.ts +37 -0
- package/node_modules/@orient-cli/tui/dist/components/input.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/input.js +426 -0
- package/node_modules/@orient-cli/tui/dist/components/input.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.d.ts +21 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.js +49 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts +95 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.js +663 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts +50 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.js +159 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts +50 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.js +185 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts +12 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.js +23 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/text.d.ts +19 -0
- package/node_modules/@orient-cli/tui/dist/components/text.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/text.js +89 -0
- package/node_modules/@orient-cli/tui/dist/components/text.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts +13 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.js +51 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.d.ts +39 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.js +2 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts +16 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.js +107 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/index.d.ts +23 -0
- package/node_modules/@orient-cli/tui/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/index.js +32 -0
- package/node_modules/@orient-cli/tui/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.d.ts +193 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.js +174 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keys.d.ts +170 -0
- package/node_modules/@orient-cli/tui/dist/keys.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keys.js +1124 -0
- package/node_modules/@orient-cli/tui/dist/keys.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts +28 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.js +44 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts +48 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.js +317 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts +68 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.js +288 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal.d.ts +84 -0
- package/node_modules/@orient-cli/tui/dist/terminal.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal.js +285 -0
- package/node_modules/@orient-cli/tui/dist/terminal.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/tui.d.ts +222 -0
- package/node_modules/@orient-cli/tui/dist/tui.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/tui.js +1008 -0
- package/node_modules/@orient-cli/tui/dist/tui.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts +17 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.js +25 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/utils.d.ts +78 -0
- package/node_modules/@orient-cli/tui/dist/utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/utils.js +960 -0
- package/node_modules/@orient-cli/tui/dist/utils.js.map +1 -0
- package/node_modules/@orient-cli/tui/package.json +52 -0
- package/package.json +47 -8
- package/schemas/orient-standard/templates-tier-1/brief.md +22 -0
- package/schemas/orient-standard/templates-tier-1/plan.md +17 -0
- package/schemas/orient-standard/templates-tier-1/spec.md +23 -0
- package/schemas/orient-standard/templates-tier-1/tasks.md +14 -0
- package/schemas/orient-standard/templates-tier-2/brief.md +32 -0
- package/schemas/orient-standard/templates-tier-2/plan.md +44 -0
- package/schemas/orient-standard/templates-tier-2/spec.md +46 -0
- package/schemas/orient-standard/templates-tier-2/tasks.md +34 -0
- package/schemas/orient-standard/templates-tier-3/brief.md +54 -0
- package/schemas/orient-standard/templates-tier-3/plan.md +67 -0
- package/schemas/orient-standard/templates-tier-3/spec.md +65 -0
- package/schemas/orient-standard/templates-tier-3/tasks.md +79 -0
|
@@ -0,0 +1,1124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard input handling for terminal applications.
|
|
3
|
+
*
|
|
4
|
+
* Supports both legacy terminal sequences and Kitty keyboard protocol.
|
|
5
|
+
* See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
|
6
|
+
* Reference: https://github.com/sst/opentui/blob/7da92b4088aebfe27b9f691c04163a48821e49fd/packages/core/src/lib/parse.keypress.ts
|
|
7
|
+
*
|
|
8
|
+
* Symbol keys are also supported, however some ctrl+symbol combos
|
|
9
|
+
* overlap with ASCII codes, e.g. ctrl+[ = ESC.
|
|
10
|
+
* See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#legacy-ctrl-mapping-of-ascii-keys
|
|
11
|
+
* Those can still be * used for ctrl+shift combos
|
|
12
|
+
*
|
|
13
|
+
* API:
|
|
14
|
+
* - matchesKey(data, keyId) - Check if input matches a key identifier
|
|
15
|
+
* - parseKey(data) - Parse input and return the key identifier
|
|
16
|
+
* - Key - Helper object for creating typed key identifiers
|
|
17
|
+
* - setKittyProtocolActive(active) - Set global Kitty protocol state
|
|
18
|
+
* - isKittyProtocolActive() - Query global Kitty protocol state
|
|
19
|
+
*/
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// Global Kitty Protocol State
|
|
22
|
+
// =============================================================================
|
|
23
|
+
let _kittyProtocolActive = false;
|
|
24
|
+
/**
|
|
25
|
+
* Set the global Kitty keyboard protocol state.
|
|
26
|
+
* Called by ProcessTerminal after detecting protocol support.
|
|
27
|
+
*/
|
|
28
|
+
export function setKittyProtocolActive(active) {
|
|
29
|
+
_kittyProtocolActive = active;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Query whether Kitty keyboard protocol is currently active.
|
|
33
|
+
*/
|
|
34
|
+
export function isKittyProtocolActive() {
|
|
35
|
+
return _kittyProtocolActive;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Helper object for creating typed key identifiers with autocomplete.
|
|
39
|
+
*
|
|
40
|
+
* Usage:
|
|
41
|
+
* - Key.escape, Key.enter, Key.tab, etc. for special keys
|
|
42
|
+
* - Key.backtick, Key.comma, Key.period, etc. for symbol keys
|
|
43
|
+
* - Key.ctrl("c"), Key.alt("x") for single modifier
|
|
44
|
+
* - Key.ctrlShift("p"), Key.ctrlAlt("x") for combined modifiers
|
|
45
|
+
*/
|
|
46
|
+
export const Key = {
|
|
47
|
+
// Special keys
|
|
48
|
+
escape: "escape",
|
|
49
|
+
esc: "esc",
|
|
50
|
+
enter: "enter",
|
|
51
|
+
return: "return",
|
|
52
|
+
tab: "tab",
|
|
53
|
+
space: "space",
|
|
54
|
+
backspace: "backspace",
|
|
55
|
+
delete: "delete",
|
|
56
|
+
insert: "insert",
|
|
57
|
+
clear: "clear",
|
|
58
|
+
home: "home",
|
|
59
|
+
end: "end",
|
|
60
|
+
pageUp: "pageUp",
|
|
61
|
+
pageDown: "pageDown",
|
|
62
|
+
up: "up",
|
|
63
|
+
down: "down",
|
|
64
|
+
left: "left",
|
|
65
|
+
right: "right",
|
|
66
|
+
f1: "f1",
|
|
67
|
+
f2: "f2",
|
|
68
|
+
f3: "f3",
|
|
69
|
+
f4: "f4",
|
|
70
|
+
f5: "f5",
|
|
71
|
+
f6: "f6",
|
|
72
|
+
f7: "f7",
|
|
73
|
+
f8: "f8",
|
|
74
|
+
f9: "f9",
|
|
75
|
+
f10: "f10",
|
|
76
|
+
f11: "f11",
|
|
77
|
+
f12: "f12",
|
|
78
|
+
// Symbol keys
|
|
79
|
+
backtick: "`",
|
|
80
|
+
hyphen: "-",
|
|
81
|
+
equals: "=",
|
|
82
|
+
leftbracket: "[",
|
|
83
|
+
rightbracket: "]",
|
|
84
|
+
backslash: "\\",
|
|
85
|
+
semicolon: ";",
|
|
86
|
+
quote: "'",
|
|
87
|
+
comma: ",",
|
|
88
|
+
period: ".",
|
|
89
|
+
slash: "/",
|
|
90
|
+
exclamation: "!",
|
|
91
|
+
at: "@",
|
|
92
|
+
hash: "#",
|
|
93
|
+
dollar: "$",
|
|
94
|
+
percent: "%",
|
|
95
|
+
caret: "^",
|
|
96
|
+
ampersand: "&",
|
|
97
|
+
asterisk: "*",
|
|
98
|
+
leftparen: "(",
|
|
99
|
+
rightparen: ")",
|
|
100
|
+
underscore: "_",
|
|
101
|
+
plus: "+",
|
|
102
|
+
pipe: "|",
|
|
103
|
+
tilde: "~",
|
|
104
|
+
leftbrace: "{",
|
|
105
|
+
rightbrace: "}",
|
|
106
|
+
colon: ":",
|
|
107
|
+
lessthan: "<",
|
|
108
|
+
greaterthan: ">",
|
|
109
|
+
question: "?",
|
|
110
|
+
// Single modifiers
|
|
111
|
+
ctrl: (key) => `ctrl+${key}`,
|
|
112
|
+
shift: (key) => `shift+${key}`,
|
|
113
|
+
alt: (key) => `alt+${key}`,
|
|
114
|
+
// Combined modifiers
|
|
115
|
+
ctrlShift: (key) => `ctrl+shift+${key}`,
|
|
116
|
+
shiftCtrl: (key) => `shift+ctrl+${key}`,
|
|
117
|
+
ctrlAlt: (key) => `ctrl+alt+${key}`,
|
|
118
|
+
altCtrl: (key) => `alt+ctrl+${key}`,
|
|
119
|
+
shiftAlt: (key) => `shift+alt+${key}`,
|
|
120
|
+
altShift: (key) => `alt+shift+${key}`,
|
|
121
|
+
// Triple modifiers
|
|
122
|
+
ctrlShiftAlt: (key) => `ctrl+shift+alt+${key}`,
|
|
123
|
+
};
|
|
124
|
+
// =============================================================================
|
|
125
|
+
// Constants
|
|
126
|
+
// =============================================================================
|
|
127
|
+
const SYMBOL_KEYS = new Set([
|
|
128
|
+
"`",
|
|
129
|
+
"-",
|
|
130
|
+
"=",
|
|
131
|
+
"[",
|
|
132
|
+
"]",
|
|
133
|
+
"\\",
|
|
134
|
+
";",
|
|
135
|
+
"'",
|
|
136
|
+
",",
|
|
137
|
+
".",
|
|
138
|
+
"/",
|
|
139
|
+
"!",
|
|
140
|
+
"@",
|
|
141
|
+
"#",
|
|
142
|
+
"$",
|
|
143
|
+
"%",
|
|
144
|
+
"^",
|
|
145
|
+
"&",
|
|
146
|
+
"*",
|
|
147
|
+
"(",
|
|
148
|
+
")",
|
|
149
|
+
"_",
|
|
150
|
+
"+",
|
|
151
|
+
"|",
|
|
152
|
+
"~",
|
|
153
|
+
"{",
|
|
154
|
+
"}",
|
|
155
|
+
":",
|
|
156
|
+
"<",
|
|
157
|
+
">",
|
|
158
|
+
"?",
|
|
159
|
+
]);
|
|
160
|
+
const MODIFIERS = {
|
|
161
|
+
shift: 1,
|
|
162
|
+
alt: 2,
|
|
163
|
+
ctrl: 4,
|
|
164
|
+
};
|
|
165
|
+
const LOCK_MASK = 64 + 128; // Caps Lock + Num Lock
|
|
166
|
+
const CODEPOINTS = {
|
|
167
|
+
escape: 27,
|
|
168
|
+
tab: 9,
|
|
169
|
+
enter: 13,
|
|
170
|
+
space: 32,
|
|
171
|
+
backspace: 127,
|
|
172
|
+
kpEnter: 57414, // Numpad Enter (Kitty protocol)
|
|
173
|
+
};
|
|
174
|
+
const ARROW_CODEPOINTS = {
|
|
175
|
+
up: -1,
|
|
176
|
+
down: -2,
|
|
177
|
+
right: -3,
|
|
178
|
+
left: -4,
|
|
179
|
+
};
|
|
180
|
+
const FUNCTIONAL_CODEPOINTS = {
|
|
181
|
+
delete: -10,
|
|
182
|
+
insert: -11,
|
|
183
|
+
pageUp: -12,
|
|
184
|
+
pageDown: -13,
|
|
185
|
+
home: -14,
|
|
186
|
+
end: -15,
|
|
187
|
+
};
|
|
188
|
+
const KITTY_FUNCTIONAL_KEY_EQUIVALENTS = new Map([
|
|
189
|
+
[57399, 48], // KP_0 -> 0
|
|
190
|
+
[57400, 49], // KP_1 -> 1
|
|
191
|
+
[57401, 50], // KP_2 -> 2
|
|
192
|
+
[57402, 51], // KP_3 -> 3
|
|
193
|
+
[57403, 52], // KP_4 -> 4
|
|
194
|
+
[57404, 53], // KP_5 -> 5
|
|
195
|
+
[57405, 54], // KP_6 -> 6
|
|
196
|
+
[57406, 55], // KP_7 -> 7
|
|
197
|
+
[57407, 56], // KP_8 -> 8
|
|
198
|
+
[57408, 57], // KP_9 -> 9
|
|
199
|
+
[57409, 46], // KP_DECIMAL -> .
|
|
200
|
+
[57410, 47], // KP_DIVIDE -> /
|
|
201
|
+
[57411, 42], // KP_MULTIPLY -> *
|
|
202
|
+
[57412, 45], // KP_SUBTRACT -> -
|
|
203
|
+
[57413, 43], // KP_ADD -> +
|
|
204
|
+
[57415, 61], // KP_EQUAL -> =
|
|
205
|
+
[57416, 44], // KP_SEPARATOR -> ,
|
|
206
|
+
[57417, ARROW_CODEPOINTS.left],
|
|
207
|
+
[57418, ARROW_CODEPOINTS.right],
|
|
208
|
+
[57419, ARROW_CODEPOINTS.up],
|
|
209
|
+
[57420, ARROW_CODEPOINTS.down],
|
|
210
|
+
[57421, FUNCTIONAL_CODEPOINTS.pageUp],
|
|
211
|
+
[57422, FUNCTIONAL_CODEPOINTS.pageDown],
|
|
212
|
+
[57423, FUNCTIONAL_CODEPOINTS.home],
|
|
213
|
+
[57424, FUNCTIONAL_CODEPOINTS.end],
|
|
214
|
+
[57425, FUNCTIONAL_CODEPOINTS.insert],
|
|
215
|
+
[57426, FUNCTIONAL_CODEPOINTS.delete],
|
|
216
|
+
]);
|
|
217
|
+
function normalizeKittyFunctionalCodepoint(codepoint) {
|
|
218
|
+
return KITTY_FUNCTIONAL_KEY_EQUIVALENTS.get(codepoint) ?? codepoint;
|
|
219
|
+
}
|
|
220
|
+
const LEGACY_KEY_SEQUENCES = {
|
|
221
|
+
up: ["\x1b[A", "\x1bOA"],
|
|
222
|
+
down: ["\x1b[B", "\x1bOB"],
|
|
223
|
+
right: ["\x1b[C", "\x1bOC"],
|
|
224
|
+
left: ["\x1b[D", "\x1bOD"],
|
|
225
|
+
home: ["\x1b[H", "\x1bOH", "\x1b[1~", "\x1b[7~"],
|
|
226
|
+
end: ["\x1b[F", "\x1bOF", "\x1b[4~", "\x1b[8~"],
|
|
227
|
+
insert: ["\x1b[2~"],
|
|
228
|
+
delete: ["\x1b[3~"],
|
|
229
|
+
pageUp: ["\x1b[5~", "\x1b[[5~"],
|
|
230
|
+
pageDown: ["\x1b[6~", "\x1b[[6~"],
|
|
231
|
+
clear: ["\x1b[E", "\x1bOE"],
|
|
232
|
+
f1: ["\x1bOP", "\x1b[11~", "\x1b[[A"],
|
|
233
|
+
f2: ["\x1bOQ", "\x1b[12~", "\x1b[[B"],
|
|
234
|
+
f3: ["\x1bOR", "\x1b[13~", "\x1b[[C"],
|
|
235
|
+
f4: ["\x1bOS", "\x1b[14~", "\x1b[[D"],
|
|
236
|
+
f5: ["\x1b[15~", "\x1b[[E"],
|
|
237
|
+
f6: ["\x1b[17~"],
|
|
238
|
+
f7: ["\x1b[18~"],
|
|
239
|
+
f8: ["\x1b[19~"],
|
|
240
|
+
f9: ["\x1b[20~"],
|
|
241
|
+
f10: ["\x1b[21~"],
|
|
242
|
+
f11: ["\x1b[23~"],
|
|
243
|
+
f12: ["\x1b[24~"],
|
|
244
|
+
};
|
|
245
|
+
const LEGACY_SHIFT_SEQUENCES = {
|
|
246
|
+
up: ["\x1b[a"],
|
|
247
|
+
down: ["\x1b[b"],
|
|
248
|
+
right: ["\x1b[c"],
|
|
249
|
+
left: ["\x1b[d"],
|
|
250
|
+
clear: ["\x1b[e"],
|
|
251
|
+
insert: ["\x1b[2$"],
|
|
252
|
+
delete: ["\x1b[3$"],
|
|
253
|
+
pageUp: ["\x1b[5$"],
|
|
254
|
+
pageDown: ["\x1b[6$"],
|
|
255
|
+
home: ["\x1b[7$"],
|
|
256
|
+
end: ["\x1b[8$"],
|
|
257
|
+
};
|
|
258
|
+
const LEGACY_CTRL_SEQUENCES = {
|
|
259
|
+
up: ["\x1bOa"],
|
|
260
|
+
down: ["\x1bOb"],
|
|
261
|
+
right: ["\x1bOc"],
|
|
262
|
+
left: ["\x1bOd"],
|
|
263
|
+
clear: ["\x1bOe"],
|
|
264
|
+
insert: ["\x1b[2^"],
|
|
265
|
+
delete: ["\x1b[3^"],
|
|
266
|
+
pageUp: ["\x1b[5^"],
|
|
267
|
+
pageDown: ["\x1b[6^"],
|
|
268
|
+
home: ["\x1b[7^"],
|
|
269
|
+
end: ["\x1b[8^"],
|
|
270
|
+
};
|
|
271
|
+
const LEGACY_SEQUENCE_KEY_IDS = {
|
|
272
|
+
"\x1bOA": "up",
|
|
273
|
+
"\x1bOB": "down",
|
|
274
|
+
"\x1bOC": "right",
|
|
275
|
+
"\x1bOD": "left",
|
|
276
|
+
"\x1bOH": "home",
|
|
277
|
+
"\x1bOF": "end",
|
|
278
|
+
"\x1b[E": "clear",
|
|
279
|
+
"\x1bOE": "clear",
|
|
280
|
+
"\x1bOe": "ctrl+clear",
|
|
281
|
+
"\x1b[e": "shift+clear",
|
|
282
|
+
"\x1b[2~": "insert",
|
|
283
|
+
"\x1b[2$": "shift+insert",
|
|
284
|
+
"\x1b[2^": "ctrl+insert",
|
|
285
|
+
"\x1b[3$": "shift+delete",
|
|
286
|
+
"\x1b[3^": "ctrl+delete",
|
|
287
|
+
"\x1b[[5~": "pageUp",
|
|
288
|
+
"\x1b[[6~": "pageDown",
|
|
289
|
+
"\x1b[a": "shift+up",
|
|
290
|
+
"\x1b[b": "shift+down",
|
|
291
|
+
"\x1b[c": "shift+right",
|
|
292
|
+
"\x1b[d": "shift+left",
|
|
293
|
+
"\x1bOa": "ctrl+up",
|
|
294
|
+
"\x1bOb": "ctrl+down",
|
|
295
|
+
"\x1bOc": "ctrl+right",
|
|
296
|
+
"\x1bOd": "ctrl+left",
|
|
297
|
+
"\x1b[5$": "shift+pageUp",
|
|
298
|
+
"\x1b[6$": "shift+pageDown",
|
|
299
|
+
"\x1b[7$": "shift+home",
|
|
300
|
+
"\x1b[8$": "shift+end",
|
|
301
|
+
"\x1b[5^": "ctrl+pageUp",
|
|
302
|
+
"\x1b[6^": "ctrl+pageDown",
|
|
303
|
+
"\x1b[7^": "ctrl+home",
|
|
304
|
+
"\x1b[8^": "ctrl+end",
|
|
305
|
+
"\x1bOP": "f1",
|
|
306
|
+
"\x1bOQ": "f2",
|
|
307
|
+
"\x1bOR": "f3",
|
|
308
|
+
"\x1bOS": "f4",
|
|
309
|
+
"\x1b[11~": "f1",
|
|
310
|
+
"\x1b[12~": "f2",
|
|
311
|
+
"\x1b[13~": "f3",
|
|
312
|
+
"\x1b[14~": "f4",
|
|
313
|
+
"\x1b[[A": "f1",
|
|
314
|
+
"\x1b[[B": "f2",
|
|
315
|
+
"\x1b[[C": "f3",
|
|
316
|
+
"\x1b[[D": "f4",
|
|
317
|
+
"\x1b[[E": "f5",
|
|
318
|
+
"\x1b[15~": "f5",
|
|
319
|
+
"\x1b[17~": "f6",
|
|
320
|
+
"\x1b[18~": "f7",
|
|
321
|
+
"\x1b[19~": "f8",
|
|
322
|
+
"\x1b[20~": "f9",
|
|
323
|
+
"\x1b[21~": "f10",
|
|
324
|
+
"\x1b[23~": "f11",
|
|
325
|
+
"\x1b[24~": "f12",
|
|
326
|
+
"\x1bb": "alt+left",
|
|
327
|
+
"\x1bf": "alt+right",
|
|
328
|
+
"\x1bp": "alt+up",
|
|
329
|
+
"\x1bn": "alt+down",
|
|
330
|
+
};
|
|
331
|
+
const matchesLegacySequence = (data, sequences) => sequences.includes(data);
|
|
332
|
+
const matchesLegacyModifierSequence = (data, key, modifier) => {
|
|
333
|
+
if (modifier === MODIFIERS.shift) {
|
|
334
|
+
return matchesLegacySequence(data, LEGACY_SHIFT_SEQUENCES[key]);
|
|
335
|
+
}
|
|
336
|
+
if (modifier === MODIFIERS.ctrl) {
|
|
337
|
+
return matchesLegacySequence(data, LEGACY_CTRL_SEQUENCES[key]);
|
|
338
|
+
}
|
|
339
|
+
return false;
|
|
340
|
+
};
|
|
341
|
+
// Store the last parsed event type for isKeyRelease() to query
|
|
342
|
+
let _lastEventType = "press";
|
|
343
|
+
/**
|
|
344
|
+
* Check if the last parsed key event was a key release.
|
|
345
|
+
* Only meaningful when Kitty keyboard protocol with flag 2 is active.
|
|
346
|
+
*/
|
|
347
|
+
export function isKeyRelease(data) {
|
|
348
|
+
// Don't treat bracketed paste content as key release, even if it contains
|
|
349
|
+
// patterns like ":3F" (e.g., bluetooth MAC addresses like "90:62:3F:A5").
|
|
350
|
+
// Terminal.ts re-wraps paste content with bracketed paste markers before
|
|
351
|
+
// passing to TUI, so pasted data will always contain \x1b[200~.
|
|
352
|
+
if (data.includes("\x1b[200~")) {
|
|
353
|
+
return false;
|
|
354
|
+
}
|
|
355
|
+
// Quick check: release events with flag 2 contain ":3"
|
|
356
|
+
// Format: \x1b[<codepoint>;<modifier>:3u
|
|
357
|
+
if (data.includes(":3u") ||
|
|
358
|
+
data.includes(":3~") ||
|
|
359
|
+
data.includes(":3A") ||
|
|
360
|
+
data.includes(":3B") ||
|
|
361
|
+
data.includes(":3C") ||
|
|
362
|
+
data.includes(":3D") ||
|
|
363
|
+
data.includes(":3H") ||
|
|
364
|
+
data.includes(":3F")) {
|
|
365
|
+
return true;
|
|
366
|
+
}
|
|
367
|
+
return false;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Check if the last parsed key event was a key repeat.
|
|
371
|
+
* Only meaningful when Kitty keyboard protocol with flag 2 is active.
|
|
372
|
+
*/
|
|
373
|
+
export function isKeyRepeat(data) {
|
|
374
|
+
// Don't treat bracketed paste content as key repeat, even if it contains
|
|
375
|
+
// patterns like ":2F". See isKeyRelease() for details.
|
|
376
|
+
if (data.includes("\x1b[200~")) {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
if (data.includes(":2u") ||
|
|
380
|
+
data.includes(":2~") ||
|
|
381
|
+
data.includes(":2A") ||
|
|
382
|
+
data.includes(":2B") ||
|
|
383
|
+
data.includes(":2C") ||
|
|
384
|
+
data.includes(":2D") ||
|
|
385
|
+
data.includes(":2H") ||
|
|
386
|
+
data.includes(":2F")) {
|
|
387
|
+
return true;
|
|
388
|
+
}
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
function parseEventType(eventTypeStr) {
|
|
392
|
+
if (!eventTypeStr)
|
|
393
|
+
return "press";
|
|
394
|
+
const eventType = parseInt(eventTypeStr, 10);
|
|
395
|
+
if (eventType === 2)
|
|
396
|
+
return "repeat";
|
|
397
|
+
if (eventType === 3)
|
|
398
|
+
return "release";
|
|
399
|
+
return "press";
|
|
400
|
+
}
|
|
401
|
+
function parseKittySequence(data) {
|
|
402
|
+
// CSI u format with alternate keys (flag 4):
|
|
403
|
+
// \x1b[<codepoint>u
|
|
404
|
+
// \x1b[<codepoint>;<mod>u
|
|
405
|
+
// \x1b[<codepoint>;<mod>:<event>u
|
|
406
|
+
// \x1b[<codepoint>:<shifted>;<mod>u
|
|
407
|
+
// \x1b[<codepoint>:<shifted>:<base>;<mod>u
|
|
408
|
+
// \x1b[<codepoint>::<base>;<mod>u (no shifted key, only base)
|
|
409
|
+
//
|
|
410
|
+
// With flag 2, event type is appended after modifier colon: 1=press, 2=repeat, 3=release
|
|
411
|
+
// With flag 4, alternate keys are appended after codepoint with colons
|
|
412
|
+
const csiUMatch = data.match(/^\x1b\[(\d+)(?::(\d*))?(?::(\d+))?(?:;(\d+))?(?::(\d+))?u$/);
|
|
413
|
+
if (csiUMatch) {
|
|
414
|
+
const codepoint = parseInt(csiUMatch[1], 10);
|
|
415
|
+
const shiftedKey = csiUMatch[2] && csiUMatch[2].length > 0 ? parseInt(csiUMatch[2], 10) : undefined;
|
|
416
|
+
const baseLayoutKey = csiUMatch[3] ? parseInt(csiUMatch[3], 10) : undefined;
|
|
417
|
+
const modValue = csiUMatch[4] ? parseInt(csiUMatch[4], 10) : 1;
|
|
418
|
+
const eventType = parseEventType(csiUMatch[5]);
|
|
419
|
+
_lastEventType = eventType;
|
|
420
|
+
return { codepoint, shiftedKey, baseLayoutKey, modifier: modValue - 1, eventType };
|
|
421
|
+
}
|
|
422
|
+
// Arrow keys with modifier: \x1b[1;<mod>A/B/C/D or \x1b[1;<mod>:<event>A/B/C/D
|
|
423
|
+
const arrowMatch = data.match(/^\x1b\[1;(\d+)(?::(\d+))?([ABCD])$/);
|
|
424
|
+
if (arrowMatch) {
|
|
425
|
+
const modValue = parseInt(arrowMatch[1], 10);
|
|
426
|
+
const eventType = parseEventType(arrowMatch[2]);
|
|
427
|
+
const arrowCodes = { A: -1, B: -2, C: -3, D: -4 };
|
|
428
|
+
_lastEventType = eventType;
|
|
429
|
+
return { codepoint: arrowCodes[arrowMatch[3]], modifier: modValue - 1, eventType };
|
|
430
|
+
}
|
|
431
|
+
// Functional keys: \x1b[<num>~ or \x1b[<num>;<mod>~ or \x1b[<num>;<mod>:<event>~
|
|
432
|
+
const funcMatch = data.match(/^\x1b\[(\d+)(?:;(\d+))?(?::(\d+))?~$/);
|
|
433
|
+
if (funcMatch) {
|
|
434
|
+
const keyNum = parseInt(funcMatch[1], 10);
|
|
435
|
+
const modValue = funcMatch[2] ? parseInt(funcMatch[2], 10) : 1;
|
|
436
|
+
const eventType = parseEventType(funcMatch[3]);
|
|
437
|
+
const funcCodes = {
|
|
438
|
+
2: FUNCTIONAL_CODEPOINTS.insert,
|
|
439
|
+
3: FUNCTIONAL_CODEPOINTS.delete,
|
|
440
|
+
5: FUNCTIONAL_CODEPOINTS.pageUp,
|
|
441
|
+
6: FUNCTIONAL_CODEPOINTS.pageDown,
|
|
442
|
+
7: FUNCTIONAL_CODEPOINTS.home,
|
|
443
|
+
8: FUNCTIONAL_CODEPOINTS.end,
|
|
444
|
+
};
|
|
445
|
+
const codepoint = funcCodes[keyNum];
|
|
446
|
+
if (codepoint !== undefined) {
|
|
447
|
+
_lastEventType = eventType;
|
|
448
|
+
return { codepoint, modifier: modValue - 1, eventType };
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
// Home/End with modifier: \x1b[1;<mod>H/F or \x1b[1;<mod>:<event>H/F
|
|
452
|
+
const homeEndMatch = data.match(/^\x1b\[1;(\d+)(?::(\d+))?([HF])$/);
|
|
453
|
+
if (homeEndMatch) {
|
|
454
|
+
const modValue = parseInt(homeEndMatch[1], 10);
|
|
455
|
+
const eventType = parseEventType(homeEndMatch[2]);
|
|
456
|
+
const codepoint = homeEndMatch[3] === "H" ? FUNCTIONAL_CODEPOINTS.home : FUNCTIONAL_CODEPOINTS.end;
|
|
457
|
+
_lastEventType = eventType;
|
|
458
|
+
return { codepoint, modifier: modValue - 1, eventType };
|
|
459
|
+
}
|
|
460
|
+
return null;
|
|
461
|
+
}
|
|
462
|
+
function matchesKittySequence(data, expectedCodepoint, expectedModifier) {
|
|
463
|
+
const parsed = parseKittySequence(data);
|
|
464
|
+
if (!parsed)
|
|
465
|
+
return false;
|
|
466
|
+
const actualMod = parsed.modifier & ~LOCK_MASK;
|
|
467
|
+
const expectedMod = expectedModifier & ~LOCK_MASK;
|
|
468
|
+
// Check if modifiers match
|
|
469
|
+
if (actualMod !== expectedMod)
|
|
470
|
+
return false;
|
|
471
|
+
const normalizedCodepoint = normalizeKittyFunctionalCodepoint(parsed.codepoint);
|
|
472
|
+
const normalizedExpectedCodepoint = normalizeKittyFunctionalCodepoint(expectedCodepoint);
|
|
473
|
+
// Primary match: codepoint matches directly after normalizing functional keys
|
|
474
|
+
if (normalizedCodepoint === normalizedExpectedCodepoint)
|
|
475
|
+
return true;
|
|
476
|
+
// Alternate match: use base layout key for non-Latin keyboard layouts.
|
|
477
|
+
// This allows Ctrl+С (Cyrillic) to match Ctrl+c (Latin) when terminal reports
|
|
478
|
+
// the base layout key (the key in standard PC-101 layout).
|
|
479
|
+
//
|
|
480
|
+
// Only fall back to base layout key when the codepoint is NOT already a
|
|
481
|
+
// recognized Latin letter (a-z) or symbol (e.g., /, -, [, ;, etc.).
|
|
482
|
+
// When the codepoint is a recognized key, it is authoritative regardless
|
|
483
|
+
// of physical key position. This prevents remapped layouts (Dvorak, Colemak,
|
|
484
|
+
// xremap, etc.) from causing false matches: both letters and symbols move
|
|
485
|
+
// to different physical positions, so Ctrl+K could falsely match Ctrl+V
|
|
486
|
+
// (letter remapping) and Ctrl+/ could falsely match Ctrl+[ (symbol remapping)
|
|
487
|
+
// if the base layout key were always considered.
|
|
488
|
+
if (parsed.baseLayoutKey !== undefined && parsed.baseLayoutKey === expectedCodepoint) {
|
|
489
|
+
const cp = normalizedCodepoint;
|
|
490
|
+
const isLatinLetter = cp >= 97 && cp <= 122; // a-z
|
|
491
|
+
const isKnownSymbol = SYMBOL_KEYS.has(String.fromCharCode(cp));
|
|
492
|
+
if (!isLatinLetter && !isKnownSymbol)
|
|
493
|
+
return true;
|
|
494
|
+
}
|
|
495
|
+
return false;
|
|
496
|
+
}
|
|
497
|
+
function parseModifyOtherKeysSequence(data) {
|
|
498
|
+
const match = data.match(/^\x1b\[27;(\d+);(\d+)~$/);
|
|
499
|
+
if (!match)
|
|
500
|
+
return null;
|
|
501
|
+
const modValue = parseInt(match[1], 10);
|
|
502
|
+
const codepoint = parseInt(match[2], 10);
|
|
503
|
+
return { codepoint, modifier: modValue - 1 };
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Match xterm modifyOtherKeys format: CSI 27 ; modifiers ; keycode ~
|
|
507
|
+
* This is used by terminals when Kitty protocol is not enabled.
|
|
508
|
+
* Modifier values are 1-indexed: 2=shift, 3=alt, 5=ctrl, etc.
|
|
509
|
+
*/
|
|
510
|
+
function matchesModifyOtherKeys(data, expectedKeycode, expectedModifier) {
|
|
511
|
+
const parsed = parseModifyOtherKeysSequence(data);
|
|
512
|
+
if (!parsed)
|
|
513
|
+
return false;
|
|
514
|
+
return parsed.codepoint === expectedKeycode && parsed.modifier === expectedModifier;
|
|
515
|
+
}
|
|
516
|
+
function isWindowsTerminalSession() {
|
|
517
|
+
return (Boolean(process.env.WT_SESSION) && !process.env.SSH_CONNECTION && !process.env.SSH_CLIENT && !process.env.SSH_TTY);
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Raw 0x08 (BS) is ambiguous in legacy terminals.
|
|
521
|
+
*
|
|
522
|
+
* - Windows Terminal uses it for Ctrl+Backspace.
|
|
523
|
+
* - Some legacy terminals and tmux setups send it for plain Backspace.
|
|
524
|
+
*
|
|
525
|
+
* Prefer explicit Kitty / CSI-u / modifyOtherKeys sequences whenever they are
|
|
526
|
+
* available. Fall back to a Windows Terminal heuristic only for raw BS bytes.
|
|
527
|
+
*/
|
|
528
|
+
function matchesRawBackspace(data, expectedModifier) {
|
|
529
|
+
if (data === "\x7f")
|
|
530
|
+
return expectedModifier === 0;
|
|
531
|
+
if (data !== "\x08")
|
|
532
|
+
return false;
|
|
533
|
+
return isWindowsTerminalSession() ? expectedModifier === MODIFIERS.ctrl : expectedModifier === 0;
|
|
534
|
+
}
|
|
535
|
+
// =============================================================================
|
|
536
|
+
// Generic Key Matching
|
|
537
|
+
// =============================================================================
|
|
538
|
+
/**
|
|
539
|
+
* Get the control character for a key.
|
|
540
|
+
* Uses the universal formula: code & 0x1f (mask to lower 5 bits)
|
|
541
|
+
*
|
|
542
|
+
* Works for:
|
|
543
|
+
* - Letters a-z → 1-26
|
|
544
|
+
* - Symbols [\]_ → 27, 28, 29, 31
|
|
545
|
+
* - Also maps - to same as _ (same physical key on US keyboards)
|
|
546
|
+
*/
|
|
547
|
+
function rawCtrlChar(key) {
|
|
548
|
+
const char = key.toLowerCase();
|
|
549
|
+
const code = char.charCodeAt(0);
|
|
550
|
+
if ((code >= 97 && code <= 122) || char === "[" || char === "\\" || char === "]" || char === "_") {
|
|
551
|
+
return String.fromCharCode(code & 0x1f);
|
|
552
|
+
}
|
|
553
|
+
// Handle - as _ (same physical key on US keyboards)
|
|
554
|
+
if (char === "-") {
|
|
555
|
+
return String.fromCharCode(31); // Same as Ctrl+_
|
|
556
|
+
}
|
|
557
|
+
return null;
|
|
558
|
+
}
|
|
559
|
+
function isDigitKey(key) {
|
|
560
|
+
return key >= "0" && key <= "9";
|
|
561
|
+
}
|
|
562
|
+
function matchesPrintableModifyOtherKeys(data, expectedKeycode, expectedModifier) {
|
|
563
|
+
if (expectedModifier === 0)
|
|
564
|
+
return false;
|
|
565
|
+
return matchesModifyOtherKeys(data, expectedKeycode, expectedModifier);
|
|
566
|
+
}
|
|
567
|
+
function formatKeyNameWithModifiers(keyName, modifier) {
|
|
568
|
+
const mods = [];
|
|
569
|
+
const effectiveMod = modifier & ~LOCK_MASK;
|
|
570
|
+
const supportedModifierMask = MODIFIERS.shift | MODIFIERS.ctrl | MODIFIERS.alt;
|
|
571
|
+
if ((effectiveMod & ~supportedModifierMask) !== 0)
|
|
572
|
+
return undefined;
|
|
573
|
+
if (effectiveMod & MODIFIERS.shift)
|
|
574
|
+
mods.push("shift");
|
|
575
|
+
if (effectiveMod & MODIFIERS.ctrl)
|
|
576
|
+
mods.push("ctrl");
|
|
577
|
+
if (effectiveMod & MODIFIERS.alt)
|
|
578
|
+
mods.push("alt");
|
|
579
|
+
return mods.length > 0 ? `${mods.join("+")}+${keyName}` : keyName;
|
|
580
|
+
}
|
|
581
|
+
function parseKeyId(keyId) {
|
|
582
|
+
const parts = keyId.toLowerCase().split("+");
|
|
583
|
+
const key = parts[parts.length - 1];
|
|
584
|
+
if (!key)
|
|
585
|
+
return null;
|
|
586
|
+
return {
|
|
587
|
+
key,
|
|
588
|
+
ctrl: parts.includes("ctrl"),
|
|
589
|
+
shift: parts.includes("shift"),
|
|
590
|
+
alt: parts.includes("alt"),
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Match input data against a key identifier string.
|
|
595
|
+
*
|
|
596
|
+
* Supported key identifiers:
|
|
597
|
+
* - Single keys: "escape", "tab", "enter", "backspace", "delete", "home", "end", "space"
|
|
598
|
+
* - Arrow keys: "up", "down", "left", "right"
|
|
599
|
+
* - Ctrl combinations: "ctrl+c", "ctrl+z", etc.
|
|
600
|
+
* - Shift combinations: "shift+tab", "shift+enter"
|
|
601
|
+
* - Alt combinations: "alt+enter", "alt+backspace"
|
|
602
|
+
* - Combined modifiers: "shift+ctrl+p", "ctrl+alt+x"
|
|
603
|
+
*
|
|
604
|
+
* Use the Key helper for autocomplete: Key.ctrl("c"), Key.escape, Key.ctrlShift("p")
|
|
605
|
+
*
|
|
606
|
+
* @param data - Raw input data from terminal
|
|
607
|
+
* @param keyId - Key identifier (e.g., "ctrl+c", "escape", Key.ctrl("c"))
|
|
608
|
+
*/
|
|
609
|
+
export function matchesKey(data, keyId) {
|
|
610
|
+
const parsed = parseKeyId(keyId);
|
|
611
|
+
if (!parsed)
|
|
612
|
+
return false;
|
|
613
|
+
const { key, ctrl, shift, alt } = parsed;
|
|
614
|
+
let modifier = 0;
|
|
615
|
+
if (shift)
|
|
616
|
+
modifier |= MODIFIERS.shift;
|
|
617
|
+
if (alt)
|
|
618
|
+
modifier |= MODIFIERS.alt;
|
|
619
|
+
if (ctrl)
|
|
620
|
+
modifier |= MODIFIERS.ctrl;
|
|
621
|
+
switch (key) {
|
|
622
|
+
case "escape":
|
|
623
|
+
case "esc":
|
|
624
|
+
if (modifier !== 0)
|
|
625
|
+
return false;
|
|
626
|
+
return (data === "\x1b" ||
|
|
627
|
+
matchesKittySequence(data, CODEPOINTS.escape, 0) ||
|
|
628
|
+
matchesModifyOtherKeys(data, CODEPOINTS.escape, 0));
|
|
629
|
+
case "space":
|
|
630
|
+
if (!_kittyProtocolActive) {
|
|
631
|
+
if (ctrl && !alt && !shift && data === "\x00") {
|
|
632
|
+
return true;
|
|
633
|
+
}
|
|
634
|
+
if (alt && !ctrl && !shift && data === "\x1b ") {
|
|
635
|
+
return true;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
if (modifier === 0) {
|
|
639
|
+
return (data === " " ||
|
|
640
|
+
matchesKittySequence(data, CODEPOINTS.space, 0) ||
|
|
641
|
+
matchesModifyOtherKeys(data, CODEPOINTS.space, 0));
|
|
642
|
+
}
|
|
643
|
+
return (matchesKittySequence(data, CODEPOINTS.space, modifier) ||
|
|
644
|
+
matchesModifyOtherKeys(data, CODEPOINTS.space, modifier));
|
|
645
|
+
case "tab":
|
|
646
|
+
if (shift && !ctrl && !alt) {
|
|
647
|
+
return (data === "\x1b[Z" ||
|
|
648
|
+
matchesKittySequence(data, CODEPOINTS.tab, MODIFIERS.shift) ||
|
|
649
|
+
matchesModifyOtherKeys(data, CODEPOINTS.tab, MODIFIERS.shift));
|
|
650
|
+
}
|
|
651
|
+
if (modifier === 0) {
|
|
652
|
+
return data === "\t" || matchesKittySequence(data, CODEPOINTS.tab, 0);
|
|
653
|
+
}
|
|
654
|
+
return (matchesKittySequence(data, CODEPOINTS.tab, modifier) ||
|
|
655
|
+
matchesModifyOtherKeys(data, CODEPOINTS.tab, modifier));
|
|
656
|
+
case "enter":
|
|
657
|
+
case "return":
|
|
658
|
+
if (shift && !ctrl && !alt) {
|
|
659
|
+
// CSI u sequences (standard Kitty protocol)
|
|
660
|
+
if (matchesKittySequence(data, CODEPOINTS.enter, MODIFIERS.shift) ||
|
|
661
|
+
matchesKittySequence(data, CODEPOINTS.kpEnter, MODIFIERS.shift)) {
|
|
662
|
+
return true;
|
|
663
|
+
}
|
|
664
|
+
// xterm modifyOtherKeys format (fallback when Kitty protocol not enabled)
|
|
665
|
+
if (matchesModifyOtherKeys(data, CODEPOINTS.enter, MODIFIERS.shift)) {
|
|
666
|
+
return true;
|
|
667
|
+
}
|
|
668
|
+
// When Kitty protocol is active, legacy sequences are custom terminal mappings
|
|
669
|
+
// \x1b\r = Kitty's "map shift+enter send_text all \e\r"
|
|
670
|
+
// \n = Ghostty's "keybind = shift+enter=text:\n"
|
|
671
|
+
if (_kittyProtocolActive) {
|
|
672
|
+
return data === "\x1b\r" || data === "\n";
|
|
673
|
+
}
|
|
674
|
+
return false;
|
|
675
|
+
}
|
|
676
|
+
if (alt && !ctrl && !shift) {
|
|
677
|
+
// CSI u sequences (standard Kitty protocol)
|
|
678
|
+
if (matchesKittySequence(data, CODEPOINTS.enter, MODIFIERS.alt) ||
|
|
679
|
+
matchesKittySequence(data, CODEPOINTS.kpEnter, MODIFIERS.alt)) {
|
|
680
|
+
return true;
|
|
681
|
+
}
|
|
682
|
+
// xterm modifyOtherKeys format (fallback when Kitty protocol not enabled)
|
|
683
|
+
if (matchesModifyOtherKeys(data, CODEPOINTS.enter, MODIFIERS.alt)) {
|
|
684
|
+
return true;
|
|
685
|
+
}
|
|
686
|
+
// \x1b\r is alt+enter only in legacy mode (no Kitty protocol)
|
|
687
|
+
// When Kitty protocol is active, alt+enter comes as CSI u sequence
|
|
688
|
+
if (!_kittyProtocolActive) {
|
|
689
|
+
return data === "\x1b\r";
|
|
690
|
+
}
|
|
691
|
+
return false;
|
|
692
|
+
}
|
|
693
|
+
if (modifier === 0) {
|
|
694
|
+
return (data === "\r" ||
|
|
695
|
+
(!_kittyProtocolActive && data === "\n") ||
|
|
696
|
+
data === "\x1bOM" || // SS3 M (numpad enter in some terminals)
|
|
697
|
+
matchesKittySequence(data, CODEPOINTS.enter, 0) ||
|
|
698
|
+
matchesKittySequence(data, CODEPOINTS.kpEnter, 0));
|
|
699
|
+
}
|
|
700
|
+
return (matchesKittySequence(data, CODEPOINTS.enter, modifier) ||
|
|
701
|
+
matchesKittySequence(data, CODEPOINTS.kpEnter, modifier) ||
|
|
702
|
+
matchesModifyOtherKeys(data, CODEPOINTS.enter, modifier));
|
|
703
|
+
case "backspace":
|
|
704
|
+
if (alt && !ctrl && !shift) {
|
|
705
|
+
if (data === "\x1b\x7f" || data === "\x1b\b") {
|
|
706
|
+
return true;
|
|
707
|
+
}
|
|
708
|
+
return (matchesKittySequence(data, CODEPOINTS.backspace, MODIFIERS.alt) ||
|
|
709
|
+
matchesModifyOtherKeys(data, CODEPOINTS.backspace, MODIFIERS.alt));
|
|
710
|
+
}
|
|
711
|
+
if (ctrl && !alt && !shift) {
|
|
712
|
+
// Legacy raw 0x08 is ambiguous: it can be Ctrl+Backspace on Windows
|
|
713
|
+
// Terminal or plain Backspace on other terminals, while also
|
|
714
|
+
// overlapping with Ctrl+H.
|
|
715
|
+
if (matchesRawBackspace(data, MODIFIERS.ctrl))
|
|
716
|
+
return true;
|
|
717
|
+
return (matchesKittySequence(data, CODEPOINTS.backspace, MODIFIERS.ctrl) ||
|
|
718
|
+
matchesModifyOtherKeys(data, CODEPOINTS.backspace, MODIFIERS.ctrl));
|
|
719
|
+
}
|
|
720
|
+
if (modifier === 0) {
|
|
721
|
+
return (matchesRawBackspace(data, 0) ||
|
|
722
|
+
matchesKittySequence(data, CODEPOINTS.backspace, 0) ||
|
|
723
|
+
matchesModifyOtherKeys(data, CODEPOINTS.backspace, 0));
|
|
724
|
+
}
|
|
725
|
+
return (matchesKittySequence(data, CODEPOINTS.backspace, modifier) ||
|
|
726
|
+
matchesModifyOtherKeys(data, CODEPOINTS.backspace, modifier));
|
|
727
|
+
case "insert":
|
|
728
|
+
if (modifier === 0) {
|
|
729
|
+
return (matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.insert) ||
|
|
730
|
+
matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.insert, 0));
|
|
731
|
+
}
|
|
732
|
+
if (matchesLegacyModifierSequence(data, "insert", modifier)) {
|
|
733
|
+
return true;
|
|
734
|
+
}
|
|
735
|
+
return matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.insert, modifier);
|
|
736
|
+
case "delete":
|
|
737
|
+
if (modifier === 0) {
|
|
738
|
+
return (matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.delete) ||
|
|
739
|
+
matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.delete, 0));
|
|
740
|
+
}
|
|
741
|
+
if (matchesLegacyModifierSequence(data, "delete", modifier)) {
|
|
742
|
+
return true;
|
|
743
|
+
}
|
|
744
|
+
return matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.delete, modifier);
|
|
745
|
+
case "clear":
|
|
746
|
+
if (modifier === 0) {
|
|
747
|
+
return matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.clear);
|
|
748
|
+
}
|
|
749
|
+
return matchesLegacyModifierSequence(data, "clear", modifier);
|
|
750
|
+
case "home":
|
|
751
|
+
if (modifier === 0) {
|
|
752
|
+
return (matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.home) ||
|
|
753
|
+
matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.home, 0));
|
|
754
|
+
}
|
|
755
|
+
if (matchesLegacyModifierSequence(data, "home", modifier)) {
|
|
756
|
+
return true;
|
|
757
|
+
}
|
|
758
|
+
return matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.home, modifier);
|
|
759
|
+
case "end":
|
|
760
|
+
if (modifier === 0) {
|
|
761
|
+
return (matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.end) ||
|
|
762
|
+
matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.end, 0));
|
|
763
|
+
}
|
|
764
|
+
if (matchesLegacyModifierSequence(data, "end", modifier)) {
|
|
765
|
+
return true;
|
|
766
|
+
}
|
|
767
|
+
return matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.end, modifier);
|
|
768
|
+
case "pageup":
|
|
769
|
+
if (modifier === 0) {
|
|
770
|
+
return (matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.pageUp) ||
|
|
771
|
+
matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.pageUp, 0));
|
|
772
|
+
}
|
|
773
|
+
if (matchesLegacyModifierSequence(data, "pageUp", modifier)) {
|
|
774
|
+
return true;
|
|
775
|
+
}
|
|
776
|
+
return matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.pageUp, modifier);
|
|
777
|
+
case "pagedown":
|
|
778
|
+
if (modifier === 0) {
|
|
779
|
+
return (matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.pageDown) ||
|
|
780
|
+
matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.pageDown, 0));
|
|
781
|
+
}
|
|
782
|
+
if (matchesLegacyModifierSequence(data, "pageDown", modifier)) {
|
|
783
|
+
return true;
|
|
784
|
+
}
|
|
785
|
+
return matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.pageDown, modifier);
|
|
786
|
+
case "up":
|
|
787
|
+
if (alt && !ctrl && !shift) {
|
|
788
|
+
return data === "\x1bp" || matchesKittySequence(data, ARROW_CODEPOINTS.up, MODIFIERS.alt);
|
|
789
|
+
}
|
|
790
|
+
if (modifier === 0) {
|
|
791
|
+
return (matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.up) ||
|
|
792
|
+
matchesKittySequence(data, ARROW_CODEPOINTS.up, 0));
|
|
793
|
+
}
|
|
794
|
+
if (matchesLegacyModifierSequence(data, "up", modifier)) {
|
|
795
|
+
return true;
|
|
796
|
+
}
|
|
797
|
+
return matchesKittySequence(data, ARROW_CODEPOINTS.up, modifier);
|
|
798
|
+
case "down":
|
|
799
|
+
if (alt && !ctrl && !shift) {
|
|
800
|
+
return data === "\x1bn" || matchesKittySequence(data, ARROW_CODEPOINTS.down, MODIFIERS.alt);
|
|
801
|
+
}
|
|
802
|
+
if (modifier === 0) {
|
|
803
|
+
return (matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.down) ||
|
|
804
|
+
matchesKittySequence(data, ARROW_CODEPOINTS.down, 0));
|
|
805
|
+
}
|
|
806
|
+
if (matchesLegacyModifierSequence(data, "down", modifier)) {
|
|
807
|
+
return true;
|
|
808
|
+
}
|
|
809
|
+
return matchesKittySequence(data, ARROW_CODEPOINTS.down, modifier);
|
|
810
|
+
case "left":
|
|
811
|
+
if (alt && !ctrl && !shift) {
|
|
812
|
+
return (data === "\x1b[1;3D" ||
|
|
813
|
+
(!_kittyProtocolActive && data === "\x1bB") ||
|
|
814
|
+
data === "\x1bb" ||
|
|
815
|
+
matchesKittySequence(data, ARROW_CODEPOINTS.left, MODIFIERS.alt));
|
|
816
|
+
}
|
|
817
|
+
if (ctrl && !alt && !shift) {
|
|
818
|
+
return (data === "\x1b[1;5D" ||
|
|
819
|
+
matchesLegacyModifierSequence(data, "left", MODIFIERS.ctrl) ||
|
|
820
|
+
matchesKittySequence(data, ARROW_CODEPOINTS.left, MODIFIERS.ctrl));
|
|
821
|
+
}
|
|
822
|
+
if (modifier === 0) {
|
|
823
|
+
return (matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.left) ||
|
|
824
|
+
matchesKittySequence(data, ARROW_CODEPOINTS.left, 0));
|
|
825
|
+
}
|
|
826
|
+
if (matchesLegacyModifierSequence(data, "left", modifier)) {
|
|
827
|
+
return true;
|
|
828
|
+
}
|
|
829
|
+
return matchesKittySequence(data, ARROW_CODEPOINTS.left, modifier);
|
|
830
|
+
case "right":
|
|
831
|
+
if (alt && !ctrl && !shift) {
|
|
832
|
+
return (data === "\x1b[1;3C" ||
|
|
833
|
+
(!_kittyProtocolActive && data === "\x1bF") ||
|
|
834
|
+
data === "\x1bf" ||
|
|
835
|
+
matchesKittySequence(data, ARROW_CODEPOINTS.right, MODIFIERS.alt));
|
|
836
|
+
}
|
|
837
|
+
if (ctrl && !alt && !shift) {
|
|
838
|
+
return (data === "\x1b[1;5C" ||
|
|
839
|
+
matchesLegacyModifierSequence(data, "right", MODIFIERS.ctrl) ||
|
|
840
|
+
matchesKittySequence(data, ARROW_CODEPOINTS.right, MODIFIERS.ctrl));
|
|
841
|
+
}
|
|
842
|
+
if (modifier === 0) {
|
|
843
|
+
return (matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.right) ||
|
|
844
|
+
matchesKittySequence(data, ARROW_CODEPOINTS.right, 0));
|
|
845
|
+
}
|
|
846
|
+
if (matchesLegacyModifierSequence(data, "right", modifier)) {
|
|
847
|
+
return true;
|
|
848
|
+
}
|
|
849
|
+
return matchesKittySequence(data, ARROW_CODEPOINTS.right, modifier);
|
|
850
|
+
case "f1":
|
|
851
|
+
case "f2":
|
|
852
|
+
case "f3":
|
|
853
|
+
case "f4":
|
|
854
|
+
case "f5":
|
|
855
|
+
case "f6":
|
|
856
|
+
case "f7":
|
|
857
|
+
case "f8":
|
|
858
|
+
case "f9":
|
|
859
|
+
case "f10":
|
|
860
|
+
case "f11":
|
|
861
|
+
case "f12": {
|
|
862
|
+
if (modifier !== 0) {
|
|
863
|
+
return false;
|
|
864
|
+
}
|
|
865
|
+
const functionKey = key;
|
|
866
|
+
return matchesLegacySequence(data, LEGACY_KEY_SEQUENCES[functionKey]);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
// Handle single letter/digit keys and symbols
|
|
870
|
+
if (key.length === 1 && ((key >= "a" && key <= "z") || isDigitKey(key) || SYMBOL_KEYS.has(key))) {
|
|
871
|
+
const codepoint = key.charCodeAt(0);
|
|
872
|
+
const rawCtrl = rawCtrlChar(key);
|
|
873
|
+
const isLetter = key >= "a" && key <= "z";
|
|
874
|
+
const isDigit = isDigitKey(key);
|
|
875
|
+
if (ctrl && alt && !shift && !_kittyProtocolActive && rawCtrl) {
|
|
876
|
+
// Legacy: ctrl+alt+key is ESC followed by the control character
|
|
877
|
+
return data === `\x1b${rawCtrl}`;
|
|
878
|
+
}
|
|
879
|
+
if (alt && !ctrl && !shift && !_kittyProtocolActive && (isLetter || isDigit)) {
|
|
880
|
+
// Legacy: alt+letter/digit is ESC followed by the key
|
|
881
|
+
if (data === `\x1b${key}`)
|
|
882
|
+
return true;
|
|
883
|
+
}
|
|
884
|
+
if (ctrl && !shift && !alt) {
|
|
885
|
+
// Legacy: ctrl+key sends the control character
|
|
886
|
+
if (rawCtrl && data === rawCtrl)
|
|
887
|
+
return true;
|
|
888
|
+
return (matchesKittySequence(data, codepoint, MODIFIERS.ctrl) ||
|
|
889
|
+
matchesPrintableModifyOtherKeys(data, codepoint, MODIFIERS.ctrl));
|
|
890
|
+
}
|
|
891
|
+
if (ctrl && shift && !alt) {
|
|
892
|
+
return (matchesKittySequence(data, codepoint, MODIFIERS.shift + MODIFIERS.ctrl) ||
|
|
893
|
+
matchesPrintableModifyOtherKeys(data, codepoint, MODIFIERS.shift + MODIFIERS.ctrl));
|
|
894
|
+
}
|
|
895
|
+
if (shift && !ctrl && !alt) {
|
|
896
|
+
// Legacy: shift+letter produces uppercase
|
|
897
|
+
if (isLetter && data === key.toUpperCase())
|
|
898
|
+
return true;
|
|
899
|
+
return (matchesKittySequence(data, codepoint, MODIFIERS.shift) ||
|
|
900
|
+
matchesPrintableModifyOtherKeys(data, codepoint, MODIFIERS.shift));
|
|
901
|
+
}
|
|
902
|
+
if (modifier !== 0) {
|
|
903
|
+
return (matchesKittySequence(data, codepoint, modifier) ||
|
|
904
|
+
matchesPrintableModifyOtherKeys(data, codepoint, modifier));
|
|
905
|
+
}
|
|
906
|
+
// Check both raw char and Kitty sequence (needed for release events)
|
|
907
|
+
return data === key || matchesKittySequence(data, codepoint, 0);
|
|
908
|
+
}
|
|
909
|
+
return false;
|
|
910
|
+
}
|
|
911
|
+
/**
|
|
912
|
+
* Parse input data and return the key identifier if recognized.
|
|
913
|
+
*
|
|
914
|
+
* @param data - Raw input data from terminal
|
|
915
|
+
* @returns Key identifier string (e.g., "ctrl+c") or undefined
|
|
916
|
+
*/
|
|
917
|
+
function formatParsedKey(codepoint, modifier, baseLayoutKey) {
|
|
918
|
+
const normalizedCodepoint = normalizeKittyFunctionalCodepoint(codepoint);
|
|
919
|
+
// Use base layout key only when codepoint is not a recognized Latin
|
|
920
|
+
// letter (a-z), digit (0-9), or symbol (/, -, [, ;, etc.). For those,
|
|
921
|
+
// the codepoint is authoritative regardless of physical key position.
|
|
922
|
+
// This prevents remapped layouts (Dvorak, Colemak, xremap, etc.) from
|
|
923
|
+
// reporting the wrong key name based on the QWERTY physical position.
|
|
924
|
+
const isLatinLetter = normalizedCodepoint >= 97 && normalizedCodepoint <= 122; // a-z
|
|
925
|
+
const isDigit = normalizedCodepoint >= 48 && normalizedCodepoint <= 57; // 0-9
|
|
926
|
+
const isKnownSymbol = SYMBOL_KEYS.has(String.fromCharCode(normalizedCodepoint));
|
|
927
|
+
const effectiveCodepoint = isLatinLetter || isDigit || isKnownSymbol ? normalizedCodepoint : (baseLayoutKey ?? normalizedCodepoint);
|
|
928
|
+
let keyName;
|
|
929
|
+
if (effectiveCodepoint === CODEPOINTS.escape)
|
|
930
|
+
keyName = "escape";
|
|
931
|
+
else if (effectiveCodepoint === CODEPOINTS.tab)
|
|
932
|
+
keyName = "tab";
|
|
933
|
+
else if (effectiveCodepoint === CODEPOINTS.enter || effectiveCodepoint === CODEPOINTS.kpEnter)
|
|
934
|
+
keyName = "enter";
|
|
935
|
+
else if (effectiveCodepoint === CODEPOINTS.space)
|
|
936
|
+
keyName = "space";
|
|
937
|
+
else if (effectiveCodepoint === CODEPOINTS.backspace)
|
|
938
|
+
keyName = "backspace";
|
|
939
|
+
else if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.delete)
|
|
940
|
+
keyName = "delete";
|
|
941
|
+
else if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.insert)
|
|
942
|
+
keyName = "insert";
|
|
943
|
+
else if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.home)
|
|
944
|
+
keyName = "home";
|
|
945
|
+
else if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.end)
|
|
946
|
+
keyName = "end";
|
|
947
|
+
else if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.pageUp)
|
|
948
|
+
keyName = "pageUp";
|
|
949
|
+
else if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.pageDown)
|
|
950
|
+
keyName = "pageDown";
|
|
951
|
+
else if (effectiveCodepoint === ARROW_CODEPOINTS.up)
|
|
952
|
+
keyName = "up";
|
|
953
|
+
else if (effectiveCodepoint === ARROW_CODEPOINTS.down)
|
|
954
|
+
keyName = "down";
|
|
955
|
+
else if (effectiveCodepoint === ARROW_CODEPOINTS.left)
|
|
956
|
+
keyName = "left";
|
|
957
|
+
else if (effectiveCodepoint === ARROW_CODEPOINTS.right)
|
|
958
|
+
keyName = "right";
|
|
959
|
+
else if (effectiveCodepoint >= 48 && effectiveCodepoint <= 57)
|
|
960
|
+
keyName = String.fromCharCode(effectiveCodepoint);
|
|
961
|
+
else if (effectiveCodepoint >= 97 && effectiveCodepoint <= 122)
|
|
962
|
+
keyName = String.fromCharCode(effectiveCodepoint);
|
|
963
|
+
else if (SYMBOL_KEYS.has(String.fromCharCode(effectiveCodepoint)))
|
|
964
|
+
keyName = String.fromCharCode(effectiveCodepoint);
|
|
965
|
+
if (!keyName)
|
|
966
|
+
return undefined;
|
|
967
|
+
return formatKeyNameWithModifiers(keyName, modifier);
|
|
968
|
+
}
|
|
969
|
+
export function parseKey(data) {
|
|
970
|
+
const kitty = parseKittySequence(data);
|
|
971
|
+
if (kitty) {
|
|
972
|
+
return formatParsedKey(kitty.codepoint, kitty.modifier, kitty.baseLayoutKey);
|
|
973
|
+
}
|
|
974
|
+
const modifyOtherKeys = parseModifyOtherKeysSequence(data);
|
|
975
|
+
if (modifyOtherKeys) {
|
|
976
|
+
return formatParsedKey(modifyOtherKeys.codepoint, modifyOtherKeys.modifier);
|
|
977
|
+
}
|
|
978
|
+
// Mode-aware legacy sequences
|
|
979
|
+
// When Kitty protocol is active, ambiguous sequences are interpreted as custom terminal mappings:
|
|
980
|
+
// - \x1b\r = shift+enter (Kitty mapping), not alt+enter
|
|
981
|
+
// - \n = shift+enter (Ghostty mapping)
|
|
982
|
+
if (_kittyProtocolActive) {
|
|
983
|
+
if (data === "\x1b\r" || data === "\n")
|
|
984
|
+
return "shift+enter";
|
|
985
|
+
}
|
|
986
|
+
const legacySequenceKeyId = LEGACY_SEQUENCE_KEY_IDS[data];
|
|
987
|
+
if (legacySequenceKeyId)
|
|
988
|
+
return legacySequenceKeyId;
|
|
989
|
+
// Legacy sequences (used when Kitty protocol is not active, or for unambiguous sequences)
|
|
990
|
+
if (data === "\x1b")
|
|
991
|
+
return "escape";
|
|
992
|
+
if (data === "\x1c")
|
|
993
|
+
return "ctrl+\\";
|
|
994
|
+
if (data === "\x1d")
|
|
995
|
+
return "ctrl+]";
|
|
996
|
+
if (data === "\x1f")
|
|
997
|
+
return "ctrl+-";
|
|
998
|
+
if (data === "\x1b\x1b")
|
|
999
|
+
return "ctrl+alt+[";
|
|
1000
|
+
if (data === "\x1b\x1c")
|
|
1001
|
+
return "ctrl+alt+\\";
|
|
1002
|
+
if (data === "\x1b\x1d")
|
|
1003
|
+
return "ctrl+alt+]";
|
|
1004
|
+
if (data === "\x1b\x1f")
|
|
1005
|
+
return "ctrl+alt+-";
|
|
1006
|
+
if (data === "\t")
|
|
1007
|
+
return "tab";
|
|
1008
|
+
if (data === "\r" || (!_kittyProtocolActive && data === "\n") || data === "\x1bOM")
|
|
1009
|
+
return "enter";
|
|
1010
|
+
if (data === "\x00")
|
|
1011
|
+
return "ctrl+space";
|
|
1012
|
+
if (data === " ")
|
|
1013
|
+
return "space";
|
|
1014
|
+
if (data === "\x7f")
|
|
1015
|
+
return "backspace";
|
|
1016
|
+
if (data === "\x08")
|
|
1017
|
+
return isWindowsTerminalSession() ? "ctrl+backspace" : "backspace";
|
|
1018
|
+
if (data === "\x1b[Z")
|
|
1019
|
+
return "shift+tab";
|
|
1020
|
+
if (!_kittyProtocolActive && data === "\x1b\r")
|
|
1021
|
+
return "alt+enter";
|
|
1022
|
+
if (!_kittyProtocolActive && data === "\x1b ")
|
|
1023
|
+
return "alt+space";
|
|
1024
|
+
if (data === "\x1b\x7f" || data === "\x1b\b")
|
|
1025
|
+
return "alt+backspace";
|
|
1026
|
+
if (!_kittyProtocolActive && data === "\x1bB")
|
|
1027
|
+
return "alt+left";
|
|
1028
|
+
if (!_kittyProtocolActive && data === "\x1bF")
|
|
1029
|
+
return "alt+right";
|
|
1030
|
+
if (!_kittyProtocolActive && data.length === 2 && data[0] === "\x1b") {
|
|
1031
|
+
const code = data.charCodeAt(1);
|
|
1032
|
+
if (code >= 1 && code <= 26) {
|
|
1033
|
+
return `ctrl+alt+${String.fromCharCode(code + 96)}`;
|
|
1034
|
+
}
|
|
1035
|
+
// Legacy alt+letter/digit (ESC followed by the key)
|
|
1036
|
+
if ((code >= 97 && code <= 122) || (code >= 48 && code <= 57)) {
|
|
1037
|
+
return `alt+${String.fromCharCode(code)}`;
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
if (data === "\x1b[A")
|
|
1041
|
+
return "up";
|
|
1042
|
+
if (data === "\x1b[B")
|
|
1043
|
+
return "down";
|
|
1044
|
+
if (data === "\x1b[C")
|
|
1045
|
+
return "right";
|
|
1046
|
+
if (data === "\x1b[D")
|
|
1047
|
+
return "left";
|
|
1048
|
+
if (data === "\x1b[H" || data === "\x1bOH")
|
|
1049
|
+
return "home";
|
|
1050
|
+
if (data === "\x1b[F" || data === "\x1bOF")
|
|
1051
|
+
return "end";
|
|
1052
|
+
if (data === "\x1b[3~")
|
|
1053
|
+
return "delete";
|
|
1054
|
+
if (data === "\x1b[5~")
|
|
1055
|
+
return "pageUp";
|
|
1056
|
+
if (data === "\x1b[6~")
|
|
1057
|
+
return "pageDown";
|
|
1058
|
+
// Raw Ctrl+letter
|
|
1059
|
+
if (data.length === 1) {
|
|
1060
|
+
const code = data.charCodeAt(0);
|
|
1061
|
+
if (code >= 1 && code <= 26) {
|
|
1062
|
+
return `ctrl+${String.fromCharCode(code + 96)}`;
|
|
1063
|
+
}
|
|
1064
|
+
if (code >= 32 && code <= 126) {
|
|
1065
|
+
return data;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
return undefined;
|
|
1069
|
+
}
|
|
1070
|
+
// =============================================================================
|
|
1071
|
+
// Kitty CSI-u Printable Decoding
|
|
1072
|
+
// =============================================================================
|
|
1073
|
+
const KITTY_CSI_U_REGEX = /^\x1b\[(\d+)(?::(\d*))?(?::(\d+))?(?:;(\d+))?(?::(\d+))?u$/;
|
|
1074
|
+
const KITTY_PRINTABLE_ALLOWED_MODIFIERS = MODIFIERS.shift | LOCK_MASK;
|
|
1075
|
+
/**
|
|
1076
|
+
* Decode a Kitty CSI-u sequence into a printable character, if applicable.
|
|
1077
|
+
*
|
|
1078
|
+
* When Kitty keyboard protocol flag 1 (disambiguate) is active, terminals send
|
|
1079
|
+
* CSI-u sequences for all keys, including plain printable characters. This
|
|
1080
|
+
* function extracts the printable character from such sequences.
|
|
1081
|
+
*
|
|
1082
|
+
* Only accepts plain or Shift-modified keys. Rejects Ctrl, Alt, and unsupported
|
|
1083
|
+
* modifier combinations (those are handled by keybinding matching instead).
|
|
1084
|
+
* Prefers the shifted keycode when Shift is held and a shifted key is reported.
|
|
1085
|
+
*
|
|
1086
|
+
* @param data - Raw input data from terminal
|
|
1087
|
+
* @returns The printable character, or undefined if not a printable CSI-u sequence
|
|
1088
|
+
*/
|
|
1089
|
+
export function decodeKittyPrintable(data) {
|
|
1090
|
+
const match = data.match(KITTY_CSI_U_REGEX);
|
|
1091
|
+
if (!match)
|
|
1092
|
+
return undefined;
|
|
1093
|
+
// CSI-u groups: <codepoint>[:<shifted>[:<base>]];<mod>[:<event>]u
|
|
1094
|
+
const codepoint = Number.parseInt(match[1] ?? "", 10);
|
|
1095
|
+
if (!Number.isFinite(codepoint))
|
|
1096
|
+
return undefined;
|
|
1097
|
+
const shiftedKey = match[2] && match[2].length > 0 ? Number.parseInt(match[2], 10) : undefined;
|
|
1098
|
+
const modValue = match[4] ? Number.parseInt(match[4], 10) : 1;
|
|
1099
|
+
// Modifiers are 1-indexed in CSI-u; normalize to our bitmask.
|
|
1100
|
+
const modifier = Number.isFinite(modValue) ? modValue - 1 : 0;
|
|
1101
|
+
// Only accept printable CSI-u input for plain or Shift-modified text keys.
|
|
1102
|
+
// Reject unsupported modifier bits (e.g. Super/Meta) to avoid inserting
|
|
1103
|
+
// characters from modifier-only terminal events.
|
|
1104
|
+
if ((modifier & ~KITTY_PRINTABLE_ALLOWED_MODIFIERS) !== 0)
|
|
1105
|
+
return undefined;
|
|
1106
|
+
if (modifier & (MODIFIERS.alt | MODIFIERS.ctrl))
|
|
1107
|
+
return undefined;
|
|
1108
|
+
// Prefer the shifted keycode when Shift is held.
|
|
1109
|
+
let effectiveCodepoint = codepoint;
|
|
1110
|
+
if (modifier & MODIFIERS.shift && typeof shiftedKey === "number") {
|
|
1111
|
+
effectiveCodepoint = shiftedKey;
|
|
1112
|
+
}
|
|
1113
|
+
effectiveCodepoint = normalizeKittyFunctionalCodepoint(effectiveCodepoint);
|
|
1114
|
+
// Drop control characters or invalid codepoints.
|
|
1115
|
+
if (!Number.isFinite(effectiveCodepoint) || effectiveCodepoint < 32)
|
|
1116
|
+
return undefined;
|
|
1117
|
+
try {
|
|
1118
|
+
return String.fromCodePoint(effectiveCodepoint);
|
|
1119
|
+
}
|
|
1120
|
+
catch {
|
|
1121
|
+
return undefined;
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
//# sourceMappingURL=keys.js.map
|