mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 04:31:10 +00:00
fix(agents): split skill install result types
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
8
src/agents/skills-install.types.ts
Normal file
8
src/agents/skills-install.types.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export type SkillInstallResult = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
stdout: string;
|
||||
stderr: string;
|
||||
code: number | null;
|
||||
warnings?: string[];
|
||||
};
|
||||
Reference in New Issue
Block a user