@probelabs/visor 0.1.92 → 0.1.94
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/defaults/.visor.yaml +15 -16
- package/dist/check-execution-engine.d.ts +11 -0
- package/dist/check-execution-engine.d.ts.map +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/defaults/.visor.yaml +15 -16
- package/dist/index.js +587 -646
- package/dist/liquid-extensions.d.ts +12 -0
- package/dist/liquid-extensions.d.ts.map +1 -1
- package/dist/output/issue-assistant/schema.json +14 -1
- package/dist/providers/command-check-provider.d.ts.map +1 -1
- package/dist/providers/log-check-provider.d.ts.map +1 -1
- package/dist/providers/memory-check-provider.d.ts.map +1 -1
- package/dist/reviewer.d.ts +8 -0
- package/dist/reviewer.d.ts.map +1 -1
- package/dist/sdk/{check-execution-engine-L73PFZQY.mjs → check-execution-engine-YBRPVUWD.mjs} +3 -3
- package/dist/sdk/{chunk-LJHRU3WQ.mjs → chunk-DQRFOQAP.mjs} +160 -41
- package/dist/sdk/chunk-DQRFOQAP.mjs.map +1 -0
- package/dist/sdk/{chunk-2U6BIWSY.mjs → chunk-I3GQJIR7.mjs} +14 -10
- package/dist/sdk/chunk-I3GQJIR7.mjs.map +1 -0
- package/dist/sdk/{liquid-extensions-AFKRYROF.mjs → liquid-extensions-GMEGEGC3.mjs} +6 -2
- package/dist/sdk/sdk.d.mts +11 -2
- package/dist/sdk/sdk.d.ts +11 -2
- package/dist/sdk/sdk.js +202 -50
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +36 -7
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/sdk.d.ts +11 -2
- package/dist/sdk.d.ts.map +1 -1
- package/dist/traces/{run-2025-10-15T07-21-47-696Z.ndjson → run-2025-10-16T11-33-32-682Z.ndjson} +19 -3
- package/dist/traces/{run-2025-10-15T07-21-58-106Z.ndjson → run-2025-10-16T11-33-43-618Z.ndjson} +19 -3
- package/dist/traces/{run-2025-10-15T07-21-58-693Z.ndjson → run-2025-10-16T11-33-44-157Z.ndjson} +19 -3
- package/dist/traces/{run-2025-10-15T07-21-59-167Z.ndjson → run-2025-10-16T11-33-44-647Z.ndjson} +19 -3
- package/dist/traces/{run-2025-10-15T07-21-59-629Z.ndjson → run-2025-10-16T11-33-45-128Z.ndjson} +4 -0
- package/package.json +2 -2
- package/dist/sdk/chunk-2U6BIWSY.mjs.map +0 -1
- package/dist/sdk/chunk-LJHRU3WQ.mjs.map +0 -1
- /package/dist/sdk/{check-execution-engine-L73PFZQY.mjs.map → check-execution-engine-YBRPVUWD.mjs.map} +0 -0
- /package/dist/sdk/{liquid-extensions-AFKRYROF.mjs.map → liquid-extensions-GMEGEGC3.mjs.map} +0 -0
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { Liquid, TagToken, Context, TopLevelToken, Tag, Emitter } from 'liquidjs';
|
|
2
|
+
/**
|
|
3
|
+
* Sanitize label strings to only allow [A-Za-z0-9:/] characters
|
|
4
|
+
* @param value - Label value to sanitize
|
|
5
|
+
* @returns Sanitized label string
|
|
6
|
+
*/
|
|
7
|
+
export declare function sanitizeLabel(value: unknown): string;
|
|
8
|
+
/**
|
|
9
|
+
* Sanitize an array of labels
|
|
10
|
+
* @param labels - Array of label values
|
|
11
|
+
* @returns Array of sanitized, non-empty label strings
|
|
12
|
+
*/
|
|
13
|
+
export declare function sanitizeLabelList(labels: unknown): string[];
|
|
2
14
|
/**
|
|
3
15
|
* Custom ReadFile tag for Liquid templates
|
|
4
16
|
* Usage: {% readfile "path/to/file.txt" %}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/liquid-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,EAAS,OAAO,EAAE,MAAM,UAAU,CAAC;A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G,EAAE;IAAE,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,EACnC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA6FlE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,MAAM,CAUlF"}
|
|
@@ -22,7 +22,20 @@
|
|
|
22
22
|
"labels": {
|
|
23
23
|
"type": "array",
|
|
24
24
|
"description": "Optional labels to apply (only respected on issue_opened)",
|
|
25
|
-
"items": {
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"bug",
|
|
29
|
+
"chore",
|
|
30
|
+
"documentation",
|
|
31
|
+
"enhancement",
|
|
32
|
+
"feature",
|
|
33
|
+
"question",
|
|
34
|
+
"wontfix",
|
|
35
|
+
"invalid",
|
|
36
|
+
"duplicate"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
26
39
|
}
|
|
27
40
|
},
|
|
28
41
|
"additionalProperties": true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/command-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAe,MAAM,aAAa,CAAC;AAWzD;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;IACrD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAC,CAAU;;IAY1B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAejD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAC7C,OAAO,CAAC,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"command-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/command-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAe,MAAM,aAAa,CAAC;AAWzD;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;IACrD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAC,CAAU;;IAY1B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAejD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAC7C,OAAO,CAAC,aAAa,CAAC;IAq4BzB,OAAO,CAAC,kBAAkB;IAgC1B;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAgFrB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAwB1B,OAAO,CAAC,mBAAmB;IAiD3B,OAAO,CAAC,iBAAiB;IAmBzB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,2BAA2B;IAgBnC,sBAAsB,IAAI,MAAM,EAAE;IAgB5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAKrC,eAAe,IAAI,MAAM,EAAE;IAQ3B,OAAO,CAAC,uBAAuB;IAoF/B,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,cAAc;IAmEtB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,QAAQ;YAWF,qBAAqB;IAwCnC,OAAO,CAAC,uBAAuB;CAqChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/log-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAK5C;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,OAAO,CAAC,MAAM,CAAS;;IAUvB,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAyBjD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC9C,YAAY,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAClE,OAAO,CAAC,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"log-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/log-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAK5C;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,OAAO,CAAC,MAAM,CAAS;;IAUvB,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAyBjD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC9C,YAAY,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAClE,OAAO,CAAC,aAAa,CAAC;IA4CzB,OAAO,CAAC,oBAAoB;IA+E5B,OAAO,CAAC,eAAe;IAyDvB,OAAO,CAAC,aAAa;IAerB,sBAAsB,IAAI,MAAM,EAAE;IAgB5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAKrC,eAAe,IAAI,MAAM,EAAE;CAM5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/memory-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO5C;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,KAAK,GACL,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,OAAO,GACP,MAAM,GACN,SAAS,CAAC;AAEd;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,aAAa;IACpD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAC,CAAU;;IAU1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAkE3B,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IA+CjD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC9C,YAAY,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAClE,OAAO,CAAC,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"memory-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/memory-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO5C;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,KAAK,GACL,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,OAAO,GACP,MAAM,GACN,SAAS,CAAC;AAEd;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,aAAa;IACpD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAC,CAAU;;IAU1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAkE3B,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IA+CjD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC9C,YAAY,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAClE,OAAO,CAAC,aAAa,CAAC;YAuEX,SAAS;YAQT,SAAS;YAeT,YAAY;YAgBZ,eAAe;YAyBf,YAAY;YAYZ,WAAW;YAKX,UAAU;YAMV,YAAY;IAoI1B;;OAEG;YACW,YAAY;IA8B1B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA2B1B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IA8B/B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAoE5B,sBAAsB,IAAI,MAAM,EAAE;IAsB5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAKrC,eAAe,IAAI,MAAM,EAAE;CAM5B"}
|
package/dist/reviewer.d.ts
CHANGED
|
@@ -62,6 +62,14 @@ export declare class PRReviewer {
|
|
|
62
62
|
private aiReviewService;
|
|
63
63
|
constructor(octokit: Octokit);
|
|
64
64
|
reviewPR(owner: string, repo: string, prNumber: number, prInfo: PRInfo, options?: ReviewOptions): Promise<GroupedCheckResults>;
|
|
65
|
+
/**
|
|
66
|
+
* Helper to check if a schema definition has a "text" field in its properties
|
|
67
|
+
*/
|
|
68
|
+
private schemaHasTextField;
|
|
69
|
+
/**
|
|
70
|
+
* Filter check results to only include those that should post GitHub comments
|
|
71
|
+
*/
|
|
72
|
+
private filterCommentGeneratingChecks;
|
|
65
73
|
postReviewComment(owner: string, repo: string, prNumber: number, groupedResults: GroupedCheckResults, options?: ReviewOptions & {
|
|
66
74
|
commentId?: string;
|
|
67
75
|
triggeredBy?: string;
|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IACjD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,gBAAgB,EAAE,WAAW,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,SAAS,CAAC,EAAE,OAAO,gBAAgB,EAAE,SAAS,CAAC;CAChD;AAED,qBAAa,UAAU;IAIT,OAAO,CAAC,OAAO;IAH3B,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,eAAe,CAAkB;gBAErB,OAAO,EAAE,OAAO;IAK9B,QAAQ,CACZ,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,mBAAmB,CAAC;IA0B/B;;OAEG;YACW,kBAAkB;IAsChC;;OAEG;YACW,6BAA6B;IA6CrC,iBAAiB,CACrB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,mBAAmB,EACnC,OAAO,GAAE,aAAa,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GAC7F,OAAO,CAAC,IAAI,CAAC;YA+CF,kBAAkB;IA8ChC,OAAO,CAAC,kBAAkB;IAkF1B,OAAO,CAAC,iBAAiB;CAyC1B"}
|
package/dist/sdk/{check-execution-engine-L73PFZQY.mjs → check-execution-engine-YBRPVUWD.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CheckExecutionEngine
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DQRFOQAP.mjs";
|
|
4
4
|
import "./chunk-KVHVCGY6.mjs";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-I3GQJIR7.mjs";
|
|
6
6
|
import "./chunk-TWJKAYT6.mjs";
|
|
7
7
|
import "./chunk-WMJKH4XE.mjs";
|
|
8
8
|
export {
|
|
9
9
|
CheckExecutionEngine
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=check-execution-engine-
|
|
11
|
+
//# sourceMappingURL=check-execution-engine-YBRPVUWD.mjs.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
logger,
|
|
12
12
|
logger_exports,
|
|
13
13
|
resolveAssociationFromEvent
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-I3GQJIR7.mjs";
|
|
15
15
|
import {
|
|
16
16
|
addEvent,
|
|
17
17
|
addFailIfTriggered,
|
|
@@ -2178,7 +2178,7 @@ var PRReviewer = class {
|
|
|
2178
2178
|
async reviewPR(owner, repo, prNumber, prInfo, options = {}) {
|
|
2179
2179
|
const { debug = false, config, checks } = options;
|
|
2180
2180
|
if (config && checks && checks.length > 0) {
|
|
2181
|
-
const { CheckExecutionEngine: CheckExecutionEngine2 } = await import("./check-execution-engine-
|
|
2181
|
+
const { CheckExecutionEngine: CheckExecutionEngine2 } = await import("./check-execution-engine-YBRPVUWD.mjs");
|
|
2182
2182
|
const engine = new CheckExecutionEngine2();
|
|
2183
2183
|
const { results } = await engine.executeGroupedChecks(
|
|
2184
2184
|
prInfo,
|
|
@@ -2197,14 +2197,66 @@ var PRReviewer = class {
|
|
|
2197
2197
|
"No configuration provided. Please create a .visor.yaml file with check definitions. Built-in prompts have been removed - all checks must be explicitly configured."
|
|
2198
2198
|
);
|
|
2199
2199
|
}
|
|
2200
|
+
/**
|
|
2201
|
+
* Helper to check if a schema definition has a "text" field in its properties
|
|
2202
|
+
*/
|
|
2203
|
+
async schemaHasTextField(schema) {
|
|
2204
|
+
try {
|
|
2205
|
+
let schemaObj;
|
|
2206
|
+
if (typeof schema === "object") {
|
|
2207
|
+
schemaObj = schema;
|
|
2208
|
+
} else {
|
|
2209
|
+
const fs5 = __require("fs").promises;
|
|
2210
|
+
const path5 = __require("path");
|
|
2211
|
+
const sanitizedSchemaName = schema.replace(/[^a-zA-Z0-9-]/g, "");
|
|
2212
|
+
if (!sanitizedSchemaName || sanitizedSchemaName !== schema) {
|
|
2213
|
+
return false;
|
|
2214
|
+
}
|
|
2215
|
+
const schemaPath = path5.join(process.cwd(), "output", sanitizedSchemaName, "schema.json");
|
|
2216
|
+
try {
|
|
2217
|
+
const schemaContent = await fs5.readFile(schemaPath, "utf-8");
|
|
2218
|
+
schemaObj = JSON.parse(schemaContent);
|
|
2219
|
+
} catch {
|
|
2220
|
+
return false;
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
const properties = schemaObj.properties;
|
|
2224
|
+
return !!(properties && "text" in properties);
|
|
2225
|
+
} catch {
|
|
2226
|
+
return false;
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2229
|
+
/**
|
|
2230
|
+
* Filter check results to only include those that should post GitHub comments
|
|
2231
|
+
*/
|
|
2232
|
+
async filterCommentGeneratingChecks(checkResults, config) {
|
|
2233
|
+
const filtered = [];
|
|
2234
|
+
for (const r of checkResults) {
|
|
2235
|
+
const cfg = config.checks?.[r.checkName];
|
|
2236
|
+
const type = cfg?.type || "ai";
|
|
2237
|
+
const schema = cfg?.schema;
|
|
2238
|
+
let shouldPostComment = false;
|
|
2239
|
+
const isAICheck = type === "ai" || type === "claude-code";
|
|
2240
|
+
if (!schema || schema === "") {
|
|
2241
|
+
shouldPostComment = isAICheck;
|
|
2242
|
+
} else if (typeof schema === "string") {
|
|
2243
|
+
if (schema === "text" || schema === "plain") {
|
|
2244
|
+
shouldPostComment = true;
|
|
2245
|
+
} else {
|
|
2246
|
+
shouldPostComment = await this.schemaHasTextField(schema);
|
|
2247
|
+
}
|
|
2248
|
+
} else if (typeof schema === "object") {
|
|
2249
|
+
shouldPostComment = await this.schemaHasTextField(schema);
|
|
2250
|
+
}
|
|
2251
|
+
if (shouldPostComment) {
|
|
2252
|
+
filtered.push(r);
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
return filtered;
|
|
2256
|
+
}
|
|
2200
2257
|
async postReviewComment(owner, repo, prNumber, groupedResults, options = {}) {
|
|
2201
2258
|
for (const [groupName, checkResults] of Object.entries(groupedResults)) {
|
|
2202
|
-
const filteredResults = options.config ? checkResults.
|
|
2203
|
-
const cfg = options.config.checks?.[r.checkName];
|
|
2204
|
-
const t = cfg?.type || "";
|
|
2205
|
-
const isGitHubOps = t === "github" || r.group === "github" || t === "noop" || t === "command";
|
|
2206
|
-
return !isGitHubOps;
|
|
2207
|
-
}) : checkResults;
|
|
2259
|
+
const filteredResults = options.config ? await this.filterCommentGeneratingChecks(checkResults, options.config) : checkResults;
|
|
2208
2260
|
if (!filteredResults || filteredResults.length === 0) {
|
|
2209
2261
|
continue;
|
|
2210
2262
|
}
|
|
@@ -4167,7 +4219,8 @@ var LogCheckProvider = class extends CheckProvider {
|
|
|
4167
4219
|
dependencyResults,
|
|
4168
4220
|
includePrContext,
|
|
4169
4221
|
includeDependencies,
|
|
4170
|
-
includeMetadata
|
|
4222
|
+
includeMetadata,
|
|
4223
|
+
config.__outputHistory
|
|
4171
4224
|
);
|
|
4172
4225
|
const renderedMessage = await this.liquid.parseAndRender(message, templateContext);
|
|
4173
4226
|
const logOutput = this.formatLogOutput(
|
|
@@ -4188,7 +4241,7 @@ var LogCheckProvider = class extends CheckProvider {
|
|
|
4188
4241
|
logOutput
|
|
4189
4242
|
};
|
|
4190
4243
|
}
|
|
4191
|
-
buildTemplateContext(prInfo, dependencyResults, _includePrContext = true, _includeDependencies = true, includeMetadata = true) {
|
|
4244
|
+
buildTemplateContext(prInfo, dependencyResults, _includePrContext = true, _includeDependencies = true, includeMetadata = true, outputHistory) {
|
|
4192
4245
|
const context = {};
|
|
4193
4246
|
context.pr = {
|
|
4194
4247
|
number: prInfo.number,
|
|
@@ -4212,6 +4265,7 @@ var LogCheckProvider = class extends CheckProvider {
|
|
|
4212
4265
|
if (dependencyResults) {
|
|
4213
4266
|
const dependencies = {};
|
|
4214
4267
|
const outputs = {};
|
|
4268
|
+
const history = {};
|
|
4215
4269
|
context.dependencyCount = dependencyResults.size;
|
|
4216
4270
|
for (const [checkName, result] of dependencyResults.entries()) {
|
|
4217
4271
|
dependencies[checkName] = {
|
|
@@ -4222,6 +4276,12 @@ var LogCheckProvider = class extends CheckProvider {
|
|
|
4222
4276
|
const summary = result;
|
|
4223
4277
|
outputs[checkName] = summary.output !== void 0 ? summary.output : summary;
|
|
4224
4278
|
}
|
|
4279
|
+
if (outputHistory) {
|
|
4280
|
+
for (const [checkName, historyArray] of outputHistory) {
|
|
4281
|
+
history[checkName] = historyArray;
|
|
4282
|
+
}
|
|
4283
|
+
}
|
|
4284
|
+
outputs.history = history;
|
|
4225
4285
|
context.dependencies = dependencies;
|
|
4226
4286
|
context.outputs = outputs;
|
|
4227
4287
|
}
|
|
@@ -5093,7 +5153,10 @@ var CommandCheckProvider = class extends CheckProvider {
|
|
|
5093
5153
|
},
|
|
5094
5154
|
files: prInfo.files,
|
|
5095
5155
|
fileCount: prInfo.files.length,
|
|
5096
|
-
outputs: this.buildOutputContext(
|
|
5156
|
+
outputs: this.buildOutputContext(
|
|
5157
|
+
dependencyResults,
|
|
5158
|
+
config.__outputHistory
|
|
5159
|
+
),
|
|
5097
5160
|
env: this.getSafeEnvironmentVariables()
|
|
5098
5161
|
};
|
|
5099
5162
|
logger.debug(
|
|
@@ -5819,16 +5882,23 @@ ${stderrOutput}` : `Command execution failed: ${errorMessage}`;
|
|
|
5819
5882
|
};
|
|
5820
5883
|
}
|
|
5821
5884
|
}
|
|
5822
|
-
buildOutputContext(dependencyResults) {
|
|
5885
|
+
buildOutputContext(dependencyResults, outputHistory) {
|
|
5823
5886
|
if (!dependencyResults) {
|
|
5824
5887
|
return {};
|
|
5825
5888
|
}
|
|
5826
5889
|
const outputs = {};
|
|
5890
|
+
const history = {};
|
|
5827
5891
|
for (const [checkName, result] of dependencyResults) {
|
|
5828
5892
|
const summary = result;
|
|
5829
5893
|
const value = summary.output !== void 0 ? summary.output : summary;
|
|
5830
5894
|
outputs[checkName] = this.makeJsonSmart(value);
|
|
5831
5895
|
}
|
|
5896
|
+
if (outputHistory) {
|
|
5897
|
+
for (const [checkName, historyArray] of outputHistory) {
|
|
5898
|
+
history[checkName] = historyArray.map((val) => this.makeJsonSmart(val));
|
|
5899
|
+
}
|
|
5900
|
+
}
|
|
5901
|
+
outputs.history = history;
|
|
5832
5902
|
return outputs;
|
|
5833
5903
|
}
|
|
5834
5904
|
/**
|
|
@@ -6377,7 +6447,12 @@ var MemoryCheckProvider = class extends CheckProvider {
|
|
|
6377
6447
|
const key = config.key;
|
|
6378
6448
|
const namespace = config.namespace;
|
|
6379
6449
|
const memoryStore = MemoryStore.getInstance();
|
|
6380
|
-
const templateContext = this.buildTemplateContext(
|
|
6450
|
+
const templateContext = this.buildTemplateContext(
|
|
6451
|
+
prInfo,
|
|
6452
|
+
dependencyResults,
|
|
6453
|
+
memoryStore,
|
|
6454
|
+
config.__outputHistory
|
|
6455
|
+
);
|
|
6381
6456
|
let result;
|
|
6382
6457
|
try {
|
|
6383
6458
|
switch (operation) {
|
|
@@ -6660,7 +6735,7 @@ var MemoryCheckProvider = class extends CheckProvider {
|
|
|
6660
6735
|
/**
|
|
6661
6736
|
* Build template context for Liquid and JS evaluation
|
|
6662
6737
|
*/
|
|
6663
|
-
buildTemplateContext(prInfo, dependencyResults, memoryStore) {
|
|
6738
|
+
buildTemplateContext(prInfo, dependencyResults, memoryStore, outputHistory) {
|
|
6664
6739
|
const context = {};
|
|
6665
6740
|
context.pr = {
|
|
6666
6741
|
number: prInfo.number,
|
|
@@ -6679,14 +6754,21 @@ var MemoryCheckProvider = class extends CheckProvider {
|
|
|
6679
6754
|
changes: f.changes
|
|
6680
6755
|
}))
|
|
6681
6756
|
};
|
|
6757
|
+
const outputs = {};
|
|
6758
|
+
const history = {};
|
|
6682
6759
|
if (dependencyResults) {
|
|
6683
|
-
const outputs = {};
|
|
6684
6760
|
for (const [checkName, result] of dependencyResults.entries()) {
|
|
6685
6761
|
const summary = result;
|
|
6686
6762
|
outputs[checkName] = summary.output !== void 0 ? summary.output : summary;
|
|
6687
6763
|
}
|
|
6688
|
-
context.outputs = outputs;
|
|
6689
6764
|
}
|
|
6765
|
+
if (outputHistory) {
|
|
6766
|
+
for (const [checkName, historyArray] of outputHistory) {
|
|
6767
|
+
history[checkName] = historyArray;
|
|
6768
|
+
}
|
|
6769
|
+
}
|
|
6770
|
+
outputs.history = history;
|
|
6771
|
+
context.outputs = outputs;
|
|
6690
6772
|
if (memoryStore) {
|
|
6691
6773
|
context.memory = {
|
|
6692
6774
|
get: (key, ns) => memoryStore.get(key, ns),
|
|
@@ -8263,6 +8345,8 @@ var CheckExecutionEngine = class _CheckExecutionEngine {
|
|
|
8263
8345
|
webhookContext;
|
|
8264
8346
|
routingSandbox;
|
|
8265
8347
|
executionStats = /* @__PURE__ */ new Map();
|
|
8348
|
+
// Track history of all outputs for each check (useful for loops and goto)
|
|
8349
|
+
outputHistory = /* @__PURE__ */ new Map();
|
|
8266
8350
|
// Event override to simulate alternate event (used during routing goto)
|
|
8267
8351
|
routingEventOverride;
|
|
8268
8352
|
// Cached GitHub context for context elevation when running in Actions
|
|
@@ -8282,6 +8366,18 @@ var CheckExecutionEngine = class _CheckExecutionEngine {
|
|
|
8282
8366
|
this.mockOctokit = this.createMockOctokit();
|
|
8283
8367
|
this.reviewer = new PRReviewer(this.mockOctokit);
|
|
8284
8368
|
}
|
|
8369
|
+
/**
|
|
8370
|
+
* Enrich event context with authenticated octokit instance
|
|
8371
|
+
* @param eventContext - The event context to enrich
|
|
8372
|
+
* @returns Enriched event context with octokit if available
|
|
8373
|
+
*/
|
|
8374
|
+
enrichEventContext(eventContext) {
|
|
8375
|
+
const baseContext = eventContext || {};
|
|
8376
|
+
if (this.actionContext?.octokit) {
|
|
8377
|
+
return { ...baseContext, octokit: this.actionContext.octokit };
|
|
8378
|
+
}
|
|
8379
|
+
return baseContext;
|
|
8380
|
+
}
|
|
8285
8381
|
/**
|
|
8286
8382
|
* Lazily create a secure sandbox for routing JS (goto_js, run_js)
|
|
8287
8383
|
*/
|
|
@@ -8481,10 +8577,6 @@ ${expr}
|
|
|
8481
8577
|
const providerType = targetCfg.type || "ai";
|
|
8482
8578
|
const prov = this.providerRegistry.getProviderOrThrow(providerType);
|
|
8483
8579
|
this.setProviderWebhookContext(prov);
|
|
8484
|
-
const enrichedEventContext = {
|
|
8485
|
-
...prInfo.eventContext,
|
|
8486
|
-
...this.actionContext?.octokit ? { octokit: this.actionContext.octokit } : {}
|
|
8487
|
-
};
|
|
8488
8580
|
const provCfg = {
|
|
8489
8581
|
type: providerType,
|
|
8490
8582
|
prompt: targetCfg.prompt,
|
|
@@ -8493,11 +8585,13 @@ ${expr}
|
|
|
8493
8585
|
schema: targetCfg.schema,
|
|
8494
8586
|
group: targetCfg.group,
|
|
8495
8587
|
checkName: target,
|
|
8496
|
-
eventContext:
|
|
8588
|
+
eventContext: this.enrichEventContext(prInfo.eventContext),
|
|
8497
8589
|
transform: targetCfg.transform,
|
|
8498
8590
|
transform_js: targetCfg.transform_js,
|
|
8499
8591
|
env: targetCfg.env,
|
|
8500
8592
|
forEach: targetCfg.forEach,
|
|
8593
|
+
// Pass output history for loop/goto scenarios
|
|
8594
|
+
__outputHistory: this.outputHistory,
|
|
8501
8595
|
// Include provider-specific keys (e.g., op/values for github)
|
|
8502
8596
|
...targetCfg,
|
|
8503
8597
|
ai: {
|
|
@@ -8565,6 +8659,10 @@ ${expr}
|
|
|
8565
8659
|
timestamp: Date.now()
|
|
8566
8660
|
}));
|
|
8567
8661
|
const enriched = { ...r, issues: enrichedIssues };
|
|
8662
|
+
const enrichedWithOutput = enriched;
|
|
8663
|
+
if (enrichedWithOutput.output !== void 0) {
|
|
8664
|
+
this.trackOutputHistory(target, enrichedWithOutput.output);
|
|
8665
|
+
}
|
|
8568
8666
|
resultsMap?.set(target, enriched);
|
|
8569
8667
|
if (debug) log2(`\u{1F527} Debug: inline executed '${target}', issues: ${enrichedIssues.length}`);
|
|
8570
8668
|
return enriched;
|
|
@@ -9134,8 +9232,7 @@ ${expr}
|
|
|
9134
9232
|
const providerConfig = {
|
|
9135
9233
|
type: checks[0],
|
|
9136
9234
|
prompt: "all",
|
|
9137
|
-
eventContext: prInfo.eventContext,
|
|
9138
|
-
// Pass event context for templates
|
|
9235
|
+
eventContext: this.enrichEventContext(prInfo.eventContext),
|
|
9139
9236
|
ai: timeout ? { timeout } : void 0
|
|
9140
9237
|
};
|
|
9141
9238
|
const result = await provider.execute(prInfo, providerConfig);
|
|
@@ -9169,8 +9266,7 @@ ${expr}
|
|
|
9169
9266
|
type: "ai",
|
|
9170
9267
|
prompt: focus2,
|
|
9171
9268
|
focus: focus2,
|
|
9172
|
-
eventContext: prInfo.eventContext,
|
|
9173
|
-
// Pass event context for templates
|
|
9269
|
+
eventContext: this.enrichEventContext(prInfo.eventContext),
|
|
9174
9270
|
ai: timeout ? { timeout } : void 0,
|
|
9175
9271
|
// Inherit global AI provider and model settings if config is available
|
|
9176
9272
|
ai_provider: config?.ai_provider,
|
|
@@ -9325,8 +9421,7 @@ ${expr}
|
|
|
9325
9421
|
focus: checkConfig.focus || this.mapCheckNameToFocus(checkName),
|
|
9326
9422
|
schema: checkConfig.schema,
|
|
9327
9423
|
group: checkConfig.group,
|
|
9328
|
-
eventContext: prInfo.eventContext,
|
|
9329
|
-
// Pass event context for templates
|
|
9424
|
+
eventContext: this.enrichEventContext(prInfo.eventContext),
|
|
9330
9425
|
ai: {
|
|
9331
9426
|
timeout: timeout || 6e5,
|
|
9332
9427
|
debug,
|
|
@@ -9336,6 +9431,8 @@ ${expr}
|
|
|
9336
9431
|
ai_model: checkConfig.ai_model || config.ai_model,
|
|
9337
9432
|
// Pass claude_code config if present
|
|
9338
9433
|
claude_code: checkConfig.claude_code,
|
|
9434
|
+
// Pass output history for loop/goto scenarios
|
|
9435
|
+
__outputHistory: this.outputHistory,
|
|
9339
9436
|
// Pass any provider-specific config
|
|
9340
9437
|
...checkConfig
|
|
9341
9438
|
};
|
|
@@ -9372,10 +9469,14 @@ ${expr}
|
|
|
9372
9469
|
}
|
|
9373
9470
|
}
|
|
9374
9471
|
const content = await this.renderCheckContent(checkName, result, checkConfig, prInfo);
|
|
9472
|
+
let group = checkConfig.group || "default";
|
|
9473
|
+
if (config?.output?.pr_comment?.group_by === "check" && !checkConfig.group) {
|
|
9474
|
+
group = checkName;
|
|
9475
|
+
}
|
|
9375
9476
|
return {
|
|
9376
9477
|
checkName,
|
|
9377
9478
|
content,
|
|
9378
|
-
group
|
|
9479
|
+
group,
|
|
9379
9480
|
output: result.output,
|
|
9380
9481
|
debug: result.debug,
|
|
9381
9482
|
issues: result.issues
|
|
@@ -9514,16 +9615,19 @@ ${expr}
|
|
|
9514
9615
|
}
|
|
9515
9616
|
];
|
|
9516
9617
|
}
|
|
9618
|
+
let group = checkConfig.group || "default";
|
|
9619
|
+
if (config?.output?.pr_comment?.group_by === "check" && !checkConfig.group) {
|
|
9620
|
+
group = checkName;
|
|
9621
|
+
}
|
|
9517
9622
|
const checkResult = {
|
|
9518
9623
|
checkName,
|
|
9519
9624
|
content,
|
|
9520
|
-
group
|
|
9625
|
+
group,
|
|
9521
9626
|
output: checkSummary.output,
|
|
9522
9627
|
debug: reviewSummary.debug,
|
|
9523
9628
|
issues: issuesForCheck
|
|
9524
9629
|
// Include structured issues + rendering error if any
|
|
9525
9630
|
};
|
|
9526
|
-
const group = checkResult.group;
|
|
9527
9631
|
if (!groupedResults[group]) {
|
|
9528
9632
|
groupedResults[group] = [];
|
|
9529
9633
|
}
|
|
@@ -9615,7 +9719,7 @@ ${expr}
|
|
|
9615
9719
|
if (typeof directContent === "string" && directContent.trim()) {
|
|
9616
9720
|
return directContent.trim();
|
|
9617
9721
|
}
|
|
9618
|
-
const { createExtendedLiquid: createExtendedLiquid2 } = await import("./liquid-extensions-
|
|
9722
|
+
const { createExtendedLiquid: createExtendedLiquid2 } = await import("./liquid-extensions-GMEGEGC3.mjs");
|
|
9619
9723
|
const fs5 = await import("fs/promises");
|
|
9620
9724
|
const path5 = await import("path");
|
|
9621
9725
|
const liquid = createExtendedLiquid2({
|
|
@@ -9684,7 +9788,7 @@ ${expr}
|
|
|
9684
9788
|
templateData.authorAssociation = authorAssociation;
|
|
9685
9789
|
templateData.event = { name: eventName, action: eventAction };
|
|
9686
9790
|
}
|
|
9687
|
-
const { withPermissionsContext } = await import("./liquid-extensions-
|
|
9791
|
+
const { withPermissionsContext } = await import("./liquid-extensions-GMEGEGC3.mjs");
|
|
9688
9792
|
let authorAssociationForFilters;
|
|
9689
9793
|
try {
|
|
9690
9794
|
const anyInfo = _prInfo;
|
|
@@ -9930,8 +10034,7 @@ ${expr}
|
|
|
9930
10034
|
group: checkConfig.group,
|
|
9931
10035
|
checkName,
|
|
9932
10036
|
// Add checkName for sessionID
|
|
9933
|
-
eventContext: prInfo.eventContext,
|
|
9934
|
-
// Pass event context for templates
|
|
10037
|
+
eventContext: this.enrichEventContext(prInfo.eventContext),
|
|
9935
10038
|
transform: checkConfig.transform,
|
|
9936
10039
|
transform_js: checkConfig.transform_js,
|
|
9937
10040
|
// Important: pass through provider-level timeout from check config
|
|
@@ -10118,7 +10221,7 @@ ${expr}
|
|
|
10118
10221
|
schema: childCfg.schema,
|
|
10119
10222
|
group: childCfg.group,
|
|
10120
10223
|
checkName: childName,
|
|
10121
|
-
eventContext: prInfo.eventContext,
|
|
10224
|
+
eventContext: this.enrichEventContext(prInfo.eventContext),
|
|
10122
10225
|
transform: childCfg.transform,
|
|
10123
10226
|
transform_js: childCfg.transform_js,
|
|
10124
10227
|
env: childCfg.env,
|
|
@@ -10425,6 +10528,10 @@ ${expr}
|
|
|
10425
10528
|
itemResult.issues || [],
|
|
10426
10529
|
itemResult.output
|
|
10427
10530
|
);
|
|
10531
|
+
const itemOutput = itemResult.output;
|
|
10532
|
+
if (itemOutput !== void 0) {
|
|
10533
|
+
this.trackOutputHistory(checkName, itemOutput);
|
|
10534
|
+
}
|
|
10428
10535
|
const descendantSet = (() => {
|
|
10429
10536
|
const visited = /* @__PURE__ */ new Set();
|
|
10430
10537
|
const stack = [checkName];
|
|
@@ -10512,7 +10619,7 @@ ${expr}
|
|
|
10512
10619
|
schema: nodeCfg.schema,
|
|
10513
10620
|
group: nodeCfg.group,
|
|
10514
10621
|
checkName: node,
|
|
10515
|
-
eventContext: prInfo.eventContext,
|
|
10622
|
+
eventContext: this.enrichEventContext(prInfo.eventContext),
|
|
10516
10623
|
transform: nodeCfg.transform,
|
|
10517
10624
|
transform_js: nodeCfg.transform_js,
|
|
10518
10625
|
env: nodeCfg.env,
|
|
@@ -11055,6 +11162,10 @@ ${error.stack || ""}` : String(error);
|
|
|
11055
11162
|
]);
|
|
11056
11163
|
} catch {
|
|
11057
11164
|
}
|
|
11165
|
+
const reviewResultWithOutput = reviewResult;
|
|
11166
|
+
if (reviewResultWithOutput.output !== void 0) {
|
|
11167
|
+
this.trackOutputHistory(checkName, reviewResultWithOutput.output);
|
|
11168
|
+
}
|
|
11058
11169
|
results.set(checkName, reviewResult);
|
|
11059
11170
|
} else {
|
|
11060
11171
|
const errorSummary = {
|
|
@@ -11208,8 +11319,7 @@ ${error.stack || ""}` : String(error);
|
|
|
11208
11319
|
focus: checkConfig.focus || this.mapCheckNameToFocus(checkName),
|
|
11209
11320
|
schema: checkConfig.schema,
|
|
11210
11321
|
group: checkConfig.group,
|
|
11211
|
-
eventContext: prInfo.eventContext,
|
|
11212
|
-
// Pass event context for templates
|
|
11322
|
+
eventContext: this.enrichEventContext(prInfo.eventContext),
|
|
11213
11323
|
ai: {
|
|
11214
11324
|
timeout: timeout || 6e5,
|
|
11215
11325
|
debug,
|
|
@@ -11285,8 +11395,7 @@ ${error.stack || ""}` : String(error);
|
|
|
11285
11395
|
focus: checkConfig.focus || this.mapCheckNameToFocus(checkName),
|
|
11286
11396
|
schema: checkConfig.schema,
|
|
11287
11397
|
group: checkConfig.group,
|
|
11288
|
-
eventContext: prInfo.eventContext,
|
|
11289
|
-
// Pass event context for templates
|
|
11398
|
+
eventContext: this.enrichEventContext(prInfo.eventContext),
|
|
11290
11399
|
ai: {
|
|
11291
11400
|
timeout: timeout || 6e5,
|
|
11292
11401
|
...checkConfig.ai || {}
|
|
@@ -12300,6 +12409,16 @@ ${result.value.result.debug.rawResponse}`;
|
|
|
12300
12409
|
stats.outputsProduced = (stats.outputsProduced || 0) + 1;
|
|
12301
12410
|
}
|
|
12302
12411
|
}
|
|
12412
|
+
/**
|
|
12413
|
+
* Track output in history for loop/goto scenarios
|
|
12414
|
+
*/
|
|
12415
|
+
trackOutputHistory(checkName, output) {
|
|
12416
|
+
if (output === void 0) return;
|
|
12417
|
+
if (!this.outputHistory.has(checkName)) {
|
|
12418
|
+
this.outputHistory.set(checkName, []);
|
|
12419
|
+
}
|
|
12420
|
+
this.outputHistory.get(checkName).push(output);
|
|
12421
|
+
}
|
|
12303
12422
|
/**
|
|
12304
12423
|
* Record that a check was skipped
|
|
12305
12424
|
*/
|
|
@@ -12492,4 +12611,4 @@ ${result.value.result.debug.rawResponse}`;
|
|
|
12492
12611
|
export {
|
|
12493
12612
|
CheckExecutionEngine
|
|
12494
12613
|
};
|
|
12495
|
-
//# sourceMappingURL=chunk-
|
|
12614
|
+
//# sourceMappingURL=chunk-DQRFOQAP.mjs.map
|