@astrofoundry/pi-astro 0.40.76 → 0.40.78
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/extensions/astro-discord/arcane-watch.test.ts +3 -3
- package/extensions/astro-discord/arcane-watch.ts +3 -3
- package/extensions/astro-discord/daily-report.test.ts +14 -14
- package/extensions/astro-discord/daily-report.ts +20 -20
- package/extensions/astro-discord/daily-run.test.ts +7 -7
- package/extensions/astro-discord/daily-run.ts +9 -9
- package/extensions/astro-discord/index.ts +7 -7
- package/extensions/astro-discord/security-monitor.test.ts +8 -8
- package/extensions/astro-discord/security-monitor.ts +15 -15
- package/extensions/astro-discord/security.test.ts +40 -40
- package/extensions/astro-discord/security.ts +39 -39
- package/extensions/astro-discord/supervise.test.ts +1 -1
- package/extensions/astro-discord/supervise.ts +2 -2
- package/extensions/astro-discord/tools-report.test.ts +6 -6
- package/extensions/astro-discord/tools-report.ts +12 -12
- package/package.json +1 -1
- package/skills/arcane/SKILL.md +2 -2
- package/specialists/entry/remote/spc-arcane-op.py +3 -3
- package/specialists/lib/arcane-host.test.ts +4 -0
- package/specialists/lib/arcane-host.ts +2 -2
|
@@ -252,7 +252,7 @@ export function buildLines(c: Collected): ToolLine[] {
|
|
|
252
252
|
for (const k of casks.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
253
253
|
if (k.pinned) continue;
|
|
254
254
|
const l = line(`cask:${k.name}`, k.name, k.installed, k.latest, { kind: "cask", token: k.name });
|
|
255
|
-
if (packages.has(k.name)) l.manual = `
|
|
255
|
+
if (packages.has(k.name)) l.manual = `installer needs your password; on Cortex: brew upgrade --cask ${k.name}`;
|
|
256
256
|
lines.push(l);
|
|
257
257
|
}
|
|
258
258
|
return lines;
|
|
@@ -394,7 +394,7 @@ export async function collectTools(options: CollectOptions): Promise<Collected>
|
|
|
394
394
|
try {
|
|
395
395
|
const res = await options.fetchImpl("https://nodejs.org/dist/index.json", { signal: AbortSignal.timeout(30_000) });
|
|
396
396
|
nodeLts = res.ok ? latestLts(await res.json()) : null;
|
|
397
|
-
if (!nodeLts) warnings.push(`nodejs.org index answered ${res.status}
|
|
397
|
+
if (!nodeLts) warnings.push(`nodejs.org index answered ${res.status}, no LTS release`);
|
|
398
398
|
} catch (err) {
|
|
399
399
|
warnings.push(`nodejs.org index failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
400
400
|
}
|
|
@@ -414,13 +414,13 @@ export async function collectTools(options: CollectOptions): Promise<Collected>
|
|
|
414
414
|
// Only for tools the installer manages; the first install of each is a manual step.
|
|
415
415
|
const python = installedComponent(installer, "python");
|
|
416
416
|
const pythonLatest = python ? pythonBuild(await fetchJson("https://api.github.com/repos/astral-sh/python-build-standalone/releases/latest", "python-build-standalone"), python.split(".").slice(0, 2).join(".")) : null;
|
|
417
|
-
const gcloudLatest = installedComponent(installer, "gcloud") ? gcloudRelease(await fetchJson("https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json", "
|
|
417
|
+
const gcloudLatest = installedComponent(installer, "gcloud") ? gcloudRelease(await fetchJson("https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json", "gcloud release snapshot")) : null;
|
|
418
418
|
const bwLatest = installedComponent(installer, "bw") ? bwRelease(await fetchJson("https://api.github.com/repos/bitwarden/clients/releases?per_page=30", "bitwarden/clients releases")) : null;
|
|
419
419
|
const jqLatest = installedComponent(installer, "jq") ? jqRelease(await fetchJson("https://api.github.com/repos/jqlang/jq/releases/latest", "jqlang/jq releases")) : null;
|
|
420
420
|
let arcaneServer: string | null = null;
|
|
421
421
|
try {
|
|
422
422
|
arcaneServer = await options.arcaneServer();
|
|
423
|
-
if (!arcaneServer) warnings.push("
|
|
423
|
+
if (!arcaneServer) warnings.push("Arcane server reported no version");
|
|
424
424
|
} catch (err) {
|
|
425
425
|
warnings.push(`Arcane server version failed: ${firstLine(err instanceof Error ? err.message : String(err))}`);
|
|
426
426
|
}
|
|
@@ -505,7 +505,7 @@ export type NotesResult = { notes: ReleaseNote[]; omitted: string[] } | { notes:
|
|
|
505
505
|
export async function notesFor(line: ToolLine, fetchImpl: typeof fetch): Promise<NotesResult> {
|
|
506
506
|
const source = REVIEW_SOURCES[line.key];
|
|
507
507
|
if (!source) return { notes: null, reason: "not reviewed" };
|
|
508
|
-
if (!source.repo) return { notes: null, reason: `no release notes
|
|
508
|
+
if (!source.repo) return { notes: null, reason: `no release notes here; see ${source.notesUrl ?? "the vendor's site"}` };
|
|
509
509
|
let releases: GithubRelease[];
|
|
510
510
|
try {
|
|
511
511
|
releases = withoutPrefix(await fetchReleases(source.repo, fetchImpl), source.tagPrefix);
|
|
@@ -513,7 +513,7 @@ export async function notesFor(line: ToolLine, fetchImpl: typeof fetch): Promise
|
|
|
513
513
|
return { notes: null, reason: `release notes unavailable: ${err instanceof Error ? err.message : String(err)}` };
|
|
514
514
|
}
|
|
515
515
|
const between = releasesBetween(releases, line.installed, line.latest);
|
|
516
|
-
if (between.length === 0) return { notes: null, reason: "GitHub
|
|
516
|
+
if (between.length === 0) return { notes: null, reason: "no GitHub release between the versions" };
|
|
517
517
|
return capTotal(between);
|
|
518
518
|
}
|
|
519
519
|
|
|
@@ -673,7 +673,7 @@ function stateButton(state: LineState, customId: string, offeredLabel: string):
|
|
|
673
673
|
const VERDICT_MARK: Record<Verdict, string> = { none: "🟢 nothing relevant", check: "🟡 check", breaking: "🔴 breaking" };
|
|
674
674
|
|
|
675
675
|
export function lineText(l: ToolLine): string {
|
|
676
|
-
const head = `**${escapeDiscord(l.label)}** ${escapeDiscord(l.installed)} → ${escapeDiscord(l.latest)}${l.major ? " · major
|
|
676
|
+
const head = `**${escapeDiscord(l.label)}** ${escapeDiscord(l.installed)} → ${escapeDiscord(l.latest)}${l.major ? " · major" : ""}`;
|
|
677
677
|
const notes = l.review ? `\n-# ${l.review.verdict ? `${VERDICT_MARK[l.review.verdict]}: ` : "notes: "}${escapeDiscord(l.review.reason)}` : "";
|
|
678
678
|
const detail = l.detail ? `\n-# ${escapeDiscord(l.detail)}` : "";
|
|
679
679
|
const manual = l.manual ? `\n-# ${escapeDiscord(l.manual)}` : "";
|
|
@@ -688,13 +688,13 @@ function lineSection(l: ToolLine): MessageComponent {
|
|
|
688
688
|
? l.plan === "auto" && l.state === "offered"
|
|
689
689
|
? { type: 2, style: SECONDARY, label: "Automatic", custom_id: id, disabled: true }
|
|
690
690
|
: stateButton(l.state, id, "Update")
|
|
691
|
-
: { type: 2, style: SECONDARY, label: "
|
|
691
|
+
: { type: 2, style: SECONDARY, label: "By hand", custom_id: `tools:none:${l.key}`.slice(0, CUSTOM_ID_MAX), disabled: true };
|
|
692
692
|
return { type: 9, components: [{ type: 10, content: lineText(l) }], accessory };
|
|
693
693
|
}
|
|
694
694
|
|
|
695
695
|
function allSection(report: ToolsReport): MessageComponent {
|
|
696
696
|
const detail = report.brewAllDetail ? `\n-# ${escapeDiscord(report.brewAllDetail)}` : "";
|
|
697
|
-
return { type: 9, components: [{ type: 10, content: `**Homebrew**: upgrade
|
|
697
|
+
return { type: 9, components: [{ type: 10, content: `**Homebrew**: upgrade all outdated formulae, dependencies included${detail}` }], accessory: stateButton(report.brewAll, allId(report.date), "Upgrade everything") };
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
function clock(iso: string, timeZone: string): string {
|
|
@@ -705,7 +705,7 @@ function headText(report: ToolsReport): MessageComponent {
|
|
|
705
705
|
const when = `checked ${clock(report.checkedAt, report.timeZone)}`;
|
|
706
706
|
const head =
|
|
707
707
|
report.lines.length === 0 && !report.brewOutdated
|
|
708
|
-
? `**${TOOLS_PREFIX}**
|
|
708
|
+
? `**${TOOLS_PREFIX}** all up to date (${when}).`
|
|
709
709
|
: `**${TOOLS_PREFIX}** ${report.lines.length} update${report.lines.length === 1 ? "" : "s"} (${when}).`;
|
|
710
710
|
const warnings = report.warnings.length > 0 ? `\n-# ⚠️ ${escapeDiscord(report.warnings.join(" · ")).slice(0, 800)}` : "";
|
|
711
711
|
const automatic = report.lines.filter((l) => l.plan === "auto").length;
|
|
@@ -713,7 +713,7 @@ function headText(report: ToolsReport): MessageComponent {
|
|
|
713
713
|
const attention = report.lines.filter((l) => l.plan === "update");
|
|
714
714
|
const needs =
|
|
715
715
|
attention.length > 0 && report.mention && report.mention.length > 0
|
|
716
|
-
? `\n${report.mention.map((id) => `<@${id}>`).join(" ")} ${attention.length} update${attention.length === 1 ? " needs" : "s need"} you: ${attention.map((l) => `${escapeDiscord(l.label)}${l.major ? " (major
|
|
716
|
+
? `\n${report.mention.map((id) => `<@${id}>`).join(" ")} ${attention.length} update${attention.length === 1 ? " needs" : "s need"} you: ${attention.map((l) => `${escapeDiscord(l.label)}${l.major ? " (major)" : " (release notes)"}`).join(", ")}`
|
|
717
717
|
: "";
|
|
718
718
|
return { type: 10, content: `${head}${warnings}${plan}${needs}` };
|
|
719
719
|
}
|
|
@@ -779,5 +779,5 @@ export function writePostedReport(report: ToolsReport): void {
|
|
|
779
779
|
}
|
|
780
780
|
|
|
781
781
|
export function failureText(): string {
|
|
782
|
-
return `${TOOLS_PREFIX}
|
|
782
|
+
return `${TOOLS_PREFIX} version check failed, no update list today. Reason in the bridge log on Cortex.`;
|
|
783
783
|
}
|
package/package.json
CHANGED
package/skills/arcane/SKILL.md
CHANGED
|
@@ -83,9 +83,9 @@ The usual trigger is the owner's **Upgrade Arcane** button under the Arcane Dail
|
|
|
83
83
|
|
|
84
84
|
## Arcane VM operations
|
|
85
85
|
|
|
86
|
-
`["host", "<command>", ...]` runs fixed operations on VM 100 through the key of user `spc-arcane`. The checks print only allowlisted fields; raw logs and journal text never leave the guest. `["host", "--help"]` is the wrapper's help.
|
|
86
|
+
`["host", "<command>", ...]` runs fixed operations on VM 100 through the key of user `spc-arcane`. The checks print only allowlisted fields; raw logs and journal text never leave the guest, except `container-logs … text`, which masks credentials first. `["host", "--help"]` is the wrapper's help.
|
|
87
87
|
|
|
88
|
-
- `container-memory <name>`, `container-stats [name...]` (60 s sample), `container-logs <name> <since> <until> [docker|bazarr-file]` (sanitized event extracts, UTC like `2026-09-06T12:15:00Z`, at most one day), `container-oom <name> <since> <until>`, `kernel-oom <since> <until>`.
|
|
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
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>`.
|
|
91
91
|
- `radarr-movie <tt…> [command-id]` and `radarr-interface` read Radarr's key from its host config; each needs an owner's approval.
|
|
@@ -229,13 +229,13 @@ def op_container_stats(args):
|
|
|
229
229
|
|
|
230
230
|
|
|
231
231
|
def op_container_logs(args):
|
|
232
|
-
usage = "container-logs <name> <since> <until> [docker|bazarr-file] (UTC like 2026-09-06T12:15:00Z)"
|
|
232
|
+
usage = "container-logs <name> <since> <until> [docker|text|bazarr-file] (UTC like 2026-09-06T12:15:00Z)"
|
|
233
233
|
arity(args, 3, 4, usage)
|
|
234
234
|
name = need(NAME, args[0], usage)
|
|
235
235
|
since, until = window_args(args[1:3], usage)
|
|
236
236
|
source = args[3] if len(args) == 4 else "docker"
|
|
237
|
-
if source not in ("docker", "bazarr-file") or (source == "bazarr-file" and name != "bazarr"):
|
|
238
|
-
raise Refused("
|
|
237
|
+
if source not in ("docker", "text", "bazarr-file") or (source == "bazarr-file" and name != "bazarr"):
|
|
238
|
+
raise Refused("source: docker, text, or bazarr-file (bazarr only)")
|
|
239
239
|
probe("incident_probe", {"kind": "container_logs", "name": name, "since": since, "until": until, "source": source})
|
|
240
240
|
|
|
241
241
|
|
|
@@ -25,6 +25,9 @@ describe("Arcane host commands", () => {
|
|
|
25
25
|
expect(buildHostRemote(["container-logs", "bazarr", "2026-09-06T12:00:00Z", "2026-09-06T12:15:00Z", "bazarr-file"]).remote).toBe(
|
|
26
26
|
"container-logs bazarr 2026-09-06T12:00:00Z 2026-09-06T12:15:00Z bazarr-file",
|
|
27
27
|
);
|
|
28
|
+
expect(buildHostRemote(["container-logs", "slskd", "2026-09-06T12:00:00Z", "2026-09-06T12:15:00Z", "text"]).remote).toBe(
|
|
29
|
+
"container-logs slskd 2026-09-06T12:00:00Z 2026-09-06T12:15:00Z text",
|
|
30
|
+
);
|
|
28
31
|
expect(buildHostRemote(["db-restore", "mealie", "20261019T120000Z"]).name).toBe("db-restore");
|
|
29
32
|
expect(buildHostRemote(["mealie-api"]).spec.stdinSecret).toBe("MEALIE_API_KEY");
|
|
30
33
|
expect(buildHostRemote(["supabase-backup"]).remote).toBe("supabase-backup");
|
|
@@ -35,6 +38,7 @@ describe("Arcane host commands", () => {
|
|
|
35
38
|
["rm"],
|
|
36
39
|
["container-memory", "a b"],
|
|
37
40
|
["container-logs", "sonarr", "2026-09-06T12:00:00Z", "2026-09-06T12:15:00Z", "bazarr-file"],
|
|
41
|
+
["container-logs", "slskd", "2026-09-06T12:00:00Z", "2026-09-06T12:15:00Z", "raw"],
|
|
38
42
|
["kernel-oom", "yesterday", "today"],
|
|
39
43
|
["host-storage", "etc"],
|
|
40
44
|
["service-check", "supabase-studio"],
|
|
@@ -25,7 +25,7 @@ export interface HostCommand {
|
|
|
25
25
|
export const HOST_COMMANDS: Readonly<Record<string, HostCommand>> = {
|
|
26
26
|
"container-memory": { args: [1, 1], help: "container-memory <name> one memory sample and the configured limits", timeoutMs: MINUTE },
|
|
27
27
|
"container-stats": { args: [0, 8], help: "container-stats [name...] 60 s CPU and memory sample (default: the Grimoire workers)", timeoutMs: 2 * MINUTE },
|
|
28
|
-
"container-logs": { args: [3, 4], help: "container-logs <name> <since> <until> [docker|bazarr-file] sanitized event extracts, UTC window ≤ 1 day", timeoutMs: 2 * MINUTE },
|
|
28
|
+
"container-logs": { args: [3, 4], help: "container-logs <name> <since> <until> [docker|text|bazarr-file] sanitized event extracts, or with text the newest 300 lines with credentials masked; UTC window ≤ 1 day", timeoutMs: 2 * MINUTE },
|
|
29
29
|
"container-oom": { args: [3, 3], help: "container-oom <name> <since> <until> OOMKilled flag, limits, retained oom events", timeoutMs: 2 * MINUTE },
|
|
30
30
|
"kernel-oom": { args: [2, 2], help: "kernel-oom <since> <until> sanitized kernel OOM records from the journal", timeoutMs: MINUTE },
|
|
31
31
|
"host-audit": { args: [0, 0], help: "host-audit installed host files and units, compared with the repository's host/", timeoutMs: MINUTE },
|
|
@@ -96,7 +96,7 @@ export function buildHostRemote(args: string[], allowInternal = false): { remote
|
|
|
96
96
|
case "container-oom":
|
|
97
97
|
check(NAME.test(rest[0]), "container name: letters, digits, dot, dash, underscore");
|
|
98
98
|
check(UTC.test(rest[1]) && UTC.test(rest[2]), "since and until are UTC like 2026-09-06T12:15:00Z");
|
|
99
|
-
if (rest[3] !== undefined) check(rest[3] === "docker" || (rest[3] === "bazarr-file" && rest[0] === "bazarr"), "source: docker, or bazarr-file for bazarr");
|
|
99
|
+
if (rest[3] !== undefined) check(rest[3] === "docker" || rest[3] === "text" || (rest[3] === "bazarr-file" && rest[0] === "bazarr"), "source: docker, text, or bazarr-file for bazarr");
|
|
100
100
|
break;
|
|
101
101
|
case "kernel-oom":
|
|
102
102
|
check(UTC.test(rest[0]) && UTC.test(rest[1]), "since and until are UTC like 2026-09-06T12:15:00Z");
|