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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harbor.js","sourceRoot":"","sources":["../../../src/temporal/activities/harbor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAEL,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE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AG,QAAQ,YAAY,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;AAChH,CAAC;AACD,MAAM,UAAU,OAAO,CAAC,KAAc;IACpC,IACE,CAAC,QAAQ,CAAC,KAAK,CAAC;QAChB,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC;QAChC,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,EACxC,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC;AACvC,CAAC;AACD,MAAM,UAAU,SAAS,CAAC,KAAc;IACtC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5D,CAAC;AACD,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AACD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type CommandResult } from "../../process.js";
|
|
2
|
+
/** Harbor's default Modal app; image builds for its sandboxes log under it. */
|
|
3
|
+
export declare const HARBOR_MODAL_APP = "__harbor__";
|
|
4
|
+
export type CommandRunner = (command: string, args: readonly string[]) => Promise<Pick<CommandResult, "exitCode" | "stdout" | "stderr">>;
|
|
5
|
+
export declare function extractModalImageId(message: string): string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Best-effort Modal build log for an ImageBuildError. `modal image` cannot fetch build logs, so
|
|
8
|
+
* the recent logs of Harbor's Modal app are fetched and filtered around the image id. When that
|
|
9
|
+
* fails the report says so instead of carrying only the bare id.
|
|
10
|
+
*/
|
|
11
|
+
export declare function modalBuildLogTail(message: string, run?: CommandRunner): Promise<string | undefined>;
|
|
12
|
+
//# sourceMappingURL=modal-build-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-build-log.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/modal-build-log.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,kBAAkB,CAAC;AAElE,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAI7C,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,KACpB,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC;AAEpE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEvE;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,GAAG,GAAE,aAA6B,GACjC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAyB7B"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { executionEnvironment } from "../../execution-environment.js";
|
|
2
|
+
import { harborChildEnvironment } from "../../harbor-environment.js";
|
|
3
|
+
import { runCommand } from "../../process.js";
|
|
4
|
+
/** Harbor's default Modal app; image builds for its sandboxes log under it. */
|
|
5
|
+
export const HARBOR_MODAL_APP = "__harbor__";
|
|
6
|
+
const LOG_TAIL_BYTES = 4_000;
|
|
7
|
+
const LOG_ENTRIES = 400;
|
|
8
|
+
export function extractModalImageId(message) {
|
|
9
|
+
return /\bim-[A-Za-z0-9]+\b/.exec(message)?.[0];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Best-effort Modal build log for an ImageBuildError. `modal image` cannot fetch build logs, so
|
|
13
|
+
* the recent logs of Harbor's Modal app are fetched and filtered around the image id. When that
|
|
14
|
+
* fails the report says so instead of carrying only the bare id.
|
|
15
|
+
*/
|
|
16
|
+
export async function modalBuildLogTail(message, run = defaultRunner) {
|
|
17
|
+
const imageId = extractModalImageId(message);
|
|
18
|
+
if (!imageId) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
let result;
|
|
22
|
+
try {
|
|
23
|
+
result = await run("modal", ["app", "logs", HARBOR_MODAL_APP, "--tail", String(LOG_ENTRIES)]);
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
return unavailable(imageId, error instanceof Error ? error.message : String(error));
|
|
27
|
+
}
|
|
28
|
+
if (result.exitCode !== 0) {
|
|
29
|
+
return unavailable(imageId, result.stderr.trim() || `modal exited ${result.exitCode}`);
|
|
30
|
+
}
|
|
31
|
+
const lines = result.stdout.split("\n");
|
|
32
|
+
const around = lines.filter((line) => line.includes(imageId));
|
|
33
|
+
const selected = (around.length > 0 ? lines.slice(Math.max(0, lines.indexOf(around[0] ?? "") - 5)) : lines)
|
|
34
|
+
.join("\n")
|
|
35
|
+
.trim();
|
|
36
|
+
if (!selected) {
|
|
37
|
+
return unavailable(imageId, `no recent log entries in Modal app ${HARBOR_MODAL_APP}`);
|
|
38
|
+
}
|
|
39
|
+
return `Modal build log for ${imageId} (tail of \`modal app logs ${HARBOR_MODAL_APP}\`):\n${tail(selected)}`;
|
|
40
|
+
}
|
|
41
|
+
function unavailable(imageId, reason) {
|
|
42
|
+
return `Modal build log for ${imageId} could not be fetched (${tail(reason, 300)}); open the image in the Modal dashboard for the full build output.`;
|
|
43
|
+
}
|
|
44
|
+
function tail(value, maxBytes = LOG_TAIL_BYTES) {
|
|
45
|
+
const buffer = Buffer.from(value);
|
|
46
|
+
return buffer.length <= maxBytes
|
|
47
|
+
? value
|
|
48
|
+
: `[truncated ${buffer.length - maxBytes} bytes]\n${buffer.subarray(-maxBytes).toString("utf8")}`;
|
|
49
|
+
}
|
|
50
|
+
async function defaultRunner(command, args) {
|
|
51
|
+
return await runCommand(command, args, {
|
|
52
|
+
allowFailure: true,
|
|
53
|
+
env: harborChildEnvironment(executionEnvironment()),
|
|
54
|
+
timeoutMs: 60_000,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=modal-build-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-build-log.js","sourceRoot":"","sources":["../../../src/temporal/activities/modal-build-log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAsB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAElE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAC7C,MAAM,cAAc,GAAG,KAAK,CAAC;AAC7B,MAAM,WAAW,GAAG,GAAG,CAAC;AAOxB,MAAM,UAAU,mBAAmB,CAAC,OAAe;IACjD,OAAO,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAe,EACf,MAAqB,aAAa;IAElC,MAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,MAA0C,CAAC;IAC/C,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC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G,CAAC,qEAAqE,CAAC;AACxJ,CAAC;AAED,SAAS,IAAI,CAAC,KAAa,EAAE,QAAQ,GAAG,cAAc;IACpD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC,MAAM,IAAI,QAAQ;QAC9B,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,cAAc,MAAM,CAAC,MAAM,GAAG,QAAQ,YAAY,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;AACtG,CAAC;AAED,KAAK,UAAU,aAAa,CAC1B,OAAe,EACf,IAAuB;IAEvB,OAAO,MAAM,UAAU,CAAC,OAAO,EAAE,IAAI,EAAE;QACrC,YAAY,EAAE,IAAI;QAClB,GAAG,EAAE,sBAAsB,CAAC,oBAAoB,EAAE,CAAC;QACnD,SAAS,EAAE,MAAM;KAClB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Candidate, type RunRequest } from "../../contracts.js";
|
|
2
|
+
/** Round 1 prompt: the complete Harbor task (definition, environment contract, patches). */
|
|
3
|
+
export declare function authoringPrompt(run: RunRequest, candidate: Candidate, feedback?: string): string;
|
|
4
|
+
/** Prompt appended as the next user turn when an authoring session is resumed. */
|
|
5
|
+
export declare function authoringResumePrompt(round: number, renderedReport: string, feedback?: string): string;
|
|
6
|
+
//# sourceMappingURL=prompts-authoring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts-authoring.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/prompts-authoring.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAEd,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAE5B,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CA6EhG;AAED,kFAAkF;AAClF,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM,EACtB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAYR"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { AUTHOR_VERIFY_BUDGET, MAX_AUTHORING_ROUNDS, } from "../../contracts.js";
|
|
2
|
+
/** Round 1 prompt: the complete Harbor task (definition, environment contract, patches). */
|
|
3
|
+
export function authoringPrompt(run, candidate, feedback) {
|
|
4
|
+
return `Author exactly one SelfBench task for this assigned candidate. The initial ${candidate.difficulty} difficulty is only a heuristic; choose a lower tier when the actual implementation is smaller:
|
|
5
|
+
|
|
6
|
+
${JSON.stringify({
|
|
7
|
+
sourcePr: candidate.sourcePr,
|
|
8
|
+
sourceUrl: candidate.sourceUrl,
|
|
9
|
+
baseCommit: candidate.baseCommit,
|
|
10
|
+
completedCommit: candidate.completedCommit,
|
|
11
|
+
request: candidate.request,
|
|
12
|
+
}, null, 2)}
|
|
13
|
+
|
|
14
|
+
Use only this candidate. Do not discover alternatives and do not run Harbor. Read /work/provenance.json only to verify the supplied authentic request. Inspect the base and completed commits. Split the completed change into a non-test gold patch and a held-out test patch. Use the highest honest tier supported by the implementation and tests. Do not pad the change to reach a tier threshold. The initial estimate is ${candidate.difficulty}; downgrading it is expected when appropriate.${feedback
|
|
15
|
+
? `
|
|
16
|
+
|
|
17
|
+
# Read-only verifier suggestions
|
|
18
|
+
|
|
19
|
+
${feedback}
|
|
20
|
+
|
|
21
|
+
Address these suggestions in the deliverable, but do not add behavior beyond the authentic request.`
|
|
22
|
+
: ""}}
|
|
23
|
+
|
|
24
|
+
# Test reuse and evidence
|
|
25
|
+
|
|
26
|
+
Keep ownership of tests and the complete setup in this session; do not create a separate environment stage. First inspect tests added/changed by the PR and existing regression coverage. Reuse suitable public-behavior assertions; author only missing coverage. Record definition.testSelection with mode (reused, augmented, authored, or base-only), reused/added/excluded arrays identifying tests and reasons, and coverage explaining how tests cover the request. Existing tests still require fairness review. Do not invent test edits merely to produce a patch. For base-only mode, test.patch must be an empty file, reused must be nonempty and added empty; base tests remain visible to the solver.
|
|
27
|
+
|
|
28
|
+
When the runner supports JUnit XML, use definition.testResults = {format: "junit", failToPass: ["classname::name"], passToPass: [...]}. These are exact XML testcase identities, separate from command selectors. Configure testCommand to write a fresh report to "$SELFBENCH_JUNIT_REPORT" on every invocation, including failures, and install python3 in rootSetupCommand. JUnit mode requires every declared target to assertion-fail on the base and pass with the reference; skipped, missing, duplicate and errored results fail closed. If a missing public API makes collection fail, prefer a public-boundary assertion or explicitly retain command-level mode and explain the limitation in coverage. Never rewrite a runner failure into a fake passing report.
|
|
29
|
+
|
|
30
|
+
# Held-out tests
|
|
31
|
+
|
|
32
|
+
Held-out tests must verify public behavior through an existing API, command, persistence boundary, or extension seam. When the request is about an endpoint/provider contract, exercise that boundary instead of manually composing internal translators, context/option builders, or model factories. Do not import gold-specific private helpers/modules or assert exact internal SQL, query counts, schema/index names, object identity, telemetry layout, error wording, endpoint/response shapes, or UI copy/order unless the authentic request explicitly makes that artifact public. Assert requested semantic values rather than larger retained/raw payloads that happen to contain them, and preserve valid adjacent input content unless the request says to discard it. Cover every material behavior in the prompt, including central authorization, error, and UI states. A different correct implementation with different helpers, file boundaries, API presentation, and UI composition must be able to pass; reject the candidate when no stable public seam exists.
|
|
33
|
+
|
|
34
|
+
# Environment contract
|
|
35
|
+
|
|
36
|
+
Your submission carries the complete environment contract; there is no separate environment agent. Work only at the currently checked-out pinned base commit. Inspect the test paths and test command, then identify the closest repository-native CI job that runs them. Inspect relevant .github/workflows files, Dockerfiles, devcontainers, lockfiles, version files, package scripts, Makefiles, and compose files. Prefer an image already used by CI or the repository, followed by a devcontainer, then an explicit translation of CI setup. Do not infer from the latest remote branch.
|
|
37
|
+
|
|
38
|
+
The environment contract must be complete:
|
|
39
|
+
- baseImage must be a Linux image pinned with @sha256; use skopeo inspect docker://IMAGE to resolve registry digests rather than inventing one;
|
|
40
|
+
- rootSetupCommand runs as root under /bin/sh and must install the exact repository runtimes, package managers, native dependencies, and SelfBench substrate required by the chosen base image: bash, git, procps/pkill, runuser, tar, and useradd;
|
|
41
|
+
- setupCommand runs from the task workdir under bash and must perform the frozen dependency install plus required builds, code generation, fixtures, browser installation, or other CI setup;
|
|
42
|
+
- smokeCommand runs at runtime from the task workdir as the verifier user (HOME=/home/verifier) and must cheaply prove the runtime and service contract without depending on the hidden gold patch or new held-out tests. It must print what it checks; a silent failure returns nothing you can act on;
|
|
43
|
+
- environmentVariables must contain only non-secret literal values needed by tests. A secret-named variable (TOKEN, SECRET, API_KEY, PASSWORD, ...) is accepted only with a fixed placeholder literal such as "test" or "selfbench-local-secret"; values shaped like real key material or interpolating host variables are rejected;
|
|
44
|
+
- services must represent only services needed by the focused tests, use registry digests resolved with skopeo, provide health checks, and contain no external secrets; local throwaway service passwords are allowed only inside the service definition;
|
|
45
|
+
- evidence must cite repository-relative files that exist at this exact commit and explain what each established.
|
|
46
|
+
|
|
47
|
+
Never copy CI secrets, deployment steps, caches, artifact uploads, hosted runner credentials, or mutable image tags. Do not use Docker-in-Docker. Do not add fallback dependencies merely because a language ecosystem might need them: every runtime and system package must be justified by the selected CI/test path. If repository evidence is incomplete, use source "generated" but still cite the nearest manifests and scripts.
|
|
48
|
+
|
|
49
|
+
Use bash/read/grep/find to inspect and, when feasible, execute exploratory setup or focused smoke commands in this sandbox. These exploratory checks are evidence for reasoning only; the worker's compile, audit, build, smoke, nop, and oracle gates are authoritative.
|
|
50
|
+
|
|
51
|
+
# Deliverable
|
|
52
|
+
|
|
53
|
+
Your deliverable is the directory /work/task/ with exactly four files, written with read/write/bash and git diff:
|
|
54
|
+
- definition.json: the task definition (schemaVersion 2, difficulty matching the honest tier) including the environment contract; omit prompt or keep it identical to instruction.md;
|
|
55
|
+
- instruction.md: the standalone instruction the evaluated agent reads (it is authoritative for the prompt);
|
|
56
|
+
- test.patch: the held-out test patch (a Git patch starting with diff --git, LF line endings, final newline; produce it with git diff);
|
|
57
|
+
- gold.patch: the non-test reference implementation patch, same format.
|
|
58
|
+
Except for an explicitly empty base-only test.patch, both patches must apply cleanly to the base commit with git apply, and gold.patch must also apply on top of test.patch (the oracle order); verify proves this against a clean worktree before anything is built.
|
|
59
|
+
The verify and submit_task tools take no arguments; they read /work/task/ and report missing or malformed files as static-check errors naming the file. The trusted compiler renders task.toml, both Dockerfiles, the scripts, and the repository snapshot; never write those yourself.
|
|
60
|
+
|
|
61
|
+
# Submission and rounds
|
|
62
|
+
|
|
63
|
+
Call submit_task exactly once per round, normally after verify is green. If no verify calls remain, still submit your best deliverable: the worker verifies it itself, and a red result starts the next round with the report instead of ending the task. Never end a round without submitting when /work/task/ holds a deliverable you believe is correct. definition.json must use schemaVersion 2 and its honest difficulty tier. testCommand must contain the literal {tests} exactly once as an unquoted shell argument list, and every selected test path must be supplied only through that placeholder—never quote the whole placeholder, assign it to one scalar, or hard-code a fail-to-pass or pass-to-pass path elsewhere in the command. Use one repository-native test mode and bundler per command rather than chaining equivalent suites or bypassing repository wrappers with a generic runner. The prompt must not mention the PR, commits, patches, test names, or implementation. Inspect repository test scripts and CI only to select the correct test command. Do not move dependency installation, native builds, fixture generation, or browser installation into testCommand; the environment contract owns those.
|
|
64
|
+
|
|
65
|
+
When the change spans a backend contract and a frontend, the held-out tests must exercise the backend contract through its public boundary (API responses, computed fields, validation, query behaviour); frontend tests that mock that API prove nothing about the change and the verification agent rejects them. Pick frontend-only tests only for changes that are genuinely frontend-only.
|
|
66
|
+
|
|
67
|
+
Before submission, verify from repository scripts and the pinned diff that the selected test identifiers belong to one repository-native test command and form the required nop/oracle split: on the base snapshot plus held-out tests, failToPass must fail while passToPass succeeds; with the gold patch applied, both must pass deterministically. Do not invent a test command when no stable test seam exists. Default resources are 4 CPU, 8192 MB memory, 20480 MB storage; default timeouts are 900 setup, 2400 agent, 900 tests.
|
|
68
|
+
|
|
69
|
+
# Verify before you submit
|
|
70
|
+
|
|
71
|
+
Write the deliverable to /work/task/, then call verify (no arguments) before you submit. It runs the static check, then the worker renders task.toml, both Dockerfiles, and the scripts from your contract, audits the patches, builds the image, and runs smoke, nop, and oracle exactly as the harness does, and returns the report (this can take up to an hour; wait for it). Fix the red gates and call verify again; you have ${AUTHOR_VERIFY_BUDGET} verify calls in this session and each result states how many remain. The gate-to-field mapping in the skill tells you which field a red gate points at. Call submit_task (no arguments) once verify is green, with the deliverable files unchanged since that verify so the worker can reuse the report. When the budget is exhausted before a green report, submit anyway rather than explaining; the worker's own verification decides, and a failing submission continues into the next round with the report. The only reason not to submit is a failure you cannot fix within the rules (for example no stable test seam exists); then explain why in your final message. If verify itself errors on the worker, the call is not charged; retry it. If your sandbox dies mid-session you may be resumed in a fresh sandbox with the last report (at most ${MAX_AUTHORING_ROUNDS} rounds in total). Do not return prose after a tool call.
|
|
72
|
+
|
|
73
|
+
Pinned SelfBench version: ${run.version.selfbenchCommit}.`;
|
|
74
|
+
}
|
|
75
|
+
/** Prompt appended as the next user turn when an authoring session is resumed. */
|
|
76
|
+
export function authoringResumePrompt(round, renderedReport, feedback) {
|
|
77
|
+
return `Round ${round} of ${MAX_AUTHORING_ROUNDS}. ${feedback ? "The read-only reviewer requested revisions. Address its suggestions below; the mechanical report describes the latest tested draft, not necessarily a failed check." : "Your previous submission did not pass mechanical verification. Address the failures in the report."} This is a fresh sandbox: the repository was re-cloned at the pinned base commit, your earlier working-tree edits are gone, and only this conversation carries over. Read the report, rewrite the deliverable in /work/task/ (definition.json with the environment contract, instruction.md, test.patch, gold.patch), call verify until it is green (the result states how many verify calls remain), then call submit_task exactly once. Every rule from the original brief still applies; do not weaken tests or move setup into the test command merely to turn a gate green. If the failure cannot be fixed within those rules, do not submit and explain why in your final message.
|
|
78
|
+
|
|
79
|
+
${renderedReport.trim()}${feedback
|
|
80
|
+
? `
|
|
81
|
+
|
|
82
|
+
# Read-only verifier suggestions
|
|
83
|
+
|
|
84
|
+
${feedback}`
|
|
85
|
+
: ""}`;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=prompts-authoring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts-authoring.js","sourceRoot":"","sources":["../../../src/temporal/activities/prompts-authoring.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAEpB,oBAAoB,GAErB,MAAM,oBAAoB,CAAC;AAE5B,4FAA4F;AAC5F,MAAM,UAAU,eAAe,CAAC,GAAe,EAAE,SAAoB,EAAE,QAAiB;IACtF,OAAO,8EAA8E,SAAS,CAAC,UAAU;;EAEzG,IAAI,CAAC,SAAS,CACd;QACE,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,UAAU,EAAE,SAAS,CAAC,UAAU;QAChC,eAAe,EAAE,SAAS,CAAC,eAAe;QAC1C,OAAO,EAAE,SAAS,CAAC,OAAO;KAC3B,EACD,IAAI,EACJ,CAAC,CACF;;kaAEia,SAAS,CAAC,UAAU,iDAClb,QAAQ;QACN,CAAC,CAAC;;;;EAIN,QAAQ;;oGAE0F;QAC9F,CAAC,CAAC,EACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;saAiDoa,oBAAoB,k0BAAk0B,oBAAoB;;4BAEpvC,GAAG,CAAC,OAAO,CAAC,eAAe,GAAG,CAAC;AAC3D,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,qBAAqB,CACnC,KAAa,EACb,cAAsB,EACtB,QAAiB;IAEjB,OAAO,SAAS,KAAK,OAAO,oBAAoB,KAAK,QAAQ,CAAC,CAAC,CAAC,qKAAqK,CAAC,CAAC,CAAC,oGAAoG;;EAE5U,cAAc,CAAC,IAAI,EAAE,GACrB,QAAQ;QACN,CAAC,CAAC;;;;EAIJ,QAAQ,EAAE;QACR,CAAC,CAAC,EACN,EAAE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TaskDefinition, TaskEnvironment } from "../../contracts.js";
|
|
2
|
+
import type { CouplingEvidence } from "../../coupling.js";
|
|
3
|
+
export interface VerifierPromptInput {
|
|
4
|
+
readonly taskId: string;
|
|
5
|
+
readonly testSelection?: TaskDefinition["testSelection"];
|
|
6
|
+
readonly testResults?: TaskDefinition["testResults"];
|
|
7
|
+
readonly instruction: string;
|
|
8
|
+
readonly renderedReport: string;
|
|
9
|
+
readonly couplingEvidence: CouplingEvidence;
|
|
10
|
+
readonly environment: TaskEnvironment;
|
|
11
|
+
readonly testPatch: string;
|
|
12
|
+
readonly goldPatch: string;
|
|
13
|
+
readonly heldOutPaths: readonly string[];
|
|
14
|
+
}
|
|
15
|
+
/** Round 1 prompt for the independent verification agent. */
|
|
16
|
+
export declare function verifierPrompt(input: VerifierPromptInput): string;
|
|
17
|
+
//# sourceMappingURL=prompts-verifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts-verifier.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/prompts-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC;IACzD,QAAQ,CAAC,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IACrD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAED,6DAA6D;AAC7D,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CA+DjE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** Round 1 prompt for the independent verification agent. */
|
|
2
|
+
export function verifierPrompt(input) {
|
|
3
|
+
return `You are the independent SelfBench verification agent for task ${input.taskId}. You have not seen the authoring conversation. Judge whether this Harbor task is a fair, self-contained benchmark and either accept it or submit suggestions for the next authoring agent.
|
|
4
|
+
|
|
5
|
+
# Workspace
|
|
6
|
+
|
|
7
|
+
- /work/task/harbor-task is the compiled task: instruction.md, task.toml, environment/ (Dockerfile, root-setup.sh, setup.sh, smoke.sh, repo.tar.gz), tests/ (Dockerfile, test.patch, test.sh), solution/gold.patch. Read these rendered files; never edit them.
|
|
8
|
+
- /work/repo is the exact base snapshot with the held-out test patch applied as a Git working tree (HEAD is the base). It is read-only; do not edit it.
|
|
9
|
+
- The verification report, deterministic coupling evidence, environment contract, and both patches are below.
|
|
10
|
+
|
|
11
|
+
# Judge
|
|
12
|
+
|
|
13
|
+
Read definition.json for testSelection and testResults. Assess reused tests as critically as authored tests; base-only tests are visible to the solver. Check the selection record against the test files and request, including omitted coverage. Command-level results do not establish individual test transitions. JUnit mode fails closed on collection/runtime errors. Repeatability is two target runs in one environment, not clean-run determinism. Review reference dependency preinstallation and ensure setup does not implement the solution.
|
|
14
|
+
|
|
15
|
+
1. Instruction: it must preserve the human request without adding behavior inferred only from the implementation or tests, and must not leak PRs, commits, test names, or the solution.
|
|
16
|
+
2. Public behavior: held-out tests must exercise an existing public API, command, persistence boundary, or extension seam. They may not import gold-specific private helpers or prescribe exact internal SQL, query counts, private schemas, object identity, telemetry layout, incidental error wording, endpoint/response shapes, or UI copy/order unless the request explicitly makes that artifact public. A coherent implementation with different names, file boundaries, payload presentation, or internal structure must pass.
|
|
17
|
+
3. Coupling: for every exact endpoint path, response/request field, header, media type, helper/module, error string, schema/index name, UI copy/order, or other implementation artifact asserted by the held-out tests, cite either the authentic request text that requires it or deterministic evidence that the base repository already establishes it. A name merely appearing in the gold patch is not evidence. Resolve every artifact in couplingEvidence.blockers with a finding whose artifact exactly matches it. Use external_contract only when the request names a standard protocol that fixes the exact artifact independently of the gold patch, and cite that protocol. Use not_contract only for incidental test-language or framework syntax that is not an asserted product contract. Acceptance with a missing blocker finding is rejected automatically.
|
|
18
|
+
4. Environment: the contract must be deterministic and reproducible: digest-pinned images, frozen dependency installs, a smoke command that proves the runtime without the gold patch, no secrets, no host interpolation, no Docker-in-Docker, services only when the focused tests need them, and evidence that exists at the pinned commit.
|
|
19
|
+
5. Mechanical gates: accept only when the report is GREEN. The nop split must fail every fail-to-pass test on the base and pass every pass-to-pass test; the oracle must pass both deterministically.
|
|
20
|
+
|
|
21
|
+
# Decide
|
|
22
|
+
|
|
23
|
+
- accept_task: the task is fair and the report is GREEN. Findings must resolve every blocker; the counterexample must describe a plausible alternative correct implementation and whether the tests accept it.
|
|
24
|
+
- submit_suggestions: the task needs changes, but you may not edit anything. Submit a concise summary and actionable suggestions for the next authoring agent. Do not prescribe private implementation details; identify fairness, public-seam, coupling, environment, or test issues.
|
|
25
|
+
- reject_task: the task cannot be made fair within the authoring workflow; explain the blocker.
|
|
26
|
+
|
|
27
|
+
The verifier has no bash, edit, write, or verify tools. It must not modify the task, tests, definition, patches, or repository.
|
|
28
|
+
|
|
29
|
+
Use read, grep, find, and ls to inspect the existing test evidence; inspect solution/gold.patch only to understand the intended behavior and available seams, never to copy its private structure into assertions. Do not return prose after a tool call.
|
|
30
|
+
|
|
31
|
+
# Selection and evidence contract
|
|
32
|
+
|
|
33
|
+
${JSON.stringify({ testSelection: input.testSelection ?? null, testResults: input.testResults ?? "command-level", protectedTestPaths: input.heldOutPaths }, null, 2)}
|
|
34
|
+
|
|
35
|
+
# Authentic request (instruction.md)
|
|
36
|
+
|
|
37
|
+
${input.instruction.trim()}
|
|
38
|
+
|
|
39
|
+
# Verification report
|
|
40
|
+
|
|
41
|
+
${input.renderedReport.trim()}
|
|
42
|
+
|
|
43
|
+
# Deterministic coupling evidence
|
|
44
|
+
|
|
45
|
+
The exact-artifact scan compared the held-out tests with the authentic request, gold additions, and exact base snapshot. Every blocker is asserted by tests and introduced by gold, but absent verbatim from both request and base.
|
|
46
|
+
|
|
47
|
+
${JSON.stringify(input.couplingEvidence, null, 2)}
|
|
48
|
+
|
|
49
|
+
# Environment contract
|
|
50
|
+
|
|
51
|
+
${JSON.stringify(input.environment, null, 2)}
|
|
52
|
+
|
|
53
|
+
# Held-out test patch
|
|
54
|
+
|
|
55
|
+
\`\`\`diff
|
|
56
|
+
${input.testPatch}
|
|
57
|
+
\`\`\`
|
|
58
|
+
|
|
59
|
+
# Gold implementation patch
|
|
60
|
+
|
|
61
|
+
\`\`\`diff
|
|
62
|
+
${input.goldPatch}
|
|
63
|
+
\`\`\`
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=prompts-verifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts-verifier.js","sourceRoot":"","sources":["../../../src/temporal/activities/prompts-verifier.ts"],"names":[],"mappings":"AAgBA,6DAA6D;AAC7D,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,OAAO,iEAAiE,KAAK,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BpF,IAAI,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,IAAI,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,eAAe,EAAE,kBAAkB,EAAE,KAAK,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;;;;EAIlK,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE;;;;EAIxB,KAAK,CAAC,cAAc,CAAC,IAAI,EAAE;;;;;;EAM3B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;;;;EAI/C,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;EAK1C,KAAK,CAAC,SAAS;;;;;;EAMf,KAAK,CAAC,SAAS;;CAEhB,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ArtifactStore } from "../../artifacts.js";
|
|
2
|
+
import type { ArtifactRef, RunRequest } from "../../contracts.js";
|
|
3
|
+
export declare function collectRunProvenance(store: ArtifactStore, run: RunRequest): Promise<ArtifactRef>;
|
|
4
|
+
//# sourceMappingURL=provenance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/provenance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKlE,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,UAAU,GACd,OAAO,CAAC,WAAW,CAAC,CAqBtB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Context } from "@temporalio/activity";
|
|
2
|
+
import { ApplicationFailure } from "@temporalio/common";
|
|
3
|
+
import { collectGitHubPullRequestProvenance, combineRunProvenance } from "../../provenance.js";
|
|
4
|
+
import { githubToken } from "../../subscription-auth.js";
|
|
5
|
+
import { parseProvenance, withActivityHeartbeats } from "./runtime.js";
|
|
6
|
+
export async function collectRunProvenance(store, run) {
|
|
7
|
+
return await withActivityHeartbeats("collecting merged GitHub pull requests", async ({ signal }) => {
|
|
8
|
+
const [localBytes, token] = await Promise.all([store.get(run.provenance), githubToken()]);
|
|
9
|
+
const local = parseProvenance(localBytes);
|
|
10
|
+
const github = await collectGitHubPullRequestProvenance(run.repository.url, token, signal);
|
|
11
|
+
const messages = combineRunProvenance(run.repository.url, local, github);
|
|
12
|
+
if (messages.length === 0) {
|
|
13
|
+
throw ApplicationFailure.nonRetryable("no sanitized local-session or GitHub pull-request provenance was found", "NoProvenance");
|
|
14
|
+
}
|
|
15
|
+
return await store.put(`runs/${run.runId}/input/combined-provenance-attempt-${Context.current().info.attempt}.jsonl`, Buffer.from(`${messages.map((message) => JSON.stringify(message)).join("\n")}\n`), "application/x-ndjson");
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=provenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provenance.js","sourceRoot":"","sources":["../../../src/temporal/activities/provenance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAAE,kCAAkC,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,KAAoB,EACpB,GAAe;IAEf,OAAO,MAAM,sBAAsB,CACjC,wCAAwC,EACxC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QACnB,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;QAC1F,MAAM,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;QAC1C,MAAM,MAAM,GAAG,MAAM,kCAAkC,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAC3F,MAAM,QAAQ,GAAG,oBAAoB,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACzE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,kBAAkB,CAAC,YAAY,CACnC,wEAAwE,EACxE,cAAc,CACf,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,KAAK,CAAC,GAAG,CACpB,QAAQ,GAAG,CAAC,KAAK,sCAAsC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,QAAQ,EAC7F,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EACjF,sBAAsB,CACvB,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ArtifactStore } from "../../artifacts.js";
|
|
3
|
+
import { type Candidate, type ReplayMaterial, type ReplayRunRequest } from "../../contracts.js";
|
|
4
|
+
import { provenanceMessageSchema } from "../../provenance.js";
|
|
5
|
+
export interface ReplayServices {
|
|
6
|
+
/** Resolves the PR's completed commit the way discovery does (merge commit, else head). */
|
|
7
|
+
resolveCompletedCommit(repository: string, pullRequest: number): Promise<string>;
|
|
8
|
+
/** Current default-branch head, recorded as the run's repository commit. */
|
|
9
|
+
resolveRepositoryHead(repository: string): Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Rebuilds candidates from a source run's artifacts so previously failed candidates can be
|
|
13
|
+
* replayed through fresh authoring and verification without discovery.
|
|
14
|
+
*/
|
|
15
|
+
export declare function rebuildReplayCandidates(store: ArtifactStore, input: ReplayRunRequest, services?: ReplayServices): Promise<ReplayMaterial>;
|
|
16
|
+
export declare function rebuildReplayCandidate(store: ArtifactStore, sourceRunId: string, candidateId: string, services: ReplayServices): Promise<{
|
|
17
|
+
candidate: Candidate;
|
|
18
|
+
provenanceMessage: z.infer<typeof provenanceMessageSchema>;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=replay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/replay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EACL,KAAK,SAAS,EAGd,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAe9D,MAAM,WAAW,cAAc;IAC7B,2FAA2F;IAC3F,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjF,4EAA4E;IAC5E,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5D;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,gBAAgB,EACvB,QAAQ,GAAE,cAAsC,GAC/C,OAAO,CAAC,cAAc,CAAC,CA4BzB;AAED,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC;IAAE,SAAS,EAAE,SAAS,CAAC;IAAC,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;CAAE,CAAC,CAgD/F"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { ApplicationFailure } from "@temporalio/common";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { candidateSchema, commitSchema, } from "../../contracts.js";
|
|
4
|
+
import { githubRepository } from "../../github.js";
|
|
5
|
+
import { runCommand } from "../../process.js";
|
|
6
|
+
import { provenanceMessageSchema } from "../../provenance.js";
|
|
7
|
+
import { githubToken } from "../../subscription-auth.js";
|
|
8
|
+
import { safeHeartbeat } from "./runtime.js";
|
|
9
|
+
const MAX_DISCOVERY_ATTEMPTS = 5;
|
|
10
|
+
const storedProvenanceSchema = z.object({ source: provenanceMessageSchema });
|
|
11
|
+
const discoveryReportSchema = z.object({ candidates: z.array(candidateSchema) });
|
|
12
|
+
const storedDefinitionSchema = z.object({
|
|
13
|
+
difficulty: z.enum(["easy", "medium", "hard"]),
|
|
14
|
+
baseCommit: commitSchema,
|
|
15
|
+
sourcePr: z.number().int().positive(),
|
|
16
|
+
sourceUrl: z.string().url(),
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Rebuilds candidates from a source run's artifacts so previously failed candidates can be
|
|
20
|
+
* replayed through fresh authoring and verification without discovery.
|
|
21
|
+
*/
|
|
22
|
+
export async function rebuildReplayCandidates(store, input, services = defaultReplayServices) {
|
|
23
|
+
const candidates = [];
|
|
24
|
+
const messages = [];
|
|
25
|
+
for (const candidateId of input.replay.candidateIds) {
|
|
26
|
+
safeHeartbeat(`rebuilding ${candidateId} from ${input.replay.sourceRunId}`);
|
|
27
|
+
const rebuilt = await rebuildReplayCandidate(store, input.replay.sourceRunId, candidateId, services);
|
|
28
|
+
candidates.push(rebuilt.candidate);
|
|
29
|
+
messages.push(JSON.stringify(rebuilt.provenanceMessage));
|
|
30
|
+
}
|
|
31
|
+
const first = candidates[0];
|
|
32
|
+
if (!first) {
|
|
33
|
+
throw ApplicationFailure.nonRetryable("replay has no candidates", "InvalidReplay");
|
|
34
|
+
}
|
|
35
|
+
const repositoryUrl = repositoryUrlFromPullRequest(first.sourceUrl);
|
|
36
|
+
const [provenance, commit] = await Promise.all([
|
|
37
|
+
store.put(`runs/${input.runId}/provenance/replay.jsonl`, Buffer.from(`${messages.join("\n")}\n`), "application/x-ndjson"),
|
|
38
|
+
services.resolveRepositoryHead(githubRepository(repositoryUrl)),
|
|
39
|
+
]);
|
|
40
|
+
return { candidates, repository: { url: repositoryUrl, commit }, provenance };
|
|
41
|
+
}
|
|
42
|
+
export async function rebuildReplayCandidate(store, sourceRunId, candidateId, services) {
|
|
43
|
+
const provenanceKey = `runs/${sourceRunId}/provenance/${candidateId}.json`;
|
|
44
|
+
const provenanceBytes = await store.getByKey(provenanceKey);
|
|
45
|
+
if (!provenanceBytes) {
|
|
46
|
+
throw ApplicationFailure.nonRetryable(`replay candidate ${candidateId} has no provenance artifact at ${provenanceKey}`, "ReplayCandidateMissing");
|
|
47
|
+
}
|
|
48
|
+
const provenanceMessage = storedProvenanceSchema.parse(JSON.parse(Buffer.from(provenanceBytes).toString("utf8"))).source;
|
|
49
|
+
const provenance = await store.put(provenanceKey, provenanceBytes, "application/json");
|
|
50
|
+
const discovered = await findDiscoveredCandidate(store, sourceRunId, candidateId);
|
|
51
|
+
if (discovered) {
|
|
52
|
+
return {
|
|
53
|
+
candidate: candidateSchema.parse({
|
|
54
|
+
...discovered,
|
|
55
|
+
request: provenanceMessage.content,
|
|
56
|
+
provenance,
|
|
57
|
+
}),
|
|
58
|
+
provenanceMessage,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const definition = await findDefinition(store, sourceRunId, candidateId);
|
|
62
|
+
if (!definition) {
|
|
63
|
+
throw ApplicationFailure.nonRetryable(`replay candidate ${candidateId} has neither a discovery report nor an authored definition in ${sourceRunId}`, "ReplayCandidateMissing");
|
|
64
|
+
}
|
|
65
|
+
const completedCommit = await services.resolveCompletedCommit(githubRepository(repositoryUrlFromPullRequest(definition.sourceUrl)), definition.sourcePr);
|
|
66
|
+
return {
|
|
67
|
+
candidate: candidateSchema.parse({
|
|
68
|
+
candidateId,
|
|
69
|
+
difficulty: definition.difficulty,
|
|
70
|
+
sourcePr: definition.sourcePr,
|
|
71
|
+
sourceUrl: definition.sourceUrl,
|
|
72
|
+
baseCommit: definition.baseCommit.toLowerCase(),
|
|
73
|
+
completedCommit: completedCommit.toLowerCase(),
|
|
74
|
+
request: provenanceMessage.content,
|
|
75
|
+
provenance,
|
|
76
|
+
}),
|
|
77
|
+
provenanceMessage,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
async function findDiscoveredCandidate(store, sourceRunId, candidateId) {
|
|
81
|
+
const match = /^w(\d+)s(\d+)-/.exec(candidateId);
|
|
82
|
+
if (!match) {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
for (let attempt = 1; attempt <= MAX_DISCOVERY_ATTEMPTS; attempt += 1) {
|
|
86
|
+
const key = `runs/${sourceRunId}/discovery/wave-${match[1]}/shard-${match[2]}/attempt-${attempt}/report.json`;
|
|
87
|
+
const bytes = await store.getByKey(key);
|
|
88
|
+
if (!bytes) {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
const report = discoveryReportSchema.parse(JSON.parse(Buffer.from(bytes).toString("utf8")));
|
|
92
|
+
const found = report.candidates.find((candidate) => candidate.candidateId === candidateId);
|
|
93
|
+
if (found) {
|
|
94
|
+
return found;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
async function findDefinition(store, sourceRunId, candidateId) {
|
|
100
|
+
const prefix = `runs/${sourceRunId}/authoring/${candidateId}`;
|
|
101
|
+
for (const key of [`${prefix}/definition.json`, `${prefix}/round-1/definition.json`]) {
|
|
102
|
+
const bytes = await store.getByKey(key);
|
|
103
|
+
if (bytes) {
|
|
104
|
+
return storedDefinitionSchema.parse(JSON.parse(Buffer.from(bytes).toString("utf8")));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
function repositoryUrlFromPullRequest(sourceUrl) {
|
|
110
|
+
const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+\/?$/i.exec(sourceUrl);
|
|
111
|
+
if (!match?.[1] || !match[2]) {
|
|
112
|
+
throw ApplicationFailure.nonRetryable(`invalid pull request URL ${sourceUrl}`, "InvalidReplay");
|
|
113
|
+
}
|
|
114
|
+
return `https://github.com/${match[1]}/${match[2]}.git`;
|
|
115
|
+
}
|
|
116
|
+
const defaultReplayServices = {
|
|
117
|
+
async resolveCompletedCommit(repository, pullRequest) {
|
|
118
|
+
const result = await runCommand("gh", ["pr", "view", String(pullRequest), "--repo", repository, "--json", "mergeCommit,headRefOid"], { env: await githubEnvironment() });
|
|
119
|
+
const parsed = JSON.parse(result.stdout);
|
|
120
|
+
const commit = parsed.mergeCommit?.oid ?? parsed.headRefOid;
|
|
121
|
+
if (!commit) {
|
|
122
|
+
throw new Error(`pull request ${repository}#${pullRequest} has no merge or head commit`);
|
|
123
|
+
}
|
|
124
|
+
return commit;
|
|
125
|
+
},
|
|
126
|
+
async resolveRepositoryHead(repository) {
|
|
127
|
+
const result = await runCommand("gh", ["api", `repos/${repository}/commits/HEAD`, "--jq", ".sha"], { env: await githubEnvironment() });
|
|
128
|
+
return commitSchema.parse(result.stdout.trim());
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
async function githubEnvironment() {
|
|
132
|
+
const token = await githubToken();
|
|
133
|
+
return token ? { ...process.env, GH_TOKEN: token } : process.env;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=replay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay.js","sourceRoot":"","sources":["../../../src/temporal/activities/replay.ts"],"names":[],"mappings":"AA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,EAAE,GAAG,EAAE,MAAM,iBAAiB,EAAE,EAAE,CACnC,CAAC;QACF,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAGtC,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,GAAG,IAAI,MAAM,CAAC,UAAU,CAAC;QAC5D,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,gBAAgB,UAAU,IAAI,WAAW,8BAA8B,CAAC,CAAC;QAC3F,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,KAAK,CAAC,qBAAqB,CAAC,UAAU;QACpC,MAAM,MAAM,GAAG,MAAM,UAAU,CAC7B,IAAI,EACJ,CAAC,KAAK,EAAE,SAAS,UAAU,eAAe,EAAE,MAAM,EAAE,MAAM,CAAC,EAC3D,EAAE,GAAG,EAAE,MAAM,iBAAiB,EAAE,EAAE,CACnC,CAAC;QACF,OAAO,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC;CACF,CAAC;AAEF,KAAK,UAAU,iBAAiB;IAC9B,MAAM,KAAK,GAAG,MAAM,WAAW,EAAE,CAAC;IAClC,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ArtifactStore } from "../../artifacts.js";
|
|
2
|
+
/** Tool calls that end an agent session with a deliverable the worker must be able to collect. */
|
|
3
|
+
export declare const TERMINAL_TOOLS: readonly ["submit_task", "submit_fix", "accept_task", "submit_suggestions", "reject_task"];
|
|
4
|
+
/**
|
|
5
|
+
* The round wrapper's own exit status, written by its EXIT trap. Sandbox providers can lose a
|
|
6
|
+
* long-running command's stream after the script has finished (E2B reports a gRPC "terminated"
|
|
7
|
+
* or a stray exit code), so this file, not the provider's code, is what decides the round.
|
|
8
|
+
*/
|
|
9
|
+
export declare const WRAPPER_STATUS_PATH = "/work/wrapper-status";
|
|
10
|
+
export interface SandboxRoundResult {
|
|
11
|
+
readonly sandboxId: string;
|
|
12
|
+
readonly exitCode: number;
|
|
13
|
+
/** The exit code the sandbox provider reported, when the wrapper status file overrode it. */
|
|
14
|
+
readonly providerExitCode?: number | undefined;
|
|
15
|
+
readonly stdout: string;
|
|
16
|
+
readonly stderr: string;
|
|
17
|
+
readonly outputs: Readonly<Record<string, Uint8Array>>;
|
|
18
|
+
}
|
|
19
|
+
/** The wrapper's recorded exit status, when the sandbox delivered the status file. */
|
|
20
|
+
export declare function wrapperStatusFrom(outputs: Readonly<Record<string, Uint8Array>>): number | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Replaces the provider-reported exit code with the wrapper's own status when the sandbox
|
|
23
|
+
* delivered it. A hard timeout is the provider's verdict and stays authoritative: the wrapper's
|
|
24
|
+
* trap may have recorded the kill signal instead.
|
|
25
|
+
*/
|
|
26
|
+
export declare function reconcileWrapperStatus<T extends SandboxRoundResult>(result: T): T;
|
|
27
|
+
/** A delivered submission or verdict could not be collected; retrying the activity is correct. */
|
|
28
|
+
export declare class SandboxOutputError extends Error {
|
|
29
|
+
constructor(message: string);
|
|
30
|
+
}
|
|
31
|
+
export type RoundVerdict = {
|
|
32
|
+
readonly kind: "ok";
|
|
33
|
+
} | {
|
|
34
|
+
readonly kind: "rejected";
|
|
35
|
+
readonly reason: string;
|
|
36
|
+
} | {
|
|
37
|
+
readonly kind: "infrastructure";
|
|
38
|
+
readonly reason: string;
|
|
39
|
+
};
|
|
40
|
+
export interface RoundClassification {
|
|
41
|
+
readonly round: number;
|
|
42
|
+
readonly exitCode: number;
|
|
43
|
+
/** pi's own exit code as printed by the wrapper, when it differs from the command's. */
|
|
44
|
+
readonly piExitCode?: number | undefined;
|
|
45
|
+
/** Declared outputs that were not collected. */
|
|
46
|
+
readonly missing: readonly string[];
|
|
47
|
+
readonly sessionCollected: boolean;
|
|
48
|
+
readonly toolCalls: readonly string[];
|
|
49
|
+
readonly finalMessage?: string | undefined;
|
|
50
|
+
/** The provider error that ended the session, if pi's last assistant turn failed. */
|
|
51
|
+
readonly providerError?: string | undefined;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Why a round did not deliver, phrased so a human can act on it. A delivered terminal tool call
|
|
55
|
+
* whose output is missing, and a sandbox that died before any terminal call, are infrastructure
|
|
56
|
+
* problems for Temporal to retry, never candidate rejections.
|
|
57
|
+
*/
|
|
58
|
+
export declare function classifyRound(input: RoundClassification): RoundVerdict;
|
|
59
|
+
/** `[selfbench] pi exited with N` as printed by the round wrapper. */
|
|
60
|
+
export declare function piExitCodeFrom(stdout: string): number | undefined;
|
|
61
|
+
/** Archives exit code, collected outputs with sizes, and output tails next to the round. */
|
|
62
|
+
export declare function archiveSandboxResult(store: ArtifactStore, key: string, result: SandboxRoundResult, declaredOutputs: readonly string[]): Promise<string[]>;
|
|
63
|
+
//# sourceMappingURL=round-outcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round-outcome.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/round-outcome.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,kGAAkG;AAClG,eAAO,MAAM,cAAc,4FAMjB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAE1D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6FAA6F;IAC7F,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAA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