@pranavraut033/ats-checker 1.1.1 → 1.3.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/dist/index.d.mts CHANGED
@@ -1,262 +1,7 @@
1
- type ResumeSection = "summary" | "experience" | "skills" | "education" | "projects" | "certifications";
2
- interface ParsedDateRange {
3
- raw?: string;
4
- start?: string;
5
- end?: string;
6
- durationInMonths?: number;
7
- /** Numeric year/month of the start and end, for overlap-aware summing. */
8
- startYear?: number;
9
- startMonth?: number;
10
- endYear?: number;
11
- endMonth?: number;
12
- }
13
- interface ParsedExperienceEntry {
14
- title?: string;
15
- company?: string;
16
- location?: string;
17
- dates?: ParsedDateRange;
18
- description?: string;
19
- }
20
- interface ParsedResume {
21
- raw: string;
22
- normalizedText: string;
23
- detectedSections: ResumeSection[];
24
- sectionContent: Partial<Record<ResumeSection, string>>;
25
- skills: string[];
26
- jobTitles: string[];
27
- actionVerbs: string[];
28
- educationEntries: string[];
29
- experience: ParsedExperienceEntry[];
30
- totalExperienceYears: number;
31
- keywords: string[];
32
- warnings: string[];
33
- }
34
- interface ParsedJobDescription {
35
- raw: string;
36
- normalizedText: string;
37
- requiredSkills: string[];
38
- preferredSkills: string[];
39
- roleKeywords: string[];
40
- keywords: string[];
41
- minExperienceYears?: number;
42
- educationRequirements: string[];
43
- }
44
-
45
- interface ATSWeights {
46
- skills: number;
47
- experience: number;
48
- keywords: number;
49
- education: number;
50
- }
51
- type SkillAliases = Record<string, string[]>;
52
- interface ATSProfile {
53
- name: string;
54
- mandatorySkills: string[];
55
- optionalSkills: string[];
56
- minExperience?: number;
57
- }
58
- interface KeywordDensityConfig {
59
- /** Minimum density before a keyword is considered underused (informational only). */
60
- min: number;
61
- /** Maximum density before a keyword is considered stuffed. */
62
- max: number;
63
- /** Penalty applied when density exceeds max. */
64
- overusePenalty: number;
65
- }
66
- interface SectionPenaltyConfig {
67
- missingSummary?: number;
68
- missingExperience?: number;
69
- missingSkills?: number;
70
- missingEducation?: number;
71
- }
72
- interface ATSRule {
73
- id: string;
74
- description?: string;
75
- penalty: number;
76
- warning?: string;
77
- condition: (context: RuleContext) => boolean;
78
- }
79
- interface ATSConfig {
80
- weights?: Partial<ATSWeights>;
81
- skillAliases?: SkillAliases;
82
- profile?: ATSProfile;
83
- rules?: ATSRule[];
84
- keywordDensity?: KeywordDensityConfig;
85
- sectionPenalties?: SectionPenaltyConfig;
86
- allowPartialMatches?: boolean;
87
- /**
88
- * ISO date string (e.g. "2024-06-01") used as the "today" reference when
89
- * computing duration for open-ended date ranges ("Present"/"Current"/"Now").
90
- * Omit to use the actual current date (live/production behaviour).
91
- * Set to a fixed value in tests or batch processing to guarantee determinism.
92
- */
93
- referenceDate?: string;
94
- }
95
- interface NormalizedWeights extends ATSWeights {
96
- /** Weights normalized so they sum to 1. */
97
- normalizedTotal: number;
98
- }
99
- interface ResolvedATSConfig {
100
- weights: NormalizedWeights;
101
- skillAliases: SkillAliases;
102
- profile?: ATSProfile;
103
- rules: ATSRule[];
104
- keywordDensity: KeywordDensityConfig;
105
- sectionPenalties: Required<SectionPenaltyConfig>;
106
- allowPartialMatches: boolean;
107
- /** Resolved reference date for "Present" duration calculations. */
108
- referenceDate?: Date;
109
- }
110
- interface RuleContext {
111
- resume: ParsedResume;
112
- job: ParsedJobDescription;
113
- weights: NormalizedWeights;
114
- keywordDensity: KeywordDensityConfig;
115
- breakdown?: ATSBreakdown;
116
- matchedKeywords?: string[];
117
- overusedKeywords?: string[];
118
- }
119
-
120
- /**
121
- * LLM v2 Support Types - Optional, Backward Compatible
122
- */
123
-
124
- /**
125
- * JSON Schema for response validation
126
- */
127
- interface JSONSchema {
128
- type: string;
129
- properties?: Record<string, unknown>;
130
- required?: string[];
131
- items?: unknown;
132
- [key: string]: unknown;
133
- }
134
- /**
135
- * LLM Client abstraction - user provides their own implementation
136
- * This allows flexibility with different LLM providers without direct dependencies
137
- */
138
- interface LLMClient {
139
- /**
140
- * Create a structured completion from the LLM
141
- * Must validate and return only valid JSON matching the schema
142
- */
143
- createCompletion(input: {
144
- model: string;
145
- messages: {
146
- role: "system" | "user";
147
- content: string;
148
- }[];
149
- max_tokens: number;
150
- response_format: JSONSchema;
151
- }): Promise<{
152
- content: unknown;
153
- usage?: {
154
- prompt_tokens?: number;
155
- completion_tokens?: number;
156
- total_tokens?: number;
157
- };
158
- }>;
159
- }
160
- /**
161
- * LLM budget configuration - prevents runaway spending
162
- */
163
- interface LLMBudget {
164
- maxCalls: number;
165
- maxTokensPerCall: number;
166
- maxTotalTokens: number;
167
- }
168
- /**
169
- * Feature toggles for LLM capabilities
170
- */
171
- interface LLMFeatures {
172
- skillNormalization?: boolean;
173
- sectionClassification?: boolean;
174
- suggestions?: boolean;
175
- }
176
- /**
177
- * Complete LLM configuration
178
- */
179
- interface LLMConfig {
180
- /** User-provided LLM client (e.g., OpenAI wrapper) */
181
- client: LLMClient;
182
- /** Model identifiers */
183
- models?: {
184
- /** Default model for fast, structured output (e.g., "gpt-4o-mini") */
185
- default: string;
186
- /** Optional thinking model for complex reasoning (e.g., "o4-mini") */
187
- thinking?: string;
188
- };
189
- /** Budget constraints */
190
- limits: LLMBudget;
191
- /** Which LLM features to enable */
192
- enable?: LLMFeatures;
193
- /** Request timeout in milliseconds */
194
- timeoutMs?: number;
195
- }
196
- /**
197
- * Updated AnalyzeResumeInput with optional LLM support
198
- */
199
- interface AnalyzeResumeInputV2 {
200
- resumeText: string;
201
- jobDescription: string;
202
- config?: ATSConfig;
203
- llm?: LLMConfig;
204
- }
205
- /**
206
- * LLM usage tracking for debugging
207
- */
208
- interface LLMUsageStats {
209
- totalCalls: number;
210
- totalTokensUsed: number;
211
- callsRemaining: number;
212
- tokensRemaining: number;
213
- features: Partial<Record<keyof LLMFeatures, boolean>>;
214
- }
215
- /**
216
- * Result of an LLM operation (with fallback info)
217
- */
218
- interface LLMResult<T> {
219
- success: boolean;
220
- data?: T;
221
- fallback: boolean;
222
- error?: string;
223
- tokensUsed?: number;
224
- }
225
-
226
- interface ATSBreakdown {
227
- skills: number;
228
- experience: number;
229
- keywords: number;
230
- education: number;
231
- }
232
- interface AnalyzeResumeInput {
233
- resumeText: string;
234
- jobDescription: string;
235
- config?: ATSConfig;
236
- llm?: LLMConfig;
237
- }
238
- interface ATSAnalysisResult {
239
- score: number;
240
- breakdown: ATSBreakdown;
241
- /** Skills found in the resume that satisfy JD + profile requirements. */
242
- matchedSkills: string[];
243
- /** Required skills absent from the resume. */
244
- missingSkills: string[];
245
- matchedKeywords: string[];
246
- missingKeywords: string[];
247
- overusedKeywords: string[];
248
- suggestions: string[];
249
- warnings: string[];
250
- /** Years below the JD's minimum experience requirement; 0 when the requirement is met. */
251
- experienceGap: number;
252
- /** Resume sections the parser successfully detected (e.g. "summary", "skills"). */
253
- detectedSections: string[];
254
- /** Total years of experience parsed from the resume's date ranges. */
255
- parsedExperienceYears: number;
256
- /** Parsed experience entries from the resume, with titles and date ranges. */
257
- experienceEntries: ParsedExperienceEntry[];
258
- }
1
+ import { A as ATSProfile, S as SkillAliases, K as KeywordRegistry, L as LLMConfig, J as JSONSchema, a as LLMResult, b as LLMBudget, c as AnalyzeResumeInput, d as ATSAnalysisResult } from './scoring-BCShrnki.mjs';
2
+ export { s as ATSBreakdown, k as ATSConfig, j as ATSRule, e as ATSWeights, w as AnalyzeResumeInputV2, f as KeywordCategory, h as KeywordDensityConfig, g as KeywordEntry, t as KeywordWeight, u as LLMClient, v as LLMFeatures, x as LLMUsageStats, N as NormalizedWeights, o as ParsedAchievement, P as ParsedDateRange, n as ParsedExperienceEntry, r as ParsedJobDescription, p as ParsedLanguage, q as ParsedResume, R as ResolvedATSConfig, m as ResumeSection, l as RuleContext, i as SectionPenaltyConfig } from './scoring-BCShrnki.mjs';
259
3
 
4
+ declare const defaultKeywordRegistry: KeywordRegistry;
260
5
  declare const defaultSkillAliases: SkillAliases;
261
6
  declare const defaultProfiles: ATSProfile[];
262
7
 
@@ -506,4 +251,4 @@ declare function analyzeResume(input: AnalyzeResumeInput): ATSAnalysisResult;
506
251
  */
507
252
  declare function analyzeResumeAsync(input: AnalyzeResumeInput): Promise<ATSAnalysisResult>;
508
253
 
509
- export { type ATSAnalysisResult, type ATSBreakdown, type ATSConfig, type ATSProfile, type ATSRule, type ATSWeights, type AnalyzeResumeInput, type AnalyzeResumeInputV2, type JSONSchema, type KeywordDensityConfig, type LLMBudget, LLMBudgetManager, type LLMClient, type LLMConfig, type LLMFeatures, LLMManager, LLMPrompts, type LLMResult, LLMSchemas, type LLMUsageStats, type NormalizedWeights, type ParsedDateRange, type ParsedExperienceEntry, type ParsedJobDescription, type ParsedResume, type ResolvedATSConfig, type ResumeSection, type RuleContext, type SectionPenaltyConfig, type SkillAliases, adaptJdClarificationResponse, adaptSectionClassificationResponse, adaptSkillNormalizationResponse, adaptSuggestionEnhancementResponse, analyzeResume, analyzeResumeAsync, createPrompt, defaultProfiles, defaultSkillAliases, safeExtractArray, safeExtractNumber, safeExtractString };
254
+ export { ATSAnalysisResult, ATSProfile, AnalyzeResumeInput, JSONSchema, KeywordRegistry, LLMBudget, LLMBudgetManager, LLMConfig, LLMManager, LLMPrompts, LLMResult, LLMSchemas, SkillAliases, adaptJdClarificationResponse, adaptSectionClassificationResponse, adaptSkillNormalizationResponse, adaptSuggestionEnhancementResponse, analyzeResume, analyzeResumeAsync, createPrompt, defaultKeywordRegistry, defaultProfiles, defaultSkillAliases, safeExtractArray, safeExtractNumber, safeExtractString };
package/dist/index.d.ts CHANGED
@@ -1,262 +1,7 @@
1
- type ResumeSection = "summary" | "experience" | "skills" | "education" | "projects" | "certifications";
2
- interface ParsedDateRange {
3
- raw?: string;
4
- start?: string;
5
- end?: string;
6
- durationInMonths?: number;
7
- /** Numeric year/month of the start and end, for overlap-aware summing. */
8
- startYear?: number;
9
- startMonth?: number;
10
- endYear?: number;
11
- endMonth?: number;
12
- }
13
- interface ParsedExperienceEntry {
14
- title?: string;
15
- company?: string;
16
- location?: string;
17
- dates?: ParsedDateRange;
18
- description?: string;
19
- }
20
- interface ParsedResume {
21
- raw: string;
22
- normalizedText: string;
23
- detectedSections: ResumeSection[];
24
- sectionContent: Partial<Record<ResumeSection, string>>;
25
- skills: string[];
26
- jobTitles: string[];
27
- actionVerbs: string[];
28
- educationEntries: string[];
29
- experience: ParsedExperienceEntry[];
30
- totalExperienceYears: number;
31
- keywords: string[];
32
- warnings: string[];
33
- }
34
- interface ParsedJobDescription {
35
- raw: string;
36
- normalizedText: string;
37
- requiredSkills: string[];
38
- preferredSkills: string[];
39
- roleKeywords: string[];
40
- keywords: string[];
41
- minExperienceYears?: number;
42
- educationRequirements: string[];
43
- }
44
-
45
- interface ATSWeights {
46
- skills: number;
47
- experience: number;
48
- keywords: number;
49
- education: number;
50
- }
51
- type SkillAliases = Record<string, string[]>;
52
- interface ATSProfile {
53
- name: string;
54
- mandatorySkills: string[];
55
- optionalSkills: string[];
56
- minExperience?: number;
57
- }
58
- interface KeywordDensityConfig {
59
- /** Minimum density before a keyword is considered underused (informational only). */
60
- min: number;
61
- /** Maximum density before a keyword is considered stuffed. */
62
- max: number;
63
- /** Penalty applied when density exceeds max. */
64
- overusePenalty: number;
65
- }
66
- interface SectionPenaltyConfig {
67
- missingSummary?: number;
68
- missingExperience?: number;
69
- missingSkills?: number;
70
- missingEducation?: number;
71
- }
72
- interface ATSRule {
73
- id: string;
74
- description?: string;
75
- penalty: number;
76
- warning?: string;
77
- condition: (context: RuleContext) => boolean;
78
- }
79
- interface ATSConfig {
80
- weights?: Partial<ATSWeights>;
81
- skillAliases?: SkillAliases;
82
- profile?: ATSProfile;
83
- rules?: ATSRule[];
84
- keywordDensity?: KeywordDensityConfig;
85
- sectionPenalties?: SectionPenaltyConfig;
86
- allowPartialMatches?: boolean;
87
- /**
88
- * ISO date string (e.g. "2024-06-01") used as the "today" reference when
89
- * computing duration for open-ended date ranges ("Present"/"Current"/"Now").
90
- * Omit to use the actual current date (live/production behaviour).
91
- * Set to a fixed value in tests or batch processing to guarantee determinism.
92
- */
93
- referenceDate?: string;
94
- }
95
- interface NormalizedWeights extends ATSWeights {
96
- /** Weights normalized so they sum to 1. */
97
- normalizedTotal: number;
98
- }
99
- interface ResolvedATSConfig {
100
- weights: NormalizedWeights;
101
- skillAliases: SkillAliases;
102
- profile?: ATSProfile;
103
- rules: ATSRule[];
104
- keywordDensity: KeywordDensityConfig;
105
- sectionPenalties: Required<SectionPenaltyConfig>;
106
- allowPartialMatches: boolean;
107
- /** Resolved reference date for "Present" duration calculations. */
108
- referenceDate?: Date;
109
- }
110
- interface RuleContext {
111
- resume: ParsedResume;
112
- job: ParsedJobDescription;
113
- weights: NormalizedWeights;
114
- keywordDensity: KeywordDensityConfig;
115
- breakdown?: ATSBreakdown;
116
- matchedKeywords?: string[];
117
- overusedKeywords?: string[];
118
- }
119
-
120
- /**
121
- * LLM v2 Support Types - Optional, Backward Compatible
122
- */
123
-
124
- /**
125
- * JSON Schema for response validation
126
- */
127
- interface JSONSchema {
128
- type: string;
129
- properties?: Record<string, unknown>;
130
- required?: string[];
131
- items?: unknown;
132
- [key: string]: unknown;
133
- }
134
- /**
135
- * LLM Client abstraction - user provides their own implementation
136
- * This allows flexibility with different LLM providers without direct dependencies
137
- */
138
- interface LLMClient {
139
- /**
140
- * Create a structured completion from the LLM
141
- * Must validate and return only valid JSON matching the schema
142
- */
143
- createCompletion(input: {
144
- model: string;
145
- messages: {
146
- role: "system" | "user";
147
- content: string;
148
- }[];
149
- max_tokens: number;
150
- response_format: JSONSchema;
151
- }): Promise<{
152
- content: unknown;
153
- usage?: {
154
- prompt_tokens?: number;
155
- completion_tokens?: number;
156
- total_tokens?: number;
157
- };
158
- }>;
159
- }
160
- /**
161
- * LLM budget configuration - prevents runaway spending
162
- */
163
- interface LLMBudget {
164
- maxCalls: number;
165
- maxTokensPerCall: number;
166
- maxTotalTokens: number;
167
- }
168
- /**
169
- * Feature toggles for LLM capabilities
170
- */
171
- interface LLMFeatures {
172
- skillNormalization?: boolean;
173
- sectionClassification?: boolean;
174
- suggestions?: boolean;
175
- }
176
- /**
177
- * Complete LLM configuration
178
- */
179
- interface LLMConfig {
180
- /** User-provided LLM client (e.g., OpenAI wrapper) */
181
- client: LLMClient;
182
- /** Model identifiers */
183
- models?: {
184
- /** Default model for fast, structured output (e.g., "gpt-4o-mini") */
185
- default: string;
186
- /** Optional thinking model for complex reasoning (e.g., "o4-mini") */
187
- thinking?: string;
188
- };
189
- /** Budget constraints */
190
- limits: LLMBudget;
191
- /** Which LLM features to enable */
192
- enable?: LLMFeatures;
193
- /** Request timeout in milliseconds */
194
- timeoutMs?: number;
195
- }
196
- /**
197
- * Updated AnalyzeResumeInput with optional LLM support
198
- */
199
- interface AnalyzeResumeInputV2 {
200
- resumeText: string;
201
- jobDescription: string;
202
- config?: ATSConfig;
203
- llm?: LLMConfig;
204
- }
205
- /**
206
- * LLM usage tracking for debugging
207
- */
208
- interface LLMUsageStats {
209
- totalCalls: number;
210
- totalTokensUsed: number;
211
- callsRemaining: number;
212
- tokensRemaining: number;
213
- features: Partial<Record<keyof LLMFeatures, boolean>>;
214
- }
215
- /**
216
- * Result of an LLM operation (with fallback info)
217
- */
218
- interface LLMResult<T> {
219
- success: boolean;
220
- data?: T;
221
- fallback: boolean;
222
- error?: string;
223
- tokensUsed?: number;
224
- }
225
-
226
- interface ATSBreakdown {
227
- skills: number;
228
- experience: number;
229
- keywords: number;
230
- education: number;
231
- }
232
- interface AnalyzeResumeInput {
233
- resumeText: string;
234
- jobDescription: string;
235
- config?: ATSConfig;
236
- llm?: LLMConfig;
237
- }
238
- interface ATSAnalysisResult {
239
- score: number;
240
- breakdown: ATSBreakdown;
241
- /** Skills found in the resume that satisfy JD + profile requirements. */
242
- matchedSkills: string[];
243
- /** Required skills absent from the resume. */
244
- missingSkills: string[];
245
- matchedKeywords: string[];
246
- missingKeywords: string[];
247
- overusedKeywords: string[];
248
- suggestions: string[];
249
- warnings: string[];
250
- /** Years below the JD's minimum experience requirement; 0 when the requirement is met. */
251
- experienceGap: number;
252
- /** Resume sections the parser successfully detected (e.g. "summary", "skills"). */
253
- detectedSections: string[];
254
- /** Total years of experience parsed from the resume's date ranges. */
255
- parsedExperienceYears: number;
256
- /** Parsed experience entries from the resume, with titles and date ranges. */
257
- experienceEntries: ParsedExperienceEntry[];
258
- }
1
+ import { A as ATSProfile, S as SkillAliases, K as KeywordRegistry, L as LLMConfig, J as JSONSchema, a as LLMResult, b as LLMBudget, c as AnalyzeResumeInput, d as ATSAnalysisResult } from './scoring-BCShrnki.js';
2
+ export { s as ATSBreakdown, k as ATSConfig, j as ATSRule, e as ATSWeights, w as AnalyzeResumeInputV2, f as KeywordCategory, h as KeywordDensityConfig, g as KeywordEntry, t as KeywordWeight, u as LLMClient, v as LLMFeatures, x as LLMUsageStats, N as NormalizedWeights, o as ParsedAchievement, P as ParsedDateRange, n as ParsedExperienceEntry, r as ParsedJobDescription, p as ParsedLanguage, q as ParsedResume, R as ResolvedATSConfig, m as ResumeSection, l as RuleContext, i as SectionPenaltyConfig } from './scoring-BCShrnki.js';
259
3
 
4
+ declare const defaultKeywordRegistry: KeywordRegistry;
260
5
  declare const defaultSkillAliases: SkillAliases;
261
6
  declare const defaultProfiles: ATSProfile[];
262
7
 
@@ -506,4 +251,4 @@ declare function analyzeResume(input: AnalyzeResumeInput): ATSAnalysisResult;
506
251
  */
507
252
  declare function analyzeResumeAsync(input: AnalyzeResumeInput): Promise<ATSAnalysisResult>;
508
253
 
509
- export { type ATSAnalysisResult, type ATSBreakdown, type ATSConfig, type ATSProfile, type ATSRule, type ATSWeights, type AnalyzeResumeInput, type AnalyzeResumeInputV2, type JSONSchema, type KeywordDensityConfig, type LLMBudget, LLMBudgetManager, type LLMClient, type LLMConfig, type LLMFeatures, LLMManager, LLMPrompts, type LLMResult, LLMSchemas, type LLMUsageStats, type NormalizedWeights, type ParsedDateRange, type ParsedExperienceEntry, type ParsedJobDescription, type ParsedResume, type ResolvedATSConfig, type ResumeSection, type RuleContext, type SectionPenaltyConfig, type SkillAliases, adaptJdClarificationResponse, adaptSectionClassificationResponse, adaptSkillNormalizationResponse, adaptSuggestionEnhancementResponse, analyzeResume, analyzeResumeAsync, createPrompt, defaultProfiles, defaultSkillAliases, safeExtractArray, safeExtractNumber, safeExtractString };
254
+ export { ATSAnalysisResult, ATSProfile, AnalyzeResumeInput, JSONSchema, KeywordRegistry, LLMBudget, LLMBudgetManager, LLMConfig, LLMManager, LLMPrompts, LLMResult, LLMSchemas, SkillAliases, adaptJdClarificationResponse, adaptSectionClassificationResponse, adaptSkillNormalizationResponse, adaptSuggestionEnhancementResponse, analyzeResume, analyzeResumeAsync, createPrompt, defaultKeywordRegistry, defaultProfiles, defaultSkillAliases, safeExtractArray, safeExtractNumber, safeExtractString };