@astrofoundry/pi-astro 0.40.37 → 0.40.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/inference.md +1 -1
- package/agents/proxmox.md +2 -2
- package/extensions/astro-discord/index.ts +2 -2
- package/extensions/astro-discord/security.test.ts +1 -0
- package/extensions/astro-discord/security.ts +8 -4
- package/package.json +1 -1
- package/skills/arcane/SKILL.md +1 -1
- package/skills/dns/SKILL.md +1 -0
- package/skills/edge/SKILL.md +3 -3
- package/skills/foreman/SKILL.md +1 -1
- package/skills/identity/SKILL.md +1 -1
- package/skills/inference/SKILL.md +3 -3
- package/skills/network/SKILL.md +2 -2
- package/skills/proxmox/SKILL.md +1 -1
- package/skills/raycast-script-creator/SKILL.md +4 -14
- package/skills/security/SKILL.md +2 -2
- package/specialists/AGENTS.md +8 -7
- package/specialists/README.md +14 -11
- package/specialists/edge/run.ts +2 -0
- package/specialists/inference/run.ts +1 -1
package/agents/inference.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: inference
|
|
3
|
-
description: Operates the AI serving hosts through the inference tool, covering
|
|
3
|
+
description: Operates the AI serving hosts through the inference tool, covering the MLX embedding and reranking servers on Nexus, Nexus's macOS update state, and the Europa health check. Use for inference health, restarts, and logs.
|
|
4
4
|
tools: read, inference, subagent
|
|
5
5
|
skills: inference
|
|
6
6
|
systemPromptMode: replace
|
package/agents/proxmox.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: proxmox
|
|
3
|
-
description: Operates Proxmox VE on Pulsar through the proxmox tool, covering guest inventory and status, start, shutdown, reboot, stop, snapshots, CPU, memory, and option changes, host status, tasks, and fixed reads inside guests. Use for VM and container questions and
|
|
3
|
+
description: Operates Proxmox VE on Pulsar (37) and SPACE-X (Mira) through the proxmox tool, covering guest inventory and status, start, shutdown, reboot, stop, snapshots, CPU, memory, and option changes, host status, host package upgrades and reboots, tasks, and fixed reads inside guests. Use for VM and container questions, lifecycle operations, and host updates.
|
|
4
4
|
tools: read, proxmox, subagent
|
|
5
5
|
skills: proxmox
|
|
6
6
|
systemPromptMode: replace
|
|
@@ -18,6 +18,6 @@ Rules:
|
|
|
18
18
|
- Read before you act: `guest <vmid>` before a power action, `snapshots <vmid>` before a snapshot change, `guest <vmid>` after `set` to confirm the value.
|
|
19
19
|
- `shutdown` is the normal way to stop a guest; `stop` is a power cut and only for a guest that ignores shutdown. Every action that interrupts a guest needs `--confirm`, which you pass only when the task asked for that exact action on that exact guest.
|
|
20
20
|
- Snapshots are for changes with a rollback plan: create one before a risky guest change when asked, name it for the change, and report the rollback command.
|
|
21
|
-
- Create, clone, destroy, disk changes, and host
|
|
21
|
+
- On a host, only `host-upgrade` (apt full-upgrade, owner approval; a new Proxmox VE major is held) and `host-reboot --confirm` (every guest on it restarts) change anything; run them only when the task asks for that exact host. Create, clone, destroy, disk changes, and host configuration are not available; describe the exact operator action and stop.
|
|
22
22
|
- Report facts from the JSON: status, uptime, memory, task exit status.
|
|
23
23
|
- Delegate through `subagent` only to another specialist (`astro.backup`, `astro.arcane`, `astro.identity`, `astro.network`, `astro.dns`, `astro.edge`, `astro.security`, `astro.inference`) and only for that specialist's own area.
|
|
@@ -5,7 +5,7 @@ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-a
|
|
|
5
5
|
import { loadConfig as loadSpecialists } from "../specialist-gate/config.ts";
|
|
6
6
|
import { APPROVAL_TOKEN_ENV, APPROVAL_URL_ENV } from "../specialist-gate/index.ts";
|
|
7
7
|
import { type AgentConfig, defaultDirs, discoverAgents, resolveSkills } from "../astro-subagents/agents.ts";
|
|
8
|
-
import { AGENT_ENV, type ChildSession, type DispatchDefaults, type RunResult, childRemaining, currentDepth, finalOutput, isFailed, runAgent } from "../astro-subagents/child.ts";
|
|
8
|
+
import { AGENT_ENV, type ChildSession, type DispatchDefaults, type RunResult, childRemaining, currentDepth, finalOutput, isFailed, resultOutput, runAgent } from "../astro-subagents/child.ts";
|
|
9
9
|
import { pruneSessions, sessionDirFor } from "../astro-subagents/sessions.ts";
|
|
10
10
|
import { ApprovalServer, type Ticket } from "./approvals.ts";
|
|
11
11
|
import { chunkMessage } from "./chunk.ts";
|
|
@@ -942,7 +942,7 @@ class Bridge {
|
|
|
942
942
|
env: { [ACTIVATION_ENV]: "0" },
|
|
943
943
|
});
|
|
944
944
|
const verdict = isFailed(result) ? null : parseVerdict(finalOutput(result.messages));
|
|
945
|
-
log(`release review: ${subject}: ${verdict?.verdict ??
|
|
945
|
+
log(`release review: ${subject}: ${verdict?.verdict ?? `no answer (${isFailed(result) ? "failed" : "unparsed"}: ${resultOutput(result).replace(/\s+/g, " ").slice(0, 300)})`}`);
|
|
946
946
|
return verdict ?? { verdict: null, reason: "the review gave no usable answer; read the notes before updating" };
|
|
947
947
|
} catch (err) {
|
|
948
948
|
return { verdict: null, reason: `the review failed: ${err instanceof Error ? err.message.slice(0, 120) : String(err)}` };
|
|
@@ -602,6 +602,7 @@ describe("weekly report", () => {
|
|
|
602
602
|
{ vmid: "101", name: "101", last: 5 },
|
|
603
603
|
]);
|
|
604
604
|
expect(backupGuests({})).toBeNull();
|
|
605
|
+
expect(backupGuests([{ vmid: 100, ctime: 20, notes: "arcane" }, { vmid: 101, ctime: 5, notes: "hermes" }, { vmid: 101, ctime: 9, notes: "hermes", protected: 1 }])).toEqual([{ vmid: "100", name: "arcane", last: 20 }]);
|
|
605
606
|
expect(resticStatus("Result=success\nExecMainStartTimestamp=Sun 2026-10-18 04:00:24 CEST\n")).toEqual({ result: "success", at: "18 Oct 04:00" });
|
|
606
607
|
expect(resticStatus("nothing")).toBeNull();
|
|
607
608
|
expect(backupLine(null, 0, TZ)).toBe("Backups · the check failed");
|
|
@@ -834,15 +834,19 @@ export interface WeeklyData {
|
|
|
834
834
|
/** `vzdump-archives`: the newest archive per guest, by `ctime` (seconds). */
|
|
835
835
|
export function backupGuests(value: unknown): BackupFacts["guests"] | null {
|
|
836
836
|
if (!Array.isArray(value)) return null;
|
|
837
|
-
const latest = new Map<string, { vmid: string; name: string; last: number }>();
|
|
838
|
-
for (const a of value as { vmid?: unknown; ctime?: unknown; notes?: unknown }[]) {
|
|
837
|
+
const latest = new Map<string, { vmid: string; name: string; last: number; kept: boolean }>();
|
|
838
|
+
for (const a of value as { vmid?: unknown; ctime?: unknown; notes?: unknown; protected?: unknown }[]) {
|
|
839
839
|
if ((typeof a.vmid !== "number" && typeof a.vmid !== "string") || typeof a.ctime !== "number") continue;
|
|
840
840
|
const vmid = String(a.vmid);
|
|
841
841
|
const name = typeof a.notes === "string" && a.notes.length > 0 ? a.notes.split("\n")[0].slice(0, 40) : vmid;
|
|
842
842
|
const seen = latest.get(vmid);
|
|
843
|
-
if (!seen || a.ctime > seen.last) latest.set(vmid, { vmid, name, last: a.ctime });
|
|
843
|
+
if (!seen || a.ctime > seen.last) latest.set(vmid, { vmid, name, last: a.ctime, kept: a.protected === 1 || a.protected === true });
|
|
844
844
|
}
|
|
845
|
-
|
|
845
|
+
// A retired guest's newest archive is protected as its final backup; it is not a missed backup.
|
|
846
|
+
return [...latest.values()]
|
|
847
|
+
.filter((g) => !g.kept)
|
|
848
|
+
.map(({ vmid, name, last }) => ({ vmid, name, last }))
|
|
849
|
+
.sort((x, y) => x.vmid.localeCompare(y.vmid));
|
|
846
850
|
}
|
|
847
851
|
|
|
848
852
|
/** `restic-check-status`: systemd's `Result=` and the start of the last run, as printed (local time). */
|
package/package.json
CHANGED
package/skills/arcane/SKILL.md
CHANGED
|
@@ -38,7 +38,7 @@ The output is JSON with `counts`, `rows`, and `table`. Answer with the `table` f
|
|
|
38
38
|
- A note "major version change" or "newer major ... available" means the update crosses a major version. Read its release notes yourself before asking anything (next section).
|
|
39
39
|
- Private images (the registry refuses anonymous access, such as our own Grimoire builds) are left out of the table and the counts; the summary line counts them and `privateImages` lists them. Mention them only when the caller asks.
|
|
40
40
|
|
|
41
|
-
Messages that start with "Arcane Daily Report:" are the bridge's scheduled report, built from `update-report`
|
|
41
|
+
Messages that start with "Arcane Daily Report:" are the bridge's scheduled report, built from `update-report` in the morning run without you: one section per stack with updates and a release-notes verdict on every pending update. Stacks without a major version and without notes that need attention (including an Arcane manager release) are updated by the bridge right after the post, without you, and checked again five minutes later; a stack that fails then is rolled back where possible and handed to `astro.foreman`. A major whose notes say nothing relevant gets an Update button that owners press, which runs `stack-update` without you; anything else gets Upgrade carefully (next sections). When the caller replies to one, its list is the context ("update these", "why is this a new build"); run `update-report` again only when the caller wants fresh data.
|
|
42
42
|
|
|
43
43
|
## Applying updates
|
|
44
44
|
|
package/skills/dns/SKILL.md
CHANGED
|
@@ -18,6 +18,7 @@ The internal resolvers form one Technitium cluster, `dns.home.arpa`: the Primary
|
|
|
18
18
|
| `stats [LastHour\|LastDay\|LastWeek\|LastMonth\|LastYear]` | dashboard counters |
|
|
19
19
|
| `cluster-state` | cluster domain, nodes with id, type, state, and last seen, and the server's addresses |
|
|
20
20
|
| `settings` | all server settings; secrets are redacted |
|
|
21
|
+
| `check-update` (primary) | whether a newer Technitium version exists |
|
|
21
22
|
| `zone-create <zone>` (primary) | Primary zone in the cluster catalog |
|
|
22
23
|
| `zone-catalog <zone>` (primary) | make an existing Primary zone a member of the cluster catalog |
|
|
23
24
|
| `zone-delete <zone>` (primary) | deletes the zone and every record |
|
package/skills/edge/SKILL.md
CHANGED
|
@@ -21,7 +21,7 @@ HTTP status of the public routes of services on the Arcane VM, from Cortex throu
|
|
|
21
21
|
|---|---|
|
|
22
22
|
| `status` | unit states (nginx, wg-quick@wg0, crowdsec-firewall-bouncer, wazuh-agent, rsyslog), WireGuard handshake age, pending reboot, kernel, OS release, uptime |
|
|
23
23
|
| `nginx-conf` | installed `/etc/nginx/nginx.conf` |
|
|
24
|
-
| `nginx-test` | `nginx -t` |
|
|
24
|
+
| `nginx-test` | `nginx -t` and its report (printed since 0.40.38; nginx writes it to stderr) |
|
|
25
25
|
| `journal <unit> <since>` | units above plus `unattended-upgrades`, `ssh`; e.g. `journal nginx '1 hour ago'` |
|
|
26
26
|
| `wg` | `wg show wg0`: peers, endpoints, handshakes, transfer |
|
|
27
27
|
| `bouncer` | bouncer unit status and the nftables set of blocked addresses |
|
|
@@ -34,7 +34,7 @@ HTTP status of the public routes of services on the Arcane VM, from Cortex throu
|
|
|
34
34
|
|
|
35
35
|
## `git <command>` (homelab repository)
|
|
36
36
|
|
|
37
|
-
`status`, `pull`, `ls [dir]`, `show <path>`, `diff`, `log [n]`, `write <path> <content>`, `commit <message>`, `push`. Writes are limited to `00-frontdoor-vps/`. The checkout is the specialist's own clone; run `git pull` before you read or edit.
|
|
37
|
+
`status`, `pull`, `ls [dir]`, `show <path>`, `diff`, `log [n]`, `write <path> <content>`, `commit <message>`, `push`, `key`. Writes are limited to `00-frontdoor-vps/`. The checkout is the specialist's own clone; run `git pull` before you read or edit.
|
|
38
38
|
|
|
39
39
|
## Adding a public hostname
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ Removing a hostname is the same with a removed line; check first that no public
|
|
|
48
48
|
|
|
49
49
|
## Vulnerability on the VPS
|
|
50
50
|
|
|
51
|
-
Wazuh reports a CVE against a package (the security specialist passes `package`, installed `version`, and `condition`, the fixed version). The VPS patches itself: unattended-upgrades installs Debian
|
|
51
|
+
Wazuh reports a CVE against a package (the security specialist passes `package`, installed `version`, and `condition`, the fixed version). The VPS patches itself: unattended-upgrades installs Debian, Debian-Security, and Google guest-agent updates once a day and reboots at 02:30 UTC when a package needs it. It does not take `trixie-updates` or Google's cloud-sdk repository, so packages from those (such as `tzdata` and `google-cloud-cli`) wait for the operator. Answer which of three states applies:
|
|
52
52
|
|
|
53
53
|
1. `package <name>`, then `changelog <name>`: if the installed version comes from the security origin and its changelog entry names the CVE, it is patched; say by which upload and, from `auto-upgrades` or the dpkg log, when. Wazuh may keep flagging the new version until its feed learns the fixed version; that is feed lag, not an open hole.
|
|
54
54
|
2. Otherwise, if the candidate's changelog names the CVE, it is scheduled: `auto-upgrades` shows when `apt-daily-upgrade.timer` runs next. Say so with the time.
|
package/skills/foreman/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: How the foreman diagnoses a failed unattended update, which special
|
|
|
5
5
|
|
|
6
6
|
# Foreman
|
|
7
7
|
|
|
8
|
-
The Discord bridge applies updates without a model: Arcane stacks (`stack-update`), the Arcane manager (`manager-upgrade`), and
|
|
8
|
+
The Discord bridge applies updates without a model: Arcane stacks (`stack-update`), the Arcane manager (`manager-upgrade`), Cortex tools, the Proxmox hosts' packages, and one Technitium node per morning. It checks the Arcane stacks and the manager again five minutes later. When that check fails, it rolls back where it can (`stack-rollback` for a Compose change; a pull of a floating tag cannot be undone; for the manager the message names `manager-rollback <stamp>`), posts the failure with a mention, opens a thread, and gives you the task there. Other failed updates are posted with a mention and do not start you. The task states what changed, when, what failed, and what was rolled back.
|
|
9
9
|
|
|
10
10
|
## Where the evidence is
|
|
11
11
|
|
package/skills/identity/SKILL.md
CHANGED
|
@@ -38,7 +38,7 @@ Fixed operations on VM 104 through a forced-command SSH key. No other command re
|
|
|
38
38
|
|
|
39
39
|
## `git <command>` (homelab repository)
|
|
40
40
|
|
|
41
|
-
`status`, `pull`, `ls [dir]`, `show <path>`, `diff`, `log [n]`, `write <path> <content>`, `commit <message>`, `push`. Writes are limited to `02-pulsar-proxmox/dmz/`. The checkout is the specialist's own clone; `git pull` before reading or editing.
|
|
41
|
+
`status`, `pull`, `ls [dir]`, `show <path>`, `diff`, `log [n]`, `write <path> <content>`, `commit <message>`, `push`, `key`. Writes are limited to `02-pulsar-proxmox/dmz/`. The checkout is the specialist's own clone; `git pull` before reading or editing.
|
|
42
42
|
|
|
43
43
|
## Pomerium route changes
|
|
44
44
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: inference
|
|
3
|
-
description: How the inference specialist operates
|
|
3
|
+
description: How the inference specialist operates the MLX embedding and reranking servers on Nexus and the Europa health check through the inference tool.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Inference specialist
|
|
7
7
|
|
|
8
|
-
Two hosts serve AI workloads. Nexus (Mac Studio, `10.0.40.38`, user `nexus`) runs two llama
|
|
8
|
+
Two hosts serve AI workloads. Nexus (Mac Studio, `10.0.40.38`, user `nexus`) runs two MLX servers as LaunchAgents that keep their legacy llama labels: `com.nexus.llama-embed` (Qwen3-Embedding-8B, port 8081, `/v1/embeddings`) and `com.nexus.llama-rerank` (Qwen3-Reranker-4B, port 8082, `/v1/rerank`); Pomerium publishes them as `embed.37pla.net` and `rerank.37pla.net`. llama.cpp was removed on 2026-09-26. Europa (`10.0.60.5`, Windows, RTX 5090) runs an on-demand embedding server on 8081 and is off most of the time by design. `["--help"]` lists every command.
|
|
9
9
|
|
|
10
10
|
## Nexus
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ Two hosts serve AI workloads. Nexus (Mac Studio, `10.0.40.38`, user `nexus`) run
|
|
|
17
17
|
| `nexus-stop <embed|rerank> --confirm` | unload the service |
|
|
18
18
|
| `nexus-log <embed|rerank> <lines>` | tail of `~/llama-<service>.log` |
|
|
19
19
|
| `nexus-disk` | free space |
|
|
20
|
-
| `macos-updates` | installed macOS version and Software Update's offers
|
|
20
|
+
| `macos-updates` | installed macOS version and Software Update's offers. Automatic macOS installs are turned on, but Nexus does not install on its own (26.5.2 on 2026-11-01, 26.7.2 offered); the morning run flags it two minors behind, and installing a macOS update needs the owner |
|
|
21
21
|
|
|
22
22
|
A model load after restart takes up to a minute; `health=503` during that time is loading, not failure.
|
|
23
23
|
|
package/skills/network/SKILL.md
CHANGED
|
@@ -78,7 +78,7 @@ Both consoles run Network `10.6.109`. The console serves no `openapi.json` (404)
|
|
|
78
78
|
|
|
79
79
|
The official API has no endpoint for these: Site Magic (read it with `unifi cloud`), NAT, switch port profiles and per-port settings (only power cycle), device settings (name, LEDs, uplink, management VLAN), client fixed IPs and names, port forwarding, static and traffic routes, VPN server and Teleport settings, admins, and console settings.
|
|
80
80
|
|
|
81
|
-
The cloud connector forwards any path under `/proxy/` of a console, and the account key `UNIFI_API_KEY` is accepted on the Network application's own paths: `unifi <site> nat` proves it for `/proxy/network/v2/api/site/default/nat` (2026-10-31). So "the official API lacks it" is not "impossible": before reporting a change as UI only, find the application path that the UniFi UI uses for it and add a narrow wrapper command, as `nat` was added.
|
|
81
|
+
The cloud connector forwards any path under `/proxy/` of a console, and the account key `UNIFI_API_KEY` is accepted on the Network application's own paths: `unifi <site> nat` proves it for `/proxy/network/v2/api/site/default/nat` (2026-10-31). So "the official API lacks it" is not "impossible": before reporting a change as UI only, find the application path that the UniFi UI uses for it and add a narrow wrapper command, as `nat` was added. Wired today: `nat` and `nat-write` (NAT rules), `device-network` (a device's management network and address), `client-fixed-ip` (DHCP reservations), `syslog` (the console's activity log export), and `app-policy-delete` (policies without an official id); the sections below describe them. The other items above stay owner tasks until a command exists. The local console keys were not tested on application paths. Never drive a browser for these changes.
|
|
82
82
|
|
|
83
83
|
Behavior learned on the live consoles:
|
|
84
84
|
|
|
@@ -156,4 +156,4 @@ Fixed checks through a forced-command SSH key to Pulsar (Proxmox host `10.0.10.3
|
|
|
156
156
|
|
|
157
157
|
## Out of scope in this version
|
|
158
158
|
|
|
159
|
-
Site Magic configuration (read-only through the API; the owner changes it at unifi.ui.com), console settings outside the Network API
|
|
159
|
+
Site Magic configuration (read-only through the API; the owner changes it at unifi.ui.com), console settings outside the Network API other than `syslog`, Wi-Fi CA rotation, device certificate enrollment, and DNS records. Describe the needed change precisely and stop. DNS records belong to the `dns` specialist; UniFi DNS policies on a console are yours.
|
package/skills/proxmox/SKILL.md
CHANGED
|
@@ -34,7 +34,7 @@ Power actions and snapshot changes return `{ upid, exitstatus }`; `OK` means don
|
|
|
34
34
|
{ "args": ["set", "107", "memory=768"] }
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
## Host commands (forced-command SSH key on Pulsar)
|
|
37
|
+
## Host commands (forced-command SSH key on Pulsar, or on SPACE-X with the `space-x` prefix)
|
|
38
38
|
|
|
39
39
|
| Command | Effect |
|
|
40
40
|
|---|---|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: raycast-script-creator
|
|
3
|
-
description: Create and install a Raycast script command in /Users/astronaute/.config/raycast/script-commands, then
|
|
3
|
+
description: Create and install a Raycast script command in /Users/astronaute/.config/raycast/script-commands, then have the user confirm it works in Raycast. Trigger whenever the user asks to make, add, build, or scaffold a Raycast script, Raycast command, Raycast shortcut, or any shell/zsh command they want to launch from Raycast, even if they don't use the word "script". Use this for ANY request about automating something through Raycast from the keyboard.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Raycast Script Creator
|
|
7
7
|
|
|
8
|
-
Create a Raycast script command in zsh, drop it in the user's script-commands folder, let the user confirm it works in Raycast
|
|
8
|
+
Create a Raycast script command in zsh, drop it in the user's script-commands folder, and let the user confirm it works in Raycast. The file stays where it is: chezmoi was removed on 2026-10-31, so there is no tracking step.
|
|
9
9
|
|
|
10
10
|
## Defaults
|
|
11
11
|
|
|
@@ -82,17 +82,9 @@ Rules:
|
|
|
82
82
|
|
|
83
83
|
Say exactly:
|
|
84
84
|
|
|
85
|
-
> Open Raycast, search for **"<Title>"**, run it, and confirm it works as expected. Reply `ok
|
|
85
|
+
> Open Raycast, search for **"<Title>"**, run it, and confirm it works as expected. Reply `ok`, or describe the issue.
|
|
86
86
|
|
|
87
|
-
Wait
|
|
88
|
-
|
|
89
|
-
### 6. Track with chezmoi
|
|
90
|
-
|
|
91
|
-
On confirmation:
|
|
92
|
-
|
|
93
|
-
chezmoi add /Users/astronaute/.config/raycast/script-commands/<filename>
|
|
94
|
-
|
|
95
|
-
Surface any chezmoi error verbatim — no silent retries. Do **not** run `chezmoi apply`.
|
|
87
|
+
Wait for the answer; fix the script when the user describes an issue.
|
|
96
88
|
|
|
97
89
|
## Output modes — quick reference
|
|
98
90
|
|
|
@@ -120,13 +112,11 @@ User: *"Create a Raycast script to copy my public IP to the clipboard."*
|
|
|
120
112
|
4. Write `/Users/astronaute/.config/raycast/script-commands/copy-public-ip.sh`.
|
|
121
113
|
5. `chmod +x`.
|
|
122
114
|
6. Ask user to test in Raycast.
|
|
123
|
-
7. On `ok`, `chezmoi add <path>`.
|
|
124
115
|
|
|
125
116
|
## Avoid
|
|
126
117
|
|
|
127
118
|
- Writing via MCP tools — use Write.
|
|
128
119
|
- Env-var fallbacks unless user asks (project Rule 9).
|
|
129
120
|
- Disabling shell errors (`set +e`) without confirmation.
|
|
130
|
-
- Running `chezmoi apply` — only `add`.
|
|
131
121
|
- Creating subfolders inside `script-commands/`.
|
|
132
122
|
- Committing or pushing anything — out of scope.
|
package/skills/security/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: How the security specialist reads Wazuh, CrowdSec, and the remote l
|
|
|
5
5
|
|
|
6
6
|
# Security specialist
|
|
7
7
|
|
|
8
|
-
VM 106 (`10.0.90.10`, VLAN 90) runs the Wazuh manager (container `observability-wazuh-manager-1`, agents `identity`, `arcane`, `dmz`, `CORTEX`, `NEXUS`, `frontdoor-1337`, `tailscale`, and since 2026-11-01 `pulsar`, `synapse`, `technitium2`, `radius`, `backup`, `space-x`, `technitium3`, `tailscale-mira`), CrowdSec with its local API for the front-door bouncer, and rsyslog, which archives remote logs under `/var/log/remote/<host>/<program>.log` (14 days). The Discord bridge on Cortex reads Wazuh through this tool every two minutes and posts urgent alerts at once (level 11 or higher, and rules 100011, 100012, 100020, 100021; a deployment-file change that a GitOps commit or our own operation explains is not urgent), with Investigate and Acknowledge buttons for the owners; everything else goes into the Security Daily Report (
|
|
8
|
+
VM 106 (`10.0.90.10`, VLAN 90) runs the Wazuh manager (container `observability-wazuh-manager-1`, agents `identity`, `arcane`, `dmz`, `CORTEX`, `NEXUS`, `frontdoor-1337`, `tailscale`, and since 2026-11-01 `pulsar`, `synapse`, `technitium2`, `radius`, `backup`, `space-x`, `technitium3`, `tailscale-mira`), CrowdSec with its local API for the front-door bouncer, and rsyslog, which archives remote logs under `/var/log/remote/<host>/<program>.log` (14 days). The Discord bridge on Cortex reads Wazuh through this tool every two minutes and posts urgent alerts at once (level 11 or higher, and rules 100011, 100012, 100020, 100021; a deployment-file change that a GitOps commit or our own operation explains is not urgent), with Investigate and Acknowledge buttons for the owners; everything else goes into the Security Daily Report, posted first in the morning run (05:00 Europe/Paris), and, on Mondays, the Security Weekly Report. The VM itself no longer posts to Discord. Two local CrowdSec scenarios matter: `37pla/pomerium-http-probing` (repeated Pomerium denials) and `37pla/frontdoor-sni-scanning` (rejected SNI at the VPS; bans escalate 4h, 24h, 7d, 30d, 90d). 37's WAN address is whitelisted every five minutes; a scan test in August 2026 once banned it.
|
|
9
9
|
|
|
10
10
|
The `security` tool is read-only. Every call is a fixed command on the guest; `["--help"]` lists them.
|
|
11
11
|
|
|
@@ -64,7 +64,7 @@ The `security` tool is read-only. Every call is a fixed command on the guest; `[
|
|
|
64
64
|
|
|
65
65
|
You observe; the owning specialist acts. When a finding concerns a host in the table, call that specialist through `subagent` with the facts (`agent`, `package`, installed `version`, `condition`, `cve`) and a precise question, then report its answer with your own. Do not tell the caller to run commands on a host that has an owner.
|
|
66
66
|
|
|
67
|
-
Debian guests and the VPS
|
|
67
|
+
Debian guests and Synapse install every stable update each night (04:30 Europe/Madrid, technitium2 04:50, the Mira guests 04:30 Asia/Dubai) and reboot right after when a package needs it; `wazuh-agent` is held. The VPS installs Debian and Debian-Security updates once a day and reboots at 02:30 UTC when needed; packages from `trixie-updates` wait for the operator. The morning run upgrades the Pulsar and SPACE-X hosts and offers the owner a Reboot button. For a vulnerability alert, ask the owner whether the package is already upgraded, will be at the next run (the fix is in the index), or is stuck (the fix is not in the index or the run failed), and to confirm from the package changelog that the installed version names the CVE. Only the stuck case needs the operator; say so plainly, with the versions. Answer with one of: patched (version, when, by what), scheduled (next run time), stuck (why), or feed lag (patched, Wazuh not updated yet).
|
|
68
68
|
|
|
69
69
|
## Operator actions (describe, do not perform)
|
|
70
70
|
|
package/specialists/AGENTS.md
CHANGED
|
@@ -20,12 +20,13 @@ macOS cannot tell which agent made a call; the OS user protects the credential,
|
|
|
20
20
|
|
|
21
21
|
```text
|
|
22
22
|
extensions/specialist-gate/ index.ts (tool registration, tool_call blocks, /specialists), config.ts, types.ts, index.test.ts
|
|
23
|
-
specialists/lib/ zitadel.ts, secrets.ts, config.ts, proc.ts, ssh.ts, tunnel.ts, repo.ts, pinned.ts, sanitize.ts, audit.ts, argv.ts, main.ts, output.ts, paths.ts, errors.ts
|
|
23
|
+
specialists/lib/ zitadel.ts, secrets.ts, config.ts, proc.ts, ssh.ts, tunnel.ts, repo.ts, pinned.ts, sanitize.ts, audit.ts, argv.ts, main.ts, output.ts, paths.ts, errors.ts, lock.ts,
|
|
24
|
+
arcane-host.ts, arcane-manager.ts, change-origin.ts, container-watch.ts, deployment.ts, image-updates.ts, registry.ts, releases.ts, stack-update.ts
|
|
24
25
|
specialists/<name>/run.ts one wrapper per specialist (arcane, identity, network, dns, edge, security, backup, proxmox, inference, media)
|
|
25
26
|
specialists/wrappers.test.ts validators, tables, help
|
|
26
27
|
specialists/provision/ provision.sh (Vaultwarden to files)
|
|
27
28
|
specialists/install/ install.sh (package to ~/.specialists/bin, arcane-cli download)
|
|
28
|
-
specialists/entry/ specialist-cli.sh (sudo entry point), specialist-install.sh (root installer for Node, wrappers, arcane-cli, trendarr), remote/ (forced commands for SSH targets, the VPS sudoers list and its install script)
|
|
29
|
+
specialists/entry/ specialist-cli.sh (sudo entry point), specialist-install.sh (root installer for Node, wrappers, arcane-cli, trendarr, python, gcloud, bw, jq), remote/ (forced commands for SSH targets, the VPS sudoers list and its install script)
|
|
29
30
|
agents/<name>.md, skills/<name>/SKILL.md
|
|
30
31
|
```
|
|
31
32
|
|
|
@@ -38,17 +39,17 @@ Wrappers ship as TypeScript and run under Node 24 type stripping: erasable synta
|
|
|
38
39
|
- Config only through `readConfig(service, shape)`; every field required, no fallbacks, no env vars.
|
|
39
40
|
- Exit codes: `UsageError` 2, `ServiceError` 1, success 0. Diagnostics on stderr, results on stdout, JSON where possible.
|
|
40
41
|
- Output filters: Arcane responses pass `stripKeys(ARCANE_DENIED_KEYS)`; Zitadel responses pass `redactSecrets`. Add keys there rather than in a wrapper.
|
|
41
|
-
- Fixed remote commands: `DMZ_COMMANDS`, `PULSAR_COMMANDS`, `VPS_COMMANDS`, `OBS_COMMANDS`, `BACKUP_COMMANDS`, `HOST_COMMANDS
|
|
42
|
+
- Fixed remote commands: `DMZ_COMMANDS`, `PULSAR_COMMANDS`, `VPS_COMMANDS`, `OBS_COMMANDS`, `BACKUP_COMMANDS`, `HOST_COMMANDS` (two tables: the arcane host's in `lib/arcane-host.ts` and the Proxmox hosts' in `proxmox/run.ts`), `NODE_COMMANDS` (dns), and `INFERENCE_COMMANDS` must match the entry scripts in `entry/remote/` and their tracked copies in the homelab repository (`02-pulsar-proxmox/dmz/system/`, `02-pulsar-proxmox/pulsar/system/`, `06-space-x-proxmox/system/`, `01-synapse-dns/system/`, `00-frontdoor-vps/system/`, `02-pulsar-proxmox/observability/system/`, `04-nexus-macstudio/system/`, and `host/` of the `astronaute77/arcane` repository). Pulsar's root `authorized_keys` carries one forced key per specialist (network, backup, proxmox, dns), each pinned to its own entry script; SPACE-X's carries the proxmox and dns keys, Synapse's the dns key. Change both sides in the same commit and redeploy the remote script. A new privileged step on the VPS also needs its exact line in `spc-edge-frontdoor-sudoers`.
|
|
42
43
|
- Repository access is `lib/repo.ts` (`repoCommand`, `RepoSpec`, `trackedFile`): one clone per specialist under `~/.specialists/work/<checkoutName>` (`homelab-edge`, `homelab-identity`; never share a checkout between specialists), a write deploy key, and an optional `writeRoot` that limits `git write`. `edge` (`deploy-nginx`) and `identity` (`dmz deploy-config`) deploy only what origin has: `trackedFile` refuses a dirty, ahead, or behind checkout. The DMZ entry keeps the previous template and restores it when render or restart fails.
|
|
43
44
|
- `network` reaches two consoles, `37` and `mira` (`SITES`), each with `unifi<Site>HostId`, `unifi<Site>LocalUrl`, and `unifi<Site>CertSha256` in `network.json`. `siteRequest` goes through the Site Manager cloud connector (`api.ui.com/v1/connector/consoles/<hostId>/network/integration/...`, account key `UNIFI_API_KEY`); a read the cloud cannot serve (no connection, 408, 429, 5xx) retries on the console itself with its local key (`UNIFI_LOCAL_37_API_KEY`, `UNIFI_LOCAL_MIRA_API_KEY`) through the pinned request, a write never retries because the cloud may have applied it before failing, and a cloud 408 or 5xx to a write fails with that hint; `--local` skips the cloud. Every answer passes `redactUnifi`: `x_` fields (UniFi's secret fields: `x_passphrase`, `x_ssh_password`, `x_private_key`, `x_api_token`) and secret-named strings become `[redacted]`, and a write body carrying `[redacted]` is refused, so a read-modify-write cannot store it. `leavesPrefix` refuses `%`, `\`, empty, and dot segments in `get`, `write`, `app-get`, and `cloud` paths, because the URL parser resolves `%2e%2e` like `..`. Writes are `unifiWrite`: any `POST`, `PUT`, `PATCH`, or `DELETE` under `/v1/sites/<siteId>/` with a JSON body (none for `DELETE`); UniFi validates the rest, and the gate asks the owner for every one. `unifi cloud <path>` reads the Site Manager API (`/v1/`, `/ea/`, never the connector). Each command reads only the config keys it needs, so `pulsar` works without the UniFi keys.
|
|
44
|
-
- Pi executes sibling tool calls in parallel, so two wrapper processes of the same specialist can run at once. `lib/lock.ts` (`withLock`, a directory lock under `~/.specialists/work/locks`, stale after 10 minutes) serialises shared resources; `edge` holds `edge-tunnel` around the fixed IAP port and the gcloud configuration directory. `arcane` holds `arcane-gitops` (stale after 3 hours) around `git`, `manager-upgrade`, and `stack-
|
|
45
|
-
- `edge` retries one SSH call through the IAP tunnel when the first connection is closed during setup (`isTransientSshFailure`: exit 255 with "closed by remote host" or a reset), except `reboot`. The IAP tunnel is `lib/tunnel.ts`: `gcloud compute start-iap-tunnel <instance> 22 --local-host-port=localhost:<port>` (a documented flag; the hidden `--listen-on-stdin` is not used), ready when the port accepts a connection, closed after the ssh call. `gcloud auth activate-service-account` runs before every tunnel with `CLOUDSDK_CONFIG` under `~/.specialists/work/gcloud` and `CLOUDSDK_PYTHON` from the config, because the
|
|
45
|
+
- Pi executes sibling tool calls in parallel, so two wrapper processes of the same specialist can run at once. `lib/lock.ts` (`withLock`, a directory lock under `~/.specialists/work/locks`, stale after 10 minutes) serialises shared resources; `edge` holds `edge-tunnel` around the fixed IAP port and the gcloud configuration directory. `arcane` holds `arcane-gitops` (stale after 3 hours) around `git`, `manager-upgrade`, `stack-update`, and `stack-rollback`, because an update keeps the checkout for up to about two hours; `dns` holds `dns-node-change` around `technitium host <node> restart|upgrade` and refuses a second one at once; the other `repo.ts` checkouts are not locked yet.
|
|
46
|
+
- `edge` retries one SSH call through the IAP tunnel when the first connection is closed during setup (`isTransientSshFailure`: exit 255 with "closed by remote host" or a reset), except `reboot`. The IAP tunnel is `lib/tunnel.ts`: `gcloud compute start-iap-tunnel <instance> 22 --local-host-port=localhost:<port>` (a documented flag; the hidden `--listen-on-stdin` is not used), ready when the port accepts a connection, closed after the ssh call. `gcloud auth activate-service-account` runs before every tunnel with `CLOUDSDK_CONFIG` under `~/.specialists/work/gcloud` and `CLOUDSDK_PYTHON` from the config (`gcloudPython`, the installer's Python), because the gcloud SDK that `specialist-install` assembles ships no interpreter.
|
|
46
47
|
- `dns` builds every Technitium call from `TECHNITIUM_READS` and `TECHNITIUM_WRITES`; `key=value` record parameters pass through by name (`token` and `node` refused) because the API documents dozens of type-specific parameters. Every call goes to the cluster primary with one token; `node <fqdn>` adds Technitium's `node` parameter so the primary runs a read or `server-domain` on that node. Zone, record, and cluster writes are refused with `node` in code: the catalog zone and the cluster are the only replication paths. `technitium join` joins a fresh node: it logs in with Technitium's default login (refused once changed), creates a one-time admin with a random password on the primary for `initJoin`, and deletes it in `finally`; no password is stored or printed.
|
|
47
48
|
- `security` parses Wazuh alert lines locally (`summariseWazuh`, `summariseVulns`) so the guest never needs `jq`; `wazuh-vulns`, `wazuh-events` (every non-vulnerability alert of the last N minutes at or above a level, with the alert id and the FIM path, change, and `sha256_after`; at most the newest 1000), and `wazuh-vuln-events` (every vulnerability finding, compact) are local views over the same `wazuh-alerts` dump, not guest commands. `alerts` adds each ban's whole length (time left plus the alert's age, to the hour), the escalated bans (longer than CrowdSec's default 4 hours), and the top countries and networks. The Discord bridge's security checks use these through the entry point (`extensions/astro-discord/security-monitor.ts`).
|
|
48
49
|
- `arcane change-origin <path> <sha256|-> <utc>` (`lib/change-origin.ts`) fetches origin, hashes the file in the newest 30 commits touching `<project>/<file>` up to 15 minutes after the change, and reads the last 16 MiB of the audit log for our `stack-update`, `manager-upgrade`, `manager-rollback`, or `host db-restore` on that stack (from a minute before its start to ten minutes after its end). It takes no checkout lock: like `update-report`'s holds read, it only fetches and reads objects, never the working tree. On 2026-10-21 the "Old md5sum" values of the live 100020 alerts matched the repository's previous Grimoire commits, which confirms that Arcane syncs these files verbatim.
|
|
49
50
|
- TLS pinning for self-signed consoles is `lib/pinned.ts` (`pinnedRequest`): it opens the TLS socket, checks the fingerprint on `secureConnect`, and only then sends the request on that socket (`createConnection`), so a wrong peer never receives the API key; `network` and `proxmox` use it with a `*CertSha256` config value obtained once through the wrapper's `fingerprint` command.
|
|
50
51
|
- `proxmox` writes are typed commands, never a generic POST: power actions and snapshot changes go through `runTask`, which polls `/nodes/<node>/tasks/<upid>/status` until `stopped` and fails on any `exitstatus` but `OK`. `--confirm` is stripped by `needsConfirm` for every interrupting action. `SET_KEYS` mirrors the privileges of the `SpecialistGuest` role; the API refuses anything the role lacks, the wrapper refuses earlier.
|
|
51
|
-
- `backup` and `inference` are pure forced-command wrappers with per-command timeouts (`timeoutMs` in the tables) because runs such as `vzdump-run` take many minutes; the gate's `timeoutMs` in `specialists.json` must exceed the longest of them.
|
|
52
|
+
- `backup` and `inference` are pure forced-command wrappers with per-command timeouts (`timeoutMs` in the tables) because runs such as `vzdump-run` take many minutes; the gate's `timeoutMs` in `specialists.json` must exceed the longest of them. The same holds for `proxmox host-upgrade` (`HOST_UPGRADE_TIMEOUT_MS`, 20 minutes; gate 22 minutes since 0.40.38).
|
|
52
53
|
- `inference` reaches Nexus through one forced-command key. The Europa check is HTTP only until Windows OpenSSH forced commands are verified.
|
|
53
54
|
- `REFUSED_PREFIXES` protects only the wrapper itself (`config`, `auth`, `self-update`, `completion`). The GitOps-first rule for managed projects lives in the skill and the agent prompt, not in code, because unmanaged projects and emergencies need the direct CLI.
|
|
54
55
|
- The wrapper's repository commands are the `git` group; `gitops` must stay free because it is an `arcane-cli` command group (server-side syncs).
|
|
@@ -57,7 +58,7 @@ Wrappers ship as TypeScript and run under Node 24 type stripping: erasable synta
|
|
|
57
58
|
- `entry/specialist-install.sh` runs as root, so it runs only `/usr/bin`, `/bin`, `/usr/sbin`, `/sbin` and the Node it installed, never Homebrew or anything else the main user can write; it checks that `/usr/local/libexec/specialist-node` (and each `specialist-<tool>` folder) and its parents belong to root and are writable by nobody else. Arguments are checked before the root test (tests exercise that part). Downloads go to a root-only temporary directory and are verified before use: Node against `SHASUMS256.txt` and the LTS flag in `index.json`, npm tarballs against the registry's `sha512` integrity, arcane-cli against the release's checksums file. Inside `/Users/specialist` it works only as `specialist` (`sudo -u specialist -H`), from a staging directory root hands over, so a link the specialist plants cannot redirect a root write. Each component switches by rename after a check (every installed wrapper's `--help`, `--version` of the new binary) and restores the previous copy when the check fails. Older versions are refused; `rollback` swaps current and previous. `python`, `gcloud`, `bw`, and `jq` follow the same rules: version folders under `/usr/local/libexec/specialist-<tool>/` behind the links `current` and `previous`, sealed `root:wheel` and not writable by others, smoke-tested as `specialist` before `current` moves; `python` refuses a switch that breaks the current gcloud. Consumers use the `current` paths: `provision.sh` for `bw` and `jq`, `edge.json` for `gcloud` and `gcloudPython`. Nothing a wrapper runs with secrets may come from Homebrew.
|
|
58
59
|
- `main()` waits for stdout and stderr to flush before `process.exit`: on a pipe, exiting right after a write drops everything past the 64 KiB buffer, which cut large answers such as `projects list --all` until 2026-09-25 (`lib/flush.test.ts`).
|
|
59
60
|
- `arcane update-report [--all]` is `lib/image-updates.ts` over `lib/registry.ts`: a fresh `images updates check --all`, then `projects list --all` for the stack and service of each image reference, then the registries' tag lists and manifest digests (anonymous bearer tokens from each registry's challenge; digests by HEAD, which Docker Hub does not count as a pull; lscr.io is read from ghcr.io). A floating or major-series tag is resolved to the release tag whose digest matches the running and the latest build, searching the newest tags of the three commonest release shapes; a fixed tag is compared with the newest tag of the same shape; a digest pin with the newest release. Checks older than one minute before the run count as stale and show as unknown. Private images (anonymous access refused with 401 or 403) are excluded from rows, counts, and table, listed in `privateImages`, and counted in the summary line. The table is fixed-width text for a code block, because Discord renders no Markdown tables. The answer adds `holds` from `update-holds.json` at origin's branch head (`git show`, no working-tree read), or `holdsError` when that file is malformed.
|
|
60
|
-
- `arcane stack-update <stack> [--confirm]` (`lib/stack-update.ts` for the pure parts) is deterministic: refuses `arcane`, held stacks (the checkout's `update-holds.json` after `pull --ff-only`; a malformed file is an error), a dirty or ahead checkout, stopped stacks, and an update across a major version without `--confirm` (which the gate turns into an owner approval). Pending rows come from a fresh per-image check resolved like `update-report`. `edit tag`/`edit digest` rows rewrite `image:` lines that name exactly the old reference (`replaceImageRef`, quoted or not, trailing comment kept) in the sync's `composePath`, then commit, push, and wait for `gitops list` to report success at that commit (20 min, polled every 30 s). Then `projects redeploy <stack> --yes` (35 min), container checks through `containers list --all` and `containers get` (`composeInfo.projectName`, health; 5 min, polled every 15 s; a job that exited with code 0 counts as done whatever health its image's inherited check left, as bigcapital's migration did on 2026-10-28), and a fresh check that each service is current. A failure after a commit reverts, pushes, waits for the sync, redeploys, and checks again (`rolled back`); a pull-only failure stays `failed`. Every outcome prints JSON with `status` and exits 0. Worst case about 125 minutes, so the gate's `timeoutMs` for arcane must exceed it (8,100,000).
|
|
61
|
+
- `arcane stack-update <stack> [--confirm]` (`lib/stack-update.ts` for the pure parts) is deterministic: refuses `arcane`, held stacks (the checkout's `update-holds.json` after `pull --ff-only`; a malformed file is an error), a dirty or ahead checkout, stopped stacks, and an update across a major version without `--confirm` (which the gate turns into an owner approval). Pending rows come from a fresh per-image check resolved like `update-report`. `edit tag`/`edit digest` rows rewrite `image:` lines that name exactly the old reference (`replaceImageRef`, quoted or not, trailing comment kept) in the sync's `composePath`, then commit, push, and wait for `gitops list` to report success at that commit (20 min, polled every 30 s). Then `projects redeploy <stack> --yes` (35 min), container checks through `containers list --all` and `containers get` (`composeInfo.projectName`, health; 5 min, polled every 15 s; a job that exited with code 0 counts as done whatever health its image's inherited check left, as bigcapital's migration did on 2026-10-28), and a fresh check that each service is current. A failure after a commit reverts, pushes, waits for the sync, redeploys, and checks again (`rolled back`); a pull-only failure stays `failed`. Every outcome prints JSON with `status` and exits 0. Worst case about 125 minutes, so the gate's `timeoutMs` for arcane must exceed it (8,100,000). It holds the `arcane-gitops` lock, so a second checkout call waits up to 2 minutes and then fails as busy; the bridge also runs one Arcane update at a time.
|
|
61
62
|
- `arcane host <command>` runs over the forced-command key of user `spc-arcane` on VM 100. `HOST_COMMANDS` in `lib/arcane-host.ts` must list exactly the operations of `entry/remote/spc-arcane-op.py` (a test compares them); the tracked copies live in the arcane repository's `host/` (`spc-arcane-host-entry`, `spc-arcane-op`, `spc-arcane-sudoers`, `spc-arcane-install.sh`) with the probes in `host/spc-arcane-probes/`. The entry only splits words (letters, digits, space, `._:/+-`) and hands them to `sudo -n /usr/local/sbin/spc-arcane-op`, the one command its sudoers line allows; the op checks the name and every argument and runs the reviewed arcane-ops probes, which print only allowlisted fields. Manager steps (`manager-*`) are internal to `manager-upgrade`/`manager-rollback` and refused through `host`. Nothing on the host deletes data: a manager rollback restores the image and Compose file, not the data volume (R3 stays manual), `db-restore` only fills an empty database, and dumps are never pruned by the tool. `supabase-backup` writes the pre-change backup of `supabase/AGENTS.md` (both databases with `pg_dump -Fc`, each listed and fully decoded by `pg_restore`, `pg_dumpall --globals-only`, and the `supabase-db-config` volume, which must hold `pgsodium_root.key`) into `/var/backups/supabase-upgrades/<UTC>`, the folder of the earlier manual backups. `host-audit` compares the host's hashes with `host/<name>` of the `arcane-gitops` checkout after a pull.
|
|
62
63
|
- `arcane manager-upgrade <version>` (`lib/arcane-manager.ts`) follows arcane/AGENTS.md "Manager upgrades": the official image's revision label must equal the release tag's commit (GitHub API), `manager-prepare` records `compose.before.yaml` and every container before the pin commit, the pin goes through the `arcane-gitops` checkout (`git` is exported from `lib/repo.ts` for this), the wait polls `gitops list` and the deployed Compose hash every 30 s for up to 30 minutes, then pull, cold backup, `up -d --no-deps --pull never`, and checks. Any failure before the restart reverts the pin (`stopped`); a failed check after it reverts the pin and runs `manager-rollback` (`rolled back`). The answer always exits 0 with `status`, so the bridge and the agent both see it.
|
|
63
64
|
- `media` runs trendarr unchanged: `trendarrCli` in `media.json` is its `dist/cli.js`, started with `process.execPath` because sudo's PATH has no node. Each call gets `HOME` set to a fresh `0700` directory under `~/.specialists/work/media/` that holds only `.trendarr/config.json` (`0600`, trendarr's own schema, built from the note fields and `media.json`) and is removed in `finally`; trendarr reads no environment variables and has no config flag, and Node's `os.homedir()` follows `$HOME` on POSIX. Every call passes `--json`; `init` is refused. An add prints trendarr's per-ID `results` and exits 0 even when trendarr exits 1 for a failed ID, because the gate shows only stderr on failure; other failures carry trendarr's stderr without its `warning:` lines, which go into the JSON as `warnings`. The bridge's slash commands and Add buttons call the same wrapper through the entry point (`extensions/astro-discord/media.ts`).
|
package/specialists/README.md
CHANGED
|
@@ -7,12 +7,12 @@ A specialist is a Pi subagent that is the only way to operate one area of the ho
|
|
|
7
7
|
| `astro.arcane` | Arcane container platform (VM 100) and its GitOps repository | Every `arcane-cli` operation except its own `config`, `auth`, `self-update`; `update-report` (fresh check of every stack with running and latest release versions); `release-notes <stack>/<service>` (GitHub notes between the two versions); `change-origin <path> <sha256|-> <utc>` (whether a deployment-file change Wazuh saw is a GitOps commit or one of our operations); `project-status`, `deployment check|wait`; `stack-update <stack>` (a stack's pending image updates through GitOps, redeploy, checks, and rollback; across a major version only with `--confirm`, owner approval; held stacks in the repository's `update-holds.json` are refused); `manager-upgrade <version>` and `manager-rollback <stamp>` (the documented manager upgrade, owner approval); `host <command>`: sanitized host checks (memory, stats, logs, OOM, kernel OOM, audit, capacity, storage, Docker usage, service and queue checks) `db-list|db-dump|db-restore` for Mealie and Paperless, and `supabase-backup` (both Supabase databases, roles, and the pgsodium key) through user `spc-arcane` on VM 100; Compose changes of GitOps-managed projects through `git show|write|commit|push`, then `arcane-cli gitops` sync |
|
|
8
8
|
| `astro.identity` | Zitadel; Pomerium, nginx, lego on VM 104; `02-pulsar-proxmox/dmz/` in the homelab repository | Any Zitadel API call (v2, management, admin, auth) with responses redacted; `dmz status|journal|config-template|render|pomerium-restart|nginx-reload|lego-renew|deploy-config`; `git` on the homelab checkout, writes limited to `02-pulsar-proxmox/dmz/` |
|
|
9
9
|
| `astro.network` | UniFi consoles of sites 37 and Mira, FreeRADIUS (LXC 108), Tailscale (LXC 105) | Read and write everything the UniFi Network API offers on either console (cloud connector, local console as read fallback); Site Manager reads; RADIUS and Tailscale checks on Pulsar |
|
|
10
|
-
| `astro.dns` | Technitium cluster `dns.home.arpa` (primary `technitium1` on Synapse, `technitium2` in LXC 107, `technitium3` at Mira); Cloudflare zones `37pla.net`, `monadeo.com` | Read zones, records, settings, and cluster state on every node through the primary, resolve, stats; create and delete zones, add, update, delete records, initialize and delete the cluster, join a fresh node, remove a node, set a node's server domain; Cloudflare zones and record add, update, delete |
|
|
10
|
+
| `astro.dns` | Technitium cluster `dns.home.arpa` (primary `technitium1` on Synapse, `technitium2` in LXC 107, `technitium3` at Mira); Cloudflare zones `37pla.net`, `monadeo.com` | Read zones, records, settings, and cluster state on every node through the primary, resolve, stats; create and delete zones, add, update, delete records, initialize and delete the cluster, join a fresh node, remove a node, set a node's server domain, resync a zone or delete a stale Secondary zone on a node, check for a newer Technitium release; each node's host through a forced-command key: `technitium host <node> status|journal|updates|restart|upgrade`; Cloudflare zones and record add, update, delete |
|
|
11
11
|
| `astro.edge` | Frontdoor VPS (`frontdoor-1337`) over an IAP tunnel; `00-frontdoor-vps/` in the homelab repository | `probe` the public path; `route-probe` (status of the Supabase, Grimoire, and Mealie public routes from Cortex); `vps status|nginx-conf|nginx-test|journal|wg|bouncer|updates|package|changelog|auto-upgrades|deploy-nginx|reboot --confirm`; `git` on the homelab checkout, writes limited to `00-frontdoor-vps/` |
|
|
12
12
|
| `astro.security` | Wazuh, CrowdSec, rsyslog archive on VM 106 | Read-only: `status`, `attention`, `agents`, `alerts`, `decisions`, `bouncers`, `metrics`, `wazuh-alerts`, `wazuh-vulns`, `wazuh-events`, `wazuh-vuln-events`, `wazuh-log`, `remote-hosts`, `remote-log`, `journal` |
|
|
13
13
|
| `astro.backup` | vzdump, the shared Restic repository (Pulsar host config, Arcane app backups), GCS offsite from LXC 102 | Status, journals, and manual runs of every layer; `restic-snapshots|stats|ls`, `restic-restore` into `/var/tmp/spc-restore` on Pulsar, `restore-clean` |
|
|
14
|
-
| `astro.proxmox` | Proxmox VE on Pulsar | API token: `guests`, `guest`, `get <path>`, `tasks`; `start`, `shutdown|reboot|stop --confirm`; snapshots create, delete, rollback; `set` of CPU, memory, options, network.
|
|
15
|
-
| `astro.inference` |
|
|
14
|
+
| `astro.proxmox` | Proxmox VE on Pulsar (37) and SPACE-X (Mira) | API token: `guests`, `guest`, `get <path>`, `tasks`; `start`, `shutdown|reboot|stop --confirm`; snapshots create, delete, rollback; `set` of CPU, memory, options, network. Host key: `host-status`, `host-journal`, `updates`, `host-upgrade` (apt full-upgrade; a new Proxmox VE major is held), `host-reboot --confirm`, `guest-exec <vmid> <status|journal|df|updates>`. Every command runs on Pulsar, or on SPACE-X with the `space-x` prefix |
|
|
15
|
+
| `astro.inference` | MLX embedding and reranking servers on Nexus, Europa health | `nexus-status|start|stop|restart|log|disk`, `macos-updates`; `europa-health` |
|
|
16
16
|
| `astro.media` | trendarr over TMDB, OMDb, and the `media` project on VM 100 (Radarr, Sonarr, SABnzbd) | `trending`, `search`, `recommend`, `add-movies`, `add-series` (at most 20 IMDb IDs), `sabnzbd status|pause|resume`; always trendarr's JSON plus its warnings |
|
|
17
17
|
|
|
18
18
|
Call one with `/run astro.<name> -- <task>` or through the `subagent` tool (both from the bundled `astro-subagents` extension). `/run` saves the specialist's session under `~/.pi/agent/subagent-sessions/<agent>/`; `/run astro.<name> --continue -- <task>` resumes the last one started from the same directory, so the specialist keeps what it saw. Sessions older than 7 days are deleted. Specialists may call each other once (`maxSubagentDepth: 1`). They run on `openai-codex/gpt-6-astra` with `xhigh` thinking, set by `model` and `thinking` in each `agents/<name>.md`; an agent without these fields inherits the caller's model and thinking. Each tool takes `args`, an array of strings; `["--help"]` lists the subcommands.
|
|
@@ -26,7 +26,7 @@ Call one with `/run astro.<name> -- <task>` or through the `subagent` tool (both
|
|
|
26
26
|
- Every call is logged in `/Users/specialist/.specialists/audit.log`.
|
|
27
27
|
- The `specialist-gate` extension registers the tool only inside the matching specialist child and blocks other agents from calling the CLIs or reading `/Users/specialist`. `security-guard` carries the same blocks.
|
|
28
28
|
|
|
29
|
-
Limits: `network` writes
|
|
29
|
+
Limits: `network` writes through the UniFi Network API plus a few narrow commands on the Network application's own paths (`nat-write`, `device-network`, `client-fixed-ip`, `syslog`, `app-policy-delete`); it cannot change Site Magic. `security` is read-only. `identity` deploys only `config.yaml` to the DMZ. `edge` changes only `nginx.conf` on the VPS and can reboot it. `dns` writes zones, records, and the cluster only on the Technitium primary; on another node it only sets the server domain, resyncs a zone, or deletes a stale Secondary zone, and `technitium host` restarts or upgrades one node at a time. `proxmox` cannot create, clone, or destroy guests, change disks, or change the host configuration; on a host it only upgrades packages (`host-upgrade`) and reboots (`host-reboot --confirm`). `backup` cannot change retention or schedules. `inference` cannot start Europa or change models. `media` adds titles and toggles the download queue; it cannot delete anything or change Radarr, Sonarr, or SABnzbd settings.
|
|
30
30
|
|
|
31
31
|
## Enable specialists on a host
|
|
32
32
|
|
|
@@ -44,7 +44,7 @@ Host: Cortex (macOS on Apple silicon; Homebrew git; the specialists' Node, trend
|
|
|
44
44
|
- `inference`: `SSH_KEY_NEXUS_B64`.
|
|
45
45
|
- `media`: `TMDB_ACCESS_TOKEN` (TMDB API Read Access Token), `OMDB_API_KEY`, `RADARR_API_KEY`, `SONARR_API_KEY` (Settings, General, Security; each app has one), `SABNZBD_API_KEY` (the API key, not the NZB key, which can only add NZBs and cannot read or pause the queue).
|
|
46
46
|
2. **Identities.** Zitadel (`https://auth.37pla.net/ui/console`): service user `spc-arcane` with Access Token Type JWT and a JSON key; service user `spc-identity` with a Personal Access Token and the Instance Owner role. Technitium (cluster primary): user `spc-dns` in the Administrators group with an API token; the cluster syncs the user to every node. Cloudflare: an account-owned API token with `Zone:Read` and `DNS:Edit` on both zones. GCP project `frontdoor-1337`: service account `spc-edge` with `roles/iap.tunnelResourceAccessor` and `roles/compute.viewer`, JSON key. Proxmox (`ssh pulsar`): user `spc-proxmox@pve`, role `SpecialistGuest` = `VM.Audit VM.PowerMgmt VM.Snapshot VM.Snapshot.Rollback VM.Config.CPU VM.Config.Memory VM.Config.Options VM.Config.Network VM.Config.CDROM VM.GuestAgent.Audit`, ACLs `PVEAuditor` on `/` and `SpecialistGuest` on `/vms` for both the user and the token `spc-proxmox@pve!cortex` (`-privsep 1`).
|
|
47
|
-
3. **Services.** Arcane (Settings, Authentication, Federated Credentials): Issuer `https://auth.37pla.net`, Audience `387825541182390275`, Subject exact = `spc-arcane` user ID, Role Admin, Global, lifetime 300. UniFi: the account key and a local key per console (fields above) and policies on 37 allowing Cortex `10.0.40.37` to TCP 22 on `10.0.20.10`, `10.0.10.37`, `10.0.90.10`, TCP 5380 on `10.0.40.53`, `10.0.
|
|
47
|
+
3. **Services.** Arcane (Settings, Authentication, Federated Credentials): Issuer `https://auth.37pla.net`, Audience `387825541182390275`, Subject exact = `spc-arcane` user ID, Role Admin, Global, lifetime 300. UniFi: the account key and a local key per console (fields above) and policies on 37 allowing Cortex `10.0.40.37` to TCP 22 on `10.0.20.10`, `10.0.10.37`, `10.0.90.10`, TCP 5380 on `10.0.40.53`, TCP 8006 on `10.0.10.37`, TCP 8081 on `10.0.60.5`, TCP 443 on the Mira console `10.1.60.1`, and TCP 22 and 8006 on SPACE-X `10.1.10.37` (that one also on Mira); the homelab `03-cortex-macmini/README.md` lists them with their ids. GitHub: `spc-arcane-gitops` as a write deploy key on `astronaute77/arcane`, `spc-edge-homelab` and `spc-identity-homelab` as write deploy keys on `astronaute77/homelab`.
|
|
48
48
|
4. **Sudo and user**, as an administrator:
|
|
49
49
|
```sh
|
|
50
50
|
printf 'cortex ALL=(ALL) ALL\n' | sudo tee /etc/sudoers.d/cortex >/dev/null
|
|
@@ -73,14 +73,15 @@ Host: Cortex (macOS on Apple silicon; Homebrew git; the specialists' Node, trend
|
|
|
73
73
|
"homelabRemote": "git@github.com:astronaute77/homelab.git", "homelabBranch": "main", "repoArea": "02-pulsar-proxmox/dmz", "pomeriumConfig": "02-pulsar-proxmox/dmz/config.yaml" }
|
|
74
74
|
{ "unifi37HostId": "<from: specialist-cli network -- unifi cloud /v1/hosts>", "unifi37LocalUrl": "https://10.0.10.1/proxy/network/integration", "unifi37CertSha256": "<from: specialist-cli network -- unifi 37 fingerprint>",
|
|
75
75
|
"unifiMiraHostId": "<the same>", "unifiMiraLocalUrl": "https://10.1.60.1/proxy/network/integration", "unifiMiraCertSha256": "<the same>", "pulsarHost": "10.0.10.37", "pulsarUser": "root" }
|
|
76
|
-
{ "technitiumPrimaryUrl": "http://10.0.40.53:5380" }
|
|
76
|
+
{ "technitiumPrimaryUrl": "http://10.0.40.53:5380", "technitium1Host": "10.0.40.53", "technitium2Host": "10.0.10.37", "technitium3Host": "10.1.10.37", "nodeSshUser": "root" }
|
|
77
77
|
{ "gcloud": "/usr/local/libexec/specialist-gcloud/current/bin/gcloud", "gcloudPython": "/usr/local/libexec/specialist-python/current/bin/python3",
|
|
78
78
|
"project": "frontdoor-1337", "zone": "us-east1-c", "instance": "frontdoor-1337", "serviceAccount": "spc-edge@frontdoor-1337.iam.gserviceaccount.com",
|
|
79
79
|
"iapLocalPort": 22337, "sshUser": "spc-edge", "publicIp": "35.237.66.101", "probeHost": "auth.37pla.net",
|
|
80
80
|
"homelabRemote": "git@github.com:astronaute77/homelab.git", "homelabBranch": "main", "repoArea": "00-frontdoor-vps", "nginxConf": "00-frontdoor-vps/nginx.conf" }
|
|
81
81
|
{ "obsHost": "10.0.90.10", "obsUser": "observability" }
|
|
82
82
|
{ "pulsarHost": "10.0.10.37", "pulsarUser": "root", "arcaneHost": "10.0.40.30", "arcaneUser": "arcane" }
|
|
83
|
-
{ "apiUrl": "https://10.0.10.37:8006", "certSha256": "<from: specialist-cli proxmox -- fingerprint>", "node": "pulsar", "pulsarHost": "10.0.10.37", "pulsarUser": "root"
|
|
83
|
+
{ "apiUrl": "https://10.0.10.37:8006", "certSha256": "<from: specialist-cli proxmox -- fingerprint>", "node": "pulsar", "pulsarHost": "10.0.10.37", "pulsarUser": "root",
|
|
84
|
+
"spacexApiUrl": "https://10.1.10.37:8006", "spacexCertSha256": "<from: specialist-cli proxmox -- space-x fingerprint>", "spacexNode": "space-x", "spacexHost": "10.1.10.37", "spacexUser": "root" }
|
|
84
85
|
{ "nexusHost": "10.0.40.38", "nexusUser": "nexus", "europaHealthUrl": "http://10.0.60.5:8081/health" }
|
|
85
86
|
{ "trendarrCli": "/Users/specialist/.specialists/bin/trendarr/node_modules/@astrofoundry/trendarr/dist/cli.js",
|
|
86
87
|
"radarrUrl": "http://10.0.40.30:7878", "radarrQualityProfileId": 7, "radarrRootFolderPath": "/media/movies",
|
|
@@ -116,6 +117,8 @@ Host: Cortex (macOS on Apple silicon; Homebrew git; the specialists' Node, trend
|
|
|
116
117
|
- VM 106, user `observability`: `spc-security-obs-entry.sh` (tracked in the homelab repository, installed by `02-pulsar-proxmox/observability/deploy.sh`).
|
|
117
118
|
- Frontdoor VPS: `spc-edge-frontdoor-install.sh` creates user `spc-edge` (group `systemd-journal`), installs `spc-edge-frontdoor-entry.sh` and the sudoers file `spc-edge-frontdoor-sudoers`, and writes `authorized_keys`. Copy the three files and the public key to `/tmp` with `gcloud compute scp --tunnel-through-iap`, then run it as root.
|
|
118
119
|
- Pulsar, root, two more keys: `spc-backup-pulsar-entry.sh`, `spc-proxmox-pulsar-entry.sh` (tracked in `02-pulsar-proxmox/pulsar/system/`).
|
|
120
|
+
- SPACE-X, root: `spc-proxmox-spacex-entry.sh` for the same proxmox key (tracked in `06-space-x-proxmox/system/`).
|
|
121
|
+
- Synapse, Pulsar, and SPACE-X, root: the dns node key, forced to `spc-dns-node-entry.sh` with the node as its argument: `local` on Synapse (technitium1), `pct:107` on Pulsar (technitium2), `pct:100` on SPACE-X (technitium3) (tracked in `01-synapse-dns/system/`).
|
|
119
122
|
- VM 100, user `arcane`: `spc-backup-arcane-entry.sh` (tracked as `host/spc-backup-arcane-entry` in the `astronaute77/arcane` repository, next to the host backup scripts).
|
|
120
123
|
- VM 100, user `spc-arcane` (no docker group): `spc-arcane-host-entry.sh` hands each command to the root-owned `spc-arcane-op.py` (installed as `/usr/local/sbin/spc-arcane-op`), the only command `spc-arcane-sudoers` allows; it runs the reviewed probes from `/usr/local/lib/spc-arcane` and the fixed manager and database steps. `spc-arcane-install.sh` creates the user and installs all of it from `/tmp/spc-arcane`; the files are tracked under `host/` in the arcane repository, the probes under `host/spc-arcane-probes/` (moved from the arcane-ops CLI, retired on 2026-10-19). Add `"hostAddress": "10.0.40.30", "hostUser": "spc-arcane"` to `arcane.json`; other arcane commands do not read them.
|
|
121
124
|
- Nexus, user `nexus`: `spc-inference-nexus-entry.sh` as `/usr/local/sbin/spc-inference-nexus-entry` (tracked in `04-nexus-macstudio/system/`).
|
|
@@ -130,7 +133,7 @@ Host: Cortex (macOS on Apple silicon; Homebrew git; the specialists' Node, trend
|
|
|
130
133
|
{ "agent": "astro.edge", "tool": "edge", "service": "edge", "timeoutMs": 300000 },
|
|
131
134
|
{ "agent": "astro.security", "tool": "security", "service": "security", "timeoutMs": 120000 },
|
|
132
135
|
{ "agent": "astro.backup", "tool": "backup", "service": "backup", "timeoutMs": 3600000 },
|
|
133
|
-
{ "agent": "astro.proxmox", "tool": "proxmox", "service": "proxmox", "timeoutMs":
|
|
136
|
+
{ "agent": "astro.proxmox", "tool": "proxmox", "service": "proxmox", "timeoutMs": 1320000 },
|
|
134
137
|
{ "agent": "astro.inference", "tool": "inference", "service": "inference", "timeoutMs": 1260000 },
|
|
135
138
|
{ "agent": "astro.media", "tool": "media", "service": "media", "timeoutMs": 660000 } ] }
|
|
136
139
|
```
|
|
@@ -141,7 +144,7 @@ Check: `sudo -n -u specialist -H /usr/local/bin/specialist-cli arcane --caller t
|
|
|
141
144
|
|
|
142
145
|
The `astro-discord` extension gives Discord users access to the specialists from a channel. It runs in a headless Pi host on Cortex (LaunchAgent `com.astrofoundry.astro-discord`, user `cortex`), never in interactive sessions.
|
|
143
146
|
|
|
144
|
-
- Channels are configured one by one (`channels.<id>`): `trigger` is `always` (every message that names a specialist counts) or `mention` (only messages that start with `@Cortex` or reply to the bot); `specialists` is `*` or a list. A channel with one specialist needs no prefix: every message there is a task for it. In a channel with several, `dns list the zones` names the specialist; an addressed message without a name gets a reply asking for one. Threads inherit their parent channel's entry; unlisted channels are ignored. The bot replies at once with "<specialist> is working on your task" and shows the typing indicator until the answer replaces that reply. Reactions on your message: ⏳ running, 🔒 waiting for an owner's approval, ✅ done, ❌ failed. `help` shows the specialists you may use in that channel and the commands (`status` lists running tasks; owners in the admin channel also see the `config` commands). Each channel and specialist has one conversation: a reply to the bot's answer, or another task for that specialist within 30 minutes, continues it with everything the specialist saw before; otherwise a new one starts, and a task beginning with `new` forces that. Replied-to and forwarded messages (text, embeds, attachment names) travel with the task, so "check this" on a forwarded alert works. Image attachments on the message or on what it quotes (up to 4, 8 MiB each) are downloaded and passed to the specialist, which sees them; other file types are named only. Sessions live under `~/.config/astro-discord/sessions/<specialist>/` and are deleted after 7 days. Long answers arrive as a `.md` attachment. When the bridge restarts, open approval requests are marked cancelled and running tasks interrupted in Discord; ask again. Scheduled reports are a list in the config, one entry per report: `"reports": [{ "report": "arcane", "channelId": "<id>", "time": "06:00", "timeZone": "Europe/Madrid" }, { "report": "tools", "channelId": "<admin channel id>", "time": "06:00", "timeZone": "Europe/Madrid" }]` (the earlier single `dailyReport` key is refused; move it into the list). The Arcane report posts an "Arcane Daily Report:" message
|
|
147
|
+
- Channels are configured one by one (`channels.<id>`): `trigger` is `always` (every message that names a specialist counts) or `mention` (only messages that start with `@Cortex` or reply to the bot); `specialists` is `*` or a list. A channel with one specialist needs no prefix: every message there is a task for it. In a channel with several, `dns list the zones` names the specialist; an addressed message without a name gets a reply asking for one. Threads inherit their parent channel's entry; unlisted channels are ignored. The bot replies at once with "<specialist> is working on your task" and shows the typing indicator until the answer replaces that reply. Reactions on your message: ⏳ running, 🔒 waiting for an owner's approval, ✅ done, ❌ failed. `help` shows the specialists you may use in that channel and the commands (`status` lists running tasks; owners in the admin channel also see the `config` commands). Each channel and specialist has one conversation: a reply to the bot's answer, or another task for that specialist within 30 minutes, continues it with everything the specialist saw before; otherwise a new one starts, and a task beginning with `new` forces that. Replied-to and forwarded messages (text, embeds, attachment names) travel with the task, so "check this" on a forwarded alert works. Image attachments on the message or on what it quotes (up to 4, 8 MiB each) are downloaded and passed to the specialist, which sees them; other file types are named only. Sessions live under `~/.config/astro-discord/sessions/<specialist>/` and are deleted after 7 days. Long answers arrive as a `.md` attachment. When the bridge restarts, open approval requests are marked cancelled and running tasks interrupted in Discord; ask again. Scheduled reports are a list in the config, one entry per report: `"reports": [{ "report": "arcane", "channelId": "<id>", "time": "06:00", "timeZone": "Europe/Madrid" }, { "report": "tools", "channelId": "<admin channel id>", "time": "06:00", "timeZone": "Europe/Madrid" }]` (the earlier single `dailyReport` key is refused; move it into the list). A `daily` entry (on Cortex: 05:00 Europe/Paris, the daily channel) starts the morning run and replaces the other reports' own times, except `media-weekly`: it posts the Security, Cortex Tools, and Arcane reports in their own channels, each applying its automatic updates; then it reads every specialist's area (backups, the front door, both Proxmox hosts with their package upgrades and a Reboot button when one is needed, guest updates, RADIUS and both Tailscale routers, the DMZ, DNS with one Technitium node upgraded per morning, Nexus, downloads, and macOS on Cortex and Nexus), tags the owners in the related channel for each problem, and posts a summary without mentions in the daily channel. The Arcane report posts an "Arcane Daily Report:" message from a fresh `update-report`: one section per stack with updates, each service as current to target version with the kind of change, and a release-notes verdict on every pending update. A stack without a major version and without notes that need attention updates on its own after the post and is checked again five minutes later; a failed check rolls back a Compose change, tags the owners, and starts the foreman in a thread. A major whose notes say nothing relevant gets an Update button; anything else gets Upgrade carefully, which opens a thread where the arcane specialist posts a plan and waits for "go". Only owners can press the buttons (Update runs `arcane stack-update <stack>`; the button turns into the outcome and the reason arrives as a note only the clicker sees). Stacks held in `update-holds.json` at the root of the arcane GitOps repository (`{ "supabase": "coordinated release: review first" }`) show the reason and get no button. Replying to the report asks the arcane specialist with the report as context. The tools report posts "Cortex Tools Report:": every tool on Cortex with a newer version (Homebrew packages installed on request and casks, Pi, pi-astro, and through `specialist-install` the wrappers, arcane-cli at the Arcane server's version, trendarr, and the specialist Node at the latest LTS), a release-notes verdict from `astro.release-reviewer` for the tools the specialists build on, an Update button per line, and one Upgrade everything for Homebrew. Lines without a major version or notes that need attention update on their own after the post; Pi always waits for its button, and casks that need a password stay by hand. Only owners can press the buttons. After an update that needs it, the bridge, herdr, or Astrogate restarts as soon as nothing runs on it; after a day of waiting, a Restart now button appears. The bridge calls `sudo -n /usr/local/sbin/specialist-install` through the sudoers rule from step 4.
|
|
145
148
|
- Media: where the `media` specialist is present (`config channel <#channel> always media`), `/trending [type] [min_rating] [count]`, `/search <title> [type]`, and `/downloads <status|pause|resume|unpause>` run the wrapper without a model. `/downloads` answers "⏸️ Downloads are paused" with an Unpause button, or "▶️ Downloads are running"; no answer names the tool behind it. Lists arrive as two messages, Movies and Series, each title with a button beside it: **Add** adds it at once and turns into Added, In library, or Not found (Retry after a failure); a greyed-out In library or No IMDb ID button needs nothing. Notes go only to the user who clicked; when downloads are paused, the note has an **Unpause** button. When the media specialist adds a title by name and downloads stay paused, the bridge posts "⏸️ Downloads are paused" with Unpause under its answer; a click resumes the queue and the message names who resumed it. Owners and `access.media` users may use them; anyone else gets a refusal only they see, and in a channel without `media` the bot names the channels that have it. Plain messages in the channel still go to the agent, for requests by name ("add the new Dune"). A `media-weekly` report entry posts the weekly picks there every Friday at its time: three movies and three series from `recommend`, each with the library titles that led to it, an Add button, and a Not interested button; the owners are tagged when there is something new. A pick nobody acts on stays out for six months; Not interested keeps it out for good (`media-picks.json`). At startup the bridge sets the three commands as the application's global commands (servers only).
|
|
146
149
|
- Arcane manager: when the morning Arcane Daily Report shows a newer manager release, the `arcane` section carries an **Upgrade Arcane to vX** button. Only an owner's click on the newest report runs `arcane manager-upgrade <version>` through the entry point (one at a time, counted as open work so no bridge restart interrupts it); the button turns into the outcome, a reply gives the result, and a successful upgrade installs the matching `arcane-cli` with `specialist-install`.
|
|
147
150
|
- Access: `owners` may use every specialist and decide approvals; `access.<specialist>` lists extra users for that specialist; everyone else gets no reply. Owners change the configuration from the admin channel (`adminChannelId`) without a shell: `config show`, `config channel <#channel> <always|mention> <*|dns,edge>`, `config channel <#channel> remove`, `config access <specialist> add|remove <@user>`; the bot writes `~/.config/astro-discord/config.json` on Cortex, which is also editable by hand and re-read on every message. Deny the bot's role View Channel on channels it must never read; that is the boundary the map cannot provide.
|
|
@@ -151,6 +154,6 @@ The `astro-discord` extension gives Discord users access to the specialists from
|
|
|
151
154
|
|
|
152
155
|
## Rotation and operations
|
|
153
156
|
|
|
154
|
-
Rotation steps for every field live in the homelab repository, `03-cortex-macmini/ROTATION.md`. After any change in Vaultwarden run `specialist-cli provision`. Host state and the sudo rules are documented in `03-cortex-macmini/README.md`; the forced-command scripts are tracked under `02-pulsar-proxmox/dmz/system/`, `02-pulsar-proxmox/pulsar/system/`, `06-space-x-proxmox/system/`, `02-pulsar-proxmox/observability/system/`, `host/` of the `astronaute77/arcane` repository, `04-nexus-macstudio/system/`, and `00-frontdoor-vps/system/`.
|
|
157
|
+
Rotation steps for every field live in the homelab repository, `03-cortex-macmini/ROTATION.md`. After any change in Vaultwarden run `specialist-cli provision`. Host state and the sudo rules are documented in `03-cortex-macmini/README.md`; the forced-command scripts are tracked under `02-pulsar-proxmox/dmz/system/`, `02-pulsar-proxmox/pulsar/system/`, `06-space-x-proxmox/system/`, `01-synapse-dns/system/`, `02-pulsar-proxmox/observability/system/`, `host/` of the `astronaute77/arcane` repository, `04-nexus-macstudio/system/`, and `00-frontdoor-vps/system/`.
|
|
155
158
|
|
|
156
|
-
All
|
|
159
|
+
All ten specialists exist. See `AGENTS.md` for how to add one.
|
package/specialists/edge/run.ts
CHANGED
|
@@ -210,6 +210,8 @@ async function vps(config: EdgeConfig, args: string[]): Promise<number> {
|
|
|
210
210
|
return 0;
|
|
211
211
|
}
|
|
212
212
|
if (result.code !== 0) throw new ServiceError(result.stderr.trim() || `vps ${args[0]} exited ${result.code}`);
|
|
213
|
+
// nginx -t reports success on stderr.
|
|
214
|
+
if (remote === "nginx-test" && result.stderr.trim().length > 0) printRaw(result.stderr);
|
|
213
215
|
return 0;
|
|
214
216
|
}
|
|
215
217
|
|
|
@@ -44,7 +44,7 @@ export const INFERENCE_COMMANDS: Readonly<Record<string, RemoteSpec>> = {
|
|
|
44
44
|
|
|
45
45
|
const NEXUS_SERVICES = ["embed", "rerank"];
|
|
46
46
|
|
|
47
|
-
const HELP = `inference specialist (
|
|
47
|
+
const HELP = `inference specialist (MLX embedding and reranking on Nexus, Europa health)
|
|
48
48
|
|
|
49
49
|
<command> [args] fixed operations through forced-command SSH keys
|
|
50
50
|
${Object.entries(INFERENCE_COMMANDS)
|