retestkit 1.8.0 → 1.10.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/auth/github-stub.d.ts +49 -0
- package/dist/auth/github-stub.d.ts.map +1 -0
- package/dist/auth/github-stub.js +50 -0
- package/dist/auth/github-stub.js.map +1 -0
- package/dist/elicitation/index.d.ts +1 -0
- package/dist/elicitation/index.d.ts.map +1 -1
- package/dist/elicitation/index.js +1 -0
- package/dist/elicitation/index.js.map +1 -1
- package/dist/elicitation/types.d.ts +9 -1
- package/dist/elicitation/types.d.ts.map +1 -1
- package/dist/elicitation/types.js +34 -0
- package/dist/elicitation/types.js.map +1 -1
- package/dist/elicitation/workflow-helpers.d.ts +90 -0
- package/dist/elicitation/workflow-helpers.d.ts.map +1 -0
- package/dist/elicitation/workflow-helpers.js +216 -0
- package/dist/elicitation/workflow-helpers.js.map +1 -0
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +162 -1
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/templates/mcp/retest-cover.md +14 -0
- package/dist/prompts/templates/mcp/retest-describe.md +14 -0
- package/dist/prompts/templates/mcp/retest-plan.md +16 -0
- package/dist/prompts/templates/mcp/retest-summarize.md +10 -0
- package/dist/prompts/templates/mcp/retest-workflow.md +40 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +10 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/retest/cover.d.ts +99 -0
- package/dist/tools/retest/cover.d.ts.map +1 -0
- package/dist/tools/retest/cover.js +285 -0
- package/dist/tools/retest/cover.js.map +1 -0
- package/dist/tools/retest/crawl.js +1 -1
- package/dist/tools/retest/crawl.js.map +1 -1
- package/dist/tools/retest/describe.d.ts +74 -0
- package/dist/tools/retest/describe.d.ts.map +1 -0
- package/dist/tools/retest/describe.js +534 -0
- package/dist/tools/retest/describe.js.map +1 -0
- package/dist/tools/retest/generate-tests.js +1 -1
- package/dist/tools/retest/generate-tests.js.map +1 -1
- package/dist/tools/retest/index.d.ts +6 -0
- package/dist/tools/retest/index.d.ts.map +1 -1
- package/dist/tools/retest/index.js +7 -0
- package/dist/tools/retest/index.js.map +1 -1
- package/dist/tools/retest/plan.d.ts +60 -0
- package/dist/tools/retest/plan.d.ts.map +1 -0
- package/dist/tools/retest/plan.js +424 -0
- package/dist/tools/retest/plan.js.map +1 -0
- package/dist/tools/retest/run-plan.d.ts +67 -0
- package/dist/tools/retest/run-plan.d.ts.map +1 -0
- package/dist/tools/retest/run-plan.js +213 -0
- package/dist/tools/retest/run-plan.js.map +1 -0
- package/dist/tools/retest/start-analysis.d.ts +30 -3
- package/dist/tools/retest/start-analysis.d.ts.map +1 -1
- package/dist/tools/retest/start-analysis.js +411 -186
- package/dist/tools/retest/start-analysis.js.map +1 -1
- package/dist/tools/retest/summarize.d.ts +98 -0
- package/dist/tools/retest/summarize.d.ts.map +1 -0
- package/dist/tools/retest/summarize.js +355 -0
- package/dist/tools/retest/summarize.js.map +1 -0
- package/dist/tools/retest/update-tests.d.ts +51 -0
- package/dist/tools/retest/update-tests.d.ts.map +1 -0
- package/dist/tools/retest/update-tests.js +387 -0
- package/dist/tools/retest/update-tests.js.map +1 -0
- package/dist/workspace/repo-check.d.ts +51 -0
- package/dist/workspace/repo-check.d.ts.map +1 -0
- package/dist/workspace/repo-check.js +180 -0
- package/dist/workspace/repo-check.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub authentication stub module.
|
|
3
|
+
*
|
|
4
|
+
* This module provides a placeholder for GitHub authentication that will be
|
|
5
|
+
* implemented in a future release. Currently, it simply returns a skip message
|
|
6
|
+
* indicating that authentication is not yet available.
|
|
7
|
+
*
|
|
8
|
+
* Future implementation will use OAuth device code flow via Authentik.
|
|
9
|
+
*/
|
|
10
|
+
export interface GitHubAuthResult {
|
|
11
|
+
/** Whether authentication was attempted */
|
|
12
|
+
attempted: boolean;
|
|
13
|
+
/** Whether authentication was successful */
|
|
14
|
+
success: boolean;
|
|
15
|
+
/** Status message to display to user */
|
|
16
|
+
message: string;
|
|
17
|
+
/** Whether this was skipped (stub behavior) */
|
|
18
|
+
skipped: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Attempt GitHub authentication (stub implementation).
|
|
22
|
+
*
|
|
23
|
+
* This is a placeholder that will be replaced with actual OAuth device code
|
|
24
|
+
* flow authentication in a future release.
|
|
25
|
+
*
|
|
26
|
+
* @returns Result indicating authentication was skipped
|
|
27
|
+
*/
|
|
28
|
+
export declare function authenticateGitHub(): Promise<GitHubAuthResult>;
|
|
29
|
+
/**
|
|
30
|
+
* Check if user is currently authenticated with GitHub (stub).
|
|
31
|
+
*
|
|
32
|
+
* @returns Always false in stub implementation
|
|
33
|
+
*/
|
|
34
|
+
export declare function isAuthenticated(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Get the current GitHub user info (stub).
|
|
37
|
+
*
|
|
38
|
+
* @returns null in stub implementation
|
|
39
|
+
*/
|
|
40
|
+
export declare function getCurrentUser(): null;
|
|
41
|
+
/**
|
|
42
|
+
* Log out from GitHub (stub).
|
|
43
|
+
*
|
|
44
|
+
* @returns Success result (no-op in stub)
|
|
45
|
+
*/
|
|
46
|
+
export declare function logout(): Promise<{
|
|
47
|
+
success: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
//# sourceMappingURL=github-stub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-stub.d.ts","sourceRoot":"","sources":["../../src/auth/github-stub.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,SAAS,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAOpE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAErC;AAED;;;;GAIG;AACH,wBAAsB,MAAM,IAAI,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAE5D"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub authentication stub module.
|
|
3
|
+
*
|
|
4
|
+
* This module provides a placeholder for GitHub authentication that will be
|
|
5
|
+
* implemented in a future release. Currently, it simply returns a skip message
|
|
6
|
+
* indicating that authentication is not yet available.
|
|
7
|
+
*
|
|
8
|
+
* Future implementation will use OAuth device code flow via Authentik.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Attempt GitHub authentication (stub implementation).
|
|
12
|
+
*
|
|
13
|
+
* This is a placeholder that will be replaced with actual OAuth device code
|
|
14
|
+
* flow authentication in a future release.
|
|
15
|
+
*
|
|
16
|
+
* @returns Result indicating authentication was skipped
|
|
17
|
+
*/
|
|
18
|
+
export async function authenticateGitHub() {
|
|
19
|
+
return {
|
|
20
|
+
attempted: false,
|
|
21
|
+
success: false,
|
|
22
|
+
skipped: true,
|
|
23
|
+
message: "GitHub authentication: Skipped (not yet implemented)",
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if user is currently authenticated with GitHub (stub).
|
|
28
|
+
*
|
|
29
|
+
* @returns Always false in stub implementation
|
|
30
|
+
*/
|
|
31
|
+
export function isAuthenticated() {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get the current GitHub user info (stub).
|
|
36
|
+
*
|
|
37
|
+
* @returns null in stub implementation
|
|
38
|
+
*/
|
|
39
|
+
export function getCurrentUser() {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Log out from GitHub (stub).
|
|
44
|
+
*
|
|
45
|
+
* @returns Success result (no-op in stub)
|
|
46
|
+
*/
|
|
47
|
+
export async function logout() {
|
|
48
|
+
return { success: true };
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=github-stub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-stub.js","sourceRoot":"","sources":["../../src/auth/github-stub.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,OAAO;QACL,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,sDAAsD;KAChE,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -2,6 +2,7 @@ import type { Logger } from "../logger.js";
|
|
|
2
2
|
import type { ClientCapabilities } from "../types/capabilities.js";
|
|
3
3
|
import { type ElicitationRequest, type ElicitationResponse, type ElicitationResult } from "./types.js";
|
|
4
4
|
export * from "./types.js";
|
|
5
|
+
export * from "./workflow-helpers.js";
|
|
5
6
|
export interface ElicitationClient {
|
|
6
7
|
elicit(request: ElicitationRequest): Promise<ElicitationResult>;
|
|
7
8
|
hasElicitation(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/elicitation/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAKvB,MAAM,YAAY,CAAC;AAEpB,cAAc,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/elicitation/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAKvB,MAAM,YAAY,CAAC;AAEpB,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AAEtC,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAChE,cAAc,IAAI,OAAO,CAAC;IAC1B,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,CAAC;IAChE,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,kBAAkB,CAAC;IACrE,gCAAgC,CAC9B,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,GAC7C,kBAAkB,CAAC;IACtB,yBAAyB,IAAI,kBAAkB,CAAC;CACjD;AAED,wBAAgB,uBAAuB,CACrC,kBAAkB,EAAE,CAClB,OAAO,EAAE,kBAAkB,KACxB,OAAO,CAAC,mBAAmB,CAAC,EACjC,YAAY,EAAE,kBAAkB,EAChC,MAAM,EAAE,MAAM,GACb,iBAAiB,CA0InB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isElicitationSupported } from "../types/capabilities.js";
|
|
2
2
|
import { ElicitationType, COOKIE_CONSENT_OPTIONS, MODAL_BLOCKING_OPTIONS, AUTH_REQUIRED_OPTIONS, } from "./types.js";
|
|
3
3
|
export * from "./types.js";
|
|
4
|
+
export * from "./workflow-helpers.js";
|
|
4
5
|
export function createElicitationClient(requestElicitation, capabilities, logger) {
|
|
5
6
|
const hasElicitationCapability = isElicitationSupported(capabilities);
|
|
6
7
|
async function elicit(request) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/elicitation/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAIL,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB,cAAc,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/elicitation/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAIL,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AAatC,MAAM,UAAU,uBAAuB,CACrC,kBAEiC,EACjC,YAAgC,EAChC,MAAc;IAEd,MAAM,wBAAwB,GAAG,sBAAsB,CAAC,YAAY,CAAC,CAAC;IAEtE,KAAK,UAAU,MAAM,CACnB,OAA2B;QAE3B,6CAA6C;QAC7C,IAAI,OAAO,CAAC,IAAI,KAAK,eAAe,CAAC,YAAY,EAAE,CAAC;YAClD,gDAAgD;YAChD,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAC9C,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAC9B,GAA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AC,CAAC,EAAE,GAAG,CAAC,KAAK;gBAC1G,OAAO,EAAE,sBAAsB;aAChC,CAAC;QACJ,CAAC;QAED,gCAAgC,CAC9B,OAA8C;YAE9C,OAAO;gBACL,IAAI,EAAE,eAAe,CAAC,mBAAmB;gBACzC,KAAK,EAAE,6BAA6B;gBACpC,OAAO,EACL,+EAA+E;gBACjF,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC5C,KAAK,EAAE,GAAG,CAAC,GAAG;oBACd,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE;oBACrC,WAAW,EAAE,GAAG,CAAC,GAAG;iBACrB,CAAC,CAAC;gBACH,WAAW,EAAE,IAAI;aAClB,CAAC;QACJ,CAAC;QAED,yBAAyB;YACvB,OAAO;gBACL,IAAI,EAAE,eAAe,CAAC,YAAY;gBAClC,KAAK,EAAE,yBAAyB;gBAChC,OAAO,EACL,+HAA+H;gBACjI,OAAO,EAAE,qBAAqB;aAC/B,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -3,7 +3,11 @@ export declare enum ElicitationType {
|
|
|
3
3
|
ModalBlocking = "modal_blocking",
|
|
4
4
|
AmbiguousNavigation = "ambiguous_navigation",
|
|
5
5
|
AuthRequired = "auth_required",
|
|
6
|
-
ConfirmAction = "confirm_action"
|
|
6
|
+
ConfirmAction = "confirm_action",
|
|
7
|
+
UrlConfirmation = "url_confirmation",
|
|
8
|
+
FlowSelection = "flow_selection",
|
|
9
|
+
ChangeDescription = "change_description",
|
|
10
|
+
UpdateSelection = "update_selection"
|
|
7
11
|
}
|
|
8
12
|
export interface ElicitationOption {
|
|
9
13
|
value: string;
|
|
@@ -32,4 +36,8 @@ export interface ElicitationResult {
|
|
|
32
36
|
export declare const COOKIE_CONSENT_OPTIONS: ElicitationOption[];
|
|
33
37
|
export declare const MODAL_BLOCKING_OPTIONS: ElicitationOption[];
|
|
34
38
|
export declare const AUTH_REQUIRED_OPTIONS: ElicitationOption[];
|
|
39
|
+
/** Common flow options for initial coverage */
|
|
40
|
+
export declare const FLOW_SELECTION_OPTIONS: ElicitationOption[];
|
|
41
|
+
/** Test update action options */
|
|
42
|
+
export declare const UPDATE_SELECTION_OPTIONS: ElicitationOption[];
|
|
35
43
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/elicitation/types.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,aAAa,mBAAmB;IAChC,aAAa,mBAAmB;IAChC,mBAAmB,yBAAyB;IAC5C,YAAY,kBAAkB;IAC9B,aAAa,mBAAmB;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/elicitation/types.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,aAAa,mBAAmB;IAChC,aAAa,mBAAmB;IAChC,mBAAmB,yBAAyB;IAC5C,YAAY,kBAAkB;IAC9B,aAAa,mBAAmB;IAEhC,eAAe,qBAAqB;IACpC,aAAa,mBAAmB;IAChC,iBAAiB,uBAAuB;IACxC,eAAe,qBAAqB;CACrC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;CACxC;AAGD,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,EAYrD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,EAOrD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAOpD,CAAC;AAIF,+CAA+C;AAC/C,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,EAqBrD,CAAC;AAEF,iCAAiC;AACjC,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,EAGvD,CAAC"}
|
|
@@ -5,6 +5,11 @@ export var ElicitationType;
|
|
|
5
5
|
ElicitationType["AmbiguousNavigation"] = "ambiguous_navigation";
|
|
6
6
|
ElicitationType["AuthRequired"] = "auth_required";
|
|
7
7
|
ElicitationType["ConfirmAction"] = "confirm_action";
|
|
8
|
+
// Workflow elicitation types
|
|
9
|
+
ElicitationType["UrlConfirmation"] = "url_confirmation";
|
|
10
|
+
ElicitationType["FlowSelection"] = "flow_selection";
|
|
11
|
+
ElicitationType["ChangeDescription"] = "change_description";
|
|
12
|
+
ElicitationType["UpdateSelection"] = "update_selection";
|
|
8
13
|
})(ElicitationType || (ElicitationType = {}));
|
|
9
14
|
// Predefined option sets for common scenarios
|
|
10
15
|
export const COOKIE_CONSENT_OPTIONS = [
|
|
@@ -36,4 +41,33 @@ export const AUTH_REQUIRED_OPTIONS = [
|
|
|
36
41
|
description: "Continue without logging in",
|
|
37
42
|
},
|
|
38
43
|
];
|
|
44
|
+
// Workflow-specific option sets
|
|
45
|
+
/** Common flow options for initial coverage */
|
|
46
|
+
export const FLOW_SELECTION_OPTIONS = [
|
|
47
|
+
{
|
|
48
|
+
value: "login",
|
|
49
|
+
label: "Login/Authentication",
|
|
50
|
+
description: "Test login and authentication flows",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
value: "main-journey",
|
|
54
|
+
label: "Main User Journey",
|
|
55
|
+
description: "Test the primary user flow through the application",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
value: "checkout",
|
|
59
|
+
label: "Checkout/Purchase",
|
|
60
|
+
description: "Test shopping cart and payment flows",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
value: "registration",
|
|
64
|
+
label: "User Registration",
|
|
65
|
+
description: "Test signup and account creation flows",
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
/** Test update action options */
|
|
69
|
+
export const UPDATE_SELECTION_OPTIONS = [
|
|
70
|
+
{ value: "all", label: "Apply All", description: "Apply all suggested updates" },
|
|
71
|
+
{ value: "none", label: "Skip All", description: "Don't apply any updates" },
|
|
72
|
+
];
|
|
39
73
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/elicitation/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/elicitation/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAWX;AAXD,WAAY,eAAe;IACzB,mDAAgC,CAAA;IAChC,mDAAgC,CAAA;IAChC,+DAA4C,CAAA;IAC5C,iDAA8B,CAAA;IAC9B,mDAAgC,CAAA;IAChC,6BAA6B;IAC7B,uDAAoC,CAAA;IACpC,mDAAgC,CAAA;IAChC,2DAAwC,CAAA;IACxC,uDAAoC,CAAA;AACtC,CAAC,EAXW,eAAe,KAAf,eAAe,QAW1B;AA8BD,8CAA8C;AAC9C,MAAM,C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AwB;IAC3D,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,6BAA6B,EAAE;IAChF,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,yBAAyB,EAAE;CAC7E,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow-specific elicitation helpers for init, cover, and retest flows.
|
|
3
|
+
*/
|
|
4
|
+
import type { ElicitationClient } from "./index.js";
|
|
5
|
+
import { type ElicitationOption } from "./types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Configuration input for URL confirmation.
|
|
8
|
+
*/
|
|
9
|
+
export interface UrlConfirmationInput {
|
|
10
|
+
/** Prefilled URL (from RepoCheck or user input) */
|
|
11
|
+
url?: string;
|
|
12
|
+
/** Prefilled specs path */
|
|
13
|
+
specsPath?: string;
|
|
14
|
+
/** Default specs path if none provided */
|
|
15
|
+
defaultSpecsPath?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Result from URL confirmation elicitation.
|
|
19
|
+
*/
|
|
20
|
+
export interface UrlConfirmationResult {
|
|
21
|
+
success: boolean;
|
|
22
|
+
url?: string;
|
|
23
|
+
specsPath?: string;
|
|
24
|
+
cancelled?: boolean;
|
|
25
|
+
/** Fallback output when elicitation is not available */
|
|
26
|
+
needsInput?: boolean;
|
|
27
|
+
/** Fallback fields to request from user */
|
|
28
|
+
fallbackFields?: {
|
|
29
|
+
url: {
|
|
30
|
+
label: string;
|
|
31
|
+
prefilled?: string;
|
|
32
|
+
};
|
|
33
|
+
specsPath: {
|
|
34
|
+
label: string;
|
|
35
|
+
prefilled?: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Result from flow selection elicitation.
|
|
41
|
+
*/
|
|
42
|
+
export interface FlowSelectionResult {
|
|
43
|
+
success: boolean;
|
|
44
|
+
flowFocus?: string;
|
|
45
|
+
cancelled?: boolean;
|
|
46
|
+
needsInput?: boolean;
|
|
47
|
+
fallbackOptions?: ElicitationOption[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Result from change description elicitation.
|
|
51
|
+
*/
|
|
52
|
+
export interface ChangeDescriptionResult {
|
|
53
|
+
success: boolean;
|
|
54
|
+
changeDescription?: string;
|
|
55
|
+
cancelled?: boolean;
|
|
56
|
+
needsInput?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Test update suggestion for selection.
|
|
60
|
+
*/
|
|
61
|
+
export interface TestUpdateSuggestion {
|
|
62
|
+
id: string;
|
|
63
|
+
testId: string;
|
|
64
|
+
issue: string;
|
|
65
|
+
suggestedChange: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Result from update selection elicitation.
|
|
69
|
+
*/
|
|
70
|
+
export interface UpdateSelectionResult {
|
|
71
|
+
success: boolean;
|
|
72
|
+
selectedIds?: string[];
|
|
73
|
+
applyAll?: boolean;
|
|
74
|
+
applyNone?: boolean;
|
|
75
|
+
cancelled?: boolean;
|
|
76
|
+
needsInput?: boolean;
|
|
77
|
+
fallbackSuggestions?: TestUpdateSuggestion[];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Create workflow elicitation helpers that wrap the base ElicitationClient.
|
|
81
|
+
*/
|
|
82
|
+
export declare function createWorkflowElicitation(client: ElicitationClient): {
|
|
83
|
+
confirmUrl: (input: UrlConfirmationInput) => Promise<UrlConfirmationResult>;
|
|
84
|
+
selectFlow: () => Promise<FlowSelectionResult>;
|
|
85
|
+
askChanges: () => Promise<ChangeDescriptionResult>;
|
|
86
|
+
selectUpdates: (suggestions: TestUpdateSuggestion[]) => Promise<UpdateSelectionResult>;
|
|
87
|
+
hasElicitation: () => boolean;
|
|
88
|
+
};
|
|
89
|
+
export type WorkflowElicitation = ReturnType<typeof createWorkflowElicitation>;
|
|
90
|
+
//# sourceMappingURL=workflow-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-helpers.d.ts","sourceRoot":"","sources":["../../src/elicitation/workflow-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAGL,KAAK,iBAAiB,EAIvB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,mDAAmD;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2CAA2C;IAC3C,cAAc,CAAC,EAAE;QACf,GAAG,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3C,SAAS,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAClD,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAC9C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB;wBAKxD,oBAAoB,KAC1B,OAAO,CAAC,qBAAqB,CAAC;sBAqFJ,OAAO,CAAC,mBAAmB,CAAC;sBAoC5B,OAAO,CAAC,uBAAuB,CAAC;iCAgD9C,oBAAoB,EAAE,KAClC,OAAO,CAAC,qBAAqB,CAAC;;EAqElC;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow-specific elicitation helpers for init, cover, and retest flows.
|
|
3
|
+
*/
|
|
4
|
+
import { ElicitationType, FLOW_SELECTION_OPTIONS, UPDATE_SELECTION_OPTIONS, } from "./types.js";
|
|
5
|
+
/**
|
|
6
|
+
* Create workflow elicitation helpers that wrap the base ElicitationClient.
|
|
7
|
+
*/
|
|
8
|
+
export function createWorkflowElicitation(client) {
|
|
9
|
+
/**
|
|
10
|
+
* Elicit URL and specs path confirmation for init step 5.
|
|
11
|
+
*/
|
|
12
|
+
async function confirmUrl(input) {
|
|
13
|
+
const defaultSpecs = input.defaultSpecsPath || "./specs";
|
|
14
|
+
// Build the confirmation message
|
|
15
|
+
const prefillInfo = input.url
|
|
16
|
+
? `Detected configuration:\n- URL: ${input.url}\n- Specs: ${input.specsPath || defaultSpecs}`
|
|
17
|
+
: "Please provide the target URL for testing.";
|
|
18
|
+
const request = {
|
|
19
|
+
type: ElicitationType.UrlConfirmation,
|
|
20
|
+
title: "Confirm Target Configuration",
|
|
21
|
+
message: `${prefillInfo}\n\nConfirm or update these settings.`,
|
|
22
|
+
options: [
|
|
23
|
+
{
|
|
24
|
+
value: "confirm",
|
|
25
|
+
label: "Confirm",
|
|
26
|
+
description: "Use these settings",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: "edit",
|
|
30
|
+
label: "Edit",
|
|
31
|
+
description: "Modify the URL or specs path",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
allowCustom: true,
|
|
35
|
+
};
|
|
36
|
+
const result = await client.elicit(request);
|
|
37
|
+
if (!result.success) {
|
|
38
|
+
// Elicitation not available - return fallback
|
|
39
|
+
return {
|
|
40
|
+
success: false,
|
|
41
|
+
needsInput: true,
|
|
42
|
+
fallbackFields: {
|
|
43
|
+
url: { label: "Target URL", prefilled: input.url },
|
|
44
|
+
specsPath: {
|
|
45
|
+
label: "Specs Location",
|
|
46
|
+
prefilled: input.specsPath || defaultSpecs,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (result.cancelled) {
|
|
52
|
+
return { success: true, cancelled: true };
|
|
53
|
+
}
|
|
54
|
+
// If user confirmed, use prefilled values
|
|
55
|
+
if (result.selectedValue === "confirm") {
|
|
56
|
+
return {
|
|
57
|
+
success: true,
|
|
58
|
+
url: input.url || undefined,
|
|
59
|
+
specsPath: input.specsPath || defaultSpecs,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
// If user provided custom values
|
|
63
|
+
if (result.customValue) {
|
|
64
|
+
// Parse custom value - expected format: "url|specsPath" or just "url"
|
|
65
|
+
const parts = result.customValue.split("|");
|
|
66
|
+
return {
|
|
67
|
+
success: true,
|
|
68
|
+
url: parts[0]?.trim() || input.url,
|
|
69
|
+
specsPath: parts[1]?.trim() || input.specsPath || defaultSpecs,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
// Edit selected but no custom value - return as needing input
|
|
73
|
+
return {
|
|
74
|
+
success: false,
|
|
75
|
+
needsInput: true,
|
|
76
|
+
fallbackFields: {
|
|
77
|
+
url: { label: "Target URL", prefilled: input.url },
|
|
78
|
+
specsPath: {
|
|
79
|
+
label: "Specs Location",
|
|
80
|
+
prefilled: input.specsPath || defaultSpecs,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Elicit flow selection for init step 6.
|
|
87
|
+
*/
|
|
88
|
+
async function selectFlow() {
|
|
89
|
+
const request = {
|
|
90
|
+
type: ElicitationType.FlowSelection,
|
|
91
|
+
title: "Select First Flow",
|
|
92
|
+
message: "Which flow should we create tests for first? Select a common flow or enter a custom one.",
|
|
93
|
+
options: FLOW_SELECTION_OPTIONS,
|
|
94
|
+
allowCustom: true,
|
|
95
|
+
};
|
|
96
|
+
const result = await client.elicit(request);
|
|
97
|
+
if (!result.success) {
|
|
98
|
+
return {
|
|
99
|
+
success: false,
|
|
100
|
+
needsInput: true,
|
|
101
|
+
fallbackOptions: FLOW_SELECTION_OPTIONS,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (result.cancelled) {
|
|
105
|
+
return { success: true, cancelled: true };
|
|
106
|
+
}
|
|
107
|
+
// Use custom value if provided, otherwise selected value
|
|
108
|
+
const flowFocus = result.customValue || result.selectedValue;
|
|
109
|
+
return {
|
|
110
|
+
success: true,
|
|
111
|
+
flowFocus,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Elicit change description for retest step 1.
|
|
116
|
+
*/
|
|
117
|
+
async function askChanges() {
|
|
118
|
+
const request = {
|
|
119
|
+
type: ElicitationType.ChangeDescription,
|
|
120
|
+
title: "What's Changed?",
|
|
121
|
+
message: "Describe what was implemented lately to identify which tests to run.\n\nExamples:\n- 'Added password reset flow'\n- 'Updated checkout validation'\n- 'Fixed login error handling'",
|
|
122
|
+
options: [
|
|
123
|
+
{
|
|
124
|
+
value: "all",
|
|
125
|
+
label: "Run All Tests",
|
|
126
|
+
description: "Run the complete test suite",
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
allowCustom: true,
|
|
130
|
+
};
|
|
131
|
+
const result = await client.elicit(request);
|
|
132
|
+
if (!result.success) {
|
|
133
|
+
return {
|
|
134
|
+
success: false,
|
|
135
|
+
needsInput: true,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
if (result.cancelled) {
|
|
139
|
+
return { success: true, cancelled: true };
|
|
140
|
+
}
|
|
141
|
+
// If "all" selected, return special value
|
|
142
|
+
if (result.selectedValue === "all") {
|
|
143
|
+
return {
|
|
144
|
+
success: true,
|
|
145
|
+
changeDescription: "__RUN_ALL__",
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
// Use custom description
|
|
149
|
+
return {
|
|
150
|
+
success: true,
|
|
151
|
+
changeDescription: result.customValue || result.selectedValue,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Elicit update selection for retest step 5.
|
|
156
|
+
*/
|
|
157
|
+
async function selectUpdates(suggestions) {
|
|
158
|
+
if (suggestions.length === 0) {
|
|
159
|
+
return { success: true, applyNone: true };
|
|
160
|
+
}
|
|
161
|
+
// Build options from suggestions
|
|
162
|
+
const suggestionOptions = suggestions.map((s, i) => ({
|
|
163
|
+
value: s.id,
|
|
164
|
+
label: `${i + 1}. ${s.testId}`,
|
|
165
|
+
description: `${s.issue} → ${s.suggestedChange}`,
|
|
166
|
+
}));
|
|
167
|
+
// Combine with bulk options
|
|
168
|
+
const allOptions = [...UPDATE_SELECTION_OPTIONS, ...suggestionOptions];
|
|
169
|
+
const request = {
|
|
170
|
+
type: ElicitationType.UpdateSelection,
|
|
171
|
+
title: "Apply Test Updates?",
|
|
172
|
+
message: `${suggestions.length} test update(s) suggested.\n\nSelect which updates to apply, or choose 'Apply All' / 'Skip All'.`,
|
|
173
|
+
options: allOptions,
|
|
174
|
+
allowCustom: true,
|
|
175
|
+
};
|
|
176
|
+
const result = await client.elicit(request);
|
|
177
|
+
if (!result.success) {
|
|
178
|
+
return {
|
|
179
|
+
success: false,
|
|
180
|
+
needsInput: true,
|
|
181
|
+
fallbackSuggestions: suggestions,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
if (result.cancelled) {
|
|
185
|
+
return { success: true, cancelled: true };
|
|
186
|
+
}
|
|
187
|
+
if (result.selectedValue === "all") {
|
|
188
|
+
return {
|
|
189
|
+
success: true,
|
|
190
|
+
applyAll: true,
|
|
191
|
+
selectedIds: suggestions.map((s) => s.id),
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
if (result.selectedValue === "none") {
|
|
195
|
+
return { success: true, applyNone: true };
|
|
196
|
+
}
|
|
197
|
+
// Parse selected IDs (could be comma-separated or single)
|
|
198
|
+
const selectedValue = result.customValue || result.selectedValue || "";
|
|
199
|
+
const selectedIds = selectedValue
|
|
200
|
+
.split(",")
|
|
201
|
+
.map((s) => s.trim())
|
|
202
|
+
.filter(Boolean);
|
|
203
|
+
return {
|
|
204
|
+
success: true,
|
|
205
|
+
selectedIds,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
confirmUrl,
|
|
210
|
+
selectFlow,
|
|
211
|
+
askChanges,
|
|
212
|
+
selectUpdates,
|
|
213
|
+
hasElicitation: client.hasElicitation,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=workflow-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-helpers.js","sourceRoot":"","sources":["../../src/elicitation/workflow-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAIL,eAAe,EACf,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AA2EpB;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAyB;IACjE;;OAEG;IACH,KAAK,UAAU,UAAU,CACvB,KAA2B;QAE3B,MAAM,YAAY,GAAG,KAAK,CAAC,gBAAgB,IAAI,SAAS,CAAC;QAEzD,iCAAiC;QACjC,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG;YAC3B,CAAC,CAAC,mCAAmC,KAAK,CAAC,GAAG,cAAc,KAAK,CAAC,SAAS,IAAI,YAAY,EAAE;YAC7F,CAAC,CAAC,4CAA4C,CAAC;QAEjD,MAAM,OAAO,GAAuB;YAClC,IAAI,EAAE,eAAe,CAAC,eAAe;YACrC,KAAK,EAAE,8BAA8B;YACrC,OAAO,EAAE,GAAG,WAAW,uCAAuC;YAC9D,OAAO,EAAE;gBACP;oBACE,KAAK,EAAE,SAAS;oBAChB,KAAK,EAAE,SAAS;oBAChB,WAAW,EAAE,oBAAoB;iBAClC;gBACD;oBACE,KAAK,EAAE,MAAM;oBACb,KAAK,EAAE,MAAM;oBACb,WAAW,EAAE,8BAA8B;iBAC5C;aACF;YACD,WAAW,EAAE,IAAI;SAClB,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAE5C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,8CAA8C;YAC9C,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,UAAU,EAAE,IAAI;gBAChB,cAAc,EAAE;oBACd,GAAG,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,KA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/prompts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAkBzD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC,CAAC;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;QACvD,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAC3B,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KACzC,CAAC,CAAC,CAAC;CACL;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,aAAa,GAC9B,SAAS,EAAE,CAuab"}
|