kind is a deployment property, not a program property
A program has no single kind — it HAS deployments, each with its own kind (a
program can be a tool AND a job, e.g. protonmail). Remove program-level kind:
- core: drop ProgramSpec.kind; CastleConfig.kind_of → deployments_of(name) →
[(deployment-name, kind)]; tools property derives from a tool deployment.
- api: ProgramSummary drops kind/services/jobs → deployments: [{name, kind}];
/programs?kind= filters by deployment-kind membership; a program's legacy
DeploymentSummary carries kind=None.
- cli: list/info show a program's set of deployment kinds; --kind filters by
membership.
Also: Services page now covers statics — /services returns kind in
{service, static} (both are exposed, URL-reachable 'services', caddy vs systemd),
and ServiceSummary gains kind + manager to distinguish them.
Suites: core 124, cli 25, castle-api 58.
This commit is contained in:
@@ -207,9 +207,9 @@ class ProgramSpec(BaseModel):
|
||||
|
||||
id: str = ""
|
||||
description: str | None = None
|
||||
# Derived at load time from how the program is deployed (its deployment's
|
||||
# kind: service|job|tool|static|reference) — never stored. See kind_for.
|
||||
kind: str | None = None
|
||||
# A program has NO kind of its own — kind is a *deployment* property. A program
|
||||
# is a catalog entry that has 0..N deployments, each with its own kind (see
|
||||
# kind_for and CastleConfig.deployments_of).
|
||||
|
||||
source: str | None = None
|
||||
stack: str | None = None
|
||||
|
||||
Reference in New Issue
Block a user