api-types

A set of rules describing Forklift’s Kubernetes resource definitions. These resources represent migration objects such as providers, plans, migrations, network maps, storage maps, hooks, and hosts.

In plain words
What is it for?
Use it when working on custom resource definitions, resource specifications, status updates, migration phases, or condition handling.
Why use it?
It gives developers the exact concepts, fields, statuses, and conditions needed to change or review Forklift API code correctly.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/kubev2v/forklift-console-plugin/api-types
Clone the repo
git clone --depth 1 https://github.com/kubev2v/forklift-console-plugin

Made for: Cursor.

Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,399 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00026 $0.04399
Opus 5 $0.00013 $0.02200
Sonnet 5 $0.00005 $0.00880
Haiku 4.5 $0.00003 $0.00440

Measured 2d ago against content hash 8ad352e73ac7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-types 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 2d 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/api-types.mdc · 400 lines

How it starts

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

API Types (CRD Definitions)

Analyzed from commit: a976d24b6 on 2026-05-04 Source paths: pkg/apis/forklift/v1beta1/, pkg/lib/condition/

Package Purpose

Package v1beta1 (forklift.konveyor.io/v1beta1) defines all Forklift CRDs. The SchemeGroupVersion is forklift.konveyor.io/v1beta1. All CRD types embed meta.TypeMeta + meta.ObjectMeta and follow the standard Spec/Status pattern. Every Status struct embeds libcnd.Conditions for the shared condition framework.


Key Types and Structs

Provider (provider.go)

Represents a source or target infrastructure connection.

ProviderSpec {
  Type           *ProviderType            // required, see ProviderType enum below
  URL            string                   // empty for "host" (local) OpenShift provider
  Secret         core.ObjectReference     // credentials secret
  Settings       map[string]string        // VDDK, SDK endpoint, vCenter, ESXi, target-az, etc.
}
ProviderStatus {
  Phase                 string             // free-form string (Ready, Staging, ValidationFailed, ConnectionFailed)
  Conditions            libcnd.Conditions  // embedded
  ObservedGeneration    int64
  Fingerprint           string
  Service               *core.ObjectReference
  SecretResourceVersion string
}

ProviderType enum: openshift, vsphere, ovirt, openstack, ova, ec2, hyperv, "" (Undefined)

Key methods on Provider:

  • Type() ProviderType — returns the provider type (or Undefined)
  • IsHost() bool — OpenShift provider with empty URL (local cluster)
  • IsRestrictedHost() bool — host provider outside the main Forklift namespace
  • RequiresConversion() bool — true for vsphere, ova, hyperv, ec2
  • SupportsPreserveStaticIps() bool — true for vsphere, hyperv
  • HasReconciled() bool — generation == observedGeneration
  • UseVddkAioOptimization() bool — reads settings["useVddkAioOptimization"]

Provider settings constants: VDDK, SDK (sdkEndpoint), VCenter, ESXI, UseVddkAioOptimization, VddkConfig, ESXiCloneMethod ("vib"|"ssh"), TargetAZ (target-az), TargetRegion (target-region)

Read the full file on GitHub · 400 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. 2d ago First seen · 400 lines · 26 tokens per session scan A 8ad352e73ac7

Subscribe to this mod's changes

api-types is a cursor rule published in the GitHub repository kubev2v/forklift-console-plugin (11 stars, last pushed 2d ago), licensed Apache-2.0. It adds 26 tokens to every session and 4,399 once invoked, about $0.0001 per session on Opus 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.