Skip to content

Commit 3c1b346

Browse files
committed
refactor(clawhub): remove unused skill list endpoint
1 parent 3952ac9 commit 3c1b346

2 files changed

Lines changed: 0 additions & 44 deletions

File tree

src/infra/clawhub.ts

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -386,27 +386,6 @@ export type ClawHubSkillSecurityVerdictsResponse = {
386386
items: ClawHubSkillSecurityVerdictItem[];
387387
};
388388

389-
export type ClawHubSkillListResponse = {
390-
items: Array<{
391-
slug: string;
392-
displayName: string;
393-
summary?: string;
394-
tags?: Record<string, string>;
395-
latestVersion?: {
396-
version: string;
397-
createdAt: number;
398-
changelog?: string;
399-
} | null;
400-
metadata?: {
401-
os?: string[] | null;
402-
systems?: string[] | null;
403-
} | null;
404-
createdAt: number;
405-
updatedAt: number;
406-
}>;
407-
nextCursor?: string | null;
408-
};
409-
410389
export type ClawHubDownloadResult = {
411390
archivePath: string;
412391
integrity: string;
@@ -1171,25 +1150,6 @@ export async function fetchClawHubSkillCard(params: {
11711150
return new TextDecoder().decode(bytes);
11721151
}
11731152

1174-
export async function listClawHubSkills(params: {
1175-
baseUrl?: string;
1176-
token?: string;
1177-
timeoutMs?: number;
1178-
fetchImpl?: FetchLike;
1179-
limit?: number;
1180-
}): Promise<ClawHubSkillListResponse> {
1181-
return await fetchJson<ClawHubSkillListResponse>({
1182-
baseUrl: params.baseUrl,
1183-
path: "/api/v1/skills",
1184-
token: params.token,
1185-
timeoutMs: params.timeoutMs,
1186-
fetchImpl: params.fetchImpl,
1187-
search: {
1188-
limit: params.limit ? String(params.limit) : undefined,
1189-
},
1190-
});
1191-
}
1192-
11931153
export async function downloadClawHubPackageArchive(params: {
11941154
name: string;
11951155
version?: string;

src/skills/lifecycle/clawhub.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const fetchClawHubSkillVerificationMock = vi.fn();
1212
const downloadClawHubSkillArchiveMock = vi.fn();
1313
const downloadClawHubSkillArchiveUrlMock = vi.fn();
1414
const downloadClawHubGitHubSkillArchiveMock = vi.fn();
15-
const listClawHubSkillsMock = vi.fn();
1615
const reportClawHubSkillInstallTelemetryMock = vi.fn();
1716
const resolveClawHubBaseUrlMock = vi.fn(() => "https://clawhub.ai");
1817
const isDefaultClawHubBaseUrlMock = vi.fn((baseUrl?: string) => !baseUrl);
@@ -31,7 +30,6 @@ vi.mock("../../infra/clawhub.js", () => ({
3130
downloadClawHubSkillArchive: downloadClawHubSkillArchiveMock,
3231
downloadClawHubSkillArchiveUrl: downloadClawHubSkillArchiveUrlMock,
3332
downloadClawHubGitHubSkillArchive: downloadClawHubGitHubSkillArchiveMock,
34-
listClawHubSkills: listClawHubSkillsMock,
3533
reportClawHubSkillInstallTelemetry: reportClawHubSkillInstallTelemetryMock,
3634
isDefaultClawHubBaseUrl: isDefaultClawHubBaseUrlMock,
3735
resolveClawHubBaseUrl: resolveClawHubBaseUrlMock,
@@ -180,7 +178,6 @@ describe("skills-clawhub", () => {
180178
downloadClawHubSkillArchiveMock.mockReset();
181179
downloadClawHubSkillArchiveUrlMock.mockReset();
182180
downloadClawHubGitHubSkillArchiveMock.mockReset();
183-
listClawHubSkillsMock.mockReset();
184181
reportClawHubSkillInstallTelemetryMock.mockReset();
185182
resolveClawHubBaseUrlMock.mockReset();
186183
isDefaultClawHubBaseUrlMock.mockReset();
@@ -1392,7 +1389,6 @@ describe("skills-clawhub", () => {
13921389
limit: 20,
13931390
baseUrl: undefined,
13941391
});
1395-
expect(listClawHubSkillsMock).not.toHaveBeenCalled();
13961392
});
13971393
});
13981394

0 commit comments

Comments
 (0)