caller와 모델 조합을 반복 비교할 때 실행·격리·재개 근거가 흔들리지 않도록 manifest, workspace, lifecycle, append-only attempt 기반과 project-local 진입점을 함께 고정한다.
115 lines
2.9 KiB
Python
115 lines
2.9 KiB
Python
"""
|
|
agent_benchmark - Closed manifest loader, validator, and workspace preparation.
|
|
|
|
This package is standard-library-only and exposes stable immutable
|
|
manifest and workspace preparation APIs consuming only frozen inputs.
|
|
All returned objects are frozen dataclasses.
|
|
"""
|
|
|
|
from scripts.agent_benchmark.manifest import (
|
|
AssetMapping,
|
|
ExpectedBinding,
|
|
Fixture,
|
|
IopCell,
|
|
Manifest,
|
|
ManifestDigestError,
|
|
ManifestError,
|
|
ManifestPathError,
|
|
ManifestValidationError,
|
|
MatrixCell,
|
|
Timeout,
|
|
Viewport,
|
|
digest_manifest_and_resolved_inputs,
|
|
digest_workspace_inputs,
|
|
load_manifest,
|
|
validate_manifest_bytes,
|
|
)
|
|
from scripts.agent_benchmark.workspace import (
|
|
AttemptIdentity,
|
|
PreparedWorkspace,
|
|
TestbedError,
|
|
TestbedProvenance,
|
|
WorkspaceChecksumError,
|
|
WorkspaceError,
|
|
WorkspacePathError,
|
|
WorkspaceValidationError,
|
|
inspect_testbed_provenance,
|
|
prepare_workspace,
|
|
validate_attempt_identity,
|
|
)
|
|
from scripts.agent_benchmark.lifecycle import (
|
|
COMPLETION_EXIT_AFTER_IDLE,
|
|
COMPLETION_STOP_AFTER_IDLE,
|
|
SUBMISSION_ARGV_TASK,
|
|
SUBMISSION_STDIN_ONCE,
|
|
CancellationToken,
|
|
CaptureStream,
|
|
InvocationResult,
|
|
InvocationSpec,
|
|
LifecycleError,
|
|
LifecycleProtocolError,
|
|
LifecycleRecoveryError,
|
|
LifecycleValidationError,
|
|
SupervisorLocator,
|
|
TerminalOutcome,
|
|
env_pairs,
|
|
exact_value_redactor,
|
|
read_locator,
|
|
recover_invocation,
|
|
run_invocation,
|
|
)
|
|
from scripts.agent_benchmark.attempts import (
|
|
Attempt, AttemptError, AttemptStateError, CapabilityUnavailable, RunBusyError,
|
|
RunIdentity, RunPathError, RunStore, Slot, run_slots,
|
|
)
|
|
|
|
__all__ = [
|
|
"Manifest",
|
|
"Timeout",
|
|
"Viewport",
|
|
"AssetMapping",
|
|
"Fixture",
|
|
"IopCell",
|
|
"ExpectedBinding",
|
|
"MatrixCell",
|
|
"ManifestError",
|
|
"ManifestValidationError",
|
|
"ManifestPathError",
|
|
"ManifestDigestError",
|
|
"load_manifest",
|
|
"validate_manifest_bytes",
|
|
"digest_workspace_inputs",
|
|
"digest_manifest_and_resolved_inputs",
|
|
"AttemptIdentity",
|
|
"TestbedProvenance",
|
|
"PreparedWorkspace",
|
|
"WorkspaceError",
|
|
"WorkspaceValidationError",
|
|
"WorkspacePathError",
|
|
"WorkspaceChecksumError",
|
|
"TestbedError",
|
|
"prepare_workspace",
|
|
"inspect_testbed_provenance",
|
|
"validate_attempt_identity",
|
|
"SUBMISSION_ARGV_TASK",
|
|
"SUBMISSION_STDIN_ONCE",
|
|
"COMPLETION_EXIT_AFTER_IDLE",
|
|
"COMPLETION_STOP_AFTER_IDLE",
|
|
"InvocationSpec",
|
|
"InvocationResult",
|
|
"CaptureStream",
|
|
"SupervisorLocator",
|
|
"TerminalOutcome",
|
|
"CancellationToken",
|
|
"LifecycleError",
|
|
"LifecycleValidationError",
|
|
"LifecycleProtocolError",
|
|
"LifecycleRecoveryError",
|
|
"run_invocation",
|
|
"recover_invocation",
|
|
"read_locator",
|
|
"env_pairs",
|
|
"exact_value_redactor",
|
|
"Attempt", "AttemptError", "AttemptStateError", "CapabilityUnavailable",
|
|
"RunBusyError", "RunIdentity", "RunPathError", "RunStore", "Slot", "run_slots",
|
|
]
|