fix(agents): split skill install result types

This commit is contained in:
Vincent Koc
2026-04-09 07:45:18 +01:00
parent ea54beb08a
commit b7cc36161c
3 changed files with 11 additions and 10 deletions

View File

@@ -14,7 +14,7 @@ import { normalizeOptionalLowercaseString } from "../shared/string-coerce.js";
import { ensureDir, resolveUserPath } from "../utils.js";
import { extractArchive } from "./skills-install-extract.js";
import { formatInstallFailureMessage } from "./skills-install-output.js";
import type { SkillInstallResult } from "./skills-install.js";
import type { SkillInstallResult } from "./skills-install.types.js";
import type { SkillEntry, SkillInstallSpec } from "./skills.js";
import { resolveSkillToolsRootDir } from "./skills/tools-dir.js";

View File

@@ -12,6 +12,7 @@ import { runCommandWithTimeout, type CommandOptions } from "../process/exec.js";
import { resolveUserPath } from "../utils.js";
import { installDownloadSpec } from "./skills-install-download.js";
import { formatInstallFailureMessage } from "./skills-install-output.js";
import type { SkillInstallResult } from "./skills-install.types.js";
import {
hasBinary,
loadWorkspaceSkillEntries,
@@ -29,15 +30,7 @@ export type SkillInstallRequest = InstallSafetyOverrides & {
timeoutMs?: number;
config?: OpenClawConfig;
};
export type SkillInstallResult = {
ok: boolean;
message: string;
stdout: string;
stderr: string;
code: number | null;
warnings?: string[];
};
export type { SkillInstallResult } from "./skills-install.types.js";
function withWarnings(result: SkillInstallResult, warnings: string[]): SkillInstallResult {
if (warnings.length === 0) {

View File

@@ -0,0 +1,8 @@
export type SkillInstallResult = {
ok: boolean;
message: string;
stdout: string;
stderr: string;
code: number | null;
warnings?: string[];
};