project

package
v0.4.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package project resolves the active project for a tiny session. A tiny session works inside one project: it's chosen (or created) at start, and it scopes both surfaces — the MCP endpoint defaults to it, and the editor opens to it. Projects are just TinyProject CRs in the namespace.

Index

Constants

This section is empty.

Variables

View Source
var ErrRuntimeNotInstalled = errors.New("tiny runtime not installed on cluster (no TinyProject CRD)")

ErrRuntimeNotInstalled means the TinyProject CRD isn't served by the cluster — the runtime hasn't been provisioned. Distinct so callers can say "run `tiny up`" instead of treating a missing runtime as "zero projects".

Functions

func Ensure

func Ensure(ctx context.Context, cfg *rest.Config, namespace, name string) (string, error)

Ensure returns the project's resource name, creating the TinyProject CR when it doesn't exist yet — "select or create" in one call. Unlike the SDK's CreateProject (which generates a suffixed name), this uses the sanitized name verbatim so `--project demo` is a STABLE handle: the same command reuses the same project, and the name the user types is the name nodes are labeled with (so the MCP tools and the editor agree on it).

func List

func List(ctx context.Context, cfg *rest.Config, namespace string) ([]string, error)

List returns the project resource names in the namespace — the choices for a startup picker.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL