Skip to content

[FEA]: Let installed packages add custom execution backends (--env-mode) #214

Closed

Description

@rmalani-nv

Problem to solve

--env-mode is a closed list of Harbor-native backends plus local. Teams that run Tier 3 on infrastructure Harbor does not ship (for example an organization's internal sandbox service) have two options today: fork SkillEvaluator, or bypass it and call harbor run --env <import path> directly. A fork drifts from upstream. Calling Harbor directly loses SkillEvaluator's kwarg, credential, and runtime_env policy, plus doctor.

Harbor 0.24 already loads an environment class from an import path, and SkillEvaluator already uses that path for local, docker, and gke. What is missing is a supported way for another package to name a new mode.

Proposed approach

Add an entry-point group, skillevaluator.env_modes. The entry-point name is the mode name. Its value names an EnvModePlugin (or a function that returns one) that declares:

  • import_path: the Harbor BaseEnvironment subclass, passed to harbor run --env
  • environment_kwargs, required_environment_kwargs, reserved_environment_kwargs: what --ek accepts and requires
  • host_env_vars: backend settings forwarded to the Harbor process
  • agent_import_paths: optional per-agent Harbor agent classes, for example ones that use CLIs already present in the backend image
  • supports_docker_compose: whether Compose sidecar tasks can run
  • prerequisites: an optional fn(environment_kwargs) -> list[str] that doctor runs before Harbor's preflight()
  • install_hint

Plugin modes reuse the existing Harbor-native policy:

  • Runtime-policy and secret-bearing kwargs are rejected.
  • Only declared host variables reach Harbor, and a skill's runtime_env cannot set them.
  • A plugin may not forward agent credentials, judge settings, or process-control variables.

Built-in mode names cannot be replaced. Listing modes reads package metadata only, and the plugin module is imported only when its mode is selected. SKILLEVALUATOR_DISABLE_ENV_MODE_PLUGINS=1 ignores every installed plugin.

Alternatives considered:

  • An --environment-import-path flag. It is simpler, but SkillEvaluator would know nothing about the backend's kwargs or credentials, so its policy checks could not apply.
  • Adding each backend upstream. That does not work for internal or proprietary services.

Additional context

I have an implementation with tests and docs ready and will link the PR here.

Activity

  1. added
    enhancement
    on Oct 19, 2026
  2. rmalani-nv commented on Oct 19, 2026

    @rmalani-nv
    CollaboratorAuthor

    Implementation: #215

  3. changed the title [-][FEA]: Let installed packages register --env-mode plugins[/-] [+][FEA]: Let installed packages add custom execution backends (--env-mode)[/+] on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions