@compilr-dev/cli 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +108 -0
- package/README.md +237 -69
- package/dist/.tsbuildinfo.app +1 -0
- package/dist/.tsbuildinfo.data +1 -0
- package/dist/.tsbuildinfo.domain +1 -0
- package/dist/.tsbuildinfo.foundation +1 -0
- package/dist/agent.d.ts +61 -4
- package/dist/agent.js +241 -245
- package/dist/anchors/index.d.ts +1 -1
- package/dist/anchors/index.js +1 -1
- package/dist/anchors/project-anchors.d.ts +2 -2
- package/dist/anchors/project-anchors.js +1 -1
- package/dist/auth/api-client.d.ts +124 -0
- package/dist/auth/api-client.js +261 -0
- package/dist/auth/index.d.ts +172 -0
- package/dist/auth/index.js +545 -0
- package/dist/auth/storage.d.ts +52 -0
- package/dist/auth/storage.js +118 -0
- package/dist/changelog/index.d.ts +16 -0
- package/dist/changelog/index.js +24 -0
- package/dist/changelog/releases.d.ts +17 -0
- package/dist/changelog/releases.js +63 -0
- package/dist/commands-v2/handlers/auth.d.ts +10 -0
- package/dist/commands-v2/handlers/auth.js +118 -0
- package/dist/commands-v2/handlers/background.d.ts +14 -0
- package/dist/commands-v2/handlers/background.js +276 -0
- package/dist/commands-v2/handlers/context.js +286 -81
- package/dist/commands-v2/handlers/core.d.ts +1 -0
- package/dist/commands-v2/handlers/core.js +133 -8
- package/dist/commands-v2/handlers/debug.js +18 -0
- package/dist/commands-v2/handlers/delegations.d.ts +8 -0
- package/dist/commands-v2/handlers/delegations.js +29 -0
- package/dist/commands-v2/handlers/files.d.ts +8 -0
- package/dist/commands-v2/handlers/files.js +162 -0
- package/dist/commands-v2/handlers/filter.d.ts +9 -0
- package/dist/commands-v2/handlers/filter.js +130 -0
- package/dist/commands-v2/handlers/games.d.ts +7 -0
- package/dist/commands-v2/handlers/games.js +57 -0
- package/dist/commands-v2/handlers/index.d.ts +13 -0
- package/dist/commands-v2/handlers/index.js +39 -0
- package/dist/commands-v2/handlers/mcp.d.ts +8 -0
- package/dist/commands-v2/handlers/mcp.js +39 -0
- package/dist/commands-v2/handlers/notifications.d.ts +9 -0
- package/dist/commands-v2/handlers/notifications.js +34 -0
- package/dist/commands-v2/handlers/project.js +295 -31
- package/dist/commands-v2/handlers/reset.d.ts +11 -0
- package/dist/commands-v2/handlers/reset.js +118 -0
- package/dist/commands-v2/handlers/session.d.ts +161 -0
- package/dist/commands-v2/handlers/session.js +805 -0
- package/dist/commands-v2/handlers/settings.d.ts +2 -0
- package/dist/commands-v2/handlers/settings.js +217 -35
- package/dist/commands-v2/handlers/tasks.d.ts +5 -0
- package/dist/commands-v2/handlers/tasks.js +36 -0
- package/dist/commands-v2/handlers/team.d.ts +9 -0
- package/dist/commands-v2/handlers/team.js +549 -0
- package/dist/commands-v2/handlers/terminals.d.ts +9 -0
- package/dist/commands-v2/handlers/terminals.js +34 -0
- package/dist/commands-v2/index.d.ts +3 -2
- package/dist/commands-v2/index.js +4 -1
- package/dist/commands-v2/registry.d.ts +15 -0
- package/dist/commands-v2/registry.js +34 -0
- package/dist/commands-v2/types.d.ts +81 -3
- package/dist/commands.js +13 -0
- package/dist/compilr-diff-companion.vsix +0 -0
- package/dist/db/index.js +98 -4
- package/dist/db/repositories/document-repository.d.ts +2 -0
- package/dist/db/repositories/document-repository.js +6 -1
- package/dist/db/repositories/index.d.ts +2 -0
- package/dist/db/repositories/index.js +1 -0
- package/dist/db/repositories/plan-repository.d.ts +101 -0
- package/dist/db/repositories/plan-repository.js +275 -0
- package/dist/db/repositories/project-repository.d.ts +6 -0
- package/dist/db/repositories/project-repository.js +41 -0
- package/dist/db/repositories/work-item-repository.d.ts +15 -0
- package/dist/db/repositories/work-item-repository.js +69 -4
- package/dist/db/schema.d.ts +40 -3
- package/dist/db/schema.js +66 -3
- package/dist/episodes/index.d.ts +20 -0
- package/dist/episodes/index.js +27 -0
- package/dist/episodes/recorder.d.ts +51 -0
- package/dist/episodes/recorder.js +195 -0
- package/dist/episodes/significant-work.d.ts +21 -0
- package/dist/episodes/significant-work.js +56 -0
- package/dist/episodes/store.d.ts +38 -0
- package/dist/episodes/store.js +199 -0
- package/dist/episodes/types.d.ts +35 -0
- package/dist/episodes/types.js +6 -0
- package/dist/episodes/work-at-risk.d.ts +12 -0
- package/dist/episodes/work-at-risk.js +38 -0
- package/dist/episodes/work-summary-anchor.d.ts +23 -0
- package/dist/episodes/work-summary-anchor.js +73 -0
- package/dist/games/coins.d.ts +66 -0
- package/dist/games/coins.js +165 -0
- package/dist/games/game-base.d.ts +84 -0
- package/dist/games/game-base.js +204 -0
- package/dist/games/index.d.ts +16 -0
- package/dist/games/index.js +49 -0
- package/dist/games/scores.d.ts +69 -0
- package/dist/games/scores.js +191 -0
- package/dist/games/tetris/board.d.ts +59 -0
- package/dist/games/tetris/board.js +170 -0
- package/dist/games/tetris/index.d.ts +109 -0
- package/dist/games/tetris/index.js +610 -0
- package/dist/games/tetris/pieces.d.ts +44 -0
- package/dist/games/tetris/pieces.js +271 -0
- package/dist/games/tetris/renderer.d.ts +26 -0
- package/dist/games/tetris/renderer.js +77 -0
- package/dist/guide/guide-content.d.ts +23 -0
- package/dist/guide/guide-content.js +196 -0
- package/dist/guide/index.d.ts +8 -0
- package/dist/guide/index.js +7 -0
- package/dist/guide/shared-content.d.ts +37 -0
- package/dist/guide/shared-content.js +1272 -0
- package/dist/guide/tutorial-helpers.d.ts +57 -0
- package/dist/guide/tutorial-helpers.js +147 -0
- package/dist/handlers/ask-user-handlers.d.ts +32 -0
- package/dist/handlers/ask-user-handlers.js +104 -0
- package/dist/handlers/delegation-handlers.d.ts +34 -0
- package/dist/handlers/delegation-handlers.js +291 -0
- package/dist/handlers/permission-handler.d.ts +30 -0
- package/dist/handlers/permission-handler.js +205 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.js +448 -271
- package/dist/input-handlers/memory-handler.d.ts +1 -1
- package/dist/input-handlers/memory-handler.js +2 -1
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +12 -0
- package/dist/models/model-registry.d.ts +38 -0
- package/dist/models/model-registry.js +69 -0
- package/dist/models/model-tiers.d.ts +28 -0
- package/dist/models/model-tiers.js +71 -0
- package/dist/models/model-validation.d.ts +25 -0
- package/dist/models/model-validation.js +291 -0
- package/dist/models/ollama-models.d.ts +73 -0
- package/dist/models/ollama-models.js +178 -0
- package/dist/models/provider-types.d.ts +6 -0
- package/dist/models/provider-types.js +1 -0
- package/dist/models/providers.d.ts +35 -0
- package/dist/models/providers.js +58 -0
- package/dist/models/types.d.ts +4 -0
- package/dist/models/types.js +4 -0
- package/dist/multi-agent/activity.d.ts +21 -0
- package/dist/multi-agent/activity.js +34 -0
- package/dist/multi-agent/agent-selection.d.ts +55 -0
- package/dist/multi-agent/agent-selection.js +90 -0
- package/dist/multi-agent/artifacts.d.ts +197 -0
- package/dist/multi-agent/artifacts.js +379 -0
- package/dist/multi-agent/checkpointer.d.ts +138 -0
- package/dist/multi-agent/checkpointer.js +471 -0
- package/dist/multi-agent/collision-utils.d.ts +16 -0
- package/dist/multi-agent/collision-utils.js +28 -0
- package/dist/multi-agent/context-resolver.d.ts +97 -0
- package/dist/multi-agent/context-resolver.js +316 -0
- package/dist/multi-agent/custom-agents.d.ts +83 -0
- package/dist/multi-agent/custom-agents.js +227 -0
- package/dist/multi-agent/delegation-tracker.d.ts +157 -0
- package/dist/multi-agent/delegation-tracker.js +243 -0
- package/dist/multi-agent/file-lock-hook.d.ts +29 -0
- package/dist/multi-agent/file-lock-hook.js +97 -0
- package/dist/multi-agent/file-locks.d.ts +58 -0
- package/dist/multi-agent/file-locks.js +194 -0
- package/dist/multi-agent/index.d.ts +24 -0
- package/dist/multi-agent/index.js +30 -0
- package/dist/multi-agent/mention-parser.d.ts +64 -0
- package/dist/multi-agent/mention-parser.js +146 -0
- package/dist/multi-agent/notification-manager.d.ts +84 -0
- package/dist/multi-agent/notification-manager.js +224 -0
- package/dist/multi-agent/pending-requests.d.ts +122 -0
- package/dist/multi-agent/pending-requests.js +155 -0
- package/dist/multi-agent/session-registry.d.ts +139 -0
- package/dist/multi-agent/session-registry.js +514 -0
- package/dist/multi-agent/shared-context.d.ts +293 -0
- package/dist/multi-agent/shared-context.js +671 -0
- package/dist/multi-agent/skill-requirements.d.ts +66 -0
- package/dist/multi-agent/skill-requirements.js +178 -0
- package/dist/multi-agent/task-assignment.d.ts +69 -0
- package/dist/multi-agent/task-assignment.js +123 -0
- package/dist/multi-agent/task-suggestion.d.ts +31 -0
- package/dist/multi-agent/task-suggestion.js +72 -0
- package/dist/multi-agent/team-agent.d.ts +201 -0
- package/dist/multi-agent/team-agent.js +488 -0
- package/dist/multi-agent/team.d.ts +286 -0
- package/dist/multi-agent/team.js +610 -0
- package/dist/multi-agent/tool-config.d.ts +110 -0
- package/dist/multi-agent/tool-config.js +661 -0
- package/dist/multi-agent/types.d.ts +211 -0
- package/dist/multi-agent/types.js +617 -0
- package/dist/prompts/plan-mode-prompt.d.ts +11 -0
- package/dist/prompts/plan-mode-prompt.js +95 -0
- package/dist/repl-helpers.js +5 -2
- package/dist/repl-v2.d.ts +401 -2
- package/dist/repl-v2.js +2588 -65
- package/dist/session/index.d.ts +6 -0
- package/dist/session/index.js +6 -0
- package/dist/session/project-session-manager.d.ts +158 -0
- package/dist/session/project-session-manager.js +650 -0
- package/dist/settings/index.d.ts +133 -13
- package/dist/settings/index.js +329 -24
- package/dist/settings/mcp-config.d.ts +76 -0
- package/dist/settings/mcp-config.js +143 -0
- package/dist/settings/paths.d.ts +4 -0
- package/dist/settings/paths.js +6 -0
- package/dist/shared-handlers.d.ts +62 -0
- package/dist/shared-handlers.js +48 -0
- package/dist/system-prompt/builder.d.ts +5 -0
- package/dist/system-prompt/builder.js +4 -0
- package/dist/system-prompt/index.d.ts +18 -0
- package/dist/system-prompt/index.js +18 -0
- package/dist/system-prompt/modules.d.ts +5 -0
- package/dist/system-prompt/modules.js +4 -0
- package/dist/tabbed-menu.js +2 -1
- package/dist/templates/compilr-md-import.d.ts +16 -0
- package/dist/templates/compilr-md-import.js +241 -0
- package/dist/templates/compilr-md.js +10 -61
- package/dist/templates/config-json.d.ts +1 -25
- package/dist/templates/index.d.ts +2 -0
- package/dist/templates/index.js +34 -73
- package/dist/tool-names.d.ts +113 -0
- package/dist/tool-names.js +239 -0
- package/dist/tools/ask-user-simple.d.ts +1 -1
- package/dist/tools/ask-user-simple.js +2 -1
- package/dist/tools/ask-user.d.ts +1 -1
- package/dist/tools/ask-user.js +2 -1
- package/dist/tools/backlog.d.ts +2 -2
- package/dist/tools/backlog.js +1 -1
- package/dist/tools/db-tools.d.ts +13 -61
- package/dist/tools/db-tools.js +12 -13
- package/dist/tools/delegate-background.d.ts +27 -0
- package/dist/tools/delegate-background.js +115 -0
- package/dist/tools/delegate.d.ts +22 -0
- package/dist/tools/delegate.js +97 -0
- package/dist/tools/delegation-status.d.ts +16 -0
- package/dist/tools/delegation-status.js +128 -0
- package/dist/tools/guide-tool.d.ts +12 -0
- package/dist/tools/guide-tool.js +59 -0
- package/dist/tools/handoff.d.ts +25 -0
- package/dist/tools/handoff.js +99 -0
- package/dist/tools/meta-tools.d.ts +26 -0
- package/dist/tools/meta-tools.js +47 -0
- package/dist/tools/platform-adapter.d.ts +35 -0
- package/dist/tools/platform-adapter.js +404 -0
- package/dist/tools/project-db.d.ts +5 -73
- package/dist/tools/project-db.js +5 -336
- package/dist/tools.d.ts +67 -2
- package/dist/tools.js +240 -48
- package/dist/ui/autocomplete-controller.d.ts +42 -0
- package/dist/ui/autocomplete-controller.js +384 -0
- package/dist/ui/base/index.d.ts +1 -1
- package/dist/ui/base/index.js +1 -1
- package/dist/ui/base/overlay-base-v2.d.ts +10 -0
- package/dist/ui/base/overlay-base-v2.js +14 -0
- package/dist/ui/base/render-utils.d.ts +19 -0
- package/dist/ui/base/render-utils.js +25 -0
- package/dist/ui/base/tabbed-list-overlay-v2.d.ts +16 -1
- package/dist/ui/base/tabbed-list-overlay-v2.js +19 -1
- package/dist/ui/constants/labels.d.ts +14 -0
- package/dist/ui/constants/labels.js +52 -0
- package/dist/ui/conversation-store.d.ts +55 -0
- package/dist/ui/conversation-store.js +107 -0
- package/dist/ui/conversation.js +11 -13
- package/dist/ui/diff.d.ts +7 -1
- package/dist/ui/diff.js +85 -48
- package/dist/ui/ephemeral.js +3 -9
- package/dist/ui/file-autocomplete.d.ts +24 -0
- package/dist/ui/file-autocomplete.js +56 -0
- package/dist/ui/footer-renderer.d.ts +69 -0
- package/dist/ui/footer-renderer.js +431 -0
- package/dist/ui/footer.d.ts +74 -7
- package/dist/ui/footer.js +173 -16
- package/dist/ui/input-controller.d.ts +51 -0
- package/dist/ui/input-controller.js +176 -0
- package/dist/ui/input-prompt.d.ts +19 -0
- package/dist/ui/input-prompt.js +206 -14
- package/dist/ui/keyboard-handler.d.ts +57 -0
- package/dist/ui/keyboard-handler.js +557 -0
- package/dist/ui/live-region-facade.d.ts +42 -0
- package/dist/ui/live-region-facade.js +205 -0
- package/dist/ui/live-region.d.ts +0 -4
- package/dist/ui/live-region.js +6 -14
- package/dist/ui/mascot/renderer.d.ts +1 -1
- package/dist/ui/mascot/renderer.js +37 -2
- package/dist/ui/overlay/data/tutorial-content.d.ts +9 -0
- package/dist/ui/overlay/data/tutorial-content.js +9 -0
- package/dist/ui/overlay/data/tutorial-registry.d.ts +12 -0
- package/dist/ui/overlay/data/tutorial-registry.js +116 -0
- package/dist/ui/overlay/data/tutorial-types.d.ts +35 -0
- package/dist/ui/overlay/data/tutorial-types.js +6 -0
- package/dist/ui/overlay/data/tutorials/basics/first-conversation.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/basics/first-conversation.js +220 -0
- package/dist/ui/overlay/data/tutorials/basics/first-project.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/basics/first-project.js +284 -0
- package/dist/ui/overlay/data/tutorials/basics/navigation.d.ts +8 -0
- package/dist/ui/overlay/data/tutorials/basics/navigation.js +22 -0
- package/dist/ui/overlay/data/tutorials/basics/welcome.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/basics/welcome.js +174 -0
- package/dist/ui/overlay/data/tutorials/config/context-management.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/config/context-management.js +158 -0
- package/dist/ui/overlay/data/tutorials/config/mcp-servers.d.ts +8 -0
- package/dist/ui/overlay/data/tutorials/config/mcp-servers.js +155 -0
- package/dist/ui/overlay/data/tutorials/config/model-selection.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/config/model-selection.js +162 -0
- package/dist/ui/overlay/data/tutorials/config/permissions-safety.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/config/permissions-safety.js +163 -0
- package/dist/ui/overlay/data/tutorials/config/settings-config.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/config/settings-config.js +166 -0
- package/dist/ui/overlay/data/tutorials/planning/arch.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/planning/arch.js +168 -0
- package/dist/ui/overlay/data/tutorials/planning/backlog.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/planning/backlog.js +103 -0
- package/dist/ui/overlay/data/tutorials/planning/build.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/planning/build.js +173 -0
- package/dist/ui/overlay/data/tutorials/planning/design.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/planning/design.js +205 -0
- package/dist/ui/overlay/data/tutorials/planning/docs.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/planning/docs.js +143 -0
- package/dist/ui/overlay/data/tutorials/planning/prd.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/planning/prd.js +173 -0
- package/dist/ui/overlay/data/tutorials/planning/scaffold.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/planning/scaffold.js +164 -0
- package/dist/ui/overlay/data/tutorials/planning/sketch.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/planning/sketch.js +58 -0
- package/dist/ui/overlay/data/tutorials/projects/anchors.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/projects/anchors.js +248 -0
- package/dist/ui/overlay/data/tutorials/projects/import-project.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/projects/import-project.js +172 -0
- package/dist/ui/overlay/data/tutorials/projects/managing-projects.d.ts +8 -0
- package/dist/ui/overlay/data/tutorials/projects/managing-projects.js +212 -0
- package/dist/ui/overlay/data/tutorials/projects/new-project.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/projects/new-project.js +251 -0
- package/dist/ui/overlay/data/tutorials/projects/session-management.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/projects/session-management.js +169 -0
- package/dist/ui/overlay/data/tutorials/teams/background-execution.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/teams/background-execution.js +171 -0
- package/dist/ui/overlay/data/tutorials/teams/multi-terminal.d.ts +8 -0
- package/dist/ui/overlay/data/tutorials/teams/multi-terminal.js +147 -0
- package/dist/ui/overlay/data/tutorials/teams/task-assignment.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/teams/task-assignment.js +204 -0
- package/dist/ui/overlay/data/tutorials/teams/team-overview.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/teams/team-overview.js +165 -0
- package/dist/ui/overlay/data/tutorials/teams/working-with-agents.d.ts +7 -0
- package/dist/ui/overlay/data/tutorials/teams/working-with-agents.js +172 -0
- package/dist/ui/overlay/impl/agents-overlay-v2.js +6 -17
- package/dist/ui/overlay/impl/anchors-overlay-v2.js +30 -64
- package/dist/ui/overlay/impl/artifact-detail-overlay-v2.d.ts +43 -0
- package/dist/ui/overlay/impl/artifact-detail-overlay-v2.js +232 -0
- package/dist/ui/overlay/impl/artifact-overlay-v2.d.ts +40 -0
- package/dist/ui/overlay/impl/artifact-overlay-v2.js +115 -0
- package/dist/ui/overlay/impl/ask-user-overlay-v2.js +2 -5
- package/dist/ui/overlay/impl/background-overlay-v2.d.ts +40 -0
- package/dist/ui/overlay/impl/background-overlay-v2.js +147 -0
- package/dist/ui/overlay/impl/backlog-overlay-v2.d.ts +4 -1
- package/dist/ui/overlay/impl/backlog-overlay-v2.js +55 -16
- package/dist/ui/overlay/impl/changelog-overlay-v2.d.ts +44 -0
- package/dist/ui/overlay/impl/changelog-overlay-v2.js +165 -0
- package/dist/ui/overlay/impl/commands-overlay-v2.js +4 -6
- package/dist/ui/overlay/impl/config-overlay-v2.d.ts +12 -1
- package/dist/ui/overlay/impl/config-overlay-v2.js +164 -100
- package/dist/ui/overlay/impl/custom-agent-form-overlay-v2.d.ts +83 -0
- package/dist/ui/overlay/impl/custom-agent-form-overlay-v2.js +711 -0
- package/dist/ui/overlay/impl/dashboard-overlay-v2.d.ts +2 -0
- package/dist/ui/overlay/impl/dashboard-overlay-v2.js +26 -3
- package/dist/ui/overlay/impl/delegations-overlay-v2.d.ts +28 -0
- package/dist/ui/overlay/impl/delegations-overlay-v2.js +279 -0
- package/dist/ui/overlay/impl/docs-overlay-v2.js +12 -9
- package/dist/ui/overlay/impl/document-detail-overlay-v2.d.ts +7 -0
- package/dist/ui/overlay/impl/document-detail-overlay-v2.js +119 -78
- package/dist/ui/overlay/impl/filter-overlay-v2.d.ts +41 -0
- package/dist/ui/overlay/impl/filter-overlay-v2.js +110 -0
- package/dist/ui/overlay/impl/games-overlay-v2.d.ts +31 -0
- package/dist/ui/overlay/impl/games-overlay-v2.js +135 -0
- package/dist/ui/overlay/impl/help-overlay-v2.d.ts +26 -3
- package/dist/ui/overlay/impl/help-overlay-v2.js +20 -42
- package/dist/ui/overlay/impl/login-overlay-v2.d.ts +49 -0
- package/dist/ui/overlay/impl/login-overlay-v2.js +277 -0
- package/dist/ui/overlay/impl/mcp-overlay-v2.d.ts +63 -0
- package/dist/ui/overlay/impl/mcp-overlay-v2.js +907 -0
- package/dist/ui/overlay/impl/model-overlay-v2.d.ts +57 -13
- package/dist/ui/overlay/impl/model-overlay-v2.js +1086 -61
- package/dist/ui/overlay/impl/new-overlay-v2.d.ts +37 -6
- package/dist/ui/overlay/impl/new-overlay-v2.js +715 -65
- package/dist/ui/overlay/impl/notifications-overlay-v2.d.ts +20 -0
- package/dist/ui/overlay/impl/notifications-overlay-v2.js +116 -0
- package/dist/ui/overlay/impl/onboarding-wizard-overlay-v2.d.ts +76 -0
- package/dist/ui/overlay/impl/onboarding-wizard-overlay-v2.js +728 -0
- package/dist/ui/overlay/impl/pending-overlay-v2.d.ts +51 -0
- package/dist/ui/overlay/impl/pending-overlay-v2.js +445 -0
- package/dist/ui/overlay/impl/permission-overlay-v2.js +5 -5
- package/dist/ui/overlay/impl/permissions-overlay-v2.d.ts +85 -0
- package/dist/ui/overlay/impl/permissions-overlay-v2.js +820 -0
- package/dist/ui/overlay/impl/plan-approval-overlay-v2.d.ts +35 -0
- package/dist/ui/overlay/impl/plan-approval-overlay-v2.js +181 -0
- package/dist/ui/overlay/impl/project-edit-overlay-v2.d.ts +36 -0
- package/dist/ui/overlay/impl/project-edit-overlay-v2.js +195 -0
- package/dist/ui/overlay/impl/projects-overlay-v2.d.ts +1 -0
- package/dist/ui/overlay/impl/projects-overlay-v2.js +278 -44
- package/dist/ui/overlay/impl/reset-overlay-v2.d.ts +39 -0
- package/dist/ui/overlay/impl/reset-overlay-v2.js +107 -0
- package/dist/ui/overlay/impl/resume-overlay-v2.d.ts +60 -0
- package/dist/ui/overlay/impl/resume-overlay-v2.js +414 -0
- package/dist/ui/overlay/impl/session-mode-overlay-v2.d.ts +43 -0
- package/dist/ui/overlay/impl/session-mode-overlay-v2.js +124 -0
- package/dist/ui/overlay/impl/tasks-overlay-v2.d.ts +28 -0
- package/dist/ui/overlay/impl/tasks-overlay-v2.js +283 -0
- package/dist/ui/overlay/impl/team-overlay-v2.d.ts +86 -0
- package/dist/ui/overlay/impl/team-overlay-v2.js +692 -0
- package/dist/ui/overlay/impl/terminals-overlay-v2.d.ts +26 -0
- package/dist/ui/overlay/impl/terminals-overlay-v2.js +217 -0
- package/dist/ui/overlay/impl/tools-overlay-v2.js +3 -7
- package/dist/ui/overlay/impl/tutorial-overlay-v2.d.ts +30 -16
- package/dist/ui/overlay/impl/tutorial-overlay-v2.js +133 -956
- package/dist/ui/overlay/impl/workflow-overlay-v2.d.ts +1 -0
- package/dist/ui/overlay/impl/workflow-overlay-v2.js +10 -4
- package/dist/ui/overlay/index.d.ts +20 -1
- package/dist/ui/overlay/index.js +19 -0
- package/dist/ui/overlay/types.d.ts +5 -0
- package/dist/ui/overlay-manager.d.ts +43 -0
- package/dist/ui/overlay-manager.js +238 -0
- package/dist/ui/overlays.js +4 -16
- package/dist/ui/permission-overlay.js +6 -5
- package/dist/ui/status-bar-controller.d.ts +33 -0
- package/dist/ui/status-bar-controller.js +99 -0
- package/dist/ui/subagent-renderer.js +3 -19
- package/dist/ui/terminal-autocomplete-utils.d.ts +23 -0
- package/dist/ui/terminal-autocomplete-utils.js +83 -0
- package/dist/ui/terminal-line-builders.d.ts +17 -0
- package/dist/ui/terminal-line-builders.js +42 -0
- package/dist/ui/terminal-render-item.d.ts +16 -0
- package/dist/ui/terminal-render-item.js +267 -0
- package/dist/ui/terminal-renderer.d.ts +7 -8
- package/dist/ui/terminal-renderer.js +7 -8
- package/dist/ui/terminal-types.d.ts +179 -0
- package/dist/ui/terminal-types.js +34 -0
- package/dist/ui/terminal-ui.d.ts +144 -276
- package/dist/ui/terminal-ui.js +384 -1861
- package/dist/ui/todo-zone.d.ts +19 -1
- package/dist/ui/todo-zone.js +71 -13
- package/dist/ui/tool-formatters.js +696 -1
- package/dist/ui/turn-metrics.d.ts +56 -0
- package/dist/ui/turn-metrics.js +75 -0
- package/dist/ui/types.d.ts +28 -0
- package/dist/ui/types.js +1 -0
- package/dist/ui/vscode-diff-ipc.d.ts +102 -0
- package/dist/ui/vscode-diff-ipc.js +385 -0
- package/dist/utils/credentials.d.ts +24 -5
- package/dist/utils/credentials.js +123 -9
- package/dist/utils/format-tokens.d.ts +13 -0
- package/dist/utils/format-tokens.js +18 -0
- package/dist/utils/git-config.d.ts +26 -0
- package/dist/utils/git-config.js +54 -0
- package/dist/utils/message-utils.d.ts +61 -0
- package/dist/utils/message-utils.js +72 -0
- package/dist/utils/model-tiers.d.ts +8 -1
- package/dist/utils/model-tiers.js +38 -16
- package/dist/utils/open-browser.d.ts +5 -0
- package/dist/utils/open-browser.js +32 -0
- package/dist/utils/path-safety.js +3 -2
- package/dist/utils/project-detection.d.ts +58 -0
- package/dist/utils/project-detection.js +424 -0
- package/dist/utils/project-memory.js +2 -1
- package/dist/utils/project-status.d.ts +2 -2
- package/dist/utils/startup-perf.d.ts +18 -0
- package/dist/utils/startup-perf.js +60 -0
- package/dist/utils/token-tracker.d.ts +62 -0
- package/dist/utils/token-tracker.js +150 -0
- package/dist/utils/token-types.d.ts +23 -0
- package/dist/utils/token-types.js +18 -0
- package/dist/utils/types/config-types.d.ts +32 -0
- package/dist/utils/types/config-types.js +8 -0
- package/dist/utils/update-checker.d.ts +28 -0
- package/dist/utils/update-checker.js +106 -0
- package/dist/utils/version.d.ts +7 -0
- package/dist/utils/version.js +10 -0
- package/dist/utils/vscode-detect.d.ts +39 -0
- package/dist/utils/vscode-detect.js +137 -0
- package/package.json +27 -13
- package/dist/commands/handler-types.d.ts +0 -68
- package/dist/commands/handler-types.js +0 -8
- package/dist/commands/handlers/agent-commands.d.ts +0 -13
- package/dist/commands/handlers/agent-commands.js +0 -305
- package/dist/commands/handlers/design-commands.d.ts +0 -15
- package/dist/commands/handlers/design-commands.js +0 -334
- package/dist/commands/handlers/index.d.ts +0 -20
- package/dist/commands/handlers/index.js +0 -43
- package/dist/commands/handlers/overlay-commands.d.ts +0 -21
- package/dist/commands/handlers/overlay-commands.js +0 -287
- package/dist/commands/handlers/project-commands.d.ts +0 -11
- package/dist/commands/handlers/project-commands.js +0 -167
- package/dist/commands/handlers/simple-commands.d.ts +0 -19
- package/dist/commands/handlers/simple-commands.js +0 -144
- package/dist/commands/registry.d.ts +0 -50
- package/dist/commands/registry.js +0 -75
- package/dist/index.old.d.ts +0 -7
- package/dist/index.old.js +0 -1014
- package/dist/repl.d.ts +0 -149
- package/dist/repl.js +0 -1151
- package/dist/templates/claude-md.d.ts +0 -7
- package/dist/templates/claude-md.js +0 -189
- package/dist/test-autocomplete.d.ts +0 -7
- package/dist/test-autocomplete.js +0 -85
- package/dist/test-tabbed-menu.d.ts +0 -7
- package/dist/test-tabbed-menu.js +0 -25
- package/dist/tool-selector.d.ts +0 -71
- package/dist/tool-selector.js +0 -184
- package/dist/tools/anchor-tools.d.ts +0 -31
- package/dist/tools/anchor-tools.js +0 -255
- package/dist/tools/backlog-wrappers.d.ts +0 -54
- package/dist/tools/backlog-wrappers.js +0 -338
- package/dist/tools/document-db.d.ts +0 -43
- package/dist/tools/document-db.js +0 -220
- package/dist/tools/workitem-db.d.ts +0 -103
- package/dist/tools/workitem-db.js +0 -549
- package/dist/ui/agents-overlay-v2.d.ts +0 -43
- package/dist/ui/agents-overlay-v2.js +0 -809
- package/dist/ui/agents-overlay.d.ts +0 -12
- package/dist/ui/agents-overlay.js +0 -863
- package/dist/ui/anchors-overlay.d.ts +0 -12
- package/dist/ui/anchors-overlay.js +0 -775
- package/dist/ui/arch-type-overlay.d.ts +0 -15
- package/dist/ui/arch-type-overlay.js +0 -201
- package/dist/ui/ask-user-overlay-v2.d.ts +0 -26
- package/dist/ui/ask-user-overlay-v2.js +0 -555
- package/dist/ui/ask-user-simple-overlay-v2.d.ts +0 -25
- package/dist/ui/ask-user-simple-overlay-v2.js +0 -215
- package/dist/ui/backlog-overlay.d.ts +0 -32
- package/dist/ui/backlog-overlay.js +0 -652
- package/dist/ui/commands-overlay-v2.d.ts +0 -33
- package/dist/ui/commands-overlay-v2.js +0 -441
- package/dist/ui/commands-overlay.d.ts +0 -16
- package/dist/ui/commands-overlay.js +0 -439
- package/dist/ui/config-overlay.d.ts +0 -35
- package/dist/ui/config-overlay.js +0 -707
- package/dist/ui/docs-overlay.d.ts +0 -17
- package/dist/ui/docs-overlay.js +0 -303
- package/dist/ui/footer-v2.d.ts +0 -222
- package/dist/ui/footer-v2.js +0 -1349
- package/dist/ui/help-overlay-v2.d.ts +0 -34
- package/dist/ui/help-overlay-v2.js +0 -309
- package/dist/ui/help-overlay.d.ts +0 -16
- package/dist/ui/help-overlay.js +0 -316
- package/dist/ui/init-overlay-v2.d.ts +0 -34
- package/dist/ui/init-overlay-v2.js +0 -600
- package/dist/ui/init-overlay.d.ts +0 -34
- package/dist/ui/init-overlay.js +0 -604
- package/dist/ui/input-prompt-v2.d.ts +0 -180
- package/dist/ui/input-prompt-v2.js +0 -999
- package/dist/ui/iteration-limit-overlay-v2.d.ts +0 -21
- package/dist/ui/iteration-limit-overlay-v2.js +0 -114
- package/dist/ui/keys-overlay-v2.d.ts +0 -41
- package/dist/ui/keys-overlay-v2.js +0 -248
- package/dist/ui/mascot-overlay-v2.d.ts +0 -41
- package/dist/ui/mascot-overlay-v2.js +0 -138
- package/dist/ui/mascot-overlay.d.ts +0 -21
- package/dist/ui/mascot-overlay.js +0 -146
- package/dist/ui/model-overlay-v2.d.ts +0 -49
- package/dist/ui/model-overlay-v2.js +0 -118
- package/dist/ui/model-overlay.d.ts +0 -27
- package/dist/ui/model-overlay.js +0 -221
- package/dist/ui/model-warning-overlay.d.ts +0 -30
- package/dist/ui/model-warning-overlay.js +0 -169
- package/dist/ui/new-overlay.d.ts +0 -34
- package/dist/ui/new-overlay.js +0 -604
- package/dist/ui/overlay/impl/init-overlay-v2.d.ts +0 -77
- package/dist/ui/overlay/impl/init-overlay-v2.js +0 -593
- package/dist/ui/overlay/overlay-types.d.ts +0 -128
- package/dist/ui/overlay/overlay-types.js +0 -22
- package/dist/ui/overlays/help-overlay-v2.d.ts +0 -28
- package/dist/ui/overlays/help-overlay-v2.js +0 -198
- package/dist/ui/overlays/index.d.ts +0 -11
- package/dist/ui/overlays/index.js +0 -11
- package/dist/ui/permission-overlay-v2.d.ts +0 -36
- package/dist/ui/permission-overlay-v2.js +0 -380
- package/dist/ui/projects-overlay.d.ts +0 -19
- package/dist/ui/projects-overlay.js +0 -484
- package/dist/ui/theme-overlay-v2.d.ts +0 -42
- package/dist/ui/theme-overlay-v2.js +0 -135
- package/dist/ui/theme-overlay.d.ts +0 -24
- package/dist/ui/theme-overlay.js +0 -127
- package/dist/ui/tools-overlay-v2.d.ts +0 -47
- package/dist/ui/tools-overlay-v2.js +0 -218
- package/dist/ui/tools-overlay.d.ts +0 -34
- package/dist/ui/tools-overlay.js +0 -230
- package/dist/ui/tutorial-overlay-v2.d.ts +0 -31
- package/dist/ui/tutorial-overlay-v2.js +0 -1035
- package/dist/ui/tutorial-overlay.d.ts +0 -11
- package/dist/ui/tutorial-overlay.js +0 -1034
- package/dist/ui/workflow-overlay.d.ts +0 -22
- package/dist/ui/workflow-overlay.js +0 -636
package/dist/settings/index.d.ts
CHANGED
|
@@ -4,33 +4,54 @@
|
|
|
4
4
|
* Centralized settings management for the CLI.
|
|
5
5
|
* Persistence in ~/.compilr-dev/settings.json
|
|
6
6
|
*/
|
|
7
|
-
export type PermissionMode = '
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
11
|
-
export type ProviderType = 'auto' | 'claude' | 'openai' | 'gemini' | 'ollama';
|
|
7
|
+
export type PermissionMode = 'normal' | 'plan' | 'auto-accept';
|
|
8
|
+
export type PermissionLevel = 'always' | 'session' | 'once' | 'deny';
|
|
9
|
+
export type NotificationMode = 'auto' | 'bell' | 'disabled';
|
|
10
|
+
export type ProviderType = 'auto' | 'claude' | 'openai' | 'gemini' | 'ollama' | 'together' | 'groq' | 'fireworks' | 'perplexity' | 'openrouter' | 'custom';
|
|
12
11
|
export type StartupMode = 'menu' | 'repl';
|
|
13
12
|
export type ProjectStartupMode = 'last' | 'off';
|
|
14
13
|
export type MascotSetting = 'none' | 'random' | 'neutral' | 'thinking' | 'looking_left' | 'looking_right' | 'sleeping' | 'alert' | 'error' | 'success' | 'success_minimal' | 'searching' | 'skeptical';
|
|
14
|
+
export type ProjectSessionMode = 'auto' | 'ask' | 'fresh';
|
|
15
|
+
export type CompactMode = 'active' | 'all' | 'auto';
|
|
16
|
+
/**
|
|
17
|
+
* Permission rule for a tool or pattern.
|
|
18
|
+
* Supports wildcards: git_* matches git_commit, git_branch, etc.
|
|
19
|
+
*/
|
|
20
|
+
export interface PermissionRule {
|
|
21
|
+
toolName: string;
|
|
22
|
+
level: PermissionLevel;
|
|
23
|
+
description?: string;
|
|
24
|
+
isDefault?: boolean;
|
|
25
|
+
}
|
|
15
26
|
export interface Settings {
|
|
16
27
|
theme?: string;
|
|
28
|
+
firstRunComplete: boolean;
|
|
29
|
+
telemetryEnabled: boolean;
|
|
17
30
|
defaultProvider: ProviderType;
|
|
18
31
|
defaultModel: string | null;
|
|
32
|
+
ollamaBaseUrl?: string;
|
|
19
33
|
autoCompact: boolean;
|
|
20
34
|
showTips: boolean;
|
|
21
35
|
reviseCode: boolean;
|
|
22
36
|
verbose: boolean;
|
|
23
37
|
progressBar: boolean;
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
checkUpdates: boolean;
|
|
39
|
+
lastUpdateCheck: number | null;
|
|
26
40
|
permissionMode: PermissionMode;
|
|
27
41
|
notifications: NotificationMode;
|
|
28
|
-
|
|
29
|
-
editorMode: EditorMode;
|
|
42
|
+
permissionRules: PermissionRule[];
|
|
30
43
|
startupMode: StartupMode;
|
|
31
44
|
projectStartup: ProjectStartupMode;
|
|
32
45
|
lastProjectId: number | null;
|
|
33
46
|
mascot: MascotSetting;
|
|
47
|
+
projectSessionMode: ProjectSessionMode;
|
|
48
|
+
sessionRetentionDays: number;
|
|
49
|
+
compactMode: CompactMode;
|
|
50
|
+
delegation: boolean;
|
|
51
|
+
vsDiffExtension: boolean;
|
|
52
|
+
lastSeenVersion?: string;
|
|
53
|
+
modelTiers?: Partial<Record<ProviderType, Partial<Record<'fast' | 'balanced' | 'powerful', string>>>>;
|
|
54
|
+
roleTierDefaults?: Record<string, 'fast' | 'balanced' | 'powerful'>;
|
|
34
55
|
}
|
|
35
56
|
/**
|
|
36
57
|
* Get all settings (cached)
|
|
@@ -63,16 +84,44 @@ export declare const isShowTipsEnabled: () => boolean;
|
|
|
63
84
|
export declare const isReviseCodeEnabled: () => boolean;
|
|
64
85
|
export declare const isVerboseEnabled: () => boolean;
|
|
65
86
|
export declare const isProgressBarEnabled: () => boolean;
|
|
66
|
-
export declare const
|
|
67
|
-
export declare const
|
|
87
|
+
export declare const isTelemetryEnabled: () => boolean;
|
|
88
|
+
export declare const isCheckUpdatesEnabled: () => boolean;
|
|
89
|
+
export declare const getLastUpdateCheck: () => number | null;
|
|
90
|
+
/**
|
|
91
|
+
* Record that we checked for updates
|
|
92
|
+
*/
|
|
93
|
+
export declare function recordUpdateCheck(): void;
|
|
68
94
|
export declare const getPermissionMode: () => PermissionMode;
|
|
69
95
|
export declare const getNotificationMode: () => NotificationMode;
|
|
70
|
-
|
|
71
|
-
|
|
96
|
+
type AgentMode = 'normal' | 'auto-accept' | 'plan';
|
|
97
|
+
/**
|
|
98
|
+
* Map UI AgentMode to PermissionMode setting.
|
|
99
|
+
* Now 1:1 mapping (except accept-edits which has no UI equivalent).
|
|
100
|
+
*/
|
|
101
|
+
export declare function agentModeToPermissionMode(mode: AgentMode): PermissionMode;
|
|
102
|
+
/**
|
|
103
|
+
* Map PermissionMode setting to UI AgentMode.
|
|
104
|
+
* Now 1:1 mapping for all modes.
|
|
105
|
+
*/
|
|
106
|
+
export declare function permissionModeToAgentMode(mode: PermissionMode): AgentMode;
|
|
107
|
+
/**
|
|
108
|
+
* Sync permission mode when UI mode changes via Shift+Tab.
|
|
109
|
+
* Also returns the new permission mode for display/logging.
|
|
110
|
+
*/
|
|
111
|
+
export declare function syncPermissionModeFromUI(uiMode: AgentMode): PermissionMode;
|
|
72
112
|
export declare const getStartupMode: () => StartupMode;
|
|
73
113
|
export declare const getProjectStartupMode: () => ProjectStartupMode;
|
|
74
114
|
export declare const getLastProjectId: () => number | null;
|
|
75
115
|
export declare const getMascotSetting: () => MascotSetting;
|
|
116
|
+
export declare const getProjectSessionMode: () => ProjectSessionMode;
|
|
117
|
+
export declare const getSessionRetentionDays: () => number;
|
|
118
|
+
export declare const getCompactMode: () => CompactMode;
|
|
119
|
+
export declare const isDelegationEnabled: () => boolean;
|
|
120
|
+
export declare const isFirstRunComplete: () => boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Mark onboarding as complete (called after wizard finishes)
|
|
123
|
+
*/
|
|
124
|
+
export declare function completeFirstRun(): void;
|
|
76
125
|
/**
|
|
77
126
|
* Remember the last opened project (for 'last' mode)
|
|
78
127
|
*/
|
|
@@ -101,3 +150,74 @@ export declare function projectStartupModeToDisplay(mode: ProjectStartupMode): s
|
|
|
101
150
|
* Map display value to internal project startup mode
|
|
102
151
|
*/
|
|
103
152
|
export declare function displayToProjectStartupMode(display: string): ProjectStartupMode;
|
|
153
|
+
/**
|
|
154
|
+
* Map internal project session mode to display value
|
|
155
|
+
*/
|
|
156
|
+
export declare function projectSessionModeToDisplay(mode: ProjectSessionMode): string;
|
|
157
|
+
/**
|
|
158
|
+
* Map display value to internal project session mode
|
|
159
|
+
*/
|
|
160
|
+
export declare function displayToProjectSessionMode(display: string): ProjectSessionMode;
|
|
161
|
+
/**
|
|
162
|
+
* Map session retention days to display value
|
|
163
|
+
*/
|
|
164
|
+
export declare function sessionRetentionToDisplay(days: number): string;
|
|
165
|
+
/**
|
|
166
|
+
* Map display value to session retention days
|
|
167
|
+
*/
|
|
168
|
+
export declare function displayToSessionRetention(display: string): number;
|
|
169
|
+
/**
|
|
170
|
+
* Map internal compact mode to display value
|
|
171
|
+
*/
|
|
172
|
+
export declare function compactModeToDisplay(mode: CompactMode): string;
|
|
173
|
+
/**
|
|
174
|
+
* Map display value to internal compact mode
|
|
175
|
+
*/
|
|
176
|
+
export declare function displayToCompactMode(display: string): CompactMode;
|
|
177
|
+
/**
|
|
178
|
+
* Get all permission rules (including defaults)
|
|
179
|
+
*/
|
|
180
|
+
export declare function getPermissionRules(): PermissionRule[];
|
|
181
|
+
/**
|
|
182
|
+
* Add a new permission rule
|
|
183
|
+
*/
|
|
184
|
+
export declare function addPermissionRule(rule: Omit<PermissionRule, 'isDefault'>): void;
|
|
185
|
+
/**
|
|
186
|
+
* Update a permission rule by tool name
|
|
187
|
+
*/
|
|
188
|
+
export declare function updatePermissionRule(toolName: string, updates: Partial<Omit<PermissionRule, 'toolName' | 'isDefault'>>): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Delete a permission rule (only non-default rules can be deleted)
|
|
191
|
+
*/
|
|
192
|
+
export declare function deletePermissionRule(toolName: string): boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Reset permission rules to defaults
|
|
195
|
+
*/
|
|
196
|
+
export declare function resetPermissionRules(): void;
|
|
197
|
+
/**
|
|
198
|
+
* Get the user's preferred model tier for a role.
|
|
199
|
+
* Returns undefined if no preference is set (use role's built-in default).
|
|
200
|
+
*/
|
|
201
|
+
export declare function getRoleTierDefault(roleId: string): 'fast' | 'balanced' | 'powerful' | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* Set the user's preferred model tier for a role.
|
|
204
|
+
*/
|
|
205
|
+
export declare function setRoleTierDefault(roleId: string, tier: 'fast' | 'balanced' | 'powerful'): void;
|
|
206
|
+
/**
|
|
207
|
+
* Clear the user's preferred model tier for a role (revert to built-in default).
|
|
208
|
+
*/
|
|
209
|
+
export declare function clearRoleTierDefault(roleId: string): void;
|
|
210
|
+
/**
|
|
211
|
+
* Find the permission rule that matches a tool name.
|
|
212
|
+
* Supports wildcards: git_* matches git_commit, git_branch, etc.
|
|
213
|
+
*/
|
|
214
|
+
export declare function findMatchingRule(toolName: string): PermissionRule | null;
|
|
215
|
+
/**
|
|
216
|
+
* Map permission level to display string
|
|
217
|
+
*/
|
|
218
|
+
export declare function permissionLevelToDisplay(level: PermissionLevel): string;
|
|
219
|
+
/**
|
|
220
|
+
* Map display string to permission level
|
|
221
|
+
*/
|
|
222
|
+
export declare function displayToPermissionLevel(display: string): PermissionLevel;
|
|
223
|
+
export {};
|
package/dist/settings/index.js
CHANGED
|
@@ -17,22 +17,38 @@ const CONFIG_FILE = path.join(CONFIG_DIR, 'settings.json');
|
|
|
17
17
|
// =============================================================================
|
|
18
18
|
const DEFAULT_SETTINGS = {
|
|
19
19
|
theme: 'compilr-dark',
|
|
20
|
+
// First run / onboarding
|
|
21
|
+
firstRunComplete: false, // New users start with onboarding wizard
|
|
22
|
+
// Telemetry default (opt-out model - default ON)
|
|
23
|
+
telemetryEnabled: true,
|
|
20
24
|
// Provider/Model defaults
|
|
21
25
|
defaultProvider: 'auto',
|
|
22
26
|
defaultModel: null,
|
|
23
27
|
// Boolean defaults
|
|
24
28
|
autoCompact: true,
|
|
25
|
-
showTips: true,
|
|
26
|
-
reviseCode: true,
|
|
29
|
+
showTips: true, // TODO: Not yet implemented
|
|
30
|
+
reviseCode: true, // TODO: Not yet implemented
|
|
27
31
|
verbose: false,
|
|
28
32
|
progressBar: true,
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
// Update defaults
|
|
34
|
+
checkUpdates: true, // Check for updates on startup
|
|
35
|
+
lastUpdateCheck: null, // Never checked
|
|
31
36
|
// Cycle defaults
|
|
32
|
-
permissionMode: '
|
|
37
|
+
permissionMode: 'normal',
|
|
33
38
|
notifications: 'auto',
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
// Default permission rules
|
|
40
|
+
permissionRules: [
|
|
41
|
+
{ toolName: 'bash', level: 'once', description: 'Execute shell commands', isDefault: true },
|
|
42
|
+
{ toolName: 'write_file', level: 'once', description: 'Write/create files', isDefault: true },
|
|
43
|
+
{ toolName: 'edit', level: 'once', description: 'Edit file contents', isDefault: true },
|
|
44
|
+
{ toolName: 'git_commit', level: 'once', description: 'Create git commits', isDefault: true },
|
|
45
|
+
{ toolName: 'git_branch', level: 'once', description: 'Create/delete branches', isDefault: true },
|
|
46
|
+
{ toolName: 'run_tests', level: 'once', description: 'Run test suite', isDefault: true },
|
|
47
|
+
{ toolName: 'run_lint', level: 'once', description: 'Run linter (may auto-fix)', isDefault: true },
|
|
48
|
+
{ toolName: 'read_file', level: 'always', description: 'Read files', isDefault: true },
|
|
49
|
+
{ toolName: 'glob', level: 'always', description: 'Find files by pattern', isDefault: true },
|
|
50
|
+
{ toolName: 'grep', level: 'always', description: 'Search file contents', isDefault: true },
|
|
51
|
+
],
|
|
36
52
|
// Startup default
|
|
37
53
|
startupMode: 'menu',
|
|
38
54
|
// Project startup defaults
|
|
@@ -40,6 +56,16 @@ const DEFAULT_SETTINGS = {
|
|
|
40
56
|
lastProjectId: null,
|
|
41
57
|
// Mascot default
|
|
42
58
|
mascot: 'neutral', // Default: show neutral mascot with logo
|
|
59
|
+
// Project-session binding default
|
|
60
|
+
projectSessionMode: 'auto', // Default: auto-resume last session when loading project
|
|
61
|
+
// Session history retention default (30 days)
|
|
62
|
+
sessionRetentionDays: 30,
|
|
63
|
+
// Compact mode default (auto: compact agents above 70% utilization)
|
|
64
|
+
compactMode: 'auto',
|
|
65
|
+
// Tool result delegation default (enabled by default)
|
|
66
|
+
delegation: true,
|
|
67
|
+
// VS Code diff extension default (opt-in)
|
|
68
|
+
vsDiffExtension: false,
|
|
43
69
|
};
|
|
44
70
|
// =============================================================================
|
|
45
71
|
// In-memory cache
|
|
@@ -93,6 +119,17 @@ export function getSettings() {
|
|
|
93
119
|
settingsCache.projectStartup = 'off';
|
|
94
120
|
saveToDisk(settingsCache);
|
|
95
121
|
}
|
|
122
|
+
// Migration: convert old permission mode values
|
|
123
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
124
|
+
const oldPermMode = settingsCache.permissionMode;
|
|
125
|
+
if (oldPermMode === 'default' || oldPermMode === 'accept-edits') {
|
|
126
|
+
settingsCache.permissionMode = 'normal';
|
|
127
|
+
saveToDisk(settingsCache);
|
|
128
|
+
}
|
|
129
|
+
else if (oldPermMode === 'dont-ask') {
|
|
130
|
+
settingsCache.permissionMode = 'auto-accept';
|
|
131
|
+
saveToDisk(settingsCache);
|
|
132
|
+
}
|
|
96
133
|
return settingsCache;
|
|
97
134
|
}
|
|
98
135
|
/**
|
|
@@ -140,17 +177,54 @@ export const getDefaultProvider = () => getSetting('defaultProvider');
|
|
|
140
177
|
export const getDefaultModel = () => getSetting('defaultModel');
|
|
141
178
|
// Boolean getters
|
|
142
179
|
export const isAutoCompactEnabled = () => getSetting('autoCompact');
|
|
143
|
-
export const isShowTipsEnabled = () => getSetting('showTips');
|
|
144
|
-
export const isReviseCodeEnabled = () => getSetting('reviseCode');
|
|
180
|
+
export const isShowTipsEnabled = () => getSetting('showTips'); // TODO: Not yet implemented
|
|
181
|
+
export const isReviseCodeEnabled = () => getSetting('reviseCode'); // TODO: Not yet implemented
|
|
145
182
|
export const isVerboseEnabled = () => getSetting('verbose');
|
|
146
183
|
export const isProgressBarEnabled = () => getSetting('progressBar');
|
|
147
|
-
export const
|
|
148
|
-
|
|
184
|
+
export const isTelemetryEnabled = () => getSetting('telemetryEnabled');
|
|
185
|
+
// Update getters
|
|
186
|
+
export const isCheckUpdatesEnabled = () => getSetting('checkUpdates');
|
|
187
|
+
export const getLastUpdateCheck = () => getSetting('lastUpdateCheck');
|
|
188
|
+
/**
|
|
189
|
+
* Record that we checked for updates
|
|
190
|
+
*/
|
|
191
|
+
export function recordUpdateCheck() {
|
|
192
|
+
setSetting('lastUpdateCheck', Date.now());
|
|
193
|
+
}
|
|
149
194
|
// Cycle getters
|
|
150
195
|
export const getPermissionMode = () => getSetting('permissionMode');
|
|
151
196
|
export const getNotificationMode = () => getSetting('notifications');
|
|
152
|
-
|
|
153
|
-
|
|
197
|
+
/**
|
|
198
|
+
* Map UI AgentMode to PermissionMode setting.
|
|
199
|
+
* Now 1:1 mapping (except accept-edits which has no UI equivalent).
|
|
200
|
+
*/
|
|
201
|
+
export function agentModeToPermissionMode(mode) {
|
|
202
|
+
switch (mode) {
|
|
203
|
+
case 'normal':
|
|
204
|
+
return 'normal';
|
|
205
|
+
case 'auto-accept':
|
|
206
|
+
return 'auto-accept';
|
|
207
|
+
case 'plan':
|
|
208
|
+
return 'plan';
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Map PermissionMode setting to UI AgentMode.
|
|
213
|
+
* Now 1:1 mapping for all modes.
|
|
214
|
+
*/
|
|
215
|
+
export function permissionModeToAgentMode(mode) {
|
|
216
|
+
// Direct 1:1 mapping - all modes match
|
|
217
|
+
return mode;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Sync permission mode when UI mode changes via Shift+Tab.
|
|
221
|
+
* Also returns the new permission mode for display/logging.
|
|
222
|
+
*/
|
|
223
|
+
export function syncPermissionModeFromUI(uiMode) {
|
|
224
|
+
const permMode = agentModeToPermissionMode(uiMode);
|
|
225
|
+
setSetting('permissionMode', permMode);
|
|
226
|
+
return permMode;
|
|
227
|
+
}
|
|
154
228
|
// Startup getter
|
|
155
229
|
export const getStartupMode = () => getSetting('startupMode');
|
|
156
230
|
// Project startup getters
|
|
@@ -158,6 +232,22 @@ export const getProjectStartupMode = () => getSetting('projectStartup');
|
|
|
158
232
|
export const getLastProjectId = () => getSetting('lastProjectId');
|
|
159
233
|
// Mascot getter
|
|
160
234
|
export const getMascotSetting = () => getSetting('mascot');
|
|
235
|
+
// Project-session binding getter
|
|
236
|
+
export const getProjectSessionMode = () => getSetting('projectSessionMode');
|
|
237
|
+
// Session retention getter
|
|
238
|
+
export const getSessionRetentionDays = () => getSetting('sessionRetentionDays');
|
|
239
|
+
// Compact mode getter
|
|
240
|
+
export const getCompactMode = () => getSetting('compactMode');
|
|
241
|
+
// Tool result delegation
|
|
242
|
+
export const isDelegationEnabled = () => getSetting('delegation');
|
|
243
|
+
// First run / onboarding
|
|
244
|
+
export const isFirstRunComplete = () => getSetting('firstRunComplete');
|
|
245
|
+
/**
|
|
246
|
+
* Mark onboarding as complete (called after wizard finishes)
|
|
247
|
+
*/
|
|
248
|
+
export function completeFirstRun() {
|
|
249
|
+
setSetting('firstRunComplete', true);
|
|
250
|
+
}
|
|
161
251
|
/**
|
|
162
252
|
* Remember the last opened project (for 'last' mode)
|
|
163
253
|
*/
|
|
@@ -172,12 +262,12 @@ export function setLastProjectId(projectId) {
|
|
|
172
262
|
*/
|
|
173
263
|
export function permissionModeToDisplay(mode) {
|
|
174
264
|
switch (mode) {
|
|
175
|
-
case '
|
|
176
|
-
return '
|
|
265
|
+
case 'normal':
|
|
266
|
+
return 'Normal';
|
|
177
267
|
case 'plan':
|
|
178
268
|
return 'Plan';
|
|
179
|
-
case '
|
|
180
|
-
return '
|
|
269
|
+
case 'auto-accept':
|
|
270
|
+
return 'Auto-accept';
|
|
181
271
|
}
|
|
182
272
|
}
|
|
183
273
|
/**
|
|
@@ -187,10 +277,10 @@ export function displayToPermissionMode(display) {
|
|
|
187
277
|
switch (display) {
|
|
188
278
|
case 'Plan':
|
|
189
279
|
return 'plan';
|
|
190
|
-
case '
|
|
191
|
-
return '
|
|
280
|
+
case 'Auto-accept':
|
|
281
|
+
return 'auto-accept';
|
|
192
282
|
default:
|
|
193
|
-
return '
|
|
283
|
+
return 'normal';
|
|
194
284
|
}
|
|
195
285
|
}
|
|
196
286
|
/**
|
|
@@ -200,8 +290,8 @@ export function notificationModeToDisplay(mode) {
|
|
|
200
290
|
switch (mode) {
|
|
201
291
|
case 'auto':
|
|
202
292
|
return 'Auto';
|
|
203
|
-
case '
|
|
204
|
-
return '
|
|
293
|
+
case 'bell':
|
|
294
|
+
return 'Terminal Bell';
|
|
205
295
|
case 'disabled':
|
|
206
296
|
return 'Disabled';
|
|
207
297
|
}
|
|
@@ -211,8 +301,8 @@ export function notificationModeToDisplay(mode) {
|
|
|
211
301
|
*/
|
|
212
302
|
export function displayToNotificationMode(display) {
|
|
213
303
|
switch (display) {
|
|
214
|
-
case '
|
|
215
|
-
return '
|
|
304
|
+
case 'Terminal Bell':
|
|
305
|
+
return 'bell';
|
|
216
306
|
case 'Disabled':
|
|
217
307
|
return 'disabled';
|
|
218
308
|
default:
|
|
@@ -241,3 +331,218 @@ export function displayToProjectStartupMode(display) {
|
|
|
241
331
|
return 'last';
|
|
242
332
|
}
|
|
243
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Map internal project session mode to display value
|
|
336
|
+
*/
|
|
337
|
+
export function projectSessionModeToDisplay(mode) {
|
|
338
|
+
switch (mode) {
|
|
339
|
+
case 'auto':
|
|
340
|
+
return 'Auto';
|
|
341
|
+
case 'ask':
|
|
342
|
+
return 'Ask';
|
|
343
|
+
case 'fresh':
|
|
344
|
+
return 'Fresh';
|
|
345
|
+
default:
|
|
346
|
+
return 'Auto';
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Map display value to internal project session mode
|
|
351
|
+
*/
|
|
352
|
+
export function displayToProjectSessionMode(display) {
|
|
353
|
+
switch (display) {
|
|
354
|
+
case 'Ask':
|
|
355
|
+
return 'ask';
|
|
356
|
+
case 'Fresh':
|
|
357
|
+
return 'fresh';
|
|
358
|
+
default:
|
|
359
|
+
return 'auto';
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Map session retention days to display value
|
|
364
|
+
*/
|
|
365
|
+
export function sessionRetentionToDisplay(days) {
|
|
366
|
+
if (days <= 0)
|
|
367
|
+
return 'Forever';
|
|
368
|
+
return `${String(days)} days`;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Map display value to session retention days
|
|
372
|
+
*/
|
|
373
|
+
export function displayToSessionRetention(display) {
|
|
374
|
+
if (display === 'Forever')
|
|
375
|
+
return 0;
|
|
376
|
+
const match = /^(\d+)\s*days?$/.exec(display);
|
|
377
|
+
if (match)
|
|
378
|
+
return parseInt(match[1], 10);
|
|
379
|
+
return 30; // Default fallback
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Map internal compact mode to display value
|
|
383
|
+
*/
|
|
384
|
+
export function compactModeToDisplay(mode) {
|
|
385
|
+
switch (mode) {
|
|
386
|
+
case 'active':
|
|
387
|
+
return 'Active agent';
|
|
388
|
+
case 'all':
|
|
389
|
+
return 'All agents';
|
|
390
|
+
case 'auto':
|
|
391
|
+
return 'Auto (>70%)';
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Map display value to internal compact mode
|
|
396
|
+
*/
|
|
397
|
+
export function displayToCompactMode(display) {
|
|
398
|
+
switch (display) {
|
|
399
|
+
case 'Active agent':
|
|
400
|
+
return 'active';
|
|
401
|
+
case 'All agents':
|
|
402
|
+
return 'all';
|
|
403
|
+
default:
|
|
404
|
+
return 'auto';
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
// =============================================================================
|
|
408
|
+
// Permission Rules Management
|
|
409
|
+
// =============================================================================
|
|
410
|
+
/**
|
|
411
|
+
* Get all permission rules (including defaults)
|
|
412
|
+
*/
|
|
413
|
+
export function getPermissionRules() {
|
|
414
|
+
return getSetting('permissionRules');
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Add a new permission rule
|
|
418
|
+
*/
|
|
419
|
+
export function addPermissionRule(rule) {
|
|
420
|
+
const rules = getPermissionRules();
|
|
421
|
+
// Check if rule with same toolName exists
|
|
422
|
+
const existingIndex = rules.findIndex(r => r.toolName === rule.toolName);
|
|
423
|
+
if (existingIndex >= 0) {
|
|
424
|
+
// Update existing rule
|
|
425
|
+
rules[existingIndex] = { ...rule, isDefault: false };
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
// Add new rule
|
|
429
|
+
rules.push({ ...rule, isDefault: false });
|
|
430
|
+
}
|
|
431
|
+
setSetting('permissionRules', rules);
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Update a permission rule by tool name
|
|
435
|
+
*/
|
|
436
|
+
export function updatePermissionRule(toolName, updates) {
|
|
437
|
+
const rules = getPermissionRules();
|
|
438
|
+
const index = rules.findIndex(r => r.toolName === toolName);
|
|
439
|
+
if (index < 0)
|
|
440
|
+
return false;
|
|
441
|
+
rules[index] = { ...rules[index], ...updates };
|
|
442
|
+
setSetting('permissionRules', rules);
|
|
443
|
+
return true;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Delete a permission rule (only non-default rules can be deleted)
|
|
447
|
+
*/
|
|
448
|
+
export function deletePermissionRule(toolName) {
|
|
449
|
+
const rules = getPermissionRules();
|
|
450
|
+
const index = rules.findIndex(r => r.toolName === toolName);
|
|
451
|
+
if (index < 0)
|
|
452
|
+
return false;
|
|
453
|
+
// Don't allow deleting default rules
|
|
454
|
+
if (rules[index].isDefault)
|
|
455
|
+
return false;
|
|
456
|
+
rules.splice(index, 1);
|
|
457
|
+
setSetting('permissionRules', rules);
|
|
458
|
+
return true;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Reset permission rules to defaults
|
|
462
|
+
*/
|
|
463
|
+
export function resetPermissionRules() {
|
|
464
|
+
setSetting('permissionRules', DEFAULT_SETTINGS.permissionRules);
|
|
465
|
+
}
|
|
466
|
+
// =============================================================================
|
|
467
|
+
// Role Tier Defaults
|
|
468
|
+
// =============================================================================
|
|
469
|
+
/**
|
|
470
|
+
* Get the user's preferred model tier for a role.
|
|
471
|
+
* Returns undefined if no preference is set (use role's built-in default).
|
|
472
|
+
*/
|
|
473
|
+
export function getRoleTierDefault(roleId) {
|
|
474
|
+
const defaults = getSetting('roleTierDefaults');
|
|
475
|
+
return defaults?.[roleId];
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Set the user's preferred model tier for a role.
|
|
479
|
+
*/
|
|
480
|
+
export function setRoleTierDefault(roleId, tier) {
|
|
481
|
+
const defaults = getSetting('roleTierDefaults') ?? {};
|
|
482
|
+
defaults[roleId] = tier;
|
|
483
|
+
setSetting('roleTierDefaults', defaults);
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Clear the user's preferred model tier for a role (revert to built-in default).
|
|
487
|
+
*/
|
|
488
|
+
export function clearRoleTierDefault(roleId) {
|
|
489
|
+
const defaults = getSetting('roleTierDefaults');
|
|
490
|
+
if (defaults && roleId in defaults) {
|
|
491
|
+
const { [roleId]: _removed, ...remaining } = defaults;
|
|
492
|
+
setSetting('roleTierDefaults', Object.keys(remaining).length > 0 ? remaining : undefined);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Find the permission rule that matches a tool name.
|
|
497
|
+
* Supports wildcards: git_* matches git_commit, git_branch, etc.
|
|
498
|
+
*/
|
|
499
|
+
export function findMatchingRule(toolName) {
|
|
500
|
+
const rules = getPermissionRules();
|
|
501
|
+
// First try exact match
|
|
502
|
+
const exactMatch = rules.find(r => r.toolName === toolName);
|
|
503
|
+
if (exactMatch)
|
|
504
|
+
return exactMatch;
|
|
505
|
+
// Then try wildcard patterns
|
|
506
|
+
for (const rule of rules) {
|
|
507
|
+
if (rule.toolName.includes('*')) {
|
|
508
|
+
const pattern = rule.toolName
|
|
509
|
+
.replace(/[.+?^${}()|[\]\\]/g, '\\$&') // Escape special regex chars
|
|
510
|
+
.replace(/\*/g, '.*'); // Convert * to .*
|
|
511
|
+
const regex = new RegExp(`^${pattern}$`);
|
|
512
|
+
if (regex.test(toolName)) {
|
|
513
|
+
return rule;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
return null;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Map permission level to display string
|
|
521
|
+
*/
|
|
522
|
+
export function permissionLevelToDisplay(level) {
|
|
523
|
+
switch (level) {
|
|
524
|
+
case 'always':
|
|
525
|
+
return 'Always';
|
|
526
|
+
case 'session':
|
|
527
|
+
return 'Session';
|
|
528
|
+
case 'once':
|
|
529
|
+
return 'Once';
|
|
530
|
+
case 'deny':
|
|
531
|
+
return 'Deny';
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Map display string to permission level
|
|
536
|
+
*/
|
|
537
|
+
export function displayToPermissionLevel(display) {
|
|
538
|
+
switch (display.toLowerCase()) {
|
|
539
|
+
case 'always':
|
|
540
|
+
return 'always';
|
|
541
|
+
case 'session':
|
|
542
|
+
return 'session';
|
|
543
|
+
case 'deny':
|
|
544
|
+
return 'deny';
|
|
545
|
+
default:
|
|
546
|
+
return 'once';
|
|
547
|
+
}
|
|
548
|
+
}
|