@simpletoolsindiaorg/engi-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/LICENSE +21 -0
- package/README.md +592 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +6 -0
- package/dist/bin.js.map +1 -0
- package/dist/capabilities/analysis/analysis.d.ts +223 -0
- package/dist/capabilities/analysis/analysis.d.ts.map +1 -0
- package/dist/capabilities/analysis/analysis.js +202 -0
- package/dist/capabilities/analysis/analysis.js.map +1 -0
- package/dist/capabilities/analysis/index.d.ts +2 -0
- package/dist/capabilities/analysis/index.d.ts.map +1 -0
- package/dist/capabilities/analysis/index.js +19 -0
- package/dist/capabilities/analysis/index.js.map +1 -0
- package/dist/capabilities/documentation/documentation.d.ts +107 -0
- package/dist/capabilities/documentation/documentation.d.ts.map +1 -0
- package/dist/capabilities/documentation/documentation.js +112 -0
- package/dist/capabilities/documentation/documentation.js.map +1 -0
- package/dist/capabilities/documentation/index.d.ts +2 -0
- package/dist/capabilities/documentation/index.d.ts.map +1 -0
- package/dist/capabilities/documentation/index.js +19 -0
- package/dist/capabilities/documentation/index.js.map +1 -0
- package/dist/capabilities/execution/execution.d.ts +96 -0
- package/dist/capabilities/execution/execution.d.ts.map +1 -0
- package/dist/capabilities/execution/execution.js +175 -0
- package/dist/capabilities/execution/execution.js.map +1 -0
- package/dist/capabilities/execution/index.d.ts +2 -0
- package/dist/capabilities/execution/index.d.ts.map +1 -0
- package/dist/capabilities/execution/index.js +19 -0
- package/dist/capabilities/execution/index.js.map +1 -0
- package/dist/capabilities/memory/index.d.ts +2 -0
- package/dist/capabilities/memory/index.d.ts.map +1 -0
- package/dist/capabilities/memory/index.js +19 -0
- package/dist/capabilities/memory/index.js.map +1 -0
- package/dist/capabilities/memory/memory.d.ts +227 -0
- package/dist/capabilities/memory/memory.d.ts.map +1 -0
- package/dist/capabilities/memory/memory.js +106 -0
- package/dist/capabilities/memory/memory.js.map +1 -0
- package/dist/capabilities/planning/index.d.ts +2 -0
- package/dist/capabilities/planning/index.d.ts.map +1 -0
- package/dist/capabilities/planning/index.js +19 -0
- package/dist/capabilities/planning/index.js.map +1 -0
- package/dist/capabilities/planning/planning.d.ts +131 -0
- package/dist/capabilities/planning/planning.d.ts.map +1 -0
- package/dist/capabilities/planning/planning.js +179 -0
- package/dist/capabilities/planning/planning.js.map +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +19 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/indexer/index.d.ts +2 -0
- package/dist/core/indexer/index.d.ts.map +1 -0
- package/dist/core/indexer/index.js +9 -0
- package/dist/core/indexer/index.js.map +1 -0
- package/dist/core/indexer/indexer.d.ts +35 -0
- package/dist/core/indexer/indexer.d.ts.map +1 -0
- package/dist/core/indexer/indexer.js +377 -0
- package/dist/core/indexer/indexer.js.map +1 -0
- package/dist/core/retrieval/index.d.ts +2 -0
- package/dist/core/retrieval/index.d.ts.map +1 -0
- package/dist/core/retrieval/index.js +8 -0
- package/dist/core/retrieval/index.js.map +1 -0
- package/dist/core/retrieval/retriever.d.ts +28 -0
- package/dist/core/retrieval/retriever.d.ts.map +1 -0
- package/dist/core/retrieval/retriever.js +258 -0
- package/dist/core/retrieval/retriever.js.map +1 -0
- package/dist/core/summarizer/index.d.ts +2 -0
- package/dist/core/summarizer/index.d.ts.map +1 -0
- package/dist/core/summarizer/index.js +8 -0
- package/dist/core/summarizer/index.js.map +1 -0
- package/dist/core/summarizer/summarizer.d.ts +33 -0
- package/dist/core/summarizer/summarizer.d.ts.map +1 -0
- package/dist/core/summarizer/summarizer.js +341 -0
- package/dist/core/summarizer/summarizer.js.map +1 -0
- package/dist/core/types.d.ts +224 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +4 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -0
- package/dist/memory/index.d.ts +2 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +9 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/memory.d.ts +59 -0
- package/dist/memory/memory.d.ts.map +1 -0
- package/dist/memory/memory.js +212 -0
- package/dist/memory/memory.js.map +1 -0
- package/dist/resources/index.d.ts +3 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +16 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/resources.d.ts +86 -0
- package/dist/resources/resources.d.ts.map +1 -0
- package/dist/resources/resources.js +285 -0
- package/dist/resources/resources.js.map +1 -0
- package/dist/utils/formatter.d.ts +26 -0
- package/dist/utils/formatter.d.ts.map +1 -0
- package/dist/utils/formatter.js +56 -0
- package/dist/utils/formatter.js.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +21 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +44 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/token-counter.d.ts +24 -0
- package/dist/utils/token-counter.d.ts.map +1 -0
- package/dist/utils/token-counter.js +49 -0
- package/dist/utils/token-counter.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TaskClassification, ScopedResult, FlowSummary, BugTraceResult, Verbosity } from '../../core/types.js';
|
|
3
|
+
declare const TaskClassifySchema: z.ZodObject<{
|
|
4
|
+
task: z.ZodString;
|
|
5
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
task: string;
|
|
8
|
+
keywords?: string[] | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
task: string;
|
|
11
|
+
keywords?: string[] | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
export type TaskClassifyParams = z.infer<typeof TaskClassifySchema>;
|
|
14
|
+
export declare function taskClassify(params: TaskClassifyParams, verbosity?: Verbosity): Promise<TaskClassification>;
|
|
15
|
+
declare const RepoScopeFindSchema: z.ZodObject<{
|
|
16
|
+
task: z.ZodString;
|
|
17
|
+
taskType: z.ZodEnum<["analysis", "feature", "bug", "poc", "documentation", "mixed"]>;
|
|
18
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
19
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
repoPath: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
task: string;
|
|
23
|
+
taskType: "analysis" | "feature" | "bug" | "poc" | "documentation" | "mixed";
|
|
24
|
+
keywords?: string[] | undefined;
|
|
25
|
+
limit?: number | undefined;
|
|
26
|
+
repoPath?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
task: string;
|
|
29
|
+
taskType: "analysis" | "feature" | "bug" | "poc" | "documentation" | "mixed";
|
|
30
|
+
keywords?: string[] | undefined;
|
|
31
|
+
limit?: number | undefined;
|
|
32
|
+
repoPath?: string | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export type RepoScopeFindParams = z.infer<typeof RepoScopeFindSchema>;
|
|
35
|
+
export declare function repoScopeFind(params: RepoScopeFindParams, verbosity?: Verbosity): Promise<ScopedResult>;
|
|
36
|
+
declare const FlowSummarizeSchema: z.ZodObject<{
|
|
37
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
38
|
+
entryPoint: z.ZodOptional<z.ZodString>;
|
|
39
|
+
verbosity: z.ZodOptional<z.ZodEnum<["minimal", "standard", "detailed"]>>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
entryPoint?: string | undefined;
|
|
42
|
+
scope?: string[] | undefined;
|
|
43
|
+
verbosity?: "minimal" | "standard" | "detailed" | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
entryPoint?: string | undefined;
|
|
46
|
+
scope?: string[] | undefined;
|
|
47
|
+
verbosity?: "minimal" | "standard" | "detailed" | undefined;
|
|
48
|
+
}>;
|
|
49
|
+
export type FlowSummarizeParams = z.infer<typeof FlowSummarizeSchema>;
|
|
50
|
+
export declare function flowSummarize(params: FlowSummarizeParams, verbosity?: Verbosity): Promise<FlowSummary>;
|
|
51
|
+
declare const BugTraceSchema: z.ZodObject<{
|
|
52
|
+
symptom: z.ZodString;
|
|
53
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
symptom: string;
|
|
56
|
+
scope?: string[] | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
symptom: string;
|
|
59
|
+
scope?: string[] | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
export type BugTraceParams = z.infer<typeof BugTraceSchema>;
|
|
62
|
+
export declare function bugTraceCompacts(params: BugTraceParams, verbosity?: Verbosity): Promise<BugTraceResult>;
|
|
63
|
+
export declare const analysisTools: {
|
|
64
|
+
task_classify: {
|
|
65
|
+
name: string;
|
|
66
|
+
description: string;
|
|
67
|
+
inputSchema: {
|
|
68
|
+
type: "object";
|
|
69
|
+
properties: {
|
|
70
|
+
task: {
|
|
71
|
+
type: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
keywords: {
|
|
75
|
+
type: string;
|
|
76
|
+
items: {
|
|
77
|
+
type: string;
|
|
78
|
+
};
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
required: string[];
|
|
83
|
+
};
|
|
84
|
+
handler: typeof taskClassify;
|
|
85
|
+
schema: z.ZodObject<{
|
|
86
|
+
task: z.ZodString;
|
|
87
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
task: string;
|
|
90
|
+
keywords?: string[] | undefined;
|
|
91
|
+
}, {
|
|
92
|
+
task: string;
|
|
93
|
+
keywords?: string[] | undefined;
|
|
94
|
+
}>;
|
|
95
|
+
};
|
|
96
|
+
repo_scope_find: {
|
|
97
|
+
name: string;
|
|
98
|
+
description: string;
|
|
99
|
+
inputSchema: {
|
|
100
|
+
type: "object";
|
|
101
|
+
properties: {
|
|
102
|
+
task: {
|
|
103
|
+
type: string;
|
|
104
|
+
description: string;
|
|
105
|
+
};
|
|
106
|
+
taskType: {
|
|
107
|
+
type: string;
|
|
108
|
+
enum: string[];
|
|
109
|
+
description: string;
|
|
110
|
+
};
|
|
111
|
+
keywords: {
|
|
112
|
+
type: string;
|
|
113
|
+
items: {
|
|
114
|
+
type: string;
|
|
115
|
+
};
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
limit: {
|
|
119
|
+
type: string;
|
|
120
|
+
description: string;
|
|
121
|
+
};
|
|
122
|
+
repoPath: {
|
|
123
|
+
type: string;
|
|
124
|
+
description: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
required: string[];
|
|
128
|
+
};
|
|
129
|
+
handler: typeof repoScopeFind;
|
|
130
|
+
schema: z.ZodObject<{
|
|
131
|
+
task: z.ZodString;
|
|
132
|
+
taskType: z.ZodEnum<["analysis", "feature", "bug", "poc", "documentation", "mixed"]>;
|
|
133
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
134
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
repoPath: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
task: string;
|
|
138
|
+
taskType: "analysis" | "feature" | "bug" | "poc" | "documentation" | "mixed";
|
|
139
|
+
keywords?: string[] | undefined;
|
|
140
|
+
limit?: number | undefined;
|
|
141
|
+
repoPath?: string | undefined;
|
|
142
|
+
}, {
|
|
143
|
+
task: string;
|
|
144
|
+
taskType: "analysis" | "feature" | "bug" | "poc" | "documentation" | "mixed";
|
|
145
|
+
keywords?: string[] | undefined;
|
|
146
|
+
limit?: number | undefined;
|
|
147
|
+
repoPath?: string | undefined;
|
|
148
|
+
}>;
|
|
149
|
+
};
|
|
150
|
+
flow_summarize: {
|
|
151
|
+
name: string;
|
|
152
|
+
description: string;
|
|
153
|
+
inputSchema: {
|
|
154
|
+
type: "object";
|
|
155
|
+
properties: {
|
|
156
|
+
scope: {
|
|
157
|
+
type: string;
|
|
158
|
+
items: {
|
|
159
|
+
type: string;
|
|
160
|
+
};
|
|
161
|
+
description: string;
|
|
162
|
+
};
|
|
163
|
+
entryPoint: {
|
|
164
|
+
type: string;
|
|
165
|
+
description: string;
|
|
166
|
+
};
|
|
167
|
+
verbosity: {
|
|
168
|
+
type: string;
|
|
169
|
+
enum: string[];
|
|
170
|
+
description: string;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
handler: typeof flowSummarize;
|
|
175
|
+
schema: z.ZodObject<{
|
|
176
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
177
|
+
entryPoint: z.ZodOptional<z.ZodString>;
|
|
178
|
+
verbosity: z.ZodOptional<z.ZodEnum<["minimal", "standard", "detailed"]>>;
|
|
179
|
+
}, "strip", z.ZodTypeAny, {
|
|
180
|
+
entryPoint?: string | undefined;
|
|
181
|
+
scope?: string[] | undefined;
|
|
182
|
+
verbosity?: "minimal" | "standard" | "detailed" | undefined;
|
|
183
|
+
}, {
|
|
184
|
+
entryPoint?: string | undefined;
|
|
185
|
+
scope?: string[] | undefined;
|
|
186
|
+
verbosity?: "minimal" | "standard" | "detailed" | undefined;
|
|
187
|
+
}>;
|
|
188
|
+
};
|
|
189
|
+
bug_trace_compact: {
|
|
190
|
+
name: string;
|
|
191
|
+
description: string;
|
|
192
|
+
inputSchema: {
|
|
193
|
+
type: "object";
|
|
194
|
+
properties: {
|
|
195
|
+
symptom: {
|
|
196
|
+
type: string;
|
|
197
|
+
description: string;
|
|
198
|
+
};
|
|
199
|
+
scope: {
|
|
200
|
+
type: string;
|
|
201
|
+
items: {
|
|
202
|
+
type: string;
|
|
203
|
+
};
|
|
204
|
+
description: string;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
required: string[];
|
|
208
|
+
};
|
|
209
|
+
handler: typeof bugTraceCompacts;
|
|
210
|
+
schema: z.ZodObject<{
|
|
211
|
+
symptom: z.ZodString;
|
|
212
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
213
|
+
}, "strip", z.ZodTypeAny, {
|
|
214
|
+
symptom: string;
|
|
215
|
+
scope?: string[] | undefined;
|
|
216
|
+
}, {
|
|
217
|
+
symptom: string;
|
|
218
|
+
scope?: string[] | undefined;
|
|
219
|
+
}>;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
export {};
|
|
223
|
+
//# sourceMappingURL=analysis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../../../src/capabilities/analysis/analysis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,kBAAkB,EAGlB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,SAAS,EACV,MAAM,qBAAqB,CAAC;AAS7B,QAAA,MAAM,kBAAkB;;;;;;;;;EAGtB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,wBAAsB,YAAY,CAAC,MAAM,EAAE,kBAAkB,EAAE,SAAS,GAAE,SAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA4E5H;AAMD,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAMvB,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,EAAE,SAAS,GAAE,SAAqB,GAAG,OAAO,CAAC,YAAY,CAAC,CAkBxH;AAMD,QAAA,MAAM,mBAAmB;;;;;;;;;;;;EAIvB,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,EAAE,SAAS,GAAE,SAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,CAQvH;AAMD,QAAA,MAAM,cAAc;;;;;;;;;EAGlB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,GAAE,SAAqB,GAAG,OAAO,CAAC,cAAc,CAAC,CAIxH;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DzB,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.analysisTools = void 0;
|
|
4
|
+
exports.taskClassify = taskClassify;
|
|
5
|
+
exports.repoScopeFind = repoScopeFind;
|
|
6
|
+
exports.flowSummarize = flowSummarize;
|
|
7
|
+
exports.bugTraceCompacts = bugTraceCompacts;
|
|
8
|
+
// Analysis Capability Tools
|
|
9
|
+
const zod_1 = require("zod");
|
|
10
|
+
const indexer_js_1 = require("../../core/indexer/indexer.js");
|
|
11
|
+
const retriever_js_1 = require("../../core/retrieval/retriever.js");
|
|
12
|
+
const summarizer_js_1 = require("../../core/summarizer/summarizer.js");
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// Task Classification
|
|
15
|
+
// ============================================================================
|
|
16
|
+
const TaskClassifySchema = zod_1.z.object({
|
|
17
|
+
task: zod_1.z.string().describe('The engineering task description to classify'),
|
|
18
|
+
keywords: zod_1.z.array(zod_1.z.string()).optional().describe('Optional keywords for context')
|
|
19
|
+
});
|
|
20
|
+
async function taskClassify(params, verbosity = 'minimal') {
|
|
21
|
+
const { task, keywords = [] } = params;
|
|
22
|
+
const taskLower = task.toLowerCase();
|
|
23
|
+
// Detect task types from content
|
|
24
|
+
const detectedTypes = [];
|
|
25
|
+
let confidence = 0;
|
|
26
|
+
// Bug detection
|
|
27
|
+
if (taskLower.includes('bug') || taskLower.includes('fix') || taskLower.includes('error') ||
|
|
28
|
+
taskLower.includes('crash') || taskLower.includes('fail') || taskLower.includes('issue')) {
|
|
29
|
+
detectedTypes.push('bug');
|
|
30
|
+
confidence += 0.8;
|
|
31
|
+
}
|
|
32
|
+
// Feature detection
|
|
33
|
+
if (taskLower.includes('implement') || taskLower.includes('add') || taskLower.includes('new') ||
|
|
34
|
+
taskLower.includes('feature') || taskLower.includes('create')) {
|
|
35
|
+
detectedTypes.push('feature');
|
|
36
|
+
confidence += 0.7;
|
|
37
|
+
}
|
|
38
|
+
// POC detection
|
|
39
|
+
if (taskLower.includes('poc') || taskLower.includes('proof of concept') ||
|
|
40
|
+
taskLower.includes('prototype') || taskLower.includes('mockup')) {
|
|
41
|
+
detectedTypes.push('poc');
|
|
42
|
+
confidence += 0.9;
|
|
43
|
+
}
|
|
44
|
+
// Documentation detection
|
|
45
|
+
if (taskLower.includes('doc') || taskLower.includes('readme') || taskLower.includes('comment') ||
|
|
46
|
+
taskLower.includes('explain') || taskLower.includes('guide')) {
|
|
47
|
+
detectedTypes.push('documentation');
|
|
48
|
+
confidence += 0.8;
|
|
49
|
+
}
|
|
50
|
+
// Analysis detection
|
|
51
|
+
if (taskLower.includes('analyze') || taskLower.includes('understand') || taskLower.includes('explain') ||
|
|
52
|
+
taskLower.includes('how does') || taskLower.includes('what is')) {
|
|
53
|
+
detectedTypes.push('analysis');
|
|
54
|
+
confidence += 0.6;
|
|
55
|
+
}
|
|
56
|
+
// Default to analysis if nothing detected
|
|
57
|
+
if (detectedTypes.length === 0) {
|
|
58
|
+
detectedTypes.push('analysis');
|
|
59
|
+
confidence = 0.5;
|
|
60
|
+
}
|
|
61
|
+
// Determine suggested mode
|
|
62
|
+
let suggestedMode = 'analysis';
|
|
63
|
+
if (detectedTypes.includes('bug') || detectedTypes.includes('feature')) {
|
|
64
|
+
suggestedMode = 'planning';
|
|
65
|
+
}
|
|
66
|
+
else if (detectedTypes.includes('documentation')) {
|
|
67
|
+
suggestedMode = 'documentation';
|
|
68
|
+
}
|
|
69
|
+
// Determine next tools
|
|
70
|
+
const nextTools = [];
|
|
71
|
+
if (suggestedMode === 'analysis') {
|
|
72
|
+
nextTools.push('repo_scope_find', 'flow_summarize');
|
|
73
|
+
}
|
|
74
|
+
else if (suggestedMode === 'planning') {
|
|
75
|
+
nextTools.push('repo_scope_find', 'implementation_plan');
|
|
76
|
+
}
|
|
77
|
+
else if (suggestedMode === 'documentation') {
|
|
78
|
+
nextTools.push('doc_context_build', 'doc_update_plan');
|
|
79
|
+
}
|
|
80
|
+
// Normalize confidence
|
|
81
|
+
confidence = Math.min(confidence, 1);
|
|
82
|
+
return {
|
|
83
|
+
types: detectedTypes,
|
|
84
|
+
confidence,
|
|
85
|
+
suggestedMode,
|
|
86
|
+
nextTools
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
// ============================================================================
|
|
90
|
+
// Repository Scope Find
|
|
91
|
+
// ============================================================================
|
|
92
|
+
const RepoScopeFindSchema = zod_1.z.object({
|
|
93
|
+
task: zod_1.z.string().describe('The task description'),
|
|
94
|
+
taskType: zod_1.z.enum(['analysis', 'feature', 'bug', 'poc', 'documentation', 'mixed']).describe('Type of task'),
|
|
95
|
+
keywords: zod_1.z.array(zod_1.z.string()).optional().describe('Additional keywords'),
|
|
96
|
+
limit: zod_1.z.number().optional().describe('Maximum results to return'),
|
|
97
|
+
repoPath: zod_1.z.string().optional().describe('Repository path to index (if not already indexed)')
|
|
98
|
+
});
|
|
99
|
+
async function repoScopeFind(params, verbosity = 'minimal') {
|
|
100
|
+
const { task, taskType, keywords = [], limit = 10, repoPath } = params;
|
|
101
|
+
// Index repository if path provided
|
|
102
|
+
if (repoPath) {
|
|
103
|
+
await (0, indexer_js_1.indexRepository)(repoPath);
|
|
104
|
+
}
|
|
105
|
+
const retrieval = (0, retriever_js_1.getRetrievalEngine)();
|
|
106
|
+
const query = {
|
|
107
|
+
task,
|
|
108
|
+
taskType,
|
|
109
|
+
keywords,
|
|
110
|
+
limit
|
|
111
|
+
};
|
|
112
|
+
return retrieval.findScope(query);
|
|
113
|
+
}
|
|
114
|
+
// ============================================================================
|
|
115
|
+
// Flow Summarize
|
|
116
|
+
// ============================================================================
|
|
117
|
+
const FlowSummarizeSchema = zod_1.z.object({
|
|
118
|
+
scope: zod_1.z.array(zod_1.z.string()).optional().describe('File paths to include in flow'),
|
|
119
|
+
entryPoint: zod_1.z.string().optional().describe('Entry point file'),
|
|
120
|
+
verbosity: zod_1.z.enum(['minimal', 'standard', 'detailed']).optional().describe('Verbosity level')
|
|
121
|
+
});
|
|
122
|
+
async function flowSummarize(params, verbosity = 'minimal') {
|
|
123
|
+
const summarizer = (0, summarizer_js_1.getSummarizationEngine)();
|
|
124
|
+
return summarizer.generateFlowSummary({
|
|
125
|
+
scope: params.scope,
|
|
126
|
+
entryPoint: params.entryPoint,
|
|
127
|
+
verbosity: params.verbosity || verbosity
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
// ============================================================================
|
|
131
|
+
// Bug Trace Compact
|
|
132
|
+
// ============================================================================
|
|
133
|
+
const BugTraceSchema = zod_1.z.object({
|
|
134
|
+
symptom: zod_1.z.string().describe('Bug symptom description'),
|
|
135
|
+
scope: zod_1.z.array(zod_1.z.string()).optional().describe('Files to investigate')
|
|
136
|
+
});
|
|
137
|
+
async function bugTraceCompacts(params, verbosity = 'minimal') {
|
|
138
|
+
const summarizer = (0, summarizer_js_1.getSummarizationEngine)();
|
|
139
|
+
return summarizer.traceBug(params.symptom, params.scope);
|
|
140
|
+
}
|
|
141
|
+
exports.analysisTools = {
|
|
142
|
+
task_classify: {
|
|
143
|
+
name: 'task_classify',
|
|
144
|
+
description: 'Classify an engineering task to determine its type and suggest next steps',
|
|
145
|
+
inputSchema: {
|
|
146
|
+
type: 'object',
|
|
147
|
+
properties: {
|
|
148
|
+
task: { type: 'string', description: 'The engineering task description to classify' },
|
|
149
|
+
keywords: { type: 'array', items: { type: 'string' }, description: 'Optional keywords for context' }
|
|
150
|
+
},
|
|
151
|
+
required: ['task']
|
|
152
|
+
},
|
|
153
|
+
handler: taskClassify,
|
|
154
|
+
schema: TaskClassifySchema
|
|
155
|
+
},
|
|
156
|
+
repo_scope_find: {
|
|
157
|
+
name: 'repo_scope_find',
|
|
158
|
+
description: 'Identify minimum relevant repository scope for a task',
|
|
159
|
+
inputSchema: {
|
|
160
|
+
type: 'object',
|
|
161
|
+
properties: {
|
|
162
|
+
task: { type: 'string', description: 'The task description' },
|
|
163
|
+
taskType: { type: 'string', enum: ['analysis', 'feature', 'bug', 'poc', 'documentation', 'mixed'], description: 'Type of task' },
|
|
164
|
+
keywords: { type: 'array', items: { type: 'string' }, description: 'Additional keywords' },
|
|
165
|
+
limit: { type: 'number', description: 'Maximum results to return' },
|
|
166
|
+
repoPath: { type: 'string', description: 'Repository path to index' }
|
|
167
|
+
},
|
|
168
|
+
required: ['task', 'taskType']
|
|
169
|
+
},
|
|
170
|
+
handler: repoScopeFind,
|
|
171
|
+
schema: RepoScopeFindSchema
|
|
172
|
+
},
|
|
173
|
+
flow_summarize: {
|
|
174
|
+
name: 'flow_summarize',
|
|
175
|
+
description: 'Explain existing implementation flow',
|
|
176
|
+
inputSchema: {
|
|
177
|
+
type: 'object',
|
|
178
|
+
properties: {
|
|
179
|
+
scope: { type: 'array', items: { type: 'string' }, description: 'File paths to include' },
|
|
180
|
+
entryPoint: { type: 'string', description: 'Entry point file' },
|
|
181
|
+
verbosity: { type: 'string', enum: ['minimal', 'standard', 'detailed'], description: 'Verbosity level' }
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
handler: flowSummarize,
|
|
185
|
+
schema: FlowSummarizeSchema
|
|
186
|
+
},
|
|
187
|
+
bug_trace_compact: {
|
|
188
|
+
name: 'bug_trace_compact',
|
|
189
|
+
description: 'Trace likely bug causes from symptom description',
|
|
190
|
+
inputSchema: {
|
|
191
|
+
type: 'object',
|
|
192
|
+
properties: {
|
|
193
|
+
symptom: { type: 'string', description: 'Bug symptom description' },
|
|
194
|
+
scope: { type: 'array', items: { type: 'string' }, description: 'Files to investigate' }
|
|
195
|
+
},
|
|
196
|
+
required: ['symptom']
|
|
197
|
+
},
|
|
198
|
+
handler: bugTraceCompacts,
|
|
199
|
+
schema: BugTraceSchema
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
//# sourceMappingURL=analysis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analysis.js","sourceRoot":"","sources":["../../../src/capabilities/analysis/analysis.ts"],"names":[],"mappings":";;;AA0BA,oCA4EC;AAgBD,sCAkBC;AAcD,sCAQC;AAaD,4CAIC;AA/KD,4BAA4B;AAC5B,6BAAwB;AAUxB,8DAA4E;AAC5E,oEAAuE;AACvE,uEAA6E;AAE7E,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,MAAM,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACzE,QAAQ,EAAE,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D,iBAAiB,EAAE;QACjB,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,kDAAkD;QAC/D,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yBAAyB,EAAE;gBACnE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,sBAAsB,EAAE;aACzF;YACD,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;QACD,OAAO,EAAE,gBAAgB;QACzB,MAAM,EAAE,cAAc;KACvB;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/capabilities/analysis/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Analysis capability exports
|
|
18
|
+
__exportStar(require("./analysis.js"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/capabilities/analysis/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,gDAA8B"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { DocContext, DocUpdatePlan, Verbosity } from '../../core/types.js';
|
|
3
|
+
declare const DocContextBuildSchema: z.ZodObject<{
|
|
4
|
+
feature: z.ZodOptional<z.ZodString>;
|
|
5
|
+
changedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
audience: z.ZodOptional<z.ZodEnum<["junior", "senior", "pm", "qa", "api"]>>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
feature?: string | undefined;
|
|
9
|
+
changedFiles?: string[] | undefined;
|
|
10
|
+
audience?: "api" | "junior" | "senior" | "pm" | "qa" | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
feature?: string | undefined;
|
|
13
|
+
changedFiles?: string[] | undefined;
|
|
14
|
+
audience?: "api" | "junior" | "senior" | "pm" | "qa" | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
export type DocContextBuildParams = z.infer<typeof DocContextBuildSchema>;
|
|
17
|
+
export declare function docContextBuild(params: DocContextBuildParams, verbosity?: Verbosity): Promise<DocContext>;
|
|
18
|
+
declare const DocUpdatePlanSchema: z.ZodObject<{
|
|
19
|
+
changedFiles: z.ZodArray<z.ZodString, "many">;
|
|
20
|
+
existingDocs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
changedFiles: string[];
|
|
23
|
+
existingDocs?: string[] | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
changedFiles: string[];
|
|
26
|
+
existingDocs?: string[] | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
export type DocUpdatePlanParams = z.infer<typeof DocUpdatePlanSchema>;
|
|
29
|
+
export declare function docUpdatePlan(params: DocUpdatePlanParams, verbosity?: Verbosity): Promise<DocUpdatePlan>;
|
|
30
|
+
export declare const documentationTools: {
|
|
31
|
+
doc_context_build: {
|
|
32
|
+
name: string;
|
|
33
|
+
description: string;
|
|
34
|
+
inputSchema: {
|
|
35
|
+
type: "object";
|
|
36
|
+
properties: {
|
|
37
|
+
feature: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
changedFiles: {
|
|
42
|
+
type: string;
|
|
43
|
+
items: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
audience: {
|
|
49
|
+
type: string;
|
|
50
|
+
enum: string[];
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
handler: typeof docContextBuild;
|
|
56
|
+
schema: z.ZodObject<{
|
|
57
|
+
feature: z.ZodOptional<z.ZodString>;
|
|
58
|
+
changedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
59
|
+
audience: z.ZodOptional<z.ZodEnum<["junior", "senior", "pm", "qa", "api"]>>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
feature?: string | undefined;
|
|
62
|
+
changedFiles?: string[] | undefined;
|
|
63
|
+
audience?: "api" | "junior" | "senior" | "pm" | "qa" | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
feature?: string | undefined;
|
|
66
|
+
changedFiles?: string[] | undefined;
|
|
67
|
+
audience?: "api" | "junior" | "senior" | "pm" | "qa" | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
};
|
|
70
|
+
doc_update_plan: {
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: "object";
|
|
75
|
+
properties: {
|
|
76
|
+
changedFiles: {
|
|
77
|
+
type: string;
|
|
78
|
+
items: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
description: string;
|
|
82
|
+
};
|
|
83
|
+
existingDocs: {
|
|
84
|
+
type: string;
|
|
85
|
+
items: {
|
|
86
|
+
type: string;
|
|
87
|
+
};
|
|
88
|
+
description: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
required: string[];
|
|
92
|
+
};
|
|
93
|
+
handler: typeof docUpdatePlan;
|
|
94
|
+
schema: z.ZodObject<{
|
|
95
|
+
changedFiles: z.ZodArray<z.ZodString, "many">;
|
|
96
|
+
existingDocs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
changedFiles: string[];
|
|
99
|
+
existingDocs?: string[] | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
changedFiles: string[];
|
|
102
|
+
existingDocs?: string[] | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export {};
|
|
107
|
+
//# sourceMappingURL=documentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentation.d.ts","sourceRoot":"","sources":["../../../src/capabilities/documentation/documentation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,UAAU,EACV,aAAa,EAGb,SAAS,EACV,MAAM,qBAAqB,CAAC;AAQ7B,QAAA,MAAM,qBAAqB;;;;;;;;;;;;EAIzB,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,wBAAsB,eAAe,CAAC,MAAM,EAAE,qBAAqB,EAAE,SAAS,GAAE,SAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,CAQ1H;AAMD,QAAA,MAAM,mBAAmB;;;;;;;;;EAGvB,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,EAAE,SAAS,GAAE,SAAqB,GAAG,OAAO,CAAC,aAAa,CAAC,CAyDzH;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B9B,CAAC"}
|