@jevitate/cli 0.1.0 → 0.2.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/README.md +23 -0
- package/dist/ai-cli.js +40 -30
- package/dist/ai-cli.js.map +1 -1
- package/dist/author-journey-cli.d.ts +4 -0
- package/dist/author-journey-cli.js +109 -0
- package/dist/author-journey-cli.js.map +1 -0
- package/dist/bin.js +58077 -22454
- package/dist/bin.js.map +1 -1
- package/dist/browser-run-options.d.ts +58 -0
- package/dist/browser-run-options.js +106 -0
- package/dist/browser-run-options.js.map +1 -0
- package/dist/build-info.generated.d.ts +2 -0
- package/dist/build-info.generated.js +10 -0
- package/dist/build-info.generated.js.map +1 -0
- package/dist/check-api.d.ts +5 -0
- package/dist/check-api.js +233 -0
- package/dist/check-api.js.map +1 -0
- package/dist/check-budget.d.ts +26 -0
- package/dist/check-budget.js +89 -0
- package/dist/check-budget.js.map +1 -0
- package/dist/check-cli.d.ts +31 -0
- package/dist/check-cli.js +109 -0
- package/dist/check-cli.js.map +1 -0
- package/dist/check-execute.d.ts +25 -0
- package/dist/check-execute.js +385 -0
- package/dist/check-execute.js.map +1 -0
- package/dist/check-plan.d.ts +113 -0
- package/dist/check-plan.js +448 -0
- package/dist/check-plan.js.map +1 -0
- package/dist/check-suite.d.ts +171 -0
- package/dist/check-suite.js +515 -0
- package/dist/check-suite.js.map +1 -0
- package/dist/check-types.d.ts +181 -0
- package/dist/check-types.js +35 -0
- package/dist/check-types.js.map +1 -0
- package/dist/cli-args.d.ts +26 -0
- package/dist/cli-args.js +50 -0
- package/dist/cli-args.js.map +1 -0
- package/dist/cli-output.d.ts +102 -0
- package/dist/cli-output.js +516 -0
- package/dist/cli-output.js.map +1 -0
- package/dist/cli-reference.d.ts +3 -0
- package/dist/cli-reference.js +81 -0
- package/dist/cli-reference.js.map +1 -0
- package/dist/cli-refusal.d.ts +12 -0
- package/dist/cli-refusal.js +52 -0
- package/dist/cli-refusal.js.map +1 -0
- package/dist/cli-shared.d.ts +330 -0
- package/dist/cli-shared.js +492 -0
- package/dist/cli-shared.js.map +1 -0
- package/dist/cli-surface.d.ts +33 -0
- package/dist/cli-surface.js +48 -0
- package/dist/cli-surface.js.map +1 -0
- package/dist/conversation-options.d.ts +15 -0
- package/dist/conversation-options.js +10 -0
- package/dist/conversation-options.js.map +1 -0
- package/dist/credentials-file.d.ts +15 -0
- package/dist/credentials-file.js +56 -0
- package/dist/credentials-file.js.map +1 -0
- package/dist/data-dir.d.ts +1 -1
- package/dist/data-dir.js +1 -1
- package/dist/defect-evidence.d.ts +141 -0
- package/dist/defect-evidence.js +502 -0
- package/dist/defect-evidence.js.map +1 -0
- package/dist/demo-aspect-api.d.ts +209 -0
- package/dist/demo-aspect-api.js +397 -0
- package/dist/demo-aspect-api.js.map +1 -0
- package/dist/demo-aspect-cli.d.ts +3 -0
- package/dist/demo-aspect-cli.js +241 -0
- package/dist/demo-aspect-cli.js.map +1 -0
- package/dist/demo-capture.d.ts +108 -0
- package/dist/demo-capture.js +438 -0
- package/dist/demo-capture.js.map +1 -0
- package/dist/engine.d.ts +35 -0
- package/dist/engine.js +25 -0
- package/dist/engine.js.map +1 -0
- package/dist/environments.d.ts +155 -0
- package/dist/environments.js +364 -0
- package/dist/environments.js.map +1 -0
- package/dist/exit-codes.d.ts +46 -0
- package/dist/exit-codes.js +91 -0
- package/dist/exit-codes.js.map +1 -0
- package/dist/explore-adversarial.d.ts +137 -0
- package/dist/explore-adversarial.js +218 -0
- package/dist/explore-adversarial.js.map +1 -0
- package/dist/explore-api.d.ts +7 -187
- package/dist/explore-api.js +7 -301
- package/dist/explore-api.js.map +1 -1
- package/dist/explore-author.d.ts +79 -0
- package/dist/explore-author.js +86 -0
- package/dist/explore-author.js.map +1 -0
- package/dist/explore-cli.d.ts +7 -0
- package/dist/explore-cli.js +963 -0
- package/dist/explore-cli.js.map +1 -0
- package/dist/explore-coverage.d.ts +158 -0
- package/dist/explore-coverage.js +240 -0
- package/dist/explore-coverage.js.map +1 -0
- package/dist/explore-feature.d.ts +127 -0
- package/dist/explore-feature.js +220 -0
- package/dist/explore-feature.js.map +1 -0
- package/dist/explore-goal.d.ts +253 -0
- package/dist/explore-goal.js +374 -0
- package/dist/explore-goal.js.map +1 -0
- package/dist/explore-shared.d.ts +152 -0
- package/dist/explore-shared.js +129 -0
- package/dist/explore-shared.js.map +1 -0
- package/dist/explore-specs.d.ts +53 -0
- package/dist/explore-specs.js +333 -0
- package/dist/explore-specs.js.map +1 -0
- package/dist/findings-filing.d.ts +64 -0
- package/dist/findings-filing.js +108 -0
- package/dist/findings-filing.js.map +1 -0
- package/dist/fixture-auth.d.ts +52 -0
- package/dist/fixture-auth.js +82 -0
- package/dist/fixture-auth.js.map +1 -0
- package/dist/fixture-cli.d.ts +70 -0
- package/dist/fixture-cli.js +178 -0
- package/dist/fixture-cli.js.map +1 -0
- package/dist/github-issue-filer.d.ts +62 -0
- package/dist/github-issue-filer.js +188 -0
- package/dist/github-issue-filer.js.map +1 -0
- package/dist/host-health-run.d.ts +24 -0
- package/dist/host-health-run.js +27 -0
- package/dist/host-health-run.js.map +1 -0
- package/dist/http-5xx-outcome.d.ts +6 -0
- package/dist/http-5xx-outcome.js +39 -0
- package/dist/http-5xx-outcome.js.map +1 -0
- package/dist/inbox-cli.d.ts +7 -0
- package/dist/inbox-cli.js +197 -0
- package/dist/inbox-cli.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/init-cli.d.ts +4 -0
- package/dist/init-cli.js +127 -0
- package/dist/init-cli.js.map +1 -0
- package/dist/init-keys.d.ts +19 -2
- package/dist/init-keys.js +15 -4
- package/dist/init-keys.js.map +1 -1
- package/dist/init-next-steps.d.ts +35 -0
- package/dist/init-next-steps.js +79 -0
- package/dist/init-next-steps.js.map +1 -0
- package/dist/invariants-file.d.ts +34 -0
- package/dist/invariants-file.js +68 -0
- package/dist/invariants-file.js.map +1 -0
- package/dist/invariants-validate.d.ts +30 -0
- package/dist/invariants-validate.js +105 -0
- package/dist/invariants-validate.js.map +1 -0
- package/dist/journey-annotate-api.d.ts +76 -0
- package/dist/journey-annotate-api.js +256 -0
- package/dist/journey-annotate-api.js.map +1 -0
- package/dist/journey-annotate-cli.d.ts +9 -0
- package/dist/journey-annotate-cli.js +179 -0
- package/dist/journey-annotate-cli.js.map +1 -0
- package/dist/journey-api.d.ts +79 -2
- package/dist/journey-api.js +136 -19
- package/dist/journey-api.js.map +1 -1
- package/dist/journey-cli.d.ts +4 -0
- package/dist/journey-cli.js +370 -0
- package/dist/journey-cli.js.map +1 -0
- package/dist/journey-demo-api.d.ts +112 -0
- package/dist/journey-demo-api.js +392 -0
- package/dist/journey-demo-api.js.map +1 -0
- package/dist/journey-demo-cli.d.ts +10 -0
- package/dist/journey-demo-cli.js +155 -0
- package/dist/journey-demo-cli.js.map +1 -0
- package/dist/kill-signal.d.ts +193 -0
- package/dist/kill-signal.js +284 -0
- package/dist/kill-signal.js.map +1 -0
- package/dist/launch-armed.d.ts +37 -0
- package/dist/launch-armed.js +31 -0
- package/dist/launch-armed.js.map +1 -0
- package/dist/ledger-api.d.ts +106 -0
- package/dist/ledger-api.js +237 -0
- package/dist/ledger-api.js.map +1 -0
- package/dist/ledger-cli.d.ts +18 -0
- package/dist/ledger-cli.js +107 -0
- package/dist/ledger-cli.js.map +1 -0
- package/dist/load-api.d.ts +29 -11
- package/dist/load-api.js +23 -15
- package/dist/load-api.js.map +1 -1
- package/dist/load-cli.d.ts +4 -0
- package/dist/load-cli.js +97 -0
- package/dist/load-cli.js.map +1 -0
- package/dist/log-correlation.d.ts +147 -0
- package/dist/log-correlation.js +325 -0
- package/dist/log-correlation.js.map +1 -0
- package/dist/log-lines.d.ts +131 -0
- package/dist/log-lines.js +389 -0
- package/dist/log-lines.js.map +1 -0
- package/dist/log-sources.d.ts +71 -0
- package/dist/log-sources.js +235 -0
- package/dist/log-sources.js.map +1 -0
- package/dist/logs-cli.d.ts +3 -0
- package/dist/logs-cli.js +51 -0
- package/dist/logs-cli.js.map +1 -0
- package/dist/logs-retention.d.ts +28 -0
- package/dist/logs-retention.js +84 -0
- package/dist/logs-retention.js.map +1 -0
- package/dist/mcp-api.d.ts +89 -1
- package/dist/mcp-api.js +472 -18
- package/dist/mcp-api.js.map +1 -1
- package/dist/mcp-args.d.ts +38 -0
- package/dist/mcp-args.js +131 -0
- package/dist/mcp-args.js.map +1 -0
- package/dist/mcp-cli-bridge.d.ts +34 -0
- package/dist/mcp-cli-bridge.js +62 -0
- package/dist/mcp-cli-bridge.js.map +1 -0
- package/dist/mcp-cli-runner.d.ts +29 -0
- package/dist/mcp-cli-runner.js +44 -0
- package/dist/mcp-cli-runner.js.map +1 -0
- package/dist/mcp-cli-tools.d.ts +125 -0
- package/dist/mcp-cli-tools.js +680 -0
- package/dist/mcp-cli-tools.js.map +1 -0
- package/dist/mcp-paths.d.ts +28 -0
- package/dist/mcp-paths.js +76 -0
- package/dist/mcp-paths.js.map +1 -0
- package/dist/mission-actors.d.ts +40 -0
- package/dist/mission-actors.js +72 -0
- package/dist/mission-actors.js.map +1 -0
- package/dist/mission-api.d.ts +35 -0
- package/dist/mission-api.js +58 -2
- package/dist/mission-api.js.map +1 -1
- package/dist/mission-cli.d.ts +4 -0
- package/dist/mission-cli.js +247 -0
- package/dist/mission-cli.js.map +1 -0
- package/dist/mission-exit.d.ts +22 -0
- package/dist/mission-exit.js +26 -0
- package/dist/mission-exit.js.map +1 -0
- package/dist/mission-fixtures.d.ts +225 -0
- package/dist/mission-fixtures.js +828 -0
- package/dist/mission-fixtures.js.map +1 -0
- package/dist/mission-journal.d.ts +60 -0
- package/dist/mission-journal.js +115 -0
- package/dist/mission-journal.js.map +1 -0
- package/dist/mission-queue-cli.d.ts +10 -0
- package/dist/mission-queue-cli.js +198 -0
- package/dist/mission-queue-cli.js.map +1 -0
- package/dist/mission-queue-runner.d.ts +126 -0
- package/dist/mission-queue-runner.js +397 -0
- package/dist/mission-queue-runner.js.map +1 -0
- package/dist/multi-run-cli.d.ts +37 -0
- package/dist/multi-run-cli.js +110 -0
- package/dist/multi-run-cli.js.map +1 -0
- package/dist/multi-run.d.ts +339 -0
- package/dist/multi-run.js +619 -0
- package/dist/multi-run.js.map +1 -0
- package/dist/openrouter-call.d.ts +22 -0
- package/dist/openrouter-call.js +63 -0
- package/dist/openrouter-call.js.map +1 -0
- package/dist/profile-cli.d.ts +4 -0
- package/dist/profile-cli.js +57 -0
- package/dist/profile-cli.js.map +1 -0
- package/dist/program.d.ts +3 -75
- package/dist/program.js +119 -1921
- package/dist/program.js.map +1 -1
- package/dist/project-dir.d.ts +96 -0
- package/dist/project-dir.js +220 -0
- package/dist/project-dir.js.map +1 -0
- package/dist/record-api.d.ts +10 -6
- package/dist/record-api.js +39 -28
- package/dist/record-api.js.map +1 -1
- package/dist/record-cli.d.ts +4 -0
- package/dist/record-cli.js +64 -0
- package/dist/record-cli.js.map +1 -0
- package/dist/recording-cli.d.ts +4 -0
- package/dist/recording-cli.js +248 -0
- package/dist/recording-cli.js.map +1 -0
- package/dist/regression-api.d.ts +101 -0
- package/dist/regression-api.js +384 -5
- package/dist/regression-api.js.map +1 -1
- package/dist/regression-cli.d.ts +4 -0
- package/dist/regression-cli.js +232 -0
- package/dist/regression-cli.js.map +1 -0
- package/dist/report-api.d.ts +146 -0
- package/dist/report-api.js +430 -0
- package/dist/report-api.js.map +1 -0
- package/dist/report-cli.d.ts +12 -0
- package/dist/report-cli.js +147 -0
- package/dist/report-cli.js.map +1 -0
- package/dist/result-schema.d.ts +22 -0
- package/dist/result-schema.js +28 -0
- package/dist/result-schema.js.map +1 -0
- package/dist/run-index.d.ts +29 -0
- package/dist/run-index.js +70 -0
- package/dist/run-index.js.map +1 -0
- package/dist/run-screenshots.d.ts +123 -0
- package/dist/run-screenshots.js +229 -0
- package/dist/run-screenshots.js.map +1 -0
- package/dist/runtime-env.d.ts +8 -0
- package/dist/runtime-env.js +22 -0
- package/dist/runtime-env.js.map +1 -0
- package/dist/secret-args.d.ts +23 -0
- package/dist/secret-args.js +45 -0
- package/dist/secret-args.js.map +1 -0
- package/dist/serve-cli.d.ts +4 -0
- package/dist/serve-cli.js +95 -0
- package/dist/serve-cli.js.map +1 -0
- package/dist/server-log-verify.d.ts +34 -0
- package/dist/server-log-verify.js +115 -0
- package/dist/server-log-verify.js.map +1 -0
- package/dist/session-check.d.ts +14 -0
- package/dist/session-check.js +44 -0
- package/dist/session-check.js.map +1 -0
- package/dist/site-cli.d.ts +4 -0
- package/dist/site-cli.js +127 -0
- package/dist/site-cli.js.map +1 -0
- package/dist/site-gate-cli.d.ts +28 -0
- package/dist/site-gate-cli.js +58 -0
- package/dist/site-gate-cli.js.map +1 -0
- package/dist/source-api.js +18 -3
- package/dist/source-api.js.map +1 -1
- package/dist/source-cli.d.ts +4 -0
- package/dist/source-cli.js +284 -0
- package/dist/source-cli.js.map +1 -0
- package/dist/source-run-api.d.ts +27 -1
- package/dist/source-run-api.js +22 -11
- package/dist/source-run-api.js.map +1 -1
- package/dist/storage-state-snapshot.d.ts +50 -0
- package/dist/storage-state-snapshot.js +87 -0
- package/dist/storage-state-snapshot.js.map +1 -0
- package/dist/suite-explore-options.d.ts +289 -0
- package/dist/suite-explore-options.js +140 -0
- package/dist/suite-explore-options.js.map +1 -0
- package/dist/target-config.d.ts +109 -0
- package/dist/target-config.js +216 -0
- package/dist/target-config.js.map +1 -0
- package/dist/transcript-file.d.ts +12 -0
- package/dist/transcript-file.js +23 -0
- package/dist/transcript-file.js.map +1 -0
- package/dist/ui-api.d.ts +3 -0
- package/dist/ui-api.js +7 -1
- package/dist/ui-api.js.map +1 -1
- package/dist/usability-capture.d.ts +43 -0
- package/dist/usability-capture.js +326 -0
- package/dist/usability-capture.js.map +1 -0
- package/dist/usage-config.d.ts +36 -0
- package/dist/usage-config.js +114 -0
- package/dist/usage-config.js.map +1 -0
- package/dist/ux-api.d.ts +3 -75
- package/dist/ux-api.js +3 -220
- package/dist/ux-api.js.map +1 -1
- package/dist/ux-cli.d.ts +4 -0
- package/dist/ux-cli.js +102 -0
- package/dist/ux-cli.js.map +1 -0
- package/dist/ux-config.d.ts +29 -0
- package/dist/ux-config.js +103 -0
- package/dist/ux-config.js.map +1 -0
- package/dist/ux-evidence.d.ts +54 -0
- package/dist/ux-evidence.js +197 -0
- package/dist/ux-evidence.js.map +1 -0
- package/dist/ux-review.d.ts +112 -0
- package/dist/ux-review.js +151 -0
- package/dist/ux-review.js.map +1 -0
- package/dist/ux-usability.d.ts +238 -0
- package/dist/ux-usability.js +494 -0
- package/dist/ux-usability.js.map +1 -0
- package/dist/verify-fix-api.d.ts +173 -0
- package/dist/verify-fix-api.js +454 -0
- package/dist/verify-fix-api.js.map +1 -0
- package/dist/verify-fix-cli.d.ts +4 -0
- package/dist/verify-fix-cli.js +110 -0
- package/dist/verify-fix-cli.js.map +1 -0
- package/package.json +19 -14
- package/skills/jevitate-ci-check/SKILL.md +77 -0
- package/skills/jevitate-demo/SKILL.md +61 -0
- package/skills/jevitate-explore/SKILL.md +88 -87
- package/skills/jevitate-getting-started/SKILL.md +88 -0
- package/skills/jevitate-load-test/SKILL.md +11 -2
- package/skills/jevitate-mission-scope/SKILL.md +19 -11
- package/skills/jevitate-record/SKILL.md +23 -5
- package/skills/jevitate-run-journey/SKILL.md +61 -17
- package/skills/jevitate-sources/SKILL.md +57 -14
- package/skills/jevitate-ux-review/SKILL.md +106 -16
- package/skills/jevitate-verify-fix/SKILL.md +76 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import type { JudgmentPort, GenerationPort, UsageTracker, UsageCounts } from "@jevitate/ai-core";
|
|
2
|
+
import { type BrowserPort, type EmulationSpec } from "@jevitate/playwright";
|
|
3
|
+
import { type BrowserRunOptions } from "./browser-run-options.js";
|
|
4
|
+
import { type ScreenshotsSpec } from "./run-screenshots.js";
|
|
5
|
+
import type { InvariantSpec } from "@jevitate/recording";
|
|
6
|
+
import { type SuccessCheck, type SuccessCheckResult, type SuccessWhen, type Bounds, type TimingSummary, type RunAnswer, type RunOutcome, type SecretField, type HangFinding, type SideEffect, type BudgetTrajectory, type CrashReport } from "@jevitate/explore";
|
|
7
|
+
import { type AppContext, type SignalOptions, type UxReport } from "@jevitate/ux";
|
|
8
|
+
import { type ConversationOptions } from "./conversation-options.js";
|
|
9
|
+
import { type GoalOutcome, type MissionFailure, type MissionOutcome } from "@jevitate/domain";
|
|
10
|
+
import { MISSION_RESULT_SCHEMA_VERSION, type AdvisoryServerLogDefect } from "./result-schema.js";
|
|
11
|
+
import { type HostHealthSampler, type Http5xxDefect } from "@jevitate/explore";
|
|
12
|
+
import type { EnvironmentDegraded, HostHealthSummary } from "@jevitate/domain";
|
|
13
|
+
import { type EngineInfo } from "./engine.js";
|
|
14
|
+
import { type ServerLogDefect, type ServerLogsSummary } from "./log-correlation.js";
|
|
15
|
+
import { type MissionTarget, type ServerLogOptions } from "./explore-api.js";
|
|
16
|
+
import type { TargetConfig } from "./target-config.js";
|
|
17
|
+
export interface RunUsabilityMissionOptions {
|
|
18
|
+
/** Test seam (#203): the run's host-health sampler (a deterministic fake host). Default: this host's. */
|
|
19
|
+
readonly hostHealth?: HostHealthSampler;
|
|
20
|
+
readonly url: string;
|
|
21
|
+
readonly job: string;
|
|
22
|
+
readonly allowlist: readonly string[];
|
|
23
|
+
readonly appContext: AppContext;
|
|
24
|
+
readonly judge: JudgmentPort;
|
|
25
|
+
readonly gen: GenerationPort;
|
|
26
|
+
/** Usage accounting (#100): see `RunUxReviewOptions.usage`. */
|
|
27
|
+
readonly usage?: UsageTracker;
|
|
28
|
+
/** Report cutoff (see `RunUxReviewOptions.minConfidence`). */
|
|
29
|
+
readonly minConfidence?: number | string;
|
|
30
|
+
/**
|
|
31
|
+
* Quality grades to show, e.g. "actionable,relevant-minor". Precedence: this (CLI `--show`) >
|
|
32
|
+
* `JEVITATE_UX_SHOW` > config `ux.show` > every grade (#133: the uncalibrated grader labels, it does not filter).
|
|
33
|
+
*/
|
|
34
|
+
readonly show?: string;
|
|
35
|
+
/** Cap on findings per route (see `RunUxReviewOptions.maxFindingsPerRoute`). */
|
|
36
|
+
readonly maxFindingsPerRoute?: number | string;
|
|
37
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
38
|
+
/** Path of the config file holding `ux.minConfidence`. Default `~/.jevitate/config.json`. */
|
|
39
|
+
readonly configPath?: string;
|
|
40
|
+
readonly bounds?: Partial<Bounds>;
|
|
41
|
+
readonly secrets?: readonly string[];
|
|
42
|
+
/**
|
|
43
|
+
* Secret field bindings (`--secret-field` / `--totp`, #72): typed by code, never by the model;
|
|
44
|
+
* masked in every screenshot and redacted from the transcript, Recording and report.
|
|
45
|
+
*/
|
|
46
|
+
readonly secretFields?: readonly SecretField[];
|
|
47
|
+
/** Tuning of the run-signal oracles (#96), e.g. the hung-request floor. Defaults suit real apps. */
|
|
48
|
+
readonly signals?: SignalOptions;
|
|
49
|
+
/** Local file the `upload` op attaches (CLI `--fixture`); validated before any browser opens. */
|
|
50
|
+
readonly fixture?: string;
|
|
51
|
+
readonly judgmentBudget?: number;
|
|
52
|
+
/** Conversational pages: the reply wait (ms) and the cap (chars) on each generated message. */
|
|
53
|
+
readonly conversation?: ConversationOptions;
|
|
54
|
+
readonly outDir?: string;
|
|
55
|
+
readonly browserPortFactory?: () => BrowserPort;
|
|
56
|
+
/** How Chromium is launched (executable/channel/extra args) and shown (#245 demo mode). Default: pinned Chromium, headless. */
|
|
57
|
+
readonly browser?: BrowserRunOptions;
|
|
58
|
+
/** #251 `--screenshots`: masked screenshots (one per distinct screen, or per step) + `index.md`. */
|
|
59
|
+
readonly screenshots?: ScreenshotsSpec;
|
|
60
|
+
/**
|
|
61
|
+
* #250 `--evidence-video`: after the result is written, each defect's minimal repro is replayed
|
|
62
|
+
* with captions (the failing step marked) into a masked clip + before/at screenshots, attached as
|
|
63
|
+
* `defects[].evidence` (and to its issue draft).
|
|
64
|
+
*/
|
|
65
|
+
readonly evidenceVideo?: boolean;
|
|
66
|
+
/** Per-mission viewport/device emulation (#149, CLI `--viewport <W>x<H>` / `--device "<name>"`). */
|
|
67
|
+
readonly emulation?: EmulationSpec;
|
|
68
|
+
/**
|
|
69
|
+
* Playwright storageState JSON to seed the session from (CLI `--storage-state`) — the
|
|
70
|
+
* deterministic authenticated pre-step. Holds live session cookies: handed only to the
|
|
71
|
+
* browser, never to a model or a finding.
|
|
72
|
+
*/
|
|
73
|
+
readonly storageState?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Writes the browser context's storageState here when the run ends (CLI `--save-storage-state`) —
|
|
76
|
+
* see `RunExplorationOptions.saveStorageState`'s doc for the full behaviour (written on every exit
|
|
77
|
+
* path including a crash/kill signal, never over a lost/logged-out session, mode 0600).
|
|
78
|
+
*/
|
|
79
|
+
readonly saveStorageState?: string;
|
|
80
|
+
readonly nowIso?: () => string;
|
|
81
|
+
/** The target's settle/hang configuration (`~/.jevitate/targets.json` + flags). */
|
|
82
|
+
readonly target?: TargetConfig;
|
|
83
|
+
/** Test seam: extract a page's visible text. Default reads the live page. */
|
|
84
|
+
readonly extractText?: (session: {
|
|
85
|
+
page: {
|
|
86
|
+
evaluate: (fn: () => string) => Promise<string>;
|
|
87
|
+
};
|
|
88
|
+
}) => Promise<string>;
|
|
89
|
+
/**
|
|
90
|
+
* Backend log sources (`--log-source`/`--log-defect`, #142), already validated. Lines attach to
|
|
91
|
+
* usability steps the same way as every other strategy; a `server-log` defect is reported in the
|
|
92
|
+
* result but — like every UX finding — never gates `missionOutcome`/`exitCode` (advisory-only).
|
|
93
|
+
*/
|
|
94
|
+
readonly serverLog?: ServerLogOptions;
|
|
95
|
+
/**
|
|
96
|
+
* Horizontal-overflow hard signal (#149, CLI `--check-overflow` / `--ignore-overflow`): checked
|
|
97
|
+
* on every observed screen and, when it fires, reported as a `tier: "signal"` UxFinding — pure
|
|
98
|
+
* DOM geometry (`detectOverflow`), never a model judgment. Runs by default only when the emulated
|
|
99
|
+
* viewport is narrower than 1024px, or always when `checkOverflow` is set.
|
|
100
|
+
*/
|
|
101
|
+
readonly overflow?: {
|
|
102
|
+
readonly checkOverflow?: boolean;
|
|
103
|
+
readonly toleranceCss?: number;
|
|
104
|
+
/** `--ignore-overflow <selector>` (repeatable): intentional overflow, never a finding. */
|
|
105
|
+
readonly ignoreSelectors?: readonly string[];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* `--invariants` (#150 only): usability does not check app-declared invariants (#86) or captures
|
|
109
|
+
* (#147) today — a spec carrying either is refused. Only its `budget` (over its `observe` map) is
|
|
110
|
+
* read: a pre-action guard and a post-settle check, the same as every other mission.
|
|
111
|
+
*/
|
|
112
|
+
readonly invariants?: InvariantSpec;
|
|
113
|
+
/** Resolved `authFrom.secret` refs (#135) a declared budget's probe may use: `env:VAR` → its value. */
|
|
114
|
+
readonly invariantAuthTokens?: ReadonlyMap<string, string>;
|
|
115
|
+
/**
|
|
116
|
+
* #225: independent completion checks on the job (CLI `--success`, a suite mission's `success`) —
|
|
117
|
+
* the SAME semantics as a goal run's: every one must hold (grounding the model's `done` mid-run and
|
|
118
|
+
* judged again on the final page), a vacuous one (#202) fails unless `allowVacuousChecks`, and the
|
|
119
|
+
* verdict folds exactly like a goal run's (`goalOutcome` → `missionOutcome`). Never ignored: with
|
|
120
|
+
* checks, the job's completion is theirs to decide, not the advisory goal judgment's.
|
|
121
|
+
*/
|
|
122
|
+
readonly successChecks?: readonly SuccessCheck[];
|
|
123
|
+
/** When the page checks must hold (`--success-when`): `final` (default) | `held`. */
|
|
124
|
+
readonly successWhen?: SuccessWhen;
|
|
125
|
+
/** #202 `--allow-vacuous-checks`: a check satisfied before the first action warns instead of failing. */
|
|
126
|
+
readonly allowVacuousChecks?: boolean;
|
|
127
|
+
}
|
|
128
|
+
/** Usability reads only a spec's `budget` (#150) — never its `invariants`/`capture` (#86/#147, not supported here). */
|
|
129
|
+
export declare class UsabilityInvariantsUnsupportedError extends Error {
|
|
130
|
+
readonly code: "E_USABILITY_INVARIANTS";
|
|
131
|
+
constructor();
|
|
132
|
+
}
|
|
133
|
+
export interface RunUsabilityMissionResult {
|
|
134
|
+
/** The host's health over the run (#203): peaks, the slowest render, starved steps. */
|
|
135
|
+
readonly hostHealth: HostHealthSummary;
|
|
136
|
+
/** Findings met while the host was starved (#203) — advisory, never a defect/hang, never failing the run. */
|
|
137
|
+
readonly environmentDegraded: EnvironmentDegraded[];
|
|
138
|
+
/** The result schema's version (#195): the common fields are filled the same way by every strategy. */
|
|
139
|
+
readonly schemaVersion: typeof MISSION_RESULT_SCHEMA_VERSION;
|
|
140
|
+
readonly strategy: "usability";
|
|
141
|
+
/** Where the review ran (#195: every strategy states its scope the same way) — a session PATH at most. */
|
|
142
|
+
readonly target: MissionTarget;
|
|
143
|
+
/**
|
|
144
|
+
* EVERY defect the review found (#195) — HTTP 5xx hard-signal defects (#208) and `server-log`
|
|
145
|
+
* defects (#142), each marked `advisory: true`: reported like every other strategy's, never gating
|
|
146
|
+
* a UX review's outcome.
|
|
147
|
+
*/
|
|
148
|
+
readonly defects: Array<AdvisoryServerLogDefect | (Http5xxDefect & {
|
|
149
|
+
readonly advisory: true;
|
|
150
|
+
})>;
|
|
151
|
+
/** Hang findings (0 or 1: the review stops at a hang), as every strategy lists them (#195). */
|
|
152
|
+
readonly hangs: HangFinding[];
|
|
153
|
+
/** Every Recording the review wrote (#195: one list on every strategy) — a review writes one. */
|
|
154
|
+
readonly recordingPaths: string[];
|
|
155
|
+
/** #245: `--record-video` files, finalized before this result was written (absent when not recording). */
|
|
156
|
+
readonly videoPaths?: string[];
|
|
157
|
+
/** The UX report; `null` when the analysis was unavailable (see `analysisUnavailable`). */
|
|
158
|
+
readonly report: UxReport | null;
|
|
159
|
+
readonly reportPath: string | null;
|
|
160
|
+
readonly stop: string;
|
|
161
|
+
/**
|
|
162
|
+
* Did the review's journey complete (`completed`: the job's success condition was observably met),
|
|
163
|
+
* or why not (`incomplete` + reason)? Never a silent early stop.
|
|
164
|
+
*/
|
|
165
|
+
readonly outcome: RunOutcome;
|
|
166
|
+
/** A find-out job's answer (#101), present only when code grounded it on the observed pages. */
|
|
167
|
+
readonly answer?: RunAnswer;
|
|
168
|
+
readonly screensObserved: number;
|
|
169
|
+
/** The explore loop's decision transcript, written next to the report (each step: its screenshot). */
|
|
170
|
+
readonly transcriptPath: string;
|
|
171
|
+
/**
|
|
172
|
+
* The run's Recording, written next to the report (crash-safe: flushed after every step).
|
|
173
|
+
* @deprecated since 0.2.0 (#195) — use `recordingPaths[0]`; removed in the next minor.
|
|
174
|
+
*/
|
|
175
|
+
readonly recordingPath: string;
|
|
176
|
+
/** Where the per-step screenshots are written (secret fields masked). */
|
|
177
|
+
readonly screenshotDir: string;
|
|
178
|
+
/**
|
|
179
|
+
* #134: the evidence sidecar (`usability-<stamp>.evidence.json`) — every screen as the analyzer
|
|
180
|
+
* saw it after redaction, plus the run-signal capture — so `jevitate ux <recording>` reproduces
|
|
181
|
+
* this run's findings offline. `null` when it could not be written (redaction unavailable).
|
|
182
|
+
*/
|
|
183
|
+
readonly evidencePath: string | null;
|
|
184
|
+
/** Every per-step screenshot written, in order. */
|
|
185
|
+
readonly screenshots: readonly string[];
|
|
186
|
+
/** The writes the run's actions fired (#116), marked when the control was paid / destructive. */
|
|
187
|
+
readonly sideEffects: readonly SideEffect[];
|
|
188
|
+
readonly sideEffectsTruncated?: number;
|
|
189
|
+
/**
|
|
190
|
+
* The typed verdict. UX findings are advisory, so a completed review is `clean`; a run whose
|
|
191
|
+
* loop broke is `crashed`/`inconclusive`, and so is one whose analysis could not be produced — or
|
|
192
|
+
* (#209) one whose job was never completed (`failure.kind: "job-incomplete"`).
|
|
193
|
+
*/
|
|
194
|
+
readonly missionOutcome: MissionOutcome;
|
|
195
|
+
readonly exitCode: number;
|
|
196
|
+
readonly failure?: MissionFailure;
|
|
197
|
+
/** For a `crashed` review: the evidence and its attribution (jevitate / system under test / uncertain). */
|
|
198
|
+
readonly crash?: CrashReport;
|
|
199
|
+
/** Where the review ended (redacted), and how many decisions/actions it spent — as a goal run reports them. */
|
|
200
|
+
readonly finalUrl: string;
|
|
201
|
+
readonly decisions: number;
|
|
202
|
+
readonly actions: number;
|
|
203
|
+
/** Why the analysis could not be produced (the run's evidence is still kept). */
|
|
204
|
+
readonly analysisUnavailable?: string;
|
|
205
|
+
/** Slowest pages/transitions and endpoints (p50/max), keyed by normalized route/endpoint. */
|
|
206
|
+
readonly timing: TimingSummary;
|
|
207
|
+
/** Which build produced this result (issue #83): `{version, commit, builtAt}`. */
|
|
208
|
+
readonly engine: EngineInfo;
|
|
209
|
+
/** Judgment/generation call counts and tokens for this run (#100); present only when `opts.usage` was supplied. */
|
|
210
|
+
readonly usage?: UsageCounts;
|
|
211
|
+
/** The hang finding (with its reproduction k/N), present when the run stopped on a hang (#126); also in `hangs`. */
|
|
212
|
+
readonly hang?: HangFinding;
|
|
213
|
+
/** The persisted typed result (`usability-<stamp>.recording.result.json`), readable via MCP `get_mission_result`. */
|
|
214
|
+
readonly resultPath: string;
|
|
215
|
+
/** Backend log correlation summary (#142) — present only when `--log-source` was given. */
|
|
216
|
+
readonly serverLogs?: ServerLogsSummary;
|
|
217
|
+
/** @deprecated since 0.2.0 (#195) — the `server-log` subset of `defects`; removed in the next minor. */
|
|
218
|
+
readonly serverLogDefects?: ServerLogDefect[];
|
|
219
|
+
/** Declared mission spend budgets (#150): the observed trajectory, present when any were declared. */
|
|
220
|
+
readonly budget?: BudgetTrajectory[];
|
|
221
|
+
/**
|
|
222
|
+
* #225 — present only when `successChecks` were given: the job's own ending as a goal run names it
|
|
223
|
+
* (`succeeded` / `failed` / `exhausted` / `blocked` / …), folded onto `missionOutcome` the same way.
|
|
224
|
+
*/
|
|
225
|
+
readonly goalOutcome?: GoalOutcome;
|
|
226
|
+
/** #225: each success check's result, when `successChecks` were given. */
|
|
227
|
+
readonly checks?: readonly SuccessCheckResult[];
|
|
228
|
+
/** #225/#202: the success checks' warnings (a vacuous check, `held` notes), when there were any. */
|
|
229
|
+
readonly checkWarnings?: readonly string[];
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Live usability mission. Guardrail #1 authorizes BEFORE opening a browser.
|
|
233
|
+
* Reuses explore()'s loop (goal = the job) and, via the additive onSnapshot
|
|
234
|
+
* hook, collects one screen's evidence per observation — then analyzes ONCE
|
|
235
|
+
* after the run. A UX finding NEVER gates the loop (the hook's result is
|
|
236
|
+
* ignored by explore). The temp profile dir is always removed.
|
|
237
|
+
*/
|
|
238
|
+
export declare function runUsabilityMission(opts: RunUsabilityMissionOptions): Promise<RunUsabilityMissionResult>;
|