orient-cli 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.d.ts +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.js +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.js.map +1 -1
- package/dist/orient/change-packet.d.ts +2 -1
- package/dist/orient/change-packet.js +25 -8
- package/dist/orient/change-packet.js.map +1 -1
- package/dist/orient/clarify.d.ts +114 -0
- package/dist/orient/clarify.js +186 -0
- package/dist/orient/clarify.js.map +1 -0
- package/dist/orient/clear-command.d.ts +79 -0
- package/dist/orient/clear-command.js +117 -0
- package/dist/orient/clear-command.js.map +1 -0
- package/dist/orient/mode.d.ts +70 -0
- package/dist/orient/mode.js +124 -0
- package/dist/orient/mode.js.map +1 -0
- package/dist/orient/orient-extension.d.ts +1 -1
- package/dist/orient/orient-extension.js +306 -17
- package/dist/orient/orient-extension.js.map +1 -1
- package/dist/orient/plan-execute.d.ts +137 -0
- package/dist/orient/plan-execute.js +333 -0
- package/dist/orient/plan-execute.js.map +1 -0
- package/dist/orient/tiers.d.ts +109 -0
- package/dist/orient/tiers.js +162 -0
- package/dist/orient/tiers.js.map +1 -0
- package/dist/orient/wizard.d.ts +108 -0
- package/dist/orient/wizard.js +183 -0
- package/dist/orient/wizard.js.map +1 -0
- package/docs/open-source-resources.md +1 -1
- package/node_modules/@orient-cli/agent-core/README.md +456 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts +24 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.js +404 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.d.ts +115 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.js +395 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/index.d.ts +5 -0
- package/node_modules/@orient-cli/agent-core/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/index.js +9 -0
- package/node_modules/@orient-cli/agent-core/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts +85 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.js +268 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/types.d.ts +323 -0
- package/node_modules/@orient-cli/agent-core/dist/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/types.js +2 -0
- package/node_modules/@orient-cli/agent-core/dist/types.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/package.json +44 -0
- package/node_modules/@orient-cli/ai/README.md +1315 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.d.ts +20 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.js +44 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts +5 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.js +6 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/cli.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/cli.js +116 -0
- package/node_modules/@orient-cli/ai/dist/cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.js +107 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/index.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/index.js +14 -0
- package/node_modules/@orient-cli/ai/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.d.ts +24 -0
- package/node_modules/@orient-cli/ai/dist/models.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.d.ts +14473 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.js +14241 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.js +55 -0
- package/node_modules/@orient-cli/ai/dist/models.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/oauth.d.ts +2 -0
- package/node_modules/@orient-cli/ai/dist/oauth.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/oauth.js +2 -0
- package/node_modules/@orient-cli/ai/dist/oauth.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts +20 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js +651 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts +40 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.js +749 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js +176 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts +56 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.js +367 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js +29 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts +74 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js +776 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts +65 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.js +312 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js +419 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.js +399 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts +22 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.js +501 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js +741 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js +753 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts +17 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js +470 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js +190 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts +38 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js +261 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.js +35 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js +155 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/stream.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/stream.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/stream.js +27 -0
- package/node_modules/@orient-cli/ai/dist/stream.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/types.d.ts +353 -0
- package/node_modules/@orient-cli/ai/dist/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/types.js +2 -0
- package/node_modules/@orient-cli/ai/dist/types.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts +21 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.js +81 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.js +14 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.js +29 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts +25 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js +335 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts +30 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js +292 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js +376 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js +481 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts +61 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js +131 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js +105 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts +34 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js +373 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js +31 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts +47 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js +2 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts +53 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.js +132 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts +22 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts +17 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js +21 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts +18 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.js +80 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.js.map +1 -0
- package/node_modules/@orient-cli/ai/package.json +114 -0
- package/node_modules/@orient-cli/coding-agent/README.md +618 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js +4 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts +52 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.js +326 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js +31 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js +83 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts +18 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js +92 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js +35 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.js +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.d.ts +77 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.js +229 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts +83 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js +236 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts +86 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js +116 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts +585 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js +2497 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts +132 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js +422 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js +125 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts +88 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js +243 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts +121 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js +613 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts +38 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js +153 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js +25 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts +29 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.js +75 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js +249 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts +37 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js +224 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.css +1001 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.html +55 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.js +1690 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts +40 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js +95 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/marked.min.js +6 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts +25 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js +438 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts +148 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js +701 -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 +293 -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 +248 -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 +345 -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 +4106 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/dark.json +85 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/light.json +84 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts +81 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js +979 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js +112 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js +49 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts +217 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js +402 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js +550 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts +408 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts +4 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js +234 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js +87 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js +245 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts +5 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js +158 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.js +163 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js +39 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts +36 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js +137 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js +121 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js +186 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts +5 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js +252 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/package.json +104 -0
- package/node_modules/@orient-cli/tui/README.md +767 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts +52 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.js +623 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/box.d.ts +22 -0
- package/node_modules/@orient-cli/tui/dist/components/box.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/box.js +104 -0
- package/node_modules/@orient-cli/tui/dist/components/box.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts +22 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js +35 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.d.ts +244 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.js +1861 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/image.d.ts +28 -0
- package/node_modules/@orient-cli/tui/dist/components/image.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/image.js +69 -0
- package/node_modules/@orient-cli/tui/dist/components/image.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/input.d.ts +37 -0
- package/node_modules/@orient-cli/tui/dist/components/input.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/input.js +426 -0
- package/node_modules/@orient-cli/tui/dist/components/input.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.d.ts +21 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.js +49 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts +95 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.js +663 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts +50 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.js +159 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts +50 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.js +185 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts +12 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.js +23 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/text.d.ts +19 -0
- package/node_modules/@orient-cli/tui/dist/components/text.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/text.js +89 -0
- package/node_modules/@orient-cli/tui/dist/components/text.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts +13 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.js +51 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.d.ts +39 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.js +2 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts +16 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.js +107 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/index.d.ts +23 -0
- package/node_modules/@orient-cli/tui/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/index.js +32 -0
- package/node_modules/@orient-cli/tui/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.d.ts +193 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.js +174 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keys.d.ts +170 -0
- package/node_modules/@orient-cli/tui/dist/keys.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keys.js +1124 -0
- package/node_modules/@orient-cli/tui/dist/keys.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts +28 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.js +44 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts +48 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.js +317 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts +68 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.js +288 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal.d.ts +84 -0
- package/node_modules/@orient-cli/tui/dist/terminal.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal.js +285 -0
- package/node_modules/@orient-cli/tui/dist/terminal.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/tui.d.ts +222 -0
- package/node_modules/@orient-cli/tui/dist/tui.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/tui.js +1008 -0
- package/node_modules/@orient-cli/tui/dist/tui.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts +17 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.js +25 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/utils.d.ts +78 -0
- package/node_modules/@orient-cli/tui/dist/utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/utils.js +960 -0
- package/node_modules/@orient-cli/tui/dist/utils.js.map +1 -0
- package/node_modules/@orient-cli/tui/package.json +52 -0
- package/package.json +47 -8
- package/schemas/orient-standard/templates-tier-1/brief.md +22 -0
- package/schemas/orient-standard/templates-tier-1/plan.md +17 -0
- package/schemas/orient-standard/templates-tier-1/spec.md +23 -0
- package/schemas/orient-standard/templates-tier-1/tasks.md +14 -0
- package/schemas/orient-standard/templates-tier-2/brief.md +32 -0
- package/schemas/orient-standard/templates-tier-2/plan.md +44 -0
- package/schemas/orient-standard/templates-tier-2/spec.md +46 -0
- package/schemas/orient-standard/templates-tier-2/tasks.md +34 -0
- package/schemas/orient-standard/templates-tier-3/brief.md +54 -0
- package/schemas/orient-standard/templates-tier-3/plan.md +67 -0
- package/schemas/orient-standard/templates-tier-3/spec.md +65 -0
- package/schemas/orient-standard/templates-tier-3/tasks.md +79 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { registerApiProvider, unregisterApiProviders } from "../api-registry.js";
|
|
2
|
+
import { createAssistantMessageEventStream } from "../utils/event-stream.js";
|
|
3
|
+
const DEFAULT_API = "faux";
|
|
4
|
+
const DEFAULT_PROVIDER = "faux";
|
|
5
|
+
const DEFAULT_MODEL_ID = "faux-1";
|
|
6
|
+
const DEFAULT_MODEL_NAME = "Faux Model";
|
|
7
|
+
const DEFAULT_BASE_URL = "http://localhost:0";
|
|
8
|
+
const DEFAULT_MIN_TOKEN_SIZE = 3;
|
|
9
|
+
const DEFAULT_MAX_TOKEN_SIZE = 5;
|
|
10
|
+
const DEFAULT_USAGE = {
|
|
11
|
+
input: 0,
|
|
12
|
+
output: 0,
|
|
13
|
+
cacheRead: 0,
|
|
14
|
+
cacheWrite: 0,
|
|
15
|
+
totalTokens: 0,
|
|
16
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },
|
|
17
|
+
};
|
|
18
|
+
export function fauxText(text) {
|
|
19
|
+
return { type: "text", text };
|
|
20
|
+
}
|
|
21
|
+
export function fauxThinking(thinking) {
|
|
22
|
+
return { type: "thinking", thinking };
|
|
23
|
+
}
|
|
24
|
+
export function fauxToolCall(name, arguments_, options = {}) {
|
|
25
|
+
return {
|
|
26
|
+
type: "toolCall",
|
|
27
|
+
id: options.id ?? randomId("tool"),
|
|
28
|
+
name,
|
|
29
|
+
arguments: arguments_,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function normalizeFauxAssistantContent(content) {
|
|
33
|
+
if (typeof content === "string") {
|
|
34
|
+
return [fauxText(content)];
|
|
35
|
+
}
|
|
36
|
+
return Array.isArray(content) ? content : [content];
|
|
37
|
+
}
|
|
38
|
+
export function fauxAssistantMessage(content, options = {}) {
|
|
39
|
+
return {
|
|
40
|
+
role: "assistant",
|
|
41
|
+
content: normalizeFauxAssistantContent(content),
|
|
42
|
+
api: DEFAULT_API,
|
|
43
|
+
provider: DEFAULT_PROVIDER,
|
|
44
|
+
model: DEFAULT_MODEL_ID,
|
|
45
|
+
usage: DEFAULT_USAGE,
|
|
46
|
+
stopReason: options.stopReason ?? "stop",
|
|
47
|
+
errorMessage: options.errorMessage,
|
|
48
|
+
responseId: options.responseId,
|
|
49
|
+
timestamp: options.timestamp ?? Date.now(),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function estimateTokens(text) {
|
|
53
|
+
return Math.ceil(text.length / 4);
|
|
54
|
+
}
|
|
55
|
+
function randomId(prefix) {
|
|
56
|
+
return `${prefix}:${Date.now()}:${Math.random().toString(36).slice(2)}`;
|
|
57
|
+
}
|
|
58
|
+
function contentToText(content) {
|
|
59
|
+
if (typeof content === "string") {
|
|
60
|
+
return content;
|
|
61
|
+
}
|
|
62
|
+
return content
|
|
63
|
+
.map((block) => {
|
|
64
|
+
if (block.type === "text") {
|
|
65
|
+
return block.text;
|
|
66
|
+
}
|
|
67
|
+
return `[image:${block.mimeType}:${block.data.length}]`;
|
|
68
|
+
})
|
|
69
|
+
.join("\n");
|
|
70
|
+
}
|
|
71
|
+
function assistantContentToText(content) {
|
|
72
|
+
return content
|
|
73
|
+
.map((block) => {
|
|
74
|
+
if (block.type === "text") {
|
|
75
|
+
return block.text;
|
|
76
|
+
}
|
|
77
|
+
if (block.type === "thinking") {
|
|
78
|
+
return block.thinking;
|
|
79
|
+
}
|
|
80
|
+
return `${block.name}:${JSON.stringify(block.arguments)}`;
|
|
81
|
+
})
|
|
82
|
+
.join("\n");
|
|
83
|
+
}
|
|
84
|
+
function toolResultToText(message) {
|
|
85
|
+
return [message.toolName, ...message.content.map((block) => contentToText([block]))].join("\n");
|
|
86
|
+
}
|
|
87
|
+
function messageToText(message) {
|
|
88
|
+
if (message.role === "user") {
|
|
89
|
+
return contentToText(message.content);
|
|
90
|
+
}
|
|
91
|
+
if (message.role === "assistant") {
|
|
92
|
+
return assistantContentToText(message.content);
|
|
93
|
+
}
|
|
94
|
+
return toolResultToText(message);
|
|
95
|
+
}
|
|
96
|
+
function serializeContext(context) {
|
|
97
|
+
const parts = [];
|
|
98
|
+
if (context.systemPrompt) {
|
|
99
|
+
parts.push(`system:${context.systemPrompt}`);
|
|
100
|
+
}
|
|
101
|
+
for (const message of context.messages) {
|
|
102
|
+
parts.push(`${message.role}:${messageToText(message)}`);
|
|
103
|
+
}
|
|
104
|
+
if (context.tools?.length) {
|
|
105
|
+
parts.push(`tools:${JSON.stringify(context.tools)}`);
|
|
106
|
+
}
|
|
107
|
+
return parts.join("\n\n");
|
|
108
|
+
}
|
|
109
|
+
function commonPrefixLength(a, b) {
|
|
110
|
+
const length = Math.min(a.length, b.length);
|
|
111
|
+
let index = 0;
|
|
112
|
+
while (index < length && a[index] === b[index]) {
|
|
113
|
+
index++;
|
|
114
|
+
}
|
|
115
|
+
return index;
|
|
116
|
+
}
|
|
117
|
+
function withUsageEstimate(message, context, options, promptCache) {
|
|
118
|
+
const promptText = serializeContext(context);
|
|
119
|
+
const promptTokens = estimateTokens(promptText);
|
|
120
|
+
const outputTokens = estimateTokens(assistantContentToText(message.content));
|
|
121
|
+
let input = promptTokens;
|
|
122
|
+
let cacheRead = 0;
|
|
123
|
+
let cacheWrite = 0;
|
|
124
|
+
const sessionId = options?.sessionId;
|
|
125
|
+
if (sessionId && options?.cacheRetention !== "none") {
|
|
126
|
+
const previousPrompt = promptCache.get(sessionId);
|
|
127
|
+
if (previousPrompt) {
|
|
128
|
+
const cachedChars = commonPrefixLength(previousPrompt, promptText);
|
|
129
|
+
cacheRead = estimateTokens(previousPrompt.slice(0, cachedChars));
|
|
130
|
+
cacheWrite = estimateTokens(promptText.slice(cachedChars));
|
|
131
|
+
input = Math.max(0, promptTokens - cacheRead);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
cacheWrite = promptTokens;
|
|
135
|
+
}
|
|
136
|
+
promptCache.set(sessionId, promptText);
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
...message,
|
|
140
|
+
usage: {
|
|
141
|
+
input,
|
|
142
|
+
output: outputTokens,
|
|
143
|
+
cacheRead,
|
|
144
|
+
cacheWrite,
|
|
145
|
+
totalTokens: input + outputTokens + cacheRead + cacheWrite,
|
|
146
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function splitStringByTokenSize(text, minTokenSize, maxTokenSize) {
|
|
151
|
+
const chunks = [];
|
|
152
|
+
let index = 0;
|
|
153
|
+
while (index < text.length) {
|
|
154
|
+
const tokenSize = minTokenSize + Math.floor(Math.random() * (maxTokenSize - minTokenSize + 1));
|
|
155
|
+
const charSize = Math.max(1, tokenSize * 4);
|
|
156
|
+
chunks.push(text.slice(index, index + charSize));
|
|
157
|
+
index += charSize;
|
|
158
|
+
}
|
|
159
|
+
return chunks.length > 0 ? chunks : [""];
|
|
160
|
+
}
|
|
161
|
+
function cloneMessage(message, api, provider, modelId) {
|
|
162
|
+
const cloned = structuredClone(message);
|
|
163
|
+
return {
|
|
164
|
+
...cloned,
|
|
165
|
+
api,
|
|
166
|
+
provider,
|
|
167
|
+
model: modelId,
|
|
168
|
+
timestamp: cloned.timestamp ?? Date.now(),
|
|
169
|
+
usage: cloned.usage ?? DEFAULT_USAGE,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function createErrorMessage(error, api, provider, modelId) {
|
|
173
|
+
return {
|
|
174
|
+
role: "assistant",
|
|
175
|
+
content: [],
|
|
176
|
+
api,
|
|
177
|
+
provider,
|
|
178
|
+
model: modelId,
|
|
179
|
+
usage: DEFAULT_USAGE,
|
|
180
|
+
stopReason: "error",
|
|
181
|
+
errorMessage: error instanceof Error ? error.message : String(error),
|
|
182
|
+
timestamp: Date.now(),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
function createAbortedMessage(partial) {
|
|
186
|
+
return {
|
|
187
|
+
...partial,
|
|
188
|
+
stopReason: "aborted",
|
|
189
|
+
errorMessage: "Request was aborted",
|
|
190
|
+
timestamp: Date.now(),
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
function scheduleChunk(chunk, tokensPerSecond) {
|
|
194
|
+
if (!tokensPerSecond || tokensPerSecond <= 0) {
|
|
195
|
+
return new Promise((resolve) => queueMicrotask(resolve));
|
|
196
|
+
}
|
|
197
|
+
const delayMs = (estimateTokens(chunk) / tokensPerSecond) * 1000;
|
|
198
|
+
return new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
199
|
+
}
|
|
200
|
+
async function streamWithDeltas(stream, message, minTokenSize, maxTokenSize, tokensPerSecond, signal) {
|
|
201
|
+
const partial = { ...message, content: [] };
|
|
202
|
+
if (signal?.aborted) {
|
|
203
|
+
const aborted = createAbortedMessage(partial);
|
|
204
|
+
stream.push({ type: "error", reason: "aborted", error: aborted });
|
|
205
|
+
stream.end(aborted);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
stream.push({ type: "start", partial: { ...partial } });
|
|
209
|
+
for (let index = 0; index < message.content.length; index++) {
|
|
210
|
+
if (signal?.aborted) {
|
|
211
|
+
const aborted = createAbortedMessage(partial);
|
|
212
|
+
stream.push({ type: "error", reason: "aborted", error: aborted });
|
|
213
|
+
stream.end(aborted);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
const block = message.content[index];
|
|
217
|
+
if (block.type === "thinking") {
|
|
218
|
+
partial.content = [...partial.content, { type: "thinking", thinking: "" }];
|
|
219
|
+
stream.push({ type: "thinking_start", contentIndex: index, partial: { ...partial } });
|
|
220
|
+
for (const chunk of splitStringByTokenSize(block.thinking, minTokenSize, maxTokenSize)) {
|
|
221
|
+
await scheduleChunk(chunk, tokensPerSecond);
|
|
222
|
+
if (signal?.aborted) {
|
|
223
|
+
const aborted = createAbortedMessage(partial);
|
|
224
|
+
stream.push({ type: "error", reason: "aborted", error: aborted });
|
|
225
|
+
stream.end(aborted);
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
partial.content[index].thinking += chunk;
|
|
229
|
+
stream.push({ type: "thinking_delta", contentIndex: index, delta: chunk, partial: { ...partial } });
|
|
230
|
+
}
|
|
231
|
+
stream.push({
|
|
232
|
+
type: "thinking_end",
|
|
233
|
+
contentIndex: index,
|
|
234
|
+
content: block.thinking,
|
|
235
|
+
partial: { ...partial },
|
|
236
|
+
});
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
if (block.type === "text") {
|
|
240
|
+
partial.content = [...partial.content, { type: "text", text: "" }];
|
|
241
|
+
stream.push({ type: "text_start", contentIndex: index, partial: { ...partial } });
|
|
242
|
+
for (const chunk of splitStringByTokenSize(block.text, minTokenSize, maxTokenSize)) {
|
|
243
|
+
await scheduleChunk(chunk, tokensPerSecond);
|
|
244
|
+
if (signal?.aborted) {
|
|
245
|
+
const aborted = createAbortedMessage(partial);
|
|
246
|
+
stream.push({ type: "error", reason: "aborted", error: aborted });
|
|
247
|
+
stream.end(aborted);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
partial.content[index].text += chunk;
|
|
251
|
+
stream.push({ type: "text_delta", contentIndex: index, delta: chunk, partial: { ...partial } });
|
|
252
|
+
}
|
|
253
|
+
stream.push({ type: "text_end", contentIndex: index, content: block.text, partial: { ...partial } });
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
partial.content = [...partial.content, { type: "toolCall", id: block.id, name: block.name, arguments: {} }];
|
|
257
|
+
stream.push({ type: "toolcall_start", contentIndex: index, partial: { ...partial } });
|
|
258
|
+
for (const chunk of splitStringByTokenSize(JSON.stringify(block.arguments), minTokenSize, maxTokenSize)) {
|
|
259
|
+
await scheduleChunk(chunk, tokensPerSecond);
|
|
260
|
+
if (signal?.aborted) {
|
|
261
|
+
const aborted = createAbortedMessage(partial);
|
|
262
|
+
stream.push({ type: "error", reason: "aborted", error: aborted });
|
|
263
|
+
stream.end(aborted);
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
stream.push({ type: "toolcall_delta", contentIndex: index, delta: chunk, partial: { ...partial } });
|
|
267
|
+
}
|
|
268
|
+
partial.content[index].arguments = block.arguments;
|
|
269
|
+
stream.push({ type: "toolcall_end", contentIndex: index, toolCall: block, partial: { ...partial } });
|
|
270
|
+
}
|
|
271
|
+
if (message.stopReason === "error" || message.stopReason === "aborted") {
|
|
272
|
+
stream.push({ type: "error", reason: message.stopReason, error: message });
|
|
273
|
+
stream.end(message);
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
stream.push({ type: "done", reason: message.stopReason, message });
|
|
277
|
+
stream.end(message);
|
|
278
|
+
}
|
|
279
|
+
export function registerFauxProvider(options = {}) {
|
|
280
|
+
const api = options.api ?? randomId(DEFAULT_API);
|
|
281
|
+
const provider = options.provider ?? DEFAULT_PROVIDER;
|
|
282
|
+
const sourceId = randomId("faux-provider");
|
|
283
|
+
const minTokenSize = Math.max(1, Math.min(options.tokenSize?.min ?? DEFAULT_MIN_TOKEN_SIZE, options.tokenSize?.max ?? DEFAULT_MAX_TOKEN_SIZE));
|
|
284
|
+
const maxTokenSize = Math.max(minTokenSize, options.tokenSize?.max ?? DEFAULT_MAX_TOKEN_SIZE);
|
|
285
|
+
let pendingResponses = [];
|
|
286
|
+
const tokensPerSecond = options.tokensPerSecond;
|
|
287
|
+
const state = { callCount: 0 };
|
|
288
|
+
const promptCache = new Map();
|
|
289
|
+
const modelDefinitions = options.models?.length
|
|
290
|
+
? options.models
|
|
291
|
+
: [
|
|
292
|
+
{
|
|
293
|
+
id: DEFAULT_MODEL_ID,
|
|
294
|
+
name: DEFAULT_MODEL_NAME,
|
|
295
|
+
reasoning: false,
|
|
296
|
+
input: ["text", "image"],
|
|
297
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
298
|
+
contextWindow: 128000,
|
|
299
|
+
maxTokens: 16384,
|
|
300
|
+
},
|
|
301
|
+
];
|
|
302
|
+
const models = modelDefinitions.map((definition) => ({
|
|
303
|
+
id: definition.id,
|
|
304
|
+
name: definition.name ?? definition.id,
|
|
305
|
+
api,
|
|
306
|
+
provider,
|
|
307
|
+
baseUrl: DEFAULT_BASE_URL,
|
|
308
|
+
reasoning: definition.reasoning ?? false,
|
|
309
|
+
input: definition.input ?? ["text", "image"],
|
|
310
|
+
cost: definition.cost ?? { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
311
|
+
contextWindow: definition.contextWindow ?? 128000,
|
|
312
|
+
maxTokens: definition.maxTokens ?? 16384,
|
|
313
|
+
}));
|
|
314
|
+
const stream = (requestModel, context, streamOptions) => {
|
|
315
|
+
const outer = createAssistantMessageEventStream();
|
|
316
|
+
const step = pendingResponses.shift();
|
|
317
|
+
state.callCount++;
|
|
318
|
+
queueMicrotask(async () => {
|
|
319
|
+
try {
|
|
320
|
+
if (!step) {
|
|
321
|
+
let message = createErrorMessage(new Error("No more faux responses queued"), api, provider, requestModel.id);
|
|
322
|
+
message = withUsageEstimate(message, context, streamOptions, promptCache);
|
|
323
|
+
outer.push({ type: "error", reason: "error", error: message });
|
|
324
|
+
outer.end(message);
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
const resolved = typeof step === "function" ? await step(context, streamOptions, state, requestModel) : step;
|
|
328
|
+
let message = cloneMessage(resolved, api, provider, requestModel.id);
|
|
329
|
+
message = withUsageEstimate(message, context, streamOptions, promptCache);
|
|
330
|
+
await streamWithDeltas(outer, message, minTokenSize, maxTokenSize, tokensPerSecond, streamOptions?.signal);
|
|
331
|
+
}
|
|
332
|
+
catch (error) {
|
|
333
|
+
const message = createErrorMessage(error, api, provider, requestModel.id);
|
|
334
|
+
outer.push({ type: "error", reason: "error", error: message });
|
|
335
|
+
outer.end(message);
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
return outer;
|
|
339
|
+
};
|
|
340
|
+
const streamSimple = (streamModel, context, streamOptions) => stream(streamModel, context, streamOptions);
|
|
341
|
+
registerApiProvider({ api, stream, streamSimple }, sourceId);
|
|
342
|
+
function getModel(requestedModelId) {
|
|
343
|
+
if (!requestedModelId) {
|
|
344
|
+
return models[0];
|
|
345
|
+
}
|
|
346
|
+
return models.find((candidate) => candidate.id === requestedModelId);
|
|
347
|
+
}
|
|
348
|
+
return {
|
|
349
|
+
api,
|
|
350
|
+
models,
|
|
351
|
+
getModel,
|
|
352
|
+
state,
|
|
353
|
+
setResponses(responses) {
|
|
354
|
+
pendingResponses = [...responses];
|
|
355
|
+
},
|
|
356
|
+
appendResponses(responses) {
|
|
357
|
+
pendingResponses.push(...responses);
|
|
358
|
+
},
|
|
359
|
+
getPendingResponseCount() {
|
|
360
|
+
return pendingResponses.length;
|
|
361
|
+
},
|
|
362
|
+
unregister() {
|
|
363
|
+
unregisterApiProviders(sourceId);
|
|
364
|
+
},
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
//# sourceMappingURL=faux.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faux.js","sourceRoot":"","sources":["../../src/providers/faux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAiBjF,OAAO,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;AAE7E,MAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAClC,MAAM,kBAAkB,GAAG,YAAY,CAAC;AACxC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAC9C,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAEjC,MAAM,aAAa,GAAU;IAC5B,KAAK,E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/B;QACD,UAAU,GAAG;YACZ,sBAAsB,CAAC,QAAQ,CAAC,CAAC;QAAA,CACjC;KACD,CAAC;AAAA,CACF","sourcesContent":["import { registerApiProvider, unregisterApiProviders } from \"../api-registry.js\";\nimport type {\n\tAssistantMessage,\n\tAssistantMessageEventStream,\n\tContext,\n\tImageContent,\n\tMessage,\n\tModel,\n\tSimpleStreamOptions,\n\tStreamFunction,\n\tStreamOptions,\n\tTextContent,\n\tThinkingContent,\n\tToolCall,\n\tToolResultMessage,\n\tUsage,\n} from \"../types.js\";\nimport { createAssistantMessageEventStream } from \"../utils/event-stream.js\";\n\nconst DEFAULT_API = \"faux\";\nconst DEFAULT_PROVIDER = \"faux\";\nconst DEFAULT_MODEL_ID = \"faux-1\";\nconst DEFAULT_MODEL_NAME = \"Faux Model\";\nconst DEFAULT_BASE_URL = \"http://localhost:0\";\nconst DEFAULT_MIN_TOKEN_SIZE = 3;\nconst DEFAULT_MAX_TOKEN_SIZE = 5;\n\nconst DEFAULT_USAGE: Usage = {\n\tinput: 0,\n\toutput: 0,\n\tcacheRead: 0,\n\tcacheWrite: 0,\n\ttotalTokens: 0,\n\tcost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },\n};\n\nexport interface FauxModelDefinition {\n\tid: string;\n\tname?: string;\n\treasoning?: boolean;\n\tinput?: (\"text\" | \"image\")[];\n\tcost?: { input: number; output: number; cacheRead: number; cacheWrite: number };\n\tcontextWindow?: number;\n\tmaxTokens?: number;\n}\n\nexport type FauxContentBlock = TextContent | ThinkingContent | ToolCall;\n\nexport function fauxText(text: string): TextContent {\n\treturn { type: \"text\", text };\n}\n\nexport function fauxThinking(thinking: string): ThinkingContent {\n\treturn { type: \"thinking\", thinking };\n}\n\nexport function fauxToolCall(name: string, arguments_: ToolCall[\"arguments\"], options: { id?: string } = {}): ToolCall {\n\treturn {\n\t\ttype: \"toolCall\",\n\t\tid: options.id ?? randomId(\"tool\"),\n\t\tname,\n\t\targuments: arguments_,\n\t};\n}\n\nfunction normalizeFauxAssistantContent(content: string | FauxContentBlock | FauxContentBlock[]): FauxContentBlock[] {\n\tif (typeof content === \"string\") {\n\t\treturn [fauxText(content)];\n\t}\n\treturn Array.isArray(content) ? content : [content];\n}\n\nexport function fauxAssistantMessage(\n\tcontent: string | FauxContentBlock | FauxContentBlock[],\n\toptions: {\n\t\tstopReason?: AssistantMessage[\"stopReason\"];\n\t\terrorMessage?: string;\n\t\tresponseId?: string;\n\t\ttimestamp?: number;\n\t} = {},\n): AssistantMessage {\n\treturn {\n\t\trole: \"assistant\",\n\t\tcontent: normalizeFauxAssistantContent(content),\n\t\tapi: DEFAULT_API,\n\t\tprovider: DEFAULT_PROVIDER,\n\t\tmodel: DEFAULT_MODEL_ID,\n\t\tusage: DEFAULT_USAGE,\n\t\tstopReason: options.stopReason ?? \"stop\",\n\t\terrorMessage: options.errorMessage,\n\t\tresponseId: options.responseId,\n\t\ttimestamp: options.timestamp ?? Date.now(),\n\t};\n}\n\nexport type FauxResponseFactory = (\n\tcontext: Context,\n\toptions: StreamOptions | undefined,\n\tstate: { callCount: number },\n\tmodel: Model<string>,\n) => AssistantMessage | Promise<AssistantMessage>;\n\nexport type FauxResponseStep = AssistantMessage | FauxResponseFactory;\n\nexport interface RegisterFauxProviderOptions {\n\tapi?: string;\n\tprovider?: string;\n\tmodels?: FauxModelDefinition[];\n\ttokensPerSecond?: number;\n\ttokenSize?: {\n\t\tmin?: number;\n\t\tmax?: number;\n\t};\n}\n\nexport interface FauxProviderRegistration {\n\tapi: string;\n\tmodels: [Model<string>, ...Model<string>[]];\n\tgetModel(): Model<string>;\n\tgetModel(modelId: string): Model<string> | undefined;\n\tstate: { callCount: number };\n\tsetResponses: (responses: FauxResponseStep[]) => void;\n\tappendResponses: (responses: FauxResponseStep[]) => void;\n\tgetPendingResponseCount: () => number;\n\tunregister: () => void;\n}\n\nfunction estimateTokens(text: string): number {\n\treturn Math.ceil(text.length / 4);\n}\n\nfunction randomId(prefix: string): string {\n\treturn `${prefix}:${Date.now()}:${Math.random().toString(36).slice(2)}`;\n}\n\nfunction contentToText(content: string | Array<TextContent | ImageContent>): string {\n\tif (typeof content === \"string\") {\n\t\treturn content;\n\t}\n\treturn content\n\t\t.map((block) => {\n\t\t\tif (block.type === \"text\") {\n\t\t\t\treturn block.text;\n\t\t\t}\n\t\t\treturn `[image:${block.mimeType}:${block.data.length}]`;\n\t\t})\n\t\t.join(\"\\n\");\n}\n\nfunction assistantContentToText(content: Array<TextContent | ThinkingContent | ToolCall>): string {\n\treturn content\n\t\t.map((block) => {\n\t\t\tif (block.type === \"text\") {\n\t\t\t\treturn block.text;\n\t\t\t}\n\t\t\tif (block.type === \"thinking\") {\n\t\t\t\treturn block.thinking;\n\t\t\t}\n\t\t\treturn `${block.name}:${JSON.stringify(block.arguments)}`;\n\t\t})\n\t\t.join(\"\\n\");\n}\n\nfunction toolResultToText(message: ToolResultMessage): string {\n\treturn [message.toolName, ...message.content.map((block) => contentToText([block]))].join(\"\\n\");\n}\n\nfunction messageToText(message: Message): string {\n\tif (message.role === \"user\") {\n\t\treturn contentToText(message.content);\n\t}\n\tif (message.role === \"assistant\") {\n\t\treturn assistantContentToText(message.content);\n\t}\n\treturn toolResultToText(message);\n}\n\nfunction serializeContext(context: Context): string {\n\tconst parts: string[] = [];\n\tif (context.systemPrompt) {\n\t\tparts.push(`system:${context.systemPrompt}`);\n\t}\n\tfor (const message of context.messages) {\n\t\tparts.push(`${message.role}:${messageToText(message)}`);\n\t}\n\tif (context.tools?.length) {\n\t\tparts.push(`tools:${JSON.stringify(context.tools)}`);\n\t}\n\treturn parts.join(\"\\n\\n\");\n}\n\nfunction commonPrefixLength(a: string, b: string): number {\n\tconst length = Math.min(a.length, b.length);\n\tlet index = 0;\n\twhile (index < length && a[index] === b[index]) {\n\t\tindex++;\n\t}\n\treturn index;\n}\n\nfunction withUsageEstimate(\n\tmessage: AssistantMessage,\n\tcontext: Context,\n\toptions: StreamOptions | undefined,\n\tpromptCache: Map<string, string>,\n): AssistantMessage {\n\tconst promptText = serializeContext(context);\n\tconst promptTokens = estimateTokens(promptText);\n\tconst outputTokens = estimateTokens(assistantContentToText(message.content));\n\tlet input = promptTokens;\n\tlet cacheRead = 0;\n\tlet cacheWrite = 0;\n\tconst sessionId = options?.sessionId;\n\n\tif (sessionId && options?.cacheRetention !== \"none\") {\n\t\tconst previousPrompt = promptCache.get(sessionId);\n\t\tif (previousPrompt) {\n\t\t\tconst cachedChars = commonPrefixLength(previousPrompt, promptText);\n\t\t\tcacheRead = estimateTokens(previousPrompt.slice(0, cachedChars));\n\t\t\tcacheWrite = estimateTokens(promptText.slice(cachedChars));\n\t\t\tinput = Math.max(0, promptTokens - cacheRead);\n\t\t} else {\n\t\t\tcacheWrite = promptTokens;\n\t\t}\n\t\tpromptCache.set(sessionId, promptText);\n\t}\n\n\treturn {\n\t\t...message,\n\t\tusage: {\n\t\t\tinput,\n\t\t\toutput: outputTokens,\n\t\t\tcacheRead,\n\t\t\tcacheWrite,\n\t\t\ttotalTokens: input + outputTokens + cacheRead + cacheWrite,\n\t\t\tcost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },\n\t\t},\n\t};\n}\n\nfunction splitStringByTokenSize(text: string, minTokenSize: number, maxTokenSize: number): string[] {\n\tconst chunks: string[] = [];\n\tlet index = 0;\n\twhile (index < text.length) {\n\t\tconst tokenSize = minTokenSize + Math.floor(Math.random() * (maxTokenSize - minTokenSize + 1));\n\t\tconst charSize = Math.max(1, tokenSize * 4);\n\t\tchunks.push(text.slice(index, index + charSize));\n\t\tindex += charSize;\n\t}\n\treturn chunks.length > 0 ? chunks : [\"\"];\n}\n\nfunction cloneMessage(message: AssistantMessage, api: string, provider: string, modelId: string): AssistantMessage {\n\tconst cloned = structuredClone(message);\n\treturn {\n\t\t...cloned,\n\t\tapi,\n\t\tprovider,\n\t\tmodel: modelId,\n\t\ttimestamp: cloned.timestamp ?? Date.now(),\n\t\tusage: cloned.usage ?? DEFAULT_USAGE,\n\t};\n}\n\nfunction createErrorMessage(error: unknown, api: string, provider: string, modelId: string): AssistantMessage {\n\treturn {\n\t\trole: \"assistant\",\n\t\tcontent: [],\n\t\tapi,\n\t\tprovider,\n\t\tmodel: modelId,\n\t\tusage: DEFAULT_USAGE,\n\t\tstopReason: \"error\",\n\t\terrorMessage: error instanceof Error ? error.message : String(error),\n\t\ttimestamp: Date.now(),\n\t};\n}\n\nfunction createAbortedMessage(partial: AssistantMessage): AssistantMessage {\n\treturn {\n\t\t...partial,\n\t\tstopReason: \"aborted\",\n\t\terrorMessage: \"Request was aborted\",\n\t\ttimestamp: Date.now(),\n\t};\n}\n\nfunction scheduleChunk(chunk: string, tokensPerSecond: number | undefined): Promise<void> {\n\tif (!tokensPerSecond || tokensPerSecond <= 0) {\n\t\treturn new Promise((resolve) => queueMicrotask(resolve));\n\t}\n\tconst delayMs = (estimateTokens(chunk) / tokensPerSecond) * 1000;\n\treturn new Promise((resolve) => setTimeout(resolve, delayMs));\n}\n\nasync function streamWithDeltas(\n\tstream: AssistantMessageEventStream,\n\tmessage: AssistantMessage,\n\tminTokenSize: number,\n\tmaxTokenSize: number,\n\ttokensPerSecond: number | undefined,\n\tsignal: AbortSignal | undefined,\n): Promise<void> {\n\tconst partial: AssistantMessage = { ...message, content: [] };\n\tif (signal?.aborted) {\n\t\tconst aborted = createAbortedMessage(partial);\n\t\tstream.push({ type: \"error\", reason: \"aborted\", error: aborted });\n\t\tstream.end(aborted);\n\t\treturn;\n\t}\n\n\tstream.push({ type: \"start\", partial: { ...partial } });\n\n\tfor (let index = 0; index < message.content.length; index++) {\n\t\tif (signal?.aborted) {\n\t\t\tconst aborted = createAbortedMessage(partial);\n\t\t\tstream.push({ type: \"error\", reason: \"aborted\", error: aborted });\n\t\t\tstream.end(aborted);\n\t\t\treturn;\n\t\t}\n\n\t\tconst block = message.content[index];\n\n\t\tif (block.type === \"thinking\") {\n\t\t\tpartial.content = [...partial.content, { type: \"thinking\", thinking: \"\" }];\n\t\t\tstream.push({ type: \"thinking_start\", contentIndex: index, partial: { ...partial } });\n\t\t\tfor (const chunk of splitStringByTokenSize(block.thinking, minTokenSize, maxTokenSize)) {\n\t\t\t\tawait scheduleChunk(chunk, tokensPerSecond);\n\t\t\t\tif (signal?.aborted) {\n\t\t\t\t\tconst aborted = createAbortedMessage(partial);\n\t\t\t\t\tstream.push({ type: \"error\", reason: \"aborted\", error: aborted });\n\t\t\t\t\tstream.end(aborted);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t(partial.content[index] as ThinkingContent).thinking += chunk;\n\t\t\t\tstream.push({ type: \"thinking_delta\", contentIndex: index, delta: chunk, partial: { ...partial } });\n\t\t\t}\n\t\t\tstream.push({\n\t\t\t\ttype: \"thinking_end\",\n\t\t\t\tcontentIndex: index,\n\t\t\t\tcontent: block.thinking,\n\t\t\t\tpartial: { ...partial },\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (block.type === \"text\") {\n\t\t\tpartial.content = [...partial.content, { type: \"text\", text: \"\" }];\n\t\t\tstream.push({ type: \"text_start\", contentIndex: index, partial: { ...partial } });\n\t\t\tfor (const chunk of splitStringByTokenSize(block.text, minTokenSize, maxTokenSize)) {\n\t\t\t\tawait scheduleChunk(chunk, tokensPerSecond);\n\t\t\t\tif (signal?.aborted) {\n\t\t\t\t\tconst aborted = createAbortedMessage(partial);\n\t\t\t\t\tstream.push({ type: \"error\", reason: \"aborted\", error: aborted });\n\t\t\t\t\tstream.end(aborted);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t(partial.content[index] as TextContent).text += chunk;\n\t\t\t\tstream.push({ type: \"text_delta\", contentIndex: index, delta: chunk, partial: { ...partial } });\n\t\t\t}\n\t\t\tstream.push({ type: \"text_end\", contentIndex: index, content: block.text, partial: { ...partial } });\n\t\t\tcontinue;\n\t\t}\n\n\t\tpartial.content = [...partial.content, { type: \"toolCall\", id: block.id, name: block.name, arguments: {} }];\n\t\tstream.push({ type: \"toolcall_start\", contentIndex: index, partial: { ...partial } });\n\t\tfor (const chunk of splitStringByTokenSize(JSON.stringify(block.arguments), minTokenSize, maxTokenSize)) {\n\t\t\tawait scheduleChunk(chunk, tokensPerSecond);\n\t\t\tif (signal?.aborted) {\n\t\t\t\tconst aborted = createAbortedMessage(partial);\n\t\t\t\tstream.push({ type: \"error\", reason: \"aborted\", error: aborted });\n\t\t\t\tstream.end(aborted);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tstream.push({ type: \"toolcall_delta\", contentIndex: index, delta: chunk, partial: { ...partial } });\n\t\t}\n\t\t(partial.content[index] as ToolCall).arguments = block.arguments;\n\t\tstream.push({ type: \"toolcall_end\", contentIndex: index, toolCall: block, partial: { ...partial } });\n\t}\n\n\tif (message.stopReason === \"error\" || message.stopReason === \"aborted\") {\n\t\tstream.push({ type: \"error\", reason: message.stopReason, error: message });\n\t\tstream.end(message);\n\t\treturn;\n\t}\n\n\tstream.push({ type: \"done\", reason: message.stopReason, message });\n\tstream.end(message);\n}\n\nexport function registerFauxProvider(options: RegisterFauxProviderOptions = {}): FauxProviderRegistration {\n\tconst api = options.api ?? randomId(DEFAULT_API);\n\tconst provider = options.provider ?? DEFAULT_PROVIDER;\n\tconst sourceId = randomId(\"faux-provider\");\n\tconst minTokenSize = Math.max(\n\t\t1,\n\t\tMath.min(options.tokenSize?.min ?? DEFAULT_MIN_TOKEN_SIZE, options.tokenSize?.max ?? DEFAULT_MAX_TOKEN_SIZE),\n\t);\n\tconst maxTokenSize = Math.max(minTokenSize, options.tokenSize?.max ?? DEFAULT_MAX_TOKEN_SIZE);\n\tlet pendingResponses: FauxResponseStep[] = [];\n\tconst tokensPerSecond = options.tokensPerSecond;\n\tconst state = { callCount: 0 };\n\tconst promptCache = new Map<string, string>();\n\n\tconst modelDefinitions = options.models?.length\n\t\t? options.models\n\t\t: [\n\t\t\t\t{\n\t\t\t\t\tid: DEFAULT_MODEL_ID,\n\t\t\t\t\tname: DEFAULT_MODEL_NAME,\n\t\t\t\t\treasoning: false,\n\t\t\t\t\tinput: [\"text\", \"image\"] as (\"text\" | \"image\")[],\n\t\t\t\t\tcost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },\n\t\t\t\t\tcontextWindow: 128000,\n\t\t\t\t\tmaxTokens: 16384,\n\t\t\t\t},\n\t\t\t];\n\tconst models = modelDefinitions.map((definition) => ({\n\t\tid: definition.id,\n\t\tname: definition.name ?? definition.id,\n\t\tapi,\n\t\tprovider,\n\t\tbaseUrl: DEFAULT_BASE_URL,\n\t\treasoning: definition.reasoning ?? false,\n\t\tinput: definition.input ?? [\"text\", \"image\"],\n\t\tcost: definition.cost ?? { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },\n\t\tcontextWindow: definition.contextWindow ?? 128000,\n\t\tmaxTokens: definition.maxTokens ?? 16384,\n\t})) as [Model<string>, ...Model<string>[]];\n\n\tconst stream: StreamFunction<string, StreamOptions> = (requestModel, context, streamOptions) => {\n\t\tconst outer = createAssistantMessageEventStream();\n\t\tconst step = pendingResponses.shift();\n\t\tstate.callCount++;\n\n\t\tqueueMicrotask(async () => {\n\t\t\ttry {\n\t\t\t\tif (!step) {\n\t\t\t\t\tlet message = createErrorMessage(\n\t\t\t\t\t\tnew Error(\"No more faux responses queued\"),\n\t\t\t\t\t\tapi,\n\t\t\t\t\t\tprovider,\n\t\t\t\t\t\trequestModel.id,\n\t\t\t\t\t);\n\t\t\t\t\tmessage = withUsageEstimate(message, context, streamOptions, promptCache);\n\t\t\t\t\touter.push({ type: \"error\", reason: \"error\", error: message });\n\t\t\t\t\touter.end(message);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst resolved =\n\t\t\t\t\ttypeof step === \"function\" ? await step(context, streamOptions, state, requestModel) : step;\n\t\t\t\tlet message = cloneMessage(resolved, api, provider, requestModel.id);\n\t\t\t\tmessage = withUsageEstimate(message, context, streamOptions, promptCache);\n\t\t\t\tawait streamWithDeltas(outer, message, minTokenSize, maxTokenSize, tokensPerSecond, streamOptions?.signal);\n\t\t\t} catch (error) {\n\t\t\t\tconst message = createErrorMessage(error, api, provider, requestModel.id);\n\t\t\t\touter.push({ type: \"error\", reason: \"error\", error: message });\n\t\t\t\touter.end(message);\n\t\t\t}\n\t\t});\n\n\t\treturn outer;\n\t};\n\n\tconst streamSimple: StreamFunction<string, SimpleStreamOptions> = (streamModel, context, streamOptions) =>\n\t\tstream(streamModel, context, streamOptions);\n\n\tregisterApiProvider({ api, stream, streamSimple }, sourceId);\n\n\tfunction getModel(): Model<string>;\n\tfunction getModel(requestedModelId: string): Model<string> | undefined;\n\tfunction getModel(requestedModelId?: string): Model<string> | undefined {\n\t\tif (!requestedModelId) {\n\t\t\treturn models[0];\n\t\t}\n\t\treturn models.find((candidate) => candidate.id === requestedModelId);\n\t}\n\n\treturn {\n\t\tapi,\n\t\tmodels,\n\t\tgetModel,\n\t\tstate,\n\t\tsetResponses(responses) {\n\t\t\tpendingResponses = [...responses];\n\t\t},\n\t\tappendResponses(responses) {\n\t\t\tpendingResponses.push(...responses);\n\t\t},\n\t\tgetPendingResponseCount() {\n\t\t\treturn pendingResponses.length;\n\t\t},\n\t\tunregister() {\n\t\t\tunregisterApiProviders(sourceId);\n\t\t},\n\t};\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Message } from "../types.js";
|
|
2
|
+
export declare function inferCopilotInitiator(messages: Message[]): "user" | "agent";
|
|
3
|
+
export declare function hasCopilotVisionInput(messages: Message[]): boolean;
|
|
4
|
+
export declare function buildCopilotDynamicHeaders(params: {
|
|
5
|
+
messages: Message[];
|
|
6
|
+
hasImages: boolean;
|
|
7
|
+
}): Record<string, string>;
|
|
8
|
+
//# sourceMappingURL=github-copilot-headers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-copilot-headers.d.ts","sourceRoot":"","sources":["../../src/providers/github-copilot-headers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,GAAG,OAAO,CAG3E;AAGD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAUlE;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE;IAClD,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACnB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWzB","sourcesContent":["import type { Message } from \"../types.js\";\n\n// Copilot expects X-Initiator to indicate whether the request is user-initiated\n// or agent-initiated (e.g. follow-up after assistant/tool messages).\nexport function inferCopilotInitiator(messages: Message[]): \"user\" | \"agent\" {\n\tconst last = messages[messages.length - 1];\n\treturn last && last.role !== \"user\" ? \"agent\" : \"user\";\n}\n\n// Copilot requires Copilot-Vision-Request header when sending images\nexport function hasCopilotVisionInput(messages: Message[]): boolean {\n\treturn messages.some((msg) => {\n\t\tif (msg.role === \"user\" && Array.isArray(msg.content)) {\n\t\t\treturn msg.content.some((c) => c.type === \"image\");\n\t\t}\n\t\tif (msg.role === \"toolResult\" && Array.isArray(msg.content)) {\n\t\t\treturn msg.content.some((c) => c.type === \"image\");\n\t\t}\n\t\treturn false;\n\t});\n}\n\nexport function buildCopilotDynamicHeaders(params: {\n\tmessages: Message[];\n\thasImages: boolean;\n}): Record<string, string> {\n\tconst headers: Record<string, string> = {\n\t\t\"X-Initiator\": inferCopilotInitiator(params.messages),\n\t\t\"Openai-Intent\": \"conversation-edits\",\n\t};\n\n\tif (params.hasImages) {\n\t\theaders[\"Copilot-Vision-Request\"] = \"true\";\n\t}\n\n\treturn headers;\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Copilot expects X-Initiator to indicate whether the request is user-initiated
|
|
2
|
+
// or agent-initiated (e.g. follow-up after assistant/tool messages).
|
|
3
|
+
export function inferCopilotInitiator(messages) {
|
|
4
|
+
const last = messages[messages.length - 1];
|
|
5
|
+
return last && last.role !== "user" ? "agent" : "user";
|
|
6
|
+
}
|
|
7
|
+
// Copilot requires Copilot-Vision-Request header when sending images
|
|
8
|
+
export function hasCopilotVisionInput(messages) {
|
|
9
|
+
return messages.some((msg) => {
|
|
10
|
+
if (msg.role === "user" && Array.isArray(msg.content)) {
|
|
11
|
+
return msg.content.some((c) => c.type === "image");
|
|
12
|
+
}
|
|
13
|
+
if (msg.role === "toolResult" && Array.isArray(msg.content)) {
|
|
14
|
+
return msg.content.some((c) => c.type === "image");
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export function buildCopilotDynamicHeaders(params) {
|
|
20
|
+
const headers = {
|
|
21
|
+
"X-Initiator": inferCopilotInitiator(params.messages),
|
|
22
|
+
"Openai-Intent": "conversation-edits",
|
|
23
|
+
};
|
|
24
|
+
if (params.hasImages) {
|
|
25
|
+
headers["Copilot-Vision-Request"] = "true";
|
|
26
|
+
}
|
|
27
|
+
return headers;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=github-copilot-headers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-copilot-headers.js","sourceRoot":"","sources":["../../src/providers/github-copilot-headers.ts"],"names":[],"mappings":"AAEA,gFAAgF;AAChF,qEAAqE;AACrE,MAAM,UAAU,qBAAqB,CAAC,QAAmB,EAAoB;IAC5E,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC3C,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;AAAA,CACvD;AAED,qEAAqE;AACrE,MAAM,UAAU,qBAAqB,CAAC,QAAmB,EAAW;IACnE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC;QAC7B,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YACvD,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;QACpD,CAAC;QACD,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7D,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,KAAK,CAAC;IAAA,CACb,CAAC,CAAC;AAAA,CACH;AAED,MAAM,UAAU,0BAA0B,CAAC,MAG1C,EAA0B;IAC1B,MAAM,OAAO,GAA2B;QACvC,aAAa,EAAE,qBAAqB,CAAC,MAAM,CAAC,QAAQ,CAAC;QACrD,eAAe,EAAE,oBAAoB;KACrC,CAAC;IAEF,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACtB,OAAO,CAAC,wBAAwB,CAAC,GAAG,MAAM,CAAC;IAC5C,CAAC;IAED,OAAO,OAAO,CAAC;AAAA,CACf","sourcesContent":["import type { Message } from \"../types.js\";\n\n// Copilot expects X-Initiator to indicate whether the request is user-initiated\n// or agent-initiated (e.g. follow-up after assistant/tool messages).\nexport function inferCopilotInitiator(messages: Message[]): \"user\" | \"agent\" {\n\tconst last = messages[messages.length - 1];\n\treturn last && last.role !== \"user\" ? \"agent\" : \"user\";\n}\n\n// Copilot requires Copilot-Vision-Request header when sending images\nexport function hasCopilotVisionInput(messages: Message[]): boolean {\n\treturn messages.some((msg) => {\n\t\tif (msg.role === \"user\" && Array.isArray(msg.content)) {\n\t\t\treturn msg.content.some((c) => c.type === \"image\");\n\t\t}\n\t\tif (msg.role === \"toolResult\" && Array.isArray(msg.content)) {\n\t\t\treturn msg.content.some((c) => c.type === \"image\");\n\t\t}\n\t\treturn false;\n\t});\n}\n\nexport function buildCopilotDynamicHeaders(params: {\n\tmessages: Message[];\n\thasImages: boolean;\n}): Record<string, string> {\n\tconst headers: Record<string, string> = {\n\t\t\"X-Initiator\": inferCopilotInitiator(params.messages),\n\t\t\"Openai-Intent\": \"conversation-edits\",\n\t};\n\n\tif (params.hasImages) {\n\t\theaders[\"Copilot-Vision-Request\"] = \"true\";\n\t}\n\n\treturn headers;\n}\n"]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Gemini CLI / Antigravity provider.
|
|
3
|
+
* Shared implementation for both google-gemini-cli and google-antigravity providers.
|
|
4
|
+
* Uses the Cloud Code Assist API endpoint to access Gemini and Claude models.
|
|
5
|
+
*/
|
|
6
|
+
import type { Content, ThinkingConfig } from "@google/genai";
|
|
7
|
+
import type { Context, Model, SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
8
|
+
import { convertTools, mapToolChoice } from "./google-shared.js";
|
|
9
|
+
/**
|
|
10
|
+
* Thinking level for Gemini 3 models.
|
|
11
|
+
* Mirrors Google's ThinkingLevel enum values.
|
|
12
|
+
*/
|
|
13
|
+
export type GoogleThinkingLevel = "THINKING_LEVEL_UNSPECIFIED" | "MINIMAL" | "LOW" | "MEDIUM" | "HIGH";
|
|
14
|
+
export interface GoogleGeminiCliOptions extends StreamOptions {
|
|
15
|
+
toolChoice?: "auto" | "none" | "any";
|
|
16
|
+
/**
|
|
17
|
+
* Thinking/reasoning configuration.
|
|
18
|
+
* - Gemini 2.x models: use `budgetTokens` to set the thinking budget
|
|
19
|
+
* - Gemini 3 models (gemini-3-pro-*, gemini-3-flash-*): use `level` instead
|
|
20
|
+
*
|
|
21
|
+
* When using `streamSimple`, this is handled automatically based on the model.
|
|
22
|
+
*/
|
|
23
|
+
thinking?: {
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
/** Thinking budget in tokens. Use for Gemini 2.x models. */
|
|
26
|
+
budgetTokens?: number;
|
|
27
|
+
/** Thinking level. Use for Gemini 3 models (LOW/HIGH for Pro, MINIMAL/LOW/MEDIUM/HIGH for Flash). */
|
|
28
|
+
level?: GoogleThinkingLevel;
|
|
29
|
+
};
|
|
30
|
+
projectId?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Extract retry delay from Gemini error response (in milliseconds).
|
|
34
|
+
* Checks headers first (Retry-After, x-ratelimit-reset, x-ratelimit-reset-after),
|
|
35
|
+
* then parses body patterns like:
|
|
36
|
+
* - "Your quota will reset after 39s"
|
|
37
|
+
* - "Your quota will reset after 18h31m10s"
|
|
38
|
+
* - "Please retry in Xs" or "Please retry in Xms"
|
|
39
|
+
* - "retryDelay": "34.074824224s" (JSON field)
|
|
40
|
+
*/
|
|
41
|
+
export declare function extractRetryDelay(errorText: string, response?: Response | Headers): number | undefined;
|
|
42
|
+
interface CloudCodeAssistRequest {
|
|
43
|
+
project: string;
|
|
44
|
+
model: string;
|
|
45
|
+
request: {
|
|
46
|
+
contents: Content[];
|
|
47
|
+
sessionId?: string;
|
|
48
|
+
systemInstruction?: {
|
|
49
|
+
role?: string;
|
|
50
|
+
parts: {
|
|
51
|
+
text: string;
|
|
52
|
+
}[];
|
|
53
|
+
};
|
|
54
|
+
generationConfig?: {
|
|
55
|
+
maxOutputTokens?: number;
|
|
56
|
+
temperature?: number;
|
|
57
|
+
thinkingConfig?: ThinkingConfig;
|
|
58
|
+
};
|
|
59
|
+
tools?: ReturnType<typeof convertTools>;
|
|
60
|
+
toolConfig?: {
|
|
61
|
+
functionCallingConfig: {
|
|
62
|
+
mode: ReturnType<typeof mapToolChoice>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
requestType?: string;
|
|
67
|
+
userAgent?: string;
|
|
68
|
+
requestId?: string;
|
|
69
|
+
}
|
|
70
|
+
export declare const streamGoogleGeminiCli: StreamFunction<"google-gemini-cli", GoogleGeminiCliOptions>;
|
|
71
|
+
export declare const streamSimpleGoogleGeminiCli: StreamFunction<"google-gemini-cli", SimpleStreamOptions>;
|
|
72
|
+
export declare function buildRequest(model: Model<"google-gemini-cli">, context: Context, projectId: string, options?: GoogleGeminiCliOptions, isAntigravity?: boolean): CloudCodeAssistRequest;
|
|
73
|
+
export {};
|
|
74
|
+
//# sourceMappingURL=google-gemini-cli.d.ts.map
|