@astrofoundry/pi-astro 0.40.78 → 0.40.80

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrofoundry/pi-astro",
3
- "version": "0.40.78",
3
+ "version": "0.40.80",
4
4
  "description": "Personal pi customizations (extensions, subagents, skills, prompts, themes) for the pi coding agent.",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -87,7 +87,7 @@ The usual trigger is the owner's **Upgrade Arcane** button under the Arcane Dail
87
87
 
88
88
  - `container-memory <name>`, `container-stats [name...]` (60 s sample), `container-logs <name> <since> <until> [docker|text|bazarr-file]` (sanitized event extracts, UTC like `2026-09-06T12:15:00Z`, at most one day; when the extracts say `withheld`, add `text` for the newest 300 lines with credentials masked, such as a startup error, and call them redacted log lines), `container-oom <name> <since> <until>`, `kernel-oom <since> <until>`.
89
89
  - `host-audit` (installed host files and units, compared with `host/` in the repository), `host-capacity`, `host-storage [area]`, `docker-usage`.
90
- - `service-check grimoire|mealie` (guest-local endpoints), `crawl4ai-info`, `recyclarr-naming`, `arcane-version`, `queue-callback`, `bazarr-providers`, `mealie-api`, `queue-job <uuid>`, `object-stat grimoire <path>`.
90
+ - `service-check grimoire|mealie` (guest-local endpoints), `crawl4ai-info`, `recyclarr-naming`, `arcane-version`, `queue-callback`, `bazarr-providers`, `mealie-api`, `queue-job <uuid>`, `object-stat grimoire|media <path>` (kind, size, owner, mode, and age; `media` is the NAS media share mounted at `/media` in the media containers, so a container's missing-folder error can be checked there; `"error": "EACCES"` there means the encrypted `MEDIA` share on the UNAS refuses access, usually locked after a NAS restart: ask the owner to unlock `MEDIA` in UNAS, as `media/README.md` "After a NAS update or restart" describes).
91
91
  - `radarr-movie <tt…> [command-id]` and `radarr-interface` read Radarr's key from its host config; each needs an owner's approval.
92
92
  - `db-list mealie|paperless`, `db-dump mealie|paperless` (gzip pg_dump into `/var/backups/spc-arcane/<stack>/<UTC>`, checked, with row counts), `db-restore <stack> <stamp>` (owner approval): fills an **empty** database from one of those dumps, the app container stopped meanwhile. It refuses a database that holds tables; emptying one is an operator decision. Dumps are never deleted by the tool; `db-list` names those beyond the last three in `over_keep`.
93
93
  - `supabase-backup`: the backup `supabase/AGENTS.md` asks for before a Supabase change. It writes custom-format dumps of `postgres` and `_supabase`, `globals.sql`, and `db-config.tar.gz` (the pgsodium root key) into `/var/backups/supabase-upgrades/<UTC>`, checks each dump with pg_restore's listing and full decoding, and prints the manifest with the image's repo digests (record them as the rollback digest). It refuses when the disk has less free space than the databases. Restoring stays an operator step.
@@ -116,7 +116,7 @@ LOOPBACK_CHECKS = {
116
116
  "mealie": "http://127.0.0.1:8083/api/recipes?page=1&perPage=1",
117
117
  }
118
118
  MEALIE_API = "http://127.0.0.1:8083/api/recipes?page=1&perPage=1"
119
- OBJECT_ROOTS = {"grimoire": "/var/lib/grimoire/object-store"}
119
+ OBJECT_ROOTS = {"grimoire": "/var/lib/grimoire/object-store", "media": "/var/lib/docker/volumes/nas_media/_data"}
120
120
  CAPACITY_PATHS = {"containerd": "/var/lib/containerd", "grimoire": "/var/lib/grimoire/object-store"}
121
121
  STORAGE_AREAS = (
122
122
  "root", "var", "var-lib", "logs", "docker", "volumes", "container-logs", "containerd", "grimoire",
@@ -319,7 +319,7 @@ def op_queue_job(args):
319
319
 
320
320
 
321
321
  def op_object_stat(args):
322
- usage = "object-stat grimoire <relative path>"
322
+ usage = "object-stat grimoire|media <relative path>"
323
323
  arity(args, 2, 2, usage)
324
324
  if args[0] not in OBJECT_ROOTS:
325
325
  raise Refused(usage)
@@ -28,6 +28,7 @@ describe("Arcane host commands", () => {
28
28
  expect(buildHostRemote(["container-logs", "slskd", "2026-09-06T12:00:00Z", "2026-09-06T12:15:00Z", "text"]).remote).toBe(
29
29
  "container-logs slskd 2026-09-06T12:00:00Z 2026-09-06T12:15:00Z text",
30
30
  );
31
+ expect(buildHostRemote(["object-stat", "media", "downloads/slsk"]).remote).toBe("object-stat media downloads/slsk");
31
32
  expect(buildHostRemote(["db-restore", "mealie", "20261019T120000Z"]).name).toBe("db-restore");
32
33
  expect(buildHostRemote(["mealie-api"]).spec.stdinSecret).toBe("MEALIE_API_KEY");
33
34
  expect(buildHostRemote(["supabase-backup"]).remote).toBe("supabase-backup");
@@ -42,7 +42,7 @@ export const HOST_COMMANDS: Readonly<Record<string, HostCommand>> = {
42
42
  "radarr-interface": { args: [0, 0], help: "radarr-interface Radarr's queue actions from its interface bundle (host config key; owner approval)", timeoutMs: 2 * MINUTE },
43
43
  "radarr-movie": { args: [1, 2], help: "radarr-movie <tt…> [command-id] naming, file, queue and import state of one movie (host config key; owner approval)", timeoutMs: 2 * MINUTE },
44
44
  "queue-job": { args: [1, 1], help: "queue-job <uuid> Grimoire queue receipt, attempts, retry time, lock state", timeoutMs: MINUTE },
45
- "object-stat": { args: [2, 2], help: "object-stat grimoire <path> one object's metadata and age", timeoutMs: MINUTE },
45
+ "object-stat": { args: [2, 2], help: "object-stat grimoire|media <path> one object's kind, size, owner, mode, and age (media: the NAS media share)", timeoutMs: MINUTE },
46
46
  "db-list": { args: [1, 1], help: "db-list mealie|paperless this tool's dumps, newest last, with checksums and row counts", timeoutMs: MINUTE },
47
47
  "db-dump": { args: [1, 1], help: "db-dump mealie|paperless pg_dump into /var/backups/spc-arcane/<stack>/<UTC> (gzip, checked, sha256)", timeoutMs: 60 * MINUTE },
48
48
  "db-restore": { args: [2, 2], help: "db-restore <stack> <stamp> fill an EMPTY database from one of these dumps, the app stopped meanwhile (owner approval)", timeoutMs: 60 * MINUTE },
@@ -115,7 +115,7 @@ export function buildHostRemote(args: string[], allowInternal = false): { remote
115
115
  check(UUID.test(rest[0]), "a lowercase job UUID");
116
116
  break;
117
117
  case "object-stat":
118
- check(rest[0] === "grimoire", "object-stat grimoire <path>");
118
+ check(rest[0] === "grimoire" || rest[0] === "media", "object-stat grimoire|media <path>");
119
119
  check(OBJECT_PATH.test(rest[1]) && !rest[1].split("/").some((p) => p === "" || p === "." || p === ".." || p.startsWith(".")), "a relative path without hidden parts or traversal");
120
120
  break;
121
121
  case "db-list":