@poltergeist-ai/cli 0.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/LICENSE +21 -0
- package/dist/cli.js +1213 -0
- package/dist/index.d.ts +130 -0
- package/dist/index.js +978 -0
- package/package.json +33 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
interface GitSignals {
|
|
2
|
+
commitMessages: string[];
|
|
3
|
+
commitBodies: string[];
|
|
4
|
+
filesCreated: string[];
|
|
5
|
+
filesModified: Record<string, number>;
|
|
6
|
+
extensions: Record<string, number>;
|
|
7
|
+
namingPatterns: string[];
|
|
8
|
+
commitCount: number;
|
|
9
|
+
rawDiffOutput?: string;
|
|
10
|
+
}
|
|
11
|
+
interface GitObservations {
|
|
12
|
+
commitMessageAvgLength?: number;
|
|
13
|
+
commitMessageSample?: string[];
|
|
14
|
+
likelyUsesImperativeMood?: boolean;
|
|
15
|
+
primaryExtensions?: [string, number][];
|
|
16
|
+
primaryDirectories?: [string, number][];
|
|
17
|
+
namingStyle?: {
|
|
18
|
+
camelCase: number;
|
|
19
|
+
PascalCase: number;
|
|
20
|
+
snake_case: number;
|
|
21
|
+
};
|
|
22
|
+
conventionalCommitPrefixes?: Record<string, number>;
|
|
23
|
+
commitScopePatterns?: string[];
|
|
24
|
+
inferredDomains?: string[];
|
|
25
|
+
fileTypeProfile?: {
|
|
26
|
+
tests: number;
|
|
27
|
+
configs: number;
|
|
28
|
+
components: number;
|
|
29
|
+
docs: number;
|
|
30
|
+
other: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
interface ReviewSignals {
|
|
34
|
+
reviewComments: string[];
|
|
35
|
+
commentLengths: number[];
|
|
36
|
+
severityPrefixes: Record<string, number>;
|
|
37
|
+
questionComments: number;
|
|
38
|
+
totalComments: number;
|
|
39
|
+
source: "github" | "gitlab";
|
|
40
|
+
}
|
|
41
|
+
interface ReviewObservations {
|
|
42
|
+
totalReviewComments?: number;
|
|
43
|
+
avgCommentLength?: number;
|
|
44
|
+
tendsToBeBrief?: boolean;
|
|
45
|
+
questionRatio?: number;
|
|
46
|
+
usesSeverityPrefixes?: Record<string, number>;
|
|
47
|
+
sampleComments?: string[];
|
|
48
|
+
source?: "github" | "gitlab";
|
|
49
|
+
}
|
|
50
|
+
/** @deprecated Use ReviewSignals instead */
|
|
51
|
+
type GitLabSignals = ReviewSignals;
|
|
52
|
+
/** @deprecated Use ReviewObservations instead */
|
|
53
|
+
type GitLabObservations = ReviewObservations;
|
|
54
|
+
interface CodeStyleSignals {
|
|
55
|
+
counters: Record<string, Record<string, number>>;
|
|
56
|
+
detectedLanguages: string[];
|
|
57
|
+
totalLinesAnalyzed: number;
|
|
58
|
+
}
|
|
59
|
+
interface CodeStyleObservation {
|
|
60
|
+
category: string;
|
|
61
|
+
observation: string;
|
|
62
|
+
confidence: "strong" | "moderate";
|
|
63
|
+
}
|
|
64
|
+
interface CodeStyleObservations {
|
|
65
|
+
observations: CodeStyleObservation[];
|
|
66
|
+
primaryLanguage?: string;
|
|
67
|
+
totalLinesAnalyzed: number;
|
|
68
|
+
}
|
|
69
|
+
interface SlackSignals {
|
|
70
|
+
messages: string[];
|
|
71
|
+
technicalMessages: string[];
|
|
72
|
+
}
|
|
73
|
+
interface SlackObservations {
|
|
74
|
+
technicalMessageCount?: number;
|
|
75
|
+
sampleTechnicalMessages?: string[];
|
|
76
|
+
}
|
|
77
|
+
interface DocsSignals {
|
|
78
|
+
authoredDocs: string[];
|
|
79
|
+
docExcerpts: string[];
|
|
80
|
+
}
|
|
81
|
+
interface CliOptions {
|
|
82
|
+
contributor: string;
|
|
83
|
+
email?: string;
|
|
84
|
+
slug?: string;
|
|
85
|
+
gitRepo?: string;
|
|
86
|
+
gitlabExport?: string;
|
|
87
|
+
slackExport?: string;
|
|
88
|
+
docsDir?: string;
|
|
89
|
+
output?: string;
|
|
90
|
+
githubToken?: string;
|
|
91
|
+
verbose: boolean;
|
|
92
|
+
}
|
|
93
|
+
interface GeneratorInput {
|
|
94
|
+
contributor: string;
|
|
95
|
+
slug: string;
|
|
96
|
+
gitObs: GitObservations;
|
|
97
|
+
codeStyleObs: CodeStyleObservations;
|
|
98
|
+
reviewObs: ReviewObservations;
|
|
99
|
+
slackObs: SlackObservations;
|
|
100
|
+
docsSignals: DocsSignals;
|
|
101
|
+
sourcesUsed: string[];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
declare function extractGitSignals(repoPath: string, contributor: string, email: string | undefined, verbose: boolean): GitSignals;
|
|
105
|
+
declare function summariseGit(signals: GitSignals): GitObservations;
|
|
106
|
+
|
|
107
|
+
declare function extractCodeStyleFromDiff(diffOutput: string): CodeStyleSignals;
|
|
108
|
+
declare function summariseCodeStyle(signals: CodeStyleSignals): CodeStyleObservations;
|
|
109
|
+
|
|
110
|
+
declare function extractGitLabSignals(exportPath: string, contributor: string, verbose: boolean): ReviewSignals;
|
|
111
|
+
declare function summariseGitLab(signals: ReviewSignals): ReviewObservations;
|
|
112
|
+
|
|
113
|
+
declare function summariseReview(signals: ReviewSignals): ReviewObservations;
|
|
114
|
+
|
|
115
|
+
declare function parseGitHubUrl(url: string): {
|
|
116
|
+
owner: string;
|
|
117
|
+
repo: string;
|
|
118
|
+
} | null;
|
|
119
|
+
declare function extractGitHubSignals(owner: string, repo: string, contributor: string, token: string | undefined, verbose: boolean): Promise<ReviewSignals>;
|
|
120
|
+
|
|
121
|
+
declare function extractSlackSignals(exportDir: string, contributor: string, verbose: boolean): SlackSignals;
|
|
122
|
+
declare function summariseSlack(signals: SlackSignals): SlackObservations;
|
|
123
|
+
|
|
124
|
+
declare function extractDocsSignals(docsDir: string, contributor: string, verbose: boolean): DocsSignals;
|
|
125
|
+
|
|
126
|
+
declare function buildGhostMarkdown(input: GeneratorInput): string;
|
|
127
|
+
|
|
128
|
+
declare function slugify(name: string): string;
|
|
129
|
+
|
|
130
|
+
export { type CliOptions, type CodeStyleObservation, type CodeStyleObservations, type CodeStyleSignals, type DocsSignals, type GeneratorInput, type GitLabObservations, type GitLabSignals, type GitObservations, type GitSignals, type ReviewObservations, type ReviewSignals, type SlackObservations, type SlackSignals, buildGhostMarkdown, extractCodeStyleFromDiff, extractDocsSignals, extractGitHubSignals, extractGitLabSignals, extractGitSignals, extractSlackSignals, parseGitHubUrl, slugify, summariseCodeStyle, summariseGit, summariseReview as summariseGitHub, summariseGitLab, summariseReview, summariseSlack };
|