orient-cli 0.1.0-alpha.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/NOTICE.md +0 -0
- package/README.md +0 -0
- package/dist/cli.d.ts +0 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/extensions/orient-core.d.ts +0 -0
- package/dist/extensions/orient-core.js +0 -0
- package/dist/extensions/orient-core.js.map +0 -0
- package/dist/extensions/orient-notebooklm.d.ts +0 -0
- package/dist/extensions/orient-notebooklm.js +0 -0
- package/dist/extensions/orient-notebooklm.js.map +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/notebooklm/bridge.d.ts +0 -0
- package/dist/integrations/notebooklm/bridge.js +0 -0
- package/dist/integrations/notebooklm/bridge.js.map +0 -0
- package/dist/integrations/notebooklm/notebooklm-extension.d.ts +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.js +1 -1
- package/dist/integrations/notebooklm/notebooklm-extension.js.map +1 -1
- package/dist/orient/artifact-graph.d.ts +0 -0
- package/dist/orient/artifact-graph.js +0 -0
- package/dist/orient/artifact-graph.js.map +0 -0
- package/dist/orient/change-packet.d.ts +2 -1
- package/dist/orient/change-packet.js +25 -8
- package/dist/orient/change-packet.js.map +1 -1
- package/dist/orient/clarify.d.ts +114 -0
- package/dist/orient/clarify.js +186 -0
- package/dist/orient/clarify.js.map +1 -0
- package/dist/orient/clear-command.d.ts +79 -0
- package/dist/orient/clear-command.js +117 -0
- package/dist/orient/clear-command.js.map +1 -0
- package/dist/orient/mode.d.ts +70 -0
- package/dist/orient/mode.js +124 -0
- package/dist/orient/mode.js.map +1 -0
- package/dist/orient/orient-extension.d.ts +1 -1
- package/dist/orient/orient-extension.js +306 -17
- package/dist/orient/orient-extension.js.map +1 -1
- package/dist/orient/phases.d.ts +0 -0
- package/dist/orient/phases.js +0 -0
- package/dist/orient/phases.js.map +0 -0
- package/dist/orient/plan-execute.d.ts +137 -0
- package/dist/orient/plan-execute.js +333 -0
- package/dist/orient/plan-execute.js.map +1 -0
- package/dist/orient/state-machine.d.ts +0 -0
- package/dist/orient/state-machine.js +0 -0
- package/dist/orient/state-machine.js.map +0 -0
- package/dist/orient/tiers.d.ts +109 -0
- package/dist/orient/tiers.js +162 -0
- package/dist/orient/tiers.js.map +1 -0
- package/dist/orient/types.d.ts +0 -0
- package/dist/orient/types.js +0 -0
- package/dist/orient/types.js.map +0 -0
- package/dist/orient/wizard.d.ts +108 -0
- package/dist/orient/wizard.js +183 -0
- package/dist/orient/wizard.js.map +1 -0
- package/dist/package-paths.d.ts +0 -0
- package/dist/package-paths.js +0 -0
- package/dist/package-paths.js.map +0 -0
- package/docs/architecture.md +0 -0
- package/docs/artifacts.md +0 -0
- package/docs/commands.md +0 -0
- package/docs/configuration.md +0 -0
- package/docs/getting-started.md +0 -0
- package/docs/open-source-resources.md +1 -1
- package/docs/phases.md +0 -0
- package/docs/research-integration.md +0 -0
- package/docs/workflows.md +0 -0
- package/node_modules/@orient-cli/agent-core/README.md +456 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts +24 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.js +404 -0
- package/node_modules/@orient-cli/agent-core/dist/agent-loop.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.d.ts +115 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.js +395 -0
- package/node_modules/@orient-cli/agent-core/dist/agent.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/index.d.ts +5 -0
- package/node_modules/@orient-cli/agent-core/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/index.js +9 -0
- package/node_modules/@orient-cli/agent-core/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts +85 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.js +268 -0
- package/node_modules/@orient-cli/agent-core/dist/proxy.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/types.d.ts +323 -0
- package/node_modules/@orient-cli/agent-core/dist/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/agent-core/dist/types.js +2 -0
- package/node_modules/@orient-cli/agent-core/dist/types.js.map +1 -0
- package/node_modules/@orient-cli/agent-core/package.json +44 -0
- package/node_modules/@orient-cli/ai/README.md +1315 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.d.ts +20 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.js +44 -0
- package/node_modules/@orient-cli/ai/dist/api-registry.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts +5 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.js +6 -0
- package/node_modules/@orient-cli/ai/dist/bedrock-provider.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/cli.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/cli.js +116 -0
- package/node_modules/@orient-cli/ai/dist/cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.js +107 -0
- package/node_modules/@orient-cli/ai/dist/env-api-keys.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/index.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/index.js +14 -0
- package/node_modules/@orient-cli/ai/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.d.ts +24 -0
- package/node_modules/@orient-cli/ai/dist/models.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.d.ts +14473 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.js +14241 -0
- package/node_modules/@orient-cli/ai/dist/models.generated.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/models.js +55 -0
- package/node_modules/@orient-cli/ai/dist/models.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/oauth.d.ts +2 -0
- package/node_modules/@orient-cli/ai/dist/oauth.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/oauth.js +2 -0
- package/node_modules/@orient-cli/ai/dist/oauth.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts +20 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js +651 -0
- package/node_modules/@orient-cli/ai/dist/providers/amazon-bedrock.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts +40 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.js +749 -0
- package/node_modules/@orient-cli/ai/dist/providers/anthropic.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js +176 -0
- package/node_modules/@orient-cli/ai/dist/providers/azure-openai-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts +56 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.js +367 -0
- package/node_modules/@orient-cli/ai/dist/providers/faux.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js +29 -0
- package/node_modules/@orient-cli/ai/dist/providers/github-copilot-headers.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts +74 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js +776 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-gemini-cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts +65 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.js +312 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-shared.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js +419 -0
- package/node_modules/@orient-cli/ai/dist/providers/google-vertex.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.js +399 -0
- package/node_modules/@orient-cli/ai/dist/providers/google.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts +22 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.js +501 -0
- package/node_modules/@orient-cli/ai/dist/providers/mistral.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js +741 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-codex-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts +15 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js +753 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-completions.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts +17 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js +470 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses-shared.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js +190 -0
- package/node_modules/@orient-cli/ai/dist/providers/openai-responses.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts +38 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js +261 -0
- package/node_modules/@orient-cli/ai/dist/providers/register-builtins.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.js +35 -0
- package/node_modules/@orient-cli/ai/dist/providers/simple-options.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js +155 -0
- package/node_modules/@orient-cli/ai/dist/providers/transform-messages.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/stream.d.ts +8 -0
- package/node_modules/@orient-cli/ai/dist/stream.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/stream.js +27 -0
- package/node_modules/@orient-cli/ai/dist/stream.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/types.d.ts +353 -0
- package/node_modules/@orient-cli/ai/dist/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/types.js +2 -0
- package/node_modules/@orient-cli/ai/dist/types.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts +21 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.js +81 -0
- package/node_modules/@orient-cli/ai/dist/utils/event-stream.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.js +14 -0
- package/node_modules/@orient-cli/ai/dist/utils/hash.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts +9 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.js +29 -0
- package/node_modules/@orient-cli/ai/dist/utils/json-parse.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts +25 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js +335 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/anthropic.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts +30 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js +292 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/github-copilot.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js +376 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-antigravity.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js +481 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/google-gemini-cli.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts +61 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js +131 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/index.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts +3 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js +105 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/oauth-page.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts +34 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js +373 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/openai-codex.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts +13 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js +31 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/pkce.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts +47 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js +2 -0
- package/node_modules/@orient-cli/ai/dist/utils/oauth/types.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts +53 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.js +132 -0
- package/node_modules/@orient-cli/ai/dist/utils/overflow.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts +22 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js +26 -0
- package/node_modules/@orient-cli/ai/dist/utils/sanitize-unicode.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts +17 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js +21 -0
- package/node_modules/@orient-cli/ai/dist/utils/typebox-helpers.js.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts +18 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.d.ts.map +1 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.js +80 -0
- package/node_modules/@orient-cli/ai/dist/utils/validation.js.map +1 -0
- package/node_modules/@orient-cli/ai/package.json +114 -0
- package/node_modules/@orient-cli/coding-agent/README.md +618 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js +4 -0
- package/node_modules/@orient-cli/coding-agent/dist/bun/register-bedrock.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts +52 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.js +326 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/args.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js +31 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/config-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js +83 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/file-processor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts +18 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/initial-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js +92 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/list-models.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js +35 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli/session-picker.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.js +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.d.ts +77 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.js +229 -0
- package/node_modules/@orient-cli/coding-agent/dist/config.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts +83 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js +236 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-runtime.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts +86 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js +116 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session-services.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts +585 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js +2497 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/agent-session.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts +132 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js +422 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/auth-storage.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js +125 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/bash-executor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts +88 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js +243 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/branch-summarization.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts +121 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js +613 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/compaction.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts +38 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js +153 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/compaction/utils.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/defaults.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/diagnostics.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js +25 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/event-bus.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts +29 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.js +75 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/exec.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js +249 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts +37 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js +224 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.css +1001 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.html +55 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/template.js +1690 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts +40 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js +95 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/tool-renderer.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/export-html/vendor/marked.min.js +6 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts +25 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js +438 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/loader.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts +148 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js +700 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/runner.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts +1073 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js +45 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/types.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/extensions/wrapper.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts +48 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js +314 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/footer-data-provider.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.js +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts +288 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js +240 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/keybindings.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts +77 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.js +123 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/messages.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts +132 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js +612 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-registry.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts +110 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js +486 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/model-resolver.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts +6 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js +59 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/output-guard.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts +192 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js +1829 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/package-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts +51 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js +249 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/prompt-templates.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js +126 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resolve-config-value.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts +185 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js +720 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/resource-loader.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts +93 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js +236 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/sdk.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js +38 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-cwd.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts +333 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js +1105 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/session-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts +237 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js +708 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/settings-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts +60 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.js +409 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/skills.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.js +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/slash-commands.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts +18 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/source-info.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js +116 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/system-prompt.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.js +31 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/timings.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts +73 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js +352 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/bash.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts +85 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js +337 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit-diff.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts +53 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js +196 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/edit.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js +37 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js +258 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/find.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts +56 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js +293 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/grep.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts +115 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js +86 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js +172 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/ls.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js +81 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/path-utils.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts +46 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js +225 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/read.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js +49 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/render-utils.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js +32 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts +70 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js +205 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/truncate.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts +35 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js +216 -0
- package/node_modules/@orient-cli/coding-agent/dist/core/tools/write.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.d.ts +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.js +43 -0
- package/node_modules/@orient-cli/coding-agent/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.js +593 -0
- package/node_modules/@orient-cli/coding-agent/dist/main.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts +33 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.js +281 -0
- package/node_modules/@orient-cli/coding-agent/dist/migrations.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.js +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts +18 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js +107 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts +34 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js +175 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js +51 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js +44 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js +45 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts +71 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js +479 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js +70 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js +79 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts +12 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js +133 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/diff.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js +111 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js +61 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts +24 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts +27 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js +201 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/footer.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts +31 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js +34 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/index.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js +22 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts +42 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js +145 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts +47 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js +275 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js +97 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts +53 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js +204 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/orient-banner.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts +49 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js +275 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js +155 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts +95 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js +848 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts +58 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js +301 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js +39 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js +47 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js +50 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js +51 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts +58 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js +274 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts +89 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js +1084 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js +113 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/user-message.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js +33 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts +321 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js +4000 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/dark.json +85 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/light.json +84 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts +81 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js +979 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/interactive/theme/theme.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts +28 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js +112 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/print-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js +49 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/jsonl.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts +217 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js +402 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-client.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js +550 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts +408 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/modes/rpc/rpc-types.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts +4 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js +234 -0
- package/node_modules/@orient-cli/coding-agent/dist/package-manager-cli.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js +87 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/changelog.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/child-process.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts +11 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js +245 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-image.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js +14 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard-native.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js +78 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/clipboard.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts +5 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js +158 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/exif-orientation.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts +8 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/frontmatter.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.js +163 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/git.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts +9 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js +39 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-convert.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts +36 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js +137 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/image-resize.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts +2 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/mime.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts +7 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js +19 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/paths.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts +21 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js +121 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/photon.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts +26 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js +186 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/shell.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts +5 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js +17 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/sleep.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts +3 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.d.ts.map +1 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js +252 -0
- package/node_modules/@orient-cli/coding-agent/dist/utils/tools-manager.js.map +1 -0
- package/node_modules/@orient-cli/coding-agent/package.json +104 -0
- package/node_modules/@orient-cli/tui/README.md +767 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts +52 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.js +623 -0
- package/node_modules/@orient-cli/tui/dist/autocomplete.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/box.d.ts +22 -0
- package/node_modules/@orient-cli/tui/dist/components/box.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/box.js +104 -0
- package/node_modules/@orient-cli/tui/dist/components/box.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts +22 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js +35 -0
- package/node_modules/@orient-cli/tui/dist/components/cancellable-loader.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.d.ts +244 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.js +1861 -0
- package/node_modules/@orient-cli/tui/dist/components/editor.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/image.d.ts +28 -0
- package/node_modules/@orient-cli/tui/dist/components/image.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/image.js +69 -0
- package/node_modules/@orient-cli/tui/dist/components/image.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/input.d.ts +37 -0
- package/node_modules/@orient-cli/tui/dist/components/input.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/input.js +426 -0
- package/node_modules/@orient-cli/tui/dist/components/input.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.d.ts +21 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.js +49 -0
- package/node_modules/@orient-cli/tui/dist/components/loader.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts +95 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.js +663 -0
- package/node_modules/@orient-cli/tui/dist/components/markdown.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts +50 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.js +159 -0
- package/node_modules/@orient-cli/tui/dist/components/select-list.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts +50 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.js +185 -0
- package/node_modules/@orient-cli/tui/dist/components/settings-list.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts +12 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.js +23 -0
- package/node_modules/@orient-cli/tui/dist/components/spacer.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/text.d.ts +19 -0
- package/node_modules/@orient-cli/tui/dist/components/text.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/text.js +89 -0
- package/node_modules/@orient-cli/tui/dist/components/text.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts +13 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.js +51 -0
- package/node_modules/@orient-cli/tui/dist/components/truncated-text.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.d.ts +39 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.js +2 -0
- package/node_modules/@orient-cli/tui/dist/editor-component.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts +16 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.js +107 -0
- package/node_modules/@orient-cli/tui/dist/fuzzy.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/index.d.ts +23 -0
- package/node_modules/@orient-cli/tui/dist/index.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/index.js +32 -0
- package/node_modules/@orient-cli/tui/dist/index.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.d.ts +193 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.js +174 -0
- package/node_modules/@orient-cli/tui/dist/keybindings.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keys.d.ts +170 -0
- package/node_modules/@orient-cli/tui/dist/keys.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/keys.js +1124 -0
- package/node_modules/@orient-cli/tui/dist/keys.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts +28 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.js +44 -0
- package/node_modules/@orient-cli/tui/dist/kill-ring.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts +48 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.js +317 -0
- package/node_modules/@orient-cli/tui/dist/stdin-buffer.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts +68 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.js +288 -0
- package/node_modules/@orient-cli/tui/dist/terminal-image.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal.d.ts +84 -0
- package/node_modules/@orient-cli/tui/dist/terminal.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/terminal.js +285 -0
- package/node_modules/@orient-cli/tui/dist/terminal.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/tui.d.ts +222 -0
- package/node_modules/@orient-cli/tui/dist/tui.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/tui.js +1008 -0
- package/node_modules/@orient-cli/tui/dist/tui.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts +17 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.js +25 -0
- package/node_modules/@orient-cli/tui/dist/undo-stack.js.map +1 -0
- package/node_modules/@orient-cli/tui/dist/utils.d.ts +78 -0
- package/node_modules/@orient-cli/tui/dist/utils.d.ts.map +1 -0
- package/node_modules/@orient-cli/tui/dist/utils.js +960 -0
- package/node_modules/@orient-cli/tui/dist/utils.js.map +1 -0
- package/node_modules/@orient-cli/tui/package.json +52 -0
- package/package.json +47 -8
- package/prompts/orient-blockers.md +0 -0
- package/prompts/orient-handoff.md +0 -0
- package/prompts/orient-recap.md +0 -0
- package/schemas/orient-full/schema.yaml +0 -0
- package/schemas/orient-minimal/schema.yaml +0 -0
- package/schemas/orient-standard/schema.yaml +0 -0
- package/schemas/orient-standard/templates/archive-summary.md +0 -0
- package/schemas/orient-standard/templates/brief.md +0 -0
- package/schemas/orient-standard/templates/constitution.md +0 -0
- package/schemas/orient-standard/templates/current-system-audit.md +0 -0
- package/schemas/orient-standard/templates/current-truth-sync.md +0 -0
- package/schemas/orient-standard/templates/decisions.md +0 -0
- package/schemas/orient-standard/templates/normalize-checklist.md +0 -0
- package/schemas/orient-standard/templates/plan.md +0 -0
- package/schemas/orient-standard/templates/qa-checklist.md +0 -0
- package/schemas/orient-standard/templates/research.md +0 -0
- package/schemas/orient-standard/templates/sources.md +0 -0
- package/schemas/orient-standard/templates/spec.md +0 -0
- package/schemas/orient-standard/templates/state.md +0 -0
- package/schemas/orient-standard/templates/tasks.md +0 -0
- package/schemas/orient-standard/templates/traceability-matrix.md +0 -0
- package/schemas/orient-standard/templates/verify.md +0 -0
- package/schemas/orient-standard/templates/work-log.md +0 -0
- package/schemas/orient-standard/templates-tier-1/brief.md +22 -0
- package/schemas/orient-standard/templates-tier-1/plan.md +17 -0
- package/schemas/orient-standard/templates-tier-1/spec.md +23 -0
- package/schemas/orient-standard/templates-tier-1/tasks.md +14 -0
- package/schemas/orient-standard/templates-tier-2/brief.md +32 -0
- package/schemas/orient-standard/templates-tier-2/plan.md +44 -0
- package/schemas/orient-standard/templates-tier-2/spec.md +46 -0
- package/schemas/orient-standard/templates-tier-2/tasks.md +34 -0
- package/schemas/orient-standard/templates-tier-3/brief.md +54 -0
- package/schemas/orient-standard/templates-tier-3/plan.md +67 -0
- package/schemas/orient-standard/templates-tier-3/spec.md +65 -0
- package/schemas/orient-standard/templates-tier-3/tasks.md +79 -0
- package/skills/orient-analyze/SKILL.md +0 -0
- package/skills/orient-archive/SKILL.md +0 -0
- package/skills/orient-clarify/SKILL.md +0 -0
- package/skills/orient-constitution/SKILL.md +0 -0
- package/skills/orient-decide/SKILL.md +0 -0
- package/skills/orient-execute/SKILL.md +0 -0
- package/skills/orient-integrate/SKILL.md +0 -0
- package/skills/orient-normalize/SKILL.md +0 -0
- package/skills/orient-orient/SKILL.md +0 -0
- package/skills/orient-plan/SKILL.md +0 -0
- package/skills/orient-research/SKILL.md +0 -0
- package/skills/orient-state/SKILL.md +0 -0
- package/skills/orient-tasks/SKILL.md +0 -0
- package/skills/orient-test/SKILL.md +0 -0
- package/skills/orient-verify/SKILL.md +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-loader.js","sourceRoot":"","sources":["../../src/core/resource-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO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BAC/D,CAAC,CAAC;gBACJ,CAAC;qBAAM,CAAC;oBACP,UAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;gBACpC,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO,SAAS,CAAC;IAAA,CACjB;CACD","sourcesContent":["import { existsSync, readdirSync, readFileSync, statSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { join, resolve, sep } from \"node:path\";\nimport chalk from \"chalk\";\nimport { CONFIG_DIR_NAME, getAgentDir } from \"../config.js\";\nimport { loadThemeFromPath, type Theme } from \"../modes/interactive/theme/theme.js\";\nimport type { ResourceDiagnostic } from \"./diagnostics.js\";\n\nexport type { ResourceCollision, ResourceDiagnostic } from \"./diagnostics.js\";\n\nimport { isLocalPath } from \"../utils/paths.js\";\nimport { createEventBus, type EventBus } from \"./event-bus.js\";\nimport { createExtensionRuntime, loadExtensionFromFactory, loadExtensions } from \"./extensions/loader.js\";\nimport type { Extension, ExtensionFactory, ExtensionRuntime, LoadExtensionsResult } from \"./extensions/types.js\";\nimport { DefaultPackageManager, type PathMetadata } from \"./package-manager.js\";\nimport type { PromptTemplate } from \"./prompt-templates.js\";\nimport { loadPromptTemplates } from \"./prompt-templates.js\";\nimport { SettingsManager } from \"./settings-manager.js\";\nimport type { Skill } from \"./skills.js\";\nimport { loadSkills } from \"./skills.js\";\nimport { createSourceInfo, type SourceInfo } from \"./source-info.js\";\n\nexport interface ResourceExtensionPaths {\n\tskillPaths?: Array<{ path: string; metadata: PathMetadata }>;\n\tpromptPaths?: Array<{ path: string; metadata: PathMetadata }>;\n\tthemePaths?: Array<{ path: string; metadata: PathMetadata }>;\n}\n\nexport interface ResourceLoader {\n\tgetExtensions(): LoadExtensionsResult;\n\tgetSkills(): { skills: Skill[]; diagnostics: ResourceDiagnostic[] };\n\tgetPrompts(): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] };\n\tgetThemes(): { themes: Theme[]; diagnostics: ResourceDiagnostic[] };\n\tgetAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> };\n\tgetSystemPrompt(): string | undefined;\n\tgetAppendSystemPrompt(): string[];\n\textendResources(paths: ResourceExtensionPaths): void;\n\treload(): Promise<void>;\n}\n\nfunction resolvePromptInput(input: string | undefined, description: string): string | undefined {\n\tif (!input) {\n\t\treturn undefined;\n\t}\n\n\tif (existsSync(input)) {\n\t\ttry {\n\t\t\treturn readFileSync(input, \"utf-8\");\n\t\t} catch (error) {\n\t\t\tconsole.error(chalk.yellow(`Warning: Could not read ${description} file ${input}: ${error}`));\n\t\t\treturn input;\n\t\t}\n\t}\n\n\treturn input;\n}\n\nfunction loadContextFileFromDir(dir: string): { path: string; content: string } | null {\n\tconst candidates = [\"AGENTS.md\", \"CLAUDE.md\"];\n\tfor (const filename of candidates) {\n\t\tconst filePath = join(dir, filename);\n\t\tif (existsSync(filePath)) {\n\t\t\ttry {\n\t\t\t\treturn {\n\t\t\t\t\tpath: filePath,\n\t\t\t\t\tcontent: readFileSync(filePath, \"utf-8\"),\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(chalk.yellow(`Warning: Could not read ${filePath}: ${error}`));\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n}\n\nfunction loadProjectContextFiles(\n\toptions: { cwd?: string; agentDir?: string } = {},\n): Array<{ path: string; content: string }> {\n\tconst resolvedCwd = options.cwd ?? process.cwd();\n\tconst resolvedAgentDir = options.agentDir ?? getAgentDir();\n\n\tconst contextFiles: Array<{ path: string; content: string }> = [];\n\tconst seenPaths = new Set<string>();\n\n\tconst globalContext = loadContextFileFromDir(resolvedAgentDir);\n\tif (globalContext) {\n\t\tcontextFiles.push(globalContext);\n\t\tseenPaths.add(globalContext.path);\n\t}\n\n\tconst ancestorContextFiles: Array<{ path: string; content: string }> = [];\n\n\tlet currentDir = resolvedCwd;\n\tconst root = resolve(\"/\");\n\n\twhile (true) {\n\t\tconst contextFile = loadContextFileFromDir(currentDir);\n\t\tif (contextFile && !seenPaths.has(contextFile.path)) {\n\t\t\tancestorContextFiles.unshift(contextFile);\n\t\t\tseenPaths.add(contextFile.path);\n\t\t}\n\n\t\tif (currentDir === root) break;\n\n\t\tconst parentDir = resolve(currentDir, \"..\");\n\t\tif (parentDir === currentDir) break;\n\t\tcurrentDir = parentDir;\n\t}\n\n\tcontextFiles.push(...ancestorContextFiles);\n\n\treturn contextFiles;\n}\n\nexport interface DefaultResourceLoaderOptions {\n\tcwd?: string;\n\tagentDir?: string;\n\tsettingsManager?: SettingsManager;\n\teventBus?: EventBus;\n\tadditionalExtensionPaths?: string[];\n\tadditionalSkillPaths?: string[];\n\tadditionalPromptTemplatePaths?: string[];\n\tadditionalThemePaths?: string[];\n\textensionFactories?: ExtensionFactory[];\n\tnoExtensions?: boolean;\n\tnoSkills?: boolean;\n\tnoPromptTemplates?: boolean;\n\tnoThemes?: boolean;\n\tsystemPrompt?: string;\n\tappendSystemPrompt?: string;\n\textensionsOverride?: (base: LoadExtensionsResult) => LoadExtensionsResult;\n\tskillsOverride?: (base: { skills: Skill[]; diagnostics: ResourceDiagnostic[] }) => {\n\t\tskills: Skill[];\n\t\tdiagnostics: ResourceDiagnostic[];\n\t};\n\tpromptsOverride?: (base: { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] }) => {\n\t\tprompts: PromptTemplate[];\n\t\tdiagnostics: ResourceDiagnostic[];\n\t};\n\tthemesOverride?: (base: { themes: Theme[]; diagnostics: ResourceDiagnostic[] }) => {\n\t\tthemes: Theme[];\n\t\tdiagnostics: ResourceDiagnostic[];\n\t};\n\tagentsFilesOverride?: (base: { agentsFiles: Array<{ path: string; content: string }> }) => {\n\t\tagentsFiles: Array<{ path: string; content: string }>;\n\t};\n\tsystemPromptOverride?: (base: string | undefined) => string | undefined;\n\tappendSystemPromptOverride?: (base: string[]) => string[];\n}\n\nexport class DefaultResourceLoader implements ResourceLoader {\n\tprivate cwd: string;\n\tprivate agentDir: string;\n\tprivate settingsManager: SettingsManager;\n\tprivate eventBus: EventBus;\n\tprivate packageManager: DefaultPackageManager;\n\tprivate additionalExtensionPaths: string[];\n\tprivate additionalSkillPaths: string[];\n\tprivate additionalPromptTemplatePaths: string[];\n\tprivate additionalThemePaths: string[];\n\tprivate extensionFactories: ExtensionFactory[];\n\tprivate noExtensions: boolean;\n\tprivate noSkills: boolean;\n\tprivate noPromptTemplates: boolean;\n\tprivate noThemes: boolean;\n\tprivate systemPromptSource?: string;\n\tprivate appendSystemPromptSource?: string;\n\tprivate extensionsOverride?: (base: LoadExtensionsResult) => LoadExtensionsResult;\n\tprivate skillsOverride?: (base: { skills: Skill[]; diagnostics: ResourceDiagnostic[] }) => {\n\t\tskills: Skill[];\n\t\tdiagnostics: ResourceDiagnostic[];\n\t};\n\tprivate promptsOverride?: (base: { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] }) => {\n\t\tprompts: PromptTemplate[];\n\t\tdiagnostics: ResourceDiagnostic[];\n\t};\n\tprivate themesOverride?: (base: { themes: Theme[]; diagnostics: ResourceDiagnostic[] }) => {\n\t\tthemes: Theme[];\n\t\tdiagnostics: ResourceDiagnostic[];\n\t};\n\tprivate agentsFilesOverride?: (base: { agentsFiles: Array<{ path: string; content: string }> }) => {\n\t\tagentsFiles: Array<{ path: string; content: string }>;\n\t};\n\tprivate systemPromptOverride?: (base: string | undefined) => string | undefined;\n\tprivate appendSystemPromptOverride?: (base: string[]) => string[];\n\n\tprivate extensionsResult: LoadExtensionsResult;\n\tprivate skills: Skill[];\n\tprivate skillDiagnostics: ResourceDiagnostic[];\n\tprivate prompts: PromptTemplate[];\n\tprivate promptDiagnostics: ResourceDiagnostic[];\n\tprivate themes: Theme[];\n\tprivate themeDiagnostics: ResourceDiagnostic[];\n\tprivate agentsFiles: Array<{ path: string; content: string }>;\n\tprivate systemPrompt?: string;\n\tprivate appendSystemPrompt: string[];\n\tprivate lastSkillPaths: string[];\n\tprivate extensionSkillSourceInfos: Map<string, SourceInfo>;\n\tprivate extensionPromptSourceInfos: Map<string, SourceInfo>;\n\tprivate extensionThemeSourceInfos: Map<string, SourceInfo>;\n\tprivate lastPromptPaths: string[];\n\tprivate lastThemePaths: string[];\n\n\tconstructor(options: DefaultResourceLoaderOptions) {\n\t\tthis.cwd = options.cwd ?? process.cwd();\n\t\tthis.agentDir = options.agentDir ?? getAgentDir();\n\t\tthis.settingsManager = options.settingsManager ?? SettingsManager.create(this.cwd, this.agentDir);\n\t\tthis.eventBus = options.eventBus ?? createEventBus();\n\t\tthis.packageManager = new DefaultPackageManager({\n\t\t\tcwd: this.cwd,\n\t\t\tagentDir: this.agentDir,\n\t\t\tsettingsManager: this.settingsManager,\n\t\t});\n\t\tthis.additionalExtensionPaths = options.additionalExtensionPaths ?? [];\n\t\tthis.additionalSkillPaths = options.additionalSkillPaths ?? [];\n\t\tthis.additionalPromptTemplatePaths = options.additionalPromptTemplatePaths ?? [];\n\t\tthis.additionalThemePaths = options.additionalThemePaths ?? [];\n\t\tthis.extensionFactories = options.extensionFactories ?? [];\n\t\tthis.noExtensions = options.noExtensions ?? false;\n\t\tthis.noSkills = options.noSkills ?? false;\n\t\tthis.noPromptTemplates = options.noPromptTemplates ?? false;\n\t\tthis.noThemes = options.noThemes ?? false;\n\t\tthis.systemPromptSource = options.systemPrompt;\n\t\tthis.appendSystemPromptSource = options.appendSystemPrompt;\n\t\tthis.extensionsOverride = options.extensionsOverride;\n\t\tthis.skillsOverride = options.skillsOverride;\n\t\tthis.promptsOverride = options.promptsOverride;\n\t\tthis.themesOverride = options.themesOverride;\n\t\tthis.agentsFilesOverride = options.agentsFilesOverride;\n\t\tthis.systemPromptOverride = options.systemPromptOverride;\n\t\tthis.appendSystemPromptOverride = options.appendSystemPromptOverride;\n\n\t\tthis.extensionsResult = { extensions: [], errors: [], runtime: createExtensionRuntime() };\n\t\tthis.skills = [];\n\t\tthis.skillDiagnostics = [];\n\t\tthis.prompts = [];\n\t\tthis.promptDiagnostics = [];\n\t\tthis.themes = [];\n\t\tthis.themeDiagnostics = [];\n\t\tthis.agentsFiles = [];\n\t\tthis.appendSystemPrompt = [];\n\t\tthis.lastSkillPaths = [];\n\t\tthis.extensionSkillSourceInfos = new Map();\n\t\tthis.extensionPromptSourceInfos = new Map();\n\t\tthis.extensionThemeSourceInfos = new Map();\n\t\tthis.lastPromptPaths = [];\n\t\tthis.lastThemePaths = [];\n\t}\n\n\tgetExtensions(): LoadExtensionsResult {\n\t\treturn this.extensionsResult;\n\t}\n\n\tgetSkills(): { skills: Skill[]; diagnostics: ResourceDiagnostic[] } {\n\t\treturn { skills: this.skills, diagnostics: this.skillDiagnostics };\n\t}\n\n\tgetPrompts(): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] } {\n\t\treturn { prompts: this.prompts, diagnostics: this.promptDiagnostics };\n\t}\n\n\tgetThemes(): { themes: Theme[]; diagnostics: ResourceDiagnostic[] } {\n\t\treturn { themes: this.themes, diagnostics: this.themeDiagnostics };\n\t}\n\n\tgetAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> } {\n\t\treturn { agentsFiles: this.agentsFiles };\n\t}\n\n\tgetSystemPrompt(): string | undefined {\n\t\treturn this.systemPrompt;\n\t}\n\n\tgetAppendSystemPrompt(): string[] {\n\t\treturn this.appendSystemPrompt;\n\t}\n\n\textendResources(paths: ResourceExtensionPaths): void {\n\t\tconst skillPaths = this.normalizeExtensionPaths(paths.skillPaths ?? []);\n\t\tconst promptPaths = this.normalizeExtensionPaths(paths.promptPaths ?? []);\n\t\tconst themePaths = this.normalizeExtensionPaths(paths.themePaths ?? []);\n\n\t\tfor (const entry of skillPaths) {\n\t\t\tthis.extensionSkillSourceInfos.set(entry.path, createSourceInfo(entry.path, entry.metadata));\n\t\t}\n\t\tfor (const entry of promptPaths) {\n\t\t\tthis.extensionPromptSourceInfos.set(entry.path, createSourceInfo(entry.path, entry.metadata));\n\t\t}\n\t\tfor (const entry of themePaths) {\n\t\t\tthis.extensionThemeSourceInfos.set(entry.path, createSourceInfo(entry.path, entry.metadata));\n\t\t}\n\n\t\tif (skillPaths.length > 0) {\n\t\t\tthis.lastSkillPaths = this.mergePaths(\n\t\t\t\tthis.lastSkillPaths,\n\t\t\t\tskillPaths.map((entry) => entry.path),\n\t\t\t);\n\t\t\tthis.updateSkillsFromPaths(this.lastSkillPaths);\n\t\t}\n\n\t\tif (promptPaths.length > 0) {\n\t\t\tthis.lastPromptPaths = this.mergePaths(\n\t\t\t\tthis.lastPromptPaths,\n\t\t\t\tpromptPaths.map((entry) => entry.path),\n\t\t\t);\n\t\t\tthis.updatePromptsFromPaths(this.lastPromptPaths);\n\t\t}\n\n\t\tif (themePaths.length > 0) {\n\t\t\tthis.lastThemePaths = this.mergePaths(\n\t\t\t\tthis.lastThemePaths,\n\t\t\t\tthemePaths.map((entry) => entry.path),\n\t\t\t);\n\t\t\tthis.updateThemesFromPaths(this.lastThemePaths);\n\t\t}\n\t}\n\n\tasync reload(): Promise<void> {\n\t\tawait this.settingsManager.reload();\n\t\tconst resolvedPaths = await this.packageManager.resolve();\n\t\tconst cliExtensionPaths = await this.packageManager.resolveExtensionSources(this.additionalExtensionPaths, {\n\t\t\ttemporary: true,\n\t\t});\n\t\tconst metadataByPath = new Map<string, PathMetadata>();\n\n\t\tthis.extensionSkillSourceInfos = new Map();\n\t\tthis.extensionPromptSourceInfos = new Map();\n\t\tthis.extensionThemeSourceInfos = new Map();\n\n\t\t// Helper to extract enabled paths and store metadata\n\t\tconst getEnabledResources = (\n\t\t\tresources: Array<{ path: string; enabled: boolean; metadata: PathMetadata }>,\n\t\t): Array<{ path: string; enabled: boolean; metadata: PathMetadata }> => {\n\t\t\tfor (const r of resources) {\n\t\t\t\tif (!metadataByPath.has(r.path)) {\n\t\t\t\t\tmetadataByPath.set(r.path, r.metadata);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn resources.filter((r) => r.enabled);\n\t\t};\n\n\t\tconst getEnabledPaths = (\n\t\t\tresources: Array<{ path: string; enabled: boolean; metadata: PathMetadata }>,\n\t\t): string[] => getEnabledResources(resources).map((r) => r.path);\n\t\tconst enabledExtensions = getEnabledPaths(resolvedPaths.extensions);\n\t\tconst enabledSkillResources = getEnabledResources(resolvedPaths.skills);\n\t\tconst enabledPrompts = getEnabledPaths(resolvedPaths.prompts);\n\t\tconst enabledThemes = getEnabledPaths(resolvedPaths.themes);\n\n\t\tconst mapSkillPath = (resource: { path: string; metadata: PathMetadata }): string => {\n\t\t\tif (resource.metadata.source !== \"auto\" && resource.metadata.origin !== \"package\") {\n\t\t\t\treturn resource.path;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst stats = statSync(resource.path);\n\t\t\t\tif (!stats.isDirectory()) {\n\t\t\t\t\treturn resource.path;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\treturn resource.path;\n\t\t\t}\n\t\t\tconst skillFile = join(resource.path, \"SKILL.md\");\n\t\t\tif (existsSync(skillFile)) {\n\t\t\t\tif (!metadataByPath.has(skillFile)) {\n\t\t\t\t\tmetadataByPath.set(skillFile, resource.metadata);\n\t\t\t\t}\n\t\t\t\treturn skillFile;\n\t\t\t}\n\t\t\treturn resource.path;\n\t\t};\n\n\t\tconst enabledSkills = enabledSkillResources.map(mapSkillPath);\n\n\t\t// Add CLI paths metadata\n\t\tfor (const r of cliExtensionPaths.extensions) {\n\t\t\tif (!metadataByPath.has(r.path)) {\n\t\t\t\tmetadataByPath.set(r.path, { source: \"cli\", scope: \"temporary\", origin: \"top-level\" });\n\t\t\t}\n\t\t}\n\t\tfor (const r of cliExtensionPaths.skills) {\n\t\t\tif (!metadataByPath.has(r.path)) {\n\t\t\t\tmetadataByPath.set(r.path, { source: \"cli\", scope: \"temporary\", origin: \"top-level\" });\n\t\t\t}\n\t\t}\n\n\t\tconst cliEnabledExtensions = getEnabledPaths(cliExtensionPaths.extensions);\n\t\tconst cliEnabledSkills = getEnabledPaths(cliExtensionPaths.skills);\n\t\tconst cliEnabledPrompts = getEnabledPaths(cliExtensionPaths.prompts);\n\t\tconst cliEnabledThemes = getEnabledPaths(cliExtensionPaths.themes);\n\n\t\tconst extensionPaths = this.noExtensions\n\t\t\t? cliEnabledExtensions\n\t\t\t: this.mergePaths(cliEnabledExtensions, enabledExtensions);\n\n\t\tconst extensionsResult = await loadExtensions(extensionPaths, this.cwd, this.eventBus);\n\t\tconst inlineExtensions = await this.loadExtensionFactories(extensionsResult.runtime);\n\t\textensionsResult.extensions.push(...inlineExtensions.extensions);\n\t\textensionsResult.errors.push(...inlineExtensions.errors);\n\n\t\t// Detect extension conflicts (tools, commands, flags with same names from different extensions)\n\t\t// Keep all extensions loaded. Conflicts are reported as diagnostics, and precedence is handled by load order.\n\t\tconst conflicts = this.detectExtensionConflicts(extensionsResult.extensions);\n\t\tfor (const conflict of conflicts) {\n\t\t\textensionsResult.errors.push({ path: conflict.path, error: conflict.message });\n\t\t}\n\n\t\tfor (const p of this.additionalExtensionPaths) {\n\t\t\tif (isLocalPath(p) && !existsSync(p)) {\n\t\t\t\textensionsResult.errors.push({ path: p, error: `Extension path does not exist: ${p}` });\n\t\t\t}\n\t\t}\n\t\tthis.extensionsResult = this.extensionsOverride ? this.extensionsOverride(extensionsResult) : extensionsResult;\n\t\tthis.applyExtensionSourceInfo(this.extensionsResult.extensions, metadataByPath);\n\n\t\tconst skillPaths = this.noSkills\n\t\t\t? this.mergePaths(cliEnabledSkills, this.additionalSkillPaths)\n\t\t\t: this.mergePaths([...cliEnabledSkills, ...enabledSkills], this.additionalSkillPaths);\n\n\t\tthis.lastSkillPaths = skillPaths;\n\t\tthis.updateSkillsFromPaths(skillPaths, metadataByPath);\n\t\tfor (const p of this.additionalSkillPaths) {\n\t\t\tif (isLocalPath(p) && !existsSync(p) && !this.skillDiagnostics.some((d) => d.path === p)) {\n\t\t\t\tthis.skillDiagnostics.push({ type: \"error\", message: \"Skill path does not exist\", path: p });\n\t\t\t}\n\t\t}\n\n\t\tconst promptPaths = this.noPromptTemplates\n\t\t\t? this.mergePaths(cliEnabledPrompts, this.additionalPromptTemplatePaths)\n\t\t\t: this.mergePaths([...cliEnabledPrompts, ...enabledPrompts], this.additionalPromptTemplatePaths);\n\n\t\tthis.lastPromptPaths = promptPaths;\n\t\tthis.updatePromptsFromPaths(promptPaths, metadataByPath);\n\t\tfor (const p of this.additionalPromptTemplatePaths) {\n\t\t\tif (isLocalPath(p) && !existsSync(p) && !this.promptDiagnostics.some((d) => d.path === p)) {\n\t\t\t\tthis.promptDiagnostics.push({ type: \"error\", message: \"Prompt template path does not exist\", path: p });\n\t\t\t}\n\t\t}\n\n\t\tconst themePaths = this.noThemes\n\t\t\t? this.mergePaths(cliEnabledThemes, this.additionalThemePaths)\n\t\t\t: this.mergePaths([...cliEnabledThemes, ...enabledThemes], this.additionalThemePaths);\n\n\t\tthis.lastThemePaths = themePaths;\n\t\tthis.updateThemesFromPaths(themePaths, metadataByPath);\n\t\tfor (const p of this.additionalThemePaths) {\n\t\t\tif (!existsSync(p) && !this.themeDiagnostics.some((d) => d.path === p)) {\n\t\t\t\tthis.themeDiagnostics.push({ type: \"error\", message: \"Theme path does not exist\", path: p });\n\t\t\t}\n\t\t}\n\n\t\tconst agentsFiles = { agentsFiles: loadProjectContextFiles({ cwd: this.cwd, agentDir: this.agentDir }) };\n\t\tconst resolvedAgentsFiles = this.agentsFilesOverride ? this.agentsFilesOverride(agentsFiles) : agentsFiles;\n\t\tthis.agentsFiles = resolvedAgentsFiles.agentsFiles;\n\n\t\tconst baseSystemPrompt = resolvePromptInput(\n\t\t\tthis.systemPromptSource ?? this.discoverSystemPromptFile(),\n\t\t\t\"system prompt\",\n\t\t);\n\t\tthis.systemPrompt = this.systemPromptOverride ? this.systemPromptOverride(baseSystemPrompt) : baseSystemPrompt;\n\n\t\tconst appendSource = this.appendSystemPromptSource ?? this.discoverAppendSystemPromptFile();\n\t\tconst resolvedAppend = resolvePromptInput(appendSource, \"append system prompt\");\n\t\tconst baseAppend = resolvedAppend ? [resolvedAppend] : [];\n\t\tthis.appendSystemPrompt = this.appendSystemPromptOverride\n\t\t\t? this.appendSystemPromptOverride(baseAppend)\n\t\t\t: baseAppend;\n\t}\n\n\tprivate normalizeExtensionPaths(\n\t\tentries: Array<{ path: string; metadata: PathMetadata }>,\n\t): Array<{ path: string; metadata: PathMetadata }> {\n\t\treturn entries.map((entry) => ({\n\t\t\tpath: this.resolveResourcePath(entry.path),\n\t\t\tmetadata: entry.metadata,\n\t\t}));\n\t}\n\n\tprivate updateSkillsFromPaths(skillPaths: string[], metadataByPath?: Map<string, PathMetadata>): void {\n\t\tlet skillsResult: { skills: Skill[]; diagnostics: ResourceDiagnostic[] };\n\t\tif (this.noSkills && skillPaths.length === 0) {\n\t\t\tskillsResult = { skills: [], diagnostics: [] };\n\t\t} else {\n\t\t\tskillsResult = loadSkills({\n\t\t\t\tcwd: this.cwd,\n\t\t\t\tagentDir: this.agentDir,\n\t\t\t\tskillPaths,\n\t\t\t\tincludeDefaults: false,\n\t\t\t});\n\t\t}\n\t\tconst resolvedSkills = this.skillsOverride ? this.skillsOverride(skillsResult) : skillsResult;\n\t\tthis.skills = resolvedSkills.skills.map((skill) => ({\n\t\t\t...skill,\n\t\t\tsourceInfo:\n\t\t\t\tthis.findSourceInfoForPath(skill.filePath, this.extensionSkillSourceInfos, metadataByPath) ??\n\t\t\t\tskill.sourceInfo ??\n\t\t\t\tthis.getDefaultSourceInfoForPath(skill.filePath),\n\t\t}));\n\t\tthis.skillDiagnostics = resolvedSkills.diagnostics;\n\t}\n\n\tprivate updatePromptsFromPaths(promptPaths: string[], metadataByPath?: Map<string, PathMetadata>): void {\n\t\tlet promptsResult: { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] };\n\t\tif (this.noPromptTemplates && promptPaths.length === 0) {\n\t\t\tpromptsResult = { prompts: [], diagnostics: [] };\n\t\t} else {\n\t\t\tconst allPrompts = loadPromptTemplates({\n\t\t\t\tcwd: this.cwd,\n\t\t\t\tagentDir: this.agentDir,\n\t\t\t\tpromptPaths,\n\t\t\t\tincludeDefaults: false,\n\t\t\t});\n\t\t\tpromptsResult = this.dedupePrompts(allPrompts);\n\t\t}\n\t\tconst resolvedPrompts = this.promptsOverride ? this.promptsOverride(promptsResult) : promptsResult;\n\t\tthis.prompts = resolvedPrompts.prompts.map((prompt) => ({\n\t\t\t...prompt,\n\t\t\tsourceInfo:\n\t\t\t\tthis.findSourceInfoForPath(prompt.filePath, this.extensionPromptSourceInfos, metadataByPath) ??\n\t\t\t\tprompt.sourceInfo ??\n\t\t\t\tthis.getDefaultSourceInfoForPath(prompt.filePath),\n\t\t}));\n\t\tthis.promptDiagnostics = resolvedPrompts.diagnostics;\n\t}\n\n\tprivate updateThemesFromPaths(themePaths: string[], metadataByPath?: Map<string, PathMetadata>): void {\n\t\tlet themesResult: { themes: Theme[]; diagnostics: ResourceDiagnostic[] };\n\t\tif (this.noThemes && themePaths.length === 0) {\n\t\t\tthemesResult = { themes: [], diagnostics: [] };\n\t\t} else {\n\t\t\tconst loaded = this.loadThemes(themePaths, false);\n\t\t\tconst deduped = this.dedupeThemes(loaded.themes);\n\t\t\tthemesResult = { themes: deduped.themes, diagnostics: [...loaded.diagnostics, ...deduped.diagnostics] };\n\t\t}\n\t\tconst resolvedThemes = this.themesOverride ? this.themesOverride(themesResult) : themesResult;\n\t\tthis.themes = resolvedThemes.themes.map((theme) => {\n\t\t\tconst sourcePath = theme.sourcePath;\n\t\t\ttheme.sourceInfo = sourcePath\n\t\t\t\t? (this.findSourceInfoForPath(sourcePath, this.extensionThemeSourceInfos, metadataByPath) ??\n\t\t\t\t\ttheme.sourceInfo ??\n\t\t\t\t\tthis.getDefaultSourceInfoForPath(sourcePath))\n\t\t\t\t: theme.sourceInfo;\n\t\t\treturn theme;\n\t\t});\n\t\tthis.themeDiagnostics = resolvedThemes.diagnostics;\n\t}\n\n\tprivate applyExtensionSourceInfo(extensions: Extension[], metadataByPath: Map<string, PathMetadata>): void {\n\t\tfor (const extension of extensions) {\n\t\t\textension.sourceInfo =\n\t\t\t\tthis.findSourceInfoForPath(extension.path, undefined, metadataByPath) ??\n\t\t\t\tthis.getDefaultSourceInfoForPath(extension.path);\n\t\t\tfor (const command of extension.commands.values()) {\n\t\t\t\tcommand.sourceInfo = extension.sourceInfo;\n\t\t\t}\n\t\t\tfor (const tool of extension.tools.values()) {\n\t\t\t\ttool.sourceInfo = extension.sourceInfo;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate findSourceInfoForPath(\n\t\tresourcePath: string,\n\t\textraSourceInfos?: Map<string, SourceInfo>,\n\t\tmetadataByPath?: Map<string, PathMetadata>,\n\t): SourceInfo | undefined {\n\t\tif (!resourcePath) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (resourcePath.startsWith(\"<\")) {\n\t\t\treturn this.getDefaultSourceInfoForPath(resourcePath);\n\t\t}\n\n\t\tconst normalizedResourcePath = resolve(resourcePath);\n\t\tif (extraSourceInfos) {\n\t\t\tfor (const [sourcePath, sourceInfo] of extraSourceInfos.entries()) {\n\t\t\t\tconst normalizedSourcePath = resolve(sourcePath);\n\t\t\t\tif (\n\t\t\t\t\tnormalizedResourcePath === normalizedSourcePath ||\n\t\t\t\t\tnormalizedResourcePath.startsWith(`${normalizedSourcePath}${sep}`)\n\t\t\t\t) {\n\t\t\t\t\treturn { ...sourceInfo, path: resourcePath };\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (metadataByPath) {\n\t\t\tconst exact = metadataByPath.get(normalizedResourcePath) ?? metadataByPath.get(resourcePath);\n\t\t\tif (exact) {\n\t\t\t\treturn createSourceInfo(resourcePath, exact);\n\t\t\t}\n\n\t\t\tfor (const [sourcePath, metadata] of metadataByPath.entries()) {\n\t\t\t\tconst normalizedSourcePath = resolve(sourcePath);\n\t\t\t\tif (\n\t\t\t\t\tnormalizedResourcePath === normalizedSourcePath ||\n\t\t\t\t\tnormalizedResourcePath.startsWith(`${normalizedSourcePath}${sep}`)\n\t\t\t\t) {\n\t\t\t\t\treturn createSourceInfo(resourcePath, metadata);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate getDefaultSourceInfoForPath(filePath: string): SourceInfo {\n\t\tif (filePath.startsWith(\"<\") && filePath.endsWith(\">\")) {\n\t\t\treturn {\n\t\t\t\tpath: filePath,\n\t\t\t\tsource: filePath.slice(1, -1).split(\":\")[0] || \"temporary\",\n\t\t\t\tscope: \"temporary\",\n\t\t\t\torigin: \"top-level\",\n\t\t\t};\n\t\t}\n\n\t\tconst normalizedPath = resolve(filePath);\n\t\tconst agentRoots = [\n\t\t\tjoin(this.agentDir, \"skills\"),\n\t\t\tjoin(this.agentDir, \"prompts\"),\n\t\t\tjoin(this.agentDir, \"themes\"),\n\t\t\tjoin(this.agentDir, \"extensions\"),\n\t\t];\n\t\tconst projectRoots = [\n\t\t\tjoin(this.cwd, CONFIG_DIR_NAME, \"skills\"),\n\t\t\tjoin(this.cwd, CONFIG_DIR_NAME, \"prompts\"),\n\t\t\tjoin(this.cwd, CONFIG_DIR_NAME, \"themes\"),\n\t\t\tjoin(this.cwd, CONFIG_DIR_NAME, \"extensions\"),\n\t\t];\n\n\t\tfor (const root of agentRoots) {\n\t\t\tif (this.isUnderPath(normalizedPath, root)) {\n\t\t\t\treturn { path: filePath, source: \"local\", scope: \"user\", origin: \"top-level\", baseDir: root };\n\t\t\t}\n\t\t}\n\n\t\tfor (const root of projectRoots) {\n\t\t\tif (this.isUnderPath(normalizedPath, root)) {\n\t\t\t\treturn { path: filePath, source: \"local\", scope: \"project\", origin: \"top-level\", baseDir: root };\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tpath: filePath,\n\t\t\tsource: \"local\",\n\t\t\tscope: \"temporary\",\n\t\t\torigin: \"top-level\",\n\t\t\tbaseDir: statSync(normalizedPath).isDirectory() ? normalizedPath : resolve(normalizedPath, \"..\"),\n\t\t};\n\t}\n\n\tprivate mergePaths(primary: string[], additional: string[]): string[] {\n\t\tconst merged: string[] = [];\n\t\tconst seen = new Set<string>();\n\n\t\tfor (const p of [...primary, ...additional]) {\n\t\t\tconst resolved = this.resolveResourcePath(p);\n\t\t\tif (seen.has(resolved)) continue;\n\t\t\tseen.add(resolved);\n\t\t\tmerged.push(resolved);\n\t\t}\n\n\t\treturn merged;\n\t}\n\n\tprivate resolveResourcePath(p: string): string {\n\t\tconst trimmed = p.trim();\n\t\tlet expanded = trimmed;\n\t\tif (trimmed === \"~\") {\n\t\t\texpanded = homedir();\n\t\t} else if (trimmed.startsWith(\"~/\")) {\n\t\t\texpanded = join(homedir(), trimmed.slice(2));\n\t\t} else if (trimmed.startsWith(\"~\")) {\n\t\t\texpanded = join(homedir(), trimmed.slice(1));\n\t\t}\n\t\treturn resolve(this.cwd, expanded);\n\t}\n\n\tprivate loadThemes(\n\t\tpaths: string[],\n\t\tincludeDefaults: boolean = true,\n\t): {\n\t\tthemes: Theme[];\n\t\tdiagnostics: ResourceDiagnostic[];\n\t} {\n\t\tconst themes: Theme[] = [];\n\t\tconst diagnostics: ResourceDiagnostic[] = [];\n\t\tif (includeDefaults) {\n\t\t\tconst defaultDirs = [join(this.agentDir, \"themes\"), join(this.cwd, CONFIG_DIR_NAME, \"themes\")];\n\n\t\t\tfor (const dir of defaultDirs) {\n\t\t\t\tthis.loadThemesFromDir(dir, themes, diagnostics);\n\t\t\t}\n\t\t}\n\n\t\tfor (const p of paths) {\n\t\t\tconst resolved = resolve(this.cwd, p);\n\t\t\tif (!existsSync(resolved)) {\n\t\t\t\tdiagnostics.push({ type: \"warning\", message: \"theme path does not exist\", path: resolved });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst stats = statSync(resolved);\n\t\t\t\tif (stats.isDirectory()) {\n\t\t\t\t\tthis.loadThemesFromDir(resolved, themes, diagnostics);\n\t\t\t\t} else if (stats.isFile() && resolved.endsWith(\".json\")) {\n\t\t\t\t\tthis.loadThemeFromFile(resolved, themes, diagnostics);\n\t\t\t\t} else {\n\t\t\t\t\tdiagnostics.push({ type: \"warning\", message: \"theme path is not a json file\", path: resolved });\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconst message = error instanceof Error ? error.message : \"failed to read theme path\";\n\t\t\t\tdiagnostics.push({ type: \"warning\", message, path: resolved });\n\t\t\t}\n\t\t}\n\n\t\treturn { themes, diagnostics };\n\t}\n\n\tprivate loadThemesFromDir(dir: string, themes: Theme[], diagnostics: ResourceDiagnostic[]): void {\n\t\tif (!existsSync(dir)) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst entries = readdirSync(dir, { withFileTypes: true });\n\t\t\tfor (const entry of entries) {\n\t\t\t\tlet isFile = entry.isFile();\n\t\t\t\tif (entry.isSymbolicLink()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tisFile = statSync(join(dir, entry.name)).isFile();\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isFile) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!entry.name.endsWith(\".json\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthis.loadThemeFromFile(join(dir, entry.name), themes, diagnostics);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : \"failed to read theme directory\";\n\t\t\tdiagnostics.push({ type: \"warning\", message, path: dir });\n\t\t}\n\t}\n\n\tprivate loadThemeFromFile(filePath: string, themes: Theme[], diagnostics: ResourceDiagnostic[]): void {\n\t\ttry {\n\t\t\tthemes.push(loadThemeFromPath(filePath));\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : \"failed to load theme\";\n\t\t\tdiagnostics.push({ type: \"warning\", message, path: filePath });\n\t\t}\n\t}\n\n\tprivate async loadExtensionFactories(runtime: ExtensionRuntime): Promise<{\n\t\textensions: Extension[];\n\t\terrors: Array<{ path: string; error: string }>;\n\t}> {\n\t\tconst extensions: Extension[] = [];\n\t\tconst errors: Array<{ path: string; error: string }> = [];\n\n\t\tfor (const [index, factory] of this.extensionFactories.entries()) {\n\t\t\tconst extensionPath = `<inline:${index + 1}>`;\n\t\t\ttry {\n\t\t\t\tconst extension = await loadExtensionFromFactory(factory, this.cwd, this.eventBus, runtime, extensionPath);\n\t\t\t\textensions.push(extension);\n\t\t\t} catch (error) {\n\t\t\t\tconst message = error instanceof Error ? error.message : \"failed to load extension\";\n\t\t\t\terrors.push({ path: extensionPath, error: message });\n\t\t\t}\n\t\t}\n\n\t\treturn { extensions, errors };\n\t}\n\n\tprivate dedupePrompts(prompts: PromptTemplate[]): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] } {\n\t\tconst seen = new Map<string, PromptTemplate>();\n\t\tconst diagnostics: ResourceDiagnostic[] = [];\n\n\t\tfor (const prompt of prompts) {\n\t\t\tconst existing = seen.get(prompt.name);\n\t\t\tif (existing) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\ttype: \"collision\",\n\t\t\t\t\tmessage: `name \"/${prompt.name}\" collision`,\n\t\t\t\t\tpath: prompt.filePath,\n\t\t\t\t\tcollision: {\n\t\t\t\t\t\tresourceType: \"prompt\",\n\t\t\t\t\t\tname: prompt.name,\n\t\t\t\t\t\twinnerPath: existing.filePath,\n\t\t\t\t\t\tloserPath: prompt.filePath,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tseen.set(prompt.name, prompt);\n\t\t\t}\n\t\t}\n\n\t\treturn { prompts: Array.from(seen.values()), diagnostics };\n\t}\n\n\tprivate dedupeThemes(themes: Theme[]): { themes: Theme[]; diagnostics: ResourceDiagnostic[] } {\n\t\tconst seen = new Map<string, Theme>();\n\t\tconst diagnostics: ResourceDiagnostic[] = [];\n\n\t\tfor (const t of themes) {\n\t\t\tconst name = t.name ?? \"unnamed\";\n\t\t\tconst existing = seen.get(name);\n\t\t\tif (existing) {\n\t\t\t\tdiagnostics.push({\n\t\t\t\t\ttype: \"collision\",\n\t\t\t\t\tmessage: `name \"${name}\" collision`,\n\t\t\t\t\tpath: t.sourcePath,\n\t\t\t\t\tcollision: {\n\t\t\t\t\t\tresourceType: \"theme\",\n\t\t\t\t\t\tname,\n\t\t\t\t\t\twinnerPath: existing.sourcePath ?? \"<builtin>\",\n\t\t\t\t\t\tloserPath: t.sourcePath ?? \"<builtin>\",\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tseen.set(name, t);\n\t\t\t}\n\t\t}\n\n\t\treturn { themes: Array.from(seen.values()), diagnostics };\n\t}\n\n\tprivate discoverSystemPromptFile(): string | undefined {\n\t\tconst projectPath = join(this.cwd, CONFIG_DIR_NAME, \"SYSTEM.md\");\n\t\tif (existsSync(projectPath)) {\n\t\t\treturn projectPath;\n\t\t}\n\n\t\tconst globalPath = join(this.agentDir, \"SYSTEM.md\");\n\t\tif (existsSync(globalPath)) {\n\t\t\treturn globalPath;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate discoverAppendSystemPromptFile(): string | undefined {\n\t\tconst projectPath = join(this.cwd, CONFIG_DIR_NAME, \"APPEND_SYSTEM.md\");\n\t\tif (existsSync(projectPath)) {\n\t\t\treturn projectPath;\n\t\t}\n\n\t\tconst globalPath = join(this.agentDir, \"APPEND_SYSTEM.md\");\n\t\tif (existsSync(globalPath)) {\n\t\t\treturn globalPath;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate isUnderPath(target: string, root: string): boolean {\n\t\tconst normalizedRoot = resolve(root);\n\t\tif (target === normalizedRoot) {\n\t\t\treturn true;\n\t\t}\n\t\tconst prefix = normalizedRoot.endsWith(sep) ? normalizedRoot : `${normalizedRoot}${sep}`;\n\t\treturn target.startsWith(prefix);\n\t}\n\n\tprivate detectExtensionConflicts(extensions: Extension[]): Array<{ path: string; message: string }> {\n\t\tconst conflicts: Array<{ path: string; message: string }> = [];\n\n\t\t// Track which extension registered each tool and flag\n\t\tconst toolOwners = new Map<string, string>();\n\t\tconst flagOwners = new Map<string, string>();\n\n\t\tfor (const ext of extensions) {\n\t\t\t// Check tools\n\t\t\tfor (const toolName of ext.tools.keys()) {\n\t\t\t\tconst existingOwner = toolOwners.get(toolName);\n\t\t\t\tif (existingOwner && existingOwner !== ext.path) {\n\t\t\t\t\tconflicts.push({\n\t\t\t\t\t\tpath: ext.path,\n\t\t\t\t\t\tmessage: `Tool \"${toolName}\" conflicts with ${existingOwner}`,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\ttoolOwners.set(toolName, ext.path);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check flags\n\t\t\tfor (const flagName of ext.flags.keys()) {\n\t\t\t\tconst existingOwner = flagOwners.get(flagName);\n\t\t\t\tif (existingOwner && existingOwner !== ext.path) {\n\t\t\t\t\tconflicts.push({\n\t\t\t\t\t\tpath: ext.path,\n\t\t\t\t\t\tmessage: `Flag \"--${flagName}\" conflicts with ${existingOwner}`,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tflagOwners.set(flagName, ext.path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn conflicts;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type ThinkingLevel } from "@orient-cli/agent-core";
|
|
2
|
+
import { type Model } from "@orient-cli/ai";
|
|
3
|
+
import { AgentSession } from "./agent-session.js";
|
|
4
|
+
import { AuthStorage } from "./auth-storage.js";
|
|
5
|
+
import type { LoadExtensionsResult, SessionStartEvent, ToolDefinition } from "./extensions/index.js";
|
|
6
|
+
import { ModelRegistry } from "./model-registry.js";
|
|
7
|
+
import type { ResourceLoader } from "./resource-loader.js";
|
|
8
|
+
import { SessionManager } from "./session-manager.js";
|
|
9
|
+
import { SettingsManager } from "./settings-manager.js";
|
|
10
|
+
import { allTools, bashTool, codingTools, createBashTool, createCodingTools, createEditTool, createFindTool, createGrepTool, createLsTool, createReadOnlyTools, createReadTool, createWriteTool, editTool, findTool, grepTool, lsTool, readOnlyTools, readTool, type Tool, withFileMutationQueue, writeTool } from "./tools/index.js";
|
|
11
|
+
export interface CreateAgentSessionOptions {
|
|
12
|
+
/** Working directory for project-local discovery. Default: process.cwd() */
|
|
13
|
+
cwd?: string;
|
|
14
|
+
/** Global config directory. Default: ~/.pi/agent */
|
|
15
|
+
agentDir?: string;
|
|
16
|
+
/** Auth storage for credentials. Default: AuthStorage.create(agentDir/auth.json) */
|
|
17
|
+
authStorage?: AuthStorage;
|
|
18
|
+
/** Model registry. Default: ModelRegistry.create(authStorage, agentDir/models.json) */
|
|
19
|
+
modelRegistry?: ModelRegistry;
|
|
20
|
+
/** Model to use. Default: from settings, else first available */
|
|
21
|
+
model?: Model<any>;
|
|
22
|
+
/** Thinking level. Default: from settings, else 'medium' (clamped to model capabilities) */
|
|
23
|
+
thinkingLevel?: ThinkingLevel;
|
|
24
|
+
/** Models available for cycling (Ctrl+P in interactive mode) */
|
|
25
|
+
scopedModels?: Array<{
|
|
26
|
+
model: Model<any>;
|
|
27
|
+
thinkingLevel?: ThinkingLevel;
|
|
28
|
+
}>;
|
|
29
|
+
/** Built-in tools to use. Default: codingTools [read, bash, edit, write] */
|
|
30
|
+
tools?: Tool[];
|
|
31
|
+
/** Custom tools to register (in addition to built-in tools). */
|
|
32
|
+
customTools?: ToolDefinition[];
|
|
33
|
+
/** Resource loader. When omitted, DefaultResourceLoader is used. */
|
|
34
|
+
resourceLoader?: ResourceLoader;
|
|
35
|
+
/** Session manager. Default: SessionManager.create(cwd) */
|
|
36
|
+
sessionManager?: SessionManager;
|
|
37
|
+
/** Settings manager. Default: SettingsManager.create(cwd, agentDir) */
|
|
38
|
+
settingsManager?: SettingsManager;
|
|
39
|
+
/** Session start event metadata for extension runtime startup. */
|
|
40
|
+
sessionStartEvent?: SessionStartEvent;
|
|
41
|
+
}
|
|
42
|
+
/** Result from createAgentSession */
|
|
43
|
+
export interface CreateAgentSessionResult {
|
|
44
|
+
/** The created session */
|
|
45
|
+
session: AgentSession;
|
|
46
|
+
/** Extensions result (for UI context setup in interactive mode) */
|
|
47
|
+
extensionsResult: LoadExtensionsResult;
|
|
48
|
+
/** Warning if session was restored with a different model than saved */
|
|
49
|
+
modelFallbackMessage?: string;
|
|
50
|
+
}
|
|
51
|
+
export * from "./agent-session-runtime.js";
|
|
52
|
+
export type { ExtensionAPI, ExtensionCommandContext, ExtensionContext, ExtensionFactory, SlashCommandInfo, SlashCommandSource, ToolDefinition, } from "./extensions/index.js";
|
|
53
|
+
export type { PromptTemplate } from "./prompt-templates.js";
|
|
54
|
+
export type { Skill } from "./skills.js";
|
|
55
|
+
export type { Tool } from "./tools/index.js";
|
|
56
|
+
export { readTool, bashTool, editTool, writeTool, grepTool, findTool, lsTool, codingTools, readOnlyTools, allTools as allBuiltInTools, withFileMutationQueue, createCodingTools, createReadOnlyTools, createReadTool, createBashTool, createEditTool, createWriteTool, createGrepTool, createFindTool, createLsTool, };
|
|
57
|
+
/**
|
|
58
|
+
* Create an AgentSession with the specified options.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* // Minimal - uses defaults
|
|
63
|
+
* const { session } = await createAgentSession();
|
|
64
|
+
*
|
|
65
|
+
* // With explicit model
|
|
66
|
+
* import { getModel } from '@orient-cli/ai';
|
|
67
|
+
* const { session } = await createAgentSession({
|
|
68
|
+
* model: getModel('anthropic', 'claude-opus-4-5'),
|
|
69
|
+
* thinkingLevel: 'high',
|
|
70
|
+
* });
|
|
71
|
+
*
|
|
72
|
+
* // Continue previous session
|
|
73
|
+
* const { session, modelFallbackMessage } = await createAgentSession({
|
|
74
|
+
* continueSession: true,
|
|
75
|
+
* });
|
|
76
|
+
*
|
|
77
|
+
* // Full control
|
|
78
|
+
* const loader = new DefaultResourceLoader({
|
|
79
|
+
* cwd: process.cwd(),
|
|
80
|
+
* agentDir: getAgentDir(),
|
|
81
|
+
* settingsManager: SettingsManager.create(),
|
|
82
|
+
* });
|
|
83
|
+
* await loader.reload();
|
|
84
|
+
* const { session } = await createAgentSession({
|
|
85
|
+
* model: myModel,
|
|
86
|
+
* tools: [readTool, bashTool],
|
|
87
|
+
* resourceLoader: loader,
|
|
88
|
+
* sessionManager: SessionManager.inMemory(),
|
|
89
|
+
* });
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export declare function createAgentSession(options?: CreateAgentSessionOptions): Promise<CreateAgentSessionResult>;
|
|
93
|
+
//# sourceMappingURL=sdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/core/sdk.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAgB,KAAK,KAAK,EAAgB,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAmB,oBAAoB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAwB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EACN,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,QAAQ,EACR,KAAK,IAAI,EAET,qBAAqB,EACrB,SAAS,EACT,MAAM,kBAAk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,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAEN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,WAAW,EACX,aAAa,EACb,QAAQ,IAAI,eAAe,EAC3B,qBAAqB,EAErB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,GACZ,CAAC;AAQF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,GAAE,yBAA8B,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAmMnH","sourcesContent":["import { join } from \"node:path\";\nimport { Agent, type AgentMessage, type ThinkingLevel } from \"@orient-cli/agent-core\";\nimport { type Message, type Model, streamSimple } from \"@orient-cli/ai\";\nimport { getAgentDir, getDocsPath } from \"../config.js\";\nimport { AgentSession } from \"./agent-session.js\";\nimport { AuthStorage } from \"./auth-storage.js\";\nimport { DEFAULT_THINKING_LEVEL } from \"./defaults.js\";\nimport type { ExtensionRunner, LoadExtensionsResult, SessionStartEvent, ToolDefinition } from \"./extensions/index.js\";\nimport { convertToLlm } from \"./messages.js\";\nimport { ModelRegistry } from \"./model-registry.js\";\nimport { findInitialModel } from \"./model-resolver.js\";\nimport type { ResourceLoader } from \"./resource-loader.js\";\nimport { DefaultResourceLoader } from \"./resource-loader.js\";\nimport { getDefaultSessionDir, SessionManager } from \"./session-manager.js\";\nimport { SettingsManager } from \"./settings-manager.js\";\nimport { time } from \"./timings.js\";\nimport {\n\tallTools,\n\tbashTool,\n\tcodingTools,\n\tcreateBashTool,\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\teditTool,\n\tfindTool,\n\tgrepTool,\n\tlsTool,\n\treadOnlyTools,\n\treadTool,\n\ttype Tool,\n\ttype ToolName,\n\twithFileMutationQueue,\n\twriteTool,\n} from \"./tools/index.js\";\n\nexport interface CreateAgentSessionOptions {\n\t/** Working directory for project-local discovery. Default: process.cwd() */\n\tcwd?: string;\n\t/** Global config directory. Default: ~/.pi/agent */\n\tagentDir?: string;\n\n\t/** Auth storage for credentials. Default: AuthStorage.create(agentDir/auth.json) */\n\tauthStorage?: AuthStorage;\n\t/** Model registry. Default: ModelRegistry.create(authStorage, agentDir/models.json) */\n\tmodelRegistry?: ModelRegistry;\n\n\t/** Model to use. Default: from settings, else first available */\n\tmodel?: Model<any>;\n\t/** Thinking level. Default: from settings, else 'medium' (clamped to model capabilities) */\n\tthinkingLevel?: ThinkingLevel;\n\t/** Models available for cycling (Ctrl+P in interactive mode) */\n\tscopedModels?: Array<{ model: Model<any>; thinkingLevel?: ThinkingLevel }>;\n\n\t/** Built-in tools to use. Default: codingTools [read, bash, edit, write] */\n\ttools?: Tool[];\n\t/** Custom tools to register (in addition to built-in tools). */\n\tcustomTools?: ToolDefinition[];\n\n\t/** Resource loader. When omitted, DefaultResourceLoader is used. */\n\tresourceLoader?: ResourceLoader;\n\n\t/** Session manager. Default: SessionManager.create(cwd) */\n\tsessionManager?: SessionManager;\n\n\t/** Settings manager. Default: SettingsManager.create(cwd, agentDir) */\n\tsettingsManager?: SettingsManager;\n\t/** Session start event metadata for extension runtime startup. */\n\tsessionStartEvent?: SessionStartEvent;\n}\n\n/** Result from createAgentSession */\nexport interface CreateAgentSessionResult {\n\t/** The created session */\n\tsession: AgentSession;\n\t/** Extensions result (for UI context setup in interactive mode) */\n\textensionsResult: LoadExtensionsResult;\n\t/** Warning if session was restored with a different model than saved */\n\tmodelFallbackMessage?: string;\n}\n\n// Re-exports\n\nexport * from \"./agent-session-runtime.js\";\nexport type {\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionContext,\n\tExtensionFactory,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tToolDefinition,\n} from \"./extensions/index.js\";\nexport type { PromptTemplate } from \"./prompt-templates.js\";\nexport type { Skill } from \"./skills.js\";\nexport type { Tool } from \"./tools/index.js\";\n\nexport {\n\t// Pre-built tools (use process.cwd())\n\treadTool,\n\tbashTool,\n\teditTool,\n\twriteTool,\n\tgrepTool,\n\tfindTool,\n\tlsTool,\n\tcodingTools,\n\treadOnlyTools,\n\tallTools as allBuiltInTools,\n\twithFileMutationQueue,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateBashTool,\n\tcreateEditTool,\n\tcreateWriteTool,\n\tcreateGrepTool,\n\tcreateFindTool,\n\tcreateLsTool,\n};\n\n// Helper Functions\n\nfunction getDefaultAgentDir(): string {\n\treturn getAgentDir();\n}\n\n/**\n * Create an AgentSession with the specified options.\n *\n * @example\n * ```typescript\n * // Minimal - uses defaults\n * const { session } = await createAgentSession();\n *\n * // With explicit model\n * import { getModel } from '@orient-cli/ai';\n * const { session } = await createAgentSession({\n * model: getModel('anthropic', 'claude-opus-4-5'),\n * thinkingLevel: 'high',\n * });\n *\n * // Continue previous session\n * const { session, modelFallbackMessage } = await createAgentSession({\n * continueSession: true,\n * });\n *\n * // Full control\n * const loader = new DefaultResourceLoader({\n * cwd: process.cwd(),\n * agentDir: getAgentDir(),\n * settingsManager: SettingsManager.create(),\n * });\n * await loader.reload();\n * const { session } = await createAgentSession({\n * model: myModel,\n * tools: [readTool, bashTool],\n * resourceLoader: loader,\n * sessionManager: SessionManager.inMemory(),\n * });\n * ```\n */\nexport async function createAgentSession(options: CreateAgentSessionOptions = {}): Promise<CreateAgentSessionResult> {\n\tconst cwd = options.cwd ?? process.cwd();\n\tconst agentDir = options.agentDir ?? getDefaultAgentDir();\n\tlet resourceLoader = options.resourceLoader;\n\n\t// Use provided or create AuthStorage and ModelRegistry\n\tconst authPath = options.agentDir ? join(agentDir, \"auth.json\") : undefined;\n\tconst modelsPath = options.agentDir ? join(agentDir, \"models.json\") : undefined;\n\tconst authStorage = options.authStorage ?? AuthStorage.create(authPath);\n\tconst modelRegistry = options.modelRegistry ?? ModelRegistry.create(authStorage, modelsPath);\n\n\tconst settingsManager = options.settingsManager ?? SettingsManager.create(cwd, agentDir);\n\tconst sessionManager = options.sessionManager ?? SessionManager.create(cwd, getDefaultSessionDir(cwd, agentDir));\n\n\tif (!resourceLoader) {\n\t\tresourceLoader = new DefaultResourceLoader({ cwd, agentDir, settingsManager });\n\t\tawait resourceLoader.reload();\n\t\ttime(\"resourceLoader.reload\");\n\t}\n\n\t// Check if session has existing data to restore\n\tconst existingSession = sessionManager.buildSessionContext();\n\tconst hasExistingSession = existingSession.messages.length > 0;\n\tconst hasThinkingEntry = sessionManager.getBranch().some((entry) => entry.type === \"thinking_level_change\");\n\n\tlet model = options.model;\n\tlet modelFallbackMessage: string | undefined;\n\n\t// If session has data, try to restore model from it\n\tif (!model && hasExistingSession && existingSession.model) {\n\t\tconst restoredModel = modelRegistry.find(existingSession.model.provider, existingSession.model.modelId);\n\t\tif (restoredModel && modelRegistry.hasConfiguredAuth(restoredModel)) {\n\t\t\tmodel = restoredModel;\n\t\t}\n\t\tif (!model) {\n\t\t\tmodelFallbackMessage = `Could not restore model ${existingSession.model.provider}/${existingSession.model.modelId}`;\n\t\t}\n\t}\n\n\t// If still no model, use findInitialModel (checks settings default, then provider defaults)\n\tif (!model) {\n\t\tconst result = await findInitialModel({\n\t\t\tscopedModels: [],\n\t\t\tisContinuing: hasExistingSession,\n\t\t\tdefaultProvider: settingsManager.getDefaultProvider(),\n\t\t\tdefaultModelId: settingsManager.getDefaultModel(),\n\t\t\tdefaultThinkingLevel: settingsManager.getDefaultThinkingLevel(),\n\t\t\tmodelRegistry,\n\t\t});\n\t\tmodel = result.model;\n\t\tif (!model) {\n\t\t\tmodelFallbackMessage = `No models available. Use /login or set an API key environment variable. See ${join(getDocsPath(), \"providers.md\")}. Then use /model to select a model.`;\n\t\t} else if (modelFallbackMessage) {\n\t\t\tmodelFallbackMessage += `. Using ${model.provider}/${model.id}`;\n\t\t}\n\t}\n\n\tlet thinkingLevel = options.thinkingLevel;\n\n\t// If session has data, restore thinking level from it\n\tif (thinkingLevel === undefined && hasExistingSession) {\n\t\tthinkingLevel = hasThinkingEntry\n\t\t\t? (existingSession.thinkingLevel as ThinkingLevel)\n\t\t\t: (settingsManager.getDefaultThinkingLevel() ?? DEFAULT_THINKING_LEVEL);\n\t}\n\n\t// Fall back to settings default\n\tif (thinkingLevel === undefined) {\n\t\tthinkingLevel = settingsManager.getDefaultThinkingLevel() ?? DEFAULT_THINKING_LEVEL;\n\t}\n\n\t// Clamp to model capabilities\n\tif (!model || !model.reasoning) {\n\t\tthinkingLevel = \"off\";\n\t}\n\n\tconst defaultActiveToolNames: ToolName[] = [\"read\", \"bash\", \"edit\", \"write\"];\n\tconst initialActiveToolNames: ToolName[] = options.tools\n\t\t? options.tools.map((t) => t.name).filter((n): n is ToolName => n in allTools)\n\t\t: defaultActiveToolNames;\n\n\tlet agent: Agent;\n\n\t// Create convertToLlm wrapper that filters images if blockImages is enabled (defense-in-depth)\n\tconst convertToLlmWithBlockImages = (messages: AgentMessage[]): Message[] => {\n\t\tconst converted = convertToLlm(messages);\n\t\t// Check setting dynamically so mid-session changes take effect\n\t\tif (!settingsManager.getBlockImages()) {\n\t\t\treturn converted;\n\t\t}\n\t\t// Filter out ImageContent from all messages, replacing with text placeholder\n\t\treturn converted.map((msg) => {\n\t\t\tif (msg.role === \"user\" || msg.role === \"toolResult\") {\n\t\t\t\tconst content = msg.content;\n\t\t\t\tif (Array.isArray(content)) {\n\t\t\t\t\tconst hasImages = content.some((c) => c.type === \"image\");\n\t\t\t\t\tif (hasImages) {\n\t\t\t\t\t\tconst filteredContent = content\n\t\t\t\t\t\t\t.map((c) =>\n\t\t\t\t\t\t\t\tc.type === \"image\" ? { type: \"text\" as const, text: \"Image reading is disabled.\" } : c,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t(c, i, arr) =>\n\t\t\t\t\t\t\t\t\t// Dedupe consecutive \"Image reading is disabled.\" texts\n\t\t\t\t\t\t\t\t\t!(\n\t\t\t\t\t\t\t\t\t\tc.type === \"text\" &&\n\t\t\t\t\t\t\t\t\t\tc.text === \"Image reading is disabled.\" &&\n\t\t\t\t\t\t\t\t\t\ti > 0 &&\n\t\t\t\t\t\t\t\t\t\tarr[i - 1].type === \"text\" &&\n\t\t\t\t\t\t\t\t\t\t(arr[i - 1] as { type: \"text\"; text: string }).text === \"Image reading is disabled.\"\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\treturn { ...msg, content: filteredContent };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn msg;\n\t\t});\n\t};\n\n\tconst extensionRunnerRef: { current?: ExtensionRunner } = {};\n\n\tagent = new Agent({\n\t\tinitialState: {\n\t\t\tsystemPrompt: \"\",\n\t\t\tmodel,\n\t\t\tthinkingLevel,\n\t\t\ttools: [],\n\t\t},\n\t\tconvertToLlm: convertToLlmWithBlockImages,\n\t\tstreamFn: async (model, context, options) => {\n\t\t\tconst auth = await modelRegistry.getApiKeyAndHeaders(model);\n\t\t\tif (!auth.ok) {\n\t\t\t\tthrow new Error(auth.error);\n\t\t\t}\n\t\t\treturn streamSimple(model, context, {\n\t\t\t\t...options,\n\t\t\t\tapiKey: auth.apiKey,\n\t\t\t\theaders: auth.headers || options?.headers ? { ...auth.headers, ...options?.headers } : undefined,\n\t\t\t});\n\t\t},\n\t\tonPayload: async (payload, _model) => {\n\t\t\tconst runner = extensionRunnerRef.current;\n\t\t\tif (!runner?.hasHandlers(\"before_provider_request\")) {\n\t\t\t\treturn payload;\n\t\t\t}\n\t\t\treturn runner.emitBeforeProviderRequest(payload);\n\t\t},\n\t\tsessionId: sessionManager.getSessionId(),\n\t\ttransformContext: async (messages) => {\n\t\t\tconst runner = extensionRunnerRef.current;\n\t\t\tif (!runner) return messages;\n\t\t\treturn runner.emitContext(messages);\n\t\t},\n\t\tsteeringMode: settingsManager.getSteeringMode(),\n\t\tfollowUpMode: settingsManager.getFollowUpMode(),\n\t\ttransport: settingsManager.getTransport(),\n\t\tthinkingBudgets: settingsManager.getThinkingBudgets(),\n\t\tmaxRetryDelayMs: settingsManager.getRetrySettings().maxDelayMs,\n\t});\n\n\t// Restore messages if session has existing data\n\tif (hasExistingSession) {\n\t\tagent.state.messages = existingSession.messages;\n\t\tif (!hasThinkingEntry) {\n\t\t\tsessionManager.appendThinkingLevelChange(thinkingLevel);\n\t\t}\n\t} else {\n\t\t// Save initial model and thinking level for new sessions so they can be restored on resume\n\t\tif (model) {\n\t\t\tsessionManager.appendModelChange(model.provider, model.id);\n\t\t}\n\t\tsessionManager.appendThinkingLevelChange(thinkingLevel);\n\t}\n\n\tconst session = new AgentSession({\n\t\tagent,\n\t\tsessionManager,\n\t\tsettingsManager,\n\t\tcwd,\n\t\tscopedModels: options.scopedModels,\n\t\tresourceLoader,\n\t\tcustomTools: options.customTools,\n\t\tmodelRegistry,\n\t\tinitialActiveToolNames,\n\t\textensionRunnerRef,\n\t\tsessionStartEvent: options.sessionStartEvent,\n\t});\n\tconst extensionsResult = resourceLoader.getExtensions();\n\n\treturn {\n\t\tsession,\n\t\textensionsResult,\n\t\tmodelFallbackMessage,\n\t};\n}\n"]}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { Agent } from "@orient-cli/agent-core";
|
|
3
|
+
import { streamSimple } from "@orient-cli/ai";
|
|
4
|
+
import { getAgentDir, getDocsPath } from "../config.js";
|
|
5
|
+
import { AgentSession } from "./agent-session.js";
|
|
6
|
+
import { AuthStorage } from "./auth-storage.js";
|
|
7
|
+
import { DEFAULT_THINKING_LEVEL } from "./defaults.js";
|
|
8
|
+
import { convertToLlm } from "./messages.js";
|
|
9
|
+
import { ModelRegistry } from "./model-registry.js";
|
|
10
|
+
import { findInitialModel } from "./model-resolver.js";
|
|
11
|
+
import { DefaultResourceLoader } from "./resource-loader.js";
|
|
12
|
+
import { getDefaultSessionDir, SessionManager } from "./session-manager.js";
|
|
13
|
+
import { SettingsManager } from "./settings-manager.js";
|
|
14
|
+
import { time } from "./timings.js";
|
|
15
|
+
import { allTools, bashTool, codingTools, createBashTool, createCodingTools, createEditTool, createFindTool, createGrepTool, createLsTool, createReadOnlyTools, createReadTool, createWriteTool, editTool, findTool, grepTool, lsTool, readOnlyTools, readTool, withFileMutationQueue, writeTool, } from "./tools/index.js";
|
|
16
|
+
// Re-exports
|
|
17
|
+
export * from "./agent-session-runtime.js";
|
|
18
|
+
export {
|
|
19
|
+
// Pre-built tools (use process.cwd())
|
|
20
|
+
readTool, bashTool, editTool, writeTool, grepTool, findTool, lsTool, codingTools, readOnlyTools, allTools as allBuiltInTools, withFileMutationQueue,
|
|
21
|
+
// Tool factories (for custom cwd)
|
|
22
|
+
createCodingTools, createReadOnlyTools, createReadTool, createBashTool, createEditTool, createWriteTool, createGrepTool, createFindTool, createLsTool, };
|
|
23
|
+
// Helper Functions
|
|
24
|
+
function getDefaultAgentDir() {
|
|
25
|
+
return getAgentDir();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Create an AgentSession with the specified options.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* // Minimal - uses defaults
|
|
33
|
+
* const { session } = await createAgentSession();
|
|
34
|
+
*
|
|
35
|
+
* // With explicit model
|
|
36
|
+
* import { getModel } from '@orient-cli/ai';
|
|
37
|
+
* const { session } = await createAgentSession({
|
|
38
|
+
* model: getModel('anthropic', 'claude-opus-4-5'),
|
|
39
|
+
* thinkingLevel: 'high',
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* // Continue previous session
|
|
43
|
+
* const { session, modelFallbackMessage } = await createAgentSession({
|
|
44
|
+
* continueSession: true,
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* // Full control
|
|
48
|
+
* const loader = new DefaultResourceLoader({
|
|
49
|
+
* cwd: process.cwd(),
|
|
50
|
+
* agentDir: getAgentDir(),
|
|
51
|
+
* settingsManager: SettingsManager.create(),
|
|
52
|
+
* });
|
|
53
|
+
* await loader.reload();
|
|
54
|
+
* const { session } = await createAgentSession({
|
|
55
|
+
* model: myModel,
|
|
56
|
+
* tools: [readTool, bashTool],
|
|
57
|
+
* resourceLoader: loader,
|
|
58
|
+
* sessionManager: SessionManager.inMemory(),
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export async function createAgentSession(options = {}) {
|
|
63
|
+
const cwd = options.cwd ?? process.cwd();
|
|
64
|
+
const agentDir = options.agentDir ?? getDefaultAgentDir();
|
|
65
|
+
let resourceLoader = options.resourceLoader;
|
|
66
|
+
// Use provided or create AuthStorage and ModelRegistry
|
|
67
|
+
const authPath = options.agentDir ? join(agentDir, "auth.json") : undefined;
|
|
68
|
+
const modelsPath = options.agentDir ? join(agentDir, "models.json") : undefined;
|
|
69
|
+
const authStorage = options.authStorage ?? AuthStorage.create(authPath);
|
|
70
|
+
const modelRegistry = options.modelRegistry ?? ModelRegistry.create(authStorage, modelsPath);
|
|
71
|
+
const settingsManager = options.settingsManager ?? SettingsManager.create(cwd, agentDir);
|
|
72
|
+
const sessionManager = options.sessionManager ?? SessionManager.create(cwd, getDefaultSessionDir(cwd, agentDir));
|
|
73
|
+
if (!resourceLoader) {
|
|
74
|
+
resourceLoader = new DefaultResourceLoader({ cwd, agentDir, settingsManager });
|
|
75
|
+
await resourceLoader.reload();
|
|
76
|
+
time("resourceLoader.reload");
|
|
77
|
+
}
|
|
78
|
+
// Check if session has existing data to restore
|
|
79
|
+
const existingSession = sessionManager.buildSessionContext();
|
|
80
|
+
const hasExistingSession = existingSession.messages.length > 0;
|
|
81
|
+
const hasThinkingEntry = sessionManager.getBranch().some((entry) => entry.type === "thinking_level_change");
|
|
82
|
+
let model = options.model;
|
|
83
|
+
let modelFallbackMessage;
|
|
84
|
+
// If session has data, try to restore model from it
|
|
85
|
+
if (!model && hasExistingSession && existingSession.model) {
|
|
86
|
+
const restoredModel = modelRegistry.find(existingSession.model.provider, existingSession.model.modelId);
|
|
87
|
+
if (restoredModel && modelRegistry.hasConfiguredAuth(restoredModel)) {
|
|
88
|
+
model = restoredModel;
|
|
89
|
+
}
|
|
90
|
+
if (!model) {
|
|
91
|
+
modelFallbackMessage = `Could not restore model ${existingSession.model.provider}/${existingSession.model.modelId}`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// If still no model, use findInitialModel (checks settings default, then provider defaults)
|
|
95
|
+
if (!model) {
|
|
96
|
+
const result = await findInitialModel({
|
|
97
|
+
scopedModels: [],
|
|
98
|
+
isContinuing: hasExistingSession,
|
|
99
|
+
defaultProvider: settingsManager.getDefaultProvider(),
|
|
100
|
+
defaultModelId: settingsManager.getDefaultModel(),
|
|
101
|
+
defaultThinkingLevel: settingsManager.getDefaultThinkingLevel(),
|
|
102
|
+
modelRegistry,
|
|
103
|
+
});
|
|
104
|
+
model = result.model;
|
|
105
|
+
if (!model) {
|
|
106
|
+
modelFallbackMessage = `No models available. Use /login or set an API key environment variable. See ${join(getDocsPath(), "providers.md")}. Then use /model to select a model.`;
|
|
107
|
+
}
|
|
108
|
+
else if (modelFallbackMessage) {
|
|
109
|
+
modelFallbackMessage += `. Using ${model.provider}/${model.id}`;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
let thinkingLevel = options.thinkingLevel;
|
|
113
|
+
// If session has data, restore thinking level from it
|
|
114
|
+
if (thinkingLevel === undefined && hasExistingSession) {
|
|
115
|
+
thinkingLevel = hasThinkingEntry
|
|
116
|
+
? existingSession.thinkingLevel
|
|
117
|
+
: (settingsManager.getDefaultThinkingLevel() ?? DEFAULT_THINKING_LEVEL);
|
|
118
|
+
}
|
|
119
|
+
// Fall back to settings default
|
|
120
|
+
if (thinkingLevel === undefined) {
|
|
121
|
+
thinkingLevel = settingsManager.getDefaultThinkingLevel() ?? DEFAULT_THINKING_LEVEL;
|
|
122
|
+
}
|
|
123
|
+
// Clamp to model capabilities
|
|
124
|
+
if (!model || !model.reasoning) {
|
|
125
|
+
thinkingLevel = "off";
|
|
126
|
+
}
|
|
127
|
+
const defaultActiveToolNames = ["read", "bash", "edit", "write"];
|
|
128
|
+
const initialActiveToolNames = options.tools
|
|
129
|
+
? options.tools.map((t) => t.name).filter((n) => n in allTools)
|
|
130
|
+
: defaultActiveToolNames;
|
|
131
|
+
let agent;
|
|
132
|
+
// Create convertToLlm wrapper that filters images if blockImages is enabled (defense-in-depth)
|
|
133
|
+
const convertToLlmWithBlockImages = (messages) => {
|
|
134
|
+
const converted = convertToLlm(messages);
|
|
135
|
+
// Check setting dynamically so mid-session changes take effect
|
|
136
|
+
if (!settingsManager.getBlockImages()) {
|
|
137
|
+
return converted;
|
|
138
|
+
}
|
|
139
|
+
// Filter out ImageContent from all messages, replacing with text placeholder
|
|
140
|
+
return converted.map((msg) => {
|
|
141
|
+
if (msg.role === "user" || msg.role === "toolResult") {
|
|
142
|
+
const content = msg.content;
|
|
143
|
+
if (Array.isArray(content)) {
|
|
144
|
+
const hasImages = content.some((c) => c.type === "image");
|
|
145
|
+
if (hasImages) {
|
|
146
|
+
const filteredContent = content
|
|
147
|
+
.map((c) => c.type === "image" ? { type: "text", text: "Image reading is disabled." } : c)
|
|
148
|
+
.filter((c, i, arr) =>
|
|
149
|
+
// Dedupe consecutive "Image reading is disabled." texts
|
|
150
|
+
!(c.type === "text" &&
|
|
151
|
+
c.text === "Image reading is disabled." &&
|
|
152
|
+
i > 0 &&
|
|
153
|
+
arr[i - 1].type === "text" &&
|
|
154
|
+
arr[i - 1].text === "Image reading is disabled."));
|
|
155
|
+
return { ...msg, content: filteredContent };
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return msg;
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
const extensionRunnerRef = {};
|
|
163
|
+
agent = new Agent({
|
|
164
|
+
initialState: {
|
|
165
|
+
systemPrompt: "",
|
|
166
|
+
model,
|
|
167
|
+
thinkingLevel,
|
|
168
|
+
tools: [],
|
|
169
|
+
},
|
|
170
|
+
convertToLlm: convertToLlmWithBlockImages,
|
|
171
|
+
streamFn: async (model, context, options) => {
|
|
172
|
+
const auth = await modelRegistry.getApiKeyAndHeaders(model);
|
|
173
|
+
if (!auth.ok) {
|
|
174
|
+
throw new Error(auth.error);
|
|
175
|
+
}
|
|
176
|
+
return streamSimple(model, context, {
|
|
177
|
+
...options,
|
|
178
|
+
apiKey: auth.apiKey,
|
|
179
|
+
headers: auth.headers || options?.headers ? { ...auth.headers, ...options?.headers } : undefined,
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
onPayload: async (payload, _model) => {
|
|
183
|
+
const runner = extensionRunnerRef.current;
|
|
184
|
+
if (!runner?.hasHandlers("before_provider_request")) {
|
|
185
|
+
return payload;
|
|
186
|
+
}
|
|
187
|
+
return runner.emitBeforeProviderRequest(payload);
|
|
188
|
+
},
|
|
189
|
+
sessionId: sessionManager.getSessionId(),
|
|
190
|
+
transformContext: async (messages) => {
|
|
191
|
+
const runner = extensionRunnerRef.current;
|
|
192
|
+
if (!runner)
|
|
193
|
+
return messages;
|
|
194
|
+
return runner.emitContext(messages);
|
|
195
|
+
},
|
|
196
|
+
steeringMode: settingsManager.getSteeringMode(),
|
|
197
|
+
followUpMode: settingsManager.getFollowUpMode(),
|
|
198
|
+
transport: settingsManager.getTransport(),
|
|
199
|
+
thinkingBudgets: settingsManager.getThinkingBudgets(),
|
|
200
|
+
maxRetryDelayMs: settingsManager.getRetrySettings().maxDelayMs,
|
|
201
|
+
});
|
|
202
|
+
// Restore messages if session has existing data
|
|
203
|
+
if (hasExistingSession) {
|
|
204
|
+
agent.state.messages = existingSession.messages;
|
|
205
|
+
if (!hasThinkingEntry) {
|
|
206
|
+
sessionManager.appendThinkingLevelChange(thinkingLevel);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
// Save initial model and thinking level for new sessions so they can be restored on resume
|
|
211
|
+
if (model) {
|
|
212
|
+
sessionManager.appendModelChange(model.provider, model.id);
|
|
213
|
+
}
|
|
214
|
+
sessionManager.appendThinkingLevelChange(thinkingLevel);
|
|
215
|
+
}
|
|
216
|
+
const session = new AgentSession({
|
|
217
|
+
agent,
|
|
218
|
+
sessionManager,
|
|
219
|
+
settingsManager,
|
|
220
|
+
cwd,
|
|
221
|
+
scopedModels: options.scopedModels,
|
|
222
|
+
resourceLoader,
|
|
223
|
+
customTools: options.customTools,
|
|
224
|
+
modelRegistry,
|
|
225
|
+
initialActiveToolNames,
|
|
226
|
+
extensionRunnerRef,
|
|
227
|
+
sessionStartEvent: options.sessionStartEvent,
|
|
228
|
+
});
|
|
229
|
+
const extensionsResult = resourceLoader.getExtensions();
|
|
230
|
+
return {
|
|
231
|
+
session,
|
|
232
|
+
extensionsResult,
|
|
233
|
+
modelFallbackMessage,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=sdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/core/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAyC,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAA4B,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD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port { Agent, type AgentMessage, type ThinkingLevel } from \"@orient-cli/agent-core\";\nimport { type Message, type Model, streamSimple } from \"@orient-cli/ai\";\nimport { getAgentDir, getDocsPath } from \"../config.js\";\nimport { AgentSession } from \"./agent-session.js\";\nimport { AuthStorage } from \"./auth-storage.js\";\nimport { DEFAULT_THINKING_LEVEL } from \"./defaults.js\";\nimport type { ExtensionRunner, LoadExtensionsResult, SessionStartEvent, ToolDefinition } from \"./extensions/index.js\";\nimport { convertToLlm } from \"./messages.js\";\nimport { ModelRegistry } from \"./model-registry.js\";\nimport { findInitialModel } from \"./model-resolver.js\";\nimport type { ResourceLoader } from \"./resource-loader.js\";\nimport { DefaultResourceLoader } from \"./resource-loader.js\";\nimport { getDefaultSessionDir, SessionManager } from \"./session-manager.js\";\nimport { SettingsManager } from \"./settings-manager.js\";\nimport { time } from \"./timings.js\";\nimport {\n\tallTools,\n\tbashTool,\n\tcodingTools,\n\tcreateBashTool,\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\teditTool,\n\tfindTool,\n\tgrepTool,\n\tlsTool,\n\treadOnlyTools,\n\treadTool,\n\ttype Tool,\n\ttype ToolName,\n\twithFileMutationQueue,\n\twriteTool,\n} from \"./tools/index.js\";\n\nexport interface CreateAgentSessionOptions {\n\t/** Working directory for project-local discovery. Default: process.cwd() */\n\tcwd?: string;\n\t/** Global config directory. Default: ~/.pi/agent */\n\tagentDir?: string;\n\n\t/** Auth storage for credentials. Default: AuthStorage.create(agentDir/auth.json) */\n\tauthStorage?: AuthStorage;\n\t/** Model registry. Default: ModelRegistry.create(authStorage, agentDir/models.json) */\n\tmodelRegistry?: ModelRegistry;\n\n\t/** Model to use. Default: from settings, else first available */\n\tmodel?: Model<any>;\n\t/** Thinking level. Default: from settings, else 'medium' (clamped to model capabilities) */\n\tthinkingLevel?: ThinkingLevel;\n\t/** Models available for cycling (Ctrl+P in interactive mode) */\n\tscopedModels?: Array<{ model: Model<any>; thinkingLevel?: ThinkingLevel }>;\n\n\t/** Built-in tools to use. Default: codingTools [read, bash, edit, write] */\n\ttools?: Tool[];\n\t/** Custom tools to register (in addition to built-in tools). */\n\tcustomTools?: ToolDefinition[];\n\n\t/** Resource loader. When omitted, DefaultResourceLoader is used. */\n\tresourceLoader?: ResourceLoader;\n\n\t/** Session manager. Default: SessionManager.create(cwd) */\n\tsessionManager?: SessionManager;\n\n\t/** Settings manager. Default: SettingsManager.create(cwd, agentDir) */\n\tsettingsManager?: SettingsManager;\n\t/** Session start event metadata for extension runtime startup. */\n\tsessionStartEvent?: SessionStartEvent;\n}\n\n/** Result from createAgentSession */\nexport interface CreateAgentSessionResult {\n\t/** The created session */\n\tsession: AgentSession;\n\t/** Extensions result (for UI context setup in interactive mode) */\n\textensionsResult: LoadExtensionsResult;\n\t/** Warning if session was restored with a different model than saved */\n\tmodelFallbackMessage?: string;\n}\n\n// Re-exports\n\nexport * from \"./agent-session-runtime.js\";\nexport type {\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionContext,\n\tExtensionFactory,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tToolDefinition,\n} from \"./extensions/index.js\";\nexport type { PromptTemplate } from \"./prompt-templates.js\";\nexport type { Skill } from \"./skills.js\";\nexport type { Tool } from \"./tools/index.js\";\n\nexport {\n\t// Pre-built tools (use process.cwd())\n\treadTool,\n\tbashTool,\n\teditTool,\n\twriteTool,\n\tgrepTool,\n\tfindTool,\n\tlsTool,\n\tcodingTools,\n\treadOnlyTools,\n\tallTools as allBuiltInTools,\n\twithFileMutationQueue,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateBashTool,\n\tcreateEditTool,\n\tcreateWriteTool,\n\tcreateGrepTool,\n\tcreateFindTool,\n\tcreateLsTool,\n};\n\n// Helper Functions\n\nfunction getDefaultAgentDir(): string {\n\treturn getAgentDir();\n}\n\n/**\n * Create an AgentSession with the specified options.\n *\n * @example\n * ```typescript\n * // Minimal - uses defaults\n * const { session } = await createAgentSession();\n *\n * // With explicit model\n * import { getModel } from '@orient-cli/ai';\n * const { session } = await createAgentSession({\n * model: getModel('anthropic', 'claude-opus-4-5'),\n * thinkingLevel: 'high',\n * });\n *\n * // Continue previous session\n * const { session, modelFallbackMessage } = await createAgentSession({\n * continueSession: true,\n * });\n *\n * // Full control\n * const loader = new DefaultResourceLoader({\n * cwd: process.cwd(),\n * agentDir: getAgentDir(),\n * settingsManager: SettingsManager.create(),\n * });\n * await loader.reload();\n * const { session } = await createAgentSession({\n * model: myModel,\n * tools: [readTool, bashTool],\n * resourceLoader: loader,\n * sessionManager: SessionManager.inMemory(),\n * });\n * ```\n */\nexport async function createAgentSession(options: CreateAgentSessionOptions = {}): Promise<CreateAgentSessionResult> {\n\tconst cwd = options.cwd ?? process.cwd();\n\tconst agentDir = options.agentDir ?? getDefaultAgentDir();\n\tlet resourceLoader = options.resourceLoader;\n\n\t// Use provided or create AuthStorage and ModelRegistry\n\tconst authPath = options.agentDir ? join(agentDir, \"auth.json\") : undefined;\n\tconst modelsPath = options.agentDir ? join(agentDir, \"models.json\") : undefined;\n\tconst authStorage = options.authStorage ?? AuthStorage.create(authPath);\n\tconst modelRegistry = options.modelRegistry ?? ModelRegistry.create(authStorage, modelsPath);\n\n\tconst settingsManager = options.settingsManager ?? SettingsManager.create(cwd, agentDir);\n\tconst sessionManager = options.sessionManager ?? SessionManager.create(cwd, getDefaultSessionDir(cwd, agentDir));\n\n\tif (!resourceLoader) {\n\t\tresourceLoader = new DefaultResourceLoader({ cwd, agentDir, settingsManager });\n\t\tawait resourceLoader.reload();\n\t\ttime(\"resourceLoader.reload\");\n\t}\n\n\t// Check if session has existing data to restore\n\tconst existingSession = sessionManager.buildSessionContext();\n\tconst hasExistingSession = existingSession.messages.length > 0;\n\tconst hasThinkingEntry = sessionManager.getBranch().some((entry) => entry.type === \"thinking_level_change\");\n\n\tlet model = options.model;\n\tlet modelFallbackMessage: string | undefined;\n\n\t// If session has data, try to restore model from it\n\tif (!model && hasExistingSession && existingSession.model) {\n\t\tconst restoredModel = modelRegistry.find(existingSession.model.provider, existingSession.model.modelId);\n\t\tif (restoredModel && modelRegistry.hasConfiguredAuth(restoredModel)) {\n\t\t\tmodel = restoredModel;\n\t\t}\n\t\tif (!model) {\n\t\t\tmodelFallbackMessage = `Could not restore model ${existingSession.model.provider}/${existingSession.model.modelId}`;\n\t\t}\n\t}\n\n\t// If still no model, use findInitialModel (checks settings default, then provider defaults)\n\tif (!model) {\n\t\tconst result = await findInitialModel({\n\t\t\tscopedModels: [],\n\t\t\tisContinuing: hasExistingSession,\n\t\t\tdefaultProvider: settingsManager.getDefaultProvider(),\n\t\t\tdefaultModelId: settingsManager.getDefaultModel(),\n\t\t\tdefaultThinkingLevel: settingsManager.getDefaultThinkingLevel(),\n\t\t\tmodelRegistry,\n\t\t});\n\t\tmodel = result.model;\n\t\tif (!model) {\n\t\t\tmodelFallbackMessage = `No models available. Use /login or set an API key environment variable. See ${join(getDocsPath(), \"providers.md\")}. Then use /model to select a model.`;\n\t\t} else if (modelFallbackMessage) {\n\t\t\tmodelFallbackMessage += `. Using ${model.provider}/${model.id}`;\n\t\t}\n\t}\n\n\tlet thinkingLevel = options.thinkingLevel;\n\n\t// If session has data, restore thinking level from it\n\tif (thinkingLevel === undefined && hasExistingSession) {\n\t\tthinkingLevel = hasThinkingEntry\n\t\t\t? (existingSession.thinkingLevel as ThinkingLevel)\n\t\t\t: (settingsManager.getDefaultThinkingLevel() ?? DEFAULT_THINKING_LEVEL);\n\t}\n\n\t// Fall back to settings default\n\tif (thinkingLevel === undefined) {\n\t\tthinkingLevel = settingsManager.getDefaultThinkingLevel() ?? DEFAULT_THINKING_LEVEL;\n\t}\n\n\t// Clamp to model capabilities\n\tif (!model || !model.reasoning) {\n\t\tthinkingLevel = \"off\";\n\t}\n\n\tconst defaultActiveToolNames: ToolName[] = [\"read\", \"bash\", \"edit\", \"write\"];\n\tconst initialActiveToolNames: ToolName[] = options.tools\n\t\t? options.tools.map((t) => t.name).filter((n): n is ToolName => n in allTools)\n\t\t: defaultActiveToolNames;\n\n\tlet agent: Agent;\n\n\t// Create convertToLlm wrapper that filters images if blockImages is enabled (defense-in-depth)\n\tconst convertToLlmWithBlockImages = (messages: AgentMessage[]): Message[] => {\n\t\tconst converted = convertToLlm(messages);\n\t\t// Check setting dynamically so mid-session changes take effect\n\t\tif (!settingsManager.getBlockImages()) {\n\t\t\treturn converted;\n\t\t}\n\t\t// Filter out ImageContent from all messages, replacing with text placeholder\n\t\treturn converted.map((msg) => {\n\t\t\tif (msg.role === \"user\" || msg.role === \"toolResult\") {\n\t\t\t\tconst content = msg.content;\n\t\t\t\tif (Array.isArray(content)) {\n\t\t\t\t\tconst hasImages = content.some((c) => c.type === \"image\");\n\t\t\t\t\tif (hasImages) {\n\t\t\t\t\t\tconst filteredContent = content\n\t\t\t\t\t\t\t.map((c) =>\n\t\t\t\t\t\t\t\tc.type === \"image\" ? { type: \"text\" as const, text: \"Image reading is disabled.\" } : c,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t(c, i, arr) =>\n\t\t\t\t\t\t\t\t\t// Dedupe consecutive \"Image reading is disabled.\" texts\n\t\t\t\t\t\t\t\t\t!(\n\t\t\t\t\t\t\t\t\t\tc.type === \"text\" &&\n\t\t\t\t\t\t\t\t\t\tc.text === \"Image reading is disabled.\" &&\n\t\t\t\t\t\t\t\t\t\ti > 0 &&\n\t\t\t\t\t\t\t\t\t\tarr[i - 1].type === \"text\" &&\n\t\t\t\t\t\t\t\t\t\t(arr[i - 1] as { type: \"text\"; text: string }).text === \"Image reading is disabled.\"\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\treturn { ...msg, content: filteredContent };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn msg;\n\t\t});\n\t};\n\n\tconst extensionRunnerRef: { current?: ExtensionRunner } = {};\n\n\tagent = new Agent({\n\t\tinitialState: {\n\t\t\tsystemPrompt: \"\",\n\t\t\tmodel,\n\t\t\tthinkingLevel,\n\t\t\ttools: [],\n\t\t},\n\t\tconvertToLlm: convertToLlmWithBlockImages,\n\t\tstreamFn: async (model, context, options) => {\n\t\t\tconst auth = await modelRegistry.getApiKeyAndHeaders(model);\n\t\t\tif (!auth.ok) {\n\t\t\t\tthrow new Error(auth.error);\n\t\t\t}\n\t\t\treturn streamSimple(model, context, {\n\t\t\t\t...options,\n\t\t\t\tapiKey: auth.apiKey,\n\t\t\t\theaders: auth.headers || options?.headers ? { ...auth.headers, ...options?.headers } : undefined,\n\t\t\t});\n\t\t},\n\t\tonPayload: async (payload, _model) => {\n\t\t\tconst runner = extensionRunnerRef.current;\n\t\t\tif (!runner?.hasHandlers(\"before_provider_request\")) {\n\t\t\t\treturn payload;\n\t\t\t}\n\t\t\treturn runner.emitBeforeProviderRequest(payload);\n\t\t},\n\t\tsessionId: sessionManager.getSessionId(),\n\t\ttransformContext: async (messages) => {\n\t\t\tconst runner = extensionRunnerRef.current;\n\t\t\tif (!runner) return messages;\n\t\t\treturn runner.emitContext(messages);\n\t\t},\n\t\tsteeringMode: settingsManager.getSteeringMode(),\n\t\tfollowUpMode: settingsManager.getFollowUpMode(),\n\t\ttransport: settingsManager.getTransport(),\n\t\tthinkingBudgets: settingsManager.getThinkingBudgets(),\n\t\tmaxRetryDelayMs: settingsManager.getRetrySettings().maxDelayMs,\n\t});\n\n\t// Restore messages if session has existing data\n\tif (hasExistingSession) {\n\t\tagent.state.messages = existingSession.messages;\n\t\tif (!hasThinkingEntry) {\n\t\t\tsessionManager.appendThinkingLevelChange(thinkingLevel);\n\t\t}\n\t} else {\n\t\t// Save initial model and thinking level for new sessions so they can be restored on resume\n\t\tif (model) {\n\t\t\tsessionManager.appendModelChange(model.provider, model.id);\n\t\t}\n\t\tsessionManager.appendThinkingLevelChange(thinkingLevel);\n\t}\n\n\tconst session = new AgentSession({\n\t\tagent,\n\t\tsessionManager,\n\t\tsettingsManager,\n\t\tcwd,\n\t\tscopedModels: options.scopedModels,\n\t\tresourceLoader,\n\t\tcustomTools: options.customTools,\n\t\tmodelRegistry,\n\t\tinitialActiveToolNames,\n\t\textensionRunnerRef,\n\t\tsessionStartEvent: options.sessionStartEvent,\n\t});\n\tconst extensionsResult = resourceLoader.getExtensions();\n\n\treturn {\n\t\tsession,\n\t\textensionsResult,\n\t\tmodelFallbackMessage,\n\t};\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface SessionCwdIssue {
|
|
2
|
+
sessionFile?: string;
|
|
3
|
+
sessionCwd: string;
|
|
4
|
+
fallbackCwd: string;
|
|
5
|
+
}
|
|
6
|
+
interface SessionCwdSource {
|
|
7
|
+
getCwd(): string;
|
|
8
|
+
getSessionFile(): string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function getMissingSessionCwdIssue(sessionManager: SessionCwdSource, fallbackCwd: string): SessionCwdIssue | undefined;
|
|
11
|
+
export declare function formatMissingSessionCwdError(issue: SessionCwdIssue): string;
|
|
12
|
+
export declare function formatMissingSessionCwdPrompt(issue: SessionCwdIssue): string;
|
|
13
|
+
export declare class MissingSessionCwdError extends Error {
|
|
14
|
+
readonly issue: SessionCwdIssue;
|
|
15
|
+
constructor(issue: SessionCwdIssue);
|
|
16
|
+
}
|
|
17
|
+
export declare function assertSessionCwdExists(sessionManager: SessionCwdSource, fallbackCwd: string): void;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=session-cwd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-cwd.d.ts","sourceRoot":"","sources":["../../src/core/session-cwd.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,gBAAgB;IACzB,MAAM,IAAI,MAAM,CAAC;IACjB,cAAc,IAAI,MAAM,GAAG,SAAS,CAAC;CACrC;AAED,wBAAgB,yBAAyB,CACxC,cAAc,EAAE,gBAAgB,EAChC,WAAW,EAAE,MAAM,GACjB,eAAe,GAAG,SAAS,CAgB7B;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAG3E;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAE5E;AAED,qBAAa,sBAAuB,SAAQ,KAAK;IAChD,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAEhC,YAAY,KAAK,EAAE,eAAe,EAIjC;CACD;AAED,wBAAgB,sBAAsB,CAAC,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAKlG","sourcesContent":["import { existsSync } from \"node:fs\";\n\nexport interface SessionCwdIssue {\n\tsessionFile?: string;\n\tsessionCwd: string;\n\tfallbackCwd: string;\n}\n\ninterface SessionCwdSource {\n\tgetCwd(): string;\n\tgetSessionFile(): string | undefined;\n}\n\nexport function getMissingSessionCwdIssue(\n\tsessionManager: SessionCwdSource,\n\tfallbackCwd: string,\n): SessionCwdIssue | undefined {\n\tconst sessionFile = sessionManager.getSessionFile();\n\tif (!sessionFile) {\n\t\treturn undefined;\n\t}\n\n\tconst sessionCwd = sessionManager.getCwd();\n\tif (!sessionCwd || existsSync(sessionCwd)) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\tsessionFile,\n\t\tsessionCwd,\n\t\tfallbackCwd,\n\t};\n}\n\nexport function formatMissingSessionCwdError(issue: SessionCwdIssue): string {\n\tconst sessionFile = issue.sessionFile ? `\\nSession file: ${issue.sessionFile}` : \"\";\n\treturn `Stored session working directory does not exist: ${issue.sessionCwd}${sessionFile}\\nCurrent working directory: ${issue.fallbackCwd}`;\n}\n\nexport function formatMissingSessionCwdPrompt(issue: SessionCwdIssue): string {\n\treturn `cwd from session file does not exist\\n${issue.sessionCwd}\\n\\ncontinue in current cwd\\n${issue.fallbackCwd}`;\n}\n\nexport class MissingSessionCwdError extends Error {\n\treadonly issue: SessionCwdIssue;\n\n\tconstructor(issue: SessionCwdIssue) {\n\t\tsuper(formatMissingSessionCwdError(issue));\n\t\tthis.name = \"MissingSessionCwdError\";\n\t\tthis.issue = issue;\n\t}\n}\n\nexport function assertSessionCwdExists(sessionManager: SessionCwdSource, fallbackCwd: string): void {\n\tconst issue = getMissingSessionCwdIssue(sessionManager, fallbackCwd);\n\tif (issue) {\n\t\tthrow new MissingSessionCwdError(issue);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
export function getMissingSessionCwdIssue(sessionManager, fallbackCwd) {
|
|
3
|
+
const sessionFile = sessionManager.getSessionFile();
|
|
4
|
+
if (!sessionFile) {
|
|
5
|
+
return undefined;
|
|
6
|
+
}
|
|
7
|
+
const sessionCwd = sessionManager.getCwd();
|
|
8
|
+
if (!sessionCwd || existsSync(sessionCwd)) {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
sessionFile,
|
|
13
|
+
sessionCwd,
|
|
14
|
+
fallbackCwd,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export function formatMissingSessionCwdError(issue) {
|
|
18
|
+
const sessionFile = issue.sessionFile ? `\nSession file: ${issue.sessionFile}` : "";
|
|
19
|
+
return `Stored session working directory does not exist: ${issue.sessionCwd}${sessionFile}\nCurrent working directory: ${issue.fallbackCwd}`;
|
|
20
|
+
}
|
|
21
|
+
export function formatMissingSessionCwdPrompt(issue) {
|
|
22
|
+
return `cwd from session file does not exist\n${issue.sessionCwd}\n\ncontinue in current cwd\n${issue.fallbackCwd}`;
|
|
23
|
+
}
|
|
24
|
+
export class MissingSessionCwdError extends Error {
|
|
25
|
+
issue;
|
|
26
|
+
constructor(issue) {
|
|
27
|
+
super(formatMissingSessionCwdError(issue));
|
|
28
|
+
this.name = "MissingSessionCwdError";
|
|
29
|
+
this.issue = issue;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function assertSessionCwdExists(sessionManager, fallbackCwd) {
|
|
33
|
+
const issue = getMissingSessionCwdIssue(sessionManager, fallbackCwd);
|
|
34
|
+
if (issue) {
|
|
35
|
+
throw new MissingSessionCwdError(issue);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=session-cwd.js.map
|