@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
package/docs/recipes.md
CHANGED
|
@@ -7,14 +7,15 @@ small extension.
|
|
|
7
7
|
|
|
8
8
|
## Prepare a recipe project
|
|
9
9
|
|
|
10
|
-
Use
|
|
10
|
+
Use Node.js 24.13.0 or newer, Git, and `rg`. Bun is optional for the installed
|
|
11
|
+
recipes; the same JavaScript files also run with Bun 1.3.13. Shell checks need macOS
|
|
11
12
|
`sandbox-exec` or Ubuntu `bubblewrap`; native Claude also needs `socat` on
|
|
12
13
|
Ubuntu. Python/UV and mise add the prerequisites stated below.
|
|
13
14
|
[Install Sevro](installing.md), then set the recipe path from the directory
|
|
14
15
|
containing its local installation:
|
|
15
16
|
|
|
16
17
|
```sh
|
|
17
|
-
export SEVRO_RECIPES="$PWD/node_modules/@bjoernrochel/sevro/examples/recipes"
|
|
18
|
+
export SEVRO_RECIPES="$PWD/node_modules/@bjoernrochel/sevro/dist/examples/recipes"
|
|
18
19
|
```
|
|
19
20
|
|
|
20
21
|
Run commands below from an otherwise empty working directory to keep generated
|
|
@@ -24,7 +25,7 @@ the CLI beside its original package; it does not require a global installation.
|
|
|
24
25
|
To adapt a separate copy, preserve the small project's whole directory:
|
|
25
26
|
|
|
26
27
|
```sh
|
|
27
|
-
export SEVRO_RECIPE_CLI="$(cd "$SEVRO_RECIPES/../../src" && pwd)/cli.
|
|
28
|
+
export SEVRO_RECIPE_CLI="$(cd "$SEVRO_RECIPES/../../src" && pwd)/cli.js"
|
|
28
29
|
cp -R "$SEVRO_RECIPES" ./my-recipes
|
|
29
30
|
export SEVRO_RECIPES="$PWD/my-recipes"
|
|
30
31
|
```
|
|
@@ -45,7 +46,7 @@ deliberately exits `1` with execution/grading `completed` and task `failed`.
|
|
|
45
46
|
Run negative controls separately when using a shell with `set -e`. A missing
|
|
46
47
|
tool is a prerequisite error, not a passing or intentionally failing control.
|
|
47
48
|
|
|
48
|
-
`candidate.ts` is an explicitly trusted deterministic fixture editor. It changes
|
|
49
|
+
`candidate.js` (built from `candidate.ts`) is an explicitly trusted deterministic fixture editor. It changes
|
|
49
50
|
the arithmetic implementation for the coding recipe and supplies a fixed answer
|
|
50
51
|
for the other controls. It does not simulate native tool permissions: the real
|
|
51
52
|
isolated shell graders execute the stated tools and assertions. Native routes
|
|
@@ -59,16 +60,16 @@ available identifier and supply your private authentication file path:
|
|
|
59
60
|
```sh
|
|
60
61
|
export SEVRO_RECIPE_MODEL='replace-with-an-available-Codex-model'
|
|
61
62
|
export SEVRO_RECIPE_CODEX_AUTH="${CODEX_HOME:-$HOME/.codex}/auth.json"
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
node "$SEVRO_RECIPES/run.js" coding-change codex --dry
|
|
64
|
+
node "$SEVRO_RECIPES/run.js" coding-change codex
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
For Claude, use its supported credential route and a Claude model identifier:
|
|
67
68
|
|
|
68
69
|
```sh
|
|
69
70
|
export SEVRO_RECIPE_MODEL='replace-with-an-available-Claude-model'
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
node "$SEVRO_RECIPES/run.js" coding-change claude --dry
|
|
72
|
+
node "$SEVRO_RECIPES/run.js" coding-change claude
|
|
72
73
|
```
|
|
73
74
|
|
|
74
75
|
Substitute the other recipe name to run its native task. `--dry` prepares and
|
|
@@ -86,13 +87,13 @@ Files: [coding-change case](../examples/recipes/cases/coding-change.json),
|
|
|
86
87
|
The fixture contains a broken `math.cjs` and a task README. The task asks the
|
|
87
88
|
participant to implement addition. The evaluator checks positive, negative and
|
|
88
89
|
zero arguments. Its source stays outside the candidate fixture: the launcher
|
|
89
|
-
|
|
90
|
+
reads the compiled evaluator test and embeds its JavaScript in the
|
|
90
91
|
evaluator-owned shell command before execution.
|
|
91
92
|
|
|
92
93
|
<!-- sevro-example:recipe-coding-change-pass -->
|
|
93
94
|
|
|
94
95
|
```sh
|
|
95
|
-
|
|
96
|
+
node "$SEVRO_RECIPES/run.js" coding-change deterministic
|
|
96
97
|
```
|
|
97
98
|
|
|
98
99
|
The isolated check first asserts that the original evaluator test is unreadable,
|
|
@@ -103,7 +104,7 @@ in place, so the arithmetic assertion fails:
|
|
|
103
104
|
<!-- sevro-example:recipe-coding-change-fail -->
|
|
104
105
|
|
|
105
106
|
```sh
|
|
106
|
-
|
|
107
|
+
node "$SEVRO_RECIPES/run.js" coding-change deterministic --fail
|
|
107
108
|
```
|
|
108
109
|
|
|
109
110
|
Use a native route below to evaluate an actual coding agent. Adding a participant
|
|
@@ -150,7 +151,7 @@ process must find exactly that line.
|
|
|
150
151
|
<!-- sevro-example:recipe-host-tools-pass -->
|
|
151
152
|
|
|
152
153
|
```sh
|
|
153
|
-
|
|
154
|
+
node "$SEVRO_RECIPES/run.js" host-tools deterministic
|
|
154
155
|
```
|
|
155
156
|
|
|
156
157
|
The negative fixture contains port `9000`, so that same search fails:
|
|
@@ -158,7 +159,7 @@ The negative fixture contains port `9000`, so that same search fails:
|
|
|
158
159
|
<!-- sevro-example:recipe-host-tools-fail -->
|
|
159
160
|
|
|
160
161
|
```sh
|
|
161
|
-
|
|
162
|
+
node "$SEVRO_RECIPES/run.js" host-tools deterministic --fail
|
|
162
163
|
```
|
|
163
164
|
|
|
164
165
|
### Node
|
|
@@ -170,7 +171,7 @@ Node process parses it, asserts the port, and prints `3000`.
|
|
|
170
171
|
<!-- sevro-example:recipe-node-pass -->
|
|
171
172
|
|
|
172
173
|
```sh
|
|
173
|
-
|
|
174
|
+
node "$SEVRO_RECIPES/run.js" node deterministic
|
|
174
175
|
```
|
|
175
176
|
|
|
176
177
|
The negative fixture sets port `9000`, causing the Node assertion to fail:
|
|
@@ -178,7 +179,7 @@ The negative fixture sets port `9000`, causing the Node assertion to fail:
|
|
|
178
179
|
<!-- sevro-example:recipe-node-fail -->
|
|
179
180
|
|
|
180
181
|
```sh
|
|
181
|
-
|
|
182
|
+
node "$SEVRO_RECIPES/run.js" node deterministic --fail
|
|
182
183
|
```
|
|
183
184
|
|
|
184
185
|
### Python with UV
|
|
@@ -198,7 +199,7 @@ port and prints `3000`:
|
|
|
198
199
|
<!-- sevro-example:recipe-python-uv-pass -->
|
|
199
200
|
|
|
200
201
|
```sh
|
|
201
|
-
|
|
202
|
+
node "$SEVRO_RECIPES/run.js" python-uv deterministic
|
|
202
203
|
```
|
|
203
204
|
|
|
204
205
|
The negative fixture changes the port to `9000`; Python raises an assertion:
|
|
@@ -206,7 +207,7 @@ The negative fixture changes the port to `9000`; Python raises an assertion:
|
|
|
206
207
|
<!-- sevro-example:recipe-python-uv-fail -->
|
|
207
208
|
|
|
208
209
|
```sh
|
|
209
|
-
|
|
210
|
+
node "$SEVRO_RECIPES/run.js" python-uv deterministic --fail
|
|
210
211
|
```
|
|
211
212
|
|
|
212
213
|
For real dependencies, prepare a public cache once outside the evaluated project
|
|
@@ -238,7 +239,7 @@ sandbox or grant mise's whole data directory.
|
|
|
238
239
|
<!-- sevro-example:recipe-mise-pass -->
|
|
239
240
|
|
|
240
241
|
```sh
|
|
241
|
-
|
|
242
|
+
node "$SEVRO_RECIPES/run.js" mise deterministic
|
|
242
243
|
```
|
|
243
244
|
|
|
244
245
|
The negative fixture changes the port to `9000`, failing the same Node check:
|
|
@@ -246,7 +247,7 @@ The negative fixture changes the port to `9000`, failing the same Node check:
|
|
|
246
247
|
<!-- sevro-example:recipe-mise-fail -->
|
|
247
248
|
|
|
248
249
|
```sh
|
|
249
|
-
|
|
250
|
+
node "$SEVRO_RECIPES/run.js" mise deterministic --fail
|
|
250
251
|
```
|
|
251
252
|
|
|
252
253
|
An attempted isolated `mise exec` with read-only operator data returned
|
|
@@ -274,13 +275,13 @@ and retains the artifacts. Expect exit `0`, execution `not_run`, grading
|
|
|
274
275
|
<!-- sevro-example:recipe-repository-skill-codex-dry -->
|
|
275
276
|
|
|
276
277
|
```sh
|
|
277
|
-
|
|
278
|
+
node "$SEVRO_RECIPES/run.js" repository-skill codex --dry
|
|
278
279
|
```
|
|
279
280
|
|
|
280
281
|
<!-- sevro-example:recipe-repository-skill-claude-dry -->
|
|
281
282
|
|
|
282
283
|
```sh
|
|
283
|
-
|
|
284
|
+
node "$SEVRO_RECIPES/run.js" repository-skill claude --dry
|
|
284
285
|
```
|
|
285
286
|
|
|
286
287
|
For a real Codex trial, export `SEVRO_RECIPE_MODEL` to an available Codex model
|
|
@@ -291,15 +292,15 @@ remove `--dry`. Credentials stay outside recipe/project inputs and argv.
|
|
|
291
292
|
These calls consume account quota.
|
|
292
293
|
|
|
293
294
|
```sh
|
|
294
|
-
|
|
295
|
-
|
|
295
|
+
node "$SEVRO_RECIPES/run.js" repository-skill codex
|
|
296
|
+
node "$SEVRO_RECIPES/run.js" repository-skill codex --fail
|
|
296
297
|
```
|
|
297
298
|
|
|
298
299
|
With `SEVRO_RECIPE_MODEL` set for Claude instead:
|
|
299
300
|
|
|
300
301
|
```sh
|
|
301
|
-
|
|
302
|
-
|
|
302
|
+
node "$SEVRO_RECIPES/run.js" repository-skill claude
|
|
303
|
+
node "$SEVRO_RECIPES/run.js" repository-skill claude --fail
|
|
303
304
|
```
|
|
304
305
|
|
|
305
306
|
The neutral invocation placeholder becomes `$startup-guide` for Codex and
|
|
@@ -327,13 +328,13 @@ construction, verdict parsing, and retained semantic evidence:
|
|
|
327
328
|
<!-- sevro-example:recipe-semantic-pass -->
|
|
328
329
|
|
|
329
330
|
```sh
|
|
330
|
-
|
|
331
|
+
node "$SEVRO_RECIPES/run.js" semantic deterministic
|
|
331
332
|
```
|
|
332
333
|
|
|
333
334
|
<!-- sevro-example:recipe-semantic-fail -->
|
|
334
335
|
|
|
335
336
|
```sh
|
|
336
|
-
|
|
337
|
+
node "$SEVRO_RECIPES/run.js" semantic deterministic --fail
|
|
337
338
|
```
|
|
338
339
|
|
|
339
340
|
The protocol judge derives pass/fail from the actual candidate-response field
|
|
@@ -345,8 +346,8 @@ For an actual model candidate and judge, set the native variables above and
|
|
|
345
346
|
export `SEVRO_RECIPE_JUDGE_MODEL` to an available Codex judge model:
|
|
346
347
|
|
|
347
348
|
```sh
|
|
348
|
-
|
|
349
|
-
|
|
349
|
+
node "$SEVRO_RECIPES/run.js" semantic codex --dry
|
|
350
|
+
node "$SEVRO_RECIPES/run.js" semantic codex
|
|
350
351
|
```
|
|
351
352
|
|
|
352
353
|
`semantic claude` selects a Claude candidate with a separate Codex judge;
|
|
@@ -367,12 +368,12 @@ a grading error, not a failed proposition or a passing task. Read
|
|
|
367
368
|
Files: [extension.ts](../examples/recipes/extension.ts),
|
|
368
369
|
[methods](../examples/recipes/extension-methods.ts), and
|
|
369
370
|
[artifact preparation](../examples/recipes/extension-artifacts.ts). Prerequisites:
|
|
370
|
-
Bun, Git and the platform's shell isolation tool. No model is required:
|
|
371
|
+
Node or Bun, Git and the platform's shell isolation tool. No model is required:
|
|
371
372
|
|
|
372
373
|
<!-- sevro-example:recipe-lifecycle-pass -->
|
|
373
374
|
|
|
374
375
|
```sh
|
|
375
|
-
|
|
376
|
+
node "$SEVRO_RECIPES/run.js" lifecycle deterministic
|
|
376
377
|
```
|
|
377
378
|
|
|
378
379
|
`describe` advertises version/capabilities/grader; `resolve` returns the task
|
|
@@ -387,7 +388,7 @@ response; diagnostics belong on stderr.
|
|
|
387
388
|
<!-- sevro-example:recipe-lifecycle-fail -->
|
|
388
389
|
|
|
389
390
|
```sh
|
|
390
|
-
|
|
391
|
+
node "$SEVRO_RECIPES/run.js" lifecycle deterministic --fail
|
|
391
392
|
```
|
|
392
393
|
|
|
393
394
|
The wrong final answer fails the built-in output assertion and extension check,
|
|
@@ -413,13 +414,13 @@ First add only native goals to the empty runtime and validate preparation:
|
|
|
413
414
|
<!-- sevro-example:recipe-goals-codex-dry -->
|
|
414
415
|
|
|
415
416
|
```sh
|
|
416
|
-
|
|
417
|
+
node "$SEVRO_RECIPES/run.js" plugins codex --dry --goals-only
|
|
417
418
|
```
|
|
418
419
|
|
|
419
420
|
<!-- sevro-example:recipe-goals-claude-dry -->
|
|
420
421
|
|
|
421
422
|
```sh
|
|
422
|
-
|
|
423
|
+
node "$SEVRO_RECIPES/run.js" plugins claude --dry --goals-only
|
|
423
424
|
```
|
|
424
425
|
|
|
425
426
|
Then add `hooks.plugins: ["startup"]` so only this prepared plugin's command
|
|
@@ -429,13 +430,13 @@ Claude uses plugin-only settings, so do not add `--claude-project-settings`:
|
|
|
429
430
|
<!-- sevro-example:recipe-plugins-codex-dry -->
|
|
430
431
|
|
|
431
432
|
```sh
|
|
432
|
-
|
|
433
|
+
node "$SEVRO_RECIPES/run.js" plugins codex --dry
|
|
433
434
|
```
|
|
434
435
|
|
|
435
436
|
<!-- sevro-example:recipe-plugins-claude-dry -->
|
|
436
437
|
|
|
437
438
|
```sh
|
|
438
|
-
|
|
439
|
+
node "$SEVRO_RECIPES/run.js" plugins claude --dry
|
|
439
440
|
```
|
|
440
441
|
|
|
441
442
|
All four dry commands expect `not_run`/`not_requested`/`not_assessed`, exit `0`.
|
|
@@ -454,15 +455,15 @@ with network denied and only the prepared plugin subtree readable.
|
|
|
454
455
|
facility or passing this startup task alone does not prove goal completion.
|
|
455
456
|
|
|
456
457
|
```sh
|
|
457
|
-
|
|
458
|
-
|
|
458
|
+
node "$SEVRO_RECIPES/run.js" plugins codex
|
|
459
|
+
node "$SEVRO_RECIPES/run.js" plugins codex --fail
|
|
459
460
|
```
|
|
460
461
|
|
|
461
462
|
Or, with the Claude model/credential route configured:
|
|
462
463
|
|
|
463
464
|
```sh
|
|
464
|
-
|
|
465
|
-
|
|
465
|
+
node "$SEVRO_RECIPES/run.js" plugins claude
|
|
466
|
+
node "$SEVRO_RECIPES/run.js" plugins claude --fail
|
|
466
467
|
```
|
|
467
468
|
|
|
468
469
|
For a deliberate failure, run that live command with `--fail`; the requested
|
package/docs/releases.md
CHANGED
|
@@ -12,7 +12,21 @@ Published `rc.1` and `rc.2` retain their original BSL grants. Always select a ne
|
|
|
12
12
|
version for publication; a local development tarball does not replace an
|
|
13
13
|
already published artifact.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
<a id="unreleased-node-runtime-support"></a>
|
|
16
|
+
|
|
17
|
+
## Node runtime support
|
|
18
|
+
|
|
19
|
+
The package ships compiled JavaScript for Node.js 24.13.0 or newer and Bun
|
|
20
|
+
1.3.13. Development retains Bun. Builds populate `dist/`; the package phase
|
|
21
|
+
checks both runtimes and includes Node workflows with Bun absent from PATH.
|
|
22
|
+
`runnerBuildDigest` includes compiled output for installed execution, so this
|
|
23
|
+
changes build identities. Existing evidence keeps its original identity.
|
|
24
|
+
Release preparation builds first, then packs with lifecycle scripts disabled;
|
|
25
|
+
this adds no release test rerun.
|
|
26
|
+
|
|
27
|
+
<a id="unreleased-smaller-npm-package"></a>
|
|
28
|
+
|
|
29
|
+
## Package contents and size
|
|
16
30
|
|
|
17
31
|
The npm package omits logo images, historical validation and usability pages,
|
|
18
32
|
and raw evidence, including the Darrow migration patch and old guide verification
|
|
@@ -20,10 +34,11 @@ record. All remain in the repository; packaged pages link to their online copies
|
|
|
20
34
|
The current `LICENSE`, contribution terms, branding permissions and retained
|
|
21
35
|
earlier-release license text still ship. No licensing or branding grants change.
|
|
22
36
|
|
|
23
|
-
|
|
37
|
+
During the package-size cleanup, `npm pack --dry-run --ignore-scripts --json` measured a
|
|
24
38
|
development tarball at about 0.39 MB compressed, down from 3,545,849 bytes, and
|
|
25
39
|
about 1.86 MB unpacked, down from 6,632,891 bytes (about 89% and 72% smaller).
|
|
26
|
-
These
|
|
40
|
+
These historical development-build measurements do not guarantee the size of
|
|
41
|
+
every release.
|
|
27
42
|
|
|
28
43
|
`runnerBuildDigest` hashes packaged paths and bytes under `docs/` as well as the
|
|
29
44
|
runtime and other package inputs. This packaging change therefore causes a
|
|
@@ -42,7 +57,8 @@ including a release candidate. Use `next` for a preview that should require an
|
|
|
42
57
|
explicit opt-in. Preparation accepts either tag for prerelease and stable versions.
|
|
43
58
|
|
|
44
59
|
Preparation creates a new absolute output directory and never replaces an
|
|
45
|
-
existing directory.
|
|
60
|
+
existing directory. `release:prepare` first builds the JavaScript artifact,
|
|
61
|
+
then packs with lifecycle scripts disabled, retains the npm
|
|
46
62
|
file inventory, and writes `release.json` and `SHA256SUMS` beside the tarball.
|
|
47
63
|
The record identifies the package, version, release tag, distribution tag,
|
|
48
64
|
tarball SHA-256 and npm SHA-512 integrity, and the preparation runtimes.
|
package/docs/run-settings-v1.md
CHANGED
|
@@ -7,14 +7,14 @@ Save recurring evaluation selections in a JSON run manifest, then use
|
|
|
7
7
|
## Repeat an evaluation
|
|
8
8
|
|
|
9
9
|
Start with an existing [resolved case and adapter](getting-started.md), and save
|
|
10
|
-
this `evaluation.json` beside `case.json` and `host-adapter.
|
|
10
|
+
this `evaluation.json` beside `case.json` and `host-adapter.js`:
|
|
11
11
|
|
|
12
12
|
```json
|
|
13
13
|
{
|
|
14
14
|
"format": "sevro.run.v1",
|
|
15
15
|
"settings": {
|
|
16
16
|
"case-file": "./case.json",
|
|
17
|
-
"adapter-module": "./host-adapter.
|
|
17
|
+
"adapter-module": "./host-adapter.js",
|
|
18
18
|
"project-root": ".",
|
|
19
19
|
"condition": "passive",
|
|
20
20
|
"trials": 3,
|
|
@@ -95,7 +95,7 @@ occurrences build the replacement array. `--no-dry`, `--no-shell-isolation`,
|
|
|
95
95
|
`true` values with `false`.
|
|
96
96
|
|
|
97
97
|
Selecting an alternative route on the CLI removes its saved alternative and
|
|
98
|
-
route-only settings. For example, `--adapter-module ./host-adapter.
|
|
98
|
+
route-only settings. For example, `--adapter-module ./host-adapter.js` replaces
|
|
99
99
|
a saved native candidate and its model/effort. Selecting `--host claude` over
|
|
100
100
|
a saved Codex candidate requires fresh explicit `--model` and `--effort`;
|
|
101
101
|
grading roles keep their separate selections. Shared Codex settings remain
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Repository guide
|
|
2
2
|
|
|
3
|
-
The repository-scoped `sevro-guide` explains
|
|
3
|
+
The repository-scoped `sevro-guide` explains Sevro from repository sources. It is independent
|
|
4
4
|
of npm packaging and serves a static documentation spine, not an execution agent.
|
|
5
5
|
|
|
6
6
|
## Contract
|
package/docs/troubleshooting.md
CHANGED
|
@@ -5,7 +5,7 @@ cause is not a diagnosis of your machine.
|
|
|
5
5
|
|
|
6
6
|
| Symptom | Check and next step |
|
|
7
7
|
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
8
|
-
| Command cannot run | Use Bun 1.3.13 and verify the local package/version. Read [installation](installing.md).
|
|
8
|
+
| Command cannot run | Use Node.js 24.13.0 or newer, or the explicit Bun 1.3.13 invocation, and verify the local package/version. Read [installation](installing.md). |
|
|
9
9
|
| Project snapshot contains a symbolic link | Use a separate evaluated project directory as in [the tutorial](getting-started.md); do not include installed dependencies in a plain-directory snapshot. |
|
|
10
10
|
| Exit 0 but no passing task | Prompt-only/dry runs are `not_assessed`. Read [results](reading-results.md). |
|
|
11
11
|
| Exit 64 before execution | Check absolute paths, exclusive route options, configuration, and capabilities in the [CLI reference](development-cli.md). |
|
|
@@ -25,7 +25,7 @@ order; `--fast` runs only `static` without installing dependencies.
|
|
|
25
25
|
| `static` | Schema freshness, documentation contracts, formatting, type-aware lint and typing |
|
|
26
26
|
| `docs` | All guide dry runs, tutorial examples and recipe checks |
|
|
27
27
|
| `tests` | Coverage integrity controls, the complete instrumented Bun suite and both coverage thresholds |
|
|
28
|
-
| `package` | Packed-package installation and installed CLI workflows
|
|
28
|
+
| `package` | Packed-package installation and installed CLI workflows on Bun and Node |
|
|
29
29
|
|
|
30
30
|
Use the same prerequisites as the corresponding complete-gate checks. A single
|
|
31
31
|
phase is partial evidence; full acceptance requires all four on the same candidate.
|
|
@@ -46,6 +46,9 @@ need no manual manifest edit. Non-ignored untracked sources are included in loca
|
|
|
46
46
|
candidate checks; committed CI checkouts use their tracked paths. Declarations
|
|
47
47
|
take precedence over directory roles, and only the validators in the shared
|
|
48
48
|
[schema catalog](../scripts/schema-catalog.ts) receive the generated disposition.
|
|
49
|
+
Generated `dist/` output is ignored by Git, lint and the authored-source inventory.
|
|
50
|
+
It is rebuilt from inventoried TypeScript and validated through installed-package
|
|
51
|
+
workflows; it never substitutes for authored production coverage.
|
|
49
52
|
Unknown or ambiguous paths, missing tracked files, an incomplete generated set,
|
|
50
53
|
and sources outside lint or typing are refused. An independent filesystem audit
|
|
51
54
|
also refuses ignored authored sources rather than silently dropping them.
|
|
@@ -203,6 +206,20 @@ deliberately exit 1. A five-of-five statement, one-of-two branch sample must fai
|
|
|
203
206
|
with `Below 95%: branches`. The integration suite retains real CLI/extension,
|
|
204
207
|
graceful SIGINT/SIGTERM cancellation, filesystem isolation and owned-child paths.
|
|
205
208
|
|
|
209
|
+
## Installed runtime acceptance
|
|
210
|
+
|
|
211
|
+
Bun 1.3.13 remains the contributor runtime and test runner. `bun run build`
|
|
212
|
+
emits JavaScript and source maps under `dist/`; `prepack` builds before ordinary
|
|
213
|
+
`npm pack`. Packing with lifecycle scripts disabled requires an explicit build.
|
|
214
|
+
`bun run test:runtime-node` installs the candidate archive with npm, removes Bun
|
|
215
|
+
from the consumer PATH, and exercises the Node 24.13.0 CLI, templates and recipes.
|
|
216
|
+
It also interrupts a real isolated shell check, verifies the interruption exit
|
|
217
|
+
and retained evidence, and refuses a surviving owned child process.
|
|
218
|
+
It reuses the installed-package workflow checks, including synthetic native
|
|
219
|
+
fixtures, with Node selected explicitly. The package quality phase requires
|
|
220
|
+
both the existing Bun package checks and Node acceptance. These deterministic
|
|
221
|
+
checks do not establish authenticated model behavior.
|
|
222
|
+
|
|
206
223
|
## Environment and CI
|
|
207
224
|
|
|
208
225
|
The discovery backend was observed with Bun 1.3.13, macOS arm64 and Node 24.13.0.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { accessSync, constants, statSync } from "node:fs";
|
|
2
|
+
import { delimiter, resolve } from "node:path";
|
|
3
|
+
|
|
4
|
+
export function which(name: string, path?: string): string | null {
|
|
5
|
+
for (const directory of executablePath(path).split(delimiter)) {
|
|
6
|
+
const candidate = resolve(directory, name);
|
|
7
|
+
try {
|
|
8
|
+
accessSync(candidate, constants.X_OK);
|
|
9
|
+
if (statSync(candidate).isFile()) return candidate;
|
|
10
|
+
} catch {
|
|
11
|
+
/* Continue searching the declared executable path. */
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function executablePath(path: string | undefined): string {
|
|
18
|
+
return path ?? process.env.PATH ?? "";
|
|
19
|
+
}
|
|
@@ -16,7 +16,7 @@ export async function repositoryArtifacts(host: string) {
|
|
|
16
16
|
const directory = host === "claude" ? ".claude" : ".agents";
|
|
17
17
|
const relative = `${directory}/skills/startup-guide/SKILL.md`;
|
|
18
18
|
const body = await readFile(
|
|
19
|
-
join(import.meta.
|
|
19
|
+
join(import.meta.dirname, "repository-skill", relative),
|
|
20
20
|
"utf8",
|
|
21
21
|
);
|
|
22
22
|
return [artifact(relative, body)];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
1
2
|
import {
|
|
2
3
|
describe,
|
|
3
4
|
evaluate,
|
|
@@ -9,7 +10,7 @@ import {
|
|
|
9
10
|
const mode = process.argv[2] ?? "lifecycle";
|
|
10
11
|
const host = process.argv[3] ?? "deterministic";
|
|
11
12
|
const fail = process.argv[4] === "fail";
|
|
12
|
-
const request = record(JSON.parse(
|
|
13
|
+
const request = record(JSON.parse(readFileSync(0, "utf8")) as unknown);
|
|
13
14
|
|
|
14
15
|
async function result() {
|
|
15
16
|
switch (request.method) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
|
|
3
|
+
/** Locate source modules for Bun development or compiled modules for consumers. */
|
|
4
|
+
export function recipeFile(...parts: string[]): string {
|
|
5
|
+
const path = join(import.meta.dirname, ...parts);
|
|
6
|
+
return import.meta.filename.endsWith(".ts")
|
|
7
|
+
? path
|
|
8
|
+
: path.replace(/\.ts$/, ".js");
|
|
9
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { recipeFile } from "./modules";
|
|
1
2
|
import { readFile, writeFile } from "node:fs/promises";
|
|
2
3
|
import { join } from "node:path";
|
|
3
4
|
import { record } from "./extension-methods";
|
|
@@ -7,6 +8,11 @@ function shellQuote(text: string): string {
|
|
|
7
8
|
return `'${text.replaceAll("'", "'\\''")}'`;
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
function evaluatorCode(test: string): string {
|
|
12
|
+
if (import.meta.filename.endsWith(".js")) return test;
|
|
13
|
+
return new Bun.Transpiler({ loader: "ts" }).transformSync(test);
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
async function caseFile(
|
|
11
17
|
options: RecipeOptions,
|
|
12
18
|
state: string,
|
|
@@ -14,22 +20,17 @@ async function caseFile(
|
|
|
14
20
|
const value = record(
|
|
15
21
|
JSON.parse(
|
|
16
22
|
await readFile(
|
|
17
|
-
join(import.meta.
|
|
23
|
+
join(import.meta.dirname, "cases", `${options.recipe}.json`),
|
|
18
24
|
"utf8",
|
|
19
25
|
),
|
|
20
26
|
) as unknown,
|
|
21
27
|
);
|
|
22
28
|
if (options.recipe === "coding-change") {
|
|
23
|
-
const test = await readFile(
|
|
24
|
-
join(import.meta.dir, "coding-change/check.ts"),
|
|
25
|
-
"utf8",
|
|
26
|
-
);
|
|
29
|
+
const test = await readFile(recipeFile("coding-change/check.ts"), "utf8");
|
|
27
30
|
const checks: unknown[] = Array.isArray(value.checks) ? value.checks : [];
|
|
28
31
|
const check = record(checks[0]);
|
|
29
|
-
const javascript =
|
|
30
|
-
const protectedTest = shellQuote(
|
|
31
|
-
join(import.meta.dir, "coding-change/check.ts"),
|
|
32
|
-
);
|
|
32
|
+
const javascript = evaluatorCode(test);
|
|
33
|
+
const protectedTest = shellQuote(recipeFile("coding-change/check.ts"));
|
|
33
34
|
record(check.configuration).run =
|
|
34
35
|
`test ! -r ${protectedTest}\nnode --input-type=module -e ${shellQuote(javascript)}`;
|
|
35
36
|
}
|
|
@@ -62,7 +63,7 @@ async function extensionFiles(
|
|
|
62
63
|
command,
|
|
63
64
|
JSON.stringify([
|
|
64
65
|
process.execPath,
|
|
65
|
-
|
|
66
|
+
recipeFile("extension.ts"),
|
|
66
67
|
options.recipe,
|
|
67
68
|
options.route,
|
|
68
69
|
options.fail ? "fail" : "pass",
|
|
@@ -80,10 +81,7 @@ async function extensionFiles(
|
|
|
80
81
|
command,
|
|
81
82
|
"--case-id",
|
|
82
83
|
"recipe-extension",
|
|
83
|
-
...sources.flatMap((path) => [
|
|
84
|
-
"--extension-source-file",
|
|
85
|
-
join(import.meta.dir, path),
|
|
86
|
-
]),
|
|
84
|
+
...sources.flatMap((path) => ["--extension-source-file", recipeFile(path)]),
|
|
87
85
|
];
|
|
88
86
|
}
|
|
89
87
|
|
|
@@ -118,7 +116,7 @@ export async function hostArguments(
|
|
|
118
116
|
state: string,
|
|
119
117
|
): Promise<string[]> {
|
|
120
118
|
if (options.route === "deterministic")
|
|
121
|
-
return ["--adapter-module",
|
|
119
|
+
return ["--adapter-module", recipeFile("candidate.ts")];
|
|
122
120
|
const model = selectedModel(options.dry, "SEVRO_RECIPE_MODEL");
|
|
123
121
|
if (!model)
|
|
124
122
|
throw new Error(
|
|
@@ -156,10 +154,7 @@ export async function semanticArguments(
|
|
|
156
154
|
): Promise<string[]> {
|
|
157
155
|
if (options.recipe !== "semantic") return [];
|
|
158
156
|
if (options.route === "deterministic")
|
|
159
|
-
return [
|
|
160
|
-
"--semantic-adapter-module",
|
|
161
|
-
join(import.meta.dir, "semantic-judge.ts"),
|
|
162
|
-
];
|
|
157
|
+
return ["--semantic-adapter-module", recipeFile("semantic-judge.ts")];
|
|
163
158
|
const model = selectedModel(options.dry, "SEVRO_RECIPE_JUDGE_MODEL");
|
|
164
159
|
if (!model)
|
|
165
160
|
throw new Error(
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { which } from "./executable";
|
|
1
3
|
import { delimiter, isAbsolute, join } from "node:path";
|
|
2
4
|
import { homedir } from "node:os";
|
|
3
5
|
|
|
@@ -60,7 +62,7 @@ function validateGoalsStep(flags: string[]): void {
|
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
export function requireTool(name: string): string {
|
|
63
|
-
const path =
|
|
65
|
+
const path = which(name);
|
|
64
66
|
if (!path)
|
|
65
67
|
throw new Error(
|
|
66
68
|
`Recipe prerequisite missing: install ${name} and put it on PATH`,
|
|
@@ -78,7 +80,7 @@ export function runtimeFile(options: RecipeOptions): string {
|
|
|
78
80
|
plugins: options.goalsOnly ? "goals" : "plugins",
|
|
79
81
|
};
|
|
80
82
|
return join(
|
|
81
|
-
import.meta.
|
|
83
|
+
import.meta.dirname,
|
|
82
84
|
"runtime",
|
|
83
85
|
`${files[options.recipe] ?? "empty"}.json`,
|
|
84
86
|
);
|
|
@@ -99,19 +101,18 @@ function requireStandaloneRipgrep(): void {
|
|
|
99
101
|
const paths = (process.env.PATH ?? "")
|
|
100
102
|
.split(delimiter)
|
|
101
103
|
.filter((entry) => !roots.some((root) => entry.startsWith(root)));
|
|
102
|
-
if (!
|
|
104
|
+
if (!which("rg", paths.join(delimiter)))
|
|
103
105
|
throw new Error(
|
|
104
106
|
"Install standalone ripgrep outside Codex/Claude credential directories, then put it on PATH (for example brew install ripgrep or apt-get install ripgrep)",
|
|
105
107
|
);
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
function selectMiseNode(): void {
|
|
109
|
-
const result =
|
|
110
|
-
|
|
111
|
-
stderr: "pipe",
|
|
111
|
+
const result = spawnSync(requireTool("mise"), ["where", "node@24.13.0"], {
|
|
112
|
+
encoding: "utf8",
|
|
112
113
|
});
|
|
113
|
-
const installation = result.stdout.
|
|
114
|
-
if (result.
|
|
114
|
+
const installation = result.stdout.trim();
|
|
115
|
+
if (result.status !== 0 || !isAbsolute(installation))
|
|
115
116
|
throw new Error(
|
|
116
117
|
"Install the recipe's Node with mise install node@24.13.0 before running it",
|
|
117
118
|
);
|
package/examples/recipes/run.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { Readable } from "node:stream";
|
|
1
3
|
import { mkdir, realpath, writeFile } from "node:fs/promises";
|
|
2
4
|
import { join, resolve } from "node:path";
|
|
3
5
|
import { hostArguments, recipeInputs, semanticArguments } from "./run-inputs";
|
|
@@ -20,7 +22,13 @@ await mkdir(join(state, "project"), { recursive: true });
|
|
|
20
22
|
await mkdir(join(state, "config"), { recursive: true });
|
|
21
23
|
const root = await realpath(state);
|
|
22
24
|
const cli =
|
|
23
|
-
process.env.SEVRO_RECIPE_CLI ??
|
|
25
|
+
process.env.SEVRO_RECIPE_CLI ??
|
|
26
|
+
resolve(
|
|
27
|
+
import.meta.dirname,
|
|
28
|
+
import.meta.filename.endsWith(".ts")
|
|
29
|
+
? "../../src/cli.ts"
|
|
30
|
+
: "../../src/cli.js",
|
|
31
|
+
);
|
|
24
32
|
const args = [
|
|
25
33
|
process.execPath,
|
|
26
34
|
cli,
|
|
@@ -42,20 +50,26 @@ const args = [
|
|
|
42
50
|
"1",
|
|
43
51
|
"--shell-isolation",
|
|
44
52
|
"--protected-root",
|
|
45
|
-
import.meta.
|
|
53
|
+
import.meta.dirname,
|
|
46
54
|
...(await recipeInputs(options, root)),
|
|
47
55
|
...(await hostArguments(options, root)),
|
|
48
56
|
...(await semanticArguments(options, root)),
|
|
49
57
|
...(options.dry ? ["--dry"] : []),
|
|
50
58
|
];
|
|
51
|
-
const child =
|
|
59
|
+
const child = spawn(process.execPath, args.slice(1), {
|
|
52
60
|
env: { ...process.env, SEVRO_RECIPE_FAIL: options.fail ? "1" : "0" },
|
|
53
|
-
|
|
54
|
-
stderr: "inherit",
|
|
61
|
+
stdio: ["ignore", "pipe", "inherit"],
|
|
55
62
|
});
|
|
56
63
|
const [output, code] = await Promise.all([
|
|
57
|
-
new Response(
|
|
58
|
-
|
|
64
|
+
new Response(
|
|
65
|
+
Readable.toWeb(child.stdout) as unknown as ReadableStream<Uint8Array>,
|
|
66
|
+
).text(),
|
|
67
|
+
new Promise<number>((resolve, reject) => {
|
|
68
|
+
child.once("error", reject);
|
|
69
|
+
child.once("close", (code) => {
|
|
70
|
+
resolve(code ?? 1);
|
|
71
|
+
});
|
|
72
|
+
}),
|
|
59
73
|
]);
|
|
60
74
|
await writeFile(join(root, "result.json"), output);
|
|
61
75
|
process.stderr.write(`Recipe result: ${join(root, "result.json")}\n`);
|