@bjoernrochel/sevro 0.1.0-rc.8 → 1.1.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/CONTRIBUTING.md +52 -6
- package/README.md +12 -7
- 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 +156 -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/README.md +19 -15
- package/docs/architecture.md +141 -17
- package/docs/assets/README.md +5 -4
- package/docs/builtin-graders-v1.md +9 -2
- package/docs/codex-host.md +155 -57
- package/docs/contracts.md +2 -1
- package/docs/creating-cases.md +10 -4
- package/docs/development-cli.md +197 -24
- package/docs/documentation-quality.md +16 -5
- package/docs/evaluation-workflow.md +110 -0
- package/docs/extension-protocol-v1.md +26 -3
- package/docs/getting-started.md +29 -7
- package/docs/guide-evaluation.md +34 -2
- package/docs/identity-v1.md +29 -3
- package/docs/installing.md +35 -17
- package/docs/licensing.md +2 -2
- package/docs/native-controls.md +76 -5
- package/docs/native-hosts.md +197 -8
- package/docs/reading-results.md +102 -0
- package/docs/recipes.md +490 -0
- package/docs/releases.md +48 -13
- package/docs/report-v1.md +29 -1
- package/docs/results-v1.md +122 -4
- package/docs/run-settings-v1.md +147 -0
- package/docs/runtime-v1.md +255 -22
- package/docs/specs/repository-guide.md +1 -1
- package/docs/troubleshooting.md +12 -12
- package/docs/typescript-quality.md +106 -26
- package/examples/recipes/candidate.ts +26 -0
- package/examples/recipes/cases/coding-change.json +21 -0
- package/examples/recipes/cases/host-tools.json +21 -0
- package/examples/recipes/cases/mise.json +21 -0
- package/examples/recipes/cases/node.json +21 -0
- package/examples/recipes/cases/python-uv.json +21 -0
- package/examples/recipes/cases/semantic.json +17 -0
- package/examples/recipes/coding-change/check.ts +23 -0
- package/examples/recipes/executable.ts +19 -0
- package/examples/recipes/extension-artifacts.ts +65 -0
- package/examples/recipes/extension-methods.ts +174 -0
- package/examples/recipes/extension.ts +38 -0
- package/examples/recipes/modules.ts +9 -0
- package/examples/recipes/repository-skill/.agents/skills/startup-guide/SKILL.md +7 -0
- package/examples/recipes/repository-skill/.claude/skills/startup-guide/SKILL.md +7 -0
- package/examples/recipes/repository-skill/README.md +3 -0
- package/examples/recipes/run-inputs.ts +183 -0
- package/examples/recipes/run-options.ts +132 -0
- package/examples/recipes/run.ts +77 -0
- package/examples/recipes/runtime/empty.json +1 -0
- package/examples/recipes/runtime/goals.json +1 -0
- package/examples/recipes/runtime/mise.json +6 -0
- package/examples/recipes/runtime/path.json +1 -0
- package/examples/recipes/runtime/plugins.json +4 -0
- package/examples/recipes/runtime/python-uv.json +10 -0
- package/examples/recipes/semantic-judge.ts +29 -0
- package/examples/templates/coding/adapter.ts +17 -0
- package/examples/templates/coding/case.json +15 -0
- package/examples/templates/repository-skill/.agents/skills/startup-guide/SKILL.md +6 -0
- package/examples/templates/repository-skill/extension-data.ts +64 -0
- package/examples/templates/repository-skill/extension.ts +32 -0
- package/examples/templates/response/adapter.ts +12 -0
- package/examples/templates/response/case.json +13 -0
- package/package.json +23 -9
- package/schemas/report-v1.schema.json +9 -0
- package/schemas/run-evidence-v1.schema.json +2 -1
- package/schemas/runtime-v1.schema.json +43 -7
- package/src/advisory.ts +2 -2
- package/src/candidate-artifacts.ts +42 -11
- package/src/candidate-codex-state.ts +185 -0
- package/src/case-validation.ts +73 -50
- package/src/cli/cancellation.ts +20 -0
- package/src/cli/command.ts +87 -0
- package/src/cli/completion.ts +15 -0
- package/src/cli/demo.ts +61 -0
- package/src/cli/evaluation.ts +55 -0
- package/src/cli/extension.ts +79 -0
- package/src/cli/help.ts +199 -0
- package/src/cli/hosts.ts +55 -0
- package/src/cli/init-settings.ts +31 -0
- package/src/cli/init.ts +112 -0
- package/src/{cli-invocation.ts → cli/invocation.ts} +215 -218
- package/src/cli/loading.ts +151 -0
- package/src/cli/preparation.ts +154 -0
- package/src/cli/presentation.ts +93 -0
- package/src/cli/progress.ts +6 -0
- package/src/cli/run-manifest.ts +128 -0
- package/src/cli/run-options.ts +403 -0
- package/src/cli/run-overrides.ts +69 -0
- package/src/cli/settings.ts +154 -0
- package/src/cli/summary.ts +43 -0
- package/src/cli.ts +14 -592
- package/src/contract-types.ts +94 -0
- package/src/engine.ts +9 -5
- package/src/evaluation/advisory.ts +150 -0
- package/src/{evaluation-check-plan.ts → evaluation/check-plan.ts} +103 -67
- package/src/evaluation/collection.ts +88 -0
- package/src/evaluation/context.ts +10 -0
- package/src/{evaluation-grading-host.ts → evaluation/grading-host.ts} +5 -5
- package/src/evaluation/grading.ts +235 -0
- package/src/{evaluation-invocation-plan.ts → evaluation/invocation-plan.ts} +147 -58
- package/src/{evaluation-plan.ts → evaluation/plan.ts} +208 -141
- package/src/evaluation/progress.ts +19 -0
- package/src/evaluation/resources.ts +241 -0
- package/src/evaluation/run.ts +206 -0
- package/src/{evaluation-semantic.ts → evaluation/semantic.ts} +77 -87
- package/src/evaluation/trial.ts +800 -0
- package/src/{evaluation-types.ts → evaluation/types.ts} +79 -29
- package/src/evidence/host-results.ts +85 -0
- package/src/evidence/retained-artifacts.ts +18 -0
- package/src/evidence/trial-writer.ts +203 -0
- package/src/evidence/usage.ts +17 -0
- package/src/executable.ts +19 -0
- package/src/extension-client.ts +40 -108
- package/src/extension-session.ts +24 -48
- package/src/{advisory-fixture.ts → fixtures/advisory.ts} +12 -72
- package/src/{fixture-bin.ts → fixtures/bin.ts} +1 -1
- package/src/{fixture-cleanup.ts → fixtures/cleanup.ts} +13 -7
- package/src/fixtures/create.ts +183 -0
- package/src/{generated-fixture.ts → fixtures/generated.ts} +10 -53
- package/src/{git-hooks.ts → fixtures/git-hooks.ts} +1 -1
- package/src/{preparation.ts → fixtures/preparation.ts} +6 -16
- package/src/{repository-fixture.ts → fixtures/repository.ts} +30 -64
- package/src/{fixture-setup.ts → fixtures/setup.ts} +36 -53
- package/src/{fixture-tools.ts → fixtures/tools.ts} +1 -1
- package/src/{workspace-state.ts → fixtures/workspace-state.ts} +5 -5
- package/src/generated/cli-result.d.cts +2 -1
- package/src/generated/extension.d.cts +2 -1
- package/src/generated/report.cjs +1 -1
- package/src/generated/report.d.cts +2 -1
- package/src/generated/run-evidence.cjs +1 -1
- package/src/generated/run-evidence.d.cts +2 -1
- package/src/generated/runtime.cjs +1 -1
- package/src/generated/runtime.d.cts +2 -1
- package/src/git.ts +94 -0
- package/src/graders/git-head.ts +31 -85
- package/src/graders/shell.ts +54 -71
- package/src/host-diagnostic-redaction.ts +52 -0
- package/src/host-diagnostics.ts +331 -0
- package/src/hosts/claude-continuation.ts +57 -40
- package/src/hosts/claude-credential.ts +160 -63
- package/src/hosts/claude-events.ts +34 -18
- package/src/hosts/claude-keychain.ts +79 -21
- package/src/hosts/claude-login-recovery.ts +85 -0
- package/src/hosts/claude-login-refresh.ts +179 -0
- package/src/hosts/claude-login-store.ts +162 -0
- package/src/hosts/claude-login.ts +107 -0
- package/src/hosts/claude-native-goal.ts +15 -12
- package/src/hosts/claude-process.ts +10 -50
- package/src/hosts/claude-refresh-lock.ts +82 -0
- package/src/hosts/claude-repository-invocation.ts +9 -34
- package/src/hosts/claude-settings.ts +46 -9
- package/src/hosts/claude-skill-activations.ts +169 -0
- package/src/hosts/claude-state.ts +28 -15
- package/src/hosts/claude-tool-calls.ts +13 -10
- package/src/hosts/claude.ts +121 -81
- package/src/hosts/codex-app-server.ts +78 -52
- package/src/hosts/codex-configuration.ts +5 -10
- package/src/hosts/codex-exec-controls.ts +516 -0
- package/src/hosts/codex-marketplace.ts +12 -10
- package/src/hosts/codex-native-calls.ts +15 -122
- package/src/hosts/codex-process.ts +10 -183
- package/src/hosts/codex-profile.ts +36 -21
- package/src/hosts/codex-session-files.ts +1 -9
- package/src/hosts/codex-state.ts +134 -18
- package/src/hosts/codex.ts +210 -183
- package/src/hosts/isolation-common.ts +8 -11
- package/src/hosts/isolation-roots.ts +5 -4
- package/src/hosts/linux-sandbox.ts +15 -2
- package/src/hosts/mac-sandbox.ts +87 -18
- package/src/hosts/native-controls.ts +72 -22
- package/src/hosts/native-request.ts +55 -0
- package/src/hosts/process-lifecycle.ts +215 -49
- package/src/hosts/protected-worktrees.ts +3 -2
- package/src/hosts/skill-hook-catalog.ts +131 -0
- package/src/hosts/skill-hook-handler.ts +374 -0
- package/src/hosts/skill-hooks.ts +585 -0
- package/src/instrumentation.ts +7 -8
- package/src/native-transcript-state.ts +22 -3
- package/src/native-transcript-view.ts +52 -13
- package/src/native-transcripts.ts +26 -11
- package/src/paths.ts +22 -0
- package/src/process-lifecycle.ts +150 -0
- package/src/provenance.ts +34 -13
- package/src/prune.ts +300 -0
- package/src/report.ts +63 -36
- package/src/resolved-case.ts +1 -1
- package/src/results-lock.ts +42 -0
- package/src/results.ts +14 -18
- package/src/run-owner.ts +15 -9
- package/src/runner-paths.ts +21 -0
- package/src/{runtime-config.ts → runtime/config.ts} +160 -46
- package/src/{runtime-discovery-apple.ts → runtime/discovery-apple.ts} +3 -3
- package/src/{runtime-discovery-providers.ts → runtime/discovery-providers.ts} +3 -9
- package/src/{runtime-discovery.ts → runtime/discovery.ts} +4 -4
- package/src/{runtime-hook-processes.ts → runtime/hook-processes.ts} +3 -2
- package/src/{runtime-hooks.ts → runtime/hooks.ts} +40 -28
- package/src/{runtime-paths.ts → runtime/paths.ts} +5 -19
- package/src/{runtime-query.ts → runtime/query.ts} +5 -5
- package/src/{runtime-seeds.ts → runtime/seeds.ts} +3 -3
- package/src/runtime/shared-cache.ts +130 -0
- package/src/{runtime-state.ts → runtime/state.ts} +28 -11
- package/src/runtime-process.ts +194 -0
- package/src/schema-types.ts +73 -161
- package/src/shell.ts +4 -0
- package/src/sqlite-lock.ts +25 -0
- package/src/transcript-retention.ts +146 -0
- package/src/value-guards.ts +22 -0
- package/docs/assets/sevro-logo.png +0 -0
- package/docs/assets/sevro-symbol.svg +0 -1
- package/docs/assets/sevro-wordmark.svg +0 -1
- package/docs/cache-ownership-validation.md +0 -49
- package/docs/claude-continuation-validation.md +0 -47
- package/docs/concurrency-validation.md +0 -86
- package/docs/configuration-root-validation.md +0 -70
- package/docs/engine-slice.md +0 -114
- package/docs/evidence/runtime-startup-30/README.md +0 -185
- package/docs/evidence/runtime-startup-30/after.json +0 -319
- package/docs/evidence/runtime-startup-30/baseline-timeout.jsonl +0 -2
- package/docs/evidence/runtime-startup-30/before.json +0 -403
- package/docs/evidence/runtime-startup-30/consumer-smoke.json +0 -63
- package/docs/evidence/runtime-startup-30/full-policy-diagnostic.jsonl +0 -3
- package/docs/evidence/runtime-startup-30/minimal-policy-diagnostic.jsonl +0 -3
- package/docs/evidence/runtime-startup-30/plugin-template-assessment.json +0 -20
- package/docs/evidence/runtime-startup-30/seedless-timeout.jsonl +0 -2
- package/docs/evidence.md +0 -17
- package/docs/fixture-cleanup-validation.md +0 -73
- package/docs/guide-verification.json +0 -239
- package/src/evaluation-context.ts +0 -259
- package/src/evaluation-fixture.ts +0 -302
- package/src/evaluation-run.ts +0 -200
- package/src/evaluation-trial.ts +0 -1016
- package/src/hosts/claude-nested-skills.ts +0 -272
- package/src/hosts/codex-command-output.ts +0 -510
- package/src/hosts/codex-executor-command.ts +0 -291
- package/src/hosts/codex-skill-reads.ts +0 -783
- /package/src/{trial-scheduler.ts → evaluation/scheduler.ts} +0 -0
|
@@ -1,49 +1,61 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
1
|
import { realpath } from "node:fs/promises";
|
|
3
2
|
import {
|
|
4
3
|
EvaluationConfigurationError,
|
|
5
4
|
type EvaluationOptions,
|
|
6
5
|
type HostAdapter,
|
|
7
6
|
type ResolvedCase,
|
|
8
|
-
} from "./
|
|
9
|
-
import { prepareFixtureSetup, type FixtureSetup } from "
|
|
10
|
-
import {
|
|
11
|
-
import { type SemanticCheckDeclaration } from "
|
|
12
|
-
import { canonicalJson, createEvaluationIdentity, hashJson } from "
|
|
7
|
+
} from "./types";
|
|
8
|
+
import { prepareFixtureSetup, type FixtureSetup } from "../fixtures/setup";
|
|
9
|
+
import type { FixtureSource } from "../fixtures/create";
|
|
10
|
+
import { type SemanticCheckDeclaration } from "../graders/semantic";
|
|
11
|
+
import { canonicalJson, createEvaluationIdentity, hashJson } from "../identity";
|
|
13
12
|
import {
|
|
14
13
|
prepareInstrumentation,
|
|
15
14
|
type InstrumentationRequest,
|
|
16
|
-
} from "
|
|
15
|
+
} from "../instrumentation";
|
|
17
16
|
import {
|
|
18
17
|
fixtureParts,
|
|
19
18
|
prepareArtifacts,
|
|
20
19
|
type InlineArtifact,
|
|
21
|
-
} from "
|
|
22
|
-
import { projectProvenance, runnerProvenance } from "
|
|
20
|
+
} from "../fixtures/preparation";
|
|
21
|
+
import { projectProvenance, runnerProvenance } from "../provenance";
|
|
22
|
+
import { resolveRepositorySource } from "../fixtures/repository";
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
type
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
import {
|
|
24
|
+
prepareEvaluationChecks,
|
|
25
|
+
type EvaluationCheckPlan,
|
|
26
|
+
type PreparedChecks,
|
|
27
|
+
} from "./check-plan";
|
|
28
|
+
import {
|
|
29
|
+
prepareInvocationPlan,
|
|
30
|
+
type PreparedInvocation,
|
|
31
|
+
} from "./invocation-plan";
|
|
32
|
+
import type { PreparationResult } from "../extension-session";
|
|
33
|
+
|
|
34
|
+
export type { PreparedChecks } from "./check-plan";
|
|
35
|
+
export type { PreparedInvocation } from "./invocation-plan";
|
|
36
|
+
|
|
37
|
+
interface EnvironmentPlan {
|
|
38
|
+
readonly projectRoot: string;
|
|
39
|
+
readonly source: FixtureSource;
|
|
40
|
+
readonly runner: Awaited<ReturnType<typeof runnerProvenance>>;
|
|
41
|
+
readonly project: Awaited<ReturnType<typeof projectProvenance>>;
|
|
42
|
+
readonly extensionPreparation: PreparationResult | null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface ArtifactPlan {
|
|
46
|
+
readonly fixtureSetup: FixtureSetup | null;
|
|
47
|
+
readonly requestedInstrumentation: InstrumentationRequest[];
|
|
48
|
+
readonly inlineArtifacts: InlineArtifact[];
|
|
49
|
+
}
|
|
29
50
|
|
|
30
51
|
async function prepareEvaluationEnvironment(
|
|
31
52
|
options: EvaluationOptions,
|
|
32
|
-
|
|
33
|
-
) {
|
|
53
|
+
source: FixtureSource<null>,
|
|
54
|
+
): Promise<EnvironmentPlan> {
|
|
34
55
|
const projectRoot = await realpath(options.projectRoot).catch(() => {
|
|
35
56
|
throw new EvaluationConfigurationError("project root is unreadable");
|
|
36
57
|
});
|
|
37
|
-
const
|
|
38
|
-
? await resolveRepositorySource(
|
|
39
|
-
options.case.fixture.sourceRef,
|
|
40
|
-
options.preparationSources,
|
|
41
|
-
).catch((error: unknown) => {
|
|
42
|
-
throw new EvaluationConfigurationError(
|
|
43
|
-
error instanceof Error ? error.message : "invalid repository source",
|
|
44
|
-
);
|
|
45
|
-
})
|
|
46
|
-
: null;
|
|
58
|
+
const resolvedSource = await resolveFixtureSource(options, source);
|
|
47
59
|
const [runner, project] = await Promise.all([
|
|
48
60
|
runnerProvenance(
|
|
49
61
|
options.runnerBuildDigest,
|
|
@@ -53,7 +65,7 @@ async function prepareEvaluationEnvironment(
|
|
|
53
65
|
error instanceof Error ? error.message : "invalid runner provenance",
|
|
54
66
|
);
|
|
55
67
|
}),
|
|
56
|
-
projectProvenance(projectRoot),
|
|
68
|
+
projectProvenance(projectRoot, evaluationStorageRoots(options)),
|
|
57
69
|
]);
|
|
58
70
|
const extensionPreparation = options.extension
|
|
59
71
|
? await options.extension.session.prepare(
|
|
@@ -69,16 +81,33 @@ async function prepareEvaluationEnvironment(
|
|
|
69
81
|
)
|
|
70
82
|
: null;
|
|
71
83
|
return {
|
|
72
|
-
...state,
|
|
73
84
|
projectRoot,
|
|
74
|
-
|
|
85
|
+
source: resolvedSource,
|
|
75
86
|
runner,
|
|
76
87
|
project,
|
|
77
88
|
extensionPreparation,
|
|
78
89
|
};
|
|
79
90
|
}
|
|
80
91
|
|
|
81
|
-
|
|
92
|
+
async function resolveFixtureSource(
|
|
93
|
+
options: EvaluationOptions,
|
|
94
|
+
source: FixtureSource<null>,
|
|
95
|
+
): Promise<FixtureSource> {
|
|
96
|
+
if (source.kind !== "repository") return source;
|
|
97
|
+
const repository = await resolveRepositorySource(
|
|
98
|
+
source.fixture.sourceRef,
|
|
99
|
+
options.preparationSources,
|
|
100
|
+
).catch((error: unknown) => {
|
|
101
|
+
throw new EvaluationConfigurationError(
|
|
102
|
+
error instanceof Error ? error.message : "invalid repository source",
|
|
103
|
+
);
|
|
104
|
+
});
|
|
105
|
+
return { ...source, repository };
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function evaluationStorageRoots(options: EvaluationOptions): string[] {
|
|
109
|
+
return [options.resultsRoot, options.runStateRoot ?? options.resultsRoot];
|
|
110
|
+
}
|
|
82
111
|
|
|
83
112
|
function preparedFixtureSetup(
|
|
84
113
|
preparation: EnvironmentPlan["extensionPreparation"],
|
|
@@ -110,10 +139,9 @@ function validateSetupCapability(
|
|
|
110
139
|
|
|
111
140
|
function validateSetupFixture(
|
|
112
141
|
setup: FixtureSetup | null,
|
|
113
|
-
|
|
114
|
-
repository: RepositorySource | null,
|
|
142
|
+
source: FixtureSource,
|
|
115
143
|
): void {
|
|
116
|
-
if (setup &&
|
|
144
|
+
if (setup && source.kind === "inline")
|
|
117
145
|
throw new EvaluationConfigurationError(
|
|
118
146
|
"fixture setup requires a Git fixture",
|
|
119
147
|
);
|
|
@@ -148,17 +176,22 @@ function requestedInstrumentationPlan(
|
|
|
148
176
|
}
|
|
149
177
|
}
|
|
150
178
|
|
|
151
|
-
function fixturePreparationPaths(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
179
|
+
function fixturePreparationPaths(source: FixtureSource): string[] {
|
|
180
|
+
switch (source.kind) {
|
|
181
|
+
case "inline":
|
|
182
|
+
return Object.keys(source.files ?? {});
|
|
183
|
+
case "repository":
|
|
184
|
+
return Object.keys(source.fixture.files ?? {});
|
|
185
|
+
case "generated":
|
|
186
|
+
return [
|
|
187
|
+
...new Set([
|
|
188
|
+
...source.fixture.commits.flatMap((commit) =>
|
|
189
|
+
Object.keys(commit.files),
|
|
190
|
+
),
|
|
191
|
+
...Object.keys(source.fixture.files ?? {}),
|
|
192
|
+
]),
|
|
193
|
+
];
|
|
194
|
+
}
|
|
162
195
|
}
|
|
163
196
|
|
|
164
197
|
async function preparedEvaluationArtifacts(
|
|
@@ -168,7 +201,7 @@ async function preparedEvaluationArtifacts(
|
|
|
168
201
|
try {
|
|
169
202
|
return await prepareArtifacts(
|
|
170
203
|
context.extensionPreparation?.artifacts ?? [],
|
|
171
|
-
fixturePreparationPaths(
|
|
204
|
+
fixturePreparationPaths(context.source),
|
|
172
205
|
options.preparationSources,
|
|
173
206
|
);
|
|
174
207
|
} catch (cause) {
|
|
@@ -181,11 +214,10 @@ async function preparedEvaluationArtifacts(
|
|
|
181
214
|
|
|
182
215
|
function validateArtifactMetadata(
|
|
183
216
|
artifacts: InlineArtifact[],
|
|
184
|
-
|
|
185
|
-
repository: RepositorySource | null,
|
|
217
|
+
source: FixtureSource,
|
|
186
218
|
): void {
|
|
187
219
|
if (
|
|
188
|
-
|
|
220
|
+
source.kind !== "inline" &&
|
|
189
221
|
artifacts.some((artifact) =>
|
|
190
222
|
fixtureParts(artifact.relativePath).some(
|
|
191
223
|
(part) => part.toLowerCase() === ".git",
|
|
@@ -199,12 +231,10 @@ function validateArtifactMetadata(
|
|
|
199
231
|
|
|
200
232
|
function validateArtifactExclusions(
|
|
201
233
|
artifacts: InlineArtifact[],
|
|
202
|
-
|
|
203
|
-
repository: RepositorySource | null,
|
|
234
|
+
source: FixtureSource,
|
|
204
235
|
): void {
|
|
205
236
|
if (
|
|
206
|
-
|
|
207
|
-
!generated &&
|
|
237
|
+
source.kind === "inline" &&
|
|
208
238
|
artifacts.some((artifact) => artifact.gitExclude)
|
|
209
239
|
)
|
|
210
240
|
throw new EvaluationConfigurationError(
|
|
@@ -228,27 +258,25 @@ function validateSemanticArtifactId(
|
|
|
228
258
|
async function prepareEvaluationArtifacts(
|
|
229
259
|
options: EvaluationOptions,
|
|
230
260
|
state: EnvironmentPlan,
|
|
231
|
-
|
|
261
|
+
checks: EvaluationCheckPlan,
|
|
262
|
+
): Promise<ArtifactPlan> {
|
|
232
263
|
const fixtureSetup = preparedFixtureSetup(state.extensionPreparation);
|
|
233
264
|
validateSetupCapability(options, fixtureSetup);
|
|
234
|
-
validateSetupFixture(fixtureSetup, state.
|
|
265
|
+
validateSetupFixture(fixtureSetup, state.source);
|
|
235
266
|
const requestedInstrumentation = requestedInstrumentationPlan(
|
|
236
267
|
options,
|
|
237
268
|
state.extensionPreparation,
|
|
238
269
|
);
|
|
239
270
|
const inlineArtifacts = await preparedEvaluationArtifacts(options, state);
|
|
240
|
-
validateArtifactMetadata(inlineArtifacts, state.
|
|
241
|
-
validateArtifactExclusions(
|
|
271
|
+
validateArtifactMetadata(inlineArtifacts, state.source);
|
|
272
|
+
validateArtifactExclusions(inlineArtifacts, state.source);
|
|
273
|
+
validateSemanticArtifactId(
|
|
242
274
|
inlineArtifacts,
|
|
243
|
-
|
|
244
|
-
state.repository,
|
|
275
|
+
checks.checks.semanticDeclarations,
|
|
245
276
|
);
|
|
246
|
-
|
|
247
|
-
return { ...state, fixtureSetup, requestedInstrumentation, inlineArtifacts };
|
|
277
|
+
return { fixtureSetup, requestedInstrumentation, inlineArtifacts };
|
|
248
278
|
}
|
|
249
279
|
|
|
250
|
-
type ArtifactPlan = Awaited<ReturnType<typeof prepareEvaluationArtifacts>>;
|
|
251
|
-
type InvocationPlan = ReturnType<typeof prepareInvocationPlan<ArtifactPlan>>;
|
|
252
280
|
type EvaluationRouteRole = "candidate" | "semantic" | "advisory";
|
|
253
281
|
interface ActiveGrader {
|
|
254
282
|
id: string;
|
|
@@ -256,9 +284,35 @@ interface ActiveGrader {
|
|
|
256
284
|
version: string;
|
|
257
285
|
}
|
|
258
286
|
|
|
287
|
+
export interface PreparedFixture {
|
|
288
|
+
readonly projectRoot: string;
|
|
289
|
+
readonly source: FixtureSource;
|
|
290
|
+
readonly fixtureSetup: ArtifactPlan["fixtureSetup"];
|
|
291
|
+
readonly inlineArtifacts: InlineArtifact[];
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
interface PreparedEvaluationInputs {
|
|
295
|
+
readonly fixture: PreparedFixture;
|
|
296
|
+
readonly checks: PreparedChecks;
|
|
297
|
+
readonly invocation: PreparedInvocation;
|
|
298
|
+
readonly jobs: number;
|
|
299
|
+
readonly requestedInstrumentation: InstrumentationRequest[];
|
|
300
|
+
readonly runner: EnvironmentPlan["runner"];
|
|
301
|
+
readonly project: EnvironmentPlan["project"];
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export interface PreparedEvaluation extends PreparedEvaluationInputs {
|
|
305
|
+
readonly extensionData: Record<string, unknown>;
|
|
306
|
+
readonly route: ReturnType<typeof evaluationRoute>;
|
|
307
|
+
readonly routes: ReturnType<typeof evaluationRoutes>;
|
|
308
|
+
readonly redactedConfig: ReturnType<typeof redactedEvaluationConfiguration>;
|
|
309
|
+
readonly activeGraders: ActiveGrader[];
|
|
310
|
+
readonly evaluationIdentity: ReturnType<typeof createEvaluationIdentity>;
|
|
311
|
+
}
|
|
312
|
+
|
|
259
313
|
function extensionPreparationData(
|
|
260
314
|
options: EvaluationOptions,
|
|
261
|
-
preparation:
|
|
315
|
+
preparation: EnvironmentPlan["extensionPreparation"],
|
|
262
316
|
): Record<string, unknown> {
|
|
263
317
|
return options.extension
|
|
264
318
|
? {
|
|
@@ -327,36 +381,16 @@ function redactedExtensionConfiguration(options: EvaluationOptions) {
|
|
|
327
381
|
};
|
|
328
382
|
}
|
|
329
383
|
|
|
330
|
-
function
|
|
384
|
+
function redactedPreparationConfiguration(state: PreparedEvaluationInputs) {
|
|
331
385
|
return {
|
|
332
|
-
...(state.
|
|
333
|
-
? {
|
|
386
|
+
...(state.fixture.fixtureSetup
|
|
387
|
+
? { fixtureSetupDigest: hashJson(state.fixture.fixtureSetup) }
|
|
334
388
|
: {}),
|
|
335
|
-
...(state.
|
|
336
|
-
? {
|
|
389
|
+
...(state.invocation.codexMarketplace
|
|
390
|
+
? { codexMarketplace: state.invocation.codexMarketplace }
|
|
337
391
|
: {}),
|
|
338
|
-
...(state.
|
|
339
|
-
? {
|
|
340
|
-
: {}),
|
|
341
|
-
...(state.claudeRepositorySkillInvocation
|
|
342
|
-
? {
|
|
343
|
-
claudeRepositorySkillInvocation:
|
|
344
|
-
state.claudeRepositorySkillInvocation,
|
|
345
|
-
}
|
|
346
|
-
: {}),
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
function redactedPreparationConfiguration(state: InvocationPlan) {
|
|
351
|
-
return {
|
|
352
|
-
...(state.fixtureSetup
|
|
353
|
-
? { fixtureSetupDigest: hashJson(state.fixtureSetup) }
|
|
354
|
-
: {}),
|
|
355
|
-
...(state.codexMarketplace
|
|
356
|
-
? { codexMarketplace: state.codexMarketplace }
|
|
357
|
-
: {}),
|
|
358
|
-
...(state.claudePluginDirs
|
|
359
|
-
? { claudePluginDirs: state.claudePluginDirs }
|
|
392
|
+
...(state.invocation.claudePluginDirs
|
|
393
|
+
? { claudePluginDirs: state.invocation.claudePluginDirs }
|
|
360
394
|
: {}),
|
|
361
395
|
};
|
|
362
396
|
}
|
|
@@ -373,7 +407,7 @@ function redactedAdvisoryConfiguration(options: EvaluationOptions) {
|
|
|
373
407
|
|
|
374
408
|
function redactedEvaluationConfiguration(
|
|
375
409
|
options: EvaluationOptions,
|
|
376
|
-
state:
|
|
410
|
+
state: PreparedEvaluationInputs,
|
|
377
411
|
) {
|
|
378
412
|
return {
|
|
379
413
|
condition: options.condition,
|
|
@@ -382,17 +416,23 @@ function redactedEvaluationConfiguration(
|
|
|
382
416
|
trialCount: options.trialCount,
|
|
383
417
|
jobs: state.jobs,
|
|
384
418
|
passThreshold: options.passThreshold,
|
|
385
|
-
...
|
|
419
|
+
...(options.assessmentSettings
|
|
420
|
+
? { runSettings: options.assessmentSettings }
|
|
421
|
+
: {}),
|
|
422
|
+
...redactedHostConfiguration(
|
|
423
|
+
options,
|
|
424
|
+
state.checks.preparedSemantic.length > 0,
|
|
425
|
+
),
|
|
386
426
|
...redactedExtensionConfiguration(options),
|
|
387
427
|
...redactedPreparationConfiguration(state),
|
|
388
|
-
...
|
|
428
|
+
...state.invocation.configuration,
|
|
389
429
|
...redactedAdvisoryConfiguration(options),
|
|
390
430
|
};
|
|
391
431
|
}
|
|
392
432
|
|
|
393
433
|
function activeEvaluationGraders(
|
|
394
434
|
options: EvaluationOptions,
|
|
395
|
-
state:
|
|
435
|
+
state: PreparedChecks,
|
|
396
436
|
): ActiveGrader[] {
|
|
397
437
|
const graders: ActiveGrader[] = [
|
|
398
438
|
...new Set(
|
|
@@ -440,14 +480,15 @@ function caseIdentityData(
|
|
|
440
480
|
};
|
|
441
481
|
}
|
|
442
482
|
|
|
443
|
-
function baseFixtureIdentity(
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
483
|
+
function baseFixtureIdentity(source: FixtureSource) {
|
|
484
|
+
switch (source.kind) {
|
|
485
|
+
case "generated":
|
|
486
|
+
return source.fixture;
|
|
487
|
+
case "repository":
|
|
488
|
+
return { ...source.fixture, revision: source.repository.revision };
|
|
489
|
+
case "inline":
|
|
490
|
+
return { files: source.files };
|
|
491
|
+
}
|
|
451
492
|
}
|
|
452
493
|
|
|
453
494
|
function artifactIdentityData(artifacts: InlineArtifact[]) {
|
|
@@ -462,21 +503,20 @@ function artifactIdentityData(artifacts: InlineArtifact[]) {
|
|
|
462
503
|
);
|
|
463
504
|
}
|
|
464
505
|
|
|
465
|
-
function fixtureIdentityData(
|
|
466
|
-
state: InvocationPlan,
|
|
467
|
-
fixture: ResolvedCase["fixture"],
|
|
468
|
-
) {
|
|
506
|
+
function fixtureIdentityData(state: PreparedEvaluationInputs) {
|
|
469
507
|
return {
|
|
470
|
-
...baseFixtureIdentity(state
|
|
471
|
-
artifacts: artifactIdentityData(state.inlineArtifacts),
|
|
472
|
-
...(state.
|
|
473
|
-
|
|
474
|
-
|
|
508
|
+
...baseFixtureIdentity(state.fixture.source),
|
|
509
|
+
artifacts: artifactIdentityData(state.fixture.inlineArtifacts),
|
|
510
|
+
...(state.fixture.fixtureSetup
|
|
511
|
+
? { fixtureSetup: state.fixture.fixtureSetup }
|
|
512
|
+
: {}),
|
|
513
|
+
...(state.invocation.codexMarketplace
|
|
514
|
+
? { codexMarketplace: state.invocation.codexMarketplace }
|
|
475
515
|
: {}),
|
|
476
|
-
...(state.claudePluginDirs
|
|
477
|
-
? { claudePluginDirs: state.claudePluginDirs }
|
|
516
|
+
...(state.invocation.claudePluginDirs
|
|
517
|
+
? { claudePluginDirs: state.invocation.claudePluginDirs }
|
|
478
518
|
: {}),
|
|
479
|
-
...
|
|
519
|
+
...state.invocation.configuration,
|
|
480
520
|
};
|
|
481
521
|
}
|
|
482
522
|
|
|
@@ -491,7 +531,7 @@ function evaluatorIdentityData(
|
|
|
491
531
|
};
|
|
492
532
|
}
|
|
493
533
|
|
|
494
|
-
type
|
|
534
|
+
type IdentityMetadata = {
|
|
495
535
|
extensionData: Record<string, unknown>;
|
|
496
536
|
route: ReturnType<typeof evaluationRoute>;
|
|
497
537
|
routes: ReturnType<typeof evaluationRoutes>;
|
|
@@ -501,7 +541,8 @@ type IdentityPlan = InvocationPlan & {
|
|
|
501
541
|
|
|
502
542
|
function evaluationComparisonIdentity(
|
|
503
543
|
options: EvaluationOptions,
|
|
504
|
-
|
|
544
|
+
prepared: PreparedEvaluationInputs,
|
|
545
|
+
context: IdentityMetadata,
|
|
505
546
|
) {
|
|
506
547
|
try {
|
|
507
548
|
return createEvaluationIdentity({
|
|
@@ -512,9 +553,7 @@ function evaluationComparisonIdentity(
|
|
|
512
553
|
caseDigest: hashJson(
|
|
513
554
|
caseIdentityData(options.case, context.extensionData),
|
|
514
555
|
),
|
|
515
|
-
fixtureDigest: hashJson(
|
|
516
|
-
fixtureIdentityData(context, options.case.fixture),
|
|
517
|
-
),
|
|
556
|
+
fixtureDigest: hashJson(fixtureIdentityData(prepared)),
|
|
518
557
|
checksDigest: hashJson(options.case.checks),
|
|
519
558
|
requiredEvidenceDigest: hashJson(options.case.requiredEvidence),
|
|
520
559
|
evaluatorDigest: hashJson(
|
|
@@ -522,8 +561,8 @@ function evaluationComparisonIdentity(
|
|
|
522
561
|
),
|
|
523
562
|
graderDigest: hashJson(context.activeGraders),
|
|
524
563
|
instrumentationDigest: hashJson({
|
|
525
|
-
requested:
|
|
526
|
-
applied:
|
|
564
|
+
requested: prepared.requestedInstrumentation,
|
|
565
|
+
applied: prepared.requestedInstrumentation,
|
|
527
566
|
}),
|
|
528
567
|
routeDigest: hashJson(
|
|
529
568
|
context.routes.length > 1 ? context.routes : context.route,
|
|
@@ -542,36 +581,36 @@ function evaluationComparisonIdentity(
|
|
|
542
581
|
|
|
543
582
|
function prepareEvaluationIdentity(
|
|
544
583
|
options: EvaluationOptions,
|
|
545
|
-
state:
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
state.extensionPreparation,
|
|
550
|
-
);
|
|
551
|
-
const runId = randomUUID();
|
|
584
|
+
state: PreparedEvaluationInputs,
|
|
585
|
+
preparation: EnvironmentPlan["extensionPreparation"],
|
|
586
|
+
): PreparedEvaluation {
|
|
587
|
+
const extensionData = extensionPreparationData(options, preparation);
|
|
552
588
|
const route = evaluationRoute(options.host, "candidate");
|
|
553
589
|
const routes = evaluationRoutes(
|
|
554
590
|
options,
|
|
555
|
-
state.preparedSemantic.length > 0,
|
|
591
|
+
state.checks.preparedSemantic.length > 0,
|
|
556
592
|
route,
|
|
557
593
|
);
|
|
558
594
|
const redactedConfig = snapshotEvaluationConfiguration(options, state);
|
|
559
|
-
const activeGraders = activeEvaluationGraders(options, state);
|
|
595
|
+
const activeGraders = activeEvaluationGraders(options, state.checks);
|
|
560
596
|
const context = {
|
|
561
|
-
...state,
|
|
562
597
|
extensionData,
|
|
563
598
|
route,
|
|
564
599
|
routes,
|
|
565
600
|
redactedConfig,
|
|
566
601
|
activeGraders,
|
|
567
602
|
};
|
|
568
|
-
const evaluationIdentity = evaluationComparisonIdentity(
|
|
569
|
-
|
|
603
|
+
const evaluationIdentity = evaluationComparisonIdentity(
|
|
604
|
+
options,
|
|
605
|
+
state,
|
|
606
|
+
context,
|
|
607
|
+
);
|
|
608
|
+
return { ...state, ...context, evaluationIdentity };
|
|
570
609
|
}
|
|
571
610
|
|
|
572
611
|
function snapshotEvaluationConfiguration(
|
|
573
612
|
options: EvaluationOptions,
|
|
574
|
-
state:
|
|
613
|
+
state: PreparedEvaluationInputs,
|
|
575
614
|
): ReturnType<typeof redactedEvaluationConfiguration> {
|
|
576
615
|
try {
|
|
577
616
|
return JSON.parse(
|
|
@@ -585,12 +624,40 @@ function snapshotEvaluationConfiguration(
|
|
|
585
624
|
}
|
|
586
625
|
}
|
|
587
626
|
|
|
588
|
-
export async function prepareEvaluation(
|
|
627
|
+
export async function prepareEvaluation(
|
|
628
|
+
options: EvaluationOptions,
|
|
629
|
+
): Promise<PreparedEvaluation> {
|
|
589
630
|
const checks = prepareEvaluationChecks(options);
|
|
590
|
-
const environment = await prepareEvaluationEnvironment(
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
631
|
+
const environment = await prepareEvaluationEnvironment(
|
|
632
|
+
options,
|
|
633
|
+
checks.source,
|
|
634
|
+
);
|
|
635
|
+
const artifacts = await prepareEvaluationArtifacts(
|
|
636
|
+
options,
|
|
637
|
+
environment,
|
|
638
|
+
checks,
|
|
639
|
+
);
|
|
640
|
+
const invocation = prepareInvocationPlan(options, {
|
|
641
|
+
extensionPreparation: environment.extensionPreparation,
|
|
642
|
+
inlineArtifacts: artifacts.inlineArtifacts,
|
|
643
|
+
});
|
|
644
|
+
const prepared: PreparedEvaluationInputs = {
|
|
645
|
+
fixture: {
|
|
646
|
+
projectRoot: environment.projectRoot,
|
|
647
|
+
source: environment.source,
|
|
648
|
+
fixtureSetup: artifacts.fixtureSetup,
|
|
649
|
+
inlineArtifacts: artifacts.inlineArtifacts,
|
|
650
|
+
},
|
|
651
|
+
checks: checks.checks,
|
|
652
|
+
invocation,
|
|
653
|
+
jobs: checks.jobs,
|
|
654
|
+
requestedInstrumentation: artifacts.requestedInstrumentation,
|
|
655
|
+
runner: environment.runner,
|
|
656
|
+
project: environment.project,
|
|
657
|
+
};
|
|
658
|
+
return prepareEvaluationIdentity(
|
|
659
|
+
options,
|
|
660
|
+
prepared,
|
|
661
|
+
environment.extensionPreparation,
|
|
662
|
+
);
|
|
594
663
|
}
|
|
595
|
-
|
|
596
|
-
export type EvaluationPlan = Awaited<ReturnType<typeof prepareEvaluation>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { EvaluationOptions, EvaluationProgress } from "./types";
|
|
2
|
+
|
|
3
|
+
/** Observation is best-effort and cannot change assessment or persistence. */
|
|
4
|
+
export function evaluationProgress(
|
|
5
|
+
options: EvaluationOptions,
|
|
6
|
+
stage: EvaluationProgress["stage"],
|
|
7
|
+
status: EvaluationProgress["status"],
|
|
8
|
+
trial?: number,
|
|
9
|
+
): void {
|
|
10
|
+
try {
|
|
11
|
+
options.onProgress?.({
|
|
12
|
+
stage,
|
|
13
|
+
status,
|
|
14
|
+
...(trial === undefined ? {} : { trial }),
|
|
15
|
+
});
|
|
16
|
+
} catch {
|
|
17
|
+
// An observer has no authority over the evaluation lifecycle.
|
|
18
|
+
}
|
|
19
|
+
}
|