@idea1/cli 1.7.7 → 1.8.1
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 +126 -60
- package/dist/cli/named-lists.d.ts.map +1 -1
- package/dist/cli/named-lists.js +5 -0
- package/dist/cli/named-lists.js.map +1 -1
- package/dist/commands/approve-pr.d.ts.map +1 -1
- package/dist/commands/approve-pr.js +94 -8
- package/dist/commands/approve-pr.js.map +1 -1
- package/dist/commands/attach-project-item.d.ts.map +1 -1
- package/dist/commands/attach-project-item.js +28 -41
- package/dist/commands/attach-project-item.js.map +1 -1
- package/dist/commands/close-worktree.d.ts.map +1 -1
- package/dist/commands/close-worktree.js +50 -84
- package/dist/commands/close-worktree.js.map +1 -1
- package/dist/commands/create-worktree.d.ts.map +1 -1
- package/dist/commands/create-worktree.js +1 -4
- package/dist/commands/create-worktree.js.map +1 -1
- package/dist/commands/get-project-item-url.d.ts.map +1 -1
- package/dist/commands/get-project-item-url.js +3 -1
- package/dist/commands/get-project-item-url.js.map +1 -1
- package/dist/commands/help.js +13 -13
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/index.d.ts +1 -2
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +1 -3
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/join-project-item.d.ts.map +1 -1
- package/dist/commands/join-project-item.js +18 -60
- package/dist/commands/join-project-item.js.map +1 -1
- package/dist/commands/next-workflow-step.d.ts.map +1 -1
- package/dist/commands/next-workflow-step.js +16 -22
- package/dist/commands/next-workflow-step.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +4 -3
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/ready-for-approval.d.ts.map +1 -1
- package/dist/commands/ready-for-approval.js +94 -8
- package/dist/commands/ready-for-approval.js.map +1 -1
- package/dist/commands/release.d.ts.map +1 -1
- package/dist/commands/release.js +4 -15
- package/dist/commands/release.js.map +1 -1
- package/dist/commands/start-agent-implementation.d.ts.map +1 -1
- package/dist/commands/start-agent-implementation.js +10 -13
- package/dist/commands/start-agent-implementation.js.map +1 -1
- package/dist/commands/start-dev-implementation.d.ts.map +1 -1
- package/dist/commands/start-dev-implementation.js +7 -8
- package/dist/commands/start-dev-implementation.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +21 -15
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/update-branch.d.ts.map +1 -1
- package/dist/commands/update-branch.js +28 -75
- package/dist/commands/update-branch.js.map +1 -1
- package/dist/interactive.d.ts.map +1 -1
- package/dist/interactive.js +47 -34
- package/dist/interactive.js.map +1 -1
- package/dist/lib/claude-options.d.ts +11 -10
- package/dist/lib/claude-options.d.ts.map +1 -1
- package/dist/lib/claude-options.js +38 -39
- package/dist/lib/claude-options.js.map +1 -1
- package/dist/lib/settings.d.ts +23 -27
- package/dist/lib/settings.d.ts.map +1 -1
- package/dist/lib/settings.js +35 -50
- package/dist/lib/settings.js.map +1 -1
- package/dist/prompts/platform-prompts.d.ts +30 -0
- package/dist/prompts/platform-prompts.d.ts.map +1 -0
- package/dist/prompts/platform-prompts.js +38 -0
- package/dist/prompts/platform-prompts.js.map +1 -0
- package/dist/prompts/project-item-prompts.d.ts +44 -0
- package/dist/prompts/project-item-prompts.d.ts.map +1 -0
- package/dist/prompts/project-item-prompts.js +41 -0
- package/dist/prompts/project-item-prompts.js.map +1 -0
- package/dist/services/claude.d.ts +27 -33
- package/dist/services/claude.d.ts.map +1 -1
- package/dist/services/claude.js +40 -140
- package/dist/services/claude.js.map +1 -1
- package/dist/services/git.d.ts +24 -121
- package/dist/services/git.d.ts.map +1 -1
- package/dist/services/git.js +73 -470
- package/dist/services/git.js.map +1 -1
- package/dist/services/github.d.ts +20 -4
- package/dist/services/github.d.ts.map +1 -1
- package/dist/services/github.js +77 -6
- package/dist/services/github.js.map +1 -1
- package/dist/services/platform.d.ts +75 -0
- package/dist/services/platform.d.ts.map +1 -0
- package/dist/services/platform.js +237 -0
- package/dist/services/platform.js.map +1 -0
- package/dist/services/setup.d.ts +1 -1
- package/dist/services/setup.js +1 -1
- package/dist/services/template-renderer.d.ts +10 -0
- package/dist/services/template-renderer.d.ts.map +1 -0
- package/dist/services/template-renderer.js +20 -0
- package/dist/services/template-renderer.js.map +1 -0
- package/dist/services/worktree.d.ts +17 -16
- package/dist/services/worktree.d.ts.map +1 -1
- package/dist/services/worktree.js +41 -65
- package/dist/services/worktree.js.map +1 -1
- package/dist/types/index.d.ts +14 -58
- package/dist/types/index.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workflow/data/project-item.d.ts +21 -0
- package/dist/workflow/data/project-item.d.ts.map +1 -0
- package/dist/workflow/data/project-item.js +2 -0
- package/dist/workflow/data/project-item.js.map +1 -0
- package/dist/workflow/data/workflow-context.d.ts +46 -0
- package/dist/workflow/data/workflow-context.d.ts.map +1 -0
- package/dist/workflow/data/workflow-context.js +14 -0
- package/dist/workflow/data/workflow-context.js.map +1 -0
- package/dist/{lib → workflow/data}/workflow-states.d.ts +1 -1
- package/dist/workflow/data/workflow-states.d.ts.map +1 -0
- package/dist/{lib → workflow/data}/workflow-states.generated.d.ts +1 -1
- package/dist/workflow/data/workflow-states.generated.d.ts.map +1 -0
- package/dist/{lib → workflow/data}/workflow-states.generated.js +1 -1
- package/dist/workflow/data/workflow-states.generated.js.map +1 -0
- package/dist/{lib → workflow/data}/workflow-states.js +1 -1
- package/dist/workflow/data/workflow-states.js.map +1 -0
- package/dist/workflow/engine/approval-flow.d.ts +53 -0
- package/dist/workflow/engine/approval-flow.d.ts.map +1 -0
- package/dist/workflow/engine/approval-flow.js +111 -0
- package/dist/workflow/engine/approval-flow.js.map +1 -0
- package/dist/{services → workflow/engine}/branch-setup.d.ts +2 -1
- package/dist/workflow/engine/branch-setup.d.ts.map +1 -0
- package/dist/{services → workflow/engine}/branch-setup.js +6 -5
- package/dist/workflow/engine/branch-setup.js.map +1 -0
- package/dist/workflow/engine/handlers/agent-implementation.d.ts +10 -0
- package/dist/workflow/engine/handlers/agent-implementation.d.ts.map +1 -0
- package/dist/workflow/engine/handlers/agent-implementation.js +42 -0
- package/dist/workflow/engine/handlers/agent-implementation.js.map +1 -0
- package/dist/{services/workflow-handlers → workflow/engine/handlers}/approve-pr.d.ts +7 -4
- package/dist/workflow/engine/handlers/approve-pr.d.ts.map +1 -0
- package/dist/workflow/engine/handlers/approve-pr.js +63 -0
- package/dist/workflow/engine/handlers/approve-pr.js.map +1 -0
- package/dist/{services/workflow-handlers → workflow/engine/handlers}/dev-implementation.d.ts +3 -2
- package/dist/workflow/engine/handlers/dev-implementation.d.ts.map +1 -0
- package/dist/workflow/engine/handlers/dev-implementation.js +36 -0
- package/dist/workflow/engine/handlers/dev-implementation.js.map +1 -0
- package/dist/workflow/engine/handlers/index.d.ts +21 -0
- package/dist/workflow/engine/handlers/index.d.ts.map +1 -0
- package/dist/{services/workflow-handlers → workflow/engine/handlers}/index.js +10 -6
- package/dist/workflow/engine/handlers/index.js.map +1 -0
- package/dist/workflow/engine/handlers/ready-for-approval.d.ts +11 -0
- package/dist/workflow/engine/handlers/ready-for-approval.d.ts.map +1 -0
- package/dist/workflow/engine/handlers/ready-for-approval.js +56 -0
- package/dist/workflow/engine/handlers/ready-for-approval.js.map +1 -0
- package/dist/{services → workflow/engine}/release-flow.d.ts +19 -10
- package/dist/workflow/engine/release-flow.d.ts.map +1 -0
- package/dist/{services → workflow/engine}/release-flow.js +33 -16
- package/dist/workflow/engine/release-flow.js.map +1 -0
- package/dist/workflow/engine/workflow-engine.d.ts +162 -0
- package/dist/workflow/engine/workflow-engine.d.ts.map +1 -0
- package/dist/workflow/engine/workflow-engine.js +405 -0
- package/dist/workflow/engine/workflow-engine.js.map +1 -0
- package/package.json +2 -1
- package/dist/commands/integrate.d.ts +0 -13
- package/dist/commands/integrate.d.ts.map +0 -1
- package/dist/commands/integrate.js +0 -128
- package/dist/commands/integrate.js.map +0 -1
- package/dist/lib/workflow-states.d.ts.map +0 -1
- package/dist/lib/workflow-states.generated.d.ts.map +0 -1
- package/dist/lib/workflow-states.generated.js.map +0 -1
- package/dist/lib/workflow-states.js.map +0 -1
- package/dist/services/branch-setup.d.ts.map +0 -1
- package/dist/services/branch-setup.js.map +0 -1
- package/dist/services/context.d.ts +0 -26
- package/dist/services/context.d.ts.map +0 -1
- package/dist/services/context.js +0 -304
- package/dist/services/context.js.map +0 -1
- package/dist/services/release-flow.d.ts.map +0 -1
- package/dist/services/release-flow.js.map +0 -1
- package/dist/services/workflow-engine.d.ts +0 -67
- package/dist/services/workflow-engine.d.ts.map +0 -1
- package/dist/services/workflow-engine.js +0 -371
- package/dist/services/workflow-engine.js.map +0 -1
- package/dist/services/workflow-handlers/agent-implementation.d.ts +0 -9
- package/dist/services/workflow-handlers/agent-implementation.d.ts.map +0 -1
- package/dist/services/workflow-handlers/agent-implementation.js +0 -38
- package/dist/services/workflow-handlers/agent-implementation.js.map +0 -1
- package/dist/services/workflow-handlers/approve-pr.d.ts.map +0 -1
- package/dist/services/workflow-handlers/approve-pr.js +0 -122
- package/dist/services/workflow-handlers/approve-pr.js.map +0 -1
- package/dist/services/workflow-handlers/dev-implementation.d.ts.map +0 -1
- package/dist/services/workflow-handlers/dev-implementation.js +0 -34
- package/dist/services/workflow-handlers/dev-implementation.js.map +0 -1
- package/dist/services/workflow-handlers/index.d.ts +0 -18
- package/dist/services/workflow-handlers/index.d.ts.map +0 -1
- package/dist/services/workflow-handlers/index.js.map +0 -1
- package/dist/services/workflow-handlers/ready-for-approval.d.ts +0 -10
- package/dist/services/workflow-handlers/ready-for-approval.d.ts.map +0 -1
- package/dist/services/workflow-handlers/ready-for-approval.js +0 -59
- package/dist/services/workflow-handlers/ready-for-approval.js.map +0 -1
- package/dist/services/workflow.d.ts +0 -14
- package/dist/services/workflow.d.ts.map +0 -1
- package/dist/services/workflow.js +0 -37
- package/dist/services/workflow.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/services/claude.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/services/claude.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAyB9F;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAMxD;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gDAAgD;IAChD,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,kDAAkD;IAClD,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,gBAAgB,CAGjE,CAAC;AAcF;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,CAAC,EACnC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,CAAC,CAAC,CAqCZ;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAG/F;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,cAAc,CAAC,EAAE,oBAAoB,CAAC;CACvC;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBtH;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAOtG"}
|
package/dist/services/claude.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { exec, execWithOutput, commandExists } from '../lib/shell.js';
|
|
2
2
|
import { logger } from '../lib/logger.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { DEFAULT_EFFORT, DEFAULT_MODEL } from '../lib/claude-options.js';
|
|
4
|
+
import { standardOutputSchema, validateAgentResponse } from '../lib/agent-core.js';
|
|
5
5
|
/**
|
|
6
6
|
* Ensure Claude CLI is available
|
|
7
7
|
*/
|
|
@@ -12,13 +12,32 @@ export async function ensureClaudeCli() {
|
|
|
12
12
|
}
|
|
13
13
|
return true;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* The model and effort of any claude run that does not state its own: the same defaults the
|
|
17
|
+
* implementation session offers (`src/lib/claude-options.ts`). They are always passed to claude,
|
|
18
|
+
* so the user's interactive `/model` and `/effort` choices never leak into a CLI-driven run.
|
|
19
|
+
*/
|
|
20
|
+
export const DEFAULT_CLAUDE_RUN_OPTIONS = {
|
|
21
|
+
model: DEFAULT_MODEL,
|
|
22
|
+
effort: DEFAULT_EFFORT
|
|
23
|
+
};
|
|
24
|
+
function resolveRunOptions(options) {
|
|
25
|
+
return {
|
|
26
|
+
model: options?.model ?? DEFAULT_CLAUDE_RUN_OPTIONS.model,
|
|
27
|
+
effort: options?.effort ?? DEFAULT_CLAUDE_RUN_OPTIONS.effort
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function runOptionArgs(options) {
|
|
31
|
+
const { model, effort } = resolveRunOptions(options);
|
|
32
|
+
return ['--model', model, '--effort', effort];
|
|
33
|
+
}
|
|
15
34
|
/**
|
|
16
35
|
* Run claude non-interactively with a prompt and a JSON schema, returning the
|
|
17
36
|
* parsed `structured_output` object. The schema is enforced via --json-schema,
|
|
18
37
|
* so claude always returns a JSON object matching it. Throws if the CLI fails,
|
|
19
38
|
* the envelope is malformed, or the response is not valid JSON.
|
|
20
39
|
*/
|
|
21
|
-
async function runStructured(prompt, jsonSchema, options) {
|
|
40
|
+
export async function runStructured(prompt, jsonSchema, options) {
|
|
22
41
|
const hasClaude = await ensureClaudeCli();
|
|
23
42
|
if (!hasClaude) {
|
|
24
43
|
throw new Error('Claude CLI is not available');
|
|
@@ -26,14 +45,9 @@ async function runStructured(prompt, jsonSchema, options) {
|
|
|
26
45
|
const args = [
|
|
27
46
|
'-p', prompt,
|
|
28
47
|
'--output-format', 'json',
|
|
29
|
-
'--json-schema', JSON.stringify(jsonSchema)
|
|
48
|
+
'--json-schema', JSON.stringify(jsonSchema),
|
|
49
|
+
...runOptionArgs(options)
|
|
30
50
|
];
|
|
31
|
-
if (options?.model) {
|
|
32
|
-
args.push('--model', options.model);
|
|
33
|
-
}
|
|
34
|
-
if (options?.effort) {
|
|
35
|
-
args.push('--effort', options.effort);
|
|
36
|
-
}
|
|
37
51
|
const result = await exec('claude', args);
|
|
38
52
|
if (result.exitCode !== 0) {
|
|
39
53
|
throw new Error(`Claude command failed: ${result.stderr}`);
|
|
@@ -56,156 +70,42 @@ async function runStructured(prompt, jsonSchema, options) {
|
|
|
56
70
|
return envelope.structured_output;
|
|
57
71
|
}
|
|
58
72
|
/**
|
|
59
|
-
* Run claude with a
|
|
60
|
-
*
|
|
61
|
-
* so model refusals are detected and thrown as AgentErrorResponse.
|
|
73
|
+
* Run claude non-interactively with a prompt whose answer is a single string. Uses the standard
|
|
74
|
+
* result/error schema, so a model refusal is detected and thrown as AgentErrorResponse.
|
|
62
75
|
*/
|
|
63
76
|
export async function runWithPrompt(prompt, options) {
|
|
64
77
|
const output = await runStructured(prompt, standardOutputSchema, options);
|
|
65
|
-
// Validate the structured output — throws AgentErrorResponse on model refusal
|
|
66
78
|
return validateAgentResponse(output).result;
|
|
67
79
|
}
|
|
68
80
|
/**
|
|
69
|
-
* Launch interactive claude session
|
|
81
|
+
* Launch an interactive claude session in the terminal, optionally seeded with a prompt.
|
|
70
82
|
*/
|
|
71
|
-
export async function runInteractive(initialPrompt,
|
|
83
|
+
export async function runInteractive(initialPrompt, options) {
|
|
72
84
|
const hasClaude = await ensureClaudeCli();
|
|
73
85
|
if (!hasClaude) {
|
|
74
86
|
logger.error('Claude CLI is not available');
|
|
75
87
|
return 1;
|
|
76
88
|
}
|
|
77
89
|
const args = [];
|
|
78
|
-
if (permissionMode) {
|
|
79
|
-
args.push('--permission-mode', permissionMode);
|
|
80
|
-
}
|
|
81
|
-
if (model) {
|
|
82
|
-
args.push('--model', model);
|
|
83
|
-
}
|
|
84
|
-
if (effort) {
|
|
85
|
-
args.push('--effort', effort);
|
|
90
|
+
if (options.permissionMode) {
|
|
91
|
+
args.push('--permission-mode', options.permissionMode);
|
|
86
92
|
}
|
|
93
|
+
args.push(...runOptionArgs(options));
|
|
87
94
|
if (initialPrompt) {
|
|
88
95
|
args.push(initialPrompt);
|
|
89
96
|
}
|
|
90
|
-
return execWithOutput('claude', args, { cwd });
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Set workflow status on an idea1.ai project item. When the item's branch is
|
|
94
|
-
* known it is recorded on the item too, so the web client can find the branch
|
|
95
|
-
* without scanning the repository.
|
|
96
|
-
*/
|
|
97
|
-
export async function setWorkflowStatus(itemUrl, status, branchName) {
|
|
98
|
-
const hasClaude = await ensureClaudeCli();
|
|
99
|
-
if (!hasClaude) {
|
|
100
|
-
logger.warning('Claude CLI not available, skipping workflow status update');
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
logger.step(`Setting workflow status to "${status}"...`);
|
|
104
|
-
const branchClause = branchName ? ` and pass branchName "${branchName}"` : '';
|
|
105
|
-
try {
|
|
106
|
-
await runWithPrompt(`Set the workflow status of ${itemUrl} to "${status}"${branchClause} using the set_item_workflow_status MCP tool. Put "done" in the "result" field on success, or an explanation in the "error" field on failure.`);
|
|
107
|
-
logger.success(`Workflow status updated to "${status}"`);
|
|
108
|
-
return true;
|
|
109
|
-
}
|
|
110
|
-
catch (error) {
|
|
111
|
-
const message = error instanceof AgentErrorResponse
|
|
112
|
-
? `Model could not update workflow status: ${error.message}`
|
|
113
|
-
: `Could not update workflow status: ${error.message}`;
|
|
114
|
-
logger.warning(message);
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
97
|
+
return execWithOutput('claude', args, { cwd: options.cwd });
|
|
117
98
|
}
|
|
118
99
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
100
|
+
* Run claude non-interactively (`--print`) with the prompt piped on stdin and the output streamed
|
|
101
|
+
* to the terminal. Returns the exit code.
|
|
121
102
|
*/
|
|
122
|
-
export async function
|
|
123
|
-
const
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
logger.step('Reading workflow status from idea1.ai...');
|
|
128
|
-
const output = await runStructured(`Get the idea1 project item ${itemUrl} using the get_item MCP tool and put its workflowStatus value in the "workflowStatus" field. Use an empty string when the item has no workflow status.`, workflowStatusSchema, { effort: 'low' });
|
|
129
|
-
const status = typeof output.workflowStatus === 'string' ? output.workflowStatus.trim() : '';
|
|
130
|
-
logger.dim(`Workflow status on idea1.ai: ${status || '(none)'}`);
|
|
131
|
-
return status || null;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* JSON schema for the get-workflow-status structured output.
|
|
135
|
-
*/
|
|
136
|
-
const workflowStatusSchema = {
|
|
137
|
-
type: 'object',
|
|
138
|
-
properties: {
|
|
139
|
-
workflowStatus: { type: 'string', description: 'The workflowStatus of the idea1 project item, or an empty string when it has none' }
|
|
140
|
-
},
|
|
141
|
-
required: ['workflowStatus'],
|
|
142
|
-
additionalProperties: false
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* Generate a branch name from a project item description
|
|
146
|
-
*/
|
|
147
|
-
export async function generateBranchName(itemUrl) {
|
|
148
|
-
const hasClaude = await ensureClaudeCli();
|
|
149
|
-
if (!hasClaude) {
|
|
150
|
-
throw new Error('Claude CLI is required to generate branch names');
|
|
151
|
-
}
|
|
152
|
-
logger.step('Generating branch name from item description...');
|
|
153
|
-
const prompt = `Get the description of ${itemUrl} and generate a git branch name based on the description. Don't use any branch name prefix or folder structure, just a one part branch name. Put the branch name in the "result" field. If you cannot generate a branch name, put an explanation in the "error" field.`;
|
|
154
|
-
const branchName = await runWithPrompt(prompt);
|
|
155
|
-
// Clean up any extra whitespace/newlines
|
|
156
|
-
const cleanedName = branchName.replace(/\n/g, '').trim();
|
|
157
|
-
logger.dim(`Generated branch name: ${cleanedName}`);
|
|
158
|
-
return cleanedName;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Create a new idea1 project item with the given title.
|
|
162
|
-
* The item is created with description `# <title>`.
|
|
163
|
-
* Returns the created item's URL.
|
|
164
|
-
*/
|
|
165
|
-
export async function createProjectItem(title) {
|
|
166
|
-
logger.step(`Creating project item "${title}"...`);
|
|
167
|
-
const prompt = `Create a new idea1 project item using the create_item MCP tool with description "# ${title}". Put the created item's URL (the create_item result's CreatedItemUrl) in the "projectItemUrl" field.`;
|
|
168
|
-
const output = await runStructured(prompt, createProjectItemSchema, { effort: 'medium' });
|
|
169
|
-
const url = typeof output.projectItemUrl === 'string' ? output.projectItemUrl.trim() : '';
|
|
170
|
-
if (!isProjectItemUrl(url)) {
|
|
171
|
-
throw new Error(`Claude did not return a valid project item URL: ${JSON.stringify(output.projectItemUrl)}`);
|
|
103
|
+
export async function runPrintWithStdin(prompt, options) {
|
|
104
|
+
const args = [];
|
|
105
|
+
if (options.permissionMode) {
|
|
106
|
+
args.push('--permission-mode', options.permissionMode);
|
|
172
107
|
}
|
|
173
|
-
|
|
174
|
-
return
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* JSON schema for the create-project-item structured output.
|
|
178
|
-
*/
|
|
179
|
-
const createProjectItemSchema = {
|
|
180
|
-
type: 'object',
|
|
181
|
-
properties: {
|
|
182
|
-
projectItemUrl: { type: 'string', description: 'The URL of the created idea1 project item' }
|
|
183
|
-
},
|
|
184
|
-
required: ['projectItemUrl'],
|
|
185
|
-
additionalProperties: false
|
|
186
|
-
};
|
|
187
|
-
/**
|
|
188
|
-
* Get the implementation prompt for a project item.
|
|
189
|
-
*
|
|
190
|
-
* Note: When launched via runInteractive with permissionMode='plan', the Claude
|
|
191
|
-
* CLI enters plan mode automatically — the prompt itself should not instruct
|
|
192
|
-
* the model to plan.
|
|
193
|
-
*/
|
|
194
|
-
export function getImplementationPrompt(itemUrl) {
|
|
195
|
-
return `Implement the Idea1 project item ${itemUrl}. Read the project item's context and description from Idea1 using get_item_context_for_agent_implementation.`;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Output the entry point prompt as structured output for an already-running Claude session.
|
|
199
|
-
*/
|
|
200
|
-
export function outputInlinePrompt(itemUrl, worktreePath, prompt) {
|
|
201
|
-
const output = {
|
|
202
|
-
type: 'idea1-cli-prompt',
|
|
203
|
-
projectItemUrl: itemUrl,
|
|
204
|
-
worktreePath,
|
|
205
|
-
prompt,
|
|
206
|
-
instructions: 'Enter plan mode and implement the project item using the prompt above. The worktree is ready at the specified path.'
|
|
207
|
-
};
|
|
208
|
-
// Output as JSON for Claude to parse from the tool result
|
|
209
|
-
console.log(JSON.stringify(output, null, 2));
|
|
108
|
+
args.push(...runOptionArgs(options), '--print');
|
|
109
|
+
return execWithOutput('claude', args, { cwd: options.cwd, input: prompt });
|
|
210
110
|
}
|
|
211
111
|
//# sourceMappingURL=claude.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/services/claude.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,
|
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AI,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AAC7E,CAAC"}
|
package/dist/services/git.d.ts
CHANGED
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
import type { BranchMetadata } from '../types/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Path of a branch's metadata JSON file relative to the repository root
|
|
4
|
-
*/
|
|
5
|
-
export declare function getBranchMetadataRelativePath(branchName: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* The on-disk form of a branch metadata file. The web client writes the same
|
|
8
|
-
* bytes through the GitHub API, so keep this exact (2-space indent, trailing newline).
|
|
9
|
-
*/
|
|
10
|
-
export declare function serializeBranchMetadata(metadata: BranchMetadata): string;
|
|
11
|
-
/**
|
|
12
|
-
* Read branch metadata from the JSON file in the current working tree.
|
|
13
|
-
* Returns null if the file doesn't exist.
|
|
14
|
-
*/
|
|
15
|
-
export declare function readBranchMetadata(branchName?: string): Promise<BranchMetadata | null>;
|
|
16
|
-
/**
|
|
17
|
-
* Read a branch's committed metadata directly from a remote ref via `git show`,
|
|
18
|
-
* without checking the branch out. Returns null if the file is missing or unparseable.
|
|
19
|
-
* Lets callers recover durable per-branch state from a fresh clone.
|
|
20
|
-
*/
|
|
21
|
-
export declare function readBranchMetadataFromRef(branchName: string, remote?: string): Promise<BranchMetadata | null>;
|
|
22
|
-
/**
|
|
23
|
-
* Write branch metadata to the JSON file.
|
|
24
|
-
* Returns false if `.idea1/` doesn't exist (e.g., main repo before worktree creation).
|
|
25
|
-
*/
|
|
26
|
-
export declare function writeBranchMetadata(metadata: BranchMetadata, worktreePath?: string): Promise<boolean>;
|
|
27
1
|
/**
|
|
28
2
|
* Get the repository root path from git
|
|
29
3
|
*/
|
|
@@ -110,51 +84,24 @@ export declare function removeWorktree(worktreePath: string): Promise<void>;
|
|
|
110
84
|
*/
|
|
111
85
|
export declare function enterWorktreeAndSetup(worktreePath: string, fullBranchName: string): Promise<void>;
|
|
112
86
|
/**
|
|
113
|
-
*
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Commit a `.idea1/<sanitized-branch>.json` metadata file on the branch so all
|
|
118
|
-
* per-branch metadata is discoverable from any clone via `git show`.
|
|
119
|
-
* Reads current values from git config and writes them into the JSON file.
|
|
87
|
+
* Remember which project item a branch implements in this clone's git config
|
|
88
|
+
* (`branch.<name>.idea1ProjectItemUrl`). A local convenience only: the platform's record of the
|
|
89
|
+
* branch is the truth, and this is what it said last time the branch was resolved here.
|
|
120
90
|
*/
|
|
121
|
-
export declare function
|
|
91
|
+
export declare function storeProjectItemUrl(projectItemUrl: string, branchName: string): Promise<void>;
|
|
122
92
|
/**
|
|
123
|
-
*
|
|
124
|
-
* Must be called before the PR is merged so the metadata file doesn't leak into the target branch.
|
|
93
|
+
* The project item URL this clone remembers for a branch, or null for a branch it has yet to resolve.
|
|
125
94
|
*/
|
|
126
|
-
export declare function
|
|
95
|
+
export declare function getProjectItemUrl(branchName: string): Promise<string | null>;
|
|
127
96
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
97
|
+
* The branch this clone remembers as implementing a project item, or null for an item it has yet
|
|
98
|
+
* to resolve.
|
|
130
99
|
*/
|
|
131
|
-
export declare function
|
|
100
|
+
export declare function findBranchWithProjectItemUrl(projectItemUrl: string): Promise<string | null>;
|
|
132
101
|
/**
|
|
133
|
-
*
|
|
134
|
-
* Searches remote branches matching the configured branch prefixes.
|
|
135
|
-
* Falls back to checking the legacy `.idea1/project-item-url` for pre-migration branches.
|
|
102
|
+
* The GitHub repository `origin` points at, as `owner/name`.
|
|
136
103
|
*/
|
|
137
|
-
export declare function
|
|
138
|
-
/**
|
|
139
|
-
* Resolve the branch associated with a project item URL.
|
|
140
|
-
* Fetches latest, then checks local git config (fast path) before falling back
|
|
141
|
-
* to searching remote branches for the committed `.idea1/<branch>.json` metadata.
|
|
142
|
-
* Returns null if no branch is found.
|
|
143
|
-
*/
|
|
144
|
-
export declare function resolveBranchFromProjectItemUrl(projectItemUrl: string): Promise<string | null>;
|
|
145
|
-
/**
|
|
146
|
-
* Retrieve project item URL from git config, falling back to the committed
|
|
147
|
-
* `.idea1/<branch>.json` metadata file (the durable, remote-persisted copy).
|
|
148
|
-
*/
|
|
149
|
-
export declare function getProjectItemUrl(branchName?: string): Promise<string | null>;
|
|
150
|
-
/**
|
|
151
|
-
* Store base branch in git config for later retrieval
|
|
152
|
-
*/
|
|
153
|
-
export declare function storeBaseBranch(baseBranch: string, branchName?: string): Promise<void>;
|
|
154
|
-
/**
|
|
155
|
-
* Retrieve base branch for a branch (with hierarchical resolution)
|
|
156
|
-
*/
|
|
157
|
-
export declare function getBaseBranch(branchName?: string): Promise<string | null>;
|
|
104
|
+
export declare function getRepositoryFullName(): Promise<string>;
|
|
158
105
|
/**
|
|
159
106
|
* Validate that a branch exists
|
|
160
107
|
*/
|
|
@@ -166,51 +113,27 @@ export declare function commitAllChanges(message: string): Promise<void>;
|
|
|
166
113
|
/**
|
|
167
114
|
* Push to remote branch
|
|
168
115
|
*/
|
|
169
|
-
export declare function pushToRemote(branchName: string): Promise<void>;
|
|
116
|
+
export declare function pushToRemote(branchName: string, cwd?: string): Promise<void>;
|
|
170
117
|
/**
|
|
171
|
-
*
|
|
118
|
+
* Forget the remembered item URLs (and the per-branch config older CLI versions kept) of branches
|
|
119
|
+
* that no longer exist.
|
|
172
120
|
*/
|
|
173
121
|
export declare function gcOrphanedBranchConfigs(): Promise<void>;
|
|
174
|
-
/**
|
|
175
|
-
* Store workflow state in git config for later retrieval
|
|
176
|
-
*/
|
|
177
|
-
export declare function storeWorkflowState(state: string, branchName?: string): Promise<void>;
|
|
178
|
-
/**
|
|
179
|
-
* Retrieve workflow state from git config
|
|
180
|
-
*/
|
|
181
|
-
export declare function getWorkflowState(branchName?: string): Promise<string | null>;
|
|
182
|
-
/**
|
|
183
|
-
* Store the development workflow type in git config
|
|
184
|
-
*/
|
|
185
|
-
export declare function storeDevWorkflowType(workflowType: string, branchName?: string): Promise<void>;
|
|
186
|
-
/**
|
|
187
|
-
* Retrieve the development workflow type from git config
|
|
188
|
-
*/
|
|
189
|
-
export declare function getDevWorkflowType(branchName?: string): Promise<string | null>;
|
|
190
|
-
/**
|
|
191
|
-
* Store the stack branch in git config (for stacked workflows)
|
|
192
|
-
*/
|
|
193
|
-
export declare function storeStackBranch(stackBranch: string, branchName?: string): Promise<void>;
|
|
194
|
-
/**
|
|
195
|
-
* Retrieve the stack branch from git config
|
|
196
|
-
*/
|
|
197
|
-
export declare function getStackBranch(branchName?: string): Promise<string | null>;
|
|
198
|
-
/**
|
|
199
|
-
* Store the integration branch name in git config
|
|
200
|
-
*/
|
|
201
|
-
export declare function storeIntegrationBranch(integrationBranch: string, branchName?: string): Promise<void>;
|
|
202
|
-
/**
|
|
203
|
-
* Retrieve the integration branch name from git config
|
|
204
|
-
*/
|
|
205
|
-
export declare function getIntegrationBranch(branchName?: string): Promise<string | null>;
|
|
206
122
|
/**
|
|
207
123
|
* Fetch and pull a specific branch from origin, ensuring it's up to date
|
|
208
124
|
*/
|
|
209
125
|
export declare function fetchAndPullBranch(branchName: string): Promise<void>;
|
|
210
126
|
/**
|
|
211
|
-
*
|
|
127
|
+
* Pull `origin/<branch>` into the local branch checked out at `cwd` (the current directory when
|
|
128
|
+
* omitted). Pulls never rebase, whatever the clone's `pull.rebase` or `branch.<name>.rebase`
|
|
129
|
+
* config says: a branch that is behind fast-forwards, and one that has diverged gets a merge commit.
|
|
130
|
+
*/
|
|
131
|
+
export declare function pullBranch(branchName: string, cwd?: string): Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* Merge a source branch into `targetBranch`, checked out at `cwd` (the current directory when
|
|
134
|
+
* omitted), always with a merge commit.
|
|
212
135
|
*/
|
|
213
|
-
export declare function mergeBranch(sourceBranch: string): Promise<void>;
|
|
136
|
+
export declare function mergeBranch(sourceBranch: string, targetBranch: string, cwd?: string): Promise<void>;
|
|
214
137
|
/**
|
|
215
138
|
* Check if merging source into target would produce conflicts,
|
|
216
139
|
* without touching the index or working tree.
|
|
@@ -220,10 +143,6 @@ export declare function mergeBranch(sourceBranch: string): Promise<void>;
|
|
|
220
143
|
export declare function checkMergeConflicts(source: string, target: string): Promise<{
|
|
221
144
|
hasConflicts: boolean;
|
|
222
145
|
}>;
|
|
223
|
-
/**
|
|
224
|
-
* Abort an in-progress merge
|
|
225
|
-
*/
|
|
226
|
-
export declare function abortMerge(): Promise<void>;
|
|
227
146
|
/**
|
|
228
147
|
* List remote branches matching a prefix pattern
|
|
229
148
|
*/
|
|
@@ -267,8 +186,7 @@ export interface DetachedFileChange {
|
|
|
267
186
|
/**
|
|
268
187
|
* Commit file changes on top of a ref without checking anything out, using a
|
|
269
188
|
* temporary index. Returns the new commit sha (not yet on any branch). Used for
|
|
270
|
-
* branches that have no local checkout
|
|
271
|
-
* metadata before anyone works on it.
|
|
189
|
+
* branches that have no local checkout.
|
|
272
190
|
*/
|
|
273
191
|
export declare function commitFilesDetached(parentRef: string, changes: DetachedFileChange[], message: string): Promise<string>;
|
|
274
192
|
/**
|
|
@@ -277,16 +195,6 @@ export declare function commitFilesDetached(parentRef: string, changes: Detached
|
|
|
277
195
|
* branch ref along when one exists. Only for branches without a local checkout.
|
|
278
196
|
*/
|
|
279
197
|
export declare function pushCommitToBranch(branchName: string, commitSha: string): Promise<void>;
|
|
280
|
-
/**
|
|
281
|
-
* Create a branch on origin from a source ref (e.g. `origin/working/release`) with
|
|
282
|
-
* its `.idea1/<branch>.json` metadata as the first commit. No checkout is needed.
|
|
283
|
-
*/
|
|
284
|
-
export declare function createBranchWithMetadataDetached(branchName: string, sourceRef: string, metadata: BranchMetadata): Promise<void>;
|
|
285
|
-
/**
|
|
286
|
-
* Update fields of the committed `.idea1/<branch>.json` on origin for a branch
|
|
287
|
-
* that has no local checkout. Returns true when a commit was pushed.
|
|
288
|
-
*/
|
|
289
|
-
export declare function updateBranchMetadataDetached(branchName: string, updates: Partial<BranchMetadata>): Promise<boolean>;
|
|
290
198
|
/**
|
|
291
199
|
* Create a branch on origin pointing at a source ref, without any local checkout.
|
|
292
200
|
*/
|
|
@@ -303,9 +211,4 @@ export declare function fastForwardCheckoutToOrigin(branchName: string, checkout
|
|
|
303
211
|
* Returns false quietly when the remote branch is gone.
|
|
304
212
|
*/
|
|
305
213
|
export declare function fetchRemoteBranch(branchName: string): Promise<boolean>;
|
|
306
|
-
/**
|
|
307
|
-
* Remove the committed `.idea1/<branch>.json` from a branch that has no local
|
|
308
|
-
* checkout, so the file does not leak into the target branch when the PR merges.
|
|
309
|
-
*/
|
|
310
|
-
export declare function removeBranchMetadataDetached(branchName: string): Promise<void>;
|
|
311
214
|
//# sourceMappingURL=git.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/services/git.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/services/git.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAEnD;AAED;;GAEG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAGnD;AAED;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAMvD;AAED;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAGxD;AAED;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAQzD;AAED;;GAEG;AACH,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC,CAejE;AAED;;GAEG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC,CAM9D;AAED;;GAEG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAGjD;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,C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