@jevitate/cli 0.7.0 → 0.9.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/ai-cli.d.ts +3 -1
- package/dist/ai-cli.js +60 -16
- package/dist/ai-cli.js.map +1 -1
- package/dist/approval-provenance.d.ts +136 -0
- package/dist/approval-provenance.js +317 -0
- package/dist/approval-provenance.js.map +1 -0
- package/dist/author-journey-cli.js +4 -2
- package/dist/author-journey-cli.js.map +1 -1
- package/dist/bin.js +30544 -20851
- package/dist/browser-cli.d.ts +10 -0
- package/dist/browser-cli.js +50 -0
- package/dist/browser-cli.js.map +1 -0
- package/dist/build-info.generated.js +2 -2
- package/dist/builtin-analyzers.d.ts +7 -0
- package/dist/builtin-analyzers.js +19 -0
- package/dist/builtin-analyzers.js.map +1 -0
- package/dist/campaign-cli.d.ts +6 -0
- package/dist/campaign-cli.js +9 -4
- package/dist/campaign-cli.js.map +1 -1
- package/dist/catalog-analysis.d.ts +70 -0
- package/dist/catalog-analysis.js +507 -0
- package/dist/catalog-analysis.js.map +1 -0
- package/dist/catalog-api.d.ts +73 -0
- package/dist/catalog-api.js +97 -0
- package/dist/catalog-api.js.map +1 -0
- package/dist/catalog-cli.d.ts +12 -0
- package/dist/catalog-cli.js +224 -0
- package/dist/catalog-cli.js.map +1 -0
- package/dist/catalog-review.d.ts +29 -0
- package/dist/catalog-review.js +290 -0
- package/dist/catalog-review.js.map +1 -0
- package/dist/catalog.d.ts +133 -0
- package/dist/catalog.js +352 -0
- package/dist/catalog.js.map +1 -0
- package/dist/change-context.d.ts +44 -0
- package/dist/change-context.js +203 -0
- package/dist/change-context.js.map +1 -0
- package/dist/check-api.d.ts +1 -1
- package/dist/check-api.js +68 -9
- package/dist/check-api.js.map +1 -1
- package/dist/check-cli.d.ts +5 -1
- package/dist/check-cli.js +64 -10
- package/dist/check-cli.js.map +1 -1
- package/dist/check-execute.d.ts +16 -1
- package/dist/check-execute.js +78 -31
- package/dist/check-execute.js.map +1 -1
- package/dist/check-plan.d.ts +14 -0
- package/dist/check-plan.js +28 -2
- package/dist/check-plan.js.map +1 -1
- package/dist/check-suite.js +6 -3
- package/dist/check-suite.js.map +1 -1
- package/dist/check-types.d.ts +51 -6
- package/dist/check-types.js +8 -0
- package/dist/check-types.js.map +1 -1
- package/dist/cli-output.js +85 -5
- package/dist/cli-output.js.map +1 -1
- package/dist/cli-shared.d.ts +22 -2
- package/dist/cli-shared.js +34 -5
- package/dist/cli-shared.js.map +1 -1
- package/dist/demo-aspect-api.d.ts +15 -0
- package/dist/demo-aspect-api.js +26 -1
- package/dist/demo-aspect-api.js.map +1 -1
- package/dist/demo-aspect-cli.js +64 -5
- package/dist/demo-aspect-cli.js.map +1 -1
- package/dist/exit-codes.d.ts +6 -3
- package/dist/exit-codes.js +13 -3
- package/dist/exit-codes.js.map +1 -1
- package/dist/explore-adversarial.d.ts +3 -1
- package/dist/explore-adversarial.js +4 -4
- package/dist/explore-adversarial.js.map +1 -1
- package/dist/explore-author.js +5 -2
- package/dist/explore-author.js.map +1 -1
- package/dist/explore-cli.js +145 -9
- package/dist/explore-cli.js.map +1 -1
- package/dist/explore-coverage.d.ts +6 -2
- package/dist/explore-coverage.js +7 -6
- package/dist/explore-coverage.js.map +1 -1
- package/dist/explore-feature.d.ts +3 -1
- package/dist/explore-feature.js +5 -5
- package/dist/explore-feature.js.map +1 -1
- package/dist/explore-goal.d.ts +37 -6
- package/dist/explore-goal.js +69 -50
- package/dist/explore-goal.js.map +1 -1
- package/dist/explore-shared.d.ts +12 -7
- package/dist/explore-shared.js +9 -1
- package/dist/explore-shared.js.map +1 -1
- package/dist/findings-filing.d.ts +6 -0
- package/dist/findings-filing.js +15 -1
- package/dist/findings-filing.js.map +1 -1
- package/dist/goal-run-flags.d.ts +2 -0
- package/dist/goal-run-flags.js +8 -1
- package/dist/goal-run-flags.js.map +1 -1
- package/dist/heal-probe-guard.d.ts +9 -0
- package/dist/heal-probe-guard.js +113 -0
- package/dist/heal-probe-guard.js.map +1 -0
- package/dist/host-health-run.d.ts +32 -1
- package/dist/host-health-run.js +38 -1
- package/dist/host-health-run.js.map +1 -1
- package/dist/http-5xx-outcome.d.ts +8 -3
- package/dist/http-5xx-outcome.js +5 -15
- package/dist/http-5xx-outcome.js.map +1 -1
- package/dist/init-cli.d.ts +7 -0
- package/dist/init-cli.js +79 -9
- package/dist/init-cli.js.map +1 -1
- package/dist/init-codeowners.d.ts +39 -0
- package/dist/init-codeowners.js +91 -0
- package/dist/init-codeowners.js.map +1 -0
- package/dist/init-keys.d.ts +3 -1
- package/dist/init-keys.js +20 -8
- package/dist/init-keys.js.map +1 -1
- package/dist/init-skills.d.ts +85 -7
- package/dist/init-skills.js +303 -36
- package/dist/init-skills.js.map +1 -1
- package/dist/jev-advisor.d.ts +72 -0
- package/dist/jev-advisor.js +172 -0
- package/dist/jev-advisor.js.map +1 -0
- package/dist/journey-api.d.ts +76 -5
- package/dist/journey-api.js +238 -29
- package/dist/journey-api.js.map +1 -1
- package/dist/journey-cli.js +257 -23
- package/dist/journey-cli.js.map +1 -1
- package/dist/journey-heal.d.ts +74 -0
- package/dist/journey-heal.js +180 -0
- package/dist/journey-heal.js.map +1 -0
- package/dist/journey-network-checks.d.ts +5 -1
- package/dist/journey-network-checks.js +15 -4
- package/dist/journey-network-checks.js.map +1 -1
- package/dist/journey-prefix.js +2 -2
- package/dist/journey-prefix.js.map +1 -1
- package/dist/journey-proposal-store.d.ts +100 -0
- package/dist/journey-proposal-store.js +342 -0
- package/dist/journey-proposal-store.js.map +1 -0
- package/dist/journey-result-record.d.ts +40 -0
- package/dist/journey-result-record.js +28 -0
- package/dist/journey-result-record.js.map +1 -0
- package/dist/journey-review-api.d.ts +19 -0
- package/dist/journey-review-api.js +53 -0
- package/dist/journey-review-api.js.map +1 -0
- package/dist/journey-review-store.d.ts +16 -0
- package/dist/journey-review-store.js +95 -0
- package/dist/journey-review-store.js.map +1 -0
- package/dist/journey-review.d.ts +54 -0
- package/dist/journey-review.js +538 -0
- package/dist/journey-review.js.map +1 -0
- package/dist/journey-verify.js +14 -1
- package/dist/journey-verify.js.map +1 -1
- package/dist/key-report.d.ts +20 -5
- package/dist/key-report.js +32 -9
- package/dist/key-report.js.map +1 -1
- package/dist/kill-signal.js +10 -2
- package/dist/kill-signal.js.map +1 -1
- package/dist/launch-armed.js +5 -1
- package/dist/launch-armed.js.map +1 -1
- package/dist/load-cli.js +4 -2
- package/dist/load-cli.js.map +1 -1
- package/dist/log-classes.d.ts +73 -0
- package/dist/log-classes.js +167 -0
- package/dist/log-classes.js.map +1 -0
- package/dist/log-correlation.d.ts +29 -10
- package/dist/log-correlation.js +44 -21
- package/dist/log-correlation.js.map +1 -1
- package/dist/login-cli.d.ts +17 -0
- package/dist/login-cli.js +161 -0
- package/dist/login-cli.js.map +1 -0
- package/dist/logs-cli.js +3 -1
- package/dist/logs-cli.js.map +1 -1
- package/dist/mcp-api.d.ts +6 -1
- package/dist/mcp-api.js +110 -16
- package/dist/mcp-api.js.map +1 -1
- package/dist/mcp-cli-runner.d.ts +2 -0
- package/dist/mcp-cli-runner.js +3 -1
- package/dist/mcp-cli-runner.js.map +1 -1
- package/dist/mcp-cli-tools.d.ts +5 -0
- package/dist/mcp-cli-tools.js +178 -23
- package/dist/mcp-cli-tools.js.map +1 -1
- package/dist/mission-cli.js +8 -4
- package/dist/mission-cli.js.map +1 -1
- package/dist/mission-journal.d.ts +4 -1
- package/dist/mission-journal.js +9 -3
- package/dist/mission-journal.js.map +1 -1
- package/dist/mission-queue-cli.js +21 -2
- package/dist/mission-queue-cli.js.map +1 -1
- package/dist/mission-queue-runner.d.ts +6 -0
- package/dist/mission-queue-runner.js +33 -3
- package/dist/mission-queue-runner.js.map +1 -1
- package/dist/multi-run-cli.d.ts +7 -1
- package/dist/multi-run-cli.js +10 -3
- package/dist/multi-run-cli.js.map +1 -1
- package/dist/multi-run.d.ts +44 -8
- package/dist/multi-run.js +118 -25
- package/dist/multi-run.js.map +1 -1
- package/dist/persona-login.d.ts +256 -0
- package/dist/persona-login.js +884 -0
- package/dist/persona-login.js.map +1 -0
- package/dist/pre-approval.d.ts +98 -0
- package/dist/pre-approval.js +175 -0
- package/dist/pre-approval.js.map +1 -0
- package/dist/program.js +12 -0
- package/dist/program.js.map +1 -1
- package/dist/project-dir.d.ts +2 -1
- package/dist/project-dir.js +3 -1
- package/dist/project-dir.js.map +1 -1
- package/dist/readiness.d.ts +29 -0
- package/dist/readiness.js +291 -0
- package/dist/readiness.js.map +1 -0
- package/dist/regression-cli.js +4 -2
- package/dist/regression-cli.js.map +1 -1
- package/dist/report-api.d.ts +25 -2
- package/dist/report-api.js +34 -5
- package/dist/report-api.js.map +1 -1
- package/dist/report-cli.js +8 -1
- package/dist/report-cli.js.map +1 -1
- package/dist/resource-preflight.js +5 -3
- package/dist/resource-preflight.js.map +1 -1
- package/dist/result-schema.d.ts +12 -0
- package/dist/result-schema.js +8 -0
- package/dist/result-schema.js.map +1 -1
- package/dist/run-index.d.ts +4 -2
- package/dist/run-index.js +3 -1
- package/dist/run-index.js.map +1 -1
- package/dist/run-key-preflight.d.ts +2 -1
- package/dist/run-key-preflight.js +3 -2
- package/dist/run-key-preflight.js.map +1 -1
- package/dist/run-metadata.d.ts +29 -0
- package/dist/run-metadata.js +48 -0
- package/dist/run-metadata.js.map +1 -0
- package/dist/run-tags-cli.d.ts +14 -0
- package/dist/run-tags-cli.js +41 -0
- package/dist/run-tags-cli.js.map +1 -0
- package/dist/self-heal-adapter.d.ts +43 -27
- package/dist/self-heal-adapter.js +196 -62
- package/dist/self-heal-adapter.js.map +1 -1
- package/dist/site-cli.d.ts +1 -1
- package/dist/site-cli.js +24 -1
- package/dist/site-cli.js.map +1 -1
- package/dist/source-cli.js +9 -5
- package/dist/source-cli.js.map +1 -1
- package/dist/suite-explore-options.d.ts +14 -0
- package/dist/suite-explore-options.js +8 -0
- package/dist/suite-explore-options.js.map +1 -1
- package/dist/sweep-api.d.ts +289 -0
- package/dist/sweep-api.js +859 -0
- package/dist/sweep-api.js.map +1 -0
- package/dist/sweep-cli.d.ts +9 -0
- package/dist/sweep-cli.js +117 -0
- package/dist/sweep-cli.js.map +1 -0
- package/dist/target-config.d.ts +5 -2
- package/dist/target-config.js +15 -0
- package/dist/target-config.js.map +1 -1
- package/dist/ux-cli.js +3 -1
- package/dist/ux-cli.js.map +1 -1
- package/dist/ux-usability.d.ts +9 -3
- package/dist/ux-usability.js +8 -5
- package/dist/ux-usability.js.map +1 -1
- package/dist/verify-fix-cli.js +4 -2
- package/dist/verify-fix-cli.js.map +1 -1
- package/package.json +9 -9
- package/skills/jevitate-ci-check/SKILL.md +9 -1
- package/skills/jevitate-demo/SKILL.md +5 -2
- package/skills/jevitate-getting-started/SKILL.md +14 -1
- package/skills/jevitate-mission-scope/SKILL.md +2 -2
- package/skills/jevitate-run-journey/SKILL.md +42 -9
- package/skills/jevitate-test-campaign/SKILL.md +26 -5
package/dist/exit-codes.d.ts
CHANGED
|
@@ -13,14 +13,16 @@ import { type MissionOutcome } from "@jevitate/domain";
|
|
|
13
13
|
* | | | errored, budget exceeded, an unexpected error) — it proves nothing |
|
|
14
14
|
* | 3 | hang | the app under test hung, and the hang reproduced on replay |
|
|
15
15
|
* | 4 | intermittent | a signal fired on some but not every replay |
|
|
16
|
+
* | 5 | pending-review| #453: a self-heal produced a proposed Journey revision; nothing passes until a |
|
|
17
|
+
* | | | person accepts it (`journey promote <id> --proposal <pid>`) |
|
|
16
18
|
* | 64 | usage | bad flags/arguments or unusable input (unknown id, invalid file, missing keys, |
|
|
17
19
|
* | | | refused target) — nothing ran. `EX_USAGE` from sysexits.h. |
|
|
18
20
|
* | 129/130/143 | killed | SIGHUP (or parent death) / SIGINT / SIGTERM (kill-signal.ts); partial result written |
|
|
19
21
|
*
|
|
20
|
-
* 0–
|
|
22
|
+
* 0–5 are the mission codes (`MISSION_EXIT_CODES`, @jevitate/domain; 0–4 unchanged since #210); the
|
|
21
23
|
* mission outcome → code mapping stays THERE (one place), and this table only names the classes.
|
|
22
|
-
* Usage errors get 64 rather than the next small integer so a future outcome code (
|
|
23
|
-
* collides with it.
|
|
24
|
+
* Usage errors get 64 rather than the next small integer so a future outcome code (6, 7, …) never
|
|
25
|
+
* collides with it. A Journey run's outcome folds onto these through `journeyExitCode` (@jevitate/domain).
|
|
24
26
|
*/
|
|
25
27
|
export declare const EXIT_CODES: {
|
|
26
28
|
readonly ok: 0;
|
|
@@ -28,6 +30,7 @@ export declare const EXIT_CODES: {
|
|
|
28
30
|
readonly inconclusive: 2;
|
|
29
31
|
readonly hang: 3;
|
|
30
32
|
readonly intermittent: 4;
|
|
33
|
+
readonly pendingReview: 5;
|
|
31
34
|
readonly usage: 64;
|
|
32
35
|
};
|
|
33
36
|
export type ExitClass = keyof typeof EXIT_CODES;
|
package/dist/exit-codes.js
CHANGED
|
@@ -13,14 +13,16 @@ import { MISSION_EXIT_CODES } from "@jevitate/domain";
|
|
|
13
13
|
* | | | errored, budget exceeded, an unexpected error) — it proves nothing |
|
|
14
14
|
* | 3 | hang | the app under test hung, and the hang reproduced on replay |
|
|
15
15
|
* | 4 | intermittent | a signal fired on some but not every replay |
|
|
16
|
+
* | 5 | pending-review| #453: a self-heal produced a proposed Journey revision; nothing passes until a |
|
|
17
|
+
* | | | person accepts it (`journey promote <id> --proposal <pid>`) |
|
|
16
18
|
* | 64 | usage | bad flags/arguments or unusable input (unknown id, invalid file, missing keys, |
|
|
17
19
|
* | | | refused target) — nothing ran. `EX_USAGE` from sysexits.h. |
|
|
18
20
|
* | 129/130/143 | killed | SIGHUP (or parent death) / SIGINT / SIGTERM (kill-signal.ts); partial result written |
|
|
19
21
|
*
|
|
20
|
-
* 0–
|
|
22
|
+
* 0–5 are the mission codes (`MISSION_EXIT_CODES`, @jevitate/domain; 0–4 unchanged since #210); the
|
|
21
23
|
* mission outcome → code mapping stays THERE (one place), and this table only names the classes.
|
|
22
|
-
* Usage errors get 64 rather than the next small integer so a future outcome code (
|
|
23
|
-
* collides with it.
|
|
24
|
+
* Usage errors get 64 rather than the next small integer so a future outcome code (6, 7, …) never
|
|
25
|
+
* collides with it. A Journey run's outcome folds onto these through `journeyExitCode` (@jevitate/domain).
|
|
24
26
|
*/
|
|
25
27
|
export const EXIT_CODES = {
|
|
26
28
|
ok: 0,
|
|
@@ -28,6 +30,7 @@ export const EXIT_CODES = {
|
|
|
28
30
|
inconclusive: 2,
|
|
29
31
|
hang: 3,
|
|
30
32
|
intermittent: 4,
|
|
33
|
+
pendingReview: 5,
|
|
31
34
|
usage: 64,
|
|
32
35
|
};
|
|
33
36
|
/** A canonical mission outcome's exit code (the domain table; re-exported so commands import one module). */
|
|
@@ -68,8 +71,15 @@ const USAGE_ERROR_CODES = new Set([
|
|
|
68
71
|
"E_REGRESSION_EXISTS", // `regression capture --id` already exists; needs --force
|
|
69
72
|
"E_REGRESSION_HARD_SIGNAL", // `regression capture --fingerprint` names a hard-signal defect; use the ledger instead
|
|
70
73
|
"E_JOURNEY_ANNOTATIONS_STALE", // `journey annotate --approve`: the Journey changed since the draft; re-draft
|
|
74
|
+
"E_JOURNEY_REVIEW_STALE",
|
|
75
|
+
"E_JOURNEY_PROPOSAL_STALE", // #453: `journey promote --proposal`: the Journey changed since the proposal was made; re-run the self-heal
|
|
76
|
+
"E_JOURNEY_PROPOSAL_PROOF", // #453: the proposal file touches the Journey's proof fields
|
|
77
|
+
"E_JOURNEY_PROPOSAL_INVALID", // #453: the proposal file is not valid
|
|
78
|
+
"E_CATALOG_REVIEW_STALE", // #433: `persona|job approve --reviewed-hash`: the item changed since the sheet was read; review again // #432: `journey promote --reviewed-hash`: the Journey changed since the sheet was read; review again
|
|
71
79
|
"E_DEMO_PRODUCTION_ENV", // #249: `demo` refuses an environment flagged production: true
|
|
72
80
|
"E_DEMO_EXISTS", // #249: `demo` would overwrite an existing Journey / pending demo draft
|
|
81
|
+
"E_APPROVAL_NEEDS_HUMAN", // #437: an approval with no TTY to confirm on (and no --non-interactive-approval): a person approves
|
|
82
|
+
"E_APPROVAL_NOT_CONFIRMED", // #437: the typed confirmation did not match — nothing was approved
|
|
73
83
|
"E_HUMAN_APPROVAL_REQUIRED", // #254: `inbox approve`/`cancel` — human-only, in `jevitate ui` (MCP's human_approval_required)
|
|
74
84
|
"E_INBOX_INPUT_PENDING", // #254: `inbox command` would consume a human's unread input; pass --reveal to receive it
|
|
75
85
|
"E_MISSION_QUEUE_REFUSED", // #254: `mission queue` — unknown/unpromoted target, bad shape, over-ceiling budget, invalid invariants
|
package/dist/exit-codes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAuB,MAAM,kBAAkB,CAAC;AAE3E
|
|
1
|
+
{"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAuB,MAAM,kBAAkB,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,EAAE,EAAE,CAAC;IACL,OAAO,EAAE,CAAC;IACV,YAAY,EAAE,CAAC;IACf,IAAI,EAAE,CAAC;IACP,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,CAAC;IAChB,KAAK,EAAE,EAAE;CACD,CAAC;AAIX,6GAA6G;AAC7G,MAAM,UAAU,kBAAkB,CAAC,OAAuB;IACxD,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAED;;;GAGG;AACH,MAAM,oBAAoB,GAAsB;IAC9C,QAAQ,EAAE,2DAA2D;IACrE,SAAS,EAAE,qDAAqD;IAChE,aAAa,EAAE,iDAAiD;IAChE,QAAQ,EAAE,gDAAgD;IAC1D,OAAO,EAAE,gBAAgB;IACzB,UAAU,EAAE,mDAAmD;IAC/D,aAAa,EAAE,2CAA2C;IAC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C,UAAU,CAAC,YAAY,CAAC;AAC7E,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,mBAAmB,CAAC,QAA8E;IAChH,IAAI,QAAQ,CAAC,EAAE;QAAE,OAAO,UAAU,CAAC,EAAE,CAAC;IACtC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { type BrowserRunOptions } from "./browser-run-options.js";
|
|
|
4
4
|
import { type ScreenshotsSpec } from "./run-screenshots.js";
|
|
5
5
|
import { type InvariantSpec } from "@jevitate/recording";
|
|
6
6
|
import type { HostHealthSampler } from "@jevitate/explore";
|
|
7
|
-
import type { EnvironmentDegraded, HostHealthSummary } from "@jevitate/domain";
|
|
7
|
+
import type { DefectOutcome, EnvironmentDegraded, HostHealthSummary } from "@jevitate/domain";
|
|
8
8
|
import { type Bounds, type AdversarialOutcome, type AdversarialDefect, type MisuseStrategy, type CoverageThresholds } from "@jevitate/explore";
|
|
9
9
|
import { type FilingConfig, type IssueFilerPort, type MissionOutcome } from "@jevitate/domain";
|
|
10
10
|
import { type FindingsIssues } from "./findings-filing.js";
|
|
@@ -108,6 +108,8 @@ export type AdversarialCliMissionResult = Omit<AdversarialOutcome, "defects"> &
|
|
|
108
108
|
readonly missionOutcome: MissionOutcome;
|
|
109
109
|
/** EVERY defect the run found (#195): hard-signal and declared-invariant defects, then `server-log` defects (#142). */
|
|
110
110
|
readonly defects: Array<AdversarialDefect | ServerLogDefect>;
|
|
111
|
+
/** #421/#423: the gating defects counted per kind (`defectOutcomeOf(defects)`). */
|
|
112
|
+
readonly defectOutcome: DefectOutcome;
|
|
111
113
|
/** Every Recording the run wrote (#195: one list on every strategy) — an adversarial run writes one. */
|
|
112
114
|
readonly recordingPaths: string[];
|
|
113
115
|
/** #245: `--record-video` files, finalized before this result was written (absent when not recording). */
|
|
@@ -11,7 +11,7 @@ import { clock, } from "@jevitate/domain";
|
|
|
11
11
|
import { processIssueDrafts } from "./findings-filing.js";
|
|
12
12
|
import { currentEngineInfo } from "./engine.js";
|
|
13
13
|
import { MissionJournal, artifactStamp, closeQuietly, resultPathFor, writeMissionResult } from "./mission-journal.js";
|
|
14
|
-
import { MISSION_RESULT_SCHEMA_VERSION, unifiedDefects } from "./result-schema.js";
|
|
14
|
+
import { MISSION_RESULT_SCHEMA_VERSION, defectFields, unifiedDefects } from "./result-schema.js";
|
|
15
15
|
import { missionExitCode } from "./mission-exit.js";
|
|
16
16
|
import { launchArmed } from "./launch-armed.js";
|
|
17
17
|
import { branchFields, startFromJourney } from "./journey-prefix.js";
|
|
@@ -164,7 +164,7 @@ export async function runAdversarialCliMission(opts) {
|
|
|
164
164
|
journal.writeTranscript(transcript);
|
|
165
165
|
// #142 follow-up: a server-log defect counts as `defects-found`; an unreadable `--log-defect`
|
|
166
166
|
// oracle turns an otherwise-`clean` run `inconclusive` — never a false clean.
|
|
167
|
-
const host = await finishHostHealth(health, applyServerLogOutcome(outcome.outcome, serverLogRun));
|
|
167
|
+
const host = await finishHostHealth(health, applyServerLogOutcome(outcome.outcome, serverLogRun), outcome.failure === undefined ? {} : { failure: outcome.failure });
|
|
168
168
|
const missionOutcome = host.outcome;
|
|
169
169
|
const exitCode = missionExitCode(missionOutcome);
|
|
170
170
|
const resultPath = resultPathFor(journal.recordingPath);
|
|
@@ -210,9 +210,9 @@ export async function runAdversarialCliMission(opts) {
|
|
|
210
210
|
...(opts.invariants === undefined ? {} : { invariantSpec: opts.invariants }),
|
|
211
211
|
...(runUsage === undefined ? {} : { usage: runUsage.snapshot() }),
|
|
212
212
|
...serverLogResult(serverLogRun),
|
|
213
|
-
|
|
213
|
+
...defectFields(unifiedDefects(outcome.defects, serverLogRun?.defects)),
|
|
214
214
|
resultPath,
|
|
215
|
-
...(host.failure === undefined || outcome.failure !== undefined ? {} : { failure: host.failure }),
|
|
215
|
+
...(host.failure === undefined || (outcome.failure !== undefined && host.failure.kind !== "host-starved") ? {} : { failure: host.failure }),
|
|
216
216
|
...host.fields,
|
|
217
217
|
};
|
|
218
218
|
return await withRunEvidence({ ...result, resultPath: writeMissionResult(journal.recordingPath, missionOutcome, exitCode, result, runUsage) }, evidenceOf(opts, opts.secrets ?? []), triageOf(opts, serverLogRun, opts.secrets ?? []));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explore-adversarial.js","sourceRoot":"","sources":["../src/explore-adversarial.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAwC,MAAM,sBAAsB,CAAC;AACrH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAA0B,MAAM,0BAA0B,CAAC;AAChK,OAAO,EAAE,aAAa,EAAwB,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAI/D,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAK7B,eAAe,EAGf,aAAa,EACb,cAAc,EACd,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAIgB,KAAK,GAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAuB,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAmB,MAAM,aAAa,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAE,6BAA6B,EAAE,cAAc,EAAE,MAAM,o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,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;YAC3I,GAAG,IAAI,CAAC,MAAM;SACf,CAAC;QACF,OAAO,MAAM,eAAe,CAAC,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;IACzO,CAAC;YAAS,CAAC;QACT,gBAAgB,EAAE,CAAC;QACnB,MAAM,CAAC,IAAI,EAAE,CAAC;QACd,MAAM,SAAS,EAAE,KAAK,EAAE,CAAC;QACzB,MAAM,YAAY,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
|
package/dist/explore-author.js
CHANGED
|
@@ -100,8 +100,11 @@ async function authorViaBrowser(args) {
|
|
|
100
100
|
export function goalRunTake(r, g = {}) {
|
|
101
101
|
const reason = r.reason ?? r.failure?.message;
|
|
102
102
|
const recordingPath = r.recordingPaths[0];
|
|
103
|
+
// #423: a goal reached on a run that hit a defect (a 5xx, a server-log error, a violated invariant)
|
|
104
|
+
// is not a take to author from — as before the goal/defect split, it reads `defects-found` here.
|
|
105
|
+
const outcome = r.goalOutcome === "succeeded" && r.defectOutcome.status === "defects" ? "defects-found" : r.goalOutcome;
|
|
103
106
|
const diagnostics = {
|
|
104
|
-
outcome
|
|
107
|
+
outcome,
|
|
105
108
|
...(reason === undefined ? {} : { reason }),
|
|
106
109
|
stop: r.stop,
|
|
107
110
|
runOutcome: r.runOutcome,
|
|
@@ -115,6 +118,6 @@ export function goalRunTake(r, g = {}) {
|
|
|
115
118
|
recordingPaths: r.recordingPaths,
|
|
116
119
|
...(g.screenshots === undefined || recordingPath === undefined ? {} : { screenshotsDir: screenshotsDirFor(g.screenshots, recordingPath) }),
|
|
117
120
|
};
|
|
118
|
-
return { outcome
|
|
121
|
+
return { outcome, recording: r.recording, diagnostics };
|
|
119
122
|
}
|
|
120
123
|
//# sourceMappingURL=explore-author.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explore-author.js","sourceRoot":"","sources":["../src/explore-author.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,6BAA6B,GAK9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAA6B,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAkFzD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAA6B;IAClE,wEAAwE;IACxE,MAAM,MAAM,GAAG,6BAA6B,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAEvE,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,IAAI,gBAAgB,CAAC;IACjD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC;QACxB,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,MAAM;QACN,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,GAAG,CAAC,IAAI,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC3F,GAAG,CAAC,IAAI,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE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AAI,EAAE,CAAC,CAAC,IAAI;QACZ,UAAU,EAAE,CAAC,CAAC,UAAU;QACxB,GAAG,CAAC,CAAC,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;QACrG,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,UAAU,EAAE,CAAC,CAAC,UAAU;QACxB,cAAc,EAAE,CAAC,CAAC,cAAc;QAChC,cAAc,EAAE,CAAC,CAAC,cAAc;QAChC,GAAG,CAAC,CAAC,CAAC,WAAW,KAAK,SAAS,IAAI,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,iBAAiB,CAAC,CAAC,CAAC,WAAW,EAAE,aAAa,CAAC,EAAE,CAAC;KAC3I,CAAC;IACF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,CAAC;AAC1D,CAAC"}
|
package/dist/explore-cli.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { JEV_PROVIDER_FLAG_HELP, jevProviderArg } from "./cli-shared.js";
|
|
2
|
+
import { TAG_FLAG, TAG_HELP, TARGET_FLAG, TARGET_HELP, collectTag, taggedAction } from "./run-tags-cli.js";
|
|
1
3
|
import { existsSync } from "node:fs";
|
|
2
4
|
import { envCredentialStore, MissingCredentialError } from "@jevitate/ai-core";
|
|
3
5
|
import { loadLocalCredentials } from "./credentials-file.js";
|
|
4
|
-
import { FixtureNotFoundError, ScopeUnderivableError, UnauthorizedExploreTargetError, resolveCoverageThresholds, TypeFixtureSpecError, validateDenyPatterns, } from "@jevitate/explore";
|
|
6
|
+
import { FixtureNotFoundError, ScopeUnderivableError, UnauthorizedExploreTargetError, resolveCoverageThresholds, TypeFixtureSpecError, validateAllowControlPatterns, validateDenyPatterns, } from "@jevitate/explore";
|
|
5
7
|
import { loadTypeFixtures } from "./type-fixture-file.js";
|
|
6
8
|
import { secretCommandRunner } from "./secret-command.js";
|
|
7
9
|
import { ok, fail } from "./envelope.js";
|
|
@@ -24,14 +26,17 @@ import { runExploration, runCoverageMission, runAdversarialCliMission, CLI_ADVER
|
|
|
24
26
|
import { parseLogSourceSpecs, LogSourceSpecError } from "./log-sources.js";
|
|
25
27
|
import { triagedServerLog } from "./explore-shared.js";
|
|
26
28
|
import { parseLogDefectSpecs, parseLogIgnoreSpecs, parseLogScopeSpecs } from "./log-correlation.js";
|
|
29
|
+
import { LogClassesError, loadLogClassRules } from "./log-classes.js";
|
|
27
30
|
import { parseCorrelationHeaders, parseLogIdPatterns } from "./log-trace.js";
|
|
28
31
|
import { LogSpecError } from "./log-lines.js";
|
|
29
|
-
import { MultiRunArgsError, resolveMultiRunPlan, wantsMultiRun } from "./multi-run.js";
|
|
32
|
+
import { MultiRunArgsError, projectPersonaFor, resolveMultiRunPlan, wantsMultiRun } from "./multi-run.js";
|
|
33
|
+
import { authExpiredResult, ensurePersonaSession, LoginArgsError, parseAuthCheck } from "./persona-login.js";
|
|
30
34
|
import { MultiRunAbortedError, runExploreMultiRun } from "./multi-run-cli.js";
|
|
31
35
|
import { checkActorsAgainstSpec, resolveMissionActors } from "./mission-actors.js";
|
|
32
36
|
import { runUsabilityMission, UsabilityInvariantsUnsupportedError } from "./ux-api.js";
|
|
33
37
|
import { UxConfigError } from "./ux-config.js";
|
|
34
38
|
import { MinConfidenceError, QualityPolicyError, MaxFindingsPerRouteError, ProductFactsError } from "@jevitate/ux";
|
|
39
|
+
import { PlaywrightBrowserPort } from "@jevitate/playwright";
|
|
35
40
|
import { withBrowserLaunchFlags, withDemoFlags, withScreenshotsFlag, browserRunFromFlags, withEmulationFlags, emulationFromFlags, emitCommandResult, collectParam, environmentSeams, resolveDbPath, resolveJourneysDir, resolveMissionTargetsDir, stallTimeoutMs, EXPLORE_STRATEGIES, EXPLORE_OUTCOME_HELP, GatewaySelectionError, buildExploreGateways, } from "./cli-shared.js";
|
|
36
41
|
import { allowWithExtensions, assertExtensionTargetLoaded, multiWindowWarning } from "./browser-run-options.js";
|
|
37
42
|
import { ParamValidationError } from "@jevitate/journey";
|
|
@@ -46,6 +51,17 @@ import { forwardedArgv } from "./multi-run-cli.js";
|
|
|
46
51
|
import { ANCHORED_STRATEGIES, JourneyPrefixArgsError, JourneyPrefixStaleError, journeyStaleResult, resolveJourneyPrefix, } from "./journey-prefix.js";
|
|
47
52
|
import { clock } from "@jevitate/domain";
|
|
48
53
|
import { GOAL_RUN_OPTIONS, GoalRunFlagError, conversationFromFlags, dialogsFromFlags, secretFieldsFromFlags, successWhenFromFlags, targetFlagsFromFlags, } from "./goal-run-flags.js";
|
|
54
|
+
/** #427: the app root of a start URL bound from --fixtures (`<origin>${setup.x}`), or undefined without an origin. */
|
|
55
|
+
function fixtureBoundUrlRoot(url) {
|
|
56
|
+
try {
|
|
57
|
+
return `${new URL(url.slice(0, url.indexOf("${"))).origin}/`;
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** #427: how long the pre-flight auth check (and a refresh's sign-in) may take to load a page. */
|
|
64
|
+
const AUTH_PREFLIGHT_TIMEOUT_MS = 30_000;
|
|
49
65
|
/**
|
|
50
66
|
* #293: the flags a sweep sets on each of its missions itself (the rest of the command line is
|
|
51
67
|
* forwarded to every mission as given).
|
|
@@ -63,6 +79,7 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
63
79
|
.command("explore")
|
|
64
80
|
.description("goal-directed exploration -> a deterministic Recording (authoring/test plane)")), { recordVideo: true, overlay: true })))))
|
|
65
81
|
.option("--url <url>", "target URL (must be an authorized origin)")
|
|
82
|
+
.option(TARGET_FLAG, TARGET_HELP)
|
|
66
83
|
.option("--from-journey <id>", "journey-anchored exploration (#293): start from a PROMOTED Journey instead of --url — its first --at-step steps are replayed " +
|
|
67
84
|
"in the mission's own browser context (page, form contents and session kept; fail-closed, never self-healed; --env/--base-url apply), " +
|
|
68
85
|
"then the mission starts on the live page. A replay that stops before the anchor ends the run inconclusive (failure.kind journey-stale, exit 2). " +
|
|
@@ -109,12 +126,20 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
109
126
|
.addOption(GOAL_RUN_OPTIONS.typeFixture())
|
|
110
127
|
.addOption(GOAL_RUN_OPTIONS.fixture())
|
|
111
128
|
.option("--storage-state <file>", "Playwright storageState JSON to start the session authenticated (deterministic login pre-step); must exist")
|
|
129
|
+
.option("--auth-check <mode>", "#427 pre-flight auth check before a run that starts from a session (--storage-state, --persona/--personas, --actor's primary): " +
|
|
130
|
+
"load the session, open --url and end the run fast (inconclusive, failure.kind auth-expired, exit 2) when it lands on a sign-in page — the login page is never explored. " +
|
|
131
|
+
"auto (default): a login-like URL (/login, /signin, /sign-in, /auth, …) or a visible password field, unless --url is itself such a route; " +
|
|
132
|
+
"urlExcludes:<text>: expired when the landed URL includes <text>; selector:<css>: alive only when this signed-in marker is visible; off. " +
|
|
133
|
+
"A persona with login parameters (a personas file entry's `login`, or .jevitate/personas.json) is signed in again once instead")
|
|
112
134
|
.option("--actor <name=storageState>", "multi-actor mission (#147, goal only; repeatable): the FIRST actor is the primary (the only one the model drives, " +
|
|
113
135
|
"from its own storageState); every other actor is an observer in its OWN fresh context that only runs the " +
|
|
114
136
|
"--invariants' cross-actor checks (capture + probe as:/deniedAs) — never clicks or types. Replaces --storage-state", (v, prev) => [...prev, v], [])
|
|
115
137
|
.addOption(GOAL_RUN_OPTIONS.saveStorageState())
|
|
116
138
|
.option("--max-actions <n>", "hard cap on executed actions", positiveIntArg)
|
|
117
139
|
.option("--max-decisions <n>", "hard cap on model decisions", positiveIntArg)
|
|
140
|
+
.option("--min-actions <n>", "--strategy goal (#424): the minimum actions before the model may conclude — until then an early report, blocked or answerless done is deferred and the run steered to breadth " +
|
|
141
|
+
"(unvisited tabs, detail views, primary forms). Default: 12 (at most half the budget) for an open-ended find-out goal (no --success; \"the main features\", \"what works\", \"every error\", \"explore\"…), none otherwise. Capped by --max-actions (with a warning)", positiveIntArg)
|
|
142
|
+
.option("--min-distinct-states <n>", "--strategy goal (#424): the minimum distinct page states (URL + visible controls) observed before the model may conclude. Default: 5 (scaled to the budget) for an open-ended find-out goal, none otherwise. Capped by the budget (with a warning)", positiveIntArg)
|
|
118
143
|
.option("--stall-timeout <seconds>", "--strategy coverage/exploratory and --feature: end the run inconclusive (stalled) when no step completes within this many seconds (default 120)", positiveNumberArg)
|
|
119
144
|
.addOption(GOAL_RUN_OPTIONS.replyWaitMs())
|
|
120
145
|
.addOption(GOAL_RUN_OPTIONS.replyQuietMs())
|
|
@@ -123,6 +148,7 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
123
148
|
.addOption(GOAL_RUN_OPTIONS.jobWaitMs())
|
|
124
149
|
.addOption(GOAL_RUN_OPTIONS.deny())
|
|
125
150
|
.addOption(GOAL_RUN_OPTIONS.paid())
|
|
151
|
+
.addOption(GOAL_RUN_OPTIONS.allowControl())
|
|
126
152
|
.addOption(GOAL_RUN_OPTIONS.allowDestructive())
|
|
127
153
|
.addOption(GOAL_RUN_OPTIONS.dialogs())
|
|
128
154
|
.option("--allow-writes", "let a find-out goal (no --success check, ended by report) change the app. By default it is read-only: controls that start a write flow " +
|
|
@@ -133,6 +159,7 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
133
159
|
.addOption(GOAL_RUN_OPTIONS.readRpc())
|
|
134
160
|
.option("--real", "use live Jev + OpenRouter gateways (requires keys)", false)
|
|
135
161
|
.option("--fake-ai", "use deterministic fake gateways (pipeline smoke only)", false)
|
|
162
|
+
.option("--jev-provider <provider>", JEV_PROVIDER_FLAG_HELP, jevProviderArg)
|
|
136
163
|
.option("--out <dir>", "directory to write the emitted Recording")
|
|
137
164
|
.option("--file-issues", "file findings as issues (needs a repo: --issue-repo or ~/.jevitate/filing.json); default: drafts only")
|
|
138
165
|
.option("--issue-repo <owner/name>", "the system-under-test repo findings for THIS target are filed to")
|
|
@@ -151,7 +178,7 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
151
178
|
.addOption(GOAL_RUN_OPTIONS.secretCmdAttempts())
|
|
152
179
|
.option("--allow-log-cmd", "opt-in: a --log-source cmd:<command> may run as a subprocess (operator-declared only; refused otherwise)", false)
|
|
153
180
|
.option("--log-defect <level|/regex/>", "backend log lines matching this (repeatable) become a server-log defect: a level (error|warn|info|debug, matched as level>=this) or a /regex/flags/ over the raw line. Its fingerprint is the normalized message (ids/numbers/uuids/timestamps stripped) plus the correlated route; verify-fix re-checks it by re-tailing the same --log-source(s)", (v, prev) => [...prev, v], [])
|
|
154
|
-
.option("--log-quiet-ok <spec>", "
|
|
181
|
+
.option("--log-quiet-ok <spec>", "compatibility only since 0.8.0 (#420): a --log-source that opens and reads zero lines is now always a healthy oracle (the silence is recorded as serverLogs.quietSources), so this flag no longer changes any outcome. Kept so existing invocations keep working", (v, prev) => [...prev, v], [])
|
|
155
182
|
.option("--log-ignore <regex|substring>", "excludes known-noise backend log lines (repeatable, /regex/flags/ over the raw line or a plain substring) from BOTH correlation and the --log-defect oracle (#169 item 3) — e.g. a periodic background job's own expected error. Counted separately as serverLogs.ignoredLines; never makes --log-quiet-ok unnecessary, since an ignored line still proves the source is being tailed", (v, prev) => [...prev, v], [])
|
|
156
183
|
.option("--log-scope <regex|substring>", "attributes only backend log lines matching this (repeatable, /regex/flags/ or a plain substring, e.g. a tenant id) to the run (#282); the rest count as serverLogs.ignoredLines. For concurrent runs tailing one log. A line carrying one of the run's own correlation ids is in scope", (v, prev) => [...prev, v], [])
|
|
157
184
|
.option("--log-correlation-header <name>", "another request/response header that carries a correlation id (repeatable; built in: traceparent, x-request-id, x-correlation-id, request-id, x-amzn-trace-id, x-b3-traceid, x-cloud-trace-context). A log line carrying a request's id is attached to that exact request and the step that sent it, not by time (#204)", (v, prev) => [...prev, v], [])
|
|
@@ -163,7 +190,9 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
163
190
|
.option("--repeat <n>", "run the mission N times, one after another, each in a fresh browser context, and vote (#141): findings seen in fewer than --min-agreement runs are reported as flaky, not counted")
|
|
164
191
|
.option("--min-agreement <k>", "with --repeat: runs a finding (and the outcome) must recur in to count (default: a majority of N)")
|
|
165
192
|
.option("--persona <name=storageState>", "run the same mission once per persona (repeatable), serially, each from its own storageState, and diff them (#143): requests, statuses (a 403 vs 200 is a candidate RBAC finding), controls, outcome", (v, prev) => [...prev, v], [])
|
|
166
|
-
.option("--personas <file>", "personas JSON: {\"<name>\": \"<storageState>\"} or {\"personas\": [{\"name\", \"storageState\"}]}"
|
|
193
|
+
.option("--personas <file>", "personas JSON: {\"<name>\": \"<storageState>\"} or {\"personas\": [{\"name\", \"storageState\", \"login\"?}]} — #427: `login` " +
|
|
194
|
+
"({url, userEnv, passwordEnv, userField?, passwordField?, submit?, success?}, or #449 {api, userEnv, passwordEnv} for an HTTP sign-in endpoint; environment variable NAMES only) re-mints an expired session once. " +
|
|
195
|
+
"A bare --persona <name> is the project's persona of that name (.jevitate/personas.json, same format)")
|
|
167
196
|
.option("--check-overflow", "check the horizontal-overflow (#149) and vertical-clipping (#302: text cut off by a fixed-height box or above the page top) hard signals even at a desktop (>=1024px) viewport — --strategy coverage/exploratory " +
|
|
168
197
|
"(a defect), adversarial (a defect) or usability (a signal finding). " +
|
|
169
198
|
"On by default whenever --viewport/--device emulates a viewport narrower than 1024px")
|
|
@@ -189,7 +218,8 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
189
218
|
" verify-fix/regression replay reproduce under the SAME device by default.",
|
|
190
219
|
].join("\n"))
|
|
191
220
|
.addHelpText("after", EXPLORE_OUTCOME_HELP)
|
|
192
|
-
.
|
|
221
|
+
.option(TAG_FLAG, TAG_HELP, collectTag, [])
|
|
222
|
+
.action(taggedAction(program, "explore", async function () {
|
|
193
223
|
const o = this.opts();
|
|
194
224
|
// #210: one output rule for every strategy — the envelope with --json, a human summary without.
|
|
195
225
|
const emitExplore = (envelope, exitCode, human = formatMissionHuman) => emitCommandResult(program, envelope, { json: o.json === true, command: "explore", human, ...(exitCode === undefined ? {} : { exitCode }) });
|
|
@@ -211,6 +241,17 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
211
241
|
emitExplore(fail(err.code, err.message));
|
|
212
242
|
return;
|
|
213
243
|
}
|
|
244
|
+
// #427: an unusable --auth-check is a usage error, refused before anything runs.
|
|
245
|
+
let authCheck;
|
|
246
|
+
try {
|
|
247
|
+
authCheck = parseAuthCheck(o.authCheck);
|
|
248
|
+
}
|
|
249
|
+
catch (err) {
|
|
250
|
+
if (!(err instanceof LoginArgsError))
|
|
251
|
+
throw err;
|
|
252
|
+
emitExplore(fail("E_EXPLORE_ARGS", err.message));
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
214
255
|
// #195: a session file never lands in the repo's .jevitate/ (refused before any run, multi-runs included).
|
|
215
256
|
if (o.saveStorageState !== undefined) {
|
|
216
257
|
try {
|
|
@@ -412,6 +453,35 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
412
453
|
if (browser?.headed === true && (wantsMultiRun(o) || o.actor.length > 1)) {
|
|
413
454
|
program.configureOutput().writeErr?.(multiWindowWarning(o.actor.length > 1 ? "several --actor sessions" : "--repeat/--persona"));
|
|
414
455
|
}
|
|
456
|
+
/**
|
|
457
|
+
* #427: the pre-flight auth check of one session — undefined when it is alive (or refreshed, or
|
|
458
|
+
* not checked: --auth-check off, no --url, a --from-journey run whose prefix replay is its own
|
|
459
|
+
* check), or the `auth-expired` result when it is not. Throws `UnauthorizedExploreTargetError`.
|
|
460
|
+
*/
|
|
461
|
+
const sessionPreflight = async (storageState, persona) => {
|
|
462
|
+
if (authCheck.mode === "off" || o.url === undefined || journeyPrefix !== undefined)
|
|
463
|
+
return undefined;
|
|
464
|
+
const allowlist = resolveExploreAllowlist(o.url, o.allow);
|
|
465
|
+
// A start URL bound from --fixtures (`${setup.x}`) does not exist before the setup runs: the
|
|
466
|
+
// check opens the app's root instead (the mission itself starts after the setup, as before).
|
|
467
|
+
const checkUrl = o.url.includes("${") ? fixtureBoundUrlRoot(o.url) : o.url;
|
|
468
|
+
if (checkUrl === undefined)
|
|
469
|
+
return undefined; // no origin before the placeholder: the mission's own URL check refuses it
|
|
470
|
+
const r = await ensurePersonaSession({
|
|
471
|
+
...(persona === undefined ? {} : { persona: persona.name }),
|
|
472
|
+
...(persona?.login === undefined ? {} : { login: persona.login }),
|
|
473
|
+
storageState,
|
|
474
|
+
url: checkUrl,
|
|
475
|
+
allowlist,
|
|
476
|
+
check: authCheck,
|
|
477
|
+
port: (deps.explore?.browserPortFactory ?? (() => new PlaywrightBrowserPort()))(),
|
|
478
|
+
...(browser === undefined ? {} : { browser }),
|
|
479
|
+
env: deps.explore?.env ?? process.env,
|
|
480
|
+
timeoutMs: AUTH_PREFLIGHT_TIMEOUT_MS,
|
|
481
|
+
note: (line) => program.configureOutput().writeErr?.(line),
|
|
482
|
+
});
|
|
483
|
+
return r.ok ? undefined : authExpiredResult(strategy, o.url, r, persona?.name);
|
|
484
|
+
};
|
|
415
485
|
// Repeat-and-vote (#141) / persona matrix (#143): the same command, run sequentially and aggregated.
|
|
416
486
|
if (wantsMultiRun(o)) {
|
|
417
487
|
try {
|
|
@@ -424,12 +494,26 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
424
494
|
...(o.out === undefined ? {} : { out: o.out }),
|
|
425
495
|
// #220: a killed multi-run prints ITS partial summary, by this command's own output rule.
|
|
426
496
|
killOutput: (partial) => (o.json === true ? `${JSON.stringify(ok(withEngine(partial)))}\n` : formatMultiRunHuman(partial)),
|
|
497
|
+
// #427: each run's session (its persona's, or the mission's own) is checked before it starts.
|
|
498
|
+
...(authCheck.mode === "off"
|
|
499
|
+
? {}
|
|
500
|
+
: {
|
|
501
|
+
authPreflight: async (p) => {
|
|
502
|
+
const state = p?.storageState ?? o.storageState;
|
|
503
|
+
if (state === undefined)
|
|
504
|
+
return undefined;
|
|
505
|
+
const r = await sessionPreflight(state, p ?? projectPersonaFor(state));
|
|
506
|
+
return r === undefined ? undefined : withEngine(r);
|
|
507
|
+
},
|
|
508
|
+
}),
|
|
427
509
|
});
|
|
428
510
|
emitExplore(ok(withEngine(result)), result.exitCode, formatMultiRunHuman);
|
|
429
511
|
}
|
|
430
512
|
catch (err) {
|
|
431
513
|
if (err instanceof MultiRunArgsError)
|
|
432
514
|
emitExplore(fail(err.code, err.message));
|
|
515
|
+
else if (err instanceof UnauthorizedExploreTargetError)
|
|
516
|
+
emitExplore(fail("E_UNAUTHORIZED_EXPLORE_TARGET", err.message));
|
|
433
517
|
else if (err instanceof MultiRunAbortedError)
|
|
434
518
|
emitExplore(fail(err.envelope.error.code, err.envelope.error.message));
|
|
435
519
|
else
|
|
@@ -456,6 +540,7 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
456
540
|
try {
|
|
457
541
|
validateDenyPatterns(o.deny);
|
|
458
542
|
validateDenyPatterns(o.paid, "--paid");
|
|
543
|
+
validateAllowControlPatterns(o.allowControl ?? []);
|
|
459
544
|
}
|
|
460
545
|
catch (err) {
|
|
461
546
|
emitExplore(fail("E_EXPLORE_ARGS", err instanceof Error ? err.message : String(err)));
|
|
@@ -523,6 +608,11 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
523
608
|
// `--fixture` feeds the upload op, which only the explore loop (goal and
|
|
524
609
|
// usability strategies) can issue. Refuse it elsewhere rather than
|
|
525
610
|
// silently ignoring a file the user expected to be uploaded.
|
|
611
|
+
// #424: the minimum effort gates the goal loop's own endings (report / blocked / done) — a goal run's.
|
|
612
|
+
if ((o.minActions !== undefined || o.minDistinctStates !== undefined) && (o.feature !== undefined || strategy !== "goal")) {
|
|
613
|
+
emitExplore(fail("E_EXPLORE_ARGS", "--min-actions and --min-distinct-states are supported only with --strategy goal (a goal or find-out run)"));
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
526
616
|
if (o.fixture !== undefined && (o.feature !== undefined || (strategy !== "goal" && strategy !== "usability"))) {
|
|
527
617
|
emitExplore(fail("E_EXPLORE_ARGS", "--fixture is supported only with --strategy goal or usability"));
|
|
528
618
|
return;
|
|
@@ -545,7 +635,19 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
545
635
|
emitExplore(fail("E_EXPLORE_ARGS", "--action-deltas is not supported with --feature (goal, usability, coverage, exploratory and adversarial runs record deltas)"));
|
|
546
636
|
return;
|
|
547
637
|
}
|
|
548
|
-
|
|
638
|
+
// #427: the project persona (.jevitate/personas.json) this --storage-state is, when it is one — its
|
|
639
|
+
// session may not exist yet: the pre-flight mints it from its login parameters.
|
|
640
|
+
let projectPersona;
|
|
641
|
+
try {
|
|
642
|
+
projectPersona = o.storageState === undefined ? undefined : projectPersonaFor(o.storageState);
|
|
643
|
+
}
|
|
644
|
+
catch (err) {
|
|
645
|
+
if (!(err instanceof MultiRunArgsError))
|
|
646
|
+
throw err;
|
|
647
|
+
emitExplore(fail(err.code, err.message));
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
if (o.storageState !== undefined && !existsSync(o.storageState) && (authCheck.mode === "off" || projectPersona?.login === undefined)) {
|
|
549
651
|
emitExplore(fail("E_EXPLORE_ARGS", `storage state not found: ${o.storageState}`));
|
|
550
652
|
return;
|
|
551
653
|
}
|
|
@@ -624,6 +726,8 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
624
726
|
const logScope = parseLogScopeSpecs(o.logScope);
|
|
625
727
|
const correlationHeaders = parseCorrelationHeaders(o.logCorrelationHeader);
|
|
626
728
|
const idPatterns = parseLogIdPatterns(o.logIdPattern);
|
|
729
|
+
// #422: the project's .jevitate/log-classes.json, validated before any browser opens.
|
|
730
|
+
const logClasses = loadLogClassRules();
|
|
627
731
|
serverLog = {
|
|
628
732
|
sources,
|
|
629
733
|
logDefect,
|
|
@@ -633,11 +737,12 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
633
737
|
logScope,
|
|
634
738
|
correlationHeaders,
|
|
635
739
|
idPatterns,
|
|
740
|
+
logClasses,
|
|
636
741
|
...(o.serverLogDrainMs === undefined ? {} : { drainMs: Number(o.serverLogDrainMs) }),
|
|
637
742
|
};
|
|
638
743
|
}
|
|
639
744
|
catch (err) {
|
|
640
|
-
if (err instanceof LogSourceSpecError || err instanceof LogSpecError) {
|
|
745
|
+
if (err instanceof LogSourceSpecError || err instanceof LogSpecError || err instanceof LogClassesError) {
|
|
641
746
|
emitExplore(fail(err.code, err.message));
|
|
642
747
|
return;
|
|
643
748
|
}
|
|
@@ -694,6 +799,26 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
694
799
|
emitExplore(fail("E_EXPLORE_ARGS", "--fixtures, --before and --after are supported only with --strategy goal, or with --from-journey (any anchored strategy)"));
|
|
695
800
|
return;
|
|
696
801
|
}
|
|
802
|
+
// #427 pre-flight auth check: a run that starts from a session first proves the session is alive
|
|
803
|
+
// (re-minting it once from a persona's login parameters) — else it ends now, `auth-expired`.
|
|
804
|
+
if (primaryStorageState !== undefined) {
|
|
805
|
+
let expired;
|
|
806
|
+
try {
|
|
807
|
+
expired = await sessionPreflight(primaryStorageState, actors?.primary ?? projectPersona);
|
|
808
|
+
}
|
|
809
|
+
catch (err) {
|
|
810
|
+
if (err instanceof UnauthorizedExploreTargetError)
|
|
811
|
+
emitExplore(fail("E_UNAUTHORIZED_EXPLORE_TARGET", err.message));
|
|
812
|
+
// The check could not open its browser (the mission could not have either): the run did not start.
|
|
813
|
+
else
|
|
814
|
+
emitExplore(fail("E_EXPLORE_RUN", `the pre-flight auth check failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
if (expired !== undefined) {
|
|
818
|
+
emitExplore(ok(withEngine(expired)), EXIT_CODES.inconclusive);
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
697
822
|
// Additive coverage/exploratory strategy: proof-by-induction state coverage.
|
|
698
823
|
// It takes no goal/success (the frontier itself is the objective), so it is
|
|
699
824
|
// a distinct, goal-free path that leaves the goal strategy below unchanged.
|
|
@@ -727,6 +852,7 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
727
852
|
({ judge: covJudge, gen: covGen, usage: covUsage } = await buildExploreGateways(deps, {
|
|
728
853
|
real: o.real ?? false,
|
|
729
854
|
fakeAi: o.fakeAi ?? false,
|
|
855
|
+
jevProvider: o.jevProvider,
|
|
730
856
|
}));
|
|
731
857
|
}
|
|
732
858
|
catch (err) {
|
|
@@ -798,6 +924,7 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
798
924
|
({ judge: advJudge, gen: advGen, usage: advUsage } = await buildExploreGateways(deps, {
|
|
799
925
|
real: o.real ?? false,
|
|
800
926
|
fakeAi: o.fakeAi ?? false,
|
|
927
|
+
jevProvider: o.jevProvider,
|
|
801
928
|
}));
|
|
802
929
|
}
|
|
803
930
|
catch (err) {
|
|
@@ -918,6 +1045,7 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
918
1045
|
({ judge: uxJudge, gen: uxGen, usage: uxUsage } = await buildExploreGateways(deps, {
|
|
919
1046
|
real: o.real ?? false,
|
|
920
1047
|
fakeAi: o.fakeAi ?? false,
|
|
1048
|
+
jevProvider: o.jevProvider,
|
|
921
1049
|
}));
|
|
922
1050
|
}
|
|
923
1051
|
catch (err) {
|
|
@@ -1111,7 +1239,7 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
1111
1239
|
let gen;
|
|
1112
1240
|
let usage;
|
|
1113
1241
|
try {
|
|
1114
|
-
({ judge, gen, usage } = await buildExploreGateways(deps, { real: o.real ?? false, fakeAi: o.fakeAi ?? false }));
|
|
1242
|
+
({ judge, gen, usage } = await buildExploreGateways(deps, { real: o.real ?? false, fakeAi: o.fakeAi ?? false, jevProvider: o.jevProvider }));
|
|
1115
1243
|
}
|
|
1116
1244
|
catch (err) {
|
|
1117
1245
|
if (err instanceof MissingCredentialError || err instanceof GatewaySelectionError) {
|
|
@@ -1169,6 +1297,14 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
1169
1297
|
gen,
|
|
1170
1298
|
usage,
|
|
1171
1299
|
bounds: Object.keys(bounds).length > 0 ? bounds : undefined,
|
|
1300
|
+
...(o.minActions === undefined && o.minDistinctStates === undefined
|
|
1301
|
+
? {}
|
|
1302
|
+
: {
|
|
1303
|
+
minEffort: {
|
|
1304
|
+
...(o.minActions === undefined ? {} : { minActions: Number(o.minActions) }),
|
|
1305
|
+
...(o.minDistinctStates === undefined ? {} : { minDistinctStates: Number(o.minDistinctStates) }),
|
|
1306
|
+
},
|
|
1307
|
+
}),
|
|
1172
1308
|
secrets: o.secret.length > 0 ? o.secret : undefined,
|
|
1173
1309
|
...(secretFields.length > 0 ? { secretFields } : {}),
|
|
1174
1310
|
...(secretCommand === undefined ? {} : { secretCommand }),
|
|
@@ -1212,6 +1348,6 @@ export function registerExploreCommands(program, deps, buildProgram) {
|
|
|
1212
1348
|
// Every exit path restores the fixture state (a no-op when the mission already did).
|
|
1213
1349
|
await fx?.restore();
|
|
1214
1350
|
}
|
|
1215
|
-
});
|
|
1351
|
+
}));
|
|
1216
1352
|
}
|
|
1217
1353
|
//# sourceMappingURL=explore-cli.js.map
|