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