maistro 1.0.390

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.
Files changed (111) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +107 -0
  3. package/dist/app.d.ts +247 -0
  4. package/dist/app.d.ts.map +1 -0
  5. package/dist/app.js +4971 -0
  6. package/dist/app.js.map +1 -0
  7. package/dist/buildInfo.d.ts +5 -0
  8. package/dist/buildInfo.d.ts.map +1 -0
  9. package/dist/buildInfo.js +2 -0
  10. package/dist/buildInfo.js.map +1 -0
  11. package/dist/caffeinate.d.ts +72 -0
  12. package/dist/caffeinate.d.ts.map +1 -0
  13. package/dist/caffeinate.js +258 -0
  14. package/dist/caffeinate.js.map +1 -0
  15. package/dist/claudePath.d.ts +10 -0
  16. package/dist/claudePath.d.ts.map +1 -0
  17. package/dist/claudePath.js +34 -0
  18. package/dist/claudePath.js.map +1 -0
  19. package/dist/clipboard.d.ts +44 -0
  20. package/dist/clipboard.d.ts.map +1 -0
  21. package/dist/clipboard.js +442 -0
  22. package/dist/clipboard.js.map +1 -0
  23. package/dist/config.d.ts +211 -0
  24. package/dist/config.d.ts.map +1 -0
  25. package/dist/config.js +933 -0
  26. package/dist/config.js.map +1 -0
  27. package/dist/constants.d.ts +50 -0
  28. package/dist/constants.d.ts.map +1 -0
  29. package/dist/constants.js +81 -0
  30. package/dist/constants.js.map +1 -0
  31. package/dist/contextBuilder.d.ts +38 -0
  32. package/dist/contextBuilder.d.ts.map +1 -0
  33. package/dist/contextBuilder.js +113 -0
  34. package/dist/contextBuilder.js.map +1 -0
  35. package/dist/dependencyDetector.d.ts +57 -0
  36. package/dist/dependencyDetector.d.ts.map +1 -0
  37. package/dist/dependencyDetector.js +505 -0
  38. package/dist/dependencyDetector.js.map +1 -0
  39. package/dist/executor.d.ts +83 -0
  40. package/dist/executor.d.ts.map +1 -0
  41. package/dist/executor.js +583 -0
  42. package/dist/executor.js.map +1 -0
  43. package/dist/git.d.ts +85 -0
  44. package/dist/git.d.ts.map +1 -0
  45. package/dist/git.js +283 -0
  46. package/dist/git.js.map +1 -0
  47. package/dist/imageManager.d.ts +161 -0
  48. package/dist/imageManager.d.ts.map +1 -0
  49. package/dist/imageManager.js +674 -0
  50. package/dist/imageManager.js.map +1 -0
  51. package/dist/index.d.ts +3 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +437 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/input-visual-test.d.ts +9 -0
  56. package/dist/input-visual-test.d.ts.map +1 -0
  57. package/dist/input-visual-test.js +108 -0
  58. package/dist/input-visual-test.js.map +1 -0
  59. package/dist/inputBox.d.ts +228 -0
  60. package/dist/inputBox.d.ts.map +1 -0
  61. package/dist/inputBox.js +966 -0
  62. package/dist/inputBox.js.map +1 -0
  63. package/dist/logger.d.ts +136 -0
  64. package/dist/logger.d.ts.map +1 -0
  65. package/dist/logger.js +347 -0
  66. package/dist/logger.js.map +1 -0
  67. package/dist/orchestrator.d.ts +149 -0
  68. package/dist/orchestrator.d.ts.map +1 -0
  69. package/dist/orchestrator.js +821 -0
  70. package/dist/orchestrator.js.map +1 -0
  71. package/dist/planner.d.ts +86 -0
  72. package/dist/planner.d.ts.map +1 -0
  73. package/dist/planner.js +830 -0
  74. package/dist/planner.js.map +1 -0
  75. package/dist/pty-test-runner.d.ts +87 -0
  76. package/dist/pty-test-runner.d.ts.map +1 -0
  77. package/dist/pty-test-runner.js +721 -0
  78. package/dist/pty-test-runner.js.map +1 -0
  79. package/dist/screen.d.ts +44 -0
  80. package/dist/screen.d.ts.map +1 -0
  81. package/dist/screen.js +152 -0
  82. package/dist/screen.js.map +1 -0
  83. package/dist/taskQueue.d.ts +70 -0
  84. package/dist/taskQueue.d.ts.map +1 -0
  85. package/dist/taskQueue.js +282 -0
  86. package/dist/taskQueue.js.map +1 -0
  87. package/dist/tui-test-harness.d.ts +216 -0
  88. package/dist/tui-test-harness.d.ts.map +1 -0
  89. package/dist/tui-test-harness.js +527 -0
  90. package/dist/tui-test-harness.js.map +1 -0
  91. package/dist/types.d.ts +257 -0
  92. package/dist/types.d.ts.map +1 -0
  93. package/dist/types.js +46 -0
  94. package/dist/types.js.map +1 -0
  95. package/dist/ui-visual-test.d.ts +15 -0
  96. package/dist/ui-visual-test.d.ts.map +1 -0
  97. package/dist/ui-visual-test.js +141 -0
  98. package/dist/ui-visual-test.js.map +1 -0
  99. package/dist/ui.d.ts +272 -0
  100. package/dist/ui.d.ts.map +1 -0
  101. package/dist/ui.js +1531 -0
  102. package/dist/ui.js.map +1 -0
  103. package/dist/validator.d.ts +53 -0
  104. package/dist/validator.d.ts.map +1 -0
  105. package/dist/validator.js +491 -0
  106. package/dist/validator.js.map +1 -0
  107. package/dist/versionCheck.d.ts +63 -0
  108. package/dist/versionCheck.d.ts.map +1 -0
  109. package/dist/versionCheck.js +261 -0
  110. package/dist/versionCheck.js.map +1 -0
  111. package/package.json +62 -0
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ Maistro License
2
+
3
+ Copyright (c) 2026 DreamTeam Mobile. All rights reserved.
4
+
5
+ Permission is granted, free of charge, to use this software for any purpose,
6
+ including commercial applications, subject to the following conditions:
7
+
8
+ 1. You MAY use this software for personal or commercial purposes.
9
+ 2. You MAY NOT modify, adapt, or create derivative works.
10
+ 3. You MAY NOT redistribute, sublicense, or resell this software.
11
+ 4. You MAY NOT remove or alter any copyright notices.
12
+
13
+ This software is provided "as is", without warranty of any kind, express or
14
+ implied. In no event shall the authors be liable for any claim, damages, or
15
+ other liability arising from the use of this software.
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # Maistro
2
+
3
+ AI-powered CLI that breaks down complex projects into tasks and executes them automatically via Claude Code. Describe your goal, review the plan, then let it run autonomously - validating results and committing changes after each task.
4
+
5
+ ## Prerequisites
6
+
7
+ ### 1. Node.js 18+
8
+
9
+ Download from [nodejs.org](https://nodejs.org/)
10
+
11
+ ### 2. Claude Code CLI
12
+
13
+ Install & authenticate Claude Code
14
+
15
+ ```bash
16
+ npm install -g @anthropic-ai/claude-code
17
+ claude
18
+ ```
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ npm install -g maistro
24
+ ```
25
+
26
+ ## Update
27
+
28
+ ```bash
29
+ npm update -g maistro
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ```bash
35
+ maistro
36
+ ```
37
+
38
+ This launches the interactive mode where you can:
39
+
40
+ 1. **Describe your goal** - Enter what you want to build or accomplish
41
+ 2. **Answer questions** - Maistro asks clarifying questions to understand your project
42
+ 3. **Review the plan** - See the generated task breakdown before execution
43
+ 4. **Refine if needed** - Chat to modify tasks, reorder, or add details
44
+ 5. **Execute** - Watch as tasks are executed, validated, and committed
45
+
46
+ ## Commands
47
+
48
+ During execution, you can type commands in the input bar:
49
+
50
+ | Command | Action |
51
+ |---------|--------|
52
+ | `run` | Start or resume execution |
53
+ | `plan` | View and modify the task plan |
54
+ | `retry` | Retry a failed task |
55
+ | `claude` | Open Claude Code in a new terminal |
56
+ | `exit` | Exit maistro |
57
+
58
+ ## Keyboard Shortcuts
59
+
60
+ | Key | Action |
61
+ |-----|--------|
62
+ | `Enter` | Submit input |
63
+ | `Shift+Enter` | New line in input |
64
+ | `Up/Down` | Navigate input history |
65
+ | `Escape` (2x) | Clear input |
66
+
67
+ ## Project Files
68
+
69
+ Maistro stores project state in `.maistro/` directory:
70
+ - `state.json` - Task list and progress
71
+ - `logs/` - Execution logs per task
72
+ - `images/` - Attached images (if any)
73
+
74
+ Add `.maistro/` to your `.gitignore` if you don't want to track execution state.
75
+
76
+
77
+ ## How It Works
78
+
79
+ Maistro uses Claude Code CLI to execute each task on your plan. Tasks run non-interactively with:
80
+
81
+ ```
82
+ claude --dangerously-skip-permissions --chrome
83
+ ```
84
+
85
+ - `--dangerously-skip-permissions` - Allows autonomous execution without confirmation prompts
86
+ - `--chrome` - Enables browser integration for real-time feedback via Chrome extension
87
+
88
+ > **Warning:** Once execution starts, Maistro runs autonomously without confirmation prompts. It will attempt to complete all tasks on the plan without asking for permission. Use responsibly and preferably in sandboxed environments (containers, VMs, or isolated directories).
89
+
90
+ ### Claude Code Chrome Extension (Recommended)
91
+
92
+ For the fastest feedback loop, install the Chrome extension:
93
+
94
+ **[Claude Code Chrome Extension](https://chromewebstore.google.com/detail/claude-code/ilfhajpgbakchaddgjdkmipfmongogon)**
95
+
96
+ This enables real-time browser automation and visual feedback during task execution.
97
+
98
+
99
+ ## Support
100
+
101
+ Questions or issues? Contact support@dreamteam-mobile.com
102
+
103
+ > **Note:** Maistro should work on macOS, Linux, and Windows, but has only been tested on macOS. If you encounter platform-specific issues, please reach out.
104
+
105
+ ## License
106
+
107
+ Free to use for any purpose. See [LICENSE](LICENSE) for details.
package/dist/app.d.ts ADDED
@@ -0,0 +1,247 @@
1
+ export declare class MaistroApp {
2
+ private ui;
3
+ private orchestrator;
4
+ private projectPath;
5
+ private isExecuting;
6
+ private shouldStop;
7
+ private shouldPlan;
8
+ private shouldAutoRun;
9
+ private executionState;
10
+ constructor(projectPath?: string);
11
+ private getOrchestrator;
12
+ /**
13
+ * Detect if the current directory is an existing project
14
+ * Returns project indicators and context from README/CLAUDE.md
15
+ */
16
+ private detectExistingProject;
17
+ /**
18
+ * Start the interactive application
19
+ */
20
+ start(): Promise<void>;
21
+ /**
22
+ * Handle update check at startup
23
+ * Prompts user to update if a new version is available
24
+ */
25
+ private handleUpdateCheck;
26
+ /**
27
+ * Run doctor check - verify Claude Code CLI installation and authentication
28
+ */
29
+ handleDoctor(): Promise<boolean>;
30
+ /**
31
+ * Handle attaching an image
32
+ * Supports: /attach <path> [as <name>] or /attach <url> [as <name>]
33
+ */
34
+ private handleAttachImage;
35
+ /**
36
+ * Associate an image with a task by inserting the placeholder into the task's description
37
+ */
38
+ private associateImageWithTask;
39
+ /**
40
+ * Handle pasted image data (base64, data URL, or escape sequence)
41
+ * Saves the image to the project and returns the image ID
42
+ */
43
+ private handlePastedImage;
44
+ /**
45
+ * Handle clipboard image import via /paste command
46
+ * Checks if clipboard contains an image and saves it
47
+ */
48
+ private handleClipboardPaste;
49
+ /**
50
+ * Prompt user to select a task to attach an image to
51
+ */
52
+ private promptForTaskToAttach;
53
+ /**
54
+ * List all attached images
55
+ */
56
+ private handleListImages;
57
+ /**
58
+ * Process all tasks to download image URLs and replace them with placeholders
59
+ * Returns updated tasks with local image references
60
+ */
61
+ private processTasksImageUrls;
62
+ /**
63
+ * Handle project discovery phase - ask clarifying questions before decomposition
64
+ * Uses full-screen approach for each step
65
+ */
66
+ private handleDiscovery;
67
+ /**
68
+ * Handle discovery phase for planning requests (no skip option)
69
+ * This is used when the user submits a planning request to refine the plan.
70
+ */
71
+ private handleDiscoveryRequired;
72
+ /**
73
+ * Ask a single discovery question (required - no skip option)
74
+ */
75
+ private askDiscoveryQuestionRequired;
76
+ /**
77
+ * Ask a single discovery question using full-screen approach
78
+ */
79
+ private askDiscoveryQuestion;
80
+ /**
81
+ * Detect and collect missing external dependencies
82
+ * Returns the collected values or null if user cancelled
83
+ */
84
+ private handleDependencyDetection;
85
+ /**
86
+ * Save collected dependency values to .env file
87
+ */
88
+ private saveDependenciesToEnv;
89
+ /**
90
+ * Format duration in milliseconds to human-readable string
91
+ */
92
+ private formatDuration;
93
+ private showHeader;
94
+ /**
95
+ * Render plan view content (header, progress, tasks, commands)
96
+ * Used for initial render and resize re-render
97
+ *
98
+ * Displays a unified scrollable task list (max UI.MAX_VISIBLE_TASKS visible).
99
+ * Use ↑↓ arrows to navigate and scroll through all tasks.
100
+ */
101
+ private renderPlanViewContent;
102
+ private selectedTaskIndex;
103
+ private taskScrollOffset;
104
+ /**
105
+ * Main plan view - combines status and plan management
106
+ * Returns true if the app should restart init flow (e.g., after clearing plan)
107
+ */
108
+ private showPlanView;
109
+ /**
110
+ * Parse plan view command
111
+ * Returns the command name or an object with command and args for parameterized commands
112
+ */
113
+ private parsePlanCommand;
114
+ /**
115
+ * Interactive input for plan view with arrow key navigation
116
+ */
117
+ private planViewInput;
118
+ /**
119
+ * Interactive input for plan review with arrow key navigation.
120
+ * Uses unified InputBox component for consistent input handling.
121
+ */
122
+ private planReviewInput;
123
+ /**
124
+ * Show task inspector (read-only view) during execution
125
+ * Returns 'edit' if user wants to edit, 'back' to return to execution view
126
+ */
127
+ private showTaskInspector;
128
+ /**
129
+ * Show task editor for editing a single task
130
+ */
131
+ private showTaskEditor;
132
+ private inputHistory;
133
+ private historyIndex;
134
+ private historyLoaded;
135
+ /**
136
+ * Load input history from project state
137
+ */
138
+ private loadInputHistory;
139
+ /**
140
+ * Save input history to project state
141
+ */
142
+ private saveInputHistory;
143
+ /**
144
+ * Styled input using unified InputBox component.
145
+ * Features: multi-line (Shift+Enter), history navigation (Shift+Up/Down), cursor movement.
146
+ */
147
+ private styledInput;
148
+ /**
149
+ * Full-screen text input - clears screen, shows header, question, and styled input
150
+ * Uses virtual screen approach: keeps state in memory, full clear+redraw on every change
151
+ */
152
+ private fullScreenTextInput;
153
+ /**
154
+ * Full-screen menu selection - clears screen, shows header, and menu
155
+ * Used for initialization flow to avoid cursor tracking issues
156
+ */
157
+ private fullScreenMenu;
158
+ /**
159
+ * Full-screen menu with inline input for "Other" option.
160
+ * Uses the reusable InputBox component for the "Other" input.
161
+ * When "Other" is selected, an InputBox appears for custom value entry.
162
+ */
163
+ private fullScreenMenuWithInlineOther;
164
+ /**
165
+ * Show pause menu when user presses Escape during execution
166
+ * Returns: 'resume' | 'skip' | 'abort'
167
+ */
168
+ private showPauseMenu;
169
+ /**
170
+ * Handle inline discussion with Claude (unified main/planning view)
171
+ * Streams Claude's response inline and returns updated tasks if any were modified.
172
+ * No separate screen or approve/reject prompt - task list updates automatically.
173
+ */
174
+ private handleInlineDiscussion;
175
+ /**
176
+ * Handle plan modification (chat-based refinement)
177
+ * @deprecated Use handleInlineDiscussion instead - this is kept for backward compatibility
178
+ */
179
+ private handleModifyPlan;
180
+ /**
181
+ * Initialize in an existing repository
182
+ * Auto-detects project name, reads context from README/CLAUDE.md,
183
+ * and goes directly to goal input for the next feature to implement
184
+ */
185
+ private handleExistingRepoInit;
186
+ private handleInit;
187
+ private interactivePlanReview;
188
+ private displayTasks;
189
+ /**
190
+ * Handle clear plan command - clears goal and all tasks, keeps logs
191
+ * Returns true if plan was cleared and should return to init flow
192
+ */
193
+ private handleClearPlan;
194
+ /**
195
+ * Handle settings command - show settings menu
196
+ */
197
+ private handleSettings;
198
+ /**
199
+ * Show manual Cmd+V configuration instructions
200
+ */
201
+ private showCmdVInstructions;
202
+ /**
203
+ * Wait for a keypress
204
+ */
205
+ private waitForKeypress;
206
+ /**
207
+ * Show manual terminal configuration instructions
208
+ */
209
+ private showTerminalInstructions;
210
+ private handleOpenClaude;
211
+ private readonly spinnerFrames;
212
+ /**
213
+ * Initialize execution state when starting task execution
214
+ */
215
+ private startExecutionState;
216
+ /**
217
+ * Stop and cleanup execution state
218
+ */
219
+ private stopExecutionState;
220
+ /**
221
+ * Add a line of Claude Code output to the buffer
222
+ */
223
+ private addExecutionOutput;
224
+ /**
225
+ * Update the execution phase
226
+ */
227
+ private setExecutionPhase;
228
+ /**
229
+ * Update animation state (called by interval)
230
+ */
231
+ private updateAnimationState;
232
+ /**
233
+ * Start the animation interval for execution progress
234
+ */
235
+ private startExecutionAnimation;
236
+ /**
237
+ * Truncate a summary to a maximum number of lines
238
+ */
239
+ private truncateSummary;
240
+ /**
241
+ * Render the execution progress section (Claude Code output + progress bars)
242
+ */
243
+ private renderExecutionSection;
244
+ private handleRun;
245
+ private executeWithUnifiedView;
246
+ }
247
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AA6NA,qBAAa,UAAU;IACrB,OAAO,CAAC,EAAE,CAAgB;IAC1B,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;IAC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