-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathherdr-plugin.toml
More file actions
104 lines (91 loc) · 4 KB
/
Copy pathherdr-plugin.toml
File metadata and controls
104 lines (91 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
id = "herdr.collie"
name = "Collie"
version = "0.32.0"
min_herdr_version = "0.7.0"
description = "Mobile web UI to monitor and reply to your agent herd, served over Tailscale"
platforms = ["linux", "macos"]
# This plugin is a thin launcher. The actual bridge runs as a systemd --user service so it
# outlives Herdr restarts (see ARCHITECTURE.md §3). The actions below shell out to
# scripts/collie-ctl.sh, which gets HERDR_SOCKET_PATH / HERDR_PLUGIN_CONFIG_DIR injected.
# Build the web UI at install time. Herdr runs [[build]] steps ONLY on `herdr plugin install`
# (GitHub) — NOT on `herdr plugin link` (local dev), which instead builds lazily on first `start`
# (collie-ctl.sh's ensure_build). Delegating to `collie-ctl.sh build` keeps a single build
# definition (version gate → cd web && bun install && bun run build) shared with the `update` action.
# Still needs Bun on PATH — building the frontend is the one unavoidable Bun step.
[[build]]
command = ["bash", "scripts/collie-ctl.sh", "build"]
platforms = ["linux", "macos"]
[[actions]]
id = "start"
title = "Start web bridge"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "start"]
[[actions]]
id = "stop"
title = "Stop web bridge"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "stop"]
[[actions]]
id = "restart"
title = "Restart web bridge"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "restart"]
# Full teardown: stops + disables the service, removes the systemd --user unit, and resets
# tailscale serve. Leaves the .env and the checkout (so `start` can bring it right back). See
# scripts/collie-ctl.sh → cmd_uninstall.
[[actions]]
id = "uninstall"
title = "Uninstall web bridge (remove service)"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "uninstall"]
# Link-mode plugins ARE their on-disk git checkout (Herdr has no native `plugin update`), so this
# action pulls + rebuilds + restarts in one step. See scripts/collie-ctl.sh → cmd_update.
[[actions]]
id = "update"
title = "Update plugin"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "update"]
# The consent for a MAJOR upgrade (ADR 0020). `update` stays inside the major this install is on, so
# crossing one is a separate, deliberate invocation — and it has to be invokable from HERE, because a
# plugin action runs with no TTY and the phone banner that announces the major has no terminal at
# all. The flag IS the consent; there is no prompt behind it. See scripts/collie-ctl.sh →
# update_checkout.
[[actions]]
id = "update-major"
title = "Update across a major version"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "update", "--major"]
[[actions]]
id = "url"
title = "Show bridge URL"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "url"]
[[actions]]
id = "status"
title = "Bridge status"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "status"]
[[actions]]
id = "version"
title = "Show version"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "version"]
# Turning push on is two steps that both used to happen OUTSIDE Herdr: generate a VAPID keypair with
# a tool you had to know about, then hand-edit a .env in a directory you had to go looking for. Both
# are actions now, because "which .env" is the part that actually goes wrong — `push-keys` writes to
# the same config dir every other verb resolves, and `push-test` proves the result without waiting
# for an agent to block. Restart between them; the keys are read at start.
#
# NOTE: on Herdr <0.8.0 a managed install invokes the action set cached at INSTALL time (ADR 0006),
# so these two appear only after the next `herdr plugin install`. The shell verbs work immediately
# either way.
[[actions]]
id = "push-keys"
title = "Generate push keys"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "push-keys"]
[[actions]]
id = "push-test"
title = "Send a test notification"
contexts = ["workspace"]
command = ["bash", "scripts/collie-ctl.sh", "push-test"]