fix: repair CI formatting + launchd test
This commit is contained in:
@@ -88,10 +88,7 @@ export function getSkillsSnapshotVersion(workspaceDir?: string): number {
|
||||
return Math.max(globalVersion, local);
|
||||
}
|
||||
|
||||
export function ensureSkillsWatcher(params: {
|
||||
workspaceDir: string;
|
||||
config?: ClawdbotConfig;
|
||||
}) {
|
||||
export function ensureSkillsWatcher(params: { workspaceDir: string; config?: ClawdbotConfig }) {
|
||||
const workspaceDir = params.workspaceDir.trim();
|
||||
if (!workspaceDir) return;
|
||||
const watchEnabled = params.config?.skills?.load?.watch !== false;
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import crypto from "node:crypto";
|
||||
|
||||
import { buildWorkspaceSkillSnapshot } from "../../agents/skills.js";
|
||||
import {
|
||||
ensureSkillsWatcher,
|
||||
getSkillsSnapshotVersion,
|
||||
} from "../../agents/skills/refresh.js";
|
||||
import { ensureSkillsWatcher, getSkillsSnapshotVersion } from "../../agents/skills/refresh.js";
|
||||
import type { ClawdbotConfig } from "../../config/config.js";
|
||||
import { type SessionEntry, updateSessionStore } from "../../config/sessions.js";
|
||||
import { buildChannelSummary } from "../../infra/channel-summary.js";
|
||||
@@ -137,7 +134,7 @@ export async function ensureSkillSnapshot(params: {
|
||||
eligibility: { remote: remoteEligibility },
|
||||
snapshotVersion,
|
||||
})
|
||||
: nextEntry?.skillsSnapshot ??
|
||||
: (nextEntry?.skillsSnapshot ??
|
||||
(isFirstTurnInSession
|
||||
? undefined
|
||||
: buildWorkspaceSkillSnapshot(workspaceDir, {
|
||||
@@ -145,7 +142,7 @@ export async function ensureSkillSnapshot(params: {
|
||||
skillFilter,
|
||||
eligibility: { remote: remoteEligibility },
|
||||
snapshotVersion,
|
||||
}));
|
||||
})));
|
||||
if (
|
||||
skillsSnapshot &&
|
||||
sessionStore &&
|
||||
|
||||
@@ -84,7 +84,7 @@ describe("launchd install", () => {
|
||||
|
||||
const domain = typeof process.getuid === "function" ? `gui/${process.getuid()}` : "gui/501";
|
||||
const label = "com.clawdbot.gateway";
|
||||
const plistPath = path.join(homeDir, "Library", "LaunchAgents", `${label}.plist`);
|
||||
const plistPath = resolveLaunchAgentPlistPath(env);
|
||||
const serviceId = `${domain}/${label}`;
|
||||
|
||||
const enableCalls = calls.filter((c) => c[0] === "enable" && c[1] === serviceId);
|
||||
|
||||
@@ -21,8 +21,12 @@ const remoteNodes = new Map<string, RemoteNodeRecord>();
|
||||
let remoteBridge: NodeBridgeServer | null = null;
|
||||
|
||||
function isMacPlatform(platform?: string, deviceFamily?: string): boolean {
|
||||
const platformNorm = String(platform ?? "").trim().toLowerCase();
|
||||
const familyNorm = String(deviceFamily ?? "").trim().toLowerCase();
|
||||
const platformNorm = String(platform ?? "")
|
||||
.trim()
|
||||
.toLowerCase();
|
||||
const familyNorm = String(deviceFamily ?? "")
|
||||
.trim()
|
||||
.toLowerCase();
|
||||
if (platformNorm.includes("mac")) return true;
|
||||
if (platformNorm.includes("darwin")) return true;
|
||||
if (familyNorm === "mac") return true;
|
||||
@@ -196,9 +200,7 @@ export function getRemoteSkillEligibility(): SkillEligibilityContext["remote"] |
|
||||
for (const node of macNodes) {
|
||||
for (const bin of node.bins) bins.add(bin);
|
||||
}
|
||||
const labels = macNodes
|
||||
.map((node) => node.displayName ?? node.nodeId)
|
||||
.filter(Boolean);
|
||||
const labels = macNodes.map((node) => node.displayName ?? node.nodeId).filter(Boolean);
|
||||
const note =
|
||||
labels.length > 0
|
||||
? `Remote macOS node available (${labels.join(", ")}). Run macOS-only skills via nodes.run on that node.`
|
||||
|
||||
Reference in New Issue
Block a user