iop/agent-contract/inner/execution-runtime.md
toki 7b90b7e5af refactor(chronos): IOP 경계를 분리한다
Chronos 이전 완료 증거를 보존하면서 IOP에는 provider 실행 책임만 남기기 위해 검토된 마일스톤 변경을 하나의 승격 커밋으로 고정한다.
2026-08-02 19:29:30 +09:00

1.7 KiB

Provider Execution Runtime Contract

Contract metadata

  • id: iop.execution-runtime
  • boundary: inner
  • status: active
  • source evidence:
    • packages/go/execution/types.go
    • packages/go/execution/registry.go
    • packages/go/execution/emitter.go
    • packages/go/execution/failure.go
    • apps/node/internal/node/runtime_bridge.go

Scope

The execution package defines host-neutral provider primitives. It owns provider registration, lifecycle, execution events, typed failures, cancellation, token usage, and the three provider commands capabilities, transport_status, and ollama_api.

session_id is an opaque correlation value. It does not select, create, resume, or terminate a process. Repeated requests with the same value are independent executions. Cancellation targets a non-empty run_id only.

Requirements

  • Providers implement the narrow Provider interface and may expose optional lifecycle, command, or tunnel capabilities.
  • Event emitters preserve order and publish exactly one terminal event.
  • Registry lookup uses provider identity and returns typed failures for missing or unavailable providers.
  • Callers must reject commands outside the closed provider-command allowlist before provider lookup.
  • Token usage remains observation data attached to execution or tunnel results.

Prohibited ownership

The package must not own interactive shells, persistent processes, terminal emulation, working-directory mutation, resumable conversations, local quota probing, or arbitrary host command execution. It must not import application-internal packages or generated transport types.

Verification

  • go test -count=1 ./packages/go/execution
  • go test -race -count=1 ./packages/go/execution
  • go vet ./packages/go/execution