@travisennis/acai 0.0.9 → 0.0.11
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/README.md +51 -760
- package/bin/acai +52 -0
- package/dist/agent/index.d.ts +12 -2
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +380 -199
- package/dist/agent/sub-agent.d.ts +23 -0
- package/dist/agent/sub-agent.d.ts.map +1 -0
- package/dist/agent/sub-agent.js +109 -0
- package/dist/cli/index.d.ts +26 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/{cli.js → cli/index.js} +84 -77
- package/dist/{stdin.d.ts → cli/stdin.d.ts} +2 -1
- package/dist/cli/stdin.d.ts.map +1 -0
- package/dist/{stdin.js → cli/stdin.js} +11 -0
- package/dist/commands/copy/index.js +2 -2
- package/dist/commands/copy/utils.d.ts.map +1 -1
- package/dist/commands/copy/utils.js +15 -13
- package/dist/commands/generate-rules/index.d.ts +1 -1
- package/dist/commands/generate-rules/index.d.ts.map +1 -1
- package/dist/commands/generate-rules/index.js +16 -101
- package/dist/commands/generate-rules/service.d.ts +22 -0
- package/dist/commands/generate-rules/service.d.ts.map +1 -0
- package/dist/commands/generate-rules/service.js +103 -0
- package/dist/commands/handoff/index.js +2 -2
- package/dist/commands/health/index.js +1 -1
- package/dist/commands/health/utils.d.ts +3 -2
- package/dist/commands/health/utils.d.ts.map +1 -1
- package/dist/commands/health/utils.js +6 -0
- package/dist/commands/history/index.d.ts +1 -1
- package/dist/commands/history/index.d.ts.map +1 -1
- package/dist/commands/history/index.js +17 -18
- package/dist/commands/history/types.d.ts +38 -0
- package/dist/commands/history/types.d.ts.map +1 -1
- package/dist/commands/history/utils.d.ts.map +1 -1
- package/dist/commands/history/utils.js +63 -58
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +3 -8
- package/dist/commands/init-project/index.d.ts.map +1 -1
- package/dist/commands/init-project/index.js +3 -3
- package/dist/commands/init-project/utils.d.ts +2 -1
- package/dist/commands/init-project/utils.d.ts.map +1 -1
- package/dist/commands/init-project/utils.js +10 -2
- package/dist/commands/list-tools/index.d.ts.map +1 -1
- package/dist/commands/list-tools/index.js +7 -31
- package/dist/commands/manager.d.ts +2 -2
- package/dist/commands/manager.d.ts.map +1 -1
- package/dist/commands/manager.js +55 -33
- package/dist/commands/model/index.d.ts.map +1 -1
- package/dist/commands/model/index.js +20 -151
- package/dist/commands/model/model-panel.d.ts +4 -0
- package/dist/commands/model/model-panel.d.ts.map +1 -0
- package/dist/commands/model/model-panel.js +144 -0
- package/dist/commands/paste/index.d.ts.map +1 -1
- package/dist/commands/paste/index.js +59 -62
- package/dist/commands/paste/utils.d.ts.map +1 -1
- package/dist/commands/paste/utils.js +88 -58
- package/dist/commands/pickup/index.d.ts.map +1 -1
- package/dist/commands/pickup/index.js +6 -3
- package/dist/commands/pickup/utils.js +3 -3
- package/dist/commands/resources/index.d.ts.map +1 -1
- package/dist/commands/resources/index.js +33 -50
- package/dist/commands/review/index.d.ts.map +1 -1
- package/dist/commands/review/index.js +3 -117
- package/dist/commands/review/review-panel.d.ts +3 -0
- package/dist/commands/review/review-panel.d.ts.map +1 -0
- package/dist/commands/review/review-panel.js +186 -0
- package/dist/commands/review/utils.d.ts +15 -1
- package/dist/commands/review/utils.d.ts.map +1 -1
- package/dist/commands/review/utils.js +127 -68
- package/dist/commands/session/index.d.ts +1 -1
- package/dist/commands/session/index.d.ts.map +1 -1
- package/dist/commands/session/index.js +124 -135
- package/dist/commands/shell/index.d.ts.map +1 -1
- package/dist/commands/shell/index.js +16 -1
- package/dist/commands/types.d.ts +2 -2
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/{config.d.ts → config/index.d.ts} +20 -9
- package/dist/config/index.d.ts.map +1 -0
- package/dist/{config.js → config/index.js} +43 -42
- package/dist/execution/index.d.ts.map +1 -1
- package/dist/execution/index.js +75 -55
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +148 -141
- package/dist/middleware/cache.d.ts.map +1 -1
- package/dist/middleware/cache.js +18 -36
- package/dist/models/ai-config.d.ts +1 -0
- package/dist/models/ai-config.d.ts.map +1 -1
- package/dist/models/ai-config.js +4 -3
- package/dist/models/anthropic-provider.d.ts +2 -5
- package/dist/models/anthropic-provider.d.ts.map +1 -1
- package/dist/models/anthropic-provider.js +3 -70
- package/dist/models/deepseek-provider.d.ts +1 -0
- package/dist/models/deepseek-provider.d.ts.map +1 -1
- package/dist/models/google-provider.d.ts +2 -3
- package/dist/models/google-provider.d.ts.map +1 -1
- package/dist/models/google-provider.js +0 -26
- package/dist/models/groq-provider.d.ts +1 -0
- package/dist/models/groq-provider.d.ts.map +1 -1
- package/dist/models/manager.d.ts +13 -2
- package/dist/models/manager.d.ts.map +1 -1
- package/dist/models/manager.js +20 -8
- package/dist/models/openai-provider.d.ts +2 -5
- package/dist/models/openai-provider.d.ts.map +1 -1
- package/dist/models/openai-provider.js +0 -52
- package/dist/models/opencode-go-provider.d.ts +25 -0
- package/dist/models/opencode-go-provider.d.ts.map +1 -0
- package/dist/models/opencode-go-provider.js +78 -0
- package/dist/models/opencode-zen-provider.d.ts +7 -3
- package/dist/models/opencode-zen-provider.d.ts.map +1 -1
- package/dist/models/opencode-zen-provider.js +49 -10
- package/dist/models/openrouter-provider.d.ts +27 -31
- package/dist/models/openrouter-provider.d.ts.map +1 -1
- package/dist/models/openrouter-provider.js +121 -180
- package/dist/models/providers.d.ts +3 -3
- package/dist/models/providers.d.ts.map +1 -1
- package/dist/models/providers.js +6 -0
- package/dist/models/xai-provider.d.ts +4 -3
- package/dist/models/xai-provider.d.ts.map +1 -1
- package/dist/models/xai-provider.js +18 -18
- package/dist/modes/manager.d.ts +24 -0
- package/dist/modes/manager.d.ts.map +1 -0
- package/dist/modes/manager.js +77 -0
- package/dist/modes/prompts.d.ts +2 -0
- package/dist/modes/prompts.d.ts.map +1 -0
- package/dist/modes/prompts.js +142 -0
- package/dist/prompts/mentions.d.ts +11 -0
- package/dist/prompts/mentions.d.ts.map +1 -0
- package/dist/{mentions.js → prompts/mentions.js} +55 -85
- package/dist/{prompts.d.ts → prompts/system-prompt.d.ts} +7 -2
- package/dist/prompts/system-prompt.d.ts.map +1 -0
- package/dist/{prompts.js → prompts/system-prompt.js} +31 -16
- package/dist/repl/index.d.ts +174 -0
- package/dist/repl/index.d.ts.map +1 -0
- package/dist/{repl-new.js → repl/index.js} +397 -76
- package/dist/repl/project-status.d.ts +1 -0
- package/dist/repl/project-status.d.ts.map +1 -1
- package/dist/repl/project-status.js +4 -1
- package/dist/sessions/manager.d.ts +92 -0
- package/dist/sessions/manager.d.ts.map +1 -1
- package/dist/sessions/manager.js +262 -9
- package/dist/sessions/summary.d.ts +4 -0
- package/dist/sessions/summary.d.ts.map +1 -0
- package/dist/sessions/summary.js +30 -0
- package/dist/skills/index.d.ts +29 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +294 -0
- package/dist/subagents/index.d.ts +16 -0
- package/dist/subagents/index.d.ts.map +1 -0
- package/dist/subagents/index.js +231 -0
- package/dist/terminal/control.d.ts +1 -1
- package/dist/terminal/control.d.ts.map +1 -1
- package/dist/terminal/control.js +3 -3
- package/dist/terminal/east-asian-width.d.ts.map +1 -1
- package/dist/terminal/east-asian-width.js +404 -351
- package/dist/terminal/keys.d.ts +17 -0
- package/dist/terminal/keys.d.ts.map +1 -1
- package/dist/terminal/keys.js +37 -0
- package/dist/terminal/select-prompt.d.ts.map +1 -1
- package/dist/terminal/select-prompt.js +24 -12
- package/dist/terminal/string-width.d.ts.map +1 -1
- package/dist/terminal/string-width.js +25 -27
- package/dist/terminal/style.d.ts.map +1 -1
- package/dist/terminal/style.js +4 -7
- package/dist/terminal/supports-color.d.ts.map +1 -1
- package/dist/terminal/supports-color.js +41 -27
- package/dist/terminal/table/cell.d.ts +12 -0
- package/dist/terminal/table/cell.d.ts.map +1 -1
- package/dist/terminal/table/cell.js +40 -25
- package/dist/terminal/table/layout-manager.d.ts.map +1 -1
- package/dist/terminal/table/layout-manager.js +100 -68
- package/dist/terminal/table/utils.d.ts +1 -1
- package/dist/terminal/table/utils.d.ts.map +1 -1
- package/dist/terminal/table/utils.js +17 -10
- package/dist/terminal/wrap-ansi.d.ts.map +1 -1
- package/dist/terminal/wrap-ansi.js +174 -105
- package/dist/tokens/tracker.d.ts +1 -0
- package/dist/tokens/tracker.d.ts.map +1 -1
- package/dist/tokens/tracker.js +3 -0
- package/dist/tools/agent.d.ts +27 -0
- package/dist/tools/agent.d.ts.map +1 -0
- package/dist/tools/agent.js +81 -0
- package/dist/tools/apply-patch.d.ts +62 -0
- package/dist/tools/apply-patch.d.ts.map +1 -0
- package/dist/tools/apply-patch.js +377 -0
- package/dist/tools/bash.d.ts +4 -3
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +349 -141
- package/dist/tools/directory-tree.d.ts +3 -3
- package/dist/tools/directory-tree.d.ts.map +1 -1
- package/dist/tools/directory-tree.js +8 -5
- package/dist/tools/dynamic-tool-loader.d.ts +3 -6
- package/dist/tools/dynamic-tool-loader.d.ts.map +1 -1
- package/dist/tools/dynamic-tool-loader.js +20 -4
- package/dist/tools/edit-file.d.ts +7 -7
- package/dist/tools/edit-file.d.ts.map +1 -1
- package/dist/tools/edit-file.js +292 -85
- package/dist/tools/glob.d.ts +6 -6
- package/dist/tools/glob.d.ts.map +1 -1
- package/dist/tools/glob.js +110 -63
- package/dist/tools/grep.d.ts +15 -12
- package/dist/tools/grep.d.ts.map +1 -1
- package/dist/tools/grep.js +315 -193
- package/dist/tools/index.d.ts +114 -9
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +39 -24
- package/dist/tools/ls.d.ts +2 -2
- package/dist/tools/ls.d.ts.map +1 -1
- package/dist/tools/ls.js +7 -5
- package/dist/tools/read-file.d.ts +4 -6
- package/dist/tools/read-file.d.ts.map +1 -1
- package/dist/tools/read-file.js +84 -39
- package/dist/tools/save-file.d.ts +3 -3
- package/dist/tools/save-file.d.ts.map +1 -1
- package/dist/tools/save-file.js +36 -31
- package/dist/tools/skill.d.ts +23 -0
- package/dist/tools/skill.d.ts.map +1 -0
- package/dist/tools/skill.js +65 -0
- package/dist/tools/think.d.ts.map +1 -1
- package/dist/tools/think.js +2 -9
- package/dist/tools/utils.d.ts +2 -0
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tools/utils.js +12 -0
- package/dist/tools/web-fetch.d.ts +50 -0
- package/dist/tools/web-fetch.d.ts.map +1 -0
- package/dist/tools/web-fetch.js +446 -0
- package/dist/tools/web-search.d.ts +44 -0
- package/dist/tools/web-search.d.ts.map +1 -0
- package/dist/tools/web-search.js +226 -0
- package/dist/tui/autocomplete/attachment-provider.d.ts +3 -6
- package/dist/tui/autocomplete/attachment-provider.d.ts.map +1 -1
- package/dist/tui/autocomplete/attachment-provider.js +25 -78
- package/dist/tui/autocomplete/base-provider.d.ts +1 -0
- package/dist/tui/autocomplete/base-provider.d.ts.map +1 -1
- package/dist/tui/autocomplete/combined-provider.d.ts +1 -4
- package/dist/tui/autocomplete/combined-provider.d.ts.map +1 -1
- package/dist/tui/autocomplete/combined-provider.js +3 -17
- package/dist/tui/autocomplete/command-provider.d.ts +1 -0
- package/dist/tui/autocomplete/command-provider.d.ts.map +1 -1
- package/dist/tui/autocomplete/command-provider.js +3 -0
- package/dist/tui/autocomplete/file-search-provider.d.ts +2 -1
- package/dist/tui/autocomplete/file-search-provider.d.ts.map +1 -1
- package/dist/tui/autocomplete/file-search-provider.js +37 -17
- package/dist/tui/autocomplete/skill-provider.d.ts +17 -0
- package/dist/tui/autocomplete/skill-provider.d.ts.map +1 -0
- package/dist/tui/autocomplete/skill-provider.js +49 -0
- package/dist/tui/autocomplete/utils.d.ts +2 -1
- package/dist/tui/autocomplete/utils.d.ts.map +1 -1
- package/dist/tui/autocomplete/utils.js +25 -23
- package/dist/tui/autocomplete.d.ts +2 -2
- package/dist/tui/autocomplete.d.ts.map +1 -1
- package/dist/tui/autocomplete.js +3 -5
- package/dist/tui/components/assistant-message.d.ts.map +1 -1
- package/dist/tui/components/assistant-message.js +0 -4
- package/dist/tui/components/editor.d.ts +18 -3
- package/dist/tui/components/editor.d.ts.map +1 -1
- package/dist/tui/components/editor.js +211 -237
- package/dist/tui/components/footer.d.ts +6 -4
- package/dist/tui/components/footer.d.ts.map +1 -1
- package/dist/tui/components/footer.js +49 -25
- package/dist/tui/components/markdown.d.ts +10 -7
- package/dist/tui/components/markdown.d.ts.map +1 -1
- package/dist/tui/components/markdown.js +57 -39
- package/dist/tui/components/modal.d.ts.map +1 -1
- package/dist/tui/components/modal.js +35 -33
- package/dist/tui/components/notification.d.ts +13 -2
- package/dist/tui/components/notification.d.ts.map +1 -1
- package/dist/tui/components/notification.js +36 -2
- package/dist/tui/components/progress-bar.js +1 -1
- package/dist/tui/components/select-list.d.ts +1 -0
- package/dist/tui/components/select-list.d.ts.map +1 -1
- package/dist/tui/components/select-list.js +14 -11
- package/dist/tui/components/text.d.ts +16 -0
- package/dist/tui/components/text.d.ts.map +1 -1
- package/dist/tui/components/text.js +72 -57
- package/dist/tui/components/thinking-block.d.ts +9 -0
- package/dist/tui/components/thinking-block.d.ts.map +1 -1
- package/dist/tui/components/thinking-block.js +43 -11
- package/dist/tui/components/tool-execution.d.ts +5 -1
- package/dist/tui/components/tool-execution.d.ts.map +1 -1
- package/dist/tui/components/tool-execution.js +19 -10
- package/dist/tui/components/user-message.d.ts.map +1 -1
- package/dist/tui/components/user-message.js +0 -3
- package/dist/tui/components/welcome.d.ts +2 -1
- package/dist/tui/components/welcome.d.ts.map +1 -1
- package/dist/tui/components/welcome.js +2 -2
- package/dist/tui/editor-launcher.d.ts +3 -2
- package/dist/tui/editor-launcher.d.ts.map +1 -1
- package/dist/tui/index.d.ts +0 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/terminal.d.ts.map +1 -1
- package/dist/tui/terminal.js +10 -2
- package/dist/tui/tui.d.ts +43 -0
- package/dist/tui/tui.d.ts.map +1 -1
- package/dist/tui/tui.js +166 -41
- package/dist/tui/utils.d.ts +1 -5
- package/dist/tui/utils.d.ts.map +1 -1
- package/dist/tui/utils.js +271 -44
- package/dist/utils/bash/parse.d.ts +19 -0
- package/dist/utils/bash/parse.d.ts.map +1 -0
- package/dist/utils/bash/parse.js +223 -0
- package/dist/utils/bash/quote.d.ts +6 -0
- package/dist/utils/bash/quote.d.ts.map +1 -0
- package/dist/utils/bash/quote.js +23 -0
- package/dist/utils/bash.d.ts.map +1 -1
- package/dist/utils/bash.js +211 -126
- package/dist/utils/command-protection.d.ts +28 -0
- package/dist/utils/command-protection.d.ts.map +1 -0
- package/dist/utils/command-protection.js +324 -0
- package/dist/utils/dedent.d.ts.map +1 -0
- package/dist/utils/env-expand.d.ts +2 -0
- package/dist/utils/env-expand.d.ts.map +1 -0
- package/dist/utils/env-expand.js +8 -0
- package/dist/utils/filesystem/path-display.d.ts +11 -0
- package/dist/utils/filesystem/path-display.d.ts.map +1 -0
- package/dist/utils/filesystem/path-display.js +32 -0
- package/dist/utils/filesystem/security.d.ts +2 -2
- package/dist/utils/filesystem/security.d.ts.map +1 -1
- package/dist/utils/filesystem/security.js +28 -30
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/{formatting.js → utils/formatting.js} +1 -1
- package/dist/utils/git.d.ts +4 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +30 -0
- package/dist/utils/glob.d.ts +1 -1
- package/dist/utils/glob.d.ts.map +1 -1
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/{logger.js → utils/logger.js} +1 -1
- package/dist/utils/parsing.d.ts.map +1 -0
- package/dist/utils/process.d.ts.map +1 -1
- package/dist/utils/process.js +90 -37
- package/dist/utils/templates.d.ts +2 -0
- package/dist/utils/templates.d.ts.map +1 -0
- package/dist/utils/templates.js +24 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/{version.js → utils/version.js} +1 -1
- package/package.json +35 -26
- package/dist/cli.d.ts +0 -23
- package/dist/cli.d.ts.map +0 -1
- package/dist/commands/add-directory/types.d.ts +0 -6
- package/dist/commands/add-directory/types.d.ts.map +0 -1
- package/dist/commands/add-directory/types.js +0 -1
- package/dist/commands/copy/types.d.ts +0 -3
- package/dist/commands/copy/types.d.ts.map +0 -1
- package/dist/commands/copy/types.js +0 -1
- package/dist/commands/exit/index.d.ts +0 -10
- package/dist/commands/exit/index.d.ts.map +0 -1
- package/dist/commands/exit/index.js +0 -21
- package/dist/commands/exit/types.d.ts +0 -8
- package/dist/commands/exit/types.d.ts.map +0 -1
- package/dist/commands/exit/types.js +0 -1
- package/dist/commands/exit/utils.d.ts +0 -2
- package/dist/commands/exit/utils.d.ts.map +0 -1
- package/dist/commands/exit/utils.js +0 -13
- package/dist/commands/prompt/index.d.ts +0 -5
- package/dist/commands/prompt/index.d.ts.map +0 -1
- package/dist/commands/prompt/index.js +0 -122
- package/dist/commands/prompt/types.d.ts +0 -15
- package/dist/commands/prompt/types.d.ts.map +0 -1
- package/dist/commands/prompt/types.js +0 -1
- package/dist/commands/prompt/utils.d.ts +0 -12
- package/dist/commands/prompt/utils.d.ts.map +0 -1
- package/dist/commands/prompt/utils.js +0 -107
- package/dist/commands/reset/index.d.ts +0 -3
- package/dist/commands/reset/index.d.ts.map +0 -1
- package/dist/commands/reset/index.js +0 -25
- package/dist/commands/reset/types.d.ts +0 -1
- package/dist/commands/reset/types.d.ts.map +0 -1
- package/dist/commands/reset/types.js +0 -3
- package/dist/commands/review/types.d.ts +0 -12
- package/dist/commands/review/types.d.ts.map +0 -1
- package/dist/commands/review/types.js +0 -1
- package/dist/commands/save/index.d.ts +0 -3
- package/dist/commands/save/index.d.ts.map +0 -1
- package/dist/commands/save/index.js +0 -19
- package/dist/config.d.ts.map +0 -1
- package/dist/dedent.d.ts.map +0 -1
- package/dist/formatting.d.ts.map +0 -1
- package/dist/logger.d.ts.map +0 -1
- package/dist/mentions.d.ts +0 -14
- package/dist/mentions.d.ts.map +0 -1
- package/dist/parsing.d.ts.map +0 -1
- package/dist/prompts.d.ts.map +0 -1
- package/dist/repl-new.d.ts +0 -65
- package/dist/repl-new.d.ts.map +0 -1
- package/dist/skills.d.ts +0 -16
- package/dist/skills.d.ts.map +0 -1
- package/dist/skills.js +0 -233
- package/dist/stdin.d.ts.map +0 -1
- package/dist/tui/autocomplete/path-provider.d.ts +0 -21
- package/dist/tui/autocomplete/path-provider.d.ts.map +0 -1
- package/dist/tui/autocomplete/path-provider.js +0 -164
- package/dist/utils/iterables.d.ts +0 -2
- package/dist/utils/iterables.d.ts.map +0 -1
- package/dist/utils/iterables.js +0 -6
- package/dist/version.d.ts.map +0 -1
- /package/dist/{dedent.d.ts → utils/dedent.d.ts} +0 -0
- /package/dist/{dedent.js → utils/dedent.js} +0 -0
- /package/dist/{formatting.d.ts → utils/formatting.d.ts} +0 -0
- /package/dist/{logger.d.ts → utils/logger.d.ts} +0 -0
- /package/dist/{parsing.d.ts → utils/parsing.d.ts} +0 -0
- /package/dist/{parsing.js → utils/parsing.js} +0 -0
- /package/dist/{version.d.ts → utils/version.d.ts} +0 -0
|
@@ -1,13 +1,113 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { formatDate, formatDuration, formatNumber, formatPercentage, } from "../../formatting.js";
|
|
3
|
-
import { logger } from "../../logger.js";
|
|
4
|
-
import { systemPrompt } from "../../prompts.js";
|
|
1
|
+
import { systemPrompt } from "../../prompts/system-prompt.js";
|
|
5
2
|
import { getTerminalSize } from "../../terminal/control.js";
|
|
6
|
-
import { initTools
|
|
7
|
-
import { prepareTools } from "../../tools/utils.js";
|
|
3
|
+
import { initTools } from "../../tools/index.js";
|
|
4
|
+
import { prepareTools, toAiSdkTools } from "../../tools/utils.js";
|
|
8
5
|
import { Container, Modal, ModalText, TableComponent, } from "../../tui/index.js";
|
|
6
|
+
import { formatDate, formatDuration, formatNumber, formatPercentage, } from "../../utils/formatting.js";
|
|
7
|
+
import { logger } from "../../utils/logger.js";
|
|
9
8
|
import { countMessageTokens } from "./types.js";
|
|
10
|
-
|
|
9
|
+
function formatCost(cost) {
|
|
10
|
+
if (cost === 0)
|
|
11
|
+
return "$0.00";
|
|
12
|
+
if (cost < 0.01)
|
|
13
|
+
return `$${cost.toFixed(6)}`;
|
|
14
|
+
if (cost < 1)
|
|
15
|
+
return `$${cost.toFixed(4)}`;
|
|
16
|
+
return `$${cost.toFixed(2)}`;
|
|
17
|
+
}
|
|
18
|
+
async function calculateToolsTokens(workspace, tokenCounter) {
|
|
19
|
+
try {
|
|
20
|
+
const tools = await initTools({ workspace });
|
|
21
|
+
const toolDefs = toAiSdkTools(tools);
|
|
22
|
+
const toolNames = JSON.stringify(prepareTools(toolDefs));
|
|
23
|
+
return tokenCounter.count(toolNames);
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
logger.info({ error: error instanceof Error ? error.message : String(error) }, "Failed to calculate tools tokens");
|
|
27
|
+
return 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function buildContextTable(breakdown, window) {
|
|
31
|
+
return [
|
|
32
|
+
[
|
|
33
|
+
"System Prompt",
|
|
34
|
+
formatNumber(breakdown.systemPrompt),
|
|
35
|
+
formatPercentage(breakdown.systemPrompt, window),
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
" Core Instructions",
|
|
39
|
+
formatNumber(breakdown.systemPromptBreakdown.core),
|
|
40
|
+
formatPercentage(breakdown.systemPromptBreakdown.core, window),
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
" ~/.acai/AGENTS.md",
|
|
44
|
+
formatNumber(breakdown.systemPromptBreakdown.userAgentsMd),
|
|
45
|
+
formatPercentage(breakdown.systemPromptBreakdown.userAgentsMd, window),
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
" ./AGENTS.md",
|
|
49
|
+
formatNumber(breakdown.systemPromptBreakdown.cwdAgentsMd),
|
|
50
|
+
formatPercentage(breakdown.systemPromptBreakdown.cwdAgentsMd, window),
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
" Learned Rules",
|
|
54
|
+
formatNumber(breakdown.systemPromptBreakdown.learnedRules),
|
|
55
|
+
formatPercentage(breakdown.systemPromptBreakdown.learnedRules, window),
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
" Skills",
|
|
59
|
+
formatNumber(breakdown.systemPromptBreakdown.skills),
|
|
60
|
+
formatPercentage(breakdown.systemPromptBreakdown.skills, window),
|
|
61
|
+
],
|
|
62
|
+
[
|
|
63
|
+
"System Tools",
|
|
64
|
+
formatNumber(breakdown.tools),
|
|
65
|
+
formatPercentage(breakdown.tools, window),
|
|
66
|
+
],
|
|
67
|
+
[
|
|
68
|
+
"Messages",
|
|
69
|
+
formatNumber(breakdown.messages),
|
|
70
|
+
formatPercentage(breakdown.messages, window),
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
"Free Space",
|
|
74
|
+
formatNumber(breakdown.free),
|
|
75
|
+
formatPercentage(breakdown.free, window),
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"Total Used",
|
|
79
|
+
formatNumber(breakdown.totalUsed),
|
|
80
|
+
formatPercentage(breakdown.totalUsed, window),
|
|
81
|
+
],
|
|
82
|
+
["Context Window", formatNumber(window), "100%"],
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
function buildTokenTable(meta, inputTokens, outputTokens) {
|
|
86
|
+
const inputCost = (meta.costPerInputToken ?? 0) * inputTokens;
|
|
87
|
+
const outputCost = (meta.costPerOutputToken ?? 0) * outputTokens;
|
|
88
|
+
const totalTokens = inputTokens + outputTokens;
|
|
89
|
+
const totalCost = inputCost + outputCost;
|
|
90
|
+
return [
|
|
91
|
+
[
|
|
92
|
+
"Input Tokens",
|
|
93
|
+
formatNumber(inputTokens),
|
|
94
|
+
formatCost(inputCost),
|
|
95
|
+
meta.costPerInputToken
|
|
96
|
+
? `$${meta.costPerInputToken.toFixed(6)}/token`
|
|
97
|
+
: "N/A",
|
|
98
|
+
],
|
|
99
|
+
[
|
|
100
|
+
"Output Tokens",
|
|
101
|
+
formatNumber(outputTokens),
|
|
102
|
+
formatCost(outputCost),
|
|
103
|
+
meta.costPerOutputToken
|
|
104
|
+
? `$${meta.costPerOutputToken.toFixed(6)}/token`
|
|
105
|
+
: "N/A",
|
|
106
|
+
],
|
|
107
|
+
["Total Tokens", formatNumber(totalTokens), formatCost(totalCost), ""],
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
export function sessionCommand({ config, tokenCounter, modelManager, sessionManager, workspace, tokenTracker, }) {
|
|
11
111
|
return {
|
|
12
112
|
command: "/session",
|
|
13
113
|
description: "Show comprehensive session information including usage, context, and costs",
|
|
@@ -19,6 +119,7 @@ export function sessionCommand({ config, tokenCounter, modelManager, sessionMana
|
|
|
19
119
|
const sysResult = await systemPrompt({
|
|
20
120
|
activeTools: projectConfig.tools.activeTools,
|
|
21
121
|
allowedDirs: workspace.allowedDirs,
|
|
122
|
+
logsPath: projectConfig.logs?.path,
|
|
22
123
|
includeRules: true,
|
|
23
124
|
});
|
|
24
125
|
const systemPromptTokens = tokenCounter.count(sysResult.prompt);
|
|
@@ -29,24 +130,8 @@ export function sessionCommand({ config, tokenCounter, modelManager, sessionMana
|
|
|
29
130
|
learnedRules: tokenCounter.count(sysResult.components.learnedRules),
|
|
30
131
|
skills: tokenCounter.count(sysResult.components.skills),
|
|
31
132
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const tools = await initTools({
|
|
35
|
-
workspace,
|
|
36
|
-
});
|
|
37
|
-
const toolDefs = Object.fromEntries(Object.entries(tools).map((t) => [
|
|
38
|
-
t[0],
|
|
39
|
-
// biome-ignore lint/suspicious/noExplicitAny: temporary
|
|
40
|
-
tool(t[1].toolDef),
|
|
41
|
-
]));
|
|
42
|
-
const toolNames = JSON.stringify(prepareTools(toolDefs));
|
|
43
|
-
toolsTokens = tokenCounter.count(toolNames);
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
logger.info({ error: error instanceof Error ? error.message : String(error) }, "Failed to calculate tools tokens");
|
|
47
|
-
toolsTokens = 0;
|
|
48
|
-
}
|
|
49
|
-
const messages = messageHistory.get();
|
|
133
|
+
const toolsTokens = await calculateToolsTokens(workspace, tokenCounter);
|
|
134
|
+
const messages = sessionManager.get();
|
|
50
135
|
const messagesTokens = countMessageTokens(messages, tokenCounter);
|
|
51
136
|
const used = systemPromptTokens + toolsTokens + messagesTokens;
|
|
52
137
|
const free = Math.max(0, window - used);
|
|
@@ -60,12 +145,12 @@ export function sessionCommand({ config, tokenCounter, modelManager, sessionMana
|
|
|
60
145
|
window,
|
|
61
146
|
free,
|
|
62
147
|
};
|
|
63
|
-
const sessionId =
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
148
|
+
const sessionId = sessionManager.getSessionId();
|
|
149
|
+
const createdAt = sessionManager.getCreatedAt();
|
|
150
|
+
const updatedAt = sessionManager.getUpdatedAt();
|
|
151
|
+
const sessionFile = sessionManager.getSessionFileName();
|
|
152
|
+
const modelId = sessionManager.getModelId() || "Not set";
|
|
153
|
+
const title = sessionManager.getTitle() || "No title";
|
|
69
154
|
const duration = formatDuration(updatedAt.getTime() - createdAt.getTime());
|
|
70
155
|
const messageCount = messages.length;
|
|
71
156
|
const userMessages = messages.filter((m) => m.role === "user").length;
|
|
@@ -74,16 +159,12 @@ export function sessionCommand({ config, tokenCounter, modelManager, sessionMana
|
|
|
74
159
|
const totalUsage = tokenTracker.getTotalUsage();
|
|
75
160
|
const inputTokens = totalUsage.inputTokens ?? 0;
|
|
76
161
|
const outputTokens = totalUsage.outputTokens ?? 0;
|
|
77
|
-
const totalTokens = inputTokens + outputTokens;
|
|
78
|
-
const inputCost = (meta.costPerInputToken ?? 0) * inputTokens;
|
|
79
|
-
const outputCost = (meta.costPerOutputToken ?? 0) * outputTokens;
|
|
80
|
-
const totalCost = inputCost + outputCost;
|
|
81
162
|
const usageBreakdown = tokenTracker.getUsageBreakdown();
|
|
82
163
|
const { columns } = getTerminalSize();
|
|
83
164
|
const modalContent = new Container();
|
|
84
165
|
modalContent.addChild(new ModalText("Session Overview", 0, 1));
|
|
85
166
|
modalContent.addChild(new ModalText("─".repeat(columns - 10), 0, 1));
|
|
86
|
-
|
|
167
|
+
modalContent.addChild(new TableComponent([
|
|
87
168
|
["Session ID", sessionId],
|
|
88
169
|
["Session File", sessionFile],
|
|
89
170
|
["Model", modelId],
|
|
@@ -91,127 +172,35 @@ export function sessionCommand({ config, tokenCounter, modelManager, sessionMana
|
|
|
91
172
|
["Duration", duration],
|
|
92
173
|
["Started", formatDate(createdAt)],
|
|
93
174
|
["Last Updated", formatDate(updatedAt)],
|
|
94
|
-
];
|
|
95
|
-
modalContent.addChild(new TableComponent(metadataTable, {
|
|
96
|
-
headers: ["Property", "Value"],
|
|
97
|
-
colWidths: [25, 75],
|
|
98
|
-
}));
|
|
175
|
+
], { headers: ["Property", "Value"], colWidths: [25, 75] }));
|
|
99
176
|
modalContent.addChild(new ModalText("", 0, 1));
|
|
100
177
|
modalContent.addChild(new ModalText("Message Statistics", 0, 1));
|
|
101
|
-
|
|
178
|
+
modalContent.addChild(new TableComponent([
|
|
102
179
|
["Total Messages", String(messageCount)],
|
|
103
180
|
["User Messages", String(userMessages)],
|
|
104
181
|
["Assistant Messages", String(assistantMessages)],
|
|
105
182
|
["Tool Messages", String(toolMessages)],
|
|
106
|
-
];
|
|
107
|
-
modalContent.addChild(new TableComponent(messageStatsTable, {
|
|
108
|
-
headers: ["Type", "Count"],
|
|
109
|
-
}));
|
|
183
|
+
], { headers: ["Type", "Count"] }));
|
|
110
184
|
modalContent.addChild(new ModalText("", 0, 1));
|
|
111
185
|
modalContent.addChild(new ModalText("Context Usage", 0, 1));
|
|
112
|
-
|
|
113
|
-
[
|
|
114
|
-
"System Prompt",
|
|
115
|
-
formatNumber(breakdown.systemPrompt),
|
|
116
|
-
formatPercentage(breakdown.systemPrompt, window),
|
|
117
|
-
],
|
|
118
|
-
[
|
|
119
|
-
" Core Instructions",
|
|
120
|
-
formatNumber(breakdown.systemPromptBreakdown.core),
|
|
121
|
-
formatPercentage(breakdown.systemPromptBreakdown.core, window),
|
|
122
|
-
],
|
|
123
|
-
[
|
|
124
|
-
" ~/.acai/AGENTS.md",
|
|
125
|
-
formatNumber(breakdown.systemPromptBreakdown.userAgentsMd),
|
|
126
|
-
formatPercentage(breakdown.systemPromptBreakdown.userAgentsMd, window),
|
|
127
|
-
],
|
|
128
|
-
[
|
|
129
|
-
" ./AGENTS.md",
|
|
130
|
-
formatNumber(breakdown.systemPromptBreakdown.cwdAgentsMd),
|
|
131
|
-
formatPercentage(breakdown.systemPromptBreakdown.cwdAgentsMd, window),
|
|
132
|
-
],
|
|
133
|
-
[
|
|
134
|
-
" Learned Rules",
|
|
135
|
-
formatNumber(breakdown.systemPromptBreakdown.learnedRules),
|
|
136
|
-
formatPercentage(breakdown.systemPromptBreakdown.learnedRules, window),
|
|
137
|
-
],
|
|
138
|
-
[
|
|
139
|
-
" Skills",
|
|
140
|
-
formatNumber(breakdown.systemPromptBreakdown.skills),
|
|
141
|
-
formatPercentage(breakdown.systemPromptBreakdown.skills, window),
|
|
142
|
-
],
|
|
143
|
-
[
|
|
144
|
-
"System Tools",
|
|
145
|
-
formatNumber(breakdown.tools),
|
|
146
|
-
formatPercentage(breakdown.tools, window),
|
|
147
|
-
],
|
|
148
|
-
[
|
|
149
|
-
"Messages",
|
|
150
|
-
formatNumber(breakdown.messages),
|
|
151
|
-
formatPercentage(breakdown.messages, window),
|
|
152
|
-
],
|
|
153
|
-
[
|
|
154
|
-
"Free Space",
|
|
155
|
-
formatNumber(breakdown.free),
|
|
156
|
-
formatPercentage(breakdown.free, window),
|
|
157
|
-
],
|
|
158
|
-
[
|
|
159
|
-
"Total Used",
|
|
160
|
-
formatNumber(breakdown.totalUsed),
|
|
161
|
-
formatPercentage(breakdown.totalUsed, window),
|
|
162
|
-
],
|
|
163
|
-
["Context Window", formatNumber(window), "100%"],
|
|
164
|
-
];
|
|
165
|
-
modalContent.addChild(new TableComponent(contextTable, {
|
|
186
|
+
modalContent.addChild(new TableComponent(buildContextTable(breakdown, window), {
|
|
166
187
|
headers: ["Section", "Tokens", "Percent"],
|
|
167
188
|
}));
|
|
168
189
|
const barWidth = Math.max(20, Math.min(50, columns - 40));
|
|
169
|
-
const filled = Math.floor((usedPercentage / 100) * barWidth);
|
|
190
|
+
const filled = Math.min(barWidth, Math.floor((usedPercentage / 100) * barWidth));
|
|
170
191
|
const empty = barWidth - filled;
|
|
171
192
|
const progressBar = `[${"█".repeat(filled)}${"░".repeat(empty)}] ${usedPercentage.toFixed(1)}%`;
|
|
172
193
|
modalContent.addChild(new ModalText("", 0, 1));
|
|
173
194
|
modalContent.addChild(new ModalText(progressBar, 0, 1));
|
|
174
195
|
modalContent.addChild(new ModalText("", 0, 1));
|
|
175
196
|
modalContent.addChild(new ModalText("Token Usage & Costs", 0, 1));
|
|
176
|
-
|
|
177
|
-
if (cost === 0)
|
|
178
|
-
return "$0.00";
|
|
179
|
-
if (cost < 0.01)
|
|
180
|
-
return `$${cost.toFixed(6)}`;
|
|
181
|
-
if (cost < 1)
|
|
182
|
-
return `$${cost.toFixed(4)}`;
|
|
183
|
-
return `$${cost.toFixed(2)}`;
|
|
184
|
-
};
|
|
185
|
-
const tokenTable = [
|
|
186
|
-
[
|
|
187
|
-
"Input Tokens",
|
|
188
|
-
formatNumber(inputTokens),
|
|
189
|
-
formatCost(inputCost),
|
|
190
|
-
meta.costPerInputToken
|
|
191
|
-
? `$${meta.costPerInputToken.toFixed(6)}/token`
|
|
192
|
-
: "N/A",
|
|
193
|
-
],
|
|
194
|
-
[
|
|
195
|
-
"Output Tokens",
|
|
196
|
-
formatNumber(outputTokens),
|
|
197
|
-
formatCost(outputCost),
|
|
198
|
-
meta.costPerOutputToken
|
|
199
|
-
? `$${meta.costPerOutputToken.toFixed(6)}/token`
|
|
200
|
-
: "N/A",
|
|
201
|
-
],
|
|
202
|
-
["Total Tokens", formatNumber(totalTokens), formatCost(totalCost), ""],
|
|
203
|
-
];
|
|
204
|
-
modalContent.addChild(new TableComponent(tokenTable, {
|
|
197
|
+
modalContent.addChild(new TableComponent(buildTokenTable(meta, inputTokens, outputTokens), {
|
|
205
198
|
headers: ["Type", "Tokens", "Cost", "Rate"],
|
|
206
199
|
}));
|
|
207
200
|
modalContent.addChild(new ModalText("", 0, 1));
|
|
208
201
|
if (Object.keys(usageBreakdown).length > 0) {
|
|
209
202
|
modalContent.addChild(new ModalText("Usage by Application", 0, 1));
|
|
210
|
-
const
|
|
211
|
-
const usageTable = usageEntries.map(([app, tokens]) => [
|
|
212
|
-
app,
|
|
213
|
-
formatNumber(tokens),
|
|
214
|
-
]);
|
|
203
|
+
const usageTable = Object.entries(usageBreakdown).map(([app, tokens]) => [app, formatNumber(tokens)]);
|
|
215
204
|
modalContent.addChild(new TableComponent(usageTable, {
|
|
216
205
|
headers: ["Application", "Tokens"],
|
|
217
206
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/commands/shell/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/D,eAAO,MAAM,YAAY,GAAI,SAAS,cAAc,KAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/commands/shell/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/D,eAAO,MAAM,YAAY,GAAI,SAAS,cAAc,KAAG,WAuItD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initExecutionEnvironment } from "../../execution/index.js";
|
|
2
2
|
import style from "../../terminal/style.js";
|
|
3
|
-
import { SelectList, Text } from "../../tui/index.js";
|
|
3
|
+
import { Loader, SelectList, Spacer, Text } from "../../tui/index.js";
|
|
4
4
|
// Command execution timeout in milliseconds
|
|
5
5
|
const DEFAULT_TIMEOUT = 1.5 * 60 * 1000; // 1.5 minutes
|
|
6
6
|
export const shellCommand = (options) => {
|
|
@@ -27,6 +27,13 @@ export const shellCommand = (options) => {
|
|
|
27
27
|
["COLORTERM"]: process.env["COLORTERM"] ?? "truecolor",
|
|
28
28
|
["npm_config_color"]: "true",
|
|
29
29
|
};
|
|
30
|
+
// Show loader before execution
|
|
31
|
+
const truncatedCommand = commandStr.length > 50
|
|
32
|
+
? `${commandStr.substring(0, 50)}...`
|
|
33
|
+
: commandStr;
|
|
34
|
+
const loader = new Loader(tui, `Running: ${truncatedCommand}`);
|
|
35
|
+
container.addChild(loader);
|
|
36
|
+
tui.requestRender();
|
|
30
37
|
const { output, exitCode, duration } = await execEnv.executeCommand(commandStr, {
|
|
31
38
|
cwd: process.cwd(),
|
|
32
39
|
timeout: DEFAULT_TIMEOUT,
|
|
@@ -35,7 +42,13 @@ export const shellCommand = (options) => {
|
|
|
35
42
|
throwOnError: false,
|
|
36
43
|
env: colorEnv,
|
|
37
44
|
});
|
|
45
|
+
// Cleanup loader
|
|
46
|
+
loader.stop();
|
|
47
|
+
container.removeChild(loader);
|
|
48
|
+
// Display results with spacing
|
|
49
|
+
container.addChild(new Spacer(1));
|
|
38
50
|
container.addChild(new Text(style.gray(`Exit code: ${exitCode}, Duration: ${duration}ms`), 1, 0));
|
|
51
|
+
container.addChild(new Spacer(1));
|
|
39
52
|
container.addChild(new Text(output, 2, 0));
|
|
40
53
|
// Create context selection component
|
|
41
54
|
const contextSelector = new SelectList([
|
|
@@ -61,6 +74,7 @@ export const shellCommand = (options) => {
|
|
|
61
74
|
}
|
|
62
75
|
// Remove the selector and show final result
|
|
63
76
|
container.removeChild(contextSelector);
|
|
77
|
+
tui.setFocus(editor);
|
|
64
78
|
tui.requestRender();
|
|
65
79
|
editor.setText("");
|
|
66
80
|
};
|
|
@@ -68,6 +82,7 @@ export const shellCommand = (options) => {
|
|
|
68
82
|
// User cancelled - default to not adding to context
|
|
69
83
|
container.addChild(new Text(style.gray("Output not added to context."), 3, 0));
|
|
70
84
|
container.removeChild(contextSelector);
|
|
85
|
+
tui.setFocus(editor);
|
|
71
86
|
tui.requestRender();
|
|
72
87
|
editor.setText("");
|
|
73
88
|
};
|
package/dist/commands/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConfigManager } from "../config.ts";
|
|
1
|
+
import type { ConfigManager } from "../config/index.ts";
|
|
2
2
|
import type { WorkspaceContext } from "../index.ts";
|
|
3
3
|
import type { ModelManager } from "../models/manager.ts";
|
|
4
4
|
import type { PromptManagerApi } from "../prompts/manager.ts";
|
|
@@ -16,7 +16,7 @@ export interface ReplCommand {
|
|
|
16
16
|
container: Container;
|
|
17
17
|
inputContainer: Container;
|
|
18
18
|
editor: Editor;
|
|
19
|
-
}) => Promise<"
|
|
19
|
+
}) => Promise<"continue" | "use">;
|
|
20
20
|
}
|
|
21
21
|
export interface CommandOptions {
|
|
22
22
|
promptManager: PromptManagerApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../source/commands/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../source/commands/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACxC,MAAM,EAAE,CACN,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE;QACP,GAAG,EAAE,GAAG,CAAC;QACT,SAAS,EAAE,SAAS,CAAC;QACrB,cAAc,EAAE,SAAS,CAAC;QAC1B,MAAM,EAAE,MAAM,CAAC;KAChB,KACE,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,aAAa,CAAC;IACtB,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,gBAAgB,CAAC;CAC7B"}
|
|
@@ -17,8 +17,13 @@ export declare const defaultConfig: {
|
|
|
17
17
|
readonly skills: {
|
|
18
18
|
readonly enabled: true;
|
|
19
19
|
};
|
|
20
|
+
readonly devtools: {
|
|
21
|
+
readonly enabled: false;
|
|
22
|
+
};
|
|
23
|
+
readonly autoGenerateRules: false;
|
|
24
|
+
readonly env: Record<string, string>;
|
|
20
25
|
};
|
|
21
|
-
declare const
|
|
26
|
+
declare const ConfigSchema: z.ZodObject<{
|
|
22
27
|
logs: z.ZodOptional<z.ZodObject<{
|
|
23
28
|
path: z.ZodString;
|
|
24
29
|
}, z.core.$strip>>;
|
|
@@ -39,8 +44,13 @@ declare const ProjectConfigSchema: z.ZodObject<{
|
|
|
39
44
|
skills: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
40
45
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
41
46
|
}, z.core.$strip>>>;
|
|
47
|
+
autoGenerateRules: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
48
|
+
devtools: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
49
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
50
|
+
}, z.core.$strip>>>;
|
|
51
|
+
env: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
42
52
|
}, z.core.$strip>;
|
|
43
|
-
export type
|
|
53
|
+
export type Config = z.infer<typeof ConfigSchema>;
|
|
44
54
|
export declare class DirectoryProvider {
|
|
45
55
|
private baseDir;
|
|
46
56
|
constructor(baseDir: string);
|
|
@@ -53,9 +63,12 @@ export declare class DirectoryProvider {
|
|
|
53
63
|
export declare class ConfigManager {
|
|
54
64
|
readonly project: DirectoryProvider;
|
|
55
65
|
readonly app: DirectoryProvider;
|
|
66
|
+
private cachedConfig;
|
|
67
|
+
private configCacheTime;
|
|
68
|
+
private configCacheTtl;
|
|
56
69
|
constructor();
|
|
57
70
|
private _readConfig;
|
|
58
|
-
getConfig(): Promise<
|
|
71
|
+
getConfig(): Promise<Config>;
|
|
59
72
|
getSkillsEnabled(): Promise<boolean>;
|
|
60
73
|
setSkillsEnabled(enabled: boolean): Promise<void>;
|
|
61
74
|
readAgentsFiles(): Promise<{
|
|
@@ -63,14 +76,12 @@ export declare class ConfigManager {
|
|
|
63
76
|
content: string;
|
|
64
77
|
}[]>;
|
|
65
78
|
writeAgentsFile(rules: string): Promise<void>;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
readCachedLearnedRulesFile(): Promise<string>;
|
|
69
|
-
writeCachedLearnedRulesFile(rules: string): Promise<void>;
|
|
79
|
+
readLearnedRulesFile(): Promise<string>;
|
|
80
|
+
writeLearnedRulesFile(rules: string): Promise<void>;
|
|
70
81
|
private _readAppConfig;
|
|
71
|
-
ensureDefaultConfig(configName: string): Promise<
|
|
82
|
+
ensureDefaultConfig(configName: string): Promise<Config>;
|
|
72
83
|
writeAppConfig(configName: string, data: Record<PropertyKey, unknown>): Promise<void>;
|
|
73
84
|
}
|
|
74
85
|
export declare const config: ConfigManager;
|
|
75
86
|
export {};
|
|
76
|
-
//# sourceMappingURL=
|
|
87
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/config/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,aAAa;;;;;8BAKI,MAAM,EAAE,GAAG,SAAS;;;;;;;;;4BAS3B,MAAM,EAAE;;;;;;;;kBAQlB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAGX,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqDhB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,MAAM;IAI3B,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAK1B,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAOlD,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAOjC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAW/C,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO;CAIrC;AAED,qBAAa,aAAa;IACxB,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,GAAG,EAAE,iBAAiB,CAAC;IAChC,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,cAAc,CAAS;;YAOjB,WAAW;IAanB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IA8B5B,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC;IAKpC,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBjD,eAAe,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IA4B/D,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7C,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC;IAYvC,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAc3C,cAAc;IActB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAexD,cAAc,CAClB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,GACjC,OAAO,CAAC,IAAI,CAAC;CAKjB;AAGD,eAAO,MAAM,MAAM,eAAsB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import fs from "node:fs/promises";
|
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
import { jsonParser } from "
|
|
6
|
+
import { jsonParser } from "../utils/parsing.js";
|
|
7
7
|
export const defaultConfig = {
|
|
8
8
|
loop: {
|
|
9
9
|
maxIterations: 200,
|
|
@@ -22,9 +22,14 @@ export const defaultConfig = {
|
|
|
22
22
|
skills: {
|
|
23
23
|
enabled: true,
|
|
24
24
|
},
|
|
25
|
+
devtools: {
|
|
26
|
+
enabled: false,
|
|
27
|
+
},
|
|
28
|
+
autoGenerateRules: false,
|
|
29
|
+
env: {},
|
|
25
30
|
};
|
|
26
31
|
// Type definitions
|
|
27
|
-
const
|
|
32
|
+
const ConfigSchema = z.object({
|
|
28
33
|
logs: z
|
|
29
34
|
.object({
|
|
30
35
|
path: z.string(),
|
|
@@ -66,6 +71,17 @@ const ProjectConfigSchema = z.object({
|
|
|
66
71
|
})
|
|
67
72
|
.optional()
|
|
68
73
|
.default(defaultConfig.skills),
|
|
74
|
+
autoGenerateRules: z
|
|
75
|
+
.boolean()
|
|
76
|
+
.optional()
|
|
77
|
+
.default(defaultConfig.autoGenerateRules),
|
|
78
|
+
devtools: z
|
|
79
|
+
.object({
|
|
80
|
+
enabled: z.boolean().optional().default(defaultConfig.devtools.enabled),
|
|
81
|
+
})
|
|
82
|
+
.optional()
|
|
83
|
+
.default(defaultConfig.devtools),
|
|
84
|
+
env: z.record(z.string(), z.string()).optional().default(defaultConfig.env),
|
|
69
85
|
});
|
|
70
86
|
export class DirectoryProvider {
|
|
71
87
|
baseDir;
|
|
@@ -107,6 +123,9 @@ export class DirectoryProvider {
|
|
|
107
123
|
export class ConfigManager {
|
|
108
124
|
project;
|
|
109
125
|
app;
|
|
126
|
+
cachedConfig = null;
|
|
127
|
+
configCacheTime = 0;
|
|
128
|
+
configCacheTtl = 60000; // 60 seconds
|
|
110
129
|
constructor() {
|
|
111
130
|
this.project = new DirectoryProvider(path.join(process.cwd(), ".acai"));
|
|
112
131
|
this.app = new DirectoryProvider(path.join(homedir(), ".acai"));
|
|
@@ -114,7 +133,7 @@ export class ConfigManager {
|
|
|
114
133
|
async _readConfig(configPath) {
|
|
115
134
|
try {
|
|
116
135
|
const data = await fs.readFile(configPath, "utf8");
|
|
117
|
-
return jsonParser(
|
|
136
|
+
return jsonParser(ConfigSchema).parse(data);
|
|
118
137
|
}
|
|
119
138
|
catch (error) {
|
|
120
139
|
if (error.code === "ENOENT") {
|
|
@@ -123,17 +142,29 @@ export class ConfigManager {
|
|
|
123
142
|
throw error;
|
|
124
143
|
}
|
|
125
144
|
}
|
|
126
|
-
// Get merged configuration (project overrides app)
|
|
145
|
+
// Get merged configuration (project overrides app), cached with TTL
|
|
127
146
|
async getConfig() {
|
|
147
|
+
const now = Date.now();
|
|
148
|
+
if (this.cachedConfig && now - this.configCacheTime < this.configCacheTtl) {
|
|
149
|
+
return this.cachedConfig;
|
|
150
|
+
}
|
|
128
151
|
const appConfigPath = path.join(this.app.getPath(), "acai.json");
|
|
129
152
|
const projectConfigPath = path.join(this.project.getPath(), "acai.json");
|
|
130
153
|
const appConfig = await this._readConfig(appConfigPath);
|
|
131
154
|
const projectConfig = await this._readConfig(projectConfigPath);
|
|
155
|
+
const mergedEnv = {
|
|
156
|
+
...appConfig.env,
|
|
157
|
+
...projectConfig.env,
|
|
158
|
+
};
|
|
132
159
|
const mergedConfig = {
|
|
133
160
|
...appConfig,
|
|
134
161
|
...projectConfig,
|
|
162
|
+
env: mergedEnv,
|
|
135
163
|
};
|
|
136
|
-
|
|
164
|
+
const result = ConfigSchema.parse(mergedConfig);
|
|
165
|
+
this.cachedConfig = result;
|
|
166
|
+
this.configCacheTime = now;
|
|
167
|
+
return result;
|
|
137
168
|
}
|
|
138
169
|
// Skills settings helpers
|
|
139
170
|
async getSkillsEnabled() {
|
|
@@ -145,7 +176,7 @@ export class ConfigManager {
|
|
|
145
176
|
let configData = {};
|
|
146
177
|
try {
|
|
147
178
|
const data = await fs.readFile(configPath, "utf8");
|
|
148
|
-
configData = jsonParser(
|
|
179
|
+
configData = jsonParser(ConfigSchema.partial()).parse(data);
|
|
149
180
|
}
|
|
150
181
|
catch (error) {
|
|
151
182
|
if (error.code !== "ENOENT") {
|
|
@@ -197,38 +228,8 @@ export class ConfigManager {
|
|
|
197
228
|
throw error;
|
|
198
229
|
}
|
|
199
230
|
}
|
|
200
|
-
//
|
|
201
|
-
async
|
|
202
|
-
const rulesPath = path.join(this.project.getPath("rules"), "learned-rules.md");
|
|
203
|
-
try {
|
|
204
|
-
return await fs.readFile(rulesPath, "utf8");
|
|
205
|
-
}
|
|
206
|
-
catch (error) {
|
|
207
|
-
if (error.code === "ENOENT") {
|
|
208
|
-
return "";
|
|
209
|
-
}
|
|
210
|
-
throw error;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
async writeProjectLearnedRulesFile(rules) {
|
|
214
|
-
// Only write project rules if the project directory exists
|
|
215
|
-
if (!(await this.project.exists())) {
|
|
216
|
-
return; // Silently return if project directory doesn't exist
|
|
217
|
-
}
|
|
218
|
-
const rulesDir = await this.project.ensurePath("rules");
|
|
219
|
-
const rulesPath = path.join(rulesDir, "learned-rules.md");
|
|
220
|
-
try {
|
|
221
|
-
return await fs.writeFile(rulesPath, rules, "utf8");
|
|
222
|
-
}
|
|
223
|
-
catch (error) {
|
|
224
|
-
if (error.code === "ENOENT") {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
throw error;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
// App-cached learned rules (used during conversation analysis)
|
|
231
|
-
async readCachedLearnedRulesFile() {
|
|
231
|
+
// Learned rules (global, stored in ~/.acai/rules/learned-rules.md)
|
|
232
|
+
async readLearnedRulesFile() {
|
|
232
233
|
const rulesPath = path.join(this.app.getPath("rules"), "learned-rules.md");
|
|
233
234
|
try {
|
|
234
235
|
return await fs.readFile(rulesPath, "utf8");
|
|
@@ -240,7 +241,7 @@ export class ConfigManager {
|
|
|
240
241
|
throw error;
|
|
241
242
|
}
|
|
242
243
|
}
|
|
243
|
-
async
|
|
244
|
+
async writeLearnedRulesFile(rules) {
|
|
244
245
|
const rulesDir = await this.app.ensurePath("rules");
|
|
245
246
|
const rulesPath = path.join(rulesDir, "learned-rules.md");
|
|
246
247
|
try {
|
|
@@ -258,11 +259,11 @@ export class ConfigManager {
|
|
|
258
259
|
const configPath = path.join(this.app.getPath(), `${configName}.json`);
|
|
259
260
|
try {
|
|
260
261
|
const data = await fs.readFile(configPath, "utf8");
|
|
261
|
-
return
|
|
262
|
+
return ConfigSchema.parse(JSON.parse(data));
|
|
262
263
|
}
|
|
263
264
|
catch (error) {
|
|
264
265
|
if (error.code === "ENOENT") {
|
|
265
|
-
return
|
|
266
|
+
return ConfigSchema.parse(defaultConfig);
|
|
266
267
|
}
|
|
267
268
|
throw error;
|
|
268
269
|
}
|
|
@@ -278,7 +279,7 @@ export class ConfigManager {
|
|
|
278
279
|
// Create directory and default config if missing
|
|
279
280
|
await this.app.ensurePath();
|
|
280
281
|
await fs.writeFile(configPath, JSON.stringify(defaultConfig, null, 2));
|
|
281
|
-
return
|
|
282
|
+
return ConfigSchema.parse(defaultConfig);
|
|
282
283
|
}
|
|
283
284
|
}
|
|
284
285
|
async writeAppConfig(configName, data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/execution/index.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,UAAU,gBAAgB;IACxB,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mGAAmG;IACnG,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,0CAA0C;IAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,UAAU,wBAAyB,SAAQ,gBAAgB;IACzD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,UAAU,iBAAiB;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,UAAU,wBAAyB,SAAQ,iBAAiB;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAwBD;;GAEG;AACH,UAAU,eAAe;IACvB,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE;QACV,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;KAC1C,CAAC;CACH;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/execution/index.ts"],"names":[],"mappings":"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"}
|