@bjoernrochel/sevro 1.0.0 → 1.1.1
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/CONTRIBUTING.md +34 -4
- package/README.md +7 -6
- package/dist/examples/basic/graded.json +13 -0
- package/dist/examples/basic/host.js +9 -0
- package/dist/examples/basic/host.js.map +1 -0
- package/dist/examples/basic/prompt-only.json +7 -0
- package/dist/examples/recipes/candidate.js +23 -0
- package/dist/examples/recipes/candidate.js.map +1 -0
- package/dist/examples/recipes/cases/coding-change.json +21 -0
- package/dist/examples/recipes/cases/host-tools.json +21 -0
- package/dist/examples/recipes/cases/mise.json +21 -0
- package/dist/examples/recipes/cases/node.json +21 -0
- package/dist/examples/recipes/cases/python-uv.json +21 -0
- package/dist/examples/recipes/cases/semantic.json +17 -0
- package/dist/examples/recipes/coding-change/check.js +16 -0
- package/dist/examples/recipes/coding-change/check.js.map +1 -0
- package/dist/examples/recipes/executable.js +20 -0
- package/dist/examples/recipes/executable.js.map +1 -0
- package/dist/examples/recipes/extension-artifacts.js +56 -0
- package/dist/examples/recipes/extension-artifacts.js.map +1 -0
- package/dist/examples/recipes/extension-methods.js +167 -0
- package/dist/examples/recipes/extension-methods.js.map +1 -0
- package/dist/examples/recipes/extension.js +28 -0
- package/dist/examples/recipes/extension.js.map +1 -0
- package/dist/examples/recipes/modules.js +9 -0
- package/dist/examples/recipes/modules.js.map +1 -0
- package/dist/examples/recipes/repository-skill/.agents/skills/startup-guide/SKILL.md +7 -0
- package/dist/examples/recipes/repository-skill/.claude/skills/startup-guide/SKILL.md +7 -0
- package/dist/examples/recipes/repository-skill/README.md +3 -0
- package/dist/examples/recipes/run-inputs.js +144 -0
- package/dist/examples/recipes/run-inputs.js.map +1 -0
- package/dist/examples/recipes/run-options.js +103 -0
- package/dist/examples/recipes/run-options.js.map +1 -0
- package/dist/examples/recipes/run.js +62 -0
- package/dist/examples/recipes/run.js.map +1 -0
- package/dist/examples/recipes/runtime/empty.json +1 -0
- package/dist/examples/recipes/runtime/goals.json +1 -0
- package/dist/examples/recipes/runtime/mise.json +6 -0
- package/dist/examples/recipes/runtime/path.json +1 -0
- package/dist/examples/recipes/runtime/plugins.json +4 -0
- package/dist/examples/recipes/runtime/python-uv.json +10 -0
- package/dist/examples/recipes/semantic-judge.js +27 -0
- package/dist/examples/recipes/semantic-judge.js.map +1 -0
- package/dist/examples/templates/coding/adapter.js +14 -0
- package/dist/examples/templates/coding/adapter.js.map +1 -0
- package/dist/examples/templates/coding/case.json +15 -0
- package/dist/examples/templates/repository-skill/.agents/skills/startup-guide/SKILL.md +6 -0
- package/dist/examples/templates/repository-skill/extension-data.js +61 -0
- package/dist/examples/templates/repository-skill/extension-data.js.map +1 -0
- package/dist/examples/templates/repository-skill/extension.js +29 -0
- package/dist/examples/templates/repository-skill/extension.js.map +1 -0
- package/dist/examples/templates/response/adapter.js +13 -0
- package/dist/examples/templates/response/adapter.js.map +1 -0
- package/dist/examples/templates/response/case.json +13 -0
- package/dist/src/advisory.js +86 -0
- package/dist/src/advisory.js.map +1 -0
- package/dist/src/candidate-artifacts.js +139 -0
- package/dist/src/candidate-artifacts.js.map +1 -0
- package/dist/src/candidate-codex-state.js +110 -0
- package/dist/src/candidate-codex-state.js.map +1 -0
- package/dist/src/case-validation.js +92 -0
- package/dist/src/case-validation.js.map +1 -0
- package/dist/src/cli/cancellation.js +21 -0
- package/dist/src/cli/cancellation.js.map +1 -0
- package/dist/src/cli/command.js +60 -0
- package/dist/src/cli/command.js.map +1 -0
- package/dist/src/cli/completion.js +14 -0
- package/dist/src/cli/completion.js.map +1 -0
- package/dist/src/cli/demo.js +45 -0
- package/dist/src/cli/demo.js.map +1 -0
- package/dist/src/cli/evaluation.js +40 -0
- package/dist/src/cli/evaluation.js.map +1 -0
- package/dist/src/cli/extension.js +54 -0
- package/dist/src/cli/extension.js.map +1 -0
- package/dist/src/cli/help.js +190 -0
- package/dist/src/cli/help.js.map +1 -0
- package/dist/src/cli/hosts.js +33 -0
- package/dist/src/cli/hosts.js.map +1 -0
- package/dist/src/cli/init-settings.js +29 -0
- package/dist/src/cli/init-settings.js.map +1 -0
- package/dist/src/cli/init.js +82 -0
- package/dist/src/cli/init.js.map +1 -0
- package/dist/src/cli/invocation.js +431 -0
- package/dist/src/cli/invocation.js.map +1 -0
- package/dist/src/cli/loading.js +110 -0
- package/dist/src/cli/loading.js.map +1 -0
- package/dist/src/cli/preparation.js +88 -0
- package/dist/src/cli/preparation.js.map +1 -0
- package/dist/src/cli/presentation.js +61 -0
- package/dist/src/cli/presentation.js.map +1 -0
- package/dist/src/cli/progress.js +5 -0
- package/dist/src/cli/progress.js.map +1 -0
- package/dist/src/cli/run-manifest.js +108 -0
- package/dist/src/cli/run-manifest.js.map +1 -0
- package/dist/src/cli/run-options.js +367 -0
- package/dist/src/cli/run-options.js.map +1 -0
- package/dist/src/cli/run-overrides.js +51 -0
- package/dist/src/cli/run-overrides.js.map +1 -0
- package/dist/src/cli/settings.js +127 -0
- package/dist/src/cli/settings.js.map +1 -0
- package/dist/src/cli/summary.js +28 -0
- package/dist/src/cli/summary.js.map +1 -0
- package/dist/src/cli.js +20 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/contract-types.js +2 -0
- package/dist/src/contract-types.js.map +1 -0
- package/dist/src/engine.js +4 -0
- package/dist/src/engine.js.map +1 -0
- package/dist/src/evaluation/advisory.js +85 -0
- package/dist/src/evaluation/advisory.js.map +1 -0
- package/dist/src/evaluation/check-plan.js +292 -0
- package/dist/src/evaluation/check-plan.js.map +1 -0
- package/dist/src/evaluation/collection.js +61 -0
- package/dist/src/evaluation/collection.js.map +1 -0
- package/dist/src/evaluation/context.js +2 -0
- package/dist/src/evaluation/context.js.map +1 -0
- package/dist/src/evaluation/grading-host.js +28 -0
- package/dist/src/evaluation/grading-host.js.map +1 -0
- package/dist/src/evaluation/grading.js +154 -0
- package/dist/src/evaluation/grading.js.map +1 -0
- package/dist/src/evaluation/invocation-plan.js +312 -0
- package/dist/src/evaluation/invocation-plan.js.map +1 -0
- package/dist/src/evaluation/plan.js +376 -0
- package/dist/src/evaluation/plan.js.map +1 -0
- package/dist/src/evaluation/progress.js +14 -0
- package/dist/src/evaluation/progress.js.map +1 -0
- package/dist/src/evaluation/resources.js +159 -0
- package/dist/src/evaluation/resources.js.map +1 -0
- package/dist/src/evaluation/run.js +148 -0
- package/dist/src/evaluation/run.js.map +1 -0
- package/dist/src/evaluation/scheduler.js +27 -0
- package/dist/src/evaluation/scheduler.js.map +1 -0
- package/dist/src/evaluation/semantic.js +183 -0
- package/dist/src/evaluation/semantic.js.map +1 -0
- package/dist/src/evaluation/trial.js +593 -0
- package/dist/src/evaluation/trial.js.map +1 -0
- package/dist/src/evaluation/types.js +20 -0
- package/dist/src/evaluation/types.js.map +1 -0
- package/dist/src/evidence/host-results.js +67 -0
- package/dist/src/evidence/host-results.js.map +1 -0
- package/dist/src/evidence/retained-artifacts.js +17 -0
- package/dist/src/evidence/retained-artifacts.js.map +1 -0
- package/dist/src/evidence/trial-writer.js +131 -0
- package/dist/src/evidence/trial-writer.js.map +1 -0
- package/dist/src/evidence/usage.js +14 -0
- package/dist/src/evidence/usage.js.map +1 -0
- package/dist/src/executable.js +20 -0
- package/dist/src/executable.js.map +1 -0
- package/dist/src/extension-client.js +212 -0
- package/dist/src/extension-client.js.map +1 -0
- package/dist/src/extension-session.js +236 -0
- package/dist/src/extension-session.js.map +1 -0
- package/dist/src/fixtures/advisory.js +206 -0
- package/dist/src/fixtures/advisory.js.map +1 -0
- package/dist/src/fixtures/bin.js +41 -0
- package/dist/src/fixtures/bin.js.map +1 -0
- package/dist/src/fixtures/cleanup.js +43 -0
- package/dist/src/fixtures/cleanup.js.map +1 -0
- package/dist/src/fixtures/create.js +94 -0
- package/dist/src/fixtures/create.js.map +1 -0
- package/dist/src/fixtures/generated.js +181 -0
- package/dist/src/fixtures/generated.js.map +1 -0
- package/dist/src/fixtures/git-hooks.js +16 -0
- package/dist/src/fixtures/git-hooks.js.map +1 -0
- package/dist/src/fixtures/preparation.js +201 -0
- package/dist/src/fixtures/preparation.js.map +1 -0
- package/dist/src/fixtures/repository.js +255 -0
- package/dist/src/fixtures/repository.js.map +1 -0
- package/dist/src/fixtures/setup.js +175 -0
- package/dist/src/fixtures/setup.js.map +1 -0
- package/dist/src/fixtures/tools.js +57 -0
- package/dist/src/fixtures/tools.js.map +1 -0
- package/dist/src/fixtures/workspace-state.js +155 -0
- package/dist/src/fixtures/workspace-state.js.map +1 -0
- package/dist/src/generated/cli-result.cjs +2 -0
- package/dist/src/generated/extension.cjs +2 -0
- package/dist/src/generated/report.cjs +2 -0
- package/dist/src/generated/run-evidence.cjs +2 -0
- package/dist/src/generated/runtime.cjs +2 -0
- package/dist/src/git.js +72 -0
- package/dist/src/git.js.map +1 -0
- package/dist/src/graders/artifact.js +68 -0
- package/dist/src/graders/artifact.js.map +1 -0
- package/dist/src/graders/git-head.js +112 -0
- package/dist/src/graders/git-head.js.map +1 -0
- package/dist/src/graders/output.js +345 -0
- package/dist/src/graders/output.js.map +1 -0
- package/dist/src/graders/semantic.js +132 -0
- package/dist/src/graders/semantic.js.map +1 -0
- package/dist/src/graders/shell.js +321 -0
- package/dist/src/graders/shell.js.map +1 -0
- package/dist/src/host-diagnostic-redaction.js +52 -0
- package/dist/src/host-diagnostic-redaction.js.map +1 -0
- package/dist/src/host-diagnostics.js +248 -0
- package/dist/src/host-diagnostics.js.map +1 -0
- package/dist/src/hosts/claude-continuation.js +89 -0
- package/dist/src/hosts/claude-continuation.js.map +1 -0
- package/dist/src/hosts/claude-credential.js +121 -0
- package/dist/src/hosts/claude-credential.js.map +1 -0
- package/dist/src/hosts/claude-events.js +136 -0
- package/dist/src/hosts/claude-events.js.map +1 -0
- package/dist/src/hosts/claude-keychain.js +100 -0
- package/dist/src/hosts/claude-keychain.js.map +1 -0
- package/dist/src/hosts/claude-login-recovery.js +67 -0
- package/dist/src/hosts/claude-login-recovery.js.map +1 -0
- package/dist/src/hosts/claude-login-refresh.js +146 -0
- package/dist/src/hosts/claude-login-refresh.js.map +1 -0
- package/dist/src/hosts/claude-login-store.js +124 -0
- package/dist/src/hosts/claude-login-store.js.map +1 -0
- package/dist/src/hosts/claude-login.js +74 -0
- package/dist/src/hosts/claude-login.js.map +1 -0
- package/dist/src/hosts/claude-native-goal.js +138 -0
- package/dist/src/hosts/claude-native-goal.js.map +1 -0
- package/dist/src/hosts/claude-process.js +10 -0
- package/dist/src/hosts/claude-process.js.map +1 -0
- package/dist/src/hosts/claude-refresh-lock.js +76 -0
- package/dist/src/hosts/claude-refresh-lock.js.map +1 -0
- package/dist/src/hosts/claude-repository-invocation.js +229 -0
- package/dist/src/hosts/claude-repository-invocation.js.map +1 -0
- package/dist/src/hosts/claude-settings.js +158 -0
- package/dist/src/hosts/claude-settings.js.map +1 -0
- package/dist/src/hosts/claude-skill-activations.js +131 -0
- package/dist/src/hosts/claude-skill-activations.js.map +1 -0
- package/dist/src/hosts/claude-state.js +237 -0
- package/dist/src/hosts/claude-state.js.map +1 -0
- package/dist/src/hosts/claude-tool-calls.js +150 -0
- package/dist/src/hosts/claude-tool-calls.js.map +1 -0
- package/dist/src/hosts/claude.js +373 -0
- package/dist/src/hosts/claude.js.map +1 -0
- package/dist/src/hosts/codex-app-server.js +764 -0
- package/dist/src/hosts/codex-app-server.js.map +1 -0
- package/dist/src/hosts/codex-configuration.js +91 -0
- package/dist/src/hosts/codex-configuration.js.map +1 -0
- package/dist/src/hosts/codex-events.js +104 -0
- package/dist/src/hosts/codex-events.js.map +1 -0
- package/dist/src/hosts/codex-exec-controls.js +434 -0
- package/dist/src/hosts/codex-exec-controls.js.map +1 -0
- package/dist/src/hosts/codex-invocation.js +54 -0
- package/dist/src/hosts/codex-invocation.js.map +1 -0
- package/dist/src/hosts/codex-marketplace.js +185 -0
- package/dist/src/hosts/codex-marketplace.js.map +1 -0
- package/dist/src/hosts/codex-native-calls.js +516 -0
- package/dist/src/hosts/codex-native-calls.js.map +1 -0
- package/dist/src/hosts/codex-process.js +10 -0
- package/dist/src/hosts/codex-process.js.map +1 -0
- package/dist/src/hosts/codex-profile.js +206 -0
- package/dist/src/hosts/codex-profile.js.map +1 -0
- package/dist/src/hosts/codex-session-files.js +89 -0
- package/dist/src/hosts/codex-session-files.js.map +1 -0
- package/dist/src/hosts/codex-state.js +310 -0
- package/dist/src/hosts/codex-state.js.map +1 -0
- package/dist/src/hosts/codex.js +527 -0
- package/dist/src/hosts/codex.js.map +1 -0
- package/dist/src/hosts/isolation-common.js +43 -0
- package/dist/src/hosts/isolation-common.js.map +1 -0
- package/dist/src/hosts/isolation-roots.js +64 -0
- package/dist/src/hosts/isolation-roots.js.map +1 -0
- package/dist/src/hosts/isolation.js +12 -0
- package/dist/src/hosts/isolation.js.map +1 -0
- package/dist/src/hosts/linux-sandbox.js +127 -0
- package/dist/src/hosts/linux-sandbox.js.map +1 -0
- package/dist/src/hosts/mac-sandbox.js +137 -0
- package/dist/src/hosts/mac-sandbox.js.map +1 -0
- package/dist/src/hosts/native-controls.js +151 -0
- package/dist/src/hosts/native-controls.js.map +1 -0
- package/dist/src/hosts/native-request.js +33 -0
- package/dist/src/hosts/native-request.js.map +1 -0
- package/dist/src/hosts/process-lifecycle.js +167 -0
- package/dist/src/hosts/process-lifecycle.js.map +1 -0
- package/dist/src/hosts/protected-worktrees.js +81 -0
- package/dist/src/hosts/protected-worktrees.js.map +1 -0
- package/dist/src/hosts/skill-hook-catalog.js +100 -0
- package/dist/src/hosts/skill-hook-catalog.js.map +1 -0
- package/dist/src/hosts/skill-hook-handler.js +228 -0
- package/dist/src/hosts/skill-hook-handler.js.map +1 -0
- package/dist/src/hosts/skill-hooks.js +423 -0
- package/dist/src/hosts/skill-hooks.js.map +1 -0
- package/dist/src/hosts/workspace-fingerprint.js +72 -0
- package/dist/src/hosts/workspace-fingerprint.js.map +1 -0
- package/dist/src/identity.js +167 -0
- package/dist/src/identity.js.map +1 -0
- package/dist/src/instrumentation.js +83 -0
- package/dist/src/instrumentation.js.map +1 -0
- package/dist/src/native-transcript-state.js +85 -0
- package/dist/src/native-transcript-state.js.map +1 -0
- package/dist/src/native-transcript-view.js +65 -0
- package/dist/src/native-transcript-view.js.map +1 -0
- package/dist/src/native-transcripts.js +208 -0
- package/dist/src/native-transcripts.js.map +1 -0
- package/dist/src/paths.js +13 -0
- package/dist/src/paths.js.map +1 -0
- package/dist/src/process-lifecycle.js +101 -0
- package/dist/src/process-lifecycle.js.map +1 -0
- package/dist/src/provenance.js +263 -0
- package/dist/src/provenance.js.map +1 -0
- package/dist/src/prune.js +228 -0
- package/dist/src/prune.js.map +1 -0
- package/dist/src/report.js +276 -0
- package/dist/src/report.js.map +1 -0
- package/dist/src/resolved-case.js +29 -0
- package/dist/src/resolved-case.js.map +1 -0
- package/dist/src/results-lock.js +40 -0
- package/dist/src/results-lock.js.map +1 -0
- package/dist/src/results.js +127 -0
- package/dist/src/results.js.map +1 -0
- package/dist/src/run-owner.js +283 -0
- package/dist/src/run-owner.js.map +1 -0
- package/dist/src/runner-paths.js +11 -0
- package/dist/src/runner-paths.js.map +1 -0
- package/dist/src/runtime/config.js +323 -0
- package/dist/src/runtime/config.js.map +1 -0
- package/dist/src/runtime/discovery-apple.js +65 -0
- package/dist/src/runtime/discovery-apple.js.map +1 -0
- package/dist/src/runtime/discovery-providers.js +37 -0
- package/dist/src/runtime/discovery-providers.js.map +1 -0
- package/dist/src/runtime/discovery.js +40 -0
- package/dist/src/runtime/discovery.js.map +1 -0
- package/dist/src/runtime/hook-processes.js +81 -0
- package/dist/src/runtime/hook-processes.js.map +1 -0
- package/dist/src/runtime/hooks.js +304 -0
- package/dist/src/runtime/hooks.js.map +1 -0
- package/dist/src/runtime/paths.js +244 -0
- package/dist/src/runtime/paths.js.map +1 -0
- package/dist/src/runtime/query.js +76 -0
- package/dist/src/runtime/query.js.map +1 -0
- package/dist/src/runtime/seeds.js +98 -0
- package/dist/src/runtime/seeds.js.map +1 -0
- package/dist/src/runtime/shared-cache.js +81 -0
- package/dist/src/runtime/shared-cache.js.map +1 -0
- package/dist/src/runtime/state.js +106 -0
- package/dist/src/runtime/state.js.map +1 -0
- package/dist/src/runtime-process.js +148 -0
- package/dist/src/runtime-process.js.map +1 -0
- package/dist/src/schema-types.js +2 -0
- package/dist/src/schema-types.js.map +1 -0
- package/dist/src/schema.js +16 -0
- package/dist/src/schema.js.map +1 -0
- package/dist/src/shell.js +5 -0
- package/dist/src/shell.js.map +1 -0
- package/dist/src/sqlite-lock.js +18 -0
- package/dist/src/sqlite-lock.js.map +1 -0
- package/dist/src/storage.js +21 -0
- package/dist/src/storage.js.map +1 -0
- package/dist/src/transcript-retention.js +109 -0
- package/dist/src/transcript-retention.js.map +1 -0
- package/dist/src/value-guards.js +26 -0
- package/dist/src/value-guards.js.map +1 -0
- package/docs/architecture.md +5 -2
- package/docs/creating-cases.md +2 -3
- package/docs/development-cli.md +12 -7
- package/docs/documentation-quality.md +4 -3
- package/docs/evaluation-workflow.md +8 -8
- package/docs/getting-started.md +7 -6
- package/docs/guide-evaluation.md +1 -1
- package/docs/identity-v1.md +4 -1
- package/docs/installing.md +31 -13
- package/docs/licensing.md +2 -2
- package/docs/native-hosts.md +1 -1
- package/docs/recipes.md +41 -40
- package/docs/releases.md +20 -4
- package/docs/run-settings-v1.md +3 -3
- package/docs/specs/repository-guide.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/docs/typescript-quality.md +18 -1
- package/examples/recipes/executable.ts +19 -0
- package/examples/recipes/extension-artifacts.ts +1 -1
- package/examples/recipes/extension.ts +2 -1
- package/examples/recipes/modules.ts +9 -0
- package/examples/recipes/run-inputs.ts +14 -19
- package/examples/recipes/run-options.ts +9 -8
- package/examples/recipes/run.ts +21 -7
- package/examples/templates/repository-skill/extension-data.ts +1 -1
- package/examples/templates/repository-skill/extension.ts +2 -1
- package/package.json +14 -6
- package/src/cli/demo.ts +3 -2
- package/src/cli/help.ts +4 -3
- package/src/cli/init-settings.ts +5 -4
- package/src/cli/init.ts +9 -8
- package/src/cli/invocation.ts +2 -1
- package/src/cli/preparation.ts +2 -2
- package/src/cli.ts +1 -1
- package/src/executable.ts +19 -0
- package/src/extension-client.ts +6 -12
- package/src/fixtures/setup.ts +3 -2
- package/src/git.ts +2 -1
- package/src/graders/git-head.ts +3 -2
- package/src/graders/shell.ts +4 -3
- package/src/hosts/claude-keychain.ts +3 -2
- package/src/hosts/claude-login-refresh.ts +3 -2
- package/src/hosts/claude-refresh-lock.ts +2 -1
- package/src/hosts/claude-settings.ts +3 -1
- package/src/hosts/claude.ts +1 -1
- package/src/hosts/isolation-roots.ts +3 -2
- package/src/hosts/process-lifecycle.ts +4 -6
- package/src/hosts/protected-worktrees.ts +2 -1
- package/src/hosts/skill-hook-handler.ts +1 -1
- package/src/hosts/skill-hooks.ts +10 -2
- package/src/provenance.ts +7 -6
- package/src/results-lock.ts +4 -4
- package/src/run-owner.ts +15 -9
- package/src/runner-paths.ts +21 -0
- package/src/runtime/hook-processes.ts +2 -1
- package/src/runtime/hooks.ts +9 -7
- package/src/runtime-process.ts +194 -0
- package/src/sqlite-lock.ts +25 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { parseArgs } from "node:util";
|
|
2
|
+
/** Parsing, saved-setting semantics, protection and help share one inventory. */
|
|
3
|
+
export const RUN_OPTIONS = {
|
|
4
|
+
json: {
|
|
5
|
+
type: "boolean",
|
|
6
|
+
kind: "boolean",
|
|
7
|
+
cliOnly: true,
|
|
8
|
+
section: "common",
|
|
9
|
+
help: "One versioned JSON result on stdout (default: false); human diagnostics go to stderr.",
|
|
10
|
+
},
|
|
11
|
+
"run-manifest-file": {
|
|
12
|
+
type: "string",
|
|
13
|
+
kind: "path",
|
|
14
|
+
cliOnly: true,
|
|
15
|
+
private: true,
|
|
16
|
+
section: "common",
|
|
17
|
+
help: "<path> Saved sevro.run.v1 settings; explicit flags override them.",
|
|
18
|
+
},
|
|
19
|
+
"retain-host-diagnostics": {
|
|
20
|
+
type: "boolean",
|
|
21
|
+
kind: "boolean",
|
|
22
|
+
section: "common",
|
|
23
|
+
help: "Retain private native diagnostics (default: false).",
|
|
24
|
+
},
|
|
25
|
+
dry: {
|
|
26
|
+
type: "boolean",
|
|
27
|
+
kind: "boolean",
|
|
28
|
+
section: "common",
|
|
29
|
+
help: "Prepare only (default: false).",
|
|
30
|
+
},
|
|
31
|
+
"case-file": {
|
|
32
|
+
type: "string",
|
|
33
|
+
kind: "path",
|
|
34
|
+
private: true,
|
|
35
|
+
section: "required",
|
|
36
|
+
help: "<path> Select exactly one of --case-file or --extension-command-file.",
|
|
37
|
+
},
|
|
38
|
+
"case-id": {
|
|
39
|
+
type: "string",
|
|
40
|
+
kind: "string",
|
|
41
|
+
extension: true,
|
|
42
|
+
section: "extension",
|
|
43
|
+
help: "<id> Required with --extension-command-file.",
|
|
44
|
+
},
|
|
45
|
+
"extension-command-file": {
|
|
46
|
+
type: "string",
|
|
47
|
+
kind: "path",
|
|
48
|
+
extension: true,
|
|
49
|
+
private: true,
|
|
50
|
+
section: "required",
|
|
51
|
+
help: "<path> Select one extension case instead of --case-file.",
|
|
52
|
+
},
|
|
53
|
+
"extension-source-file": {
|
|
54
|
+
type: "string",
|
|
55
|
+
kind: "path-list",
|
|
56
|
+
multiple: true,
|
|
57
|
+
extension: true,
|
|
58
|
+
private: true,
|
|
59
|
+
section: "extension",
|
|
60
|
+
help: "<path> Required source closure; repeatable.",
|
|
61
|
+
},
|
|
62
|
+
"extension-configuration-file": {
|
|
63
|
+
type: "string",
|
|
64
|
+
kind: "path",
|
|
65
|
+
extension: true,
|
|
66
|
+
private: true,
|
|
67
|
+
section: "extension",
|
|
68
|
+
help: "<path> Private JSON object; supply with --extension-redacted-configuration-file.",
|
|
69
|
+
},
|
|
70
|
+
"extension-redacted-configuration-file": {
|
|
71
|
+
type: "string",
|
|
72
|
+
kind: "path",
|
|
73
|
+
extension: true,
|
|
74
|
+
private: true,
|
|
75
|
+
section: "extension",
|
|
76
|
+
help: "<path> Redacted retained configuration; supply with --extension-configuration-file.",
|
|
77
|
+
},
|
|
78
|
+
"task-verdict-policy": {
|
|
79
|
+
type: "string",
|
|
80
|
+
kind: "string",
|
|
81
|
+
extension: true,
|
|
82
|
+
section: "extension",
|
|
83
|
+
help: "<id> Select an advertised namespaced extension policy.",
|
|
84
|
+
},
|
|
85
|
+
"replace-builtin-grader": {
|
|
86
|
+
type: "string",
|
|
87
|
+
kind: "string",
|
|
88
|
+
multiple: true,
|
|
89
|
+
extension: true,
|
|
90
|
+
section: "extension",
|
|
91
|
+
help: "<id> Explicit replacement; repeatable.",
|
|
92
|
+
},
|
|
93
|
+
"case-source-root": {
|
|
94
|
+
type: "string",
|
|
95
|
+
kind: "path",
|
|
96
|
+
private: true,
|
|
97
|
+
section: "extension",
|
|
98
|
+
help: "<path> Supply with --case-source-map-file for mapped sources.",
|
|
99
|
+
},
|
|
100
|
+
"case-source-map-file": {
|
|
101
|
+
type: "string",
|
|
102
|
+
kind: "path",
|
|
103
|
+
private: true,
|
|
104
|
+
section: "extension",
|
|
105
|
+
help: "<path> Supply with --case-source-root for mapped sources.",
|
|
106
|
+
},
|
|
107
|
+
"adapter-module": {
|
|
108
|
+
type: "string",
|
|
109
|
+
kind: "path",
|
|
110
|
+
section: "required",
|
|
111
|
+
help: "<path> Select exactly one of --adapter-module or --host <codex|claude>.",
|
|
112
|
+
},
|
|
113
|
+
"semantic-adapter-module": {
|
|
114
|
+
type: "string",
|
|
115
|
+
kind: "path",
|
|
116
|
+
private: true,
|
|
117
|
+
section: "grading",
|
|
118
|
+
help: "<path> Select this or --semantic-host codex.",
|
|
119
|
+
},
|
|
120
|
+
"semantic-host": {
|
|
121
|
+
type: "string",
|
|
122
|
+
kind: "string",
|
|
123
|
+
section: "grading",
|
|
124
|
+
help: "<codex> Native semantic route; none selected by default.",
|
|
125
|
+
},
|
|
126
|
+
"semantic-model": {
|
|
127
|
+
type: "string",
|
|
128
|
+
kind: "string",
|
|
129
|
+
section: "grading",
|
|
130
|
+
help: "<name> Required for native semantic route.",
|
|
131
|
+
},
|
|
132
|
+
"semantic-effort": {
|
|
133
|
+
type: "string",
|
|
134
|
+
kind: "string",
|
|
135
|
+
section: "grading",
|
|
136
|
+
help: "<level> Required for native semantic route.",
|
|
137
|
+
},
|
|
138
|
+
"advisory-adapter-module": {
|
|
139
|
+
type: "string",
|
|
140
|
+
kind: "path",
|
|
141
|
+
private: true,
|
|
142
|
+
section: "grading",
|
|
143
|
+
help: "<path> Select this or --advisory-host codex.",
|
|
144
|
+
},
|
|
145
|
+
"advisory-host": {
|
|
146
|
+
type: "string",
|
|
147
|
+
kind: "string",
|
|
148
|
+
section: "grading",
|
|
149
|
+
help: "<codex> Native advisory route; none selected by default.",
|
|
150
|
+
},
|
|
151
|
+
"advisory-model": {
|
|
152
|
+
type: "string",
|
|
153
|
+
kind: "string",
|
|
154
|
+
section: "grading",
|
|
155
|
+
help: "<name> Required for native advisory route.",
|
|
156
|
+
},
|
|
157
|
+
"advisory-effort": {
|
|
158
|
+
type: "string",
|
|
159
|
+
kind: "string",
|
|
160
|
+
section: "grading",
|
|
161
|
+
help: "<level> Required for native advisory route.",
|
|
162
|
+
},
|
|
163
|
+
"advisory-exclude": {
|
|
164
|
+
type: "string",
|
|
165
|
+
kind: "string",
|
|
166
|
+
multiple: true,
|
|
167
|
+
section: "grading",
|
|
168
|
+
help: "<relative-path> Exclude an evaluator path; repeatable.",
|
|
169
|
+
},
|
|
170
|
+
host: {
|
|
171
|
+
type: "string",
|
|
172
|
+
kind: "string",
|
|
173
|
+
section: "required",
|
|
174
|
+
help: "<codex|claude> Bundled candidate route instead of --adapter-module.",
|
|
175
|
+
},
|
|
176
|
+
"codex-bin": {
|
|
177
|
+
type: "string",
|
|
178
|
+
kind: "path",
|
|
179
|
+
route: "codex",
|
|
180
|
+
section: "native",
|
|
181
|
+
help: "<path> (default: codex on PATH) Explicit binary override.",
|
|
182
|
+
},
|
|
183
|
+
"codex-entrypoint": {
|
|
184
|
+
type: "string",
|
|
185
|
+
kind: "string",
|
|
186
|
+
section: "native",
|
|
187
|
+
help: "<exec|app-server> Candidate transport (default: exec).",
|
|
188
|
+
},
|
|
189
|
+
"codex-timeout-ms": {
|
|
190
|
+
type: "string",
|
|
191
|
+
kind: "number",
|
|
192
|
+
route: "codex",
|
|
193
|
+
section: "native",
|
|
194
|
+
help: "<integer> 1..1800000 milliseconds (default: 600000).",
|
|
195
|
+
},
|
|
196
|
+
"codex-auth-file": {
|
|
197
|
+
type: "string",
|
|
198
|
+
kind: "path",
|
|
199
|
+
private: true,
|
|
200
|
+
route: "codex",
|
|
201
|
+
section: "native",
|
|
202
|
+
help: "<path> Required for every Codex route.",
|
|
203
|
+
},
|
|
204
|
+
"claude-bin": {
|
|
205
|
+
type: "string",
|
|
206
|
+
kind: "path",
|
|
207
|
+
route: "claude",
|
|
208
|
+
section: "native",
|
|
209
|
+
help: "<path> (default: claude on PATH) Explicit binary override.",
|
|
210
|
+
},
|
|
211
|
+
"claude-credential-file": {
|
|
212
|
+
type: "string",
|
|
213
|
+
kind: "path",
|
|
214
|
+
private: true,
|
|
215
|
+
route: "claude",
|
|
216
|
+
section: "native",
|
|
217
|
+
help: "<path> Optional credential override; otherwise use native auth.",
|
|
218
|
+
},
|
|
219
|
+
"claude-uv-cache-dir": {
|
|
220
|
+
type: "string",
|
|
221
|
+
kind: "path",
|
|
222
|
+
route: "claude",
|
|
223
|
+
section: "deprecated",
|
|
224
|
+
help: "<path> Migrate to sevro.json; cannot be combined with a runtime policy.",
|
|
225
|
+
},
|
|
226
|
+
"claude-project-settings": {
|
|
227
|
+
type: "boolean",
|
|
228
|
+
kind: "boolean",
|
|
229
|
+
route: "claude",
|
|
230
|
+
section: "native",
|
|
231
|
+
help: "Allow fixture project settings (default: false).",
|
|
232
|
+
},
|
|
233
|
+
"toolchain-bin-dir": {
|
|
234
|
+
type: "string",
|
|
235
|
+
kind: "path",
|
|
236
|
+
section: "deprecated",
|
|
237
|
+
help: "<path> Migrate to sevro.json; cannot be combined with a runtime policy.",
|
|
238
|
+
},
|
|
239
|
+
model: {
|
|
240
|
+
type: "string",
|
|
241
|
+
kind: "string",
|
|
242
|
+
section: "native",
|
|
243
|
+
help: "<name> Required for a bundled candidate host.",
|
|
244
|
+
},
|
|
245
|
+
effort: {
|
|
246
|
+
type: "string",
|
|
247
|
+
kind: "string",
|
|
248
|
+
section: "native",
|
|
249
|
+
help: "<level> Required for a bundled candidate host.",
|
|
250
|
+
},
|
|
251
|
+
"shell-isolation": {
|
|
252
|
+
type: "boolean",
|
|
253
|
+
kind: "boolean",
|
|
254
|
+
section: "common",
|
|
255
|
+
help: "Isolate shell checks (default: false).",
|
|
256
|
+
},
|
|
257
|
+
"protected-root": {
|
|
258
|
+
type: "string",
|
|
259
|
+
kind: "path-list",
|
|
260
|
+
multiple: true,
|
|
261
|
+
section: "common",
|
|
262
|
+
help: "<path> Extra protected source/private root; repeatable.",
|
|
263
|
+
},
|
|
264
|
+
"project-root": {
|
|
265
|
+
type: "string",
|
|
266
|
+
kind: "path",
|
|
267
|
+
section: "common",
|
|
268
|
+
help: "<path> (default: current directory) Project identity; does not copy its files into the fixture.",
|
|
269
|
+
},
|
|
270
|
+
"config-root": {
|
|
271
|
+
type: "string",
|
|
272
|
+
kind: "path",
|
|
273
|
+
section: "common",
|
|
274
|
+
help: "<path> (default: --project-root) Native concurrency configuration.",
|
|
275
|
+
},
|
|
276
|
+
"runtime-config-file": {
|
|
277
|
+
type: "string",
|
|
278
|
+
kind: "path",
|
|
279
|
+
private: true,
|
|
280
|
+
section: "common",
|
|
281
|
+
help: "<path> Runtime policy; otherwise discover project sevro.json.",
|
|
282
|
+
},
|
|
283
|
+
"results-root": {
|
|
284
|
+
type: "string",
|
|
285
|
+
kind: "path",
|
|
286
|
+
section: "common",
|
|
287
|
+
help: "<path> (default: <project-root>/.sevro/results) Retained evidence.",
|
|
288
|
+
},
|
|
289
|
+
"run-state-root": {
|
|
290
|
+
type: "string",
|
|
291
|
+
kind: "path",
|
|
292
|
+
section: "common",
|
|
293
|
+
help: "<path> (default: --results-root) Active records/checkpoints.",
|
|
294
|
+
},
|
|
295
|
+
"runner-build-digest": {
|
|
296
|
+
type: "string",
|
|
297
|
+
kind: "string",
|
|
298
|
+
section: "provenance",
|
|
299
|
+
help: "<sha256> 64 lowercase hex characters; normally derived automatically.",
|
|
300
|
+
},
|
|
301
|
+
"runner-checkout-root": {
|
|
302
|
+
type: "string",
|
|
303
|
+
kind: "path",
|
|
304
|
+
section: "provenance",
|
|
305
|
+
help: "<path> Record the running checkout's revision/dirty digest.",
|
|
306
|
+
},
|
|
307
|
+
"project-digest": {
|
|
308
|
+
type: "string",
|
|
309
|
+
kind: "string",
|
|
310
|
+
section: "provenance",
|
|
311
|
+
help: "<sha256> 64 lowercase hex characters; normally derived automatically.",
|
|
312
|
+
},
|
|
313
|
+
condition: {
|
|
314
|
+
type: "string",
|
|
315
|
+
kind: "string",
|
|
316
|
+
section: "common",
|
|
317
|
+
help: "<passive|enforced> (default: passive) Bundled hosts use passive.",
|
|
318
|
+
},
|
|
319
|
+
trials: {
|
|
320
|
+
type: "string",
|
|
321
|
+
kind: "number",
|
|
322
|
+
section: "common",
|
|
323
|
+
help: "<integer> (default: 1) Positive number of trials.",
|
|
324
|
+
},
|
|
325
|
+
jobs: {
|
|
326
|
+
type: "string",
|
|
327
|
+
kind: "number",
|
|
328
|
+
section: "common",
|
|
329
|
+
help: "<integer> (default: 3) Maximum parallel trials, positive integer.",
|
|
330
|
+
},
|
|
331
|
+
threshold: {
|
|
332
|
+
type: "string",
|
|
333
|
+
kind: "number",
|
|
334
|
+
section: "common",
|
|
335
|
+
help: "<number> (default: 1) All assessed trials must pass; range (0, 1].",
|
|
336
|
+
},
|
|
337
|
+
};
|
|
338
|
+
export function optionsWith(key, value) {
|
|
339
|
+
return Object.keys(RUN_OPTIONS).filter((name) => RUN_OPTIONS[name][key] === value);
|
|
340
|
+
}
|
|
341
|
+
export const PATH_OPTIONS = optionsWith("kind", "path");
|
|
342
|
+
export const PATH_LIST_OPTIONS = optionsWith("kind", "path-list");
|
|
343
|
+
export const NUMBER_OPTIONS = new Set(optionsWith("kind", "number"));
|
|
344
|
+
export const LIST_OPTIONS = new Set(optionsWith("multiple", true));
|
|
345
|
+
export const CLI_ONLY = new Set(optionsWith("cliOnly", true));
|
|
346
|
+
export const EXTENSION_OPTIONS = optionsWith("extension", true);
|
|
347
|
+
export function runArguments(argv) {
|
|
348
|
+
return parseArgs({
|
|
349
|
+
args: argv,
|
|
350
|
+
allowPositionals: true,
|
|
351
|
+
allowNegative: true,
|
|
352
|
+
strict: true,
|
|
353
|
+
options: RUN_OPTIONS,
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
/** Preserve the last explicit output selection even when parsing fails. */
|
|
357
|
+
export function jsonOutputRequested(argv) {
|
|
358
|
+
let json = false;
|
|
359
|
+
for (const argument of argv) {
|
|
360
|
+
if (argument === "--json")
|
|
361
|
+
json = true;
|
|
362
|
+
if (argument === "--no-json")
|
|
363
|
+
json = false;
|
|
364
|
+
}
|
|
365
|
+
return json;
|
|
366
|
+
}
|
|
367
|
+
//# sourceMappingURL=run-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-options.js","sourceRoot":"","sources":["run-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,kBAAkB;AAqBtC,iFAAiF;AACjF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,uFAAuF;KAC9F;IACD,mBAAmB,EAAE;QACnB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,oEAAoE;KAC3E;I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AAE,IAAI,CAAC,CAAC;AAEhE,MAAM,UAAU,YAAY,CAAC,IAAc;IACzC,OAAO,SAAS,CAAC;QACf,IAAI,EAAE,IAAI;QACV,gBAAgB,EAAE,IAAI;QACtB,aAAa,EAAE,IAAI;QACnB,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,WAAW;KACrB,CAAC,CAAC;AACL,CAAC;AAID,2EAA2E;AAC3E,MAAM,UAAU,mBAAmB,CAAC,IAAc;IAChD,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,KAAK,MAAM,QAAQ,IAAI,IAAI,EAAE,CAAC;QAC5B,IAAI,QAAQ,KAAK,QAAQ;YAAE,IAAI,GAAG,IAAI,CAAC;QACvC,IAAI,QAAQ,KAAK,WAAW;YAAE,IAAI,GAAG,KAAK,CAAC;IAC7C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { parseArgs } from \"node:util\";\n\ntype RunOption = {\n type: \"string\" | \"boolean\";\n kind: \"string\" | \"boolean\" | \"number\" | \"path\" | \"path-list\";\n multiple?: boolean;\n cliOnly?: boolean;\n private?: boolean;\n extension?: boolean;\n route?: \"codex\" | \"claude\";\n section:\n | \"required\"\n | \"common\"\n | \"native\"\n | \"extension\"\n | \"grading\"\n | \"provenance\"\n | \"deprecated\";\n help: string;\n};\n\n/** Parsing, saved-setting semantics, protection and help share one inventory. */\nexport const RUN_OPTIONS = {\n json: {\n type: \"boolean\",\n kind: \"boolean\",\n cliOnly: true,\n section: \"common\",\n help: \"One versioned JSON result on stdout (default: false); human diagnostics go to stderr.\",\n },\n \"run-manifest-file\": {\n type: \"string\",\n kind: \"path\",\n cliOnly: true,\n private: true,\n section: \"common\",\n help: \"<path> Saved sevro.run.v1 settings; explicit flags override them.\",\n },\n \"retain-host-diagnostics\": {\n type: \"boolean\",\n kind: \"boolean\",\n section: \"common\",\n help: \"Retain private native diagnostics (default: false).\",\n },\n dry: {\n type: \"boolean\",\n kind: \"boolean\",\n section: \"common\",\n help: \"Prepare only (default: false).\",\n },\n \"case-file\": {\n type: \"string\",\n kind: \"path\",\n private: true,\n section: \"required\",\n help: \"<path> Select exactly one of --case-file or --extension-command-file.\",\n },\n \"case-id\": {\n type: \"string\",\n kind: \"string\",\n extension: true,\n section: \"extension\",\n help: \"<id> Required with --extension-command-file.\",\n },\n \"extension-command-file\": {\n type: \"string\",\n kind: \"path\",\n extension: true,\n private: true,\n section: \"required\",\n help: \"<path> Select one extension case instead of --case-file.\",\n },\n \"extension-source-file\": {\n type: \"string\",\n kind: \"path-list\",\n multiple: true,\n extension: true,\n private: true,\n section: \"extension\",\n help: \"<path> Required source closure; repeatable.\",\n },\n \"extension-configuration-file\": {\n type: \"string\",\n kind: \"path\",\n extension: true,\n private: true,\n section: \"extension\",\n help: \"<path> Private JSON object; supply with --extension-redacted-configuration-file.\",\n },\n \"extension-redacted-configuration-file\": {\n type: \"string\",\n kind: \"path\",\n extension: true,\n private: true,\n section: \"extension\",\n help: \"<path> Redacted retained configuration; supply with --extension-configuration-file.\",\n },\n \"task-verdict-policy\": {\n type: \"string\",\n kind: \"string\",\n extension: true,\n section: \"extension\",\n help: \"<id> Select an advertised namespaced extension policy.\",\n },\n \"replace-builtin-grader\": {\n type: \"string\",\n kind: \"string\",\n multiple: true,\n extension: true,\n section: \"extension\",\n help: \"<id> Explicit replacement; repeatable.\",\n },\n \"case-source-root\": {\n type: \"string\",\n kind: \"path\",\n private: true,\n section: \"extension\",\n help: \"<path> Supply with --case-source-map-file for mapped sources.\",\n },\n \"case-source-map-file\": {\n type: \"string\",\n kind: \"path\",\n private: true,\n section: \"extension\",\n help: \"<path> Supply with --case-source-root for mapped sources.\",\n },\n \"adapter-module\": {\n type: \"string\",\n kind: \"path\",\n section: \"required\",\n help: \"<path> Select exactly one of --adapter-module or --host <codex|claude>.\",\n },\n \"semantic-adapter-module\": {\n type: \"string\",\n kind: \"path\",\n private: true,\n section: \"grading\",\n help: \"<path> Select this or --semantic-host codex.\",\n },\n \"semantic-host\": {\n type: \"string\",\n kind: \"string\",\n section: \"grading\",\n help: \"<codex> Native semantic route; none selected by default.\",\n },\n \"semantic-model\": {\n type: \"string\",\n kind: \"string\",\n section: \"grading\",\n help: \"<name> Required for native semantic route.\",\n },\n \"semantic-effort\": {\n type: \"string\",\n kind: \"string\",\n section: \"grading\",\n help: \"<level> Required for native semantic route.\",\n },\n \"advisory-adapter-module\": {\n type: \"string\",\n kind: \"path\",\n private: true,\n section: \"grading\",\n help: \"<path> Select this or --advisory-host codex.\",\n },\n \"advisory-host\": {\n type: \"string\",\n kind: \"string\",\n section: \"grading\",\n help: \"<codex> Native advisory route; none selected by default.\",\n },\n \"advisory-model\": {\n type: \"string\",\n kind: \"string\",\n section: \"grading\",\n help: \"<name> Required for native advisory route.\",\n },\n \"advisory-effort\": {\n type: \"string\",\n kind: \"string\",\n section: \"grading\",\n help: \"<level> Required for native advisory route.\",\n },\n \"advisory-exclude\": {\n type: \"string\",\n kind: \"string\",\n multiple: true,\n section: \"grading\",\n help: \"<relative-path> Exclude an evaluator path; repeatable.\",\n },\n host: {\n type: \"string\",\n kind: \"string\",\n section: \"required\",\n help: \"<codex|claude> Bundled candidate route instead of --adapter-module.\",\n },\n \"codex-bin\": {\n type: \"string\",\n kind: \"path\",\n route: \"codex\",\n section: \"native\",\n help: \"<path> (default: codex on PATH) Explicit binary override.\",\n },\n \"codex-entrypoint\": {\n type: \"string\",\n kind: \"string\",\n section: \"native\",\n help: \"<exec|app-server> Candidate transport (default: exec).\",\n },\n \"codex-timeout-ms\": {\n type: \"string\",\n kind: \"number\",\n route: \"codex\",\n section: \"native\",\n help: \"<integer> 1..1800000 milliseconds (default: 600000).\",\n },\n \"codex-auth-file\": {\n type: \"string\",\n kind: \"path\",\n private: true,\n route: \"codex\",\n section: \"native\",\n help: \"<path> Required for every Codex route.\",\n },\n \"claude-bin\": {\n type: \"string\",\n kind: \"path\",\n route: \"claude\",\n section: \"native\",\n help: \"<path> (default: claude on PATH) Explicit binary override.\",\n },\n \"claude-credential-file\": {\n type: \"string\",\n kind: \"path\",\n private: true,\n route: \"claude\",\n section: \"native\",\n help: \"<path> Optional credential override; otherwise use native auth.\",\n },\n \"claude-uv-cache-dir\": {\n type: \"string\",\n kind: \"path\",\n route: \"claude\",\n section: \"deprecated\",\n help: \"<path> Migrate to sevro.json; cannot be combined with a runtime policy.\",\n },\n \"claude-project-settings\": {\n type: \"boolean\",\n kind: \"boolean\",\n route: \"claude\",\n section: \"native\",\n help: \"Allow fixture project settings (default: false).\",\n },\n \"toolchain-bin-dir\": {\n type: \"string\",\n kind: \"path\",\n section: \"deprecated\",\n help: \"<path> Migrate to sevro.json; cannot be combined with a runtime policy.\",\n },\n model: {\n type: \"string\",\n kind: \"string\",\n section: \"native\",\n help: \"<name> Required for a bundled candidate host.\",\n },\n effort: {\n type: \"string\",\n kind: \"string\",\n section: \"native\",\n help: \"<level> Required for a bundled candidate host.\",\n },\n \"shell-isolation\": {\n type: \"boolean\",\n kind: \"boolean\",\n section: \"common\",\n help: \"Isolate shell checks (default: false).\",\n },\n \"protected-root\": {\n type: \"string\",\n kind: \"path-list\",\n multiple: true,\n section: \"common\",\n help: \"<path> Extra protected source/private root; repeatable.\",\n },\n \"project-root\": {\n type: \"string\",\n kind: \"path\",\n section: \"common\",\n help: \"<path> (default: current directory) Project identity; does not copy its files into the fixture.\",\n },\n \"config-root\": {\n type: \"string\",\n kind: \"path\",\n section: \"common\",\n help: \"<path> (default: --project-root) Native concurrency configuration.\",\n },\n \"runtime-config-file\": {\n type: \"string\",\n kind: \"path\",\n private: true,\n section: \"common\",\n help: \"<path> Runtime policy; otherwise discover project sevro.json.\",\n },\n \"results-root\": {\n type: \"string\",\n kind: \"path\",\n section: \"common\",\n help: \"<path> (default: <project-root>/.sevro/results) Retained evidence.\",\n },\n \"run-state-root\": {\n type: \"string\",\n kind: \"path\",\n section: \"common\",\n help: \"<path> (default: --results-root) Active records/checkpoints.\",\n },\n \"runner-build-digest\": {\n type: \"string\",\n kind: \"string\",\n section: \"provenance\",\n help: \"<sha256> 64 lowercase hex characters; normally derived automatically.\",\n },\n \"runner-checkout-root\": {\n type: \"string\",\n kind: \"path\",\n section: \"provenance\",\n help: \"<path> Record the running checkout's revision/dirty digest.\",\n },\n \"project-digest\": {\n type: \"string\",\n kind: \"string\",\n section: \"provenance\",\n help: \"<sha256> 64 lowercase hex characters; normally derived automatically.\",\n },\n condition: {\n type: \"string\",\n kind: \"string\",\n section: \"common\",\n help: \"<passive|enforced> (default: passive) Bundled hosts use passive.\",\n },\n trials: {\n type: \"string\",\n kind: \"number\",\n section: \"common\",\n help: \"<integer> (default: 1) Positive number of trials.\",\n },\n jobs: {\n type: \"string\",\n kind: \"number\",\n section: \"common\",\n help: \"<integer> (default: 3) Maximum parallel trials, positive integer.\",\n },\n threshold: {\n type: \"string\",\n kind: \"number\",\n section: \"common\",\n help: \"<number> (default: 1) All assessed trials must pass; range (0, 1].\",\n },\n} as const satisfies Record<string, RunOption>;\n\nexport type RunOptionName = keyof typeof RUN_OPTIONS;\n\ntype MatchingOptions<K extends keyof RunOption, V> = {\n [N in RunOptionName]: (typeof RUN_OPTIONS)[N] extends Record<K, V>\n ? N\n : never;\n}[RunOptionName];\n\nexport function optionsWith<\n K extends keyof RunOption,\n const V extends RunOption[K],\n>(key: K, value: V): MatchingOptions<K, V>[] {\n return (Object.keys(RUN_OPTIONS) as RunOptionName[]).filter(\n (name) => (RUN_OPTIONS[name] as RunOption)[key] === value,\n ) as MatchingOptions<K, V>[];\n}\n\nexport const PATH_OPTIONS = optionsWith(\"kind\", \"path\");\nexport const PATH_LIST_OPTIONS = optionsWith(\"kind\", \"path-list\");\nexport const NUMBER_OPTIONS = new Set<string>(optionsWith(\"kind\", \"number\"));\nexport const LIST_OPTIONS = new Set<string>(optionsWith(\"multiple\", true));\nexport const CLI_ONLY = new Set<string>(optionsWith(\"cliOnly\", true));\nexport const EXTENSION_OPTIONS = optionsWith(\"extension\", true);\n\nexport function runArguments(argv: string[]) {\n return parseArgs({\n args: argv,\n allowPositionals: true,\n allowNegative: true,\n strict: true,\n options: RUN_OPTIONS,\n });\n}\n\nexport type RunValues = ReturnType<typeof runArguments>[\"values\"];\n\n/** Preserve the last explicit output selection even when parsing fails. */\nexport function jsonOutputRequested(argv: string[]): boolean {\n let json = false;\n for (const argument of argv) {\n if (argument === \"--json\") json = true;\n if (argument === \"--no-json\") json = false;\n }\n return json;\n}\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { EXTENSION_OPTIONS, optionsWith } from "./run-options.js";
|
|
2
|
+
function removeSaved(saved, keys) {
|
|
3
|
+
for (const key of keys)
|
|
4
|
+
Reflect.deleteProperty(saved, key);
|
|
5
|
+
}
|
|
6
|
+
const CANDIDATE_OPTIONS = [
|
|
7
|
+
"host",
|
|
8
|
+
"model",
|
|
9
|
+
"effort",
|
|
10
|
+
"codex-entrypoint",
|
|
11
|
+
];
|
|
12
|
+
function overrideCandidate(saved, explicit) {
|
|
13
|
+
if (explicit["adapter-module"] !== undefined)
|
|
14
|
+
removeSaved(saved, CANDIDATE_OPTIONS);
|
|
15
|
+
if (explicit.host === undefined)
|
|
16
|
+
return;
|
|
17
|
+
delete saved["adapter-module"];
|
|
18
|
+
if (saved.host !== explicit.host)
|
|
19
|
+
removeSaved(saved, ["model", "effort", "codex-entrypoint"]);
|
|
20
|
+
}
|
|
21
|
+
function overrideSecondary(saved, explicit, role) {
|
|
22
|
+
if (explicit[`${role}-host`] !== undefined)
|
|
23
|
+
Reflect.deleteProperty(saved, `${role}-adapter-module`);
|
|
24
|
+
if (explicit[`${role}-adapter-module`] !== undefined)
|
|
25
|
+
removeSaved(saved, [`${role}-host`, `${role}-model`, `${role}-effort`]);
|
|
26
|
+
}
|
|
27
|
+
function removeUnusedNativeOptions(saved, merged) {
|
|
28
|
+
if (![merged.host, merged["semantic-host"], merged["advisory-host"]].includes("codex"))
|
|
29
|
+
removeSaved(saved, optionsWith("route", "codex"));
|
|
30
|
+
if (merged.host !== "claude")
|
|
31
|
+
removeSaved(saved, optionsWith("route", "claude"));
|
|
32
|
+
}
|
|
33
|
+
export function overrideRunSelections(saved, explicit) {
|
|
34
|
+
if (explicit["case-file"] !== undefined)
|
|
35
|
+
removeSaved(saved, EXTENSION_OPTIONS);
|
|
36
|
+
if (explicit["extension-command-file"] !== undefined)
|
|
37
|
+
delete saved["case-file"];
|
|
38
|
+
overrideCandidate(saved, explicit);
|
|
39
|
+
overrideSecondary(saved, explicit, "semantic");
|
|
40
|
+
overrideSecondary(saved, explicit, "advisory");
|
|
41
|
+
if ([
|
|
42
|
+
"host",
|
|
43
|
+
"adapter-module",
|
|
44
|
+
"semantic-host",
|
|
45
|
+
"semantic-adapter-module",
|
|
46
|
+
"advisory-host",
|
|
47
|
+
"advisory-adapter-module",
|
|
48
|
+
].some((key) => explicit[key] !== undefined))
|
|
49
|
+
removeUnusedNativeOptions(saved, { ...saved, ...explicit });
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=run-overrides.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-overrides.js","sourceRoot":"","sources":["run-overrides.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAkB,yBAAsB;AAI/E,SAAS,WAAW,CAAC,KAAgB,EAAE,IAAoB;IACzD,KAAK,MAAM,GAAG,IAAI,IAAI;QAAE,OAAO,CAAC,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,iBAAiB,GAAG;IACxB,MAAM;IACN,OAAO;IACP,QAAQ;IACR,kBAAkB;CACV,CAAC;AAEX,SAAS,iBAAiB,CAAC,KAAgB,EAAE,QAAmB;IAC9D,IAAI,QAAQ,CAAC,gBAAgB,CAAC,KAAK,SAAS;QAC1C,WAAW,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;IACxC,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO;IACxC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AC;IAC5B,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACnC,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC/C,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC/C,IACE;QACE,MAAM;QACN,gBAAgB;QAChB,eAAe;QACf,yBAAyB;QACzB,eAAe;QACf,yBAAyB;KAC1B,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAU,CAAC,KAAK,SAAS,CAAC;QAEnD,yBAAyB,CAAC,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import { EXTENSION_OPTIONS, optionsWith, type RunValues } from \"./run-options\";\n\ntype Key = keyof RunValues;\n\nfunction removeSaved(saved: RunValues, keys: readonly Key[]): void {\n for (const key of keys) Reflect.deleteProperty(saved, key);\n}\n\nconst CANDIDATE_OPTIONS = [\n \"host\",\n \"model\",\n \"effort\",\n \"codex-entrypoint\",\n] as const;\n\nfunction overrideCandidate(saved: RunValues, explicit: RunValues): void {\n if (explicit[\"adapter-module\"] !== undefined)\n removeSaved(saved, CANDIDATE_OPTIONS);\n if (explicit.host === undefined) return;\n delete saved[\"adapter-module\"];\n if (saved.host !== explicit.host)\n removeSaved(saved, [\"model\", \"effort\", \"codex-entrypoint\"]);\n}\n\nfunction overrideSecondary(\n saved: RunValues,\n explicit: RunValues,\n role: \"semantic\" | \"advisory\",\n): void {\n if (explicit[`${role}-host`] !== undefined)\n Reflect.deleteProperty(saved, `${role}-adapter-module`);\n if (explicit[`${role}-adapter-module`] !== undefined)\n removeSaved(saved, [`${role}-host`, `${role}-model`, `${role}-effort`]);\n}\n\nfunction removeUnusedNativeOptions(saved: RunValues, merged: RunValues): void {\n if (\n ![merged.host, merged[\"semantic-host\"], merged[\"advisory-host\"]].includes(\n \"codex\",\n )\n )\n removeSaved(saved, optionsWith(\"route\", \"codex\"));\n if (merged.host !== \"claude\")\n removeSaved(saved, optionsWith(\"route\", \"claude\"));\n}\n\nexport function overrideRunSelections(\n saved: RunValues,\n explicit: RunValues,\n): void {\n if (explicit[\"case-file\"] !== undefined)\n removeSaved(saved, EXTENSION_OPTIONS);\n if (explicit[\"extension-command-file\"] !== undefined)\n delete saved[\"case-file\"];\n overrideCandidate(saved, explicit);\n overrideSecondary(saved, explicit, \"semantic\");\n overrideSecondary(saved, explicit, \"advisory\");\n if (\n [\n \"host\",\n \"adapter-module\",\n \"semantic-host\",\n \"semantic-adapter-module\",\n \"advisory-host\",\n \"advisory-adapter-module\",\n ].some((key) => explicit[key as Key] !== undefined)\n )\n removeUnusedNativeOptions(saved, { ...saved, ...explicit });\n}\n"]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { nativeRoutes } from "./invocation.js";
|
|
3
|
+
function nativeSettings(native) {
|
|
4
|
+
if (!native)
|
|
5
|
+
return { executable: null, timeoutMs: null };
|
|
6
|
+
return { executable: native.binary, timeoutMs: native.timeoutMs ?? 600_000 };
|
|
7
|
+
}
|
|
8
|
+
function routeSettings(host, native) {
|
|
9
|
+
if (!host)
|
|
10
|
+
return null;
|
|
11
|
+
return {
|
|
12
|
+
host: host.id,
|
|
13
|
+
model: host.model,
|
|
14
|
+
effort: host.effort,
|
|
15
|
+
...nativeSettings(native),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/** A whitelist of resolved operator settings; never copy credentials or runtime environment. */
|
|
19
|
+
export function effectiveSettings(prepared) {
|
|
20
|
+
const { invocation, host, semanticHost, advisoryHost } = prepared;
|
|
21
|
+
return {
|
|
22
|
+
format: "sevro.resolved-run-settings.v1",
|
|
23
|
+
...sourceSettings(prepared),
|
|
24
|
+
...extensionSettings(invocation.extension),
|
|
25
|
+
...adapterSettings(invocation),
|
|
26
|
+
...legacyRuntimeSettings(invocation),
|
|
27
|
+
protectedRoots: invocation.protectedRoots,
|
|
28
|
+
condition: invocation.condition,
|
|
29
|
+
trials: invocation.trialCount,
|
|
30
|
+
threshold: invocation.passThreshold,
|
|
31
|
+
jobs: invocation.jobs,
|
|
32
|
+
dry: invocation.dry,
|
|
33
|
+
projectRoot: invocation.projectRoot,
|
|
34
|
+
configRoot: invocation.configRoot,
|
|
35
|
+
resultsRoot: invocation.resultsRoot,
|
|
36
|
+
runStateRoot: invocation.runStateRoot,
|
|
37
|
+
runtimeConfigFile: selectedRuntimeFile(prepared),
|
|
38
|
+
candidate: routeSettings(host, invocation.codex ?? invocation.claude),
|
|
39
|
+
semantic: routeSettings(semanticHost, invocation.semanticCodex),
|
|
40
|
+
advisory: routeSettings(advisoryHost, invocation.advisoryCodex),
|
|
41
|
+
codexEntrypoint: selectedEntrypoint(invocation),
|
|
42
|
+
agentConcurrencyLimit: prepared.agentConcurrencyLimit,
|
|
43
|
+
shellIsolation: Boolean(invocation.shellIsolation),
|
|
44
|
+
retainHostDiagnostics: retainedDiagnostics(invocation),
|
|
45
|
+
claudeProjectSettings: projectSettings(invocation),
|
|
46
|
+
shellCheckDefaults: { expectedExitCode: 0, timeoutMs: 30_000 },
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function selectedCaseId(prepared) {
|
|
50
|
+
if (prepared.caseData)
|
|
51
|
+
return prepared.caseData.id;
|
|
52
|
+
return prepared.invocation.extension?.caseId ?? null;
|
|
53
|
+
}
|
|
54
|
+
function sourceSettings(prepared) {
|
|
55
|
+
const { invocation } = prepared;
|
|
56
|
+
return {
|
|
57
|
+
runManifestFile: invocation.runManifestFile ?? null,
|
|
58
|
+
caseFile: invocation.caseFile ?? null,
|
|
59
|
+
caseId: selectedCaseId(prepared),
|
|
60
|
+
caseSourceMapping: Boolean(invocation.caseSourceRoot),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function extensionSettings(extension) {
|
|
64
|
+
if (!extension)
|
|
65
|
+
return {
|
|
66
|
+
extensionCommandFile: null,
|
|
67
|
+
extensionSourceFileCount: 0,
|
|
68
|
+
taskVerdictPolicy: null,
|
|
69
|
+
replaceBuiltinGraders: [],
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
extensionCommandFile: extension.commandFile,
|
|
73
|
+
extensionSourceFileCount: extension.sourceFiles.length,
|
|
74
|
+
taskVerdictPolicy: extension.taskVerdictPolicy ?? null,
|
|
75
|
+
replaceBuiltinGraders: extension.replaceBuiltinGraders,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function adapterSettings(invocation) {
|
|
79
|
+
return {
|
|
80
|
+
adapterModule: invocation.adapterModule ?? null,
|
|
81
|
+
semanticAdapterModule: invocation.semanticAdapterModule ?? null,
|
|
82
|
+
advisoryAdapterModule: invocation.advisoryAdapterModule ?? null,
|
|
83
|
+
advisoryExcludedPaths: invocation.advisoryExcludedPaths,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function selectedEntrypoint(invocation) {
|
|
87
|
+
return invocation.codex ? (invocation.codex.entrypoint ?? "exec") : null;
|
|
88
|
+
}
|
|
89
|
+
function projectSettings(invocation) {
|
|
90
|
+
return invocation.claude?.projectSettings ?? false;
|
|
91
|
+
}
|
|
92
|
+
function legacyRuntimeSettings(invocation) {
|
|
93
|
+
return {
|
|
94
|
+
toolchainBinDir: selectedToolchain(invocation),
|
|
95
|
+
claudeUvCacheDir: invocation.claude?.uvCacheDir ?? null,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function selectedToolchain(invocation) {
|
|
99
|
+
return ((invocation.shellIsolation ?? invocation.claude)?.toolchainBinDir ?? null);
|
|
100
|
+
}
|
|
101
|
+
function retainedDiagnostics(invocation) {
|
|
102
|
+
return nativeRoutes(invocation).some((host) => host.retainHostDiagnostics);
|
|
103
|
+
}
|
|
104
|
+
/** Assessment-affecting CLI settings absent from the engine's other identity inputs. */
|
|
105
|
+
export function assessmentSettings(prepared) {
|
|
106
|
+
const { invocation } = prepared;
|
|
107
|
+
return {
|
|
108
|
+
shellIsolation: Boolean(invocation.shellIsolation),
|
|
109
|
+
protectedRoots: invocation.protectedRoots,
|
|
110
|
+
...legacyRuntimeSettings(invocation),
|
|
111
|
+
candidateTimeoutMs: nativeSettings(invocation.codex ?? invocation.claude)
|
|
112
|
+
.timeoutMs,
|
|
113
|
+
semanticTimeoutMs: nativeSettings(invocation.semanticCodex).timeoutMs,
|
|
114
|
+
advisoryTimeoutMs: nativeSettings(invocation.advisoryCodex).timeoutMs,
|
|
115
|
+
claudeProjectSettings: invocation.claude?.projectSettings ?? false,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function selectedRuntimeFile(prepared) {
|
|
119
|
+
return (prepared.invocation.runtimeConfigFile ??
|
|
120
|
+
(prepared.runtimePolicy
|
|
121
|
+
? join(prepared.invocation.projectRoot, "sevro.json")
|
|
122
|
+
: null));
|
|
123
|
+
}
|
|
124
|
+
export function displayEffectiveSettings(prepared) {
|
|
125
|
+
process.stderr.write(`sevro: effective settings ${JSON.stringify(effectiveSettings(prepared))}\n`);
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,kBAAkB;AAGjC,OAAO,EAAE,YAAY,EAAE,wBAAqB;AAI5C,SAAS,cAAc,CAAC,MAAmB;IACzC,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,OAAO,EAAE,CAAC;AAC/E,CAAC;AAED,SAAS,aAAa,CAAC,IAA6B,EAAE,MAAmB;IACvE,IAAI,CAAC,IAAI;QAAE,OAA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AC,UAAU,CAAC;QACpC,kBAAkB,EAAE,cAAc,CAAC,UAAU,CAAC,KAAK,IAAI,UAAU,CAAC,MAAM,CAAC;aACtE,SAAS;QACZ,iBAAiB,EAAE,cAAc,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,SAAS;QACrE,iBAAiB,EAAE,cAAc,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,SAAS;QACrE,qBAAqB,EAAE,UAAU,CAAC,MAAM,EAAE,eAAe,IAAI,KAAK;KACnE,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,QAA4B;IACvD,OAAO,CACL,QAAQ,CAAC,UAAU,CAAC,iBAAiB;QACrC,CAAC,QAAQ,CAAC,aAAa;YACrB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,YAAY,CAAC;YACrD,CAAC,CAAC,IAAI,CAAC,CACV,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,QAA4B;IACnE,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,6BAA6B,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC7E,CAAC;AACJ,CAAC","sourcesContent":["import { join } from \"node:path\";\nimport type { HostAdapter } from \"../engine\";\nimport type { PreparedInvocation } from \"./preparation\";\nimport { nativeRoutes } from \"./invocation\";\n\ntype NativeRoute = { binary: string; timeoutMs?: number } | undefined;\n\nfunction nativeSettings(native: NativeRoute) {\n if (!native) return { executable: null, timeoutMs: null };\n return { executable: native.binary, timeoutMs: native.timeoutMs ?? 600_000 };\n}\n\nfunction routeSettings(host: HostAdapter | undefined, native: NativeRoute) {\n if (!host) return null;\n return {\n host: host.id,\n model: host.model,\n effort: host.effort,\n ...nativeSettings(native),\n };\n}\n\n/** A whitelist of resolved operator settings; never copy credentials or runtime environment. */\nexport function effectiveSettings(prepared: PreparedInvocation) {\n const { invocation, host, semanticHost, advisoryHost } = prepared;\n return {\n format: \"sevro.resolved-run-settings.v1\",\n ...sourceSettings(prepared),\n ...extensionSettings(invocation.extension),\n ...adapterSettings(invocation),\n ...legacyRuntimeSettings(invocation),\n protectedRoots: invocation.protectedRoots,\n condition: invocation.condition,\n trials: invocation.trialCount,\n threshold: invocation.passThreshold,\n jobs: invocation.jobs,\n dry: invocation.dry,\n projectRoot: invocation.projectRoot,\n configRoot: invocation.configRoot,\n resultsRoot: invocation.resultsRoot,\n runStateRoot: invocation.runStateRoot,\n runtimeConfigFile: selectedRuntimeFile(prepared),\n candidate: routeSettings(host, invocation.codex ?? invocation.claude),\n semantic: routeSettings(semanticHost, invocation.semanticCodex),\n advisory: routeSettings(advisoryHost, invocation.advisoryCodex),\n codexEntrypoint: selectedEntrypoint(invocation),\n agentConcurrencyLimit: prepared.agentConcurrencyLimit,\n shellIsolation: Boolean(invocation.shellIsolation),\n retainHostDiagnostics: retainedDiagnostics(invocation),\n claudeProjectSettings: projectSettings(invocation),\n shellCheckDefaults: { expectedExitCode: 0, timeoutMs: 30_000 },\n };\n}\n\nfunction selectedCaseId(prepared: PreparedInvocation): string | null {\n if (prepared.caseData) return prepared.caseData.id;\n return prepared.invocation.extension?.caseId ?? null;\n}\n\nfunction sourceSettings(prepared: PreparedInvocation) {\n const { invocation } = prepared;\n return {\n runManifestFile: invocation.runManifestFile ?? null,\n caseFile: invocation.caseFile ?? null,\n caseId: selectedCaseId(prepared),\n caseSourceMapping: Boolean(invocation.caseSourceRoot),\n };\n}\n\nfunction extensionSettings(\n extension: PreparedInvocation[\"invocation\"][\"extension\"],\n) {\n if (!extension)\n return {\n extensionCommandFile: null,\n extensionSourceFileCount: 0,\n taskVerdictPolicy: null,\n replaceBuiltinGraders: [],\n };\n return {\n extensionCommandFile: extension.commandFile,\n extensionSourceFileCount: extension.sourceFiles.length,\n taskVerdictPolicy: extension.taskVerdictPolicy ?? null,\n replaceBuiltinGraders: extension.replaceBuiltinGraders,\n };\n}\n\nfunction adapterSettings(invocation: PreparedInvocation[\"invocation\"]) {\n return {\n adapterModule: invocation.adapterModule ?? null,\n semanticAdapterModule: invocation.semanticAdapterModule ?? null,\n advisoryAdapterModule: invocation.advisoryAdapterModule ?? null,\n advisoryExcludedPaths: invocation.advisoryExcludedPaths,\n };\n}\n\nfunction selectedEntrypoint(invocation: PreparedInvocation[\"invocation\"]) {\n return invocation.codex ? (invocation.codex.entrypoint ?? \"exec\") : null;\n}\n\nfunction projectSettings(\n invocation: PreparedInvocation[\"invocation\"],\n): boolean {\n return invocation.claude?.projectSettings ?? false;\n}\n\nfunction legacyRuntimeSettings(invocation: PreparedInvocation[\"invocation\"]) {\n return {\n toolchainBinDir: selectedToolchain(invocation),\n claudeUvCacheDir: invocation.claude?.uvCacheDir ?? null,\n };\n}\n\nfunction selectedToolchain(invocation: PreparedInvocation[\"invocation\"]) {\n return (\n (invocation.shellIsolation ?? invocation.claude)?.toolchainBinDir ?? null\n );\n}\n\nfunction retainedDiagnostics(\n invocation: PreparedInvocation[\"invocation\"],\n): boolean {\n return nativeRoutes(invocation).some((host) => host.retainHostDiagnostics);\n}\n\n/** Assessment-affecting CLI settings absent from the engine's other identity inputs. */\nexport function assessmentSettings(prepared: PreparedInvocation) {\n const { invocation } = prepared;\n return {\n shellIsolation: Boolean(invocation.shellIsolation),\n protectedRoots: invocation.protectedRoots,\n ...legacyRuntimeSettings(invocation),\n candidateTimeoutMs: nativeSettings(invocation.codex ?? invocation.claude)\n .timeoutMs,\n semanticTimeoutMs: nativeSettings(invocation.semanticCodex).timeoutMs,\n advisoryTimeoutMs: nativeSettings(invocation.advisoryCodex).timeoutMs,\n claudeProjectSettings: invocation.claude?.projectSettings ?? false,\n };\n}\n\nfunction selectedRuntimeFile(prepared: PreparedInvocation): string | null {\n return (\n prepared.invocation.runtimeConfigFile ??\n (prepared.runtimePolicy\n ? join(prepared.invocation.projectRoot, \"sevro.json\")\n : null)\n );\n}\n\nexport function displayEffectiveSettings(prepared: PreparedInvocation): void {\n process.stderr.write(\n `sevro: effective settings ${JSON.stringify(effectiveSettings(prepared))}\\n`,\n );\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function line(value) {
|
|
2
|
+
return value.replaceAll(/\p{Cc}/gu, " ").slice(0, 4096);
|
|
3
|
+
}
|
|
4
|
+
function metric(value) {
|
|
5
|
+
return value === null ? "unknown" : String(value);
|
|
6
|
+
}
|
|
7
|
+
export function displayTrialSummary(result) {
|
|
8
|
+
for (const selected of result.cases)
|
|
9
|
+
for (const trial of selected.trials) {
|
|
10
|
+
process.stdout.write(`trial case=${line(selected.caseId)} trial=${trial.trial} execution=${trial.execution.status} grading=${trial.grading.status} task=${trial.task.verdict}\n`);
|
|
11
|
+
displayFailedChecks(trial.checks);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function displayFailedChecks(checks) {
|
|
15
|
+
for (const check of checks)
|
|
16
|
+
if (check.status !== "passed")
|
|
17
|
+
process.stdout.write(` check=${line(check.id)} status=${check.status} reason=${line(check.detail ?? "unknown")}\n`);
|
|
18
|
+
}
|
|
19
|
+
export function displayMeasurements(report) {
|
|
20
|
+
for (const row of report.rows) {
|
|
21
|
+
const duration = row.candidateDurationMs === null
|
|
22
|
+
? "unknown"
|
|
23
|
+
: `${row.candidateDurationMs.toFixed(2)}ms`;
|
|
24
|
+
const cost = row.costUsd === null ? "unknown" : `$${row.costUsd.toFixed(4)}`;
|
|
25
|
+
process.stdout.write(`case=${line(row.caseId)} candidate duration=${duration} candidate tokens=${metric(row.inputTokens)}/${metric(row.outputTokens)} cost=${cost}\n`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.js","sourceRoot":"","sources":["summary.ts"],"names":[],"mappings":"AAEA,SAAS,IAAI,CAAC,KAAa;IACzB,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,KAAK,CAA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AM,IAAI,GACR,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,QAAQ,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,uBAAuB,QAAQ,qBAAqB,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,SAAS,IAAI,IAAI,CACjJ,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import type { CliResultData, ReportData } from \"../schema-types\";\n\nfunction line(value: string): string {\n return value.replaceAll(/\\p{Cc}/gu, \" \").slice(0, 4096);\n}\n\nfunction metric(value: number | null): string {\n return value === null ? \"unknown\" : String(value);\n}\n\nexport function displayTrialSummary(result: CliResultData): void {\n for (const selected of result.cases)\n for (const trial of selected.trials) {\n process.stdout.write(\n `trial case=${line(selected.caseId)} trial=${trial.trial} execution=${trial.execution.status} grading=${trial.grading.status} task=${trial.task.verdict}\\n`,\n );\n displayFailedChecks(trial.checks);\n }\n}\n\nfunction displayFailedChecks(\n checks: CliResultData[\"cases\"][number][\"trials\"][number][\"checks\"],\n): void {\n for (const check of checks)\n if (check.status !== \"passed\")\n process.stdout.write(\n ` check=${line(check.id)} status=${check.status} reason=${line(check.detail ?? \"unknown\")}\\n`,\n );\n}\n\nexport function displayMeasurements(report: ReportData): void {\n for (const row of report.rows) {\n const duration =\n row.candidateDurationMs === null\n ? \"unknown\"\n : `${row.candidateDurationMs.toFixed(2)}ms`;\n const cost =\n row.costUsd === null ? \"unknown\" : `$${row.costUsd.toFixed(4)}`;\n process.stdout.write(\n `case=${line(row.caseId)} candidate duration=${duration} candidate tokens=${metric(row.inputTokens)}/${metric(row.outputTokens)} cost=${cost}\\n`,\n );\n }\n}\n"]}
|