@jevitate/cli 0.1.0 → 0.3.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.d.ts +31 -11
- package/dist/ai-cli.js +131 -88
- package/dist/ai-cli.js.map +1 -1
- package/dist/author-journey-cli.d.ts +4 -0
- package/dist/author-journey-cli.js +111 -0
- package/dist/author-journey-cli.js.map +1 -0
- package/dist/bin.js +60349 -16477
- package/dist/bin.js.map +1 -1
- package/dist/browser-run-options.d.ts +89 -0
- package/dist/browser-run-options.js +175 -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/campaign-api.d.ts +151 -0
- package/dist/campaign-api.js +446 -0
- package/dist/campaign-api.js.map +1 -0
- package/dist/campaign-cli.d.ts +6 -0
- package/dist/campaign-cli.js +66 -0
- package/dist/campaign-cli.js.map +1 -0
- package/dist/check-api.d.ts +5 -0
- package/dist/check-api.js +234 -0
- package/dist/check-api.js.map +1 -0
- package/dist/check-budget.d.ts +26 -0
- package/dist/check-budget.js +90 -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 +29 -0
- package/dist/check-execute.js +420 -0
- package/dist/check-execute.js.map +1 -0
- package/dist/check-plan.d.ts +118 -0
- package/dist/check-plan.js +516 -0
- package/dist/check-plan.js.map +1 -0
- package/dist/check-suite.d.ts +184 -0
- package/dist/check-suite.js +540 -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 +106 -0
- package/dist/cli-output.js +563 -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 +340 -0
- package/dist/cli-shared.js +537 -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 +505 -0
- package/dist/defect-evidence.js.map +1 -0
- package/dist/demo-aspect-api.d.ts +209 -0
- package/dist/demo-aspect-api.js +398 -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 +243 -0
- package/dist/demo-aspect-cli.js.map +1 -0
- package/dist/demo-capture.d.ts +142 -0
- package/dist/demo-capture.js +537 -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 +144 -0
- package/dist/explore-adversarial.js +227 -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 +1199 -0
- package/dist/explore-cli.js.map +1 -0
- package/dist/explore-coverage.d.ts +173 -0
- package/dist/explore-coverage.js +246 -0
- package/dist/explore-coverage.js.map +1 -0
- package/dist/explore-feature.d.ts +125 -0
- package/dist/explore-feature.js +218 -0
- package/dist/explore-feature.js.map +1 -0
- package/dist/explore-goal.d.ts +271 -0
- package/dist/explore-goal.js +417 -0
- package/dist/explore-goal.js.map +1 -0
- package/dist/explore-shared.d.ts +177 -0
- package/dist/explore-shared.js +149 -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 +63 -0
- package/dist/fixture-auth.js +95 -0
- package/dist/fixture-auth.js.map +1 -0
- package/dist/fixture-cli.d.ts +99 -0
- package/dist/fixture-cli.js +292 -0
- package/dist/fixture-cli.js.map +1 -0
- package/dist/github-issue-filer.d.ts +62 -0
- package/dist/github-issue-filer.js +189 -0
- package/dist/github-issue-filer.js.map +1 -0
- package/dist/host-health-run.d.ts +25 -0
- package/dist/host-health-run.js +33 -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 +156 -0
- package/dist/init-cli.js.map +1 -0
- package/dist/init-keys.d.ts +30 -2
- package/dist/init-keys.js +19 -5
- 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 +269 -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 +181 -0
- package/dist/journey-annotate-cli.js.map +1 -0
- package/dist/journey-api.d.ts +104 -2
- package/dist/journey-api.js +163 -20
- package/dist/journey-api.js.map +1 -1
- package/dist/journey-cli.d.ts +4 -0
- package/dist/journey-cli.js +411 -0
- package/dist/journey-cli.js.map +1 -0
- package/dist/journey-demo-api.d.ts +114 -0
- package/dist/journey-demo-api.js +405 -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 +158 -0
- package/dist/journey-demo-cli.js.map +1 -0
- package/dist/journey-prefix.d.ts +194 -0
- package/dist/journey-prefix.js +279 -0
- package/dist/journey-prefix.js.map +1 -0
- package/dist/key-report.d.ts +49 -0
- package/dist/key-report.js +101 -0
- package/dist/key-report.js.map +1 -0
- package/dist/kill-signal.d.ts +193 -0
- package/dist/kill-signal.js +283 -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 +239 -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 +200 -0
- package/dist/log-correlation.js +394 -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 +236 -0
- package/dist/log-sources.js.map +1 -0
- package/dist/log-trace.d.ts +80 -0
- package/dist/log-trace.js +210 -0
- package/dist/log-trace.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 +85 -0
- package/dist/logs-retention.js.map +1 -0
- package/dist/masked-input.d.ts +22 -0
- package/dist/masked-input.js +99 -0
- package/dist/masked-input.js.map +1 -0
- package/dist/mcp-api.d.ts +91 -1
- package/dist/mcp-api.js +514 -18
- package/dist/mcp-api.js.map +1 -1
- package/dist/mcp-args.d.ts +50 -0
- package/dist/mcp-args.js +164 -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 +129 -0
- package/dist/mcp-cli-tools.js +737 -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 +60 -3
- package/dist/mission-api.js.map +1 -1
- package/dist/mission-cli.d.ts +4 -0
- package/dist/mission-cli.js +248 -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 +234 -0
- package/dist/mission-fixtures.js +862 -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 +406 -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 +116 -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 +64 -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 +123 -1921
- package/dist/program.js.map +1 -1
- package/dist/project-dir.d.ts +96 -0
- package/dist/project-dir.js +221 -0
- package/dist/project-dir.js.map +1 -0
- package/dist/record-api.d.ts +13 -7
- package/dist/record-api.js +44 -30
- package/dist/record-api.js.map +1 -1
- package/dist/record-cli.d.ts +4 -0
- package/dist/record-cli.js +76 -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 +107 -0
- package/dist/regression-api.js +387 -6
- package/dist/regression-api.js.map +1 -1
- package/dist/regression-cli.d.ts +4 -0
- package/dist/regression-cli.js +284 -0
- package/dist/regression-cli.js.map +1 -0
- package/dist/report-api.d.ts +146 -0
- package/dist/report-api.js +431 -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/resource-preflight.d.ts +87 -0
- package/dist/resource-preflight.js +160 -0
- package/dist/resource-preflight.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-key-preflight.d.ts +42 -0
- package/dist/run-key-preflight.js +82 -0
- package/dist/run-key-preflight.js.map +1 -0
- package/dist/run-screenshots.d.ts +123 -0
- package/dist/run-screenshots.js +235 -0
- package/dist/run-screenshots.js.map +1 -0
- package/dist/runtime-env.d.ts +8 -0
- package/dist/runtime-env.js +23 -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 +36 -0
- package/dist/server-log-verify.js +120 -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 +59 -0
- package/dist/site-gate-cli.js.map +1 -0
- package/dist/source-api.js +20 -4
- 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 +321 -0
- package/dist/suite-explore-options.js +162 -0
- package/dist/suite-explore-options.js.map +1 -0
- package/dist/target-config.d.ts +115 -0
- package/dist/target-config.js +225 -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/type-fixture-file.d.ts +9 -0
- package/dist/type-fixture-file.js +48 -0
- package/dist/type-fixture-file.js.map +1 -0
- package/dist/ui-api.d.ts +3 -0
- package/dist/ui-api.js +11 -4
- package/dist/ui-api.js.map +1 -1
- package/dist/usability-capture.d.ts +43 -0
- package/dist/usability-capture.js +327 -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-claim-probe.d.ts +45 -0
- package/dist/ux-claim-probe.js +386 -0
- package/dist/ux-claim-probe.js.map +1 -0
- package/dist/ux-cli.d.ts +4 -0
- package/dist/ux-cli.js +109 -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-product.d.ts +14 -0
- package/dist/ux-product.js +39 -0
- package/dist/ux-product.js.map +1 -0
- package/dist/ux-review.d.ts +116 -0
- package/dist/ux-review.js +171 -0
- package/dist/ux-review.js.map +1 -0
- package/dist/ux-usability.d.ts +263 -0
- package/dist/ux-usability.js +580 -0
- package/dist/ux-usability.js.map +1 -0
- package/dist/verify-fix-api.d.ts +194 -0
- package/dist/verify-fix-api.js +506 -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 +115 -0
- package/dist/verify-fix-cli.js.map +1 -0
- package/package.json +23 -18
- package/skills/jevitate-ci-check/SKILL.md +77 -0
- package/skills/jevitate-demo/SKILL.md +61 -0
- package/skills/jevitate-explore/SKILL.md +96 -87
- package/skills/jevitate-getting-started/SKILL.md +89 -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-test-campaign/SKILL.md +203 -0
- package/skills/jevitate-ux-review/SKILL.md +106 -16
- package/skills/jevitate-verify-fix/SKILL.md +76 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { walk } from "./cli-surface.js";
|
|
2
|
+
/** Escapes a value for a markdown table cell. */
|
|
3
|
+
function cell(text) {
|
|
4
|
+
return text.replace(/\|/g, "\\|").replace(/\s*\n\s*/g, " ").trim();
|
|
5
|
+
}
|
|
6
|
+
function code(text) {
|
|
7
|
+
return `\`${text.replace(/`/g, "'")}\``;
|
|
8
|
+
}
|
|
9
|
+
function anchor(path) {
|
|
10
|
+
return path.replace(/[^a-z0-9]+/gi, "-").toLowerCase().replace(/^-|-$/g, "");
|
|
11
|
+
}
|
|
12
|
+
function defaultCell(json) {
|
|
13
|
+
if (json === "null")
|
|
14
|
+
return "";
|
|
15
|
+
try {
|
|
16
|
+
const v = JSON.parse(json);
|
|
17
|
+
return code(typeof v === "string" ? v : JSON.stringify(v));
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return code(json);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function usageLine(s, hasChildren) {
|
|
24
|
+
const args = s.arguments.map((a) => {
|
|
25
|
+
const n = a.variadic ? `${a.name}...` : a.name;
|
|
26
|
+
return a.required ? `<${n}>` : `[${n}]`;
|
|
27
|
+
});
|
|
28
|
+
const parts = [`jevitate ${s.path}`, ...(s.options.length > 0 ? ["[options]"] : []), ...(hasChildren ? ["[command]"] : []), ...args];
|
|
29
|
+
return parts.join(" ");
|
|
30
|
+
}
|
|
31
|
+
function renderArguments(args) {
|
|
32
|
+
if (args.length === 0)
|
|
33
|
+
return [];
|
|
34
|
+
const out = ["**Arguments**", "", "| Argument | Description | Required | Default | Choices |", "| --- | --- | --- | --- | --- |"];
|
|
35
|
+
for (const a of args) {
|
|
36
|
+
out.push(`| ${code(a.variadic ? `${a.name}...` : a.name)} | ${cell(a.description)} | ${a.required ? "yes" : "no"} | ${defaultCell(a.defaultValue)} | ${a.choices ? a.choices.map(code).join(", ") : ""} |`);
|
|
37
|
+
}
|
|
38
|
+
return [...out, ""];
|
|
39
|
+
}
|
|
40
|
+
function renderOptions(opts) {
|
|
41
|
+
if (opts.length === 0)
|
|
42
|
+
return [];
|
|
43
|
+
const out = ["**Options**", "", "| Flags | Description | Default | Choices | Required | Env |", "| --- | --- | --- | --- | --- | --- |"];
|
|
44
|
+
for (const o of opts) {
|
|
45
|
+
out.push(`| ${code(o.flags)} | ${cell(o.description)} | ${defaultCell(o.defaultValue)} | ${o.choices ? o.choices.map(code).join(", ") : ""} | ${o.mandatory ? "yes" : ""} | ${o.envVar ? code(o.envVar) : ""} |`);
|
|
46
|
+
}
|
|
47
|
+
return [...out, ""];
|
|
48
|
+
}
|
|
49
|
+
/** Renders the full CLI reference markdown from a live commander tree. Deterministic: no versions, dates or absolute paths. */
|
|
50
|
+
export function renderCliReference(program) {
|
|
51
|
+
const surfaces = walk(program, "");
|
|
52
|
+
const root = surfaces[0];
|
|
53
|
+
const commands = surfaces.slice(1);
|
|
54
|
+
const hasChildren = (path) => commands.some((c) => c.path.startsWith(`${path} `));
|
|
55
|
+
const top = commands.filter((c) => !c.path.includes(" "));
|
|
56
|
+
const lines = [
|
|
57
|
+
"# CLI reference",
|
|
58
|
+
"",
|
|
59
|
+
"> Generated from the CLI — do not edit by hand; run `pnpm docs:cli`.",
|
|
60
|
+
"",
|
|
61
|
+
root.description,
|
|
62
|
+
"",
|
|
63
|
+
...renderOptions(root.options),
|
|
64
|
+
"## Commands",
|
|
65
|
+
"",
|
|
66
|
+
...top.map((c) => `- [${code(c.path)}](#${anchor(c.path)}): ${c.description.split("\n")[0]}`),
|
|
67
|
+
"",
|
|
68
|
+
];
|
|
69
|
+
for (const c of commands) {
|
|
70
|
+
const depth = Math.min(c.path.split(" ").length + 1, 6);
|
|
71
|
+
lines.push(`${"#".repeat(depth)} ${c.path}`, "");
|
|
72
|
+
lines.push("```", usageLine(c, hasChildren(c.path)), "```", "");
|
|
73
|
+
if (c.description !== "")
|
|
74
|
+
lines.push(c.description, "");
|
|
75
|
+
if (c.aliases.length > 0)
|
|
76
|
+
lines.push(`Aliases: ${c.aliases.map(code).join(", ")}`, "");
|
|
77
|
+
lines.push(...renderArguments(c.arguments), ...renderOptions(c.options));
|
|
78
|
+
}
|
|
79
|
+
return `${lines.join("\n").replace(/\n{3,}/g, "\n\n").trimEnd()}\n`;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=cli-reference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-reference.js","sourceRoot":"","sources":["../src/cli-reference.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAiE,MAAM,kBAAkB,CAAC;AAEvG,iDAAiD;AACjD,SAAS,IAAI,CAAC,IAAY;IACxB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACrE,CAAC;AAED,SAAS,IAAI,CAAC,IAAY;IACxB,OAAO,KAAK,IAAI,CAAC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AC;IACD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { JsonEnvelope } from "./envelope.js";
|
|
3
|
+
/** Records, on every dispatch, the leaf command commander is about to run (a `preAction` hook on the root). */
|
|
4
|
+
export declare function trackActionCommand(program: Command): void;
|
|
5
|
+
/** `ledger add`, `mission target update`, … — the command's path under the root program. */
|
|
6
|
+
export declare function commandPath(cmd: Command): string;
|
|
7
|
+
/**
|
|
8
|
+
* Prints an envelope a command produced: a success as the envelope line (as it always was); a
|
|
9
|
+
* refusal as the envelope with `--json`, else `error <CODE>: …` on stderr. Sets `process.exitCode`
|
|
10
|
+
* (`exitCode` when the caller has a verdict code, else the envelope's class).
|
|
11
|
+
*/
|
|
12
|
+
export declare function emitJsonOrRefusal(program: Command, envelope: JsonEnvelope<unknown>, exitCode?: number): void;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { emitEnvelope } from "./cli-output.js";
|
|
2
|
+
import { exitCodeForEnvelope } from "./exit-codes.js";
|
|
3
|
+
/**
|
|
4
|
+
* THE refusal path for every command (#218). A command that refuses (`fail(code, message)`) prints
|
|
5
|
+
* the `{v, ok:false, error}` envelope on stdout only when it was asked for JSON (`--json`); without
|
|
6
|
+
* it, one human `error <CODE>: <message>` line (+ a `--help` hint for a usage error) on stderr, and
|
|
7
|
+
* nothing on stdout. The exit code comes from exit-codes.ts either way (64 usage · 2 otherwise).
|
|
8
|
+
*
|
|
9
|
+
* The emitters that print envelopes (`emitJson` in program.ts, report/invariants/ai commands) all
|
|
10
|
+
* route here, so which command is running — and whether IT was given `--json` — is looked up from
|
|
11
|
+
* the command commander dispatched to (recorded by `trackActionCommand`), not threaded by hand.
|
|
12
|
+
* A successful envelope is printed exactly as before: this module changes refusals only.
|
|
13
|
+
*/
|
|
14
|
+
const actionCommands = new WeakMap();
|
|
15
|
+
/** Records, on every dispatch, the leaf command commander is about to run (a `preAction` hook on the root). */
|
|
16
|
+
export function trackActionCommand(program) {
|
|
17
|
+
program.hook("preAction", (root, action) => {
|
|
18
|
+
actionCommands.set(root, action);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/** `ledger add`, `mission target update`, … — the command's path under the root program. */
|
|
22
|
+
export function commandPath(cmd) {
|
|
23
|
+
const names = [];
|
|
24
|
+
for (let c = cmd; c !== null && c.parent !== null; c = c.parent)
|
|
25
|
+
names.unshift(c.name());
|
|
26
|
+
return names.join(" ");
|
|
27
|
+
}
|
|
28
|
+
/** Whether the running command asked for the JSON envelope. A command without a `--json` flag never did. */
|
|
29
|
+
function wantsJson(program) {
|
|
30
|
+
const action = actionCommands.get(program);
|
|
31
|
+
if (action === undefined)
|
|
32
|
+
return { json: true }; // not dispatched through the program (a direct call): unchanged
|
|
33
|
+
const hasJsonFlag = action.options.some((o) => o.long === "--json");
|
|
34
|
+
return { json: hasJsonFlag && action.opts().json === true, command: commandPath(action) };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Prints an envelope a command produced: a success as the envelope line (as it always was); a
|
|
38
|
+
* refusal as the envelope with `--json`, else `error <CODE>: …` on stderr. Sets `process.exitCode`
|
|
39
|
+
* (`exitCode` when the caller has a verdict code, else the envelope's class).
|
|
40
|
+
*/
|
|
41
|
+
export function emitJsonOrRefusal(program, envelope, exitCode) {
|
|
42
|
+
if (!envelope.ok) {
|
|
43
|
+
const { json, command } = wantsJson(program);
|
|
44
|
+
if (!json) {
|
|
45
|
+
emitEnvelope(program, envelope, { json: false, ...(command === undefined ? {} : { command }), ...(exitCode === undefined ? {} : { exitCode }) });
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
program.configureOutput().writeOut?.(`${JSON.stringify(envelope)}\n`);
|
|
50
|
+
process.exitCode = exitCode ?? exitCodeForEnvelope(envelope);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=cli-refusal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-refusal.js","sourceRoot":"","sources":["../src/cli-refusal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;;;;;;;;;GAUG;AAEH,MAAM,cAAc,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEvD,+GAA+G;AAC/G,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IACjD,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;QACzC,cAAc,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAmB,GAAG,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM;QAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACzG,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,4GAA4G;AAC5G,SAAS,SAAS,CAAC,OAAgB;IACjC,MAAM,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,gEAAgE;IACjH,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;IACpE,OAAO,EAAE,IAAI,EAAE,WAAW,IAAI,MAAM,CAAC,IAAI,EAAsB,CAAC,IAAI,KAAK,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;AAChH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAgB,EAAE,QAA+B,EAAE,QAAiB;IACpG,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;YACjJ,OAAO;QACT,CAAC;IACH,CAAC;IACD,OAAO,CAAC,eAAe,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtE,OAAO,CAAC,QAAQ,GAAG,QAAQ,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import type { ProfileManager } from "@jevitate/daemon";
|
|
3
|
+
import { type PlannedStep } from "@jevitate/domain";
|
|
4
|
+
import { SqliteSitePolicyRepository } from "@jevitate/storage-sqlite";
|
|
5
|
+
import { UsageTracker, type JudgmentPort, type GenerationPort, type CatalogModel, type ModelConstraints, type UsageSink } from "@jevitate/ai-core";
|
|
6
|
+
import { type UnpackedExtension } from "@jevitate/playwright";
|
|
7
|
+
import { type Actor } from "@jevitate/screenplay";
|
|
8
|
+
import { type JsonEnvelope } from "./envelope.js";
|
|
9
|
+
import { type QueuedMissionExecutor } from "./mission-queue-runner.js";
|
|
10
|
+
import { type StartUiServerDeps, type UiServerHandle } from "./ui-api.js";
|
|
11
|
+
import { type AiCliDeps } from "./ai-cli.js";
|
|
12
|
+
import { type EmitOptions } from "./cli-output.js";
|
|
13
|
+
import { type DetectionDeps } from "./init-skills.js";
|
|
14
|
+
import { type ExploreCliDeps } from "./explore-api.js";
|
|
15
|
+
import { type RecorderLike } from "./record-api.js";
|
|
16
|
+
import { type SourceApiDeps } from "./source-api.js";
|
|
17
|
+
import { type RunResolvedJourney } from "./source-run-api.js";
|
|
18
|
+
import { type GitExec, type GhPort } from "@jevitate/sources";
|
|
19
|
+
import type { BrowserLaunchOptions, BrowserPort, BrowserSession } from "@jevitate/playwright";
|
|
20
|
+
import { type EmulationSpec } from "@jevitate/playwright";
|
|
21
|
+
import { type GovernanceFlags } from "./resource-preflight.js";
|
|
22
|
+
import { type BrowserRunOptions } from "./browser-run-options.js";
|
|
23
|
+
/** Injectable wiring for the `record` command (all optional; real defaults). */
|
|
24
|
+
export interface RecordCliDeps {
|
|
25
|
+
/** Testing seam — defaults to a real `PlaywrightBrowserPort`. */
|
|
26
|
+
browserPortFactory?: () => BrowserPort;
|
|
27
|
+
/** Testing seam — defaults to a real `@jevitate/recorder` `Recorder`. */
|
|
28
|
+
recorderFactory?: (session: BrowserSession, site: string) => RecorderLike;
|
|
29
|
+
/** Testing seam — the "user signalled done" wait. Defaults to Enter on stdin. */
|
|
30
|
+
waitForStop?: () => Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export interface CliDeps {
|
|
33
|
+
profiles: ProfileManager;
|
|
34
|
+
dbPath?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Prune `.jevitate/logs` by the retention policy before each command that writes run output (the
|
|
37
|
+
* real binary sets it; left unset, e.g. in tests, nothing is pruned implicitly). `logsRoot`
|
|
38
|
+
* overrides where (default: the project's logs, else `~/.jevitate/logs`).
|
|
39
|
+
*/
|
|
40
|
+
logs?: {
|
|
41
|
+
readonly autoPrune: boolean;
|
|
42
|
+
readonly logsRoot?: string;
|
|
43
|
+
readonly configPath?: string;
|
|
44
|
+
};
|
|
45
|
+
journeysDir?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Optional, additive (#247): the environments file `--env` reads (default: the repo's
|
|
48
|
+
* `.jevitate/environments.json`, found from the working directory).
|
|
49
|
+
*/
|
|
50
|
+
environmentsFile?: string;
|
|
51
|
+
/** Optional, additive: overrides the mission-targets store directory
|
|
52
|
+
* (default: ~/.jevitate/missions/targets). Same dir `queue_exploration`
|
|
53
|
+
* resolves promoted targets from. */
|
|
54
|
+
missionTargetsDir?: string;
|
|
55
|
+
/** Optional, additive: overrides the inbox store directory (default:
|
|
56
|
+
* ~/.jevitate/inbox). Same dir BOTH `jevitate mcp`'s inbox tools AND
|
|
57
|
+
* `jevitate ui` resolve against by default — Task 8 threads one resolved
|
|
58
|
+
* dir into both so they serve/consume the same store. */
|
|
59
|
+
inboxDir?: string;
|
|
60
|
+
/** Optional, additive: `jevitate ui` wiring (see ui-api.ts). Omitted in
|
|
61
|
+
* production means the real `startUiServer`, which binds a real loopback
|
|
62
|
+
* HTTP port — tests inject a fake so no port is ever bound. */
|
|
63
|
+
ui?: {
|
|
64
|
+
startUiServer?: (deps: StartUiServerDeps) => Promise<UiServerHandle>;
|
|
65
|
+
};
|
|
66
|
+
/** Optional, additive: `@jevitate/ai-core` wiring (see ai-cli.ts). Omitted in
|
|
67
|
+
* production means real env + the deterministic fake generation gateway. */
|
|
68
|
+
ai?: AiCliDeps;
|
|
69
|
+
/** Optional, additive: `@jevitate/explore` wiring (see explore-api.ts). */
|
|
70
|
+
explore?: ExploreCliDeps;
|
|
71
|
+
/** Optional, additive: `mission run` wiring — tests inject the executor so no browser opens. */
|
|
72
|
+
missions?: {
|
|
73
|
+
execute?: QueuedMissionExecutor;
|
|
74
|
+
/** Optional, additive (#255): the mission queue directory (default ~/.jevitate/missions/queue) — `mission run/queue/result` and `jevitate mcp`. */
|
|
75
|
+
queueDir?: string;
|
|
76
|
+
};
|
|
77
|
+
/** Optional, additive: `jevitate record` wiring (see record-api.ts). */
|
|
78
|
+
record?: RecordCliDeps;
|
|
79
|
+
/** Optional, additive: `jevitate init` wiring (see init-skills.ts). Omitted
|
|
80
|
+
* in production means the real `existsSync`/`homedir`/`cwd` and the real
|
|
81
|
+
* `~/.jevitate/skills-install-state.json` state path.
|
|
82
|
+
* `isInteractive` (#230): whether key collection may prompt stdin;
|
|
83
|
+
* omitted in production means the real `process.stdin.isTTY` check. */
|
|
84
|
+
init?: {
|
|
85
|
+
detection?: DetectionDeps;
|
|
86
|
+
statePath?: string;
|
|
87
|
+
isInteractive?: () => boolean;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Optional, additive: distributed-Journey-sources wiring (see source-api.ts).
|
|
91
|
+
* Every field is injectable so tests never touch the network, the real home
|
|
92
|
+
* dir, or the real `git`/`gh` binaries. Omitted in production means the real
|
|
93
|
+
* `~/.jevitate/sources` clone dir, `<cwd>/jevitate.lock`, `~/.jevitate/trust`
|
|
94
|
+
* stores, and the real `git`/`gh` ports.
|
|
95
|
+
*/
|
|
96
|
+
sources?: {
|
|
97
|
+
sourcesDir?: string;
|
|
98
|
+
lockPath?: string;
|
|
99
|
+
trustDir?: string;
|
|
100
|
+
ackDir?: string;
|
|
101
|
+
git?: GitExec;
|
|
102
|
+
gh?: GhPort;
|
|
103
|
+
now?: () => string;
|
|
104
|
+
/** Identity recorded in a `TrustRecord`/`TouAck`; defaults to the OS user. */
|
|
105
|
+
approvedBy?: string;
|
|
106
|
+
/** Optional, additive: `jevitate source run` runner seam (see
|
|
107
|
+
* source-run-api.ts). Omitted in production means the real
|
|
108
|
+
* Playwright-backed `realResolvedJourneyRunner`; tests inject a fake so no
|
|
109
|
+
* browser launches. */
|
|
110
|
+
runJourney?: RunResolvedJourney;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export declare const DEFAULT_DB_PATH: string;
|
|
114
|
+
export declare const DEFAULT_MISSION_TARGETS_DIR: string;
|
|
115
|
+
export declare const DEFAULT_INBOX_DIR: string;
|
|
116
|
+
export declare function resolveDbPath(deps: CliDeps, flag?: string): string;
|
|
117
|
+
/** #247: where `--env` reads environments and per-origin sessions from (test seams; real defaults). */
|
|
118
|
+
export declare function environmentSeams(deps: CliDeps): {
|
|
119
|
+
environmentsFile?: string;
|
|
120
|
+
targetsFile?: string;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Mirrors `resolveDbPath`'s flag > deps > home-dir-default convention: a
|
|
124
|
+
* per-invocation `--dir` flag wins, then a `CliDeps.journeysDir` wired in by
|
|
125
|
+
* the host, then `~/.jevitate/journeys`.
|
|
126
|
+
*/
|
|
127
|
+
export declare function resolveJourneysDir(deps: CliDeps, flag?: string): string;
|
|
128
|
+
/** Same flag > home-dir-default convention as `resolveJourneysDir`, for the
|
|
129
|
+
* committed-regressions directory `regression capture` writes into. */
|
|
130
|
+
export declare function resolveRegressionsDir(flag?: string): string;
|
|
131
|
+
/** Same flag > deps > home-dir-default convention as `resolveJourneysDir`, for
|
|
132
|
+
* the mission-targets store `mission target ...` reads/writes. */
|
|
133
|
+
export declare function resolveMissionTargetsDir(deps: CliDeps, flag?: string): string;
|
|
134
|
+
/** Same flag > deps > home-dir-default convention as `resolveJourneysDir`, for
|
|
135
|
+
* the inbox store `jevitate mcp`'s inbox tools AND `jevitate ui` both read
|
|
136
|
+
* from — the SAME resolved directory, so the two commands agree on where
|
|
137
|
+
* approvals/handbacks/reviews live. */
|
|
138
|
+
export declare function resolveInboxDir(deps: CliDeps, flag?: string): string;
|
|
139
|
+
/**
|
|
140
|
+
* Assembles the injected `SourceApiDeps` for the distributed-sources commands
|
|
141
|
+
* from `CliDeps.sources` (test-injected ports) or the real production
|
|
142
|
+
* defaults: `~/.jevitate/sources` clones, `<cwd>/jevitate.lock`, and the
|
|
143
|
+
* local, per-user `FsTrustStore`/`FsAckStore` under `~/.jevitate/trust`.
|
|
144
|
+
* Trust/ack stores are LOCAL by design (§14.1) — never the team-shared lock.
|
|
145
|
+
*/
|
|
146
|
+
export declare function resolveSourceApiDeps(deps: CliDeps): SourceApiDeps;
|
|
147
|
+
/** The identity recorded in a `TrustRecord`/`TouAck` — an injected value, else
|
|
148
|
+
* the OS username, else `"local"`. Never a secret/credential. */
|
|
149
|
+
export declare function resolveApprovedBy(deps: CliDeps): string;
|
|
150
|
+
/**
|
|
151
|
+
* Builds a fresh, real Playwright-backed `Actor` (its own temp profile dir +
|
|
152
|
+
* browser context, per `journey-api.ts`'s `runJourneyProgrammatically`
|
|
153
|
+
* pattern) and returns it alongside a `close()` to tear the session down.
|
|
154
|
+
* `@jevitate/regression`'s `makeActor: () => Promise<Actor>` contract calls
|
|
155
|
+
* this once per reproduce/minimize attempt — a Playwright session cannot be
|
|
156
|
+
* reused after a run — so callers must close each one it hands back.
|
|
157
|
+
*/
|
|
158
|
+
export declare function makeRealBrowserActor(site: string, storageState?: string, emulation?: EmulationSpec, browser?: BrowserRunOptions, portFactory?: () => BrowserPort,
|
|
159
|
+
/** #247: an environment's allowed origins (default: just `site`). */
|
|
160
|
+
allowedOrigins?: readonly string[]): Promise<{
|
|
161
|
+
actor: Actor;
|
|
162
|
+
close: () => Promise<void>;
|
|
163
|
+
}>;
|
|
164
|
+
/** Raw commander values of the shared `--browser-*` launch flags (and #205's resource-governance flags). */
|
|
165
|
+
export interface BrowserLaunchFlags extends GovernanceFlags {
|
|
166
|
+
browserExecutable?: string;
|
|
167
|
+
browserChannel?: string;
|
|
168
|
+
browserArg: string[];
|
|
169
|
+
/** #256: `--extension <dir>` (repeatable), each already read and checked by `extensionArg`. */
|
|
170
|
+
extension?: readonly UnpackedExtension[];
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* #256: the `--extension <dir>` argParser — reads and checks the unpacked extension NOW (a directory
|
|
174
|
+
* with a valid manifest.json), so a bad directory is a usage error (exit 64) on every command before
|
|
175
|
+
* anything runs. The same directory twice is kept once; two directories with one id are refused.
|
|
176
|
+
*/
|
|
177
|
+
export declare function extensionArg(value: string, prev: readonly UnpackedExtension[] | undefined): UnpackedExtension[];
|
|
178
|
+
/**
|
|
179
|
+
* Adds the shared Chromium launch flags to a browser-driving command. They map
|
|
180
|
+
* 1:1 onto `@jevitate/playwright`'s `BrowserLaunchOptions`; `--browser-arg`
|
|
181
|
+
* EXTENDS the Linux defaults (`--no-sandbox`, `--disable-dev-shm-usage`).
|
|
182
|
+
*/
|
|
183
|
+
export declare function withBrowserLaunchFlags(cmd: Command): Command;
|
|
184
|
+
/** The `BrowserLaunchOptions` for the parsed flags, or `undefined` when none were given. */
|
|
185
|
+
export declare function browserLaunchFromFlags(o: BrowserLaunchFlags): BrowserLaunchOptions | undefined;
|
|
186
|
+
/** Raw commander values of the demo-mode flags (#245). `overlay` is `--no-overlay`'s attribute. */
|
|
187
|
+
export interface DemoFlags {
|
|
188
|
+
headed?: boolean;
|
|
189
|
+
slowMo?: number;
|
|
190
|
+
recordVideo?: boolean | string;
|
|
191
|
+
overlay?: boolean;
|
|
192
|
+
}
|
|
193
|
+
/** Which demo-mode flags a command takes: every one shows (`--headed`/`--slow-mo`); some record and overlay. */
|
|
194
|
+
export interface DemoFlagSet {
|
|
195
|
+
/** `--record-video [dir]` — the command lists the videos in its result. */
|
|
196
|
+
readonly recordVideo?: boolean;
|
|
197
|
+
/** `--no-overlay` — the command runs an explore mission (the overlay lives in `@jevitate/explore`). */
|
|
198
|
+
readonly overlay?: boolean;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Adds the demo-mode flags (#245) to a browser-driving command. Headless stays the default; these
|
|
202
|
+
* are all opt-in and resolved by `browserRunFromFlags` (which also reads `JEVITATE_HEADED`).
|
|
203
|
+
*/
|
|
204
|
+
export declare function withDemoFlags(cmd: Command, set?: DemoFlagSet): Command;
|
|
205
|
+
/** Raw commander value of `--screenshots [mode|dir]` (#251). */
|
|
206
|
+
export interface ScreenshotsFlags {
|
|
207
|
+
screenshots?: boolean | string;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* #251: `--screenshots [mode|dir]` — masked screenshots of the run (one per distinct screen, or
|
|
211
|
+
* `steps`: one per step) plus an `index.md` contact sheet; parsed by `parseScreenshotsArg`.
|
|
212
|
+
*/
|
|
213
|
+
export declare function withScreenshotsFlag(cmd: Command): Command;
|
|
214
|
+
/**
|
|
215
|
+
* The runner's `browser` option for the parsed `--browser-*` and demo flags, or `undefined` when none
|
|
216
|
+
* were given. `--headed` (or `JEVITATE_HEADED=1`) without a display throws `HeadedWithoutDisplayError`
|
|
217
|
+
* HERE — before any browser launches — which every command reports as its usage error (exit 64).
|
|
218
|
+
*/
|
|
219
|
+
export declare function browserRunFromFlags(o: BrowserLaunchFlags & DemoFlags, env?: Readonly<Record<string, string | undefined>>, platform?: NodeJS.Platform): BrowserRunOptions | undefined;
|
|
220
|
+
/** `{ browser }` for the parsed `--browser-*` flags, or `{}` when none were given — spread into a runner's options. */
|
|
221
|
+
export declare function browserOption(o: BrowserLaunchFlags): {
|
|
222
|
+
browser?: BrowserLaunchOptions;
|
|
223
|
+
};
|
|
224
|
+
/** Raw commander values of the shared `--viewport`/`--device` emulation flags (#149). */
|
|
225
|
+
export interface EmulationFlags {
|
|
226
|
+
viewport?: string;
|
|
227
|
+
device?: string;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Adds the shared `--viewport <W>x<H>` / `--device "<name>"` flags (#149) to a browser-driving
|
|
231
|
+
* command — mutually exclusive, on `explore`, `journey run`, `load run`, `source run`, `verify-fix`
|
|
232
|
+
* and `regression capture`/`run`. Absent both: Playwright's default (desktop) viewport, documented
|
|
233
|
+
* in each command's `--help`.
|
|
234
|
+
*/
|
|
235
|
+
export declare function withEmulationFlags(cmd: Command): Command;
|
|
236
|
+
/**
|
|
237
|
+
* The `EmulationSpec` for the parsed flags, or `undefined` when neither was given (Playwright's own
|
|
238
|
+
* default viewport applies). Refused HERE, before any browser opens, when both are given —
|
|
239
|
+
* `resolveEmulation` (an unknown `--device`, or both together) is also re-checked wherever the spec
|
|
240
|
+
* is finally used, so every call path fails closed the same way.
|
|
241
|
+
*/
|
|
242
|
+
export declare function emulationFromFlags(o: EmulationFlags): EmulationSpec | undefined;
|
|
243
|
+
/**
|
|
244
|
+
* Parses repeated `--param key=value` flags into a `Record<string,string>`.
|
|
245
|
+
* `previous` starts as the option's default (`{}`) and this is called once
|
|
246
|
+
* per occurrence, commander's standard "collect" pattern.
|
|
247
|
+
*/
|
|
248
|
+
export declare function collectParam(value: string, previous: Record<string, string>): Record<string, string>;
|
|
249
|
+
export declare function makeClock(): {
|
|
250
|
+
nowIso: () => string;
|
|
251
|
+
monotonicMs: () => number;
|
|
252
|
+
};
|
|
253
|
+
export declare function withSitePolicyRepository<T>(dbPath: string, fn: (repository: SqliteSitePolicyRepository) => Promise<T>): Promise<T>;
|
|
254
|
+
export declare function isPlannedStep(value: unknown): value is PlannedStep;
|
|
255
|
+
export declare function parsePlannedScript(raw: string): PlannedStep[];
|
|
256
|
+
/**
|
|
257
|
+
* Writes a JSON envelope using the program's CURRENTLY-CONFIGURED output
|
|
258
|
+
* writer (read at call time via `configureOutput()`), so tests that call
|
|
259
|
+
* `program.configureOutput({ writeOut })` after `buildProgram()` still see
|
|
260
|
+
* output routed to their writer. Also sets `process.exitCode` (0 for `ok`; for
|
|
261
|
+
* `fail`, the error's class from exit-codes.ts — 64 usage, else 2) instead of
|
|
262
|
+
* hard-exiting, so `exitOverride()` in tests works.
|
|
263
|
+
*/
|
|
264
|
+
export declare function emitJson(program: Command, envelope: JsonEnvelope<unknown>): void;
|
|
265
|
+
/**
|
|
266
|
+
* #210: the envelope with `--json`, else a human summary (a refusal: `error <CODE>: …` on stderr);
|
|
267
|
+
* the cost line on stderr either way. Exit code: the verdict's, else the envelope's class (exit-codes.ts).
|
|
268
|
+
*/
|
|
269
|
+
export declare function emitCommandResult<T>(program: Command, envelope: JsonEnvelope<T>, opts: EmitOptions<T>): void;
|
|
270
|
+
/**
|
|
271
|
+
* #221: a user-supplied name that becomes a path (a profile name, a regression id) must be one safe
|
|
272
|
+
* segment (`assertSafeName`, @jevitate/domain). Refuses it (E_INVALID_NAME, exit 64) and returns true.
|
|
273
|
+
*/
|
|
274
|
+
export declare function refuseUnsafeName(program: Command, name: string, what: string): boolean;
|
|
275
|
+
/** A non-`--json` result: printed as bare JSON on stdout, with the cost summary line on stderr. */
|
|
276
|
+
export declare function writeRawResult(program: Command, result: unknown): void;
|
|
277
|
+
/** A non-`--json` result (#227): the human summary a `cli-output.ts` formatter renders, with the cost summary line on stderr. */
|
|
278
|
+
export declare function writeHumanResult(program: Command, result: unknown, human: (data: unknown) => string): void;
|
|
279
|
+
/**
|
|
280
|
+
* The human cost summary (#163) — on STDERR, so stdout stays exactly the JSON a caller parses:
|
|
281
|
+
* `usage: cost $0.0312 (jev $0.0203 + generation $0.0109) · 398 judgments, …`, flagged
|
|
282
|
+
* `(partial: …)` when some call could not be priced. Nothing when the result carries no usage.
|
|
283
|
+
*/
|
|
284
|
+
export declare function emitUsageLine(program: Command, data: unknown): void;
|
|
285
|
+
/**
|
|
286
|
+
* `explore --help` trailer documenting every `outcome`/`stop`/`missionOutcome` value and its
|
|
287
|
+
* exit code (issue #83 item 2) — mirrors the README "Mission outcomes and exit codes" /
|
|
288
|
+
* "Every outcome, stop and missionOutcome value" sections, derived from the same sources:
|
|
289
|
+
* `MISSION_EXIT_CODES` (@jevitate/domain) and `goalExitCode`/`missionExitCode` (./mission-exit.ts).
|
|
290
|
+
*/
|
|
291
|
+
/** `--stall-timeout <seconds>` (#114) → milliseconds; `undefined` when omitted, `null` when not a positive number. */
|
|
292
|
+
export declare function stallTimeoutMs(raw: string | number | undefined): number | undefined | null;
|
|
293
|
+
/** #230: the only `--strategy` values `explore` accepts; anything else is refused, never silently run as goal. */
|
|
294
|
+
export declare const EXPLORE_STRATEGIES: readonly ["goal", "coverage", "exploratory", "adversarial", "usability"];
|
|
295
|
+
export declare const EXPLORE_OUTCOME_HELP = "\nOutcomes, stop reasons and exit codes:\n Every result carries a canonical missionOutcome (and exitCode), whatever the strategy:\n clean 0 \u00B7 defects-found 1 \u00B7 inconclusive 2 \u00B7 crashed 2 \u00B7 hang 3 \u00B7 intermittent 4\n --strategy goal also carries its own ending as \"goalOutcome\" (= its \"outcome\"), folded onto missionOutcome:\n succeeded \u2192 clean 0 \u00B7 failed / exhausted / blocked \u2192 defects-found 1\n (defects-found, inconclusive, crashed, hang, intermittent are themselves)\n --strategy goal's \"stop\" (why the loop itself stopped; not separately exit-coded):\n done | blocked | exhausted | no-progress | hang | inconclusive | crashed | budget\n (a \"done\" code rejected ends stop done, goalOutcome failed \u2014 never blocked)\n --strategy adversarial's \"stop\" (why the hunt ended; its \"outcome\" is the canonical one above):\n step-budget | action-budget | time-budget | strategies-exhausted | not-rendered\n | scope-unreachable | targets-refused | target-unresponsive | identity-changed | stalled | hang\n | crashed\n (identity-changed: an action switched the signed-in identity and the original one could not be\n restored \u2014 inconclusive; every switch is listed in \"identityChanges\")\n --strategy coverage/exploratory's own \"outcome\" (folds into missionOutcome above):\n exhausted | insufficient-coverage | cap | scope-unreachable | stalled | crashed | hang\n A run that proved nothing is inconclusive with failure.kind insufficient-coverage (the same word as\n the frontier outcome), and failure.message says how to reach clean.\n A starved host (#203): every result carries \"hostHealth\" (peak load/core, min free memory, peak\n event-loop lag, slowest render). A hang, click timeout or no-progress met while the host was\n starved is listed in \"environmentDegraded\" (advisory, never a finding); a run most of whose steps\n ran starved is inconclusive (failure.kind degraded-environment), never clean.\n --feature's own \"outcome\" (folds into missionOutcome above):\n exhausted | insufficient-coverage | cap | path-cap | scope-unreachable | stalled | crashed | hang\n Argument/input errors (E_EXPLORE_ARGS, E_EXPLORE_ASSERTION, \u2026) exit 64, never 1.\n Without --json: a human summary (verdict, defects by fingerprint, result file, next step);\n with --json: the {v, ok, data} envelope.\n Every command's exit codes: docs/outcomes.md \"Exit codes\".\n";
|
|
296
|
+
/** Distinct from MissingCredentialError: "no --real/--fake-ai selected" vs "keys missing." */
|
|
297
|
+
export declare class GatewaySelectionError extends Error {
|
|
298
|
+
}
|
|
299
|
+
export declare const DEFAULT_EXPLORE_CATALOG: CatalogModel[];
|
|
300
|
+
export declare const DEFAULT_EXPLORE_CONSTRAINTS: ModelConstraints;
|
|
301
|
+
/**
|
|
302
|
+
* Selects the exploration gateways. Injected gateways (tests) win; otherwise
|
|
303
|
+
* `--real` builds the live Jev + OpenRouter adapters behind a fail-closed
|
|
304
|
+
* credential preflight, and `--fake-ai` uses deterministic fakes (a pipeline
|
|
305
|
+
* smoke — the fake judge always proposes `done`, so it will not drive to a
|
|
306
|
+
* goal). No selection is a fail-closed refusal, never a silent fake.
|
|
307
|
+
*/
|
|
308
|
+
export declare function buildExploreGateways(deps: CliDeps, opts: {
|
|
309
|
+
real: boolean;
|
|
310
|
+
fakeAi: boolean;
|
|
311
|
+
}): Promise<{
|
|
312
|
+
judge: JudgmentPort;
|
|
313
|
+
gen: GenerationPort;
|
|
314
|
+
usage: UsageTracker;
|
|
315
|
+
}>;
|
|
316
|
+
/**
|
|
317
|
+
* #246: the generation gateway ALONE (`journey annotate` drafts text and asks no judgment
|
|
318
|
+
* question, so it needs no Jev key). Same selection rules as `buildExploreGateways`: injected (tests)
|
|
319
|
+
* wins, `--real` is fail-closed on the OpenRouter key, `--fake-ai` is the deterministic fake, the two
|
|
320
|
+
* are exclusive, and no selection is a refusal — never a silent fake.
|
|
321
|
+
*/
|
|
322
|
+
export declare function buildGenerationGateway(deps: CliDeps, opts: {
|
|
323
|
+
real: boolean;
|
|
324
|
+
fakeAi: boolean;
|
|
325
|
+
}): Promise<{
|
|
326
|
+
gen: GenerationPort;
|
|
327
|
+
usage: UsageTracker;
|
|
328
|
+
}>;
|
|
329
|
+
/**
|
|
330
|
+
* A judge that always proposes `done` — used only by `--fake-ai` (smoke). It is TOTAL and
|
|
331
|
+
* deterministic: it answers EVERY question it is asked, whatever the mission or rubric names it
|
|
332
|
+
* (#213) — a choice offering `done` picks `done` (so the goal/coverage loop stops at once, and
|
|
333
|
+
* will not drive to a goal); a choice that does NOT offer `done` (e.g. the UX quality grader's
|
|
334
|
+
* label set, `grade::0`) deterministically picks its first listed option instead of throwing; a
|
|
335
|
+
* noul answers "no"; a score answers 0. It never throws on a question SHAPE it does not
|
|
336
|
+
* specifically know about — only on a malformed one (a choice with no options at all), which is a
|
|
337
|
+
* bug upstream, not an unknown question. `usage` (#100) is optional: when supplied, every call
|
|
338
|
+
* reports 1 judgment at 0 tokens.
|
|
339
|
+
*/
|
|
340
|
+
export declare function fakeDoneJudge(usage?: UsageSink): JudgmentPort;
|