mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 03:45:46 -06:00
refactor(skills): hide internal result types
This commit is contained in:
@@ -18,7 +18,7 @@ export type SkillIndexEntry = {
|
||||
userInvocable: boolean;
|
||||
};
|
||||
|
||||
export type SkillIndex = {
|
||||
type SkillIndex = {
|
||||
entries: SkillIndexEntry[];
|
||||
runtimeEntries: SkillEntry[];
|
||||
promptVisibleEntries: SkillEntry[];
|
||||
@@ -27,7 +27,7 @@ export type SkillIndex = {
|
||||
byNormalizedName: ReadonlyMap<string, readonly SkillIndexEntry[]>;
|
||||
};
|
||||
|
||||
export type BuildSkillIndexOptions = {
|
||||
type BuildSkillIndexOptions = {
|
||||
bundledNames?: ReadonlySet<string>;
|
||||
agentSkillFilter?: readonly string[];
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ type SkillArchiveInstallPolicy = {
|
||||
};
|
||||
|
||||
/** Result shape for installing a skill archive into a workspace skills dir. */
|
||||
export type SkillArchiveInstallResult =
|
||||
type SkillArchiveInstallResult =
|
||||
| { ok: true; targetDir: string }
|
||||
| { ok: false; error: string; failureKind: SkillArchiveInstallFailureKind };
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import { runCommandWithTimeout } from "../../process/exec.js";
|
||||
import { hasBinary } from "../loading/config.js";
|
||||
import { parseTarVerboseMetadata } from "./install-tar-verbose.js";
|
||||
|
||||
export type ArchiveExtractResult = { stdout: string; stderr: string; code: number | null };
|
||||
type ArchiveExtractResult = { stdout: string; stderr: string; code: number | null };
|
||||
type TarPreflightResult = {
|
||||
entries: string[];
|
||||
metadata: ReturnType<typeof parseTarVerboseMetadata>;
|
||||
|
||||
@@ -34,7 +34,7 @@ type SkillSourceOrigin = {
|
||||
};
|
||||
};
|
||||
|
||||
export type SkillSourceInstallResult =
|
||||
type SkillSourceInstallResult =
|
||||
| {
|
||||
ok: true;
|
||||
slug: string;
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
} from "./upload-store.js";
|
||||
|
||||
/** Error classes exposed by uploaded skill archive install attempts. */
|
||||
export type UploadedSkillInstallErrorKind = "invalid-request" | "unavailable";
|
||||
type UploadedSkillInstallErrorKind = "invalid-request" | "unavailable";
|
||||
|
||||
/** User-facing disabled message for archive upload installs. */
|
||||
export const UPLOADED_SKILL_ARCHIVES_DISABLED_MESSAGE =
|
||||
@@ -25,7 +25,7 @@ export function areUploadedSkillArchivesEnabled(config: OpenClawConfig): boolean
|
||||
return config.skills?.install?.allowUploadedArchives === true;
|
||||
}
|
||||
|
||||
export type UploadedSkillInstallResult =
|
||||
type UploadedSkillInstallResult =
|
||||
| {
|
||||
ok: true;
|
||||
message: string;
|
||||
|
||||
Reference in New Issue
Block a user