self-bench 0.3.6 → 0.3.8
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/.dockerignore +11 -1
- package/Dockerfile +9 -9
- package/Dockerfile.sandbox +5 -4
- package/README.md +27 -12
- package/bun.lock +462 -95
- package/compose.yaml +64 -20
- package/dist/agent-feed.d.ts +8 -0
- package/dist/agent-feed.d.ts.map +1 -0
- package/dist/agent-feed.js +56 -0
- package/dist/agent-feed.js.map +1 -0
- package/dist/api/http.d.ts +18 -0
- package/dist/api/http.d.ts.map +1 -0
- package/dist/api/http.js +111 -0
- package/dist/api/http.js.map +1 -0
- package/dist/api/run-request.d.ts +37 -0
- package/dist/api/run-request.d.ts.map +1 -0
- package/dist/api/run-request.js +59 -0
- package/dist/api/run-request.js.map +1 -0
- package/dist/api/status.d.ts +4 -0
- package/dist/api/status.d.ts.map +1 -0
- package/dist/api/status.js +36 -0
- package/dist/api/status.js.map +1 -0
- package/dist/api/viewer-routes.d.ts +9 -0
- package/dist/api/viewer-routes.d.ts.map +1 -0
- package/dist/api/viewer-routes.js +98 -0
- package/dist/api/viewer-routes.js.map +1 -0
- package/dist/api-main.js +5 -1
- package/dist/api-main.js.map +1 -1
- package/dist/api.d.ts +7 -25
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +80 -148
- package/dist/api.js.map +1 -1
- package/dist/archive.d.ts +14 -0
- package/dist/archive.d.ts.map +1 -0
- package/dist/archive.js +114 -0
- package/dist/archive.js.map +1 -0
- package/dist/artifacts/common.d.ts +15 -0
- package/dist/artifacts/common.d.ts.map +1 -0
- package/dist/artifacts/common.js +58 -0
- package/dist/artifacts/common.js.map +1 -0
- package/dist/artifacts/gcs.d.ts +18 -0
- package/dist/artifacts/gcs.d.ts.map +1 -0
- package/dist/artifacts/gcs.js +178 -0
- package/dist/artifacts/gcs.js.map +1 -0
- package/dist/artifacts/local.d.ts +17 -0
- package/dist/artifacts/local.d.ts.map +1 -0
- package/dist/artifacts/local.js +205 -0
- package/dist/artifacts/local.js.map +1 -0
- package/dist/artifacts/types.d.ts +18 -0
- package/dist/artifacts/types.d.ts.map +1 -0
- package/dist/artifacts/types.js +2 -0
- package/dist/artifacts/types.js.map +1 -0
- package/dist/artifacts.d.ts +5 -28
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +5 -302
- package/dist/artifacts.js.map +1 -1
- package/dist/audit.d.ts.map +1 -1
- package/dist/audit.js +8 -2
- package/dist/audit.js.map +1 -1
- package/dist/auth/api-key-routes.d.ts +17 -0
- package/dist/auth/api-key-routes.d.ts.map +1 -0
- package/dist/auth/api-key-routes.js +57 -0
- package/dist/auth/api-key-routes.js.map +1 -0
- package/dist/auth/api-keys.d.ts +47 -0
- package/dist/auth/api-keys.d.ts.map +1 -0
- package/dist/auth/api-keys.js +102 -0
- package/dist/auth/api-keys.js.map +1 -0
- package/dist/auth/config.d.ts +17 -0
- package/dist/auth/config.d.ts.map +1 -0
- package/dist/auth/config.js +38 -0
- package/dist/auth/config.js.map +1 -0
- package/dist/auth/cookies.d.ts +12 -0
- package/dist/auth/cookies.d.ts.map +1 -0
- package/dist/auth/cookies.js +45 -0
- package/dist/auth/cookies.js.map +1 -0
- package/dist/auth/crypto.d.ts +19 -0
- package/dist/auth/crypto.d.ts.map +1 -0
- package/dist/auth/crypto.js +48 -0
- package/dist/auth/crypto.js.map +1 -0
- package/dist/auth/github.d.ts +37 -0
- package/dist/auth/github.d.ts.map +1 -0
- package/dist/auth/github.js +127 -0
- package/dist/auth/github.js.map +1 -0
- package/dist/auth/routes.d.ts +41 -0
- package/dist/auth/routes.d.ts.map +1 -0
- package/dist/auth/routes.js +153 -0
- package/dist/auth/routes.js.map +1 -0
- package/dist/auth/session-expired.d.ts +4 -0
- package/dist/auth/session-expired.d.ts.map +1 -0
- package/dist/auth/session-expired.js +17 -0
- package/dist/auth/session-expired.js.map +1 -0
- package/dist/auth/session.d.ts +23 -0
- package/dist/auth/session.d.ts.map +1 -0
- package/dist/auth/session.js +56 -0
- package/dist/auth/session.js.map +1 -0
- package/dist/auth/users.d.ts +49 -0
- package/dist/auth/users.d.ts.map +1 -0
- package/dist/auth/users.js +125 -0
- package/dist/auth/users.js.map +1 -0
- package/dist/build-metadata.js +1 -1
- package/dist/cli/api-client.d.ts +8 -0
- package/dist/cli/api-client.d.ts.map +1 -0
- package/dist/cli/api-client.js +71 -0
- package/dist/cli/api-client.js.map +1 -0
- package/dist/cli/associate.d.ts +2 -0
- package/dist/cli/associate.d.ts.map +1 -0
- package/dist/cli/associate.js +51 -0
- package/dist/cli/associate.js.map +1 -0
- package/dist/cli/help.d.ts +2 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +52 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +55 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/replay.d.ts +3 -0
- package/dist/cli/replay.d.ts.map +1 -0
- package/dist/cli/replay.js +59 -0
- package/dist/cli/replay.js.map +1 -0
- package/dist/cli/repository.d.ts +6 -0
- package/dist/cli/repository.d.ts.map +1 -0
- package/dist/cli/repository.js +36 -0
- package/dist/cli/repository.js.map +1 -0
- package/dist/cli/run.d.ts +2 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +93 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/stack-environment.d.ts +26 -0
- package/dist/cli/stack-environment.d.ts.map +1 -0
- package/dist/cli/stack-environment.js +86 -0
- package/dist/cli/stack-environment.js.map +1 -0
- package/dist/cli/stack.d.ts +6 -0
- package/dist/cli/stack.d.ts.map +1 -0
- package/dist/cli/stack.js +131 -0
- package/dist/cli/stack.js.map +1 -0
- package/dist/cli/values.d.ts +8 -0
- package/dist/cli/values.d.ts.map +1 -0
- package/dist/cli/values.js +30 -0
- package/dist/cli/values.js.map +1 -0
- package/dist/cli/view.d.ts +2 -0
- package/dist/cli/view.d.ts.map +1 -0
- package/dist/cli/view.js +40 -0
- package/dist/cli/view.js.map +1 -0
- package/dist/cli.js +2 -429
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +16 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +60 -22
- package/dist/config.js.map +1 -1
- package/dist/contracts/common.d.ts +22 -0
- package/dist/contracts/common.d.ts.map +1 -0
- package/dist/contracts/common.js +29 -0
- package/dist/contracts/common.js.map +1 -0
- package/dist/contracts/results.d.ts +66 -0
- package/dist/contracts/results.d.ts.map +1 -0
- package/dist/contracts/results.js +2 -0
- package/dist/contracts/results.js.map +1 -0
- package/dist/contracts/run.d.ts +145 -0
- package/dist/contracts/run.d.ts.map +1 -0
- package/dist/contracts/run.js +74 -0
- package/dist/contracts/run.js.map +1 -0
- package/dist/contracts/task.d.ts +232 -0
- package/dist/contracts/task.d.ts.map +1 -0
- package/dist/contracts/task.js +198 -0
- package/dist/contracts/task.js.map +1 -0
- package/dist/contracts/verify.d.ts +331 -0
- package/dist/contracts/verify.d.ts.map +1 -0
- package/dist/contracts/verify.js +84 -0
- package/dist/contracts/verify.js.map +1 -0
- package/dist/contracts.d.ts +5 -243
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +5 -128
- package/dist/contracts.js.map +1 -1
- package/dist/db/client.d.ts +12 -0
- package/dist/db/client.d.ts.map +1 -0
- package/dist/db/client.js +16 -0
- package/dist/db/client.js.map +1 -0
- package/dist/db/schema.d.ts +1256 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +128 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/environment.d.ts +9 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/environment.js +101 -0
- package/dist/environment.js.map +1 -0
- package/dist/evaluation/account.d.ts +30 -0
- package/dist/evaluation/account.d.ts.map +1 -0
- package/dist/evaluation/account.js +34 -0
- package/dist/evaluation/account.js.map +1 -0
- package/dist/evaluation/activities.d.ts +9 -0
- package/dist/evaluation/activities.d.ts.map +1 -0
- package/dist/evaluation/activities.js +40 -0
- package/dist/evaluation/activities.js.map +1 -0
- package/dist/evaluation/catalog-pricing.d.ts +3 -0
- package/dist/evaluation/catalog-pricing.d.ts.map +1 -0
- package/dist/evaluation/catalog-pricing.js +37 -0
- package/dist/evaluation/catalog-pricing.js.map +1 -0
- package/dist/evaluation/catalog.d.ts +17 -0
- package/dist/evaluation/catalog.d.ts.map +1 -0
- package/dist/evaluation/catalog.js +126 -0
- package/dist/evaluation/catalog.js.map +1 -0
- package/dist/evaluation/codex-login-process.d.ts +12 -0
- package/dist/evaluation/codex-login-process.d.ts.map +1 -0
- package/dist/evaluation/codex-login-process.js +121 -0
- package/dist/evaluation/codex-login-process.js.map +1 -0
- package/dist/evaluation/codex-login-routes.d.ts +5 -0
- package/dist/evaluation/codex-login-routes.d.ts.map +1 -0
- package/dist/evaluation/codex-login-routes.js +55 -0
- package/dist/evaluation/codex-login-routes.js.map +1 -0
- package/dist/evaluation/codex-login.d.ts +42 -0
- package/dist/evaluation/codex-login.d.ts.map +1 -0
- package/dist/evaluation/codex-login.js +143 -0
- package/dist/evaluation/codex-login.js.map +1 -0
- package/dist/evaluation/comparisons.d.ts +65 -0
- package/dist/evaluation/comparisons.d.ts.map +1 -0
- package/dist/evaluation/comparisons.js +161 -0
- package/dist/evaluation/comparisons.js.map +1 -0
- package/dist/evaluation/config.d.ts +43 -0
- package/dist/evaluation/config.d.ts.map +1 -0
- package/dist/evaluation/config.js +116 -0
- package/dist/evaluation/config.js.map +1 -0
- package/dist/evaluation/cost.d.ts +3 -0
- package/dist/evaluation/cost.d.ts.map +1 -0
- package/dist/evaluation/cost.js +95 -0
- package/dist/evaluation/cost.js.map +1 -0
- package/dist/evaluation/credential-execution.d.ts +10 -0
- package/dist/evaluation/credential-execution.d.ts.map +1 -0
- package/dist/evaluation/credential-execution.js +65 -0
- package/dist/evaluation/credential-execution.js.map +1 -0
- package/dist/evaluation/credentials.d.ts +40 -0
- package/dist/evaluation/credentials.d.ts.map +1 -0
- package/dist/evaluation/credentials.js +146 -0
- package/dist/evaluation/credentials.js.map +1 -0
- package/dist/evaluation/encrypted-records.d.ts +15 -0
- package/dist/evaluation/encrypted-records.d.ts.map +1 -0
- package/dist/evaluation/encrypted-records.js +57 -0
- package/dist/evaluation/encrypted-records.js.map +1 -0
- package/dist/evaluation/gateway-execution.d.ts +18 -0
- package/dist/evaluation/gateway-execution.d.ts.map +1 -0
- package/dist/evaluation/gateway-execution.js +38 -0
- package/dist/evaluation/gateway-execution.js.map +1 -0
- package/dist/evaluation/harbor-cost.d.ts +3 -0
- package/dist/evaluation/harbor-cost.d.ts.map +1 -0
- package/dist/evaluation/harbor-cost.js +39 -0
- package/dist/evaluation/harbor-cost.js.map +1 -0
- package/dist/evaluation/harbor_e2b.py +20 -0
- package/dist/evaluation/harbor_gateway.py +22 -0
- package/dist/evaluation/harnesses.d.ts +8 -0
- package/dist/evaluation/harnesses.d.ts.map +1 -0
- package/dist/evaluation/harnesses.js +10 -0
- package/dist/evaluation/harnesses.js.map +1 -0
- package/dist/evaluation/model-options.d.ts +9 -0
- package/dist/evaluation/model-options.d.ts.map +1 -0
- package/dist/evaluation/model-options.js +81 -0
- package/dist/evaluation/model-options.js.map +1 -0
- package/dist/evaluation/org-credential-routes.d.ts +5 -0
- package/dist/evaluation/org-credential-routes.d.ts.map +1 -0
- package/dist/evaluation/org-credential-routes.js +56 -0
- package/dist/evaluation/org-credential-routes.js.map +1 -0
- package/dist/evaluation/org-records.d.ts +4 -0
- package/dist/evaluation/org-records.d.ts.map +1 -0
- package/dist/evaluation/org-records.js +14 -0
- package/dist/evaluation/org-records.js.map +1 -0
- package/dist/evaluation/output.d.ts +9 -0
- package/dist/evaluation/output.d.ts.map +1 -0
- package/dist/evaluation/output.js +171 -0
- package/dist/evaluation/output.js.map +1 -0
- package/dist/evaluation/platform-routes.d.ts +5 -0
- package/dist/evaluation/platform-routes.d.ts.map +1 -0
- package/dist/evaluation/platform-routes.js +123 -0
- package/dist/evaluation/platform-routes.js.map +1 -0
- package/dist/evaluation/profile-routes.d.ts +16 -0
- package/dist/evaluation/profile-routes.d.ts.map +1 -0
- package/dist/evaluation/profile-routes.js +47 -0
- package/dist/evaluation/profile-routes.js.map +1 -0
- package/dist/evaluation/profiles.d.ts +48 -0
- package/dist/evaluation/profiles.d.ts.map +1 -0
- package/dist/evaluation/profiles.js +134 -0
- package/dist/evaluation/profiles.js.map +1 -0
- package/dist/evaluation/providers.d.ts +11 -0
- package/dist/evaluation/providers.d.ts.map +1 -0
- package/dist/evaluation/providers.js +30 -0
- package/dist/evaluation/providers.js.map +1 -0
- package/dist/evaluation/routes.d.ts +23 -0
- package/dist/evaluation/routes.d.ts.map +1 -0
- package/dist/evaluation/routes.js +212 -0
- package/dist/evaluation/routes.js.map +1 -0
- package/dist/evaluation/runner.d.ts +16 -0
- package/dist/evaluation/runner.d.ts.map +1 -0
- package/dist/evaluation/runner.js +241 -0
- package/dist/evaluation/runner.js.map +1 -0
- package/dist/evaluation/store.d.ts +8 -0
- package/dist/evaluation/store.d.ts.map +1 -0
- package/dist/evaluation/store.js +60 -0
- package/dist/evaluation/store.js.map +1 -0
- package/dist/evaluation/types.d.ts +98 -0
- package/dist/evaluation/types.d.ts.map +1 -0
- package/dist/evaluation/types.js +2 -0
- package/dist/evaluation/types.js.map +1 -0
- package/dist/evaluation/worker-main.d.ts +2 -0
- package/dist/evaluation/worker-main.d.ts.map +1 -0
- package/dist/evaluation/worker-main.js +26 -0
- package/dist/evaluation/worker-main.js.map +1 -0
- package/dist/evaluation/worker-records.d.ts +5 -0
- package/dist/evaluation/worker-records.d.ts.map +1 -0
- package/dist/evaluation/worker-records.js +11 -0
- package/dist/evaluation/worker-records.js.map +1 -0
- package/dist/evaluation/workflow.d.ts +3 -0
- package/dist/evaluation/workflow.d.ts.map +1 -0
- package/dist/evaluation/workflow.js +20 -0
- package/dist/evaluation/workflow.js.map +1 -0
- package/dist/execution-environment.d.ts +3 -0
- package/dist/execution-environment.d.ts.map +1 -0
- package/dist/execution-environment.js +9 -0
- package/dist/execution-environment.js.map +1 -0
- package/dist/extension-authoring.bundle.js +347 -0
- package/dist/extension-verifier.bundle.js +73 -0
- package/dist/extensions/authoring.d.ts.map +1 -1
- package/dist/extensions/authoring.js +70 -59
- package/dist/extensions/authoring.js.map +1 -1
- package/dist/extensions/shared/deliverable.d.ts +33 -0
- package/dist/extensions/shared/deliverable.d.ts.map +1 -0
- package/dist/extensions/shared/deliverable.js +123 -0
- package/dist/extensions/shared/deliverable.js.map +1 -0
- package/dist/extensions/shared/mailbox.d.ts +33 -0
- package/dist/extensions/shared/mailbox.d.ts.map +1 -0
- package/dist/extensions/shared/mailbox.js +102 -0
- package/dist/extensions/shared/mailbox.js.map +1 -0
- package/dist/extensions/shared/schemas.d.ts +90 -0
- package/dist/extensions/shared/schemas.d.ts.map +1 -0
- package/dist/extensions/shared/schemas.js +71 -0
- package/dist/extensions/shared/schemas.js.map +1 -0
- package/dist/extensions/shared/static-check.d.ts +38 -0
- package/dist/extensions/shared/static-check.d.ts.map +1 -0
- package/dist/extensions/shared/static-check.js +52 -0
- package/dist/extensions/shared/static-check.js.map +1 -0
- package/dist/extensions/verifier.d.ts +4 -0
- package/dist/extensions/verifier.d.ts.map +1 -0
- package/dist/extensions/verifier.js +70 -0
- package/dist/extensions/verifier.js.map +1 -0
- package/dist/github.d.ts +1 -1
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +3 -3
- package/dist/github.js.map +1 -1
- package/dist/harbor-environment.d.ts +13 -1
- package/dist/harbor-environment.d.ts.map +1 -1
- package/dist/harbor-environment.js +37 -4
- package/dist/harbor-environment.js.map +1 -1
- package/dist/harbor-results.d.ts +2 -0
- package/dist/harbor-results.d.ts.map +1 -1
- package/dist/harbor-results.js +2 -0
- package/dist/harbor-results.js.map +1 -1
- package/dist/harbor-task/compiler.d.ts +10 -0
- package/dist/harbor-task/compiler.d.ts.map +1 -0
- package/dist/harbor-task/compiler.js +174 -0
- package/dist/harbor-task/compiler.js.map +1 -0
- package/dist/harbor-task/constants.d.ts +3 -0
- package/dist/harbor-task/constants.d.ts.map +1 -0
- package/dist/harbor-task/constants.js +3 -0
- package/dist/harbor-task/constants.js.map +1 -0
- package/dist/harbor-task/dependencies.d.ts +3 -0
- package/dist/harbor-task/dependencies.d.ts.map +1 -0
- package/dist/harbor-task/dependencies.js +20 -0
- package/dist/harbor-task/dependencies.js.map +1 -0
- package/dist/harbor-task/paths.d.ts +6 -0
- package/dist/harbor-task/paths.d.ts.map +1 -0
- package/dist/harbor-task/paths.js +37 -0
- package/dist/harbor-task/paths.js.map +1 -0
- package/dist/harbor-task/render.d.ts +11 -0
- package/dist/harbor-task/render.d.ts.map +1 -0
- package/dist/harbor-task/render.js +194 -0
- package/dist/harbor-task/render.js.map +1 -0
- package/dist/harbor-task/runtime/command.sh +26 -0
- package/dist/harbor-task/runtime/junit.py +69 -0
- package/dist/harbor-task/runtime-assets.d.ts +2 -0
- package/dist/harbor-task/runtime-assets.d.ts.map +1 -0
- package/dist/harbor-task/runtime-assets.js +8 -0
- package/dist/harbor-task/runtime-assets.js.map +1 -0
- package/dist/harbor-task/test-patch.d.ts +4 -0
- package/dist/harbor-task/test-patch.d.ts.map +1 -0
- package/dist/harbor-task/test-patch.js +15 -0
- package/dist/harbor-task/test-patch.js.map +1 -0
- package/dist/harbor-task/verifier.d.ts +4 -0
- package/dist/harbor-task/verifier.d.ts.map +1 -0
- package/dist/harbor-task/verifier.js +105 -0
- package/dist/harbor-task/verifier.js.map +1 -0
- package/dist/harbor-task.d.ts +3 -11
- package/dist/harbor-task.d.ts.map +1 -1
- package/dist/harbor-task.js +2 -463
- package/dist/harbor-task.js.map +1 -1
- package/dist/log-excerpt.d.ts +15 -0
- package/dist/log-excerpt.d.ts.map +1 -0
- package/dist/log-excerpt.js +104 -0
- package/dist/log-excerpt.js.map +1 -0
- package/dist/patch-check.d.ts +26 -0
- package/dist/patch-check.d.ts.map +1 -0
- package/dist/patch-check.js +137 -0
- package/dist/patch-check.js.map +1 -0
- package/dist/pi-event-feed.d.ts +16 -0
- package/dist/pi-event-feed.d.ts.map +1 -0
- package/dist/pi-event-feed.js +86 -0
- package/dist/pi-event-feed.js.map +1 -0
- package/dist/pi-session.d.ts +32 -0
- package/dist/pi-session.d.ts.map +1 -0
- package/dist/pi-session.js +175 -0
- package/dist/pi-session.js.map +1 -0
- package/dist/process.d.ts +5 -0
- package/dist/process.d.ts.map +1 -1
- package/dist/process.js +31 -9
- package/dist/process.js.map +1 -1
- package/dist/provenance/github.d.ts +4 -0
- package/dist/provenance/github.d.ts.map +1 -0
- package/dist/provenance/github.js +65 -0
- package/dist/provenance/github.js.map +1 -0
- package/dist/provenance/local.d.ts +4 -0
- package/dist/provenance/local.d.ts.map +1 -0
- package/dist/provenance/local.js +82 -0
- package/dist/provenance/local.js.map +1 -0
- package/dist/provenance/redact.d.ts +2 -0
- package/dist/provenance/redact.d.ts.map +1 -0
- package/dist/provenance/redact.js +28 -0
- package/dist/provenance/redact.js.map +1 -0
- package/dist/provenance/selection.d.ts +4 -0
- package/dist/provenance/selection.d.ts.map +1 -0
- package/dist/provenance/selection.js +29 -0
- package/dist/provenance/selection.js.map +1 -0
- package/dist/provenance/session.d.ts +3 -0
- package/dist/provenance/session.d.ts.map +1 -0
- package/dist/provenance/session.js +214 -0
- package/dist/provenance/session.js.map +1 -0
- package/dist/provenance/shared.d.ts +7 -0
- package/dist/provenance/shared.d.ts.map +1 -0
- package/dist/provenance/shared.js +10 -0
- package/dist/provenance/shared.js.map +1 -0
- package/dist/provenance/types.d.ts +34 -0
- package/dist/provenance/types.d.ts.map +1 -0
- package/dist/provenance/types.js +22 -0
- package/dist/provenance/types.js.map +1 -0
- package/dist/provenance-associations/apply.d.ts +3 -0
- package/dist/provenance-associations/apply.d.ts.map +1 -0
- package/dist/provenance-associations/apply.js +66 -0
- package/dist/provenance-associations/apply.js.map +1 -0
- package/dist/provenance-associations/shared.d.ts +45 -0
- package/dist/provenance-associations/shared.d.ts.map +1 -0
- package/dist/provenance-associations/shared.js +42 -0
- package/dist/provenance-associations/shared.js.map +1 -0
- package/dist/provenance-associations.d.ts +3 -30
- package/dist/provenance-associations.d.ts.map +1 -1
- package/dist/provenance-associations.js +4 -103
- package/dist/provenance-associations.js.map +1 -1
- package/dist/provenance.d.ts +7 -41
- package/dist/provenance.d.ts.map +1 -1
- package/dist/provenance.js +6 -432
- package/dist/provenance.js.map +1 -1
- package/dist/providers.d.ts +25 -2
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +23 -2
- package/dist/providers.js.map +1 -1
- package/dist/repair.d.ts +1 -6
- package/dist/repair.d.ts.map +1 -1
- package/dist/repair.js +17 -27
- package/dist/repair.js.map +1 -1
- package/dist/review/assets/index-BHHztQ9x.js +1679 -0
- package/dist/review/assets/index-KQ1eFQ0t.css +1 -0
- package/dist/review/index.html +11 -8
- package/dist/runtime/command.sh +26 -0
- package/dist/runtime/junit.py +69 -0
- package/dist/sandbox/contracts.d.ts +36 -1
- package/dist/sandbox/contracts.d.ts.map +1 -1
- package/dist/sandbox/contracts.js +3 -0
- package/dist/sandbox/contracts.js.map +1 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.d.ts.map +1 -1
- package/dist/sandbox/index.js +13 -2
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/live.d.ts +18 -0
- package/dist/sandbox/live.d.ts.map +1 -0
- package/dist/sandbox/live.js +55 -0
- package/dist/sandbox/live.js.map +1 -0
- package/dist/sandbox/output-retry.d.ts +16 -0
- package/dist/sandbox/output-retry.d.ts.map +1 -0
- package/dist/sandbox/output-retry.js +36 -0
- package/dist/sandbox/output-retry.js.map +1 -0
- package/dist/sandbox/programs/author.js +16 -6
- package/dist/sandbox/programs/author.js.map +1 -1
- package/dist/sandbox/programs/check.d.ts +3 -0
- package/dist/sandbox/programs/check.d.ts.map +1 -0
- package/dist/sandbox/programs/check.js +76 -0
- package/dist/sandbox/programs/check.js.map +1 -0
- package/dist/sandbox/programs/prepare-task.d.ts +12 -0
- package/dist/sandbox/programs/prepare-task.d.ts.map +1 -0
- package/dist/sandbox/programs/{prepare-repair.js → prepare-task.js} +11 -9
- package/dist/sandbox/programs/prepare-task.js.map +1 -0
- package/dist/sandbox/programs/verifier.d.ts +3 -0
- package/dist/sandbox/programs/verifier.d.ts.map +1 -0
- package/dist/sandbox/programs/verifier.js +9 -0
- package/dist/sandbox/programs/verifier.js.map +1 -0
- package/dist/sandbox/providers/docker/executor.d.ts +4 -1
- package/dist/sandbox/providers/docker/executor.d.ts.map +1 -1
- package/dist/sandbox/providers/docker/executor.js +75 -25
- package/dist/sandbox/providers/docker/executor.js.map +1 -1
- package/dist/sandbox/providers/e2b/bytes.d.ts +3 -0
- package/dist/sandbox/providers/e2b/bytes.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/bytes.js +8 -0
- package/dist/sandbox/providers/e2b/bytes.js.map +1 -0
- package/dist/sandbox/providers/e2b/cleanup.d.ts +8 -0
- package/dist/sandbox/providers/e2b/cleanup.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/cleanup.js +124 -0
- package/dist/sandbox/providers/e2b/cleanup.js.map +1 -0
- package/dist/sandbox/providers/e2b/command.d.ts +23 -0
- package/dist/sandbox/providers/e2b/command.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/command.js +160 -0
- package/dist/sandbox/providers/e2b/command.js.map +1 -0
- package/dist/sandbox/providers/e2b/config.d.ts +13 -0
- package/dist/sandbox/providers/e2b/config.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/config.js +2 -0
- package/dist/sandbox/providers/e2b/config.js.map +1 -0
- package/dist/sandbox/providers/e2b/executor.d.ts +15 -0
- package/dist/sandbox/providers/e2b/executor.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/executor.js +207 -0
- package/dist/sandbox/providers/e2b/executor.js.map +1 -0
- package/dist/sandbox/providers/e2b/lifecycle.d.ts +8 -0
- package/dist/sandbox/providers/e2b/lifecycle.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/lifecycle.js +37 -0
- package/dist/sandbox/providers/e2b/lifecycle.js.map +1 -0
- package/dist/sandbox/providers/e2b/outcome.d.ts +11 -0
- package/dist/sandbox/providers/e2b/outcome.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/outcome.js +72 -0
- package/dist/sandbox/providers/e2b/outcome.js.map +1 -0
- package/dist/sandbox/providers/e2b/stage-files.d.ts +10 -0
- package/dist/sandbox/providers/e2b/stage-files.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/stage-files.js +45 -0
- package/dist/sandbox/providers/e2b/stage-files.js.map +1 -0
- package/dist/sandbox/providers/e2b/startup.d.ts +10 -0
- package/dist/sandbox/providers/e2b/startup.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/startup.js +26 -0
- package/dist/sandbox/providers/e2b/startup.js.map +1 -0
- package/dist/sandbox/providers/e2b/types.d.ts +9 -0
- package/dist/sandbox/providers/e2b/types.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/types.js +2 -0
- package/dist/sandbox/providers/e2b/types.js.map +1 -0
- package/dist/sandbox/providers/e2b/validation.d.ts +14 -0
- package/dist/sandbox/providers/e2b/validation.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/validation.js +60 -0
- package/dist/sandbox/providers/e2b/validation.js.map +1 -0
- package/dist/{modal-auth.d.ts → sandbox/providers/modal/auth.d.ts} +1 -1
- package/dist/sandbox/providers/modal/auth.d.ts.map +1 -0
- package/dist/{modal-auth.js → sandbox/providers/modal/auth.js} +1 -1
- package/dist/sandbox/providers/modal/auth.js.map +1 -0
- package/dist/sandbox/providers/modal/executor.d.ts +4 -1
- package/dist/sandbox/providers/modal/executor.d.ts.map +1 -1
- package/dist/sandbox/providers/modal/executor.js +33 -9
- package/dist/sandbox/providers/modal/executor.js.map +1 -1
- package/dist/sandbox/providers/modal/live.d.ts +7 -0
- package/dist/sandbox/providers/modal/live.d.ts.map +1 -0
- package/dist/sandbox/providers/modal/live.js +50 -0
- package/dist/sandbox/providers/modal/live.js.map +1 -0
- package/dist/sandbox/providers/vercel/command.d.ts +6 -0
- package/dist/sandbox/providers/vercel/command.d.ts.map +1 -1
- package/dist/sandbox/providers/vercel/command.js +44 -11
- package/dist/sandbox/providers/vercel/command.js.map +1 -1
- package/dist/sandbox/providers/vercel/executor.d.ts +6 -7
- package/dist/sandbox/providers/vercel/executor.d.ts.map +1 -1
- package/dist/sandbox/providers/vercel/executor.js +21 -187
- package/dist/sandbox/providers/vercel/executor.js.map +1 -1
- package/dist/sandbox/providers/vercel/lifecycle.d.ts +13 -0
- package/dist/sandbox/providers/vercel/lifecycle.d.ts.map +1 -0
- package/dist/sandbox/providers/vercel/lifecycle.js +140 -0
- package/dist/sandbox/providers/vercel/lifecycle.js.map +1 -0
- package/dist/sandbox/providers/vercel/validation.d.ts +11 -0
- package/dist/sandbox/providers/vercel/validation.d.ts.map +1 -0
- package/dist/sandbox/providers/vercel/validation.js +30 -0
- package/dist/sandbox/providers/vercel/validation.js.map +1 -0
- package/dist/sandbox/remote-files.d.ts +11 -0
- package/dist/sandbox/remote-files.d.ts.map +1 -0
- package/dist/sandbox/remote-files.js +41 -0
- package/dist/sandbox/remote-files.js.map +1 -0
- package/dist/sandbox/request-validation.d.ts +5 -0
- package/dist/sandbox/request-validation.d.ts.map +1 -0
- package/dist/sandbox/request-validation.js +43 -0
- package/dist/sandbox/request-validation.js.map +1 -0
- package/dist/sandbox/supervisor.d.ts +42 -0
- package/dist/sandbox/supervisor.d.ts.map +1 -0
- package/dist/sandbox/supervisor.js +126 -0
- package/dist/sandbox/supervisor.js.map +1 -0
- package/dist/sandbox/timeout.d.ts +6 -1
- package/dist/sandbox/timeout.d.ts.map +1 -1
- package/dist/sandbox/timeout.js +12 -0
- package/dist/sandbox/timeout.js.map +1 -1
- package/dist/sandbox-author.bundle.js +47 -14879
- package/dist/{sandbox-validation-repair.bundle.js → sandbox-check.bundle.js} +7261 -1893
- package/dist/sandbox-verifier.bundle.js +307 -0
- package/dist/setup/e2b/build.d.ts +24 -0
- package/dist/setup/e2b/build.d.ts.map +1 -0
- package/dist/setup/e2b/build.js +46 -0
- package/dist/setup/e2b/build.js.map +1 -0
- package/dist/setup/e2b/cli.d.ts +2 -0
- package/dist/setup/e2b/cli.d.ts.map +1 -0
- package/dist/setup/e2b/cli.js +51 -0
- package/dist/setup/e2b/cli.js.map +1 -0
- package/dist/setup/e2b/index.d.ts +5 -0
- package/dist/setup/e2b/index.d.ts.map +1 -0
- package/dist/setup/e2b/index.js +4 -0
- package/dist/setup/e2b/index.js.map +1 -0
- package/dist/setup/e2b/template.d.ts +4 -0
- package/dist/setup/e2b/template.d.ts.map +1 -0
- package/dist/setup/e2b/template.js +53 -0
- package/dist/setup/e2b/template.js.map +1 -0
- package/dist/setup/vercel/cli-helpers.d.ts +22 -0
- package/dist/setup/vercel/cli-helpers.d.ts.map +1 -0
- package/dist/setup/vercel/cli-helpers.js +87 -0
- package/dist/setup/vercel/cli-helpers.js.map +1 -0
- package/dist/setup/vercel/cli-runner.d.ts +14 -0
- package/dist/setup/vercel/cli-runner.d.ts.map +1 -0
- package/dist/setup/vercel/cli-runner.js +24 -0
- package/dist/setup/vercel/cli-runner.js.map +1 -0
- package/dist/setup/vercel/cli-types.d.ts +24 -0
- package/dist/setup/vercel/cli-types.d.ts.map +1 -0
- package/dist/setup/vercel/cli-types.js +18 -0
- package/dist/setup/vercel/cli-types.js.map +1 -0
- package/dist/setup/vercel/cli.d.ts +5 -31
- package/dist/setup/vercel/cli.d.ts.map +1 -1
- package/dist/setup/vercel/cli.js +15 -125
- package/dist/setup/vercel/cli.js.map +1 -1
- package/dist/setup/vercel/profile-files.d.ts +6 -0
- package/dist/setup/vercel/profile-files.d.ts.map +1 -0
- package/dist/setup/vercel/profile-files.js +100 -0
- package/dist/setup/vercel/profile-files.js.map +1 -0
- package/dist/setup/vercel/profile-schema.d.ts +48 -0
- package/dist/setup/vercel/profile-schema.d.ts.map +1 -0
- package/dist/setup/vercel/profile-schema.js +39 -0
- package/dist/setup/vercel/profile-schema.js.map +1 -0
- package/dist/setup/vercel/profile.d.ts +3 -19
- package/dist/setup/vercel/profile.d.ts.map +1 -1
- package/dist/setup/vercel/profile.js +4 -130
- package/dist/setup/vercel/profile.js.map +1 -1
- package/dist/setup/vercel/selection.d.ts +18 -0
- package/dist/setup/vercel/selection.d.ts.map +1 -0
- package/dist/setup/vercel/selection.js +113 -0
- package/dist/setup/vercel/selection.js.map +1 -0
- package/dist/setup/vercel/setup-types.d.ts +34 -0
- package/dist/setup/vercel/setup-types.d.ts.map +1 -0
- package/dist/setup/vercel/setup-types.js +2 -0
- package/dist/setup/vercel/setup-types.js.map +1 -0
- package/dist/setup/vercel/setup.d.ts +3 -28
- package/dist/setup/vercel/setup.d.ts.map +1 -1
- package/dist/setup/vercel/setup.js +3 -111
- package/dist/setup/vercel/setup.js.map +1 -1
- package/dist/site/batch-activity.d.ts +5 -0
- package/dist/site/batch-activity.d.ts.map +1 -0
- package/dist/site/batch-activity.js +31 -0
- package/dist/site/batch-activity.js.map +1 -0
- package/dist/site/batch-progress.d.ts +16 -0
- package/dist/site/batch-progress.d.ts.map +1 -0
- package/dist/site/batch-progress.js +52 -0
- package/dist/site/batch-progress.js.map +1 -0
- package/dist/site/batch-routes.d.ts +30 -0
- package/dist/site/batch-routes.d.ts.map +1 -0
- package/dist/site/batch-routes.js +117 -0
- package/dist/site/batch-routes.js.map +1 -0
- package/dist/site/batch-start.d.ts +60 -0
- package/dist/site/batch-start.d.ts.map +1 -0
- package/dist/site/batch-start.js +39 -0
- package/dist/site/batch-start.js.map +1 -0
- package/dist/site/connected-repos.d.ts +25 -0
- package/dist/site/connected-repos.d.ts.map +1 -0
- package/dist/site/connected-repos.js +109 -0
- package/dist/site/connected-repos.js.map +1 -0
- package/dist/site/evaluation-start.d.ts +4 -0
- package/dist/site/evaluation-start.d.ts.map +1 -0
- package/dist/site/evaluation-start.js +19 -0
- package/dist/site/evaluation-start.js.map +1 -0
- package/dist/site/generation-config.d.ts +4 -0
- package/dist/site/generation-config.d.ts.map +1 -0
- package/dist/site/generation-config.js +16 -0
- package/dist/site/generation-config.js.map +1 -0
- package/dist/site/generation-credentials.d.ts +6 -0
- package/dist/site/generation-credentials.d.ts.map +1 -0
- package/dist/site/generation-credentials.js +101 -0
- package/dist/site/generation-credentials.js.map +1 -0
- package/dist/site/generation-run.d.ts +6 -0
- package/dist/site/generation-run.d.ts.map +1 -0
- package/dist/site/generation-run.js +22 -0
- package/dist/site/generation-run.js.map +1 -0
- package/dist/site/generation-settings.d.ts +80 -0
- package/dist/site/generation-settings.d.ts.map +1 -0
- package/dist/site/generation-settings.js +84 -0
- package/dist/site/generation-settings.js.map +1 -0
- package/dist/site/generation-subscription.d.ts +3 -0
- package/dist/site/generation-subscription.d.ts.map +1 -0
- package/dist/site/generation-subscription.js +38 -0
- package/dist/site/generation-subscription.js.map +1 -0
- package/dist/site/github-repos.d.ts +35 -0
- package/dist/site/github-repos.d.ts.map +1 -0
- package/dist/site/github-repos.js +121 -0
- package/dist/site/github-repos.js.map +1 -0
- package/dist/site/pr-candidate.d.ts +26 -0
- package/dist/site/pr-candidate.d.ts.map +1 -0
- package/dist/site/pr-candidate.js +101 -0
- package/dist/site/pr-candidate.js.map +1 -0
- package/dist/site/pr-list.d.ts +13 -0
- package/dist/site/pr-list.d.ts.map +1 -0
- package/dist/site/pr-list.js +24 -0
- package/dist/site/pr-list.js.map +1 -0
- package/dist/site/pr-routes.d.ts +26 -0
- package/dist/site/pr-routes.d.ts.map +1 -0
- package/dist/site/pr-routes.js +139 -0
- package/dist/site/pr-routes.js.map +1 -0
- package/dist/site/repo-store.d.ts +40 -0
- package/dist/site/repo-store.d.ts.map +1 -0
- package/dist/site/repo-store.js +74 -0
- package/dist/site/repo-store.js.map +1 -0
- package/dist/site/run-store.d.ts +17 -0
- package/dist/site/run-store.d.ts.map +1 -0
- package/dist/site/run-store.js +42 -0
- package/dist/site/run-store.js.map +1 -0
- package/dist/site/runtime.d.ts +27 -0
- package/dist/site/runtime.d.ts.map +1 -0
- package/dist/site/runtime.js +97 -0
- package/dist/site/runtime.js.map +1 -0
- package/dist/site/task-deletion.d.ts +7 -0
- package/dist/site/task-deletion.d.ts.map +1 -0
- package/dist/site/task-deletion.js +29 -0
- package/dist/site/task-deletion.js.map +1 -0
- package/dist/site/task-start-reservation.d.ts +4 -0
- package/dist/site/task-start-reservation.d.ts.map +1 -0
- package/dist/site/task-start-reservation.js +18 -0
- package/dist/site/task-start-reservation.js.map +1 -0
- package/dist/site/task-start.d.ts +33 -0
- package/dist/site/task-start.d.ts.map +1 -0
- package/dist/site/task-start.js +50 -0
- package/dist/site/task-start.js.map +1 -0
- package/dist/site/task-status.d.ts +36 -0
- package/dist/site/task-status.d.ts.map +1 -0
- package/dist/site/task-status.js +113 -0
- package/dist/site/task-status.js.map +1 -0
- package/dist/site/task-store.d.ts +78 -0
- package/dist/site/task-store.d.ts.map +1 -0
- package/dist/site/task-store.js +186 -0
- package/dist/site/task-store.js.map +1 -0
- package/dist/site/task-sync.d.ts +30 -0
- package/dist/site/task-sync.d.ts.map +1 -0
- package/dist/site/task-sync.js +121 -0
- package/dist/site/task-sync.js.map +1 -0
- package/dist/site/tasks.d.ts +47 -0
- package/dist/site/tasks.d.ts.map +1 -0
- package/dist/site/tasks.js +164 -0
- package/dist/site/tasks.js.map +1 -0
- package/dist/site/temporal-status.d.ts +8 -0
- package/dist/site/temporal-status.d.ts.map +1 -0
- package/dist/site/temporal-status.js +41 -0
- package/dist/site/temporal-status.js.map +1 -0
- package/dist/site/tenant.d.ts +4 -0
- package/dist/site/tenant.d.ts.map +1 -0
- package/dist/site/tenant.js +6 -0
- package/dist/site/tenant.js.map +1 -0
- package/dist/static-check.d.ts +38 -0
- package/dist/static-check.d.ts.map +1 -0
- package/dist/static-check.js +131 -0
- package/dist/static-check.js.map +1 -0
- package/dist/submission-hash.d.ts +18 -0
- package/dist/submission-hash.d.ts.map +1 -0
- package/dist/submission-hash.js +16 -0
- package/dist/submission-hash.js.map +1 -0
- package/dist/subscription-auth.d.ts +0 -7
- package/dist/subscription-auth.d.ts.map +1 -1
- package/dist/subscription-auth.js +3 -23
- package/dist/subscription-auth.js.map +1 -1
- package/dist/temporal/activities/agent-feed.d.ts +5 -0
- package/dist/temporal/activities/agent-feed.d.ts.map +1 -0
- package/dist/temporal/activities/agent-feed.js +41 -0
- package/dist/temporal/activities/agent-feed.js.map +1 -0
- package/dist/temporal/activities/agent-scripts.d.ts +16 -0
- package/dist/temporal/activities/agent-scripts.d.ts.map +1 -0
- package/dist/temporal/activities/agent-scripts.js +162 -0
- package/dist/temporal/activities/agent-scripts.js.map +1 -0
- package/dist/temporal/activities/authoring-round.d.ts +13 -0
- package/dist/temporal/activities/authoring-round.d.ts.map +1 -0
- package/dist/temporal/activities/authoring-round.js +160 -0
- package/dist/temporal/activities/authoring-round.js.map +1 -0
- package/dist/temporal/activities/constants.d.ts +5 -0
- package/dist/temporal/activities/constants.d.ts.map +1 -0
- package/dist/temporal/activities/constants.js +5 -0
- package/dist/temporal/activities/constants.js.map +1 -0
- package/dist/temporal/activities/discovery.d.ts +17 -0
- package/dist/temporal/activities/discovery.d.ts.map +1 -0
- package/dist/temporal/activities/discovery.js +153 -0
- package/dist/temporal/activities/discovery.js.map +1 -0
- package/dist/temporal/activities/drafts.d.ts +15 -0
- package/dist/temporal/activities/drafts.d.ts.map +1 -0
- package/dist/temporal/activities/drafts.js +51 -0
- package/dist/temporal/activities/drafts.js.map +1 -0
- package/dist/temporal/activities/excluded-source-prs.d.ts +9 -0
- package/dist/temporal/activities/excluded-source-prs.d.ts.map +1 -0
- package/dist/temporal/activities/excluded-source-prs.js +132 -0
- package/dist/temporal/activities/excluded-source-prs.js.map +1 -0
- package/dist/temporal/activities/export.d.ts +38 -0
- package/dist/temporal/activities/export.d.ts.map +1 -0
- package/dist/temporal/activities/export.js +79 -0
- package/dist/temporal/activities/export.js.map +1 -0
- package/dist/temporal/activities/factory.d.ts +5 -0
- package/dist/temporal/activities/factory.d.ts.map +1 -0
- package/dist/temporal/activities/factory.js +26 -0
- package/dist/temporal/activities/factory.js.map +1 -0
- package/dist/temporal/activities/gate-logs.d.ts +20 -0
- package/dist/temporal/activities/gate-logs.d.ts.map +1 -0
- package/dist/temporal/activities/gate-logs.js +62 -0
- package/dist/temporal/activities/gate-logs.js.map +1 -0
- package/dist/temporal/activities/generation-runtime.d.ts +6 -0
- package/dist/temporal/activities/generation-runtime.d.ts.map +1 -0
- package/dist/temporal/activities/generation-runtime.js +56 -0
- package/dist/temporal/activities/generation-runtime.js.map +1 -0
- package/dist/temporal/activities/harbor.d.ts +11 -0
- package/dist/temporal/activities/harbor.d.ts.map +1 -0
- package/dist/temporal/activities/harbor.js +112 -0
- package/dist/temporal/activities/harbor.js.map +1 -0
- package/dist/temporal/activities/modal-build-log.d.ts +12 -0
- package/dist/temporal/activities/modal-build-log.d.ts.map +1 -0
- package/dist/temporal/activities/modal-build-log.js +57 -0
- package/dist/temporal/activities/modal-build-log.js.map +1 -0
- package/dist/temporal/activities/prompts-authoring.d.ts +6 -0
- package/dist/temporal/activities/prompts-authoring.d.ts.map +1 -0
- package/dist/temporal/activities/prompts-authoring.js +87 -0
- package/dist/temporal/activities/prompts-authoring.js.map +1 -0
- package/dist/temporal/activities/prompts-verifier.d.ts +17 -0
- package/dist/temporal/activities/prompts-verifier.d.ts.map +1 -0
- package/dist/temporal/activities/prompts-verifier.js +66 -0
- package/dist/temporal/activities/prompts-verifier.js.map +1 -0
- package/dist/temporal/activities/provenance.d.ts +4 -0
- package/dist/temporal/activities/provenance.d.ts.map +1 -0
- package/dist/temporal/activities/provenance.js +18 -0
- package/dist/temporal/activities/provenance.js.map +1 -0
- package/dist/temporal/activities/replay.d.ts +20 -0
- package/dist/temporal/activities/replay.d.ts.map +1 -0
- package/dist/temporal/activities/replay.js +135 -0
- package/dist/temporal/activities/replay.js.map +1 -0
- package/dist/temporal/activities/round-outcome.d.ts +63 -0
- package/dist/temporal/activities/round-outcome.d.ts.map +1 -0
- package/dist/temporal/activities/round-outcome.js +127 -0
- package/dist/temporal/activities/round-outcome.js.map +1 -0
- package/dist/temporal/activities/runtime.d.ts +38 -0
- package/dist/temporal/activities/runtime.d.ts.map +1 -0
- package/dist/temporal/activities/runtime.js +146 -0
- package/dist/temporal/activities/runtime.js.map +1 -0
- package/dist/temporal/activities/session-verify.d.ts +45 -0
- package/dist/temporal/activities/session-verify.d.ts.map +1 -0
- package/dist/temporal/activities/session-verify.js +91 -0
- package/dist/temporal/activities/session-verify.js.map +1 -0
- package/dist/temporal/activities/submissions.d.ts +9 -0
- package/dist/temporal/activities/submissions.d.ts.map +1 -0
- package/dist/temporal/activities/submissions.js +28 -0
- package/dist/temporal/activities/submissions.js.map +1 -0
- package/dist/temporal/activities/task-compiler.d.ts +21 -0
- package/dist/temporal/activities/task-compiler.d.ts.map +1 -0
- package/dist/temporal/activities/task-compiler.js +63 -0
- package/dist/temporal/activities/task-compiler.js.map +1 -0
- package/dist/temporal/activities/types.d.ts +57 -0
- package/dist/temporal/activities/types.d.ts.map +1 -0
- package/dist/temporal/activities/types.js +2 -0
- package/dist/temporal/activities/types.js.map +1 -0
- package/dist/temporal/activities/verifier-material.d.ts +18 -0
- package/dist/temporal/activities/verifier-material.d.ts.map +1 -0
- package/dist/temporal/activities/verifier-material.js +49 -0
- package/dist/temporal/activities/verifier-material.js.map +1 -0
- package/dist/temporal/activities/verifier-outcome.d.ts +19 -0
- package/dist/temporal/activities/verifier-outcome.d.ts.map +1 -0
- package/dist/temporal/activities/verifier-outcome.js +70 -0
- package/dist/temporal/activities/verifier-outcome.js.map +1 -0
- package/dist/temporal/activities/verifier-round.d.ts +8 -0
- package/dist/temporal/activities/verifier-round.d.ts.map +1 -0
- package/dist/temporal/activities/verifier-round.js +110 -0
- package/dist/temporal/activities/verifier-round.js.map +1 -0
- package/dist/temporal/activities/verify-harbor.d.ts +15 -0
- package/dist/temporal/activities/verify-harbor.d.ts.map +1 -0
- package/dist/temporal/activities/verify-harbor.js +193 -0
- package/dist/temporal/activities/verify-harbor.js.map +1 -0
- package/dist/temporal/activities/verify.d.ts +11 -0
- package/dist/temporal/activities/verify.d.ts.map +1 -0
- package/dist/temporal/activities/verify.js +151 -0
- package/dist/temporal/activities/verify.js.map +1 -0
- package/dist/temporal/activities.d.ts +3 -51
- package/dist/temporal/activities.d.ts.map +1 -1
- package/dist/temporal/activities.js +2 -886
- package/dist/temporal/activities.js.map +1 -1
- package/dist/temporal/connection.d.ts.map +1 -1
- package/dist/temporal/connection.js +3 -2
- package/dist/temporal/connection.js.map +1 -1
- package/dist/temporal/worker-main.js +19 -3
- package/dist/temporal/worker-main.js.map +1 -1
- package/dist/temporal/workflow/activity-proxies.d.ts +3 -0
- package/dist/temporal/workflow/activity-proxies.d.ts.map +1 -0
- package/dist/temporal/workflow/activity-proxies.js +45 -0
- package/dist/temporal/workflow/activity-proxies.js.map +1 -0
- package/dist/temporal/workflow/authoring-stage.d.ts +5 -0
- package/dist/temporal/workflow/authoring-stage.d.ts.map +1 -0
- package/dist/temporal/workflow/authoring-stage.js +64 -0
- package/dist/temporal/workflow/authoring-stage.js.map +1 -0
- package/dist/temporal/workflow/candidate-tracker.d.ts +28 -0
- package/dist/temporal/workflow/candidate-tracker.d.ts.map +1 -0
- package/dist/temporal/workflow/candidate-tracker.js +85 -0
- package/dist/temporal/workflow/candidate-tracker.js.map +1 -0
- package/dist/temporal/workflow/candidate.d.ts +6 -0
- package/dist/temporal/workflow/candidate.d.ts.map +1 -0
- package/dist/temporal/workflow/candidate.js +54 -0
- package/dist/temporal/workflow/candidate.js.map +1 -0
- package/dist/temporal/workflow/discovery.d.ts +19 -0
- package/dist/temporal/workflow/discovery.d.ts.map +1 -0
- package/dist/temporal/workflow/discovery.js +137 -0
- package/dist/temporal/workflow/discovery.js.map +1 -0
- package/dist/temporal/workflow/failures.d.ts +5 -0
- package/dist/temporal/workflow/failures.d.ts.map +1 -0
- package/dist/temporal/workflow/failures.js +28 -0
- package/dist/temporal/workflow/failures.js.map +1 -0
- package/dist/temporal/workflow/run.d.ts +5 -0
- package/dist/temporal/workflow/run.d.ts.map +1 -0
- package/dist/temporal/workflow/run.js +154 -0
- package/dist/temporal/workflow/run.js.map +1 -0
- package/dist/temporal/workflow/stage.d.ts +26 -0
- package/dist/temporal/workflow/stage.d.ts.map +1 -0
- package/dist/temporal/workflow/stage.js +16 -0
- package/dist/temporal/workflow/stage.js.map +1 -0
- package/dist/temporal/workflow/verification-stage.d.ts +11 -0
- package/dist/temporal/workflow/verification-stage.d.ts.map +1 -0
- package/dist/temporal/workflow/verification-stage.js +20 -0
- package/dist/temporal/workflow/verification-stage.js.map +1 -0
- package/dist/temporal/workflow.d.ts +12 -4
- package/dist/temporal/workflow.d.ts.map +1 -1
- package/dist/temporal/workflow.js +38 -445
- package/dist/temporal/workflow.js.map +1 -1
- package/dist/verifier-fix.d.ts +20 -0
- package/dist/verifier-fix.d.ts.map +1 -0
- package/dist/verifier-fix.js +62 -0
- package/dist/verifier-fix.js.map +1 -0
- package/dist/verify-report.d.ts +9 -0
- package/dist/verify-report.d.ts.map +1 -0
- package/dist/verify-report.js +135 -0
- package/dist/verify-report.js.map +1 -0
- package/dist/viewer/archived-keys.d.ts +9 -0
- package/dist/viewer/archived-keys.d.ts.map +1 -0
- package/dist/viewer/archived-keys.js +36 -0
- package/dist/viewer/archived-keys.js.map +1 -0
- package/dist/viewer/archived.d.ts +20 -0
- package/dist/viewer/archived.d.ts.map +1 -0
- package/dist/viewer/archived.js +238 -0
- package/dist/viewer/archived.js.map +1 -0
- package/dist/viewer/artifacts.d.ts +8 -0
- package/dist/viewer/artifacts.d.ts.map +1 -0
- package/dist/viewer/artifacts.js +96 -0
- package/dist/viewer/artifacts.js.map +1 -0
- package/dist/viewer/bundle.d.ts +9 -0
- package/dist/viewer/bundle.d.ts.map +1 -0
- package/dist/viewer/bundle.js +79 -0
- package/dist/viewer/bundle.js.map +1 -0
- package/dist/viewer/candidates.d.ts +9 -0
- package/dist/viewer/candidates.d.ts.map +1 -0
- package/dist/viewer/candidates.js +137 -0
- package/dist/viewer/candidates.js.map +1 -0
- package/dist/viewer/local-server.d.ts +11 -0
- package/dist/viewer/local-server.d.ts.map +1 -0
- package/dist/viewer/local-server.js +64 -0
- package/dist/viewer/local-server.js.map +1 -0
- package/dist/viewer/task-files.d.ts +10 -0
- package/dist/viewer/task-files.d.ts.map +1 -0
- package/dist/viewer/task-files.js +120 -0
- package/dist/viewer/task-files.js.map +1 -0
- package/dist/viewer/types.d.ts +78 -0
- package/dist/viewer/types.d.ts.map +1 -0
- package/dist/viewer/types.js +36 -0
- package/dist/viewer/types.js.map +1 -0
- package/docs/api.md +168 -0
- package/docs/evaluations.md +42 -15
- package/docs/operations.md +254 -26
- package/docs/solver-evaluations.md +63 -0
- package/docs/task-construction.md +21 -11
- package/drizzle/0000_glossy_johnny_blaze.sql +97 -0
- package/drizzle/0001_evaluation_records.sql +5 -0
- package/drizzle/0002_task_deletion.sql +1 -0
- package/drizzle/0003_drop_repo_runs.sql +3 -0
- package/drizzle/0004_preserve_batch_runs.sql +8 -0
- package/drizzle/0005_api_keys.sql +15 -0
- package/drizzle/meta/0000_snapshot.json +776 -0
- package/drizzle/meta/0001_snapshot.json +807 -0
- package/drizzle/meta/0002_snapshot.json +813 -0
- package/drizzle/meta/0003_snapshot.json +726 -0
- package/drizzle/meta/0004_snapshot.json +813 -0
- package/drizzle/meta/0005_snapshot.json +919 -0
- package/drizzle/meta/_journal.json +48 -0
- package/package.json +39 -25
- package/src/extensions/authoring.ts +83 -72
- package/src/extensions/shared/deliverable.ts +153 -0
- package/src/extensions/shared/mailbox.ts +128 -0
- package/src/extensions/shared/schemas.ts +101 -0
- package/src/extensions/shared/static-check.ts +103 -0
- package/src/extensions/verifier.ts +88 -0
- package/src/skills/selfbench/SKILL.md +71 -13
- package/biome.json +0 -24
- package/dist/agent-smoke-main.d.ts +0 -3
- package/dist/agent-smoke-main.d.ts.map +0 -1
- package/dist/agent-smoke-main.js +0 -55
- package/dist/agent-smoke-main.js.map +0 -1
- package/dist/agent-smoke.d.ts +0 -18
- package/dist/agent-smoke.d.ts.map +0 -1
- package/dist/agent-smoke.js +0 -103
- package/dist/agent-smoke.js.map +0 -1
- package/dist/codex-review.d.ts +0 -41
- package/dist/codex-review.d.ts.map +0 -1
- package/dist/codex-review.js +0 -193
- package/dist/codex-review.js.map +0 -1
- package/dist/eval-main.d.ts +0 -3
- package/dist/eval-main.d.ts.map +0 -1
- package/dist/eval-main.js +0 -81
- package/dist/eval-main.js.map +0 -1
- package/dist/evaluate.d.ts +0 -25
- package/dist/evaluate.d.ts.map +0 -1
- package/dist/evaluate.js +0 -214
- package/dist/evaluate.js.map +0 -1
- package/dist/modal-auth.d.ts.map +0 -1
- package/dist/modal-auth.js.map +0 -1
- package/dist/reaudit-main.d.ts +0 -3
- package/dist/reaudit-main.d.ts.map +0 -1
- package/dist/reaudit-main.js +0 -158
- package/dist/reaudit-main.js.map +0 -1
- package/dist/repair-main.d.ts +0 -3
- package/dist/repair-main.d.ts.map +0 -1
- package/dist/repair-main.js +0 -171
- package/dist/repair-main.js.map +0 -1
- package/dist/review/assets/index-CZ3G759O.js +0 -1568
- package/dist/review/assets/index-DgSLzX8l.css +0 -1
- package/dist/sandbox/programs/prepare-repair.d.ts +0 -7
- package/dist/sandbox/programs/prepare-repair.d.ts.map +0 -1
- package/dist/sandbox/programs/prepare-repair.js.map +0 -1
- package/dist/sandbox/programs/repair.d.ts +0 -3
- package/dist/sandbox/programs/repair.d.ts.map +0 -1
- package/dist/sandbox/programs/repair.js +0 -100
- package/dist/sandbox/programs/repair.js.map +0 -1
- package/dist/sandbox/programs/review.d.ts +0 -2
- package/dist/sandbox/programs/review.d.ts.map +0 -1
- package/dist/sandbox/programs/review.js +0 -18
- package/dist/sandbox/programs/review.js.map +0 -1
- package/dist/sandbox/programs/validation-repair.d.ts +0 -3
- package/dist/sandbox/programs/validation-repair.d.ts.map +0 -1
- package/dist/sandbox/programs/validation-repair.js +0 -115
- package/dist/sandbox/programs/validation-repair.js.map +0 -1
- package/dist/sandbox-repair.bundle.js +0 -323
- package/dist/sandbox-review.bundle.js +0 -14462
- package/dist/validate-main.d.ts +0 -3
- package/dist/validate-main.d.ts.map +0 -1
- package/dist/validate-main.js +0 -143
- package/dist/validate-main.js.map +0 -1
- package/dist/validation-repair.d.ts +0 -10
- package/dist/validation-repair.d.ts.map +0 -1
- package/dist/validation-repair.js +0 -72
- package/dist/validation-repair.js.map +0 -1
- package/review/index.html +0 -14
- package/review/src/App.tsx +0 -338
- package/review/src/export-loader.test.ts +0 -57
- package/review/src/export-loader.ts +0 -151
- package/review/src/main.tsx +0 -15
- package/review/src/styles.css +0 -162
- package/review/src/types.ts +0 -47
- package/review/tsconfig.json +0 -16
- package/review/vite.config.ts +0 -20
- package/scripts/build-sandbox-programs.ts +0 -22
- package/scripts/verify-package.ts +0 -102
- package/scripts/write-build-metadata.ts +0 -27
- package/src/agent-smoke-main.ts +0 -64
- package/src/agent-smoke.ts +0 -138
- package/src/api-main.ts +0 -12
- package/src/api.ts +0 -291
- package/src/artifacts.ts +0 -357
- package/src/audit.ts +0 -106
- package/src/build-metadata.ts +0 -3
- package/src/cli.ts +0 -504
- package/src/codex-review.ts +0 -229
- package/src/config.ts +0 -239
- package/src/contracts.ts +0 -233
- package/src/coupling.ts +0 -259
- package/src/eval-main.ts +0 -93
- package/src/evaluate.ts +0 -300
- package/src/github.ts +0 -26
- package/src/harbor-environment.ts +0 -17
- package/src/harbor-results.ts +0 -144
- package/src/harbor-task.ts +0 -533
- package/src/hash.ts +0 -5
- package/src/modal-auth.ts +0 -11
- package/src/parallel.ts +0 -24
- package/src/process.ts +0 -167
- package/src/project-paths.ts +0 -15
- package/src/provenance-associations.ts +0 -311
- package/src/provenance.ts +0 -561
- package/src/providers.ts +0 -22
- package/src/reaudit-main.ts +0 -198
- package/src/repair-main.ts +0 -209
- package/src/repair.ts +0 -55
- package/src/run-wait.ts +0 -40
- package/src/sandbox/contracts.ts +0 -52
- package/src/sandbox/index.ts +0 -23
- package/src/sandbox/programs/author.ts +0 -19
- package/src/sandbox/programs/prepare-repair.ts +0 -44
- package/src/sandbox/programs/repair.ts +0 -132
- package/src/sandbox/programs/review.ts +0 -19
- package/src/sandbox/programs/validation-repair.ts +0 -153
- package/src/sandbox/providers/docker/executor.ts +0 -115
- package/src/sandbox/providers/modal/executor.ts +0 -217
- package/src/sandbox/providers/vercel/command.ts +0 -127
- package/src/sandbox/providers/vercel/executor.ts +0 -448
- package/src/sandbox/providers/vercel/fetch.ts +0 -45
- package/src/sandbox/timeout.ts +0 -56
- package/src/setup/vercel/cli.ts +0 -403
- package/src/setup/vercel/index.ts +0 -3
- package/src/setup/vercel/probe.ts +0 -232
- package/src/setup/vercel/profile.ts +0 -322
- package/src/setup/vercel/runtime-image.ts +0 -204
- package/src/setup/vercel/setup.ts +0 -419
- package/src/subscription-auth.ts +0 -80
- package/src/temporal/activities.ts +0 -1348
- package/src/temporal/connection.ts +0 -23
- package/src/temporal/worker-main.ts +0 -28
- package/src/temporal/workflow.ts +0 -568
- package/src/terminal-prompts.ts +0 -197
- package/src/terminal-reporter.ts +0 -126
- package/src/validate-main.ts +0 -177
- package/src/validation-repair.ts +0 -94
- package/tsconfig.build.json +0 -13
- package/tsconfig.json +0 -21
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:root{--bg: #f4f5f7;--surface: #ffffff;--border: #d8dce3;--text: #1a1d23;--muted: #6b7280;--accent: #2563eb;--danger: #dc2626;--success: #059669;--code-bg: #f1f3f5;--font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--mono: "SF Mono", "Cascadia Code", "Fira Code", monospace}@media(prefers-color-scheme:dark){:root{--bg: #0d1117;--surface: #161b22;--border: #30363d;--text: #e6edf3;--muted: #8b949e;--accent: #58a6ff;--danger: #f85149;--success: #3fb950;--code-bg: #1c2128}}*{margin:0;padding:0;box-sizing:border-box}body{font-family:var(--font);background:var(--bg);color:var(--text);font-size:14px;line-height:1.5}.app-shell{min-height:100vh;display:flex;flex-direction:column}.topbar{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom:1px solid var(--border);background:var(--surface)}.eyebrow{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.topbar h1{font-size:18px;font-weight:600;margin-top:2px}.topbar-actions{display:flex;gap:8px;align-items:center}.token-input{padding:6px 10px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--text);font-size:12px;width:180px}.error-banner{padding:12px 24px;background:var(--danger);color:#fff;font-size:13px}.workspace{flex:1;display:grid;grid-template-columns:280px 1fr;gap:16px;padding:16px 24px}.surface{background:var(--surface);border:1px solid var(--border);border-radius:8px}.run-list{padding:16px;overflow-y:auto;max-height:calc(100vh - 100px)}.section-heading{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}.section-heading h2{font-size:13px;font-weight:600}.section-heading span{font-size:11px;color:var(--muted)}.run-row{width:100%;display:flex;flex-direction:column;gap:2px;padding:10px 12px;margin-bottom:6px;border:1px solid var(--border);border-radius:6px;background:var(--surface);cursor:pointer;text-align:left;font:inherit;color:inherit}.run-row:hover{border-color:var(--accent)}.run-row.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.run-row strong{font-size:13px}.run-row span{font-size:11px;color:var(--muted)}.run-row small{font-size:10px;color:var(--muted)}.content{display:flex;flex-direction:column;gap:16px}.empty{padding:64px 32px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;min-height:400px;justify-content:center}.empty h2{font-size:16px;font-weight:600}.empty p{color:var(--muted)}.summary{display:flex;justify-content:space-between;align-items:center;padding:16px 20px}.summary h2{font-size:16px;font-weight:600}.summary .muted{font-size:12px;color:var(--muted);margin-top:2px}.review-grid{display:grid;grid-template-columns:240px 1fr;gap:16px}.task-list{padding:16px;max-height:calc(100vh - 280px);overflow-y:auto}.task-row{width:100%;display:flex;justify-content:space-between;align-items:center;padding:8px 10px;margin-bottom:4px;border:1px solid var(--border);border-radius:5px;background:var(--surface);cursor:pointer;text-align:left;font:inherit;color:inherit;font-size:12px}.task-row:hover,.task-row.selected{border-color:var(--accent)}.task-row.removed{opacity:.5}.task-row.removed strong{text-decoration:line-through}.task-row span{font-size:10px;color:var(--muted)}.task-detail{padding:20px 24px;max-height:calc(100vh - 280px);overflow-y:auto}.detail-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid var(--border)}.detail-header h2{font-size:18px;font-weight:600}.detail-block{margin-bottom:20px}.detail-block h3{font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}.detail-block pre{padding:12px 16px;background:var(--code-bg);border-radius:6px;font-family:var(--mono);font-size:12px;white-space:pre-wrap;word-break:break-all;max-height:400px;overflow-y:auto;line-height:1.6}.patch-files{display:grid;gap:10px;padding:8px;max-height:600px;overflow:auto;background:var(--code-bg);border-radius:6px}.patch-files>div{overflow:hidden;border:1px solid var(--border);border-radius:4px}.button{padding:7px 14px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--text);font-size:12px;font-weight:500;cursor:pointer;font-family:var(--font)}.button:hover{border-color:var(--accent);color:var(--accent)}.button.primary{background:var(--accent);color:#fff;border-color:var(--accent)}.button.primary:hover{opacity:.9;color:#fff}.button.danger{color:var(--danger);border-color:var(--danger)}.button.danger:hover{background:var(--danger);color:#fff}.button.undo{color:var(--success);border-color:var(--success)}.button.undo:hover{background:var(--success);color:#fff}.muted{color:var(--muted)}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface PreparedRepairTask {
|
|
2
|
-
readonly extractedDirectory: string;
|
|
3
|
-
readonly taskDirectory: string;
|
|
4
|
-
readonly repositoryDirectory: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function prepareRepairTask(archivePath: string, workDirectory?: string): Promise<PreparedRepairTask>;
|
|
7
|
-
//# sourceMappingURL=prepare-repair.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-repair.d.ts","sourceRoot":"","sources":["../../../src/sandbox/programs/prepare-repair.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAED,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,aAAa,SAAU,GACtB,OAAO,CAAC,kBAAkB,CAAC,CA8B7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-repair.js","sourceRoot":"","sources":["../../../src/sandbox/programs/prepare-repair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQ9C,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,WAAmB,EACnB,aAAa,GAAG,OAAO;IAEvB,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACvD,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACxD,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAChG,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,CAA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AAE,CAAC;AACpE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repair.d.ts","sourceRoot":"","sources":["../../../src/sandbox/programs/repair.ts"],"names":[],"mappings":""}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { chmod, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
|
-
import { homedir, tmpdir } from "node:os";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
import { sha256 } from "../../hash.js";
|
|
6
|
-
import { runCommand } from "../../process.js";
|
|
7
|
-
import { assertRepairPaths, patchPaths, repairPrompt } from "../../repair.js";
|
|
8
|
-
import { prepareRepairTask } from "./prepare-repair.js";
|
|
9
|
-
const [archivePath, reviewPath, outputArchive, outputReport] = process.argv.slice(2);
|
|
10
|
-
if (!archivePath || !reviewPath || !outputArchive || !outputReport) {
|
|
11
|
-
throw new Error("usage: sandbox-repair TASK.tar.gz REVIEW.json OUTPUT.tar.gz OUTPUT-REPORT.json");
|
|
12
|
-
}
|
|
13
|
-
const { extractedDirectory, taskDirectory, repositoryDirectory } = await prepareRepairTask(archivePath);
|
|
14
|
-
const [instruction, originalPatch, review] = await Promise.all([
|
|
15
|
-
readFile(join(taskDirectory, "instruction.md"), "utf8"),
|
|
16
|
-
readFile(join(taskDirectory, "tests/test.patch"), "utf8"),
|
|
17
|
-
readFile(reviewPath, "utf8"),
|
|
18
|
-
]);
|
|
19
|
-
const manifestPath = join(taskDirectory, ".selfbench-manifest.json");
|
|
20
|
-
const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
|
21
|
-
const taskId = typeof manifest.taskId === "string" ? manifest.taskId : "unknown-task";
|
|
22
|
-
const allowedPaths = patchPaths(originalPatch);
|
|
23
|
-
const codexAuth = process.env.SELFBENCH_CODEX_AUTH_JSON;
|
|
24
|
-
const apiKey = process.env.OPENAI_API_KEY;
|
|
25
|
-
if (!apiKey && !codexAuth) {
|
|
26
|
-
fail("OPENAI_API_KEY or SELFBENCH_CODEX_AUTH_JSON is required");
|
|
27
|
-
}
|
|
28
|
-
const codexHome = join(homedir(), ".codex");
|
|
29
|
-
const authPath = join(codexHome, "auth.json");
|
|
30
|
-
await mkdir(codexHome, { recursive: true });
|
|
31
|
-
await writeFile(authPath, codexAuth ?? `${JSON.stringify({ OPENAI_API_KEY: apiKey })}\n`);
|
|
32
|
-
await chmod(authPath, 0o600);
|
|
33
|
-
const promptPath = join(tmpdir(), `selfbench-repair-${taskId}.md`);
|
|
34
|
-
await writeFile(promptPath, repairPrompt({
|
|
35
|
-
taskId,
|
|
36
|
-
authenticRequest: instruction,
|
|
37
|
-
couplingReport: review,
|
|
38
|
-
allowedPaths,
|
|
39
|
-
}));
|
|
40
|
-
const codex = await runCommand("codex", [
|
|
41
|
-
"exec",
|
|
42
|
-
"--model",
|
|
43
|
-
process.env.SELFBENCH_REPAIR_MODEL ?? "gpt-5.6-sol",
|
|
44
|
-
"--dangerously-bypass-approvals-and-sandbox",
|
|
45
|
-
"--ephemeral",
|
|
46
|
-
"--ignore-user-config",
|
|
47
|
-
"--json",
|
|
48
|
-
"-C",
|
|
49
|
-
repositoryDirectory,
|
|
50
|
-
"-",
|
|
51
|
-
], {
|
|
52
|
-
allowFailure: true,
|
|
53
|
-
timeoutMs: 90 * 60 * 1000,
|
|
54
|
-
env: process.env,
|
|
55
|
-
input: await readFile(promptPath, "utf8"),
|
|
56
|
-
onOutput: (stream, chunk) => {
|
|
57
|
-
(stream === "stdout" ? process.stdout : process.stderr).write(chunk);
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
if (codex.exitCode !== 0) {
|
|
61
|
-
throw new Error(`Codex repair exited ${codex.exitCode}: ${codex.stderr.slice(-2_000)}`);
|
|
62
|
-
}
|
|
63
|
-
const [tracked, untracked] = await Promise.all([
|
|
64
|
-
runCommand("git", ["-C", repositoryDirectory, "diff", "--name-only", "HEAD"]),
|
|
65
|
-
runCommand("git", ["-C", repositoryDirectory, "ls-files", "--others", "--exclude-standard"]),
|
|
66
|
-
]);
|
|
67
|
-
const changedPaths = [...tracked.stdout.split("\n"), ...untracked.stdout.split("\n")]
|
|
68
|
-
.filter(Boolean)
|
|
69
|
-
.sort();
|
|
70
|
-
assertRepairPaths(originalPatch, changedPaths);
|
|
71
|
-
const repaired = await runCommand("git", ["-C", repositoryDirectory, "diff", "--binary", "HEAD"]);
|
|
72
|
-
if (!repaired.stdout.startsWith("diff --git ")) {
|
|
73
|
-
throw new Error(`repair produced no held-out test patch; status=${JSON.stringify(changedPaths)}; Codex tail=${codex.stdout.slice(-4_000)}`);
|
|
74
|
-
}
|
|
75
|
-
if (repaired.stdout === originalPatch) {
|
|
76
|
-
throw new Error("repair left the held-out test patch unchanged");
|
|
77
|
-
}
|
|
78
|
-
await writeFile(join(taskDirectory, "tests/test.patch"), repaired.stdout);
|
|
79
|
-
await writeFile(manifestPath, `${JSON.stringify({
|
|
80
|
-
...manifest,
|
|
81
|
-
testPatchSha256: sha256(repaired.stdout),
|
|
82
|
-
repair: {
|
|
83
|
-
model: process.env.SELFBENCH_REPAIR_MODEL ?? "gpt-5.6-sol",
|
|
84
|
-
originalTestPatchSha256: sha256(originalPatch),
|
|
85
|
-
},
|
|
86
|
-
}, null, 2)}\n`);
|
|
87
|
-
await runCommand("tar", ["-czf", outputArchive, "-C", extractedDirectory, "."]);
|
|
88
|
-
await writeFile(outputReport, `${JSON.stringify({
|
|
89
|
-
schemaVersion: 1,
|
|
90
|
-
taskId,
|
|
91
|
-
model: process.env.SELFBENCH_REPAIR_MODEL ?? "gpt-5.6-sol",
|
|
92
|
-
changedPaths,
|
|
93
|
-
originalTestPatchSha256: sha256(originalPatch),
|
|
94
|
-
repairedTestPatchSha256: sha256(repaired.stdout),
|
|
95
|
-
codexOutputTail: codex.stdout.slice(-4_000),
|
|
96
|
-
}, null, 2)}\n`);
|
|
97
|
-
function fail(message) {
|
|
98
|
-
throw new Error(message);
|
|
99
|
-
}
|
|
100
|
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AAY,EACZ,GAAG,IAAI,CAAC,SAAS,CACf;IACE,aAAa,EAAE,CAAC;IAChB,MAAM;IACN,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,aAAa;IAC1D,YAAY;IACZ,uBAAuB,EAAE,MAAM,CAAC,aAAa,CAAC;IAC9C,uBAAuB,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;IAChD,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;CAC5C,EACD,IAAI,EACJ,CAAC,CACF,IAAI,CACN,CAAC;AAEF,SAAS,IAAI,CAAC,OAAe;IAC3B,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../../src/sandbox/programs/review.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
-
import { reviewCouplingWithCodex } from "../../codex-review.js";
|
|
3
|
-
const apiKey = process.env.OPENAI_API_KEY;
|
|
4
|
-
const authJson = process.env.SELFBENCH_PI_AUTH_JSON;
|
|
5
|
-
const outputPath = process.env.SELFBENCH_REVIEW_OUTPUT;
|
|
6
|
-
if (!apiKey && !authJson) {
|
|
7
|
-
throw new Error("OPENAI_API_KEY or SELFBENCH_PI_AUTH_JSON is required");
|
|
8
|
-
}
|
|
9
|
-
if (!outputPath) {
|
|
10
|
-
throw new Error("SELFBENCH_REVIEW_OUTPUT is required");
|
|
11
|
-
}
|
|
12
|
-
const review = await reviewCouplingWithCodex({
|
|
13
|
-
...(apiKey ? { apiKey } : {}),
|
|
14
|
-
...(authJson ? { authJson } : {}),
|
|
15
|
-
prompt: await readFile("/work/review-input.md", "utf8"),
|
|
16
|
-
});
|
|
17
|
-
await writeFile(outputPath, `${JSON.stringify(review, null, 2)}\n`, { flag: "wx" });
|
|
18
|
-
//# sourceMappingURL=review.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../../src/sandbox/programs/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;AAC1C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;AACpD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;AACvD,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;AAC1E,CAAC;AACD,IAAI,CAAC,UAAU,EAAE,CAAC;IAChB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC;IAC3C,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACjC,MAAM,EAAE,MAAM,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CACxD,CAAC,CAAC;AACH,MAAM,SAAS,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation-repair.d.ts","sourceRoot":"","sources":["../../../src/sandbox/programs/validation-repair.ts"],"names":[],"mappings":""}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { chmod, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
|
-
import { homedir, tmpdir } from "node:os";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
import { taskDefinitionSchema } from "../../contracts.js";
|
|
6
|
-
import { runCommand } from "../../process.js";
|
|
7
|
-
import { assertValidationRepair, validationRepairPaths, validationRepairPrompt, } from "../../validation-repair.js";
|
|
8
|
-
import { prepareRepairTask } from "./prepare-repair.js";
|
|
9
|
-
const [archivePath, definitionPath, diagnosticsPath, outputDefinition, outputPatch, outputReport] = process.argv.slice(2);
|
|
10
|
-
if (!archivePath ||
|
|
11
|
-
!definitionPath ||
|
|
12
|
-
!diagnosticsPath ||
|
|
13
|
-
!outputDefinition ||
|
|
14
|
-
!outputPatch ||
|
|
15
|
-
!outputReport) {
|
|
16
|
-
throw new Error("usage: sandbox-validation-repair TASK.tar.gz DEFINITION.json DIAGNOSTICS.txt OUTPUT-DEFINITION.json OUTPUT-PATCH OUTPUT-REPORT.json");
|
|
17
|
-
}
|
|
18
|
-
const { taskDirectory, repositoryDirectory } = await prepareRepairTask(archivePath);
|
|
19
|
-
const [instruction, originalPatch, diagnostics, originalDefinitionBytes] = await Promise.all([
|
|
20
|
-
readFile(join(taskDirectory, "instruction.md"), "utf8"),
|
|
21
|
-
readFile(join(taskDirectory, "tests/test.patch"), "utf8"),
|
|
22
|
-
readFile(diagnosticsPath, "utf8"),
|
|
23
|
-
readFile(definitionPath, "utf8"),
|
|
24
|
-
]);
|
|
25
|
-
const originalDefinition = taskDefinitionSchema.parse(JSON.parse(originalDefinitionBytes));
|
|
26
|
-
const allowedPaths = validationRepairPaths(originalPatch);
|
|
27
|
-
await Promise.all([
|
|
28
|
-
writeFile("/work/definition.json", `${JSON.stringify(originalDefinition, null, 2)}\n`),
|
|
29
|
-
writeFile("/work/gold.patch", await readFile(join(taskDirectory, "solution/gold.patch"))),
|
|
30
|
-
writeFile("/work/test.sh", await readFile(join(taskDirectory, "tests/test.sh"))),
|
|
31
|
-
]);
|
|
32
|
-
const piHome = join(homedir(), ".pi/agent");
|
|
33
|
-
const piAuth = process.env.SELFBENCH_PI_AUTH_JSON;
|
|
34
|
-
if (!process.env.OPENAI_API_KEY && !piAuth) {
|
|
35
|
-
fail("OPENAI_API_KEY or SELFBENCH_PI_AUTH_JSON is required");
|
|
36
|
-
}
|
|
37
|
-
await mkdir(piHome, { recursive: true });
|
|
38
|
-
await Promise.all([
|
|
39
|
-
...(piAuth
|
|
40
|
-
? [
|
|
41
|
-
writeFile(join(piHome, "auth.json"), piAuth).then(() => chmod(join(piHome, "auth.json"), 0o600)),
|
|
42
|
-
]
|
|
43
|
-
: []),
|
|
44
|
-
writeFile(join(piHome, "settings.json"), `${JSON.stringify({ transport: "auto" })}\n`),
|
|
45
|
-
]);
|
|
46
|
-
const promptPath = join(tmpdir(), `selfbench-validation-repair-${originalDefinition.taskId}.md`);
|
|
47
|
-
await writeFile(promptPath, validationRepairPrompt({
|
|
48
|
-
definition: originalDefinition,
|
|
49
|
-
authenticRequest: instruction,
|
|
50
|
-
diagnostics,
|
|
51
|
-
allowedPaths,
|
|
52
|
-
}));
|
|
53
|
-
const pi = await runCommand("pi", [
|
|
54
|
-
"--print",
|
|
55
|
-
"--mode",
|
|
56
|
-
"json",
|
|
57
|
-
"--no-session",
|
|
58
|
-
"--no-approve",
|
|
59
|
-
"--no-skills",
|
|
60
|
-
"--no-prompt-templates",
|
|
61
|
-
"--no-context-files",
|
|
62
|
-
"--no-extensions",
|
|
63
|
-
"--provider",
|
|
64
|
-
process.env.OPENAI_API_KEY ? "openai" : "openai-codex",
|
|
65
|
-
"--model",
|
|
66
|
-
process.env.SELFBENCH_REPAIR_MODEL ?? "gpt-5.6-sol",
|
|
67
|
-
"--thinking",
|
|
68
|
-
"high",
|
|
69
|
-
"--tools",
|
|
70
|
-
"read,bash,grep,find,ls",
|
|
71
|
-
`@${promptPath}`,
|
|
72
|
-
], {
|
|
73
|
-
allowFailure: true,
|
|
74
|
-
timeoutMs: 90 * 60 * 1000,
|
|
75
|
-
cwd: repositoryDirectory,
|
|
76
|
-
env: process.env,
|
|
77
|
-
onOutput: (stream, chunk) => {
|
|
78
|
-
(stream === "stdout" ? process.stdout : process.stderr).write(chunk);
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
if (pi.exitCode !== 0) {
|
|
82
|
-
throw new Error(`Pi validation repair exited ${pi.exitCode}: ${pi.stderr.slice(-2_000)}`);
|
|
83
|
-
}
|
|
84
|
-
const repairedDefinition = taskDefinitionSchema.parse(JSON.parse(await readFile("/work/definition.json", "utf8")));
|
|
85
|
-
const [tracked, untracked] = await Promise.all([
|
|
86
|
-
runCommand("git", ["-C", repositoryDirectory, "diff", "--name-only", "HEAD"]),
|
|
87
|
-
runCommand("git", ["-C", repositoryDirectory, "ls-files", "--others", "--exclude-standard"]),
|
|
88
|
-
]);
|
|
89
|
-
const changedPaths = [...tracked.stdout.split("\n"), ...untracked.stdout.split("\n")]
|
|
90
|
-
.filter(Boolean)
|
|
91
|
-
.sort();
|
|
92
|
-
assertValidationRepair(originalDefinition, repairedDefinition, originalPatch, changedPaths);
|
|
93
|
-
const repaired = await runCommand("git", ["-C", repositoryDirectory, "diff", "--binary", "HEAD"]);
|
|
94
|
-
const repairedPatch = repaired.stdout.startsWith("diff --git ") ? repaired.stdout : originalPatch;
|
|
95
|
-
if (repairedPatch === originalPatch &&
|
|
96
|
-
JSON.stringify(repairedDefinition) === JSON.stringify(originalDefinition)) {
|
|
97
|
-
throw new Error("validation repair left the task unchanged");
|
|
98
|
-
}
|
|
99
|
-
await Promise.all([
|
|
100
|
-
writeFile(outputDefinition, `${JSON.stringify(repairedDefinition, null, 2)}\n`),
|
|
101
|
-
writeFile(outputPatch, repairedPatch),
|
|
102
|
-
writeFile(outputReport, `${JSON.stringify({
|
|
103
|
-
schemaVersion: 1,
|
|
104
|
-
taskId: originalDefinition.taskId,
|
|
105
|
-
model: process.env.SELFBENCH_REPAIR_MODEL ?? "gpt-5.6-sol",
|
|
106
|
-
changedPaths,
|
|
107
|
-
definitionChanged: JSON.stringify(repairedDefinition) !== JSON.stringify(originalDefinition),
|
|
108
|
-
testsChanged: repairedPatch !== originalPatch,
|
|
109
|
-
piOutputTail: pi.stdout.slice(-4_000),
|
|
110
|
-
}, null, 2)}\n`),
|
|
111
|
-
]);
|
|
112
|
-
function fail(message) {
|
|
113
|
-
throw new Error(message);
|
|
114
|
-
}
|
|
115
|
-
//# sourceMappingURL=validation-repair.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation-repair.js","sourceRoot":"","sources":["../../../src/sandbox/programs/validation-repair.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,CAAC,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,CAAC,GAC/F,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACxB,IACE,CAAC,WAAW;IACZ,CAAC,cAAc;IACf,CAAC,eAAe;IAChB,CAAC,gBAAgB;IACjB,CAAC,WAAW;IACZ,CAAC,YAAY,EACb,CAAC;IACD,MAAM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e;IAC3B,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/sandbox/programs/repair.ts
|
|
4
|
-
import { chmod, mkdir as mkdir2, readFile, writeFile } from "node:fs/promises";
|
|
5
|
-
import { homedir, tmpdir } from "node:os";
|
|
6
|
-
import { join as join2 } from "node:path";
|
|
7
|
-
|
|
8
|
-
// src/hash.ts
|
|
9
|
-
import { createHash } from "node:crypto";
|
|
10
|
-
function sha256(value) {
|
|
11
|
-
return createHash("sha256").update(value).digest("hex");
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// src/process.ts
|
|
15
|
-
import { spawn } from "node:child_process";
|
|
16
|
-
|
|
17
|
-
class InactivityTimeoutError extends Error {
|
|
18
|
-
scope;
|
|
19
|
-
timeoutMs;
|
|
20
|
-
constructor(scope, timeoutMs) {
|
|
21
|
-
super(`${scope} produced no output for ${timeoutMs}ms`);
|
|
22
|
-
this.scope = scope;
|
|
23
|
-
this.timeoutMs = timeoutMs;
|
|
24
|
-
this.name = "InactivityTimeoutError";
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
async function runCommand(command, args, options = {}) {
|
|
28
|
-
return await new Promise((resolve, reject) => {
|
|
29
|
-
const child = spawn(command, args, {
|
|
30
|
-
cwd: options.cwd,
|
|
31
|
-
env: options.env ?? process.env,
|
|
32
|
-
stdio: [options.input === undefined ? "ignore" : "pipe", "pipe", "pipe"]
|
|
33
|
-
});
|
|
34
|
-
const stdout = new RollingOutput;
|
|
35
|
-
const stderr = new RollingOutput;
|
|
36
|
-
if (!child.stdout || !child.stderr) {
|
|
37
|
-
reject(new Error(`failed to capture ${command} output`));
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
let inactivityTimer;
|
|
41
|
-
let forceKillTimer;
|
|
42
|
-
let inactivityError;
|
|
43
|
-
const clearInactivityTimer = () => {
|
|
44
|
-
if (inactivityTimer) {
|
|
45
|
-
clearTimeout(inactivityTimer);
|
|
46
|
-
inactivityTimer = undefined;
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
const terminate = () => {
|
|
50
|
-
child.kill("SIGTERM");
|
|
51
|
-
forceKillTimer ??= setTimeout(() => child.kill("SIGKILL"), 5000);
|
|
52
|
-
forceKillTimer.unref();
|
|
53
|
-
};
|
|
54
|
-
const armInactivityTimer = () => {
|
|
55
|
-
clearInactivityTimer();
|
|
56
|
-
if (!options.inactivityTimeoutMs) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
inactivityTimer = setTimeout(() => {
|
|
60
|
-
inactivityError = new InactivityTimeoutError(`${command} ${args.join(" ")}`, options.inactivityTimeoutMs ?? 0);
|
|
61
|
-
terminate();
|
|
62
|
-
}, options.inactivityTimeoutMs);
|
|
63
|
-
inactivityTimer.unref();
|
|
64
|
-
};
|
|
65
|
-
const capture = (stream, output, chunk) => {
|
|
66
|
-
output.push(chunk);
|
|
67
|
-
options.onOutput?.(stream, chunk);
|
|
68
|
-
armInactivityTimer();
|
|
69
|
-
};
|
|
70
|
-
child.stdout.on("data", (chunk) => capture("stdout", stdout, chunk));
|
|
71
|
-
child.stderr.on("data", (chunk) => capture("stderr", stderr, chunk));
|
|
72
|
-
child.on("error", reject);
|
|
73
|
-
const abort = () => terminate();
|
|
74
|
-
if (options.signal?.aborted) {
|
|
75
|
-
abort();
|
|
76
|
-
} else {
|
|
77
|
-
options.signal?.addEventListener("abort", abort, { once: true });
|
|
78
|
-
}
|
|
79
|
-
const timeout = options.timeoutMs ? setTimeout(() => terminate(), options.timeoutMs) : undefined;
|
|
80
|
-
timeout?.unref();
|
|
81
|
-
armInactivityTimer();
|
|
82
|
-
child.on("close", (exitCode, signal) => {
|
|
83
|
-
options.signal?.removeEventListener("abort", abort);
|
|
84
|
-
clearInactivityTimer();
|
|
85
|
-
if (forceKillTimer) {
|
|
86
|
-
clearTimeout(forceKillTimer);
|
|
87
|
-
}
|
|
88
|
-
if (timeout) {
|
|
89
|
-
clearTimeout(timeout);
|
|
90
|
-
}
|
|
91
|
-
const result = {
|
|
92
|
-
stdout: stdout.text(),
|
|
93
|
-
stderr: stderr.text(),
|
|
94
|
-
exitCode: exitCode ?? (signal ? 128 : 1)
|
|
95
|
-
};
|
|
96
|
-
if (inactivityError) {
|
|
97
|
-
reject(inactivityError);
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
if (result.exitCode !== 0 && !options.allowFailure) {
|
|
101
|
-
const detail = result.stderr.trim() || result.stdout.trim();
|
|
102
|
-
reject(new Error(`${command} exited ${result.exitCode}${detail ? `: ${detail}` : ""}`));
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
resolve(result);
|
|
106
|
-
});
|
|
107
|
-
if (child.stdin && options.input !== undefined) {
|
|
108
|
-
child.stdin.end(options.input);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
class RollingOutput {
|
|
114
|
-
#limit = 8 * 1024 * 1024;
|
|
115
|
-
#chunks = [];
|
|
116
|
-
#size = 0;
|
|
117
|
-
#truncated = false;
|
|
118
|
-
push(chunk) {
|
|
119
|
-
if (chunk.byteLength >= this.#limit) {
|
|
120
|
-
this.#chunks.length = 0;
|
|
121
|
-
this.#chunks.push(chunk.subarray(chunk.byteLength - this.#limit));
|
|
122
|
-
this.#size = this.#limit;
|
|
123
|
-
this.#truncated = true;
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
this.#chunks.push(chunk);
|
|
127
|
-
this.#size += chunk.byteLength;
|
|
128
|
-
while (this.#size > this.#limit) {
|
|
129
|
-
const first = this.#chunks.shift();
|
|
130
|
-
if (!first) {
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
const overflow = this.#size - this.#limit;
|
|
134
|
-
if (first.byteLength > overflow) {
|
|
135
|
-
this.#chunks.unshift(first.subarray(overflow));
|
|
136
|
-
this.#size -= overflow;
|
|
137
|
-
} else {
|
|
138
|
-
this.#size -= first.byteLength;
|
|
139
|
-
}
|
|
140
|
-
this.#truncated = true;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
text() {
|
|
144
|
-
const value = Buffer.concat(this.#chunks, this.#size).toString("utf8");
|
|
145
|
-
return this.#truncated ? `[selfbench: earlier output truncated]
|
|
146
|
-
${value}` : value;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// src/repair.ts
|
|
151
|
-
function patchPaths(patch) {
|
|
152
|
-
const paths = new Set;
|
|
153
|
-
for (const line of patch.split(`
|
|
154
|
-
`)) {
|
|
155
|
-
const match = /^diff --git a\/(.+) b\/(.+)$/.exec(line);
|
|
156
|
-
if (match?.[2]) {
|
|
157
|
-
paths.add(match[2]);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
return [...paths].sort();
|
|
161
|
-
}
|
|
162
|
-
function assertRepairPaths(originalTestPatch, changedPaths) {
|
|
163
|
-
const allowed = new Set(patchPaths(originalTestPatch));
|
|
164
|
-
if (allowed.size === 0) {
|
|
165
|
-
throw new Error("original held-out test patch changes no files");
|
|
166
|
-
}
|
|
167
|
-
const outside = changedPaths.filter((path) => !allowed.has(path));
|
|
168
|
-
if (outside.length > 0) {
|
|
169
|
-
throw new Error(`repair changed files outside the held-out tests: ${outside.join(", ")}`);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
function repairPrompt(input) {
|
|
173
|
-
return `Repair the held-out tests for SelfBench task ${input.taskId}.
|
|
174
|
-
|
|
175
|
-
The repository is the exact base snapshot with the current held-out test patch already applied. You may edit only these existing test files:
|
|
176
|
-
|
|
177
|
-
${input.allowedPaths.map((path) => `- ${path}`).join(`
|
|
178
|
-
`)}
|
|
179
|
-
|
|
180
|
-
The authentic engineer request is:
|
|
181
|
-
|
|
182
|
-
<authentic_request>
|
|
183
|
-
${input.authenticRequest.trim()}
|
|
184
|
-
</authentic_request>
|
|
185
|
-
|
|
186
|
-
The independent coupling report is:
|
|
187
|
-
|
|
188
|
-
<coupling_report>
|
|
189
|
-
${input.couplingReport.trim()}
|
|
190
|
-
</coupling_report>
|
|
191
|
-
|
|
192
|
-
Rewrite the tests so they verify every material requested behavior through stable public boundaries without requiring the gold patch's exact internal names, helper structure, error prose, mock input shape, response presentation, or incidental implementation choices. Preserve meaningful negative, authorization, compatibility, and regression coverage. Do not edit application code, the request, or the gold patch. Do not delete assertions merely to silence the report. A coherent alternative implementation must be able to pass, while the unchanged base must still fail the fail-to-pass tests and the gold implementation must still pass.
|
|
193
|
-
|
|
194
|
-
The final working tree must retain a non-empty test patch relative to HEAD and every originally added fail-to-pass test must still have an equivalent behavioral test. Do not reset, revert, delete, or commit the test patch. If an exact public response field is the only stable seam, prefer asserting the underlying externally visible behavior through existing endpoints, persistence, or follow-up actions. If no rigorous uncoupled test is possible within the allowed files, leave the current tests in place and explain the blocker in your final message instead of removing coverage.
|
|
195
|
-
|
|
196
|
-
Inspect /work/task/solution/gold.patch only to understand the intended behavior and available seams, never to copy its private structure into assertions. Inspect /work/task/tests/test.sh for the verifier command. Run focused tests when feasible. Finish only after the working tree contains the repaired test files and no other changes.`;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// src/sandbox/programs/prepare-repair.ts
|
|
200
|
-
import { access, mkdir } from "node:fs/promises";
|
|
201
|
-
import { join } from "node:path";
|
|
202
|
-
async function prepareRepairTask(archivePath, workDirectory = "/work") {
|
|
203
|
-
const extractedDirectory = join(workDirectory, "task");
|
|
204
|
-
const repositoryDirectory = join(workDirectory, "repo");
|
|
205
|
-
await Promise.all([mkdir(extractedDirectory, { recursive: true }), mkdir(repositoryDirectory)]);
|
|
206
|
-
await runCommand("tar", ["-xzf", archivePath, "-C", extractedDirectory]);
|
|
207
|
-
const taskDirectory = await access(join(extractedDirectory, "instruction.md")).then(() => extractedDirectory, () => join(extractedDirectory, "harbor-task"));
|
|
208
|
-
await runCommand("tar", [
|
|
209
|
-
"-xzf",
|
|
210
|
-
join(taskDirectory, "tests/repo.tar.gz"),
|
|
211
|
-
"-C",
|
|
212
|
-
repositoryDirectory
|
|
213
|
-
]);
|
|
214
|
-
await runCommand("git", ["-C", repositoryDirectory, "init", "-q"]);
|
|
215
|
-
await runCommand("git", ["-C", repositoryDirectory, "config", "user.name", "SelfBench"]);
|
|
216
|
-
await runCommand("git", ["-C", repositoryDirectory, "config", "user.email", "selfbench@local"]);
|
|
217
|
-
await runCommand("git", ["-C", repositoryDirectory, "add", "-A"]);
|
|
218
|
-
await runCommand("git", ["-C", repositoryDirectory, "commit", "-qm", "base"]);
|
|
219
|
-
await runCommand("git", [
|
|
220
|
-
"-C",
|
|
221
|
-
repositoryDirectory,
|
|
222
|
-
"apply",
|
|
223
|
-
join(taskDirectory, "tests/test.patch")
|
|
224
|
-
]);
|
|
225
|
-
await runCommand("git", ["-C", repositoryDirectory, "add", "-N", "--all"]);
|
|
226
|
-
return { extractedDirectory, taskDirectory, repositoryDirectory };
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// src/sandbox/programs/repair.ts
|
|
230
|
-
var [archivePath, reviewPath, outputArchive, outputReport] = process.argv.slice(2);
|
|
231
|
-
if (!archivePath || !reviewPath || !outputArchive || !outputReport) {
|
|
232
|
-
throw new Error("usage: sandbox-repair TASK.tar.gz REVIEW.json OUTPUT.tar.gz OUTPUT-REPORT.json");
|
|
233
|
-
}
|
|
234
|
-
var { extractedDirectory, taskDirectory, repositoryDirectory } = await prepareRepairTask(archivePath);
|
|
235
|
-
var [instruction, originalPatch, review] = await Promise.all([
|
|
236
|
-
readFile(join2(taskDirectory, "instruction.md"), "utf8"),
|
|
237
|
-
readFile(join2(taskDirectory, "tests/test.patch"), "utf8"),
|
|
238
|
-
readFile(reviewPath, "utf8")
|
|
239
|
-
]);
|
|
240
|
-
var manifestPath = join2(taskDirectory, ".selfbench-manifest.json");
|
|
241
|
-
var manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
|
242
|
-
var taskId = typeof manifest.taskId === "string" ? manifest.taskId : "unknown-task";
|
|
243
|
-
var allowedPaths = patchPaths(originalPatch);
|
|
244
|
-
var codexAuth = process.env.SELFBENCH_CODEX_AUTH_JSON;
|
|
245
|
-
var apiKey = process.env.OPENAI_API_KEY;
|
|
246
|
-
if (!apiKey && !codexAuth) {
|
|
247
|
-
fail("OPENAI_API_KEY or SELFBENCH_CODEX_AUTH_JSON is required");
|
|
248
|
-
}
|
|
249
|
-
var codexHome = join2(homedir(), ".codex");
|
|
250
|
-
var authPath = join2(codexHome, "auth.json");
|
|
251
|
-
await mkdir2(codexHome, { recursive: true });
|
|
252
|
-
await writeFile(authPath, codexAuth ?? `${JSON.stringify({ OPENAI_API_KEY: apiKey })}
|
|
253
|
-
`);
|
|
254
|
-
await chmod(authPath, 384);
|
|
255
|
-
var promptPath = join2(tmpdir(), `selfbench-repair-${taskId}.md`);
|
|
256
|
-
await writeFile(promptPath, repairPrompt({
|
|
257
|
-
taskId,
|
|
258
|
-
authenticRequest: instruction,
|
|
259
|
-
couplingReport: review,
|
|
260
|
-
allowedPaths
|
|
261
|
-
}));
|
|
262
|
-
var codex = await runCommand("codex", [
|
|
263
|
-
"exec",
|
|
264
|
-
"--model",
|
|
265
|
-
process.env.SELFBENCH_REPAIR_MODEL ?? "gpt-5.6-sol",
|
|
266
|
-
"--dangerously-bypass-approvals-and-sandbox",
|
|
267
|
-
"--ephemeral",
|
|
268
|
-
"--ignore-user-config",
|
|
269
|
-
"--json",
|
|
270
|
-
"-C",
|
|
271
|
-
repositoryDirectory,
|
|
272
|
-
"-"
|
|
273
|
-
], {
|
|
274
|
-
allowFailure: true,
|
|
275
|
-
timeoutMs: 90 * 60 * 1000,
|
|
276
|
-
env: process.env,
|
|
277
|
-
input: await readFile(promptPath, "utf8"),
|
|
278
|
-
onOutput: (stream, chunk) => {
|
|
279
|
-
(stream === "stdout" ? process.stdout : process.stderr).write(chunk);
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
if (codex.exitCode !== 0) {
|
|
283
|
-
throw new Error(`Codex repair exited ${codex.exitCode}: ${codex.stderr.slice(-2000)}`);
|
|
284
|
-
}
|
|
285
|
-
var [tracked, untracked] = await Promise.all([
|
|
286
|
-
runCommand("git", ["-C", repositoryDirectory, "diff", "--name-only", "HEAD"]),
|
|
287
|
-
runCommand("git", ["-C", repositoryDirectory, "ls-files", "--others", "--exclude-standard"])
|
|
288
|
-
]);
|
|
289
|
-
var changedPaths = [...tracked.stdout.split(`
|
|
290
|
-
`), ...untracked.stdout.split(`
|
|
291
|
-
`)].filter(Boolean).sort();
|
|
292
|
-
assertRepairPaths(originalPatch, changedPaths);
|
|
293
|
-
var repaired = await runCommand("git", ["-C", repositoryDirectory, "diff", "--binary", "HEAD"]);
|
|
294
|
-
if (!repaired.stdout.startsWith("diff --git ")) {
|
|
295
|
-
throw new Error(`repair produced no held-out test patch; status=${JSON.stringify(changedPaths)}; Codex tail=${codex.stdout.slice(-4000)}`);
|
|
296
|
-
}
|
|
297
|
-
if (repaired.stdout === originalPatch) {
|
|
298
|
-
throw new Error("repair left the held-out test patch unchanged");
|
|
299
|
-
}
|
|
300
|
-
await writeFile(join2(taskDirectory, "tests/test.patch"), repaired.stdout);
|
|
301
|
-
await writeFile(manifestPath, `${JSON.stringify({
|
|
302
|
-
...manifest,
|
|
303
|
-
testPatchSha256: sha256(repaired.stdout),
|
|
304
|
-
repair: {
|
|
305
|
-
model: process.env.SELFBENCH_REPAIR_MODEL ?? "gpt-5.6-sol",
|
|
306
|
-
originalTestPatchSha256: sha256(originalPatch)
|
|
307
|
-
}
|
|
308
|
-
}, null, 2)}
|
|
309
|
-
`);
|
|
310
|
-
await runCommand("tar", ["-czf", outputArchive, "-C", extractedDirectory, "."]);
|
|
311
|
-
await writeFile(outputReport, `${JSON.stringify({
|
|
312
|
-
schemaVersion: 1,
|
|
313
|
-
taskId,
|
|
314
|
-
model: process.env.SELFBENCH_REPAIR_MODEL ?? "gpt-5.6-sol",
|
|
315
|
-
changedPaths,
|
|
316
|
-
originalTestPatchSha256: sha256(originalPatch),
|
|
317
|
-
repairedTestPatchSha256: sha256(repaired.stdout),
|
|
318
|
-
codexOutputTail: codex.stdout.slice(-4000)
|
|
319
|
-
}, null, 2)}
|
|
320
|
-
`);
|
|
321
|
-
function fail(message) {
|
|
322
|
-
throw new Error(message);
|
|
323
|
-
}
|