@compilr-dev/cli 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -12
- package/dist/agent.d.ts +74 -1
- package/dist/agent.js +259 -76
- package/dist/anchors/index.d.ts +9 -0
- package/dist/anchors/index.js +9 -0
- package/dist/anchors/project-anchors.d.ts +79 -0
- package/dist/anchors/project-anchors.js +202 -0
- package/dist/commands/handler-types.d.ts +68 -0
- package/dist/commands/handler-types.js +8 -0
- package/dist/commands/handlers/agent-commands.d.ts +13 -0
- package/dist/commands/handlers/agent-commands.js +305 -0
- package/dist/commands/handlers/design-commands.d.ts +15 -0
- package/dist/commands/handlers/design-commands.js +334 -0
- package/dist/commands/handlers/index.d.ts +20 -0
- package/dist/commands/handlers/index.js +43 -0
- package/dist/commands/handlers/overlay-commands.d.ts +21 -0
- package/dist/commands/handlers/overlay-commands.js +287 -0
- package/dist/commands/handlers/project-commands.d.ts +11 -0
- package/dist/commands/handlers/project-commands.js +167 -0
- package/dist/commands/handlers/simple-commands.d.ts +19 -0
- package/dist/commands/handlers/simple-commands.js +144 -0
- package/dist/commands/index.d.ts +2 -1
- package/dist/commands/registry.d.ts +50 -0
- package/dist/commands/registry.js +75 -0
- package/dist/commands-v2/handlers/context.d.ts +13 -0
- package/dist/commands-v2/handlers/context.js +348 -0
- package/dist/commands-v2/handlers/core.d.ts +13 -0
- package/dist/commands-v2/handlers/core.js +165 -0
- package/dist/commands-v2/handlers/debug.d.ts +11 -0
- package/dist/commands-v2/handlers/debug.js +159 -0
- package/dist/commands-v2/handlers/index.d.ts +12 -0
- package/dist/commands-v2/handlers/index.js +24 -0
- package/dist/commands-v2/handlers/project.d.ts +22 -0
- package/dist/commands-v2/handlers/project.js +814 -0
- package/dist/commands-v2/handlers/settings.d.ts +15 -0
- package/dist/commands-v2/handlers/settings.js +235 -0
- package/dist/commands-v2/index.d.ts +13 -0
- package/dist/commands-v2/index.js +15 -0
- package/dist/commands-v2/registry.d.ts +37 -0
- package/dist/commands-v2/registry.js +80 -0
- package/dist/commands-v2/types.d.ts +75 -0
- package/dist/commands-v2/types.js +7 -0
- package/dist/commands.js +110 -7
- package/dist/index.js +288 -29
- package/dist/input-handlers/index.d.ts +7 -0
- package/dist/input-handlers/index.js +7 -0
- package/dist/input-handlers/memory-handler.d.ts +26 -0
- package/dist/input-handlers/memory-handler.js +68 -0
- package/dist/repl-helpers.d.ts +63 -0
- package/dist/repl-helpers.js +318 -0
- package/dist/repl-v2.d.ts +155 -0
- package/dist/repl-v2.js +774 -0
- package/dist/repl.d.ts +32 -4
- package/dist/repl.js +250 -977
- package/dist/settings/index.d.ts +23 -0
- package/dist/settings/index.js +48 -0
- package/dist/settings/paths.d.ts +110 -0
- package/dist/settings/paths.js +264 -0
- package/dist/templates/compilr-md.js +7 -4
- package/dist/templates/index.js +3 -4
- package/dist/themes/colors.js +3 -1
- package/dist/themes/registry.d.ts +5 -36
- package/dist/themes/registry.js +11 -95
- package/dist/themes/types.d.ts +3 -38
- package/dist/themes/types.js +2 -2
- package/dist/tools/anchor-tools.d.ts +31 -0
- package/dist/tools/anchor-tools.js +255 -0
- package/dist/tools/backlog-wrappers.d.ts +54 -0
- package/dist/tools/backlog-wrappers.js +338 -0
- package/dist/tools/backlog.js +1 -1
- package/dist/tools/db-tools.d.ts +65 -0
- package/dist/tools/db-tools.js +19 -0
- package/dist/tools/document-db.d.ts +43 -0
- package/dist/tools/document-db.js +220 -0
- package/dist/tools/project-db.d.ts +102 -0
- package/dist/tools/project-db.js +370 -0
- package/dist/tools/workitem-db.d.ts +103 -0
- package/dist/tools/workitem-db.js +549 -0
- package/dist/tools.js +13 -3
- package/dist/ui/agents-overlay-v2.d.ts +43 -0
- package/dist/ui/agents-overlay-v2.js +809 -0
- package/dist/ui/agents-overlay.d.ts +5 -5
- package/dist/ui/agents-overlay.js +782 -420
- package/dist/ui/anchors-overlay.d.ts +12 -0
- package/dist/ui/anchors-overlay.js +775 -0
- package/dist/ui/arch-type-overlay.d.ts +1 -6
- package/dist/ui/arch-type-overlay.js +175 -203
- package/dist/ui/ask-user-overlay-v2.d.ts +26 -0
- package/dist/ui/ask-user-overlay-v2.js +555 -0
- package/dist/ui/ask-user-overlay.d.ts +2 -2
- package/dist/ui/ask-user-overlay.js +443 -535
- package/dist/ui/ask-user-simple-overlay-v2.d.ts +25 -0
- package/dist/ui/ask-user-simple-overlay-v2.js +215 -0
- package/dist/ui/ask-user-simple-overlay.d.ts +2 -2
- package/dist/ui/ask-user-simple-overlay.js +182 -209
- package/dist/ui/backlog-overlay.d.ts +16 -1
- package/dist/ui/backlog-overlay.js +525 -659
- package/dist/ui/base/index.d.ts +26 -0
- package/dist/ui/base/index.js +33 -0
- package/dist/ui/base/inline-overlay-utils.d.ts +217 -0
- package/dist/ui/base/inline-overlay-utils.js +320 -0
- package/dist/ui/base/inline-overlay.d.ts +159 -0
- package/dist/ui/base/inline-overlay.js +257 -0
- package/dist/ui/base/key-utils.d.ts +15 -0
- package/dist/ui/base/key-utils.js +30 -0
- package/dist/ui/base/overlay-base-v2.d.ts +193 -0
- package/dist/ui/base/overlay-base-v2.js +246 -0
- package/dist/ui/base/overlay-base.d.ts +156 -0
- package/dist/ui/base/overlay-base.js +238 -0
- package/dist/ui/base/overlay-lifecycle.d.ts +65 -0
- package/dist/ui/base/overlay-lifecycle.js +159 -0
- package/dist/ui/base/overlay-types.d.ts +185 -0
- package/dist/ui/base/overlay-types.js +7 -0
- package/dist/ui/base/render-utils.d.ts +8 -0
- package/dist/ui/base/render-utils.js +11 -0
- package/dist/ui/base/screen-stack.d.ts +148 -0
- package/dist/ui/base/screen-stack.js +184 -0
- package/dist/ui/base/tabbed-list-overlay-v2.d.ts +103 -0
- package/dist/ui/base/tabbed-list-overlay-v2.js +317 -0
- package/dist/ui/base/tabbed-list-overlay.d.ts +153 -0
- package/dist/ui/base/tabbed-list-overlay.js +369 -0
- package/dist/ui/commands-overlay-v2.d.ts +33 -0
- package/dist/ui/commands-overlay-v2.js +441 -0
- package/dist/ui/commands-overlay.d.ts +7 -2
- package/dist/ui/commands-overlay.js +384 -355
- package/dist/ui/config-overlay.d.ts +5 -4
- package/dist/ui/config-overlay.js +243 -513
- package/dist/ui/conversation.d.ts +75 -4
- package/dist/ui/conversation.js +374 -161
- package/dist/ui/docs-overlay.d.ts +17 -0
- package/dist/ui/docs-overlay.js +303 -0
- package/dist/ui/ephemeral.d.ts +1 -1
- package/dist/ui/ephemeral.js +1 -1
- package/dist/ui/features/index.d.ts +34 -0
- package/dist/ui/features/index.js +34 -0
- package/dist/ui/features/input-feature.d.ts +85 -0
- package/dist/ui/features/input-feature.js +238 -0
- package/dist/ui/features/list-feature.d.ts +155 -0
- package/dist/ui/features/list-feature.js +244 -0
- package/dist/ui/features/pagination-feature.d.ts +154 -0
- package/dist/ui/features/pagination-feature.js +238 -0
- package/dist/ui/features/search-feature.d.ts +148 -0
- package/dist/ui/features/search-feature.js +185 -0
- package/dist/ui/features/tab-feature.d.ts +194 -0
- package/dist/ui/features/tab-feature.js +307 -0
- package/dist/ui/footer-v2.d.ts +222 -0
- package/dist/ui/footer-v2.js +1349 -0
- package/dist/ui/footer.d.ts +107 -0
- package/dist/ui/footer.js +359 -67
- package/dist/ui/guardrail-overlay.d.ts +29 -0
- package/dist/ui/guardrail-overlay.js +145 -0
- package/dist/ui/help-overlay-v2.d.ts +34 -0
- package/dist/ui/help-overlay-v2.js +309 -0
- package/dist/ui/help-overlay.d.ts +16 -0
- package/dist/ui/help-overlay.js +316 -0
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -3
- package/dist/ui/init-overlay-v2.d.ts +34 -0
- package/dist/ui/init-overlay-v2.js +600 -0
- package/dist/ui/init-overlay.d.ts +12 -2
- package/dist/ui/init-overlay.js +349 -270
- package/dist/ui/input-prompt-v2.d.ts +1 -0
- package/dist/ui/input-prompt-v2.js +14 -6
- package/dist/ui/input-prompt.d.ts +116 -33
- package/dist/ui/input-prompt.js +536 -337
- package/dist/ui/iteration-limit-overlay-v2.d.ts +21 -0
- package/dist/ui/iteration-limit-overlay-v2.js +114 -0
- package/dist/ui/iteration-limit-overlay.d.ts +2 -2
- package/dist/ui/iteration-limit-overlay.js +92 -128
- package/dist/ui/keys-overlay-v2.d.ts +41 -0
- package/dist/ui/keys-overlay-v2.js +248 -0
- package/dist/ui/keys-overlay.d.ts +1 -0
- package/dist/ui/keys-overlay.js +203 -141
- package/dist/ui/line-utils.d.ts +88 -0
- package/dist/ui/line-utils.js +150 -0
- package/dist/ui/live-region.d.ts +161 -0
- package/dist/ui/live-region.js +387 -0
- package/dist/ui/mascot/expressions.d.ts +32 -0
- package/dist/ui/mascot/expressions.js +213 -0
- package/dist/ui/mascot/index.d.ts +8 -0
- package/dist/ui/mascot/index.js +8 -0
- package/dist/ui/mascot/renderer.d.ts +19 -0
- package/dist/ui/mascot/renderer.js +97 -0
- package/dist/ui/mascot-overlay-v2.d.ts +41 -0
- package/dist/ui/mascot-overlay-v2.js +138 -0
- package/dist/ui/mascot-overlay.d.ts +21 -0
- package/dist/ui/mascot-overlay.js +146 -0
- package/dist/ui/model-overlay-v2.d.ts +49 -0
- package/dist/ui/model-overlay-v2.js +118 -0
- package/dist/ui/model-overlay.d.ts +27 -0
- package/dist/ui/model-overlay.js +221 -0
- package/dist/ui/model-warning-overlay.js +3 -5
- package/dist/ui/new-overlay.d.ts +34 -0
- package/dist/ui/new-overlay.js +604 -0
- package/dist/ui/overlay/impl/agents-overlay-v2.d.ts +45 -0
- package/dist/ui/overlay/impl/agents-overlay-v2.js +825 -0
- package/dist/ui/overlay/impl/anchors-overlay-v2.d.ts +47 -0
- package/dist/ui/overlay/impl/anchors-overlay-v2.js +783 -0
- package/dist/ui/overlay/impl/arch-type-overlay-v2.d.ts +37 -0
- package/dist/ui/overlay/impl/arch-type-overlay-v2.js +240 -0
- package/dist/ui/overlay/impl/ask-user-overlay-v2.d.ts +72 -0
- package/dist/ui/overlay/impl/ask-user-overlay-v2.js +584 -0
- package/dist/ui/overlay/impl/ask-user-simple-overlay-v2.d.ts +46 -0
- package/dist/ui/overlay/impl/ask-user-simple-overlay-v2.js +204 -0
- package/dist/ui/overlay/impl/backlog-overlay-v2.d.ts +49 -0
- package/dist/ui/overlay/impl/backlog-overlay-v2.js +642 -0
- package/dist/ui/overlay/impl/commands-overlay-v2.d.ts +33 -0
- package/dist/ui/overlay/impl/commands-overlay-v2.js +441 -0
- package/dist/ui/overlay/impl/config-overlay-v2.d.ts +100 -0
- package/dist/ui/overlay/impl/config-overlay-v2.js +654 -0
- package/dist/ui/overlay/impl/dashboard-overlay-v2.d.ts +55 -0
- package/dist/ui/overlay/impl/dashboard-overlay-v2.js +359 -0
- package/dist/ui/overlay/impl/docs-overlay-v2.d.ts +45 -0
- package/dist/ui/overlay/impl/docs-overlay-v2.js +114 -0
- package/dist/ui/overlay/impl/document-detail-overlay-v2.d.ts +77 -0
- package/dist/ui/overlay/impl/document-detail-overlay-v2.js +1071 -0
- package/dist/ui/overlay/impl/guardrail-overlay-v2.d.ts +43 -0
- package/dist/ui/overlay/impl/guardrail-overlay-v2.js +114 -0
- package/dist/ui/overlay/impl/help-overlay-v2.d.ts +34 -0
- package/dist/ui/overlay/impl/help-overlay-v2.js +309 -0
- package/dist/ui/overlay/impl/init-overlay-v2.d.ts +77 -0
- package/dist/ui/overlay/impl/init-overlay-v2.js +593 -0
- package/dist/ui/overlay/impl/init-setup-overlay-v2.d.ts +25 -0
- package/dist/ui/overlay/impl/init-setup-overlay-v2.js +97 -0
- package/dist/ui/overlay/impl/iteration-limit-overlay-v2.d.ts +35 -0
- package/dist/ui/overlay/impl/iteration-limit-overlay-v2.js +105 -0
- package/dist/ui/overlay/impl/keys-overlay-v2.d.ts +41 -0
- package/dist/ui/overlay/impl/keys-overlay-v2.js +248 -0
- package/dist/ui/overlay/impl/mascot-overlay-v2.d.ts +41 -0
- package/dist/ui/overlay/impl/mascot-overlay-v2.js +138 -0
- package/dist/ui/overlay/impl/model-overlay-v2.d.ts +49 -0
- package/dist/ui/overlay/impl/model-overlay-v2.js +118 -0
- package/dist/ui/overlay/impl/model-warning-overlay-v2.d.ts +46 -0
- package/dist/ui/overlay/impl/model-warning-overlay-v2.js +132 -0
- package/dist/ui/overlay/impl/new-overlay-v2.d.ts +77 -0
- package/dist/ui/overlay/impl/new-overlay-v2.js +593 -0
- package/dist/ui/overlay/impl/permission-overlay-v2.d.ts +36 -0
- package/dist/ui/overlay/impl/permission-overlay-v2.js +380 -0
- package/dist/ui/overlay/impl/projects-overlay-v2.d.ts +36 -0
- package/dist/ui/overlay/impl/projects-overlay-v2.js +499 -0
- package/dist/ui/overlay/impl/theme-overlay-v2.d.ts +42 -0
- package/dist/ui/overlay/impl/theme-overlay-v2.js +135 -0
- package/dist/ui/overlay/impl/tools-overlay-v2.d.ts +47 -0
- package/dist/ui/overlay/impl/tools-overlay-v2.js +218 -0
- package/dist/ui/overlay/impl/tutorial-overlay-v2.d.ts +31 -0
- package/dist/ui/overlay/impl/tutorial-overlay-v2.js +1035 -0
- package/dist/ui/overlay/impl/workflow-overlay-v2.d.ts +80 -0
- package/dist/ui/overlay/impl/workflow-overlay-v2.js +637 -0
- package/dist/ui/overlay/index.d.ts +33 -0
- package/dist/ui/overlay/index.js +35 -0
- package/dist/ui/overlay/key-utils.d.ts +6 -0
- package/dist/ui/overlay/key-utils.js +6 -0
- package/dist/ui/overlay/overlay-types.d.ts +128 -0
- package/dist/ui/overlay/overlay-types.js +22 -0
- package/dist/ui/overlay/types.d.ts +135 -0
- package/dist/ui/overlay/types.js +22 -0
- package/dist/ui/overlays/help-overlay-v2.d.ts +28 -0
- package/dist/ui/overlays/help-overlay-v2.js +198 -0
- package/dist/ui/overlays/index.d.ts +11 -0
- package/dist/ui/overlays/index.js +11 -0
- package/dist/ui/overlays.d.ts +0 -4
- package/dist/ui/overlays.js +0 -444
- package/dist/ui/permission-overlay-v2.d.ts +36 -0
- package/dist/ui/permission-overlay-v2.js +380 -0
- package/dist/ui/permission-overlay.d.ts +1 -1
- package/dist/ui/permission-overlay.js +186 -298
- package/dist/ui/projects-overlay.d.ts +19 -0
- package/dist/ui/projects-overlay.js +484 -0
- package/dist/ui/providers/types.d.ts +178 -0
- package/dist/ui/providers/types.js +9 -0
- package/dist/ui/render-modes.d.ts +36 -0
- package/dist/ui/render-modes.js +44 -0
- package/dist/ui/startup-menu.d.ts +36 -0
- package/dist/ui/startup-menu.js +236 -0
- package/dist/ui/subagent-renderer.d.ts +117 -0
- package/dist/ui/subagent-renderer.js +334 -0
- package/dist/ui/terminal-codes.d.ts +94 -0
- package/dist/ui/terminal-codes.js +124 -0
- package/dist/ui/terminal-renderer.d.ts +221 -0
- package/dist/ui/terminal-renderer.js +751 -0
- package/dist/ui/terminal-ui.d.ts +463 -0
- package/dist/ui/terminal-ui.js +2296 -0
- package/dist/ui/terminal.d.ts +20 -0
- package/dist/ui/terminal.js +72 -0
- package/dist/ui/theme-overlay-v2.d.ts +42 -0
- package/dist/ui/theme-overlay-v2.js +135 -0
- package/dist/ui/theme-overlay.d.ts +24 -0
- package/dist/ui/theme-overlay.js +127 -0
- package/dist/ui/todo-zone.js +53 -25
- package/dist/ui/tool-formatters.d.ts +16 -0
- package/dist/ui/tool-formatters.js +516 -0
- package/dist/ui/tools-overlay-v2.d.ts +47 -0
- package/dist/ui/tools-overlay-v2.js +218 -0
- package/dist/ui/tools-overlay.d.ts +10 -2
- package/dist/ui/tools-overlay.js +172 -220
- package/dist/ui/tutorial-overlay-v2.d.ts +31 -0
- package/dist/ui/tutorial-overlay-v2.js +1035 -0
- package/dist/ui/tutorial-overlay.d.ts +1 -0
- package/dist/ui/tutorial-overlay.js +400 -302
- package/dist/ui/workflow-overlay.d.ts +22 -0
- package/dist/ui/workflow-overlay.js +636 -0
- package/dist/utils/debug-log.d.ts +28 -0
- package/dist/utils/debug-log.js +57 -0
- package/dist/utils/model-tiers.js +1 -1
- package/dist/utils/path-safety.d.ts +56 -0
- package/dist/utils/path-safety.js +239 -0
- package/dist/workflow/guided-mode-injector.d.ts +42 -0
- package/dist/workflow/guided-mode-injector.js +191 -0
- package/dist/workflow/index.d.ts +8 -0
- package/dist/workflow/index.js +8 -0
- package/dist/workflow/step-criteria.d.ts +62 -0
- package/dist/workflow/step-criteria.js +150 -0
- package/dist/workflow/step-tracker.d.ts +92 -0
- package/dist/workflow/step-tracker.js +141 -0
- package/package.json +12 -5
package/dist/settings/index.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export type NotificationMode = 'auto' | 'enabled' | 'disabled';
|
|
|
9
9
|
export type OutputStyle = 'default' | 'compact' | 'verbose';
|
|
10
10
|
export type EditorMode = 'normal' | 'vim' | 'emacs';
|
|
11
11
|
export type ProviderType = 'auto' | 'claude' | 'openai' | 'gemini' | 'ollama';
|
|
12
|
+
export type StartupMode = 'menu' | 'repl';
|
|
13
|
+
export type ProjectStartupMode = 'last' | 'off';
|
|
14
|
+
export type MascotSetting = 'none' | 'random' | 'neutral' | 'thinking' | 'looking_left' | 'looking_right' | 'sleeping' | 'alert' | 'error' | 'success' | 'success_minimal' | 'searching' | 'skeptical';
|
|
12
15
|
export interface Settings {
|
|
13
16
|
theme?: string;
|
|
14
17
|
defaultProvider: ProviderType;
|
|
@@ -24,6 +27,10 @@ export interface Settings {
|
|
|
24
27
|
notifications: NotificationMode;
|
|
25
28
|
outputStyle: OutputStyle;
|
|
26
29
|
editorMode: EditorMode;
|
|
30
|
+
startupMode: StartupMode;
|
|
31
|
+
projectStartup: ProjectStartupMode;
|
|
32
|
+
lastProjectId: number | null;
|
|
33
|
+
mascot: MascotSetting;
|
|
27
34
|
}
|
|
28
35
|
/**
|
|
29
36
|
* Get all settings (cached)
|
|
@@ -62,6 +69,14 @@ export declare const getPermissionMode: () => PermissionMode;
|
|
|
62
69
|
export declare const getNotificationMode: () => NotificationMode;
|
|
63
70
|
export declare const getOutputStyle: () => OutputStyle;
|
|
64
71
|
export declare const getEditorMode: () => EditorMode;
|
|
72
|
+
export declare const getStartupMode: () => StartupMode;
|
|
73
|
+
export declare const getProjectStartupMode: () => ProjectStartupMode;
|
|
74
|
+
export declare const getLastProjectId: () => number | null;
|
|
75
|
+
export declare const getMascotSetting: () => MascotSetting;
|
|
76
|
+
/**
|
|
77
|
+
* Remember the last opened project (for 'last' mode)
|
|
78
|
+
*/
|
|
79
|
+
export declare function setLastProjectId(projectId: number): void;
|
|
65
80
|
/**
|
|
66
81
|
* Map internal permission mode to display value
|
|
67
82
|
*/
|
|
@@ -78,3 +93,11 @@ export declare function notificationModeToDisplay(mode: NotificationMode): strin
|
|
|
78
93
|
* Map display value to internal notification mode
|
|
79
94
|
*/
|
|
80
95
|
export declare function displayToNotificationMode(display: string): NotificationMode;
|
|
96
|
+
/**
|
|
97
|
+
* Map internal project startup mode to display value
|
|
98
|
+
*/
|
|
99
|
+
export declare function projectStartupModeToDisplay(mode: ProjectStartupMode): string;
|
|
100
|
+
/**
|
|
101
|
+
* Map display value to internal project startup mode
|
|
102
|
+
*/
|
|
103
|
+
export declare function displayToProjectStartupMode(display: string): ProjectStartupMode;
|
package/dist/settings/index.js
CHANGED
|
@@ -33,6 +33,13 @@ const DEFAULT_SETTINGS = {
|
|
|
33
33
|
notifications: 'auto',
|
|
34
34
|
outputStyle: 'default',
|
|
35
35
|
editorMode: 'normal',
|
|
36
|
+
// Startup default
|
|
37
|
+
startupMode: 'menu',
|
|
38
|
+
// Project startup defaults
|
|
39
|
+
projectStartup: 'last', // Default: load last opened project
|
|
40
|
+
lastProjectId: null,
|
|
41
|
+
// Mascot default
|
|
42
|
+
mascot: 'neutral', // Default: show neutral mascot with logo
|
|
36
43
|
};
|
|
37
44
|
// =============================================================================
|
|
38
45
|
// In-memory cache
|
|
@@ -80,6 +87,12 @@ export function getSettings() {
|
|
|
80
87
|
}
|
|
81
88
|
const stored = loadFromDisk();
|
|
82
89
|
settingsCache = { ...DEFAULT_SETTINGS, ...stored };
|
|
90
|
+
// Migration: convert deprecated 'cwd' to 'off'
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
92
|
+
if (settingsCache.projectStartup === 'cwd') {
|
|
93
|
+
settingsCache.projectStartup = 'off';
|
|
94
|
+
saveToDisk(settingsCache);
|
|
95
|
+
}
|
|
83
96
|
return settingsCache;
|
|
84
97
|
}
|
|
85
98
|
/**
|
|
@@ -138,6 +151,19 @@ export const getPermissionMode = () => getSetting('permissionMode');
|
|
|
138
151
|
export const getNotificationMode = () => getSetting('notifications');
|
|
139
152
|
export const getOutputStyle = () => getSetting('outputStyle');
|
|
140
153
|
export const getEditorMode = () => getSetting('editorMode');
|
|
154
|
+
// Startup getter
|
|
155
|
+
export const getStartupMode = () => getSetting('startupMode');
|
|
156
|
+
// Project startup getters
|
|
157
|
+
export const getProjectStartupMode = () => getSetting('projectStartup');
|
|
158
|
+
export const getLastProjectId = () => getSetting('lastProjectId');
|
|
159
|
+
// Mascot getter
|
|
160
|
+
export const getMascotSetting = () => getSetting('mascot');
|
|
161
|
+
/**
|
|
162
|
+
* Remember the last opened project (for 'last' mode)
|
|
163
|
+
*/
|
|
164
|
+
export function setLastProjectId(projectId) {
|
|
165
|
+
setSetting('lastProjectId', projectId);
|
|
166
|
+
}
|
|
141
167
|
// =============================================================================
|
|
142
168
|
// Display Value Mappers (for config overlay)
|
|
143
169
|
// =============================================================================
|
|
@@ -193,3 +219,25 @@ export function displayToNotificationMode(display) {
|
|
|
193
219
|
return 'auto';
|
|
194
220
|
}
|
|
195
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Map internal project startup mode to display value
|
|
224
|
+
*/
|
|
225
|
+
export function projectStartupModeToDisplay(mode) {
|
|
226
|
+
switch (mode) {
|
|
227
|
+
case 'last':
|
|
228
|
+
return 'Last opened';
|
|
229
|
+
case 'off':
|
|
230
|
+
return 'Off';
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Map display value to internal project startup mode
|
|
235
|
+
*/
|
|
236
|
+
export function displayToProjectStartupMode(display) {
|
|
237
|
+
switch (display) {
|
|
238
|
+
case 'Off':
|
|
239
|
+
return 'off';
|
|
240
|
+
default:
|
|
241
|
+
return 'last';
|
|
242
|
+
}
|
|
243
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path Configuration Module
|
|
3
|
+
*
|
|
4
|
+
* Centralized path configuration with safety guards.
|
|
5
|
+
* Inspired by ATLAS CLI config/index.ts
|
|
6
|
+
*
|
|
7
|
+
* Priority order:
|
|
8
|
+
* 1. Environment variable (COMPILR_*)
|
|
9
|
+
* 2. Config file (~/.compilr-dev/settings.json)
|
|
10
|
+
* 3. Default/derived value
|
|
11
|
+
*/
|
|
12
|
+
export interface PathConfig {
|
|
13
|
+
workspacePath?: string;
|
|
14
|
+
projectsPath?: string;
|
|
15
|
+
dataPath?: string;
|
|
16
|
+
allowedPaths?: string[];
|
|
17
|
+
requireProjectMatch?: boolean;
|
|
18
|
+
deleteProtection?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ResolvedPathConfig {
|
|
21
|
+
workspacePath: string;
|
|
22
|
+
projectsPath: string;
|
|
23
|
+
dataPath: string;
|
|
24
|
+
allowedPaths: string[];
|
|
25
|
+
requireProjectMatch: boolean;
|
|
26
|
+
deleteProtection: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get the data directory (where config, DB, credentials live)
|
|
30
|
+
* Priority: ENV > config > default
|
|
31
|
+
*/
|
|
32
|
+
export declare function getDataPath(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Get the workspace root directory
|
|
35
|
+
* Priority: ENV > config > default
|
|
36
|
+
*/
|
|
37
|
+
export declare function getWorkspacePath(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Get the projects directory
|
|
40
|
+
* Priority: ENV > config > derived from workspace
|
|
41
|
+
*/
|
|
42
|
+
export declare function getProjectsPath(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Get all allowed paths for delete operations
|
|
45
|
+
*/
|
|
46
|
+
export declare function getAllowedDeletePaths(): string[];
|
|
47
|
+
/**
|
|
48
|
+
* Check if delete protection is enabled (default: true)
|
|
49
|
+
*/
|
|
50
|
+
export declare function isDeleteProtectionEnabled(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Check if project match warning is enabled (default: true)
|
|
53
|
+
*/
|
|
54
|
+
export declare function isProjectMatchRequired(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Get resolved configuration for display
|
|
57
|
+
*/
|
|
58
|
+
export declare function getResolvedPathConfig(): ResolvedPathConfig;
|
|
59
|
+
/**
|
|
60
|
+
* Set workspace path
|
|
61
|
+
*/
|
|
62
|
+
export declare function setWorkspacePath(p: string): void;
|
|
63
|
+
/**
|
|
64
|
+
* Set projects path
|
|
65
|
+
*/
|
|
66
|
+
export declare function setProjectsPath(p: string): void;
|
|
67
|
+
/**
|
|
68
|
+
* Set data path
|
|
69
|
+
*/
|
|
70
|
+
export declare function setDataPath(p: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Enable/disable delete protection
|
|
73
|
+
*/
|
|
74
|
+
export declare function setDeleteProtection(enabled: boolean): void;
|
|
75
|
+
/**
|
|
76
|
+
* Enable/disable project match warning
|
|
77
|
+
*/
|
|
78
|
+
export declare function setProjectMatchRequired(enabled: boolean): void;
|
|
79
|
+
/**
|
|
80
|
+
* Add an allowed path for delete operations
|
|
81
|
+
*/
|
|
82
|
+
export declare function addAllowedPath(p: string): void;
|
|
83
|
+
/**
|
|
84
|
+
* Remove an allowed path
|
|
85
|
+
*/
|
|
86
|
+
export declare function removeAllowedPath(p: string): void;
|
|
87
|
+
/**
|
|
88
|
+
* Clear all custom allowed paths
|
|
89
|
+
*/
|
|
90
|
+
export declare function clearAllowedPaths(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Get the database file path
|
|
93
|
+
*/
|
|
94
|
+
export declare function getDatabasePath(): string;
|
|
95
|
+
/**
|
|
96
|
+
* Get the credentials file path
|
|
97
|
+
*/
|
|
98
|
+
export declare function getCredentialsPath(): string;
|
|
99
|
+
/**
|
|
100
|
+
* Get the settings file path
|
|
101
|
+
*/
|
|
102
|
+
export declare function getSettingsPath(): string;
|
|
103
|
+
/**
|
|
104
|
+
* Ensure data directory exists
|
|
105
|
+
*/
|
|
106
|
+
export declare function ensureDataDirectory(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Ensure projects directory exists
|
|
109
|
+
*/
|
|
110
|
+
export declare function ensureProjectsDirectory(): void;
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path Configuration Module
|
|
3
|
+
*
|
|
4
|
+
* Centralized path configuration with safety guards.
|
|
5
|
+
* Inspired by ATLAS CLI config/index.ts
|
|
6
|
+
*
|
|
7
|
+
* Priority order:
|
|
8
|
+
* 1. Environment variable (COMPILR_*)
|
|
9
|
+
* 2. Config file (~/.compilr-dev/settings.json)
|
|
10
|
+
* 3. Default/derived value
|
|
11
|
+
*/
|
|
12
|
+
import * as fs from 'fs';
|
|
13
|
+
import * as path from 'path';
|
|
14
|
+
import * as os from 'os';
|
|
15
|
+
// =============================================================================
|
|
16
|
+
// Constants
|
|
17
|
+
// =============================================================================
|
|
18
|
+
const CONFIG_DIR = path.join(os.homedir(), '.compilr-dev');
|
|
19
|
+
const CONFIG_FILE = path.join(CONFIG_DIR, 'settings.json');
|
|
20
|
+
const DEFAULT_DATA_PATH = CONFIG_DIR;
|
|
21
|
+
const DEFAULT_WORKSPACE_PATH = os.homedir();
|
|
22
|
+
// =============================================================================
|
|
23
|
+
// Helpers
|
|
24
|
+
// =============================================================================
|
|
25
|
+
/**
|
|
26
|
+
* Load path config from disk
|
|
27
|
+
*/
|
|
28
|
+
function loadPathConfig() {
|
|
29
|
+
try {
|
|
30
|
+
if (fs.existsSync(CONFIG_FILE)) {
|
|
31
|
+
const data = fs.readFileSync(CONFIG_FILE, 'utf-8');
|
|
32
|
+
const settings = JSON.parse(data);
|
|
33
|
+
return {
|
|
34
|
+
workspacePath: settings.workspacePath,
|
|
35
|
+
projectsPath: settings.projectsPath,
|
|
36
|
+
dataPath: settings.dataPath,
|
|
37
|
+
allowedPaths: settings.allowedPaths,
|
|
38
|
+
requireProjectMatch: settings.requireProjectMatch,
|
|
39
|
+
deleteProtection: settings.deleteProtection,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
// Ignore errors, return empty config
|
|
45
|
+
}
|
|
46
|
+
return {};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Save path config to disk (merges with existing settings)
|
|
50
|
+
*/
|
|
51
|
+
function savePathConfig(pathConfig) {
|
|
52
|
+
try {
|
|
53
|
+
let existingSettings = {};
|
|
54
|
+
if (fs.existsSync(CONFIG_FILE)) {
|
|
55
|
+
const data = fs.readFileSync(CONFIG_FILE, 'utf-8');
|
|
56
|
+
existingSettings = JSON.parse(data);
|
|
57
|
+
}
|
|
58
|
+
const merged = { ...existingSettings, ...pathConfig };
|
|
59
|
+
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
60
|
+
fs.writeFileSync(CONFIG_FILE, JSON.stringify(merged, null, 2), 'utf-8');
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
console.error('Failed to save path config:', error);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Expand ~ to home directory and resolve path
|
|
68
|
+
*/
|
|
69
|
+
function expandPath(p) {
|
|
70
|
+
if (p.startsWith('~/')) {
|
|
71
|
+
return path.join(os.homedir(), p.slice(2));
|
|
72
|
+
}
|
|
73
|
+
return path.resolve(p);
|
|
74
|
+
}
|
|
75
|
+
// =============================================================================
|
|
76
|
+
// Public API - Getters
|
|
77
|
+
// =============================================================================
|
|
78
|
+
/**
|
|
79
|
+
* Get the data directory (where config, DB, credentials live)
|
|
80
|
+
* Priority: ENV > config > default
|
|
81
|
+
*/
|
|
82
|
+
export function getDataPath() {
|
|
83
|
+
if (process.env.COMPILR_DATA_PATH) {
|
|
84
|
+
return expandPath(process.env.COMPILR_DATA_PATH);
|
|
85
|
+
}
|
|
86
|
+
const config = loadPathConfig();
|
|
87
|
+
return config.dataPath ? expandPath(config.dataPath) : DEFAULT_DATA_PATH;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Get the workspace root directory
|
|
91
|
+
* Priority: ENV > config > default
|
|
92
|
+
*/
|
|
93
|
+
export function getWorkspacePath() {
|
|
94
|
+
if (process.env.COMPILR_WORKSPACE_PATH) {
|
|
95
|
+
return expandPath(process.env.COMPILR_WORKSPACE_PATH);
|
|
96
|
+
}
|
|
97
|
+
const config = loadPathConfig();
|
|
98
|
+
return config.workspacePath ? expandPath(config.workspacePath) : DEFAULT_WORKSPACE_PATH;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get the projects directory
|
|
102
|
+
* Priority: ENV > config > derived from workspace
|
|
103
|
+
*/
|
|
104
|
+
export function getProjectsPath() {
|
|
105
|
+
if (process.env.COMPILR_PROJECTS_PATH) {
|
|
106
|
+
return expandPath(process.env.COMPILR_PROJECTS_PATH);
|
|
107
|
+
}
|
|
108
|
+
const config = loadPathConfig();
|
|
109
|
+
return config.projectsPath ? expandPath(config.projectsPath) : path.join(getWorkspacePath(), 'projects');
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Get all allowed paths for delete operations
|
|
113
|
+
*/
|
|
114
|
+
export function getAllowedDeletePaths() {
|
|
115
|
+
const config = loadPathConfig();
|
|
116
|
+
const paths = [getProjectsPath()];
|
|
117
|
+
if (config.allowedPaths) {
|
|
118
|
+
paths.push(...config.allowedPaths.map(expandPath));
|
|
119
|
+
}
|
|
120
|
+
return paths.map((p) => path.resolve(p));
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Check if delete protection is enabled (default: true)
|
|
124
|
+
*/
|
|
125
|
+
export function isDeleteProtectionEnabled() {
|
|
126
|
+
const config = loadPathConfig();
|
|
127
|
+
return config.deleteProtection ?? true;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Check if project match warning is enabled (default: true)
|
|
131
|
+
*/
|
|
132
|
+
export function isProjectMatchRequired() {
|
|
133
|
+
const config = loadPathConfig();
|
|
134
|
+
return config.requireProjectMatch ?? true;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get resolved configuration for display
|
|
138
|
+
*/
|
|
139
|
+
export function getResolvedPathConfig() {
|
|
140
|
+
const config = loadPathConfig();
|
|
141
|
+
return {
|
|
142
|
+
workspacePath: getWorkspacePath(),
|
|
143
|
+
projectsPath: getProjectsPath(),
|
|
144
|
+
dataPath: getDataPath(),
|
|
145
|
+
allowedPaths: config.allowedPaths?.map(expandPath) || [],
|
|
146
|
+
requireProjectMatch: config.requireProjectMatch ?? true,
|
|
147
|
+
deleteProtection: config.deleteProtection ?? true,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
// =============================================================================
|
|
151
|
+
// Public API - Setters
|
|
152
|
+
// =============================================================================
|
|
153
|
+
/**
|
|
154
|
+
* Set workspace path
|
|
155
|
+
*/
|
|
156
|
+
export function setWorkspacePath(p) {
|
|
157
|
+
const config = loadPathConfig();
|
|
158
|
+
config.workspacePath = expandPath(p);
|
|
159
|
+
savePathConfig(config);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Set projects path
|
|
163
|
+
*/
|
|
164
|
+
export function setProjectsPath(p) {
|
|
165
|
+
const config = loadPathConfig();
|
|
166
|
+
config.projectsPath = expandPath(p);
|
|
167
|
+
savePathConfig(config);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Set data path
|
|
171
|
+
*/
|
|
172
|
+
export function setDataPath(p) {
|
|
173
|
+
const config = loadPathConfig();
|
|
174
|
+
config.dataPath = expandPath(p);
|
|
175
|
+
savePathConfig(config);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Enable/disable delete protection
|
|
179
|
+
*/
|
|
180
|
+
export function setDeleteProtection(enabled) {
|
|
181
|
+
const config = loadPathConfig();
|
|
182
|
+
config.deleteProtection = enabled;
|
|
183
|
+
savePathConfig(config);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Enable/disable project match warning
|
|
187
|
+
*/
|
|
188
|
+
export function setProjectMatchRequired(enabled) {
|
|
189
|
+
const config = loadPathConfig();
|
|
190
|
+
config.requireProjectMatch = enabled;
|
|
191
|
+
savePathConfig(config);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Add an allowed path for delete operations
|
|
195
|
+
*/
|
|
196
|
+
export function addAllowedPath(p) {
|
|
197
|
+
const config = loadPathConfig();
|
|
198
|
+
const normalized = expandPath(p);
|
|
199
|
+
if (!config.allowedPaths) {
|
|
200
|
+
config.allowedPaths = [];
|
|
201
|
+
}
|
|
202
|
+
if (!config.allowedPaths.includes(normalized)) {
|
|
203
|
+
config.allowedPaths.push(normalized);
|
|
204
|
+
savePathConfig(config);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Remove an allowed path
|
|
209
|
+
*/
|
|
210
|
+
export function removeAllowedPath(p) {
|
|
211
|
+
const config = loadPathConfig();
|
|
212
|
+
const normalized = expandPath(p);
|
|
213
|
+
if (config.allowedPaths) {
|
|
214
|
+
config.allowedPaths = config.allowedPaths.filter((existing) => expandPath(existing) !== normalized);
|
|
215
|
+
savePathConfig(config);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Clear all custom allowed paths
|
|
220
|
+
*/
|
|
221
|
+
export function clearAllowedPaths() {
|
|
222
|
+
const config = loadPathConfig();
|
|
223
|
+
config.allowedPaths = [];
|
|
224
|
+
savePathConfig(config);
|
|
225
|
+
}
|
|
226
|
+
// =============================================================================
|
|
227
|
+
// Utility Functions
|
|
228
|
+
// =============================================================================
|
|
229
|
+
/**
|
|
230
|
+
* Get the database file path
|
|
231
|
+
*/
|
|
232
|
+
export function getDatabasePath() {
|
|
233
|
+
return path.join(getDataPath(), 'projects.db');
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Get the credentials file path
|
|
237
|
+
*/
|
|
238
|
+
export function getCredentialsPath() {
|
|
239
|
+
return path.join(getDataPath(), 'credentials.enc');
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Get the settings file path
|
|
243
|
+
*/
|
|
244
|
+
export function getSettingsPath() {
|
|
245
|
+
return path.join(getDataPath(), 'settings.json');
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Ensure data directory exists
|
|
249
|
+
*/
|
|
250
|
+
export function ensureDataDirectory() {
|
|
251
|
+
const dataPath = getDataPath();
|
|
252
|
+
if (!fs.existsSync(dataPath)) {
|
|
253
|
+
fs.mkdirSync(dataPath, { recursive: true });
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Ensure projects directory exists
|
|
258
|
+
*/
|
|
259
|
+
export function ensureProjectsDirectory() {
|
|
260
|
+
const projectsPath = getProjectsPath();
|
|
261
|
+
if (!fs.existsSync(projectsPath)) {
|
|
262
|
+
fs.mkdirSync(projectsPath, { recursive: true });
|
|
263
|
+
}
|
|
264
|
+
}
|
|
@@ -163,14 +163,15 @@ function generateSingleRepoStructure() {
|
|
|
163
163
|
return `\`\`\`
|
|
164
164
|
{project}/
|
|
165
165
|
├── .compilr/ # Workflow files
|
|
166
|
-
│ ├── backlog.md # Task tracking
|
|
167
166
|
│ ├── architecture/ # ADRs, coding standards
|
|
168
167
|
│ └── sessions/ # Session notes
|
|
169
168
|
├── src/ # Source code
|
|
170
169
|
├── COMPILR.md # This file
|
|
171
170
|
├── package.json
|
|
172
171
|
└── README.md
|
|
173
|
-
|
|
172
|
+
\`\`\`
|
|
173
|
+
|
|
174
|
+
**Note:** Backlog/tasks are tracked in the compilr database. Use \`/backlog\` command to view.`;
|
|
174
175
|
}
|
|
175
176
|
function generateTwoRepoStructure(name) {
|
|
176
177
|
return `\`\`\`
|
|
@@ -182,8 +183,10 @@ ${name}/ # Code repository
|
|
|
182
183
|
${name}-docs/ # Documentation repository
|
|
183
184
|
├── .compilr/
|
|
184
185
|
├── COMPILR.md # This file
|
|
185
|
-
├── 01-planning/ #
|
|
186
|
+
├── 01-planning/ # Roadmap
|
|
186
187
|
├── 02-architecture/ # ADRs, standards
|
|
187
188
|
└── 04-session-notes/ # Session history
|
|
188
|
-
|
|
189
|
+
\`\`\`
|
|
190
|
+
|
|
191
|
+
**Note:** Backlog/tasks are tracked in the compilr database. Use \`/backlog\` command to view.`;
|
|
189
192
|
}
|
package/dist/templates/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as path from 'path';
|
|
|
8
8
|
import { execSync } from 'child_process';
|
|
9
9
|
export * from './types.js';
|
|
10
10
|
import { generateCompilrMd } from './compilr-md.js';
|
|
11
|
-
|
|
11
|
+
// generateBacklogMd removed - backlog is now tracked in database
|
|
12
12
|
import { generateCodingStandardsMd } from './coding-standards.js';
|
|
13
13
|
import { generateConfigJson } from './config-json.js';
|
|
14
14
|
import { generateReadmeMd } from './readme-md.js';
|
|
@@ -67,9 +67,8 @@ function generateSingleRepoProject(config, basePath, filesCreated) {
|
|
|
67
67
|
{ path: path.join(projectPath, 'package.json'), content: generatePackageJson(config) },
|
|
68
68
|
{ path: path.join(projectPath, '.gitignore'), content: generateGitignore(config) },
|
|
69
69
|
{ path: path.join(projectPath, 'tsconfig.json'), content: generateTsconfig(config) },
|
|
70
|
-
// .compilr files
|
|
70
|
+
// .compilr files (backlog is now tracked in database, not as file)
|
|
71
71
|
{ path: path.join(projectPath, '.compilr', 'config.json'), content: generateConfigJson(config, projectPath) },
|
|
72
|
-
{ path: path.join(projectPath, '.compilr', 'backlog.md'), content: generateBacklogMd(config) },
|
|
73
72
|
{ path: path.join(projectPath, '.compilr', 'roadmap.md'), content: generateRoadmapMd(config) },
|
|
74
73
|
{
|
|
75
74
|
path: path.join(projectPath, '.compilr', 'architecture', 'coding-standards.md'),
|
|
@@ -143,7 +142,7 @@ function generateTwoRepoProject(config, basePath, filesCreated) {
|
|
|
143
142
|
{ path: path.join(docsPath, 'COMPILR.md'), content: generateCompilrMd(config) },
|
|
144
143
|
{ path: path.join(docsPath, '.compilr', 'config.json'), content: generateConfigJson(config, projectPath, docsPath) },
|
|
145
144
|
{ path: path.join(docsPath, '00-requirements', 'PRD.md'), content: generatePrdMd(config) },
|
|
146
|
-
|
|
145
|
+
// backlog.md removed - backlog is now tracked in database
|
|
147
146
|
{ path: path.join(docsPath, '01-planning', 'roadmap.md'), content: generateRoadmapMd(config) },
|
|
148
147
|
{
|
|
149
148
|
path: path.join(docsPath, '02-architecture', 'coding-standards.md'),
|
package/dist/themes/colors.js
CHANGED
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
* console.log(s.primary('Hello')); // Colored with theme's primary
|
|
11
11
|
* console.log(s.muted('dim text')); // Colored with theme's muted
|
|
12
12
|
*/
|
|
13
|
-
import
|
|
13
|
+
import { Chalk } from 'chalk';
|
|
14
14
|
import { getCurrentTheme } from './registry.js';
|
|
15
|
+
// Force color output (level 3 = 24-bit true color)
|
|
16
|
+
const chalk = new Chalk({ level: 3 });
|
|
15
17
|
// =============================================================================
|
|
16
18
|
// Style Creation
|
|
17
19
|
// =============================================================================
|
|
@@ -1,43 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Theme Registry
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Re-exports theme query functions from @compilr-dev/editor-core/themes.
|
|
5
|
+
* CLI-specific persistence in ~/.compilr-dev/settings.json
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
export declare function getAllThemes(): Theme[];
|
|
12
|
-
/**
|
|
13
|
-
* Get curated/featured themes
|
|
14
|
-
*/
|
|
15
|
-
export declare function getCuratedThemes(): Theme[];
|
|
16
|
-
/**
|
|
17
|
-
* Get theme by ID
|
|
18
|
-
*/
|
|
19
|
-
export declare function getThemeById(id: string): Theme | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Search themes by name (case-insensitive)
|
|
22
|
-
*/
|
|
23
|
-
export declare function searchThemes(query: string): Theme[];
|
|
24
|
-
/**
|
|
25
|
-
* Filter themes by type
|
|
26
|
-
*/
|
|
27
|
-
export declare function filterThemesByType(type: 'all' | 'dark' | 'light'): Theme[];
|
|
28
|
-
/**
|
|
29
|
-
* Search and filter themes
|
|
30
|
-
*/
|
|
31
|
-
export declare function searchAndFilterThemes(query: string, type: 'all' | 'dark' | 'light'): Theme[];
|
|
32
|
-
/**
|
|
33
|
-
* Get theme count
|
|
34
|
-
*/
|
|
35
|
-
export declare function getThemeCount(): {
|
|
36
|
-
total: number;
|
|
37
|
-
dark: number;
|
|
38
|
-
light: number;
|
|
39
|
-
curated: number;
|
|
40
|
-
};
|
|
7
|
+
import type { ThemeConfig } from './types.js';
|
|
8
|
+
import type { Theme } from '@compilr-dev/editor-core/themes';
|
|
9
|
+
export { getAllThemes, getCuratedThemes, getThemeById, searchThemes, filterThemesByType, searchAndFilterThemes, getThemeStats as getThemeCount, } from '@compilr-dev/editor-core/themes';
|
|
41
10
|
/**
|
|
42
11
|
* Load theme config
|
|
43
12
|
*/
|