orient-cli 0.1.0-alpha.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/LICENSE +0 -0
- package/NOTICE.md +0 -0
- package/README.md +0 -0
- package/dist/cli.d.ts +0 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/extensions/orient-core.d.ts +0 -0
- package/dist/extensions/orient-core.js +0 -0
- package/dist/extensions/orient-core.js.map +0 -0
- package/dist/extensions/orient-notebooklm.d.ts +0 -0
- package/dist/extensions/orient-notebooklm.js +0 -0
- package/dist/extensions/orient-notebooklm.js.map +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/notebooklm/bridge.d.ts +0 -0
- package/dist/integrations/notebooklm/bridge.js +0 -0
- package/dist/integrations/notebooklm/bridge.js.map +0 -0
- 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/artifact-graph.d.ts +0 -0
- package/dist/orient/artifact-graph.js +0 -0
- package/dist/orient/artifact-graph.js.map +0 -0
- 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/phases.d.ts +0 -0
- package/dist/orient/phases.js +0 -0
- package/dist/orient/phases.js.map +0 -0
- 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/state-machine.d.ts +0 -0
- package/dist/orient/state-machine.js +0 -0
- package/dist/orient/state-machine.js.map +0 -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/types.d.ts +0 -0
- package/dist/orient/types.js +0 -0
- package/dist/orient/types.js.map +0 -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/dist/package-paths.d.ts +0 -0
- package/dist/package-paths.js +0 -0
- package/dist/package-paths.js.map +0 -0
- package/docs/architecture.md +0 -0
- package/docs/artifacts.md +0 -0
- package/docs/commands.md +0 -0
- package/docs/configuration.md +0 -0
- package/docs/getting-started.md +0 -0
- package/docs/open-source-resources.md +1 -1
- package/docs/phases.md +0 -0
- package/docs/research-integration.md +0 -0
- package/docs/workflows.md +0 -0
- 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/prompts/orient-blockers.md +0 -0
- package/prompts/orient-handoff.md +0 -0
- package/prompts/orient-recap.md +0 -0
- package/schemas/orient-full/schema.yaml +0 -0
- package/schemas/orient-minimal/schema.yaml +0 -0
- package/schemas/orient-standard/schema.yaml +0 -0
- package/schemas/orient-standard/templates/archive-summary.md +0 -0
- package/schemas/orient-standard/templates/brief.md +0 -0
- package/schemas/orient-standard/templates/constitution.md +0 -0
- package/schemas/orient-standard/templates/current-system-audit.md +0 -0
- package/schemas/orient-standard/templates/current-truth-sync.md +0 -0
- package/schemas/orient-standard/templates/decisions.md +0 -0
- package/schemas/orient-standard/templates/normalize-checklist.md +0 -0
- package/schemas/orient-standard/templates/plan.md +0 -0
- package/schemas/orient-standard/templates/qa-checklist.md +0 -0
- package/schemas/orient-standard/templates/research.md +0 -0
- package/schemas/orient-standard/templates/sources.md +0 -0
- package/schemas/orient-standard/templates/spec.md +0 -0
- package/schemas/orient-standard/templates/state.md +0 -0
- package/schemas/orient-standard/templates/tasks.md +0 -0
- package/schemas/orient-standard/templates/traceability-matrix.md +0 -0
- package/schemas/orient-standard/templates/verify.md +0 -0
- package/schemas/orient-standard/templates/work-log.md +0 -0
- 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
- package/skills/orient-analyze/SKILL.md +0 -0
- package/skills/orient-archive/SKILL.md +0 -0
- package/skills/orient-clarify/SKILL.md +0 -0
- package/skills/orient-constitution/SKILL.md +0 -0
- package/skills/orient-decide/SKILL.md +0 -0
- package/skills/orient-execute/SKILL.md +0 -0
- package/skills/orient-integrate/SKILL.md +0 -0
- package/skills/orient-normalize/SKILL.md +0 -0
- package/skills/orient-orient/SKILL.md +0 -0
- package/skills/orient-plan/SKILL.md +0 -0
- package/skills/orient-research/SKILL.md +0 -0
- package/skills/orient-state/SKILL.md +0 -0
- package/skills/orient-tasks/SKILL.md +0 -0
- package/skills/orient-test/SKILL.md +0 -0
- package/skills/orient-verify/SKILL.md +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,gFAAgF;AAChF,8BAA8B;AAC9B,gFAAgF;AAEhF,IAAI,oBAAoB,GAAG,KAAK,CAAC;AAEjC;;;GAGG;AACH,MAAM,UAAU,sBAAs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AAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9D,8DAA8D;IAC9D,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9D,2EAA2E;IAC3E,wEAAwE;IACxE,iDAAiD;IACjD,IAAI,CAAC,QAAQ,GAAG,CAAC,iCAAiC,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC5E,IAAI,QAAQ,GAAG,CAAC,SAAS,CAAC,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IAElE,iDAAiD;IACjD,IAAI,kBAAkB,GAAG,SAAS,CAAC;IACnC,IAAI,QAAQ,GAAG,SAAS,CAAC,KAAK,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QAClE,kBAAkB,GAAG,UAAU,CAAC;IACjC,CAAC;IACD,kBAAkB,GAAG,iCAAiC,CAAC,kBAAkB,CAAC,CAAC;IAC3E,iDAAiD;IACjD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,kBAAkB,GAAG,EAAE;QAAE,OAAO,SAAS,CAAC;IAEtF,IAAI,CAAC;QACJ,OAAO,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACjD,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AAAA,CACD","sourcesContent":["/**\n * Keyboard input handling for terminal applications.\n *\n * Supports both legacy terminal sequences and Kitty keyboard protocol.\n * See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/\n * Reference: https://github.com/sst/opentui/blob/7da92b4088aebfe27b9f691c04163a48821e49fd/packages/core/src/lib/parse.keypress.ts\n *\n * Symbol keys are also supported, however some ctrl+symbol combos\n * overlap with ASCII codes, e.g. ctrl+[ = ESC.\n * See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#legacy-ctrl-mapping-of-ascii-keys\n * Those can still be * used for ctrl+shift combos\n *\n * API:\n * - matchesKey(data, keyId) - Check if input matches a key identifier\n * - parseKey(data) - Parse input and return the key identifier\n * - Key - Helper object for creating typed key identifiers\n * - setKittyProtocolActive(active) - Set global Kitty protocol state\n * - isKittyProtocolActive() - Query global Kitty protocol state\n */\n\n// =============================================================================\n// Global Kitty Protocol State\n// =============================================================================\n\nlet _kittyProtocolActive = false;\n\n/**\n * Set the global Kitty keyboard protocol state.\n * Called by ProcessTerminal after detecting protocol support.\n */\nexport function setKittyProtocolActive(active: boolean): void {\n\t_kittyProtocolActive = active;\n}\n\n/**\n * Query whether Kitty keyboard protocol is currently active.\n */\nexport function isKittyProtocolActive(): boolean {\n\treturn _kittyProtocolActive;\n}\n\n// =============================================================================\n// Type-Safe Key Identifiers\n// =============================================================================\n\ntype Letter =\n\t| \"a\"\n\t| \"b\"\n\t| \"c\"\n\t| \"d\"\n\t| \"e\"\n\t| \"f\"\n\t| \"g\"\n\t| \"h\"\n\t| \"i\"\n\t| \"j\"\n\t| \"k\"\n\t| \"l\"\n\t| \"m\"\n\t| \"n\"\n\t| \"o\"\n\t| \"p\"\n\t| \"q\"\n\t| \"r\"\n\t| \"s\"\n\t| \"t\"\n\t| \"u\"\n\t| \"v\"\n\t| \"w\"\n\t| \"x\"\n\t| \"y\"\n\t| \"z\";\n\ntype Digit = \"0\" | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\";\n\ntype SymbolKey =\n\t| \"`\"\n\t| \"-\"\n\t| \"=\"\n\t| \"[\"\n\t| \"]\"\n\t| \"\\\\\"\n\t| \";\"\n\t| \"'\"\n\t| \",\"\n\t| \".\"\n\t| \"/\"\n\t| \"!\"\n\t| \"@\"\n\t| \"#\"\n\t| \"$\"\n\t| \"%\"\n\t| \"^\"\n\t| \"&\"\n\t| \"*\"\n\t| \"(\"\n\t| \")\"\n\t| \"_\"\n\t| \"+\"\n\t| \"|\"\n\t| \"~\"\n\t| \"{\"\n\t| \"}\"\n\t| \":\"\n\t| \"<\"\n\t| \">\"\n\t| \"?\";\n\ntype SpecialKey =\n\t| \"escape\"\n\t| \"esc\"\n\t| \"enter\"\n\t| \"return\"\n\t| \"tab\"\n\t| \"space\"\n\t| \"backspace\"\n\t| \"delete\"\n\t| \"insert\"\n\t| \"clear\"\n\t| \"home\"\n\t| \"end\"\n\t| \"pageUp\"\n\t| \"pageDown\"\n\t| \"up\"\n\t| \"down\"\n\t| \"left\"\n\t| \"right\"\n\t| \"f1\"\n\t| \"f2\"\n\t| \"f3\"\n\t| \"f4\"\n\t| \"f5\"\n\t| \"f6\"\n\t| \"f7\"\n\t| \"f8\"\n\t| \"f9\"\n\t| \"f10\"\n\t| \"f11\"\n\t| \"f12\";\n\ntype BaseKey = Letter | Digit | SymbolKey | SpecialKey;\n\n/**\n * Union type of all valid key identifiers.\n * Provides autocomplete and catches typos at compile time.\n */\nexport type KeyId =\n\t| BaseKey\n\t| `ctrl+${BaseKey}`\n\t| `shift+${BaseKey}`\n\t| `alt+${BaseKey}`\n\t| `ctrl+shift+${BaseKey}`\n\t| `shift+ctrl+${BaseKey}`\n\t| `ctrl+alt+${BaseKey}`\n\t| `alt+ctrl+${BaseKey}`\n\t| `shift+alt+${BaseKey}`\n\t| `alt+shift+${BaseKey}`\n\t| `ctrl+shift+alt+${BaseKey}`\n\t| `ctrl+alt+shift+${BaseKey}`\n\t| `shift+ctrl+alt+${BaseKey}`\n\t| `shift+alt+ctrl+${BaseKey}`\n\t| `alt+ctrl+shift+${BaseKey}`\n\t| `alt+shift+ctrl+${BaseKey}`;\n\n/**\n * Helper object for creating typed key identifiers with autocomplete.\n *\n * Usage:\n * - Key.escape, Key.enter, Key.tab, etc. for special keys\n * - Key.backtick, Key.comma, Key.period, etc. for symbol keys\n * - Key.ctrl(\"c\"), Key.alt(\"x\") for single modifier\n * - Key.ctrlShift(\"p\"), Key.ctrlAlt(\"x\") for combined modifiers\n */\nexport const Key = {\n\t// Special keys\n\tescape: \"escape\" as const,\n\tesc: \"esc\" as const,\n\tenter: \"enter\" as const,\n\treturn: \"return\" as const,\n\ttab: \"tab\" as const,\n\tspace: \"space\" as const,\n\tbackspace: \"backspace\" as const,\n\tdelete: \"delete\" as const,\n\tinsert: \"insert\" as const,\n\tclear: \"clear\" as const,\n\thome: \"home\" as const,\n\tend: \"end\" as const,\n\tpageUp: \"pageUp\" as const,\n\tpageDown: \"pageDown\" as const,\n\tup: \"up\" as const,\n\tdown: \"down\" as const,\n\tleft: \"left\" as const,\n\tright: \"right\" as const,\n\tf1: \"f1\" as const,\n\tf2: \"f2\" as const,\n\tf3: \"f3\" as const,\n\tf4: \"f4\" as const,\n\tf5: \"f5\" as const,\n\tf6: \"f6\" as const,\n\tf7: \"f7\" as const,\n\tf8: \"f8\" as const,\n\tf9: \"f9\" as const,\n\tf10: \"f10\" as const,\n\tf11: \"f11\" as const,\n\tf12: \"f12\" as const,\n\n\t// Symbol keys\n\tbacktick: \"`\" as const,\n\thyphen: \"-\" as const,\n\tequals: \"=\" as const,\n\tleftbracket: \"[\" as const,\n\trightbracket: \"]\" as const,\n\tbackslash: \"\\\\\" as const,\n\tsemicolon: \";\" as const,\n\tquote: \"'\" as const,\n\tcomma: \",\" as const,\n\tperiod: \".\" as const,\n\tslash: \"/\" as const,\n\texclamation: \"!\" as const,\n\tat: \"@\" as const,\n\thash: \"#\" as const,\n\tdollar: \"$\" as const,\n\tpercent: \"%\" as const,\n\tcaret: \"^\" as const,\n\tampersand: \"&\" as const,\n\tasterisk: \"*\" as const,\n\tleftparen: \"(\" as const,\n\trightparen: \")\" as const,\n\tunderscore: \"_\" as const,\n\tplus: \"+\" as const,\n\tpipe: \"|\" as const,\n\ttilde: \"~\" as const,\n\tleftbrace: \"{\" as const,\n\trightbrace: \"}\" as const,\n\tcolon: \":\" as const,\n\tlessthan: \"<\" as const,\n\tgreaterthan: \">\" as const,\n\tquestion: \"?\" as const,\n\n\t// Single modifiers\n\tctrl: <K extends BaseKey>(key: K): `ctrl+${K}` => `ctrl+${key}`,\n\tshift: <K extends BaseKey>(key: K): `shift+${K}` => `shift+${key}`,\n\talt: <K extends BaseKey>(key: K): `alt+${K}` => `alt+${key}`,\n\n\t// Combined modifiers\n\tctrlShift: <K extends BaseKey>(key: K): `ctrl+shift+${K}` => `ctrl+shift+${key}`,\n\tshiftCtrl: <K extends BaseKey>(key: K): `shift+ctrl+${K}` => `shift+ctrl+${key}`,\n\tctrlAlt: <K extends BaseKey>(key: K): `ctrl+alt+${K}` => `ctrl+alt+${key}`,\n\taltCtrl: <K extends BaseKey>(key: K): `alt+ctrl+${K}` => `alt+ctrl+${key}`,\n\tshiftAlt: <K extends BaseKey>(key: K): `shift+alt+${K}` => `shift+alt+${key}`,\n\taltShift: <K extends BaseKey>(key: K): `alt+shift+${K}` => `alt+shift+${key}`,\n\n\t// Triple modifiers\n\tctrlShiftAlt: <K extends BaseKey>(key: K): `ctrl+shift+alt+${K}` => `ctrl+shift+alt+${key}`,\n} as const;\n\n// =============================================================================\n// Constants\n// =============================================================================\n\nconst SYMBOL_KEYS = new Set([\n\t\"`\",\n\t\"-\",\n\t\"=\",\n\t\"[\",\n\t\"]\",\n\t\"\\\\\",\n\t\";\",\n\t\"'\",\n\t\",\",\n\t\".\",\n\t\"/\",\n\t\"!\",\n\t\"@\",\n\t\"#\",\n\t\"$\",\n\t\"%\",\n\t\"^\",\n\t\"&\",\n\t\"*\",\n\t\"(\",\n\t\")\",\n\t\"_\",\n\t\"+\",\n\t\"|\",\n\t\"~\",\n\t\"{\",\n\t\"}\",\n\t\":\",\n\t\"<\",\n\t\">\",\n\t\"?\",\n]);\n\nconst MODIFIERS = {\n\tshift: 1,\n\talt: 2,\n\tctrl: 4,\n} as const;\n\nconst LOCK_MASK = 64 + 128; // Caps Lock + Num Lock\n\nconst CODEPOINTS = {\n\tescape: 27,\n\ttab: 9,\n\tenter: 13,\n\tspace: 32,\n\tbackspace: 127,\n\tkpEnter: 57414, // Numpad Enter (Kitty protocol)\n} as const;\n\nconst ARROW_CODEPOINTS = {\n\tup: -1,\n\tdown: -2,\n\tright: -3,\n\tleft: -4,\n} as const;\n\nconst FUNCTIONAL_CODEPOINTS = {\n\tdelete: -10,\n\tinsert: -11,\n\tpageUp: -12,\n\tpageDown: -13,\n\thome: -14,\n\tend: -15,\n} as const;\n\nconst KITTY_FUNCTIONAL_KEY_EQUIVALENTS = new Map<number, number>([\n\t[57399, 48], // KP_0 -> 0\n\t[57400, 49], // KP_1 -> 1\n\t[57401, 50], // KP_2 -> 2\n\t[57402, 51], // KP_3 -> 3\n\t[57403, 52], // KP_4 -> 4\n\t[57404, 53], // KP_5 -> 5\n\t[57405, 54], // KP_6 -> 6\n\t[57406, 55], // KP_7 -> 7\n\t[57407, 56], // KP_8 -> 8\n\t[57408, 57], // KP_9 -> 9\n\t[57409, 46], // KP_DECIMAL -> .\n\t[57410, 47], // KP_DIVIDE -> /\n\t[57411, 42], // KP_MULTIPLY -> *\n\t[57412, 45], // KP_SUBTRACT -> -\n\t[57413, 43], // KP_ADD -> +\n\t[57415, 61], // KP_EQUAL -> =\n\t[57416, 44], // KP_SEPARATOR -> ,\n\t[57417, ARROW_CODEPOINTS.left],\n\t[57418, ARROW_CODEPOINTS.right],\n\t[57419, ARROW_CODEPOINTS.up],\n\t[57420, ARROW_CODEPOINTS.down],\n\t[57421, FUNCTIONAL_CODEPOINTS.pageUp],\n\t[57422, FUNCTIONAL_CODEPOINTS.pageDown],\n\t[57423, FUNCTIONAL_CODEPOINTS.home],\n\t[57424, FUNCTIONAL_CODEPOINTS.end],\n\t[57425, FUNCTIONAL_CODEPOINTS.insert],\n\t[57426, FUNCTIONAL_CODEPOINTS.delete],\n]);\n\nfunction normalizeKittyFunctionalCodepoint(codepoint: number): number {\n\treturn KITTY_FUNCTIONAL_KEY_EQUIVALENTS.get(codepoint) ?? codepoint;\n}\n\nconst LEGACY_KEY_SEQUENCES = {\n\tup: [\"\\x1b[A\", \"\\x1bOA\"],\n\tdown: [\"\\x1b[B\", \"\\x1bOB\"],\n\tright: [\"\\x1b[C\", \"\\x1bOC\"],\n\tleft: [\"\\x1b[D\", \"\\x1bOD\"],\n\thome: [\"\\x1b[H\", \"\\x1bOH\", \"\\x1b[1~\", \"\\x1b[7~\"],\n\tend: [\"\\x1b[F\", \"\\x1bOF\", \"\\x1b[4~\", \"\\x1b[8~\"],\n\tinsert: [\"\\x1b[2~\"],\n\tdelete: [\"\\x1b[3~\"],\n\tpageUp: [\"\\x1b[5~\", \"\\x1b[[5~\"],\n\tpageDown: [\"\\x1b[6~\", \"\\x1b[[6~\"],\n\tclear: [\"\\x1b[E\", \"\\x1bOE\"],\n\tf1: [\"\\x1bOP\", \"\\x1b[11~\", \"\\x1b[[A\"],\n\tf2: [\"\\x1bOQ\", \"\\x1b[12~\", \"\\x1b[[B\"],\n\tf3: [\"\\x1bOR\", \"\\x1b[13~\", \"\\x1b[[C\"],\n\tf4: [\"\\x1bOS\", \"\\x1b[14~\", \"\\x1b[[D\"],\n\tf5: [\"\\x1b[15~\", \"\\x1b[[E\"],\n\tf6: [\"\\x1b[17~\"],\n\tf7: [\"\\x1b[18~\"],\n\tf8: [\"\\x1b[19~\"],\n\tf9: [\"\\x1b[20~\"],\n\tf10: [\"\\x1b[21~\"],\n\tf11: [\"\\x1b[23~\"],\n\tf12: [\"\\x1b[24~\"],\n} as const;\n\nconst LEGACY_SHIFT_SEQUENCES = {\n\tup: [\"\\x1b[a\"],\n\tdown: [\"\\x1b[b\"],\n\tright: [\"\\x1b[c\"],\n\tleft: [\"\\x1b[d\"],\n\tclear: [\"\\x1b[e\"],\n\tinsert: [\"\\x1b[2$\"],\n\tdelete: [\"\\x1b[3$\"],\n\tpageUp: [\"\\x1b[5$\"],\n\tpageDown: [\"\\x1b[6$\"],\n\thome: [\"\\x1b[7$\"],\n\tend: [\"\\x1b[8$\"],\n} as const;\n\nconst LEGACY_CTRL_SEQUENCES = {\n\tup: [\"\\x1bOa\"],\n\tdown: [\"\\x1bOb\"],\n\tright: [\"\\x1bOc\"],\n\tleft: [\"\\x1bOd\"],\n\tclear: [\"\\x1bOe\"],\n\tinsert: [\"\\x1b[2^\"],\n\tdelete: [\"\\x1b[3^\"],\n\tpageUp: [\"\\x1b[5^\"],\n\tpageDown: [\"\\x1b[6^\"],\n\thome: [\"\\x1b[7^\"],\n\tend: [\"\\x1b[8^\"],\n} as const;\n\nconst LEGACY_SEQUENCE_KEY_IDS: Record<string, KeyId> = {\n\t\"\\x1bOA\": \"up\",\n\t\"\\x1bOB\": \"down\",\n\t\"\\x1bOC\": \"right\",\n\t\"\\x1bOD\": \"left\",\n\t\"\\x1bOH\": \"home\",\n\t\"\\x1bOF\": \"end\",\n\t\"\\x1b[E\": \"clear\",\n\t\"\\x1bOE\": \"clear\",\n\t\"\\x1bOe\": \"ctrl+clear\",\n\t\"\\x1b[e\": \"shift+clear\",\n\t\"\\x1b[2~\": \"insert\",\n\t\"\\x1b[2$\": \"shift+insert\",\n\t\"\\x1b[2^\": \"ctrl+insert\",\n\t\"\\x1b[3$\": \"shift+delete\",\n\t\"\\x1b[3^\": \"ctrl+delete\",\n\t\"\\x1b[[5~\": \"pageUp\",\n\t\"\\x1b[[6~\": \"pageDown\",\n\t\"\\x1b[a\": \"shift+up\",\n\t\"\\x1b[b\": \"shift+down\",\n\t\"\\x1b[c\": \"shift+right\",\n\t\"\\x1b[d\": \"shift+left\",\n\t\"\\x1bOa\": \"ctrl+up\",\n\t\"\\x1bOb\": \"ctrl+down\",\n\t\"\\x1bOc\": \"ctrl+right\",\n\t\"\\x1bOd\": \"ctrl+left\",\n\t\"\\x1b[5$\": \"shift+pageUp\",\n\t\"\\x1b[6$\": \"shift+pageDown\",\n\t\"\\x1b[7$\": \"shift+home\",\n\t\"\\x1b[8$\": \"shift+end\",\n\t\"\\x1b[5^\": \"ctrl+pageUp\",\n\t\"\\x1b[6^\": \"ctrl+pageDown\",\n\t\"\\x1b[7^\": \"ctrl+home\",\n\t\"\\x1b[8^\": \"ctrl+end\",\n\t\"\\x1bOP\": \"f1\",\n\t\"\\x1bOQ\": \"f2\",\n\t\"\\x1bOR\": \"f3\",\n\t\"\\x1bOS\": \"f4\",\n\t\"\\x1b[11~\": \"f1\",\n\t\"\\x1b[12~\": \"f2\",\n\t\"\\x1b[13~\": \"f3\",\n\t\"\\x1b[14~\": \"f4\",\n\t\"\\x1b[[A\": \"f1\",\n\t\"\\x1b[[B\": \"f2\",\n\t\"\\x1b[[C\": \"f3\",\n\t\"\\x1b[[D\": \"f4\",\n\t\"\\x1b[[E\": \"f5\",\n\t\"\\x1b[15~\": \"f5\",\n\t\"\\x1b[17~\": \"f6\",\n\t\"\\x1b[18~\": \"f7\",\n\t\"\\x1b[19~\": \"f8\",\n\t\"\\x1b[20~\": \"f9\",\n\t\"\\x1b[21~\": \"f10\",\n\t\"\\x1b[23~\": \"f11\",\n\t\"\\x1b[24~\": \"f12\",\n\t\"\\x1bb\": \"alt+left\",\n\t\"\\x1bf\": \"alt+right\",\n\t\"\\x1bp\": \"alt+up\",\n\t\"\\x1bn\": \"alt+down\",\n} as const;\n\ntype LegacyModifierKey = keyof typeof LEGACY_SHIFT_SEQUENCES;\n\nconst matchesLegacySequence = (data: string, sequences: readonly string[]): boolean => sequences.includes(data);\n\nconst matchesLegacyModifierSequence = (data: string, key: LegacyModifierKey, modifier: number): boolean => {\n\tif (modifier === MODIFIERS.shift) {\n\t\treturn matchesLegacySequence(data, LEGACY_SHIFT_SEQUENCES[key]);\n\t}\n\tif (modifier === MODIFIERS.ctrl) {\n\t\treturn matchesLegacySequence(data, LEGACY_CTRL_SEQUENCES[key]);\n\t}\n\treturn false;\n};\n\n// =============================================================================\n// Kitty Protocol Parsing\n// =============================================================================\n\n/**\n * Event types from Kitty keyboard protocol (flag 2)\n * 1 = key press, 2 = key repeat, 3 = key release\n */\nexport type KeyEventType = \"press\" | \"repeat\" | \"release\";\n\ninterface ParsedKittySequence {\n\tcodepoint: number;\n\tshiftedKey?: number; // Shifted version of the key (when shift is pressed)\n\tbaseLayoutKey?: number; // Key in standard PC-101 layout (for non-Latin layouts)\n\tmodifier: number;\n\teventType: KeyEventType;\n}\n\ninterface ParsedModifyOtherKeysSequence {\n\tcodepoint: number;\n\tmodifier: number;\n}\n\n// Store the last parsed event type for isKeyRelease() to query\nlet _lastEventType: KeyEventType = \"press\";\n\n/**\n * Check if the last parsed key event was a key release.\n * Only meaningful when Kitty keyboard protocol with flag 2 is active.\n */\nexport function isKeyRelease(data: string): boolean {\n\t// Don't treat bracketed paste content as key release, even if it contains\n\t// patterns like \":3F\" (e.g., bluetooth MAC addresses like \"90:62:3F:A5\").\n\t// Terminal.ts re-wraps paste content with bracketed paste markers before\n\t// passing to TUI, so pasted data will always contain \\x1b[200~.\n\tif (data.includes(\"\\x1b[200~\")) {\n\t\treturn false;\n\t}\n\n\t// Quick check: release events with flag 2 contain \":3\"\n\t// Format: \\x1b[<codepoint>;<modifier>:3u\n\tif (\n\t\tdata.includes(\":3u\") ||\n\t\tdata.includes(\":3~\") ||\n\t\tdata.includes(\":3A\") ||\n\t\tdata.includes(\":3B\") ||\n\t\tdata.includes(\":3C\") ||\n\t\tdata.includes(\":3D\") ||\n\t\tdata.includes(\":3H\") ||\n\t\tdata.includes(\":3F\")\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n/**\n * Check if the last parsed key event was a key repeat.\n * Only meaningful when Kitty keyboard protocol with flag 2 is active.\n */\nexport function isKeyRepeat(data: string): boolean {\n\t// Don't treat bracketed paste content as key repeat, even if it contains\n\t// patterns like \":2F\". See isKeyRelease() for details.\n\tif (data.includes(\"\\x1b[200~\")) {\n\t\treturn false;\n\t}\n\n\tif (\n\t\tdata.includes(\":2u\") ||\n\t\tdata.includes(\":2~\") ||\n\t\tdata.includes(\":2A\") ||\n\t\tdata.includes(\":2B\") ||\n\t\tdata.includes(\":2C\") ||\n\t\tdata.includes(\":2D\") ||\n\t\tdata.includes(\":2H\") ||\n\t\tdata.includes(\":2F\")\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nfunction parseEventType(eventTypeStr: string | undefined): KeyEventType {\n\tif (!eventTypeStr) return \"press\";\n\tconst eventType = parseInt(eventTypeStr, 10);\n\tif (eventType === 2) return \"repeat\";\n\tif (eventType === 3) return \"release\";\n\treturn \"press\";\n}\n\nfunction parseKittySequence(data: string): ParsedKittySequence | null {\n\t// CSI u format with alternate keys (flag 4):\n\t// \\x1b[<codepoint>u\n\t// \\x1b[<codepoint>;<mod>u\n\t// \\x1b[<codepoint>;<mod>:<event>u\n\t// \\x1b[<codepoint>:<shifted>;<mod>u\n\t// \\x1b[<codepoint>:<shifted>:<base>;<mod>u\n\t// \\x1b[<codepoint>::<base>;<mod>u (no shifted key, only base)\n\t//\n\t// With flag 2, event type is appended after modifier colon: 1=press, 2=repeat, 3=release\n\t// With flag 4, alternate keys are appended after codepoint with colons\n\tconst csiUMatch = data.match(/^\\x1b\\[(\\d+)(?::(\\d*))?(?::(\\d+))?(?:;(\\d+))?(?::(\\d+))?u$/);\n\tif (csiUMatch) {\n\t\tconst codepoint = parseInt(csiUMatch[1]!, 10);\n\t\tconst shiftedKey = csiUMatch[2] && csiUMatch[2].length > 0 ? parseInt(csiUMatch[2], 10) : undefined;\n\t\tconst baseLayoutKey = csiUMatch[3] ? parseInt(csiUMatch[3], 10) : undefined;\n\t\tconst modValue = csiUMatch[4] ? parseInt(csiUMatch[4], 10) : 1;\n\t\tconst eventType = parseEventType(csiUMatch[5]);\n\t\t_lastEventType = eventType;\n\t\treturn { codepoint, shiftedKey, baseLayoutKey, modifier: modValue - 1, eventType };\n\t}\n\n\t// Arrow keys with modifier: \\x1b[1;<mod>A/B/C/D or \\x1b[1;<mod>:<event>A/B/C/D\n\tconst arrowMatch = data.match(/^\\x1b\\[1;(\\d+)(?::(\\d+))?([ABCD])$/);\n\tif (arrowMatch) {\n\t\tconst modValue = parseInt(arrowMatch[1]!, 10);\n\t\tconst eventType = parseEventType(arrowMatch[2]);\n\t\tconst arrowCodes: Record<string, number> = { A: -1, B: -2, C: -3, D: -4 };\n\t\t_lastEventType = eventType;\n\t\treturn { codepoint: arrowCodes[arrowMatch[3]!]!, modifier: modValue - 1, eventType };\n\t}\n\n\t// Functional keys: \\x1b[<num>~ or \\x1b[<num>;<mod>~ or \\x1b[<num>;<mod>:<event>~\n\tconst funcMatch = data.match(/^\\x1b\\[(\\d+)(?:;(\\d+))?(?::(\\d+))?~$/);\n\tif (funcMatch) {\n\t\tconst keyNum = parseInt(funcMatch[1]!, 10);\n\t\tconst modValue = funcMatch[2] ? parseInt(funcMatch[2], 10) : 1;\n\t\tconst eventType = parseEventType(funcMatch[3]);\n\t\tconst funcCodes: Record<number, number> = {\n\t\t\t2: FUNCTIONAL_CODEPOINTS.insert,\n\t\t\t3: FUNCTIONAL_CODEPOINTS.delete,\n\t\t\t5: FUNCTIONAL_CODEPOINTS.pageUp,\n\t\t\t6: FUNCTIONAL_CODEPOINTS.pageDown,\n\t\t\t7: FUNCTIONAL_CODEPOINTS.home,\n\t\t\t8: FUNCTIONAL_CODEPOINTS.end,\n\t\t};\n\t\tconst codepoint = funcCodes[keyNum];\n\t\tif (codepoint !== undefined) {\n\t\t\t_lastEventType = eventType;\n\t\t\treturn { codepoint, modifier: modValue - 1, eventType };\n\t\t}\n\t}\n\n\t// Home/End with modifier: \\x1b[1;<mod>H/F or \\x1b[1;<mod>:<event>H/F\n\tconst homeEndMatch = data.match(/^\\x1b\\[1;(\\d+)(?::(\\d+))?([HF])$/);\n\tif (homeEndMatch) {\n\t\tconst modValue = parseInt(homeEndMatch[1]!, 10);\n\t\tconst eventType = parseEventType(homeEndMatch[2]);\n\t\tconst codepoint = homeEndMatch[3] === \"H\" ? FUNCTIONAL_CODEPOINTS.home : FUNCTIONAL_CODEPOINTS.end;\n\t\t_lastEventType = eventType;\n\t\treturn { codepoint, modifier: modValue - 1, eventType };\n\t}\n\n\treturn null;\n}\n\nfunction matchesKittySequence(data: string, expectedCodepoint: number, expectedModifier: number): boolean {\n\tconst parsed = parseKittySequence(data);\n\tif (!parsed) return false;\n\tconst actualMod = parsed.modifier & ~LOCK_MASK;\n\tconst expectedMod = expectedModifier & ~LOCK_MASK;\n\n\t// Check if modifiers match\n\tif (actualMod !== expectedMod) return false;\n\n\tconst normalizedCodepoint = normalizeKittyFunctionalCodepoint(parsed.codepoint);\n\tconst normalizedExpectedCodepoint = normalizeKittyFunctionalCodepoint(expectedCodepoint);\n\n\t// Primary match: codepoint matches directly after normalizing functional keys\n\tif (normalizedCodepoint === normalizedExpectedCodepoint) return true;\n\n\t// Alternate match: use base layout key for non-Latin keyboard layouts.\n\t// This allows Ctrl+С (Cyrillic) to match Ctrl+c (Latin) when terminal reports\n\t// the base layout key (the key in standard PC-101 layout).\n\t//\n\t// Only fall back to base layout key when the codepoint is NOT already a\n\t// recognized Latin letter (a-z) or symbol (e.g., /, -, [, ;, etc.).\n\t// When the codepoint is a recognized key, it is authoritative regardless\n\t// of physical key position. This prevents remapped layouts (Dvorak, Colemak,\n\t// xremap, etc.) from causing false matches: both letters and symbols move\n\t// to different physical positions, so Ctrl+K could falsely match Ctrl+V\n\t// (letter remapping) and Ctrl+/ could falsely match Ctrl+[ (symbol remapping)\n\t// if the base layout key were always considered.\n\tif (parsed.baseLayoutKey !== undefined && parsed.baseLayoutKey === expectedCodepoint) {\n\t\tconst cp = normalizedCodepoint;\n\t\tconst isLatinLetter = cp >= 97 && cp <= 122; // a-z\n\t\tconst isKnownSymbol = SYMBOL_KEYS.has(String.fromCharCode(cp));\n\t\tif (!isLatinLetter && !isKnownSymbol) return true;\n\t}\n\n\treturn false;\n}\n\nfunction parseModifyOtherKeysSequence(data: string): ParsedModifyOtherKeysSequence | null {\n\tconst match = data.match(/^\\x1b\\[27;(\\d+);(\\d+)~$/);\n\tif (!match) return null;\n\tconst modValue = parseInt(match[1]!, 10);\n\tconst codepoint = parseInt(match[2]!, 10);\n\treturn { codepoint, modifier: modValue - 1 };\n}\n\n/**\n * Match xterm modifyOtherKeys format: CSI 27 ; modifiers ; keycode ~\n * This is used by terminals when Kitty protocol is not enabled.\n * Modifier values are 1-indexed: 2=shift, 3=alt, 5=ctrl, etc.\n */\nfunction matchesModifyOtherKeys(data: string, expectedKeycode: number, expectedModifier: number): boolean {\n\tconst parsed = parseModifyOtherKeysSequence(data);\n\tif (!parsed) return false;\n\treturn parsed.codepoint === expectedKeycode && parsed.modifier === expectedModifier;\n}\n\nfunction isWindowsTerminalSession(): boolean {\n\treturn (\n\t\tBoolean(process.env.WT_SESSION) && !process.env.SSH_CONNECTION && !process.env.SSH_CLIENT && !process.env.SSH_TTY\n\t);\n}\n\n/**\n * Raw 0x08 (BS) is ambiguous in legacy terminals.\n *\n * - Windows Terminal uses it for Ctrl+Backspace.\n * - Some legacy terminals and tmux setups send it for plain Backspace.\n *\n * Prefer explicit Kitty / CSI-u / modifyOtherKeys sequences whenever they are\n * available. Fall back to a Windows Terminal heuristic only for raw BS bytes.\n */\nfunction matchesRawBackspace(data: string, expectedModifier: number): boolean {\n\tif (data === \"\\x7f\") return expectedModifier === 0;\n\tif (data !== \"\\x08\") return false;\n\treturn isWindowsTerminalSession() ? expectedModifier === MODIFIERS.ctrl : expectedModifier === 0;\n}\n\n// =============================================================================\n// Generic Key Matching\n// =============================================================================\n\n/**\n * Get the control character for a key.\n * Uses the universal formula: code & 0x1f (mask to lower 5 bits)\n *\n * Works for:\n * - Letters a-z → 1-26\n * - Symbols [\\]_ → 27, 28, 29, 31\n * - Also maps - to same as _ (same physical key on US keyboards)\n */\nfunction rawCtrlChar(key: string): string | null {\n\tconst char = key.toLowerCase();\n\tconst code = char.charCodeAt(0);\n\tif ((code >= 97 && code <= 122) || char === \"[\" || char === \"\\\\\" || char === \"]\" || char === \"_\") {\n\t\treturn String.fromCharCode(code & 0x1f);\n\t}\n\t// Handle - as _ (same physical key on US keyboards)\n\tif (char === \"-\") {\n\t\treturn String.fromCharCode(31); // Same as Ctrl+_\n\t}\n\treturn null;\n}\n\nfunction isDigitKey(key: string): boolean {\n\treturn key >= \"0\" && key <= \"9\";\n}\n\nfunction matchesPrintableModifyOtherKeys(data: string, expectedKeycode: number, expectedModifier: number): boolean {\n\tif (expectedModifier === 0) return false;\n\treturn matchesModifyOtherKeys(data, expectedKeycode, expectedModifier);\n}\n\nfunction formatKeyNameWithModifiers(keyName: string, modifier: number): string | undefined {\n\tconst mods: string[] = [];\n\tconst effectiveMod = modifier & ~LOCK_MASK;\n\tconst supportedModifierMask = MODIFIERS.shift | MODIFIERS.ctrl | MODIFIERS.alt;\n\tif ((effectiveMod & ~supportedModifierMask) !== 0) return undefined;\n\tif (effectiveMod & MODIFIERS.shift) mods.push(\"shift\");\n\tif (effectiveMod & MODIFIERS.ctrl) mods.push(\"ctrl\");\n\tif (effectiveMod & MODIFIERS.alt) mods.push(\"alt\");\n\treturn mods.length > 0 ? `${mods.join(\"+\")}+${keyName}` : keyName;\n}\n\nfunction parseKeyId(keyId: string): { key: string; ctrl: boolean; shift: boolean; alt: boolean } | null {\n\tconst parts = keyId.toLowerCase().split(\"+\");\n\tconst key = parts[parts.length - 1];\n\tif (!key) return null;\n\treturn {\n\t\tkey,\n\t\tctrl: parts.includes(\"ctrl\"),\n\t\tshift: parts.includes(\"shift\"),\n\t\talt: parts.includes(\"alt\"),\n\t};\n}\n\n/**\n * Match input data against a key identifier string.\n *\n * Supported key identifiers:\n * - Single keys: \"escape\", \"tab\", \"enter\", \"backspace\", \"delete\", \"home\", \"end\", \"space\"\n * - Arrow keys: \"up\", \"down\", \"left\", \"right\"\n * - Ctrl combinations: \"ctrl+c\", \"ctrl+z\", etc.\n * - Shift combinations: \"shift+tab\", \"shift+enter\"\n * - Alt combinations: \"alt+enter\", \"alt+backspace\"\n * - Combined modifiers: \"shift+ctrl+p\", \"ctrl+alt+x\"\n *\n * Use the Key helper for autocomplete: Key.ctrl(\"c\"), Key.escape, Key.ctrlShift(\"p\")\n *\n * @param data - Raw input data from terminal\n * @param keyId - Key identifier (e.g., \"ctrl+c\", \"escape\", Key.ctrl(\"c\"))\n */\nexport function matchesKey(data: string, keyId: KeyId): boolean {\n\tconst parsed = parseKeyId(keyId);\n\tif (!parsed) return false;\n\n\tconst { key, ctrl, shift, alt } = parsed;\n\tlet modifier = 0;\n\tif (shift) modifier |= MODIFIERS.shift;\n\tif (alt) modifier |= MODIFIERS.alt;\n\tif (ctrl) modifier |= MODIFIERS.ctrl;\n\n\tswitch (key) {\n\t\tcase \"escape\":\n\t\tcase \"esc\":\n\t\t\tif (modifier !== 0) return false;\n\t\t\treturn (\n\t\t\t\tdata === \"\\x1b\" ||\n\t\t\t\tmatchesKittySequence(data, CODEPOINTS.escape, 0) ||\n\t\t\t\tmatchesModifyOtherKeys(data, CODEPOINTS.escape, 0)\n\t\t\t);\n\n\t\tcase \"space\":\n\t\t\tif (!_kittyProtocolActive) {\n\t\t\t\tif (ctrl && !alt && !shift && data === \"\\x00\") {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (alt && !ctrl && !shift && data === \"\\x1b \") {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tdata === \" \" ||\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.space, 0) ||\n\t\t\t\t\tmatchesModifyOtherKeys(data, CODEPOINTS.space, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn (\n\t\t\t\tmatchesKittySequence(data, CODEPOINTS.space, modifier) ||\n\t\t\t\tmatchesModifyOtherKeys(data, CODEPOINTS.space, modifier)\n\t\t\t);\n\n\t\tcase \"tab\":\n\t\t\tif (shift && !ctrl && !alt) {\n\t\t\t\treturn (\n\t\t\t\t\tdata === \"\\x1b[Z\" ||\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.tab, MODIFIERS.shift) ||\n\t\t\t\t\tmatchesModifyOtherKeys(data, CODEPOINTS.tab, MODIFIERS.shift)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn data === \"\\t\" || matchesKittySequence(data, CODEPOINTS.tab, 0);\n\t\t\t}\n\t\t\treturn (\n\t\t\t\tmatchesKittySequence(data, CODEPOINTS.tab, modifier) ||\n\t\t\t\tmatchesModifyOtherKeys(data, CODEPOINTS.tab, modifier)\n\t\t\t);\n\n\t\tcase \"enter\":\n\t\tcase \"return\":\n\t\t\tif (shift && !ctrl && !alt) {\n\t\t\t\t// CSI u sequences (standard Kitty protocol)\n\t\t\t\tif (\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.enter, MODIFIERS.shift) ||\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.kpEnter, MODIFIERS.shift)\n\t\t\t\t) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// xterm modifyOtherKeys format (fallback when Kitty protocol not enabled)\n\t\t\t\tif (matchesModifyOtherKeys(data, CODEPOINTS.enter, MODIFIERS.shift)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// When Kitty protocol is active, legacy sequences are custom terminal mappings\n\t\t\t\t// \\x1b\\r = Kitty's \"map shift+enter send_text all \\e\\r\"\n\t\t\t\t// \\n = Ghostty's \"keybind = shift+enter=text:\\n\"\n\t\t\t\tif (_kittyProtocolActive) {\n\t\t\t\t\treturn data === \"\\x1b\\r\" || data === \"\\n\";\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (alt && !ctrl && !shift) {\n\t\t\t\t// CSI u sequences (standard Kitty protocol)\n\t\t\t\tif (\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.enter, MODIFIERS.alt) ||\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.kpEnter, MODIFIERS.alt)\n\t\t\t\t) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// xterm modifyOtherKeys format (fallback when Kitty protocol not enabled)\n\t\t\t\tif (matchesModifyOtherKeys(data, CODEPOINTS.enter, MODIFIERS.alt)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// \\x1b\\r is alt+enter only in legacy mode (no Kitty protocol)\n\t\t\t\t// When Kitty protocol is active, alt+enter comes as CSI u sequence\n\t\t\t\tif (!_kittyProtocolActive) {\n\t\t\t\t\treturn data === \"\\x1b\\r\";\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tdata === \"\\r\" ||\n\t\t\t\t\t(!_kittyProtocolActive && data === \"\\n\") ||\n\t\t\t\t\tdata === \"\\x1bOM\" || // SS3 M (numpad enter in some terminals)\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.enter, 0) ||\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.kpEnter, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn (\n\t\t\t\tmatchesKittySequence(data, CODEPOINTS.enter, modifier) ||\n\t\t\t\tmatchesKittySequence(data, CODEPOINTS.kpEnter, modifier) ||\n\t\t\t\tmatchesModifyOtherKeys(data, CODEPOINTS.enter, modifier)\n\t\t\t);\n\n\t\tcase \"backspace\":\n\t\t\tif (alt && !ctrl && !shift) {\n\t\t\t\tif (data === \"\\x1b\\x7f\" || data === \"\\x1b\\b\") {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.backspace, MODIFIERS.alt) ||\n\t\t\t\t\tmatchesModifyOtherKeys(data, CODEPOINTS.backspace, MODIFIERS.alt)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (ctrl && !alt && !shift) {\n\t\t\t\t// Legacy raw 0x08 is ambiguous: it can be Ctrl+Backspace on Windows\n\t\t\t\t// Terminal or plain Backspace on other terminals, while also\n\t\t\t\t// overlapping with Ctrl+H.\n\t\t\t\tif (matchesRawBackspace(data, MODIFIERS.ctrl)) return true;\n\t\t\t\treturn (\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.backspace, MODIFIERS.ctrl) ||\n\t\t\t\t\tmatchesModifyOtherKeys(data, CODEPOINTS.backspace, MODIFIERS.ctrl)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesRawBackspace(data, 0) ||\n\t\t\t\t\tmatchesKittySequence(data, CODEPOINTS.backspace, 0) ||\n\t\t\t\t\tmatchesModifyOtherKeys(data, CODEPOINTS.backspace, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn (\n\t\t\t\tmatchesKittySequence(data, CODEPOINTS.backspace, modifier) ||\n\t\t\t\tmatchesModifyOtherKeys(data, CODEPOINTS.backspace, modifier)\n\t\t\t);\n\n\t\tcase \"insert\":\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesLegacySequence(data, LEGACY_KEY_SEQUENCES.insert) ||\n\t\t\t\t\tmatchesKittySequence(data, FUNCTIONAL_CODEPOINTS.insert, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (matchesLegacyModifierSequence(data, \"insert\", modifier)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.insert, modifier);\n\n\t\tcase \"delete\":\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesLegacySequence(data, LEGACY_KEY_SEQUENCES.delete) ||\n\t\t\t\t\tmatchesKittySequence(data, FUNCTIONAL_CODEPOINTS.delete, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (matchesLegacyModifierSequence(data, \"delete\", modifier)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.delete, modifier);\n\n\t\tcase \"clear\":\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn matchesLegacySequence(data, LEGACY_KEY_SEQUENCES.clear);\n\t\t\t}\n\t\t\treturn matchesLegacyModifierSequence(data, \"clear\", modifier);\n\n\t\tcase \"home\":\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesLegacySequence(data, LEGACY_KEY_SEQUENCES.home) ||\n\t\t\t\t\tmatchesKittySequence(data, FUNCTIONAL_CODEPOINTS.home, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (matchesLegacyModifierSequence(data, \"home\", modifier)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.home, modifier);\n\n\t\tcase \"end\":\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesLegacySequence(data, LEGACY_KEY_SEQUENCES.end) ||\n\t\t\t\t\tmatchesKittySequence(data, FUNCTIONAL_CODEPOINTS.end, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (matchesLegacyModifierSequence(data, \"end\", modifier)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.end, modifier);\n\n\t\tcase \"pageup\":\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesLegacySequence(data, LEGACY_KEY_SEQUENCES.pageUp) ||\n\t\t\t\t\tmatchesKittySequence(data, FUNCTIONAL_CODEPOINTS.pageUp, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (matchesLegacyModifierSequence(data, \"pageUp\", modifier)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.pageUp, modifier);\n\n\t\tcase \"pagedown\":\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesLegacySequence(data, LEGACY_KEY_SEQUENCES.pageDown) ||\n\t\t\t\t\tmatchesKittySequence(data, FUNCTIONAL_CODEPOINTS.pageDown, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (matchesLegacyModifierSequence(data, \"pageDown\", modifier)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn matchesKittySequence(data, FUNCTIONAL_CODEPOINTS.pageDown, modifier);\n\n\t\tcase \"up\":\n\t\t\tif (alt && !ctrl && !shift) {\n\t\t\t\treturn data === \"\\x1bp\" || matchesKittySequence(data, ARROW_CODEPOINTS.up, MODIFIERS.alt);\n\t\t\t}\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesLegacySequence(data, LEGACY_KEY_SEQUENCES.up) ||\n\t\t\t\t\tmatchesKittySequence(data, ARROW_CODEPOINTS.up, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (matchesLegacyModifierSequence(data, \"up\", modifier)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn matchesKittySequence(data, ARROW_CODEPOINTS.up, modifier);\n\n\t\tcase \"down\":\n\t\t\tif (alt && !ctrl && !shift) {\n\t\t\t\treturn data === \"\\x1bn\" || matchesKittySequence(data, ARROW_CODEPOINTS.down, MODIFIERS.alt);\n\t\t\t}\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesLegacySequence(data, LEGACY_KEY_SEQUENCES.down) ||\n\t\t\t\t\tmatchesKittySequence(data, ARROW_CODEPOINTS.down, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (matchesLegacyModifierSequence(data, \"down\", modifier)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn matchesKittySequence(data, ARROW_CODEPOINTS.down, modifier);\n\n\t\tcase \"left\":\n\t\t\tif (alt && !ctrl && !shift) {\n\t\t\t\treturn (\n\t\t\t\t\tdata === \"\\x1b[1;3D\" ||\n\t\t\t\t\t(!_kittyProtocolActive && data === \"\\x1bB\") ||\n\t\t\t\t\tdata === \"\\x1bb\" ||\n\t\t\t\t\tmatchesKittySequence(data, ARROW_CODEPOINTS.left, MODIFIERS.alt)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (ctrl && !alt && !shift) {\n\t\t\t\treturn (\n\t\t\t\t\tdata === \"\\x1b[1;5D\" ||\n\t\t\t\t\tmatchesLegacyModifierSequence(data, \"left\", MODIFIERS.ctrl) ||\n\t\t\t\t\tmatchesKittySequence(data, ARROW_CODEPOINTS.left, MODIFIERS.ctrl)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesLegacySequence(data, LEGACY_KEY_SEQUENCES.left) ||\n\t\t\t\t\tmatchesKittySequence(data, ARROW_CODEPOINTS.left, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (matchesLegacyModifierSequence(data, \"left\", modifier)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn matchesKittySequence(data, ARROW_CODEPOINTS.left, modifier);\n\n\t\tcase \"right\":\n\t\t\tif (alt && !ctrl && !shift) {\n\t\t\t\treturn (\n\t\t\t\t\tdata === \"\\x1b[1;3C\" ||\n\t\t\t\t\t(!_kittyProtocolActive && data === \"\\x1bF\") ||\n\t\t\t\t\tdata === \"\\x1bf\" ||\n\t\t\t\t\tmatchesKittySequence(data, ARROW_CODEPOINTS.right, MODIFIERS.alt)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (ctrl && !alt && !shift) {\n\t\t\t\treturn (\n\t\t\t\t\tdata === \"\\x1b[1;5C\" ||\n\t\t\t\t\tmatchesLegacyModifierSequence(data, \"right\", MODIFIERS.ctrl) ||\n\t\t\t\t\tmatchesKittySequence(data, ARROW_CODEPOINTS.right, MODIFIERS.ctrl)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (modifier === 0) {\n\t\t\t\treturn (\n\t\t\t\t\tmatchesLegacySequence(data, LEGACY_KEY_SEQUENCES.right) ||\n\t\t\t\t\tmatchesKittySequence(data, ARROW_CODEPOINTS.right, 0)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (matchesLegacyModifierSequence(data, \"right\", modifier)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn matchesKittySequence(data, ARROW_CODEPOINTS.right, modifier);\n\n\t\tcase \"f1\":\n\t\tcase \"f2\":\n\t\tcase \"f3\":\n\t\tcase \"f4\":\n\t\tcase \"f5\":\n\t\tcase \"f6\":\n\t\tcase \"f7\":\n\t\tcase \"f8\":\n\t\tcase \"f9\":\n\t\tcase \"f10\":\n\t\tcase \"f11\":\n\t\tcase \"f12\": {\n\t\t\tif (modifier !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst functionKey = key as keyof typeof LEGACY_KEY_SEQUENCES;\n\t\t\treturn matchesLegacySequence(data, LEGACY_KEY_SEQUENCES[functionKey]);\n\t\t}\n\t}\n\n\t// Handle single letter/digit keys and symbols\n\tif (key.length === 1 && ((key >= \"a\" && key <= \"z\") || isDigitKey(key) || SYMBOL_KEYS.has(key))) {\n\t\tconst codepoint = key.charCodeAt(0);\n\t\tconst rawCtrl = rawCtrlChar(key);\n\t\tconst isLetter = key >= \"a\" && key <= \"z\";\n\t\tconst isDigit = isDigitKey(key);\n\n\t\tif (ctrl && alt && !shift && !_kittyProtocolActive && rawCtrl) {\n\t\t\t// Legacy: ctrl+alt+key is ESC followed by the control character\n\t\t\treturn data === `\\x1b${rawCtrl}`;\n\t\t}\n\n\t\tif (alt && !ctrl && !shift && !_kittyProtocolActive && (isLetter || isDigit)) {\n\t\t\t// Legacy: alt+letter/digit is ESC followed by the key\n\t\t\tif (data === `\\x1b${key}`) return true;\n\t\t}\n\n\t\tif (ctrl && !shift && !alt) {\n\t\t\t// Legacy: ctrl+key sends the control character\n\t\t\tif (rawCtrl && data === rawCtrl) return true;\n\t\t\treturn (\n\t\t\t\tmatchesKittySequence(data, codepoint, MODIFIERS.ctrl) ||\n\t\t\t\tmatchesPrintableModifyOtherKeys(data, codepoint, MODIFIERS.ctrl)\n\t\t\t);\n\t\t}\n\n\t\tif (ctrl && shift && !alt) {\n\t\t\treturn (\n\t\t\t\tmatchesKittySequence(data, codepoint, MODIFIERS.shift + MODIFIERS.ctrl) ||\n\t\t\t\tmatchesPrintableModifyOtherKeys(data, codepoint, MODIFIERS.shift + MODIFIERS.ctrl)\n\t\t\t);\n\t\t}\n\n\t\tif (shift && !ctrl && !alt) {\n\t\t\t// Legacy: shift+letter produces uppercase\n\t\t\tif (isLetter && data === key.toUpperCase()) return true;\n\t\t\treturn (\n\t\t\t\tmatchesKittySequence(data, codepoint, MODIFIERS.shift) ||\n\t\t\t\tmatchesPrintableModifyOtherKeys(data, codepoint, MODIFIERS.shift)\n\t\t\t);\n\t\t}\n\n\t\tif (modifier !== 0) {\n\t\t\treturn (\n\t\t\t\tmatchesKittySequence(data, codepoint, modifier) ||\n\t\t\t\tmatchesPrintableModifyOtherKeys(data, codepoint, modifier)\n\t\t\t);\n\t\t}\n\n\t\t// Check both raw char and Kitty sequence (needed for release events)\n\t\treturn data === key || matchesKittySequence(data, codepoint, 0);\n\t}\n\n\treturn false;\n}\n\n/**\n * Parse input data and return the key identifier if recognized.\n *\n * @param data - Raw input data from terminal\n * @returns Key identifier string (e.g., \"ctrl+c\") or undefined\n */\nfunction formatParsedKey(codepoint: number, modifier: number, baseLayoutKey?: number): string | undefined {\n\tconst normalizedCodepoint = normalizeKittyFunctionalCodepoint(codepoint);\n\n\t// Use base layout key only when codepoint is not a recognized Latin\n\t// letter (a-z), digit (0-9), or symbol (/, -, [, ;, etc.). For those,\n\t// the codepoint is authoritative regardless of physical key position.\n\t// This prevents remapped layouts (Dvorak, Colemak, xremap, etc.) from\n\t// reporting the wrong key name based on the QWERTY physical position.\n\tconst isLatinLetter = normalizedCodepoint >= 97 && normalizedCodepoint <= 122; // a-z\n\tconst isDigit = normalizedCodepoint >= 48 && normalizedCodepoint <= 57; // 0-9\n\tconst isKnownSymbol = SYMBOL_KEYS.has(String.fromCharCode(normalizedCodepoint));\n\tconst effectiveCodepoint =\n\t\tisLatinLetter || isDigit || isKnownSymbol ? normalizedCodepoint : (baseLayoutKey ?? normalizedCodepoint);\n\n\tlet keyName: string | undefined;\n\tif (effectiveCodepoint === CODEPOINTS.escape) keyName = \"escape\";\n\telse if (effectiveCodepoint === CODEPOINTS.tab) keyName = \"tab\";\n\telse if (effectiveCodepoint === CODEPOINTS.enter || effectiveCodepoint === CODEPOINTS.kpEnter) keyName = \"enter\";\n\telse if (effectiveCodepoint === CODEPOINTS.space) keyName = \"space\";\n\telse if (effectiveCodepoint === CODEPOINTS.backspace) keyName = \"backspace\";\n\telse if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.delete) keyName = \"delete\";\n\telse if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.insert) keyName = \"insert\";\n\telse if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.home) keyName = \"home\";\n\telse if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.end) keyName = \"end\";\n\telse if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.pageUp) keyName = \"pageUp\";\n\telse if (effectiveCodepoint === FUNCTIONAL_CODEPOINTS.pageDown) keyName = \"pageDown\";\n\telse if (effectiveCodepoint === ARROW_CODEPOINTS.up) keyName = \"up\";\n\telse if (effectiveCodepoint === ARROW_CODEPOINTS.down) keyName = \"down\";\n\telse if (effectiveCodepoint === ARROW_CODEPOINTS.left) keyName = \"left\";\n\telse if (effectiveCodepoint === ARROW_CODEPOINTS.right) keyName = \"right\";\n\telse if (effectiveCodepoint >= 48 && effectiveCodepoint <= 57) keyName = String.fromCharCode(effectiveCodepoint);\n\telse if (effectiveCodepoint >= 97 && effectiveCodepoint <= 122) keyName = String.fromCharCode(effectiveCodepoint);\n\telse if (SYMBOL_KEYS.has(String.fromCharCode(effectiveCodepoint))) keyName = String.fromCharCode(effectiveCodepoint);\n\n\tif (!keyName) return undefined;\n\treturn formatKeyNameWithModifiers(keyName, modifier);\n}\n\nexport function parseKey(data: string): string | undefined {\n\tconst kitty = parseKittySequence(data);\n\tif (kitty) {\n\t\treturn formatParsedKey(kitty.codepoint, kitty.modifier, kitty.baseLayoutKey);\n\t}\n\n\tconst modifyOtherKeys = parseModifyOtherKeysSequence(data);\n\tif (modifyOtherKeys) {\n\t\treturn formatParsedKey(modifyOtherKeys.codepoint, modifyOtherKeys.modifier);\n\t}\n\n\t// Mode-aware legacy sequences\n\t// When Kitty protocol is active, ambiguous sequences are interpreted as custom terminal mappings:\n\t// - \\x1b\\r = shift+enter (Kitty mapping), not alt+enter\n\t// - \\n = shift+enter (Ghostty mapping)\n\tif (_kittyProtocolActive) {\n\t\tif (data === \"\\x1b\\r\" || data === \"\\n\") return \"shift+enter\";\n\t}\n\n\tconst legacySequenceKeyId = LEGACY_SEQUENCE_KEY_IDS[data];\n\tif (legacySequenceKeyId) return legacySequenceKeyId;\n\n\t// Legacy sequences (used when Kitty protocol is not active, or for unambiguous sequences)\n\tif (data === \"\\x1b\") return \"escape\";\n\tif (data === \"\\x1c\") return \"ctrl+\\\\\";\n\tif (data === \"\\x1d\") return \"ctrl+]\";\n\tif (data === \"\\x1f\") return \"ctrl+-\";\n\tif (data === \"\\x1b\\x1b\") return \"ctrl+alt+[\";\n\tif (data === \"\\x1b\\x1c\") return \"ctrl+alt+\\\\\";\n\tif (data === \"\\x1b\\x1d\") return \"ctrl+alt+]\";\n\tif (data === \"\\x1b\\x1f\") return \"ctrl+alt+-\";\n\tif (data === \"\\t\") return \"tab\";\n\tif (data === \"\\r\" || (!_kittyProtocolActive && data === \"\\n\") || data === \"\\x1bOM\") return \"enter\";\n\tif (data === \"\\x00\") return \"ctrl+space\";\n\tif (data === \" \") return \"space\";\n\tif (data === \"\\x7f\") return \"backspace\";\n\tif (data === \"\\x08\") return isWindowsTerminalSession() ? \"ctrl+backspace\" : \"backspace\";\n\tif (data === \"\\x1b[Z\") return \"shift+tab\";\n\tif (!_kittyProtocolActive && data === \"\\x1b\\r\") return \"alt+enter\";\n\tif (!_kittyProtocolActive && data === \"\\x1b \") return \"alt+space\";\n\tif (data === \"\\x1b\\x7f\" || data === \"\\x1b\\b\") return \"alt+backspace\";\n\tif (!_kittyProtocolActive && data === \"\\x1bB\") return \"alt+left\";\n\tif (!_kittyProtocolActive && data === \"\\x1bF\") return \"alt+right\";\n\tif (!_kittyProtocolActive && data.length === 2 && data[0] === \"\\x1b\") {\n\t\tconst code = data.charCodeAt(1);\n\t\tif (code >= 1 && code <= 26) {\n\t\t\treturn `ctrl+alt+${String.fromCharCode(code + 96)}`;\n\t\t}\n\t\t// Legacy alt+letter/digit (ESC followed by the key)\n\t\tif ((code >= 97 && code <= 122) || (code >= 48 && code <= 57)) {\n\t\t\treturn `alt+${String.fromCharCode(code)}`;\n\t\t}\n\t}\n\tif (data === \"\\x1b[A\") return \"up\";\n\tif (data === \"\\x1b[B\") return \"down\";\n\tif (data === \"\\x1b[C\") return \"right\";\n\tif (data === \"\\x1b[D\") return \"left\";\n\tif (data === \"\\x1b[H\" || data === \"\\x1bOH\") return \"home\";\n\tif (data === \"\\x1b[F\" || data === \"\\x1bOF\") return \"end\";\n\tif (data === \"\\x1b[3~\") return \"delete\";\n\tif (data === \"\\x1b[5~\") return \"pageUp\";\n\tif (data === \"\\x1b[6~\") return \"pageDown\";\n\n\t// Raw Ctrl+letter\n\tif (data.length === 1) {\n\t\tconst code = data.charCodeAt(0);\n\t\tif (code >= 1 && code <= 26) {\n\t\t\treturn `ctrl+${String.fromCharCode(code + 96)}`;\n\t\t}\n\t\tif (code >= 32 && code <= 126) {\n\t\t\treturn data;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\n// =============================================================================\n// Kitty CSI-u Printable Decoding\n// =============================================================================\n\nconst KITTY_CSI_U_REGEX = /^\\x1b\\[(\\d+)(?::(\\d*))?(?::(\\d+))?(?:;(\\d+))?(?::(\\d+))?u$/;\nconst KITTY_PRINTABLE_ALLOWED_MODIFIERS = MODIFIERS.shift | LOCK_MASK;\n\n/**\n * Decode a Kitty CSI-u sequence into a printable character, if applicable.\n *\n * When Kitty keyboard protocol flag 1 (disambiguate) is active, terminals send\n * CSI-u sequences for all keys, including plain printable characters. This\n * function extracts the printable character from such sequences.\n *\n * Only accepts plain or Shift-modified keys. Rejects Ctrl, Alt, and unsupported\n * modifier combinations (those are handled by keybinding matching instead).\n * Prefers the shifted keycode when Shift is held and a shifted key is reported.\n *\n * @param data - Raw input data from terminal\n * @returns The printable character, or undefined if not a printable CSI-u sequence\n */\nexport function decodeKittyPrintable(data: string): string | undefined {\n\tconst match = data.match(KITTY_CSI_U_REGEX);\n\tif (!match) return undefined;\n\n\t// CSI-u groups: <codepoint>[:<shifted>[:<base>]];<mod>[:<event>]u\n\tconst codepoint = Number.parseInt(match[1] ?? \"\", 10);\n\tif (!Number.isFinite(codepoint)) return undefined;\n\n\tconst shiftedKey = match[2] && match[2].length > 0 ? Number.parseInt(match[2], 10) : undefined;\n\tconst modValue = match[4] ? Number.parseInt(match[4], 10) : 1;\n\t// Modifiers are 1-indexed in CSI-u; normalize to our bitmask.\n\tconst modifier = Number.isFinite(modValue) ? modValue - 1 : 0;\n\n\t// Only accept printable CSI-u input for plain or Shift-modified text keys.\n\t// Reject unsupported modifier bits (e.g. Super/Meta) to avoid inserting\n\t// characters from modifier-only terminal events.\n\tif ((modifier & ~KITTY_PRINTABLE_ALLOWED_MODIFIERS) !== 0) return undefined;\n\tif (modifier & (MODIFIERS.alt | MODIFIERS.ctrl)) return undefined;\n\n\t// Prefer the shifted keycode when Shift is held.\n\tlet effectiveCodepoint = codepoint;\n\tif (modifier & MODIFIERS.shift && typeof shiftedKey === \"number\") {\n\t\teffectiveCodepoint = shiftedKey;\n\t}\n\teffectiveCodepoint = normalizeKittyFunctionalCodepoint(effectiveCodepoint);\n\t// Drop control characters or invalid codepoints.\n\tif (!Number.isFinite(effectiveCodepoint) || effectiveCodepoint < 32) return undefined;\n\n\ttry {\n\t\treturn String.fromCodePoint(effectiveCodepoint);\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ring buffer for Emacs-style kill/yank operations.
|
|
3
|
+
*
|
|
4
|
+
* Tracks killed (deleted) text entries. Consecutive kills can accumulate
|
|
5
|
+
* into a single entry. Supports yank (paste most recent) and yank-pop
|
|
6
|
+
* (cycle through older entries).
|
|
7
|
+
*/
|
|
8
|
+
export declare class KillRing {
|
|
9
|
+
private ring;
|
|
10
|
+
/**
|
|
11
|
+
* Add text to the kill ring.
|
|
12
|
+
*
|
|
13
|
+
* @param text - The killed text to add
|
|
14
|
+
* @param opts - Push options
|
|
15
|
+
* @param opts.prepend - If accumulating, prepend (backward deletion) or append (forward deletion)
|
|
16
|
+
* @param opts.accumulate - Merge with the most recent entry instead of creating a new one
|
|
17
|
+
*/
|
|
18
|
+
push(text: string, opts: {
|
|
19
|
+
prepend: boolean;
|
|
20
|
+
accumulate?: boolean;
|
|
21
|
+
}): void;
|
|
22
|
+
/** Get most recent entry without modifying the ring. */
|
|
23
|
+
peek(): string | undefined;
|
|
24
|
+
/** Move last entry to front (for yank-pop cycling). */
|
|
25
|
+
rotate(): void;
|
|
26
|
+
get length(): number;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=kill-ring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kill-ring.d.ts","sourceRoot":"","sources":["../src/kill-ring.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,qBAAa,QAAQ;IACpB,OAAO,CAAC,IAAI,CAAgB;IAE5B;;;;;;;OAOG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CASzE;IAED,wDAAwD;IACxD,IAAI,IAAI,MAAM,GAAG,SAAS,CAEzB;IAED,uDAAuD;IACvD,MAAM,IAAI,IAAI,CAKb;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;CACD","sourcesContent":["/**\n * Ring buffer for Emacs-style kill/yank operations.\n *\n * Tracks killed (deleted) text entries. Consecutive kills can accumulate\n * into a single entry. Supports yank (paste most recent) and yank-pop\n * (cycle through older entries).\n */\nexport class KillRing {\n\tprivate ring: string[] = [];\n\n\t/**\n\t * Add text to the kill ring.\n\t *\n\t * @param text - The killed text to add\n\t * @param opts - Push options\n\t * @param opts.prepend - If accumulating, prepend (backward deletion) or append (forward deletion)\n\t * @param opts.accumulate - Merge with the most recent entry instead of creating a new one\n\t */\n\tpush(text: string, opts: { prepend: boolean; accumulate?: boolean }): void {\n\t\tif (!text) return;\n\n\t\tif (opts.accumulate && this.ring.length > 0) {\n\t\t\tconst last = this.ring.pop()!;\n\t\t\tthis.ring.push(opts.prepend ? text + last : last + text);\n\t\t} else {\n\t\t\tthis.ring.push(text);\n\t\t}\n\t}\n\n\t/** Get most recent entry without modifying the ring. */\n\tpeek(): string | undefined {\n\t\treturn this.ring.length > 0 ? this.ring[this.ring.length - 1] : undefined;\n\t}\n\n\t/** Move last entry to front (for yank-pop cycling). */\n\trotate(): void {\n\t\tif (this.ring.length > 1) {\n\t\t\tconst last = this.ring.pop()!;\n\t\t\tthis.ring.unshift(last);\n\t\t}\n\t}\n\n\tget length(): number {\n\t\treturn this.ring.length;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ring buffer for Emacs-style kill/yank operations.
|
|
3
|
+
*
|
|
4
|
+
* Tracks killed (deleted) text entries. Consecutive kills can accumulate
|
|
5
|
+
* into a single entry. Supports yank (paste most recent) and yank-pop
|
|
6
|
+
* (cycle through older entries).
|
|
7
|
+
*/
|
|
8
|
+
export class KillRing {
|
|
9
|
+
ring = [];
|
|
10
|
+
/**
|
|
11
|
+
* Add text to the kill ring.
|
|
12
|
+
*
|
|
13
|
+
* @param text - The killed text to add
|
|
14
|
+
* @param opts - Push options
|
|
15
|
+
* @param opts.prepend - If accumulating, prepend (backward deletion) or append (forward deletion)
|
|
16
|
+
* @param opts.accumulate - Merge with the most recent entry instead of creating a new one
|
|
17
|
+
*/
|
|
18
|
+
push(text, opts) {
|
|
19
|
+
if (!text)
|
|
20
|
+
return;
|
|
21
|
+
if (opts.accumulate && this.ring.length > 0) {
|
|
22
|
+
const last = this.ring.pop();
|
|
23
|
+
this.ring.push(opts.prepend ? text + last : last + text);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
this.ring.push(text);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** Get most recent entry without modifying the ring. */
|
|
30
|
+
peek() {
|
|
31
|
+
return this.ring.length > 0 ? this.ring[this.ring.length - 1] : undefined;
|
|
32
|
+
}
|
|
33
|
+
/** Move last entry to front (for yank-pop cycling). */
|
|
34
|
+
rotate() {
|
|
35
|
+
if (this.ring.length > 1) {
|
|
36
|
+
const last = this.ring.pop();
|
|
37
|
+
this.ring.unshift(last);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
get length() {
|
|
41
|
+
return this.ring.length;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=kill-ring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kill-ring.js","sourceRoot":"","sources":["../src/kill-ring.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,OAAO,QAAQ;IACZ,IAAI,GAAa,EAAE,CAAC;IAE5B;;;;;;;OAOG;IACH,IAAI,CAAC,IAAY,EAAE,IAAgD,EAAQ;QAC1E,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAG,CAAC;YAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;QAC1D,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;IAAA,CACD;IAED,wDAAwD;IACxD,IAAI,GAAuB;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAAA,CAC1E;IAED,uDAAuD;IACvD,MAAM,GAAS;QACd,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAG,CAAC;YAC9B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;IAAA,CACD;IAED,IAAI,MAAM,GAAW;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IAAA,CACxB;CACD","sourcesContent":["/**\n * Ring buffer for Emacs-style kill/yank operations.\n *\n * Tracks killed (deleted) text entries. Consecutive kills can accumulate\n * into a single entry. Supports yank (paste most recent) and yank-pop\n * (cycle through older entries).\n */\nexport class KillRing {\n\tprivate ring: string[] = [];\n\n\t/**\n\t * Add text to the kill ring.\n\t *\n\t * @param text - The killed text to add\n\t * @param opts - Push options\n\t * @param opts.prepend - If accumulating, prepend (backward deletion) or append (forward deletion)\n\t * @param opts.accumulate - Merge with the most recent entry instead of creating a new one\n\t */\n\tpush(text: string, opts: { prepend: boolean; accumulate?: boolean }): void {\n\t\tif (!text) return;\n\n\t\tif (opts.accumulate && this.ring.length > 0) {\n\t\t\tconst last = this.ring.pop()!;\n\t\t\tthis.ring.push(opts.prepend ? text + last : last + text);\n\t\t} else {\n\t\t\tthis.ring.push(text);\n\t\t}\n\t}\n\n\t/** Get most recent entry without modifying the ring. */\n\tpeek(): string | undefined {\n\t\treturn this.ring.length > 0 ? this.ring[this.ring.length - 1] : undefined;\n\t}\n\n\t/** Move last entry to front (for yank-pop cycling). */\n\trotate(): void {\n\t\tif (this.ring.length > 1) {\n\t\t\tconst last = this.ring.pop()!;\n\t\t\tthis.ring.unshift(last);\n\t\t}\n\t}\n\n\tget length(): number {\n\t\treturn this.ring.length;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StdinBuffer buffers input and emits complete sequences.
|
|
3
|
+
*
|
|
4
|
+
* This is necessary because stdin data events can arrive in partial chunks,
|
|
5
|
+
* especially for escape sequences like mouse events. Without buffering,
|
|
6
|
+
* partial sequences can be misinterpreted as regular keypresses.
|
|
7
|
+
*
|
|
8
|
+
* For example, the mouse SGR sequence `\x1b[<35;20;5m` might arrive as:
|
|
9
|
+
* - Event 1: `\x1b`
|
|
10
|
+
* - Event 2: `[<35`
|
|
11
|
+
* - Event 3: `;20;5m`
|
|
12
|
+
*
|
|
13
|
+
* The buffer accumulates these until a complete sequence is detected.
|
|
14
|
+
* Call the `process()` method to feed input data.
|
|
15
|
+
*
|
|
16
|
+
* Based on code from OpenTUI (https://github.com/anomalyco/opentui)
|
|
17
|
+
* MIT License - Copyright (c) 2025 opentui
|
|
18
|
+
*/
|
|
19
|
+
import { EventEmitter } from "events";
|
|
20
|
+
export type StdinBufferOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* Maximum time to wait for sequence completion (default: 10ms)
|
|
23
|
+
* After this time, the buffer is flushed even if incomplete
|
|
24
|
+
*/
|
|
25
|
+
timeout?: number;
|
|
26
|
+
};
|
|
27
|
+
export type StdinBufferEventMap = {
|
|
28
|
+
data: [string];
|
|
29
|
+
paste: [string];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Buffers stdin input and emits complete sequences via the 'data' event.
|
|
33
|
+
* Handles partial escape sequences that arrive across multiple chunks.
|
|
34
|
+
*/
|
|
35
|
+
export declare class StdinBuffer extends EventEmitter<StdinBufferEventMap> {
|
|
36
|
+
private buffer;
|
|
37
|
+
private timeout;
|
|
38
|
+
private readonly timeoutMs;
|
|
39
|
+
private pasteMode;
|
|
40
|
+
private pasteBuffer;
|
|
41
|
+
constructor(options?: StdinBufferOptions);
|
|
42
|
+
process(data: string | Buffer): void;
|
|
43
|
+
flush(): string[];
|
|
44
|
+
clear(): void;
|
|
45
|
+
getBuffer(): string;
|
|
46
|
+
destroy(): void;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=stdin-buffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdin-buffer.d.ts","sourceRoot":"","sources":["../src/stdin-buffer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AA8MtC,MAAM,MAAM,kBAAkB,GAAG;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;IACf,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,qBAAa,WAAY,SAAQ,YAAY,CAAC,mBAAmB,CAAC;IACjE,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,OAAO,CAA8C;IAC7D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,WAAW,CAAc;IAEjC,YAAY,OAAO,GAAE,kBAAuB,EAG3C;IAEM,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAiG1C;IAED,KAAK,IAAI,MAAM,EAAE,CAahB;IAED,KAAK,IAAI,IAAI,CAQZ;IAED,SAAS,IAAI,MAAM,CAElB;IAED,OAAO,IAAI,IAAI,CAEd;CACD","sourcesContent":["/**\n * StdinBuffer buffers input and emits complete sequences.\n *\n * This is necessary because stdin data events can arrive in partial chunks,\n * especially for escape sequences like mouse events. Without buffering,\n * partial sequences can be misinterpreted as regular keypresses.\n *\n * For example, the mouse SGR sequence `\\x1b[<35;20;5m` might arrive as:\n * - Event 1: `\\x1b`\n * - Event 2: `[<35`\n * - Event 3: `;20;5m`\n *\n * The buffer accumulates these until a complete sequence is detected.\n * Call the `process()` method to feed input data.\n *\n * Based on code from OpenTUI (https://github.com/anomalyco/opentui)\n * MIT License - Copyright (c) 2025 opentui\n */\n\nimport { EventEmitter } from \"events\";\n\nconst ESC = \"\\x1b\";\nconst BRACKETED_PASTE_START = \"\\x1b[200~\";\nconst BRACKETED_PASTE_END = \"\\x1b[201~\";\n\n/**\n * Check if a string is a complete escape sequence or needs more data\n */\nfunction isCompleteSequence(data: string): \"complete\" | \"incomplete\" | \"not-escape\" {\n\tif (!data.startsWith(ESC)) {\n\t\treturn \"not-escape\";\n\t}\n\n\tif (data.length === 1) {\n\t\treturn \"incomplete\";\n\t}\n\n\tconst afterEsc = data.slice(1);\n\n\t// CSI sequences: ESC [\n\tif (afterEsc.startsWith(\"[\")) {\n\t\t// Check for old-style mouse sequence: ESC[M + 3 bytes\n\t\tif (afterEsc.startsWith(\"[M\")) {\n\t\t\t// Old-style mouse needs ESC[M + 3 bytes = 6 total\n\t\t\treturn data.length >= 6 ? \"complete\" : \"incomplete\";\n\t\t}\n\t\treturn isCompleteCsiSequence(data);\n\t}\n\n\t// OSC sequences: ESC ]\n\tif (afterEsc.startsWith(\"]\")) {\n\t\treturn isCompleteOscSequence(data);\n\t}\n\n\t// DCS sequences: ESC P ... ESC \\ (includes XTVersion responses)\n\tif (afterEsc.startsWith(\"P\")) {\n\t\treturn isCompleteDcsSequence(data);\n\t}\n\n\t// APC sequences: ESC _ ... ESC \\ (includes Kitty graphics responses)\n\tif (afterEsc.startsWith(\"_\")) {\n\t\treturn isCompleteApcSequence(data);\n\t}\n\n\t// SS3 sequences: ESC O\n\tif (afterEsc.startsWith(\"O\")) {\n\t\t// ESC O followed by a single character\n\t\treturn afterEsc.length >= 2 ? \"complete\" : \"incomplete\";\n\t}\n\n\t// Meta key sequences: ESC followed by a single character\n\tif (afterEsc.length === 1) {\n\t\treturn \"complete\";\n\t}\n\n\t// Unknown escape sequence - treat as complete\n\treturn \"complete\";\n}\n\n/**\n * Check if CSI sequence is complete\n * CSI sequences: ESC [ ... followed by a final byte (0x40-0x7E)\n */\nfunction isCompleteCsiSequence(data: string): \"complete\" | \"incomplete\" {\n\tif (!data.startsWith(`${ESC}[`)) {\n\t\treturn \"complete\";\n\t}\n\n\t// Need at least ESC [ and one more character\n\tif (data.length < 3) {\n\t\treturn \"incomplete\";\n\t}\n\n\tconst payload = data.slice(2);\n\n\t// CSI sequences end with a byte in the range 0x40-0x7E (@-~)\n\t// This includes all letters and several special characters\n\tconst lastChar = payload[payload.length - 1];\n\tconst lastCharCode = lastChar.charCodeAt(0);\n\n\tif (lastCharCode >= 0x40 && lastCharCode <= 0x7e) {\n\t\t// Special handling for SGR mouse sequences\n\t\t// Format: ESC[<B;X;Ym or ESC[<B;X;YM\n\t\tif (payload.startsWith(\"<\")) {\n\t\t\t// Must have format: <digits;digits;digits[Mm]\n\t\t\tconst mouseMatch = /^<\\d+;\\d+;\\d+[Mm]$/.test(payload);\n\t\t\tif (mouseMatch) {\n\t\t\t\treturn \"complete\";\n\t\t\t}\n\t\t\t// If it ends with M or m but doesn't match the pattern, still incomplete\n\t\t\tif (lastChar === \"M\" || lastChar === \"m\") {\n\t\t\t\t// Check if we have the right structure\n\t\t\t\tconst parts = payload.slice(1, -1).split(\";\");\n\t\t\t\tif (parts.length === 3 && parts.every((p) => /^\\d+$/.test(p))) {\n\t\t\t\t\treturn \"complete\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn \"incomplete\";\n\t\t}\n\n\t\treturn \"complete\";\n\t}\n\n\treturn \"incomplete\";\n}\n\n/**\n * Check if OSC sequence is complete\n * OSC sequences: ESC ] ... ST (where ST is ESC \\ or BEL)\n */\nfunction isCompleteOscSequence(data: string): \"complete\" | \"incomplete\" {\n\tif (!data.startsWith(`${ESC}]`)) {\n\t\treturn \"complete\";\n\t}\n\n\t// OSC sequences end with ST (ESC \\) or BEL (\\x07)\n\tif (data.endsWith(`${ESC}\\\\`) || data.endsWith(\"\\x07\")) {\n\t\treturn \"complete\";\n\t}\n\n\treturn \"incomplete\";\n}\n\n/**\n * Check if DCS (Device Control String) sequence is complete\n * DCS sequences: ESC P ... ST (where ST is ESC \\)\n * Used for XTVersion responses like ESC P >| ... ESC \\\n */\nfunction isCompleteDcsSequence(data: string): \"complete\" | \"incomplete\" {\n\tif (!data.startsWith(`${ESC}P`)) {\n\t\treturn \"complete\";\n\t}\n\n\t// DCS sequences end with ST (ESC \\)\n\tif (data.endsWith(`${ESC}\\\\`)) {\n\t\treturn \"complete\";\n\t}\n\n\treturn \"incomplete\";\n}\n\n/**\n * Check if APC (Application Program Command) sequence is complete\n * APC sequences: ESC _ ... ST (where ST is ESC \\)\n * Used for Kitty graphics responses like ESC _ G ... ESC \\\n */\nfunction isCompleteApcSequence(data: string): \"complete\" | \"incomplete\" {\n\tif (!data.startsWith(`${ESC}_`)) {\n\t\treturn \"complete\";\n\t}\n\n\t// APC sequences end with ST (ESC \\)\n\tif (data.endsWith(`${ESC}\\\\`)) {\n\t\treturn \"complete\";\n\t}\n\n\treturn \"incomplete\";\n}\n\n/**\n * Split accumulated buffer into complete sequences\n */\nfunction extractCompleteSequences(buffer: string): { sequences: string[]; remainder: string } {\n\tconst sequences: string[] = [];\n\tlet pos = 0;\n\n\twhile (pos < buffer.length) {\n\t\tconst remaining = buffer.slice(pos);\n\n\t\t// Try to extract a sequence starting at this position\n\t\tif (remaining.startsWith(ESC)) {\n\t\t\t// Find the end of this escape sequence\n\t\t\tlet seqEnd = 1;\n\t\t\twhile (seqEnd <= remaining.length) {\n\t\t\t\tconst candidate = remaining.slice(0, seqEnd);\n\t\t\t\tconst status = isCompleteSequence(candidate);\n\n\t\t\t\tif (status === \"complete\") {\n\t\t\t\t\tsequences.push(candidate);\n\t\t\t\t\tpos += seqEnd;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (status === \"incomplete\") {\n\t\t\t\t\tseqEnd++;\n\t\t\t\t} else {\n\t\t\t\t\t// Should not happen when starting with ESC\n\t\t\t\t\tsequences.push(candidate);\n\t\t\t\t\tpos += seqEnd;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (seqEnd > remaining.length) {\n\t\t\t\treturn { sequences, remainder: remaining };\n\t\t\t}\n\t\t} else {\n\t\t\t// Not an escape sequence - take a single character\n\t\t\tsequences.push(remaining[0]!);\n\t\t\tpos++;\n\t\t}\n\t}\n\n\treturn { sequences, remainder: \"\" };\n}\n\nexport type StdinBufferOptions = {\n\t/**\n\t * Maximum time to wait for sequence completion (default: 10ms)\n\t * After this time, the buffer is flushed even if incomplete\n\t */\n\ttimeout?: number;\n};\n\nexport type StdinBufferEventMap = {\n\tdata: [string];\n\tpaste: [string];\n};\n\n/**\n * Buffers stdin input and emits complete sequences via the 'data' event.\n * Handles partial escape sequences that arrive across multiple chunks.\n */\nexport class StdinBuffer extends EventEmitter<StdinBufferEventMap> {\n\tprivate buffer: string = \"\";\n\tprivate timeout: ReturnType<typeof setTimeout> | null = null;\n\tprivate readonly timeoutMs: number;\n\tprivate pasteMode: boolean = false;\n\tprivate pasteBuffer: string = \"\";\n\n\tconstructor(options: StdinBufferOptions = {}) {\n\t\tsuper();\n\t\tthis.timeoutMs = options.timeout ?? 10;\n\t}\n\n\tpublic process(data: string | Buffer): void {\n\t\t// Clear any pending timeout\n\t\tif (this.timeout) {\n\t\t\tclearTimeout(this.timeout);\n\t\t\tthis.timeout = null;\n\t\t}\n\n\t\t// Handle high-byte conversion (for compatibility with parseKeypress)\n\t\t// If buffer has single byte > 127, convert to ESC + (byte - 128)\n\t\tlet str: string;\n\t\tif (Buffer.isBuffer(data)) {\n\t\t\tif (data.length === 1 && data[0]! > 127) {\n\t\t\t\tconst byte = data[0]! - 128;\n\t\t\t\tstr = `\\x1b${String.fromCharCode(byte)}`;\n\t\t\t} else {\n\t\t\t\tstr = data.toString();\n\t\t\t}\n\t\t} else {\n\t\t\tstr = data;\n\t\t}\n\n\t\tif (str.length === 0 && this.buffer.length === 0) {\n\t\t\tthis.emit(\"data\", \"\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.buffer += str;\n\n\t\tif (this.pasteMode) {\n\t\t\tthis.pasteBuffer += this.buffer;\n\t\t\tthis.buffer = \"\";\n\n\t\t\tconst endIndex = this.pasteBuffer.indexOf(BRACKETED_PASTE_END);\n\t\t\tif (endIndex !== -1) {\n\t\t\t\tconst pastedContent = this.pasteBuffer.slice(0, endIndex);\n\t\t\t\tconst remaining = this.pasteBuffer.slice(endIndex + BRACKETED_PASTE_END.length);\n\n\t\t\t\tthis.pasteMode = false;\n\t\t\t\tthis.pasteBuffer = \"\";\n\n\t\t\t\tthis.emit(\"paste\", pastedContent);\n\n\t\t\t\tif (remaining.length > 0) {\n\t\t\t\t\tthis.process(remaining);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst startIndex = this.buffer.indexOf(BRACKETED_PASTE_START);\n\t\tif (startIndex !== -1) {\n\t\t\tif (startIndex > 0) {\n\t\t\t\tconst beforePaste = this.buffer.slice(0, startIndex);\n\t\t\t\tconst result = extractCompleteSequences(beforePaste);\n\t\t\t\tfor (const sequence of result.sequences) {\n\t\t\t\t\tthis.emit(\"data\", sequence);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.buffer = this.buffer.slice(startIndex + BRACKETED_PASTE_START.length);\n\t\t\tthis.pasteMode = true;\n\t\t\tthis.pasteBuffer = this.buffer;\n\t\t\tthis.buffer = \"\";\n\n\t\t\tconst endIndex = this.pasteBuffer.indexOf(BRACKETED_PASTE_END);\n\t\t\tif (endIndex !== -1) {\n\t\t\t\tconst pastedContent = this.pasteBuffer.slice(0, endIndex);\n\t\t\t\tconst remaining = this.pasteBuffer.slice(endIndex + BRACKETED_PASTE_END.length);\n\n\t\t\t\tthis.pasteMode = false;\n\t\t\t\tthis.pasteBuffer = \"\";\n\n\t\t\t\tthis.emit(\"paste\", pastedContent);\n\n\t\t\t\tif (remaining.length > 0) {\n\t\t\t\t\tthis.process(remaining);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst result = extractCompleteSequences(this.buffer);\n\t\tthis.buffer = result.remainder;\n\n\t\tfor (const sequence of result.sequences) {\n\t\t\tthis.emit(\"data\", sequence);\n\t\t}\n\n\t\tif (this.buffer.length > 0) {\n\t\t\tthis.timeout = setTimeout(() => {\n\t\t\t\tconst flushed = this.flush();\n\n\t\t\t\tfor (const sequence of flushed) {\n\t\t\t\t\tthis.emit(\"data\", sequence);\n\t\t\t\t}\n\t\t\t}, this.timeoutMs);\n\t\t}\n\t}\n\n\tflush(): string[] {\n\t\tif (this.timeout) {\n\t\t\tclearTimeout(this.timeout);\n\t\t\tthis.timeout = null;\n\t\t}\n\n\t\tif (this.buffer.length === 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst sequences = [this.buffer];\n\t\tthis.buffer = \"\";\n\t\treturn sequences;\n\t}\n\n\tclear(): void {\n\t\tif (this.timeout) {\n\t\t\tclearTimeout(this.timeout);\n\t\t\tthis.timeout = null;\n\t\t}\n\t\tthis.buffer = \"\";\n\t\tthis.pasteMode = false;\n\t\tthis.pasteBuffer = \"\";\n\t}\n\n\tgetBuffer(): string {\n\t\treturn this.buffer;\n\t}\n\n\tdestroy(): void {\n\t\tthis.clear();\n\t}\n}\n"]}
|