perfai-cloud-mcp 0.3.0 → 0.5.3
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/README.md +45 -24
- package/dist/auth/bearerAuth.js +53 -0
- package/dist/auth/oauthFlow.js +1 -19
- package/dist/auth/pkce.js +0 -8
- package/dist/auth/tokenValidator.js +77 -67
- package/dist/cli.js +85 -52
- package/dist/client/apiClient.js +18 -25
- package/dist/client/authManager.js +42 -51
- package/dist/client/errors.js +42 -14
- package/dist/config.js +35 -38
- package/dist/env.js +0 -6
- package/dist/log-guard.js +0 -9
- package/dist/prompts.js +2 -8
- package/dist/server.js +45 -176
- package/dist/tools/protected/autoFix.js +0 -1
- package/dist/tools/protected/autoFixAll.js +4 -7
- package/dist/tools/protected/checkAppStatus.js +34 -32
- package/dist/tools/protected/checkTaskStatus.js +29 -28
- package/dist/tools/protected/getFixSummary.js +41 -11
- package/dist/tools/protected/getVulnerabilities.js +58 -8
- package/dist/tools/protected/manageOrganizations.js +4 -5
- package/dist/tools/protected/registerApp.js +17 -33
- package/dist/tools/protected/runSecurityTest.js +82 -26
- package/dist/tools/protected/submitAppCredentials.js +4 -3
- package/dist/tools/protected/vulnerabilityActions.js +32 -8
- package/dist/tools/public/authStatus.js +2 -2
- package/dist/tools/public/login.js +3 -27
- package/dist/utils/appResolver.js +25 -85
- package/dist/utils/formatters.js +9 -9
- package/dist/utils/poll.js +0 -7
- package/dist/utils/promptBuilder.js +93 -94
- package/dist/utils/registrationState.js +28 -0
- package/dist/utils/runState.js +129 -0
- package/package.json +6 -2
- package/dist/auth/oauthFlow.d.ts +0 -23
- package/dist/auth/oauthFlow.d.ts.map +0 -1
- package/dist/auth/pkce.d.ts +0 -11
- package/dist/auth/pkce.d.ts.map +0 -1
- package/dist/auth/tokenValidator.d.ts +0 -40
- package/dist/auth/tokenValidator.d.ts.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/client/apiClient.d.ts +0 -36
- package/dist/client/apiClient.d.ts.map +0 -1
- package/dist/client/authManager.d.ts +0 -61
- package/dist/client/authManager.d.ts.map +0 -1
- package/dist/client/errors.d.ts +0 -10
- package/dist/client/errors.d.ts.map +0 -1
- package/dist/client/types.d.ts +0 -72
- package/dist/client/types.d.ts.map +0 -1
- package/dist/config.d.ts +0 -27
- package/dist/config.d.ts.map +0 -1
- package/dist/env.d.ts +0 -2
- package/dist/env.d.ts.map +0 -1
- package/dist/log-guard.d.ts +0 -2
- package/dist/log-guard.d.ts.map +0 -1
- package/dist/prompts.d.ts +0 -31
- package/dist/prompts.d.ts.map +0 -1
- package/dist/server.d.ts +0 -4
- package/dist/server.d.ts.map +0 -1
- package/dist/tools/index.d.ts +0 -404
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/protected/autoFix.d.ts +0 -26
- package/dist/tools/protected/autoFix.d.ts.map +0 -1
- package/dist/tools/protected/autoFixAll.d.ts +0 -30
- package/dist/tools/protected/autoFixAll.d.ts.map +0 -1
- package/dist/tools/protected/checkAppStatus.d.ts +0 -21
- package/dist/tools/protected/checkAppStatus.d.ts.map +0 -1
- package/dist/tools/protected/checkTaskStatus.d.ts +0 -21
- package/dist/tools/protected/checkTaskStatus.d.ts.map +0 -1
- package/dist/tools/protected/getFixSummary.d.ts +0 -21
- package/dist/tools/protected/getFixSummary.d.ts.map +0 -1
- package/dist/tools/protected/getVulnerabilities.d.ts +0 -33
- package/dist/tools/protected/getVulnerabilities.d.ts.map +0 -1
- package/dist/tools/protected/listApps.d.ts +0 -25
- package/dist/tools/protected/listApps.d.ts.map +0 -1
- package/dist/tools/protected/logout.d.ts +0 -12
- package/dist/tools/protected/logout.d.ts.map +0 -1
- package/dist/tools/protected/manageOrganizations.d.ts +0 -26
- package/dist/tools/protected/manageOrganizations.d.ts.map +0 -1
- package/dist/tools/protected/registerApp.d.ts +0 -33
- package/dist/tools/protected/registerApp.d.ts.map +0 -1
- package/dist/tools/protected/runSecurityTest.d.ts +0 -21
- package/dist/tools/protected/runSecurityTest.d.ts.map +0 -1
- package/dist/tools/protected/selectApp.d.ts +0 -18
- package/dist/tools/protected/selectApp.d.ts.map +0 -1
- package/dist/tools/protected/submitAppCredentials.d.ts +0 -22
- package/dist/tools/protected/submitAppCredentials.d.ts.map +0 -1
- package/dist/tools/protected/suggestFix.d.ts +0 -22
- package/dist/tools/protected/suggestFix.d.ts.map +0 -1
- package/dist/tools/protected/vulnerabilityActions.d.ts +0 -70
- package/dist/tools/protected/vulnerabilityActions.d.ts.map +0 -1
- package/dist/tools/public/authStatus.d.ts +0 -12
- package/dist/tools/public/authStatus.d.ts.map +0 -1
- package/dist/tools/public/login.d.ts +0 -31
- package/dist/tools/public/login.d.ts.map +0 -1
- package/dist/utils/appResolver.d.ts +0 -24
- package/dist/utils/appResolver.d.ts.map +0 -1
- package/dist/utils/formatters.d.ts +0 -8
- package/dist/utils/formatters.d.ts.map +0 -1
- package/dist/utils/poll.d.ts +0 -19
- package/dist/utils/poll.d.ts.map +0 -1
- package/dist/utils/promptBuilder.d.ts +0 -26
- package/dist/utils/promptBuilder.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manageOrganizations.d.ts","sourceRoot":"","sources":["../../../src/tools/protected/manageOrganizations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAK1D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;CA4B1B,CAAC;AAUX,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAwG1F"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { AuthManager } from "../../client/authManager.js";
|
|
2
|
-
export declare const registerAppTool: {
|
|
3
|
-
readonly name: "register_app";
|
|
4
|
-
readonly description: string;
|
|
5
|
-
readonly inputSchema: {
|
|
6
|
-
readonly type: "object";
|
|
7
|
-
readonly properties: {
|
|
8
|
-
readonly appUrl: {
|
|
9
|
-
readonly type: "string";
|
|
10
|
-
readonly description: "Fully-qualified URL of the deployed app, e.g. https://app.example.com";
|
|
11
|
-
};
|
|
12
|
-
readonly createTestAccounts: {
|
|
13
|
-
readonly type: "boolean";
|
|
14
|
-
readonly description: "Let Perfai auto sign-up test accounts during onboarding (default: true)";
|
|
15
|
-
};
|
|
16
|
-
readonly skipEndpoints: {
|
|
17
|
-
readonly type: "array";
|
|
18
|
-
readonly items: {
|
|
19
|
-
readonly type: "string";
|
|
20
|
-
};
|
|
21
|
-
readonly description: "Optional list of endpoints to exclude from onboarding";
|
|
22
|
-
};
|
|
23
|
-
readonly tenantOneCredentials: {
|
|
24
|
-
readonly type: "object";
|
|
25
|
-
readonly description: "Optional credentials to use instead of auto sign-up";
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
readonly required: readonly ["appUrl"];
|
|
29
|
-
readonly additionalProperties: false;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export declare function handleRegisterApp(auth: AuthManager, args: any): Promise<any>;
|
|
33
|
-
//# sourceMappingURL=registerApp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerApp.d.ts","sourceRoot":"","sources":["../../../src/tools/protected/registerApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAK1D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BlB,CAAC;AAMX,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAoElF"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AuthManager } from "../../client/authManager.js";
|
|
2
|
-
export declare const runSecurityTestTool: {
|
|
3
|
-
readonly name: "run_security_test";
|
|
4
|
-
readonly description: string;
|
|
5
|
-
readonly inputSchema: {
|
|
6
|
-
readonly type: "object";
|
|
7
|
-
readonly properties: {
|
|
8
|
-
readonly app: {
|
|
9
|
-
readonly type: "string";
|
|
10
|
-
readonly description: string;
|
|
11
|
-
};
|
|
12
|
-
readonly appId: {
|
|
13
|
-
readonly type: "string";
|
|
14
|
-
readonly description: "App ID (alternative to app; defaults to the current app)";
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
readonly additionalProperties: false;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export declare function handleRunSecurityTest(auth: AuthManager, args: any): Promise<any>;
|
|
21
|
-
//# sourceMappingURL=runSecurityTest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runSecurityTest.d.ts","sourceRoot":"","sources":["../../../src/tools/protected/runSecurityTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI1D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;CAatB,CAAC;AAEX,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAmCtF"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AuthManager } from "../../client/authManager.js";
|
|
2
|
-
export declare const selectAppTool: {
|
|
3
|
-
readonly name: "select_app";
|
|
4
|
-
readonly description: string;
|
|
5
|
-
readonly inputSchema: {
|
|
6
|
-
readonly type: "object";
|
|
7
|
-
readonly properties: {
|
|
8
|
-
readonly appId: {
|
|
9
|
-
readonly type: "string";
|
|
10
|
-
readonly description: "App ID, e.g. from list_apps";
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
readonly required: readonly ["appId"];
|
|
14
|
-
readonly additionalProperties: false;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare function handleSelectApp(auth: AuthManager, args: any): Promise<any>;
|
|
18
|
-
//# sourceMappingURL=selectApp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectApp.d.ts","sourceRoot":"","sources":["../../../src/tools/protected/selectApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;CAchB,CAAC;AAEX,wBAAsB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAahF"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AuthManager } from "../../client/authManager.js";
|
|
2
|
-
export declare const submitAppCredentialsTool: {
|
|
3
|
-
readonly name: "submit_app_credentials";
|
|
4
|
-
readonly description: string;
|
|
5
|
-
readonly inputSchema: {
|
|
6
|
-
readonly type: "object";
|
|
7
|
-
readonly properties: {
|
|
8
|
-
readonly appId: {
|
|
9
|
-
readonly type: "string";
|
|
10
|
-
readonly description: "App ID (defaults to the current app)";
|
|
11
|
-
};
|
|
12
|
-
readonly credentials: {
|
|
13
|
-
readonly type: "object";
|
|
14
|
-
readonly description: "Credential payload — shape depends on the app's login type (e.g. {\"username\":..., \"password\":...})";
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
readonly required: readonly ["credentials"];
|
|
18
|
-
readonly additionalProperties: false;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export declare function handleSubmitAppCredentials(auth: AuthManager, args: any): Promise<any>;
|
|
22
|
-
//# sourceMappingURL=submitAppCredentials.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"submitAppCredentials.d.ts","sourceRoot":"","sources":["../../../src/tools/protected/submitAppCredentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;CAiB3B,CAAC;AAEX,wBAAsB,0BAA0B,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAwB3F"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AuthManager } from "../../client/authManager.js";
|
|
2
|
-
export declare const suggestFixTool: {
|
|
3
|
-
readonly name: "suggest_fix";
|
|
4
|
-
readonly description: string;
|
|
5
|
-
readonly inputSchema: {
|
|
6
|
-
readonly type: "object";
|
|
7
|
-
readonly properties: {
|
|
8
|
-
readonly vulnerability_id: {
|
|
9
|
-
readonly type: "string";
|
|
10
|
-
readonly description: "Sequence number from get_vulnerabilities (e.g. '3') or raw vulnerability id";
|
|
11
|
-
};
|
|
12
|
-
readonly appId: {
|
|
13
|
-
readonly type: "string";
|
|
14
|
-
readonly description: "App ID (defaults to the current app)";
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
readonly required: readonly ["vulnerability_id"];
|
|
18
|
-
readonly additionalProperties: false;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export declare function handleSuggestFix(auth: AuthManager, args: any): Promise<any>;
|
|
22
|
-
//# sourceMappingURL=suggestFix.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"suggestFix.d.ts","sourceRoot":"","sources":["../../../src/tools/protected/suggestFix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;CAejB,CAAC;AAEX,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAsBjF"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { AuthManager } from "../../client/authManager.js";
|
|
2
|
-
export declare const dismissVulnerabilityTool: {
|
|
3
|
-
readonly name: "dismiss_vulnerability";
|
|
4
|
-
readonly description: string;
|
|
5
|
-
readonly inputSchema: {
|
|
6
|
-
readonly properties: {
|
|
7
|
-
readonly reason: {
|
|
8
|
-
readonly type: "string";
|
|
9
|
-
readonly description: string;
|
|
10
|
-
};
|
|
11
|
-
readonly vulnerability_id: {
|
|
12
|
-
readonly type: "string";
|
|
13
|
-
readonly description: "Sequence number from get_vulnerabilities (e.g. '3') or raw vulnerability id";
|
|
14
|
-
};
|
|
15
|
-
readonly appId: {
|
|
16
|
-
readonly type: "string";
|
|
17
|
-
readonly description: "App ID (defaults to the current app)";
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
readonly type: "object";
|
|
21
|
-
readonly required: readonly ["vulnerability_id"];
|
|
22
|
-
readonly additionalProperties: false;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export declare function handleDismissVulnerability(auth: AuthManager, args: any): Promise<any>;
|
|
26
|
-
export declare const reopenVulnerabilityTool: {
|
|
27
|
-
readonly name: "reopen_vulnerability";
|
|
28
|
-
readonly description: "🔁 Reopen a dismissed/fixed finding (POST /v1/vulnerabilities/{id}/reopen).";
|
|
29
|
-
readonly inputSchema: {
|
|
30
|
-
readonly type: "object";
|
|
31
|
-
readonly properties: {
|
|
32
|
-
readonly vulnerability_id: {
|
|
33
|
-
readonly type: "string";
|
|
34
|
-
readonly description: "Sequence number from get_vulnerabilities (e.g. '3') or raw vulnerability id";
|
|
35
|
-
};
|
|
36
|
-
readonly appId: {
|
|
37
|
-
readonly type: "string";
|
|
38
|
-
readonly description: "App ID (defaults to the current app)";
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
readonly required: readonly ["vulnerability_id"];
|
|
42
|
-
readonly additionalProperties: false;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
export declare function handleReopenVulnerability(auth: AuthManager, args: any): Promise<any>;
|
|
46
|
-
export declare const markVulnerabilityFixedTool: {
|
|
47
|
-
readonly name: "mark_vulnerability_fixed";
|
|
48
|
-
readonly description: string;
|
|
49
|
-
readonly inputSchema: {
|
|
50
|
-
readonly properties: {
|
|
51
|
-
readonly comment: {
|
|
52
|
-
readonly type: "string";
|
|
53
|
-
readonly description: "Optional short note on what was changed";
|
|
54
|
-
};
|
|
55
|
-
readonly vulnerability_id: {
|
|
56
|
-
readonly type: "string";
|
|
57
|
-
readonly description: "Sequence number from get_vulnerabilities (e.g. '3') or raw vulnerability id";
|
|
58
|
-
};
|
|
59
|
-
readonly appId: {
|
|
60
|
-
readonly type: "string";
|
|
61
|
-
readonly description: "App ID (defaults to the current app)";
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
readonly type: "object";
|
|
65
|
-
readonly required: readonly ["vulnerability_id"];
|
|
66
|
-
readonly additionalProperties: false;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
export declare function handleMarkVulnerabilityFixed(auth: AuthManager, args: any): Promise<any>;
|
|
70
|
-
//# sourceMappingURL=vulnerabilityActions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vulnerabilityActions.d.ts","sourceRoot":"","sources":["../../../src/tools/protected/vulnerabilityActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAoB1D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;CAkB3B,CAAC;AAEX,wBAAsB,0BAA0B,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAS3F;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;CAI1B,CAAC;AAEX,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAS1F;AAED,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;CAY7B,CAAC;AAEX,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAS7F"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AuthManager } from "../../client/authManager.js";
|
|
2
|
-
export declare const authStatusTool: {
|
|
3
|
-
readonly name: "auth_status";
|
|
4
|
-
readonly description: "🔎 Check whether the server currently holds a valid Perfai session.";
|
|
5
|
-
readonly inputSchema: {
|
|
6
|
-
readonly type: "object";
|
|
7
|
-
readonly properties: {};
|
|
8
|
-
readonly additionalProperties: false;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export declare function handleAuthStatus(auth: AuthManager): Promise<any>;
|
|
12
|
-
//# sourceMappingURL=authStatus.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authStatus.d.ts","sourceRoot":"","sources":["../../../src/tools/public/authStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,eAAO,MAAM,cAAc;;;;;;;;CAIjB,CAAC;AAEX,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAQtE"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { AuthManager } from "../../client/authManager.js";
|
|
2
|
-
export declare const loginTool: {
|
|
3
|
-
readonly name: "login";
|
|
4
|
-
readonly description: string;
|
|
5
|
-
readonly inputSchema: {
|
|
6
|
-
readonly type: "object";
|
|
7
|
-
readonly properties: {
|
|
8
|
-
readonly email: {
|
|
9
|
-
readonly type: "string";
|
|
10
|
-
readonly description: "Perfai account email (optional)";
|
|
11
|
-
};
|
|
12
|
-
readonly password: {
|
|
13
|
-
readonly type: "string";
|
|
14
|
-
readonly description: "Perfai account password (optional)";
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
readonly additionalProperties: false;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Signs in on first use so "<App> fix all" works as the very first message:
|
|
22
|
-
* env credentials if set, otherwise the browser sign-in (OAuth, or the local
|
|
23
|
-
* form when OAuth is disabled), waiting up to `waitMs` for the user to finish.
|
|
24
|
-
* An already-signed-in browser (Auth0 SSO) usually completes in seconds.
|
|
25
|
-
* The browser flow keeps running past `waitMs`, so a retry picks it up.
|
|
26
|
-
*/
|
|
27
|
-
export declare function ensureLoggedIn(auth: AuthManager, waitMs?: number): Promise<boolean>;
|
|
28
|
-
export declare function handleLogin(auth: AuthManager, args: any): Promise<any>;
|
|
29
|
-
/** Shown when the browser sign-in is still open after the wait. */
|
|
30
|
-
export declare const LOGIN_PENDING_TEXT: string;
|
|
31
|
-
//# sourceMappingURL=login.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/tools/public/login.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAgBZ,CAAC;AAoOX;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,SAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAgBhG;AAQD,wBAAsB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAiC5E;AAED,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,QAGyD,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AuthManager } from "../client/authManager.js";
|
|
2
|
-
export interface ResolvedApp {
|
|
3
|
-
appId: string;
|
|
4
|
-
/** Human-readable name for prompts/summaries. */
|
|
5
|
-
label: string;
|
|
6
|
-
}
|
|
7
|
-
export type AppResolution = {
|
|
8
|
-
ok: true;
|
|
9
|
-
app: ResolvedApp;
|
|
10
|
-
} | {
|
|
11
|
-
ok: false;
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Resolves which app a tool call targets: `app` (name / label / URL fragment,
|
|
16
|
-
* searched across every org) → `appId` → the session's current app.
|
|
17
|
-
*/
|
|
18
|
-
export declare function resolveApp(auth: AuthManager, args: any): Promise<AppResolution>;
|
|
19
|
-
/** JSON-schema property shared by every tool that accepts an app name. */
|
|
20
|
-
export declare const APP_NAME_PROPERTY: {
|
|
21
|
-
readonly type: "string";
|
|
22
|
-
readonly description: string;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=appResolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appResolver.d.ts","sourceRoot":"","sources":["../../src/utils/appResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AA2I5F;;;GAGG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,CAkBrF;AAED,0EAA0E;AAC1E,eAAO,MAAM,iBAAiB;;;CAKpB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AppRecord, OrganizationRecord, TaskRecord, VulnerabilityRecord } from "../client/types.js";
|
|
2
|
-
export declare function formatApp(app: AppRecord): string;
|
|
3
|
-
export declare function formatAppList(apps: AppRecord[], total: number, page: number, pageSize: number): string;
|
|
4
|
-
export declare function formatOrganizations(organizations: OrganizationRecord[], selectedOrgId?: string): string;
|
|
5
|
-
export declare function formatTask(task: TaskRecord): string;
|
|
6
|
-
export declare function formatVulnerability(v: VulnerabilityRecord, sequence: number): string;
|
|
7
|
-
export declare function formatVulnerabilityList(vulnerabilities: VulnerabilityRecord[], total: number, page: number, pageSize: number): string;
|
|
8
|
-
//# sourceMappingURL=formatters.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/utils/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AASzG,wBAAgB,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAQhD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUtG;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,kBAAkB,EAAE,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAgBvG;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEnD;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgBpF;AAED,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,mBAAmB,EAAE,EACtC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,MAAM,CAMR"}
|
package/dist/utils/poll.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Polls `fetch` until `isTerminal` is true or `budgetMs` elapses, using the
|
|
3
|
-
* exponential-backoff schedule the API docs recommend (start small, cap the
|
|
4
|
-
* interval). A single MCP tool call can only block so long before a calling
|
|
5
|
-
* client's own timeout fires, so this bounds itself to `budgetMs` and returns
|
|
6
|
-
* whatever the latest value was — callers re-invoke the tool to keep polling.
|
|
7
|
-
*/
|
|
8
|
-
export declare function pollWithBudget<T>(options: {
|
|
9
|
-
fetch: () => Promise<T>;
|
|
10
|
-
isTerminal: (value: T) => boolean;
|
|
11
|
-
budgetMs: number;
|
|
12
|
-
startIntervalMs: number;
|
|
13
|
-
maxIntervalMs: number;
|
|
14
|
-
}): Promise<{
|
|
15
|
-
value: T;
|
|
16
|
-
terminal: boolean;
|
|
17
|
-
elapsedMs: number;
|
|
18
|
-
}>;
|
|
19
|
-
//# sourceMappingURL=poll.d.ts.map
|
package/dist/utils/poll.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["../../src/utils/poll.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE;IAC/C,KAAK,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC;IACxB,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,CAAC,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAwB9D"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { VulnerabilityRecord } from "../client/types.js";
|
|
2
|
-
/** Open = nobody has fixed, claimed a fix for, or dismissed it yet. */
|
|
3
|
-
export declare function isOpen(vuln: VulnerabilityRecord): boolean;
|
|
4
|
-
/** Critical → low; stable, so API order is kept within a severity. */
|
|
5
|
-
export declare function sortBySeverity(vulnerabilities: VulnerabilityRecord[]): VulnerabilityRecord[];
|
|
6
|
-
/**
|
|
7
|
-
* Builds a self-contained fix prompt for a coding assistant from a
|
|
8
|
-
* vulnerability record. The public vulnerabilities API only guarantees
|
|
9
|
-
* `severity` / `isFixed` / `isDismissed`; everything else is surfaced
|
|
10
|
-
* defensively so the prompt stays useful even if the API adds/renames
|
|
11
|
-
* fields the client doesn't know about yet.
|
|
12
|
-
*/
|
|
13
|
-
export declare function buildFixPrompt(appLabel: string, vuln: VulnerabilityRecord): string;
|
|
14
|
-
/**
|
|
15
|
-
* Builds a structured, actionable fix instruction that an AI client can
|
|
16
|
-
* execute directly. Unlike buildFixPrompt (conversational), this returns
|
|
17
|
-
* a step-by-step action plan the AI should follow without asking questions.
|
|
18
|
-
*/
|
|
19
|
-
export declare function buildAutoFixInstruction(appLabel: string, vuln: VulnerabilityRecord, sequence: number): string;
|
|
20
|
-
/**
|
|
21
|
-
* Builds the autonomous fix plan behind "<App> fix all". `vulnerabilities` must
|
|
22
|
-
* already be filtered to open findings and sorted (see isOpen / sortBySeverity);
|
|
23
|
-
* `remaining` is how many open findings are left after this batch.
|
|
24
|
-
*/
|
|
25
|
-
export declare function buildBatchFixPlan(appLabel: string, vulnerabilities: VulnerabilityRecord[], remaining?: number): string;
|
|
26
|
-
//# sourceMappingURL=promptBuilder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptBuilder.d.ts","sourceRoot":"","sources":["../../src/utils/promptBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AA4B9D,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAEzD;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,eAAe,EAAE,mBAAmB,EAAE,GAAG,mBAAmB,EAAE,CAE5F;AAqBD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAsBlF;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,mBAAmB,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAkCR;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,mBAAmB,EAAE,EACtC,SAAS,SAAI,GACZ,MAAM,CAkCR"}
|