refactor(skills): hide internal result types · openclaw/openclaw@e99a6d4
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ export type SkillIndexEntry = {
|
18 | 18 | userInvocable: boolean; |
19 | 19 | }; |
20 | 20 | |
21 | | -export type SkillIndex = { |
| 21 | +type SkillIndex = { |
22 | 22 | entries: SkillIndexEntry[]; |
23 | 23 | runtimeEntries: SkillEntry[]; |
24 | 24 | promptVisibleEntries: SkillEntry[]; |
@@ -27,7 +27,7 @@ export type SkillIndex = {
|
27 | 27 | byNormalizedName: ReadonlyMap<string, readonly SkillIndexEntry[]>; |
28 | 28 | }; |
29 | 29 | |
30 | | -export type BuildSkillIndexOptions = { |
| 30 | +type BuildSkillIndexOptions = { |
31 | 31 | bundledNames?: ReadonlySet<string>; |
32 | 32 | agentSkillFilter?: readonly string[]; |
33 | 33 | }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -41,7 +41,7 @@ type SkillArchiveInstallPolicy = {
|
41 | 41 | }; |
42 | 42 | |
43 | 43 | /** Result shape for installing a skill archive into a workspace skills dir. */ |
44 | | -export type SkillArchiveInstallResult = |
| 44 | +type SkillArchiveInstallResult = |
45 | 45 | | { ok: true; targetDir: string } |
46 | 46 | | { ok: false; error: string; failureKind: SkillArchiveInstallFailureKind }; |
47 | 47 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -14,7 +14,7 @@ import { runCommandWithTimeout } from "../../process/exec.js";
|
14 | 14 | import { hasBinary } from "../loading/config.js"; |
15 | 15 | import { parseTarVerboseMetadata } from "./install-tar-verbose.js"; |
16 | 16 | |
17 | | -export type ArchiveExtractResult = { stdout: string; stderr: string; code: number | null }; |
| 17 | +type ArchiveExtractResult = { stdout: string; stderr: string; code: number | null }; |
18 | 18 | type TarPreflightResult = { |
19 | 19 | entries: string[]; |
20 | 20 | metadata: ReturnType<typeof parseTarVerboseMetadata>; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -34,7 +34,7 @@ type SkillSourceOrigin = {
|
34 | 34 | }; |
35 | 35 | }; |
36 | 36 | |
37 | | -export type SkillSourceInstallResult = |
| 37 | +type SkillSourceInstallResult = |
38 | 38 | | { |
39 | 39 | ok: true; |
40 | 40 | slug: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ import {
|
15 | 15 | } from "./upload-store.js"; |
16 | 16 | |
17 | 17 | /** Error classes exposed by uploaded skill archive install attempts. */ |
18 | | -export type UploadedSkillInstallErrorKind = "invalid-request" | "unavailable"; |
| 18 | +type UploadedSkillInstallErrorKind = "invalid-request" | "unavailable"; |
19 | 19 | |
20 | 20 | /** User-facing disabled message for archive upload installs. */ |
21 | 21 | export const UPLOADED_SKILL_ARCHIVES_DISABLED_MESSAGE = |
@@ -25,7 +25,7 @@ export function areUploadedSkillArchivesEnabled(config: OpenClawConfig): boolean
|
25 | 25 | return config.skills?.install?.allowUploadedArchives === true; |
26 | 26 | } |
27 | 27 | |
28 | | -export type UploadedSkillInstallResult = |
| 28 | +type UploadedSkillInstallResult = |
29 | 29 | | { |
30 | 30 | ok: true; |
31 | 31 | message: string; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。