refactor(skills): hide internal result types

This commit is contained in:
Vincent Koc
2026-06-17 16:09:50 +08:00
parent 19c7731292
commit e99a6d4c19
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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[];
};
+1 -1
View File
@@ -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 };
+1 -1
View File
@@ -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>;
+1 -1
View File
@@ -34,7 +34,7 @@ type SkillSourceOrigin = {
};
};
export type SkillSourceInstallResult =
type SkillSourceInstallResult =
| {
ok: true;
slug: string;
+2 -2
View File
@@ -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;