Fix tool install-state, inherit program description, declutter Tools cards
- Tool detail showed installed tools as 'Not installed': /deployments/{name}
populated 'installed' for path deployments but left 'active' null, and
ToolDetail keyed off 'active'. Now the endpoint sets active=installed for path,
and ToolDetail reads 'installed' directly (verified: on-PATH ⇒ True, else False).
- A deployment now inherits its program's description by default: copied at
creation (CLI create + API _save_deployment on new deployments) + a one-time
patchup of existing ones (29 deployments).
- Tools page cards no longer list deployments (ProgramCard showDeployments=false) —
the lens already scopes to the tool; the deployment list is a Programs-catalog thing.
This commit is contained in:
@@ -115,12 +115,13 @@ def run_create(args: argparse.Namespace) -> int:
|
||||
if kind == "tool":
|
||||
# A PATH-managed deployment: installed via `uv tool install`, no unit/route.
|
||||
config.deployments[name] = PathDeployment(
|
||||
id=name, manager="path", program=name
|
||||
id=name, manager="path", program=name, description=description
|
||||
)
|
||||
elif kind == "static":
|
||||
# A caddy-managed static deployment: no systemd unit, served from the build dir.
|
||||
config.deployments[name] = CaddyDeployment(
|
||||
id=name, manager="caddy", program=name, root=static_root or "dist"
|
||||
id=name, manager="caddy", program=name, root=static_root or "dist",
|
||||
description=description,
|
||||
)
|
||||
elif kind == "service":
|
||||
prefix = name.replace("-", "_").upper()
|
||||
@@ -128,6 +129,7 @@ def run_create(args: argparse.Namespace) -> int:
|
||||
id=name,
|
||||
manager="systemd",
|
||||
program=name,
|
||||
description=description,
|
||||
run=RunPython(launcher="python", program=name),
|
||||
expose=ExposeSpec(
|
||||
http=HttpExposeSpec(
|
||||
|
||||
Reference in New Issue
Block a user