orquesta-cli 0.1.12
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/.eslintrc.json +26 -0
- package/.prettierrc.json +10 -0
- package/CLAUDE.md +199 -0
- package/LICENSE +21 -0
- package/README.md +280 -0
- package/SECURITY.md +290 -0
- package/TEST_LOCAL.md +245 -0
- package/dist/agents/base/base-agent.d.ts +38 -0
- package/dist/agents/base/base-agent.d.ts.map +1 -0
- package/dist/agents/base/base-agent.js +69 -0
- package/dist/agents/base/base-agent.js.map +1 -0
- package/dist/agents/docs-search/index.d.ts +33 -0
- package/dist/agents/docs-search/index.d.ts.map +1 -0
- package/dist/agents/docs-search/index.js +244 -0
- package/dist/agents/docs-search/index.js.map +1 -0
- package/dist/agents/index.d.ts +4 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +4 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/planner/index.d.ts +17 -0
- package/dist/agents/planner/index.d.ts.map +1 -0
- package/dist/agents/planner/index.js +250 -0
- package/dist/agents/planner/index.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +144 -0
- package/dist/cli.js.map +1 -0
- package/dist/constants.d.ts +8 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +10 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/compact/compact-manager.d.ts +22 -0
- package/dist/core/compact/compact-manager.d.ts.map +1 -0
- package/dist/core/compact/compact-manager.js +75 -0
- package/dist/core/compact/compact-manager.js.map +1 -0
- package/dist/core/compact/compact-prompts.d.ts +11 -0
- package/dist/core/compact/compact-prompts.d.ts.map +1 -0
- package/dist/core/compact/compact-prompts.js +90 -0
- package/dist/core/compact/compact-prompts.js.map +1 -0
- package/dist/core/compact/context-tracker.d.ts +28 -0
- package/dist/core/compact/context-tracker.d.ts.map +1 -0
- package/dist/core/compact/context-tracker.js +71 -0
- package/dist/core/compact/context-tracker.js.map +1 -0
- package/dist/core/compact/index.d.ts +4 -0
- package/dist/core/compact/index.d.ts.map +1 -0
- package/dist/core/compact/index.js +4 -0
- package/dist/core/compact/index.js.map +1 -0
- package/dist/core/config/config-manager.d.ts +44 -0
- package/dist/core/config/config-manager.d.ts.map +1 -0
- package/dist/core/config/config-manager.js +259 -0
- package/dist/core/config/config-manager.js.map +1 -0
- package/dist/core/config/index.d.ts +2 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/index.js +2 -0
- package/dist/core/config/index.js.map +1 -0
- package/dist/core/docs-manager.d.ts +46 -0
- package/dist/core/docs-manager.d.ts.map +1 -0
- package/dist/core/docs-manager.js +475 -0
- package/dist/core/docs-manager.js.map +1 -0
- package/dist/core/git-auto-updater.d.ts +58 -0
- package/dist/core/git-auto-updater.d.ts.map +1 -0
- package/dist/core/git-auto-updater.js +374 -0
- package/dist/core/git-auto-updater.js.map +1 -0
- package/dist/core/llm/index.d.ts +2 -0
- package/dist/core/llm/index.d.ts.map +1 -0
- package/dist/core/llm/index.js +2 -0
- package/dist/core/llm/index.js.map +1 -0
- package/dist/core/llm/llm-client.d.ts +97 -0
- package/dist/core/llm/llm-client.d.ts.map +1 -0
- package/dist/core/llm/llm-client.js +1000 -0
- package/dist/core/llm/llm-client.js.map +1 -0
- package/dist/core/session/index.d.ts +2 -0
- package/dist/core/session/index.d.ts.map +1 -0
- package/dist/core/session/index.js +2 -0
- package/dist/core/session/index.js.map +1 -0
- package/dist/core/session/session-manager.d.ts +71 -0
- package/dist/core/session/session-manager.d.ts.map +1 -0
- package/dist/core/session/session-manager.js +250 -0
- package/dist/core/session/session-manager.js.map +1 -0
- package/dist/core/slash-command-handler.d.ts +31 -0
- package/dist/core/slash-command-handler.d.ts.map +1 -0
- package/dist/core/slash-command-handler.js +302 -0
- package/dist/core/slash-command-handler.js.map +1 -0
- package/dist/core/usage-tracker.d.ts +70 -0
- package/dist/core/usage-tracker.d.ts.map +1 -0
- package/dist/core/usage-tracker.js +251 -0
- package/dist/core/usage-tracker.js.map +1 -0
- package/dist/errors/base.d.ts +22 -0
- package/dist/errors/base.d.ts.map +1 -0
- package/dist/errors/base.js +43 -0
- package/dist/errors/base.js.map +1 -0
- package/dist/errors/file.d.ts +31 -0
- package/dist/errors/file.d.ts.map +1 -0
- package/dist/errors/file.js +110 -0
- package/dist/errors/file.js.map +1 -0
- package/dist/errors/index.d.ts +10 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +41 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/llm.d.ts +26 -0
- package/dist/errors/llm.d.ts.map +1 -0
- package/dist/errors/llm.js +86 -0
- package/dist/errors/llm.js.map +1 -0
- package/dist/errors/network.d.ts +19 -0
- package/dist/errors/network.d.ts.map +1 -0
- package/dist/errors/network.js +82 -0
- package/dist/errors/network.js.map +1 -0
- package/dist/errors/validation.d.ts +19 -0
- package/dist/errors/validation.d.ts.map +1 -0
- package/dist/errors/validation.js +62 -0
- package/dist/errors/validation.js.map +1 -0
- package/dist/eval/eval-runner.d.ts +24 -0
- package/dist/eval/eval-runner.d.ts.map +1 -0
- package/dist/eval/eval-runner.js +309 -0
- package/dist/eval/eval-runner.js.map +1 -0
- package/dist/eval/index.d.ts +3 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js +3 -0
- package/dist/eval/index.js.map +1 -0
- package/dist/eval/types.d.ts +77 -0
- package/dist/eval/types.d.ts.map +1 -0
- package/dist/eval/types.js +2 -0
- package/dist/eval/types.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/orchestration/index.d.ts +4 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +3 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/plan-executor.d.ts +28 -0
- package/dist/orchestration/plan-executor.d.ts.map +1 -0
- package/dist/orchestration/plan-executor.js +382 -0
- package/dist/orchestration/plan-executor.js.map +1 -0
- package/dist/orchestration/types.d.ts +66 -0
- package/dist/orchestration/types.d.ts.map +1 -0
- package/dist/orchestration/types.js +2 -0
- package/dist/orchestration/types.js.map +1 -0
- package/dist/orchestration/utils.d.ts +13 -0
- package/dist/orchestration/utils.d.ts.map +1 -0
- package/dist/orchestration/utils.js +78 -0
- package/dist/orchestration/utils.js.map +1 -0
- package/dist/orquesta/connection.d.ts +35 -0
- package/dist/orquesta/connection.d.ts.map +1 -0
- package/dist/orquesta/connection.js +189 -0
- package/dist/orquesta/connection.js.map +1 -0
- package/dist/prompts/agents/docs-search-decision.d.ts +6 -0
- package/dist/prompts/agents/docs-search-decision.d.ts.map +1 -0
- package/dist/prompts/agents/docs-search-decision.js +46 -0
- package/dist/prompts/agents/docs-search-decision.js.map +1 -0
- package/dist/prompts/agents/docs-search.d.ts +4 -0
- package/dist/prompts/agents/docs-search.d.ts.map +1 -0
- package/dist/prompts/agents/docs-search.js +70 -0
- package/dist/prompts/agents/docs-search.js.map +1 -0
- package/dist/prompts/agents/planning.d.ts +4 -0
- package/dist/prompts/agents/planning.d.ts.map +1 -0
- package/dist/prompts/agents/planning.js +119 -0
- package/dist/prompts/agents/planning.js.map +1 -0
- package/dist/prompts/index.d.ts +10 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +10 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/shared/codebase-rules.d.ts +4 -0
- package/dist/prompts/shared/codebase-rules.d.ts.map +1 -0
- package/dist/prompts/shared/codebase-rules.js +16 -0
- package/dist/prompts/shared/codebase-rules.js.map +1 -0
- package/dist/prompts/shared/git-rules.d.ts +2 -0
- package/dist/prompts/shared/git-rules.d.ts.map +1 -0
- package/dist/prompts/shared/git-rules.js +87 -0
- package/dist/prompts/shared/git-rules.js.map +1 -0
- package/dist/prompts/shared/language-rules.d.ts +4 -0
- package/dist/prompts/shared/language-rules.d.ts.map +1 -0
- package/dist/prompts/shared/language-rules.js +22 -0
- package/dist/prompts/shared/language-rules.js.map +1 -0
- package/dist/prompts/shared/tool-usage.d.ts +12 -0
- package/dist/prompts/shared/tool-usage.d.ts.map +1 -0
- package/dist/prompts/shared/tool-usage.js +51 -0
- package/dist/prompts/shared/tool-usage.js.map +1 -0
- package/dist/prompts/system/compact.d.ts +3 -0
- package/dist/prompts/system/compact.d.ts.map +1 -0
- package/dist/prompts/system/compact.js +73 -0
- package/dist/prompts/system/compact.js.map +1 -0
- package/dist/prompts/system/plan-execute.d.ts +3 -0
- package/dist/prompts/system/plan-execute.d.ts.map +1 -0
- package/dist/prompts/system/plan-execute.js +83 -0
- package/dist/prompts/system/plan-execute.js.map +1 -0
- package/dist/tools/browser/browser-client.d.ts +107 -0
- package/dist/tools/browser/browser-client.d.ts.map +1 -0
- package/dist/tools/browser/browser-client.js +958 -0
- package/dist/tools/browser/browser-client.js.map +1 -0
- package/dist/tools/browser/browser-tools.d.ts +17 -0
- package/dist/tools/browser/browser-tools.d.ts.map +1 -0
- package/dist/tools/browser/browser-tools.js +972 -0
- package/dist/tools/browser/browser-tools.js.map +1 -0
- package/dist/tools/browser/index.d.ts +7 -0
- package/dist/tools/browser/index.d.ts.map +1 -0
- package/dist/tools/browser/index.js +17 -0
- package/dist/tools/browser/index.js.map +1 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/llm/agents/docs-search-tools.d.ts +17 -0
- package/dist/tools/llm/agents/docs-search-tools.d.ts.map +1 -0
- package/dist/tools/llm/agents/docs-search-tools.js +265 -0
- package/dist/tools/llm/agents/docs-search-tools.js.map +1 -0
- package/dist/tools/llm/agents/index.d.ts +4 -0
- package/dist/tools/llm/agents/index.d.ts.map +1 -0
- package/dist/tools/llm/agents/index.js +3 -0
- package/dist/tools/llm/agents/index.js.map +1 -0
- package/dist/tools/llm/index.d.ts +3 -0
- package/dist/tools/llm/index.d.ts.map +1 -0
- package/dist/tools/llm/index.js +3 -0
- package/dist/tools/llm/index.js.map +1 -0
- package/dist/tools/llm/simple/ask-user-tool.d.ts +5 -0
- package/dist/tools/llm/simple/ask-user-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/ask-user-tool.js +7 -0
- package/dist/tools/llm/simple/ask-user-tool.js.map +1 -0
- package/dist/tools/llm/simple/background-bash-tool.d.ts +30 -0
- package/dist/tools/llm/simple/background-bash-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/background-bash-tool.js +323 -0
- package/dist/tools/llm/simple/background-bash-tool.js.map +1 -0
- package/dist/tools/llm/simple/background-powershell-tool.d.ts +30 -0
- package/dist/tools/llm/simple/background-powershell-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/background-powershell-tool.js +305 -0
- package/dist/tools/llm/simple/background-powershell-tool.js.map +1 -0
- package/dist/tools/llm/simple/bash-tool.d.ts +4 -0
- package/dist/tools/llm/simple/bash-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/bash-tool.js +178 -0
- package/dist/tools/llm/simple/bash-tool.js.map +1 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.d.ts +6 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.js +104 -0
- package/dist/tools/llm/simple/docs-search-agent-tool.js.map +1 -0
- package/dist/tools/llm/simple/file-tools.d.ts +13 -0
- package/dist/tools/llm/simple/file-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/file-tools.js +785 -0
- package/dist/tools/llm/simple/file-tools.js.map +1 -0
- package/dist/tools/llm/simple/final-response-tool.d.ts +12 -0
- package/dist/tools/llm/simple/final-response-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/final-response-tool.js +107 -0
- package/dist/tools/llm/simple/final-response-tool.js.map +1 -0
- package/dist/tools/llm/simple/index.d.ts +11 -0
- package/dist/tools/llm/simple/index.d.ts.map +1 -0
- package/dist/tools/llm/simple/index.js +20 -0
- package/dist/tools/llm/simple/index.js.map +1 -0
- package/dist/tools/llm/simple/planning-tools.d.ts +5 -0
- package/dist/tools/llm/simple/planning-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/planning-tools.js +117 -0
- package/dist/tools/llm/simple/planning-tools.js.map +1 -0
- package/dist/tools/llm/simple/powershell-tool.d.ts +4 -0
- package/dist/tools/llm/simple/powershell-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/powershell-tool.js +178 -0
- package/dist/tools/llm/simple/powershell-tool.js.map +1 -0
- package/dist/tools/llm/simple/simple-tool-executor.d.ts +38 -0
- package/dist/tools/llm/simple/simple-tool-executor.d.ts.map +1 -0
- package/dist/tools/llm/simple/simple-tool-executor.js +134 -0
- package/dist/tools/llm/simple/simple-tool-executor.js.map +1 -0
- package/dist/tools/llm/simple/todo-tools.d.ts +15 -0
- package/dist/tools/llm/simple/todo-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/todo-tools.js +145 -0
- package/dist/tools/llm/simple/todo-tools.js.map +1 -0
- package/dist/tools/llm/simple/user-interaction-tools.d.ts +22 -0
- package/dist/tools/llm/simple/user-interaction-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/user-interaction-tools.js +168 -0
- package/dist/tools/llm/simple/user-interaction-tools.js.map +1 -0
- package/dist/tools/office/common/constants.d.ts +194 -0
- package/dist/tools/office/common/constants.d.ts.map +1 -0
- package/dist/tools/office/common/constants.js +169 -0
- package/dist/tools/office/common/constants.js.map +1 -0
- package/dist/tools/office/common/index.d.ts +4 -0
- package/dist/tools/office/common/index.d.ts.map +1 -0
- package/dist/tools/office/common/index.js +3 -0
- package/dist/tools/office/common/index.js.map +1 -0
- package/dist/tools/office/common/types.d.ts +82 -0
- package/dist/tools/office/common/types.d.ts.map +1 -0
- package/dist/tools/office/common/types.js +2 -0
- package/dist/tools/office/common/types.js.map +1 -0
- package/dist/tools/office/common/utils.d.ts +14 -0
- package/dist/tools/office/common/utils.d.ts.map +1 -0
- package/dist/tools/office/common/utils.js +58 -0
- package/dist/tools/office/common/utils.js.map +1 -0
- package/dist/tools/office/excel-client.d.ts +123 -0
- package/dist/tools/office/excel-client.d.ts.map +1 -0
- package/dist/tools/office/excel-client.js +1037 -0
- package/dist/tools/office/excel-client.js.map +1 -0
- package/dist/tools/office/excel-tools/cells.d.ts +10 -0
- package/dist/tools/office/excel-tools/cells.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/cells.js +279 -0
- package/dist/tools/office/excel-tools/cells.js.map +1 -0
- package/dist/tools/office/excel-tools/charts.d.ts +6 -0
- package/dist/tools/office/excel-tools/charts.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/charts.js +124 -0
- package/dist/tools/office/excel-tools/charts.js.map +1 -0
- package/dist/tools/office/excel-tools/comments.d.ts +6 -0
- package/dist/tools/office/excel-tools/comments.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/comments.js +114 -0
- package/dist/tools/office/excel-tools/comments.js.map +1 -0
- package/dist/tools/office/excel-tools/data-ops.d.ts +10 -0
- package/dist/tools/office/excel-tools/data-ops.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/data-ops.js +266 -0
- package/dist/tools/office/excel-tools/data-ops.js.map +1 -0
- package/dist/tools/office/excel-tools/export.d.ts +5 -0
- package/dist/tools/office/excel-tools/export.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/export.js +75 -0
- package/dist/tools/office/excel-tools/export.js.map +1 -0
- package/dist/tools/office/excel-tools/formatting.d.ts +10 -0
- package/dist/tools/office/excel-tools/formatting.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/formatting.js +276 -0
- package/dist/tools/office/excel-tools/formatting.js.map +1 -0
- package/dist/tools/office/excel-tools/index.d.ts +16 -0
- package/dist/tools/office/excel-tools/index.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/index.js +42 -0
- package/dist/tools/office/excel-tools/index.js.map +1 -0
- package/dist/tools/office/excel-tools/launch.d.ts +10 -0
- package/dist/tools/office/excel-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/launch.js +248 -0
- package/dist/tools/office/excel-tools/launch.js.map +1 -0
- package/dist/tools/office/excel-tools/media.d.ts +5 -0
- package/dist/tools/office/excel-tools/media.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/media.js +84 -0
- package/dist/tools/office/excel-tools/media.js.map +1 -0
- package/dist/tools/office/excel-tools/named-ranges.d.ts +6 -0
- package/dist/tools/office/excel-tools/named-ranges.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/named-ranges.js +113 -0
- package/dist/tools/office/excel-tools/named-ranges.js.map +1 -0
- package/dist/tools/office/excel-tools/protection.d.ts +5 -0
- package/dist/tools/office/excel-tools/protection.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/protection.js +75 -0
- package/dist/tools/office/excel-tools/protection.js.map +1 -0
- package/dist/tools/office/excel-tools/rows-columns.d.ts +11 -0
- package/dist/tools/office/excel-tools/rows-columns.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/rows-columns.js +293 -0
- package/dist/tools/office/excel-tools/rows-columns.js.map +1 -0
- package/dist/tools/office/excel-tools/sheets.d.ts +8 -0
- package/dist/tools/office/excel-tools/sheets.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/sheets.js +177 -0
- package/dist/tools/office/excel-tools/sheets.js.map +1 -0
- package/dist/tools/office/excel-tools/validation.d.ts +7 -0
- package/dist/tools/office/excel-tools/validation.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/validation.js +175 -0
- package/dist/tools/office/excel-tools/validation.js.map +1 -0
- package/dist/tools/office/excel-tools.d.ts +3 -0
- package/dist/tools/office/excel-tools.d.ts.map +1 -0
- package/dist/tools/office/excel-tools.js +3 -0
- package/dist/tools/office/excel-tools.js.map +1 -0
- package/dist/tools/office/index.d.ts +6 -0
- package/dist/tools/office/index.d.ts.map +1 -0
- package/dist/tools/office/index.js +9 -0
- package/dist/tools/office/index.js.map +1 -0
- package/dist/tools/office/office-client-base.d.ts +31 -0
- package/dist/tools/office/office-client-base.d.ts.map +1 -0
- package/dist/tools/office/office-client-base.js +154 -0
- package/dist/tools/office/office-client-base.js.map +1 -0
- package/dist/tools/office/office-client.d.ts +196 -0
- package/dist/tools/office/office-client.d.ts.map +1 -0
- package/dist/tools/office/office-client.js +200 -0
- package/dist/tools/office/office-client.js.map +1 -0
- package/dist/tools/office/powerpoint-client.d.ts +135 -0
- package/dist/tools/office/powerpoint-client.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-client.js +1136 -0
- package/dist/tools/office/powerpoint-client.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/effects.d.ts +9 -0
- package/dist/tools/office/powerpoint-tools/effects.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/effects.js +246 -0
- package/dist/tools/office/powerpoint-tools/effects.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/export.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/export.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/export.js +108 -0
- package/dist/tools/office/powerpoint-tools/export.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/index.d.ts +13 -0
- package/dist/tools/office/powerpoint-tools/index.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/index.js +33 -0
- package/dist/tools/office/powerpoint-tools/index.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/launch.d.ts +9 -0
- package/dist/tools/office/powerpoint-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/launch.js +214 -0
- package/dist/tools/office/powerpoint-tools/launch.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/media.d.ts +8 -0
- package/dist/tools/office/powerpoint-tools/media.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/media.js +211 -0
- package/dist/tools/office/powerpoint-tools/media.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/notes.d.ts +8 -0
- package/dist/tools/office/powerpoint-tools/notes.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/notes.js +171 -0
- package/dist/tools/office/powerpoint-tools/notes.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/sections.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/sections.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/sections.js +104 -0
- package/dist/tools/office/powerpoint-tools/sections.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/shapes.d.ts +22 -0
- package/dist/tools/office/powerpoint-tools/shapes.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/shapes.js +681 -0
- package/dist/tools/office/powerpoint-tools/shapes.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/slides.d.ts +11 -0
- package/dist/tools/office/powerpoint-tools/slides.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/slides.js +283 -0
- package/dist/tools/office/powerpoint-tools/slides.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/tables.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/tables.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/tables.js +132 -0
- package/dist/tools/office/powerpoint-tools/tables.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/text.d.ts +12 -0
- package/dist/tools/office/powerpoint-tools/text.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/text.js +366 -0
- package/dist/tools/office/powerpoint-tools/text.js.map +1 -0
- package/dist/tools/office/powerpoint-tools.d.ts +3 -0
- package/dist/tools/office/powerpoint-tools.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools.js +3 -0
- package/dist/tools/office/powerpoint-tools.js.map +1 -0
- package/dist/tools/office/word-client.d.ts +147 -0
- package/dist/tools/office/word-client.d.ts.map +1 -0
- package/dist/tools/office/word-client.js +1341 -0
- package/dist/tools/office/word-client.js.map +1 -0
- package/dist/tools/office/word-tools/bookmarks.d.ts +7 -0
- package/dist/tools/office/word-tools/bookmarks.d.ts.map +1 -0
- package/dist/tools/office/word-tools/bookmarks.js +146 -0
- package/dist/tools/office/word-tools/bookmarks.js.map +1 -0
- package/dist/tools/office/word-tools/comments.d.ts +7 -0
- package/dist/tools/office/word-tools/comments.d.ts.map +1 -0
- package/dist/tools/office/word-tools/comments.js +146 -0
- package/dist/tools/office/word-tools/comments.js.map +1 -0
- package/dist/tools/office/word-tools/content.d.ts +7 -0
- package/dist/tools/office/word-tools/content.d.ts.map +1 -0
- package/dist/tools/office/word-tools/content.js +168 -0
- package/dist/tools/office/word-tools/content.js.map +1 -0
- package/dist/tools/office/word-tools/export.d.ts +5 -0
- package/dist/tools/office/word-tools/export.d.ts.map +1 -0
- package/dist/tools/office/word-tools/export.js +73 -0
- package/dist/tools/office/word-tools/export.js.map +1 -0
- package/dist/tools/office/word-tools/formatting.d.ts +6 -0
- package/dist/tools/office/word-tools/formatting.d.ts.map +1 -0
- package/dist/tools/office/word-tools/formatting.js +129 -0
- package/dist/tools/office/word-tools/formatting.js.map +1 -0
- package/dist/tools/office/word-tools/headers-footers.d.ts +6 -0
- package/dist/tools/office/word-tools/headers-footers.d.ts.map +1 -0
- package/dist/tools/office/word-tools/headers-footers.js +117 -0
- package/dist/tools/office/word-tools/headers-footers.js.map +1 -0
- package/dist/tools/office/word-tools/index.d.ts +16 -0
- package/dist/tools/office/word-tools/index.d.ts.map +1 -0
- package/dist/tools/office/word-tools/index.js +45 -0
- package/dist/tools/office/word-tools/index.js.map +1 -0
- package/dist/tools/office/word-tools/launch.d.ts +10 -0
- package/dist/tools/office/word-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/word-tools/launch.js +255 -0
- package/dist/tools/office/word-tools/launch.js.map +1 -0
- package/dist/tools/office/word-tools/lists.d.ts +5 -0
- package/dist/tools/office/word-tools/lists.d.ts.map +1 -0
- package/dist/tools/office/word-tools/lists.js +73 -0
- package/dist/tools/office/word-tools/lists.js.map +1 -0
- package/dist/tools/office/word-tools/navigation.d.ts +5 -0
- package/dist/tools/office/word-tools/navigation.d.ts.map +1 -0
- package/dist/tools/office/word-tools/navigation.js +85 -0
- package/dist/tools/office/word-tools/navigation.js.map +1 -0
- package/dist/tools/office/word-tools/page-setup.d.ts +7 -0
- package/dist/tools/office/word-tools/page-setup.d.ts.map +1 -0
- package/dist/tools/office/word-tools/page-setup.js +152 -0
- package/dist/tools/office/word-tools/page-setup.js.map +1 -0
- package/dist/tools/office/word-tools/tables.d.ts +8 -0
- package/dist/tools/office/word-tools/tables.d.ts.map +1 -0
- package/dist/tools/office/word-tools/tables.js +197 -0
- package/dist/tools/office/word-tools/tables.js.map +1 -0
- package/dist/tools/office/word-tools/text.d.ts +9 -0
- package/dist/tools/office/word-tools/text.d.ts.map +1 -0
- package/dist/tools/office/word-tools/text.js +235 -0
- package/dist/tools/office/word-tools/text.js.map +1 -0
- package/dist/tools/office/word-tools/undo-redo.d.ts +5 -0
- package/dist/tools/office/word-tools/undo-redo.d.ts.map +1 -0
- package/dist/tools/office/word-tools/undo-redo.js +73 -0
- package/dist/tools/office/word-tools/undo-redo.js.map +1 -0
- package/dist/tools/office/word-tools/watermarks.d.ts +5 -0
- package/dist/tools/office/word-tools/watermarks.d.ts.map +1 -0
- package/dist/tools/office/word-tools/watermarks.js +81 -0
- package/dist/tools/office/word-tools/watermarks.js.map +1 -0
- package/dist/tools/office/word-tools.d.ts +3 -0
- package/dist/tools/office/word-tools.d.ts.map +1 -0
- package/dist/tools/office/word-tools.js +3 -0
- package/dist/tools/office/word-tools.js.map +1 -0
- package/dist/tools/registry.d.ts +53 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +278 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +88 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +19 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/types/index.d.ts +126 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/PlanExecuteView.d.ts +11 -0
- package/dist/ui/PlanExecuteView.d.ts.map +1 -0
- package/dist/ui/PlanExecuteView.js +29 -0
- package/dist/ui/PlanExecuteView.js.map +1 -0
- package/dist/ui/TodoPanel.d.ts +13 -0
- package/dist/ui/TodoPanel.d.ts.map +1 -0
- package/dist/ui/TodoPanel.js +135 -0
- package/dist/ui/TodoPanel.js.map +1 -0
- package/dist/ui/UpdateNotification.d.ts +13 -0
- package/dist/ui/UpdateNotification.d.ts.map +1 -0
- package/dist/ui/UpdateNotification.js +42 -0
- package/dist/ui/UpdateNotification.js.map +1 -0
- package/dist/ui/components/ActivityIndicator.d.ts +25 -0
- package/dist/ui/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/ui/components/ActivityIndicator.js +115 -0
- package/dist/ui/components/ActivityIndicator.js.map +1 -0
- package/dist/ui/components/CommandBrowser.d.ts +10 -0
- package/dist/ui/components/CommandBrowser.d.ts.map +1 -0
- package/dist/ui/components/CommandBrowser.js +53 -0
- package/dist/ui/components/CommandBrowser.js.map +1 -0
- package/dist/ui/components/CustomTextInput.d.ts +13 -0
- package/dist/ui/components/CustomTextInput.d.ts.map +1 -0
- package/dist/ui/components/CustomTextInput.js +245 -0
- package/dist/ui/components/CustomTextInput.js.map +1 -0
- package/dist/ui/components/DocsSearchProgress.d.ts +13 -0
- package/dist/ui/components/DocsSearchProgress.d.ts.map +1 -0
- package/dist/ui/components/DocsSearchProgress.js +37 -0
- package/dist/ui/components/DocsSearchProgress.js.map +1 -0
- package/dist/ui/components/FileBrowser.d.ts +11 -0
- package/dist/ui/components/FileBrowser.d.ts.map +1 -0
- package/dist/ui/components/FileBrowser.js +45 -0
- package/dist/ui/components/FileBrowser.js.map +1 -0
- package/dist/ui/components/LLMSetupWizard.d.ts +8 -0
- package/dist/ui/components/LLMSetupWizard.d.ts.map +1 -0
- package/dist/ui/components/LLMSetupWizard.js +192 -0
- package/dist/ui/components/LLMSetupWizard.js.map +1 -0
- package/dist/ui/components/Logo.d.ts +19 -0
- package/dist/ui/components/Logo.d.ts.map +1 -0
- package/dist/ui/components/Logo.js +55 -0
- package/dist/ui/components/Logo.js.map +1 -0
- package/dist/ui/components/MarkdownRenderer.d.ts +9 -0
- package/dist/ui/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/ui/components/MarkdownRenderer.js +198 -0
- package/dist/ui/components/MarkdownRenderer.js.map +1 -0
- package/dist/ui/components/ModelSelector.d.ts +8 -0
- package/dist/ui/components/ModelSelector.d.ts.map +1 -0
- package/dist/ui/components/ModelSelector.js +111 -0
- package/dist/ui/components/ModelSelector.js.map +1 -0
- package/dist/ui/components/PlanExecuteApp.d.ts +23 -0
- package/dist/ui/components/PlanExecuteApp.d.ts.map +1 -0
- package/dist/ui/components/PlanExecuteApp.js +1324 -0
- package/dist/ui/components/PlanExecuteApp.js.map +1 -0
- package/dist/ui/components/ProgressBar.d.ts +10 -0
- package/dist/ui/components/ProgressBar.d.ts.map +1 -0
- package/dist/ui/components/ProgressBar.js +26 -0
- package/dist/ui/components/ProgressBar.js.map +1 -0
- package/dist/ui/components/StatusBar.d.ts +23 -0
- package/dist/ui/components/StatusBar.d.ts.map +1 -0
- package/dist/ui/components/StatusBar.js +162 -0
- package/dist/ui/components/StatusBar.js.map +1 -0
- package/dist/ui/components/ThinkingIndicator.d.ts +14 -0
- package/dist/ui/components/ThinkingIndicator.d.ts.map +1 -0
- package/dist/ui/components/ThinkingIndicator.js +63 -0
- package/dist/ui/components/ThinkingIndicator.js.map +1 -0
- package/dist/ui/components/TodoListView.d.ts +11 -0
- package/dist/ui/components/TodoListView.d.ts.map +1 -0
- package/dist/ui/components/TodoListView.js +69 -0
- package/dist/ui/components/TodoListView.js.map +1 -0
- package/dist/ui/components/ToolSelector.d.ts +7 -0
- package/dist/ui/components/ToolSelector.d.ts.map +1 -0
- package/dist/ui/components/ToolSelector.js +111 -0
- package/dist/ui/components/ToolSelector.js.map +1 -0
- package/dist/ui/components/dialogs/ApprovalDialog.d.ts +13 -0
- package/dist/ui/components/dialogs/ApprovalDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/ApprovalDialog.js +173 -0
- package/dist/ui/components/dialogs/ApprovalDialog.js.map +1 -0
- package/dist/ui/components/dialogs/AskUserDialog.d.ts +9 -0
- package/dist/ui/components/dialogs/AskUserDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/AskUserDialog.js +111 -0
- package/dist/ui/components/dialogs/AskUserDialog.js.map +1 -0
- package/dist/ui/components/dialogs/DocsBrowser.d.ts +8 -0
- package/dist/ui/components/dialogs/DocsBrowser.d.ts.map +1 -0
- package/dist/ui/components/dialogs/DocsBrowser.js +127 -0
- package/dist/ui/components/dialogs/DocsBrowser.js.map +1 -0
- package/dist/ui/components/dialogs/SettingsDialog.d.ts +10 -0
- package/dist/ui/components/dialogs/SettingsDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/SettingsDialog.js +563 -0
- package/dist/ui/components/dialogs/SettingsDialog.js.map +1 -0
- package/dist/ui/components/dialogs/index.d.ts +4 -0
- package/dist/ui/components/dialogs/index.d.ts.map +1 -0
- package/dist/ui/components/dialogs/index.js +4 -0
- package/dist/ui/components/dialogs/index.js.map +1 -0
- package/dist/ui/components/index.d.ts +12 -0
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/ui/components/index.js +9 -0
- package/dist/ui/components/index.js.map +1 -0
- package/dist/ui/components/panels/LogPanel.d.ts +7 -0
- package/dist/ui/components/panels/LogPanel.d.ts.map +1 -0
- package/dist/ui/components/panels/LogPanel.js +280 -0
- package/dist/ui/components/panels/LogPanel.js.map +1 -0
- package/dist/ui/components/panels/SessionPanel.d.ts +8 -0
- package/dist/ui/components/panels/SessionPanel.d.ts.map +1 -0
- package/dist/ui/components/panels/SessionPanel.js +81 -0
- package/dist/ui/components/panels/SessionPanel.js.map +1 -0
- package/dist/ui/components/panels/index.d.ts +4 -0
- package/dist/ui/components/panels/index.d.ts.map +1 -0
- package/dist/ui/components/panels/index.js +4 -0
- package/dist/ui/components/panels/index.js.map +1 -0
- package/dist/ui/components/views/ChatView.d.ts +12 -0
- package/dist/ui/components/views/ChatView.d.ts.map +1 -0
- package/dist/ui/components/views/ChatView.js +289 -0
- package/dist/ui/components/views/ChatView.js.map +1 -0
- package/dist/ui/components/views/index.d.ts +2 -0
- package/dist/ui/components/views/index.d.ts.map +1 -0
- package/dist/ui/components/views/index.js +2 -0
- package/dist/ui/components/views/index.js.map +1 -0
- package/dist/ui/contexts/TokenContext.d.ts +29 -0
- package/dist/ui/contexts/TokenContext.d.ts.map +1 -0
- package/dist/ui/contexts/TokenContext.js +79 -0
- package/dist/ui/contexts/TokenContext.js.map +1 -0
- package/dist/ui/hooks/atFileProcessor.d.ts +15 -0
- package/dist/ui/hooks/atFileProcessor.d.ts.map +1 -0
- package/dist/ui/hooks/atFileProcessor.js +88 -0
- package/dist/ui/hooks/atFileProcessor.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +8 -0
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +8 -0
- package/dist/ui/hooks/index.js.map +1 -0
- package/dist/ui/hooks/slashCommandProcessor.d.ts +21 -0
- package/dist/ui/hooks/slashCommandProcessor.d.ts.map +1 -0
- package/dist/ui/hooks/slashCommandProcessor.js +100 -0
- package/dist/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/ui/hooks/useCommandBrowserState.d.ts +12 -0
- package/dist/ui/hooks/useCommandBrowserState.d.ts.map +1 -0
- package/dist/ui/hooks/useCommandBrowserState.js +66 -0
- package/dist/ui/hooks/useCommandBrowserState.js.map +1 -0
- package/dist/ui/hooks/useFileBrowserState.d.ts +15 -0
- package/dist/ui/hooks/useFileBrowserState.d.ts.map +1 -0
- package/dist/ui/hooks/useFileBrowserState.js +80 -0
- package/dist/ui/hooks/useFileBrowserState.js.map +1 -0
- package/dist/ui/hooks/useFileList.d.ts +20 -0
- package/dist/ui/hooks/useFileList.d.ts.map +1 -0
- package/dist/ui/hooks/useFileList.js +57 -0
- package/dist/ui/hooks/useFileList.js.map +1 -0
- package/dist/ui/hooks/useInputHistory.d.ts +9 -0
- package/dist/ui/hooks/useInputHistory.d.ts.map +1 -0
- package/dist/ui/hooks/useInputHistory.js +68 -0
- package/dist/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/ui/hooks/usePlanExecution.d.ts +8 -0
- package/dist/ui/hooks/usePlanExecution.d.ts.map +1 -0
- package/dist/ui/hooks/usePlanExecution.js +214 -0
- package/dist/ui/hooks/usePlanExecution.js.map +1 -0
- package/dist/ui/index.d.ts +7 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +7 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/ink-entry.d.ts +3 -0
- package/dist/ui/ink-entry.d.ts.map +1 -0
- package/dist/ui/ink-entry.js +22 -0
- package/dist/ui/ink-entry.js.map +1 -0
- package/dist/utils/env-filter.d.ts +4 -0
- package/dist/utils/env-filter.d.ts.map +1 -0
- package/dist/utils/env-filter.js +101 -0
- package/dist/utils/env-filter.js.map +1 -0
- package/dist/utils/file-system.d.ts +9 -0
- package/dist/utils/file-system.d.ts.map +1 -0
- package/dist/utils/file-system.js +99 -0
- package/dist/utils/file-system.js.map +1 -0
- package/dist/utils/git-utils.d.ts +2 -0
- package/dist/utils/git-utils.d.ts.map +1 -0
- package/dist/utils/git-utils.js +16 -0
- package/dist/utils/git-utils.js.map +1 -0
- package/dist/utils/json-stream-logger.d.ts +74 -0
- package/dist/utils/json-stream-logger.d.ts.map +1 -0
- package/dist/utils/json-stream-logger.js +808 -0
- package/dist/utils/json-stream-logger.js.map +1 -0
- package/dist/utils/logger.d.ts +152 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +1672 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/platform-utils.d.ts +19 -0
- package/dist/utils/platform-utils.d.ts.map +1 -0
- package/dist/utils/platform-utils.js +134 -0
- package/dist/utils/platform-utils.js.map +1 -0
- package/dist/utils/wsl-utils.d.ts +4 -0
- package/dist/utils/wsl-utils.d.ts.map +1 -0
- package/dist/utils/wsl-utils.js +72 -0
- package/dist/utils/wsl-utils.js.map +1 -0
- package/electron.vite.config.ts +63 -0
- package/google374b9eba0c52b043.html +1 -0
- package/package.json +122 -0
- package/src/agents/base/base-agent.ts +159 -0
- package/src/agents/docs-search/index.ts +365 -0
- package/src/agents/index.ts +34 -0
- package/src/agents/planner/index.ts +544 -0
- package/src/cli.ts +201 -0
- package/src/constants.ts +47 -0
- package/src/core/compact/compact-manager.ts +160 -0
- package/src/core/compact/compact-prompts.ts +150 -0
- package/src/core/compact/context-tracker.ts +164 -0
- package/src/core/compact/index.ts +25 -0
- package/src/core/config/config-manager.ts +460 -0
- package/src/core/config/index.ts +5 -0
- package/src/core/docs-manager.ts +678 -0
- package/src/core/llm/index.ts +7 -0
- package/src/core/llm/llm-client.ts +1550 -0
- package/src/core/session/index.ts +5 -0
- package/src/core/session/session-manager.ts +464 -0
- package/src/core/slash-command-handler.ts +410 -0
- package/src/core/usage-tracker.ts +438 -0
- package/src/errors/base.ts +81 -0
- package/src/errors/file.ts +183 -0
- package/src/errors/index.ts +95 -0
- package/src/errors/llm.ts +151 -0
- package/src/errors/network.ts +124 -0
- package/src/errors/validation.ts +111 -0
- package/src/eval/eval-runner.ts +456 -0
- package/src/eval/index.ts +8 -0
- package/src/eval/types.ts +139 -0
- package/src/index.ts +22 -0
- package/src/orchestration/index.ts +30 -0
- package/src/orchestration/plan-executor.ts +652 -0
- package/src/orchestration/types.ts +127 -0
- package/src/orchestration/utils.ts +119 -0
- package/src/orquesta/connection.ts +291 -0
- package/src/prompts/agents/docs-search-decision.ts +74 -0
- package/src/prompts/agents/docs-search.ts +84 -0
- package/src/prompts/agents/planning.ts +143 -0
- package/src/prompts/index.ts +31 -0
- package/src/prompts/shared/codebase-rules.ts +29 -0
- package/src/prompts/shared/git-rules.ts +94 -0
- package/src/prompts/shared/language-rules.ts +36 -0
- package/src/prompts/shared/tool-usage.ts +72 -0
- package/src/prompts/system/compact.ts +80 -0
- package/src/prompts/system/plan-execute.ts +89 -0
- package/src/tools/browser/browser-client.ts +1363 -0
- package/src/tools/browser/browser-tools.ts +1139 -0
- package/src/tools/browser/index.ts +65 -0
- package/src/tools/index.ts +23 -0
- package/src/tools/llm/agents/docs-search-tools.ts +368 -0
- package/src/tools/llm/agents/index.ts +22 -0
- package/src/tools/llm/index.ts +11 -0
- package/src/tools/llm/simple/ask-user-tool.ts +25 -0
- package/src/tools/llm/simple/background-bash-tool.ts +443 -0
- package/src/tools/llm/simple/background-powershell-tool.ts +421 -0
- package/src/tools/llm/simple/bash-tool.ts +238 -0
- package/src/tools/llm/simple/docs-search-agent-tool.ts +146 -0
- package/src/tools/llm/simple/file-tools.ts +1051 -0
- package/src/tools/llm/simple/final-response-tool.ts +180 -0
- package/src/tools/llm/simple/index.ts +42 -0
- package/src/tools/llm/simple/planning-tools.ts +143 -0
- package/src/tools/llm/simple/powershell-tool.ts +241 -0
- package/src/tools/llm/simple/simple-tool-executor.ts +279 -0
- package/src/tools/llm/simple/todo-tools.ts +207 -0
- package/src/tools/llm/simple/user-interaction-tools.ts +277 -0
- package/src/tools/office/common/constants.ts +335 -0
- package/src/tools/office/common/index.ts +133 -0
- package/src/tools/office/common/types.ts +286 -0
- package/src/tools/office/common/utils.ts +116 -0
- package/src/tools/office/excel-client.ts +1336 -0
- package/src/tools/office/excel-tools/cells.ts +359 -0
- package/src/tools/office/excel-tools/charts.ts +166 -0
- package/src/tools/office/excel-tools/comments.ts +155 -0
- package/src/tools/office/excel-tools/data-ops.ts +349 -0
- package/src/tools/office/excel-tools/export.ts +105 -0
- package/src/tools/office/excel-tools/formatting.ts +357 -0
- package/src/tools/office/excel-tools/index.ts +55 -0
- package/src/tools/office/excel-tools/launch.ts +303 -0
- package/src/tools/office/excel-tools/media.ts +117 -0
- package/src/tools/office/excel-tools/named-ranges.ts +148 -0
- package/src/tools/office/excel-tools/protection.ts +105 -0
- package/src/tools/office/excel-tools/rows-columns.ts +386 -0
- package/src/tools/office/excel-tools/sheets.ts +228 -0
- package/src/tools/office/excel-tools/validation.ts +226 -0
- package/src/tools/office/excel-tools.ts +9 -0
- package/src/tools/office/index.ts +259 -0
- package/src/tools/office/office-client-base.ts +242 -0
- package/src/tools/office/office-client.ts +377 -0
- package/src/tools/office/powerpoint-client.ts +1498 -0
- package/src/tools/office/powerpoint-tools/effects.ts +315 -0
- package/src/tools/office/powerpoint-tools/export.ts +138 -0
- package/src/tools/office/powerpoint-tools/index.ts +45 -0
- package/src/tools/office/powerpoint-tools/launch.ts +263 -0
- package/src/tools/office/powerpoint-tools/media.ts +291 -0
- package/src/tools/office/powerpoint-tools/notes.ts +220 -0
- package/src/tools/office/powerpoint-tools/sections.ts +140 -0
- package/src/tools/office/powerpoint-tools/shapes.ts +870 -0
- package/src/tools/office/powerpoint-tools/slides.ts +350 -0
- package/src/tools/office/powerpoint-tools/tables.ts +182 -0
- package/src/tools/office/powerpoint-tools/text.ts +473 -0
- package/src/tools/office/powerpoint-tools.ts +9 -0
- package/src/tools/office/word-client.ts +1697 -0
- package/src/tools/office/word-tools/bookmarks.ts +186 -0
- package/src/tools/office/word-tools/comments.ts +185 -0
- package/src/tools/office/word-tools/content.ts +229 -0
- package/src/tools/office/word-tools/export.ts +97 -0
- package/src/tools/office/word-tools/formatting.ts +161 -0
- package/src/tools/office/word-tools/headers-footers.ts +155 -0
- package/src/tools/office/word-tools/index.ts +57 -0
- package/src/tools/office/word-tools/launch.ts +312 -0
- package/src/tools/office/word-tools/lists.ts +97 -0
- package/src/tools/office/word-tools/navigation.ts +114 -0
- package/src/tools/office/word-tools/page-setup.ts +195 -0
- package/src/tools/office/word-tools/tables.ts +262 -0
- package/src/tools/office/word-tools/text.ts +294 -0
- package/src/tools/office/word-tools/undo-redo.ts +97 -0
- package/src/tools/office/word-tools/watermarks.ts +105 -0
- package/src/tools/office/word-tools.ts +9 -0
- package/src/tools/registry.ts +527 -0
- package/src/tools/types.ts +231 -0
- package/src/types/index.ts +181 -0
- package/src/ui/PlanExecuteView.tsx +119 -0
- package/src/ui/TodoPanel.tsx +240 -0
- package/src/ui/UpdateNotification.tsx +105 -0
- package/src/ui/components/ActivityIndicator.tsx +234 -0
- package/src/ui/components/CommandBrowser.tsx +114 -0
- package/src/ui/components/CustomTextInput.tsx +389 -0
- package/src/ui/components/DocsSearchProgress.tsx +85 -0
- package/src/ui/components/FileBrowser.tsx +93 -0
- package/src/ui/components/LLMSetupWizard.tsx +333 -0
- package/src/ui/components/Logo.tsx +125 -0
- package/src/ui/components/MarkdownRenderer.tsx +358 -0
- package/src/ui/components/ModelSelector.tsx +203 -0
- package/src/ui/components/PlanExecuteApp.tsx +2007 -0
- package/src/ui/components/ProgressBar.tsx +51 -0
- package/src/ui/components/StatusBar.tsx +302 -0
- package/src/ui/components/ThinkingIndicator.tsx +120 -0
- package/src/ui/components/TodoListView.tsx +140 -0
- package/src/ui/components/ToolSelector.tsx +215 -0
- package/src/ui/components/dialogs/ApprovalDialog.tsx +259 -0
- package/src/ui/components/dialogs/AskUserDialog.tsx +159 -0
- package/src/ui/components/dialogs/DocsBrowser.tsx +222 -0
- package/src/ui/components/dialogs/SettingsDialog.tsx +939 -0
- package/src/ui/components/dialogs/index.ts +13 -0
- package/src/ui/components/index.ts +27 -0
- package/src/ui/components/panels/LogPanel.tsx +385 -0
- package/src/ui/components/panels/SessionPanel.tsx +146 -0
- package/src/ui/components/panels/index.ts +13 -0
- package/src/ui/components/views/ChatView.tsx +447 -0
- package/src/ui/components/views/index.ts +5 -0
- package/src/ui/contexts/TokenContext.tsx +139 -0
- package/src/ui/hooks/atFileProcessor.ts +167 -0
- package/src/ui/hooks/index.ts +11 -0
- package/src/ui/hooks/slashCommandProcessor.ts +174 -0
- package/src/ui/hooks/useCommandBrowserState.ts +97 -0
- package/src/ui/hooks/useFileBrowserState.ts +116 -0
- package/src/ui/hooks/useFileList.ts +132 -0
- package/src/ui/hooks/useInputHistory.ts +89 -0
- package/src/ui/hooks/usePlanExecution.ts +339 -0
- package/src/ui/index.ts +10 -0
- package/src/ui/ink-entry.tsx +36 -0
- package/src/utils/env-filter.ts +164 -0
- package/src/utils/file-system.ts +133 -0
- package/src/utils/git-utils.ts +30 -0
- package/src/utils/json-stream-logger.ts +1259 -0
- package/src/utils/logger.ts +2767 -0
- package/src/utils/platform-utils.ts +256 -0
- package/src/utils/wsl-utils.ts +113 -0
- package/tsconfig.electron.json +39 -0
- package/tsconfig.json +64 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestration Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for Plan & Execute workflow
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Message, TodoItem } from '../types/index.js';
|
|
8
|
+
import { LLMClient } from '../core/llm/llm-client.js';
|
|
9
|
+
import { CompactResult } from '../core/compact/index.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Execution phase
|
|
13
|
+
* Note: 'classifying' phase removed - all requests now go through planning
|
|
14
|
+
*/
|
|
15
|
+
export type ExecutionPhase = 'idle' | 'planning' | 'executing' | 'compacting';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Plan Execution state
|
|
19
|
+
*/
|
|
20
|
+
export interface PlanExecutionState {
|
|
21
|
+
todos: TodoItem[];
|
|
22
|
+
currentTodoId: string | undefined;
|
|
23
|
+
executionPhase: ExecutionPhase;
|
|
24
|
+
isInterrupted: boolean;
|
|
25
|
+
currentActivity: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Ask User request
|
|
30
|
+
* - options: 2-4 choices provided by LLM
|
|
31
|
+
* - "Other (direct input)" option is automatically added by UI
|
|
32
|
+
*/
|
|
33
|
+
export interface AskUserRequest {
|
|
34
|
+
question: string;
|
|
35
|
+
options: string[]; // 2-4 choices (decided by LLM)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Ask User response
|
|
40
|
+
*/
|
|
41
|
+
export interface AskUserResponse {
|
|
42
|
+
selectedOption: string;
|
|
43
|
+
isOther: boolean;
|
|
44
|
+
customText?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Ask User state
|
|
49
|
+
*/
|
|
50
|
+
export interface AskUserState {
|
|
51
|
+
askUserRequest: AskUserRequest | null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* State update callbacks
|
|
56
|
+
*/
|
|
57
|
+
export interface StateCallbacks {
|
|
58
|
+
setTodos: (todos: TodoItem[] | ((prev: TodoItem[]) => TodoItem[])) => void;
|
|
59
|
+
setCurrentTodoId: (id: string | undefined | ((prev: string | undefined) => string | undefined)) => void;
|
|
60
|
+
setExecutionPhase: (phase: ExecutionPhase) => void;
|
|
61
|
+
setIsInterrupted: (interrupted: boolean) => void;
|
|
62
|
+
setCurrentActivity: (activity: string) => void;
|
|
63
|
+
setMessages: (messages: Message[] | ((prev: Message[]) => Message[])) => void;
|
|
64
|
+
setAskUserRequest: (request: AskUserRequest | null) => void;
|
|
65
|
+
// Planning LLM ask-user callback (Promise-based for planning phase)
|
|
66
|
+
askUser?: (request: AskUserRequest) => Promise<AskUserResponse>;
|
|
67
|
+
// Pending user message callbacks (for injecting messages during execution)
|
|
68
|
+
getPendingMessage?: () => string | null;
|
|
69
|
+
clearPendingMessage?: () => void;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Execution context
|
|
74
|
+
*/
|
|
75
|
+
export interface ExecutionContext {
|
|
76
|
+
llmClient: LLMClient;
|
|
77
|
+
messages: Message[];
|
|
78
|
+
todos: TodoItem[];
|
|
79
|
+
isInterruptedRef: { current: boolean };
|
|
80
|
+
callbacks: StateCallbacks;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Execution result
|
|
85
|
+
*/
|
|
86
|
+
export interface ExecutionResult {
|
|
87
|
+
success: boolean;
|
|
88
|
+
messages: Message[];
|
|
89
|
+
error?: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Plan Execution Actions interface
|
|
94
|
+
*/
|
|
95
|
+
export interface PlanExecutionActions {
|
|
96
|
+
setTodos: (todos: TodoItem[] | ((prev: TodoItem[]) => TodoItem[])) => void;
|
|
97
|
+
handleTodoUpdate: (todo: TodoItem) => void;
|
|
98
|
+
handleAskUserResponse: (response: AskUserResponse) => void;
|
|
99
|
+
handleInterrupt: () => 'paused' | 'stopped' | 'none';
|
|
100
|
+
executeAutoMode: (
|
|
101
|
+
userMessage: string,
|
|
102
|
+
llmClient: LLMClient,
|
|
103
|
+
messages: Message[],
|
|
104
|
+
setMessages: (messages: Message[] | ((prev: Message[]) => Message[])) => void
|
|
105
|
+
) => Promise<void>;
|
|
106
|
+
executePlanMode: (
|
|
107
|
+
userMessage: string,
|
|
108
|
+
llmClient: LLMClient,
|
|
109
|
+
messages: Message[],
|
|
110
|
+
setMessages: (messages: Message[] | ((prev: Message[]) => Message[])) => void
|
|
111
|
+
) => Promise<void>;
|
|
112
|
+
resumeTodoExecution: (
|
|
113
|
+
userMessage: string,
|
|
114
|
+
llmClient: LLMClient,
|
|
115
|
+
messages: Message[],
|
|
116
|
+
setMessages: (messages: Message[] | ((prev: Message[]) => Message[])) => void
|
|
117
|
+
) => Promise<void>;
|
|
118
|
+
// executeDirectMode removed - all requests now use Plan Mode
|
|
119
|
+
performCompact: (
|
|
120
|
+
llmClient: LLMClient,
|
|
121
|
+
messages: Message[],
|
|
122
|
+
setMessages: (messages: Message[] | ((prev: Message[]) => Message[])) => void
|
|
123
|
+
) => Promise<CompactResult>;
|
|
124
|
+
shouldAutoCompact: () => boolean;
|
|
125
|
+
getContextRemainingPercent: () => number;
|
|
126
|
+
getContextUsageInfo: () => { tokens: number; percent: number };
|
|
127
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestration Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for Plan & Execute workflow
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { TodoItem } from '../types/index.js';
|
|
8
|
+
import { BaseError } from '../errors/base.js';
|
|
9
|
+
import { logger } from '../utils/logger.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Format error for display as string
|
|
13
|
+
*/
|
|
14
|
+
export function formatErrorMessage(error: unknown): string {
|
|
15
|
+
logger.enter('formatErrorMessage');
|
|
16
|
+
|
|
17
|
+
if (error instanceof BaseError) {
|
|
18
|
+
let message = `❌ ${error.getUserMessage()}\n`;
|
|
19
|
+
message += `\n📋 Error Code: ${error.code}`;
|
|
20
|
+
|
|
21
|
+
if (error.details && Object.keys(error.details).length > 0) {
|
|
22
|
+
message += `\n\n🔍 Details:`;
|
|
23
|
+
for (const [key, value] of Object.entries(error.details)) {
|
|
24
|
+
if (key === 'fullError') continue;
|
|
25
|
+
if (typeof value === 'object') {
|
|
26
|
+
message += `\n • ${key}: ${JSON.stringify(value, null, 2)}`;
|
|
27
|
+
} else {
|
|
28
|
+
message += `\n • ${key}: ${value}`;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (error.isRecoverable) {
|
|
34
|
+
message += `\n\n💡 This error is recoverable. Please try again.`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message += `\n\n🕐 Time: ${error.timestamp.toLocaleString('en-US')}`;
|
|
38
|
+
logger.exit('formatErrorMessage', { isBaseError: true });
|
|
39
|
+
return message;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (error instanceof Error) {
|
|
43
|
+
// Only show error message, hide stack trace from user
|
|
44
|
+
const message = `❌ Error: ${error.message}`;
|
|
45
|
+
logger.exit('formatErrorMessage', { isError: true });
|
|
46
|
+
return message;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
logger.exit('formatErrorMessage', { isUnknown: true });
|
|
50
|
+
return `❌ Unknown Error: ${String(error)}`;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Build TODO context for LLM
|
|
55
|
+
* Not saved in conversation history, only added during LLM invocation
|
|
56
|
+
*/
|
|
57
|
+
export function buildTodoContext(todos: TodoItem[]): string {
|
|
58
|
+
if (todos.length === 0) return '';
|
|
59
|
+
|
|
60
|
+
const completedCount = todos.filter(t => t.status === 'completed').length;
|
|
61
|
+
const inProgressCount = todos.filter(t => t.status === 'in_progress').length;
|
|
62
|
+
const pendingCount = todos.filter(t => t.status === 'pending').length;
|
|
63
|
+
|
|
64
|
+
const todoList = todos.map((todo, idx) => {
|
|
65
|
+
const statusIcon = todo.status === 'completed' ? '✅' :
|
|
66
|
+
todo.status === 'in_progress' ? '🔄' :
|
|
67
|
+
todo.status === 'failed' ? '❌' : '⏳';
|
|
68
|
+
return `${idx + 1}. ${statusIcon} [${todo.status.toUpperCase()}] ${todo.title}`;
|
|
69
|
+
}).join('\n');
|
|
70
|
+
|
|
71
|
+
return `
|
|
72
|
+
---
|
|
73
|
+
## 📋 Current TODO List (${completedCount}/${todos.length} completed)
|
|
74
|
+
|
|
75
|
+
${todoList}
|
|
76
|
+
|
|
77
|
+
${pendingCount > 0 || inProgressCount > 0
|
|
78
|
+
? `**⚠️ CRITICAL: You MUST use write_todos tool to update TODO status.**
|
|
79
|
+
- When starting a task: call write_todos with status "in_progress"
|
|
80
|
+
- When completing a task: call write_todos with status "completed"
|
|
81
|
+
- Do NOT skip calling write_todos - execution will stall without it.
|
|
82
|
+
- After finishing current in_progress task, immediately mark it completed and start next pending task.`
|
|
83
|
+
: '**All TODOs are completed! Provide a brief summary of what was accomplished.**'}
|
|
84
|
+
---`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Check if all TODOs are completed
|
|
89
|
+
* Empty array is considered complete
|
|
90
|
+
*/
|
|
91
|
+
export function areAllTodosCompleted(todos: TodoItem[]): boolean {
|
|
92
|
+
return todos.every(t => t.status === 'completed' || t.status === 'failed');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Find currently in-progress or pending TODO
|
|
97
|
+
*/
|
|
98
|
+
export function findActiveTodo(todos: TodoItem[]): TodoItem | undefined {
|
|
99
|
+
return todos.find(t => t.status === 'in_progress') || todos.find(t => t.status === 'pending');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Calculate TODO statistics
|
|
104
|
+
*/
|
|
105
|
+
export function getTodoStats(todos: TodoItem[]): {
|
|
106
|
+
total: number;
|
|
107
|
+
completed: number;
|
|
108
|
+
failed: number;
|
|
109
|
+
pending: number;
|
|
110
|
+
inProgress: number;
|
|
111
|
+
} {
|
|
112
|
+
return {
|
|
113
|
+
total: todos.length,
|
|
114
|
+
completed: todos.filter(t => t.status === 'completed').length,
|
|
115
|
+
failed: todos.filter(t => t.status === 'failed').length,
|
|
116
|
+
pending: todos.filter(t => t.status === 'pending').length,
|
|
117
|
+
inProgress: todos.filter(t => t.status === 'in_progress').length,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orquesta Connection Module
|
|
3
|
+
* Handles connection to Orquesta dashboard for session tracking and team collaboration
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { createClient, SupabaseClient, RealtimeChannel } from '@supabase/supabase-js'
|
|
7
|
+
import * as os from 'os'
|
|
8
|
+
import WebSocket from 'ws'
|
|
9
|
+
|
|
10
|
+
// Polyfill WebSocket for Node.js
|
|
11
|
+
if (typeof globalThis.WebSocket === 'undefined') {
|
|
12
|
+
// @ts-expect-error - ws is compatible with the WebSocket API
|
|
13
|
+
globalThis.WebSocket = WebSocket
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const ORQUESTA_API = process.env['ORQUESTA_API_URL'] || 'https://orquesta.live'
|
|
17
|
+
|
|
18
|
+
interface ValidationResponse {
|
|
19
|
+
valid: boolean
|
|
20
|
+
projectId?: string
|
|
21
|
+
projectName?: string
|
|
22
|
+
tokenName?: string
|
|
23
|
+
supabaseUrl?: string
|
|
24
|
+
supabaseAnonKey?: string
|
|
25
|
+
channelName?: string
|
|
26
|
+
error?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface ConnectionInfo {
|
|
30
|
+
projectId: string
|
|
31
|
+
projectName: string
|
|
32
|
+
tokenName: string
|
|
33
|
+
supabaseUrl: string
|
|
34
|
+
supabaseAnonKey: string
|
|
35
|
+
channelName: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export class OrquestaConnection {
|
|
39
|
+
private supabase: SupabaseClient | null = null
|
|
40
|
+
private channel: RealtimeChannel | null = null
|
|
41
|
+
private connectionInfo: ConnectionInfo | null = null
|
|
42
|
+
private connected = false
|
|
43
|
+
private heartbeatInterval: NodeJS.Timeout | null = null
|
|
44
|
+
|
|
45
|
+
constructor(private token: string) {}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Validate token and establish connection to Orquesta
|
|
49
|
+
*/
|
|
50
|
+
async connect(): Promise<{ success: boolean; projectName?: string; error?: string }> {
|
|
51
|
+
try {
|
|
52
|
+
// Validate token with Orquesta API
|
|
53
|
+
const validation = await this.validateToken()
|
|
54
|
+
|
|
55
|
+
if (!validation.valid || !validation.supabaseUrl || !validation.supabaseAnonKey) {
|
|
56
|
+
return {
|
|
57
|
+
success: false,
|
|
58
|
+
error: validation.error || 'Invalid response from server'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
this.connectionInfo = {
|
|
63
|
+
projectId: validation.projectId!,
|
|
64
|
+
projectName: validation.projectName!,
|
|
65
|
+
tokenName: validation.tokenName!,
|
|
66
|
+
supabaseUrl: validation.supabaseUrl,
|
|
67
|
+
supabaseAnonKey: validation.supabaseAnonKey,
|
|
68
|
+
channelName: validation.channelName!,
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Create Supabase client
|
|
72
|
+
this.supabase = createClient(validation.supabaseUrl, validation.supabaseAnonKey, {
|
|
73
|
+
realtime: {
|
|
74
|
+
params: {
|
|
75
|
+
eventsPerSecond: 50,
|
|
76
|
+
},
|
|
77
|
+
timeout: 30000,
|
|
78
|
+
heartbeatIntervalMs: 15000,
|
|
79
|
+
},
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
// Subscribe to channel for presence tracking
|
|
83
|
+
await this.subscribeToChannel()
|
|
84
|
+
|
|
85
|
+
// Start heartbeat
|
|
86
|
+
this.startHeartbeat()
|
|
87
|
+
|
|
88
|
+
this.connected = true
|
|
89
|
+
return {
|
|
90
|
+
success: true,
|
|
91
|
+
projectName: validation.projectName
|
|
92
|
+
}
|
|
93
|
+
} catch (err) {
|
|
94
|
+
const message = err instanceof Error ? err.message : 'Unknown error'
|
|
95
|
+
return {
|
|
96
|
+
success: false,
|
|
97
|
+
error: message
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Disconnect from Orquesta
|
|
104
|
+
*/
|
|
105
|
+
async disconnect(): Promise<void> {
|
|
106
|
+
this.connected = false
|
|
107
|
+
|
|
108
|
+
// Stop heartbeat
|
|
109
|
+
if (this.heartbeatInterval) {
|
|
110
|
+
clearInterval(this.heartbeatInterval)
|
|
111
|
+
this.heartbeatInterval = null
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Unsubscribe from channel
|
|
115
|
+
if (this.channel) {
|
|
116
|
+
await this.channel.unsubscribe()
|
|
117
|
+
this.channel = null
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Mark as disconnected via API
|
|
121
|
+
if (this.token) {
|
|
122
|
+
try {
|
|
123
|
+
await fetch(`${ORQUESTA_API}/api/agent/validate`, {
|
|
124
|
+
method: 'DELETE',
|
|
125
|
+
headers: { 'Content-Type': 'application/json' },
|
|
126
|
+
body: JSON.stringify({ token: this.token }),
|
|
127
|
+
})
|
|
128
|
+
} catch {
|
|
129
|
+
// Ignore errors on disconnect
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Get connection status
|
|
136
|
+
*/
|
|
137
|
+
isConnected(): boolean {
|
|
138
|
+
return this.connected
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Get project information
|
|
143
|
+
*/
|
|
144
|
+
getProjectInfo(): { projectId: string; projectName: string } | null {
|
|
145
|
+
if (!this.connectionInfo) return null
|
|
146
|
+
return {
|
|
147
|
+
projectId: this.connectionInfo.projectId,
|
|
148
|
+
projectName: this.connectionInfo.projectName
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Send session event to dashboard
|
|
154
|
+
*/
|
|
155
|
+
async sendSessionEvent(event: {
|
|
156
|
+
type: 'session_start' | 'session_message' | 'session_end' | 'plan_created' | 'plan_updated'
|
|
157
|
+
data: Record<string, unknown>
|
|
158
|
+
}): Promise<void> {
|
|
159
|
+
if (!this.channel || !this.connected) {
|
|
160
|
+
console.warn('Not connected to Orquesta - session event not sent')
|
|
161
|
+
return
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
await this.channel.send({
|
|
165
|
+
type: 'broadcast',
|
|
166
|
+
event: event.type,
|
|
167
|
+
payload: {
|
|
168
|
+
...event.data,
|
|
169
|
+
timestamp: Date.now(),
|
|
170
|
+
},
|
|
171
|
+
})
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Private: Validate token with Orquesta API
|
|
176
|
+
*/
|
|
177
|
+
private async validateToken(): Promise<ValidationResponse> {
|
|
178
|
+
const agentInfo = {
|
|
179
|
+
hostname: os.hostname(),
|
|
180
|
+
os: `${os.type()} ${os.release()}`,
|
|
181
|
+
platform: os.platform(),
|
|
182
|
+
type: 'orquesta-cli', // Identify as CLI, not agent
|
|
183
|
+
workingDirectory: process.cwd(),
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const response = await fetch(`${ORQUESTA_API}/api/agent/validate`, {
|
|
187
|
+
method: 'POST',
|
|
188
|
+
headers: { 'Content-Type': 'application/json' },
|
|
189
|
+
body: JSON.stringify({ token: this.token, agentInfo }),
|
|
190
|
+
})
|
|
191
|
+
|
|
192
|
+
const data = await response.json() as ValidationResponse
|
|
193
|
+
|
|
194
|
+
if (!data.valid) {
|
|
195
|
+
throw new Error(data.error || 'Invalid token')
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return data
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Private: Subscribe to Realtime channel
|
|
203
|
+
*/
|
|
204
|
+
private async subscribeToChannel(): Promise<void> {
|
|
205
|
+
if (!this.supabase || !this.connectionInfo) {
|
|
206
|
+
throw new Error('Supabase client not initialized')
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const agentInfo = {
|
|
210
|
+
hostname: os.hostname(),
|
|
211
|
+
os: `${os.type()} ${os.release()}`,
|
|
212
|
+
platform: os.platform(),
|
|
213
|
+
type: 'orquesta-cli',
|
|
214
|
+
workingDirectory: process.cwd(),
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
this.channel = this.supabase.channel(this.connectionInfo.channelName, {
|
|
218
|
+
config: {
|
|
219
|
+
broadcast: { self: true, ack: true },
|
|
220
|
+
presence: { key: agentInfo.hostname },
|
|
221
|
+
},
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
// Listen for team collaboration events (optional - for future features)
|
|
225
|
+
this.channel.on('broadcast', { event: 'team_message' }, ({ payload }) => {
|
|
226
|
+
console.log('Team message:', payload)
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
// Subscribe and track presence
|
|
230
|
+
return new Promise((resolve, reject) => {
|
|
231
|
+
this.channel!.subscribe(async (status) => {
|
|
232
|
+
if (status === 'SUBSCRIBED') {
|
|
233
|
+
await this.channel!.track({
|
|
234
|
+
...agentInfo,
|
|
235
|
+
connectedAt: new Date().toISOString(),
|
|
236
|
+
})
|
|
237
|
+
resolve()
|
|
238
|
+
} else if (status === 'CHANNEL_ERROR' || status === 'TIMED_OUT') {
|
|
239
|
+
reject(new Error(`Channel subscription failed: ${status}`))
|
|
240
|
+
}
|
|
241
|
+
})
|
|
242
|
+
})
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Private: Start heartbeat to keep connection alive
|
|
247
|
+
*/
|
|
248
|
+
private startHeartbeat(): void {
|
|
249
|
+
this.heartbeatInterval = setInterval(async () => {
|
|
250
|
+
try {
|
|
251
|
+
await fetch(`${ORQUESTA_API}/api/agent/heartbeat`, {
|
|
252
|
+
method: 'POST',
|
|
253
|
+
headers: { 'Content-Type': 'application/json' },
|
|
254
|
+
body: JSON.stringify({ token: this.token }),
|
|
255
|
+
})
|
|
256
|
+
} catch {
|
|
257
|
+
// Ignore heartbeat errors
|
|
258
|
+
}
|
|
259
|
+
}, 60000) // Every 60 seconds
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Global connection instance
|
|
265
|
+
*/
|
|
266
|
+
let orquestaConnection: OrquestaConnection | null = null
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Initialize Orquesta connection
|
|
270
|
+
*/
|
|
271
|
+
export async function initOrquestaConnection(token: string): Promise<{ success: boolean; projectName?: string; error?: string }> {
|
|
272
|
+
orquestaConnection = new OrquestaConnection(token)
|
|
273
|
+
return await orquestaConnection.connect()
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Get current Orquesta connection
|
|
278
|
+
*/
|
|
279
|
+
export function getOrquestaConnection(): OrquestaConnection | null {
|
|
280
|
+
return orquestaConnection
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Disconnect from Orquesta
|
|
285
|
+
*/
|
|
286
|
+
export async function disconnectOrquesta(): Promise<void> {
|
|
287
|
+
if (orquestaConnection) {
|
|
288
|
+
await orquestaConnection.disconnect()
|
|
289
|
+
orquestaConnection = null
|
|
290
|
+
}
|
|
291
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Documentation Search Decision Prompt
|
|
3
|
+
*
|
|
4
|
+
* LLM-based decision for whether to search local documentation.
|
|
5
|
+
* Returns Yes/No based on user message and available folder structure.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* System prompt for docs search decision
|
|
10
|
+
*/
|
|
11
|
+
export const DOCS_SEARCH_DECISION_PROMPT = `You are a documentation search classifier.
|
|
12
|
+
|
|
13
|
+
## IMPORTANT: Offline Environment
|
|
14
|
+
This is an OFFLINE environment with NO external internet access.
|
|
15
|
+
The ONLY way to get up-to-date information is by searching the local documentation below.
|
|
16
|
+
|
|
17
|
+
## Available Documentation (depth 1):
|
|
18
|
+
{folder_structure}
|
|
19
|
+
|
|
20
|
+
## Rules:
|
|
21
|
+
- Answer ONLY "Yes" or "No" - nothing else
|
|
22
|
+
- Answer "Yes" ONLY when BOTH conditions are met:
|
|
23
|
+
1. The user needs up-to-date or specific information (API docs, framework usage, library features, etc.)
|
|
24
|
+
2. There is a folder name above that looks relevant to the topic
|
|
25
|
+
- Answer "No" if:
|
|
26
|
+
- The question is about general coding/logic that doesn't need docs
|
|
27
|
+
- No folder above seems related to the user's topic
|
|
28
|
+
- The user is asking about this project's own codebase (not external docs)
|
|
29
|
+
- When in doubt, answer "No" (avoid unnecessary searches)
|
|
30
|
+
|
|
31
|
+
## User Message:
|
|
32
|
+
{user_message}
|
|
33
|
+
|
|
34
|
+
Your Answer (Yes or No):`;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Retry prompt when response is not Yes/No
|
|
38
|
+
*/
|
|
39
|
+
export const DOCS_SEARCH_DECISION_RETRY_PROMPT = `Your previous response was not valid. You must answer with exactly "Yes" or "No".
|
|
40
|
+
|
|
41
|
+
Should the documentation be searched for this question?
|
|
42
|
+
|
|
43
|
+
Answer (Yes or No):`;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Build the decision prompt with folder structure and user message
|
|
47
|
+
*/
|
|
48
|
+
export function buildDocsSearchDecisionPrompt(
|
|
49
|
+
folderStructure: string,
|
|
50
|
+
userMessage: string
|
|
51
|
+
): string {
|
|
52
|
+
return DOCS_SEARCH_DECISION_PROMPT
|
|
53
|
+
.replace('{folder_structure}', folderStructure)
|
|
54
|
+
.replace('{user_message}', userMessage);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Parse Yes/No response from LLM
|
|
59
|
+
* @returns true for Yes, false for No, null for invalid
|
|
60
|
+
*/
|
|
61
|
+
export function parseDocsSearchDecision(response: string): boolean | null {
|
|
62
|
+
const normalized = response.trim().toLowerCase();
|
|
63
|
+
|
|
64
|
+
if (normalized === 'yes' || normalized.startsWith('yes')) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
if (normalized === 'no' || normalized.startsWith('no')) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export default DOCS_SEARCH_DECISION_PROMPT;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Documentation Search Agent Prompt
|
|
3
|
+
*
|
|
4
|
+
* Redesigned for hierarchical folder navigation approach.
|
|
5
|
+
* Uses list_directory, read_docs_file, preview_file, tell_to_user, submit_findings tools.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* System prompt for documentation search agent
|
|
10
|
+
*/
|
|
11
|
+
export const DOCS_SEARCH_SYSTEM_PROMPT = `You are a documentation search expert. Your task is to find relevant information in ~/.local-cli/docs by navigating its hierarchical folder structure.
|
|
12
|
+
|
|
13
|
+
## Documentation Structure
|
|
14
|
+
|
|
15
|
+
The docs folder is organized hierarchically:
|
|
16
|
+
- **Top-level folders** = Major categories (e.g., agent_framework/, tutorials/, reference/)
|
|
17
|
+
- **Sub-folders** = Specific topics or frameworks (e.g., agno/, langchain/)
|
|
18
|
+
- **Files** = Documentation in markdown format (.md)
|
|
19
|
+
|
|
20
|
+
Navigate by exploring folder names to understand what's available, then drill down to find relevant content.
|
|
21
|
+
|
|
22
|
+
## Available Tools
|
|
23
|
+
|
|
24
|
+
1. **list_directory** - List contents of a folder
|
|
25
|
+
- Use this to explore the folder structure
|
|
26
|
+
- Start from root ("") and navigate deeper based on folder names
|
|
27
|
+
|
|
28
|
+
2. **read_docs_file** - Read entire file content
|
|
29
|
+
- Use after identifying a relevant file
|
|
30
|
+
- Good for smaller files or when you need full context
|
|
31
|
+
|
|
32
|
+
3. **preview_file** - Read first N lines of a file
|
|
33
|
+
- Use to quickly check if a file is relevant before reading fully
|
|
34
|
+
- Saves time on large documents
|
|
35
|
+
|
|
36
|
+
4. **tell_to_user** - Send progress update to user
|
|
37
|
+
- Keep the user informed about what you're doing
|
|
38
|
+
- Use for significant progress (found relevant folder, reading important file, etc.)
|
|
39
|
+
|
|
40
|
+
5. **submit_findings** - Submit final report and terminate
|
|
41
|
+
- Call this when you have gathered enough information
|
|
42
|
+
- This is the ONLY way to complete the search
|
|
43
|
+
- Include summary, detailed findings, and source files
|
|
44
|
+
|
|
45
|
+
## Search Strategy
|
|
46
|
+
|
|
47
|
+
1. **Start broad**: List root directory to understand available categories
|
|
48
|
+
2. **Navigate by relevance**: Choose folders whose names match the query topic
|
|
49
|
+
3. **Read multiple files**: Information may be spread across several documents
|
|
50
|
+
4. **Preview before reading**: For large files, preview first to check relevance
|
|
51
|
+
5. **Keep user informed**: Use tell_to_user for significant findings
|
|
52
|
+
6. **Submit when ready**: Call submit_findings when you have enough information
|
|
53
|
+
|
|
54
|
+
## Important Rules
|
|
55
|
+
|
|
56
|
+
- **No iteration limit**: Take as many steps as needed to find good information
|
|
57
|
+
- **Be thorough**: Check 2-5 potentially relevant documents when possible
|
|
58
|
+
- **Must call submit_findings**: This is the only way to complete the search
|
|
59
|
+
- **Respond in user's language**: Match the language of the user's query
|
|
60
|
+
|
|
61
|
+
## Example Flow
|
|
62
|
+
|
|
63
|
+
1. list_directory("") → See top-level categories
|
|
64
|
+
2. list_directory("agent_framework") → Explore relevant category
|
|
65
|
+
3. tell_to_user("Found agent_framework folder, exploring...")
|
|
66
|
+
4. list_directory("agent_framework/agno") → Drill down
|
|
67
|
+
5. preview_file("agent_framework/agno/overview.md", 30) → Check relevance
|
|
68
|
+
6. read_docs_file("agent_framework/agno/overview.md") → Read full content
|
|
69
|
+
7. read_docs_file("agent_framework/agno/examples.md") → Read related file
|
|
70
|
+
8. submit_findings(summary, findings, sources) → Complete search
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Build user message for docs search
|
|
75
|
+
*/
|
|
76
|
+
export function buildDocsSearchUserMessage(query: string): string {
|
|
77
|
+
return `Find information about the following topic in the documentation:
|
|
78
|
+
|
|
79
|
+
${query}
|
|
80
|
+
|
|
81
|
+
Start by listing the root directory to understand the available documentation structure.`;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export default DOCS_SEARCH_SYSTEM_PROMPT;
|