发布

  • [NA] [SDK] Local Runner Python SDK (#5433)

    frostbyte_neo 发布于 2026-03-05 16:28:38 +00:00

    • [NA] [SDK] Local runner SDK with PR review feedback
    • Add runner loop, job executor, dispatch, agents registry, and state management
    • Add connect/disconnect CLI commands
    • Add Fern-generated runner REST API clients (Python + TypeScript)
    • Address PR #5433 review feedback:
      • Convert runner_loop and job_executor to classes (RunnerLoop, JobExecutor)
      • Split execute() into _resolve_agent, _spawn_process, _wait_and_report
      • Add _SECONDS suffix to time constants
      • Simplify dispatch env var check (remove OPIK_RUNNER_DISPATCH)
      • Add OSError handling in agents_registry
      • Rename tests to test_WHAT__CASE__EXPECTED convention
      • Add uv.lock to .gitignore
      • Add missing assert in dispatch test

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • [NA] [SDK] Use dataclasses for agent and runner state instead of raw dicts

    Replace Dict[str, Dict[str, Any]] with AgentInfo/Param dataclasses and
    move save/load/clear into RunnerState as instance/class/static methods.

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • Restore log_entry.py needed by runner job_executor

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • Use LocalRunnerLogEntry instead of duplicate LogEntry

    Reuse the existing Fern-generated LocalRunnerLogEntry rather than
    maintaining a separate identical LogEntry type.

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • Add track(entrypoint=True) support for runner agent registration

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • Add runner entrypoint.py for agent self-registration and dispatch

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • dicts moving to strong types

    • one small bug

    • minor formatting changes


    Co-authored-by: Claude Opus 4.6 noreply@anthropic.com

    下载附件