wiggum-cli 0.7.4 → 0.7.6
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/ai/conversation/conversation-manager.d.ts +31 -1
- package/dist/ai/conversation/conversation-manager.d.ts.map +1 -1
- package/dist/ai/conversation/conversation-manager.js +48 -3
- package/dist/ai/conversation/conversation-manager.js.map +1 -1
- package/dist/ai/conversation/index.d.ts +3 -2
- package/dist/ai/conversation/index.d.ts.map +1 -1
- package/dist/ai/conversation/index.js +1 -0
- package/dist/ai/conversation/index.js.map +1 -1
- package/dist/ai/conversation/interview-tools.d.ts +85 -0
- package/dist/ai/conversation/interview-tools.d.ts.map +1 -0
- package/dist/ai/conversation/interview-tools.js +255 -0
- package/dist/ai/conversation/interview-tools.js.map +1 -0
- package/dist/ai/conversation/spec-generator.d.ts +47 -1
- package/dist/ai/conversation/spec-generator.d.ts.map +1 -1
- package/dist/ai/conversation/spec-generator.js +287 -33
- package/dist/ai/conversation/spec-generator.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +3 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +3 -0
- package/dist/commands/new.js.map +1 -1
- package/dist/utils/repl-prompts.d.ts +22 -0
- package/dist/utils/repl-prompts.d.ts.map +1 -1
- package/dist/utils/repl-prompts.js +82 -0
- package/dist/utils/repl-prompts.js.map +1 -1
- package/dist/utils/tui.d.ts +61 -0
- package/dist/utils/tui.d.ts.map +1 -0
- package/dist/utils/tui.js +214 -0
- package/dist/utils/tui.js.map +1 -0
- package/package.json +1 -1
- package/src/ai/conversation/conversation-manager.ts +66 -4
- package/src/ai/conversation/index.ts +7 -0
- package/src/ai/conversation/interview-tools.ts +293 -0
- package/src/ai/conversation/spec-generator.ts +368 -39
- package/src/commands/init.ts +3 -2
- package/src/commands/new.ts +4 -0
- package/src/utils/repl-prompts.ts +103 -0
- package/src/utils/tui.ts +262 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Conversation Manager
|
|
3
3
|
* Manages multi-turn AI conversations for spec generation
|
|
4
4
|
*/
|
|
5
|
+
import { type Tool } from 'ai';
|
|
5
6
|
import { type AIProvider } from '../providers.js';
|
|
6
7
|
import type { ScanResult } from '../../scanner/types.js';
|
|
7
8
|
/**
|
|
@@ -21,6 +22,10 @@ export interface ConversationContext {
|
|
|
21
22
|
content: string;
|
|
22
23
|
}>;
|
|
23
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Tool use callback for displaying tool usage
|
|
27
|
+
*/
|
|
28
|
+
export type ToolUseCallback = (toolName: string, args: Record<string, unknown>) => void;
|
|
24
29
|
/**
|
|
25
30
|
* Conversation manager options
|
|
26
31
|
*/
|
|
@@ -28,6 +33,12 @@ export interface ConversationManagerOptions {
|
|
|
28
33
|
provider: AIProvider;
|
|
29
34
|
model: string;
|
|
30
35
|
systemPrompt?: string;
|
|
36
|
+
/** Tools available to the AI */
|
|
37
|
+
tools?: Record<string, Tool>;
|
|
38
|
+
/** Callback when a tool is used */
|
|
39
|
+
onToolUse?: ToolUseCallback;
|
|
40
|
+
/** Maximum tool calling steps (default: 5) */
|
|
41
|
+
maxToolSteps?: number;
|
|
31
42
|
}
|
|
32
43
|
/**
|
|
33
44
|
* Manages a multi-turn conversation with an AI model
|
|
@@ -37,8 +48,27 @@ export declare class ConversationManager {
|
|
|
37
48
|
private context;
|
|
38
49
|
private readonly provider;
|
|
39
50
|
private readonly modelId;
|
|
40
|
-
private
|
|
51
|
+
private systemPrompt;
|
|
52
|
+
private tools?;
|
|
53
|
+
private onToolUse?;
|
|
54
|
+
private maxToolSteps;
|
|
41
55
|
constructor(options: ConversationManagerOptions);
|
|
56
|
+
/**
|
|
57
|
+
* Set tools for the conversation
|
|
58
|
+
*/
|
|
59
|
+
setTools(tools: Record<string, Tool>): void;
|
|
60
|
+
/**
|
|
61
|
+
* Set tool use callback
|
|
62
|
+
*/
|
|
63
|
+
setOnToolUse(callback: ToolUseCallback): void;
|
|
64
|
+
/**
|
|
65
|
+
* Update the system prompt
|
|
66
|
+
*/
|
|
67
|
+
setSystemPrompt(prompt: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* Append to the system prompt
|
|
70
|
+
*/
|
|
71
|
+
appendSystemPrompt(addition: string): void;
|
|
42
72
|
private getDefaultSystemPrompt;
|
|
43
73
|
/**
|
|
44
74
|
* Set codebase context from scan result
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-manager.d.ts","sourceRoot":"","sources":["../../../src/ai/conversation/conversation-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"conversation-manager.d.ts","sourceRoot":"","sources":["../../../src/ai/conversation/conversation-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAyC,KAAK,IAAI,EAAE,MAAM,IAAI,CAAC;AACtE,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAUzD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,UAAU,CAAC;IACrB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AG,OAAO,CAAC,MAAM,CAAC;IAsChD;;OAEG;IACI,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC;IAwB7D;;OAEG;IACH,UAAU,IAAI,mBAAmB,EAAE;IAInC;;OAEG;IACH,YAAY,IAAI,IAAI;IAIpB;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;CAGjD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Conversation Manager
|
|
3
3
|
* Manages multi-turn AI conversations for spec generation
|
|
4
4
|
*/
|
|
5
|
-
import { generateText, streamText } from 'ai';
|
|
5
|
+
import { generateText, streamText, stepCountIs } from 'ai';
|
|
6
6
|
import { getModel, isReasoningModel } from '../providers.js';
|
|
7
7
|
/**
|
|
8
8
|
* Format scan result into a concise codebase summary
|
|
@@ -36,10 +36,40 @@ export class ConversationManager {
|
|
|
36
36
|
provider;
|
|
37
37
|
modelId;
|
|
38
38
|
systemPrompt;
|
|
39
|
+
tools;
|
|
40
|
+
onToolUse;
|
|
41
|
+
maxToolSteps;
|
|
39
42
|
constructor(options) {
|
|
40
43
|
this.provider = options.provider;
|
|
41
44
|
this.modelId = options.model;
|
|
42
45
|
this.systemPrompt = options.systemPrompt || this.getDefaultSystemPrompt();
|
|
46
|
+
this.tools = options.tools;
|
|
47
|
+
this.onToolUse = options.onToolUse;
|
|
48
|
+
this.maxToolSteps = options.maxToolSteps ?? 5;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Set tools for the conversation
|
|
52
|
+
*/
|
|
53
|
+
setTools(tools) {
|
|
54
|
+
this.tools = tools;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Set tool use callback
|
|
58
|
+
*/
|
|
59
|
+
setOnToolUse(callback) {
|
|
60
|
+
this.onToolUse = callback;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Update the system prompt
|
|
64
|
+
*/
|
|
65
|
+
setSystemPrompt(prompt) {
|
|
66
|
+
this.systemPrompt = prompt;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Append to the system prompt
|
|
70
|
+
*/
|
|
71
|
+
appendSystemPrompt(addition) {
|
|
72
|
+
this.systemPrompt = `${this.systemPrompt}\n\n${addition}`;
|
|
43
73
|
}
|
|
44
74
|
getDefaultSystemPrompt() {
|
|
45
75
|
return `You are a helpful assistant that helps developers create feature specifications.
|
|
@@ -106,11 +136,26 @@ Be concise but thorough. Focus on understanding the user's needs before proposin
|
|
|
106
136
|
this.messages.push({ role: 'user', content: userMessage });
|
|
107
137
|
const { model } = getModel(this.provider, this.modelId);
|
|
108
138
|
const messages = this.buildMessages();
|
|
109
|
-
|
|
139
|
+
// Build options based on whether we have tools
|
|
140
|
+
const options = {
|
|
110
141
|
model,
|
|
111
142
|
messages,
|
|
112
143
|
...(isReasoningModel(this.modelId) ? {} : { temperature: 0.7 }),
|
|
113
|
-
}
|
|
144
|
+
};
|
|
145
|
+
if (this.tools && Object.keys(this.tools).length > 0) {
|
|
146
|
+
options.tools = this.tools;
|
|
147
|
+
options.stopWhen = stepCountIs(this.maxToolSteps);
|
|
148
|
+
options.onStepFinish = (step) => {
|
|
149
|
+
// Call onToolUse callback for each tool call
|
|
150
|
+
if (step.toolCalls && this.onToolUse) {
|
|
151
|
+
for (const toolCall of step.toolCalls) {
|
|
152
|
+
// AI SDK uses 'input' for tool arguments
|
|
153
|
+
this.onToolUse(toolCall.toolName, toolCall.input);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
const result = await generateText(options);
|
|
114
159
|
const assistantMessage = result.text;
|
|
115
160
|
// Add assistant response to history
|
|
116
161
|
this.messages.push({ role: 'assistant', content: assistantMessage });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-manager.js","sourceRoot":"","sources":["../../../src/ai/conversation/conversation-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG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AE,MAAM,QAAQ,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAC/C,YAAY,IAAI,QAAQ,CAAC;YACzB,MAAM,QAAQ,CAAC;QACjB,CAAC;QAED,oCAAoC;QACpC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,YAAY;QACV,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,OAA4B;QACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Conversation Module
|
|
3
3
|
* AI-powered conversation and spec generation
|
|
4
4
|
*/
|
|
5
|
-
export { ConversationManager, type ConversationMessage, type ConversationContext, type ConversationManagerOptions, } from './conversation-manager.js';
|
|
6
|
-
export { SpecGenerator, type SpecGeneratorOptions, } from './spec-generator.js';
|
|
5
|
+
export { ConversationManager, type ConversationMessage, type ConversationContext, type ConversationManagerOptions, type ToolUseCallback, } from './conversation-manager.js';
|
|
6
|
+
export { SpecGenerator, type SpecGeneratorOptions, type SessionContext, } from './spec-generator.js';
|
|
7
|
+
export { createInterviewTools, type InterviewTools, } from './interview-tools.js';
|
|
7
8
|
export { fetchContent, fetchMultipleSources, isUrl, type FetchedContent, } from './url-fetcher.js';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ai/conversation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ai/conversation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,eAAe,GACrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,cAAc,GACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,oBAAoB,EACpB,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC"}
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { ConversationManager, } from './conversation-manager.js';
|
|
6
6
|
export { SpecGenerator, } from './spec-generator.js';
|
|
7
|
+
export { createInterviewTools, } from './interview-tools.js';
|
|
7
8
|
export { fetchContent, fetchMultipleSources, isUrl, } from './url-fetcher.js';
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ai/conversation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ai/conversation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,mBAAmB,GAKpB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,aAAa,GAGd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,oBAAoB,GAErB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,KAAK,GAEN,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interview Tools
|
|
3
|
+
* Codebase tools for the AI interview agent
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Create codebase tools for interview agent
|
|
7
|
+
*/
|
|
8
|
+
export declare function createInterviewTools(projectRoot: string): {
|
|
9
|
+
/**
|
|
10
|
+
* Read a file from the project codebase
|
|
11
|
+
*/
|
|
12
|
+
read_file: import("ai").Tool<{
|
|
13
|
+
path: string;
|
|
14
|
+
}, {
|
|
15
|
+
error: string;
|
|
16
|
+
content?: undefined;
|
|
17
|
+
truncated?: undefined;
|
|
18
|
+
totalLength?: undefined;
|
|
19
|
+
message?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
content: string;
|
|
22
|
+
truncated: boolean;
|
|
23
|
+
totalLength: number;
|
|
24
|
+
message: string;
|
|
25
|
+
error?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
content: string;
|
|
28
|
+
truncated: boolean;
|
|
29
|
+
error?: undefined;
|
|
30
|
+
totalLength?: undefined;
|
|
31
|
+
message?: undefined;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Search for patterns in the codebase
|
|
35
|
+
*/
|
|
36
|
+
search_codebase: import("ai").Tool<{
|
|
37
|
+
pattern: string;
|
|
38
|
+
directory?: string | undefined;
|
|
39
|
+
filePattern?: string | undefined;
|
|
40
|
+
literal?: boolean | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
error: string;
|
|
43
|
+
matches?: undefined;
|
|
44
|
+
message?: undefined;
|
|
45
|
+
truncated?: undefined;
|
|
46
|
+
} | {
|
|
47
|
+
matches: never[];
|
|
48
|
+
message: string;
|
|
49
|
+
error?: undefined;
|
|
50
|
+
truncated?: undefined;
|
|
51
|
+
} | {
|
|
52
|
+
matches: {
|
|
53
|
+
file: string;
|
|
54
|
+
line: number;
|
|
55
|
+
content: string;
|
|
56
|
+
}[];
|
|
57
|
+
truncated: boolean;
|
|
58
|
+
message: string;
|
|
59
|
+
error?: undefined;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* List files in a directory
|
|
63
|
+
*/
|
|
64
|
+
list_directory: import("ai").Tool<{
|
|
65
|
+
path: string;
|
|
66
|
+
}, {
|
|
67
|
+
error: string;
|
|
68
|
+
path?: undefined;
|
|
69
|
+
items?: undefined;
|
|
70
|
+
count?: undefined;
|
|
71
|
+
} | {
|
|
72
|
+
path: string;
|
|
73
|
+
items: {
|
|
74
|
+
name: string;
|
|
75
|
+
type: string;
|
|
76
|
+
}[];
|
|
77
|
+
count: number;
|
|
78
|
+
error?: undefined;
|
|
79
|
+
}>;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Export tool types for TypeScript
|
|
83
|
+
*/
|
|
84
|
+
export type InterviewTools = ReturnType<typeof createInterviewTools>;
|
|
85
|
+
//# sourceMappingURL=interview-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interview-tools.d.ts","sourceRoot":"","sources":["../../../src/ai/conversation/interview-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM;IAEpD;;OAEG;;;;;;;;;;;;;;;;;;;;;;IA4CH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;IA+HH;;OAEG;;;;;;;;;;;;;;;;;EA6DN;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interview Tools
|
|
3
|
+
* Codebase tools for the AI interview agent
|
|
4
|
+
*/
|
|
5
|
+
import { tool, zodSchema } from 'ai';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
8
|
+
import { relative, resolve } from 'node:path';
|
|
9
|
+
import { spawnSync } from 'node:child_process';
|
|
10
|
+
/** Maximum content length before truncation */
|
|
11
|
+
const MAX_CONTENT_LENGTH = 8000;
|
|
12
|
+
/** Maximum search results */
|
|
13
|
+
const MAX_SEARCH_RESULTS = 20;
|
|
14
|
+
/**
|
|
15
|
+
* Validate path is within project root (security)
|
|
16
|
+
* Ensures the resolved path is exactly the project root or a child of it,
|
|
17
|
+
* preventing prefix-based escapes like ../project-secret
|
|
18
|
+
*/
|
|
19
|
+
function validatePath(projectRoot, targetPath) {
|
|
20
|
+
const absolutePath = resolve(projectRoot, targetPath);
|
|
21
|
+
const normalizedProjectRoot = resolve(projectRoot);
|
|
22
|
+
// Must be exactly the project root OR start with project root + separator
|
|
23
|
+
// This prevents prefix attacks like /project-secret matching /project
|
|
24
|
+
if (absolutePath !== normalizedProjectRoot &&
|
|
25
|
+
!absolutePath.startsWith(normalizedProjectRoot + '/')) {
|
|
26
|
+
return null; // Path traversal attempt
|
|
27
|
+
}
|
|
28
|
+
return absolutePath;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Check if ripgrep is available
|
|
32
|
+
*/
|
|
33
|
+
function hasRipgrep() {
|
|
34
|
+
const result = spawnSync('which', ['rg'], { encoding: 'utf-8' });
|
|
35
|
+
return result.status === 0;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Create codebase tools for interview agent
|
|
39
|
+
*/
|
|
40
|
+
export function createInterviewTools(projectRoot) {
|
|
41
|
+
return {
|
|
42
|
+
/**
|
|
43
|
+
* Read a file from the project codebase
|
|
44
|
+
*/
|
|
45
|
+
read_file: tool({
|
|
46
|
+
description: `Read a file from the project codebase.
|
|
47
|
+
Use this to understand code structure, check implementations, or find patterns.
|
|
48
|
+
Returns file content (truncated if too long).`,
|
|
49
|
+
inputSchema: zodSchema(z.object({
|
|
50
|
+
path: z.string().describe('Relative path from project root (e.g., "src/index.ts")'),
|
|
51
|
+
})),
|
|
52
|
+
execute: async ({ path: filePath }) => {
|
|
53
|
+
const fullPath = validatePath(projectRoot, filePath);
|
|
54
|
+
if (!fullPath) {
|
|
55
|
+
return { error: 'Invalid path: must be within project directory' };
|
|
56
|
+
}
|
|
57
|
+
if (!existsSync(fullPath)) {
|
|
58
|
+
return { error: `File not found: ${filePath}` };
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const stat = statSync(fullPath);
|
|
62
|
+
if (stat.isDirectory()) {
|
|
63
|
+
return { error: `Path is a directory, not a file: ${filePath}` };
|
|
64
|
+
}
|
|
65
|
+
const content = readFileSync(fullPath, 'utf-8');
|
|
66
|
+
if (content.length > MAX_CONTENT_LENGTH) {
|
|
67
|
+
return {
|
|
68
|
+
content: content.slice(0, MAX_CONTENT_LENGTH),
|
|
69
|
+
truncated: true,
|
|
70
|
+
totalLength: content.length,
|
|
71
|
+
message: `File truncated to ${MAX_CONTENT_LENGTH} characters (total: ${content.length})`,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return { content, truncated: false };
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
78
|
+
return { error: `Failed to read file: ${msg}` };
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
}),
|
|
82
|
+
/**
|
|
83
|
+
* Search for patterns in the codebase
|
|
84
|
+
*/
|
|
85
|
+
search_codebase: tool({
|
|
86
|
+
description: `Search for patterns in the codebase using grep.
|
|
87
|
+
Use this to find function definitions, imports, usage patterns, or specific code.
|
|
88
|
+
Returns matching files with line snippets.`,
|
|
89
|
+
inputSchema: zodSchema(z.object({
|
|
90
|
+
pattern: z.string().describe('Search pattern (text or regex)'),
|
|
91
|
+
directory: z.string().optional()
|
|
92
|
+
.describe('Directory to search in (relative to project root). Defaults to entire project'),
|
|
93
|
+
filePattern: z.string().optional()
|
|
94
|
+
.describe('File pattern to match (e.g., "*.ts", "*.tsx")'),
|
|
95
|
+
literal: z.boolean().optional()
|
|
96
|
+
.describe('Use literal search instead of regex (faster for exact strings)'),
|
|
97
|
+
})),
|
|
98
|
+
execute: async ({ pattern, directory, filePattern, literal }) => {
|
|
99
|
+
// Determine search directory
|
|
100
|
+
let searchPath = projectRoot;
|
|
101
|
+
if (directory) {
|
|
102
|
+
const validatedDir = validatePath(projectRoot, directory);
|
|
103
|
+
if (!validatedDir) {
|
|
104
|
+
return { error: 'Invalid search directory: must be within project' };
|
|
105
|
+
}
|
|
106
|
+
if (!existsSync(validatedDir)) {
|
|
107
|
+
return { error: `Directory not found: ${directory}` };
|
|
108
|
+
}
|
|
109
|
+
searchPath = validatedDir;
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
let result;
|
|
113
|
+
if (hasRipgrep()) {
|
|
114
|
+
// Use ripgrep (faster)
|
|
115
|
+
const args = [
|
|
116
|
+
'--line-number',
|
|
117
|
+
'--max-count', '3',
|
|
118
|
+
'--max-filesize', '1M',
|
|
119
|
+
'--no-heading',
|
|
120
|
+
'--glob', '!node_modules',
|
|
121
|
+
'--glob', '!.git',
|
|
122
|
+
'--glob', '!dist',
|
|
123
|
+
'--glob', '!build',
|
|
124
|
+
'--glob', '!*.lock',
|
|
125
|
+
];
|
|
126
|
+
if (literal)
|
|
127
|
+
args.push('-F');
|
|
128
|
+
if (filePattern)
|
|
129
|
+
args.push('--glob', filePattern);
|
|
130
|
+
args.push('--', pattern, searchPath);
|
|
131
|
+
result = spawnSync('rg', args, {
|
|
132
|
+
encoding: 'utf-8',
|
|
133
|
+
maxBuffer: 1024 * 1024,
|
|
134
|
+
timeout: 30000,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
// Fallback to grep
|
|
139
|
+
const args = [
|
|
140
|
+
'-rn',
|
|
141
|
+
'--exclude-dir=node_modules',
|
|
142
|
+
'--exclude-dir=.git',
|
|
143
|
+
'--exclude-dir=dist',
|
|
144
|
+
'--exclude-dir=build',
|
|
145
|
+
];
|
|
146
|
+
if (literal)
|
|
147
|
+
args.push('-F');
|
|
148
|
+
if (filePattern)
|
|
149
|
+
args.push(`--include=${filePattern}`);
|
|
150
|
+
// Use -- to signal end of options, preventing patterns starting with -
|
|
151
|
+
// from being interpreted as grep flags
|
|
152
|
+
args.push('--', pattern, searchPath);
|
|
153
|
+
result = spawnSync('grep', args, {
|
|
154
|
+
encoding: 'utf-8',
|
|
155
|
+
maxBuffer: 1024 * 1024,
|
|
156
|
+
timeout: 30000,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
if (result.error) {
|
|
160
|
+
return { error: `Search failed: ${result.error.message}` };
|
|
161
|
+
}
|
|
162
|
+
// Status 1 means no matches (for both rg and grep)
|
|
163
|
+
if (result.status === 1 || !result.stdout?.trim()) {
|
|
164
|
+
return { matches: [], message: `No matches found for "${pattern}"` };
|
|
165
|
+
}
|
|
166
|
+
// Parse output into structured results
|
|
167
|
+
const lines = result.stdout.trim().split('\n').slice(0, MAX_SEARCH_RESULTS);
|
|
168
|
+
const matches = lines.map(line => {
|
|
169
|
+
// Format: file:line:content
|
|
170
|
+
const colonIndex = line.indexOf(':');
|
|
171
|
+
if (colonIndex === -1)
|
|
172
|
+
return { file: line, line: 0, content: '' };
|
|
173
|
+
const file = relative(projectRoot, line.slice(0, colonIndex));
|
|
174
|
+
const rest = line.slice(colonIndex + 1);
|
|
175
|
+
const lineNumMatch = rest.match(/^(\d+):/);
|
|
176
|
+
if (lineNumMatch) {
|
|
177
|
+
const lineNum = parseInt(lineNumMatch[1], 10);
|
|
178
|
+
const content = rest.slice(lineNumMatch[0].length).trim();
|
|
179
|
+
return { file, line: lineNum, content: content.slice(0, 200) };
|
|
180
|
+
}
|
|
181
|
+
return { file, line: 0, content: rest.slice(0, 200) };
|
|
182
|
+
});
|
|
183
|
+
return {
|
|
184
|
+
matches,
|
|
185
|
+
truncated: lines.length >= MAX_SEARCH_RESULTS,
|
|
186
|
+
message: matches.length > 0
|
|
187
|
+
? `Found ${matches.length} match(es)`
|
|
188
|
+
: `No matches found for "${pattern}"`,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
193
|
+
return { error: `Search failed: ${msg}` };
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
}),
|
|
197
|
+
/**
|
|
198
|
+
* List files in a directory
|
|
199
|
+
*/
|
|
200
|
+
list_directory: tool({
|
|
201
|
+
description: `List files and directories in a path.
|
|
202
|
+
Use this to explore project structure and find files to read.
|
|
203
|
+
Returns names and types (file/directory).`,
|
|
204
|
+
inputSchema: zodSchema(z.object({
|
|
205
|
+
path: z.string().describe('Directory path relative to project root (e.g., "src" or "src/components")'),
|
|
206
|
+
})),
|
|
207
|
+
execute: async ({ path: dirPath }) => {
|
|
208
|
+
const targetPath = dirPath || '.';
|
|
209
|
+
const fullPath = validatePath(projectRoot, targetPath);
|
|
210
|
+
if (!fullPath) {
|
|
211
|
+
return { error: 'Invalid path: must be within project directory' };
|
|
212
|
+
}
|
|
213
|
+
if (!existsSync(fullPath)) {
|
|
214
|
+
return { error: `Directory not found: ${targetPath}` };
|
|
215
|
+
}
|
|
216
|
+
try {
|
|
217
|
+
const stat = statSync(fullPath);
|
|
218
|
+
if (!stat.isDirectory()) {
|
|
219
|
+
return { error: `Path is a file, not a directory: ${targetPath}` };
|
|
220
|
+
}
|
|
221
|
+
const entries = readdirSync(fullPath, { withFileTypes: true });
|
|
222
|
+
// Filter out common non-essential entries
|
|
223
|
+
const filteredEntries = entries.filter(e => {
|
|
224
|
+
const name = e.name;
|
|
225
|
+
// Skip hidden files except .env.example, skip node_modules etc
|
|
226
|
+
if (name === 'node_modules' || name === '.git' || name === 'dist' || name === 'build') {
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
229
|
+
return !name.startsWith('.') || name === '.env.example';
|
|
230
|
+
});
|
|
231
|
+
const items = filteredEntries.map(e => ({
|
|
232
|
+
name: e.name,
|
|
233
|
+
type: e.isDirectory() ? 'directory' : 'file',
|
|
234
|
+
}));
|
|
235
|
+
// Sort: directories first, then files
|
|
236
|
+
items.sort((a, b) => {
|
|
237
|
+
if (a.type === b.type)
|
|
238
|
+
return a.name.localeCompare(b.name);
|
|
239
|
+
return a.type === 'directory' ? -1 : 1;
|
|
240
|
+
});
|
|
241
|
+
return {
|
|
242
|
+
path: targetPath,
|
|
243
|
+
items,
|
|
244
|
+
count: items.length,
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
catch (error) {
|
|
248
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
249
|
+
return { error: `Failed to list directory: ${msg}` };
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
}),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
//# sourceMappingURL=interview-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interview-tools.js","sourceRoot":"","sources":["../../../src/ai/conversation/interview-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACrC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAQ,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,+CAA+C;AAC/C,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC,6BAA6B;AAC7B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;;;;GAIG;AACH,SAAS,YAAY,CAAC,WAAmB,EAAE,UAAkB;IAC3D,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACtD,MAAM,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,CAA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CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBACnE,OAAO,EAAE,KAAK,EAAE,6BAA6B,GAAG,EAAE,EAAE,CAAC;gBACvD,CAAC;YACH,CAAC;SACF,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Spec Generator
|
|
3
3
|
* AI-powered feature specification generator with interview flow
|
|
4
|
+
* Enhanced with codebase tools and Claude Code-like UX
|
|
4
5
|
*/
|
|
5
6
|
import type { AIProvider } from '../providers.js';
|
|
6
7
|
import type { ScanResult } from '../../scanner/types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Session context from /init analysis
|
|
10
|
+
*/
|
|
11
|
+
export interface SessionContext {
|
|
12
|
+
entryPoints?: string[];
|
|
13
|
+
keyDirectories?: Record<string, string>;
|
|
14
|
+
commands?: {
|
|
15
|
+
build?: string;
|
|
16
|
+
dev?: string;
|
|
17
|
+
test?: string;
|
|
18
|
+
};
|
|
19
|
+
namingConventions?: string;
|
|
20
|
+
implementationGuidelines?: string[];
|
|
21
|
+
}
|
|
7
22
|
/**
|
|
8
23
|
* Spec generator options
|
|
9
24
|
*/
|
|
@@ -13,6 +28,12 @@ export interface SpecGeneratorOptions {
|
|
|
13
28
|
provider: AIProvider;
|
|
14
29
|
model: string;
|
|
15
30
|
scanResult?: ScanResult;
|
|
31
|
+
/** Rich session context from /init */
|
|
32
|
+
sessionContext?: SessionContext;
|
|
33
|
+
/** Tavily API key for web search */
|
|
34
|
+
tavilyApiKey?: string;
|
|
35
|
+
/** Context7 API key for docs lookup */
|
|
36
|
+
context7ApiKey?: string;
|
|
16
37
|
}
|
|
17
38
|
/**
|
|
18
39
|
* Generation phases
|
|
@@ -27,19 +48,44 @@ export declare class SpecGenerator {
|
|
|
27
48
|
private readonly featureName;
|
|
28
49
|
private readonly projectRoot;
|
|
29
50
|
private generatedSpec;
|
|
51
|
+
private questionCount;
|
|
52
|
+
private readonly hasTools;
|
|
53
|
+
private readonly sessionContext?;
|
|
30
54
|
constructor(options: SpecGeneratorOptions);
|
|
55
|
+
/**
|
|
56
|
+
* Display the current phase header
|
|
57
|
+
*/
|
|
58
|
+
private displayHeader;
|
|
59
|
+
/**
|
|
60
|
+
* Display session context at start
|
|
61
|
+
*/
|
|
62
|
+
private displayContext;
|
|
31
63
|
/**
|
|
32
64
|
* Phase 1: Gather context from URLs/files
|
|
33
65
|
*/
|
|
34
66
|
private gatherContext;
|
|
35
67
|
/**
|
|
36
|
-
* Phase 2: Discuss goals
|
|
68
|
+
* Phase 2: Discuss goals - collect user goals
|
|
37
69
|
*/
|
|
38
70
|
private discussGoals;
|
|
71
|
+
/**
|
|
72
|
+
* Phase 2a: Explore project silently
|
|
73
|
+
* AI explores the codebase WITHOUT asking questions - just gathering context
|
|
74
|
+
*/
|
|
75
|
+
private exploreProject;
|
|
76
|
+
/**
|
|
77
|
+
* Phase 2b: Start interview - acknowledge goals and ask FIRST question
|
|
78
|
+
* This is a SEPARATE AI turn from exploration to prevent "two answers" bug
|
|
79
|
+
*/
|
|
80
|
+
private startInterview;
|
|
39
81
|
/**
|
|
40
82
|
* Phase 3: Conduct interview
|
|
41
83
|
*/
|
|
42
84
|
private conductInterview;
|
|
85
|
+
/**
|
|
86
|
+
* Process a user answer and get AI response
|
|
87
|
+
*/
|
|
88
|
+
private processAnswer;
|
|
43
89
|
/**
|
|
44
90
|
* Phase 4: Generate spec
|
|
45
91
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-generator.d.ts","sourceRoot":"","sources":["../../../src/ai/conversation/spec-generator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"spec-generator.d.ts","sourceRoot":"","sources":["../../../src/ai/conversation/spec-generator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,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