Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.55.0"
".": "0.56.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 55
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/smithery%2Fsmithery-8f89ae4612e134edd6727145a66b20b2bd6e77e41fdaef9eed4b8ae885e87425.yml
openapi_spec_hash: d0eca3c5b0cd0bd9bdf33de288067fb9
config_hash: be5393e7788ba802a675b6422639e436
configured_endpoints: 56
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/smithery%2Fsmithery-43d4f10825448402040e5849e1a990221129d3628397d1a3938ae41f872f6623.yml
openapi_spec_hash: d2babb21cf900087915b765c86d6e100
config_hash: c892f4a037284a6cd640f6ff0e04a6bf
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.56.0 (2026-03-13)

Full Changelog: [v0.55.0...v0.56.0](https://github.com/smithery-ai/typescript-api/compare/v0.55.0...v0.56.0)

### Features

* **SMI-1461:** support uploaded skill bundles ([#1786](https://github.com/smithery-ai/typescript-api/issues/1786)) ([3e01756](https://github.com/smithery-ai/typescript-api/commit/3e0175627acf6e10f161f812cdf0ed4eed7a74d5))

## 0.55.0 (2026-03-12)

Full Changelog: [v0.54.0...v0.55.0](https://github.com/smithery-ai/typescript-api/compare/v0.54.0...v0.55.0)
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Types:
- <code><a href="./src/resources/skills/skills.ts">SkillGetResponse</a></code>
- <code><a href="./src/resources/skills/skills.ts">SkillSetResponse</a></code>
- <code><a href="./src/resources/skills/skills.ts">SkillSyncResponse</a></code>
- <code><a href="./src/resources/skills/skills.ts">SkillUploadResponse</a></code>

Methods:

Expand All @@ -152,6 +153,7 @@ Methods:
- <code title="get /skills/{namespace}/{slug}">client.skills.<a href="./src/resources/skills/skills.ts">get</a>(slug, { ...params }) -> SkillGetResponse</code>
- <code title="put /skills/{namespace}/{slug}">client.skills.<a href="./src/resources/skills/skills.ts">set</a>(slug, { ...params }) -> SkillSetResponse</code>
- <code title="post /skills/{namespace}/{slug}/sync">client.skills.<a href="./src/resources/skills/skills.ts">sync</a>(slug, { ...params }) -> SkillSyncResponse</code>
- <code title="put /skills/{namespace}/{slug}/upload">client.skills.<a href="./src/resources/skills/skills.ts">upload</a>(slug, { ...params }) -> SkillUploadResponse</code>

## Votes

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@smithery/api",
"version": "0.55.0",
"version": "0.56.0",
"description": "The official TypeScript library for the Smithery API",
"author": "Smithery <contact@smithery.ai>",
"types": "dist/index.d.ts",
Expand Down
4 changes: 4 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ import {
SkillSetResponse,
SkillSyncParams,
SkillSyncResponse,
SkillUploadParams,
SkillUploadResponse,
Skills,
} from './resources/skills/skills';
import { type Fetch } from './internal/builtin-types';
Expand Down Expand Up @@ -889,6 +891,7 @@ export declare namespace Smithery {
type SkillGetResponse as SkillGetResponse,
type SkillSetResponse as SkillSetResponse,
type SkillSyncResponse as SkillSyncResponse,
type SkillUploadResponse as SkillUploadResponse,
type SkillListResponsesSkillsPage as SkillListResponsesSkillsPage,
type SkillCreateParams as SkillCreateParams,
type SkillListParams as SkillListParams,
Expand All @@ -897,6 +900,7 @@ export declare namespace Smithery {
type SkillGetParams as SkillGetParams,
type SkillSetParams as SkillSetParams,
type SkillSyncParams as SkillSyncParams,
type SkillUploadParams as SkillUploadParams,
};

export {
Expand Down
2 changes: 2 additions & 0 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ export {
type SkillGetResponse,
type SkillSetResponse,
type SkillSyncResponse,
type SkillUploadResponse,
type SkillCreateParams,
type SkillListParams,
type SkillDeleteParams,
type SkillDownloadParams,
type SkillGetParams,
type SkillSetParams,
type SkillSyncParams,
type SkillUploadParams,
type SkillListResponsesSkillsPage,
} from './skills/skills';
export {
Expand Down
2 changes: 2 additions & 0 deletions src/resources/skills/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ export {
type SkillGetResponse,
type SkillSetResponse,
type SkillSyncResponse,
type SkillUploadResponse,
type SkillCreateParams,
type SkillListParams,
type SkillDeleteParams,
type SkillDownloadParams,
type SkillGetParams,
type SkillSetParams,
type SkillSyncParams,
type SkillUploadParams,
type SkillListResponsesSkillsPage,
} from './skills';
export {
Expand Down
72 changes: 60 additions & 12 deletions src/resources/skills/skills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ import {
} from './votes';
import { APIPromise } from '../../core/api-promise';
import { PagePromise, SkillsPage, type SkillsPageParams } from '../../core/pagination';
import { type Uploadable } from '../../core/uploads';
import { buildHeaders } from '../../internal/headers';
import { RequestOptions } from '../../internal/request-options';
import { multipartFormRequestOptions } from '../../internal/uploads';
import { path } from '../../internal/utils/path';

/**
Expand Down Expand Up @@ -72,8 +74,7 @@ export class Skills extends APIResource {
}

/**
* Download a ZIP bundle containing all skill files, fetched via well-known
* endpoints.
* Download a ZIP bundle containing all skill files.
*/
download(slug: string, params: SkillDownloadParams, options?: RequestOptions): APIPromise<Response> {
const { namespace } = params;
Expand All @@ -93,13 +94,12 @@ export class Skills extends APIResource {
}

/**
* Idempotent endpoint to create or sync a skill. If the skill does not exist,
* creates it. If it exists, updates displayName, description, and externalStars
* from GitHub.
* Idempotent endpoint to create or update a GitHub-backed skill. Send
* application/json with `gitUrl`.
*/
set(slug: string, params: SkillSetParams, options?: RequestOptions): APIPromise<SkillSetResponse> {
const { namespace, ...body } = params;
return this._client.put(path`/skills/${namespace}/${slug}`, { body, ...options });
const { namespace, body } = params;
return this._client.put(path`/skills/${namespace}/${slug}`, { body: body, ...options });
}

/**
Expand All @@ -112,6 +112,17 @@ export class Skills extends APIResource {
const { namespace } = params;
return this._client.post(path`/skills/${namespace}/${slug}/sync`, options);
}

/**
* Upload or replace a skill bundle via multipart/form-data with an `archive` file.
*/
upload(slug: string, params: SkillUploadParams, options?: RequestOptions): APIPromise<SkillUploadResponse> {
const { namespace, ...body } = params;
return this._client.put(
path`/skills/${namespace}/${slug}/upload`,
multipartFormRequestOptions({ body, ...options }, this._client),
);
}
}

export type SkillListResponsesSkillsPage = SkillsPage<SkillListResponse>;
Expand Down Expand Up @@ -199,7 +210,7 @@ export interface SkillListResponse {
/**
* URL to the skill's source repository.
*/
gitUrl?: string;
gitUrl?: string | null;

/**
* Number of reviews for this skill.
Expand Down Expand Up @@ -250,7 +261,7 @@ export interface SkillGetResponse {

externalStars: number;

gitUrl: string;
gitUrl: string | null;

listed: boolean;

Expand Down Expand Up @@ -294,7 +305,7 @@ export interface SkillSetResponse {

externalStars: number;

gitUrl: string;
gitUrl: string | null;

listed: boolean;

Expand Down Expand Up @@ -323,6 +334,28 @@ export interface SkillSyncResponse {
updatedAt: string;
}

export interface SkillUploadResponse {
id: string;

createdAt: string;

description: string;

displayName: string;

externalStars: number;

gitUrl: string | null;

listed: boolean;

namespace: string;

slug: string;

updatedAt: string;
}

export interface SkillCreateParams {
/**
* GitHub URL pointing to a repository with SKILL.md
Expand Down Expand Up @@ -404,15 +437,28 @@ export interface SkillSetParams {
namespace: string;

/**
* Body param: GitHub URL pointing to a repository with SKILL.md
* Body param
*/
gitUrl: string;
body: unknown;
}

export interface SkillSyncParams {
namespace: string;
}

export interface SkillUploadParams {
/**
* Path param
*/
namespace: string;

/**
* Body param: ZIP file upload containing a skill folder with SKILL.md and any
* scripts, references, or assets.
*/
archive: Uploadable;
}

Skills.Votes = Votes;
Skills.Reviews = Reviews;

Expand All @@ -424,6 +470,7 @@ export declare namespace Skills {
type SkillGetResponse as SkillGetResponse,
type SkillSetResponse as SkillSetResponse,
type SkillSyncResponse as SkillSyncResponse,
type SkillUploadResponse as SkillUploadResponse,
type SkillListResponsesSkillsPage as SkillListResponsesSkillsPage,
type SkillCreateParams as SkillCreateParams,
type SkillListParams as SkillListParams,
Expand All @@ -432,6 +479,7 @@ export declare namespace Skills {
type SkillGetParams as SkillGetParams,
type SkillSetParams as SkillSetParams,
type SkillSyncParams as SkillSyncParams,
type SkillUploadParams as SkillUploadParams,
};

export {
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.55.0'; // x-release-please-version
export const VERSION = '0.56.0'; // x-release-please-version
29 changes: 26 additions & 3 deletions tests/api-resources/skills/skills.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Smithery from '@smithery/api';
import Smithery, { toFile } from '@smithery/api';

const client = new Smithery({
apiKey: 'My API Key',
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('resource skills', () => {
test.skip('set: only required params', async () => {
const responsePromise = client.skills.set('slug', {
namespace: 'namespace',
gitUrl: 'https://example.com',
body: {},
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -125,7 +125,7 @@ describe('resource skills', () => {
test.skip('set: required and optional params', async () => {
const response = await client.skills.set('slug', {
namespace: 'namespace',
gitUrl: 'https://example.com',
body: {},
});
});

Expand All @@ -145,4 +145,27 @@ describe('resource skills', () => {
test.skip('sync: required and optional params', async () => {
const response = await client.skills.sync('slug', { namespace: 'namespace' });
});

// Mock server tests are disabled
test.skip('upload: only required params', async () => {
const responsePromise = client.skills.upload('slug', {
namespace: 'namespace',
archive: await toFile(Buffer.from('Example data'), 'README.md'),
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
expect(response).not.toBeInstanceOf(Response);
const dataAndResponse = await responsePromise.withResponse();
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});

// Mock server tests are disabled
test.skip('upload: required and optional params', async () => {
const response = await client.skills.upload('slug', {
namespace: 'namespace',
archive: await toFile(Buffer.from('Example data'), 'README.md'),
});
});
});
Loading