@idea1/cli 1.7.6 → 1.7.7

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/dist/index.js CHANGED
File without changes
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.7.6";
1
+ export declare const VERSION = "1.7.7";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by scripts/generate-version.js - do not edit manually
2
- export const VERSION = '1.7.6';
2
+ export const VERSION = '1.7.7';
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idea1/cli",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "CLI tool for Idea1.ai workflow automation - AI-assisted development workflows",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,27 +0,0 @@
1
- import type { Command, ClaudePermissionMode, ClaudeEffortLevel } from '../types/index.js';
2
- export declare const VALID_PERMISSION_MODES: ClaudePermissionMode[];
3
- export declare const VALID_EFFORT_LEVELS: ClaudeEffortLevel[];
4
- export declare const WORKFLOW_CHOICES: {
5
- label: string;
6
- value: string;
7
- }[];
8
- export interface IntegrationBranchSelection {
9
- integrationName: string;
10
- integrationBranchName: string;
11
- isNew: boolean;
12
- }
13
- /**
14
- * Prompt the user whether to stack this branch on another and resolve the
15
- * chosen stack branch. Prompt-only: performs no branch writes. Returns the
16
- * resolved stack branch name, or null when the user opts not to stack.
17
- * Shared by start-project-item and attach-project-item.
18
- */
19
- export declare function promptForStackBranch(): Promise<string | null>;
20
- /**
21
- * Prompt the user for integration-branch selection. Prompt-only: does not
22
- * perform any branch writes. Must be invoked before setWorkflowStatus so the
23
- * user completes all setup questions up front.
24
- */
25
- export declare function promptForIntegrationBranch(): Promise<IntegrationBranchSelection>;
26
- export declare const startProjectItemCommand: Command;
27
- //# sourceMappingURL=start-project-item.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"start-project-item.d.ts","sourceRoot":"","sources":["../../src/commands/start-project-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,oBAAoB,EAAwB,iBAAiB,EAAkC,MAAM,mBAAmB,CAAC;AAUhJ,eAAO,MAAM,sBAAsB,EAAE,oBAAoB,EAAmF,CAAC;AAE7I,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,EAA8C,CAAC;AAQlG,eAAO,MAAM,gBAAgB;;;GAG5B,CAAC;AAkBF,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA6BnE;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,0BAA0B,CAAC,CAoBtF;AAED,eAAO,MAAM,uBAAuB,EAAE,OAqLrC,CAAC"}
@@ -1,325 +0,0 @@
1
- import { logger } from '../lib/logger.js';
2
- import { promptInput, promptSelect } from '../lib/prompt.js';
3
- import { isolationModeOption, resolveIsolationMode } from '../lib/isolation.js';
4
- import * as git from '../services/git.js';
5
- import * as claude from '../services/claude.js';
6
- import * as worktree from '../services/worktree.js';
7
- import { configService } from '../services/config.js';
8
- import { isProjectItemUrl, validateProjectItemUrl } from '../lib/project-item-url.js';
9
- export const VALID_PERMISSION_MODES = ['acceptEdits', 'bypassPermissions', 'default', 'delegate', 'dontAsk', 'plan'];
10
- const VALID_ENTRY_POINT_MODES = ['launch', 'inline', 'none'];
11
- export const VALID_EFFORT_LEVELS = ['low', 'medium', 'high', 'xhigh', 'max'];
12
- const ENTRY_POINT_MODE_CHOICES = [
13
- { label: 'Launch new Claude session', value: 'launch' },
14
- { label: 'Output prompt for current Claude session', value: 'inline' },
15
- { label: 'Do not invoke Claude', value: 'none' }
16
- ];
17
- export const WORKFLOW_CHOICES = [
18
- { label: 'Independent Feature', value: 'independent' },
19
- { label: 'Work for Integration', value: 'integration' }
20
- ];
21
- const IMPLEMENT_AFTER_CREATE_CHOICES = [
22
- { label: 'Start implementing now', value: 'yes' },
23
- { label: 'Just set up the branch and automation (stop before Claude)', value: 'no' }
24
- ];
25
- const STACK_CHOICES = [
26
- { label: 'No', value: 'no' },
27
- { label: 'Yes - specify a branch', value: 'branch' },
28
- { label: 'Yes - specify a project item URL', value: 'url' }
29
- ];
30
- const INTEGRATION_BRANCH_CHOICES = [
31
- { label: 'Create new integration branch', value: 'new' },
32
- { label: 'Use existing integration branch', value: 'existing' }
33
- ];
34
- /**
35
- * Prompt the user whether to stack this branch on another and resolve the
36
- * chosen stack branch. Prompt-only: performs no branch writes. Returns the
37
- * resolved stack branch name, or null when the user opts not to stack.
38
- * Shared by start-project-item and attach-project-item.
39
- */
40
- export async function promptForStackBranch() {
41
- const stackChoice = await promptSelect('Stack this branch on another?', STACK_CHOICES);
42
- if (stackChoice === 'branch') {
43
- const stackBranch = await promptInput('Branch to stack on');
44
- if (!stackBranch) {
45
- throw new Error('Stack branch is required when stacking');
46
- }
47
- const stackExists = await git.branchExists(stackBranch);
48
- if (!stackExists) {
49
- throw new Error(`Stack branch '${stackBranch}' does not exist locally or on origin`);
50
- }
51
- return stackBranch;
52
- }
53
- if (stackChoice === 'url') {
54
- const stackUrl = await promptInput('Project item URL to stack on');
55
- if (!stackUrl) {
56
- throw new Error('Project item URL is required when stacking by URL');
57
- }
58
- const stackBranch = await git.resolveBranchFromProjectItemUrl(stackUrl);
59
- if (!stackBranch) {
60
- throw new Error(`No branch found for project item URL: ${stackUrl}. Make sure the project item has been started.`);
61
- }
62
- logger.info(`Resolved stack branch: ${stackBranch}`);
63
- return stackBranch;
64
- }
65
- return null;
66
- }
67
- /**
68
- * Prompt the user for integration-branch selection. Prompt-only: does not
69
- * perform any branch writes. Must be invoked before setWorkflowStatus so the
70
- * user completes all setup questions up front.
71
- */
72
- export async function promptForIntegrationBranch() {
73
- const existingBranches = await worktree.listExistingIntegrationBranches();
74
- const branchChoice = existingBranches.length > 0
75
- ? await promptSelect('Integration branch', INTEGRATION_BRANCH_CHOICES)
76
- : 'new';
77
- if (branchChoice === 'existing') {
78
- const branchChoices = existingBranches.map(b => ({ label: b, value: b }));
79
- const integrationBranchName = await promptSelect('Select integration branch', branchChoices);
80
- const integrationName = await worktree.extractIntegrationName(integrationBranchName);
81
- return { integrationName, integrationBranchName, isNew: false };
82
- }
83
- const integrationName = await promptInput('Integration name (e.g., my-cool-feature)');
84
- if (!integrationName) {
85
- throw new Error('Integration name is required');
86
- }
87
- const integrationBranchName = await worktree.buildIntegrationBranchName(integrationName);
88
- return { integrationName, integrationBranchName, isNew: true };
89
- }
90
- export const startProjectItemCommand = {
91
- name: 'start-project-item',
92
- aliases: ['s', 'start'],
93
- description: 'Start implementing a project item on a new branch, in a worktree or the main repo',
94
- options: [
95
- {
96
- // Declared first so it's the very first thing prompted, before every
97
- // other choice — later choices depend on whether it was provided.
98
- longName: 'url',
99
- description: 'Project item URL (leave blank to create a new item)',
100
- defaultValue: '',
101
- promptWhenDefaultExists: true,
102
- // Allow blank (signals "create a new item"); validate format otherwise.
103
- validate: (value) => (value ? validateProjectItemUrl(value) : undefined)
104
- },
105
- {
106
- // Only prompted (and required) when no URL was given, i.e. the user is
107
- // creating a new item. Declared after 'url' so it can read its value.
108
- longName: 'title',
109
- shortName: 't',
110
- description: 'Title for the new project item',
111
- dependsOn: (resolved) => !resolved['url'],
112
- validate: (value) => value.trim() ? undefined : 'A title is required to create a project item'
113
- },
114
- {
115
- // Only relevant when creating a new item. Declared after 'title' so it's
116
- // asked once the item to create is named.
117
- longName: 'implement-after-create',
118
- shortName: 'ic',
119
- description: 'After creating the new item, start implementing it now or just set up the branch?',
120
- choices: IMPLEMENT_AFTER_CREATE_CHOICES,
121
- dependsOn: (resolved) => !resolved['url'],
122
- validate: (value) => value === 'yes' || value === 'no' ? undefined : 'Choose whether to start implementing'
123
- },
124
- {
125
- longName: 'branch-name',
126
- shortName: 'n',
127
- description: 'Branch name (auto-generated if not provided)',
128
- defaultValue: undefined,
129
- promptWhenDefaultExists: true
130
- },
131
- {
132
- longName: 'source-path',
133
- shortName: 'p',
134
- description: 'Path to source directory',
135
- defaultValue: '',
136
- promptWhenDefaultExists: false
137
- },
138
- {
139
- longName: 'base-branch',
140
- shortName: 'b',
141
- description: 'Base branch',
142
- defaultValue: () => configService.getDefaultBaseBranch(),
143
- promptWhenDefaultExists: false
144
- },
145
- {
146
- longName: 'permission-mode',
147
- shortName: 'pm',
148
- description: 'Claude permission mode',
149
- defaultValue: 'plan',
150
- promptWhenDefaultExists: true,
151
- choices: VALID_PERMISSION_MODES.map(m => ({ label: m, value: m })),
152
- validate: (value) => {
153
- if (!VALID_PERMISSION_MODES.includes(value)) {
154
- return `Must be one of: ${VALID_PERMISSION_MODES.join(', ')}`;
155
- }
156
- return undefined;
157
- }
158
- },
159
- {
160
- longName: 'workflow-type',
161
- shortName: 'w',
162
- description: 'Development workflow type',
163
- defaultValue: undefined,
164
- choices: WORKFLOW_CHOICES
165
- },
166
- isolationModeOption,
167
- {
168
- longName: 'effort',
169
- shortName: 'e',
170
- description: 'Claude effort level (reasoning depth)',
171
- defaultValue: 'high',
172
- promptWhenDefaultExists: true,
173
- choices: VALID_EFFORT_LEVELS.map(l => ({ label: l, value: l })),
174
- validate: (value) => {
175
- if (!VALID_EFFORT_LEVELS.includes(value)) {
176
- return `Must be one of: ${VALID_EFFORT_LEVELS.join(', ')}`;
177
- }
178
- return undefined;
179
- }
180
- },
181
- {
182
- longName: 'claude-entry-point',
183
- shortName: 'im',
184
- description: 'How to invoke Claude after setup',
185
- defaultValue: 'launch',
186
- promptWhenDefaultExists: false,
187
- choices: ENTRY_POINT_MODE_CHOICES,
188
- validate: (value) => {
189
- if (!VALID_ENTRY_POINT_MODES.includes(value)) {
190
- return `Must be one of: ${VALID_ENTRY_POINT_MODES.join(', ')}`;
191
- }
192
- return undefined;
193
- }
194
- }
195
- ],
196
- async execute(resolved) {
197
- let projectItemUrl = resolved['url'];
198
- const sourcePath = resolved['source-path'];
199
- const baseBranch = resolved['base-branch'];
200
- const permissionMode = resolved['permission-mode'];
201
- const effort = (resolved['effort'] ?? 'high');
202
- const workflowType = (resolved['workflow-type'] ?? 'independent');
203
- const isolationMode = resolveIsolationMode(resolved);
204
- let claudeEntryPointMode = (resolved['claude-entry-point'] ?? 'launch');
205
- let shortBranchName = resolved['branch-name'] || undefined;
206
- // Navigate to source path if provided
207
- if (sourcePath) {
208
- process.chdir(sourcePath);
209
- }
210
- // The URL is resolved up front (asked before any other choice). A blank
211
- // value means the user wants to create a brand new item here; in that case
212
- // the dependent 'title' and 'implement-after-create' options were also
213
- // prompted and required.
214
- if (!projectItemUrl) {
215
- projectItemUrl = await claude.createProjectItem(resolved['title'].trim());
216
- if (resolved['implement-after-create'] === 'no') {
217
- // Stop before invoking Claude: set up the branch and all automation,
218
- // but don't launch the implementation session.
219
- claudeEntryPointMode = 'none';
220
- }
221
- }
222
- // Validate URL format
223
- if (!isProjectItemUrl(projectItemUrl)) {
224
- logger.warning('URL does not appear to be an idea1.ai project item URL');
225
- }
226
- // Prompt for stack option (before MCP calls so all user questions are asked first)
227
- const stackBranch = await promptForStackBranch();
228
- // Collect integration-branch answers before the slow workflow status update,
229
- // so every setup question is asked up front.
230
- let integrationSelection = null;
231
- if (workflowType === 'integration') {
232
- integrationSelection = await promptForIntegrationBranch();
233
- }
234
- // Set workflow status to "Agent Implementation"
235
- await claude.setWorkflowStatus(projectItemUrl, 'Agent Implementation');
236
- // Generate branch name if not provided
237
- if (!shortBranchName) {
238
- shortBranchName = await claude.generateBranchName(projectItemUrl);
239
- }
240
- logger.info(`Using branch name: ${shortBranchName}`);
241
- if (!shortBranchName) {
242
- throw new Error('Failed to generate a branch name');
243
- }
244
- if (stackBranch) {
245
- await git.ensureStackBranchReady(stackBranch);
246
- }
247
- if (workflowType === 'independent') {
248
- await startIndependentFeature(projectItemUrl, shortBranchName, baseBranch, permissionMode, effort, claudeEntryPointMode, stackBranch, isolationMode);
249
- }
250
- else {
251
- if (!integrationSelection) {
252
- throw new Error('Integration selection was not collected');
253
- }
254
- await startWorkForIntegration(projectItemUrl, shortBranchName, baseBranch, permissionMode, effort, claudeEntryPointMode, stackBranch, integrationSelection, isolationMode);
255
- }
256
- }
257
- };
258
- /**
259
- * Start an Independent Feature workflow
260
- */
261
- async function startIndependentFeature(projectItemUrl, shortBranchName, baseBranch, permissionMode, effort, claudeEntryPointMode, stackBranch, isolationMode) {
262
- logger.section('Independent Feature Workflow');
263
- // Resolve branch prefix
264
- const branchPrefix = await worktree.resolveBranchPrefix();
265
- // Determine which branch to base off of
266
- const sourceBranch = stackBranch ?? baseBranch;
267
- // PR always targets baseBranch for independent features
268
- const prTargetBranch = baseBranch;
269
- const fullBranchName = `${branchPrefix}/${shortBranchName}`;
270
- if (stackBranch) {
271
- logger.info(`Stacked workflow: branching from ${stackBranch}, PR will target ${baseBranch}`);
272
- }
273
- // Prepare branch
274
- await worktree.prepareBranchForWorktreeWithFullName(fullBranchName, shortBranchName, sourceBranch, prTargetBranch);
275
- // Store workflow state in git config
276
- await git.storeWorkflowState('Agent Implementation', fullBranchName);
277
- await git.storeDevWorkflowType('independent', fullBranchName);
278
- if (stackBranch) {
279
- await git.storeStackBranch(stackBranch, fullBranchName);
280
- }
281
- await worktree.setupBranchEnvironment(isolationMode, fullBranchName, shortBranchName, prTargetBranch, {
282
- projectItemUrl,
283
- permissionMode,
284
- effort,
285
- claudeEntryPointMode
286
- });
287
- }
288
- /**
289
- * Start a Work for Integration workflow
290
- */
291
- async function startWorkForIntegration(projectItemUrl, shortBranchName, baseBranch, permissionMode, effort, claudeEntryPointMode, stackBranch, integrationSelection, isolationMode) {
292
- logger.section('Work for Integration Workflow');
293
- const { integrationName, integrationBranchName, isNew } = integrationSelection;
294
- if (isNew) {
295
- // Create the integration branch from baseBranch if it doesn't exist.
296
- // Runs after setWorkflowStatus so the slow remote write is not blocking user prompts.
297
- await worktree.ensureIntegrationBranch(integrationBranchName, baseBranch);
298
- }
299
- logger.info(`Integration branch: ${integrationBranchName}`);
300
- // For integration workflow, the integration branch acts as the base for PRs
301
- const prTargetBranch = integrationBranchName;
302
- // Determine which branch to base off of
303
- const sourceBranch = stackBranch ?? integrationBranchName;
304
- // Build the full work branch name using integration template
305
- const fullBranchName = await worktree.buildIntegrationWorkBranchName(integrationName, shortBranchName);
306
- if (stackBranch) {
307
- logger.info(`Stacked workflow: branching from ${stackBranch}, PR will target ${integrationBranchName}`);
308
- }
309
- // Prepare branch
310
- await worktree.prepareBranchForWorktreeWithFullName(fullBranchName, shortBranchName, sourceBranch, prTargetBranch);
311
- // Store workflow state in git config
312
- await git.storeWorkflowState('Agent Implementation', fullBranchName);
313
- await git.storeDevWorkflowType('integration', fullBranchName);
314
- await git.storeIntegrationBranch(integrationBranchName, fullBranchName);
315
- if (stackBranch) {
316
- await git.storeStackBranch(stackBranch, fullBranchName);
317
- }
318
- await worktree.setupBranchEnvironment(isolationMode, fullBranchName, shortBranchName, prTargetBranch, {
319
- projectItemUrl,
320
- permissionMode,
321
- effort,
322
- claudeEntryPointMode
323
- });
324
- }
325
- //# sourceMappingURL=start-project-item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"start-project-item.js","sourceRoot":"","sources":["../../src/commands/start-project-item.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,y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