@linkegringo/mcp 1.0.5 → 1.0.7
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/index.d.ts +176 -82
- package/dist/index.js +818 -367
- package/package.json +10 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Muriel Gasparini
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,72 +1,11 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import http from 'node:http';
|
|
3
|
+
import { EventEmitter } from 'node:events';
|
|
2
4
|
import { z } from 'zod';
|
|
3
5
|
import { Experience } from '@linkegringo/core';
|
|
4
6
|
|
|
5
7
|
declare function createLinkeGringoMcpServer(): McpServer;
|
|
6
8
|
|
|
7
|
-
interface ChromeVersionResponse {
|
|
8
|
-
Browser: string;
|
|
9
|
-
'Protocol-Version': string;
|
|
10
|
-
'User-Agent': string;
|
|
11
|
-
'V8-Version': string;
|
|
12
|
-
'WebKit-Version': string;
|
|
13
|
-
webSocketDebuggerUrl?: string;
|
|
14
|
-
}
|
|
15
|
-
interface ChromeTabInfo {
|
|
16
|
-
id: string;
|
|
17
|
-
title: string;
|
|
18
|
-
type: string;
|
|
19
|
-
url: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
webSocketDebuggerUrl?: string;
|
|
22
|
-
devtoolsFrontendUrl?: string;
|
|
23
|
-
}
|
|
24
|
-
interface LinkeGringoTabInfo {
|
|
25
|
-
id: string;
|
|
26
|
-
title: string;
|
|
27
|
-
url: string;
|
|
28
|
-
webSocketDebuggerUrl?: string;
|
|
29
|
-
}
|
|
30
|
-
interface LinkeGringoSessionState {
|
|
31
|
-
hasUploadedProfile: boolean;
|
|
32
|
-
candidateName?: string;
|
|
33
|
-
targetRole?: string;
|
|
34
|
-
step?: string;
|
|
35
|
-
inboundScore?: number;
|
|
36
|
-
profile?: any;
|
|
37
|
-
review?: any;
|
|
38
|
-
}
|
|
39
|
-
interface CdpStatus {
|
|
40
|
-
isRunning: boolean;
|
|
41
|
-
port: number;
|
|
42
|
-
host: string;
|
|
43
|
-
browser?: string;
|
|
44
|
-
protocolVersion?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Abas ativas restritas estritamente ao escopo do LinkeGringo (Privacy Shield).
|
|
47
|
-
* Abas pessoais (e-mails, mensageiros, bancos) são completamente omitidas.
|
|
48
|
-
*/
|
|
49
|
-
activeTabs: LinkeGringoTabInfo[];
|
|
50
|
-
linkeGringoTabs: LinkeGringoTabInfo[];
|
|
51
|
-
otherTabsCount: number;
|
|
52
|
-
linkeGringoTabFound: boolean;
|
|
53
|
-
linkeGringoTabUrl?: string;
|
|
54
|
-
sessionState?: LinkeGringoSessionState | null;
|
|
55
|
-
error?: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
declare function isLinkeGringoUrl(url?: string): boolean;
|
|
59
|
-
declare function findDevToolsActivePort(): {
|
|
60
|
-
port: number;
|
|
61
|
-
wsPath: string;
|
|
62
|
-
} | null;
|
|
63
|
-
declare function probeViaWebSocket(port: number, wsPath: string, timeoutMs?: number): Promise<{
|
|
64
|
-
linkeGringoTabs: LinkeGringoTabInfo[];
|
|
65
|
-
otherTabsCount: number;
|
|
66
|
-
sessionState: LinkeGringoSessionState | null;
|
|
67
|
-
} | null>;
|
|
68
|
-
declare function checkChromeCdp(port?: number, host?: string, timeoutMs?: number): Promise<CdpStatus>;
|
|
69
|
-
|
|
70
9
|
interface McpTarget {
|
|
71
10
|
id: string;
|
|
72
11
|
client: string;
|
|
@@ -92,6 +31,87 @@ declare function installMcpServerConfig(configPath: string): {
|
|
|
92
31
|
declare function parseArgs(args?: string[]): InstallerOptions;
|
|
93
32
|
declare function runInstaller(args?: string[]): InstallResult[];
|
|
94
33
|
|
|
34
|
+
type JobType = 'parse_and_diagnose' | 'generate_interview' | 'evaluate_progress' | 'generate_rewritten_profile' | 'chat_message';
|
|
35
|
+
type JobStatus = 'pending' | 'processing' | 'completed' | 'failed';
|
|
36
|
+
interface BridgeJob<TPayload = any, TResult = any> {
|
|
37
|
+
id: string;
|
|
38
|
+
type: JobType;
|
|
39
|
+
payload: TPayload;
|
|
40
|
+
status: JobStatus;
|
|
41
|
+
createdAt: number;
|
|
42
|
+
updatedAt: number;
|
|
43
|
+
result?: TResult;
|
|
44
|
+
error?: string;
|
|
45
|
+
}
|
|
46
|
+
interface BridgeServerOptions {
|
|
47
|
+
port?: number;
|
|
48
|
+
host?: string;
|
|
49
|
+
onJobCreated?: (job: BridgeJob) => void;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare function createBridgeHttpServer(options?: BridgeServerOptions): http.Server;
|
|
53
|
+
declare function startBridgeServer(options?: BridgeServerOptions): Promise<{
|
|
54
|
+
server: http.Server;
|
|
55
|
+
port: number;
|
|
56
|
+
close: () => Promise<void>;
|
|
57
|
+
}>;
|
|
58
|
+
declare function stopBridgeServer(): Promise<void>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Busca o próximo job pendente no Bridge HTTP local (porta 5174).
|
|
62
|
+
* Se o bridge HTTP estiver offline ou inacessível, realiza fallback para o bridgeJobStore em memória.
|
|
63
|
+
*/
|
|
64
|
+
declare function getRemoteOrLocalPendingJob(jobId?: string, bridgeUrl?: string): Promise<BridgeJob | undefined>;
|
|
65
|
+
/**
|
|
66
|
+
* Conclui um job enviando o resultado estruturado para o Bridge HTTP local.
|
|
67
|
+
* Se o bridge HTTP estiver offline, conclui diretamente na store em memória.
|
|
68
|
+
*/
|
|
69
|
+
declare function completeRemoteOrLocalJob(jobId: string, result: any, bridgeUrl?: string): Promise<BridgeJob>;
|
|
70
|
+
/**
|
|
71
|
+
* Marca um job com falha no Bridge HTTP local ou na store em memória.
|
|
72
|
+
*/
|
|
73
|
+
declare function failRemoteOrLocalJob(jobId: string, error: string, bridgeUrl?: string): Promise<BridgeJob>;
|
|
74
|
+
|
|
75
|
+
interface WatcherOptions {
|
|
76
|
+
bridgeUrl?: string;
|
|
77
|
+
once?: boolean;
|
|
78
|
+
onJob?: (job: {
|
|
79
|
+
id: string;
|
|
80
|
+
type: string;
|
|
81
|
+
createdAt: number;
|
|
82
|
+
}) => void;
|
|
83
|
+
onConnect?: (info: {
|
|
84
|
+
watcherId: string;
|
|
85
|
+
pendingCount: number;
|
|
86
|
+
}) => void;
|
|
87
|
+
onError?: (err: Error) => void;
|
|
88
|
+
}
|
|
89
|
+
declare function startBridgeWatcher(options?: WatcherOptions): {
|
|
90
|
+
close: () => void;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
declare class BridgeJobStore extends EventEmitter {
|
|
94
|
+
private jobs;
|
|
95
|
+
private pendingQueue;
|
|
96
|
+
createJob<TPayload = any>(type: JobType, payload: TPayload): BridgeJob<TPayload>;
|
|
97
|
+
getJob(id: string): BridgeJob | undefined;
|
|
98
|
+
getPendingJob(id?: string): BridgeJob | undefined;
|
|
99
|
+
markProcessing(id: string): BridgeJob | undefined;
|
|
100
|
+
completeJob<TResult = any>(id: string, result: TResult): BridgeJob;
|
|
101
|
+
failJob(id: string, error: string): BridgeJob;
|
|
102
|
+
waitForJob(id: string, timeoutMs?: number): Promise<BridgeJob>;
|
|
103
|
+
getAllJobs(): BridgeJob[];
|
|
104
|
+
getPendingCount(): number;
|
|
105
|
+
private activeWatchers;
|
|
106
|
+
registerWatcher(id: string): void;
|
|
107
|
+
unregisterWatcher(id: string): void;
|
|
108
|
+
getWatcherCount(): number;
|
|
109
|
+
hasActiveWatcher(): boolean;
|
|
110
|
+
cancelAllPending(reason?: string): number;
|
|
111
|
+
clear(): void;
|
|
112
|
+
}
|
|
113
|
+
declare const bridgeJobStore: BridgeJobStore;
|
|
114
|
+
|
|
95
115
|
interface SparseExperience {
|
|
96
116
|
company: string;
|
|
97
117
|
title: string;
|
|
@@ -166,9 +186,11 @@ declare function handleAuditProfile(input: AuditProfileInput): Promise<{
|
|
|
166
186
|
}[];
|
|
167
187
|
structuredData: {
|
|
168
188
|
status: string;
|
|
169
|
-
|
|
170
|
-
|
|
189
|
+
jobId: string;
|
|
190
|
+
jobType: JobType;
|
|
191
|
+
payload: any;
|
|
171
192
|
actionRequired: string;
|
|
193
|
+
message?: undefined;
|
|
172
194
|
score?: undefined;
|
|
173
195
|
targetRole?: undefined;
|
|
174
196
|
headline?: undefined;
|
|
@@ -187,7 +209,9 @@ declare function handleAuditProfile(input: AuditProfileInput): Promise<{
|
|
|
187
209
|
status: string;
|
|
188
210
|
message: string;
|
|
189
211
|
actionRequired: string;
|
|
190
|
-
|
|
212
|
+
jobId?: undefined;
|
|
213
|
+
jobType?: undefined;
|
|
214
|
+
payload?: undefined;
|
|
191
215
|
score?: undefined;
|
|
192
216
|
targetRole?: undefined;
|
|
193
217
|
headline?: undefined;
|
|
@@ -212,9 +236,11 @@ declare function handleAuditProfile(input: AuditProfileInput): Promise<{
|
|
|
212
236
|
triageBottlenecks: string[];
|
|
213
237
|
issues: AuditIssue[];
|
|
214
238
|
status?: undefined;
|
|
215
|
-
|
|
216
|
-
|
|
239
|
+
jobId?: undefined;
|
|
240
|
+
jobType?: undefined;
|
|
241
|
+
payload?: undefined;
|
|
217
242
|
actionRequired?: undefined;
|
|
243
|
+
message?: undefined;
|
|
218
244
|
};
|
|
219
245
|
}>;
|
|
220
246
|
|
|
@@ -347,26 +373,94 @@ declare function handleGenerateHeadline(input: GenerateHeadlineInput): Promise<{
|
|
|
347
373
|
};
|
|
348
374
|
}>;
|
|
349
375
|
|
|
350
|
-
declare const
|
|
351
|
-
|
|
352
|
-
host: z.ZodDefault<z.ZodString>;
|
|
353
|
-
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
376
|
+
declare const getPendingJobInputSchema: z.ZodObject<{
|
|
377
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
354
378
|
}, "strip", z.ZodTypeAny, {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
379
|
+
jobId?: string | undefined;
|
|
380
|
+
}, {
|
|
381
|
+
jobId?: string | undefined;
|
|
382
|
+
}>;
|
|
383
|
+
type GetPendingJobInput = z.infer<typeof getPendingJobInputSchema>;
|
|
384
|
+
declare function handleGetPendingJob(input?: GetPendingJobInput): Promise<{
|
|
385
|
+
content: {
|
|
386
|
+
type: "text";
|
|
387
|
+
text: string;
|
|
388
|
+
}[];
|
|
389
|
+
structuredData: {
|
|
390
|
+
jobFound: boolean;
|
|
391
|
+
pendingCount: number;
|
|
392
|
+
job?: undefined;
|
|
393
|
+
};
|
|
394
|
+
} | {
|
|
395
|
+
content: {
|
|
396
|
+
type: "text";
|
|
397
|
+
text: string;
|
|
398
|
+
}[];
|
|
399
|
+
structuredData: {
|
|
400
|
+
jobFound: boolean;
|
|
401
|
+
job: {
|
|
402
|
+
id: string;
|
|
403
|
+
type: JobType;
|
|
404
|
+
payload: any;
|
|
405
|
+
createdAt: number;
|
|
406
|
+
};
|
|
407
|
+
pendingCount?: undefined;
|
|
408
|
+
};
|
|
409
|
+
}>;
|
|
410
|
+
|
|
411
|
+
declare const submitJobResultInputSchema: z.ZodObject<{
|
|
412
|
+
jobId: z.ZodString;
|
|
413
|
+
result: z.ZodAny;
|
|
414
|
+
status: z.ZodDefault<z.ZodEnum<["completed", "failed"]>>;
|
|
415
|
+
error: z.ZodOptional<z.ZodString>;
|
|
416
|
+
}, "strip", z.ZodTypeAny, {
|
|
417
|
+
status: "completed" | "failed";
|
|
418
|
+
jobId: string;
|
|
419
|
+
result?: any;
|
|
420
|
+
error?: string | undefined;
|
|
358
421
|
}, {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
422
|
+
jobId: string;
|
|
423
|
+
result?: any;
|
|
424
|
+
error?: string | undefined;
|
|
425
|
+
status?: "completed" | "failed" | undefined;
|
|
362
426
|
}>;
|
|
363
|
-
type
|
|
364
|
-
declare function
|
|
427
|
+
type SubmitJobResultInput = z.infer<typeof submitJobResultInputSchema>;
|
|
428
|
+
declare function handleSubmitJobResult(input: SubmitJobResultInput): Promise<{
|
|
429
|
+
content: {
|
|
430
|
+
type: "text";
|
|
431
|
+
text: string;
|
|
432
|
+
}[];
|
|
433
|
+
structuredData: {
|
|
434
|
+
success: boolean;
|
|
435
|
+
jobId: string;
|
|
436
|
+
status: string;
|
|
437
|
+
type?: undefined;
|
|
438
|
+
error?: undefined;
|
|
439
|
+
};
|
|
440
|
+
} | {
|
|
441
|
+
content: {
|
|
442
|
+
type: "text";
|
|
443
|
+
text: string;
|
|
444
|
+
}[];
|
|
445
|
+
structuredData: {
|
|
446
|
+
success: boolean;
|
|
447
|
+
jobId: string;
|
|
448
|
+
status: string;
|
|
449
|
+
type: JobType;
|
|
450
|
+
error?: undefined;
|
|
451
|
+
};
|
|
452
|
+
} | {
|
|
365
453
|
content: {
|
|
366
454
|
type: "text";
|
|
367
455
|
text: string;
|
|
368
456
|
}[];
|
|
369
|
-
structuredData:
|
|
457
|
+
structuredData: {
|
|
458
|
+
success: boolean;
|
|
459
|
+
error: any;
|
|
460
|
+
jobId?: undefined;
|
|
461
|
+
status?: undefined;
|
|
462
|
+
type?: undefined;
|
|
463
|
+
};
|
|
370
464
|
}>;
|
|
371
465
|
|
|
372
|
-
export { type AuditIssue, type AuditProfileInput, type
|
|
466
|
+
export { type AuditIssue, type AuditProfileInput, type BridgeJob, type BridgeServerOptions, type ConvertToXyzBulletInput, type GenerateHeadlineInput, type GetPendingJobInput, type InstallResult, type InstallerOptions, type JobStatus, type JobType, type McpTarget, type SimulateRecruiterSearchInput, type SparseExperience, type SubmitJobResultInput, type WatcherOptions, auditProfileInputSchema, bridgeJobStore, completeRemoteOrLocalJob, convertToXyzBulletInputSchema, createBridgeHttpServer, createLinkeGringoMcpServer, detectSparseExperiences, failRemoteOrLocalJob, formatGoogleXyzBullet, generateHeadlineInputSchema, getExperienceBulletCount, getMcpConfigsForSystem, getPendingJobInputSchema, getRemoteOrLocalPendingJob, handleAuditProfile, handleConvertToXyzBullet, handleGenerateHeadline, handleGetPendingJob, handleSimulateRecruiterSearch, handleSubmitJobResult, installMcpServerConfig, parseArgs, runInstaller, simulateRecruiterSearchInputSchema, startBridgeServer, startBridgeWatcher, stopBridgeServer, submitJobResultInputSchema };
|