diff --git a/src/cli/plugins-command-helpers.ts b/src/cli/plugins-command-helpers.ts index 844b17e9461..d87fc45d82a 100644 --- a/src/cli/plugins-command-helpers.ts +++ b/src/cli/plugins-command-helpers.ts @@ -213,7 +213,7 @@ export function buildPreferredClawHubSpec(raw: string): string | null { } function normalizeReadinessPhase(readiness: ClawHubPackageReadiness): string { - return normalizeLowercaseStringOrEmpty(String(readiness.phase ?? readiness.status ?? "")); + return normalizeLowercaseStringOrEmpty(readiness.phase ?? readiness.status ?? ""); } export function isClawHubReadinessInstallReady( diff --git a/src/infra/clawhub.ts b/src/infra/clawhub.ts index 8f226f99ba1..74025101374 100644 --- a/src/infra/clawhub.ts +++ b/src/infra/clawhub.ts @@ -60,8 +60,8 @@ export type ClawHubArtifactScanState = | "suspicious" | "malicious" | "not-run" - | string; -export type ClawHubArtifactModerationState = "approved" | "quarantined" | "revoked" | string; + | (string & {}); +export type ClawHubArtifactModerationState = "approved" | "quarantined" | "revoked" | (string & {}); export type ClawHubResolvedArtifact = | { source: "clawhub"; @@ -115,7 +115,7 @@ export type ClawHubPackageReadinessPhase = | "metadata-ready" | "blocked" | "ready-for-openclaw" - | string; + | (string & {}); export type ClawHubPackageReadiness = { ready?: boolean | null; readyForOpenClaw?: boolean | null; @@ -124,12 +124,12 @@ export type ClawHubPackageReadiness = { status?: ClawHubPackageReadinessPhase | null; package?: { name?: string | null; - family?: ClawHubPackageFamily | string | null; - channel?: ClawHubPackageChannel | string | null; + family?: ClawHubPackageFamily | (string & {}) | null; + channel?: ClawHubPackageChannel | (string & {}) | null; isOfficial?: boolean | null; } | null; packageName?: string | null; - artifactKind?: ClawHubArtifactKind | string | null; + artifactKind?: ClawHubArtifactKind | (string & {}) | null; blockers?: string[]; scanState?: ClawHubArtifactScanState | null; moderationState?: ClawHubArtifactModerationState | null;