@compilr-dev/agents-coding-go 0.1.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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.d.ts +40 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +27 -0
  5. package/dist/parser/go-parser.d.ts +104 -0
  6. package/dist/parser/go-parser.d.ts.map +1 -0
  7. package/dist/parser/go-parser.js +492 -0
  8. package/dist/parser/index.d.ts +6 -0
  9. package/dist/parser/index.d.ts.map +1 -0
  10. package/dist/parser/index.js +5 -0
  11. package/dist/parser/node-types.d.ts +130 -0
  12. package/dist/parser/node-types.d.ts.map +1 -0
  13. package/dist/parser/node-types.js +4 -0
  14. package/dist/skills/go-best-practices.d.ts +7 -0
  15. package/dist/skills/go-best-practices.d.ts.map +1 -0
  16. package/dist/skills/go-best-practices.js +78 -0
  17. package/dist/skills/go-code-health.d.ts +7 -0
  18. package/dist/skills/go-code-health.d.ts.map +1 -0
  19. package/dist/skills/go-code-health.js +209 -0
  20. package/dist/skills/go-code-structure.d.ts +7 -0
  21. package/dist/skills/go-code-structure.d.ts.map +1 -0
  22. package/dist/skills/go-code-structure.js +155 -0
  23. package/dist/skills/go-dependency-audit.d.ts +7 -0
  24. package/dist/skills/go-dependency-audit.d.ts.map +1 -0
  25. package/dist/skills/go-dependency-audit.js +246 -0
  26. package/dist/skills/go-refactor-impact.d.ts +7 -0
  27. package/dist/skills/go-refactor-impact.d.ts.map +1 -0
  28. package/dist/skills/go-refactor-impact.js +232 -0
  29. package/dist/skills/index.d.ts +26 -0
  30. package/dist/skills/index.d.ts.map +1 -0
  31. package/dist/skills/index.js +36 -0
  32. package/dist/tools/extract-docstrings.d.ts +51 -0
  33. package/dist/tools/extract-docstrings.d.ts.map +1 -0
  34. package/dist/tools/extract-docstrings.js +292 -0
  35. package/dist/tools/find-dead-code.d.ts +62 -0
  36. package/dist/tools/find-dead-code.d.ts.map +1 -0
  37. package/dist/tools/find-dead-code.js +422 -0
  38. package/dist/tools/find-duplicates.d.ts +65 -0
  39. package/dist/tools/find-duplicates.d.ts.map +1 -0
  40. package/dist/tools/find-duplicates.js +289 -0
  41. package/dist/tools/find-implementations.d.ts +71 -0
  42. package/dist/tools/find-implementations.d.ts.map +1 -0
  43. package/dist/tools/find-implementations.js +342 -0
  44. package/dist/tools/find-patterns.d.ts +71 -0
  45. package/dist/tools/find-patterns.d.ts.map +1 -0
  46. package/dist/tools/find-patterns.js +477 -0
  47. package/dist/tools/find-references.d.ts +66 -0
  48. package/dist/tools/find-references.d.ts.map +1 -0
  49. package/dist/tools/find-references.js +306 -0
  50. package/dist/tools/find-symbol.d.ts +86 -0
  51. package/dist/tools/find-symbol.d.ts.map +1 -0
  52. package/dist/tools/find-symbol.js +380 -0
  53. package/dist/tools/get-call-graph.d.ts +89 -0
  54. package/dist/tools/get-call-graph.d.ts.map +1 -0
  55. package/dist/tools/get-call-graph.js +431 -0
  56. package/dist/tools/get-class-hierarchy.d.ts +34 -0
  57. package/dist/tools/get-class-hierarchy.d.ts.map +1 -0
  58. package/dist/tools/get-class-hierarchy.js +250 -0
  59. package/dist/tools/get-complexity.d.ts +53 -0
  60. package/dist/tools/get-complexity.d.ts.map +1 -0
  61. package/dist/tools/get-complexity.js +357 -0
  62. package/dist/tools/get-dependency-graph.d.ts +85 -0
  63. package/dist/tools/get-dependency-graph.d.ts.map +1 -0
  64. package/dist/tools/get-dependency-graph.js +389 -0
  65. package/dist/tools/get-exports.d.ts +78 -0
  66. package/dist/tools/get-exports.d.ts.map +1 -0
  67. package/dist/tools/get-exports.js +437 -0
  68. package/dist/tools/get-file-structure.d.ts +28 -0
  69. package/dist/tools/get-file-structure.d.ts.map +1 -0
  70. package/dist/tools/get-file-structure.js +172 -0
  71. package/dist/tools/get-imports.d.ts +30 -0
  72. package/dist/tools/get-imports.d.ts.map +1 -0
  73. package/dist/tools/get-imports.js +420 -0
  74. package/dist/tools/get-signature.d.ts +100 -0
  75. package/dist/tools/get-signature.d.ts.map +1 -0
  76. package/dist/tools/get-signature.js +800 -0
  77. package/dist/tools/index.d.ts +55 -0
  78. package/dist/tools/index.d.ts.map +1 -0
  79. package/dist/tools/index.js +75 -0
  80. package/dist/tools/types.d.ts +408 -0
  81. package/dist/tools/types.d.ts.map +1 -0
  82. package/dist/tools/types.js +4 -0
  83. package/package.json +86 -0
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Go Analysis Tools
3
+ *
4
+ * Tools for analyzing Go source code using Tree-sitter.
5
+ */
6
+ export { getFileStructureTool, createGetFileStructureTool, } from "./get-file-structure.js";
7
+ export { findSymbolTool, createFindSymbolTool } from "./find-symbol.js";
8
+ export { findReferencesTool, createFindReferencesTool, } from "./find-references.js";
9
+ export { getImportsTool, createGetImportsTool } from "./get-imports.js";
10
+ export { getClassHierarchyTool, createGetClassHierarchyTool, } from "./get-class-hierarchy.js";
11
+ export { getComplexityTool, createGetComplexityTool, } from "./get-complexity.js";
12
+ export { extractDocstringsTool, createExtractDocstringsTool, } from "./extract-docstrings.js";
13
+ export { findDeadCodeTool, createFindDeadCodeTool } from "./find-dead-code.js";
14
+ export { findDuplicatesTool, createFindDuplicatesTool, } from "./find-duplicates.js";
15
+ export { findImplementationsTool, createFindImplementationsTool, } from "./find-implementations.js";
16
+ export { findPatternsTool, createFindPatternsTool } from "./find-patterns.js";
17
+ export { getCallGraphTool, createGetCallGraphTool } from "./get-call-graph.js";
18
+ export { getDependencyGraphTool, createGetDependencyGraphTool, } from "./get-dependency-graph.js";
19
+ export { getSignatureTool, createGetSignatureTool } from "./get-signature.js";
20
+ export { getExportsTool, createGetExportsTool } from "./get-exports.js";
21
+ export * from "./types.js";
22
+ export type { GetFileStructureInput } from "./get-file-structure.js";
23
+ export type { FindSymbolInput, FindSymbolResult, GoSymbolDefinition, GoSymbolKind, GoSymbolKindFilter, } from "./find-symbol.js";
24
+ export type { FindReferencesInput, FindReferencesResult, FileReferences, ReferenceType, } from "./find-references.js";
25
+ export type { GetImportsInput } from "./get-imports.js";
26
+ export type { GetClassHierarchyInput } from "./get-class-hierarchy.js";
27
+ export type { GetComplexityInput, GetComplexityResult, } from "./get-complexity.js";
28
+ export type { ExtractDocstringsInput, ExtractDocstringsResult, } from "./extract-docstrings.js";
29
+ export type { FindDeadCodeInput, FindDeadCodeResult, DeadCodeItem, } from "./find-dead-code.js";
30
+ export type { FindDuplicatesInput, FindDuplicatesResult, DuplicateGroup, CodeLocation, } from "./find-duplicates.js";
31
+ export type { FindImplementationsInput, FindImplementationsResult, ImplementationInfo, } from "./find-implementations.js";
32
+ export type { FindPatternsInput, FindPatternsResult, CodePattern, PatternMatch, } from "./find-patterns.js";
33
+ export type { GetCallGraphInput, GetCallGraphResult, CallGraphDirection, CallType, FunctionNode, CallInfo, CallGraphNode, CallGraphStats, } from "./get-call-graph.js";
34
+ export type { GetDependencyGraphInput, GetDependencyGraphResult, ModuleNode, DependencyEdge, CircularDependency, DependencyGraphStats, } from "./get-dependency-graph.js";
35
+ export type { GetSignatureInput, GetSignatureResult, ParameterDetail, ReturnTypeDetail, MemberSignature, Documentation, } from "./get-signature.js";
36
+ export type { GetExportsInput, GetExportsResult, ExportedSymbol, ExportKind, ReExport, ExportStats, } from "./get-exports.js";
37
+ export declare const allGoTools: readonly [import("@compilr-dev/agents").Tool<import("./get-file-structure.js").GetFileStructureInput>, import("@compilr-dev/agents").Tool<import("./find-symbol.js").FindSymbolInput>, import("@compilr-dev/agents").Tool<import("./find-references.js").FindReferencesInput>, import("@compilr-dev/agents").Tool<import("./get-imports.js").GetImportsInput>, import("@compilr-dev/agents").Tool<import("./get-class-hierarchy.js").GetClassHierarchyInput>, import("@compilr-dev/agents").Tool<import("./get-complexity.js").GetComplexityInput>, import("@compilr-dev/agents").Tool<import("./extract-docstrings.js").ExtractDocstringsInput>, import("@compilr-dev/agents").Tool<import("./find-dead-code.js").FindDeadCodeInput>, import("@compilr-dev/agents").Tool<import("./find-duplicates.js").FindDuplicatesInput>, import("@compilr-dev/agents").Tool<import("./find-implementations.js").FindImplementationsInput>, import("@compilr-dev/agents").Tool<import("./find-patterns.js").FindPatternsInput>, import("@compilr-dev/agents").Tool<import("./get-call-graph.js").GetCallGraphInput>, import("@compilr-dev/agents").Tool<import("./get-dependency-graph.js").GetDependencyGraphInput>, import("@compilr-dev/agents").Tool<import("./get-signature.js").GetSignatureInput>, import("@compilr-dev/agents").Tool<import("./get-exports.js").GetExportsInput>];
38
+ export declare const goToolsMap: {
39
+ readonly getFileStructure: import("@compilr-dev/agents").Tool<import("./get-file-structure.js").GetFileStructureInput>;
40
+ readonly findSymbol: import("@compilr-dev/agents").Tool<import("./find-symbol.js").FindSymbolInput>;
41
+ readonly findReferences: import("@compilr-dev/agents").Tool<import("./find-references.js").FindReferencesInput>;
42
+ readonly getImports: import("@compilr-dev/agents").Tool<import("./get-imports.js").GetImportsInput>;
43
+ readonly getClassHierarchy: import("@compilr-dev/agents").Tool<import("./get-class-hierarchy.js").GetClassHierarchyInput>;
44
+ readonly getComplexity: import("@compilr-dev/agents").Tool<import("./get-complexity.js").GetComplexityInput>;
45
+ readonly extractDocstrings: import("@compilr-dev/agents").Tool<import("./extract-docstrings.js").ExtractDocstringsInput>;
46
+ readonly findDeadCode: import("@compilr-dev/agents").Tool<import("./find-dead-code.js").FindDeadCodeInput>;
47
+ readonly findDuplicates: import("@compilr-dev/agents").Tool<import("./find-duplicates.js").FindDuplicatesInput>;
48
+ readonly findImplementations: import("@compilr-dev/agents").Tool<import("./find-implementations.js").FindImplementationsInput>;
49
+ readonly findPatterns: import("@compilr-dev/agents").Tool<import("./find-patterns.js").FindPatternsInput>;
50
+ readonly getCallGraph: import("@compilr-dev/agents").Tool<import("./get-call-graph.js").GetCallGraphInput>;
51
+ readonly getDependencyGraph: import("@compilr-dev/agents").Tool<import("./get-dependency-graph.js").GetDependencyGraphInput>;
52
+ readonly getSignature: import("@compilr-dev/agents").Tool<import("./get-signature.js").GetSignatureInput>;
53
+ readonly getExports: import("@compilr-dev/agents").Tool<import("./get-exports.js").GetExportsInput>;
54
+ };
55
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxE,cAAc,YAAY,CAAC;AAG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AAc,EACd,UAAU,EACV,QAAQ,EACR,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAqB1B,eAAO,MAAM,UAAU,gzCAgBb,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;CAgBb,CAAC"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Go Analysis Tools
3
+ *
4
+ * Tools for analyzing Go source code using Tree-sitter.
5
+ */
6
+ // Tool exports
7
+ export { getFileStructureTool, createGetFileStructureTool, } from "./get-file-structure.js";
8
+ export { findSymbolTool, createFindSymbolTool } from "./find-symbol.js";
9
+ export { findReferencesTool, createFindReferencesTool, } from "./find-references.js";
10
+ export { getImportsTool, createGetImportsTool } from "./get-imports.js";
11
+ export { getClassHierarchyTool, createGetClassHierarchyTool, } from "./get-class-hierarchy.js";
12
+ export { getComplexityTool, createGetComplexityTool, } from "./get-complexity.js";
13
+ export { extractDocstringsTool, createExtractDocstringsTool, } from "./extract-docstrings.js";
14
+ export { findDeadCodeTool, createFindDeadCodeTool } from "./find-dead-code.js";
15
+ export { findDuplicatesTool, createFindDuplicatesTool, } from "./find-duplicates.js";
16
+ export { findImplementationsTool, createFindImplementationsTool, } from "./find-implementations.js";
17
+ export { findPatternsTool, createFindPatternsTool } from "./find-patterns.js";
18
+ export { getCallGraphTool, createGetCallGraphTool } from "./get-call-graph.js";
19
+ export { getDependencyGraphTool, createGetDependencyGraphTool, } from "./get-dependency-graph.js";
20
+ export { getSignatureTool, createGetSignatureTool } from "./get-signature.js";
21
+ export { getExportsTool, createGetExportsTool } from "./get-exports.js";
22
+ // Type exports
23
+ export * from "./types.js";
24
+ /**
25
+ * All Go analysis tools
26
+ */
27
+ import { getFileStructureTool } from "./get-file-structure.js";
28
+ import { findSymbolTool } from "./find-symbol.js";
29
+ import { findReferencesTool } from "./find-references.js";
30
+ import { getImportsTool } from "./get-imports.js";
31
+ import { getClassHierarchyTool } from "./get-class-hierarchy.js";
32
+ import { getComplexityTool } from "./get-complexity.js";
33
+ import { extractDocstringsTool } from "./extract-docstrings.js";
34
+ import { findDeadCodeTool } from "./find-dead-code.js";
35
+ import { findDuplicatesTool } from "./find-duplicates.js";
36
+ import { findImplementationsTool } from "./find-implementations.js";
37
+ import { findPatternsTool } from "./find-patterns.js";
38
+ import { getCallGraphTool } from "./get-call-graph.js";
39
+ import { getDependencyGraphTool } from "./get-dependency-graph.js";
40
+ import { getSignatureTool } from "./get-signature.js";
41
+ import { getExportsTool } from "./get-exports.js";
42
+ export const allGoTools = [
43
+ getFileStructureTool,
44
+ findSymbolTool,
45
+ findReferencesTool,
46
+ getImportsTool,
47
+ getClassHierarchyTool,
48
+ getComplexityTool,
49
+ extractDocstringsTool,
50
+ findDeadCodeTool,
51
+ findDuplicatesTool,
52
+ findImplementationsTool,
53
+ findPatternsTool,
54
+ getCallGraphTool,
55
+ getDependencyGraphTool,
56
+ getSignatureTool,
57
+ getExportsTool,
58
+ ];
59
+ export const goToolsMap = {
60
+ getFileStructure: getFileStructureTool,
61
+ findSymbol: findSymbolTool,
62
+ findReferences: findReferencesTool,
63
+ getImports: getImportsTool,
64
+ getClassHierarchy: getClassHierarchyTool,
65
+ getComplexity: getComplexityTool,
66
+ extractDocstrings: extractDocstringsTool,
67
+ findDeadCode: findDeadCodeTool,
68
+ findDuplicates: findDuplicatesTool,
69
+ findImplementations: findImplementationsTool,
70
+ findPatterns: findPatternsTool,
71
+ getCallGraph: getCallGraphTool,
72
+ getDependencyGraph: getDependencyGraphTool,
73
+ getSignature: getSignatureTool,
74
+ getExports: getExportsTool,
75
+ };
@@ -0,0 +1,408 @@
1
+ /**
2
+ * Shared types for Go analysis tools
3
+ */
4
+ import type { ClassInfo, FunctionInfo, VariableInfo, ImportInfo, ParameterInfo, DecoratorInfo } from "../parser/node-types.js";
5
+ export type { ClassInfo, FunctionInfo, VariableInfo, ImportInfo, ParameterInfo, DecoratorInfo, };
6
+ /**
7
+ * Common tool input with path
8
+ */
9
+ export interface BaseInput {
10
+ path: string;
11
+ }
12
+ /**
13
+ * File structure result
14
+ */
15
+ export interface FileStructureResult {
16
+ path: string;
17
+ package?: string;
18
+ classes: ClassInfo[];
19
+ functions: FunctionInfo[];
20
+ variables: VariableInfo[];
21
+ imports: ImportInfo[];
22
+ docstring?: string;
23
+ stats: {
24
+ totalClasses: number;
25
+ totalFunctions: number;
26
+ totalVariables: number;
27
+ totalImports: number;
28
+ totalLines: number;
29
+ };
30
+ }
31
+ /**
32
+ * Symbol location
33
+ */
34
+ export interface SymbolLocation {
35
+ path: string;
36
+ line: number;
37
+ column: number;
38
+ endLine: number;
39
+ type: "struct" | "interface" | "function" | "method" | "variable" | "const" | "import";
40
+ name: string;
41
+ parent?: string;
42
+ signature?: string;
43
+ isExported?: boolean;
44
+ }
45
+ /**
46
+ * Symbol reference
47
+ */
48
+ export interface SymbolReference {
49
+ path: string;
50
+ line: number;
51
+ column: number;
52
+ context: string;
53
+ type: "read" | "write" | "call" | "import" | "definition" | "selector" | "attribute";
54
+ }
55
+ /**
56
+ * Complexity metrics
57
+ */
58
+ export interface ComplexityMetrics {
59
+ cyclomatic: number;
60
+ cognitive: number;
61
+ linesOfCode: number;
62
+ parameters: number;
63
+ nestingDepth: number;
64
+ }
65
+ /**
66
+ * Function complexity result
67
+ */
68
+ export interface FunctionComplexity {
69
+ name: string;
70
+ path: string;
71
+ line: number;
72
+ metrics: ComplexityMetrics;
73
+ isComplex: boolean;
74
+ receiverType?: string;
75
+ }
76
+ /**
77
+ * File complexity result
78
+ */
79
+ export interface FileComplexityResult {
80
+ path: string;
81
+ functions: FunctionComplexity[];
82
+ averageComplexity: number;
83
+ maxComplexity: number;
84
+ stats: {
85
+ totalFunctions: number;
86
+ complexFunctions: number;
87
+ simpleAverage: number;
88
+ };
89
+ }
90
+ /**
91
+ * Import category
92
+ */
93
+ export type ImportCategory = "stdlib" | "third_party" | "local";
94
+ /**
95
+ * Extended import info with category
96
+ */
97
+ export interface CategorizedImport extends ImportInfo {
98
+ category: ImportCategory;
99
+ }
100
+ /**
101
+ * Imports result
102
+ */
103
+ export interface ImportsResult {
104
+ path: string;
105
+ imports: CategorizedImport[];
106
+ stats: {
107
+ total: number;
108
+ stdlib: number;
109
+ thirdParty: number;
110
+ local: number;
111
+ };
112
+ }
113
+ /**
114
+ * Export info (Go uses capitalization for exports)
115
+ */
116
+ export interface ExportInfo {
117
+ name: string;
118
+ type: "struct" | "interface" | "function" | "variable" | "const" | "type";
119
+ line: number;
120
+ isExported: boolean;
121
+ }
122
+ /**
123
+ * Exports result
124
+ */
125
+ export interface ExportsResult {
126
+ path: string;
127
+ package?: string;
128
+ exports: ExportInfo[];
129
+ stats: {
130
+ total: number;
131
+ exported: number;
132
+ unexported: number;
133
+ };
134
+ }
135
+ /**
136
+ * Call graph node
137
+ */
138
+ export interface CallNode {
139
+ id: string;
140
+ name: string;
141
+ path: string;
142
+ line: number;
143
+ type: "function" | "method" | "builtin" | "external";
144
+ receiverType?: string;
145
+ }
146
+ /**
147
+ * Call graph edge
148
+ */
149
+ export interface CallEdge {
150
+ caller: string;
151
+ callee: string;
152
+ line: number;
153
+ isConditional: boolean;
154
+ inLoop: boolean;
155
+ isDefer?: boolean;
156
+ isGoroutine?: boolean;
157
+ }
158
+ /**
159
+ * Call graph result
160
+ */
161
+ export interface CallGraphResult {
162
+ path: string;
163
+ nodes: CallNode[];
164
+ edges: CallEdge[];
165
+ stats: {
166
+ totalNodes: number;
167
+ totalEdges: number;
168
+ maxDepth: number;
169
+ };
170
+ }
171
+ /**
172
+ * Dependency graph node (package-level in Go)
173
+ */
174
+ export interface ModuleNode {
175
+ id: string;
176
+ path: string;
177
+ name: string;
178
+ isExternal: boolean;
179
+ package?: string;
180
+ }
181
+ /**
182
+ * Dependency graph edge
183
+ */
184
+ export interface DependencyEdge {
185
+ from: string;
186
+ to: string;
187
+ imports: string[];
188
+ }
189
+ /**
190
+ * Dependency graph result
191
+ */
192
+ export interface DependencyGraphResult {
193
+ path: string;
194
+ nodes: ModuleNode[];
195
+ edges: DependencyEdge[];
196
+ cycles: string[][];
197
+ }
198
+ /**
199
+ * Embedded type (Go's composition model)
200
+ */
201
+ export interface EmbeddedType {
202
+ name: string;
203
+ path?: string;
204
+ isExternal: boolean;
205
+ isPointer: boolean;
206
+ }
207
+ /**
208
+ * Type hierarchy result (embedding-based in Go)
209
+ */
210
+ export interface TypeHierarchyResult {
211
+ typeName: string;
212
+ path: string;
213
+ line: number;
214
+ isInterface: boolean;
215
+ isStruct: boolean;
216
+ embeds: EmbeddedType[];
217
+ embeddedBy: Array<{
218
+ name: string;
219
+ path: string;
220
+ line: number;
221
+ }>;
222
+ }
223
+ /**
224
+ * Implementation info (interface implementations in Go)
225
+ */
226
+ export interface ImplementationInfo {
227
+ typeName: string;
228
+ path: string;
229
+ line: number;
230
+ interfaceName: string;
231
+ implementedMethods: string[];
232
+ missingMethods: string[];
233
+ isComplete: boolean;
234
+ }
235
+ /**
236
+ * Dead code info
237
+ */
238
+ export interface DeadCodeInfo {
239
+ name: string;
240
+ type: "function" | "struct" | "interface" | "variable" | "const" | "import";
241
+ path: string;
242
+ line: number;
243
+ reason: string;
244
+ }
245
+ /**
246
+ * Dead code result
247
+ */
248
+ export interface DeadCodeResult {
249
+ path: string;
250
+ unused: DeadCodeInfo[];
251
+ stats: {
252
+ total: number;
253
+ functions: number;
254
+ types: number;
255
+ variables: number;
256
+ imports: number;
257
+ };
258
+ }
259
+ /**
260
+ * Code clone instance
261
+ */
262
+ export interface CloneInstance {
263
+ path: string;
264
+ startLine: number;
265
+ endLine: number;
266
+ content: string;
267
+ }
268
+ /**
269
+ * Code clone
270
+ */
271
+ export interface CodeClone {
272
+ id: string;
273
+ instances: CloneInstance[];
274
+ lines: number;
275
+ similarity: number;
276
+ }
277
+ /**
278
+ * Duplicates result
279
+ */
280
+ export interface DuplicatesResult {
281
+ path: string;
282
+ clones: CodeClone[];
283
+ stats: {
284
+ totalClones: number;
285
+ duplicatedLines: number;
286
+ percentDuplicated: number;
287
+ };
288
+ }
289
+ /**
290
+ * Go-specific pattern types
291
+ */
292
+ export type PatternType = "empty_error_check" | "ignored_error" | "panic_in_goroutine" | "defer_in_loop" | "nil_map_access" | "data_race" | "context_not_first" | "long_function" | "god_struct" | "unused_variable" | "shadowing" | "magic_number" | "dot_import" | "init_function";
293
+ /**
294
+ * Pattern match
295
+ */
296
+ export interface PatternMatch {
297
+ type: PatternType;
298
+ path: string;
299
+ line: number;
300
+ column: number;
301
+ message: string;
302
+ severity: "info" | "warning" | "error";
303
+ suggestion?: string;
304
+ }
305
+ /**
306
+ * Patterns result
307
+ */
308
+ export interface PatternsResult {
309
+ path: string;
310
+ patterns: PatternMatch[];
311
+ stats: {
312
+ total: number;
313
+ byType: Partial<Record<PatternType, number>>;
314
+ bySeverity: {
315
+ info: number;
316
+ warning: number;
317
+ error: number;
318
+ };
319
+ };
320
+ }
321
+ /**
322
+ * Go doc comment parameter (extracted from comments)
323
+ */
324
+ export interface DocParam {
325
+ name: string;
326
+ type?: string;
327
+ description: string;
328
+ optional: boolean;
329
+ default?: string;
330
+ }
331
+ /**
332
+ * Parsed doc return
333
+ */
334
+ export interface DocReturn {
335
+ type?: string;
336
+ description: string;
337
+ }
338
+ /**
339
+ * Go doesn't have exceptions, but has error returns
340
+ */
341
+ export interface DocError {
342
+ type: string;
343
+ description: string;
344
+ }
345
+ /**
346
+ * Doc comment format (Go uses a simple convention)
347
+ */
348
+ export type DocFormat = "godoc" | "unknown";
349
+ /**
350
+ * Parsed doc comment
351
+ */
352
+ export interface ParsedDoc {
353
+ summary: string;
354
+ description?: string;
355
+ parameters: DocParam[];
356
+ returns?: DocReturn;
357
+ errors: DocError[];
358
+ examples: string[];
359
+ deprecated?: string;
360
+ format: DocFormat;
361
+ }
362
+ /**
363
+ * Documentation result
364
+ */
365
+ export interface DocumentationResult {
366
+ name: string;
367
+ path: string;
368
+ line: number;
369
+ doc?: string;
370
+ parsed?: ParsedDoc;
371
+ }
372
+ /**
373
+ * Signature result
374
+ */
375
+ export interface SignatureResult {
376
+ name: string;
377
+ path: string;
378
+ line: number;
379
+ signature: string;
380
+ parameters: ParameterInfo[];
381
+ returnType?: string;
382
+ receiverType?: string;
383
+ isPointerReceiver?: boolean;
384
+ isExported: boolean;
385
+ isMethod: boolean;
386
+ }
387
+ /**
388
+ * Alias for ParsedDoc (Python tools call this ParsedDocstring)
389
+ */
390
+ export type ParsedDocstring = ParsedDoc;
391
+ /**
392
+ * Alias for DocFormat (Python tools call this DocstringFormat)
393
+ */
394
+ export type DocstringFormat = DocFormat;
395
+ /**
396
+ * Alias for DocError (Python tools call this DocRaise)
397
+ */
398
+ export type DocRaise = DocError;
399
+ /**
400
+ * Parent class info (Go uses embedding, not inheritance)
401
+ * Used for compatibility with class hierarchy tools
402
+ */
403
+ export interface ParentClass {
404
+ name: string;
405
+ path?: string;
406
+ isExternal: boolean;
407
+ }
408
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,aAAa,EACb,aAAa,EACd,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EACV,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,aAAa,EACb,aAAa,GACd,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE;QACL,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AI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAMD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;CACrB"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Shared types for Go analysis tools
3
+ */
4
+ export {};
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@compilr-dev/agents-coding-go",
3
+ "version": "0.1.0",
4
+ "description": "Go analysis tools for AI agents - AST-based code analysis using Tree-sitter",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./parser": {
14
+ "types": "./dist/parser/index.d.ts",
15
+ "import": "./dist/parser/index.js"
16
+ },
17
+ "./tools": {
18
+ "types": "./dist/tools/index.d.ts",
19
+ "import": "./dist/tools/index.js"
20
+ },
21
+ "./skills": {
22
+ "types": "./dist/skills/index.d.ts",
23
+ "import": "./dist/skills/index.js"
24
+ }
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "scripts": {
30
+ "build": "tsc",
31
+ "clean": "rm -rf dist",
32
+ "lint": "eslint src/",
33
+ "lint:fix": "eslint src/ --fix",
34
+ "format": "prettier --write \"src/**/*.ts\"",
35
+ "format:check": "prettier --check \"src/**/*.ts\"",
36
+ "test": "vitest run",
37
+ "test:watch": "vitest",
38
+ "test:coverage": "vitest run --coverage",
39
+ "prepublishOnly": "npm run clean && npm run lint && npm run test && npm run build",
40
+ "typecheck": "tsc --noEmit"
41
+ },
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/compilr-dev/agents-go.git"
45
+ },
46
+ "keywords": [
47
+ "ai",
48
+ "agents",
49
+ "llm",
50
+ "coding",
51
+ "go",
52
+ "golang",
53
+ "ast",
54
+ "analysis",
55
+ "tree-sitter",
56
+ "tools"
57
+ ],
58
+ "author": "Carmelo Scozzola",
59
+ "license": "MIT",
60
+ "bugs": {
61
+ "url": "https://github.com/compilr-dev/agents-go/issues"
62
+ },
63
+ "homepage": "https://github.com/compilr-dev/agents-go#readme",
64
+ "engines": {
65
+ "node": ">=18.0.0"
66
+ },
67
+ "peerDependencies": {
68
+ "@compilr-dev/agents": "^0.3.0"
69
+ },
70
+ "dependencies": {
71
+ "tree-sitter": "^0.25.0",
72
+ "tree-sitter-go": "^0.25.0"
73
+ },
74
+ "devDependencies": {
75
+ "@anthropic-ai/sdk": "^0.30.1",
76
+ "@compilr-dev/agents": "^0.3.0",
77
+ "@eslint/js": "^9.39.1",
78
+ "@types/node": "^24.10.1",
79
+ "@vitest/coverage-v8": "^3.2.4",
80
+ "eslint": "^9.39.1",
81
+ "prettier": "^3.7.1",
82
+ "typescript-eslint": "^8.48.0",
83
+ "typescript": "^5.8.3",
84
+ "vitest": "^3.2.4"
85
+ }
86
+ }