provider-controller

provider-controller is a cursor rule for Cursor from kubev2v/forklift-console-plugin. It costs 14 tokens per session (3,921 once invoked), scanned A, original, Apache-2.0.

A controller for managing provider connections and their inventory collectors in the Forklift backend. A controller is a program that repeatedly checks resources and changes them until they match the desired state.

In plain words
What is it for?
Use it to manage Provider resources, secrets, OVA or Hyper-V provider servers, connection checks, inventory collectors, SSH readiness, and SMB CSI validation.
Why use it?
It standardizes provider setup, validation, connection tests, inventory creation, status phases, updates, and cleanup. This reduces manual coordination when credentials, provider servers, or collected inventory change.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to manage Provider resources, secrets, OVA or Hyper-V provider servers, connection checks, inventory collectors, SSH readiness, and SMB CSI validation.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/kubev2v/forklift-console-plugin/provider-controller
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/kubev2v/forklift-console-plugin

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for provider-controller

README.md
[![agentmods](https://agentmods.dev/badge/rules/kubev2v/forklift-console-plugin/provider-controller/github.svg)](https://agentmods.dev/rules/kubev2v/forklift-console-plugin/provider-controller)
Your own site
<a href="https://agentmods.dev/rules/kubev2v/forklift-console-plugin/provider-controller"><img src="https://agentmods.dev/badge/rules/kubev2v/forklift-console-plugin/provider-controller/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for provider-controller

Your own site · 80×15
<a href="https://agentmods.dev/rules/kubev2v/forklift-console-plugin/provider-controller"><img src="https://agentmods.dev/badge/rules/kubev2v/forklift-console-plugin/provider-controller.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,921 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.03921
Opus 5.5 $0.00006 $0.01568
Sonnet 5.5 $0.00003 $0.00784
Haiku 4.5 $0.00001 $0.00392

Measured 29d ago against content hash 04342f1600ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

provider-controller scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/backend/providers/provider-controller.mdc · 361 lines

How it starts

The opening of the file, as written. The whole thing — 361 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Provider Controller (Common)

Analyzed from commit: baf9c7bcc on 2026-09-17 Source paths: pkg/controller/provider/controller.go, pkg/controller/provider/validation.go, pkg/controller/provider/validation/, pkg/controller/provider/container/, pkg/controller/provider/web/

Source: forklift backend — runs inside the Inventory controller (forklift-controller with inventory role).


Package Purpose

The provider controller reconciles Provider CRs: validates credentials and settings, manages OVA/Hyper-V provider-server sidecars, builds per-provider inventory collectors (SQLite-backed), serves the inventory REST API, and publishes status.phase plus conditions the console reads. It is the central orchestrator for all source/target provider types.


Key Types and Structs

type Reconciler struct {
    base.Reconciler
    catalog   *Catalog          // thread-safe map for post-delete collector lookup
    container *libcontainer.Container
    web       *libweb.WebServer
}

type Catalog struct {
    mutex   sync.Mutex
    content map[reconcile.Request]*api.Provider
}

Phase constants (validation.go):

const (
    ValidationFailed = "ValidationFailed"
    ConnectionFailed = "ConnectionFailed"
    Ready            = "Ready"
    Staging          = "Staging"
)

Interfaces and Implementations

validation.Runner (breaks import cycle)

pkg/controller/provider/validation/ dispatches provider-type-specific checks via a Runner interface implemented by Reconciler:

Method Provider types
ValidateForkliftInstalled openshift (remote only)
ValidateVSpherePrivileges vsphere
ValidateSSHReadiness vsphere (when esxiCloneMethod=ssh)
ValidateSMBCSI hyperv
ValidateHyperVSettings hyperv

EC2 validation runs via pkg/provider/ec2/controller/validation.Validator directly (no Runner method).

libcontainer.Collector

Read the full file on GitHub · 361 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 29d ago Changed · +110 lines 04342f1600ff
  2. 1mo ago First seen · 251 lines · 14 tokens per session scan A 33f946d7b94a

Subscribe to this mod's changes

provider-controller is a cursor rule published in the GitHub repository kubev2v/forklift-console-plugin (11 stars, last pushed today), licensed Apache-2.0. It adds 14 tokens to every session and 3,921 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.