Skip to content

Simple Worker

Takosumi runs plain OpenTofu Capsules. It registers a Git Source, creates a Capsule, records plan/apply/destroy Runs, and captures StateVersion / Output evidence. Module metadata comes from generic repository information such as Git URL, ref, commit, tag, module path, and well-known OpenTofu outputs.

Current Flow

  1. Create a Capsule from a Git URL/ref for the OpenTofu Capsule repo.
  2. Run a plan and review the resulting plan type Run, its proposed changes, and warnings.
  3. Apply the reviewed plan; the apply is recorded as an apply type Run against that plan type Run.
  4. A successful apply type Run writes a new StateVersion and Output; destroy is recorded as destroy_plan followed by destroy_apply.
  5. Connections hold external credential references, ProviderBindings resolve each provider (plus optional alias) to an explicit ProviderConnection provider connection, and policy resolves provider allowlists, state backend, and Cloudflare Container execution. OIDC clients, billing, domains, and the dashboard belong to the Takosumi Accounts plane.

Takos Boundary

Takos owns the user-facing workspace experience: chat, agents, memory, Workspaces, and app launcher. Git, storage, agent runtime, file handlers, UI surfaces, and MCP are exposed through Capsule Outputs and Takos runtime contracts. deploy/product-resources.json is the provider-neutral resource authority; deploy/opentofu/cloudflare and deploy/opentofu/takoform are peer adapters. Takosumi runs either ordinary OpenTofu module and records Capsule / Run / StateVersion / Output state, policy decisions, and audit evidence.

API Shape

json
{
  "spaceId": "space_1",
  "source": {
    "kind": "git",
    "url": "https://github.com/example/app.git",
    "ref": "main",
    "path": "."
  }
}

This creates a Capsule that points at the OpenTofu Capsule repo; subsequent typed Runs are recorded as Run entries. Takos product routes should call the Takosumi deploy control API or Takosumi account-plane install flow instead of exposing a separate product-local deployment surface.

References