fix: resolve ci type errors and reconnect test flake

This commit is contained in:
Peter Steinberger
2026-02-22 21:35:11 +00:00
parent d75b594e07
commit 7c109f5737
8 changed files with 59 additions and 23 deletions

View File

@@ -76,8 +76,15 @@ describe("buildWorkspaceSkillSnapshot", () => {
config,
managedSkillsDir: path.join(workspaceDir, ".managed"),
bundledSkillsDir: path.join(workspaceDir, ".bundled"),
eligibility: { remote: { note: "Remote note" } },
} as const;
eligibility: {
remote: {
platforms: ["linux"],
hasBin: (_bin: string) => true,
hasAnyBin: (_bins: string[]) => true,
note: "Remote note",
},
},
};
const snapshot = buildWorkspaceSkillSnapshot(workspaceDir, opts);
const prompt = buildWorkspaceSkillsPrompt(workspaceDir, opts);

View File

@@ -1,4 +1,5 @@
import crypto from "node:crypto";
import type { AgentToolResult } from "@mariozechner/pi-agent-core";
import {
browserAct,
browserArmDialog,
@@ -54,14 +55,17 @@ function wrapBrowserExternalJson(params: {
};
}
function formatTabsToolResult(tabs: unknown[]) {
function formatTabsToolResult(tabs: unknown[]): AgentToolResult<unknown> {
const wrapped = wrapBrowserExternalJson({
kind: "tabs",
payload: { tabs },
includeWarning: false,
});
const content: AgentToolResult<unknown>["content"] = [
{ type: "text", text: wrapped.wrappedText },
];
return {
content: [{ type: "text", text: wrapped.wrappedText }],
content,
details: { ...wrapped.safeDetails, tabCount: tabs.length },
};
}